diff --git a/assets/index-Dw4tqm7_.js b/assets/index-DvjFRyMn.js similarity index 86% rename from assets/index-Dw4tqm7_.js rename to assets/index-DvjFRyMn.js index e0995d0..64f34aa 100644 --- a/assets/index-Dw4tqm7_.js +++ b/assets/index-DvjFRyMn.js @@ -1,4 +1,4 @@ -var gj=Object.defineProperty;var q3=t=>{throw TypeError(t)};var vj=(t,e,n)=>e in t?gj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var $t=(t,e,n)=>vj(t,typeof e!="symbol"?e+"":e,n),aS=(t,e,n)=>e.has(t)||q3("Cannot "+n);var $o=(t,e,n)=>(aS(t,e,"read from private field"),n?n.call(t):e.get(t)),lS=(t,e,n)=>e.has(t)?q3("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),O0=(t,e,n,r)=>(aS(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),cS=(t,e,n)=>(aS(t,e,"access private method"),n);function yj(t,e){for(var n=0;nr[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 o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var D0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function qs(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var h5={exports:{}},Wx={},p5={exports:{}},Yt={};/** +var gj=Object.defineProperty;var q3=t=>{throw TypeError(t)};var vj=(t,e,n)=>e in t?gj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var $t=(t,e,n)=>vj(t,typeof e!="symbol"?e+"":e,n),cS=(t,e,n)=>e.has(t)||q3("Cannot "+n);var $o=(t,e,n)=>(cS(t,e,"read from private field"),n?n.call(t):e.get(t)),uS=(t,e,n)=>e.has(t)?q3("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),O0=(t,e,n,r)=>(cS(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),fS=(t,e,n)=>(cS(t,e,"access private method"),n);function yj(t,e){for(var n=0;nr[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 o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var D0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ys(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var h5={exports:{}},Hx={},p5={exports:{}},Yt={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var gj=Object.defineProperty;var q3=t=>{throw TypeError(t)};var vj=(t,e,n)=>e in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Km=Symbol.for("react.element"),xj=Symbol.for("react.portal"),bj=Symbol.for("react.fragment"),_j=Symbol.for("react.strict_mode"),wj=Symbol.for("react.profiler"),Sj=Symbol.for("react.provider"),Mj=Symbol.for("react.context"),Ej=Symbol.for("react.forward_ref"),Cj=Symbol.for("react.suspense"),Tj=Symbol.for("react.memo"),Rj=Symbol.for("react.lazy"),Y3=Symbol.iterator;function Aj(t){return t===null||typeof t!="object"?null:(t=Y3&&t[Y3]||t["@@iterator"],typeof t=="function"?t:null)}var m5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g5=Object.assign,v5={};function Bd(t,e,n){this.props=t,this.context=e,this.refs=v5,this.updater=n||m5}Bd.prototype.isReactComponent={};Bd.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Bd.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function y5(){}y5.prototype=Bd.prototype;function YC(t,e,n){this.props=t,this.context=e,this.refs=v5,this.updater=n||m5}var KC=YC.prototype=new y5;KC.constructor=YC;g5(KC,Bd.prototype);KC.isPureReactComponent=!0;var K3=Array.isArray,x5=Object.prototype.hasOwnProperty,ZC={current:null},b5={key:!0,ref:!0,__self:!0,__source:!0};function _5(t,e,n){var r,i={},o=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)x5.call(e,r)&&!b5.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1{throw TypeError(t)};var vj=(t,e,n)=>e in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Lj=T,Oj=Symbol.for("react.element"),Dj=Symbol.for("react.fragment"),Fj=Object.prototype.hasOwnProperty,zj=Lj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Uj={key:!0,ref:!0,__self:!0,__source:!0};function S5(t,e,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)Fj.call(e,r)&&!Uj.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:Oj,type:t,key:o,ref:s,props:i,_owner:zj.current}}Wx.Fragment=Dj;Wx.jsx=S5;Wx.jsxs=S5;h5.exports=Wx;var E=h5.exports,M5={exports:{}},co={},E5={exports:{}},C5={};/** + */var Lj=T,Oj=Symbol.for("react.element"),Dj=Symbol.for("react.fragment"),Fj=Object.prototype.hasOwnProperty,zj=Lj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Uj={key:!0,ref:!0,__self:!0,__source:!0};function S5(t,e,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)Fj.call(e,r)&&!Uj.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:Oj,type:t,key:o,ref:s,props:i,_owner:zj.current}}Hx.Fragment=Dj;Hx.jsx=S5;Hx.jsxs=S5;h5.exports=Hx;var E=h5.exports,M5={exports:{}},co={},E5={exports:{}},C5={};/** * @license React * scheduler.production.min.js * @@ -30,26 +30,26 @@ var gj=Object.defineProperty;var q3=t=>{throw TypeError(t)};var vj=(t,e,n)=>e in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var jj=T,oo=Bj;function ze(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),DE=Object.prototype.hasOwnProperty,Vj=/^[: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]*$/,J3={},Q3={};function $j(t){return DE.call(Q3,t)?!0:DE.call(J3,t)?!1:Vj.test(t)?Q3[t]=!0:(J3[t]=!0,!1)}function Wj(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Hj(t,e,n,r){if(e===null||typeof e>"u"||Wj(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function pi(t,e,n,r,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var Lr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Lr[t]=new pi(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Lr[e]=new pi(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Lr[t]=new pi(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Lr[t]=new pi(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Lr[t]=new pi(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Lr[t]=new pi(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Lr[t]=new pi(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Lr[t]=new pi(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Lr[t]=new pi(t,5,!1,t.toLowerCase(),null,!1,!1)});var QC=/[\-:]([a-z])/g;function eT(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(QC,eT);Lr[e]=new pi(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(QC,eT);Lr[e]=new pi(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(QC,eT);Lr[e]=new pi(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Lr[t]=new pi(t,1,!1,t.toLowerCase(),null,!1,!1)});Lr.xlinkHref=new pi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Lr[t]=new pi(t,1,!1,t.toLowerCase(),null,!0,!0)});function tT(t,e,n,r){var i=Lr.hasOwnProperty(e)?Lr[e]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zE=Object.prototype.hasOwnProperty,Vj=/^[: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]*$/,J3={},Q3={};function $j(t){return zE.call(Q3,t)?!0:zE.call(J3,t)?!1:Vj.test(t)?Q3[t]=!0:(J3[t]=!0,!1)}function Wj(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Hj(t,e,n,r){if(e===null||typeof e>"u"||Wj(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function mi(t,e,n,r,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var Lr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Lr[t]=new mi(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Lr[e]=new mi(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Lr[t]=new mi(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Lr[t]=new mi(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Lr[t]=new mi(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Lr[t]=new mi(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Lr[t]=new mi(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Lr[t]=new mi(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Lr[t]=new mi(t,5,!1,t.toLowerCase(),null,!1,!1)});var eT=/[\-:]([a-z])/g;function tT(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(eT,tT);Lr[e]=new mi(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(eT,tT);Lr[e]=new mi(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(eT,tT);Lr[e]=new mi(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Lr[t]=new mi(t,1,!1,t.toLowerCase(),null,!1,!1)});Lr.xlinkHref=new mi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Lr[t]=new mi(t,1,!1,t.toLowerCase(),null,!0,!0)});function nT(t,e,n,r){var i=Lr.hasOwnProperty(e)?Lr[e]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` -`+i[s].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{dS=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?up(t):""}function Gj(t){switch(t.tag){case 5:return up(t.type);case 16:return up("Lazy");case 13:return up("Suspense");case 19:return up("SuspenseList");case 0:case 2:case 15:return t=hS(t.type,!1),t;case 11:return t=hS(t.type.render,!1),t;case 1:return t=hS(t.type,!0),t;default:return""}}function BE(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Lf:return"Fragment";case kf:return"Portal";case FE:return"Profiler";case nT:return"StrictMode";case zE:return"Suspense";case UE:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case A5:return(t.displayName||"Context")+".Consumer";case R5:return(t._context.displayName||"Context")+".Provider";case rT:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case iT:return e=t.displayName||null,e!==null?e:BE(t.type)||"Memo";case fl:e=t._payload,t=t._init;try{return BE(t(e))}catch{}}return null}function Xj(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return BE(e);case 8:return e===nT?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Nl(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function I5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function qj(t){var e=I5(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function U0(t){t._valueTracker||(t._valueTracker=qj(t))}function N5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=I5(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Xy(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function jE(t,e){var n=e.checked;return Dn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function tI(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Nl(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function k5(t,e){e=e.checked,e!=null&&tT(t,"checked",e,!1)}function VE(t,e){k5(t,e);var n=Nl(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?$E(t,e.type,n):e.hasOwnProperty("defaultValue")&&$E(t,e.type,Nl(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function nI(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function $E(t,e,n){(e!=="number"||Xy(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var fp=Array.isArray;function ed(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=B0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Zp(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var _p={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},Yj=["Webkit","ms","Moz","O"];Object.keys(_p).forEach(function(t){Yj.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),_p[e]=_p[t]})});function F5(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||_p.hasOwnProperty(t)&&_p[t]?(""+e).trim():e+"px"}function z5(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=F5(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var Kj=Dn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function GE(t,e){if(e){if(Kj[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ze(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ze(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ze(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ze(62))}}function XE(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qE=null;function oT(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var YE=null,td=null,nd=null;function oI(t){if(t=Qm(t)){if(typeof YE!="function")throw Error(ze(280));var e=t.stateNode;e&&(e=Yx(e),YE(t.stateNode,t.type,e))}}function U5(t){td?nd?nd.push(t):nd=[t]:td=t}function B5(){if(td){var t=td,e=nd;if(nd=td=null,oI(t),e)for(t=0;t>>=0,t===0?32:31-(aV(t)/lV|0)|0}var j0=64,V0=4194304;function dp(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Zy(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=dp(a):(o&=s,o!==0&&(r=dp(o)))}else s=n&~i,s!==0?r=dp(s):o!==0&&(r=dp(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Zm(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ns(e),t[e]=n}function dV(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Sp),pI=" ",mI=!1;function sD(t,e){switch(t){case"keyup":return BV.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aD(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Of=!1;function VV(t,e){switch(t){case"compositionend":return aD(e);case"keypress":return e.which!==32?null:(mI=!0,pI);case"textInput":return t=e.data,t===pI&&mI?null:t;default:return null}}function $V(t,e){if(Of)return t==="compositionend"||!hT&&sD(t,e)?(t=iD(),xy=uT=vl=null,Of=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=xI(n)}}function fD(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?fD(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function dD(){for(var t=window,e=Xy();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Xy(t.document)}return e}function pT(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function JV(t){var e=dD(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&fD(n.ownerDocument.documentElement,n)){if(r!==null&&pT(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=bI(n,o);var s=bI(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Df=null,t2=null,Ep=null,n2=!1;function _I(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;n2||Df==null||Df!==Xy(r)||(r=Df,"selectionStart"in r&&pT(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ep&&rm(Ep,r)||(Ep=r,r=e1(t2,"onSelect"),0Uf||(t.current=l2[Uf],l2[Uf]=null,Uf--)}function bn(t,e){Uf++,l2[Uf]=t.current,t.current=e}var kl={},Zr=Bl(kl),Ni=Bl(!1),nu=kl;function pd(t,e){var n=t.type.contextTypes;if(!n)return kl;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function ki(t){return t=t.childContextTypes,t!=null}function n1(){Sn(Ni),Sn(Zr)}function RI(t,e,n){if(Zr.current!==kl)throw Error(ze(168));bn(Zr,e),bn(Ni,n)}function _D(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(ze(108,Xj(t)||"Unknown",i));return Dn({},n,r)}function r1(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||kl,nu=Zr.current,bn(Zr,t),bn(Ni,Ni.current),!0}function AI(t,e,n){var r=t.stateNode;if(!r)throw Error(ze(169));n?(t=_D(t,e,nu),r.__reactInternalMemoizedMergedChildContext=t,Sn(Ni),Sn(Zr),bn(Zr,t)):Sn(Ni),bn(Ni,n)}var ha=null,Kx=!1,TS=!1;function wD(t){ha===null?ha=[t]:ha.push(t)}function u$(t){Kx=!0,wD(t)}function jl(){if(!TS&&ha!==null){TS=!0;var t=0,e=hn;try{var n=ha;for(hn=1;t>=s,i-=s,ya=1<<32-ns(e)+i|n<L?(k=R,R=null):k=R.sibling;var C=h(g,R,_[L],S);if(C===null){R===null&&(R=k);break}t&&R&&C.alternate===null&&e(g,R),b=o(C,b,L),P===null?A=C:P.sibling=C,P=C,R=k}if(L===_.length)return n(g,R),An&&xc(g,L),A;if(R===null){for(;L<_.length;L++)R=f(g,_[L],S),R!==null&&(b=o(R,b,L),P===null?A=R:P.sibling=R,P=R);return An&&xc(g,L),A}for(R=r(g,R);L<_.length;L++)k=m(R,g,L,_[L],S),k!==null&&(t&&k.alternate!==null&&R.delete(k.key===null?L:k.key),b=o(k,b,L),P===null?A=k:P.sibling=k,P=k);return t&&R.forEach(function(N){return e(g,N)}),An&&xc(g,L),A}function x(g,b,_,S){var A=Ph(_);if(typeof A!="function")throw Error(ze(150));if(_=A.call(_),_==null)throw Error(ze(151));for(var P=A=null,R=b,L=b=0,k=null,C=_.next();R!==null&&!C.done;L++,C=_.next()){R.index>L?(k=R,R=null):k=R.sibling;var N=h(g,R,C.value,S);if(N===null){R===null&&(R=k);break}t&&R&&N.alternate===null&&e(g,R),b=o(N,b,L),P===null?A=N:P.sibling=N,P=N,R=k}if(C.done)return n(g,R),An&&xc(g,L),A;if(R===null){for(;!C.done;L++,C=_.next())C=f(g,C.value,S),C!==null&&(b=o(C,b,L),P===null?A=C:P.sibling=C,P=C);return An&&xc(g,L),A}for(R=r(g,R);!C.done;L++,C=_.next())C=m(R,g,L,C.value,S),C!==null&&(t&&C.alternate!==null&&R.delete(C.key===null?L:C.key),b=o(C,b,L),P===null?A=C:P.sibling=C,P=C);return t&&R.forEach(function(z){return e(g,z)}),An&&xc(g,L),A}function y(g,b,_,S){if(typeof _=="object"&&_!==null&&_.type===Lf&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case z0:e:{for(var A=_.key,P=b;P!==null;){if(P.key===A){if(A=_.type,A===Lf){if(P.tag===7){n(g,P.sibling),b=i(P,_.props.children),b.return=g,g=b;break e}}else if(P.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===fl&&NI(A)===P.type){n(g,P.sibling),b=i(P,_.props),b.ref=Oh(g,P,_),b.return=g,g=b;break e}n(g,P);break}else e(g,P);P=P.sibling}_.type===Lf?(b=jc(_.props.children,g.mode,S,_.key),b.return=g,g=b):(S=Ty(_.type,_.key,_.props,null,g.mode,S),S.ref=Oh(g,b,_),S.return=g,g=S)}return s(g);case kf:e:{for(P=_.key;b!==null;){if(b.key===P)if(b.tag===4&&b.stateNode.containerInfo===_.containerInfo&&b.stateNode.implementation===_.implementation){n(g,b.sibling),b=i(b,_.children||[]),b.return=g,g=b;break e}else{n(g,b);break}else e(g,b);b=b.sibling}b=OS(_,g.mode,S),b.return=g,g=b}return s(g);case fl:return P=_._init,y(g,b,P(_._payload),S)}if(fp(_))return v(g,b,_,S);if(Ph(_))return x(g,b,_,S);Y0(g,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,b!==null&&b.tag===6?(n(g,b.sibling),b=i(b,_),b.return=g,g=b):(n(g,b),b=LS(_,g.mode,S),b.return=g,g=b),s(g)):n(g,b)}return y}var gd=CD(!0),TD=CD(!1),s1=Bl(null),a1=null,Vf=null,yT=null;function xT(){yT=Vf=a1=null}function bT(t){var e=s1.current;Sn(s1),t._currentValue=e}function f2(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function id(t,e){a1=t,yT=Vf=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Pi=!0),t.firstContext=null)}function ko(t){var e=t._currentValue;if(yT!==t)if(t={context:t,memoizedValue:e,next:null},Vf===null){if(a1===null)throw Error(ze(308));Vf=t,a1.dependencies={lanes:0,firstContext:t}}else Vf=Vf.next=t;return e}var Ic=null;function _T(t){Ic===null?Ic=[t]:Ic.push(t)}function RD(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,_T(e)):(n.next=i.next,i.next=n),e.interleaved=n,Pa(t,r)}function Pa(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var dl=!1;function wT(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function AD(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Sa(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function El(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,nn&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Pa(t,n)}return i=r.interleaved,i===null?(e.next=e,_T(r)):(e.next=i.next,i.next=e),r.interleaved=e,Pa(t,n)}function _y(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,aT(t,n)}}function kI(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=e:o=o.next=e}else i=o=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function l1(t,e,n,r){var i=t.updateQueue;dl=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;s=0,u=c=l=null,a=o;do{var h=a.lane,m=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=t,x=a;switch(h=e,m=n,x.tag){case 1:if(v=x.payload,typeof v=="function"){f=v.call(m,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,h=typeof v=="function"?v.call(m,f,h):v,h==null)break e;f=Dn({},f,h);break e;case 2:dl=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else m={eventTime:m,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=m,l=f):u=u.next=m,s|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(u===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do s|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);ou|=s,t.lanes=s,t.memoizedState=f}}function LI(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var r=AS.transition;AS.transition={};try{t(!1),e()}finally{hn=n,AS.transition=r}}function GD(){return Lo().memoizedState}function p$(t,e,n){var r=Tl(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},XD(t))qD(e,n);else if(n=RD(t,e,n,r),n!==null){var i=ui();rs(n,t,r,i),YD(n,e,r)}}function m$(t,e,n){var r=Tl(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(XD(t))qD(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,os(a,s)){var l=e.interleaved;l===null?(i.next=i,_T(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=RD(t,e,i,r),n!==null&&(i=ui(),rs(n,t,r,i),YD(n,e,r))}}function XD(t){var e=t.alternate;return t===Ln||e!==null&&e===Ln}function qD(t,e){Cp=u1=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function YD(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,aT(t,n)}}var f1={readContext:ko,useCallback:jr,useContext:jr,useEffect:jr,useImperativeHandle:jr,useInsertionEffect:jr,useLayoutEffect:jr,useMemo:jr,useReducer:jr,useRef:jr,useState:jr,useDebugValue:jr,useDeferredValue:jr,useTransition:jr,useMutableSource:jr,useSyncExternalStore:jr,useId:jr,unstable_isNewReconciler:!1},g$={readContext:ko,useCallback:function(t,e){return Cs().memoizedState=[t,e===void 0?null:e],t},useContext:ko,useEffect:DI,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Sy(4194308,4,jD.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Sy(4194308,4,t,e)},useInsertionEffect:function(t,e){return Sy(4,2,t,e)},useMemo:function(t,e){var n=Cs();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Cs();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=p$.bind(null,Ln,t),[r.memoizedState,t]},useRef:function(t){var e=Cs();return t={current:t},e.memoizedState=t},useState:OI,useDebugValue:PT,useDeferredValue:function(t){return Cs().memoizedState=t},useTransition:function(){var t=OI(!1),e=t[0];return t=h$.bind(null,t[1]),Cs().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Ln,i=Cs();if(An){if(n===void 0)throw Error(ze(407));n=n()}else{if(n=e(),Sr===null)throw Error(ze(349));iu&30||kD(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,DI(OD.bind(null,r,o,t),[t]),r.flags|=2048,fm(9,LD.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=Cs(),e=Sr.identifierPrefix;if(An){var n=xa,r=ya;n=(r&~(1<<32-ns(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=cm++,0")&&(l=l.replace("",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{pS=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?up(t):""}function Gj(t){switch(t.tag){case 5:return up(t.type);case 16:return up("Lazy");case 13:return up("Suspense");case 19:return up("SuspenseList");case 0:case 2:case 15:return t=mS(t.type,!1),t;case 11:return t=mS(t.type.render,!1),t;case 1:return t=mS(t.type,!0),t;default:return""}}function VE(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Lf:return"Fragment";case kf:return"Portal";case UE:return"Profiler";case rT:return"StrictMode";case BE:return"Suspense";case jE:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case A5:return(t.displayName||"Context")+".Consumer";case R5:return(t._context.displayName||"Context")+".Provider";case iT:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case oT:return e=t.displayName||null,e!==null?e:VE(t.type)||"Memo";case fl:e=t._payload,t=t._init;try{return VE(t(e))}catch{}}return null}function Xj(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return VE(e);case 8:return e===rT?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Nl(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function I5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function qj(t){var e=I5(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function U0(t){t._valueTracker||(t._valueTracker=qj(t))}function N5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=I5(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function qy(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function $E(t,e){var n=e.checked;return Dn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function tI(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Nl(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function k5(t,e){e=e.checked,e!=null&&nT(t,"checked",e,!1)}function WE(t,e){k5(t,e);var n=Nl(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?HE(t,e.type,n):e.hasOwnProperty("defaultValue")&&HE(t,e.type,Nl(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function nI(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function HE(t,e,n){(e!=="number"||qy(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var fp=Array.isArray;function ed(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=B0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Zp(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var _p={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},Yj=["Webkit","ms","Moz","O"];Object.keys(_p).forEach(function(t){Yj.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),_p[e]=_p[t]})});function F5(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||_p.hasOwnProperty(t)&&_p[t]?(""+e).trim():e+"px"}function z5(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=F5(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var Kj=Dn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function qE(t,e){if(e){if(Kj[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ze(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ze(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ze(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ze(62))}}function YE(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var KE=null;function sT(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ZE=null,td=null,nd=null;function oI(t){if(t=Qm(t)){if(typeof ZE!="function")throw Error(ze(280));var e=t.stateNode;e&&(e=Kx(e),ZE(t.stateNode,t.type,e))}}function U5(t){td?nd?nd.push(t):nd=[t]:td=t}function B5(){if(td){var t=td,e=nd;if(nd=td=null,oI(t),e)for(t=0;t>>=0,t===0?32:31-(aV(t)/lV|0)|0}var j0=64,V0=4194304;function dp(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Jy(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=dp(a):(o&=s,o!==0&&(r=dp(o)))}else s=n&~i,s!==0?r=dp(s):o!==0&&(r=dp(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Zm(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ns(e),t[e]=n}function dV(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Sp),pI=" ",mI=!1;function sD(t,e){switch(t){case"keyup":return BV.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aD(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Of=!1;function VV(t,e){switch(t){case"compositionend":return aD(e);case"keypress":return e.which!==32?null:(mI=!0,pI);case"textInput":return t=e.data,t===pI&&mI?null:t;default:return null}}function $V(t,e){if(Of)return t==="compositionend"||!pT&&sD(t,e)?(t=iD(),xy=fT=vl=null,Of=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=xI(n)}}function fD(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?fD(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function dD(){for(var t=window,e=qy();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=qy(t.document)}return e}function mT(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function JV(t){var e=dD(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&fD(n.ownerDocument.documentElement,n)){if(r!==null&&mT(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=bI(n,o);var s=bI(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Df=null,r2=null,Ep=null,i2=!1;function _I(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;i2||Df==null||Df!==qy(r)||(r=Df,"selectionStart"in r&&mT(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ep&&rm(Ep,r)||(Ep=r,r=t1(r2,"onSelect"),0Uf||(t.current=u2[Uf],u2[Uf]=null,Uf--)}function bn(t,e){Uf++,u2[Uf]=t.current,t.current=e}var kl={},Jr=Bl(kl),ki=Bl(!1),nu=kl;function pd(t,e){var n=t.type.contextTypes;if(!n)return kl;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Li(t){return t=t.childContextTypes,t!=null}function r1(){Sn(ki),Sn(Jr)}function RI(t,e,n){if(Jr.current!==kl)throw Error(ze(168));bn(Jr,e),bn(ki,n)}function _D(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(ze(108,Xj(t)||"Unknown",i));return Dn({},n,r)}function i1(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||kl,nu=Jr.current,bn(Jr,t),bn(ki,ki.current),!0}function AI(t,e,n){var r=t.stateNode;if(!r)throw Error(ze(169));n?(t=_D(t,e,nu),r.__reactInternalMemoizedMergedChildContext=t,Sn(ki),Sn(Jr),bn(Jr,t)):Sn(ki),bn(ki,n)}var pa=null,Zx=!1,AS=!1;function wD(t){pa===null?pa=[t]:pa.push(t)}function u$(t){Zx=!0,wD(t)}function jl(){if(!AS&&pa!==null){AS=!0;var t=0,e=hn;try{var n=pa;for(hn=1;t>=s,i-=s,xa=1<<32-ns(e)+i|n<L?(k=R,R=null):k=R.sibling;var C=h(g,R,_[L],S);if(C===null){R===null&&(R=k);break}t&&R&&C.alternate===null&&e(g,R),b=o(C,b,L),P===null?A=C:P.sibling=C,P=C,R=k}if(L===_.length)return n(g,R),An&&xc(g,L),A;if(R===null){for(;L<_.length;L++)R=f(g,_[L],S),R!==null&&(b=o(R,b,L),P===null?A=R:P.sibling=R,P=R);return An&&xc(g,L),A}for(R=r(g,R);L<_.length;L++)k=m(R,g,L,_[L],S),k!==null&&(t&&k.alternate!==null&&R.delete(k.key===null?L:k.key),b=o(k,b,L),P===null?A=k:P.sibling=k,P=k);return t&&R.forEach(function(N){return e(g,N)}),An&&xc(g,L),A}function x(g,b,_,S){var A=Ph(_);if(typeof A!="function")throw Error(ze(150));if(_=A.call(_),_==null)throw Error(ze(151));for(var P=A=null,R=b,L=b=0,k=null,C=_.next();R!==null&&!C.done;L++,C=_.next()){R.index>L?(k=R,R=null):k=R.sibling;var N=h(g,R,C.value,S);if(N===null){R===null&&(R=k);break}t&&R&&N.alternate===null&&e(g,R),b=o(N,b,L),P===null?A=N:P.sibling=N,P=N,R=k}if(C.done)return n(g,R),An&&xc(g,L),A;if(R===null){for(;!C.done;L++,C=_.next())C=f(g,C.value,S),C!==null&&(b=o(C,b,L),P===null?A=C:P.sibling=C,P=C);return An&&xc(g,L),A}for(R=r(g,R);!C.done;L++,C=_.next())C=m(R,g,L,C.value,S),C!==null&&(t&&C.alternate!==null&&R.delete(C.key===null?L:C.key),b=o(C,b,L),P===null?A=C:P.sibling=C,P=C);return t&&R.forEach(function(z){return e(g,z)}),An&&xc(g,L),A}function y(g,b,_,S){if(typeof _=="object"&&_!==null&&_.type===Lf&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case z0:e:{for(var A=_.key,P=b;P!==null;){if(P.key===A){if(A=_.type,A===Lf){if(P.tag===7){n(g,P.sibling),b=i(P,_.props.children),b.return=g,g=b;break e}}else if(P.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===fl&&NI(A)===P.type){n(g,P.sibling),b=i(P,_.props),b.ref=Oh(g,P,_),b.return=g,g=b;break e}n(g,P);break}else e(g,P);P=P.sibling}_.type===Lf?(b=jc(_.props.children,g.mode,S,_.key),b.return=g,g=b):(S=Ty(_.type,_.key,_.props,null,g.mode,S),S.ref=Oh(g,b,_),S.return=g,g=S)}return s(g);case kf:e:{for(P=_.key;b!==null;){if(b.key===P)if(b.tag===4&&b.stateNode.containerInfo===_.containerInfo&&b.stateNode.implementation===_.implementation){n(g,b.sibling),b=i(b,_.children||[]),b.return=g,g=b;break e}else{n(g,b);break}else e(g,b);b=b.sibling}b=FS(_,g.mode,S),b.return=g,g=b}return s(g);case fl:return P=_._init,y(g,b,P(_._payload),S)}if(fp(_))return v(g,b,_,S);if(Ph(_))return x(g,b,_,S);Y0(g,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,b!==null&&b.tag===6?(n(g,b.sibling),b=i(b,_),b.return=g,g=b):(n(g,b),b=DS(_,g.mode,S),b.return=g,g=b),s(g)):n(g,b)}return y}var gd=CD(!0),TD=CD(!1),a1=Bl(null),l1=null,Vf=null,xT=null;function bT(){xT=Vf=l1=null}function _T(t){var e=a1.current;Sn(a1),t._currentValue=e}function h2(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function id(t,e){l1=t,xT=Vf=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Ii=!0),t.firstContext=null)}function ko(t){var e=t._currentValue;if(xT!==t)if(t={context:t,memoizedValue:e,next:null},Vf===null){if(l1===null)throw Error(ze(308));Vf=t,l1.dependencies={lanes:0,firstContext:t}}else Vf=Vf.next=t;return e}var Ic=null;function wT(t){Ic===null?Ic=[t]:Ic.push(t)}function RD(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,wT(e)):(n.next=i.next,i.next=n),e.interleaved=n,Ia(t,r)}function Ia(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var dl=!1;function ST(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function AD(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ma(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function El(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,nn&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Ia(t,n)}return i=r.interleaved,i===null?(e.next=e,wT(r)):(e.next=i.next,i.next=e),r.interleaved=e,Ia(t,n)}function _y(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,lT(t,n)}}function kI(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=e:o=o.next=e}else i=o=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function c1(t,e,n,r){var i=t.updateQueue;dl=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?o=c:s.next=c,s=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;s=0,u=c=l=null,a=o;do{var h=a.lane,m=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=t,x=a;switch(h=e,m=n,x.tag){case 1:if(v=x.payload,typeof v=="function"){f=v.call(m,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,h=typeof v=="function"?v.call(m,f,h):v,h==null)break e;f=Dn({},f,h);break e;case 2:dl=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else m={eventTime:m,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=m,l=f):u=u.next=m,s|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(u===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do s|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);ou|=s,t.lanes=s,t.memoizedState=f}}function LI(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var r=IS.transition;IS.transition={};try{t(!1),e()}finally{hn=n,IS.transition=r}}function GD(){return Lo().memoizedState}function p$(t,e,n){var r=Tl(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},XD(t))qD(e,n);else if(n=RD(t,e,n,r),n!==null){var i=fi();rs(n,t,r,i),YD(n,e,r)}}function m$(t,e,n){var r=Tl(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(XD(t))qD(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,os(a,s)){var l=e.interleaved;l===null?(i.next=i,wT(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=RD(t,e,i,r),n!==null&&(i=fi(),rs(n,t,r,i),YD(n,e,r))}}function XD(t){var e=t.alternate;return t===Ln||e!==null&&e===Ln}function qD(t,e){Cp=f1=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function YD(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,lT(t,n)}}var d1={readContext:ko,useCallback:jr,useContext:jr,useEffect:jr,useImperativeHandle:jr,useInsertionEffect:jr,useLayoutEffect:jr,useMemo:jr,useReducer:jr,useRef:jr,useState:jr,useDebugValue:jr,useDeferredValue:jr,useTransition:jr,useMutableSource:jr,useSyncExternalStore:jr,useId:jr,unstable_isNewReconciler:!1},g$={readContext:ko,useCallback:function(t,e){return Ts().memoizedState=[t,e===void 0?null:e],t},useContext:ko,useEffect:DI,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Sy(4194308,4,jD.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Sy(4194308,4,t,e)},useInsertionEffect:function(t,e){return Sy(4,2,t,e)},useMemo:function(t,e){var n=Ts();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Ts();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=p$.bind(null,Ln,t),[r.memoizedState,t]},useRef:function(t){var e=Ts();return t={current:t},e.memoizedState=t},useState:OI,useDebugValue:IT,useDeferredValue:function(t){return Ts().memoizedState=t},useTransition:function(){var t=OI(!1),e=t[0];return t=h$.bind(null,t[1]),Ts().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Ln,i=Ts();if(An){if(n===void 0)throw Error(ze(407));n=n()}else{if(n=e(),Sr===null)throw Error(ze(349));iu&30||kD(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,DI(OD.bind(null,r,o,t),[t]),r.flags|=2048,fm(9,LD.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=Ts(),e=Sr.identifierPrefix;if(An){var n=ba,r=xa;n=(r&~(1<<32-ns(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=cm++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[As]=e,t[sm]=r,oF(t,e,!1,!1),e.stateNode=t;e:{switch(s=XE(n,r),n){case"dialog":_n("cancel",t),_n("close",t),i=r;break;case"iframe":case"object":case"embed":_n("load",t),i=r;break;case"video":case"audio":for(i=0;ixd&&(e.flags|=128,r=!0,Dh(o,!1),e.lanes=4194304)}else{if(!r)if(t=c1(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Dh(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!An)return Vr(e),null}else 2*Yn()-o.renderingStartTime>xd&&n!==1073741824&&(e.flags|=128,r=!0,Dh(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Yn(),e.sibling=null,n=Nn.current,bn(Nn,r?n&1|2:n&1),e):(Vr(e),null);case 22:case 23:return DT(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Yi&1073741824&&(Vr(e),e.subtreeFlags&6&&(e.flags|=8192)):Vr(e),null;case 24:return null;case 25:return null}throw Error(ze(156,e.tag))}function M$(t,e){switch(gT(e),e.tag){case 1:return ki(e.type)&&n1(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return vd(),Sn(Ni),Sn(Zr),ET(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return MT(e),null;case 13:if(Sn(Nn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ze(340));md()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Sn(Nn),null;case 4:return vd(),null;case 10:return bT(e.type._context),null;case 22:case 23:return DT(),null;case 24:return null;default:return null}}var Z0=!1,Yr=!1,E$=typeof WeakSet=="function"?WeakSet:Set,ct=null;function $f(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$n(t,e,r)}else n.current=null}function b2(t,e,n){try{n()}catch(r){$n(t,e,r)}}var XI=!1;function C$(t,e){if(r2=Jy,t=dD(),pT(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,f=t,h=null;t:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===t)break t;if(h===n&&++c===i&&(a=s),h===o&&++u===r&&(l=s),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(i2={focusedElem:t,selectionRange:n},Jy=!1,ct=e;ct!==null;)if(e=ct,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ct=t;else for(;ct!==null;){e=ct;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var x=v.memoizedProps,y=v.memoizedState,g=e.stateNode,b=g.getSnapshotBeforeUpdate(e.elementType===e.type?x:Yo(e.type,x),y);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=e.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ze(163))}}catch(S){$n(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,ct=t;break}ct=e.return}return v=XI,XI=!1,v}function Tp(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&b2(e,n,o)}i=i.next}while(i!==r)}}function Qx(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function _2(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function lF(t){var e=t.alternate;e!==null&&(t.alternate=null,lF(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[As],delete e[sm],delete e[a2],delete e[l$],delete e[c$])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function cF(t){return t.tag===5||t.tag===3||t.tag===4}function qI(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||cF(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function w2(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=t1));else if(r!==4&&(t=t.child,t!==null))for(w2(t,e,n),t=t.sibling;t!==null;)w2(t,e,n),t=t.sibling}function S2(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(S2(t,e,n),t=t.sibling;t!==null;)S2(t,e,n),t=t.sibling}var Ar=null,Zo=!1;function Qa(t,e,n){for(n=n.child;n!==null;)uF(t,e,n),n=n.sibling}function uF(t,e,n){if(Ls&&typeof Ls.onCommitFiberUnmount=="function")try{Ls.onCommitFiberUnmount(Hx,n)}catch{}switch(n.tag){case 5:Yr||$f(n,e);case 6:var r=Ar,i=Zo;Ar=null,Qa(t,e,n),Ar=r,Zo=i,Ar!==null&&(Zo?(t=Ar,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ar.removeChild(n.stateNode));break;case 18:Ar!==null&&(Zo?(t=Ar,n=n.stateNode,t.nodeType===8?CS(t.parentNode,n):t.nodeType===1&&CS(t,n),tm(t)):CS(Ar,n.stateNode));break;case 4:r=Ar,i=Zo,Ar=n.stateNode.containerInfo,Zo=!0,Qa(t,e,n),Ar=r,Zo=i;break;case 0:case 11:case 14:case 15:if(!Yr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&b2(n,e,s),i=i.next}while(i!==r)}Qa(t,e,n);break;case 1:if(!Yr&&($f(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){$n(n,e,a)}Qa(t,e,n);break;case 21:Qa(t,e,n);break;case 22:n.mode&1?(Yr=(r=Yr)||n.memoizedState!==null,Qa(t,e,n),Yr=r):Qa(t,e,n);break;default:Qa(t,e,n)}}function YI(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new E$),e.forEach(function(r){var i=O$.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Wo(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Yn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*R$(r/1960))-r,10t?16:t,yl===null)var r=!1;else{if(t=yl,yl=null,p1=0,nn&6)throw Error(ze(331));var i=nn;for(nn|=4,ct=t.current;ct!==null;){var o=ct,s=o.child;if(ct.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lYn()-LT?Bc(t,0):kT|=n),Li(t,e)}function yF(t,e){e===0&&(t.mode&1?(e=V0,V0<<=1,!(V0&130023424)&&(V0=4194304)):e=1);var n=ui();t=Pa(t,e),t!==null&&(Zm(t,e,n),Li(t,n))}function L$(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),yF(t,n)}function O$(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ze(314))}r!==null&&r.delete(e),yF(t,n)}var xF;xF=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ni.current)Pi=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Pi=!1,w$(t,e,n);Pi=!!(t.flags&131072)}else Pi=!1,An&&e.flags&1048576&&SD(e,o1,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;My(t,e),t=e.pendingProps;var i=pd(e,Zr.current);id(e,n),i=TT(null,e,r,t,i,n);var o=RT();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,ki(r)?(o=!0,r1(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,wT(e),i.updater=Jx,e.stateNode=i,i._reactInternals=e,h2(e,r,t,n),e=g2(null,e,r,!0,o,n)):(e.tag=0,An&&o&&mT(e),oi(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(My(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=F$(r),t=Yo(r,t),i){case 0:e=m2(null,e,r,t,n);break e;case 1:e=WI(null,e,r,t,n);break e;case 11:e=VI(null,e,r,t,n);break e;case 14:e=$I(null,e,r,Yo(r.type,t),n);break e}throw Error(ze(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Yo(r,i),m2(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Yo(r,i),WI(t,e,r,i,n);case 3:e:{if(nF(e),t===null)throw Error(ze(387));r=e.pendingProps,o=e.memoizedState,i=o.element,AD(t,e),l1(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=yd(Error(ze(423)),e),e=HI(t,e,r,n,i);break e}else if(r!==i){i=yd(Error(ze(424)),e),e=HI(t,e,r,n,i);break e}else for(Qi=Ml(e.stateNode.containerInfo.firstChild),eo=e,An=!0,Jo=null,n=TD(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(md(),r===i){e=Ia(t,e,n);break e}oi(t,e,r,n)}e=e.child}return e;case 5:return PD(e),t===null&&u2(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,o2(r,i)?s=null:o!==null&&o2(r,o)&&(e.flags|=32),tF(t,e),oi(t,e,s,n),e.child;case 6:return t===null&&u2(e),null;case 13:return rF(t,e,n);case 4:return ST(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=gd(e,null,r,n):oi(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Yo(r,i),VI(t,e,r,i,n);case 7:return oi(t,e,e.pendingProps,n),e.child;case 8:return oi(t,e,e.pendingProps.children,n),e.child;case 12:return oi(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,bn(s1,r._currentValue),r._currentValue=s,o!==null)if(os(o.value,s)){if(o.children===i.children&&!Ni.current){e=Ia(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Sa(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),f2(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(ze(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),f2(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}oi(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,id(e,n),i=ko(i),r=r(i),e.flags|=1,oi(t,e,r,n),e.child;case 14:return r=e.type,i=Yo(r,e.pendingProps),i=Yo(r.type,i),$I(t,e,r,i,n);case 15:return QD(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Yo(r,i),My(t,e),e.tag=1,ki(r)?(t=!0,r1(e)):t=!1,id(e,n),KD(e,r,i),h2(e,r,i,n),g2(null,e,r,!0,t,n);case 19:return iF(t,e,n);case 22:return eF(t,e,n)}throw Error(ze(156,e.tag))};function bF(t,e){return X5(t,e)}function D$(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Po(t,e,n,r){return new D$(t,e,n,r)}function zT(t){return t=t.prototype,!(!t||!t.isReactComponent)}function F$(t){if(typeof t=="function")return zT(t)?1:0;if(t!=null){if(t=t.$$typeof,t===rT)return 11;if(t===iT)return 14}return 2}function Rl(t,e){var n=t.alternate;return n===null?(n=Po(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ty(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")zT(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case Lf:return jc(n.children,i,o,e);case nT:s=8,i|=8;break;case FE:return t=Po(12,n,e,i|2),t.elementType=FE,t.lanes=o,t;case zE:return t=Po(13,n,e,i),t.elementType=zE,t.lanes=o,t;case UE:return t=Po(19,n,e,i),t.elementType=UE,t.lanes=o,t;case P5:return tb(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case R5:s=10;break e;case A5:s=9;break e;case rT:s=11;break e;case iT:s=14;break e;case fl:s=16,r=null;break e}throw Error(ze(130,t==null?t:typeof t,""))}return e=Po(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function jc(t,e,n,r){return t=Po(7,t,r,e),t.lanes=n,t}function tb(t,e,n,r){return t=Po(22,t,r,e),t.elementType=P5,t.lanes=n,t.stateNode={isHidden:!1},t}function LS(t,e,n){return t=Po(6,t,null,e),t.lanes=n,t}function OS(t,e,n){return e=Po(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function z$(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mS(0),this.expirationTimes=mS(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mS(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function UT(t,e,n,r,i,o,s,a,l){return t=new z$(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Po(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wT(o),t}function U$(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(MF)}catch(t){console.error(t)}}MF(),M5.exports=co;var Vl=M5.exports;const pp=Xs(Vl);var $T,rN=Vl;$T=rN.createRoot,rN.hydrateRoot;function EF(t,e){return function(){return t.apply(e,arguments)}}const{toString:W$}=Object.prototype,{getPrototypeOf:WT}=Object,sb=(t=>e=>{const n=W$.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),us=t=>(t=t.toLowerCase(),e=>sb(e)===t),ab=t=>e=>typeof e===t,{isArray:$d}=Array,hm=ab("undefined");function H$(t){return t!==null&&!hm(t)&&t.constructor!==null&&!hm(t.constructor)&&to(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const CF=us("ArrayBuffer");function G$(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&CF(t.buffer),e}const X$=ab("string"),to=ab("function"),TF=ab("number"),lb=t=>t!==null&&typeof t=="object",q$=t=>t===!0||t===!1,Ry=t=>{if(sb(t)!=="object")return!1;const e=WT(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Y$=us("Date"),K$=us("File"),Z$=us("Blob"),J$=us("FileList"),Q$=t=>lb(t)&&to(t.pipe),eW=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||to(t.append)&&((e=sb(t))==="formdata"||e==="object"&&to(t.toString)&&t.toString()==="[object FormData]"))},tW=us("URLSearchParams"),[nW,rW,iW,oW]=["ReadableStream","Request","Response","Headers"].map(us),sW=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function tg(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),$d(t))for(r=0,i=t.length;r0;)if(i=n[r],e===i.toLowerCase())return i;return null}const kc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,AF=t=>!hm(t)&&t!==kc;function R2(){const{caseless:t}=AF(this)&&this||{},e={},n=(r,i)=>{const o=t&&RF(e,i)||i;Ry(e[o])&&Ry(r)?e[o]=R2(e[o],r):Ry(r)?e[o]=R2({},r):$d(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r(tg(e,(i,o)=>{n&&to(i)?t[o]=EF(i,n):t[o]=i},{allOwnKeys:r}),t),lW=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),cW=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},uW=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&WT(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},fW=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},dW=t=>{if(!t)return null;if($d(t))return t;let e=t.length;if(!TF(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},hW=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&WT(Uint8Array)),pW=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},mW=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},gW=us("HTMLFormElement"),vW=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),iN=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),yW=us("RegExp"),PF=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};tg(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},xW=t=>{PF(t,(e,n)=>{if(to(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(to(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},bW=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return $d(t)?r(t):r(String(t).split(e)),n},_W=()=>{},wW=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,DS="abcdefghijklmnopqrstuvwxyz",oN="0123456789",IF={DIGIT:oN,ALPHA:DS,ALPHA_DIGIT:DS+DS.toUpperCase()+oN},SW=(t=16,e=IF.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function MW(t){return!!(t&&to(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const EW=t=>{const e=new Array(10),n=(r,i)=>{if(lb(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=$d(r)?[]:{};return tg(r,(s,a)=>{const l=n(s,i+1);!hm(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},CW=us("AsyncFunction"),TW=t=>t&&(lb(t)||to(t))&&to(t.then)&&to(t.catch),NF=((t,e)=>t?setImmediate:e?((n,r)=>(kc.addEventListener("message",({source:i,data:o})=>{i===kc&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),kc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",to(kc.postMessage)),RW=typeof queueMicrotask<"u"?queueMicrotask.bind(kc):typeof process<"u"&&process.nextTick||NF,we={isArray:$d,isArrayBuffer:CF,isBuffer:H$,isFormData:eW,isArrayBufferView:G$,isString:X$,isNumber:TF,isBoolean:q$,isObject:lb,isPlainObject:Ry,isReadableStream:nW,isRequest:rW,isResponse:iW,isHeaders:oW,isUndefined:hm,isDate:Y$,isFile:K$,isBlob:Z$,isRegExp:yW,isFunction:to,isStream:Q$,isURLSearchParams:tW,isTypedArray:hW,isFileList:J$,forEach:tg,merge:R2,extend:aW,trim:sW,stripBOM:lW,inherits:cW,toFlatObject:uW,kindOf:sb,kindOfTest:us,endsWith:fW,toArray:dW,forEachEntry:pW,matchAll:mW,isHTMLForm:gW,hasOwnProperty:iN,hasOwnProp:iN,reduceDescriptors:PF,freezeMethods:xW,toObjectSet:bW,toCamelCase:vW,noop:_W,toFiniteNumber:wW,findKey:RF,global:kc,isContextDefined:AF,ALPHABET:IF,generateString:SW,isSpecCompliantForm:MW,toJSONObject:EW,isAsyncFn:CW,isThenable:TW,setImmediate:NF,asap:RW};function Ut(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}we.inherits(Ut,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:we.toJSONObject(this.config),code:this.code,status:this.status}}});const kF=Ut.prototype,LF={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{LF[t]={value:t}});Object.defineProperties(Ut,LF);Object.defineProperty(kF,"isAxiosError",{value:!0});Ut.from=(t,e,n,r,i,o)=>{const s=Object.create(kF);return we.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ut.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const AW=null;function A2(t){return we.isPlainObject(t)||we.isArray(t)}function OF(t){return we.endsWith(t,"[]")?t.slice(0,-2):t}function sN(t,e,n){return t?t.concat(e).map(function(i,o){return i=OF(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function PW(t){return we.isArray(t)&&!t.some(A2)}const IW=we.toFlatObject(we,{},null,function(e){return/^is[A-Z]/.test(e)});function cb(t,e,n){if(!we.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=we.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,y){return!we.isUndefined(y[x])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&we.isSpecCompliantForm(e);if(!we.isFunction(i))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(we.isDate(v))return v.toISOString();if(!l&&we.isBlob(v))throw new Ut("Blob is not supported. Use a Buffer instead.");return we.isArrayBuffer(v)||we.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,x,y){let g=v;if(v&&!y&&typeof v=="object"){if(we.endsWith(x,"{}"))x=r?x:x.slice(0,-2),v=JSON.stringify(v);else if(we.isArray(v)&&PW(v)||(we.isFileList(v)||we.endsWith(x,"[]"))&&(g=we.toArray(v)))return x=OF(x),g.forEach(function(_,S){!(we.isUndefined(_)||_===null)&&e.append(s===!0?sN([x],S,o):s===null?x:x+"[]",c(_))}),!1}return A2(v)?!0:(e.append(sN(y,x,o),c(v)),!1)}const f=[],h=Object.assign(IW,{defaultVisitor:u,convertValue:c,isVisitable:A2});function m(v,x){if(!we.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(v),we.forEach(v,function(g,b){(!(we.isUndefined(g)||g===null)&&i.call(e,g,we.isString(b)?b.trim():b,x,h))===!0&&m(g,x?x.concat(b):[b])}),f.pop()}}if(!we.isObject(t))throw new TypeError("data must be an object");return m(t),e}function aN(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function HT(t,e){this._pairs=[],t&&cb(t,this,e)}const DF=HT.prototype;DF.append=function(e,n){this._pairs.push([e,n])};DF.toString=function(e){const n=e?function(r){return e.call(this,r,aN)}:aN;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function NW(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function FF(t,e,n){if(!e)return t;const r=n&&n.encode||NW,i=n&&n.serialize;let o;if(i?o=i(e,n):o=we.isURLSearchParams(e)?e.toString():new HT(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class lN{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){we.forEach(this.handlers,function(r){r!==null&&e(r)})}}const zF={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kW=typeof URLSearchParams<"u"?URLSearchParams:HT,LW=typeof FormData<"u"?FormData:null,OW=typeof Blob<"u"?Blob:null,DW={isBrowser:!0,classes:{URLSearchParams:kW,FormData:LW,Blob:OW},protocols:["http","https","file","blob","url","data"]},GT=typeof window<"u"&&typeof document<"u",P2=typeof navigator=="object"&&navigator||void 0,FW=GT&&(!P2||["ReactNative","NativeScript","NS"].indexOf(P2.product)<0),zW=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",UW=GT&&window.location.href||"http://localhost",BW=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:GT,hasStandardBrowserEnv:FW,hasStandardBrowserWebWorkerEnv:zW,navigator:P2,origin:UW},Symbol.toStringTag,{value:"Module"})),Oi={...BW,...DW};function jW(t,e){return cb(t,new Oi.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Oi.isNode&&we.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function VW(t){return we.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function $W(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&we.isArray(i)?i.length:s,l?(we.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!we.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&we.isArray(i[s])&&(i[s]=$W(i[s])),!a)}if(we.isFormData(t)&&we.isFunction(t.entries)){const n={};return we.forEachEntry(t,(r,i)=>{e(VW(r),i,n,0)}),n}return null}function WW(t,e,n){if(we.isString(t))try{return(e||JSON.parse)(t),we.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const ng={transitional:zF,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=we.isObject(e);if(o&&we.isHTMLForm(e)&&(e=new FormData(e)),we.isFormData(e))return i?JSON.stringify(UF(e)):e;if(we.isArrayBuffer(e)||we.isBuffer(e)||we.isStream(e)||we.isFile(e)||we.isBlob(e)||we.isReadableStream(e))return e;if(we.isArrayBufferView(e))return e.buffer;if(we.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return jW(e,this.formSerializer).toString();if((a=we.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return cb(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),WW(e)):e}],transformResponse:[function(e){const n=this.transitional||ng.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(we.isResponse(e)||we.isReadableStream(e))return e;if(e&&we.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Ut.from(a,Ut.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Oi.classes.FormData,Blob:Oi.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};we.forEach(["delete","get","head","post","put","patch"],t=>{ng.headers[t]={}});const HW=we.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),GW=t=>{const e={};let n,r,i;return t&&t.split(` -`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&HW[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},cN=Symbol("internals");function zh(t){return t&&String(t).trim().toLowerCase()}function Ay(t){return t===!1||t==null?t:we.isArray(t)?t.map(Ay):String(t)}function XW(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const qW=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function FS(t,e,n,r,i){if(we.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!we.isString(e)){if(we.isString(r))return e.indexOf(r)!==-1;if(we.isRegExp(r))return r.test(e)}}function YW(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function KW(t,e){const n=we.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}class Di{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,l,c){const u=zh(l);if(!u)throw new Error("header name must be a non-empty string");const f=we.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=Ay(a))}const s=(a,l)=>we.forEach(a,(c,u)=>o(c,u,l));if(we.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(we.isString(e)&&(e=e.trim())&&!qW(e))s(GW(e),n);else if(we.isHeaders(e))for(const[a,l]of e.entries())o(l,a,r);else e!=null&&o(n,e,r);return this}get(e,n){if(e=zh(e),e){const r=we.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return XW(i);if(we.isFunction(n))return n.call(this,i,r);if(we.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=zh(e),e){const r=we.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||FS(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=zh(s),s){const a=we.findKey(r,s);a&&(!n||FS(r,r[a],a,n))&&(delete r[a],i=!0)}}return we.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||FS(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return we.forEach(this,(i,o)=>{const s=we.findKey(r,o);if(s){n[s]=Ay(i),delete n[o];return}const a=e?YW(o):String(o).trim();a!==o&&delete n[o],n[a]=Ay(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return we.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&we.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[cN]=this[cN]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=zh(s);r[a]||(KW(i,s),r[a]=!0)}return we.isArray(e)?e.forEach(o):o(e),this}}Di.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);we.reduceDescriptors(Di.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});we.freezeMethods(Di);function zS(t,e){const n=this||ng,r=e||n,i=Di.from(r.headers);let o=r.data;return we.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function BF(t){return!!(t&&t.__CANCEL__)}function Wd(t,e,n){Ut.call(this,t??"canceled",Ut.ERR_CANCELED,e,n),this.name="CanceledError"}we.inherits(Wd,Ut,{__CANCEL__:!0});function jF(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ut("Request failed with status code "+n.status,[Ut.ERR_BAD_REQUEST,Ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ZW(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function JW(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=r[o];s||(s=c),n[i]=l,r[i]=c;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),c-s{n=u,i=null,o&&(clearTimeout(o),o=null),t.apply(null,c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?s(c,u):(i=c,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const v1=(t,e,n=3)=>{let r=0;const i=JW(50,250);return QW(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-r,c=i(l),u=s<=a;r=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-s)/c:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},n)},uN=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},fN=t=>(...e)=>we.asap(()=>t(...e)),eH=Oi.hasStandardBrowserEnv?function(){const e=Oi.navigator&&/(msie|trident)/i.test(Oi.navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=we.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),tH=Oi.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];we.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),we.isString(r)&&s.push("path="+r),we.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function nH(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function rH(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function VF(t,e){return t&&!nH(e)?rH(t,e):e}const dN=t=>t instanceof Di?{...t}:t;function au(t,e){e=e||{};const n={};function r(c,u,f){return we.isPlainObject(c)&&we.isPlainObject(u)?we.merge.call({caseless:f},c,u):we.isPlainObject(u)?we.merge({},u):we.isArray(u)?u.slice():u}function i(c,u,f){if(we.isUndefined(u)){if(!we.isUndefined(c))return r(void 0,c,f)}else return r(c,u,f)}function o(c,u){if(!we.isUndefined(u))return r(void 0,u)}function s(c,u){if(we.isUndefined(u)){if(!we.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,f){if(f in e)return r(c,u);if(f in t)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u)=>i(dN(c),dN(u),!0)};return we.forEach(Object.keys(Object.assign({},t,e)),function(u){const f=l[u]||i,h=f(t[u],e[u],u);we.isUndefined(h)&&f!==a||(n[u]=h)}),n}const $F=t=>{const e=au({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;e.headers=s=Di.from(s),e.url=FF(VF(e.baseURL,e.url),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(we.isFormData(n)){if(Oi.hasStandardBrowserEnv||Oi.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Oi.hasStandardBrowserEnv&&(r&&we.isFunction(r)&&(r=r(e)),r||r!==!1&&eH(e.url))){const c=i&&o&&tH.read(o);c&&s.set(i,c)}return e},iH=typeof XMLHttpRequest<"u",oH=iH&&function(t){return new Promise(function(n,r){const i=$F(t);let o=i.data;const s=Di.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,f,h,m,v;function x(){m&&m(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function g(){if(!y)return;const _=Di.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),A={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:t,request:y};jF(function(R){n(R),x()},function(R){r(R),x()},A),y=null}"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(g)},y.onabort=function(){y&&(r(new Ut("Request aborted",Ut.ECONNABORTED,t,y)),y=null)},y.onerror=function(){r(new Ut("Network Error",Ut.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const A=i.transitional||zF;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new Ut(S,A.clarifyTimeoutError?Ut.ETIMEDOUT:Ut.ECONNABORTED,t,y)),y=null},o===void 0&&s.setContentType(null),"setRequestHeader"in y&&we.forEach(s.toJSON(),function(S,A){y.setRequestHeader(A,S)}),we.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),a&&a!=="json"&&(y.responseType=i.responseType),c&&([h,v]=v1(c,!0),y.addEventListener("progress",h)),l&&y.upload&&([f,m]=v1(l),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(u=_=>{y&&(r(!_||_.type?new Wd(null,t,y):_),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=ZW(i.url);if(b&&Oi.protocols.indexOf(b)===-1){r(new Ut("Unsupported protocol "+b+":",Ut.ERR_BAD_REQUEST,t));return}y.send(o||null)})},sH=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const o=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Ut?u:new Wd(u instanceof Error?u.message:u))}};let s=e&&setTimeout(()=>{s=null,o(new Ut(`timeout ${e} of ms exceeded`,Ut.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>we.asap(a),l}},aH=function*(t,e){let n=t.byteLength;if(n{const i=lH(t,e);let o=0,s,a=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let f=u.byteLength;if(n){let h=o+=f;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},ub=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",WF=ub&&typeof ReadableStream=="function",uH=ub&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),HF=(t,...e)=>{try{return!!t(...e)}catch{return!1}},fH=WF&&HF(()=>{let t=!1;const e=new Request(Oi.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),pN=64*1024,I2=WF&&HF(()=>we.isReadableStream(new Response("").body)),y1={stream:I2&&(t=>t.body)};ub&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!y1[e]&&(y1[e]=we.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Ut(`Response type '${e}' is not supported`,Ut.ERR_NOT_SUPPORT,r)})})})(new Response);const dH=async t=>{if(t==null)return 0;if(we.isBlob(t))return t.size;if(we.isSpecCompliantForm(t))return(await new Request(Oi.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(we.isArrayBufferView(t)||we.isArrayBuffer(t))return t.byteLength;if(we.isURLSearchParams(t)&&(t=t+""),we.isString(t))return(await uH(t)).byteLength},hH=async(t,e)=>{const n=we.toFiniteNumber(t.getContentLength());return n??dH(e)},pH=ub&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:h}=$F(t);c=c?(c+"").toLowerCase():"text";let m=sH([i,o&&o.toAbortSignal()],s),v;const x=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(l&&fH&&n!=="get"&&n!=="head"&&(y=await hH(u,r))!==0){let A=new Request(e,{method:"POST",body:r,duplex:"half"}),P;if(we.isFormData(r)&&(P=A.headers.get("content-type"))&&u.setContentType(P),A.body){const[R,L]=uN(y,v1(fN(l)));r=hN(A.body,pN,R,L)}}we.isString(f)||(f=f?"include":"omit");const g="credentials"in Request.prototype;v=new Request(e,{...h,signal:m,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:g?f:void 0});let b=await fetch(v);const _=I2&&(c==="stream"||c==="response");if(I2&&(a||_&&x)){const A={};["status","statusText","headers"].forEach(k=>{A[k]=b[k]});const P=we.toFiniteNumber(b.headers.get("content-length")),[R,L]=a&&uN(P,v1(fN(a),!0))||[];b=new Response(hN(b.body,pN,R,()=>{L&&L(),x&&x()}),A)}c=c||"text";let S=await y1[we.findKey(y1,c)||"text"](b,t);return!_&&x&&x(),await new Promise((A,P)=>{jF(A,P,{data:S,headers:Di.from(b.headers),status:b.status,statusText:b.statusText,config:t,request:v})})}catch(g){throw x&&x(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new Ut("Network Error",Ut.ERR_NETWORK,t,v),{cause:g.cause||g}):Ut.from(g,g&&g.code,t,v)}}),N2={http:AW,xhr:oH,fetch:pH};we.forEach(N2,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const mN=t=>`- ${t}`,mH=t=>we.isFunction(t)||t===null||t===!1,GF={getAdapter:t=>{t=we.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since : +`+o.stack}return{value:t,source:e,stack:i,digest:null}}function LS(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function g2(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var x$=typeof WeakMap=="function"?WeakMap:Map;function ZD(t,e,n){n=Ma(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){p1||(p1=!0,C2=r),g2(t,e)},n}function JD(t,e,n){n=Ma(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){g2(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){g2(t,e),typeof r!="function"&&(Cl===null?Cl=new Set([this]):Cl.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),n}function UI(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new x$;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=k$.bind(null,t,e,n),e.then(t,t))}function BI(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function jI(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Ma(-1,1),e.tag=2,El(n,e,1))),n.lanes|=1),t)}var b$=Ba.ReactCurrentOwner,Ii=!1;function si(t,e,n,r){e.child=t===null?TD(e,null,n,r):gd(e,t.child,n,r)}function VI(t,e,n,r,i){n=n.render;var o=e.ref;return id(e,i),r=RT(t,e,n,r,o,i),n=AT(),t!==null&&!Ii?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Na(t,e,i)):(An&&n&&gT(e),e.flags|=1,si(t,e,r,i),e.child)}function $I(t,e,n,r,i){if(t===null){var o=n.type;return typeof o=="function"&&!UT(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,QD(t,e,o,r,i)):(t=Ty(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:rm,n(s,r)&&t.ref===e.ref)return Na(t,e,i)}return e.flags|=1,t=Rl(o,r),t.ref=e.ref,t.return=e,e.child=t}function QD(t,e,n,r,i){if(t!==null){var o=t.memoizedProps;if(rm(o,r)&&t.ref===e.ref)if(Ii=!1,e.pendingProps=r=o,(t.lanes&i)!==0)t.flags&131072&&(Ii=!0);else return e.lanes=t.lanes,Na(t,e,i)}return v2(t,e,n,r,i)}function eF(t,e,n){var r=e.pendingProps,i=r.children,o=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},bn(Wf,Yi),Yi|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,bn(Wf,Yi),Yi|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,bn(Wf,Yi),Yi|=r}else o!==null?(r=o.baseLanes|n,e.memoizedState=null):r=n,bn(Wf,Yi),Yi|=r;return si(t,e,i,n),e.child}function tF(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function v2(t,e,n,r,i){var o=Li(n)?nu:Jr.current;return o=pd(e,o),id(e,i),n=RT(t,e,n,r,o,i),r=AT(),t!==null&&!Ii?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Na(t,e,i)):(An&&r&&gT(e),e.flags|=1,si(t,e,n,i),e.child)}function WI(t,e,n,r,i){if(Li(n)){var o=!0;i1(e)}else o=!1;if(id(e,i),e.stateNode===null)My(t,e),KD(e,n,r),m2(e,n,r,i),r=!0;else if(t===null){var s=e.stateNode,a=e.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=ko(c):(c=Li(n)?nu:Jr.current,c=pd(e,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&zI(e,s,r,c),dl=!1;var h=e.memoizedState;s.state=h,c1(e,r,s,i),l=e.memoizedState,a!==r||h!==l||ki.current||dl?(typeof u=="function"&&(p2(e,n,u,r),l=e.memoizedState),(a=dl||FI(e,n,a,r,h,l,c))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{s=e.stateNode,AD(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Yo(e.type,a),s.props=c,f=e.pendingProps,h=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=ko(l):(l=Li(n)?nu:Jr.current,l=pd(e,l));var m=n.getDerivedStateFromProps;(u=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||h!==l)&&zI(e,s,r,l),dl=!1,h=e.memoizedState,s.state=h,c1(e,r,s,i);var v=e.memoizedState;a!==f||h!==v||ki.current||dl?(typeof m=="function"&&(p2(e,n,m,r),v=e.memoizedState),(c=dl||FI(e,n,c,r,h,v,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=v),s.props=r,s.state=v,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return y2(t,e,n,r,o,i)}function y2(t,e,n,r,i,o){tF(t,e);var s=(e.flags&128)!==0;if(!r&&!s)return i&&AI(e,n,!1),Na(t,e,o);r=e.stateNode,b$.current=e;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&s?(e.child=gd(e,t.child,null,o),e.child=gd(e,null,a,o)):si(t,e,a,o),e.memoizedState=r.state,i&&AI(e,n,!0),e.child}function nF(t){var e=t.stateNode;e.pendingContext?RI(t,e.pendingContext,e.pendingContext!==e.context):e.context&&RI(t,e.context,!1),MT(t,e.containerInfo)}function HI(t,e,n,r,i){return md(),yT(i),e.flags|=256,si(t,e,n,r),e.child}var x2={dehydrated:null,treeContext:null,retryLane:0};function b2(t){return{baseLanes:t,cachePool:null,transitions:null}}function rF(t,e,n){var r=e.pendingProps,i=Nn.current,o=!1,s=(e.flags&128)!==0,a;if((a=s)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),bn(Nn,i&1),t===null)return d2(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=r.children,t=r.fallback,o?(r=e.mode,o=e.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=nb(s,r,0,null),t=jc(t,r,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=b2(n),e.memoizedState=x2,t):NT(e,s));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return _$(t,e,s,r,a,i,n);if(o){o=r.fallback,s=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Rl(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=Rl(a,o):(o=jc(o,s,n,null),o.flags|=2),o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,s=t.child.memoizedState,s=s===null?b2(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~n,e.memoizedState=x2,r}return o=t.child,t=o.sibling,r=Rl(o,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function NT(t,e){return e=nb({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function K0(t,e,n,r){return r!==null&&yT(r),gd(e,t.child,null,n),t=NT(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function _$(t,e,n,r,i,o,s){if(n)return e.flags&256?(e.flags&=-257,r=LS(Error(ze(422))),K0(t,e,s,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=nb({mode:"visible",children:r.children},i,0,null),o=jc(o,i,s,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,e.mode&1&&gd(e,t.child,null,s),e.child.memoizedState=b2(s),e.memoizedState=x2,o);if(!(e.mode&1))return K0(t,e,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(ze(419)),r=LS(o,r,void 0),K0(t,e,s,r)}if(a=(s&t.childLanes)!==0,Ii||a){if(r=Sr,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Ia(t,i),rs(r,t,i,-1))}return zT(),r=LS(Error(ze(421))),K0(t,e,s,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=L$.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,Qi=Ml(i.nextSibling),eo=e,An=!0,Jo=null,t!==null&&(To[Ro++]=xa,To[Ro++]=ba,To[Ro++]=ru,xa=t.id,ba=t.overflow,ru=e),e=NT(e,r.children),e.flags|=4096,e)}function GI(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),h2(t.return,e,n)}function OS(t,e,n,r,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function iF(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(si(t,e,r.children,n),r=Nn.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&GI(t,n,e);else if(t.tag===19)GI(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(bn(Nn,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&u1(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),OS(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&u1(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}OS(e,!0,n,null,o);break;case"together":OS(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function My(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Na(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),ou|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ze(153));if(e.child!==null){for(t=e.child,n=Rl(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Rl(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function w$(t,e,n){switch(e.tag){case 3:nF(e),md();break;case 5:PD(e);break;case 1:Li(e.type)&&i1(e);break;case 4:MT(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;bn(a1,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(bn(Nn,Nn.current&1),e.flags|=128,null):n&e.child.childLanes?rF(t,e,n):(bn(Nn,Nn.current&1),t=Na(t,e,n),t!==null?t.sibling:null);bn(Nn,Nn.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return iF(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),bn(Nn,Nn.current),r)break;return null;case 22:case 23:return e.lanes=0,eF(t,e,n)}return Na(t,e,n)}var oF,_2,sF,aF;oF=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};_2=function(){};sF=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,Nc(Ds.current);var o=null;switch(n){case"input":i=$E(t,i),r=$E(t,r),o=[];break;case"select":i=Dn({},i,{value:void 0}),r=Dn({},r,{value:void 0}),o=[];break;case"textarea":i=GE(t,i),r=GE(t,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=n1)}qE(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Kp.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Kp.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&_n("scroll",t),o||a===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(e.updateQueue=c)&&(e.flags|=4)}};aF=function(t,e,n,r){n!==r&&(e.flags|=4)};function Dh(t,e){if(!An)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Vr(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function S$(t,e,n){var r=e.pendingProps;switch(vT(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vr(e),null;case 1:return Li(e.type)&&r1(),Vr(e),null;case 3:return r=e.stateNode,vd(),Sn(ki),Sn(Jr),CT(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(q0(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Jo!==null&&(A2(Jo),Jo=null))),_2(t,e),Vr(e),null;case 5:ET(e);var i=Nc(lm.current);if(n=e.type,t!==null&&e.stateNode!=null)sF(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(ze(166));return Vr(e),null}if(t=Nc(Ds.current),q0(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[Ps]=e,r[sm]=o,t=(e.mode&1)!==0,n){case"dialog":_n("cancel",r),_n("close",r);break;case"iframe":case"object":case"embed":_n("load",r);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[Ps]=e,t[sm]=r,oF(t,e,!1,!1),e.stateNode=t;e:{switch(s=YE(n,r),n){case"dialog":_n("cancel",t),_n("close",t),i=r;break;case"iframe":case"object":case"embed":_n("load",t),i=r;break;case"video":case"audio":for(i=0;ixd&&(e.flags|=128,r=!0,Dh(o,!1),e.lanes=4194304)}else{if(!r)if(t=u1(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Dh(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!An)return Vr(e),null}else 2*Yn()-o.renderingStartTime>xd&&n!==1073741824&&(e.flags|=128,r=!0,Dh(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Yn(),e.sibling=null,n=Nn.current,bn(Nn,r?n&1|2:n&1),e):(Vr(e),null);case 22:case 23:return FT(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Yi&1073741824&&(Vr(e),e.subtreeFlags&6&&(e.flags|=8192)):Vr(e),null;case 24:return null;case 25:return null}throw Error(ze(156,e.tag))}function M$(t,e){switch(vT(e),e.tag){case 1:return Li(e.type)&&r1(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return vd(),Sn(ki),Sn(Jr),CT(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return ET(e),null;case 13:if(Sn(Nn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ze(340));md()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Sn(Nn),null;case 4:return vd(),null;case 10:return _T(e.type._context),null;case 22:case 23:return FT(),null;case 24:return null;default:return null}}var Z0=!1,Yr=!1,E$=typeof WeakSet=="function"?WeakSet:Set,ct=null;function $f(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$n(t,e,r)}else n.current=null}function w2(t,e,n){try{n()}catch(r){$n(t,e,r)}}var XI=!1;function C$(t,e){if(o2=Qy,t=dD(),mT(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,f=t,h=null;t:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===t)break t;if(h===n&&++c===i&&(a=s),h===o&&++u===r&&(l=s),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(s2={focusedElem:t,selectionRange:n},Qy=!1,ct=e;ct!==null;)if(e=ct,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ct=t;else for(;ct!==null;){e=ct;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var x=v.memoizedProps,y=v.memoizedState,g=e.stateNode,b=g.getSnapshotBeforeUpdate(e.elementType===e.type?x:Yo(e.type,x),y);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=e.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ze(163))}}catch(S){$n(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,ct=t;break}ct=e.return}return v=XI,XI=!1,v}function Tp(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&w2(e,n,o)}i=i.next}while(i!==r)}}function eb(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function S2(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function lF(t){var e=t.alternate;e!==null&&(t.alternate=null,lF(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Ps],delete e[sm],delete e[c2],delete e[l$],delete e[c$])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function cF(t){return t.tag===5||t.tag===3||t.tag===4}function qI(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||cF(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function M2(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=n1));else if(r!==4&&(t=t.child,t!==null))for(M2(t,e,n),t=t.sibling;t!==null;)M2(t,e,n),t=t.sibling}function E2(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(E2(t,e,n),t=t.sibling;t!==null;)E2(t,e,n),t=t.sibling}var Ar=null,Zo=!1;function el(t,e,n){for(n=n.child;n!==null;)uF(t,e,n),n=n.sibling}function uF(t,e,n){if(Os&&typeof Os.onCommitFiberUnmount=="function")try{Os.onCommitFiberUnmount(Gx,n)}catch{}switch(n.tag){case 5:Yr||$f(n,e);case 6:var r=Ar,i=Zo;Ar=null,el(t,e,n),Ar=r,Zo=i,Ar!==null&&(Zo?(t=Ar,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ar.removeChild(n.stateNode));break;case 18:Ar!==null&&(Zo?(t=Ar,n=n.stateNode,t.nodeType===8?RS(t.parentNode,n):t.nodeType===1&&RS(t,n),tm(t)):RS(Ar,n.stateNode));break;case 4:r=Ar,i=Zo,Ar=n.stateNode.containerInfo,Zo=!0,el(t,e,n),Ar=r,Zo=i;break;case 0:case 11:case 14:case 15:if(!Yr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&w2(n,e,s),i=i.next}while(i!==r)}el(t,e,n);break;case 1:if(!Yr&&($f(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){$n(n,e,a)}el(t,e,n);break;case 21:el(t,e,n);break;case 22:n.mode&1?(Yr=(r=Yr)||n.memoizedState!==null,el(t,e,n),Yr=r):el(t,e,n);break;default:el(t,e,n)}}function YI(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new E$),e.forEach(function(r){var i=O$.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Wo(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Yn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*R$(r/1960))-r,10t?16:t,yl===null)var r=!1;else{if(t=yl,yl=null,m1=0,nn&6)throw Error(ze(331));var i=nn;for(nn|=4,ct=t.current;ct!==null;){var o=ct,s=o.child;if(ct.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lYn()-OT?Bc(t,0):LT|=n),Oi(t,e)}function yF(t,e){e===0&&(t.mode&1?(e=V0,V0<<=1,!(V0&130023424)&&(V0=4194304)):e=1);var n=fi();t=Ia(t,e),t!==null&&(Zm(t,e,n),Oi(t,n))}function L$(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),yF(t,n)}function O$(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ze(314))}r!==null&&r.delete(e),yF(t,n)}var xF;xF=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ki.current)Ii=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ii=!1,w$(t,e,n);Ii=!!(t.flags&131072)}else Ii=!1,An&&e.flags&1048576&&SD(e,s1,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;My(t,e),t=e.pendingProps;var i=pd(e,Jr.current);id(e,n),i=RT(null,e,r,t,i,n);var o=AT();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Li(r)?(o=!0,i1(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ST(e),i.updater=Qx,e.stateNode=i,i._reactInternals=e,m2(e,r,t,n),e=y2(null,e,r,!0,o,n)):(e.tag=0,An&&o&&gT(e),si(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(My(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=F$(r),t=Yo(r,t),i){case 0:e=v2(null,e,r,t,n);break e;case 1:e=WI(null,e,r,t,n);break e;case 11:e=VI(null,e,r,t,n);break e;case 14:e=$I(null,e,r,Yo(r.type,t),n);break e}throw Error(ze(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Yo(r,i),v2(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Yo(r,i),WI(t,e,r,i,n);case 3:e:{if(nF(e),t===null)throw Error(ze(387));r=e.pendingProps,o=e.memoizedState,i=o.element,AD(t,e),c1(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=yd(Error(ze(423)),e),e=HI(t,e,r,n,i);break e}else if(r!==i){i=yd(Error(ze(424)),e),e=HI(t,e,r,n,i);break e}else for(Qi=Ml(e.stateNode.containerInfo.firstChild),eo=e,An=!0,Jo=null,n=TD(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(md(),r===i){e=Na(t,e,n);break e}si(t,e,r,n)}e=e.child}return e;case 5:return PD(e),t===null&&d2(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,a2(r,i)?s=null:o!==null&&a2(r,o)&&(e.flags|=32),tF(t,e),si(t,e,s,n),e.child;case 6:return t===null&&d2(e),null;case 13:return rF(t,e,n);case 4:return MT(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=gd(e,null,r,n):si(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Yo(r,i),VI(t,e,r,i,n);case 7:return si(t,e,e.pendingProps,n),e.child;case 8:return si(t,e,e.pendingProps.children,n),e.child;case 12:return si(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,bn(a1,r._currentValue),r._currentValue=s,o!==null)if(os(o.value,s)){if(o.children===i.children&&!ki.current){e=Na(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Ma(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),h2(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(ze(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),h2(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}si(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,id(e,n),i=ko(i),r=r(i),e.flags|=1,si(t,e,r,n),e.child;case 14:return r=e.type,i=Yo(r,e.pendingProps),i=Yo(r.type,i),$I(t,e,r,i,n);case 15:return QD(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Yo(r,i),My(t,e),e.tag=1,Li(r)?(t=!0,i1(e)):t=!1,id(e,n),KD(e,r,i),m2(e,r,i,n),y2(null,e,r,!0,t,n);case 19:return iF(t,e,n);case 22:return eF(t,e,n)}throw Error(ze(156,e.tag))};function bF(t,e){return X5(t,e)}function D$(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Po(t,e,n,r){return new D$(t,e,n,r)}function UT(t){return t=t.prototype,!(!t||!t.isReactComponent)}function F$(t){if(typeof t=="function")return UT(t)?1:0;if(t!=null){if(t=t.$$typeof,t===iT)return 11;if(t===oT)return 14}return 2}function Rl(t,e){var n=t.alternate;return n===null?(n=Po(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ty(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")UT(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case Lf:return jc(n.children,i,o,e);case rT:s=8,i|=8;break;case UE:return t=Po(12,n,e,i|2),t.elementType=UE,t.lanes=o,t;case BE:return t=Po(13,n,e,i),t.elementType=BE,t.lanes=o,t;case jE:return t=Po(19,n,e,i),t.elementType=jE,t.lanes=o,t;case P5:return nb(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case R5:s=10;break e;case A5:s=9;break e;case iT:s=11;break e;case oT:s=14;break e;case fl:s=16,r=null;break e}throw Error(ze(130,t==null?t:typeof t,""))}return e=Po(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function jc(t,e,n,r){return t=Po(7,t,r,e),t.lanes=n,t}function nb(t,e,n,r){return t=Po(22,t,r,e),t.elementType=P5,t.lanes=n,t.stateNode={isHidden:!1},t}function DS(t,e,n){return t=Po(6,t,null,e),t.lanes=n,t}function FS(t,e,n){return e=Po(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function z$(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vS(0),this.expirationTimes=vS(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vS(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function BT(t,e,n,r,i,o,s,a,l){return t=new z$(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Po(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ST(o),t}function U$(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(MF)}catch(t){console.error(t)}}MF(),M5.exports=co;var Vl=M5.exports;const pp=qs(Vl);var WT,rN=Vl;WT=rN.createRoot,rN.hydrateRoot;function EF(t,e){return function(){return t.apply(e,arguments)}}const{toString:W$}=Object.prototype,{getPrototypeOf:HT}=Object,ab=(t=>e=>{const n=W$.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),us=t=>(t=t.toLowerCase(),e=>ab(e)===t),lb=t=>e=>typeof e===t,{isArray:$d}=Array,hm=lb("undefined");function H$(t){return t!==null&&!hm(t)&&t.constructor!==null&&!hm(t.constructor)&&to(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const CF=us("ArrayBuffer");function G$(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&CF(t.buffer),e}const X$=lb("string"),to=lb("function"),TF=lb("number"),cb=t=>t!==null&&typeof t=="object",q$=t=>t===!0||t===!1,Ry=t=>{if(ab(t)!=="object")return!1;const e=HT(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Y$=us("Date"),K$=us("File"),Z$=us("Blob"),J$=us("FileList"),Q$=t=>cb(t)&&to(t.pipe),eW=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||to(t.append)&&((e=ab(t))==="formdata"||e==="object"&&to(t.toString)&&t.toString()==="[object FormData]"))},tW=us("URLSearchParams"),[nW,rW,iW,oW]=["ReadableStream","Request","Response","Headers"].map(us),sW=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function tg(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),$d(t))for(r=0,i=t.length;r0;)if(i=n[r],e===i.toLowerCase())return i;return null}const kc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,AF=t=>!hm(t)&&t!==kc;function P2(){const{caseless:t}=AF(this)&&this||{},e={},n=(r,i)=>{const o=t&&RF(e,i)||i;Ry(e[o])&&Ry(r)?e[o]=P2(e[o],r):Ry(r)?e[o]=P2({},r):$d(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r(tg(e,(i,o)=>{n&&to(i)?t[o]=EF(i,n):t[o]=i},{allOwnKeys:r}),t),lW=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),cW=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},uW=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&HT(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},fW=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},dW=t=>{if(!t)return null;if($d(t))return t;let e=t.length;if(!TF(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},hW=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&HT(Uint8Array)),pW=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},mW=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},gW=us("HTMLFormElement"),vW=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),iN=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),yW=us("RegExp"),PF=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};tg(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},xW=t=>{PF(t,(e,n)=>{if(to(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(to(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},bW=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return $d(t)?r(t):r(String(t).split(e)),n},_W=()=>{},wW=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,zS="abcdefghijklmnopqrstuvwxyz",oN="0123456789",IF={DIGIT:oN,ALPHA:zS,ALPHA_DIGIT:zS+zS.toUpperCase()+oN},SW=(t=16,e=IF.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function MW(t){return!!(t&&to(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const EW=t=>{const e=new Array(10),n=(r,i)=>{if(cb(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=$d(r)?[]:{};return tg(r,(s,a)=>{const l=n(s,i+1);!hm(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},CW=us("AsyncFunction"),TW=t=>t&&(cb(t)||to(t))&&to(t.then)&&to(t.catch),NF=((t,e)=>t?setImmediate:e?((n,r)=>(kc.addEventListener("message",({source:i,data:o})=>{i===kc&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),kc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",to(kc.postMessage)),RW=typeof queueMicrotask<"u"?queueMicrotask.bind(kc):typeof process<"u"&&process.nextTick||NF,we={isArray:$d,isArrayBuffer:CF,isBuffer:H$,isFormData:eW,isArrayBufferView:G$,isString:X$,isNumber:TF,isBoolean:q$,isObject:cb,isPlainObject:Ry,isReadableStream:nW,isRequest:rW,isResponse:iW,isHeaders:oW,isUndefined:hm,isDate:Y$,isFile:K$,isBlob:Z$,isRegExp:yW,isFunction:to,isStream:Q$,isURLSearchParams:tW,isTypedArray:hW,isFileList:J$,forEach:tg,merge:P2,extend:aW,trim:sW,stripBOM:lW,inherits:cW,toFlatObject:uW,kindOf:ab,kindOfTest:us,endsWith:fW,toArray:dW,forEachEntry:pW,matchAll:mW,isHTMLForm:gW,hasOwnProperty:iN,hasOwnProp:iN,reduceDescriptors:PF,freezeMethods:xW,toObjectSet:bW,toCamelCase:vW,noop:_W,toFiniteNumber:wW,findKey:RF,global:kc,isContextDefined:AF,ALPHABET:IF,generateString:SW,isSpecCompliantForm:MW,toJSONObject:EW,isAsyncFn:CW,isThenable:TW,setImmediate:NF,asap:RW};function Ut(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}we.inherits(Ut,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:we.toJSONObject(this.config),code:this.code,status:this.status}}});const kF=Ut.prototype,LF={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{LF[t]={value:t}});Object.defineProperties(Ut,LF);Object.defineProperty(kF,"isAxiosError",{value:!0});Ut.from=(t,e,n,r,i,o)=>{const s=Object.create(kF);return we.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ut.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const AW=null;function I2(t){return we.isPlainObject(t)||we.isArray(t)}function OF(t){return we.endsWith(t,"[]")?t.slice(0,-2):t}function sN(t,e,n){return t?t.concat(e).map(function(i,o){return i=OF(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function PW(t){return we.isArray(t)&&!t.some(I2)}const IW=we.toFlatObject(we,{},null,function(e){return/^is[A-Z]/.test(e)});function ub(t,e,n){if(!we.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=we.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,y){return!we.isUndefined(y[x])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&we.isSpecCompliantForm(e);if(!we.isFunction(i))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(we.isDate(v))return v.toISOString();if(!l&&we.isBlob(v))throw new Ut("Blob is not supported. Use a Buffer instead.");return we.isArrayBuffer(v)||we.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,x,y){let g=v;if(v&&!y&&typeof v=="object"){if(we.endsWith(x,"{}"))x=r?x:x.slice(0,-2),v=JSON.stringify(v);else if(we.isArray(v)&&PW(v)||(we.isFileList(v)||we.endsWith(x,"[]"))&&(g=we.toArray(v)))return x=OF(x),g.forEach(function(_,S){!(we.isUndefined(_)||_===null)&&e.append(s===!0?sN([x],S,o):s===null?x:x+"[]",c(_))}),!1}return I2(v)?!0:(e.append(sN(y,x,o),c(v)),!1)}const f=[],h=Object.assign(IW,{defaultVisitor:u,convertValue:c,isVisitable:I2});function m(v,x){if(!we.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(v),we.forEach(v,function(g,b){(!(we.isUndefined(g)||g===null)&&i.call(e,g,we.isString(b)?b.trim():b,x,h))===!0&&m(g,x?x.concat(b):[b])}),f.pop()}}if(!we.isObject(t))throw new TypeError("data must be an object");return m(t),e}function aN(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function GT(t,e){this._pairs=[],t&&ub(t,this,e)}const DF=GT.prototype;DF.append=function(e,n){this._pairs.push([e,n])};DF.toString=function(e){const n=e?function(r){return e.call(this,r,aN)}:aN;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function NW(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function FF(t,e,n){if(!e)return t;const r=n&&n.encode||NW;we.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(e,n):o=we.isURLSearchParams(e)?e.toString():new GT(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class lN{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){we.forEach(this.handlers,function(r){r!==null&&e(r)})}}const zF={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kW=typeof URLSearchParams<"u"?URLSearchParams:GT,LW=typeof FormData<"u"?FormData:null,OW=typeof Blob<"u"?Blob:null,DW={isBrowser:!0,classes:{URLSearchParams:kW,FormData:LW,Blob:OW},protocols:["http","https","file","blob","url","data"]},XT=typeof window<"u"&&typeof document<"u",N2=typeof navigator=="object"&&navigator||void 0,FW=XT&&(!N2||["ReactNative","NativeScript","NS"].indexOf(N2.product)<0),zW=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",UW=XT&&window.location.href||"http://localhost",BW=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:XT,hasStandardBrowserEnv:FW,hasStandardBrowserWebWorkerEnv:zW,navigator:N2,origin:UW},Symbol.toStringTag,{value:"Module"})),Kr={...BW,...DW};function jW(t,e){return ub(t,new Kr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Kr.isNode&&we.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function VW(t){return we.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function $W(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&we.isArray(i)?i.length:s,l?(we.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!we.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&we.isArray(i[s])&&(i[s]=$W(i[s])),!a)}if(we.isFormData(t)&&we.isFunction(t.entries)){const n={};return we.forEachEntry(t,(r,i)=>{e(VW(r),i,n,0)}),n}return null}function WW(t,e,n){if(we.isString(t))try{return(e||JSON.parse)(t),we.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const ng={transitional:zF,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=we.isObject(e);if(o&&we.isHTMLForm(e)&&(e=new FormData(e)),we.isFormData(e))return i?JSON.stringify(UF(e)):e;if(we.isArrayBuffer(e)||we.isBuffer(e)||we.isStream(e)||we.isFile(e)||we.isBlob(e)||we.isReadableStream(e))return e;if(we.isArrayBufferView(e))return e.buffer;if(we.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return jW(e,this.formSerializer).toString();if((a=we.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ub(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),WW(e)):e}],transformResponse:[function(e){const n=this.transitional||ng.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(we.isResponse(e)||we.isReadableStream(e))return e;if(e&&we.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Ut.from(a,Ut.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Kr.classes.FormData,Blob:Kr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};we.forEach(["delete","get","head","post","put","patch"],t=>{ng.headers[t]={}});const HW=we.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),GW=t=>{const e={};let n,r,i;return t&&t.split(` +`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&HW[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},cN=Symbol("internals");function zh(t){return t&&String(t).trim().toLowerCase()}function Ay(t){return t===!1||t==null?t:we.isArray(t)?t.map(Ay):String(t)}function XW(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const qW=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function US(t,e,n,r,i){if(we.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!we.isString(e)){if(we.isString(r))return e.indexOf(r)!==-1;if(we.isRegExp(r))return r.test(e)}}function YW(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function KW(t,e){const n=we.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}class Di{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,l,c){const u=zh(l);if(!u)throw new Error("header name must be a non-empty string");const f=we.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=Ay(a))}const s=(a,l)=>we.forEach(a,(c,u)=>o(c,u,l));if(we.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(we.isString(e)&&(e=e.trim())&&!qW(e))s(GW(e),n);else if(we.isHeaders(e))for(const[a,l]of e.entries())o(l,a,r);else e!=null&&o(n,e,r);return this}get(e,n){if(e=zh(e),e){const r=we.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return XW(i);if(we.isFunction(n))return n.call(this,i,r);if(we.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=zh(e),e){const r=we.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||US(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=zh(s),s){const a=we.findKey(r,s);a&&(!n||US(r,r[a],a,n))&&(delete r[a],i=!0)}}return we.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||US(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return we.forEach(this,(i,o)=>{const s=we.findKey(r,o);if(s){n[s]=Ay(i),delete n[o];return}const a=e?YW(o):String(o).trim();a!==o&&delete n[o],n[a]=Ay(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return we.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&we.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[cN]=this[cN]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=zh(s);r[a]||(KW(i,s),r[a]=!0)}return we.isArray(e)?e.forEach(o):o(e),this}}Di.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);we.reduceDescriptors(Di.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});we.freezeMethods(Di);function BS(t,e){const n=this||ng,r=e||n,i=Di.from(r.headers);let o=r.data;return we.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function BF(t){return!!(t&&t.__CANCEL__)}function Wd(t,e,n){Ut.call(this,t??"canceled",Ut.ERR_CANCELED,e,n),this.name="CanceledError"}we.inherits(Wd,Ut,{__CANCEL__:!0});function jF(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ut("Request failed with status code "+n.status,[Ut.ERR_BAD_REQUEST,Ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ZW(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function JW(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=r[o];s||(s=c),n[i]=l,r[i]=c;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),c-s{n=u,i=null,o&&(clearTimeout(o),o=null),t.apply(null,c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?s(c,u):(i=c,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const y1=(t,e,n=3)=>{let r=0;const i=JW(50,250);return QW(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-r,c=i(l),u=s<=a;r=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-s)/c:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},n)},uN=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},fN=t=>(...e)=>we.asap(()=>t(...e)),eH=Kr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Kr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Kr.origin),Kr.navigator&&/(msie|trident)/i.test(Kr.navigator.userAgent)):()=>!0,tH=Kr.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];we.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),we.isString(r)&&s.push("path="+r),we.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function nH(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function rH(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function VF(t,e){return t&&!nH(e)?rH(t,e):e}const dN=t=>t instanceof Di?{...t}:t;function au(t,e){e=e||{};const n={};function r(c,u,f,h){return we.isPlainObject(c)&&we.isPlainObject(u)?we.merge.call({caseless:h},c,u):we.isPlainObject(u)?we.merge({},u):we.isArray(u)?u.slice():u}function i(c,u,f,h){if(we.isUndefined(u)){if(!we.isUndefined(c))return r(void 0,c,f,h)}else return r(c,u,f,h)}function o(c,u){if(!we.isUndefined(u))return r(void 0,u)}function s(c,u){if(we.isUndefined(u)){if(!we.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,f){if(f in e)return r(c,u);if(f in t)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u,f)=>i(dN(c),dN(u),f,!0)};return we.forEach(Object.keys(Object.assign({},t,e)),function(u){const f=l[u]||i,h=f(t[u],e[u],u);we.isUndefined(h)&&f!==a||(n[u]=h)}),n}const $F=t=>{const e=au({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;e.headers=s=Di.from(s),e.url=FF(VF(e.baseURL,e.url),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(we.isFormData(n)){if(Kr.hasStandardBrowserEnv||Kr.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Kr.hasStandardBrowserEnv&&(r&&we.isFunction(r)&&(r=r(e)),r||r!==!1&&eH(e.url))){const c=i&&o&&tH.read(o);c&&s.set(i,c)}return e},iH=typeof XMLHttpRequest<"u",oH=iH&&function(t){return new Promise(function(n,r){const i=$F(t);let o=i.data;const s=Di.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,f,h,m,v;function x(){m&&m(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function g(){if(!y)return;const _=Di.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),A={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:t,request:y};jF(function(R){n(R),x()},function(R){r(R),x()},A),y=null}"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(g)},y.onabort=function(){y&&(r(new Ut("Request aborted",Ut.ECONNABORTED,t,y)),y=null)},y.onerror=function(){r(new Ut("Network Error",Ut.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const A=i.transitional||zF;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new Ut(S,A.clarifyTimeoutError?Ut.ETIMEDOUT:Ut.ECONNABORTED,t,y)),y=null},o===void 0&&s.setContentType(null),"setRequestHeader"in y&&we.forEach(s.toJSON(),function(S,A){y.setRequestHeader(A,S)}),we.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),a&&a!=="json"&&(y.responseType=i.responseType),c&&([h,v]=y1(c,!0),y.addEventListener("progress",h)),l&&y.upload&&([f,m]=y1(l),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(u=_=>{y&&(r(!_||_.type?new Wd(null,t,y):_),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=ZW(i.url);if(b&&Kr.protocols.indexOf(b)===-1){r(new Ut("Unsupported protocol "+b+":",Ut.ERR_BAD_REQUEST,t));return}y.send(o||null)})},sH=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const o=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Ut?u:new Wd(u instanceof Error?u.message:u))}};let s=e&&setTimeout(()=>{s=null,o(new Ut(`timeout ${e} of ms exceeded`,Ut.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>we.asap(a),l}},aH=function*(t,e){let n=t.byteLength;if(n{const i=lH(t,e);let o=0,s,a=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let f=u.byteLength;if(n){let h=o+=f;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},fb=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",WF=fb&&typeof ReadableStream=="function",uH=fb&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),HF=(t,...e)=>{try{return!!t(...e)}catch{return!1}},fH=WF&&HF(()=>{let t=!1;const e=new Request(Kr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),pN=64*1024,k2=WF&&HF(()=>we.isReadableStream(new Response("").body)),x1={stream:k2&&(t=>t.body)};fb&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!x1[e]&&(x1[e]=we.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Ut(`Response type '${e}' is not supported`,Ut.ERR_NOT_SUPPORT,r)})})})(new Response);const dH=async t=>{if(t==null)return 0;if(we.isBlob(t))return t.size;if(we.isSpecCompliantForm(t))return(await new Request(Kr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(we.isArrayBufferView(t)||we.isArrayBuffer(t))return t.byteLength;if(we.isURLSearchParams(t)&&(t=t+""),we.isString(t))return(await uH(t)).byteLength},hH=async(t,e)=>{const n=we.toFiniteNumber(t.getContentLength());return n??dH(e)},pH=fb&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:h}=$F(t);c=c?(c+"").toLowerCase():"text";let m=sH([i,o&&o.toAbortSignal()],s),v;const x=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(l&&fH&&n!=="get"&&n!=="head"&&(y=await hH(u,r))!==0){let A=new Request(e,{method:"POST",body:r,duplex:"half"}),P;if(we.isFormData(r)&&(P=A.headers.get("content-type"))&&u.setContentType(P),A.body){const[R,L]=uN(y,y1(fN(l)));r=hN(A.body,pN,R,L)}}we.isString(f)||(f=f?"include":"omit");const g="credentials"in Request.prototype;v=new Request(e,{...h,signal:m,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:g?f:void 0});let b=await fetch(v);const _=k2&&(c==="stream"||c==="response");if(k2&&(a||_&&x)){const A={};["status","statusText","headers"].forEach(k=>{A[k]=b[k]});const P=we.toFiniteNumber(b.headers.get("content-length")),[R,L]=a&&uN(P,y1(fN(a),!0))||[];b=new Response(hN(b.body,pN,R,()=>{L&&L(),x&&x()}),A)}c=c||"text";let S=await x1[we.findKey(x1,c)||"text"](b,t);return!_&&x&&x(),await new Promise((A,P)=>{jF(A,P,{data:S,headers:Di.from(b.headers),status:b.status,statusText:b.statusText,config:t,request:v})})}catch(g){throw x&&x(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new Ut("Network Error",Ut.ERR_NETWORK,t,v),{cause:g.cause||g}):Ut.from(g,g&&g.code,t,v)}}),L2={http:AW,xhr:oH,fetch:pH};we.forEach(L2,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const mN=t=>`- ${t}`,mH=t=>we.isFunction(t)||t===null||t===!1,GF={getAdapter:t=>{t=we.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since : `+o.map(mN).join(` -`):" "+mN(o[0]):"as no adapter specified";throw new Ut("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:N2};function US(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Wd(null,t)}function gN(t){return US(t),t.headers=Di.from(t.headers),t.data=zS.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),GF.getAdapter(t.adapter||ng.adapter)(t).then(function(r){return US(t),r.data=zS.call(t,t.transformResponse,r),r.headers=Di.from(r.headers),r},function(r){return BF(r)||(US(t),r&&r.response&&(r.response.data=zS.call(t,t.transformResponse,r.response),r.response.headers=Di.from(r.response.headers))),Promise.reject(r)})}const XF="1.7.7",XT={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{XT[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const vN={};XT.transitional=function(e,n,r){function i(o,s){return"[Axios v"+XF+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new Ut(i(s," has been removed"+(n?" in "+n:"")),Ut.ERR_DEPRECATED);return n&&!vN[s]&&(vN[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};function gH(t,e,n){if(typeof t!="object")throw new Ut("options must be an object",Ut.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],l=a===void 0||s(a,o,t);if(l!==!0)throw new Ut("option "+o+" must be "+l,Ut.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ut("Unknown option "+o,Ut.ERR_BAD_OPTION)}}const k2={assertOptions:gH,validators:XT},el=k2.validators;class Vc{constructor(e){this.defaults=e,this.interceptors={request:new lN,response:new lN}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=au(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&k2.assertOptions(r,{silentJSONParsing:el.transitional(el.boolean),forcedJSONParsing:el.transitional(el.boolean),clarifyTimeoutError:el.transitional(el.boolean)},!1),i!=null&&(we.isFunction(i)?n.paramsSerializer={serialize:i}:k2.assertOptions(i,{encode:el.function,serialize:el.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&we.merge(o.common,o[n.method]);o&&we.forEach(["delete","get","head","post","put","patch","common"],v=>{delete o[v]}),n.headers=Di.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(l=l&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});const c=[];this.interceptors.response.forEach(function(x){c.push(x.fulfilled,x.rejected)});let u,f=0,h;if(!l){const v=[gN.bind(this),void 0];for(v.unshift.apply(v,a),v.push.apply(v,c),h=v.length,u=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new Wd(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new qT(function(i){e=i}),cancel:e}}}function vH(t){return function(n){return t.apply(null,n)}}function yH(t){return we.isObject(t)&&t.isAxiosError===!0}const L2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(L2).forEach(([t,e])=>{L2[e]=t});function qF(t){const e=new Vc(t),n=EF(Vc.prototype.request,e);return we.extend(n,Vc.prototype,e,{allOwnKeys:!0}),we.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return qF(au(t,i))},n}const Fn=qF(ng);Fn.Axios=Vc;Fn.CanceledError=Wd;Fn.CancelToken=qT;Fn.isCancel=BF;Fn.VERSION=XF;Fn.toFormData=cb;Fn.AxiosError=Ut;Fn.Cancel=Fn.CanceledError;Fn.all=function(e){return Promise.all(e)};Fn.spread=vH;Fn.isAxiosError=yH;Fn.mergeConfig=au;Fn.AxiosHeaders=Di;Fn.formToJSON=t=>UF(we.isHTMLForm(t)?new FormData(t):t);Fn.getAdapter=GF.getAdapter;Fn.HttpStatusCode=L2;Fn.default=Fn;const pm={black:"#000",white:"#fff"},qu={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Yu={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ku={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Zu={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Ju={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Uh={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},xH={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Na(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n0?Pr(Hd,--Ui):0,_d--,tr===10&&(_d=1,db--),tr}function no(){return tr=Ui2||gm(tr)>3?"":" "}function FH(t,e){for(;--e&&no()&&!(tr<48||tr>102||tr>57&&tr<65||tr>70&&tr<97););return rg(t,Py()+(e<6&&Ds()==32&&no()==32))}function D2(t){for(;no();)switch(tr){case t:return Ui;case 34:case 39:t!==34&&t!==39&&D2(tr);break;case 40:t===41&&D2(t);break;case 92:no();break}return Ui}function zH(t,e){for(;no()&&t+tr!==57;)if(t+tr===84&&Ds()===47)break;return"/*"+rg(e,Ui-1)+"*"+fb(t===47?t:no())}function UH(t){for(;!gm(Ds());)no();return rg(t,Ui)}function BH(t){return tz(Ny("",null,null,null,[""],t=ez(t),0,[0],t))}function Ny(t,e,n,r,i,o,s,a,l){for(var c=0,u=0,f=s,h=0,m=0,v=0,x=1,y=1,g=1,b=0,_="",S=i,A=o,P=r,R=_;y;)switch(v=b,b=no()){case 40:if(v!=108&&Pr(R,f-1)==58){O2(R+=un(Iy(b),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:R+=Iy(b);break;case 9:case 10:case 13:case 32:R+=DH(v);break;case 92:R+=FH(Py()-1,7);continue;case 47:switch(Ds()){case 42:case 47:ev(jH(zH(no(),Py()),e,n),l);break;default:R+="/"}break;case 123*x:a[c++]=Ts(R)*g;case 125*x:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+u:g==-1&&(R=un(R,/\f/g,"")),m>0&&Ts(R)-f&&ev(m>32?xN(R+";",r,n,f-1):xN(un(R," ","")+";",r,n,f-2),l);break;case 59:R+=";";default:if(ev(P=yN(R,e,n,c,u,i,a,_,S=[],A=[],f),o),b===123)if(u===0)Ny(R,e,P,P,S,o,f,a,A);else switch(h===99&&Pr(R,3)===110?100:h){case 100:case 108:case 109:case 115:Ny(t,P,P,r&&ev(yN(t,P,P,0,0,i,a,_,i,S=[],f),A),i,A,f,a,r?S:A);break;default:Ny(R,P,P,P,[""],A,0,a,A)}}c=u=m=0,x=g=1,_=R="",f=s;break;case 58:f=1+Ts(R),m=v;default:if(x<1){if(b==123)--x;else if(b==125&&x++==0&&OH()==125)continue}switch(R+=fb(b),b*x){case 38:g=u>0?1:(R+="\f",-1);break;case 44:a[c++]=(Ts(R)-1)*g,g=1;break;case 64:Ds()===45&&(R+=Iy(no())),h=Ds(),u=f=Ts(_=R+=UH(Py())),b++;break;case 45:v===45&&Ts(R)==2&&(x=0)}}return o}function yN(t,e,n,r,i,o,s,a,l,c,u){for(var f=i-1,h=i===0?o:[""],m=ZT(h),v=0,x=0,y=0;v0?h[g]+" "+b:un(b,/&\f/g,h[g])))&&(l[y++]=_);return hb(t,e,n,i===0?YT:a,l,c,u)}function jH(t,e,n){return hb(t,e,n,KF,fb(LH()),mm(t,2,-2),0)}function xN(t,e,n,r){return hb(t,e,n,KT,mm(t,0,r),mm(t,r+1,-1),r)}function sd(t,e){for(var n="",r=ZT(t),i=0;i6)switch(Pr(t,e+1)){case 109:if(Pr(t,e+4)!==45)break;case 102:return un(t,/(.+:)(.+)-([^]+)/,"$1"+cn+"$2-$3$1"+x1+(Pr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~O2(t,"stretch")?nz(un(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Pr(t,e+1)!==115)break;case 6444:switch(Pr(t,Ts(t)-3-(~O2(t,"!important")&&10))){case 107:return un(t,":",":"+cn)+t;case 101:return un(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+cn+(Pr(t,14)===45?"inline-":"")+"box$3$1"+cn+"$2$3$1"+Gr+"$2box$3")+t}break;case 5936:switch(Pr(t,e+11)){case 114:return cn+t+Gr+un(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return cn+t+Gr+un(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return cn+t+Gr+un(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return cn+t+Gr+t+t}return t}var KH=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case KT:e.return=nz(e.value,e.length);break;case ZF:return sd([Bh(e,{value:un(e.value,"@","@"+cn)})],i);case YT:if(e.length)return kH(e.props,function(o){switch(NH(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return sd([Bh(e,{props:[un(o,/:(read-\w+)/,":"+x1+"$1")]})],i);case"::placeholder":return sd([Bh(e,{props:[un(o,/:(plac\w+)/,":"+cn+"input-$1")]}),Bh(e,{props:[un(o,/:(plac\w+)/,":"+x1+"$1")]}),Bh(e,{props:[un(o,/:(plac\w+)/,Gr+"input-$1")]})],i)}return""})}},ZH=[KH],rz=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(x){var y=x.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var i=e.stylisPlugins||ZH,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var y=x.getAttribute("data-emotion").split(" "),g=1;g{db[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const vN={};db.transitional=function(e,n,r){function i(o,s){return"[Axios v"+XF+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new Ut(i(s," has been removed"+(n?" in "+n:"")),Ut.ERR_DEPRECATED);return n&&!vN[s]&&(vN[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};db.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function gH(t,e,n){if(typeof t!="object")throw new Ut("options must be an object",Ut.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],l=a===void 0||s(a,o,t);if(l!==!0)throw new Ut("option "+o+" must be "+l,Ut.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ut("Unknown option "+o,Ut.ERR_BAD_OPTION)}}const Py={assertOptions:gH,validators:db},Es=Py.validators;class Vc{constructor(e){this.defaults=e,this.interceptors={request:new lN,response:new lN}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=au(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Py.assertOptions(r,{silentJSONParsing:Es.transitional(Es.boolean),forcedJSONParsing:Es.transitional(Es.boolean),clarifyTimeoutError:Es.transitional(Es.boolean)},!1),i!=null&&(we.isFunction(i)?n.paramsSerializer={serialize:i}:Py.assertOptions(i,{encode:Es.function,serialize:Es.function},!0)),Py.assertOptions(n,{baseUrl:Es.spelling("baseURL"),withXsrfToken:Es.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&we.merge(o.common,o[n.method]);o&&we.forEach(["delete","get","head","post","put","patch","common"],v=>{delete o[v]}),n.headers=Di.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(l=l&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});const c=[];this.interceptors.response.forEach(function(x){c.push(x.fulfilled,x.rejected)});let u,f=0,h;if(!l){const v=[gN.bind(this),void 0];for(v.unshift.apply(v,a),v.push.apply(v,c),h=v.length,u=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new Wd(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new qT(function(i){e=i}),cancel:e}}}function vH(t){return function(n){return t.apply(null,n)}}function yH(t){return we.isObject(t)&&t.isAxiosError===!0}const O2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(O2).forEach(([t,e])=>{O2[e]=t});function qF(t){const e=new Vc(t),n=EF(Vc.prototype.request,e);return we.extend(n,Vc.prototype,e,{allOwnKeys:!0}),we.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return qF(au(t,i))},n}const Fn=qF(ng);Fn.Axios=Vc;Fn.CanceledError=Wd;Fn.CancelToken=qT;Fn.isCancel=BF;Fn.VERSION=XF;Fn.toFormData=ub;Fn.AxiosError=Ut;Fn.Cancel=Fn.CanceledError;Fn.all=function(e){return Promise.all(e)};Fn.spread=vH;Fn.isAxiosError=yH;Fn.mergeConfig=au;Fn.AxiosHeaders=Di;Fn.formToJSON=t=>UF(we.isHTMLForm(t)?new FormData(t):t);Fn.getAdapter=GF.getAdapter;Fn.HttpStatusCode=O2;Fn.default=Fn;const pm={black:"#000",white:"#fff"},qu={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Yu={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ku={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Zu={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Ju={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Uh={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},xH={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function ka(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n0?Pr(Hd,--Ui):0,_d--,tr===10&&(_d=1,pb--),tr}function no(){return tr=Ui2||gm(tr)>3?"":" "}function FH(t,e){for(;--e&&no()&&!(tr<48||tr>102||tr>57&&tr<65||tr>70&&tr<97););return rg(t,Iy()+(e<6&&Fs()==32&&no()==32))}function F2(t){for(;no();)switch(tr){case t:return Ui;case 34:case 39:t!==34&&t!==39&&F2(tr);break;case 40:t===41&&F2(t);break;case 92:no();break}return Ui}function zH(t,e){for(;no()&&t+tr!==57;)if(t+tr===84&&Fs()===47)break;return"/*"+rg(e,Ui-1)+"*"+hb(t===47?t:no())}function UH(t){for(;!gm(Fs());)no();return rg(t,Ui)}function BH(t){return tz(ky("",null,null,null,[""],t=ez(t),0,[0],t))}function ky(t,e,n,r,i,o,s,a,l){for(var c=0,u=0,f=s,h=0,m=0,v=0,x=1,y=1,g=1,b=0,_="",S=i,A=o,P=r,R=_;y;)switch(v=b,b=no()){case 40:if(v!=108&&Pr(R,f-1)==58){D2(R+=un(Ny(b),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:R+=Ny(b);break;case 9:case 10:case 13:case 32:R+=DH(v);break;case 92:R+=FH(Iy()-1,7);continue;case 47:switch(Fs()){case 42:case 47:ev(jH(zH(no(),Iy()),e,n),l);break;default:R+="/"}break;case 123*x:a[c++]=Rs(R)*g;case 125*x:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+u:g==-1&&(R=un(R,/\f/g,"")),m>0&&Rs(R)-f&&ev(m>32?xN(R+";",r,n,f-1):xN(un(R," ","")+";",r,n,f-2),l);break;case 59:R+=";";default:if(ev(P=yN(R,e,n,c,u,i,a,_,S=[],A=[],f),o),b===123)if(u===0)ky(R,e,P,P,S,o,f,a,A);else switch(h===99&&Pr(R,3)===110?100:h){case 100:case 108:case 109:case 115:ky(t,P,P,r&&ev(yN(t,P,P,0,0,i,a,_,i,S=[],f),A),i,A,f,a,r?S:A);break;default:ky(R,P,P,P,[""],A,0,a,A)}}c=u=m=0,x=g=1,_=R="",f=s;break;case 58:f=1+Rs(R),m=v;default:if(x<1){if(b==123)--x;else if(b==125&&x++==0&&OH()==125)continue}switch(R+=hb(b),b*x){case 38:g=u>0?1:(R+="\f",-1);break;case 44:a[c++]=(Rs(R)-1)*g,g=1;break;case 64:Fs()===45&&(R+=Ny(no())),h=Fs(),u=f=Rs(_=R+=UH(Iy())),b++;break;case 45:v===45&&Rs(R)==2&&(x=0)}}return o}function yN(t,e,n,r,i,o,s,a,l,c,u){for(var f=i-1,h=i===0?o:[""],m=ZT(h),v=0,x=0,y=0;v0?h[g]+" "+b:un(b,/&\f/g,h[g])))&&(l[y++]=_);return mb(t,e,n,i===0?YT:a,l,c,u)}function jH(t,e,n){return mb(t,e,n,KF,hb(LH()),mm(t,2,-2),0)}function xN(t,e,n,r){return mb(t,e,n,KT,mm(t,0,r),mm(t,r+1,-1),r)}function sd(t,e){for(var n="",r=ZT(t),i=0;i6)switch(Pr(t,e+1)){case 109:if(Pr(t,e+4)!==45)break;case 102:return un(t,/(.+:)(.+)-([^]+)/,"$1"+cn+"$2-$3$1"+b1+(Pr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~D2(t,"stretch")?nz(un(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Pr(t,e+1)!==115)break;case 6444:switch(Pr(t,Rs(t)-3-(~D2(t,"!important")&&10))){case 107:return un(t,":",":"+cn)+t;case 101:return un(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+cn+(Pr(t,14)===45?"inline-":"")+"box$3$1"+cn+"$2$3$1"+Gr+"$2box$3")+t}break;case 5936:switch(Pr(t,e+11)){case 114:return cn+t+Gr+un(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return cn+t+Gr+un(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return cn+t+Gr+un(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return cn+t+Gr+t+t}return t}var KH=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case KT:e.return=nz(e.value,e.length);break;case ZF:return sd([Bh(e,{value:un(e.value,"@","@"+cn)})],i);case YT:if(e.length)return kH(e.props,function(o){switch(NH(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return sd([Bh(e,{props:[un(o,/:(read-\w+)/,":"+b1+"$1")]})],i);case"::placeholder":return sd([Bh(e,{props:[un(o,/:(plac\w+)/,":"+cn+"input-$1")]}),Bh(e,{props:[un(o,/:(plac\w+)/,":"+b1+"$1")]}),Bh(e,{props:[un(o,/:(plac\w+)/,Gr+"input-$1")]})],i)}return""})}},ZH=[KH],rz=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(x){var y=x.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var i=e.stylisPlugins||ZH,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var y=x.getAttribute("data-emotion").split(" "),g=1;g=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var cG={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uG=!1,fG=/[A-Z]|^ms/g,dG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uz=function(e){return e.charCodeAt(1)===45},_N=function(e){return e!=null&&typeof e!="boolean"},BS=YF(function(t){return uz(t)?t:t.replace(fG,"-$&").toLowerCase()}),wN=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(dG,function(r,i,o){return Rs={name:i,styles:o,next:Rs},i})}return cG[e]!==1&&!uz(e)&&typeof n=="number"&&n!==0?n+"px":n},hG="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function vm(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Rs={name:i.name,styles:i.styles,next:Rs},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Rs={name:s.name,styles:s.styles,next:Rs},s=s.next;var a=o.styles+";";return a}return pG(t,e,n)}case"function":{if(t!==void 0){var l=Rs,c=n(t);return Rs=l,vm(t,e,c)}break}}var u=n;if(e==null)return u;var f=e[u];return f!==void 0?f:u}function pG(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i96?xG:bG},CN=function(e,n,r){var i;if(n){var o=n.shouldForwardProp;i=e.__emotion_forwardProp&&o?function(s){return e.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},_G=!1,wG=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return lz(n,r,i),gG(function(){return cz(n,r,i)}),null},SG=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,o,s;n!==void 0&&(o=n.label,s=n.target);var a=CN(e,n,r),l=a||EN(i),c=!l("as");return function(){var u=arguments,f=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{f.push(u[0][0]);for(var h=u.length,m=1;me(IG(i)?n:i):e;return E.jsx(yG,{styles:r})}function nR(t,e){return F2(t,e)}const xz=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},NG=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:yz,StyledEngineProvider:PG,ThemeContext:ig,css:pz,default:nR,internal_processStyles:xz,keyframes:Mb},Symbol.toStringTag,{value:"Module"}));function ma(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function bz(t){if(!ma(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=bz(t[n])}),e}function fi(t,e,n={clone:!0}){const r=n.clone?$({},t):t;return ma(t)&&ma(e)&&Object.keys(e).forEach(i=>{ma(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&ma(t[i])?r[i]=fi(t[i],e[i],n):n.clone?r[i]=ma(e[i])?bz(e[i]):e[i]:r[i]=e[i]}),r}const kG=Object.freeze(Object.defineProperty({__proto__:null,default:fi,isPlainObject:ma},Symbol.toStringTag,{value:"Module"})),LG=["values","unit","step"],OG=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>$({},n,{[r.key]:r.val}),{})};function _z(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=et(t,LG),o=OG(e),s=Object.keys(o);function a(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-r/100}${n})`}function c(h,m){const v=s.indexOf(m);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(v!==-1&&typeof e[s[v]]=="number"?e[s[v]]:m)-r/100}${n})`}function u(h){return s.indexOf(h)+1`@media (min-width:${rR[t]}px)`};function Bi(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const o=r.breakpoints||TN;return e.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const o=r.breakpoints||TN;return Object.keys(e).reduce((s,a)=>{if(Object.keys(o.values||rR).indexOf(a)!==-1){const l=o.up(a);s[l]=n(e[a],a)}else{const l=a;s[l]=e[l]}return s},{})}return n(e)}function wz(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const o=t.up(i);return r[o]={},r},{}))||{}}function Sz(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function FG(t,...e){const n=wz(t),r=[n,...e].reduce((i,o)=>fi(i,o),{});return Sz(Object.keys(n),r)}function zG(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((i,o)=>{o{t[i]!=null&&(n[i]=!0)}),n}function $c({values:t,breakpoints:e,base:n}){const r=n||zG(t,e),i=Object.keys(r);if(i.length===0)return t;let o;return i.reduce((s,a,l)=>(Array.isArray(t)?(s[a]=t[l]!=null?t[l]:t[o],o=l):typeof t=="object"?(s[a]=t[a]!=null?t[a]:t[o],o=a):s[a]=t,s),{})}function xt(t){if(typeof t!="string")throw new Error(Na(7));return t.charAt(0).toUpperCase()+t.slice(1)}const UG=Object.freeze(Object.defineProperty({__proto__:null,default:xt},Symbol.toStringTag,{value:"Module"}));function wd(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function b1(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=wd(t,n)||r,e&&(i=e(i,r,t)),i}function Kn(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,o=s=>{if(s[e]==null)return null;const a=s[e],l=s.theme,c=wd(l,r)||{};return Bi(s,a,f=>{let h=b1(c,i,f);return f===h&&typeof f=="string"&&(h=b1(c,i,`${e}${f==="default"?"":xt(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[e],o}function BG(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const jG={m:"margin",p:"padding"},VG={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},RN={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},$G=BG(t=>{if(t.length>2)if(RN[t])t=RN[t];else return[t];const[e,n]=t.split(""),r=jG[e],i=VG[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),iR=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],oR=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...iR,...oR];function og(t,e,n,r){var i;const o=(i=wd(t,e,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function sR(t){return og(t,"spacing",8)}function lu(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function WG(t,e){return n=>t.reduce((r,i)=>(r[i]=lu(e,n),r),{})}function HG(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=$G(n),o=WG(i,r),s=t[n];return Bi(t,s,o)}function Mz(t,e){const n=sR(t.theme);return Object.keys(t).map(r=>HG(t,e,r,n)).reduce(Pp,{})}function jn(t){return Mz(t,iR)}jn.propTypes={};jn.filterProps=iR;function Vn(t){return Mz(t,oR)}Vn.propTypes={};Vn.filterProps=oR;function GG(t=8){if(t.mui)return t;const e=sR({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=e(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function Eb(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>e[o]?Pp(i,e[o](r)):i,{});return n.propTypes={},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Ao(t){return typeof t!="number"?t:`${t}px solid`}function Fo(t,e){return Kn({prop:t,themeKey:"borders",transform:e})}const XG=Fo("border",Ao),qG=Fo("borderTop",Ao),YG=Fo("borderRight",Ao),KG=Fo("borderBottom",Ao),ZG=Fo("borderLeft",Ao),JG=Fo("borderColor"),QG=Fo("borderTopColor"),eX=Fo("borderRightColor"),tX=Fo("borderBottomColor"),nX=Fo("borderLeftColor"),rX=Fo("outline",Ao),iX=Fo("outlineColor"),Cb=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=og(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:lu(e,r)});return Bi(t,t.borderRadius,n)}return null};Cb.propTypes={};Cb.filterProps=["borderRadius"];Eb(XG,qG,YG,KG,ZG,JG,QG,eX,tX,nX,Cb,rX,iX);const Tb=t=>{if(t.gap!==void 0&&t.gap!==null){const e=og(t.theme,"spacing",8),n=r=>({gap:lu(e,r)});return Bi(t,t.gap,n)}return null};Tb.propTypes={};Tb.filterProps=["gap"];const Rb=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=og(t.theme,"spacing",8),n=r=>({columnGap:lu(e,r)});return Bi(t,t.columnGap,n)}return null};Rb.propTypes={};Rb.filterProps=["columnGap"];const Ab=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=og(t.theme,"spacing",8),n=r=>({rowGap:lu(e,r)});return Bi(t,t.rowGap,n)}return null};Ab.propTypes={};Ab.filterProps=["rowGap"];const oX=Kn({prop:"gridColumn"}),sX=Kn({prop:"gridRow"}),aX=Kn({prop:"gridAutoFlow"}),lX=Kn({prop:"gridAutoColumns"}),cX=Kn({prop:"gridAutoRows"}),uX=Kn({prop:"gridTemplateColumns"}),fX=Kn({prop:"gridTemplateRows"}),dX=Kn({prop:"gridTemplateAreas"}),hX=Kn({prop:"gridArea"});Eb(Tb,Rb,Ab,oX,sX,aX,lX,cX,uX,fX,dX,hX);function ad(t,e){return e==="grey"?e:t}const pX=Kn({prop:"color",themeKey:"palette",transform:ad}),mX=Kn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ad}),gX=Kn({prop:"backgroundColor",themeKey:"palette",transform:ad});Eb(pX,mX,gX);function Zi(t){return t<=1&&t!==0?`${t*100}%`:t}const vX=Kn({prop:"width",transform:Zi}),aR=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const o=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||rR[n];return o?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Zi(n)}};return Bi(t,t.maxWidth,e)}return null};aR.filterProps=["maxWidth"];const yX=Kn({prop:"minWidth",transform:Zi}),xX=Kn({prop:"height",transform:Zi}),bX=Kn({prop:"maxHeight",transform:Zi}),_X=Kn({prop:"minHeight",transform:Zi});Kn({prop:"size",cssProperty:"width",transform:Zi});Kn({prop:"size",cssProperty:"height",transform:Zi});const wX=Kn({prop:"boxSizing"});Eb(vX,aR,yX,xX,bX,_X,wX);const sg={border:{themeKey:"borders",transform:Ao},borderTop:{themeKey:"borders",transform:Ao},borderRight:{themeKey:"borders",transform:Ao},borderBottom:{themeKey:"borders",transform:Ao},borderLeft:{themeKey:"borders",transform:Ao},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ao},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Cb},color:{themeKey:"palette",transform:ad},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ad},backgroundColor:{themeKey:"palette",transform:ad},p:{style:Vn},pt:{style:Vn},pr:{style:Vn},pb:{style:Vn},pl:{style:Vn},px:{style:Vn},py:{style:Vn},padding:{style:Vn},paddingTop:{style:Vn},paddingRight:{style:Vn},paddingBottom:{style:Vn},paddingLeft:{style:Vn},paddingX:{style:Vn},paddingY:{style:Vn},paddingInline:{style:Vn},paddingInlineStart:{style:Vn},paddingInlineEnd:{style:Vn},paddingBlock:{style:Vn},paddingBlockStart:{style:Vn},paddingBlockEnd:{style:Vn},m:{style:jn},mt:{style:jn},mr:{style:jn},mb:{style:jn},ml:{style:jn},mx:{style:jn},my:{style:jn},margin:{style:jn},marginTop:{style:jn},marginRight:{style:jn},marginBottom:{style:jn},marginLeft:{style:jn},marginX:{style:jn},marginY:{style:jn},marginInline:{style:jn},marginInlineStart:{style:jn},marginInlineEnd:{style:jn},marginBlock:{style:jn},marginBlockStart:{style:jn},marginBlockEnd:{style:jn},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Tb},rowGap:{style:Ab},columnGap:{style:Rb},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Zi},maxWidth:{style:aR},minWidth:{transform:Zi},height:{transform:Zi},maxHeight:{transform:Zi},minHeight:{transform:Zi},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function SX(...t){const e=t.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function MX(t,e){return typeof t=="function"?t(e):t}function Ez(){function t(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:f}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=wd(i,c)||{};return f?f(s):Bi(s,r,v=>{let x=b1(h,u,v);return v===x&&typeof v=="string"&&(x=b1(h,u,`${n}${v==="default"?"":xt(v)}`,v)),l===!1?x:{[l]:x}})}function e(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:sg;function a(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;const u=wz(o.breakpoints),f=Object.keys(u);let h=u;return Object.keys(c).forEach(m=>{const v=MX(c[m],o);if(v!=null)if(typeof v=="object")if(s[m])h=Pp(h,t(m,v,o,s));else{const x=Bi({theme:o},v,y=>({[m]:y}));SX(x,v)?h[m]=e({sx:v,theme:o}):h=Pp(h,x)}else h=Pp(h,t(m,v,o,s))}),Sz(f,h)}return Array.isArray(i)?i.map(a):a(i)}return e}const Gd=Ez();Gd.filterProps=["sx"];function Cz(t,e){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:n.palette.mode===t?e:{}}const EX=["breakpoints","palette","spacing","shape"];function Xd(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=t,s=et(t,EX),a=_z(n),l=GG(i);let c=fi({breakpoints:a,direction:"ltr",components:{},palette:$({mode:"light"},r),spacing:l,shape:$({},DG,o)},s);return c.applyStyles=Cz,c=e.reduce((u,f)=>fi(u,f),c),c.unstable_sxConfig=$({},sg,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(f){return Gd({sx:f,theme:this})},c}const CX=Object.freeze(Object.defineProperty({__proto__:null,default:Xd,private_createBreakpoints:_z,unstable_applyStyles:Cz},Symbol.toStringTag,{value:"Module"}));function TX(t){return Object.keys(t).length===0}function lR(t=null){const e=T.useContext(ig);return!e||TX(e)?t:e}const RX=Xd();function Pb(t=RX){return lR(t)}function AX({styles:t,themeId:e,defaultTheme:n={}}){const r=Pb(n),i=typeof t=="function"?t(e&&r[e]||r):t;return E.jsx(yz,{styles:i})}const PX=["sx"],IX=t=>{var e,n;const r={systemProps:{},otherProps:{}},i=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:sg;return Object.keys(t).forEach(o=>{i[o]?r.systemProps[o]=t[o]:r.otherProps[o]=t[o]}),r};function ag(t){const{sx:e}=t,n=et(t,PX),{systemProps:r,otherProps:i}=IX(n);let o;return Array.isArray(e)?o=[r,...e]:typeof e=="function"?o=(...s)=>{const a=e(...s);return ma(a)?$({},r,a):r}:o=$({},r,e),$({},i,{sx:o})}const NX=Object.freeze(Object.defineProperty({__proto__:null,default:Gd,extendSxProp:ag,unstable_createStyleFunctionSx:Ez,unstable_defaultSxConfig:sg},Symbol.toStringTag,{value:"Module"})),AN=t=>t,kX=()=>{let t=AN;return{configure(e){t=e},generate(e){return t(e)},reset(){t=AN}}},Tz=kX();function Rz(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;ea!=="theme"&&a!=="sx"&&a!=="as"})(Gd);return T.forwardRef(function(l,c){const u=Pb(n),f=ag(l),{className:h,component:m="div"}=f,v=et(f,LX);return E.jsx(o,$({as:m,ref:c,className:lt(h,i?i(r):r),theme:e&&u[e]||u},v))})}const DX={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Tt(t,e,n="Mui"){const r=DX[e];return r?`${n}-${r}`:`${Tz.generate(t)}-${e}`}function Ct(t,e,n="Mui"){const r={};return e.forEach(i=>{r[i]=Tt(t,i,n)}),r}var Az={exports:{}},gn={};/** + */var Tr=typeof Symbol=="function"&&Symbol.for,JT=Tr?Symbol.for("react.element"):60103,QT=Tr?Symbol.for("react.portal"):60106,gb=Tr?Symbol.for("react.fragment"):60107,vb=Tr?Symbol.for("react.strict_mode"):60108,yb=Tr?Symbol.for("react.profiler"):60114,xb=Tr?Symbol.for("react.provider"):60109,bb=Tr?Symbol.for("react.context"):60110,eR=Tr?Symbol.for("react.async_mode"):60111,_b=Tr?Symbol.for("react.concurrent_mode"):60111,wb=Tr?Symbol.for("react.forward_ref"):60112,Sb=Tr?Symbol.for("react.suspense"):60113,JH=Tr?Symbol.for("react.suspense_list"):60120,Mb=Tr?Symbol.for("react.memo"):60115,Eb=Tr?Symbol.for("react.lazy"):60116,QH=Tr?Symbol.for("react.block"):60121,eG=Tr?Symbol.for("react.fundamental"):60117,tG=Tr?Symbol.for("react.responder"):60118,nG=Tr?Symbol.for("react.scope"):60119;function fo(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case JT:switch(t=t.type,t){case eR:case _b:case gb:case yb:case vb:case Sb:return t;default:switch(t=t&&t.$$typeof,t){case bb:case wb:case Eb:case Mb:case xb:return t;default:return e}}case QT:return e}}}function oz(t){return fo(t)===_b}mn.AsyncMode=eR;mn.ConcurrentMode=_b;mn.ContextConsumer=bb;mn.ContextProvider=xb;mn.Element=JT;mn.ForwardRef=wb;mn.Fragment=gb;mn.Lazy=Eb;mn.Memo=Mb;mn.Portal=QT;mn.Profiler=yb;mn.StrictMode=vb;mn.Suspense=Sb;mn.isAsyncMode=function(t){return oz(t)||fo(t)===eR};mn.isConcurrentMode=oz;mn.isContextConsumer=function(t){return fo(t)===bb};mn.isContextProvider=function(t){return fo(t)===xb};mn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===JT};mn.isForwardRef=function(t){return fo(t)===wb};mn.isFragment=function(t){return fo(t)===gb};mn.isLazy=function(t){return fo(t)===Eb};mn.isMemo=function(t){return fo(t)===Mb};mn.isPortal=function(t){return fo(t)===QT};mn.isProfiler=function(t){return fo(t)===yb};mn.isStrictMode=function(t){return fo(t)===vb};mn.isSuspense=function(t){return fo(t)===Sb};mn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===gb||t===_b||t===yb||t===vb||t===Sb||t===JH||typeof t=="object"&&t!==null&&(t.$$typeof===Eb||t.$$typeof===Mb||t.$$typeof===xb||t.$$typeof===bb||t.$$typeof===wb||t.$$typeof===eG||t.$$typeof===tG||t.$$typeof===nG||t.$$typeof===QH)};mn.typeOf=fo;iz.exports=mn;var rG=iz.exports,sz=rG,iG={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},oG={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},az={};az[sz.ForwardRef]=iG;az[sz.Memo]=oG;var sG=!0;function aG(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(r+=i+" ")}),r}var lz=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||sG===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},cz=function(e,n,r){lz(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function lG(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var cG={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uG=!1,fG=/[A-Z]|^ms/g,dG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uz=function(e){return e.charCodeAt(1)===45},_N=function(e){return e!=null&&typeof e!="boolean"},VS=YF(function(t){return uz(t)?t:t.replace(fG,"-$&").toLowerCase()}),wN=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(dG,function(r,i,o){return As={name:i,styles:o,next:As},i})}return cG[e]!==1&&!uz(e)&&typeof n=="number"&&n!==0?n+"px":n},hG="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function vm(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return As={name:i.name,styles:i.styles,next:As},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)As={name:s.name,styles:s.styles,next:As},s=s.next;var a=o.styles+";";return a}return pG(t,e,n)}case"function":{if(t!==void 0){var l=As,c=n(t);return As=l,vm(t,e,c)}break}}var u=n;if(e==null)return u;var f=e[u];return f!==void 0?f:u}function pG(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i96?xG:bG},CN=function(e,n,r){var i;if(n){var o=n.shouldForwardProp;i=e.__emotion_forwardProp&&o?function(s){return e.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},_G=!1,wG=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return lz(n,r,i),gG(function(){return cz(n,r,i)}),null},SG=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,o,s;n!==void 0&&(o=n.label,s=n.target);var a=CN(e,n,r),l=a||EN(i),c=!l("as");return function(){var u=arguments,f=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{f.push(u[0][0]);for(var h=u.length,m=1;me(IG(i)?n:i):e;return E.jsx(yG,{styles:r})}function nR(t,e){return z2(t,e)}const xz=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},NG=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:yz,StyledEngineProvider:PG,ThemeContext:ig,css:pz,default:nR,internal_processStyles:xz,keyframes:Cb},Symbol.toStringTag,{value:"Module"}));function ga(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function bz(t){if(!ga(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=bz(t[n])}),e}function di(t,e,n={clone:!0}){const r=n.clone?$({},t):t;return ga(t)&&ga(e)&&Object.keys(e).forEach(i=>{ga(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&ga(t[i])?r[i]=di(t[i],e[i],n):n.clone?r[i]=ga(e[i])?bz(e[i]):e[i]:r[i]=e[i]}),r}const kG=Object.freeze(Object.defineProperty({__proto__:null,default:di,isPlainObject:ga},Symbol.toStringTag,{value:"Module"})),LG=["values","unit","step"],OG=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>$({},n,{[r.key]:r.val}),{})};function _z(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=et(t,LG),o=OG(e),s=Object.keys(o);function a(h){return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof e[h]=="number"?e[h]:h)-r/100}${n})`}function c(h,m){const v=s.indexOf(m);return`@media (min-width:${typeof e[h]=="number"?e[h]:h}${n}) and (max-width:${(v!==-1&&typeof e[s[v]]=="number"?e[s[v]]:m)-r/100}${n})`}function u(h){return s.indexOf(h)+1`@media (min-width:${rR[t]}px)`};function Bi(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const o=r.breakpoints||TN;return e.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const o=r.breakpoints||TN;return Object.keys(e).reduce((s,a)=>{if(Object.keys(o.values||rR).indexOf(a)!==-1){const l=o.up(a);s[l]=n(e[a],a)}else{const l=a;s[l]=e[l]}return s},{})}return n(e)}function wz(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const o=t.up(i);return r[o]={},r},{}))||{}}function Sz(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function FG(t,...e){const n=wz(t),r=[n,...e].reduce((i,o)=>di(i,o),{});return Sz(Object.keys(n),r)}function zG(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((i,o)=>{o{t[i]!=null&&(n[i]=!0)}),n}function $c({values:t,breakpoints:e,base:n}){const r=n||zG(t,e),i=Object.keys(r);if(i.length===0)return t;let o;return i.reduce((s,a,l)=>(Array.isArray(t)?(s[a]=t[l]!=null?t[l]:t[o],o=l):typeof t=="object"?(s[a]=t[a]!=null?t[a]:t[o],o=a):s[a]=t,s),{})}function xt(t){if(typeof t!="string")throw new Error(ka(7));return t.charAt(0).toUpperCase()+t.slice(1)}const UG=Object.freeze(Object.defineProperty({__proto__:null,default:xt},Symbol.toStringTag,{value:"Module"}));function wd(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function _1(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=wd(t,n)||r,e&&(i=e(i,r,t)),i}function Kn(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,o=s=>{if(s[e]==null)return null;const a=s[e],l=s.theme,c=wd(l,r)||{};return Bi(s,a,f=>{let h=_1(c,i,f);return f===h&&typeof f=="string"&&(h=_1(c,i,`${e}${f==="default"?"":xt(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[e],o}function BG(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const jG={m:"margin",p:"padding"},VG={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},RN={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},$G=BG(t=>{if(t.length>2)if(RN[t])t=RN[t];else return[t];const[e,n]=t.split(""),r=jG[e],i=VG[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),iR=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],oR=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...iR,...oR];function og(t,e,n,r){var i;const o=(i=wd(t,e,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function sR(t){return og(t,"spacing",8)}function lu(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function WG(t,e){return n=>t.reduce((r,i)=>(r[i]=lu(e,n),r),{})}function HG(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=$G(n),o=WG(i,r),s=t[n];return Bi(t,s,o)}function Mz(t,e){const n=sR(t.theme);return Object.keys(t).map(r=>HG(t,e,r,n)).reduce(Pp,{})}function jn(t){return Mz(t,iR)}jn.propTypes={};jn.filterProps=iR;function Vn(t){return Mz(t,oR)}Vn.propTypes={};Vn.filterProps=oR;function GG(t=8){if(t.mui)return t;const e=sR({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=e(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function Tb(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>e[o]?Pp(i,e[o](r)):i,{});return n.propTypes={},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Ao(t){return typeof t!="number"?t:`${t}px solid`}function Fo(t,e){return Kn({prop:t,themeKey:"borders",transform:e})}const XG=Fo("border",Ao),qG=Fo("borderTop",Ao),YG=Fo("borderRight",Ao),KG=Fo("borderBottom",Ao),ZG=Fo("borderLeft",Ao),JG=Fo("borderColor"),QG=Fo("borderTopColor"),eX=Fo("borderRightColor"),tX=Fo("borderBottomColor"),nX=Fo("borderLeftColor"),rX=Fo("outline",Ao),iX=Fo("outlineColor"),Rb=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=og(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:lu(e,r)});return Bi(t,t.borderRadius,n)}return null};Rb.propTypes={};Rb.filterProps=["borderRadius"];Tb(XG,qG,YG,KG,ZG,JG,QG,eX,tX,nX,Rb,rX,iX);const Ab=t=>{if(t.gap!==void 0&&t.gap!==null){const e=og(t.theme,"spacing",8),n=r=>({gap:lu(e,r)});return Bi(t,t.gap,n)}return null};Ab.propTypes={};Ab.filterProps=["gap"];const Pb=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=og(t.theme,"spacing",8),n=r=>({columnGap:lu(e,r)});return Bi(t,t.columnGap,n)}return null};Pb.propTypes={};Pb.filterProps=["columnGap"];const Ib=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=og(t.theme,"spacing",8),n=r=>({rowGap:lu(e,r)});return Bi(t,t.rowGap,n)}return null};Ib.propTypes={};Ib.filterProps=["rowGap"];const oX=Kn({prop:"gridColumn"}),sX=Kn({prop:"gridRow"}),aX=Kn({prop:"gridAutoFlow"}),lX=Kn({prop:"gridAutoColumns"}),cX=Kn({prop:"gridAutoRows"}),uX=Kn({prop:"gridTemplateColumns"}),fX=Kn({prop:"gridTemplateRows"}),dX=Kn({prop:"gridTemplateAreas"}),hX=Kn({prop:"gridArea"});Tb(Ab,Pb,Ib,oX,sX,aX,lX,cX,uX,fX,dX,hX);function ad(t,e){return e==="grey"?e:t}const pX=Kn({prop:"color",themeKey:"palette",transform:ad}),mX=Kn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ad}),gX=Kn({prop:"backgroundColor",themeKey:"palette",transform:ad});Tb(pX,mX,gX);function Zi(t){return t<=1&&t!==0?`${t*100}%`:t}const vX=Kn({prop:"width",transform:Zi}),aR=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const o=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||rR[n];return o?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Zi(n)}};return Bi(t,t.maxWidth,e)}return null};aR.filterProps=["maxWidth"];const yX=Kn({prop:"minWidth",transform:Zi}),xX=Kn({prop:"height",transform:Zi}),bX=Kn({prop:"maxHeight",transform:Zi}),_X=Kn({prop:"minHeight",transform:Zi});Kn({prop:"size",cssProperty:"width",transform:Zi});Kn({prop:"size",cssProperty:"height",transform:Zi});const wX=Kn({prop:"boxSizing"});Tb(vX,aR,yX,xX,bX,_X,wX);const sg={border:{themeKey:"borders",transform:Ao},borderTop:{themeKey:"borders",transform:Ao},borderRight:{themeKey:"borders",transform:Ao},borderBottom:{themeKey:"borders",transform:Ao},borderLeft:{themeKey:"borders",transform:Ao},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ao},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Rb},color:{themeKey:"palette",transform:ad},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ad},backgroundColor:{themeKey:"palette",transform:ad},p:{style:Vn},pt:{style:Vn},pr:{style:Vn},pb:{style:Vn},pl:{style:Vn},px:{style:Vn},py:{style:Vn},padding:{style:Vn},paddingTop:{style:Vn},paddingRight:{style:Vn},paddingBottom:{style:Vn},paddingLeft:{style:Vn},paddingX:{style:Vn},paddingY:{style:Vn},paddingInline:{style:Vn},paddingInlineStart:{style:Vn},paddingInlineEnd:{style:Vn},paddingBlock:{style:Vn},paddingBlockStart:{style:Vn},paddingBlockEnd:{style:Vn},m:{style:jn},mt:{style:jn},mr:{style:jn},mb:{style:jn},ml:{style:jn},mx:{style:jn},my:{style:jn},margin:{style:jn},marginTop:{style:jn},marginRight:{style:jn},marginBottom:{style:jn},marginLeft:{style:jn},marginX:{style:jn},marginY:{style:jn},marginInline:{style:jn},marginInlineStart:{style:jn},marginInlineEnd:{style:jn},marginBlock:{style:jn},marginBlockStart:{style:jn},marginBlockEnd:{style:jn},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ab},rowGap:{style:Ib},columnGap:{style:Pb},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Zi},maxWidth:{style:aR},minWidth:{transform:Zi},height:{transform:Zi},maxHeight:{transform:Zi},minHeight:{transform:Zi},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function SX(...t){const e=t.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function MX(t,e){return typeof t=="function"?t(e):t}function Ez(){function t(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:f}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=wd(i,c)||{};return f?f(s):Bi(s,r,v=>{let x=_1(h,u,v);return v===x&&typeof v=="string"&&(x=_1(h,u,`${n}${v==="default"?"":xt(v)}`,v)),l===!1?x:{[l]:x}})}function e(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:sg;function a(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;const u=wz(o.breakpoints),f=Object.keys(u);let h=u;return Object.keys(c).forEach(m=>{const v=MX(c[m],o);if(v!=null)if(typeof v=="object")if(s[m])h=Pp(h,t(m,v,o,s));else{const x=Bi({theme:o},v,y=>({[m]:y}));SX(x,v)?h[m]=e({sx:v,theme:o}):h=Pp(h,x)}else h=Pp(h,t(m,v,o,s))}),Sz(f,h)}return Array.isArray(i)?i.map(a):a(i)}return e}const Gd=Ez();Gd.filterProps=["sx"];function Cz(t,e){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:n.palette.mode===t?e:{}}const EX=["breakpoints","palette","spacing","shape"];function Xd(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=t,s=et(t,EX),a=_z(n),l=GG(i);let c=di({breakpoints:a,direction:"ltr",components:{},palette:$({mode:"light"},r),spacing:l,shape:$({},DG,o)},s);return c.applyStyles=Cz,c=e.reduce((u,f)=>di(u,f),c),c.unstable_sxConfig=$({},sg,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(f){return Gd({sx:f,theme:this})},c}const CX=Object.freeze(Object.defineProperty({__proto__:null,default:Xd,private_createBreakpoints:_z,unstable_applyStyles:Cz},Symbol.toStringTag,{value:"Module"}));function TX(t){return Object.keys(t).length===0}function lR(t=null){const e=T.useContext(ig);return!e||TX(e)?t:e}const RX=Xd();function Nb(t=RX){return lR(t)}function AX({styles:t,themeId:e,defaultTheme:n={}}){const r=Nb(n),i=typeof t=="function"?t(e&&r[e]||r):t;return E.jsx(yz,{styles:i})}const PX=["sx"],IX=t=>{var e,n;const r={systemProps:{},otherProps:{}},i=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:sg;return Object.keys(t).forEach(o=>{i[o]?r.systemProps[o]=t[o]:r.otherProps[o]=t[o]}),r};function ag(t){const{sx:e}=t,n=et(t,PX),{systemProps:r,otherProps:i}=IX(n);let o;return Array.isArray(e)?o=[r,...e]:typeof e=="function"?o=(...s)=>{const a=e(...s);return ga(a)?$({},r,a):r}:o=$({},r,e),$({},i,{sx:o})}const NX=Object.freeze(Object.defineProperty({__proto__:null,default:Gd,extendSxProp:ag,unstable_createStyleFunctionSx:Ez,unstable_defaultSxConfig:sg},Symbol.toStringTag,{value:"Module"})),AN=t=>t,kX=()=>{let t=AN;return{configure(e){t=e},generate(e){return t(e)},reset(){t=AN}}},Tz=kX();function Rz(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;ea!=="theme"&&a!=="sx"&&a!=="as"})(Gd);return T.forwardRef(function(l,c){const u=Nb(n),f=ag(l),{className:h,component:m="div"}=f,v=et(f,LX);return E.jsx(o,$({as:m,ref:c,className:lt(h,i?i(r):r),theme:e&&u[e]||u},v))})}const DX={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Tt(t,e,n="Mui"){const r=DX[e];return r?`${n}-${r}`:`${Tz.generate(t)}-${e}`}function Ct(t,e,n="Mui"){const r={};return e.forEach(i=>{r[i]=Tt(t,i,n)}),r}var Az={exports:{}},gn={};/** * @license React * react-is.production.min.js * @@ -57,7 +57,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var cR=Symbol.for("react.element"),uR=Symbol.for("react.portal"),Ib=Symbol.for("react.fragment"),Nb=Symbol.for("react.strict_mode"),kb=Symbol.for("react.profiler"),Lb=Symbol.for("react.provider"),Ob=Symbol.for("react.context"),FX=Symbol.for("react.server_context"),Db=Symbol.for("react.forward_ref"),Fb=Symbol.for("react.suspense"),zb=Symbol.for("react.suspense_list"),Ub=Symbol.for("react.memo"),Bb=Symbol.for("react.lazy"),zX=Symbol.for("react.offscreen"),Pz;Pz=Symbol.for("react.module.reference");function zo(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case cR:switch(t=t.type,t){case Ib:case kb:case Nb:case Fb:case zb:return t;default:switch(t=t&&t.$$typeof,t){case FX:case Ob:case Db:case Bb:case Ub:case Lb:return t;default:return e}}case uR:return e}}}gn.ContextConsumer=Ob;gn.ContextProvider=Lb;gn.Element=cR;gn.ForwardRef=Db;gn.Fragment=Ib;gn.Lazy=Bb;gn.Memo=Ub;gn.Portal=uR;gn.Profiler=kb;gn.StrictMode=Nb;gn.Suspense=Fb;gn.SuspenseList=zb;gn.isAsyncMode=function(){return!1};gn.isConcurrentMode=function(){return!1};gn.isContextConsumer=function(t){return zo(t)===Ob};gn.isContextProvider=function(t){return zo(t)===Lb};gn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===cR};gn.isForwardRef=function(t){return zo(t)===Db};gn.isFragment=function(t){return zo(t)===Ib};gn.isLazy=function(t){return zo(t)===Bb};gn.isMemo=function(t){return zo(t)===Ub};gn.isPortal=function(t){return zo(t)===uR};gn.isProfiler=function(t){return zo(t)===kb};gn.isStrictMode=function(t){return zo(t)===Nb};gn.isSuspense=function(t){return zo(t)===Fb};gn.isSuspenseList=function(t){return zo(t)===zb};gn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Ib||t===kb||t===Nb||t===Fb||t===zb||t===zX||typeof t=="object"&&t!==null&&(t.$$typeof===Bb||t.$$typeof===Ub||t.$$typeof===Lb||t.$$typeof===Ob||t.$$typeof===Db||t.$$typeof===Pz||t.getModuleId!==void 0)};gn.typeOf=zo;Az.exports=gn;var U2=Az.exports;const UX=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Iz(t){const e=`${t}`.match(UX);return e&&e[1]||""}function Nz(t,e=""){return t.displayName||t.name||Iz(t)||e}function PN(t,e,n){const r=Nz(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function BX(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return Nz(t,"Component");if(typeof t=="object")switch(t.$$typeof){case U2.ForwardRef:return PN(t,t.render,"ForwardRef");case U2.Memo:return PN(t,t.type,"memo");default:return}}}const jX=Object.freeze(Object.defineProperty({__proto__:null,default:BX,getFunctionName:Iz},Symbol.toStringTag,{value:"Module"})),VX=["ownerState"],$X=["variants"],WX=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function HX(t){return Object.keys(t).length===0}function GX(t){return typeof t=="string"&&t.charCodeAt(0)>96}function jS(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const XX=Xd(),qX=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function tv({defaultTheme:t,theme:e,themeId:n}){return HX(e)?t:e[n]||e}function YX(t){return t?(e,n)=>n[t]:null}function ky(t,e){let{ownerState:n}=e,r=et(e,VX);const i=typeof t=="function"?t($({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(o=>ky(o,$({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=et(i,$X);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props($({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style($({ownerState:n},r,n)):l.style))}),a}return i}function KX(t={}){const{themeId:e,defaultTheme:n=XX,rootShouldForwardProp:r=jS,slotShouldForwardProp:i=jS}=t,o=s=>Gd($({},s,{theme:tv($({},s,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(s,a={})=>{xz(s,A=>A.filter(P=>!(P!=null&&P.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=YX(qX(c))}=a,m=et(a,WX),v=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let y,g=jS;c==="Root"||c==="root"?g=r:c?g=i:GX(s)&&(g=void 0);const b=nR(s,$({shouldForwardProp:g,label:y},m)),_=A=>typeof A=="function"&&A.__emotion_real!==A||ma(A)?P=>ky(A,$({},P,{theme:tv({theme:P.theme,defaultTheme:n,themeId:e})})):A,S=(A,...P)=>{let R=_(A);const L=P?P.map(_):[];l&&h&&L.push(N=>{const z=tv($({},N,{defaultTheme:n,themeId:e}));if(!z.components||!z.components[l]||!z.components[l].styleOverrides)return null;const D=z.components[l].styleOverrides,B={};return Object.entries(D).forEach(([G,X])=>{B[G]=ky(X,$({},N,{theme:z}))}),h(N,B)}),l&&!v&&L.push(N=>{var z;const D=tv($({},N,{defaultTheme:n,themeId:e})),B=D==null||(z=D.components)==null||(z=z[l])==null?void 0:z.variants;return ky({variants:B},$({},N,{theme:D}))}),x||L.push(o);const k=L.length-P.length;if(Array.isArray(A)&&k>0){const N=new Array(k).fill("");R=[...A,...N],R.raw=[...A.raw,...N]}const C=b(R,...L);return s.muiName&&(C.muiName=s.muiName),C};return b.withConfig&&(S.withConfig=b.withConfig),S}}const kz=KX();function ym(t,e){const n=$({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=$({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=t[r]||{},o=e[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=$({},o),Object.keys(i).forEach(s=>{n[r][s]=ym(i[s],o[s])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function Lz(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:ym(e.components[n].defaultProps,r)}function Oz({props:t,name:e,defaultTheme:n,themeId:r}){let i=Pb(n);return r&&(i=i[r]||i),Lz({theme:i,name:e,props:t})}const Oo=typeof window<"u"?T.useLayoutEffect:T.useEffect;function ZX(t,e,n,r,i){const[o,s]=T.useState(()=>i&&n?n(t).matches:r?r(t).matches:e);return Oo(()=>{let a=!0;if(!n)return;const l=n(t),c=()=>{a&&s(l.matches)};return c(),l.addListener(c),()=>{a=!1,l.removeListener(c)}},[t,n]),o}const Dz=T.useSyncExternalStore;function JX(t,e,n,r,i){const o=T.useCallback(()=>e,[e]),s=T.useMemo(()=>{if(i&&n)return()=>n(t).matches;if(r!==null){const{matches:u}=r(t);return()=>u}return o},[o,t,r,i,n]),[a,l]=T.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const u=n(t);return[()=>u.matches,f=>(u.addListener(f),()=>{u.removeListener(f)})]},[o,n,t]);return Dz(l,a,s)}function Fz(t,e={}){const n=lR(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=Lz({name:"MuiUseMediaQuery",props:e,theme:n});let l=typeof t=="function"?t(n):t;return l=l.replace(/^@media( ?)/m,""),(Dz!==void 0?JX:ZX)(l,i,o,s,a)}function zz(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const QX=Object.freeze(Object.defineProperty({__proto__:null,default:zz},Symbol.toStringTag,{value:"Module"}));function Uz(t,e=0,n=1){return zz(t,e,n)}function eq(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function fR(t){if(t.type)return t;if(t.charAt(0)==="#")return fR(eq(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Na(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(Na(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function Bz(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function VS(t,e){if(t=fR(t),e=Uz(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return Bz(t)}function $S(t,e){if(t=fR(t),e=Uz(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return Bz(t)}function IN(...t){return t.reduce((e,n)=>n==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function jb(t,e=166){let n;function r(...i){const o=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(o,e)}return r.clear=()=>{clearTimeout(n)},r}function Ly(t,e){var n,r;return T.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(r=t.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Fi(t){return t&&t.ownerDocument||document}function ka(t){return Fi(t).defaultView||window}function B2(t,e){typeof t=="function"?t(e):t&&(t.current=e)}let NN=0;function tq(t){const[e,n]=T.useState(t),r=t||e;return T.useEffect(()=>{e==null&&(NN+=1,n(`mui-${NN}`))},[e]),r}const kN=Yp.useId;function jz(t){if(kN!==void 0){const e=kN();return t??e}return tq(t)}function j2({controlled:t,default:e,name:n,state:r="value"}){const{current:i}=T.useRef(t!==void 0),[o,s]=T.useState(e),a=i?t:o,l=T.useCallback(c=>{i||s(c)},[]);return[a,l]}function ba(t){const e=T.useRef(t);return Oo(()=>{e.current=t}),T.useRef((...n)=>(0,e.current)(...n)).current}function Er(...t){return T.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{B2(n,e)})},t)}const LN={};function nq(t,e){const n=T.useRef(LN);return n.current===LN&&(n.current=t(e)),n}const rq=[];function iq(t){T.useEffect(t,rq)}class Vb{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Vb}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function Vz(){const t=nq(Vb.create).current;return iq(t.disposeEffect),t}let $b=!0,V2=!1;const oq=new Vb,sq={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function aq(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&sq[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function lq(t){t.metaKey||t.altKey||t.ctrlKey||($b=!0)}function WS(){$b=!1}function cq(){this.visibilityState==="hidden"&&V2&&($b=!0)}function uq(t){t.addEventListener("keydown",lq,!0),t.addEventListener("mousedown",WS,!0),t.addEventListener("pointerdown",WS,!0),t.addEventListener("touchstart",WS,!0),t.addEventListener("visibilitychange",cq,!0)}function fq(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return $b||aq(e)}function $z(){const t=T.useCallback(i=>{i!=null&&uq(i.ownerDocument)},[]),e=T.useRef(!1);function n(){return e.current?(V2=!0,oq.start(100,()=>{V2=!1}),e.current=!1,!0):!1}function r(i){return fq(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function Wz(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}let Qu;function Hz(){if(Qu)return Qu;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),Qu="reverse",t.scrollLeft>0?Qu="default":(t.scrollLeft=1,t.scrollLeft===0&&(Qu="negative")),document.body.removeChild(t),Qu}function dq(t,e){const n=t.scrollLeft;if(e!=="rtl")return n;switch(Hz()){case"negative":return t.scrollWidth-t.clientWidth+n;case"reverse":return t.scrollWidth-t.clientWidth-n;default:return n}}function Rt(t,e,n=void 0){const r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((o,s)=>{if(s){const a=e(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}function Sd(t){return typeof t=="string"}function hq(t,e,n){return t===void 0||Sd(t)?e:$({},e,{ownerState:$({},e.ownerState,n)})}function Gz(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function ON(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function pq(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=t;if(!e){const m=lt(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),v=$({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),x=$({},n,i,r);return m.length>0&&(x.className=m),Object.keys(v).length>0&&(x.style=v),{props:x,internalRef:void 0}}const s=Gz($({},i,r)),a=ON(r),l=ON(i),c=e(s),u=lt(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=$({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=$({},c,n,l,a);return u.length>0&&(h.className=u),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function mq(t,e,n){return typeof t=="function"?t(e,n):t}const gq=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function $s(t){var e;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=t,s=et(t,gq),a=o?{}:mq(r,i),{props:l,internalRef:c}=pq($({},s,{externalSlotProps:a})),u=Er(c,a==null?void 0:a.ref,(e=t.additionalProps)==null?void 0:e.ref);return hq(n,$({},l,{ref:u}),i)}const Xz=T.createContext(null);function qz(){return T.useContext(Xz)}const vq=typeof Symbol=="function"&&Symbol.for,yq=vq?Symbol.for("mui.nested"):"__THEME_NESTED__";function xq(t,e){return typeof e=="function"?e(t):$({},t,e)}function bq(t){const{children:e,theme:n}=t,r=qz(),i=T.useMemo(()=>{const o=r===null?n:xq(r,n);return o!=null&&(o[yq]=r!==null),o},[n,r]);return E.jsx(Xz.Provider,{value:i,children:e})}const _q=["value"],Yz=T.createContext();function wq(t){let{value:e}=t,n=et(t,_q);return E.jsx(Yz.Provider,$({value:e??!0},n))}const dR=()=>{const t=T.useContext(Yz);return t??!1},Kz=T.createContext(void 0);function Sq({value:t,children:e}){return E.jsx(Kz.Provider,{value:t,children:e})}function Mq(t){const{theme:e,name:n,props:r}=t;if(!e||!e.components||!e.components[n])return r;const i=e.components[n];return i.defaultProps?ym(i.defaultProps,r):!i.styleOverrides&&!i.variants?ym(i,r):r}function Eq({props:t,name:e}){const n=T.useContext(Kz);return Mq({props:t,name:e,theme:{components:n}})}const DN={};function FN(t,e,n,r=!1){return T.useMemo(()=>{const i=t&&e[t]||e;if(typeof n=="function"){const o=n(i),s=t?$({},e,{[t]:o}):o;return r?()=>s:s}return t?$({},e,{[t]:n}):$({},e,n)},[t,e,n,r])}function Cq(t){const{children:e,theme:n,themeId:r}=t,i=lR(DN),o=qz()||DN,s=FN(r,i,n),a=FN(r,o,n,!0),l=s.direction==="rtl";return E.jsx(bq,{theme:a,children:E.jsx(ig.Provider,{value:s,children:E.jsx(wq,{value:l,children:E.jsx(Sq,{value:s==null?void 0:s.components,children:e})})})})}const Tq=["className","component","disableGutters","fixed","maxWidth","classes"],Rq=Xd(),Aq=kz("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`maxWidth${xt(String(n.maxWidth))}`],n.fixed&&e.fixed,n.disableGutters&&e.disableGutters]}}),Pq=t=>Oz({props:t,name:"MuiContainer",defaultTheme:Rq}),Iq=(t,e)=>{const n=l=>Tt(e,l),{classes:r,fixed:i,disableGutters:o,maxWidth:s}=t,a={root:["root",s&&`maxWidth${xt(String(s))}`,i&&"fixed",o&&"disableGutters"]};return Rt(a,n,r)};function Nq(t={}){const{createStyledComponent:e=Aq,useThemeProps:n=Pq,componentName:r="MuiContainer"}=t,i=e(({theme:s,ownerState:a})=>$({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!a.disableGutters&&{paddingLeft:s.spacing(2),paddingRight:s.spacing(2),[s.breakpoints.up("sm")]:{paddingLeft:s.spacing(3),paddingRight:s.spacing(3)}}),({theme:s,ownerState:a})=>a.fixed&&Object.keys(s.breakpoints.values).reduce((l,c)=>{const u=c,f=s.breakpoints.values[u];return f!==0&&(l[s.breakpoints.up(u)]={maxWidth:`${f}${s.breakpoints.unit}`}),l},{}),({theme:s,ownerState:a})=>$({},a.maxWidth==="xs"&&{[s.breakpoints.up("xs")]:{maxWidth:Math.max(s.breakpoints.values.xs,444)}},a.maxWidth&&a.maxWidth!=="xs"&&{[s.breakpoints.up(a.maxWidth)]:{maxWidth:`${s.breakpoints.values[a.maxWidth]}${s.breakpoints.unit}`}}));return T.forwardRef(function(a,l){const c=n(a),{className:u,component:f="div",disableGutters:h=!1,fixed:m=!1,maxWidth:v="lg"}=c,x=et(c,Tq),y=$({},c,{component:f,disableGutters:h,fixed:m,maxWidth:v}),g=Iq(y,r);return E.jsx(i,$({as:f,ownerState:y,className:lt(g.root,u),ref:l},x))})}const kq=["component","direction","spacing","divider","children","className","useFlexGap"],Lq=Xd(),Oq=kz("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Dq(t){return Oz({props:t,name:"MuiStack",defaultTheme:Lq})}function Fq(t,e){const n=T.Children.toArray(t).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],Uq=({ownerState:t,theme:e})=>{let n=$({display:"flex",flexDirection:"column"},Bi({theme:e},$c({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=sR(e),i=Object.keys(e.breakpoints.values).reduce((l,c)=>((typeof t.spacing=="object"&&t.spacing[c]!=null||typeof t.direction=="object"&&t.direction[c]!=null)&&(l[c]=!0),l),{}),o=$c({values:t.direction,base:i}),s=$c({values:t.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((l,c,u)=>{if(!o[l]){const h=c>0?o[u[c-1]]:"column";o[l]=h}}),n=fi(n,Bi({theme:e},s,(l,c)=>t.useFlexGap?{gap:lu(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${zq(c?o[c]:t.direction)}`]:lu(r,l)}}))}return n=FG(e.breakpoints,n),n};function Bq(t={}){const{createStyledComponent:e=Oq,useThemeProps:n=Dq,componentName:r="MuiStack"}=t,i=()=>Rt({root:["root"]},l=>Tt(r,l),{}),o=e(Uq);return T.forwardRef(function(l,c){const u=n(l),f=ag(u),{component:h="div",direction:m="column",spacing:v=0,divider:x,children:y,className:g,useFlexGap:b=!1}=f,_=et(f,kq),S={direction:m,spacing:v,useFlexGap:b},A=i();return E.jsx(o,$({as:h,ownerState:S,ref:c,className:lt(A.root,g)},_,{children:x?Fq(y,x):y}))})}function jq(t,e){return $({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}var Zn={},Zz={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(Zz);var Jz=Zz.exports;const Vq=qs(bH),$q=qs(QX);var Qz=Jz;Object.defineProperty(Zn,"__esModule",{value:!0});var Pn=Zn.alpha=o6;Zn.blend=eY;Zn.colorChannel=void 0;var e6=Zn.darken=pR;Zn.decomposeColor=Do;Zn.emphasize=s6;var Wq=Zn.getContrastRatio=Yq;Zn.getLuminance=_1;Zn.hexToRgb=n6;Zn.hslToRgb=i6;var t6=Zn.lighten=mR;Zn.private_safeAlpha=Kq;Zn.private_safeColorChannel=void 0;Zn.private_safeDarken=Zq;Zn.private_safeEmphasize=Qq;Zn.private_safeLighten=Jq;Zn.recomposeColor=qd;Zn.rgbToHex=qq;var zN=Qz(Vq),Hq=Qz($q);function hR(t,e=0,n=1){return(0,Hq.default)(t,e,n)}function n6(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Gq(t){const e=t.toString(16);return e.length===1?`0${e}`:e}function Do(t){if(t.type)return t;if(t.charAt(0)==="#")return Do(n6(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,zN.default)(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,zN.default)(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const r6=t=>{const e=Do(t);return e.values.slice(0,3).map((n,r)=>e.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Zn.colorChannel=r6;const Xq=(t,e)=>{try{return r6(t)}catch{return t}};Zn.private_safeColorChannel=Xq;function qd(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function qq(t){if(t.indexOf("#")===0)return t;const{values:e}=Do(t);return`#${e.map((n,r)=>Gq(r===3?Math.round(255*n):n)).join("")}`}function i6(t){t=Do(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),s=(c,u=(c+n/30)%12)=>i-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),qd({type:a,values:l})}function _1(t){t=Do(t);let e=t.type==="hsl"||t.type==="hsla"?Do(i6(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function Yq(t,e){const n=_1(t),r=_1(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function o6(t,e){return t=Do(t),e=hR(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,qd(t)}function Kq(t,e,n){try{return o6(t,e)}catch{return t}}function pR(t,e){if(t=Do(t),e=hR(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return qd(t)}function Zq(t,e,n){try{return pR(t,e)}catch{return t}}function mR(t,e){if(t=Do(t),e=hR(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return qd(t)}function Jq(t,e,n){try{return mR(t,e)}catch{return t}}function s6(t,e=.15){return _1(t)>.5?pR(t,e):mR(t,e)}function Qq(t,e,n){try{return s6(t,e)}catch{return t}}function eY(t,e,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),o=Do(t),s=Do(e),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return qd({type:"rgb",values:a})}const tY=["mode","contrastThreshold","tonalOffset"],UN={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:pm.white,default:pm.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},HS={text:{primary:pm.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:pm.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function BN(t,e,n,r){const i=r.light||r,o=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=t6(t.main,i):e==="dark"&&(t.dark=e6(t.main,o)))}function nY(t="light"){return t==="dark"?{main:Ku[200],light:Ku[50],dark:Ku[400]}:{main:Ku[700],light:Ku[400],dark:Ku[800]}}function rY(t="light"){return t==="dark"?{main:Yu[200],light:Yu[50],dark:Yu[400]}:{main:Yu[500],light:Yu[300],dark:Yu[700]}}function iY(t="light"){return t==="dark"?{main:qu[500],light:qu[300],dark:qu[700]}:{main:qu[700],light:qu[400],dark:qu[800]}}function oY(t="light"){return t==="dark"?{main:Zu[400],light:Zu[300],dark:Zu[700]}:{main:Zu[700],light:Zu[500],dark:Zu[900]}}function sY(t="light"){return t==="dark"?{main:Ju[400],light:Ju[300],dark:Ju[700]}:{main:Ju[800],light:Ju[500],dark:Ju[900]}}function aY(t="light"){return t==="dark"?{main:Uh[400],light:Uh[300],dark:Uh[700]}:{main:"#ed6c02",light:Uh[500],dark:Uh[900]}}function lY(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=et(t,tY),o=t.primary||nY(e),s=t.secondary||rY(e),a=t.error||iY(e),l=t.info||oY(e),c=t.success||sY(e),u=t.warning||aY(e);function f(x){return Wq(x,HS.text.primary)>=n?HS.text.primary:UN.text.primary}const h=({color:x,name:y,mainShade:g=500,lightShade:b=300,darkShade:_=700})=>{if(x=$({},x),!x.main&&x[g]&&(x.main=x[g]),!x.hasOwnProperty("main"))throw new Error(Na(11,y?` (${y})`:"",g));if(typeof x.main!="string")throw new Error(Na(12,y?` (${y})`:"",JSON.stringify(x.main)));return BN(x,"light",b,r),BN(x,"dark",_,r),x.contrastText||(x.contrastText=f(x.main)),x},m={dark:HS,light:UN};return fi($({common:$({},pm),mode:e,primary:h({color:o,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:xH,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},m[e]),i)}const cY=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function uY(t){return Math.round(t*1e5)/1e5}const jN={textTransform:"uppercase"},VN='"Roboto", "Helvetica", "Arial", sans-serif';function fY(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=VN,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:f}=n,h=et(n,cY),m=i/14,v=f||(g=>`${g/c*m}rem`),x=(g,b,_,S,A)=>$({fontFamily:r,fontWeight:g,fontSize:v(b),lineHeight:_},r===VN?{letterSpacing:`${uY(S/b)}em`}:{},A,u),y={h1:x(o,96,1.167,-1.5),h2:x(o,60,1.2,-.5),h3:x(s,48,1.167,0),h4:x(s,34,1.235,.25),h5:x(s,24,1.334,0),h6:x(a,20,1.6,.15),subtitle1:x(s,16,1.75,.15),subtitle2:x(a,14,1.57,.1),body1:x(s,16,1.5,.15),body2:x(s,14,1.43,.15),button:x(a,14,1.75,.4,jN),caption:x(s,12,1.66,.4),overline:x(s,12,2.66,1,jN),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return fi($({htmlFontSize:c,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},y),h,{clone:!1})}const dY=.2,hY=.14,pY=.12;function Rn(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${dY})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${hY})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${pY})`].join(",")}const mY=["none",Rn(0,2,1,-1,0,1,1,0,0,1,3,0),Rn(0,3,1,-2,0,2,2,0,0,1,5,0),Rn(0,3,3,-2,0,3,4,0,0,1,8,0),Rn(0,2,4,-1,0,4,5,0,0,1,10,0),Rn(0,3,5,-1,0,5,8,0,0,1,14,0),Rn(0,3,5,-1,0,6,10,0,0,1,18,0),Rn(0,4,5,-2,0,7,10,1,0,2,16,1),Rn(0,5,5,-3,0,8,10,1,0,3,14,2),Rn(0,5,6,-3,0,9,12,1,0,3,16,2),Rn(0,6,6,-3,0,10,14,1,0,4,18,3),Rn(0,6,7,-4,0,11,15,1,0,4,20,3),Rn(0,7,8,-4,0,12,17,2,0,5,22,4),Rn(0,7,8,-4,0,13,19,2,0,5,24,4),Rn(0,7,9,-4,0,14,21,2,0,5,26,4),Rn(0,8,9,-5,0,15,22,2,0,6,28,5),Rn(0,8,10,-5,0,16,24,2,0,6,30,5),Rn(0,8,11,-5,0,17,26,2,0,6,32,5),Rn(0,9,11,-5,0,18,28,2,0,7,34,6),Rn(0,9,12,-6,0,19,29,2,0,7,36,6),Rn(0,10,13,-6,0,20,31,3,0,8,38,7),Rn(0,10,13,-6,0,21,33,3,0,8,40,7),Rn(0,10,14,-6,0,22,35,3,0,8,42,7),Rn(0,11,14,-7,0,23,36,3,0,9,44,8),Rn(0,11,15,-7,0,24,38,3,0,9,46,8)],gY=["duration","easing","delay"],vY={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},yY={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function $N(t){return`${Math.round(t)}ms`}function xY(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function bY(t){const e=$({},vY,t.easing),n=$({},yY,t.duration);return $({getAutoHeightDuration:xY,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=e.easeInOut,delay:l=0}=o;return et(o,gY),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:$N(s)} ${a} ${typeof l=="string"?l:$N(l)}`).join(",")}},t,{easing:e,duration:n})}const _Y={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},wY=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function gR(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=t,s=et(t,wY);if(t.vars)throw new Error(Na(18));const a=lY(r),l=Xd(t);let c=fi(l,{mixins:jq(l.breakpoints,n),palette:a,shadows:mY.slice(),typography:fY(a,o),transitions:bY(i),zIndex:$({},_Y)});return c=fi(c,s),c=e.reduce((u,f)=>fi(u,f),c),c.unstable_sxConfig=$({},sg,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(f){return Gd({sx:f,theme:this})},c}const vR=gR();function xu(){const t=Pb(vR);return t[bd]||t}var lg={},GS={exports:{}},WN;function SY(){return WN||(WN=1,function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(n){for(var r=1;r96}function Oy(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const jY=lg.systemDefaultTheme=(0,kY.default)(),VY=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function nv({defaultTheme:t,theme:e,themeId:n}){return UY(e)?t:e[n]||e}function $Y(t){return t?(e,n)=>n[t]:null}function Dy(t,e){let{ownerState:n}=e,r=(0,$2.default)(e,OY);const i=typeof t=="function"?t((0,Mo.default)({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(o=>Dy(o,(0,Mo.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=(0,$2.default)(i,DY);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,Mo.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,Mo.default)({ownerState:n},r,n)):l.style))}),a}return i}function WY(t={}){const{themeId:e,defaultTheme:n=jY,rootShouldForwardProp:r=Oy,slotShouldForwardProp:i=Oy}=t,o=s=>(0,LY.default)((0,Mo.default)({},s,{theme:nv((0,Mo.default)({},s,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,GN.internal_processStyles)(s,A=>A.filter(P=>!(P!=null&&P.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=$Y(VY(c))}=a,m=(0,$2.default)(a,FY),v=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let y,g=Oy;c==="Root"||c==="root"?g=r:c?g=i:BY(s)&&(g=void 0);const b=(0,GN.default)(s,(0,Mo.default)({shouldForwardProp:g,label:y},m)),_=A=>typeof A=="function"&&A.__emotion_real!==A||(0,NY.isPlainObject)(A)?P=>Dy(A,(0,Mo.default)({},P,{theme:nv({theme:P.theme,defaultTheme:n,themeId:e})})):A,S=(A,...P)=>{let R=_(A);const L=P?P.map(_):[];l&&h&&L.push(N=>{const z=nv((0,Mo.default)({},N,{defaultTheme:n,themeId:e}));if(!z.components||!z.components[l]||!z.components[l].styleOverrides)return null;const D=z.components[l].styleOverrides,B={};return Object.entries(D).forEach(([G,X])=>{B[G]=Dy(X,(0,Mo.default)({},N,{theme:z}))}),h(N,B)}),l&&!v&&L.push(N=>{var z;const D=nv((0,Mo.default)({},N,{defaultTheme:n,themeId:e})),B=D==null||(z=D.components)==null||(z=z[l])==null?void 0:z.variants;return Dy({variants:B},(0,Mo.default)({},N,{theme:D}))}),x||L.push(o);const k=L.length-P.length;if(Array.isArray(A)&&k>0){const N=new Array(k).fill("");R=[...A,...N],R.raw=[...A.raw,...N]}const C=b(R,...L);return s.muiName&&(C.muiName=s.muiName),C};return b.withConfig&&(S.withConfig=b.withConfig),S}}function l6(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const mi=t=>l6(t)&&t!=="classes",Ge=IY({themeId:bd,defaultTheme:vR,rootShouldForwardProp:mi}),HY=["theme"];function GY(t){let{theme:e}=t,n=et(t,HY);const r=e[bd];return E.jsx(Cq,$({},n,{themeId:r?bd:void 0,theme:r||e}))}const XN=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)};function At(t){return Eq(t)}function XY(t){return Tt("MuiSvgIcon",t)}Ct("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const qY=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],YY=t=>{const{color:e,fontSize:n,classes:r}=t,i={root:["root",e!=="inherit"&&`color${xt(e)}`,`fontSize${xt(n)}`]};return Rt(i,XY,r)},KY=Ge("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${xt(n.color)}`],e[`fontSize${xt(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,r,i,o,s,a,l,c,u,f,h,m,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=t.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=t.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((a=t.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=t.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[e.fontSize],color:(f=(h=(t.vars||t).palette)==null||(h=h[e.color])==null?void 0:h.main)!=null?f:{action:(m=(t.vars||t).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(v=(t.vars||t).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[e.color]}}),w1=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:h="0 0 24 24"}=r,m=et(r,qY),v=T.isValidElement(i)&&i.type==="svg",x=$({},r,{color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:v}),y={};u||(y.viewBox=h);const g=YY(x);return E.jsxs(KY,$({as:a,className:lt(g.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},y,m,v&&i.props,{ownerState:x,children:[v?i.props.children:i,f?E.jsx("title",{children:f}):null]}))});w1.muiName="SvgIcon";function Kd(t,e){function n(r,i){return E.jsx(w1,$({"data-testid":`${e}Icon`,ref:i},r,{children:t}))}return n.muiName=w1.muiName,T.memo(T.forwardRef(n))}function W2(t,e){return W2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},W2(t,e)}function yR(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,W2(t,e)}const qN={disabled:!1},S1=St.createContext(null);var ZY=function(e){return e.scrollTop},mp="unmounted",_c="exited",wc="entering",Cf="entered",H2="exiting",Ys=function(t){yR(e,t);function e(r,i){var o;o=t.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=_c,o.appearStatus=wc):l=Cf:r.unmountOnExit||r.mountOnEnter?l=mp:l=_c,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===mp?{status:_c}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==wc&&s!==Cf&&(o=wc):(s===wc||s===Cf)&&(o=H2)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===wc){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:pp.findDOMNode(this);s&&ZY(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===_c&&this.setState({status:mp})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[pp.findDOMNode(this),a],c=l[0],u=l[1],f=this.getTimeouts(),h=a?f.appear:f.enter;if(!i&&!s||qN.disabled){this.safeSetState({status:Cf},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:wc},function(){o.props.onEntering(c,u),o.onTransitionEnd(h,function(){o.safeSetState({status:Cf},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:pp.findDOMNode(this);if(!o||qN.disabled){this.safeSetState({status:_c},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:H2},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:_c},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:pp.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===mp)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=et(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return St.createElement(S1.Provider,{value:null},typeof s=="function"?s(i,a):St.cloneElement(St.Children.only(s),a))},e}(St.Component);Ys.contextType=S1;Ys.propTypes={};function ef(){}Ys.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ef,onEntering:ef,onEntered:ef,onExit:ef,onExiting:ef,onExited:ef};Ys.UNMOUNTED=mp;Ys.EXITED=_c;Ys.ENTERING=wc;Ys.ENTERED=Cf;Ys.EXITING=H2;function JY(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xR(t,e){var n=function(o){return e&&T.isValidElement(o)?e(o):o},r=Object.create(null);return t&&T.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function QY(t,e){t=t||{},e=e||{};function n(u){return u in e?e[u]:t[u]}var r=Object.create(null),i=[];for(var o in t)o in e?i.length&&(r[o]=i,i=[]):i.push(o);var s,a={};for(var l in e){if(r[l])for(s=0;st.scrollTop;function M1(t,e){var n,r;const{timeout:i,easing:o,style:s={}}=t;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[e.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[e.mode]:o,delay:s.transitionDelay}}function iK(t){return Tt("MuiPaper",t)}Ct("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const oK=["className","component","elevation","square","variant"],sK=t=>{const{square:e,elevation:n,variant:r,classes:i}=t,o={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Rt(o,iK,i)},aK=Ge("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return $({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&$({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Pn("#fff",XN(e.elevation))}, ${Pn("#fff",XN(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),bu=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,c=et(r,oK),u=$({},r,{component:o,elevation:s,square:a,variant:l}),f=sK(u);return E.jsx(aK,$({as:o,ownerState:u,className:lt(f.root,i),ref:n},c))});function lK(t){const{className:e,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:a,onExited:l,timeout:c}=t,[u,f]=T.useState(!1),h=lt(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=lt(n.child,u&&n.childLeaving,r&&n.childPulsate);return!a&&!u&&f(!0),T.useEffect(()=>{if(!a&&l!=null){const x=setTimeout(l,c);return()=>{clearTimeout(x)}}},[l,a,c]),E.jsx("span",{className:h,style:m,children:E.jsx("span",{className:v})})}const Co=Ct("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),cK=["center","classes","className"];let Wb=t=>t,YN,KN,ZN,JN;const G2=550,uK=80,fK=Mb(YN||(YN=Wb` + */var cR=Symbol.for("react.element"),uR=Symbol.for("react.portal"),kb=Symbol.for("react.fragment"),Lb=Symbol.for("react.strict_mode"),Ob=Symbol.for("react.profiler"),Db=Symbol.for("react.provider"),Fb=Symbol.for("react.context"),FX=Symbol.for("react.server_context"),zb=Symbol.for("react.forward_ref"),Ub=Symbol.for("react.suspense"),Bb=Symbol.for("react.suspense_list"),jb=Symbol.for("react.memo"),Vb=Symbol.for("react.lazy"),zX=Symbol.for("react.offscreen"),Pz;Pz=Symbol.for("react.module.reference");function zo(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case cR:switch(t=t.type,t){case kb:case Ob:case Lb:case Ub:case Bb:return t;default:switch(t=t&&t.$$typeof,t){case FX:case Fb:case zb:case Vb:case jb:case Db:return t;default:return e}}case uR:return e}}}gn.ContextConsumer=Fb;gn.ContextProvider=Db;gn.Element=cR;gn.ForwardRef=zb;gn.Fragment=kb;gn.Lazy=Vb;gn.Memo=jb;gn.Portal=uR;gn.Profiler=Ob;gn.StrictMode=Lb;gn.Suspense=Ub;gn.SuspenseList=Bb;gn.isAsyncMode=function(){return!1};gn.isConcurrentMode=function(){return!1};gn.isContextConsumer=function(t){return zo(t)===Fb};gn.isContextProvider=function(t){return zo(t)===Db};gn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===cR};gn.isForwardRef=function(t){return zo(t)===zb};gn.isFragment=function(t){return zo(t)===kb};gn.isLazy=function(t){return zo(t)===Vb};gn.isMemo=function(t){return zo(t)===jb};gn.isPortal=function(t){return zo(t)===uR};gn.isProfiler=function(t){return zo(t)===Ob};gn.isStrictMode=function(t){return zo(t)===Lb};gn.isSuspense=function(t){return zo(t)===Ub};gn.isSuspenseList=function(t){return zo(t)===Bb};gn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===kb||t===Ob||t===Lb||t===Ub||t===Bb||t===zX||typeof t=="object"&&t!==null&&(t.$$typeof===Vb||t.$$typeof===jb||t.$$typeof===Db||t.$$typeof===Fb||t.$$typeof===zb||t.$$typeof===Pz||t.getModuleId!==void 0)};gn.typeOf=zo;Az.exports=gn;var B2=Az.exports;const UX=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Iz(t){const e=`${t}`.match(UX);return e&&e[1]||""}function Nz(t,e=""){return t.displayName||t.name||Iz(t)||e}function PN(t,e,n){const r=Nz(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function BX(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return Nz(t,"Component");if(typeof t=="object")switch(t.$$typeof){case B2.ForwardRef:return PN(t,t.render,"ForwardRef");case B2.Memo:return PN(t,t.type,"memo");default:return}}}const jX=Object.freeze(Object.defineProperty({__proto__:null,default:BX,getFunctionName:Iz},Symbol.toStringTag,{value:"Module"})),VX=["ownerState"],$X=["variants"],WX=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function HX(t){return Object.keys(t).length===0}function GX(t){return typeof t=="string"&&t.charCodeAt(0)>96}function $S(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const XX=Xd(),qX=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function tv({defaultTheme:t,theme:e,themeId:n}){return HX(e)?t:e[n]||e}function YX(t){return t?(e,n)=>n[t]:null}function Ly(t,e){let{ownerState:n}=e,r=et(e,VX);const i=typeof t=="function"?t($({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(o=>Ly(o,$({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=et(i,$X);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props($({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style($({ownerState:n},r,n)):l.style))}),a}return i}function KX(t={}){const{themeId:e,defaultTheme:n=XX,rootShouldForwardProp:r=$S,slotShouldForwardProp:i=$S}=t,o=s=>Gd($({},s,{theme:tv($({},s,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(s,a={})=>{xz(s,A=>A.filter(P=>!(P!=null&&P.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=YX(qX(c))}=a,m=et(a,WX),v=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let y,g=$S;c==="Root"||c==="root"?g=r:c?g=i:GX(s)&&(g=void 0);const b=nR(s,$({shouldForwardProp:g,label:y},m)),_=A=>typeof A=="function"&&A.__emotion_real!==A||ga(A)?P=>Ly(A,$({},P,{theme:tv({theme:P.theme,defaultTheme:n,themeId:e})})):A,S=(A,...P)=>{let R=_(A);const L=P?P.map(_):[];l&&h&&L.push(N=>{const z=tv($({},N,{defaultTheme:n,themeId:e}));if(!z.components||!z.components[l]||!z.components[l].styleOverrides)return null;const D=z.components[l].styleOverrides,B={};return Object.entries(D).forEach(([G,X])=>{B[G]=Ly(X,$({},N,{theme:z}))}),h(N,B)}),l&&!v&&L.push(N=>{var z;const D=tv($({},N,{defaultTheme:n,themeId:e})),B=D==null||(z=D.components)==null||(z=z[l])==null?void 0:z.variants;return Ly({variants:B},$({},N,{theme:D}))}),x||L.push(o);const k=L.length-P.length;if(Array.isArray(A)&&k>0){const N=new Array(k).fill("");R=[...A,...N],R.raw=[...A.raw,...N]}const C=b(R,...L);return s.muiName&&(C.muiName=s.muiName),C};return b.withConfig&&(S.withConfig=b.withConfig),S}}const kz=KX();function ym(t,e){const n=$({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=$({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=t[r]||{},o=e[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=$({},o),Object.keys(i).forEach(s=>{n[r][s]=ym(i[s],o[s])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function Lz(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:ym(e.components[n].defaultProps,r)}function Oz({props:t,name:e,defaultTheme:n,themeId:r}){let i=Nb(n);return r&&(i=i[r]||i),Lz({theme:i,name:e,props:t})}const Oo=typeof window<"u"?T.useLayoutEffect:T.useEffect;function ZX(t,e,n,r,i){const[o,s]=T.useState(()=>i&&n?n(t).matches:r?r(t).matches:e);return Oo(()=>{let a=!0;if(!n)return;const l=n(t),c=()=>{a&&s(l.matches)};return c(),l.addListener(c),()=>{a=!1,l.removeListener(c)}},[t,n]),o}const Dz=T.useSyncExternalStore;function JX(t,e,n,r,i){const o=T.useCallback(()=>e,[e]),s=T.useMemo(()=>{if(i&&n)return()=>n(t).matches;if(r!==null){const{matches:u}=r(t);return()=>u}return o},[o,t,r,i,n]),[a,l]=T.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const u=n(t);return[()=>u.matches,f=>(u.addListener(f),()=>{u.removeListener(f)})]},[o,n,t]);return Dz(l,a,s)}function Fz(t,e={}){const n=lR(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=Lz({name:"MuiUseMediaQuery",props:e,theme:n});let l=typeof t=="function"?t(n):t;return l=l.replace(/^@media( ?)/m,""),(Dz!==void 0?JX:ZX)(l,i,o,s,a)}function zz(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const QX=Object.freeze(Object.defineProperty({__proto__:null,default:zz},Symbol.toStringTag,{value:"Module"}));function Uz(t,e=0,n=1){return zz(t,e,n)}function eq(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function fR(t){if(t.type)return t;if(t.charAt(0)==="#")return fR(eq(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(ka(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(ka(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function Bz(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function WS(t,e){if(t=fR(t),e=Uz(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return Bz(t)}function HS(t,e){if(t=fR(t),e=Uz(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return Bz(t)}function IN(...t){return t.reduce((e,n)=>n==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function $b(t,e=166){let n;function r(...i){const o=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(o,e)}return r.clear=()=>{clearTimeout(n)},r}function Oy(t,e){var n,r;return T.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(r=t.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Fi(t){return t&&t.ownerDocument||document}function La(t){return Fi(t).defaultView||window}function j2(t,e){typeof t=="function"?t(e):t&&(t.current=e)}let NN=0;function tq(t){const[e,n]=T.useState(t),r=t||e;return T.useEffect(()=>{e==null&&(NN+=1,n(`mui-${NN}`))},[e]),r}const kN=Yp.useId;function jz(t){if(kN!==void 0){const e=kN();return t??e}return tq(t)}function V2({controlled:t,default:e,name:n,state:r="value"}){const{current:i}=T.useRef(t!==void 0),[o,s]=T.useState(e),a=i?t:o,l=T.useCallback(c=>{i||s(c)},[]);return[a,l]}function _a(t){const e=T.useRef(t);return Oo(()=>{e.current=t}),T.useRef((...n)=>(0,e.current)(...n)).current}function Er(...t){return T.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{j2(n,e)})},t)}const LN={};function nq(t,e){const n=T.useRef(LN);return n.current===LN&&(n.current=t(e)),n}const rq=[];function iq(t){T.useEffect(t,rq)}class Wb{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Wb}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function Vz(){const t=nq(Wb.create).current;return iq(t.disposeEffect),t}let Hb=!0,$2=!1;const oq=new Wb,sq={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function aq(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&sq[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function lq(t){t.metaKey||t.altKey||t.ctrlKey||(Hb=!0)}function GS(){Hb=!1}function cq(){this.visibilityState==="hidden"&&$2&&(Hb=!0)}function uq(t){t.addEventListener("keydown",lq,!0),t.addEventListener("mousedown",GS,!0),t.addEventListener("pointerdown",GS,!0),t.addEventListener("touchstart",GS,!0),t.addEventListener("visibilitychange",cq,!0)}function fq(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return Hb||aq(e)}function $z(){const t=T.useCallback(i=>{i!=null&&uq(i.ownerDocument)},[]),e=T.useRef(!1);function n(){return e.current?($2=!0,oq.start(100,()=>{$2=!1}),e.current=!1,!0):!1}function r(i){return fq(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function Wz(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}let Qu;function Hz(){if(Qu)return Qu;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),Qu="reverse",t.scrollLeft>0?Qu="default":(t.scrollLeft=1,t.scrollLeft===0&&(Qu="negative")),document.body.removeChild(t),Qu}function dq(t,e){const n=t.scrollLeft;if(e!=="rtl")return n;switch(Hz()){case"negative":return t.scrollWidth-t.clientWidth+n;case"reverse":return t.scrollWidth-t.clientWidth-n;default:return n}}function Rt(t,e,n=void 0){const r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((o,s)=>{if(s){const a=e(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}function Sd(t){return typeof t=="string"}function hq(t,e,n){return t===void 0||Sd(t)?e:$({},e,{ownerState:$({},e.ownerState,n)})}function Gz(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function ON(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function pq(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=t;if(!e){const m=lt(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),v=$({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),x=$({},n,i,r);return m.length>0&&(x.className=m),Object.keys(v).length>0&&(x.style=v),{props:x,internalRef:void 0}}const s=Gz($({},i,r)),a=ON(r),l=ON(i),c=e(s),u=lt(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=$({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=$({},c,n,l,a);return u.length>0&&(h.className=u),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function mq(t,e,n){return typeof t=="function"?t(e,n):t}const gq=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Ws(t){var e;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=t,s=et(t,gq),a=o?{}:mq(r,i),{props:l,internalRef:c}=pq($({},s,{externalSlotProps:a})),u=Er(c,a==null?void 0:a.ref,(e=t.additionalProps)==null?void 0:e.ref);return hq(n,$({},l,{ref:u}),i)}const Xz=T.createContext(null);function qz(){return T.useContext(Xz)}const vq=typeof Symbol=="function"&&Symbol.for,yq=vq?Symbol.for("mui.nested"):"__THEME_NESTED__";function xq(t,e){return typeof e=="function"?e(t):$({},t,e)}function bq(t){const{children:e,theme:n}=t,r=qz(),i=T.useMemo(()=>{const o=r===null?n:xq(r,n);return o!=null&&(o[yq]=r!==null),o},[n,r]);return E.jsx(Xz.Provider,{value:i,children:e})}const _q=["value"],Yz=T.createContext();function wq(t){let{value:e}=t,n=et(t,_q);return E.jsx(Yz.Provider,$({value:e??!0},n))}const dR=()=>{const t=T.useContext(Yz);return t??!1},Kz=T.createContext(void 0);function Sq({value:t,children:e}){return E.jsx(Kz.Provider,{value:t,children:e})}function Mq(t){const{theme:e,name:n,props:r}=t;if(!e||!e.components||!e.components[n])return r;const i=e.components[n];return i.defaultProps?ym(i.defaultProps,r):!i.styleOverrides&&!i.variants?ym(i,r):r}function Eq({props:t,name:e}){const n=T.useContext(Kz);return Mq({props:t,name:e,theme:{components:n}})}const DN={};function FN(t,e,n,r=!1){return T.useMemo(()=>{const i=t&&e[t]||e;if(typeof n=="function"){const o=n(i),s=t?$({},e,{[t]:o}):o;return r?()=>s:s}return t?$({},e,{[t]:n}):$({},e,n)},[t,e,n,r])}function Cq(t){const{children:e,theme:n,themeId:r}=t,i=lR(DN),o=qz()||DN,s=FN(r,i,n),a=FN(r,o,n,!0),l=s.direction==="rtl";return E.jsx(bq,{theme:a,children:E.jsx(ig.Provider,{value:s,children:E.jsx(wq,{value:l,children:E.jsx(Sq,{value:s==null?void 0:s.components,children:e})})})})}const Tq=["className","component","disableGutters","fixed","maxWidth","classes"],Rq=Xd(),Aq=kz("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`maxWidth${xt(String(n.maxWidth))}`],n.fixed&&e.fixed,n.disableGutters&&e.disableGutters]}}),Pq=t=>Oz({props:t,name:"MuiContainer",defaultTheme:Rq}),Iq=(t,e)=>{const n=l=>Tt(e,l),{classes:r,fixed:i,disableGutters:o,maxWidth:s}=t,a={root:["root",s&&`maxWidth${xt(String(s))}`,i&&"fixed",o&&"disableGutters"]};return Rt(a,n,r)};function Nq(t={}){const{createStyledComponent:e=Aq,useThemeProps:n=Pq,componentName:r="MuiContainer"}=t,i=e(({theme:s,ownerState:a})=>$({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!a.disableGutters&&{paddingLeft:s.spacing(2),paddingRight:s.spacing(2),[s.breakpoints.up("sm")]:{paddingLeft:s.spacing(3),paddingRight:s.spacing(3)}}),({theme:s,ownerState:a})=>a.fixed&&Object.keys(s.breakpoints.values).reduce((l,c)=>{const u=c,f=s.breakpoints.values[u];return f!==0&&(l[s.breakpoints.up(u)]={maxWidth:`${f}${s.breakpoints.unit}`}),l},{}),({theme:s,ownerState:a})=>$({},a.maxWidth==="xs"&&{[s.breakpoints.up("xs")]:{maxWidth:Math.max(s.breakpoints.values.xs,444)}},a.maxWidth&&a.maxWidth!=="xs"&&{[s.breakpoints.up(a.maxWidth)]:{maxWidth:`${s.breakpoints.values[a.maxWidth]}${s.breakpoints.unit}`}}));return T.forwardRef(function(a,l){const c=n(a),{className:u,component:f="div",disableGutters:h=!1,fixed:m=!1,maxWidth:v="lg"}=c,x=et(c,Tq),y=$({},c,{component:f,disableGutters:h,fixed:m,maxWidth:v}),g=Iq(y,r);return E.jsx(i,$({as:f,ownerState:y,className:lt(g.root,u),ref:l},x))})}const kq=["component","direction","spacing","divider","children","className","useFlexGap"],Lq=Xd(),Oq=kz("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Dq(t){return Oz({props:t,name:"MuiStack",defaultTheme:Lq})}function Fq(t,e){const n=T.Children.toArray(t).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],Uq=({ownerState:t,theme:e})=>{let n=$({display:"flex",flexDirection:"column"},Bi({theme:e},$c({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=sR(e),i=Object.keys(e.breakpoints.values).reduce((l,c)=>((typeof t.spacing=="object"&&t.spacing[c]!=null||typeof t.direction=="object"&&t.direction[c]!=null)&&(l[c]=!0),l),{}),o=$c({values:t.direction,base:i}),s=$c({values:t.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((l,c,u)=>{if(!o[l]){const h=c>0?o[u[c-1]]:"column";o[l]=h}}),n=di(n,Bi({theme:e},s,(l,c)=>t.useFlexGap?{gap:lu(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${zq(c?o[c]:t.direction)}`]:lu(r,l)}}))}return n=FG(e.breakpoints,n),n};function Bq(t={}){const{createStyledComponent:e=Oq,useThemeProps:n=Dq,componentName:r="MuiStack"}=t,i=()=>Rt({root:["root"]},l=>Tt(r,l),{}),o=e(Uq);return T.forwardRef(function(l,c){const u=n(l),f=ag(u),{component:h="div",direction:m="column",spacing:v=0,divider:x,children:y,className:g,useFlexGap:b=!1}=f,_=et(f,kq),S={direction:m,spacing:v,useFlexGap:b},A=i();return E.jsx(o,$({as:h,ownerState:S,ref:c,className:lt(A.root,g)},_,{children:x?Fq(y,x):y}))})}function jq(t,e){return $({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}var Zn={},Zz={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(Zz);var Jz=Zz.exports;const Vq=Ys(bH),$q=Ys(QX);var Qz=Jz;Object.defineProperty(Zn,"__esModule",{value:!0});var Pn=Zn.alpha=o6;Zn.blend=eY;Zn.colorChannel=void 0;var e6=Zn.darken=pR;Zn.decomposeColor=Do;Zn.emphasize=s6;var Wq=Zn.getContrastRatio=Yq;Zn.getLuminance=w1;Zn.hexToRgb=n6;Zn.hslToRgb=i6;var t6=Zn.lighten=mR;Zn.private_safeAlpha=Kq;Zn.private_safeColorChannel=void 0;Zn.private_safeDarken=Zq;Zn.private_safeEmphasize=Qq;Zn.private_safeLighten=Jq;Zn.recomposeColor=qd;Zn.rgbToHex=qq;var zN=Qz(Vq),Hq=Qz($q);function hR(t,e=0,n=1){return(0,Hq.default)(t,e,n)}function n6(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Gq(t){const e=t.toString(16);return e.length===1?`0${e}`:e}function Do(t){if(t.type)return t;if(t.charAt(0)==="#")return Do(n6(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,zN.default)(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,zN.default)(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const r6=t=>{const e=Do(t);return e.values.slice(0,3).map((n,r)=>e.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};Zn.colorChannel=r6;const Xq=(t,e)=>{try{return r6(t)}catch{return t}};Zn.private_safeColorChannel=Xq;function qd(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function qq(t){if(t.indexOf("#")===0)return t;const{values:e}=Do(t);return`#${e.map((n,r)=>Gq(r===3?Math.round(255*n):n)).join("")}`}function i6(t){t=Do(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),s=(c,u=(c+n/30)%12)=>i-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),qd({type:a,values:l})}function w1(t){t=Do(t);let e=t.type==="hsl"||t.type==="hsla"?Do(i6(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function Yq(t,e){const n=w1(t),r=w1(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function o6(t,e){return t=Do(t),e=hR(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,qd(t)}function Kq(t,e,n){try{return o6(t,e)}catch{return t}}function pR(t,e){if(t=Do(t),e=hR(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return qd(t)}function Zq(t,e,n){try{return pR(t,e)}catch{return t}}function mR(t,e){if(t=Do(t),e=hR(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return qd(t)}function Jq(t,e,n){try{return mR(t,e)}catch{return t}}function s6(t,e=.15){return w1(t)>.5?pR(t,e):mR(t,e)}function Qq(t,e,n){try{return s6(t,e)}catch{return t}}function eY(t,e,n,r=1){const i=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),o=Do(t),s=Do(e),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return qd({type:"rgb",values:a})}const tY=["mode","contrastThreshold","tonalOffset"],UN={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:pm.white,default:pm.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},XS={text:{primary:pm.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:pm.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function BN(t,e,n,r){const i=r.light||r,o=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=t6(t.main,i):e==="dark"&&(t.dark=e6(t.main,o)))}function nY(t="light"){return t==="dark"?{main:Ku[200],light:Ku[50],dark:Ku[400]}:{main:Ku[700],light:Ku[400],dark:Ku[800]}}function rY(t="light"){return t==="dark"?{main:Yu[200],light:Yu[50],dark:Yu[400]}:{main:Yu[500],light:Yu[300],dark:Yu[700]}}function iY(t="light"){return t==="dark"?{main:qu[500],light:qu[300],dark:qu[700]}:{main:qu[700],light:qu[400],dark:qu[800]}}function oY(t="light"){return t==="dark"?{main:Zu[400],light:Zu[300],dark:Zu[700]}:{main:Zu[700],light:Zu[500],dark:Zu[900]}}function sY(t="light"){return t==="dark"?{main:Ju[400],light:Ju[300],dark:Ju[700]}:{main:Ju[800],light:Ju[500],dark:Ju[900]}}function aY(t="light"){return t==="dark"?{main:Uh[400],light:Uh[300],dark:Uh[700]}:{main:"#ed6c02",light:Uh[500],dark:Uh[900]}}function lY(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=et(t,tY),o=t.primary||nY(e),s=t.secondary||rY(e),a=t.error||iY(e),l=t.info||oY(e),c=t.success||sY(e),u=t.warning||aY(e);function f(x){return Wq(x,XS.text.primary)>=n?XS.text.primary:UN.text.primary}const h=({color:x,name:y,mainShade:g=500,lightShade:b=300,darkShade:_=700})=>{if(x=$({},x),!x.main&&x[g]&&(x.main=x[g]),!x.hasOwnProperty("main"))throw new Error(ka(11,y?` (${y})`:"",g));if(typeof x.main!="string")throw new Error(ka(12,y?` (${y})`:"",JSON.stringify(x.main)));return BN(x,"light",b,r),BN(x,"dark",_,r),x.contrastText||(x.contrastText=f(x.main)),x},m={dark:XS,light:UN};return di($({common:$({},pm),mode:e,primary:h({color:o,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:xH,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},m[e]),i)}const cY=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function uY(t){return Math.round(t*1e5)/1e5}const jN={textTransform:"uppercase"},VN='"Roboto", "Helvetica", "Arial", sans-serif';function fY(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=VN,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:f}=n,h=et(n,cY),m=i/14,v=f||(g=>`${g/c*m}rem`),x=(g,b,_,S,A)=>$({fontFamily:r,fontWeight:g,fontSize:v(b),lineHeight:_},r===VN?{letterSpacing:`${uY(S/b)}em`}:{},A,u),y={h1:x(o,96,1.167,-1.5),h2:x(o,60,1.2,-.5),h3:x(s,48,1.167,0),h4:x(s,34,1.235,.25),h5:x(s,24,1.334,0),h6:x(a,20,1.6,.15),subtitle1:x(s,16,1.75,.15),subtitle2:x(a,14,1.57,.1),body1:x(s,16,1.5,.15),body2:x(s,14,1.43,.15),button:x(a,14,1.75,.4,jN),caption:x(s,12,1.66,.4),overline:x(s,12,2.66,1,jN),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return di($({htmlFontSize:c,pxToRem:v,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},y),h,{clone:!1})}const dY=.2,hY=.14,pY=.12;function Rn(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${dY})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${hY})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${pY})`].join(",")}const mY=["none",Rn(0,2,1,-1,0,1,1,0,0,1,3,0),Rn(0,3,1,-2,0,2,2,0,0,1,5,0),Rn(0,3,3,-2,0,3,4,0,0,1,8,0),Rn(0,2,4,-1,0,4,5,0,0,1,10,0),Rn(0,3,5,-1,0,5,8,0,0,1,14,0),Rn(0,3,5,-1,0,6,10,0,0,1,18,0),Rn(0,4,5,-2,0,7,10,1,0,2,16,1),Rn(0,5,5,-3,0,8,10,1,0,3,14,2),Rn(0,5,6,-3,0,9,12,1,0,3,16,2),Rn(0,6,6,-3,0,10,14,1,0,4,18,3),Rn(0,6,7,-4,0,11,15,1,0,4,20,3),Rn(0,7,8,-4,0,12,17,2,0,5,22,4),Rn(0,7,8,-4,0,13,19,2,0,5,24,4),Rn(0,7,9,-4,0,14,21,2,0,5,26,4),Rn(0,8,9,-5,0,15,22,2,0,6,28,5),Rn(0,8,10,-5,0,16,24,2,0,6,30,5),Rn(0,8,11,-5,0,17,26,2,0,6,32,5),Rn(0,9,11,-5,0,18,28,2,0,7,34,6),Rn(0,9,12,-6,0,19,29,2,0,7,36,6),Rn(0,10,13,-6,0,20,31,3,0,8,38,7),Rn(0,10,13,-6,0,21,33,3,0,8,40,7),Rn(0,10,14,-6,0,22,35,3,0,8,42,7),Rn(0,11,14,-7,0,23,36,3,0,9,44,8),Rn(0,11,15,-7,0,24,38,3,0,9,46,8)],gY=["duration","easing","delay"],vY={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},yY={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function $N(t){return`${Math.round(t)}ms`}function xY(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function bY(t){const e=$({},vY,t.easing),n=$({},yY,t.duration);return $({getAutoHeightDuration:xY,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=e.easeInOut,delay:l=0}=o;return et(o,gY),(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:$N(s)} ${a} ${typeof l=="string"?l:$N(l)}`).join(",")}},t,{easing:e,duration:n})}const _Y={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},wY=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function gR(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=t,s=et(t,wY);if(t.vars)throw new Error(ka(18));const a=lY(r),l=Xd(t);let c=di(l,{mixins:jq(l.breakpoints,n),palette:a,shadows:mY.slice(),typography:fY(a,o),transitions:bY(i),zIndex:$({},_Y)});return c=di(c,s),c=e.reduce((u,f)=>di(u,f),c),c.unstable_sxConfig=$({},sg,s==null?void 0:s.unstable_sxConfig),c.unstable_sx=function(f){return Gd({sx:f,theme:this})},c}const vR=gR();function xu(){const t=Nb(vR);return t[bd]||t}var lg={},qS={exports:{}},WN;function SY(){return WN||(WN=1,function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(n){for(var r=1;r96}function Dy(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const jY=lg.systemDefaultTheme=(0,kY.default)(),VY=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function nv({defaultTheme:t,theme:e,themeId:n}){return UY(e)?t:e[n]||e}function $Y(t){return t?(e,n)=>n[t]:null}function Fy(t,e){let{ownerState:n}=e,r=(0,W2.default)(e,OY);const i=typeof t=="function"?t((0,Mo.default)({ownerState:n},r)):t;if(Array.isArray(i))return i.flatMap(o=>Fy(o,(0,Mo.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=(0,W2.default)(i,DY);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props((0,Mo.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{(n==null?void 0:n[u])!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,Mo.default)({ownerState:n},r,n)):l.style))}),a}return i}function WY(t={}){const{themeId:e,defaultTheme:n=jY,rootShouldForwardProp:r=Dy,slotShouldForwardProp:i=Dy}=t,o=s=>(0,LY.default)((0,Mo.default)({},s,{theme:nv((0,Mo.default)({},s,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,GN.internal_processStyles)(s,A=>A.filter(P=>!(P!=null&&P.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:u,skipSx:f,overridesResolver:h=$Y(VY(c))}=a,m=(0,W2.default)(a,FY),v=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,x=f||!1;let y,g=Dy;c==="Root"||c==="root"?g=r:c?g=i:BY(s)&&(g=void 0);const b=(0,GN.default)(s,(0,Mo.default)({shouldForwardProp:g,label:y},m)),_=A=>typeof A=="function"&&A.__emotion_real!==A||(0,NY.isPlainObject)(A)?P=>Fy(A,(0,Mo.default)({},P,{theme:nv({theme:P.theme,defaultTheme:n,themeId:e})})):A,S=(A,...P)=>{let R=_(A);const L=P?P.map(_):[];l&&h&&L.push(N=>{const z=nv((0,Mo.default)({},N,{defaultTheme:n,themeId:e}));if(!z.components||!z.components[l]||!z.components[l].styleOverrides)return null;const D=z.components[l].styleOverrides,B={};return Object.entries(D).forEach(([G,X])=>{B[G]=Fy(X,(0,Mo.default)({},N,{theme:z}))}),h(N,B)}),l&&!v&&L.push(N=>{var z;const D=nv((0,Mo.default)({},N,{defaultTheme:n,themeId:e})),B=D==null||(z=D.components)==null||(z=z[l])==null?void 0:z.variants;return Fy({variants:B},(0,Mo.default)({},N,{theme:D}))}),x||L.push(o);const k=L.length-P.length;if(Array.isArray(A)&&k>0){const N=new Array(k).fill("");R=[...A,...N],R.raw=[...A.raw,...N]}const C=b(R,...L);return s.muiName&&(C.muiName=s.muiName),C};return b.withConfig&&(S.withConfig=b.withConfig),S}}function l6(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const gi=t=>l6(t)&&t!=="classes",Ge=IY({themeId:bd,defaultTheme:vR,rootShouldForwardProp:gi}),HY=["theme"];function GY(t){let{theme:e}=t,n=et(t,HY);const r=e[bd];return E.jsx(Cq,$({},n,{themeId:r?bd:void 0,theme:r||e}))}const XN=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)};function At(t){return Eq(t)}function XY(t){return Tt("MuiSvgIcon",t)}Ct("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const qY=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],YY=t=>{const{color:e,fontSize:n,classes:r}=t,i={root:["root",e!=="inherit"&&`color${xt(e)}`,`fontSize${xt(n)}`]};return Rt(i,XY,r)},KY=Ge("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${xt(n.color)}`],e[`fontSize${xt(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,r,i,o,s,a,l,c,u,f,h,m,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=t.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=t.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((a=t.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=t.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[e.fontSize],color:(f=(h=(t.vars||t).palette)==null||(h=h[e.color])==null?void 0:h.main)!=null?f:{action:(m=(t.vars||t).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(v=(t.vars||t).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[e.color]}}),S1=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:h="0 0 24 24"}=r,m=et(r,qY),v=T.isValidElement(i)&&i.type==="svg",x=$({},r,{color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:v}),y={};u||(y.viewBox=h);const g=YY(x);return E.jsxs(KY,$({as:a,className:lt(g.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},y,m,v&&i.props,{ownerState:x,children:[v?i.props.children:i,f?E.jsx("title",{children:f}):null]}))});S1.muiName="SvgIcon";function Kd(t,e){function n(r,i){return E.jsx(S1,$({"data-testid":`${e}Icon`,ref:i},r,{children:t}))}return n.muiName=S1.muiName,T.memo(T.forwardRef(n))}function H2(t,e){return H2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},H2(t,e)}function yR(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,H2(t,e)}const qN={disabled:!1},M1=St.createContext(null);var ZY=function(e){return e.scrollTop},mp="unmounted",_c="exited",wc="entering",Cf="entered",G2="exiting",Ks=function(t){yR(e,t);function e(r,i){var o;o=t.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=_c,o.appearStatus=wc):l=Cf:r.unmountOnExit||r.mountOnEnter?l=mp:l=_c,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===mp?{status:_c}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==wc&&s!==Cf&&(o=wc):(s===wc||s===Cf)&&(o=G2)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===wc){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:pp.findDOMNode(this);s&&ZY(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===_c&&this.setState({status:mp})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[pp.findDOMNode(this),a],c=l[0],u=l[1],f=this.getTimeouts(),h=a?f.appear:f.enter;if(!i&&!s||qN.disabled){this.safeSetState({status:Cf},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:wc},function(){o.props.onEntering(c,u),o.onTransitionEnd(h,function(){o.safeSetState({status:Cf},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:pp.findDOMNode(this);if(!o||qN.disabled){this.safeSetState({status:_c},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:G2},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:_c},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:pp.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===mp)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=et(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return St.createElement(M1.Provider,{value:null},typeof s=="function"?s(i,a):St.cloneElement(St.Children.only(s),a))},e}(St.Component);Ks.contextType=M1;Ks.propTypes={};function ef(){}Ks.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ef,onEntering:ef,onEntered:ef,onExit:ef,onExiting:ef,onExited:ef};Ks.UNMOUNTED=mp;Ks.EXITED=_c;Ks.ENTERING=wc;Ks.ENTERED=Cf;Ks.EXITING=G2;function JY(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xR(t,e){var n=function(o){return e&&T.isValidElement(o)?e(o):o},r=Object.create(null);return t&&T.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function QY(t,e){t=t||{},e=e||{};function n(u){return u in e?e[u]:t[u]}var r=Object.create(null),i=[];for(var o in t)o in e?i.length&&(r[o]=i,i=[]):i.push(o);var s,a={};for(var l in e){if(r[l])for(s=0;st.scrollTop;function E1(t,e){var n,r;const{timeout:i,easing:o,style:s={}}=t;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[e.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[e.mode]:o,delay:s.transitionDelay}}function iK(t){return Tt("MuiPaper",t)}Ct("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const oK=["className","component","elevation","square","variant"],sK=t=>{const{square:e,elevation:n,variant:r,classes:i}=t,o={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Rt(o,iK,i)},aK=Ge("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return $({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&$({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Pn("#fff",XN(e.elevation))}, ${Pn("#fff",XN(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),bu=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,c=et(r,oK),u=$({},r,{component:o,elevation:s,square:a,variant:l}),f=sK(u);return E.jsx(aK,$({as:o,ownerState:u,className:lt(f.root,i),ref:n},c))});function lK(t){const{className:e,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:a,onExited:l,timeout:c}=t,[u,f]=T.useState(!1),h=lt(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},v=lt(n.child,u&&n.childLeaving,r&&n.childPulsate);return!a&&!u&&f(!0),T.useEffect(()=>{if(!a&&l!=null){const x=setTimeout(l,c);return()=>{clearTimeout(x)}}},[l,a,c]),E.jsx("span",{className:h,style:m,children:E.jsx("span",{className:v})})}const Co=Ct("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),cK=["center","classes","className"];let Gb=t=>t,YN,KN,ZN,JN;const X2=550,uK=80,fK=Cb(YN||(YN=Gb` 0% { transform: scale(0); opacity: 0.1; @@ -67,7 +67,7 @@ Error generating stack: `+o.message+` transform: scale(1); opacity: 0.3; } -`)),dK=Mb(KN||(KN=Wb` +`)),dK=Cb(KN||(KN=Gb` 0% { opacity: 1; } @@ -75,7 +75,7 @@ Error generating stack: `+o.message+` 100% { opacity: 0; } -`)),hK=Mb(ZN||(ZN=Wb` +`)),hK=Cb(ZN||(ZN=Gb` 0% { transform: scale(1); } @@ -87,7 +87,7 @@ Error generating stack: `+o.message+` 100% { transform: scale(1); } -`)),pK=Ge("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),mK=Ge(lK,{name:"MuiTouchRipple",slot:"Ripple"})(JN||(JN=Wb` +`)),pK=Ge("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),mK=Ge(lK,{name:"MuiTouchRipple",slot:"Ripple"})(JN||(JN=Gb` opacity: 0; position: absolute; @@ -130,9 +130,9 @@ Error generating stack: `+o.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),Co.rippleVisible,fK,G2,({theme:t})=>t.transitions.easing.easeInOut,Co.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,Co.child,Co.childLeaving,dK,G2,({theme:t})=>t.transitions.easing.easeInOut,Co.childPulsate,hK,({theme:t})=>t.transitions.easing.easeInOut),gK=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=et(r,cK),[l,c]=T.useState([]),u=T.useRef(0),f=T.useRef(null);T.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const h=T.useRef(!1),m=Vz(),v=T.useRef(null),x=T.useRef(null),y=T.useCallback(S=>{const{pulsate:A,rippleX:P,rippleY:R,rippleSize:L,cb:k}=S;c(C=>[...C,E.jsx(mK,{classes:{ripple:lt(o.ripple,Co.ripple),rippleVisible:lt(o.rippleVisible,Co.rippleVisible),ripplePulsate:lt(o.ripplePulsate,Co.ripplePulsate),child:lt(o.child,Co.child),childLeaving:lt(o.childLeaving,Co.childLeaving),childPulsate:lt(o.childPulsate,Co.childPulsate)},timeout:G2,pulsate:A,rippleX:P,rippleY:R,rippleSize:L},u.current)]),u.current+=1,f.current=k},[o]),g=T.useCallback((S={},A={},P=()=>{})=>{const{pulsate:R=!1,center:L=i||A.pulsate,fakeElement:k=!1}=A;if((S==null?void 0:S.type)==="mousedown"&&h.current){h.current=!1;return}(S==null?void 0:S.type)==="touchstart"&&(h.current=!0);const C=k?null:x.current,N=C?C.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,D,B;if(L||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)z=Math.round(N.width/2),D=Math.round(N.height/2);else{const{clientX:G,clientY:X}=S.touches&&S.touches.length>0?S.touches[0]:S;z=Math.round(G-N.left),D=Math.round(X-N.top)}if(L)B=Math.sqrt((2*N.width**2+N.height**2)/3),B%2===0&&(B+=1);else{const G=Math.max(Math.abs((C?C.clientWidth:0)-z),z)*2+2,X=Math.max(Math.abs((C?C.clientHeight:0)-D),D)*2+2;B=Math.sqrt(G**2+X**2)}S!=null&&S.touches?v.current===null&&(v.current=()=>{y({pulsate:R,rippleX:z,rippleY:D,rippleSize:B,cb:P})},m.start(uK,()=>{v.current&&(v.current(),v.current=null)})):y({pulsate:R,rippleX:z,rippleY:D,rippleSize:B,cb:P})},[i,y,m]),b=T.useCallback(()=>{g({},{pulsate:!0})},[g]),_=T.useCallback((S,A)=>{if(m.clear(),(S==null?void 0:S.type)==="touchend"&&v.current){v.current(),v.current=null,m.start(0,()=>{_(S,A)});return}v.current=null,c(P=>P.length>0?P.slice(1):P),f.current=A},[m]);return T.useImperativeHandle(n,()=>({pulsate:b,start:g,stop:_}),[b,g,_]),E.jsx(pK,$({className:lt(Co.root,o.root,s),ref:x},a,{children:E.jsx(bR,{component:null,exit:!0,children:l})}))});function vK(t){return Tt("MuiButtonBase",t)}const yK=Ct("MuiButtonBase",["root","disabled","focusVisible"]),xK=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],bK=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:i}=t,s=Rt({root:["root",e&&"disabled",n&&"focusVisible"]},vK,i);return n&&r&&(s.root+=` ${r}`),s},_K=Ge("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${yK.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),_u=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:f=!1,focusRipple:h=!1,LinkComponent:m="a",onBlur:v,onClick:x,onContextMenu:y,onDragLeave:g,onFocus:b,onFocusVisible:_,onKeyDown:S,onKeyUp:A,onMouseDown:P,onMouseLeave:R,onMouseUp:L,onTouchEnd:k,onTouchMove:C,onTouchStart:N,tabIndex:z=0,TouchRippleProps:D,touchRippleRef:B,type:G}=r,X=et(r,xK),Z=T.useRef(null),F=T.useRef(null),q=Er(F,B),{isFocusVisibleRef:K,onFocus:Q,onBlur:de,ref:fe}=$z(),[J,ce]=T.useState(!1);c&&J&&ce(!1),T.useImperativeHandle(i,()=>({focusVisible:()=>{ce(!0),Z.current.focus()}}),[]);const[_e,be]=T.useState(!1);T.useEffect(()=>{be(!0)},[]);const Xe=_e&&!u&&!c;T.useEffect(()=>{J&&h&&!u&&_e&&F.current.pulsate()},[u,h,J,_e]);function $e(Ee,bt,ke=f){return ba(it=>(bt&&bt(it),!ke&&F.current&&F.current[Ee](it),!0))}const tt=$e("start",P),Ve=$e("stop",y),se=$e("stop",g),ae=$e("stop",L),W=$e("stop",Ee=>{J&&Ee.preventDefault(),R&&R(Ee)}),Ie=$e("start",N),Re=$e("stop",k),De=$e("stop",C),he=$e("stop",Ee=>{de(Ee),K.current===!1&&ce(!1),v&&v(Ee)},!1),qe=ba(Ee=>{Z.current||(Z.current=Ee.currentTarget),Q(Ee),K.current===!0&&(ce(!0),_&&_(Ee)),b&&b(Ee)}),Le=()=>{const Ee=Z.current;return l&&l!=="button"&&!(Ee.tagName==="A"&&Ee.href)},V=T.useRef(!1),U=ba(Ee=>{h&&!V.current&&J&&F.current&&Ee.key===" "&&(V.current=!0,F.current.stop(Ee,()=>{F.current.start(Ee)})),Ee.target===Ee.currentTarget&&Le()&&Ee.key===" "&&Ee.preventDefault(),S&&S(Ee),Ee.target===Ee.currentTarget&&Le()&&Ee.key==="Enter"&&!c&&(Ee.preventDefault(),x&&x(Ee))}),ne=ba(Ee=>{h&&Ee.key===" "&&F.current&&J&&!Ee.defaultPrevented&&(V.current=!1,F.current.stop(Ee,()=>{F.current.pulsate(Ee)})),A&&A(Ee),x&&Ee.target===Ee.currentTarget&&Le()&&Ee.key===" "&&!Ee.defaultPrevented&&x(Ee)});let le=l;le==="button"&&(X.href||X.to)&&(le=m);const Ce={};le==="button"?(Ce.type=G===void 0?"button":G,Ce.disabled=c):(!X.href&&!X.to&&(Ce.role="button"),c&&(Ce["aria-disabled"]=c));const ve=Er(n,fe,Z),He=$({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:f,focusRipple:h,tabIndex:z,focusVisible:J}),Ae=bK(He);return E.jsxs(_K,$({as:le,className:lt(Ae.root,a),ownerState:He,onBlur:he,onClick:x,onContextMenu:Ve,onFocus:qe,onKeyDown:U,onKeyUp:ne,onMouseDown:tt,onMouseLeave:W,onMouseUp:ae,onDragLeave:se,onTouchEnd:Re,onTouchMove:De,onTouchStart:Ie,ref:ve,tabIndex:c?-1:z,type:G},Ce,X,{children:[s,Xe?E.jsx(gK,$({ref:q,center:o},D)):null]}))});function wK(t){return Tt("MuiTypography",t)}Ct("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const SK=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],MK=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=t,a={root:["root",o,t.align!=="inherit"&&`align${xt(e)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Rt(a,wK,s)},EK=Ge("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${xt(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>$({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),QN={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},CK={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},TK=t=>CK[t]||t,ar=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTypography"}),i=TK(r.color),o=ag($({},r,{color:i})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:f=!1,variant:h="body1",variantMapping:m=QN}=o,v=et(o,SK),x=$({},o,{align:s,color:i,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:f,variant:h,variantMapping:m}),y=l||(f?"p":m[h]||QN[h])||"span",g=MK(x);return E.jsx(EK,$({as:y,ref:n,ownerState:x,className:lt(g.root,a)},v))});function RK(t){return Tt("MuiAppBar",t)}Ct("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const AK=["className","color","enableColorOnDark","position"],PK=t=>{const{color:e,position:n,classes:r}=t,i={root:["root",`color${xt(e)}`,`position${xt(n)}`]};return Rt(i,RK,r)},rv=(t,e)=>t?`${t==null?void 0:t.replace(")","")}, ${e})`:e,IK=Ge(bu,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${xt(n.position)}`],e[`color${xt(n.color)}`]]}})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[900];return $({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},e.position==="fixed"&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},e.position==="absolute"&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="sticky"&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="static"&&{position:"static"},e.position==="relative"&&{position:"relative"},!t.vars&&$({},e.color==="default"&&{backgroundColor:n,color:t.palette.getContrastText(n)},e.color&&e.color!=="default"&&e.color!=="inherit"&&e.color!=="transparent"&&{backgroundColor:t.palette[e.color].main,color:t.palette[e.color].contrastText},e.color==="inherit"&&{color:"inherit"},t.palette.mode==="dark"&&!e.enableColorOnDark&&{backgroundColor:null,color:null},e.color==="transparent"&&$({backgroundColor:"transparent",color:"inherit"},t.palette.mode==="dark"&&{backgroundImage:"none"})),t.vars&&$({},e.color==="default"&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette.AppBar.defaultBg:rv(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:rv(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},e.color&&!e.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette[e.color].main:rv(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:rv(t.vars.palette.AppBar.darkColor,t.vars.palette[e.color].contrastText)},!["inherit","transparent"].includes(e.color)&&{backgroundColor:"var(--AppBar-background)"},{color:e.color==="inherit"?"inherit":"var(--AppBar-color)"},e.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),NK=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,l=et(r,AK),c=$({},r,{color:o,position:a,enableColorOnDark:s}),u=PK(c);return E.jsx(IK,$({square:!0,component:"header",ownerState:c,elevation:4,className:lt(u.root,i,a==="fixed"&&"mui-fixed"),ref:n},l))});function kK(t){return typeof t=="function"?t():t}const LK=T.forwardRef(function(e,n){const{children:r,container:i,disablePortal:o=!1}=e,[s,a]=T.useState(null),l=Er(T.isValidElement(r)?r.ref:null,n);if(Oo(()=>{o||a(kK(i)||document.body)},[i,o]),Oo(()=>{if(s&&!o)return B2(n,s),()=>{B2(n,null)}},[n,s,o]),o){if(T.isValidElement(r)){const c={ref:l};return T.cloneElement(r,c)}return E.jsx(T.Fragment,{children:r})}return E.jsx(T.Fragment,{children:s&&Vl.createPortal(r,s)})}),OK=["onChange","maxRows","minRows","style","value"];function iv(t){return parseInt(t,10)||0}const DK={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function FK(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflowing}const zK=T.forwardRef(function(e,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=e,l=et(e,OK),{current:c}=T.useRef(a!=null),u=T.useRef(null),f=Er(n,u),h=T.useRef(null),m=T.useRef(null),v=T.useCallback(()=>{const g=u.current,_=ka(g).getComputedStyle(g);if(_.width==="0px")return{outerHeightStyle:0,overflowing:!1};const S=m.current;S.style.width=_.width,S.value=g.value||e.placeholder||"x",S.value.slice(-1)===` -`&&(S.value+=" ");const A=_.boxSizing,P=iv(_.paddingBottom)+iv(_.paddingTop),R=iv(_.borderBottomWidth)+iv(_.borderTopWidth),L=S.scrollHeight;S.value="x";const k=S.scrollHeight;let C=L;o&&(C=Math.max(Number(o)*k,C)),i&&(C=Math.min(Number(i)*k,C)),C=Math.max(C,k);const N=C+(A==="border-box"?P+R:0),z=Math.abs(C-L)<=1;return{outerHeightStyle:N,overflowing:z}},[i,o,e.placeholder]),x=T.useCallback(()=>{const g=v();if(FK(g))return;const b=g.outerHeightStyle,_=u.current;h.current!==b&&(h.current=b,_.style.height=`${b}px`),_.style.overflow=g.overflowing?"hidden":""},[v]);Oo(()=>{const g=()=>{x()};let b;const _=jb(g),S=u.current,A=ka(S);A.addEventListener("resize",_);let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(g),P.observe(S)),()=>{_.clear(),cancelAnimationFrame(b),A.removeEventListener("resize",_),P&&P.disconnect()}},[v,x]),Oo(()=>{x()});const y=g=>{c||x(),r&&r(g)};return E.jsxs(T.Fragment,{children:[E.jsx("textarea",$({value:a,onChange:y,ref:f,rows:o,style:s},l)),E.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:m,tabIndex:-1,style:$({},DK.shadow,s,{paddingTop:0,paddingBottom:0})})]})});function Zd({props:t,states:e,muiFormControl:n}){return e.reduce((r,i)=>(r[i]=t[i],n&&typeof t[i]>"u"&&(r[i]=n[i]),r),{})}const _R=T.createContext(void 0);function wu(){return T.useContext(_R)}function u6(t){return E.jsx(AX,$({},t,{defaultTheme:vR,themeId:bd}))}function e4(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function E1(t,e=!1){return t&&(e4(t.value)&&t.value!==""||e&&e4(t.defaultValue)&&t.defaultValue!=="")}function UK(t){return t.startAdornment}function BK(t){return Tt("MuiInputBase",t)}const Md=Ct("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),jK=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Hb=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${xt(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},Gb=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},VK=t=>{const{classes:e,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:f,size:h,startAdornment:m,type:v}=t,x={root:["root",`color${xt(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",h&&h!=="medium"&&`size${xt(h)}`,u&&"multiline",m&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",u&&"inputMultiline",h==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",o&&"inputAdornedEnd",f&&"readOnly"]};return Rt(x,BK,e)},Xb=Ge("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Hb})(({theme:t,ownerState:e})=>$({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Md.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&$({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),qb=Ge("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Gb})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=$({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},o=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return $({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Md.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Md.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}),$K=E.jsx(u6,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),wR=T.forwardRef(function(e,n){var r;const i=At({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:m,endAdornment:v,fullWidth:x=!1,id:y,inputComponent:g="input",inputProps:b={},inputRef:_,maxRows:S,minRows:A,multiline:P=!1,name:R,onBlur:L,onChange:k,onClick:C,onFocus:N,onKeyDown:z,onKeyUp:D,placeholder:B,readOnly:G,renderSuffix:X,rows:Z,slotProps:F={},slots:q={},startAdornment:K,type:Q="text",value:de}=i,fe=et(i,jK),J=b.value!=null?b.value:de,{current:ce}=T.useRef(J!=null),_e=T.useRef(),be=T.useCallback(Ae=>{},[]),Xe=Er(_e,_,b.ref,be),[$e,tt]=T.useState(!1),Ve=wu(),se=Zd({props:i,muiFormControl:Ve,states:["color","disabled","error","hiddenLabel","size","required","filled"]});se.focused=Ve?Ve.focused:$e,T.useEffect(()=>{!Ve&&h&&$e&&(tt(!1),L&&L())},[Ve,h,$e,L]);const ae=Ve&&Ve.onFilled,W=Ve&&Ve.onEmpty,Ie=T.useCallback(Ae=>{E1(Ae)?ae&&ae():W&&W()},[ae,W]);Oo(()=>{ce&&Ie({value:J})},[J,Ie,ce]);const Re=Ae=>{if(se.disabled){Ae.stopPropagation();return}N&&N(Ae),b.onFocus&&b.onFocus(Ae),Ve&&Ve.onFocus?Ve.onFocus(Ae):tt(!0)},De=Ae=>{L&&L(Ae),b.onBlur&&b.onBlur(Ae),Ve&&Ve.onBlur?Ve.onBlur(Ae):tt(!1)},he=(Ae,...Ee)=>{if(!ce){const bt=Ae.target||_e.current;if(bt==null)throw new Error(Na(1));Ie({value:bt.value})}b.onChange&&b.onChange(Ae,...Ee),k&&k(Ae,...Ee)};T.useEffect(()=>{Ie(_e.current)},[]);const qe=Ae=>{_e.current&&Ae.currentTarget===Ae.target&&_e.current.focus(),C&&C(Ae)};let Le=g,V=b;P&&Le==="input"&&(Z?V=$({type:void 0,minRows:Z,maxRows:Z},V):V=$({type:void 0,maxRows:S,minRows:A},V),Le=zK);const U=Ae=>{Ie(Ae.animationName==="mui-auto-fill-cancel"?_e.current:{value:"x"})};T.useEffect(()=>{Ve&&Ve.setAdornedStart(!!K)},[Ve,K]);const ne=$({},i,{color:se.color||"primary",disabled:se.disabled,endAdornment:v,error:se.error,focused:se.focused,formControl:Ve,fullWidth:x,hiddenLabel:se.hiddenLabel,multiline:P,size:se.size,startAdornment:K,type:Q}),le=VK(ne),Ce=q.root||c.Root||Xb,ve=F.root||u.root||{},He=q.input||c.Input||qb;return V=$({},V,(r=F.input)!=null?r:u.input),E.jsxs(T.Fragment,{children:[!m&&$K,E.jsxs(Ce,$({},ve,!Sd(Ce)&&{ownerState:$({},ne,ve.ownerState)},{ref:n,onClick:qe},fe,{className:lt(le.root,ve.className,l,G&&"MuiInputBase-readOnly"),children:[K,E.jsx(_R.Provider,{value:null,children:E.jsx(He,$({ownerState:ne,"aria-invalid":se.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:f,disabled:se.disabled,id:y,onAnimationStart:U,name:R,placeholder:B,readOnly:G,required:se.required,rows:Z,value:J,onKeyDown:z,onKeyUp:D,type:Q},V,!Sd(He)&&{as:Le,ownerState:$({},ne,V.ownerState)},{ref:Xe,className:lt(le.input,V.className,G&&"MuiInputBase-readOnly"),onBlur:De,onChange:he,onFocus:Re}))}),v,X?X($({},se,{startAdornment:K})):null]}))]})});function WK(t){return Tt("MuiInput",t)}const jh=$({},Md,Ct("MuiInput",["root","underline","input"]));function HK(t){return Tt("MuiOutlinedInput",t)}const tl=$({},Md,Ct("MuiOutlinedInput",["root","notchedOutline","input"]));function GK(t){return Tt("MuiFilledInput",t)}const oc=$({},Md,Ct("MuiFilledInput",["root","underline","input"])),XK=Kd(E.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),qK=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],YK={entering:{opacity:1},entered:{opacity:1}},KK=T.forwardRef(function(e,n){const r=xu(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:f,onEntering:h,onExit:m,onExited:v,onExiting:x,style:y,timeout:g=i,TransitionComponent:b=Ys}=e,_=et(e,qK),S=T.useRef(null),A=Er(S,a.ref,n),P=B=>G=>{if(B){const X=S.current;G===void 0?B(X):B(X,G)}},R=P(h),L=P((B,G)=>{c6(B);const X=M1({style:y,timeout:g,easing:l},{mode:"enter"});B.style.webkitTransition=r.transitions.create("opacity",X),B.style.transition=r.transitions.create("opacity",X),u&&u(B,G)}),k=P(f),C=P(x),N=P(B=>{const G=M1({style:y,timeout:g,easing:l},{mode:"exit"});B.style.webkitTransition=r.transitions.create("opacity",G),B.style.transition=r.transitions.create("opacity",G),m&&m(B)}),z=P(v),D=B=>{o&&o(S.current,B)};return E.jsx(b,$({appear:s,in:c,nodeRef:S,onEnter:L,onEntered:k,onEntering:R,onExit:N,onExited:z,onExiting:C,addEndListener:D,timeout:g},_,{children:(B,G)=>T.cloneElement(a,$({style:$({opacity:0,visibility:B==="exited"&&!c?"hidden":void 0},YK[B],y,a.props.style),ref:A},G))}))});function ZK(t){return Tt("MuiBackdrop",t)}Ct("MuiBackdrop",["root","invisible"]);const JK=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],QK=t=>{const{classes:e,invisible:n}=t;return Rt({root:["root",n&&"invisible"]},ZK,e)},eZ=Ge("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>$({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),tZ=T.forwardRef(function(e,n){var r,i,o;const s=At({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:f={},invisible:h=!1,open:m,slotProps:v={},slots:x={},TransitionComponent:y=KK,transitionDuration:g}=s,b=et(s,JK),_=$({},s,{component:c,invisible:h}),S=QK(_),A=(r=v.root)!=null?r:f.root;return E.jsx(y,$({in:m,timeout:g},b,{children:E.jsx(eZ,$({"aria-hidden":!0},A,{as:(i=(o=x.root)!=null?o:u.Root)!=null?i:c,className:lt(S.root,l,A==null?void 0:A.className),ownerState:$({},_,A==null?void 0:A.ownerState),classes:S,ref:n,children:a}))}))}),nZ=Ct("MuiBox",["root"]),rZ=gR(),Ws=OX({themeId:bd,defaultTheme:rZ,defaultClassName:nZ.root,generateClassName:Tz.generate});function iZ(t){return Tt("MuiButton",t)}const ov=Ct("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),oZ=T.createContext({}),sZ=T.createContext(void 0),aZ=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],lZ=t=>{const{color:e,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=t,a={root:["root",o,`${o}${xt(e)}`,`size${xt(i)}`,`${o}Size${xt(i)}`,`color${xt(e)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${xt(i)}`],endIcon:["icon","endIcon",`iconSize${xt(i)}`]},l=Rt(a,iZ,s);return $({},s,l)},f6=t=>$({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),cZ=Ge(_u,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${xt(n.color)}`],e[`size${xt(n.size)}`],e[`${n.variant}Size${xt(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var n,r;const i=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],o=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return $({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":$({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Pn(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Pn(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Pn(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":$({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${ov.focusVisible}`]:$({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${ov.disabled}`]:$({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${Pn(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(n=(r=t.palette).getContrastText)==null?void 0:n.call(r,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ov.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ov.disabled}`]:{boxShadow:"none"}}),uZ=Ge("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,e[`iconSize${xt(n.size)}`]]}})(({ownerState:t})=>$({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},f6(t))),fZ=Ge("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,e[`iconSize${xt(n.size)}`]]}})(({ownerState:t})=>$({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},f6(t))),cu=T.forwardRef(function(e,n){const r=T.useContext(oZ),i=T.useContext(sZ),o=ym(r,e),s=At({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:m=!1,endIcon:v,focusVisibleClassName:x,fullWidth:y=!1,size:g="medium",startIcon:b,type:_,variant:S="text"}=s,A=et(s,aZ),P=$({},s,{color:l,component:c,disabled:f,disableElevation:h,disableFocusRipple:m,fullWidth:y,size:g,type:_,variant:S}),R=lZ(P),L=b&&E.jsx(uZ,{className:R.startIcon,ownerState:P,children:b}),k=v&&E.jsx(fZ,{className:R.endIcon,ownerState:P,children:v}),C=i||"";return E.jsxs(cZ,$({ownerState:P,className:lt(r.className,R.root,u,C),component:c,disabled:f,focusRipple:!m,focusVisibleClassName:lt(R.focusVisible,x),ref:n,type:_},A,{classes:R,children:[L,a,k]}))});function dZ(t){return Tt("MuiCard",t)}Ct("MuiCard",["root"]);const hZ=["className","raised"],pZ=t=>{const{classes:e}=t;return Rt({root:["root"]},dZ,e)},mZ=Ge(bu,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"})),gZ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=et(r,hZ),a=$({},r,{raised:o}),l=pZ(a);return E.jsx(mZ,$({className:lt(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))});function vZ(t){return Tt("MuiCardActions",t)}Ct("MuiCardActions",["root","spacing"]);const yZ=["disableSpacing","className"],xZ=t=>{const{classes:e,disableSpacing:n}=t;return Rt({root:["root",!n&&"spacing"]},vZ,e)},bZ=Ge("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>$({display:"flex",alignItems:"center",padding:8},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),_Z=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiCardActions"}),{disableSpacing:i=!1,className:o}=r,s=et(r,yZ),a=$({},r,{disableSpacing:i}),l=xZ(a);return E.jsx(bZ,$({className:lt(l.root,o),ownerState:a,ref:n},s))});function wZ(t){return Tt("MuiCardContent",t)}Ct("MuiCardContent",["root"]);const SZ=["className","component"],MZ=t=>{const{classes:e}=t;return Rt({root:["root"]},wZ,e)},EZ=Ge("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),CZ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiCardContent"}),{className:i,component:o="div"}=r,s=et(r,SZ),a=$({},r,{component:o}),l=MZ(a);return E.jsx(EZ,$({as:o,className:lt(l.root,i),ownerState:a,ref:n},s))});function TZ(t){return Tt("PrivateSwitchBase",t)}Ct("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const RZ=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],AZ=t=>{const{classes:e,checked:n,disabled:r,edge:i}=t,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${xt(i)}`],input:["input"]};return Rt(o,TZ,e)},PZ=Ge(_u)(({ownerState:t})=>$({padding:9,borderRadius:"50%"},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12})),IZ=Ge("input",{shouldForwardProp:mi})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),NZ=T.forwardRef(function(e,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:f,id:h,inputProps:m,inputRef:v,name:x,onBlur:y,onChange:g,onFocus:b,readOnly:_,required:S=!1,tabIndex:A,type:P,value:R}=e,L=et(e,RZ),[k,C]=j2({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),N=wu(),z=q=>{b&&b(q),N&&N.onFocus&&N.onFocus(q)},D=q=>{y&&y(q),N&&N.onBlur&&N.onBlur(q)},B=q=>{if(q.nativeEvent.defaultPrevented)return;const K=q.target.checked;C(K),g&&g(q,K)};let G=l;N&&typeof G>"u"&&(G=N.disabled);const X=P==="checkbox"||P==="radio",Z=$({},e,{checked:k,disabled:G,disableFocusRipple:c,edge:u}),F=AZ(Z);return E.jsxs(PZ,$({component:"span",className:lt(F.root,s),centerRipple:!0,focusRipple:!c,disabled:G,tabIndex:null,role:void 0,onFocus:z,onBlur:D,ownerState:Z,ref:n},L,{children:[E.jsx(IZ,$({autoFocus:r,checked:i,defaultChecked:a,className:F.input,disabled:G,id:X?h:void 0,name:x,onChange:B,readOnly:_,ref:v,required:S,ownerState:Z,tabIndex:A,type:P},P==="checkbox"&&R===void 0?{}:{value:R},m)),k?o:f]}))}),kZ=Kd(E.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),LZ=Kd(E.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),OZ=Kd(E.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function DZ(t){return Tt("MuiCheckbox",t)}const qS=Ct("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),FZ=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],zZ=t=>{const{classes:e,indeterminate:n,color:r,size:i}=t,o={root:["root",n&&"indeterminate",`color${xt(r)}`,`size${xt(i)}`]},s=Rt(o,DZ,e);return $({},e,s)},UZ=Ge(NZ,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.indeterminate&&e.indeterminate,e[`size${xt(n.size)}`],n.color!=="default"&&e[`color${xt(n.color)}`]]}})(({theme:t,ownerState:e})=>$({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Pn(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${qS.checked}, &.${qS.indeterminate}`]:{color:(t.vars||t).palette[e.color].main},[`&.${qS.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),BZ=E.jsx(LZ,{}),jZ=E.jsx(kZ,{}),VZ=E.jsx(OZ,{}),$Z=T.forwardRef(function(e,n){var r,i;const o=At({props:e,name:"MuiCheckbox"}),{checkedIcon:s=BZ,color:a="primary",icon:l=jZ,indeterminate:c=!1,indeterminateIcon:u=VZ,inputProps:f,size:h="medium",className:m}=o,v=et(o,FZ),x=c?u:l,y=c?u:s,g=$({},o,{color:a,indeterminate:c,size:h}),b=zZ(g);return E.jsx(UZ,$({type:"checkbox",inputProps:$({"data-indeterminate":c},f),icon:T.cloneElement(x,{fontSize:(r=x.props.fontSize)!=null?r:h}),checkedIcon:T.cloneElement(y,{fontSize:(i=y.props.fontSize)!=null?i:h}),ownerState:g,ref:n,className:lt(b.root,m)},v,{classes:b}))}),WZ=Nq({createStyledComponent:Ge("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`maxWidth${xt(String(n.maxWidth))}`],n.fixed&&e.fixed,n.disableGutters&&e.disableGutters]}}),useThemeProps:t=>At({props:t,name:"MuiContainer"})}),HZ=(t,e)=>$({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),GZ=t=>$({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),XZ=(t,e=!1)=>{var n;const r={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([s,a])=>{var l;r[t.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let i=$({html:HZ(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:$({margin:0},GZ(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const o=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return o&&(i=[i,o]),i};function qZ(t){const e=At({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return E.jsxs(T.Fragment,{children:[E.jsx(u6,{styles:i=>XZ(i,r)}),n]})}function YZ(t){const e=Fi(t);return e.body===t?ka(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Ip(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function t4(t){return parseInt(ka(t).getComputedStyle(t).paddingRight,10)||0}function KZ(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function n4(t,e,n,r,i){const o=[e,n,...r];[].forEach.call(t.children,s=>{const a=o.indexOf(s)===-1,l=!KZ(s);a&&l&&Ip(s,i)})}function YS(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function ZZ(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(YZ(r)){const s=Wz(Fi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${t4(r)+s}px`;const a=Fi(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${t4(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Fi(r).body;else{const s=r.parentElement,a=ka(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function JZ(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class QZ{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Ip(e.modalRef,!1);const i=JZ(n);n4(n,e.mount,e.modalRef,i,!0);const o=YS(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=YS(this.containers,o=>o.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=ZZ(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=YS(this.containers,s=>s.modals.indexOf(e)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),e.modalRef&&Ip(e.modalRef,n),n4(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Ip(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const eJ=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function tJ(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function nJ(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function rJ(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||nJ(t))}function iJ(t){const e=[],n=[];return Array.from(t.querySelectorAll(eJ)).forEach((r,i)=>{const o=tJ(r);o===-1||!rJ(r)||(o===0?e.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function oJ(){return!0}function sJ(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=iJ,isEnabled:s=oJ,open:a}=t,l=T.useRef(!1),c=T.useRef(null),u=T.useRef(null),f=T.useRef(null),h=T.useRef(null),m=T.useRef(!1),v=T.useRef(null),x=Er(e.ref,v),y=T.useRef(null);T.useEffect(()=>{!a||!v.current||(m.current=!n)},[n,a]),T.useEffect(()=>{if(!a||!v.current)return;const _=Fi(v.current);return v.current.contains(_.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),m.current&&v.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[a]),T.useEffect(()=>{if(!a||!v.current)return;const _=Fi(v.current),S=R=>{y.current=R,!(r||!s()||R.key!=="Tab")&&_.activeElement===v.current&&R.shiftKey&&(l.current=!0,u.current&&u.current.focus())},A=()=>{const R=v.current;if(R===null)return;if(!_.hasFocus()||!s()||l.current){l.current=!1;return}if(R.contains(_.activeElement)||r&&_.activeElement!==c.current&&_.activeElement!==u.current)return;if(_.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!m.current)return;let L=[];if((_.activeElement===c.current||_.activeElement===u.current)&&(L=o(v.current)),L.length>0){var k,C;const N=!!((k=y.current)!=null&&k.shiftKey&&((C=y.current)==null?void 0:C.key)==="Tab"),z=L[0],D=L[L.length-1];typeof z!="string"&&typeof D!="string"&&(N?D.focus():z.focus())}else R.focus()};_.addEventListener("focusin",A),_.addEventListener("keydown",S,!0);const P=setInterval(()=>{_.activeElement&&_.activeElement.tagName==="BODY"&&A()},50);return()=>{clearInterval(P),_.removeEventListener("focusin",A),_.removeEventListener("keydown",S,!0)}},[n,r,i,s,a,o]);const g=_=>{f.current===null&&(f.current=_.relatedTarget),m.current=!0,h.current=_.target;const S=e.props.onFocus;S&&S(_)},b=_=>{f.current===null&&(f.current=_.relatedTarget),m.current=!0};return E.jsxs(T.Fragment,{children:[E.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),T.cloneElement(e,{ref:x,onFocus:g}),E.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:u,"data-testid":"sentinelEnd"})]})}function aJ(t){return typeof t=="function"?t():t}function lJ(t){return t?t.props.hasOwnProperty("in"):!1}const cJ=new QZ;function uJ(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=cJ,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:f}=t,h=T.useRef({}),m=T.useRef(null),v=T.useRef(null),x=Er(v,f),[y,g]=T.useState(!u),b=lJ(l);let _=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(_=!1);const S=()=>Fi(m.current),A=()=>(h.current.modalRef=v.current,h.current.mount=m.current,h.current),P=()=>{i.mount(A(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},R=ba(()=>{const X=aJ(e)||S().body;i.add(A(),X),v.current&&P()}),L=T.useCallback(()=>i.isTopModal(A()),[i]),k=ba(X=>{m.current=X,X&&(u&&L()?P():v.current&&Ip(v.current,_))}),C=T.useCallback(()=>{i.remove(A(),_)},[_,i]);T.useEffect(()=>()=>{C()},[C]),T.useEffect(()=>{u?R():(!b||!o)&&C()},[u,C,b,o,R]);const N=X=>Z=>{var F;(F=X.onKeyDown)==null||F.call(X,Z),!(Z.key!=="Escape"||Z.which===229||!L())&&(n||(Z.stopPropagation(),c&&c(Z,"escapeKeyDown")))},z=X=>Z=>{var F;(F=X.onClick)==null||F.call(X,Z),Z.target===Z.currentTarget&&c&&c(Z,"backdropClick")};return{getRootProps:(X={})=>{const Z=Gz(t);delete Z.onTransitionEnter,delete Z.onTransitionExited;const F=$({},Z,X);return $({role:"presentation"},F,{onKeyDown:N(F),ref:x})},getBackdropProps:(X={})=>{const Z=X;return $({"aria-hidden":!0},Z,{onClick:z(Z),open:u})},getTransitionProps:()=>{const X=()=>{g(!1),s&&s()},Z=()=>{g(!0),a&&a(),o&&C()};return{onEnter:IN(X,l==null?void 0:l.props.onEnter),onExited:IN(Z,l==null?void 0:l.props.onExited)}},rootRef:x,portalRef:k,isTopModal:L,exited:y,hasTransition:b}}function fJ(t){return Tt("MuiModal",t)}Ct("MuiModal",["root","hidden","backdrop"]);const dJ=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],hJ=t=>{const{open:e,exited:n,classes:r}=t;return Rt({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},fJ,r)},pJ=Ge("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>$({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),mJ=Ge(tZ,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),gJ=T.forwardRef(function(e,n){var r,i,o,s,a,l;const c=At({name:"MuiModal",props:e}),{BackdropComponent:u=mJ,BackdropProps:f,className:h,closeAfterTransition:m=!1,children:v,container:x,component:y,components:g={},componentsProps:b={},disableAutoFocus:_=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:A=!1,disablePortal:P=!1,disableRestoreFocus:R=!1,disableScrollLock:L=!1,hideBackdrop:k=!1,keepMounted:C=!1,onBackdropClick:N,open:z,slotProps:D,slots:B}=c,G=et(c,dJ),X=$({},c,{closeAfterTransition:m,disableAutoFocus:_,disableEnforceFocus:S,disableEscapeKeyDown:A,disablePortal:P,disableRestoreFocus:R,disableScrollLock:L,hideBackdrop:k,keepMounted:C}),{getRootProps:Z,getBackdropProps:F,getTransitionProps:q,portalRef:K,isTopModal:Q,exited:de,hasTransition:fe}=uJ($({},X,{rootRef:n})),J=$({},X,{exited:de}),ce=hJ(J),_e={};if(v.props.tabIndex===void 0&&(_e.tabIndex="-1"),fe){const{onEnter:ae,onExited:W}=q();_e.onEnter=ae,_e.onExited=W}const be=(r=(i=B==null?void 0:B.root)!=null?i:g.Root)!=null?r:pJ,Xe=(o=(s=B==null?void 0:B.backdrop)!=null?s:g.Backdrop)!=null?o:u,$e=(a=D==null?void 0:D.root)!=null?a:b.root,tt=(l=D==null?void 0:D.backdrop)!=null?l:b.backdrop,Ve=$s({elementType:be,externalSlotProps:$e,externalForwardedProps:G,getSlotProps:Z,additionalProps:{ref:n,as:y},ownerState:J,className:lt(h,$e==null?void 0:$e.className,ce==null?void 0:ce.root,!J.open&&J.exited&&(ce==null?void 0:ce.hidden))}),se=$s({elementType:Xe,externalSlotProps:tt,additionalProps:f,getSlotProps:ae=>F($({},ae,{onClick:W=>{N&&N(W),ae!=null&&ae.onClick&&ae.onClick(W)}})),className:lt(tt==null?void 0:tt.className,f==null?void 0:f.className,ce==null?void 0:ce.backdrop),ownerState:J});return!C&&!z&&(!fe||de)?null:E.jsx(LK,{ref:K,container:x,disablePortal:P,children:E.jsxs(be,$({},Ve,{children:[!k&&u?E.jsx(Xe,$({},se)):null,E.jsx(sJ,{disableEnforceFocus:S,disableAutoFocus:_,disableRestoreFocus:R,isEnabled:Q,open:z,children:T.cloneElement(v,_e)})]}))})}),r4=Ct("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),vJ=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],yJ=t=>{const{classes:e,disableUnderline:n}=t,i=Rt({root:["root",!n&&"underline"],input:["input"]},GK,e);return $({},e,i)},xJ=Ge(Xb,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Hb(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return $({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o}},[`&.${oc.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o},[`&.${oc.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${oc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${oc.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${oc.disabled}, .${oc.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${oc.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&$({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),bJ=Ge(qb,{name:"MuiFilledInput",slot:"Input",overridesResolver:Gb})(({theme:t,ownerState:e})=>$({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),SR=T.forwardRef(function(e,n){var r,i,o,s;const a=At({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:f="input",multiline:h=!1,slotProps:m,slots:v={},type:x="text"}=a,y=et(a,vJ),g=$({},a,{fullWidth:u,inputComponent:f,multiline:h,type:x}),b=yJ(a),_={root:{ownerState:g},input:{ownerState:g}},S=m??c?fi(_,m??c):_,A=(r=(i=v.root)!=null?i:l.Root)!=null?r:xJ,P=(o=(s=v.input)!=null?s:l.Input)!=null?o:bJ;return E.jsx(wR,$({slots:{root:A,input:P},componentsProps:S,fullWidth:u,inputComponent:f,multiline:h,ref:n,type:x},y,{classes:b}))});SR.muiName="Input";function _J(t){return Tt("MuiFormControl",t)}Ct("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const wJ=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],SJ=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${xt(n)}`,r&&"fullWidth"]};return Rt(i,_J,e)},MJ=Ge("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>$({},e.root,e[`margin${xt(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>$({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),d6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:f=!1,hiddenLabel:h=!1,margin:m="none",required:v=!1,size:x="medium",variant:y="outlined"}=r,g=et(r,wJ),b=$({},r,{color:s,component:a,disabled:l,error:c,fullWidth:f,hiddenLabel:h,margin:m,required:v,size:x,variant:y}),_=SJ(b),[S,A]=T.useState(()=>{let D=!1;return i&&T.Children.forEach(i,B=>{if(!Ly(B,["Input","Select"]))return;const G=Ly(B,["Select"])?B.props.input:B;G&&UK(G.props)&&(D=!0)}),D}),[P,R]=T.useState(()=>{let D=!1;return i&&T.Children.forEach(i,B=>{Ly(B,["Input","Select"])&&(E1(B.props,!0)||E1(B.props.inputProps,!0))&&(D=!0)}),D}),[L,k]=T.useState(!1);l&&L&&k(!1);const C=u!==void 0&&!l?u:L;let N;const z=T.useMemo(()=>({adornedStart:S,setAdornedStart:A,color:s,disabled:l,error:c,filled:P,focused:C,fullWidth:f,hiddenLabel:h,size:x,onBlur:()=>{k(!1)},onEmpty:()=>{R(!1)},onFilled:()=>{R(!0)},onFocus:()=>{k(!0)},registerEffect:N,required:v,variant:y}),[S,s,l,c,P,C,f,h,N,v,x,y]);return E.jsx(_R.Provider,{value:z,children:E.jsx(MJ,$({as:a,ownerState:b,className:lt(_.root,o),ref:n},g,{children:i}))})}),is=Bq({createStyledComponent:Ge("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>At({props:t,name:"MuiStack"})});function EJ(t){return Tt("MuiFormHelperText",t)}const i4=Ct("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var o4;const CJ=["children","className","component","disabled","error","filled","focused","margin","required","variant"],TJ=t=>{const{classes:e,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=t,c={root:["root",i&&"disabled",o&&"error",r&&`size${xt(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return Rt(c,EJ,e)},RJ=Ge("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${xt(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>$({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${i4.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${i4.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),AJ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=et(r,CJ),l=wu(),c=Zd({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=$({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=TJ(u);return E.jsx(RJ,$({as:s,ownerState:u,className:lt(f.root,o),ref:n},a,{children:i===" "?o4||(o4=E.jsx("span",{className:"notranslate",children:"​"})):i}))});function PJ(t){return Tt("MuiFormLabel",t)}const Np=Ct("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),IJ=["children","className","color","component","disabled","error","filled","focused","required"],NJ=t=>{const{classes:e,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=t,l={root:["root",`color${xt(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return Rt(l,PJ,e)},kJ=Ge("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>$({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>$({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Np.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Np.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Np.error}`]:{color:(t.vars||t).palette.error.main}})),LJ=Ge("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Np.error}`]:{color:(t.vars||t).palette.error.main}})),OJ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=et(r,IJ),l=wu(),c=Zd({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=$({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=NJ(u);return E.jsxs(kJ,$({as:s,ownerState:u,className:lt(f.root,o),ref:n},a,{children:[i,c.required&&E.jsxs(LJ,{ownerState:u,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))}),s4=T.createContext();function DJ(t){return Tt("MuiGrid",t)}const FJ=[0,1,2,3,4,5,6,7,8,9,10],zJ=["column-reverse","column","row-reverse","row"],UJ=["nowrap","wrap-reverse","wrap"],Vh=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],xm=Ct("MuiGrid",["root","container","item","zeroMinWidth",...FJ.map(t=>`spacing-xs-${t}`),...zJ.map(t=>`direction-xs-${t}`),...UJ.map(t=>`wrap-xs-${t}`),...Vh.map(t=>`grid-xs-${t}`),...Vh.map(t=>`grid-sm-${t}`),...Vh.map(t=>`grid-md-${t}`),...Vh.map(t=>`grid-lg-${t}`),...Vh.map(t=>`grid-xl-${t}`)]),BJ=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function ld(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function jJ({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,i)=>{let o={};if(e[i]&&(n=e[i]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=$c({values:e.columns,breakpoints:t.breakpoints.values}),a=typeof s=="object"?s[i]:s;if(a==null)return r;const l=`${Math.round(n/a*1e8)/1e6}%`;let c={};if(e.container&&e.item&&e.columnSpacing!==0){const u=t.spacing(e.columnSpacing);if(u!=="0px"){const f=`calc(${l} + ${ld(u)})`;c={flexBasis:f,maxWidth:f}}}o=$({flexBasis:l,flexGrow:0,maxWidth:l},c)}return t.breakpoints.values[i]===0?Object.assign(r,o):r[t.breakpoints.up(i)]=o,r},{})}function VJ({theme:t,ownerState:e}){const n=$c({values:e.direction,breakpoints:t.breakpoints.values});return Bi({theme:t},n,r=>{const i={flexDirection:r};return r.indexOf("column")===0&&(i[`& > .${xm.item}`]={maxWidth:"none"}),i})}function h6({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(i=>{n===""&&e[i]!==0&&(n=i)});const r=Object.keys(t).sort((i,o)=>t[i]-t[o]);return r.slice(0,r.indexOf(n))}function $J({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let i={};if(n&&r!==0){const o=$c({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=h6({breakpoints:t.breakpoints.values,values:o})),i=Bi({theme:t},o,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{marginTop:`-${ld(u)}`,[`& > .${xm.item}`]:{paddingTop:ld(u)}}:(c=s)!=null&&c.includes(l)?{}:{marginTop:0,[`& > .${xm.item}`]:{paddingTop:0}}})}return i}function WJ({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let i={};if(n&&r!==0){const o=$c({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=h6({breakpoints:t.breakpoints.values,values:o})),i=Bi({theme:t},o,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{width:`calc(100% + ${ld(u)})`,marginLeft:`-${ld(u)}`,[`& > .${xm.item}`]:{paddingLeft:ld(u)}}:(c=s)!=null&&c.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${xm.item}`]:{paddingLeft:0}}})}return i}function HJ(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(i=>{const o=t[i];Number(o)>0&&r.push(n[`spacing-${i}-${String(o)}`])}),r}const GJ=Ge("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:i,item:o,spacing:s,wrap:a,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=HJ(s,c,e));const f=[];return c.forEach(h=>{const m=n[h];m&&f.push(e[`grid-${h}-${String(m)}`])}),[e.root,r&&e.container,o&&e.item,l&&e.zeroMinWidth,...u,i!=="row"&&e[`direction-xs-${String(i)}`],a!=="wrap"&&e[`wrap-xs-${String(a)}`],...f]}})(({ownerState:t})=>$({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),VJ,$J,WJ,jJ);function XJ(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const i=t[r];if(Number(i)>0){const o=`spacing-${r}-${String(i)}`;n.push(o)}}),n}const qJ=t=>{const{classes:e,container:n,direction:r,item:i,spacing:o,wrap:s,zeroMinWidth:a,breakpoints:l}=t;let c=[];n&&(c=XJ(o,l));const u=[];l.forEach(h=>{const m=t[h];m&&u.push(`grid-${h}-${String(m)}`)});const f={root:["root",n&&"container",i&&"item",a&&"zeroMinWidth",...c,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...u]};return Rt(f,DJ,e)},Ma=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiGrid"}),{breakpoints:i}=xu(),o=ag(r),{className:s,columns:a,columnSpacing:l,component:c="div",container:u=!1,direction:f="row",item:h=!1,rowSpacing:m,spacing:v=0,wrap:x="wrap",zeroMinWidth:y=!1}=o,g=et(o,BJ),b=m||v,_=l||v,S=T.useContext(s4),A=u?a||12:S,P={},R=$({},g);i.keys.forEach(C=>{g[C]!=null&&(P[C]=g[C],delete R[C])});const L=$({},o,{columns:A,container:u,direction:f,item:h,rowSpacing:b,columnSpacing:_,wrap:x,zeroMinWidth:y,spacing:v},P,{breakpoints:i.keys}),k=qJ(L);return E.jsx(s4.Provider,{value:A,children:E.jsx(GJ,$({ownerState:L,className:lt(k.root,s),as:c,ref:n},R))})}),YJ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function X2(t){return`scale(${t}, ${t**2})`}const KJ={entering:{opacity:1,transform:X2(1)},entered:{opacity:1,transform:"none"}},KS=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),p6=T.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:f,onExited:h,onExiting:m,style:v,timeout:x="auto",TransitionComponent:y=Ys}=e,g=et(e,YJ),b=Vz(),_=T.useRef(),S=xu(),A=T.useRef(null),P=Er(A,o.ref,n),R=G=>X=>{if(G){const Z=A.current;X===void 0?G(Z):G(Z,X)}},L=R(u),k=R((G,X)=>{c6(G);const{duration:Z,delay:F,easing:q}=M1({style:v,timeout:x,easing:s},{mode:"enter"});let K;x==="auto"?(K=S.transitions.getAutoHeightDuration(G.clientHeight),_.current=K):K=Z,G.style.transition=[S.transitions.create("opacity",{duration:K,delay:F}),S.transitions.create("transform",{duration:KS?K:K*.666,delay:F,easing:q})].join(","),l&&l(G,X)}),C=R(c),N=R(m),z=R(G=>{const{duration:X,delay:Z,easing:F}=M1({style:v,timeout:x,easing:s},{mode:"exit"});let q;x==="auto"?(q=S.transitions.getAutoHeightDuration(G.clientHeight),_.current=q):q=X,G.style.transition=[S.transitions.create("opacity",{duration:q,delay:Z}),S.transitions.create("transform",{duration:KS?q:q*.666,delay:KS?Z:Z||q*.333,easing:F})].join(","),G.style.opacity=0,G.style.transform=X2(.75),f&&f(G)}),D=R(h),B=G=>{x==="auto"&&b.start(_.current||0,G),r&&r(A.current,G)};return E.jsx(y,$({appear:i,in:a,nodeRef:A,onEnter:k,onEntered:C,onEntering:L,onExit:z,onExited:D,onExiting:N,addEndListener:B,timeout:x==="auto"?null:x},g,{children:(G,X)=>T.cloneElement(o,$({style:$({opacity:0,transform:X2(.75),visibility:G==="exited"&&!a?"hidden":void 0},KJ[G],v,o.props.style),ref:P},X))}))});p6.muiSupportAuto=!0;const ZJ=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],JJ=t=>{const{classes:e,disableUnderline:n}=t,i=Rt({root:["root",!n&&"underline"],input:["input"]},WK,e);return $({},e,i)},QJ=Ge(Xb,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Hb(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),$({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${jh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${jh.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${jh.disabled}, .${jh.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${jh.disabled}:before`]:{borderBottomStyle:"dotted"}})}),eQ=Ge(qb,{name:"MuiInput",slot:"Input",overridesResolver:Gb})({}),MR=T.forwardRef(function(e,n){var r,i,o,s;const a=At({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:f=!1,inputComponent:h="input",multiline:m=!1,slotProps:v,slots:x={},type:y="text"}=a,g=et(a,ZJ),b=JJ(a),S={root:{ownerState:{disableUnderline:l}}},A=v??u?fi(v??u,S):S,P=(r=(i=x.root)!=null?i:c.Root)!=null?r:QJ,R=(o=(s=x.input)!=null?s:c.Input)!=null?o:eQ;return E.jsx(wR,$({slots:{root:P,input:R},slotProps:A,fullWidth:f,inputComponent:h,multiline:m,ref:n,type:y},g,{classes:b}))});MR.muiName="Input";function tQ(t){return Tt("MuiInputLabel",t)}Ct("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const nQ=["disableAnimation","margin","shrink","variant","className"],rQ=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=t,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${xt(r)}`,s],asterisk:[a&&"asterisk"]},c=Rt(l,tQ,e);return $({},e,c)},iQ=Ge(OJ,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Np.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>$({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&$({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&$({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&$({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),m6=T.forwardRef(function(e,n){const r=At({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=et(r,nQ),l=wu();let c=o;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=Zd({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),f=$({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),h=rQ(f);return E.jsx(iQ,$({"data-shrink":c,ownerState:f,ref:n,className:lt(h.root,s)},a,{classes:h}))});function oQ(t){return Tt("MuiLink",t)}const sQ=Ct("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),g6={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},aQ=t=>g6[t]||t,lQ=({theme:t,ownerState:e})=>{const n=aQ(e.color),r=wd(t,`palette.${n}`,!1)||e.color,i=wd(t,`palette.${n}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:Pn(r,.4)},cQ=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],uQ=t=>{const{classes:e,component:n,focusVisible:r,underline:i}=t,o={root:["root",`underline${xt(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Rt(o,oQ,e)},fQ=Ge(ar,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${xt(n.underline)}`],n.component==="button"&&e.button]}})(({theme:t,ownerState:e})=>$({},e.underline==="none"&&{textDecoration:"none"},e.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},e.underline==="always"&&$({textDecoration:"underline"},e.color!=="inherit"&&{textDecorationColor:lQ({theme:t,ownerState:e})},{"&:hover":{textDecorationColor:"inherit"}}),e.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${sQ.focusVisible}`]:{outline:"auto"}})),a4=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiLink"}),{className:i,color:o="primary",component:s="a",onBlur:a,onFocus:l,TypographyClasses:c,underline:u="always",variant:f="inherit",sx:h}=r,m=et(r,cQ),{isFocusVisibleRef:v,onBlur:x,onFocus:y,ref:g}=$z(),[b,_]=T.useState(!1),S=Er(n,g),A=k=>{x(k),v.current===!1&&_(!1),a&&a(k)},P=k=>{y(k),v.current===!0&&_(!0),l&&l(k)},R=$({},r,{color:o,component:s,focusVisible:b,underline:u,variant:f}),L=uQ(R);return E.jsx(fQ,$({color:o,className:lt(L.root,i),classes:c,component:s,onBlur:A,onFocus:P,ref:S,ownerState:R,variant:f,sx:[...Object.keys(g6).includes(o)?[]:[{color:o}],...Array.isArray(h)?h:[h]]},m))}),Fs=T.createContext({});function dQ(t){return Tt("MuiList",t)}Ct("MuiList",["root","padding","dense","subheader"]);const hQ=["children","className","component","dense","disablePadding","subheader"],pQ=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return Rt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},dQ,e)},mQ=Ge("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>$({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),v6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=et(r,hQ),f=T.useMemo(()=>({dense:a}),[a]),h=$({},r,{component:s,dense:a,disablePadding:l}),m=pQ(h);return E.jsx(Fs.Provider,{value:f,children:E.jsxs(mQ,$({as:s,className:lt(m.root,o),ref:n,ownerState:h},u,{children:[c,i]}))})});function gQ(t){return Tt("MuiListItem",t)}const Tf=Ct("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function vQ(t){return Tt("MuiListItemButton",t)}const Rf=Ct("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),yQ=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],xQ=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},bQ=t=>{const{alignItems:e,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=t,c=Rt({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",e==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},vQ,n);return $({},n,c)},_Q=Ge(_u,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:xQ})(({theme:t,ownerState:e})=>$({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Rf.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Rf.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Rf.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Rf.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Rf.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),wQ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:f,selected:h=!1,className:m}=r,v=et(r,yQ),x=T.useContext(Fs),y=T.useMemo(()=>({dense:l||x.dense||!1,alignItems:i,disableGutters:c}),[i,x.dense,l,c]),g=T.useRef(null);Oo(()=>{o&&g.current&&g.current.focus()},[o]);const b=$({},r,{alignItems:i,dense:y.dense,disableGutters:c,divider:u,selected:h}),_=bQ(b),S=Er(g,n);return E.jsx(Fs.Provider,{value:y,children:E.jsx(_Q,$({ref:S,href:v.href||v.to,component:(v.href||v.to)&&s==="div"?"button":s,focusVisibleClassName:lt(_.focusVisible,f),ownerState:b,className:lt(_.root,m)},v,{classes:_,children:a}))})});function SQ(t){return Tt("MuiListItemSecondaryAction",t)}Ct("MuiListItemSecondaryAction",["root","disableGutters"]);const MQ=["className"],EQ=t=>{const{disableGutters:e,classes:n}=t;return Rt({root:["root",e&&"disableGutters"]},SQ,n)},CQ=Ge("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>$({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),y6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=et(r,MQ),s=T.useContext(Fs),a=$({},r,{disableGutters:s.disableGutters}),l=EQ(a);return E.jsx(CQ,$({className:lt(l.root,i),ownerState:a,ref:n},o))});y6.muiName="ListItemSecondaryAction";const TQ=["className"],RQ=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],AQ=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},PQ=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=t;return Rt({root:["root",i&&"dense",!s&&"gutters",!a&&"padding",l&&"divider",o&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},gQ,r)},IQ=Ge("div",{name:"MuiListItem",slot:"Root",overridesResolver:AQ})(({theme:t,ownerState:e})=>$({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&$({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${Rf.root}`]:{paddingRight:48}},{[`&.${Tf.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Tf.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Tf.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Tf.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Tf.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),NQ=Ge("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),kQ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:a,className:l,component:c,components:u={},componentsProps:f={},ContainerComponent:h="li",ContainerProps:{className:m}={},dense:v=!1,disabled:x=!1,disableGutters:y=!1,disablePadding:g=!1,divider:b=!1,focusVisibleClassName:_,secondaryAction:S,selected:A=!1,slotProps:P={},slots:R={}}=r,L=et(r.ContainerProps,TQ),k=et(r,RQ),C=T.useContext(Fs),N=T.useMemo(()=>({dense:v||C.dense||!1,alignItems:i,disableGutters:y}),[i,C.dense,v,y]),z=T.useRef(null);Oo(()=>{o&&z.current&&z.current.focus()},[o]);const D=T.Children.toArray(a),B=D.length&&Ly(D[D.length-1],["ListItemSecondaryAction"]),G=$({},r,{alignItems:i,autoFocus:o,button:s,dense:N.dense,disabled:x,disableGutters:y,disablePadding:g,divider:b,hasSecondaryAction:B,selected:A}),X=PQ(G),Z=Er(z,n),F=R.root||u.Root||IQ,q=P.root||f.root||{},K=$({className:lt(X.root,q.className,l),disabled:x},k);let Q=c||"li";return s&&(K.component=c||"div",K.focusVisibleClassName=lt(Tf.focusVisible,_),Q=_u),B?(Q=!K.component&&!c?"div":Q,h==="li"&&(Q==="li"?Q="div":K.component==="li"&&(K.component="div")),E.jsx(Fs.Provider,{value:N,children:E.jsxs(NQ,$({as:h,className:lt(X.container,m),ref:Z,ownerState:G},L,{children:[E.jsx(F,$({},q,!Sd(F)&&{as:Q,ownerState:$({},G,q.ownerState)},K,{children:D})),D.pop()]}))})):E.jsx(Fs.Provider,{value:N,children:E.jsxs(F,$({},q,{as:Q,ref:Z},!Sd(F)&&{ownerState:$({},G,q.ownerState)},K,{children:[D,S&&E.jsx(y6,{children:S})]}))})}),l4=Ct("MuiListItemIcon",["root","alignItemsFlexStart"]);function LQ(t){return Tt("MuiListItemText",t)}const C1=Ct("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),OQ=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],DQ=t=>{const{classes:e,inset:n,primary:r,secondary:i,dense:o}=t;return Rt({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},LQ,e)},FQ=Ge("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${C1.primary}`]:e.primary},{[`& .${C1.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>$({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),zQ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:f}=r,h=et(r,OQ),{dense:m}=T.useContext(Fs);let v=l??i,x=u;const y=$({},r,{disableTypography:s,inset:a,primary:!!v,secondary:!!x,dense:m}),g=DQ(y);return v!=null&&v.type!==ar&&!s&&(v=E.jsx(ar,$({variant:m?"body2":"body1",className:g.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:v}))),x!=null&&x.type!==ar&&!s&&(x=E.jsx(ar,$({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},f,{children:x}))),E.jsxs(FQ,$({className:lt(g.root,o),ownerState:y,ref:n},h,{children:[v,x]}))}),UQ=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function ZS(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function c4(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function x6(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function $h(t,e,n,r,i,o){let s=!1,a=i(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!x6(a,o)||l)a=i(t,a,n);else return a.focus(),!0}return!1}const BQ=T.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:f="selectedMenu"}=e,h=et(e,UQ),m=T.useRef(null),v=T.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Oo(()=>{i&&m.current.focus()},[i]),T.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(_,{direction:S})=>{const A=!m.current.style.width;if(_.clientHeight{const S=m.current,A=_.key,P=Fi(S).activeElement;if(A==="ArrowDown")_.preventDefault(),$h(S,P,c,l,ZS);else if(A==="ArrowUp")_.preventDefault(),$h(S,P,c,l,c4);else if(A==="Home")_.preventDefault(),$h(S,null,c,l,ZS);else if(A==="End")_.preventDefault(),$h(S,null,c,l,c4);else if(A.length===1){const R=v.current,L=A.toLowerCase(),k=performance.now();R.keys.length>0&&(k-R.lastTime>500?(R.keys=[],R.repeating=!0,R.previousKeyMatched=!0):R.repeating&&L!==R.keys[0]&&(R.repeating=!1)),R.lastTime=k,R.keys.push(L);const C=P&&!R.repeating&&x6(P,R);R.previousKeyMatched&&(C||$h(S,P,!1,l,ZS,R))?_.preventDefault():R.previousKeyMatched=!1}u&&u(_)},y=Er(m,n);let g=-1;T.Children.forEach(s,(_,S)=>{if(!T.isValidElement(_)){g===S&&(g+=1,g>=s.length&&(g=-1));return}_.props.disabled||(f==="selectedMenu"&&_.props.selected||g===-1)&&(g=S),g===S&&(_.props.disabled||_.props.muiSkipListHighlight||_.type.muiSkipListHighlight)&&(g+=1,g>=s.length&&(g=-1))});const b=T.Children.map(s,(_,S)=>{if(S===g){const A={};return o&&(A.autoFocus=!0),_.props.tabIndex===void 0&&f==="selectedMenu"&&(A.tabIndex=0),T.cloneElement(_,A)}return _});return E.jsx(v6,$({role:"menu",ref:y,className:a,onKeyDown:x,tabIndex:i?0:-1},h,{children:b}))});function jQ(t){return Tt("MuiPopover",t)}Ct("MuiPopover",["root","paper"]);const VQ=["onEntering"],$Q=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],WQ=["slotProps"];function u4(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function f4(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function d4(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function JS(t){return typeof t=="function"?t():t}const HQ=t=>{const{classes:e}=t;return Rt({root:["root"],paper:["paper"]},jQ,e)},GQ=Ge(gJ,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),b6=Ge(bu,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),_6=T.forwardRef(function(e,n){var r,i,o;const s=At({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:f="anchorEl",children:h,className:m,container:v,elevation:x=8,marginThreshold:y=16,open:g,PaperProps:b={},slots:_,slotProps:S,transformOrigin:A={vertical:"top",horizontal:"left"},TransitionComponent:P=p6,transitionDuration:R="auto",TransitionProps:{onEntering:L}={},disableScrollLock:k=!1}=s,C=et(s.TransitionProps,VQ),N=et(s,$Q),z=(r=S==null?void 0:S.paper)!=null?r:b,D=T.useRef(),B=Er(D,z.ref),G=$({},s,{anchorOrigin:c,anchorReference:f,elevation:x,marginThreshold:y,externalPaperSlotProps:z,transformOrigin:A,TransitionComponent:P,transitionDuration:R,TransitionProps:C}),X=HQ(G),Z=T.useCallback(()=>{if(f==="anchorPosition")return u;const ae=JS(l),Ie=(ae&&ae.nodeType===1?ae:Fi(D.current).body).getBoundingClientRect();return{top:Ie.top+u4(Ie,c.vertical),left:Ie.left+f4(Ie,c.horizontal)}},[l,c.horizontal,c.vertical,u,f]),F=T.useCallback(ae=>({vertical:u4(ae,A.vertical),horizontal:f4(ae,A.horizontal)}),[A.horizontal,A.vertical]),q=T.useCallback(ae=>{const W={width:ae.offsetWidth,height:ae.offsetHeight},Ie=F(W);if(f==="none")return{top:null,left:null,transformOrigin:d4(Ie)};const Re=Z();let De=Re.top-Ie.vertical,he=Re.left-Ie.horizontal;const qe=De+W.height,Le=he+W.width,V=ka(JS(l)),U=V.innerHeight-y,ne=V.innerWidth-y;if(y!==null&&DeU){const le=qe-U;De-=le,Ie.vertical+=le}if(y!==null&&hene){const le=Le-ne;he-=le,Ie.horizontal+=le}return{top:`${Math.round(De)}px`,left:`${Math.round(he)}px`,transformOrigin:d4(Ie)}},[l,f,Z,F,y]),[K,Q]=T.useState(g),de=T.useCallback(()=>{const ae=D.current;if(!ae)return;const W=q(ae);W.top!==null&&(ae.style.top=W.top),W.left!==null&&(ae.style.left=W.left),ae.style.transformOrigin=W.transformOrigin,Q(!0)},[q]);T.useEffect(()=>(k&&window.addEventListener("scroll",de),()=>window.removeEventListener("scroll",de)),[l,k,de]);const fe=(ae,W)=>{L&&L(ae,W),de()},J=()=>{Q(!1)};T.useEffect(()=>{g&&de()}),T.useImperativeHandle(a,()=>g?{updatePosition:()=>{de()}}:null,[g,de]),T.useEffect(()=>{if(!g)return;const ae=jb(()=>{de()}),W=ka(l);return W.addEventListener("resize",ae),()=>{ae.clear(),W.removeEventListener("resize",ae)}},[l,g,de]);let ce=R;R==="auto"&&!P.muiSupportAuto&&(ce=void 0);const _e=v||(l?Fi(JS(l)).body:void 0),be=(i=_==null?void 0:_.root)!=null?i:GQ,Xe=(o=_==null?void 0:_.paper)!=null?o:b6,$e=$s({elementType:Xe,externalSlotProps:$({},z,{style:K?z.style:$({},z.style,{opacity:0})}),additionalProps:{elevation:x,ref:B},ownerState:G,className:lt(X.paper,z==null?void 0:z.className)}),tt=$s({elementType:be,externalSlotProps:(S==null?void 0:S.root)||{},externalForwardedProps:N,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:_e,open:g},ownerState:G,className:lt(X.root,m)}),{slotProps:Ve}=tt,se=et(tt,WQ);return E.jsx(be,$({},se,!Sd(be)&&{slotProps:Ve,disableScrollLock:k},{children:E.jsx(P,$({appear:!0,in:g,onEntering:fe,onExited:J,timeout:ce},C,{children:E.jsx(Xe,$({},$e,{children:h}))}))}))});function XQ(t){return Tt("MuiMenu",t)}Ct("MuiMenu",["root","paper","list"]);const qQ=["onEntering"],YQ=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],KQ={vertical:"top",horizontal:"right"},ZQ={vertical:"top",horizontal:"left"},JQ=t=>{const{classes:e}=t;return Rt({root:["root"],paper:["paper"],list:["list"]},XQ,e)},QQ=Ge(_6,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),eee=Ge(b6,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),tee=Ge(BQ,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),nee=T.forwardRef(function(e,n){var r,i;const o=At({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:f,open:h,PaperProps:m={},PopoverClasses:v,transitionDuration:x="auto",TransitionProps:{onEntering:y}={},variant:g="selectedMenu",slots:b={},slotProps:_={}}=o,S=et(o.TransitionProps,qQ),A=et(o,YQ),P=dR(),R=$({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:y,PaperProps:m,transitionDuration:x,TransitionProps:S,variant:g}),L=JQ(R),k=s&&!c&&h,C=T.useRef(null),N=(F,q)=>{C.current&&C.current.adjustStyleForScrollbar(F,{direction:P?"rtl":"ltr"}),y&&y(F,q)},z=F=>{F.key==="Tab"&&(F.preventDefault(),f&&f(F,"tabKeyDown"))};let D=-1;T.Children.map(a,(F,q)=>{T.isValidElement(F)&&(F.props.disabled||(g==="selectedMenu"&&F.props.selected||D===-1)&&(D=q))});const B=(r=b.paper)!=null?r:eee,G=(i=_.paper)!=null?i:m,X=$s({elementType:b.root,externalSlotProps:_.root,ownerState:R,className:[L.root,l]}),Z=$s({elementType:B,externalSlotProps:G,ownerState:R,className:L.paper});return E.jsx(QQ,$({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:P?"right":"left"},transformOrigin:P?KQ:ZQ,slots:{paper:B,root:b.root},slotProps:{root:X,paper:Z},open:h,ref:n,transitionDuration:x,TransitionProps:$({onEntering:N},S),ownerState:R},A,{classes:v,children:E.jsx(tee,$({onKeyDown:z,actions:C,autoFocus:s&&(D===-1||c),autoFocusItem:k,variant:g},u,{className:lt(L.list,u.className),children:a}))}))});function ree(t){return Tt("MuiMenuItem",t)}const Wh=Ct("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),iee=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],oee=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},see=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=t,l=Rt({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},ree,s);return $({},s,l)},aee=Ge(_u,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:oee})(({theme:t,ownerState:e})=>$({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Wh.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Wh.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Wh.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Wh.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Wh.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${r4.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${r4.inset}`]:{marginLeft:52},[`& .${C1.root}`]:{marginTop:0,marginBottom:0},[`& .${C1.inset}`]:{paddingLeft:36},[`& .${l4.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${l4.root} svg`]:{fontSize:"1.25rem"}}))),h4=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:f,className:h}=r,m=et(r,iee),v=T.useContext(Fs),x=T.useMemo(()=>({dense:s||v.dense||!1,disableGutters:l}),[v.dense,s,l]),y=T.useRef(null);Oo(()=>{i&&y.current&&y.current.focus()},[i]);const g=$({},r,{dense:x.dense,divider:a,disableGutters:l}),b=see(r),_=Er(y,n);let S;return r.disabled||(S=f!==void 0?f:-1),E.jsx(Fs.Provider,{value:x,children:E.jsx(aee,$({ref:_,role:u,tabIndex:S,component:o,focusVisibleClassName:lt(b.focusVisible,c),className:lt(b.root,h)},m,{ownerState:g,classes:b}))})});function lee(t){return Tt("MuiNativeSelect",t)}const ER=Ct("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),cee=["className","disabled","error","IconComponent","inputRef","variant"],uee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:s}=t,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${xt(n)}`,o&&"iconOpen",r&&"disabled"]};return Rt(a,lee,e)},w6=({ownerState:t,theme:e})=>$({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":$({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${ER.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),fee=Ge("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:mi,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${ER.multiple}`]:e.multiple}]}})(w6),S6=({ownerState:t,theme:e})=>$({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${ER.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),dee=Ge("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${xt(n.variant)}`],n.open&&e.iconOpen]}})(S6),hee=T.forwardRef(function(e,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard"}=e,c=et(e,cee),u=$({},e,{disabled:i,variant:l,error:o}),f=uee(u);return E.jsxs(T.Fragment,{children:[E.jsx(fee,$({ownerState:u,className:lt(f.select,r),disabled:i,ref:a||n},c)),e.multiple?null:E.jsx(dee,{as:s,ownerState:u,className:f.icon})]})});var p4;const pee=["children","classes","className","label","notched"],mee=Ge("fieldset",{shouldForwardProp:mi})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),gee=Ge("legend",{shouldForwardProp:mi})(({ownerState:t,theme:e})=>$({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&$({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function vee(t){const{className:e,label:n,notched:r}=t,i=et(t,pee),o=n!=null&&n!=="",s=$({},t,{notched:r,withLabel:o});return E.jsx(mee,$({"aria-hidden":!0,className:e,ownerState:s},i,{children:E.jsx(gee,{ownerState:s,children:o?E.jsx("span",{children:n}):p4||(p4=E.jsx("span",{className:"notranslate",children:"​"}))})}))}const yee=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],xee=t=>{const{classes:e}=t,r=Rt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},HK,e);return $({},e,r)},bee=Ge(Xb,{shouldForwardProp:t=>mi(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Hb})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return $({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${tl.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${tl.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${tl.focused} .${tl.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${tl.error} .${tl.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${tl.disabled} .${tl.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&$({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),_ee=Ge(vee,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),wee=Ge(qb,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Gb})(({theme:t,ownerState:e})=>$({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),CR=T.forwardRef(function(e,n){var r,i,o,s,a;const l=At({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:f="input",label:h,multiline:m=!1,notched:v,slots:x={},type:y="text"}=l,g=et(l,yee),b=xee(l),_=wu(),S=Zd({props:l,muiFormControl:_,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),A=$({},l,{color:S.color||"primary",disabled:S.disabled,error:S.error,focused:S.focused,formControl:_,fullWidth:u,hiddenLabel:S.hiddenLabel,multiline:m,size:S.size,type:y}),P=(r=(i=x.root)!=null?i:c.Root)!=null?r:bee,R=(o=(s=x.input)!=null?s:c.Input)!=null?o:wee;return E.jsx(wR,$({slots:{root:P,input:R},renderSuffix:L=>E.jsx(_ee,{ownerState:A,className:b.notchedOutline,label:h!=null&&h!==""&&S.required?a||(a=E.jsxs(T.Fragment,{children:[h," ","*"]})):h,notched:typeof v<"u"?v:!!(L.startAdornment||L.filled||L.focused)}),fullWidth:u,inputComponent:f,multiline:m,ref:n,type:y},g,{classes:$({},b,{notchedOutline:null})}))});CR.muiName="Input";function See(t){return Tt("MuiSelect",t)}const Hh=Ct("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var m4;const Mee=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Eee=Ge("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${Hh.select}`]:e.select},{[`&.${Hh.select}`]:e[n.variant]},{[`&.${Hh.error}`]:e.error},{[`&.${Hh.multiple}`]:e.multiple}]}})(w6,{[`&.${Hh.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Cee=Ge("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${xt(n.variant)}`],n.open&&e.iconOpen]}})(S6),Tee=Ge("input",{shouldForwardProp:t=>l6(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function g4(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Ree(t){return t==null||typeof t=="string"&&!t.trim()}const Aee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:s}=t,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${xt(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Rt(a,See,e)},Pee=T.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:f,disabled:h,displayEmpty:m,error:v=!1,IconComponent:x,inputRef:y,labelId:g,MenuProps:b={},multiple:_,name:S,onBlur:A,onChange:P,onClose:R,onFocus:L,onOpen:k,open:C,readOnly:N,renderValue:z,SelectDisplayProps:D={},tabIndex:B,value:G,variant:X="standard"}=e,Z=et(e,Mee),[F,q]=j2({controlled:G,default:f,name:"Select"}),[K,Q]=j2({controlled:C,default:u,name:"Select"}),de=T.useRef(null),fe=T.useRef(null),[J,ce]=T.useState(null),{current:_e}=T.useRef(C!=null),[be,Xe]=T.useState(),$e=Er(n,y),tt=T.useCallback(Oe=>{fe.current=Oe,Oe&&ce(Oe)},[]),Ve=J==null?void 0:J.parentNode;T.useImperativeHandle($e,()=>({focus:()=>{fe.current.focus()},node:de.current,value:F}),[F]),T.useEffect(()=>{u&&K&&J&&!_e&&(Xe(a?null:Ve.clientWidth),fe.current.focus())},[J,a]),T.useEffect(()=>{s&&fe.current.focus()},[s]),T.useEffect(()=>{if(!g)return;const Oe=Fi(fe.current).getElementById(g);if(Oe){const Ye=()=>{getSelection().isCollapsed&&fe.current.focus()};return Oe.addEventListener("click",Ye),()=>{Oe.removeEventListener("click",Ye)}}},[g]);const se=(Oe,Ye)=>{Oe?k&&k(Ye):R&&R(Ye),_e||(Xe(a?null:Ve.clientWidth),Q(Oe))},ae=Oe=>{Oe.button===0&&(Oe.preventDefault(),fe.current.focus(),se(!0,Oe))},W=Oe=>{se(!1,Oe)},Ie=T.Children.toArray(l),Re=Oe=>{const Ye=Ie.find(me=>me.props.value===Oe.target.value);Ye!==void 0&&(q(Ye.props.value),P&&P(Oe,Ye))},De=Oe=>Ye=>{let me;if(Ye.currentTarget.hasAttribute("tabindex")){if(_){me=Array.isArray(F)?F.slice():[];const Fe=F.indexOf(Oe.props.value);Fe===-1?me.push(Oe.props.value):me.splice(Fe,1)}else me=Oe.props.value;if(Oe.props.onClick&&Oe.props.onClick(Ye),F!==me&&(q(me),P)){const Fe=Ye.nativeEvent||Ye,Je=new Fe.constructor(Fe.type,Fe);Object.defineProperty(Je,"target",{writable:!0,value:{value:me,name:S}}),P(Je,Oe)}_||se(!1,Ye)}},he=Oe=>{N||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Oe.key)!==-1&&(Oe.preventDefault(),se(!0,Oe))},qe=J!==null&&K,Le=Oe=>{!qe&&A&&(Object.defineProperty(Oe,"target",{writable:!0,value:{value:F,name:S}}),A(Oe))};delete Z["aria-invalid"];let V,U;const ne=[];let le=!1;(E1({value:F})||m)&&(z?V=z(F):le=!0);const Ce=Ie.map(Oe=>{if(!T.isValidElement(Oe))return null;let Ye;if(_){if(!Array.isArray(F))throw new Error(Na(2));Ye=F.some(me=>g4(me,Oe.props.value)),Ye&&le&&ne.push(Oe.props.children)}else Ye=g4(F,Oe.props.value),Ye&&le&&(U=Oe.props.children);return T.cloneElement(Oe,{"aria-selected":Ye?"true":"false",onClick:De(Oe),onKeyUp:me=>{me.key===" "&&me.preventDefault(),Oe.props.onKeyUp&&Oe.props.onKeyUp(me)},role:"option",selected:Ye,value:void 0,"data-value":Oe.props.value})});le&&(_?ne.length===0?V=null:V=ne.reduce((Oe,Ye,me)=>(Oe.push(Ye),me{const{classes:e}=t;return e},TR={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>mi(t)&&t!=="variant",slot:"Root"},Lee=Ge(MR,TR)(""),Oee=Ge(CR,TR)(""),Dee=Ge(SR,TR)(""),RR=T.forwardRef(function(e,n){const r=At({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=XK,id:f,input:h,inputProps:m,label:v,labelId:x,MenuProps:y,multiple:g=!1,native:b=!1,onClose:_,onOpen:S,open:A,renderValue:P,SelectDisplayProps:R,variant:L="outlined"}=r,k=et(r,Iee),C=b?hee:Pee,N=wu(),z=Zd({props:r,muiFormControl:N,states:["variant","error"]}),D=z.variant||L,B=$({},r,{variant:D,classes:s}),G=kee(B),X=et(G,Nee),Z=h||{standard:E.jsx(Lee,{ownerState:B}),outlined:E.jsx(Oee,{label:v,ownerState:B}),filled:E.jsx(Dee,{ownerState:B})}[D],F=Er(n,Z.ref);return E.jsx(T.Fragment,{children:T.cloneElement(Z,$({inputComponent:C,inputProps:$({children:o,error:z.error,IconComponent:u,variant:D,type:void 0,multiple:g},b?{id:f}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:x,MenuProps:y,onClose:_,onOpen:S,open:A,renderValue:P,SelectDisplayProps:$({id:f},R)},m,{classes:m?fi(X,m.classes):X},h?h.props.inputProps:{})},(g&&b||c)&&D==="outlined"?{notched:!0}:{},{ref:F,className:lt(Z.props.className,a,G.root)},!h&&{variant:D},k))})});RR.muiName="Select";function Fee(t){return Tt("MuiTab",t)}const nl=Ct("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),zee=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Uee=t=>{const{classes:e,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:a,disabled:l}=t,c={root:["root",o&&s&&"labelIcon",`textColor${xt(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Rt(c,Fee,e)},Bee=Ge(_u,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.label&&n.icon&&e.labelIcon,e[`textColor${xt(n.textColor)}`],n.fullWidth&&e.fullWidth,n.wrapped&&e.wrapped,{[`& .${nl.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>$({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${nl.iconWrapper}`]:$({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${nl.selected}`]:{opacity:1},[`&.${nl.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${nl.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${nl.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${nl.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${nl.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),QS=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:a,icon:l,iconPosition:c="top",indicator:u,label:f,onChange:h,onClick:m,onFocus:v,selected:x,selectionFollowsFocus:y,textColor:g="inherit",value:b,wrapped:_=!1}=r,S=et(r,zee),A=$({},r,{disabled:o,disableFocusRipple:s,selected:x,icon:!!l,iconPosition:c,label:!!f,fullWidth:a,textColor:g,wrapped:_}),P=Uee(A),R=l&&f&&T.isValidElement(l)?T.cloneElement(l,{className:lt(P.iconWrapper,l.props.className)}):l,L=C=>{!x&&h&&h(C,b),m&&m(C)},k=C=>{y&&!x&&h&&h(C,b),v&&v(C)};return E.jsxs(Bee,$({focusRipple:!s,className:lt(P.root,i),ref:n,role:"tab","aria-selected":x,disabled:o,onClick:L,onFocus:k,ownerState:A,tabIndex:x?0:-1},S,{children:[c==="top"||c==="start"?E.jsxs(T.Fragment,{children:[R,f]}):E.jsxs(T.Fragment,{children:[f,R]}),u]}))}),M6=T.createContext();function jee(t){return Tt("MuiTable",t)}Ct("MuiTable",["root","stickyHeader"]);const Vee=["className","component","padding","size","stickyHeader"],$ee=t=>{const{classes:e,stickyHeader:n}=t;return Rt({root:["root",n&&"stickyHeader"]},jee,e)},Wee=Ge("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>$({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":$({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},e.stickyHeader&&{borderCollapse:"separate"})),v4="table",E6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTable"}),{className:i,component:o=v4,padding:s="normal",size:a="medium",stickyHeader:l=!1}=r,c=et(r,Vee),u=$({},r,{component:o,padding:s,size:a,stickyHeader:l}),f=$ee(u),h=T.useMemo(()=>({padding:s,size:a,stickyHeader:l}),[s,a,l]);return E.jsx(M6.Provider,{value:h,children:E.jsx(Wee,$({as:o,role:o===v4?null:"table",ref:n,className:lt(f.root,i),ownerState:u},c))})}),Yb=T.createContext();function Hee(t){return Tt("MuiTableBody",t)}Ct("MuiTableBody",["root"]);const Gee=["className","component"],Xee=t=>{const{classes:e}=t;return Rt({root:["root"]},Hee,e)},qee=Ge("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-row-group"}),Yee={variant:"body"},y4="tbody",C6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableBody"}),{className:i,component:o=y4}=r,s=et(r,Gee),a=$({},r,{component:o}),l=Xee(a);return E.jsx(Yb.Provider,{value:Yee,children:E.jsx(qee,$({className:lt(l.root,i),as:o,ref:n,role:o===y4?null:"rowgroup",ownerState:a},s))})});function Kee(t){return Tt("MuiTableCell",t)}const bm=Ct("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),Zee=["align","className","component","padding","scope","size","sortDirection","variant"],Jee=t=>{const{classes:e,variant:n,align:r,padding:i,size:o,stickyHeader:s}=t,a={root:["root",n,s&&"stickyHeader",r!=="inherit"&&`align${xt(r)}`,i!=="normal"&&`padding${xt(i)}`,`size${xt(o)}`]};return Rt(a,Kee,e)},Qee=Ge("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`size${xt(n.size)}`],n.padding!=="normal"&&e[`padding${xt(n.padding)}`],n.align!=="inherit"&&e[`align${xt(n.align)}`],n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>$({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid - ${t.palette.mode==="light"?t6(Pn(t.palette.divider,1),.88):e6(Pn(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},e.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},e.variant==="body"&&{color:(t.vars||t).palette.text.primary},e.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},e.size==="small"&&{padding:"6px 16px",[`&.${bm.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},e.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},e.padding==="none"&&{padding:0},e.align==="left"&&{textAlign:"left"},e.align==="center"&&{textAlign:"center"},e.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},e.align==="justify"&&{textAlign:"justify"},e.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),Ps=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableCell"}),{align:i="inherit",className:o,component:s,padding:a,scope:l,size:c,sortDirection:u,variant:f}=r,h=et(r,Zee),m=T.useContext(M6),v=T.useContext(Yb),x=v&&v.variant==="head";let y;s?y=s:y=x?"th":"td";let g=l;y==="td"?g=void 0:!g&&x&&(g="col");const b=f||v&&v.variant,_=$({},r,{align:i,component:y,padding:a||(m&&m.padding?m.padding:"normal"),size:c||(m&&m.size?m.size:"medium"),sortDirection:u,stickyHeader:b==="head"&&m&&m.stickyHeader,variant:b}),S=Jee(_);let A=null;return u&&(A=u==="asc"?"ascending":"descending"),E.jsx(Qee,$({as:y,ref:n,className:lt(S.root,o),"aria-sort":A,scope:g,ownerState:_},h))});function ete(t){return Tt("MuiTableContainer",t)}Ct("MuiTableContainer",["root"]);const tte=["className","component"],nte=t=>{const{classes:e}=t;return Rt({root:["root"]},ete,e)},rte=Ge("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"}),T6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableContainer"}),{className:i,component:o="div"}=r,s=et(r,tte),a=$({},r,{component:o}),l=nte(a);return E.jsx(rte,$({ref:n,as:o,className:lt(l.root,i),ownerState:a},s))});function ite(t){return Tt("MuiTableHead",t)}Ct("MuiTableHead",["root"]);const ote=["className","component"],ste=t=>{const{classes:e}=t;return Rt({root:["root"]},ite,e)},ate=Ge("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),lte={variant:"head"},x4="thead",R6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableHead"}),{className:i,component:o=x4}=r,s=et(r,ote),a=$({},r,{component:o}),l=ste(a);return E.jsx(Yb.Provider,{value:lte,children:E.jsx(ate,$({as:o,className:lt(l.root,i),ref:n,role:o===x4?null:"rowgroup",ownerState:a},s))})});function cte(t){return Tt("MuiToolbar",t)}Ct("MuiToolbar",["root","gutters","regular","dense"]);const ute=["className","component","disableGutters","variant"],fte=t=>{const{classes:e,disableGutters:n,variant:r}=t;return Rt({root:["root",!n&&"gutters",r]},cte,e)},dte=Ge("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableGutters&&e.gutters,e[n.variant]]}})(({theme:t,ownerState:e})=>$({position:"relative",display:"flex",alignItems:"center"},!e.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},e.variant==="dense"&&{minHeight:48}),({theme:t,ownerState:e})=>e.variant==="regular"&&t.mixins.toolbar),hte=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular"}=r,l=et(r,ute),c=$({},r,{component:o,disableGutters:s,variant:a}),u=fte(c);return E.jsx(dte,$({as:o,className:lt(u.root,i),ref:n,ownerState:c},l))}),pte=Kd(E.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),mte=Kd(E.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function gte(t){return Tt("MuiTableRow",t)}const b4=Ct("MuiTableRow",["root","selected","hover","head","footer"]),vte=["className","component","hover","selected"],yte=t=>{const{classes:e,selected:n,hover:r,head:i,footer:o}=t;return Rt({root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]},gte,e)},xte=Ge("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.head&&e.head,n.footer&&e.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${b4.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${b4.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),_4="tr",Kb=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableRow"}),{className:i,component:o=_4,hover:s=!1,selected:a=!1}=r,l=et(r,vte),c=T.useContext(Yb),u=$({},r,{component:o,hover:s,selected:a,head:c&&c.variant==="head",footer:c&&c.variant==="footer"}),f=yte(u);return E.jsx(xte,$({as:o,ref:n,className:lt(f.root,i),role:o===_4?null:"row",ownerState:u},l))});function bte(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function _te(t,e,n,r={},i=()=>{}){const{ease:o=bte,duration:s=300}=r;let a=null;const l=e[t];let c=!1;const u=()=>{c=!0},f=h=>{if(c){i(new Error("Animation cancelled"));return}a===null&&(a=h);const m=Math.min(1,(h-a)/s);if(e[t]=o(m)*(n-l)+l,m>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(f)};return l===n?(i(new Error("Element already at target position")),u):(requestAnimationFrame(f),u)}const wte=["onChange"],Ste={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Mte(t){const{onChange:e}=t,n=et(t,wte),r=T.useRef(),i=T.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Oo(()=>{const s=jb(()=>{const l=r.current;o(),l!==r.current&&e(r.current)}),a=ka(i.current);return a.addEventListener("resize",s),()=>{s.clear(),a.removeEventListener("resize",s)}},[e]),T.useEffect(()=>{o(),e(r.current)},[e]),E.jsx("div",$({style:Ste,ref:i},n))}function Ete(t){return Tt("MuiTabScrollButton",t)}const Cte=Ct("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Tte=["className","slots","slotProps","direction","orientation","disabled"],Rte=t=>{const{classes:e,orientation:n,disabled:r}=t;return Rt({root:["root",n,r&&"disabled"]},Ete,e)},Ate=Ge(_u,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.orientation&&e[n.orientation]]}})(({ownerState:t})=>$({width:40,flexShrink:0,opacity:.8,[`&.${Cte.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Pte=T.forwardRef(function(e,n){var r,i;const o=At({props:e,name:"MuiTabScrollButton"}),{className:s,slots:a={},slotProps:l={},direction:c}=o,u=et(o,Tte),f=dR(),h=$({isRtl:f},o),m=Rte(h),v=(r=a.StartScrollButtonIcon)!=null?r:pte,x=(i=a.EndScrollButtonIcon)!=null?i:mte,y=$s({elementType:v,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),g=$s({elementType:x,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return E.jsx(Ate,$({component:"div",className:lt(m.root,s),ref:n,role:null,ownerState:h,tabIndex:null},u,{children:c==="left"?E.jsx(v,$({},y)):E.jsx(x,$({},g))}))});function Ite(t){return Tt("MuiTabs",t)}const eM=Ct("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Nte=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],w4=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,S4=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,sv=(t,e,n)=>{let r=!1,i=n(t,e);for(;i;){if(i===t.firstChild){if(r)return;r=!0}const o=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||o)i=n(t,i);else{i.focus();return}}},kte=t=>{const{vertical:e,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:a,classes:l}=t;return Rt({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Ite,l)},Lte=Ge("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${eM.scrollButtons}`]:e.scrollButtons},{[`& .${eM.scrollButtons}`]:n.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,n.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>$({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${eM.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Ote=Ge("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.scroller,n.fixed&&e.fixed,n.hideScrollbar&&e.hideScrollbar,n.scrollableX&&e.scrollableX,n.scrollableY&&e.scrollableY]}})(({ownerState:t})=>$({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Dte=Ge("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.flexContainer,n.vertical&&e.flexContainerVertical,n.centered&&e.centered]}})(({ownerState:t})=>$({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),Fte=Ge("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>$({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),zte=Ge(Mte)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),M4={},Ute=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTabs"}),i=xu(),o=dR(),{"aria-label":s,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:f,component:h="div",allowScrollButtonsMobile:m=!1,indicatorColor:v="primary",onChange:x,orientation:y="horizontal",ScrollButtonComponent:g=Pte,scrollButtons:b="auto",selectionFollowsFocus:_,slots:S={},slotProps:A={},TabIndicatorProps:P={},TabScrollButtonProps:R={},textColor:L="primary",value:k,variant:C="standard",visibleScrollbar:N=!1}=r,z=et(r,Nte),D=C==="scrollable",B=y==="vertical",G=B?"scrollTop":"scrollLeft",X=B?"top":"left",Z=B?"bottom":"right",F=B?"clientHeight":"clientWidth",q=B?"height":"width",K=$({},r,{component:h,allowScrollButtonsMobile:m,indicatorColor:v,orientation:y,vertical:B,scrollButtons:b,textColor:L,variant:C,visibleScrollbar:N,fixed:!D,hideScrollbar:D&&!N,scrollableX:D&&!B,scrollableY:D&&B,centered:c&&!D,scrollButtonsHideMobile:!m}),Q=kte(K),de=$s({elementType:S.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:K}),fe=$s({elementType:S.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:K}),[J,ce]=T.useState(!1),[_e,be]=T.useState(M4),[Xe,$e]=T.useState(!1),[tt,Ve]=T.useState(!1),[se,ae]=T.useState(!1),[W,Ie]=T.useState({overflow:"hidden",scrollbarWidth:0}),Re=new Map,De=T.useRef(null),he=T.useRef(null),qe=()=>{const me=De.current;let Fe;if(me){const gt=me.getBoundingClientRect();Fe={clientWidth:me.clientWidth,scrollLeft:me.scrollLeft,scrollTop:me.scrollTop,scrollLeftNormalized:dq(me,o?"rtl":"ltr"),scrollWidth:me.scrollWidth,top:gt.top,bottom:gt.bottom,left:gt.left,right:gt.right}}let Je;if(me&&k!==!1){const gt=he.current.children;if(gt.length>0){const ee=gt[Re.get(k)];Je=ee?ee.getBoundingClientRect():null}}return{tabsMeta:Fe,tabMeta:Je}},Le=ba(()=>{const{tabsMeta:me,tabMeta:Fe}=qe();let Je=0,gt;if(B)gt="top",Fe&&me&&(Je=Fe.top-me.top+me.scrollTop);else if(gt=o?"right":"left",Fe&&me){const Ue=o?me.scrollLeftNormalized+me.clientWidth-me.scrollWidth:me.scrollLeft;Je=(o?-1:1)*(Fe[gt]-me[gt]+Ue)}const ee={[gt]:Je,[q]:Fe?Fe[q]:0};if(isNaN(_e[gt])||isNaN(_e[q]))be(ee);else{const Ue=Math.abs(_e[gt]-ee[gt]),ye=Math.abs(_e[q]-ee[q]);(Ue>=1||ye>=1)&&be(ee)}}),V=(me,{animation:Fe=!0}={})=>{Fe?_te(G,De.current,me,{duration:i.transitions.duration.standard}):De.current[G]=me},U=me=>{let Fe=De.current[G];B?Fe+=me:(Fe+=me*(o?-1:1),Fe*=o&&Hz()==="reverse"?-1:1),V(Fe)},ne=()=>{const me=De.current[F];let Fe=0;const Je=Array.from(he.current.children);for(let gt=0;gtme){gt===0&&(Fe=me);break}Fe+=ee[F]}return Fe},le=()=>{U(-1*ne())},Ce=()=>{U(ne())},ve=T.useCallback(me=>{Ie({overflow:null,scrollbarWidth:me})},[]),He=()=>{const me={};me.scrollbarSizeListener=D?E.jsx(zte,{onChange:ve,className:lt(Q.scrollableX,Q.hideScrollbar)}):null;const Je=D&&(b==="auto"&&(Xe||tt)||b===!0);return me.scrollButtonStart=Je?E.jsx(g,$({slots:{StartScrollButtonIcon:S.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:de},orientation:y,direction:o?"right":"left",onClick:le,disabled:!Xe},R,{className:lt(Q.scrollButtons,R.className)})):null,me.scrollButtonEnd=Je?E.jsx(g,$({slots:{EndScrollButtonIcon:S.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:fe},orientation:y,direction:o?"left":"right",onClick:Ce,disabled:!tt},R,{className:lt(Q.scrollButtons,R.className)})):null,me},Ae=ba(me=>{const{tabsMeta:Fe,tabMeta:Je}=qe();if(!(!Je||!Fe)){if(Je[X]Fe[Z]){const gt=Fe[G]+(Je[Z]-Fe[Z]);V(gt,{animation:me})}}}),Ee=ba(()=>{D&&b!==!1&&ae(!se)});T.useEffect(()=>{const me=jb(()=>{De.current&&Le()});let Fe;const Je=Ue=>{Ue.forEach(ye=>{ye.removedNodes.forEach(Pe=>{var We;(We=Fe)==null||We.unobserve(Pe)}),ye.addedNodes.forEach(Pe=>{var We;(We=Fe)==null||We.observe(Pe)})}),me(),Ee()},gt=ka(De.current);gt.addEventListener("resize",me);let ee;return typeof ResizeObserver<"u"&&(Fe=new ResizeObserver(me),Array.from(he.current.children).forEach(Ue=>{Fe.observe(Ue)})),typeof MutationObserver<"u"&&(ee=new MutationObserver(Je),ee.observe(he.current,{childList:!0})),()=>{var Ue,ye;me.clear(),gt.removeEventListener("resize",me),(Ue=ee)==null||Ue.disconnect(),(ye=Fe)==null||ye.disconnect()}},[Le,Ee]),T.useEffect(()=>{const me=Array.from(he.current.children),Fe=me.length;if(typeof IntersectionObserver<"u"&&Fe>0&&D&&b!==!1){const Je=me[0],gt=me[Fe-1],ee={root:De.current,threshold:.99},Ue=Ke=>{$e(!Ke[0].isIntersecting)},ye=new IntersectionObserver(Ue,ee);ye.observe(Je);const Pe=Ke=>{Ve(!Ke[0].isIntersecting)},We=new IntersectionObserver(Pe,ee);return We.observe(gt),()=>{ye.disconnect(),We.disconnect()}}},[D,b,se,u==null?void 0:u.length]),T.useEffect(()=>{ce(!0)},[]),T.useEffect(()=>{Le()}),T.useEffect(()=>{Ae(M4!==_e)},[Ae,_e]),T.useImperativeHandle(l,()=>({updateIndicator:Le,updateScrollButtons:Ee}),[Le,Ee]);const bt=E.jsx(Fte,$({},P,{className:lt(Q.indicator,P.className),ownerState:K,style:$({},_e,P.style)}));let ke=0;const it=T.Children.map(u,me=>{if(!T.isValidElement(me))return null;const Fe=me.props.value===void 0?ke:me.props.value;Re.set(Fe,ke);const Je=Fe===k;return ke+=1,T.cloneElement(me,$({fullWidth:C==="fullWidth",indicator:Je&&!J&&bt,selected:Je,selectionFollowsFocus:_,onChange:x,textColor:L,value:Fe},ke===1&&k===!1&&!me.props.tabIndex?{tabIndex:0}:{}))}),Oe=me=>{const Fe=he.current,Je=Fi(Fe).activeElement;if(Je.getAttribute("role")!=="tab")return;let ee=y==="horizontal"?"ArrowLeft":"ArrowUp",Ue=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&o&&(ee="ArrowRight",Ue="ArrowLeft"),me.key){case ee:me.preventDefault(),sv(Fe,Je,S4);break;case Ue:me.preventDefault(),sv(Fe,Je,w4);break;case"Home":me.preventDefault(),sv(Fe,null,w4);break;case"End":me.preventDefault(),sv(Fe,null,S4);break}},Ye=He();return E.jsxs(Lte,$({className:lt(Q.root,f),ownerState:K,ref:n,as:h},z,{children:[Ye.scrollButtonStart,Ye.scrollbarSizeListener,E.jsxs(Ote,{className:Q.scroller,ownerState:K,style:{overflow:W.overflow,[B?`margin${o?"Left":"Right"}`:"marginBottom"]:N?void 0:-W.scrollbarWidth},ref:De,children:[E.jsx(Dte,{"aria-label":s,"aria-labelledby":a,"aria-orientation":y==="vertical"?"vertical":null,className:Q.flexContainer,ownerState:K,onKeyDown:Oe,ref:he,role:"tablist",children:it}),J&&bt]}),Ye.scrollButtonEnd]}))});function Bte(t){return Tt("MuiTextField",t)}Ct("MuiTextField",["root"]);const jte=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Vte={standard:MR,filled:SR,outlined:CR},$te=t=>{const{classes:e}=t;return Rt({root:["root"]},Bte,e)},Wte=Ge(d6,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Hte=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:f=!1,FormHelperTextProps:h,fullWidth:m=!1,helperText:v,id:x,InputLabelProps:y,inputProps:g,InputProps:b,inputRef:_,label:S,maxRows:A,minRows:P,multiline:R=!1,name:L,onBlur:k,onChange:C,onFocus:N,placeholder:z,required:D=!1,rows:B,select:G=!1,SelectProps:X,type:Z,value:F,variant:q="outlined"}=r,K=et(r,jte),Q=$({},r,{autoFocus:o,color:l,disabled:u,error:f,fullWidth:m,multiline:R,required:D,select:G,variant:q}),de=$te(Q),fe={};q==="outlined"&&(y&&typeof y.shrink<"u"&&(fe.notched=y.shrink),fe.label=S),G&&((!X||!X.native)&&(fe.id=void 0),fe["aria-describedby"]=void 0);const J=jz(x),ce=v&&J?`${J}-helper-text`:void 0,_e=S&&J?`${J}-label`:void 0,be=Vte[q],Xe=E.jsx(be,$({"aria-describedby":ce,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:m,multiline:R,name:L,rows:B,maxRows:A,minRows:P,type:Z,value:F,id:J,inputRef:_,onBlur:k,onChange:C,onFocus:N,placeholder:z,inputProps:g},fe,b));return E.jsxs(Wte,$({className:lt(de.root,a),disabled:u,error:f,fullWidth:m,ref:n,required:D,color:l,variant:q,ownerState:Q},K,{children:[S!=null&&S!==""&&E.jsx(m6,$({htmlFor:J,id:_e},y,{children:S})),G?E.jsx(RR,$({"aria-describedby":ce,id:J,labelId:_e,value:F,input:Xe},X,{children:s})):Xe,v&&E.jsx(AJ,$({id:ce},h,{children:v}))]}))});/** +`),Co.rippleVisible,fK,X2,({theme:t})=>t.transitions.easing.easeInOut,Co.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,Co.child,Co.childLeaving,dK,X2,({theme:t})=>t.transitions.easing.easeInOut,Co.childPulsate,hK,({theme:t})=>t.transitions.easing.easeInOut),gK=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=et(r,cK),[l,c]=T.useState([]),u=T.useRef(0),f=T.useRef(null);T.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const h=T.useRef(!1),m=Vz(),v=T.useRef(null),x=T.useRef(null),y=T.useCallback(S=>{const{pulsate:A,rippleX:P,rippleY:R,rippleSize:L,cb:k}=S;c(C=>[...C,E.jsx(mK,{classes:{ripple:lt(o.ripple,Co.ripple),rippleVisible:lt(o.rippleVisible,Co.rippleVisible),ripplePulsate:lt(o.ripplePulsate,Co.ripplePulsate),child:lt(o.child,Co.child),childLeaving:lt(o.childLeaving,Co.childLeaving),childPulsate:lt(o.childPulsate,Co.childPulsate)},timeout:X2,pulsate:A,rippleX:P,rippleY:R,rippleSize:L},u.current)]),u.current+=1,f.current=k},[o]),g=T.useCallback((S={},A={},P=()=>{})=>{const{pulsate:R=!1,center:L=i||A.pulsate,fakeElement:k=!1}=A;if((S==null?void 0:S.type)==="mousedown"&&h.current){h.current=!1;return}(S==null?void 0:S.type)==="touchstart"&&(h.current=!0);const C=k?null:x.current,N=C?C.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,D,B;if(L||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)z=Math.round(N.width/2),D=Math.round(N.height/2);else{const{clientX:G,clientY:X}=S.touches&&S.touches.length>0?S.touches[0]:S;z=Math.round(G-N.left),D=Math.round(X-N.top)}if(L)B=Math.sqrt((2*N.width**2+N.height**2)/3),B%2===0&&(B+=1);else{const G=Math.max(Math.abs((C?C.clientWidth:0)-z),z)*2+2,X=Math.max(Math.abs((C?C.clientHeight:0)-D),D)*2+2;B=Math.sqrt(G**2+X**2)}S!=null&&S.touches?v.current===null&&(v.current=()=>{y({pulsate:R,rippleX:z,rippleY:D,rippleSize:B,cb:P})},m.start(uK,()=>{v.current&&(v.current(),v.current=null)})):y({pulsate:R,rippleX:z,rippleY:D,rippleSize:B,cb:P})},[i,y,m]),b=T.useCallback(()=>{g({},{pulsate:!0})},[g]),_=T.useCallback((S,A)=>{if(m.clear(),(S==null?void 0:S.type)==="touchend"&&v.current){v.current(),v.current=null,m.start(0,()=>{_(S,A)});return}v.current=null,c(P=>P.length>0?P.slice(1):P),f.current=A},[m]);return T.useImperativeHandle(n,()=>({pulsate:b,start:g,stop:_}),[b,g,_]),E.jsx(pK,$({className:lt(Co.root,o.root,s),ref:x},a,{children:E.jsx(bR,{component:null,exit:!0,children:l})}))});function vK(t){return Tt("MuiButtonBase",t)}const yK=Ct("MuiButtonBase",["root","disabled","focusVisible"]),xK=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],bK=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:i}=t,s=Rt({root:["root",e&&"disabled",n&&"focusVisible"]},vK,i);return n&&r&&(s.root+=` ${r}`),s},_K=Ge("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${yK.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),_u=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:f=!1,focusRipple:h=!1,LinkComponent:m="a",onBlur:v,onClick:x,onContextMenu:y,onDragLeave:g,onFocus:b,onFocusVisible:_,onKeyDown:S,onKeyUp:A,onMouseDown:P,onMouseLeave:R,onMouseUp:L,onTouchEnd:k,onTouchMove:C,onTouchStart:N,tabIndex:z=0,TouchRippleProps:D,touchRippleRef:B,type:G}=r,X=et(r,xK),Z=T.useRef(null),F=T.useRef(null),q=Er(F,B),{isFocusVisibleRef:K,onFocus:Q,onBlur:de,ref:fe}=$z(),[J,ce]=T.useState(!1);c&&J&&ce(!1),T.useImperativeHandle(i,()=>({focusVisible:()=>{ce(!0),Z.current.focus()}}),[]);const[_e,be]=T.useState(!1);T.useEffect(()=>{be(!0)},[]);const Xe=_e&&!u&&!c;T.useEffect(()=>{J&&h&&!u&&_e&&F.current.pulsate()},[u,h,J,_e]);function $e(Ee,bt,ke=f){return _a(it=>(bt&&bt(it),!ke&&F.current&&F.current[Ee](it),!0))}const tt=$e("start",P),Ve=$e("stop",y),se=$e("stop",g),ae=$e("stop",L),W=$e("stop",Ee=>{J&&Ee.preventDefault(),R&&R(Ee)}),Ie=$e("start",N),Re=$e("stop",k),De=$e("stop",C),he=$e("stop",Ee=>{de(Ee),K.current===!1&&ce(!1),v&&v(Ee)},!1),qe=_a(Ee=>{Z.current||(Z.current=Ee.currentTarget),Q(Ee),K.current===!0&&(ce(!0),_&&_(Ee)),b&&b(Ee)}),Le=()=>{const Ee=Z.current;return l&&l!=="button"&&!(Ee.tagName==="A"&&Ee.href)},V=T.useRef(!1),U=_a(Ee=>{h&&!V.current&&J&&F.current&&Ee.key===" "&&(V.current=!0,F.current.stop(Ee,()=>{F.current.start(Ee)})),Ee.target===Ee.currentTarget&&Le()&&Ee.key===" "&&Ee.preventDefault(),S&&S(Ee),Ee.target===Ee.currentTarget&&Le()&&Ee.key==="Enter"&&!c&&(Ee.preventDefault(),x&&x(Ee))}),ne=_a(Ee=>{h&&Ee.key===" "&&F.current&&J&&!Ee.defaultPrevented&&(V.current=!1,F.current.stop(Ee,()=>{F.current.pulsate(Ee)})),A&&A(Ee),x&&Ee.target===Ee.currentTarget&&Le()&&Ee.key===" "&&!Ee.defaultPrevented&&x(Ee)});let le=l;le==="button"&&(X.href||X.to)&&(le=m);const Ce={};le==="button"?(Ce.type=G===void 0?"button":G,Ce.disabled=c):(!X.href&&!X.to&&(Ce.role="button"),c&&(Ce["aria-disabled"]=c));const ve=Er(n,fe,Z),He=$({},r,{centerRipple:o,component:l,disabled:c,disableRipple:u,disableTouchRipple:f,focusRipple:h,tabIndex:z,focusVisible:J}),Ae=bK(He);return E.jsxs(_K,$({as:le,className:lt(Ae.root,a),ownerState:He,onBlur:he,onClick:x,onContextMenu:Ve,onFocus:qe,onKeyDown:U,onKeyUp:ne,onMouseDown:tt,onMouseLeave:W,onMouseUp:ae,onDragLeave:se,onTouchEnd:Re,onTouchMove:De,onTouchStart:Ie,ref:ve,tabIndex:c?-1:z,type:G},Ce,X,{children:[s,Xe?E.jsx(gK,$({ref:q,center:o},D)):null]}))});function wK(t){return Tt("MuiTypography",t)}Ct("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const SK=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],MK=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=t,a={root:["root",o,t.align!=="inherit"&&`align${xt(e)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Rt(a,wK,s)},EK=Ge("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${xt(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>$({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),QN={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},CK={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},TK=t=>CK[t]||t,ar=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTypography"}),i=TK(r.color),o=ag($({},r,{color:i})),{align:s="inherit",className:a,component:l,gutterBottom:c=!1,noWrap:u=!1,paragraph:f=!1,variant:h="body1",variantMapping:m=QN}=o,v=et(o,SK),x=$({},o,{align:s,color:i,className:a,component:l,gutterBottom:c,noWrap:u,paragraph:f,variant:h,variantMapping:m}),y=l||(f?"p":m[h]||QN[h])||"span",g=MK(x);return E.jsx(EK,$({as:y,ref:n,ownerState:x,className:lt(g.root,a)},v))});function RK(t){return Tt("MuiAppBar",t)}Ct("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const AK=["className","color","enableColorOnDark","position"],PK=t=>{const{color:e,position:n,classes:r}=t,i={root:["root",`color${xt(e)}`,`position${xt(n)}`]};return Rt(i,RK,r)},rv=(t,e)=>t?`${t==null?void 0:t.replace(")","")}, ${e})`:e,IK=Ge(bu,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${xt(n.position)}`],e[`color${xt(n.color)}`]]}})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[900];return $({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},e.position==="fixed"&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},e.position==="absolute"&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="sticky"&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="static"&&{position:"static"},e.position==="relative"&&{position:"relative"},!t.vars&&$({},e.color==="default"&&{backgroundColor:n,color:t.palette.getContrastText(n)},e.color&&e.color!=="default"&&e.color!=="inherit"&&e.color!=="transparent"&&{backgroundColor:t.palette[e.color].main,color:t.palette[e.color].contrastText},e.color==="inherit"&&{color:"inherit"},t.palette.mode==="dark"&&!e.enableColorOnDark&&{backgroundColor:null,color:null},e.color==="transparent"&&$({backgroundColor:"transparent",color:"inherit"},t.palette.mode==="dark"&&{backgroundImage:"none"})),t.vars&&$({},e.color==="default"&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette.AppBar.defaultBg:rv(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:rv(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},e.color&&!e.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette[e.color].main:rv(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:rv(t.vars.palette.AppBar.darkColor,t.vars.palette[e.color].contrastText)},!["inherit","transparent"].includes(e.color)&&{backgroundColor:"var(--AppBar-background)"},{color:e.color==="inherit"?"inherit":"var(--AppBar-color)"},e.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),NK=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed"}=r,l=et(r,AK),c=$({},r,{color:o,position:a,enableColorOnDark:s}),u=PK(c);return E.jsx(IK,$({square:!0,component:"header",ownerState:c,elevation:4,className:lt(u.root,i,a==="fixed"&&"mui-fixed"),ref:n},l))});function kK(t){return typeof t=="function"?t():t}const LK=T.forwardRef(function(e,n){const{children:r,container:i,disablePortal:o=!1}=e,[s,a]=T.useState(null),l=Er(T.isValidElement(r)?r.ref:null,n);if(Oo(()=>{o||a(kK(i)||document.body)},[i,o]),Oo(()=>{if(s&&!o)return j2(n,s),()=>{j2(n,null)}},[n,s,o]),o){if(T.isValidElement(r)){const c={ref:l};return T.cloneElement(r,c)}return E.jsx(T.Fragment,{children:r})}return E.jsx(T.Fragment,{children:s&&Vl.createPortal(r,s)})}),OK=["onChange","maxRows","minRows","style","value"];function iv(t){return parseInt(t,10)||0}const DK={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function FK(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflowing}const zK=T.forwardRef(function(e,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=e,l=et(e,OK),{current:c}=T.useRef(a!=null),u=T.useRef(null),f=Er(n,u),h=T.useRef(null),m=T.useRef(null),v=T.useCallback(()=>{const g=u.current,_=La(g).getComputedStyle(g);if(_.width==="0px")return{outerHeightStyle:0,overflowing:!1};const S=m.current;S.style.width=_.width,S.value=g.value||e.placeholder||"x",S.value.slice(-1)===` +`&&(S.value+=" ");const A=_.boxSizing,P=iv(_.paddingBottom)+iv(_.paddingTop),R=iv(_.borderBottomWidth)+iv(_.borderTopWidth),L=S.scrollHeight;S.value="x";const k=S.scrollHeight;let C=L;o&&(C=Math.max(Number(o)*k,C)),i&&(C=Math.min(Number(i)*k,C)),C=Math.max(C,k);const N=C+(A==="border-box"?P+R:0),z=Math.abs(C-L)<=1;return{outerHeightStyle:N,overflowing:z}},[i,o,e.placeholder]),x=T.useCallback(()=>{const g=v();if(FK(g))return;const b=g.outerHeightStyle,_=u.current;h.current!==b&&(h.current=b,_.style.height=`${b}px`),_.style.overflow=g.overflowing?"hidden":""},[v]);Oo(()=>{const g=()=>{x()};let b;const _=$b(g),S=u.current,A=La(S);A.addEventListener("resize",_);let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(g),P.observe(S)),()=>{_.clear(),cancelAnimationFrame(b),A.removeEventListener("resize",_),P&&P.disconnect()}},[v,x]),Oo(()=>{x()});const y=g=>{c||x(),r&&r(g)};return E.jsxs(T.Fragment,{children:[E.jsx("textarea",$({value:a,onChange:y,ref:f,rows:o,style:s},l)),E.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:m,tabIndex:-1,style:$({},DK.shadow,s,{paddingTop:0,paddingBottom:0})})]})});function Zd({props:t,states:e,muiFormControl:n}){return e.reduce((r,i)=>(r[i]=t[i],n&&typeof t[i]>"u"&&(r[i]=n[i]),r),{})}const _R=T.createContext(void 0);function wu(){return T.useContext(_R)}function u6(t){return E.jsx(AX,$({},t,{defaultTheme:vR,themeId:bd}))}function e4(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function C1(t,e=!1){return t&&(e4(t.value)&&t.value!==""||e&&e4(t.defaultValue)&&t.defaultValue!=="")}function UK(t){return t.startAdornment}function BK(t){return Tt("MuiInputBase",t)}const Md=Ct("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),jK=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Xb=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${xt(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},qb=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},VK=t=>{const{classes:e,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:f,size:h,startAdornment:m,type:v}=t,x={root:["root",`color${xt(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",h&&h!=="medium"&&`size${xt(h)}`,u&&"multiline",m&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",v==="search"&&"inputTypeSearch",u&&"inputMultiline",h==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",o&&"inputAdornedEnd",f&&"readOnly"]};return Rt(x,BK,e)},Yb=Ge("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Xb})(({theme:t,ownerState:e})=>$({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Md.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&$({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),Kb=Ge("input",{name:"MuiInputBase",slot:"Input",overridesResolver:qb})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=$({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},o=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return $({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Md.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Md.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}),$K=E.jsx(u6,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),wR=T.forwardRef(function(e,n){var r;const i=At({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:s,autoFocus:a,className:l,components:c={},componentsProps:u={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:m,endAdornment:v,fullWidth:x=!1,id:y,inputComponent:g="input",inputProps:b={},inputRef:_,maxRows:S,minRows:A,multiline:P=!1,name:R,onBlur:L,onChange:k,onClick:C,onFocus:N,onKeyDown:z,onKeyUp:D,placeholder:B,readOnly:G,renderSuffix:X,rows:Z,slotProps:F={},slots:q={},startAdornment:K,type:Q="text",value:de}=i,fe=et(i,jK),J=b.value!=null?b.value:de,{current:ce}=T.useRef(J!=null),_e=T.useRef(),be=T.useCallback(Ae=>{},[]),Xe=Er(_e,_,b.ref,be),[$e,tt]=T.useState(!1),Ve=wu(),se=Zd({props:i,muiFormControl:Ve,states:["color","disabled","error","hiddenLabel","size","required","filled"]});se.focused=Ve?Ve.focused:$e,T.useEffect(()=>{!Ve&&h&&$e&&(tt(!1),L&&L())},[Ve,h,$e,L]);const ae=Ve&&Ve.onFilled,W=Ve&&Ve.onEmpty,Ie=T.useCallback(Ae=>{C1(Ae)?ae&&ae():W&&W()},[ae,W]);Oo(()=>{ce&&Ie({value:J})},[J,Ie,ce]);const Re=Ae=>{if(se.disabled){Ae.stopPropagation();return}N&&N(Ae),b.onFocus&&b.onFocus(Ae),Ve&&Ve.onFocus?Ve.onFocus(Ae):tt(!0)},De=Ae=>{L&&L(Ae),b.onBlur&&b.onBlur(Ae),Ve&&Ve.onBlur?Ve.onBlur(Ae):tt(!1)},he=(Ae,...Ee)=>{if(!ce){const bt=Ae.target||_e.current;if(bt==null)throw new Error(ka(1));Ie({value:bt.value})}b.onChange&&b.onChange(Ae,...Ee),k&&k(Ae,...Ee)};T.useEffect(()=>{Ie(_e.current)},[]);const qe=Ae=>{_e.current&&Ae.currentTarget===Ae.target&&_e.current.focus(),C&&C(Ae)};let Le=g,V=b;P&&Le==="input"&&(Z?V=$({type:void 0,minRows:Z,maxRows:Z},V):V=$({type:void 0,maxRows:S,minRows:A},V),Le=zK);const U=Ae=>{Ie(Ae.animationName==="mui-auto-fill-cancel"?_e.current:{value:"x"})};T.useEffect(()=>{Ve&&Ve.setAdornedStart(!!K)},[Ve,K]);const ne=$({},i,{color:se.color||"primary",disabled:se.disabled,endAdornment:v,error:se.error,focused:se.focused,formControl:Ve,fullWidth:x,hiddenLabel:se.hiddenLabel,multiline:P,size:se.size,startAdornment:K,type:Q}),le=VK(ne),Ce=q.root||c.Root||Yb,ve=F.root||u.root||{},He=q.input||c.Input||Kb;return V=$({},V,(r=F.input)!=null?r:u.input),E.jsxs(T.Fragment,{children:[!m&&$K,E.jsxs(Ce,$({},ve,!Sd(Ce)&&{ownerState:$({},ne,ve.ownerState)},{ref:n,onClick:qe},fe,{className:lt(le.root,ve.className,l,G&&"MuiInputBase-readOnly"),children:[K,E.jsx(_R.Provider,{value:null,children:E.jsx(He,$({ownerState:ne,"aria-invalid":se.error,"aria-describedby":o,autoComplete:s,autoFocus:a,defaultValue:f,disabled:se.disabled,id:y,onAnimationStart:U,name:R,placeholder:B,readOnly:G,required:se.required,rows:Z,value:J,onKeyDown:z,onKeyUp:D,type:Q},V,!Sd(He)&&{as:Le,ownerState:$({},ne,V.ownerState)},{ref:Xe,className:lt(le.input,V.className,G&&"MuiInputBase-readOnly"),onBlur:De,onChange:he,onFocus:Re}))}),v,X?X($({},se,{startAdornment:K})):null]}))]})});function WK(t){return Tt("MuiInput",t)}const jh=$({},Md,Ct("MuiInput",["root","underline","input"]));function HK(t){return Tt("MuiOutlinedInput",t)}const tl=$({},Md,Ct("MuiOutlinedInput",["root","notchedOutline","input"]));function GK(t){return Tt("MuiFilledInput",t)}const oc=$({},Md,Ct("MuiFilledInput",["root","underline","input"])),XK=Kd(E.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),qK=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],YK={entering:{opacity:1},entered:{opacity:1}},KK=T.forwardRef(function(e,n){const r=xu(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:f,onEntering:h,onExit:m,onExited:v,onExiting:x,style:y,timeout:g=i,TransitionComponent:b=Ks}=e,_=et(e,qK),S=T.useRef(null),A=Er(S,a.ref,n),P=B=>G=>{if(B){const X=S.current;G===void 0?B(X):B(X,G)}},R=P(h),L=P((B,G)=>{c6(B);const X=E1({style:y,timeout:g,easing:l},{mode:"enter"});B.style.webkitTransition=r.transitions.create("opacity",X),B.style.transition=r.transitions.create("opacity",X),u&&u(B,G)}),k=P(f),C=P(x),N=P(B=>{const G=E1({style:y,timeout:g,easing:l},{mode:"exit"});B.style.webkitTransition=r.transitions.create("opacity",G),B.style.transition=r.transitions.create("opacity",G),m&&m(B)}),z=P(v),D=B=>{o&&o(S.current,B)};return E.jsx(b,$({appear:s,in:c,nodeRef:S,onEnter:L,onEntered:k,onEntering:R,onExit:N,onExited:z,onExiting:C,addEndListener:D,timeout:g},_,{children:(B,G)=>T.cloneElement(a,$({style:$({opacity:0,visibility:B==="exited"&&!c?"hidden":void 0},YK[B],y,a.props.style),ref:A},G))}))});function ZK(t){return Tt("MuiBackdrop",t)}Ct("MuiBackdrop",["root","invisible"]);const JK=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],QK=t=>{const{classes:e,invisible:n}=t;return Rt({root:["root",n&&"invisible"]},ZK,e)},eZ=Ge("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>$({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),tZ=T.forwardRef(function(e,n){var r,i,o;const s=At({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:c="div",components:u={},componentsProps:f={},invisible:h=!1,open:m,slotProps:v={},slots:x={},TransitionComponent:y=KK,transitionDuration:g}=s,b=et(s,JK),_=$({},s,{component:c,invisible:h}),S=QK(_),A=(r=v.root)!=null?r:f.root;return E.jsx(y,$({in:m,timeout:g},b,{children:E.jsx(eZ,$({"aria-hidden":!0},A,{as:(i=(o=x.root)!=null?o:u.Root)!=null?i:c,className:lt(S.root,l,A==null?void 0:A.className),ownerState:$({},_,A==null?void 0:A.ownerState),classes:S,ref:n,children:a}))}))}),nZ=Ct("MuiBox",["root"]),rZ=gR(),Hs=OX({themeId:bd,defaultTheme:rZ,defaultClassName:nZ.root,generateClassName:Tz.generate});function iZ(t){return Tt("MuiButton",t)}const ov=Ct("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),oZ=T.createContext({}),sZ=T.createContext(void 0),aZ=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],lZ=t=>{const{color:e,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=t,a={root:["root",o,`${o}${xt(e)}`,`size${xt(i)}`,`${o}Size${xt(i)}`,`color${xt(e)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${xt(i)}`],endIcon:["icon","endIcon",`iconSize${xt(i)}`]},l=Rt(a,iZ,s);return $({},s,l)},f6=t=>$({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),cZ=Ge(_u,{shouldForwardProp:t=>gi(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${xt(n.color)}`],e[`size${xt(n.size)}`],e[`${n.variant}Size${xt(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var n,r;const i=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],o=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return $({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":$({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Pn(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Pn(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Pn(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":$({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${ov.focusVisible}`]:$({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${ov.disabled}`]:$({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${Pn(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(n=(r=t.palette).getContrastText)==null?void 0:n.call(r,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ov.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ov.disabled}`]:{boxShadow:"none"}}),uZ=Ge("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,e[`iconSize${xt(n.size)}`]]}})(({ownerState:t})=>$({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},f6(t))),fZ=Ge("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,e[`iconSize${xt(n.size)}`]]}})(({ownerState:t})=>$({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},f6(t))),cu=T.forwardRef(function(e,n){const r=T.useContext(oZ),i=T.useContext(sZ),o=ym(r,e),s=At({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:m=!1,endIcon:v,focusVisibleClassName:x,fullWidth:y=!1,size:g="medium",startIcon:b,type:_,variant:S="text"}=s,A=et(s,aZ),P=$({},s,{color:l,component:c,disabled:f,disableElevation:h,disableFocusRipple:m,fullWidth:y,size:g,type:_,variant:S}),R=lZ(P),L=b&&E.jsx(uZ,{className:R.startIcon,ownerState:P,children:b}),k=v&&E.jsx(fZ,{className:R.endIcon,ownerState:P,children:v}),C=i||"";return E.jsxs(cZ,$({ownerState:P,className:lt(r.className,R.root,u,C),component:c,disabled:f,focusRipple:!m,focusVisibleClassName:lt(R.focusVisible,x),ref:n,type:_},A,{classes:R,children:[L,a,k]}))});function dZ(t){return Tt("MuiCard",t)}Ct("MuiCard",["root"]);const hZ=["className","raised"],pZ=t=>{const{classes:e}=t;return Rt({root:["root"]},dZ,e)},mZ=Ge(bu,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"})),gZ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiCard"}),{className:i,raised:o=!1}=r,s=et(r,hZ),a=$({},r,{raised:o}),l=pZ(a);return E.jsx(mZ,$({className:lt(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a},s))});function vZ(t){return Tt("MuiCardActions",t)}Ct("MuiCardActions",["root","spacing"]);const yZ=["disableSpacing","className"],xZ=t=>{const{classes:e,disableSpacing:n}=t;return Rt({root:["root",!n&&"spacing"]},vZ,e)},bZ=Ge("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>$({display:"flex",alignItems:"center",padding:8},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),_Z=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiCardActions"}),{disableSpacing:i=!1,className:o}=r,s=et(r,yZ),a=$({},r,{disableSpacing:i}),l=xZ(a);return E.jsx(bZ,$({className:lt(l.root,o),ownerState:a,ref:n},s))});function wZ(t){return Tt("MuiCardContent",t)}Ct("MuiCardContent",["root"]);const SZ=["className","component"],MZ=t=>{const{classes:e}=t;return Rt({root:["root"]},wZ,e)},EZ=Ge("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),CZ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiCardContent"}),{className:i,component:o="div"}=r,s=et(r,SZ),a=$({},r,{component:o}),l=MZ(a);return E.jsx(EZ,$({as:o,className:lt(l.root,i),ownerState:a,ref:n},s))});function TZ(t){return Tt("PrivateSwitchBase",t)}Ct("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const RZ=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],AZ=t=>{const{classes:e,checked:n,disabled:r,edge:i}=t,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${xt(i)}`],input:["input"]};return Rt(o,TZ,e)},PZ=Ge(_u)(({ownerState:t})=>$({padding:9,borderRadius:"50%"},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12})),IZ=Ge("input",{shouldForwardProp:gi})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),NZ=T.forwardRef(function(e,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:f,id:h,inputProps:m,inputRef:v,name:x,onBlur:y,onChange:g,onFocus:b,readOnly:_,required:S=!1,tabIndex:A,type:P,value:R}=e,L=et(e,RZ),[k,C]=V2({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),N=wu(),z=q=>{b&&b(q),N&&N.onFocus&&N.onFocus(q)},D=q=>{y&&y(q),N&&N.onBlur&&N.onBlur(q)},B=q=>{if(q.nativeEvent.defaultPrevented)return;const K=q.target.checked;C(K),g&&g(q,K)};let G=l;N&&typeof G>"u"&&(G=N.disabled);const X=P==="checkbox"||P==="radio",Z=$({},e,{checked:k,disabled:G,disableFocusRipple:c,edge:u}),F=AZ(Z);return E.jsxs(PZ,$({component:"span",className:lt(F.root,s),centerRipple:!0,focusRipple:!c,disabled:G,tabIndex:null,role:void 0,onFocus:z,onBlur:D,ownerState:Z,ref:n},L,{children:[E.jsx(IZ,$({autoFocus:r,checked:i,defaultChecked:a,className:F.input,disabled:G,id:X?h:void 0,name:x,onChange:B,readOnly:_,ref:v,required:S,ownerState:Z,tabIndex:A,type:P},P==="checkbox"&&R===void 0?{}:{value:R},m)),k?o:f]}))}),kZ=Kd(E.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),LZ=Kd(E.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),OZ=Kd(E.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function DZ(t){return Tt("MuiCheckbox",t)}const KS=Ct("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),FZ=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],zZ=t=>{const{classes:e,indeterminate:n,color:r,size:i}=t,o={root:["root",n&&"indeterminate",`color${xt(r)}`,`size${xt(i)}`]},s=Rt(o,DZ,e);return $({},e,s)},UZ=Ge(NZ,{shouldForwardProp:t=>gi(t)||t==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.indeterminate&&e.indeterminate,e[`size${xt(n.size)}`],n.color!=="default"&&e[`color${xt(n.color)}`]]}})(({theme:t,ownerState:e})=>$({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Pn(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${KS.checked}, &.${KS.indeterminate}`]:{color:(t.vars||t).palette[e.color].main},[`&.${KS.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),BZ=E.jsx(LZ,{}),jZ=E.jsx(kZ,{}),VZ=E.jsx(OZ,{}),$Z=T.forwardRef(function(e,n){var r,i;const o=At({props:e,name:"MuiCheckbox"}),{checkedIcon:s=BZ,color:a="primary",icon:l=jZ,indeterminate:c=!1,indeterminateIcon:u=VZ,inputProps:f,size:h="medium",className:m}=o,v=et(o,FZ),x=c?u:l,y=c?u:s,g=$({},o,{color:a,indeterminate:c,size:h}),b=zZ(g);return E.jsx(UZ,$({type:"checkbox",inputProps:$({"data-indeterminate":c},f),icon:T.cloneElement(x,{fontSize:(r=x.props.fontSize)!=null?r:h}),checkedIcon:T.cloneElement(y,{fontSize:(i=y.props.fontSize)!=null?i:h}),ownerState:g,ref:n,className:lt(b.root,m)},v,{classes:b}))}),WZ=Nq({createStyledComponent:Ge("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`maxWidth${xt(String(n.maxWidth))}`],n.fixed&&e.fixed,n.disableGutters&&e.disableGutters]}}),useThemeProps:t=>At({props:t,name:"MuiContainer"})}),HZ=(t,e)=>$({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),GZ=t=>$({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),XZ=(t,e=!1)=>{var n;const r={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([s,a])=>{var l;r[t.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=a.palette)==null?void 0:l.mode}});let i=$({html:HZ(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:$({margin:0},GZ(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const o=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return o&&(i=[i,o]),i};function qZ(t){const e=At({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return E.jsxs(T.Fragment,{children:[E.jsx(u6,{styles:i=>XZ(i,r)}),n]})}function YZ(t){const e=Fi(t);return e.body===t?La(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Ip(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function t4(t){return parseInt(La(t).getComputedStyle(t).paddingRight,10)||0}function KZ(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function n4(t,e,n,r,i){const o=[e,n,...r];[].forEach.call(t.children,s=>{const a=o.indexOf(s)===-1,l=!KZ(s);a&&l&&Ip(s,i)})}function ZS(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function ZZ(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(YZ(r)){const s=Wz(Fi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${t4(r)+s}px`;const a=Fi(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${t4(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Fi(r).body;else{const s=r.parentElement,a=La(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function JZ(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class QZ{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Ip(e.modalRef,!1);const i=JZ(n);n4(n,e.mount,e.modalRef,i,!0);const o=ZS(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=ZS(this.containers,o=>o.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=ZZ(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=ZS(this.containers,s=>s.modals.indexOf(e)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),e.modalRef&&Ip(e.modalRef,n),n4(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Ip(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const eJ=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function tJ(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function nJ(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function rJ(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||nJ(t))}function iJ(t){const e=[],n=[];return Array.from(t.querySelectorAll(eJ)).forEach((r,i)=>{const o=tJ(r);o===-1||!rJ(r)||(o===0?e.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function oJ(){return!0}function sJ(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=iJ,isEnabled:s=oJ,open:a}=t,l=T.useRef(!1),c=T.useRef(null),u=T.useRef(null),f=T.useRef(null),h=T.useRef(null),m=T.useRef(!1),v=T.useRef(null),x=Er(e.ref,v),y=T.useRef(null);T.useEffect(()=>{!a||!v.current||(m.current=!n)},[n,a]),T.useEffect(()=>{if(!a||!v.current)return;const _=Fi(v.current);return v.current.contains(_.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),m.current&&v.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[a]),T.useEffect(()=>{if(!a||!v.current)return;const _=Fi(v.current),S=R=>{y.current=R,!(r||!s()||R.key!=="Tab")&&_.activeElement===v.current&&R.shiftKey&&(l.current=!0,u.current&&u.current.focus())},A=()=>{const R=v.current;if(R===null)return;if(!_.hasFocus()||!s()||l.current){l.current=!1;return}if(R.contains(_.activeElement)||r&&_.activeElement!==c.current&&_.activeElement!==u.current)return;if(_.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!m.current)return;let L=[];if((_.activeElement===c.current||_.activeElement===u.current)&&(L=o(v.current)),L.length>0){var k,C;const N=!!((k=y.current)!=null&&k.shiftKey&&((C=y.current)==null?void 0:C.key)==="Tab"),z=L[0],D=L[L.length-1];typeof z!="string"&&typeof D!="string"&&(N?D.focus():z.focus())}else R.focus()};_.addEventListener("focusin",A),_.addEventListener("keydown",S,!0);const P=setInterval(()=>{_.activeElement&&_.activeElement.tagName==="BODY"&&A()},50);return()=>{clearInterval(P),_.removeEventListener("focusin",A),_.removeEventListener("keydown",S,!0)}},[n,r,i,s,a,o]);const g=_=>{f.current===null&&(f.current=_.relatedTarget),m.current=!0,h.current=_.target;const S=e.props.onFocus;S&&S(_)},b=_=>{f.current===null&&(f.current=_.relatedTarget),m.current=!0};return E.jsxs(T.Fragment,{children:[E.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:c,"data-testid":"sentinelStart"}),T.cloneElement(e,{ref:x,onFocus:g}),E.jsx("div",{tabIndex:a?0:-1,onFocus:b,ref:u,"data-testid":"sentinelEnd"})]})}function aJ(t){return typeof t=="function"?t():t}function lJ(t){return t?t.props.hasOwnProperty("in"):!1}const cJ=new QZ;function uJ(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=cJ,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:f}=t,h=T.useRef({}),m=T.useRef(null),v=T.useRef(null),x=Er(v,f),[y,g]=T.useState(!u),b=lJ(l);let _=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(_=!1);const S=()=>Fi(m.current),A=()=>(h.current.modalRef=v.current,h.current.mount=m.current,h.current),P=()=>{i.mount(A(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},R=_a(()=>{const X=aJ(e)||S().body;i.add(A(),X),v.current&&P()}),L=T.useCallback(()=>i.isTopModal(A()),[i]),k=_a(X=>{m.current=X,X&&(u&&L()?P():v.current&&Ip(v.current,_))}),C=T.useCallback(()=>{i.remove(A(),_)},[_,i]);T.useEffect(()=>()=>{C()},[C]),T.useEffect(()=>{u?R():(!b||!o)&&C()},[u,C,b,o,R]);const N=X=>Z=>{var F;(F=X.onKeyDown)==null||F.call(X,Z),!(Z.key!=="Escape"||Z.which===229||!L())&&(n||(Z.stopPropagation(),c&&c(Z,"escapeKeyDown")))},z=X=>Z=>{var F;(F=X.onClick)==null||F.call(X,Z),Z.target===Z.currentTarget&&c&&c(Z,"backdropClick")};return{getRootProps:(X={})=>{const Z=Gz(t);delete Z.onTransitionEnter,delete Z.onTransitionExited;const F=$({},Z,X);return $({role:"presentation"},F,{onKeyDown:N(F),ref:x})},getBackdropProps:(X={})=>{const Z=X;return $({"aria-hidden":!0},Z,{onClick:z(Z),open:u})},getTransitionProps:()=>{const X=()=>{g(!1),s&&s()},Z=()=>{g(!0),a&&a(),o&&C()};return{onEnter:IN(X,l==null?void 0:l.props.onEnter),onExited:IN(Z,l==null?void 0:l.props.onExited)}},rootRef:x,portalRef:k,isTopModal:L,exited:y,hasTransition:b}}function fJ(t){return Tt("MuiModal",t)}Ct("MuiModal",["root","hidden","backdrop"]);const dJ=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],hJ=t=>{const{open:e,exited:n,classes:r}=t;return Rt({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},fJ,r)},pJ=Ge("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>$({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),mJ=Ge(tZ,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),gJ=T.forwardRef(function(e,n){var r,i,o,s,a,l;const c=At({name:"MuiModal",props:e}),{BackdropComponent:u=mJ,BackdropProps:f,className:h,closeAfterTransition:m=!1,children:v,container:x,component:y,components:g={},componentsProps:b={},disableAutoFocus:_=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:A=!1,disablePortal:P=!1,disableRestoreFocus:R=!1,disableScrollLock:L=!1,hideBackdrop:k=!1,keepMounted:C=!1,onBackdropClick:N,open:z,slotProps:D,slots:B}=c,G=et(c,dJ),X=$({},c,{closeAfterTransition:m,disableAutoFocus:_,disableEnforceFocus:S,disableEscapeKeyDown:A,disablePortal:P,disableRestoreFocus:R,disableScrollLock:L,hideBackdrop:k,keepMounted:C}),{getRootProps:Z,getBackdropProps:F,getTransitionProps:q,portalRef:K,isTopModal:Q,exited:de,hasTransition:fe}=uJ($({},X,{rootRef:n})),J=$({},X,{exited:de}),ce=hJ(J),_e={};if(v.props.tabIndex===void 0&&(_e.tabIndex="-1"),fe){const{onEnter:ae,onExited:W}=q();_e.onEnter=ae,_e.onExited=W}const be=(r=(i=B==null?void 0:B.root)!=null?i:g.Root)!=null?r:pJ,Xe=(o=(s=B==null?void 0:B.backdrop)!=null?s:g.Backdrop)!=null?o:u,$e=(a=D==null?void 0:D.root)!=null?a:b.root,tt=(l=D==null?void 0:D.backdrop)!=null?l:b.backdrop,Ve=Ws({elementType:be,externalSlotProps:$e,externalForwardedProps:G,getSlotProps:Z,additionalProps:{ref:n,as:y},ownerState:J,className:lt(h,$e==null?void 0:$e.className,ce==null?void 0:ce.root,!J.open&&J.exited&&(ce==null?void 0:ce.hidden))}),se=Ws({elementType:Xe,externalSlotProps:tt,additionalProps:f,getSlotProps:ae=>F($({},ae,{onClick:W=>{N&&N(W),ae!=null&&ae.onClick&&ae.onClick(W)}})),className:lt(tt==null?void 0:tt.className,f==null?void 0:f.className,ce==null?void 0:ce.backdrop),ownerState:J});return!C&&!z&&(!fe||de)?null:E.jsx(LK,{ref:K,container:x,disablePortal:P,children:E.jsxs(be,$({},Ve,{children:[!k&&u?E.jsx(Xe,$({},se)):null,E.jsx(sJ,{disableEnforceFocus:S,disableAutoFocus:_,disableRestoreFocus:R,isEnabled:Q,open:z,children:T.cloneElement(v,_e)})]}))})}),r4=Ct("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),vJ=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],yJ=t=>{const{classes:e,disableUnderline:n}=t,i=Rt({root:["root",!n&&"underline"],input:["input"]},GK,e);return $({},e,i)},xJ=Ge(Yb,{shouldForwardProp:t=>gi(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Xb(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return $({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o}},[`&.${oc.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o},[`&.${oc.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:a}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${oc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${oc.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${oc.disabled}, .${oc.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${oc.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&$({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),bJ=Ge(Kb,{name:"MuiFilledInput",slot:"Input",overridesResolver:qb})(({theme:t,ownerState:e})=>$({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),SR=T.forwardRef(function(e,n){var r,i,o,s;const a=At({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:f="input",multiline:h=!1,slotProps:m,slots:v={},type:x="text"}=a,y=et(a,vJ),g=$({},a,{fullWidth:u,inputComponent:f,multiline:h,type:x}),b=yJ(a),_={root:{ownerState:g},input:{ownerState:g}},S=m??c?di(_,m??c):_,A=(r=(i=v.root)!=null?i:l.Root)!=null?r:xJ,P=(o=(s=v.input)!=null?s:l.Input)!=null?o:bJ;return E.jsx(wR,$({slots:{root:A,input:P},componentsProps:S,fullWidth:u,inputComponent:f,multiline:h,ref:n,type:x},y,{classes:b}))});SR.muiName="Input";function _J(t){return Tt("MuiFormControl",t)}Ct("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const wJ=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],SJ=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${xt(n)}`,r&&"fullWidth"]};return Rt(i,_J,e)},MJ=Ge("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>$({},e.root,e[`margin${xt(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>$({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),d6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:f=!1,hiddenLabel:h=!1,margin:m="none",required:v=!1,size:x="medium",variant:y="outlined"}=r,g=et(r,wJ),b=$({},r,{color:s,component:a,disabled:l,error:c,fullWidth:f,hiddenLabel:h,margin:m,required:v,size:x,variant:y}),_=SJ(b),[S,A]=T.useState(()=>{let D=!1;return i&&T.Children.forEach(i,B=>{if(!Oy(B,["Input","Select"]))return;const G=Oy(B,["Select"])?B.props.input:B;G&&UK(G.props)&&(D=!0)}),D}),[P,R]=T.useState(()=>{let D=!1;return i&&T.Children.forEach(i,B=>{Oy(B,["Input","Select"])&&(C1(B.props,!0)||C1(B.props.inputProps,!0))&&(D=!0)}),D}),[L,k]=T.useState(!1);l&&L&&k(!1);const C=u!==void 0&&!l?u:L;let N;const z=T.useMemo(()=>({adornedStart:S,setAdornedStart:A,color:s,disabled:l,error:c,filled:P,focused:C,fullWidth:f,hiddenLabel:h,size:x,onBlur:()=>{k(!1)},onEmpty:()=>{R(!1)},onFilled:()=>{R(!0)},onFocus:()=>{k(!0)},registerEffect:N,required:v,variant:y}),[S,s,l,c,P,C,f,h,N,v,x,y]);return E.jsx(_R.Provider,{value:z,children:E.jsx(MJ,$({as:a,ownerState:b,className:lt(_.root,o),ref:n},g,{children:i}))})}),is=Bq({createStyledComponent:Ge("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>At({props:t,name:"MuiStack"})});function EJ(t){return Tt("MuiFormHelperText",t)}const i4=Ct("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var o4;const CJ=["children","className","component","disabled","error","filled","focused","margin","required","variant"],TJ=t=>{const{classes:e,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=t,c={root:["root",i&&"disabled",o&&"error",r&&`size${xt(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return Rt(c,EJ,e)},RJ=Ge("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${xt(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>$({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${i4.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${i4.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),AJ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p"}=r,a=et(r,CJ),l=wu(),c=Zd({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=$({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=TJ(u);return E.jsx(RJ,$({as:s,ownerState:u,className:lt(f.root,o),ref:n},a,{children:i===" "?o4||(o4=E.jsx("span",{className:"notranslate",children:"​"})):i}))});function PJ(t){return Tt("MuiFormLabel",t)}const Np=Ct("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),IJ=["children","className","color","component","disabled","error","filled","focused","required"],NJ=t=>{const{classes:e,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=t,l={root:["root",`color${xt(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return Rt(l,PJ,e)},kJ=Ge("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>$({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>$({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Np.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Np.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Np.error}`]:{color:(t.vars||t).palette.error.main}})),LJ=Ge("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Np.error}`]:{color:(t.vars||t).palette.error.main}})),OJ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiFormLabel"}),{children:i,className:o,component:s="label"}=r,a=et(r,IJ),l=wu(),c=Zd({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=$({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),f=NJ(u);return E.jsxs(kJ,$({as:s,ownerState:u,className:lt(f.root,o),ref:n},a,{children:[i,c.required&&E.jsxs(LJ,{ownerState:u,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))}),s4=T.createContext();function DJ(t){return Tt("MuiGrid",t)}const FJ=[0,1,2,3,4,5,6,7,8,9,10],zJ=["column-reverse","column","row-reverse","row"],UJ=["nowrap","wrap-reverse","wrap"],Vh=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],xm=Ct("MuiGrid",["root","container","item","zeroMinWidth",...FJ.map(t=>`spacing-xs-${t}`),...zJ.map(t=>`direction-xs-${t}`),...UJ.map(t=>`wrap-xs-${t}`),...Vh.map(t=>`grid-xs-${t}`),...Vh.map(t=>`grid-sm-${t}`),...Vh.map(t=>`grid-md-${t}`),...Vh.map(t=>`grid-lg-${t}`),...Vh.map(t=>`grid-xl-${t}`)]),BJ=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function ld(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function jJ({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,i)=>{let o={};if(e[i]&&(n=e[i]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=$c({values:e.columns,breakpoints:t.breakpoints.values}),a=typeof s=="object"?s[i]:s;if(a==null)return r;const l=`${Math.round(n/a*1e8)/1e6}%`;let c={};if(e.container&&e.item&&e.columnSpacing!==0){const u=t.spacing(e.columnSpacing);if(u!=="0px"){const f=`calc(${l} + ${ld(u)})`;c={flexBasis:f,maxWidth:f}}}o=$({flexBasis:l,flexGrow:0,maxWidth:l},c)}return t.breakpoints.values[i]===0?Object.assign(r,o):r[t.breakpoints.up(i)]=o,r},{})}function VJ({theme:t,ownerState:e}){const n=$c({values:e.direction,breakpoints:t.breakpoints.values});return Bi({theme:t},n,r=>{const i={flexDirection:r};return r.indexOf("column")===0&&(i[`& > .${xm.item}`]={maxWidth:"none"}),i})}function h6({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(i=>{n===""&&e[i]!==0&&(n=i)});const r=Object.keys(t).sort((i,o)=>t[i]-t[o]);return r.slice(0,r.indexOf(n))}function $J({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let i={};if(n&&r!==0){const o=$c({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=h6({breakpoints:t.breakpoints.values,values:o})),i=Bi({theme:t},o,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{marginTop:`-${ld(u)}`,[`& > .${xm.item}`]:{paddingTop:ld(u)}}:(c=s)!=null&&c.includes(l)?{}:{marginTop:0,[`& > .${xm.item}`]:{paddingTop:0}}})}return i}function WJ({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let i={};if(n&&r!==0){const o=$c({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=h6({breakpoints:t.breakpoints.values,values:o})),i=Bi({theme:t},o,(a,l)=>{var c;const u=t.spacing(a);return u!=="0px"?{width:`calc(100% + ${ld(u)})`,marginLeft:`-${ld(u)}`,[`& > .${xm.item}`]:{paddingLeft:ld(u)}}:(c=s)!=null&&c.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${xm.item}`]:{paddingLeft:0}}})}return i}function HJ(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(i=>{const o=t[i];Number(o)>0&&r.push(n[`spacing-${i}-${String(o)}`])}),r}const GJ=Ge("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:i,item:o,spacing:s,wrap:a,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=HJ(s,c,e));const f=[];return c.forEach(h=>{const m=n[h];m&&f.push(e[`grid-${h}-${String(m)}`])}),[e.root,r&&e.container,o&&e.item,l&&e.zeroMinWidth,...u,i!=="row"&&e[`direction-xs-${String(i)}`],a!=="wrap"&&e[`wrap-xs-${String(a)}`],...f]}})(({ownerState:t})=>$({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),VJ,$J,WJ,jJ);function XJ(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const i=t[r];if(Number(i)>0){const o=`spacing-${r}-${String(i)}`;n.push(o)}}),n}const qJ=t=>{const{classes:e,container:n,direction:r,item:i,spacing:o,wrap:s,zeroMinWidth:a,breakpoints:l}=t;let c=[];n&&(c=XJ(o,l));const u=[];l.forEach(h=>{const m=t[h];m&&u.push(`grid-${h}-${String(m)}`)});const f={root:["root",n&&"container",i&&"item",a&&"zeroMinWidth",...c,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...u]};return Rt(f,DJ,e)},Ea=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiGrid"}),{breakpoints:i}=xu(),o=ag(r),{className:s,columns:a,columnSpacing:l,component:c="div",container:u=!1,direction:f="row",item:h=!1,rowSpacing:m,spacing:v=0,wrap:x="wrap",zeroMinWidth:y=!1}=o,g=et(o,BJ),b=m||v,_=l||v,S=T.useContext(s4),A=u?a||12:S,P={},R=$({},g);i.keys.forEach(C=>{g[C]!=null&&(P[C]=g[C],delete R[C])});const L=$({},o,{columns:A,container:u,direction:f,item:h,rowSpacing:b,columnSpacing:_,wrap:x,zeroMinWidth:y,spacing:v},P,{breakpoints:i.keys}),k=qJ(L);return E.jsx(s4.Provider,{value:A,children:E.jsx(GJ,$({ownerState:L,className:lt(k.root,s),as:c,ref:n},R))})}),YJ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function q2(t){return`scale(${t}, ${t**2})`}const KJ={entering:{opacity:1,transform:q2(1)},entered:{opacity:1,transform:"none"}},JS=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),p6=T.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:f,onExited:h,onExiting:m,style:v,timeout:x="auto",TransitionComponent:y=Ks}=e,g=et(e,YJ),b=Vz(),_=T.useRef(),S=xu(),A=T.useRef(null),P=Er(A,o.ref,n),R=G=>X=>{if(G){const Z=A.current;X===void 0?G(Z):G(Z,X)}},L=R(u),k=R((G,X)=>{c6(G);const{duration:Z,delay:F,easing:q}=E1({style:v,timeout:x,easing:s},{mode:"enter"});let K;x==="auto"?(K=S.transitions.getAutoHeightDuration(G.clientHeight),_.current=K):K=Z,G.style.transition=[S.transitions.create("opacity",{duration:K,delay:F}),S.transitions.create("transform",{duration:JS?K:K*.666,delay:F,easing:q})].join(","),l&&l(G,X)}),C=R(c),N=R(m),z=R(G=>{const{duration:X,delay:Z,easing:F}=E1({style:v,timeout:x,easing:s},{mode:"exit"});let q;x==="auto"?(q=S.transitions.getAutoHeightDuration(G.clientHeight),_.current=q):q=X,G.style.transition=[S.transitions.create("opacity",{duration:q,delay:Z}),S.transitions.create("transform",{duration:JS?q:q*.666,delay:JS?Z:Z||q*.333,easing:F})].join(","),G.style.opacity=0,G.style.transform=q2(.75),f&&f(G)}),D=R(h),B=G=>{x==="auto"&&b.start(_.current||0,G),r&&r(A.current,G)};return E.jsx(y,$({appear:i,in:a,nodeRef:A,onEnter:k,onEntered:C,onEntering:L,onExit:z,onExited:D,onExiting:N,addEndListener:B,timeout:x==="auto"?null:x},g,{children:(G,X)=>T.cloneElement(o,$({style:$({opacity:0,transform:q2(.75),visibility:G==="exited"&&!a?"hidden":void 0},KJ[G],v,o.props.style),ref:P},X))}))});p6.muiSupportAuto=!0;const ZJ=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],JJ=t=>{const{classes:e,disableUnderline:n}=t,i=Rt({root:["root",!n&&"underline"],input:["input"]},WK,e);return $({},e,i)},QJ=Ge(Yb,{shouldForwardProp:t=>gi(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...Xb(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),$({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${jh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${jh.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${jh.disabled}, .${jh.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${jh.disabled}:before`]:{borderBottomStyle:"dotted"}})}),eQ=Ge(Kb,{name:"MuiInput",slot:"Input",overridesResolver:qb})({}),MR=T.forwardRef(function(e,n){var r,i,o,s;const a=At({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:f=!1,inputComponent:h="input",multiline:m=!1,slotProps:v,slots:x={},type:y="text"}=a,g=et(a,ZJ),b=JJ(a),S={root:{ownerState:{disableUnderline:l}}},A=v??u?di(v??u,S):S,P=(r=(i=x.root)!=null?i:c.Root)!=null?r:QJ,R=(o=(s=x.input)!=null?s:c.Input)!=null?o:eQ;return E.jsx(wR,$({slots:{root:P,input:R},slotProps:A,fullWidth:f,inputComponent:h,multiline:m,ref:n,type:y},g,{classes:b}))});MR.muiName="Input";function tQ(t){return Tt("MuiInputLabel",t)}Ct("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const nQ=["disableAnimation","margin","shrink","variant","className"],rQ=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=t,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${xt(r)}`,s],asterisk:[a&&"asterisk"]},c=Rt(l,tQ,e);return $({},e,c)},iQ=Ge(OJ,{shouldForwardProp:t=>gi(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Np.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>$({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&$({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&$({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&$({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),m6=T.forwardRef(function(e,n){const r=At({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:o,className:s}=r,a=et(r,nQ),l=wu();let c=o;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=Zd({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),f=$({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),h=rQ(f);return E.jsx(iQ,$({"data-shrink":c,ownerState:f,ref:n,className:lt(h.root,s)},a,{classes:h}))});function oQ(t){return Tt("MuiLink",t)}const sQ=Ct("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),g6={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},aQ=t=>g6[t]||t,lQ=({theme:t,ownerState:e})=>{const n=aQ(e.color),r=wd(t,`palette.${n}`,!1)||e.color,i=wd(t,`palette.${n}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:Pn(r,.4)},cQ=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],uQ=t=>{const{classes:e,component:n,focusVisible:r,underline:i}=t,o={root:["root",`underline${xt(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Rt(o,oQ,e)},fQ=Ge(ar,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${xt(n.underline)}`],n.component==="button"&&e.button]}})(({theme:t,ownerState:e})=>$({},e.underline==="none"&&{textDecoration:"none"},e.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},e.underline==="always"&&$({textDecoration:"underline"},e.color!=="inherit"&&{textDecorationColor:lQ({theme:t,ownerState:e})},{"&:hover":{textDecorationColor:"inherit"}}),e.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${sQ.focusVisible}`]:{outline:"auto"}})),a4=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiLink"}),{className:i,color:o="primary",component:s="a",onBlur:a,onFocus:l,TypographyClasses:c,underline:u="always",variant:f="inherit",sx:h}=r,m=et(r,cQ),{isFocusVisibleRef:v,onBlur:x,onFocus:y,ref:g}=$z(),[b,_]=T.useState(!1),S=Er(n,g),A=k=>{x(k),v.current===!1&&_(!1),a&&a(k)},P=k=>{y(k),v.current===!0&&_(!0),l&&l(k)},R=$({},r,{color:o,component:s,focusVisible:b,underline:u,variant:f}),L=uQ(R);return E.jsx(fQ,$({color:o,className:lt(L.root,i),classes:c,component:s,onBlur:A,onFocus:P,ref:S,ownerState:R,variant:f,sx:[...Object.keys(g6).includes(o)?[]:[{color:o}],...Array.isArray(h)?h:[h]]},m))}),zs=T.createContext({});function dQ(t){return Tt("MuiList",t)}Ct("MuiList",["root","padding","dense","subheader"]);const hQ=["children","className","component","dense","disablePadding","subheader"],pQ=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return Rt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},dQ,e)},mQ=Ge("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>$({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),v6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c}=r,u=et(r,hQ),f=T.useMemo(()=>({dense:a}),[a]),h=$({},r,{component:s,dense:a,disablePadding:l}),m=pQ(h);return E.jsx(zs.Provider,{value:f,children:E.jsxs(mQ,$({as:s,className:lt(m.root,o),ref:n,ownerState:h},u,{children:[c,i]}))})});function gQ(t){return Tt("MuiListItem",t)}const Tf=Ct("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function vQ(t){return Tt("MuiListItemButton",t)}const Rf=Ct("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),yQ=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],xQ=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},bQ=t=>{const{alignItems:e,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=t,c=Rt({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled",e==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},vQ,n);return $({},n,c)},_Q=Ge(_u,{shouldForwardProp:t=>gi(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:xQ})(({theme:t,ownerState:e})=>$({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Rf.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Rf.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Rf.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Rf.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Rf.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),wQ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:o=!1,component:s="div",children:a,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:f,selected:h=!1,className:m}=r,v=et(r,yQ),x=T.useContext(zs),y=T.useMemo(()=>({dense:l||x.dense||!1,alignItems:i,disableGutters:c}),[i,x.dense,l,c]),g=T.useRef(null);Oo(()=>{o&&g.current&&g.current.focus()},[o]);const b=$({},r,{alignItems:i,dense:y.dense,disableGutters:c,divider:u,selected:h}),_=bQ(b),S=Er(g,n);return E.jsx(zs.Provider,{value:y,children:E.jsx(_Q,$({ref:S,href:v.href||v.to,component:(v.href||v.to)&&s==="div"?"button":s,focusVisibleClassName:lt(_.focusVisible,f),ownerState:b,className:lt(_.root,m)},v,{classes:_,children:a}))})});function SQ(t){return Tt("MuiListItemSecondaryAction",t)}Ct("MuiListItemSecondaryAction",["root","disableGutters"]);const MQ=["className"],EQ=t=>{const{disableGutters:e,classes:n}=t;return Rt({root:["root",e&&"disableGutters"]},SQ,n)},CQ=Ge("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>$({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),y6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=et(r,MQ),s=T.useContext(zs),a=$({},r,{disableGutters:s.disableGutters}),l=EQ(a);return E.jsx(CQ,$({className:lt(l.root,i),ownerState:a,ref:n},o))});y6.muiName="ListItemSecondaryAction";const TQ=["className"],RQ=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],AQ=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},PQ=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:o,disableGutters:s,disablePadding:a,divider:l,hasSecondaryAction:c,selected:u}=t;return Rt({root:["root",i&&"dense",!s&&"gutters",!a&&"padding",l&&"divider",o&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},gQ,r)},IQ=Ge("div",{name:"MuiListItem",slot:"Root",overridesResolver:AQ})(({theme:t,ownerState:e})=>$({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&$({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${Rf.root}`]:{paddingRight:48}},{[`&.${Tf.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Tf.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Tf.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Tf.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Tf.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),NQ=Ge("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),kQ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:s=!1,children:a,className:l,component:c,components:u={},componentsProps:f={},ContainerComponent:h="li",ContainerProps:{className:m}={},dense:v=!1,disabled:x=!1,disableGutters:y=!1,disablePadding:g=!1,divider:b=!1,focusVisibleClassName:_,secondaryAction:S,selected:A=!1,slotProps:P={},slots:R={}}=r,L=et(r.ContainerProps,TQ),k=et(r,RQ),C=T.useContext(zs),N=T.useMemo(()=>({dense:v||C.dense||!1,alignItems:i,disableGutters:y}),[i,C.dense,v,y]),z=T.useRef(null);Oo(()=>{o&&z.current&&z.current.focus()},[o]);const D=T.Children.toArray(a),B=D.length&&Oy(D[D.length-1],["ListItemSecondaryAction"]),G=$({},r,{alignItems:i,autoFocus:o,button:s,dense:N.dense,disabled:x,disableGutters:y,disablePadding:g,divider:b,hasSecondaryAction:B,selected:A}),X=PQ(G),Z=Er(z,n),F=R.root||u.Root||IQ,q=P.root||f.root||{},K=$({className:lt(X.root,q.className,l),disabled:x},k);let Q=c||"li";return s&&(K.component=c||"div",K.focusVisibleClassName=lt(Tf.focusVisible,_),Q=_u),B?(Q=!K.component&&!c?"div":Q,h==="li"&&(Q==="li"?Q="div":K.component==="li"&&(K.component="div")),E.jsx(zs.Provider,{value:N,children:E.jsxs(NQ,$({as:h,className:lt(X.container,m),ref:Z,ownerState:G},L,{children:[E.jsx(F,$({},q,!Sd(F)&&{as:Q,ownerState:$({},G,q.ownerState)},K,{children:D})),D.pop()]}))})):E.jsx(zs.Provider,{value:N,children:E.jsxs(F,$({},q,{as:Q,ref:Z},!Sd(F)&&{ownerState:$({},G,q.ownerState)},K,{children:[D,S&&E.jsx(y6,{children:S})]}))})}),l4=Ct("MuiListItemIcon",["root","alignItemsFlexStart"]);function LQ(t){return Tt("MuiListItemText",t)}const T1=Ct("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),OQ=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],DQ=t=>{const{classes:e,inset:n,primary:r,secondary:i,dense:o}=t;return Rt({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},LQ,e)},FQ=Ge("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${T1.primary}`]:e.primary},{[`& .${T1.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>$({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),zQ=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiListItemText"}),{children:i,className:o,disableTypography:s=!1,inset:a=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:f}=r,h=et(r,OQ),{dense:m}=T.useContext(zs);let v=l??i,x=u;const y=$({},r,{disableTypography:s,inset:a,primary:!!v,secondary:!!x,dense:m}),g=DQ(y);return v!=null&&v.type!==ar&&!s&&(v=E.jsx(ar,$({variant:m?"body2":"body1",className:g.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:v}))),x!=null&&x.type!==ar&&!s&&(x=E.jsx(ar,$({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},f,{children:x}))),E.jsxs(FQ,$({className:lt(g.root,o),ownerState:y,ref:n},h,{children:[v,x]}))}),UQ=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function QS(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function c4(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function x6(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function $h(t,e,n,r,i,o){let s=!1,a=i(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!x6(a,o)||l)a=i(t,a,n);else return a.focus(),!0}return!1}const BQ=T.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:f="selectedMenu"}=e,h=et(e,UQ),m=T.useRef(null),v=T.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Oo(()=>{i&&m.current.focus()},[i]),T.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(_,{direction:S})=>{const A=!m.current.style.width;if(_.clientHeight{const S=m.current,A=_.key,P=Fi(S).activeElement;if(A==="ArrowDown")_.preventDefault(),$h(S,P,c,l,QS);else if(A==="ArrowUp")_.preventDefault(),$h(S,P,c,l,c4);else if(A==="Home")_.preventDefault(),$h(S,null,c,l,QS);else if(A==="End")_.preventDefault(),$h(S,null,c,l,c4);else if(A.length===1){const R=v.current,L=A.toLowerCase(),k=performance.now();R.keys.length>0&&(k-R.lastTime>500?(R.keys=[],R.repeating=!0,R.previousKeyMatched=!0):R.repeating&&L!==R.keys[0]&&(R.repeating=!1)),R.lastTime=k,R.keys.push(L);const C=P&&!R.repeating&&x6(P,R);R.previousKeyMatched&&(C||$h(S,P,!1,l,QS,R))?_.preventDefault():R.previousKeyMatched=!1}u&&u(_)},y=Er(m,n);let g=-1;T.Children.forEach(s,(_,S)=>{if(!T.isValidElement(_)){g===S&&(g+=1,g>=s.length&&(g=-1));return}_.props.disabled||(f==="selectedMenu"&&_.props.selected||g===-1)&&(g=S),g===S&&(_.props.disabled||_.props.muiSkipListHighlight||_.type.muiSkipListHighlight)&&(g+=1,g>=s.length&&(g=-1))});const b=T.Children.map(s,(_,S)=>{if(S===g){const A={};return o&&(A.autoFocus=!0),_.props.tabIndex===void 0&&f==="selectedMenu"&&(A.tabIndex=0),T.cloneElement(_,A)}return _});return E.jsx(v6,$({role:"menu",ref:y,className:a,onKeyDown:x,tabIndex:i?0:-1},h,{children:b}))});function jQ(t){return Tt("MuiPopover",t)}Ct("MuiPopover",["root","paper"]);const VQ=["onEntering"],$Q=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],WQ=["slotProps"];function u4(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function f4(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function d4(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function eM(t){return typeof t=="function"?t():t}const HQ=t=>{const{classes:e}=t;return Rt({root:["root"],paper:["paper"]},jQ,e)},GQ=Ge(gJ,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),b6=Ge(bu,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),_6=T.forwardRef(function(e,n){var r,i,o;const s=At({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:f="anchorEl",children:h,className:m,container:v,elevation:x=8,marginThreshold:y=16,open:g,PaperProps:b={},slots:_,slotProps:S,transformOrigin:A={vertical:"top",horizontal:"left"},TransitionComponent:P=p6,transitionDuration:R="auto",TransitionProps:{onEntering:L}={},disableScrollLock:k=!1}=s,C=et(s.TransitionProps,VQ),N=et(s,$Q),z=(r=S==null?void 0:S.paper)!=null?r:b,D=T.useRef(),B=Er(D,z.ref),G=$({},s,{anchorOrigin:c,anchorReference:f,elevation:x,marginThreshold:y,externalPaperSlotProps:z,transformOrigin:A,TransitionComponent:P,transitionDuration:R,TransitionProps:C}),X=HQ(G),Z=T.useCallback(()=>{if(f==="anchorPosition")return u;const ae=eM(l),Ie=(ae&&ae.nodeType===1?ae:Fi(D.current).body).getBoundingClientRect();return{top:Ie.top+u4(Ie,c.vertical),left:Ie.left+f4(Ie,c.horizontal)}},[l,c.horizontal,c.vertical,u,f]),F=T.useCallback(ae=>({vertical:u4(ae,A.vertical),horizontal:f4(ae,A.horizontal)}),[A.horizontal,A.vertical]),q=T.useCallback(ae=>{const W={width:ae.offsetWidth,height:ae.offsetHeight},Ie=F(W);if(f==="none")return{top:null,left:null,transformOrigin:d4(Ie)};const Re=Z();let De=Re.top-Ie.vertical,he=Re.left-Ie.horizontal;const qe=De+W.height,Le=he+W.width,V=La(eM(l)),U=V.innerHeight-y,ne=V.innerWidth-y;if(y!==null&&DeU){const le=qe-U;De-=le,Ie.vertical+=le}if(y!==null&&hene){const le=Le-ne;he-=le,Ie.horizontal+=le}return{top:`${Math.round(De)}px`,left:`${Math.round(he)}px`,transformOrigin:d4(Ie)}},[l,f,Z,F,y]),[K,Q]=T.useState(g),de=T.useCallback(()=>{const ae=D.current;if(!ae)return;const W=q(ae);W.top!==null&&(ae.style.top=W.top),W.left!==null&&(ae.style.left=W.left),ae.style.transformOrigin=W.transformOrigin,Q(!0)},[q]);T.useEffect(()=>(k&&window.addEventListener("scroll",de),()=>window.removeEventListener("scroll",de)),[l,k,de]);const fe=(ae,W)=>{L&&L(ae,W),de()},J=()=>{Q(!1)};T.useEffect(()=>{g&&de()}),T.useImperativeHandle(a,()=>g?{updatePosition:()=>{de()}}:null,[g,de]),T.useEffect(()=>{if(!g)return;const ae=$b(()=>{de()}),W=La(l);return W.addEventListener("resize",ae),()=>{ae.clear(),W.removeEventListener("resize",ae)}},[l,g,de]);let ce=R;R==="auto"&&!P.muiSupportAuto&&(ce=void 0);const _e=v||(l?Fi(eM(l)).body:void 0),be=(i=_==null?void 0:_.root)!=null?i:GQ,Xe=(o=_==null?void 0:_.paper)!=null?o:b6,$e=Ws({elementType:Xe,externalSlotProps:$({},z,{style:K?z.style:$({},z.style,{opacity:0})}),additionalProps:{elevation:x,ref:B},ownerState:G,className:lt(X.paper,z==null?void 0:z.className)}),tt=Ws({elementType:be,externalSlotProps:(S==null?void 0:S.root)||{},externalForwardedProps:N,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:_e,open:g},ownerState:G,className:lt(X.root,m)}),{slotProps:Ve}=tt,se=et(tt,WQ);return E.jsx(be,$({},se,!Sd(be)&&{slotProps:Ve,disableScrollLock:k},{children:E.jsx(P,$({appear:!0,in:g,onEntering:fe,onExited:J,timeout:ce},C,{children:E.jsx(Xe,$({},$e,{children:h}))}))}))});function XQ(t){return Tt("MuiMenu",t)}Ct("MuiMenu",["root","paper","list"]);const qQ=["onEntering"],YQ=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],KQ={vertical:"top",horizontal:"right"},ZQ={vertical:"top",horizontal:"left"},JQ=t=>{const{classes:e}=t;return Rt({root:["root"],paper:["paper"],list:["list"]},XQ,e)},QQ=Ge(_6,{shouldForwardProp:t=>gi(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),eee=Ge(b6,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),tee=Ge(BQ,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),nee=T.forwardRef(function(e,n){var r,i;const o=At({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:f,open:h,PaperProps:m={},PopoverClasses:v,transitionDuration:x="auto",TransitionProps:{onEntering:y}={},variant:g="selectedMenu",slots:b={},slotProps:_={}}=o,S=et(o.TransitionProps,qQ),A=et(o,YQ),P=dR(),R=$({},o,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:y,PaperProps:m,transitionDuration:x,TransitionProps:S,variant:g}),L=JQ(R),k=s&&!c&&h,C=T.useRef(null),N=(F,q)=>{C.current&&C.current.adjustStyleForScrollbar(F,{direction:P?"rtl":"ltr"}),y&&y(F,q)},z=F=>{F.key==="Tab"&&(F.preventDefault(),f&&f(F,"tabKeyDown"))};let D=-1;T.Children.map(a,(F,q)=>{T.isValidElement(F)&&(F.props.disabled||(g==="selectedMenu"&&F.props.selected||D===-1)&&(D=q))});const B=(r=b.paper)!=null?r:eee,G=(i=_.paper)!=null?i:m,X=Ws({elementType:b.root,externalSlotProps:_.root,ownerState:R,className:[L.root,l]}),Z=Ws({elementType:B,externalSlotProps:G,ownerState:R,className:L.paper});return E.jsx(QQ,$({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:P?"right":"left"},transformOrigin:P?KQ:ZQ,slots:{paper:B,root:b.root},slotProps:{root:X,paper:Z},open:h,ref:n,transitionDuration:x,TransitionProps:$({onEntering:N},S),ownerState:R},A,{classes:v,children:E.jsx(tee,$({onKeyDown:z,actions:C,autoFocus:s&&(D===-1||c),autoFocusItem:k,variant:g},u,{className:lt(L.list,u.className),children:a}))}))});function ree(t){return Tt("MuiMenuItem",t)}const Wh=Ct("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),iee=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],oee=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},see=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=t,l=Rt({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},ree,s);return $({},s,l)},aee=Ge(_u,{shouldForwardProp:t=>gi(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:oee})(({theme:t,ownerState:e})=>$({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Wh.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Wh.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Wh.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Wh.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Wh.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${r4.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${r4.inset}`]:{marginLeft:52},[`& .${T1.root}`]:{marginTop:0,marginBottom:0},[`& .${T1.inset}`]:{paddingLeft:36},[`& .${l4.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${l4.root} svg`]:{fontSize:"1.25rem"}}))),h4=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:f,className:h}=r,m=et(r,iee),v=T.useContext(zs),x=T.useMemo(()=>({dense:s||v.dense||!1,disableGutters:l}),[v.dense,s,l]),y=T.useRef(null);Oo(()=>{i&&y.current&&y.current.focus()},[i]);const g=$({},r,{dense:x.dense,divider:a,disableGutters:l}),b=see(r),_=Er(y,n);let S;return r.disabled||(S=f!==void 0?f:-1),E.jsx(zs.Provider,{value:x,children:E.jsx(aee,$({ref:_,role:u,tabIndex:S,component:o,focusVisibleClassName:lt(b.focusVisible,c),className:lt(b.root,h)},m,{ownerState:g,classes:b}))})});function lee(t){return Tt("MuiNativeSelect",t)}const ER=Ct("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),cee=["className","disabled","error","IconComponent","inputRef","variant"],uee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:s}=t,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${xt(n)}`,o&&"iconOpen",r&&"disabled"]};return Rt(a,lee,e)},w6=({ownerState:t,theme:e})=>$({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":$({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${ER.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),fee=Ge("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:gi,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${ER.multiple}`]:e.multiple}]}})(w6),S6=({ownerState:t,theme:e})=>$({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${ER.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),dee=Ge("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${xt(n.variant)}`],n.open&&e.iconOpen]}})(S6),hee=T.forwardRef(function(e,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard"}=e,c=et(e,cee),u=$({},e,{disabled:i,variant:l,error:o}),f=uee(u);return E.jsxs(T.Fragment,{children:[E.jsx(fee,$({ownerState:u,className:lt(f.select,r),disabled:i,ref:a||n},c)),e.multiple?null:E.jsx(dee,{as:s,ownerState:u,className:f.icon})]})});var p4;const pee=["children","classes","className","label","notched"],mee=Ge("fieldset",{shouldForwardProp:gi})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),gee=Ge("legend",{shouldForwardProp:gi})(({ownerState:t,theme:e})=>$({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&$({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function vee(t){const{className:e,label:n,notched:r}=t,i=et(t,pee),o=n!=null&&n!=="",s=$({},t,{notched:r,withLabel:o});return E.jsx(mee,$({"aria-hidden":!0,className:e,ownerState:s},i,{children:E.jsx(gee,{ownerState:s,children:o?E.jsx("span",{children:n}):p4||(p4=E.jsx("span",{className:"notranslate",children:"​"}))})}))}const yee=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],xee=t=>{const{classes:e}=t,r=Rt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},HK,e);return $({},e,r)},bee=Ge(Yb,{shouldForwardProp:t=>gi(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Xb})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return $({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${tl.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${tl.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${tl.focused} .${tl.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${tl.error} .${tl.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${tl.disabled} .${tl.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&$({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),_ee=Ge(vee,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),wee=Ge(Kb,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:qb})(({theme:t,ownerState:e})=>$({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),CR=T.forwardRef(function(e,n){var r,i,o,s,a;const l=At({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:f="input",label:h,multiline:m=!1,notched:v,slots:x={},type:y="text"}=l,g=et(l,yee),b=xee(l),_=wu(),S=Zd({props:l,muiFormControl:_,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),A=$({},l,{color:S.color||"primary",disabled:S.disabled,error:S.error,focused:S.focused,formControl:_,fullWidth:u,hiddenLabel:S.hiddenLabel,multiline:m,size:S.size,type:y}),P=(r=(i=x.root)!=null?i:c.Root)!=null?r:bee,R=(o=(s=x.input)!=null?s:c.Input)!=null?o:wee;return E.jsx(wR,$({slots:{root:P,input:R},renderSuffix:L=>E.jsx(_ee,{ownerState:A,className:b.notchedOutline,label:h!=null&&h!==""&&S.required?a||(a=E.jsxs(T.Fragment,{children:[h," ","*"]})):h,notched:typeof v<"u"?v:!!(L.startAdornment||L.filled||L.focused)}),fullWidth:u,inputComponent:f,multiline:m,ref:n,type:y},g,{classes:$({},b,{notchedOutline:null})}))});CR.muiName="Input";function See(t){return Tt("MuiSelect",t)}const Hh=Ct("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var m4;const Mee=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Eee=Ge("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${Hh.select}`]:e.select},{[`&.${Hh.select}`]:e[n.variant]},{[`&.${Hh.error}`]:e.error},{[`&.${Hh.multiple}`]:e.multiple}]}})(w6,{[`&.${Hh.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Cee=Ge("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${xt(n.variant)}`],n.open&&e.iconOpen]}})(S6),Tee=Ge("input",{shouldForwardProp:t=>l6(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function g4(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Ree(t){return t==null||typeof t=="string"&&!t.trim()}const Aee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:s}=t,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${xt(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Rt(a,See,e)},Pee=T.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:s,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:f,disabled:h,displayEmpty:m,error:v=!1,IconComponent:x,inputRef:y,labelId:g,MenuProps:b={},multiple:_,name:S,onBlur:A,onChange:P,onClose:R,onFocus:L,onOpen:k,open:C,readOnly:N,renderValue:z,SelectDisplayProps:D={},tabIndex:B,value:G,variant:X="standard"}=e,Z=et(e,Mee),[F,q]=V2({controlled:G,default:f,name:"Select"}),[K,Q]=V2({controlled:C,default:u,name:"Select"}),de=T.useRef(null),fe=T.useRef(null),[J,ce]=T.useState(null),{current:_e}=T.useRef(C!=null),[be,Xe]=T.useState(),$e=Er(n,y),tt=T.useCallback(Oe=>{fe.current=Oe,Oe&&ce(Oe)},[]),Ve=J==null?void 0:J.parentNode;T.useImperativeHandle($e,()=>({focus:()=>{fe.current.focus()},node:de.current,value:F}),[F]),T.useEffect(()=>{u&&K&&J&&!_e&&(Xe(a?null:Ve.clientWidth),fe.current.focus())},[J,a]),T.useEffect(()=>{s&&fe.current.focus()},[s]),T.useEffect(()=>{if(!g)return;const Oe=Fi(fe.current).getElementById(g);if(Oe){const Ye=()=>{getSelection().isCollapsed&&fe.current.focus()};return Oe.addEventListener("click",Ye),()=>{Oe.removeEventListener("click",Ye)}}},[g]);const se=(Oe,Ye)=>{Oe?k&&k(Ye):R&&R(Ye),_e||(Xe(a?null:Ve.clientWidth),Q(Oe))},ae=Oe=>{Oe.button===0&&(Oe.preventDefault(),fe.current.focus(),se(!0,Oe))},W=Oe=>{se(!1,Oe)},Ie=T.Children.toArray(l),Re=Oe=>{const Ye=Ie.find(me=>me.props.value===Oe.target.value);Ye!==void 0&&(q(Ye.props.value),P&&P(Oe,Ye))},De=Oe=>Ye=>{let me;if(Ye.currentTarget.hasAttribute("tabindex")){if(_){me=Array.isArray(F)?F.slice():[];const Fe=F.indexOf(Oe.props.value);Fe===-1?me.push(Oe.props.value):me.splice(Fe,1)}else me=Oe.props.value;if(Oe.props.onClick&&Oe.props.onClick(Ye),F!==me&&(q(me),P)){const Fe=Ye.nativeEvent||Ye,Je=new Fe.constructor(Fe.type,Fe);Object.defineProperty(Je,"target",{writable:!0,value:{value:me,name:S}}),P(Je,Oe)}_||se(!1,Ye)}},he=Oe=>{N||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Oe.key)!==-1&&(Oe.preventDefault(),se(!0,Oe))},qe=J!==null&&K,Le=Oe=>{!qe&&A&&(Object.defineProperty(Oe,"target",{writable:!0,value:{value:F,name:S}}),A(Oe))};delete Z["aria-invalid"];let V,U;const ne=[];let le=!1;(C1({value:F})||m)&&(z?V=z(F):le=!0);const Ce=Ie.map(Oe=>{if(!T.isValidElement(Oe))return null;let Ye;if(_){if(!Array.isArray(F))throw new Error(ka(2));Ye=F.some(me=>g4(me,Oe.props.value)),Ye&&le&&ne.push(Oe.props.children)}else Ye=g4(F,Oe.props.value),Ye&&le&&(U=Oe.props.children);return T.cloneElement(Oe,{"aria-selected":Ye?"true":"false",onClick:De(Oe),onKeyUp:me=>{me.key===" "&&me.preventDefault(),Oe.props.onKeyUp&&Oe.props.onKeyUp(me)},role:"option",selected:Ye,value:void 0,"data-value":Oe.props.value})});le&&(_?ne.length===0?V=null:V=ne.reduce((Oe,Ye,me)=>(Oe.push(Ye),me{const{classes:e}=t;return e},TR={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>gi(t)&&t!=="variant",slot:"Root"},Lee=Ge(MR,TR)(""),Oee=Ge(CR,TR)(""),Dee=Ge(SR,TR)(""),RR=T.forwardRef(function(e,n){const r=At({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=XK,id:f,input:h,inputProps:m,label:v,labelId:x,MenuProps:y,multiple:g=!1,native:b=!1,onClose:_,onOpen:S,open:A,renderValue:P,SelectDisplayProps:R,variant:L="outlined"}=r,k=et(r,Iee),C=b?hee:Pee,N=wu(),z=Zd({props:r,muiFormControl:N,states:["variant","error"]}),D=z.variant||L,B=$({},r,{variant:D,classes:s}),G=kee(B),X=et(G,Nee),Z=h||{standard:E.jsx(Lee,{ownerState:B}),outlined:E.jsx(Oee,{label:v,ownerState:B}),filled:E.jsx(Dee,{ownerState:B})}[D],F=Er(n,Z.ref);return E.jsx(T.Fragment,{children:T.cloneElement(Z,$({inputComponent:C,inputProps:$({children:o,error:z.error,IconComponent:u,variant:D,type:void 0,multiple:g},b?{id:f}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:x,MenuProps:y,onClose:_,onOpen:S,open:A,renderValue:P,SelectDisplayProps:$({id:f},R)},m,{classes:m?di(X,m.classes):X},h?h.props.inputProps:{})},(g&&b||c)&&D==="outlined"?{notched:!0}:{},{ref:F,className:lt(Z.props.className,a,G.root)},!h&&{variant:D},k))})});RR.muiName="Select";function Fee(t){return Tt("MuiTab",t)}const nl=Ct("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),zee=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Uee=t=>{const{classes:e,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:a,disabled:l}=t,c={root:["root",o&&s&&"labelIcon",`textColor${xt(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Rt(c,Fee,e)},Bee=Ge(_u,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.label&&n.icon&&e.labelIcon,e[`textColor${xt(n.textColor)}`],n.fullWidth&&e.fullWidth,n.wrapped&&e.wrapped,{[`& .${nl.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>$({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${nl.iconWrapper}`]:$({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${nl.selected}`]:{opacity:1},[`&.${nl.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${nl.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${nl.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${nl.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${nl.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),tM=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:s=!1,fullWidth:a,icon:l,iconPosition:c="top",indicator:u,label:f,onChange:h,onClick:m,onFocus:v,selected:x,selectionFollowsFocus:y,textColor:g="inherit",value:b,wrapped:_=!1}=r,S=et(r,zee),A=$({},r,{disabled:o,disableFocusRipple:s,selected:x,icon:!!l,iconPosition:c,label:!!f,fullWidth:a,textColor:g,wrapped:_}),P=Uee(A),R=l&&f&&T.isValidElement(l)?T.cloneElement(l,{className:lt(P.iconWrapper,l.props.className)}):l,L=C=>{!x&&h&&h(C,b),m&&m(C)},k=C=>{y&&!x&&h&&h(C,b),v&&v(C)};return E.jsxs(Bee,$({focusRipple:!s,className:lt(P.root,i),ref:n,role:"tab","aria-selected":x,disabled:o,onClick:L,onFocus:k,ownerState:A,tabIndex:x?0:-1},S,{children:[c==="top"||c==="start"?E.jsxs(T.Fragment,{children:[R,f]}):E.jsxs(T.Fragment,{children:[f,R]}),u]}))}),M6=T.createContext();function jee(t){return Tt("MuiTable",t)}Ct("MuiTable",["root","stickyHeader"]);const Vee=["className","component","padding","size","stickyHeader"],$ee=t=>{const{classes:e,stickyHeader:n}=t;return Rt({root:["root",n&&"stickyHeader"]},jee,e)},Wee=Ge("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>$({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":$({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},e.stickyHeader&&{borderCollapse:"separate"})),v4="table",E6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTable"}),{className:i,component:o=v4,padding:s="normal",size:a="medium",stickyHeader:l=!1}=r,c=et(r,Vee),u=$({},r,{component:o,padding:s,size:a,stickyHeader:l}),f=$ee(u),h=T.useMemo(()=>({padding:s,size:a,stickyHeader:l}),[s,a,l]);return E.jsx(M6.Provider,{value:h,children:E.jsx(Wee,$({as:o,role:o===v4?null:"table",ref:n,className:lt(f.root,i),ownerState:u},c))})}),Zb=T.createContext();function Hee(t){return Tt("MuiTableBody",t)}Ct("MuiTableBody",["root"]);const Gee=["className","component"],Xee=t=>{const{classes:e}=t;return Rt({root:["root"]},Hee,e)},qee=Ge("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-row-group"}),Yee={variant:"body"},y4="tbody",C6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableBody"}),{className:i,component:o=y4}=r,s=et(r,Gee),a=$({},r,{component:o}),l=Xee(a);return E.jsx(Zb.Provider,{value:Yee,children:E.jsx(qee,$({className:lt(l.root,i),as:o,ref:n,role:o===y4?null:"rowgroup",ownerState:a},s))})});function Kee(t){return Tt("MuiTableCell",t)}const bm=Ct("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),Zee=["align","className","component","padding","scope","size","sortDirection","variant"],Jee=t=>{const{classes:e,variant:n,align:r,padding:i,size:o,stickyHeader:s}=t,a={root:["root",n,s&&"stickyHeader",r!=="inherit"&&`align${xt(r)}`,i!=="normal"&&`padding${xt(i)}`,`size${xt(o)}`]};return Rt(a,Kee,e)},Qee=Ge("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`size${xt(n.size)}`],n.padding!=="normal"&&e[`padding${xt(n.padding)}`],n.align!=="inherit"&&e[`align${xt(n.align)}`],n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>$({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid + ${t.palette.mode==="light"?t6(Pn(t.palette.divider,1),.88):e6(Pn(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},e.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},e.variant==="body"&&{color:(t.vars||t).palette.text.primary},e.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},e.size==="small"&&{padding:"6px 16px",[`&.${bm.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},e.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},e.padding==="none"&&{padding:0},e.align==="left"&&{textAlign:"left"},e.align==="center"&&{textAlign:"center"},e.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},e.align==="justify"&&{textAlign:"justify"},e.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),Is=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableCell"}),{align:i="inherit",className:o,component:s,padding:a,scope:l,size:c,sortDirection:u,variant:f}=r,h=et(r,Zee),m=T.useContext(M6),v=T.useContext(Zb),x=v&&v.variant==="head";let y;s?y=s:y=x?"th":"td";let g=l;y==="td"?g=void 0:!g&&x&&(g="col");const b=f||v&&v.variant,_=$({},r,{align:i,component:y,padding:a||(m&&m.padding?m.padding:"normal"),size:c||(m&&m.size?m.size:"medium"),sortDirection:u,stickyHeader:b==="head"&&m&&m.stickyHeader,variant:b}),S=Jee(_);let A=null;return u&&(A=u==="asc"?"ascending":"descending"),E.jsx(Qee,$({as:y,ref:n,className:lt(S.root,o),"aria-sort":A,scope:g,ownerState:_},h))});function ete(t){return Tt("MuiTableContainer",t)}Ct("MuiTableContainer",["root"]);const tte=["className","component"],nte=t=>{const{classes:e}=t;return Rt({root:["root"]},ete,e)},rte=Ge("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"}),T6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableContainer"}),{className:i,component:o="div"}=r,s=et(r,tte),a=$({},r,{component:o}),l=nte(a);return E.jsx(rte,$({ref:n,as:o,className:lt(l.root,i),ownerState:a},s))});function ite(t){return Tt("MuiTableHead",t)}Ct("MuiTableHead",["root"]);const ote=["className","component"],ste=t=>{const{classes:e}=t;return Rt({root:["root"]},ite,e)},ate=Ge("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),lte={variant:"head"},x4="thead",R6=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableHead"}),{className:i,component:o=x4}=r,s=et(r,ote),a=$({},r,{component:o}),l=ste(a);return E.jsx(Zb.Provider,{value:lte,children:E.jsx(ate,$({as:o,className:lt(l.root,i),ref:n,role:o===x4?null:"rowgroup",ownerState:a},s))})});function cte(t){return Tt("MuiToolbar",t)}Ct("MuiToolbar",["root","gutters","regular","dense"]);const ute=["className","component","disableGutters","variant"],fte=t=>{const{classes:e,disableGutters:n,variant:r}=t;return Rt({root:["root",!n&&"gutters",r]},cte,e)},dte=Ge("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableGutters&&e.gutters,e[n.variant]]}})(({theme:t,ownerState:e})=>$({position:"relative",display:"flex",alignItems:"center"},!e.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},e.variant==="dense"&&{minHeight:48}),({theme:t,ownerState:e})=>e.variant==="regular"&&t.mixins.toolbar),hte=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular"}=r,l=et(r,ute),c=$({},r,{component:o,disableGutters:s,variant:a}),u=fte(c);return E.jsx(dte,$({as:o,className:lt(u.root,i),ref:n,ownerState:c},l))}),pte=Kd(E.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),mte=Kd(E.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function gte(t){return Tt("MuiTableRow",t)}const b4=Ct("MuiTableRow",["root","selected","hover","head","footer"]),vte=["className","component","hover","selected"],yte=t=>{const{classes:e,selected:n,hover:r,head:i,footer:o}=t;return Rt({root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]},gte,e)},xte=Ge("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.head&&e.head,n.footer&&e.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${b4.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${b4.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Pn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),_4="tr",Jb=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTableRow"}),{className:i,component:o=_4,hover:s=!1,selected:a=!1}=r,l=et(r,vte),c=T.useContext(Zb),u=$({},r,{component:o,hover:s,selected:a,head:c&&c.variant==="head",footer:c&&c.variant==="footer"}),f=yte(u);return E.jsx(xte,$({as:o,ref:n,className:lt(f.root,i),role:o===_4?null:"row",ownerState:u},l))});function bte(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function _te(t,e,n,r={},i=()=>{}){const{ease:o=bte,duration:s=300}=r;let a=null;const l=e[t];let c=!1;const u=()=>{c=!0},f=h=>{if(c){i(new Error("Animation cancelled"));return}a===null&&(a=h);const m=Math.min(1,(h-a)/s);if(e[t]=o(m)*(n-l)+l,m>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(f)};return l===n?(i(new Error("Element already at target position")),u):(requestAnimationFrame(f),u)}const wte=["onChange"],Ste={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Mte(t){const{onChange:e}=t,n=et(t,wte),r=T.useRef(),i=T.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return Oo(()=>{const s=$b(()=>{const l=r.current;o(),l!==r.current&&e(r.current)}),a=La(i.current);return a.addEventListener("resize",s),()=>{s.clear(),a.removeEventListener("resize",s)}},[e]),T.useEffect(()=>{o(),e(r.current)},[e]),E.jsx("div",$({style:Ste,ref:i},n))}function Ete(t){return Tt("MuiTabScrollButton",t)}const Cte=Ct("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Tte=["className","slots","slotProps","direction","orientation","disabled"],Rte=t=>{const{classes:e,orientation:n,disabled:r}=t;return Rt({root:["root",n,r&&"disabled"]},Ete,e)},Ate=Ge(_u,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.orientation&&e[n.orientation]]}})(({ownerState:t})=>$({width:40,flexShrink:0,opacity:.8,[`&.${Cte.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Pte=T.forwardRef(function(e,n){var r,i;const o=At({props:e,name:"MuiTabScrollButton"}),{className:s,slots:a={},slotProps:l={},direction:c}=o,u=et(o,Tte),f=dR(),h=$({isRtl:f},o),m=Rte(h),v=(r=a.StartScrollButtonIcon)!=null?r:pte,x=(i=a.EndScrollButtonIcon)!=null?i:mte,y=Ws({elementType:v,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),g=Ws({elementType:x,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return E.jsx(Ate,$({component:"div",className:lt(m.root,s),ref:n,role:null,ownerState:h,tabIndex:null},u,{children:c==="left"?E.jsx(v,$({},y)):E.jsx(x,$({},g))}))});function Ite(t){return Tt("MuiTabs",t)}const nM=Ct("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Nte=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],w4=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,S4=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,sv=(t,e,n)=>{let r=!1,i=n(t,e);for(;i;){if(i===t.firstChild){if(r)return;r=!0}const o=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||o)i=n(t,i);else{i.focus();return}}},kte=t=>{const{vertical:e,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:a,classes:l}=t;return Rt({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Ite,l)},Lte=Ge("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${nM.scrollButtons}`]:e.scrollButtons},{[`& .${nM.scrollButtons}`]:n.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,n.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>$({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${nM.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Ote=Ge("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.scroller,n.fixed&&e.fixed,n.hideScrollbar&&e.hideScrollbar,n.scrollableX&&e.scrollableX,n.scrollableY&&e.scrollableY]}})(({ownerState:t})=>$({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Dte=Ge("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.flexContainer,n.vertical&&e.flexContainerVertical,n.centered&&e.centered]}})(({ownerState:t})=>$({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),Fte=Ge("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>$({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),zte=Ge(Mte)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),M4={},Ute=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTabs"}),i=xu(),o=dR(),{"aria-label":s,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:f,component:h="div",allowScrollButtonsMobile:m=!1,indicatorColor:v="primary",onChange:x,orientation:y="horizontal",ScrollButtonComponent:g=Pte,scrollButtons:b="auto",selectionFollowsFocus:_,slots:S={},slotProps:A={},TabIndicatorProps:P={},TabScrollButtonProps:R={},textColor:L="primary",value:k,variant:C="standard",visibleScrollbar:N=!1}=r,z=et(r,Nte),D=C==="scrollable",B=y==="vertical",G=B?"scrollTop":"scrollLeft",X=B?"top":"left",Z=B?"bottom":"right",F=B?"clientHeight":"clientWidth",q=B?"height":"width",K=$({},r,{component:h,allowScrollButtonsMobile:m,indicatorColor:v,orientation:y,vertical:B,scrollButtons:b,textColor:L,variant:C,visibleScrollbar:N,fixed:!D,hideScrollbar:D&&!N,scrollableX:D&&!B,scrollableY:D&&B,centered:c&&!D,scrollButtonsHideMobile:!m}),Q=kte(K),de=Ws({elementType:S.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:K}),fe=Ws({elementType:S.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:K}),[J,ce]=T.useState(!1),[_e,be]=T.useState(M4),[Xe,$e]=T.useState(!1),[tt,Ve]=T.useState(!1),[se,ae]=T.useState(!1),[W,Ie]=T.useState({overflow:"hidden",scrollbarWidth:0}),Re=new Map,De=T.useRef(null),he=T.useRef(null),qe=()=>{const me=De.current;let Fe;if(me){const gt=me.getBoundingClientRect();Fe={clientWidth:me.clientWidth,scrollLeft:me.scrollLeft,scrollTop:me.scrollTop,scrollLeftNormalized:dq(me,o?"rtl":"ltr"),scrollWidth:me.scrollWidth,top:gt.top,bottom:gt.bottom,left:gt.left,right:gt.right}}let Je;if(me&&k!==!1){const gt=he.current.children;if(gt.length>0){const ee=gt[Re.get(k)];Je=ee?ee.getBoundingClientRect():null}}return{tabsMeta:Fe,tabMeta:Je}},Le=_a(()=>{const{tabsMeta:me,tabMeta:Fe}=qe();let Je=0,gt;if(B)gt="top",Fe&&me&&(Je=Fe.top-me.top+me.scrollTop);else if(gt=o?"right":"left",Fe&&me){const Ue=o?me.scrollLeftNormalized+me.clientWidth-me.scrollWidth:me.scrollLeft;Je=(o?-1:1)*(Fe[gt]-me[gt]+Ue)}const ee={[gt]:Je,[q]:Fe?Fe[q]:0};if(isNaN(_e[gt])||isNaN(_e[q]))be(ee);else{const Ue=Math.abs(_e[gt]-ee[gt]),ye=Math.abs(_e[q]-ee[q]);(Ue>=1||ye>=1)&&be(ee)}}),V=(me,{animation:Fe=!0}={})=>{Fe?_te(G,De.current,me,{duration:i.transitions.duration.standard}):De.current[G]=me},U=me=>{let Fe=De.current[G];B?Fe+=me:(Fe+=me*(o?-1:1),Fe*=o&&Hz()==="reverse"?-1:1),V(Fe)},ne=()=>{const me=De.current[F];let Fe=0;const Je=Array.from(he.current.children);for(let gt=0;gtme){gt===0&&(Fe=me);break}Fe+=ee[F]}return Fe},le=()=>{U(-1*ne())},Ce=()=>{U(ne())},ve=T.useCallback(me=>{Ie({overflow:null,scrollbarWidth:me})},[]),He=()=>{const me={};me.scrollbarSizeListener=D?E.jsx(zte,{onChange:ve,className:lt(Q.scrollableX,Q.hideScrollbar)}):null;const Je=D&&(b==="auto"&&(Xe||tt)||b===!0);return me.scrollButtonStart=Je?E.jsx(g,$({slots:{StartScrollButtonIcon:S.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:de},orientation:y,direction:o?"right":"left",onClick:le,disabled:!Xe},R,{className:lt(Q.scrollButtons,R.className)})):null,me.scrollButtonEnd=Je?E.jsx(g,$({slots:{EndScrollButtonIcon:S.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:fe},orientation:y,direction:o?"left":"right",onClick:Ce,disabled:!tt},R,{className:lt(Q.scrollButtons,R.className)})):null,me},Ae=_a(me=>{const{tabsMeta:Fe,tabMeta:Je}=qe();if(!(!Je||!Fe)){if(Je[X]Fe[Z]){const gt=Fe[G]+(Je[Z]-Fe[Z]);V(gt,{animation:me})}}}),Ee=_a(()=>{D&&b!==!1&&ae(!se)});T.useEffect(()=>{const me=$b(()=>{De.current&&Le()});let Fe;const Je=Ue=>{Ue.forEach(ye=>{ye.removedNodes.forEach(Pe=>{var We;(We=Fe)==null||We.unobserve(Pe)}),ye.addedNodes.forEach(Pe=>{var We;(We=Fe)==null||We.observe(Pe)})}),me(),Ee()},gt=La(De.current);gt.addEventListener("resize",me);let ee;return typeof ResizeObserver<"u"&&(Fe=new ResizeObserver(me),Array.from(he.current.children).forEach(Ue=>{Fe.observe(Ue)})),typeof MutationObserver<"u"&&(ee=new MutationObserver(Je),ee.observe(he.current,{childList:!0})),()=>{var Ue,ye;me.clear(),gt.removeEventListener("resize",me),(Ue=ee)==null||Ue.disconnect(),(ye=Fe)==null||ye.disconnect()}},[Le,Ee]),T.useEffect(()=>{const me=Array.from(he.current.children),Fe=me.length;if(typeof IntersectionObserver<"u"&&Fe>0&&D&&b!==!1){const Je=me[0],gt=me[Fe-1],ee={root:De.current,threshold:.99},Ue=Ke=>{$e(!Ke[0].isIntersecting)},ye=new IntersectionObserver(Ue,ee);ye.observe(Je);const Pe=Ke=>{Ve(!Ke[0].isIntersecting)},We=new IntersectionObserver(Pe,ee);return We.observe(gt),()=>{ye.disconnect(),We.disconnect()}}},[D,b,se,u==null?void 0:u.length]),T.useEffect(()=>{ce(!0)},[]),T.useEffect(()=>{Le()}),T.useEffect(()=>{Ae(M4!==_e)},[Ae,_e]),T.useImperativeHandle(l,()=>({updateIndicator:Le,updateScrollButtons:Ee}),[Le,Ee]);const bt=E.jsx(Fte,$({},P,{className:lt(Q.indicator,P.className),ownerState:K,style:$({},_e,P.style)}));let ke=0;const it=T.Children.map(u,me=>{if(!T.isValidElement(me))return null;const Fe=me.props.value===void 0?ke:me.props.value;Re.set(Fe,ke);const Je=Fe===k;return ke+=1,T.cloneElement(me,$({fullWidth:C==="fullWidth",indicator:Je&&!J&&bt,selected:Je,selectionFollowsFocus:_,onChange:x,textColor:L,value:Fe},ke===1&&k===!1&&!me.props.tabIndex?{tabIndex:0}:{}))}),Oe=me=>{const Fe=he.current,Je=Fi(Fe).activeElement;if(Je.getAttribute("role")!=="tab")return;let ee=y==="horizontal"?"ArrowLeft":"ArrowUp",Ue=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&o&&(ee="ArrowRight",Ue="ArrowLeft"),me.key){case ee:me.preventDefault(),sv(Fe,Je,S4);break;case Ue:me.preventDefault(),sv(Fe,Je,w4);break;case"Home":me.preventDefault(),sv(Fe,null,w4);break;case"End":me.preventDefault(),sv(Fe,null,S4);break}},Ye=He();return E.jsxs(Lte,$({className:lt(Q.root,f),ownerState:K,ref:n,as:h},z,{children:[Ye.scrollButtonStart,Ye.scrollbarSizeListener,E.jsxs(Ote,{className:Q.scroller,ownerState:K,style:{overflow:W.overflow,[B?`margin${o?"Left":"Right"}`:"marginBottom"]:N?void 0:-W.scrollbarWidth},ref:De,children:[E.jsx(Dte,{"aria-label":s,"aria-labelledby":a,"aria-orientation":y==="vertical"?"vertical":null,className:Q.flexContainer,ownerState:K,onKeyDown:Oe,ref:he,role:"tablist",children:it}),J&&bt]}),Ye.scrollButtonEnd]}))});function Bte(t){return Tt("MuiTextField",t)}Ct("MuiTextField",["root"]);const jte=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Vte={standard:MR,filled:SR,outlined:CR},$te=t=>{const{classes:e}=t;return Rt({root:["root"]},Bte,e)},Wte=Ge(d6,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Hte=T.forwardRef(function(e,n){const r=At({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:f=!1,FormHelperTextProps:h,fullWidth:m=!1,helperText:v,id:x,InputLabelProps:y,inputProps:g,InputProps:b,inputRef:_,label:S,maxRows:A,minRows:P,multiline:R=!1,name:L,onBlur:k,onChange:C,onFocus:N,placeholder:z,required:D=!1,rows:B,select:G=!1,SelectProps:X,type:Z,value:F,variant:q="outlined"}=r,K=et(r,jte),Q=$({},r,{autoFocus:o,color:l,disabled:u,error:f,fullWidth:m,multiline:R,required:D,select:G,variant:q}),de=$te(Q),fe={};q==="outlined"&&(y&&typeof y.shrink<"u"&&(fe.notched=y.shrink),fe.label=S),G&&((!X||!X.native)&&(fe.id=void 0),fe["aria-describedby"]=void 0);const J=jz(x),ce=v&&J?`${J}-helper-text`:void 0,_e=S&&J?`${J}-label`:void 0,be=Vte[q],Xe=E.jsx(be,$({"aria-describedby":ce,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:m,multiline:R,name:L,rows:B,maxRows:A,minRows:P,type:Z,value:F,id:J,inputRef:_,onBlur:k,onChange:C,onFocus:N,placeholder:z,inputProps:g},fe,b));return E.jsxs(Wte,$({className:lt(de.root,a),disabled:u,error:f,fullWidth:m,ref:n,required:D,color:l,variant:q,ownerState:Q},K,{children:[S!=null&&S!==""&&E.jsx(m6,$({htmlFor:J,id:_e},y,{children:S})),G?E.jsx(RR,$({"aria-describedby":ce,id:J,labelId:_e,value:F,input:Xe},X,{children:s})):Xe,v&&E.jsx(AJ,$({id:ce},h,{children:v}))]}))});/** * @remix-run/router v1.21.0 * * Copyright (c) Remix Software Inc. @@ -141,7 +141,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function _m(){return _m=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function AR(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Xte(){return Math.random().toString(36).substr(2,8)}function C4(t,e){return{usr:t.state,key:t.key,idx:e}}function q2(t,e,n,r){return n===void 0&&(n=null),_m({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Su(e):e,{state:n,key:e&&e.key||r||Xte()})}function T1(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Su(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function qte(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=xl.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(_m({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function f(){a=xl.Pop;let y=u(),g=y==null?null:y-c;c=y,l&&l({action:a,location:x.location,delta:g})}function h(y,g){a=xl.Push;let b=q2(x.location,y,g);n&&n(b,y),c=u()+1;let _=C4(b,c),S=x.createHref(b);try{s.pushState(_,"",S)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;i.location.assign(S)}o&&l&&l({action:a,location:x.location,delta:1})}function m(y,g){a=xl.Replace;let b=q2(x.location,y,g);n&&n(b,y),c=u();let _=C4(b,c),S=x.createHref(b);s.replaceState(_,"",S),o&&l&&l({action:a,location:x.location,delta:0})}function v(y){let g=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:T1(y);return b=b.replace(/ $/,"%20"),Hn(g,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,g)}let x={get action(){return a},get location(){return t(i,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(E4,f),l=y,()=>{i.removeEventListener(E4,f),l=null}},createHref(y){return e(i,y)},createURL:v,encodeLocation(y){let g=v(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:m,go(y){return s.go(y)}};return x}var T4;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(T4||(T4={}));function Yte(t,e,n){return n===void 0&&(n="/"),Kte(t,e,n,!1)}function Kte(t,e,n,r){let i=typeof e=="string"?Su(e):e,o=Ed(i.pathname||"/",n);if(o==null)return null;let s=A6(t);Zte(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(Hn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Al([r,l.relativePath]),u=n.concat(l);o.children&&o.children.length>0&&(Hn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),A6(o.children,e,u,c)),!(o.path==null&&!o.index)&&e.push({path:c,score:ine(c,o.index),routesMeta:u})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of P6(o.path))i(o,s,l)}),e}function P6(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=P6(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function Zte(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:one(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Jte=/^:[\w-]+$/,Qte=3,ene=2,tne=1,nne=10,rne=-2,R4=t=>t==="*";function ine(t,e){let n=t.split("/"),r=n.length;return n.some(R4)&&(r+=rne),e&&(r+=ene),n.filter(i=>!R4(i)).reduce((i,o)=>i+(Jte.test(o)?Qte:o===""?tne:nne),r)}function one(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 sne(t,e,n){let{routesMeta:r}=t,i={},o="/",s=[];for(let a=0;a{let{paramName:h,isOptional:m}=u;if(h==="*"){let x=a[f]||"";s=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const v=a[f];return m&&!v?c[h]=void 0:c[h]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:t}}function ane(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),AR(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,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function lne(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return AR(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Ed(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 cne(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Su(t):t;return{pathname:n?n.startsWith("/")?n:une(n,e):e,search:hne(r),hash:pne(i)}}function une(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 tM(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 and the router will parse it for you.'}function fne(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function I6(t,e){let n=fne(t);return e?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function N6(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Su(t):(i=_m({},t),Hn(!i.pathname||!i.pathname.includes("?"),tM("?","pathname","search",i)),Hn(!i.pathname||!i.pathname.includes("#"),tM("#","pathname","hash",i)),Hn(!i.search||!i.search.includes("#"),tM("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let f=e.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?e[f]:"/"}let l=cne(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Al=t=>t.join("/").replace(/\/\/+/g,"/"),dne=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),hne=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,pne=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function mne(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const k6=["post","put","patch","delete"];new Set(k6);const gne=["get",...k6];new Set(gne);/** + */function _m(){return _m=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function AR(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Xte(){return Math.random().toString(36).substr(2,8)}function C4(t,e){return{usr:t.state,key:t.key,idx:e}}function Y2(t,e,n,r){return n===void 0&&(n=null),_m({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Su(e):e,{state:n,key:e&&e.key||r||Xte()})}function R1(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Su(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function qte(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=xl.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(_m({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function f(){a=xl.Pop;let y=u(),g=y==null?null:y-c;c=y,l&&l({action:a,location:x.location,delta:g})}function h(y,g){a=xl.Push;let b=Y2(x.location,y,g);n&&n(b,y),c=u()+1;let _=C4(b,c),S=x.createHref(b);try{s.pushState(_,"",S)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;i.location.assign(S)}o&&l&&l({action:a,location:x.location,delta:1})}function m(y,g){a=xl.Replace;let b=Y2(x.location,y,g);n&&n(b,y),c=u();let _=C4(b,c),S=x.createHref(b);s.replaceState(_,"",S),o&&l&&l({action:a,location:x.location,delta:0})}function v(y){let g=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:R1(y);return b=b.replace(/ $/,"%20"),Hn(g,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,g)}let x={get action(){return a},get location(){return t(i,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(E4,f),l=y,()=>{i.removeEventListener(E4,f),l=null}},createHref(y){return e(i,y)},createURL:v,encodeLocation(y){let g=v(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:m,go(y){return s.go(y)}};return x}var T4;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(T4||(T4={}));function Yte(t,e,n){return n===void 0&&(n="/"),Kte(t,e,n,!1)}function Kte(t,e,n,r){let i=typeof e=="string"?Su(e):e,o=Ed(i.pathname||"/",n);if(o==null)return null;let s=A6(t);Zte(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(Hn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Al([r,l.relativePath]),u=n.concat(l);o.children&&o.children.length>0&&(Hn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),A6(o.children,e,u,c)),!(o.path==null&&!o.index)&&e.push({path:c,score:ine(c,o.index),routesMeta:u})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of P6(o.path))i(o,s,l)}),e}function P6(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=P6(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function Zte(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:one(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Jte=/^:[\w-]+$/,Qte=3,ene=2,tne=1,nne=10,rne=-2,R4=t=>t==="*";function ine(t,e){let n=t.split("/"),r=n.length;return n.some(R4)&&(r+=rne),e&&(r+=ene),n.filter(i=>!R4(i)).reduce((i,o)=>i+(Jte.test(o)?Qte:o===""?tne:nne),r)}function one(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 sne(t,e,n){let{routesMeta:r}=t,i={},o="/",s=[];for(let a=0;a{let{paramName:h,isOptional:m}=u;if(h==="*"){let x=a[f]||"";s=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const v=a[f];return m&&!v?c[h]=void 0:c[h]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:t}}function ane(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),AR(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,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function lne(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return AR(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Ed(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 cne(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Su(t):t;return{pathname:n?n.startsWith("/")?n:une(n,e):e,search:hne(r),hash:pne(i)}}function une(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 rM(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 and the router will parse it for you.'}function fne(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function I6(t,e){let n=fne(t);return e?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function N6(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Su(t):(i=_m({},t),Hn(!i.pathname||!i.pathname.includes("?"),rM("?","pathname","search",i)),Hn(!i.pathname||!i.pathname.includes("#"),rM("#","pathname","hash",i)),Hn(!i.search||!i.search.includes("#"),rM("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let f=e.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?e[f]:"/"}let l=cne(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Al=t=>t.join("/").replace(/\/\/+/g,"/"),dne=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),hne=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,pne=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function mne(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const k6=["post","put","patch","delete"];new Set(k6);const gne=["get",...k6];new Set(gne);/** * React Router v6.28.0 * * Copyright (c) Remix Software Inc. @@ -150,7 +150,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function wm(){return wm=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.current=!0}),T.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=N6(c,JSON.parse(s),o,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Al([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,s,o,t])}function Qb(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=T.useContext($l),{matches:i}=T.useContext(Mu),{pathname:o}=Jd(),s=JSON.stringify(I6(i,r.v7_relativeSplatPath));return T.useMemo(()=>N6(t,JSON.parse(s),o,n==="path"),[t,s,o,n])}function bne(t,e){return _ne(t,e)}function _ne(t,e,n,r){cg()||Hn(!1);let{navigator:i}=T.useContext($l),{matches:o}=T.useContext(Mu),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=Jd(),u;if(e){var f;let y=typeof e=="string"?Su(e):e;l==="/"||(f=y.pathname)!=null&&f.startsWith(l)||Hn(!1),u=y}else u=c;let h=u.pathname||"/",m=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=Yte(t,{pathname:m}),x=Cne(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Al([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Al([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,n,r);return e&&x?T.createElement(Jb.Provider,{value:{location:wm({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:xl.Pop}},x):x}function wne(){let t=Pne(),e=mne(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},e),n?T.createElement("pre",{style:i},n):null,null)}const Sne=T.createElement(wne,null);class Mne extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?T.createElement(Mu.Provider,{value:this.props.routeContext},T.createElement(O6.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ene(t){let{routeContext:e,match:n,children:r}=t,i=T.useContext(Zb);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),T.createElement(Mu.Provider,{value:e},r)}function Cne(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var o;if(!n)return null;if(n.errors)t=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=s.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||Hn(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,f,h)=>{let m,v=!1,x=null,y=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,x=f.route.errorElement||Sne,l&&(c<0&&h===0?(v=!0,y=null):c===h&&(v=!0,y=f.route.hydrateFallbackElement||null)));let g=e.concat(s.slice(0,h+1)),b=()=>{let _;return m?_=x:v?_=y:f.route.Component?_=T.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=u,T.createElement(Ene,{match:f,routeContext:{outlet:u,matches:g,isDataRoute:n!=null},children:_})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?T.createElement(Mne,{location:n.location,revalidation:n.revalidation,component:x,error:m,children:b(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):b()},null)}var F6=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(F6||{}),A1=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(A1||{});function Tne(t){let e=T.useContext(Zb);return e||Hn(!1),e}function Rne(t){let e=T.useContext(L6);return e||Hn(!1),e}function Ane(t){let e=T.useContext(Mu);return e||Hn(!1),e}function z6(t){let e=Ane(),n=e.matches[e.matches.length-1];return n.route.id||Hn(!1),n.route.id}function Pne(){var t;let e=T.useContext(O6),n=Rne(A1.UseRouteError),r=z6(A1.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function Ine(){let{router:t}=Tne(F6.UseNavigateStable),e=z6(A1.UseNavigateStable),n=T.useRef(!1);return D6(()=>{n.current=!0}),T.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,wm({fromRouteId:e},o)))},[t,e])}const A4={};function Nne(t,e){A4[e]||(A4[e]=!0,console.warn(e))}const P4=(t,e,n)=>Nne(t,"⚠️ React Router Future Flag Warning: "+e+". "+("You can use the `"+t+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function kne(t,e){t!=null&&t.v7_startTransition||P4("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(t!=null&&t.v7_relativeSplatPath)&&!e&&P4("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}function gp(t){Hn(!1)}function Lne(t){let{basename:e="/",children:n=null,location:r,navigationType:i=xl.Pop,navigator:o,static:s=!1,future:a}=t;cg()&&Hn(!1);let l=e.replace(/^\/*/,"/"),c=T.useMemo(()=>({basename:l,navigator:o,static:s,future:wm({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=Su(r));let{pathname:u="/",search:f="",hash:h="",state:m=null,key:v="default"}=r,x=T.useMemo(()=>{let y=Ed(u,l);return y==null?null:{location:{pathname:y,search:f,hash:h,state:m,key:v},navigationType:i}},[l,u,f,h,m,v,i]);return x==null?null:T.createElement($l.Provider,{value:c},T.createElement(Jb.Provider,{children:n,value:x}))}function One(t){let{children:e,location:n}=t;return bne(Y2(e),n)}new Promise(()=>{});function Y2(t,e){e===void 0&&(e=[]);let n=[];return T.Children.forEach(t,(r,i)=>{if(!T.isValidElement(r))return;let o=[...e,i];if(r.type===T.Fragment){n.push.apply(n,Y2(r.props.children,o));return}r.type!==gp&&Hn(!1),!r.props.index||!r.props.children||Hn(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Y2(r.props.children,o)),n.push(s)}),n}/** + */function wm(){return wm=Object.assign?Object.assign.bind():function(t){for(var e=1;e{a.current=!0}),T.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=N6(c,JSON.parse(s),o,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Al([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,s,o,t])}function t_(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=T.useContext($l),{matches:i}=T.useContext(Mu),{pathname:o}=Jd(),s=JSON.stringify(I6(i,r.v7_relativeSplatPath));return T.useMemo(()=>N6(t,JSON.parse(s),o,n==="path"),[t,s,o,n])}function bne(t,e){return _ne(t,e)}function _ne(t,e,n,r){cg()||Hn(!1);let{navigator:i}=T.useContext($l),{matches:o}=T.useContext(Mu),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=Jd(),u;if(e){var f;let y=typeof e=="string"?Su(e):e;l==="/"||(f=y.pathname)!=null&&f.startsWith(l)||Hn(!1),u=y}else u=c;let h=u.pathname||"/",m=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=Yte(t,{pathname:m}),x=Cne(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Al([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Al([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,n,r);return e&&x?T.createElement(e_.Provider,{value:{location:wm({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:xl.Pop}},x):x}function wne(){let t=Pne(),e=mne(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},e),n?T.createElement("pre",{style:i},n):null,null)}const Sne=T.createElement(wne,null);class Mne extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?T.createElement(Mu.Provider,{value:this.props.routeContext},T.createElement(O6.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ene(t){let{routeContext:e,match:n,children:r}=t,i=T.useContext(Qb);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),T.createElement(Mu.Provider,{value:e},r)}function Cne(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var o;if(!n)return null;if(n.errors)t=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=s.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||Hn(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,f,h)=>{let m,v=!1,x=null,y=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,x=f.route.errorElement||Sne,l&&(c<0&&h===0?(v=!0,y=null):c===h&&(v=!0,y=f.route.hydrateFallbackElement||null)));let g=e.concat(s.slice(0,h+1)),b=()=>{let _;return m?_=x:v?_=y:f.route.Component?_=T.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=u,T.createElement(Ene,{match:f,routeContext:{outlet:u,matches:g,isDataRoute:n!=null},children:_})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?T.createElement(Mne,{location:n.location,revalidation:n.revalidation,component:x,error:m,children:b(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):b()},null)}var F6=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(F6||{}),P1=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(P1||{});function Tne(t){let e=T.useContext(Qb);return e||Hn(!1),e}function Rne(t){let e=T.useContext(L6);return e||Hn(!1),e}function Ane(t){let e=T.useContext(Mu);return e||Hn(!1),e}function z6(t){let e=Ane(),n=e.matches[e.matches.length-1];return n.route.id||Hn(!1),n.route.id}function Pne(){var t;let e=T.useContext(O6),n=Rne(P1.UseRouteError),r=z6(P1.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function Ine(){let{router:t}=Tne(F6.UseNavigateStable),e=z6(P1.UseNavigateStable),n=T.useRef(!1);return D6(()=>{n.current=!0}),T.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,wm({fromRouteId:e},o)))},[t,e])}const A4={};function Nne(t,e){A4[e]||(A4[e]=!0,console.warn(e))}const P4=(t,e,n)=>Nne(t,"⚠️ React Router Future Flag Warning: "+e+". "+("You can use the `"+t+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function kne(t,e){t!=null&&t.v7_startTransition||P4("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(t!=null&&t.v7_relativeSplatPath)&&!e&&P4("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}function gp(t){Hn(!1)}function Lne(t){let{basename:e="/",children:n=null,location:r,navigationType:i=xl.Pop,navigator:o,static:s=!1,future:a}=t;cg()&&Hn(!1);let l=e.replace(/^\/*/,"/"),c=T.useMemo(()=>({basename:l,navigator:o,static:s,future:wm({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=Su(r));let{pathname:u="/",search:f="",hash:h="",state:m=null,key:v="default"}=r,x=T.useMemo(()=>{let y=Ed(u,l);return y==null?null:{location:{pathname:y,search:f,hash:h,state:m,key:v},navigationType:i}},[l,u,f,h,m,v,i]);return x==null?null:T.createElement($l.Provider,{value:c},T.createElement(e_.Provider,{children:n,value:x}))}function One(t){let{children:e,location:n}=t;return bne(K2(e),n)}new Promise(()=>{});function K2(t,e){e===void 0&&(e=[]);let n=[];return T.Children.forEach(t,(r,i)=>{if(!T.isValidElement(r))return;let o=[...e,i];if(r.type===T.Fragment){n.push.apply(n,K2(r.props.children,o));return}r.type!==gp&&Hn(!1),!r.props.index||!r.props.children||Hn(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=K2(r.props.children,o)),n.push(s)}),n}/** * React Router DOM v6.28.0 * * Copyright (c) Remix Software Inc. @@ -159,20 +159,20 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function P1(){return P1=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Dne(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Fne(t,e){return t.button===0&&(!e||e==="_self")&&!Dne(t)}const zne=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Une=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Bne="6";try{window.__reactRouterVersion=Bne}catch{}const jne=T.createContext({isTransitioning:!1}),Vne="startTransition",I4=Yp[Vne];function $ne(t){let{basename:e,children:n,future:r,window:i}=t,o=T.useRef();o.current==null&&(o.current=Gte({window:i,v5Compat:!0}));let s=o.current,[a,l]=T.useState({action:s.action,location:s.location}),{v7_startTransition:c}=r||{},u=T.useCallback(f=>{c&&I4?I4(()=>l(f)):l(f)},[l,c]);return T.useLayoutEffect(()=>s.listen(u),[s,u]),T.useEffect(()=>kne(r),[r]),T.createElement(Lne,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const Wne=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Hne=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fy=T.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:u,viewTransition:f}=e,h=U6(e,zne),{basename:m}=T.useContext($l),v,x=!1;if(typeof c=="string"&&Hne.test(c)&&(v=c,Wne))try{let _=new URL(window.location.href),S=c.startsWith("//")?new URL(_.protocol+c):new URL(c),A=Ed(S.pathname,m);S.origin===_.origin&&A!=null?c=A+S.search+S.hash:x=!0}catch{}let y=vne(c,{relative:i}),g=Xne(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:f});function b(_){r&&r(_),_.defaultPrevented||g(_)}return T.createElement("a",P1({},h,{href:v||y,onClick:x||o?r:b,ref:n,target:l}))}),B6=T.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,viewTransition:c,children:u}=e,f=U6(e,Une),h=Qb(l,{relative:f.relative}),m=Jd(),v=T.useContext(L6),{navigator:x,basename:y}=T.useContext($l),g=v!=null&&qne(h)&&c===!0,b=x.encodeLocation?x.encodeLocation(h).pathname:h.pathname,_=m.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(_=_.toLowerCase(),S=S?S.toLowerCase():null,b=b.toLowerCase()),S&&y&&(S=Ed(S,y)||S);const A=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let P=_===b||!s&&_.startsWith(b)&&_.charAt(A)==="/",R=S!=null&&(S===b||!s&&S.startsWith(b)&&S.charAt(b.length)==="/"),L={isActive:P,isPending:R,isTransitioning:g},k=P?r:void 0,C;typeof o=="function"?C=o(L):C=[o,P?"active":null,R?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let N=typeof a=="function"?a(L):a;return T.createElement(Fy,P1({},f,{"aria-current":k,className:C,ref:n,style:N,to:l,viewTransition:c}),typeof u=="function"?u(L):u)});var K2;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(K2||(K2={}));var N4;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(N4||(N4={}));function Gne(t){let e=T.useContext(Zb);return e||Hn(!1),e}function Xne(t,e){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,viewTransition:a}=e===void 0?{}:e,l=yne(),c=Jd(),u=Qb(t,{relative:s});return T.useCallback(f=>{if(Fne(f,n)){f.preventDefault();let h=r!==void 0?r:T1(c)===T1(u);l(t,{replace:h,state:i,preventScrollReset:o,relative:s,viewTransition:a})}},[c,l,u,r,i,n,t,o,s,a])}function qne(t,e){e===void 0&&(e={});let n=T.useContext(jne);n==null&&Hn(!1);let{basename:r}=Gne(K2.useViewTransitionState),i=Qb(t,{relative:e.relative});if(!n.isTransitioning)return!1;let o=Ed(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Ed(n.nextLocation.pathname,r)||n.nextLocation.pathname;return R1(i.pathname,s)!=null||R1(i.pathname,o)!=null}function Yne(t){var n;const e=t.standard;return E.jsxs(gZ,{variant:"outlined",children:[E.jsxs(CZ,{children:[E.jsx(ar,{sx:{fontSize:14},color:"text.secondary",gutterBottom:!0,children:"XAS Metadata"}),E.jsx(ar,{variant:"h5",component:"div",children:e.sample.name}),E.jsx(ar,{variant:"h6",component:"div",children:e.sample.formula}),E.jsx(ar,{sx:{mb:1.5},color:"text.secondary",children:e.sample.prep}),E.jsxs(ar,{sx:{mb:1.5},children:["Measured at ",(n=e.facility)==null?void 0:n.name," on beamline"," ",e.beamline.name]}),E.jsx(ar,{sx:{mb:1.5},children:e.start_time})]}),t.showDownload&&E.jsx(_Z,{children:E.jsxs(is,{children:[E.jsx(a4,{href:"/webxdiviewer/xdidata/"+String(e.location),download:String(e.id)+".xdi",children:"Download XDI"}),E.jsx(a4,{component:B6,to:"/xdi/"+String(e.location),children:"Persistent Link"})]})})]})}const ug=T.createContext({xdiFile:null,setXDIFile:()=>{},comparisonFiles:[],setComparisonFiles:()=>{}});function PR(t){const{children:e}=t;return E.jsx(ug.Provider,{value:t.value,children:e})}function Kne(){const t=T.useContext(ug);return E.jsx(Ws,{children:E.jsx(ar,{sx:{whiteSpace:"pre-line",overflow:"scroll",maxHeight:"20em"},children:t.xdiFile===null?"":t.xdiFile.rawText()})})}const nM=Ge(Ps)(({theme:t})=>({[`&.${bm.head}`]:{backgroundColor:t.palette.common.black,color:t.palette.common.white},[`&.${bm.body}`]:{fontSize:14,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),Zne=Ge(Kb)(({theme:t})=>({"&:nth-of-type(odd):not(:hover):not(.activeclicked)":{backgroundColor:t.palette.action.selected},"&:last-child td, &:last-child th":{border:0}}));function Jne(t){var e,n,r,i;return E.jsxs(Zne,{hover:!0,sx:{"&:last-child td, &:last-child th":{border:0}},children:[E.jsx(nM,{align:"left",children:((e=t.xdiFile)==null?void 0:e.element)??" "}),E.jsx(nM,{align:"center",children:((n=t.xdiFile)==null?void 0:n.edge)??""}),E.jsx(nM,{align:"center",children:((i=(r=t.xdiFile)==null?void 0:r.sample)==null?void 0:i.name)??""})]},t.key)}function Qne(){const t=T.useContext(ug),e=()=>{const r=t.xdiFile;if(r!=null&&!t.comparisonFiles.some(i=>i.id==(r==null?void 0:r.id))){const o=[...t.comparisonFiles.length>=3?t.comparisonFiles.slice(1,3):t.comparisonFiles,r];t.setComparisonFiles(o)}},n=()=>{t.setComparisonFiles([])};return E.jsxs(Ws,{children:[E.jsx(cu,{variant:"contained",onClick:e,children:"Store Selected"}),E.jsx(cu,{variant:"outlined",onClick:n,children:"Clear All"}),E.jsx(T6,{component:bu,children:E.jsxs(E6,{sx:{minWidth:650},size:"small","aria-label":"a dense table",children:[E.jsx(R6,{children:E.jsxs(Kb,{children:[E.jsx(Ps,{children:"Element"}),E.jsx(Ps,{align:"center",children:"Edge"}),E.jsx(Ps,{align:"center",children:"Name"})]})}),E.jsx(C6,{children:t.comparisonFiles.map((r,i)=>Jne({key:i,xdiFile:r}))})]})})]})}function rM(t){const{children:e,value:n,index:r,...i}=t;return E.jsx("div",{role:"tabpanel",hidden:n!==r,id:`simple-tabpanel-${r}`,"aria-labelledby":`simple-tab-${r}`,...i,children:n===r&&E.jsx(Ws,{sx:{p:1},children:e})})}function iM(t){return{id:`simple-tab-${t}`,"aria-controls":`simple-tabpanel-${t}`}}function IR(t){const[e,n]=T.useState(0),r=(i,o)=>{n(o)};return E.jsxs(Ws,{sx:{width:"100%"},children:[E.jsx(Ws,{sx:{borderBottom:1,borderColor:"divider"},children:E.jsxs(Ute,{value:e,onChange:r,"aria-label":"basic tabs example",children:[E.jsx(QS,{label:"Metadata",...iM(0)}),E.jsx(QS,{label:"Raw File",...iM(1)}),t.showCompare&&E.jsx(QS,{label:"Comparison",...iM(2)})]})}),E.jsx(rM,{value:e,index:0,children:E.jsx(Yne,{standard:t.standard,showDownload:t.showDownload})}),E.jsx(rM,{value:e,index:1,children:E.jsx(Kne,{})}),t.showCompare&&E.jsx(rM,{value:e,index:2,children:E.jsx(Qne,{})})]})}const j6=[{Number:"1",Type:"nonmetal","Atomic Weight":"1.008",Name:"Hydrogen",Symbol:"H","Melting Point":"-259","Boiling Point":"-253",Density:"0.09",Earth:"0.14",Group:"1","Electron Configuration":"1s1"},{Number:"2",Type:"noble gas","Atomic Weight":"4.003",Name:"Helium",Symbol:"He","Melting Point":"-272","Boiling Point":"-269",Density:"0.18",Earth:"",Group:"18","Electron Configuration":"1s2"},{Number:"3",Type:"alkali metal","Atomic Weight":"6.941",Name:"Lithium",Symbol:"Li","Melting Point":"180","Boiling Point":"1347",Density:"0.53",Earth:"",Group:"1","Electron Configuration":"[He] 2s1"},{Number:"4",Type:"alkaline earth metal","Atomic Weight":"9.012",Name:"Beryllium",Symbol:"Be","Melting Point":"1278","Boiling Point":"2970",Density:"1.85",Earth:"",Group:"2","Electron Configuration":"[He] 2s2"},{Number:"5",Type:"metalloid","Atomic Weight":"10.811",Name:"Boron",Symbol:"B","Melting Point":"2300","Boiling Point":"2550",Density:"2.34",Earth:"",Group:"13","Electron Configuration":"[He] 2s2 2p1"},{Number:"6",Type:"nonmetal","Atomic Weight":"12.011",Name:"Carbon",Symbol:"C","Melting Point":"3500","Boiling Point":"4827",Density:"2.26",Earth:"0.09",Group:"14","Electron Configuration":"[He] 2s2 2p2"},{Number:"7",Type:"nonmetal","Atomic Weight":"14.007",Name:"Nitrogen",Symbol:"N","Melting Point":"-210","Boiling Point":"-196",Density:"1.25",Earth:"",Group:"15","Electron Configuration":"[He] 2s2 2p3"},{Number:"8",Type:"nonmetal","Atomic Weight":"15.999",Name:"Oxygen",Symbol:"O","Melting Point":"-218","Boiling Point":"-183",Density:"1.43",Earth:"46.71",Group:"16","Electron Configuration":"[He] 2s2 2p4"},{Number:"9",Type:"halogen","Atomic Weight":"18.998",Name:"Fluorine",Symbol:"F","Melting Point":"-220","Boiling Point":"-188",Density:"1.7",Earth:"0.03",Group:"17","Electron Configuration":"[He] 2s2 2p5"},{Number:"10",Type:"noble gas","Atomic Weight":"20.18",Name:"Neon",Symbol:"Ne","Melting Point":"-249","Boiling Point":"-246",Density:"0.9",Earth:"",Group:"18","Electron Configuration":"[He] 2s2 2p6"},{Number:"11",Type:"alkali metal","Atomic Weight":"22.99",Name:"Sodium",Symbol:"Na","Melting Point":"98","Boiling Point":"883",Density:"0.97",Earth:"2.75",Group:"1","Electron Configuration":"[Ne] 3s1"},{Number:"12",Type:"alkaline earth metal","Atomic Weight":"24.305",Name:"Magnesium",Symbol:"Mg","Melting Point":"639","Boiling Point":"1090",Density:"1.74",Earth:"2.08",Group:"2","Electron Configuration":"[Ne] 3s2"},{Number:"13",Type:"post transition metal","Atomic Weight":"26.982",Name:"Aluminum",Symbol:"Al","Melting Point":"660","Boiling Point":"2467",Density:"2.7",Earth:"8.07",Group:"13","Electron Configuration":"[Ne] 3s2 3p1"},{Number:"14",Type:"metalloid","Atomic Weight":"28.086",Name:"Silicon",Symbol:"Si","Melting Point":"1410","Boiling Point":"2355",Density:"2.33",Earth:"27.69",Group:"14","Electron Configuration":"[Ne] 3s2 3p2"},{Number:"15",Type:"nonmetal","Atomic Weight":"30.974",Name:"Phosphorus",Symbol:"P","Melting Point":"44","Boiling Point":"280",Density:"1.82",Earth:"0.13",Group:"15","Electron Configuration":"[Ne] 3s2 3p3"},{Number:"16",Type:"nonmetal","Atomic Weight":"32.065",Name:"Sulfur",Symbol:"S","Melting Point":"113","Boiling Point":"445",Density:"2.07",Earth:"0.05",Group:"16","Electron Configuration":"[Ne] 3s2 3p4"},{Number:"17",Type:"halogen","Atomic Weight":"35.453",Name:"Chlorine",Symbol:"Cl","Melting Point":"-101","Boiling Point":"-35",Density:"3.21",Earth:"0.05",Group:"17","Electron Configuration":"[Ne] 3s2 3p5"},{Number:"18",Type:"noble gas","Atomic Weight":"39.948",Name:"Argon",Symbol:"Ar","Melting Point":"-189","Boiling Point":"-186",Density:"1.78",Earth:"",Group:"18","Electron Configuration":"[Ne] 3s2 3p6"},{Number:"19",Type:"alkali metal","Atomic Weight":"39.098",Name:"Potassium",Symbol:"K","Melting Point":"64","Boiling Point":"774",Density:"0.86",Earth:"2.58",Group:"1","Electron Configuration":"[Ar] 4s1"},{Number:"20",Type:"alkaline earth metal","Atomic Weight":"40.078",Name:"Calcium",Symbol:"Ca","Melting Point":"839","Boiling Point":"1484",Density:"1.55",Earth:"3.65",Group:"2","Electron Configuration":"[Ar] 4s2"},{Number:"21",Type:"transition metal","Atomic Weight":"44.956",Name:"Scandium",Symbol:"Sc","Melting Point":"1539","Boiling Point":"2832",Density:"2.99",Earth:"",Group:"3","Electron Configuration":"[Ar] 3d1 4s2"},{Number:"22",Type:"transition metal","Atomic Weight":"47.867",Name:"Titanium",Symbol:"Ti","Melting Point":"1660","Boiling Point":"3287",Density:"4.54",Earth:"0.62",Group:"4","Electron Configuration":"[Ar] 3d2 4s2"},{Number:"23",Type:"transition metal","Atomic Weight":"50.942",Name:"Vanadium",Symbol:"V","Melting Point":"1890","Boiling Point":"3380",Density:"6.11",Earth:"",Group:"5","Electron Configuration":"[Ar] 3d3 4s2"},{Number:"24",Type:"transition metal","Atomic Weight":"51.996",Name:"Chromium",Symbol:"Cr","Melting Point":"1857","Boiling Point":"2672",Density:"7.19",Earth:"0.04",Group:"6","Electron Configuration":"[Ar] 3d5 4s1"},{Number:"25",Type:"transition metal","Atomic Weight":"54.938",Name:"Manganese",Symbol:"Mn","Melting Point":"1245","Boiling Point":"1962",Density:"7.43",Earth:"0.09",Group:"7","Electron Configuration":"[Ar] 3d5 4s2"},{Number:"26",Type:"transition metal","Atomic Weight":"55.845",Name:"Iron",Symbol:"Fe","Melting Point":"1535","Boiling Point":"2750",Density:"7.87",Earth:"5.05",Group:"8","Electron Configuration":"[Ar] 3d6 4s2"},{Number:"27",Type:"transition metal","Atomic Weight":"58.933",Name:"Cobalt",Symbol:"Co","Melting Point":"1495","Boiling Point":"2870",Density:"8.9",Earth:"",Group:"9","Electron Configuration":"[Ar] 3d7 4s2"},{Number:"28",Type:"transition metal","Atomic Weight":"58.693",Name:"Nickel",Symbol:"Ni","Melting Point":"1453","Boiling Point":"2732",Density:"8.9",Earth:"0.02",Group:"10","Electron Configuration":"[Ar] 3d8 4s2"},{Number:"29",Type:"transition metal","Atomic Weight":"63.546",Name:"Copper",Symbol:"Cu","Melting Point":"1083","Boiling Point":"2567",Density:"8.96",Earth:"",Group:"11","Electron Configuration":"[Ar] 3d10 4s1"},{Number:"30",Type:"transition metal","Atomic Weight":"65.39",Name:"Zinc",Symbol:"Zn","Melting Point":"420","Boiling Point":"907",Density:"7.13",Earth:"",Group:"12","Electron Configuration":"[Ar] 3d10 4s2"},{Number:"31",Type:"post transition metal","Atomic Weight":"69.723",Name:"Gallium",Symbol:"Ga","Melting Point":"30","Boiling Point":"2403",Density:"5.91",Earth:"",Group:"13","Electron Configuration":"[Ar] 3d10 4s2 4p1"},{Number:"32",Type:"metalloid","Atomic Weight":"72.64",Name:"Germanium",Symbol:"Ge","Melting Point":"937","Boiling Point":"2830",Density:"5.32",Earth:"",Group:"14","Electron Configuration":"[Ar] 3d10 4s2 4p2"},{Number:"33",Type:"metalloid","Atomic Weight":"74.922",Name:"Arsenic",Symbol:"As","Melting Point":"81","Boiling Point":"613",Density:"5.72",Earth:"",Group:"15","Electron Configuration":"[Ar] 3d10 4s2 4p3"},{Number:"34",Type:"nonmetal","Atomic Weight":"78.96",Name:"Selenium",Symbol:"Se","Melting Point":"217","Boiling Point":"685",Density:"4.79",Earth:"",Group:"16","Electron Configuration":"[Ar] 3d10 4s2 4p4"},{Number:"35",Type:"halogen","Atomic Weight":"79.904",Name:"Bromine",Symbol:"Br","Melting Point":"-7","Boiling Point":"59",Density:"3.12",Earth:"",Group:"17","Electron Configuration":"[Ar] 3d10 4s2 4p5"},{Number:"36",Type:"noble gas","Atomic Weight":"83.8",Name:"Krypton",Symbol:"Kr","Melting Point":"-157","Boiling Point":"-153",Density:"3.75",Earth:"",Group:"18","Electron Configuration":"[Ar] 3d10 4s2 4p6"},{Number:"37",Type:"alkali metal","Atomic Weight":"85.468",Name:"Rubidium",Symbol:"Rb","Melting Point":"39","Boiling Point":"688",Density:"1.63",Earth:"",Group:"1","Electron Configuration":"[Kr] 5s1"},{Number:"38",Type:"alkaline earth metal","Atomic Weight":"87.62",Name:"Strontium",Symbol:"Sr","Melting Point":"769","Boiling Point":"1384",Density:"2.54",Earth:"",Group:"2","Electron Configuration":"[Kr] 5s2"},{Number:"39",Type:"transition metal","Atomic Weight":"88.906",Name:"Yttrium",Symbol:"Y","Melting Point":"1523","Boiling Point":"3337",Density:"4.47",Earth:"",Group:"3","Electron Configuration":"[Kr] 4d1 5s2"},{Number:"40",Type:"transition metal","Atomic Weight":"91.224",Name:"Zirconium",Symbol:"Zr","Melting Point":"1852","Boiling Point":"4377",Density:"6.51",Earth:"0.03",Group:"4","Electron Configuration":"[Kr] 4d2 5s2"},{Number:"41",Type:"transition metal","Atomic Weight":"92.906",Name:"Niobium",Symbol:"Nb","Melting Point":"2468","Boiling Point":"4927",Density:"8.57",Earth:"",Group:"5","Electron Configuration":"[Kr] 4d4 5s1"},{Number:"42",Type:"transition metal","Atomic Weight":"95.94",Name:"Molybdenum",Symbol:"Mo","Melting Point":"2617","Boiling Point":"4612",Density:"10.22",Earth:"",Group:"6","Electron Configuration":"[Kr] 4d5 5s1"},{Number:"43",Type:"transition metal","Atomic Weight":"98",Name:"Technetium",Symbol:"Tc","Melting Point":"2200","Boiling Point":"4877",Density:"11.5",Earth:"",Group:"7","Electron Configuration":"[Kr] 4d5 5s2"},{Number:"44",Type:"transition metal","Atomic Weight":"101.07",Name:"Ruthenium",Symbol:"Ru","Melting Point":"2250","Boiling Point":"3900",Density:"12.37",Earth:"",Group:"8","Electron Configuration":"[Kr] 4d7 5s1"},{Number:"45",Type:"transition metal","Atomic Weight":"102.906",Name:"Rhodium",Symbol:"Rh","Melting Point":"1966","Boiling Point":"3727",Density:"12.41",Earth:"",Group:"9","Electron Configuration":"[Kr] 4d8 5s1"},{Number:"46",Type:"transition metal","Atomic Weight":"106.42",Name:"Palladium",Symbol:"Pd","Melting Point":"1552","Boiling Point":"2927",Density:"12.02",Earth:"",Group:"10","Electron Configuration":"[Kr] 4d10"},{Number:"47",Type:"transition metal","Atomic Weight":"107.868",Name:"Silver",Symbol:"Ag","Melting Point":"962","Boiling Point":"2212",Density:"10.5",Earth:"",Group:"11","Electron Configuration":"[Kr] 4d10 5s1"},{Number:"48",Type:"transition metal","Atomic Weight":"112.411",Name:"Cadmium",Symbol:"Cd","Melting Point":"321","Boiling Point":"765",Density:"8.65",Earth:"",Group:"12","Electron Configuration":"[Kr] 4d10 5s2"},{Number:"49",Type:"post transition metal","Atomic Weight":"114.818",Name:"Indium",Symbol:"In","Melting Point":"157","Boiling Point":"2000",Density:"7.31",Earth:"",Group:"13","Electron Configuration":"[Kr] 4d10 5s2 5p1"},{Number:"50",Type:"post transition metal","Atomic Weight":"118.71",Name:"Tin",Symbol:"Sn","Melting Point":"232","Boiling Point":"2270",Density:"7.31",Earth:"",Group:"14","Electron Configuration":"[Kr] 4d10 5s2 5p2"},{Number:"51",Type:"metalloid","Atomic Weight":"121.76",Name:"Antimony",Symbol:"Sb","Melting Point":"630","Boiling Point":"1750",Density:"6.68",Earth:"",Group:"15","Electron Configuration":"[Kr] 4d10 5s2 5p3"},{Number:"52",Type:"metalloid","Atomic Weight":"127.6",Name:"Tellurium",Symbol:"Te","Melting Point":"449","Boiling Point":"990",Density:"6.24",Earth:"",Group:"16","Electron Configuration":"[Kr] 4d10 5s2 5p4"},{Number:"53",Type:"halogen","Atomic Weight":"126.905",Name:"Iodine",Symbol:"I","Melting Point":"114","Boiling Point":"184",Density:"4.93",Earth:"",Group:"17","Electron Configuration":"[Kr] 4d10 5s2 5p5"},{Number:"54",Type:"noble gas","Atomic Weight":"131.293",Name:"Xenon",Symbol:"Xe","Melting Point":"-112","Boiling Point":"-108",Density:"5.9",Earth:"",Group:"18","Electron Configuration":"[Kr] 4d10 5s2 5p6"},{Number:"55",Type:"alkali metal","Atomic Weight":"132.906",Name:"Cesium",Symbol:"Cs","Melting Point":"29","Boiling Point":"678",Density:"1.87",Earth:"",Group:"1","Electron Configuration":"[Xe] 6s1"},{Number:"56",Type:"alkaline earth metal","Atomic Weight":"137.327",Name:"Barium",Symbol:"Ba","Melting Point":"725","Boiling Point":"1140",Density:"3.59",Earth:"0.05",Group:"2","Electron Configuration":"[Xe] 6s2"},{Number:"57",Type:"lanthanide","Atomic Weight":"138.906",Name:"Lanthanum",Symbol:"La","Melting Point":"920","Boiling Point":"3469",Density:"6.15",Earth:"",Group:"3","Electron Configuration":"[Xe] 5d1 6s2"},{Number:"58",Type:"lanthanide","Atomic Weight":"140.116",Name:"Cerium",Symbol:"Ce","Melting Point":"795","Boiling Point":"3257",Density:"6.77",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f1 5d1 6s2"},{Number:"59",Type:"lanthanide","Atomic Weight":"140.908",Name:"Praseodymium",Symbol:"Pr","Melting Point":"935","Boiling Point":"3127",Density:"6.77",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f3 6s2"},{Number:"60",Type:"lanthanide","Atomic Weight":"144.24",Name:"Neodymium",Symbol:"Nd","Melting Point":"1010","Boiling Point":"3127",Density:"7.01",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f4 6s2"},{Number:"61",Type:"lanthanide","Atomic Weight":"145",Name:"Promethium",Symbol:"Pm","Melting Point":"1100","Boiling Point":"3000",Density:"7.3",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f5 6s2"},{Number:"62",Type:"lanthanide","Atomic Weight":"150.36",Name:"Samarium",Symbol:"Sm","Melting Point":"1072","Boiling Point":"1900",Density:"7.52",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f6 6s2"},{Number:"63",Type:"lanthanide","Atomic Weight":"151.964",Name:"Europium",Symbol:"Eu","Melting Point":"822","Boiling Point":"1597",Density:"5.24",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f7 6s2"},{Number:"64",Type:"lanthanide","Atomic Weight":"157.25",Name:"Gadolinium",Symbol:"Gd","Melting Point":"1311","Boiling Point":"3233",Density:"7.9",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f7 5d1 6s2"},{Number:"65",Type:"lanthanide","Atomic Weight":"158.925",Name:"Terbium",Symbol:"Tb","Melting Point":"1360","Boiling Point":"3041",Density:"8.23",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f9 6s2"},{Number:"66",Type:"lanthanide","Atomic Weight":"162.5",Name:"Dysprosium",Symbol:"Dy","Melting Point":"1412","Boiling Point":"2562",Density:"8.55",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f10 6s2"},{Number:"67",Type:"lanthanide","Atomic Weight":"164.93",Name:"Holmium",Symbol:"Ho","Melting Point":"1470","Boiling Point":"2720",Density:"8.8",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f11 6s2"},{Number:"68",Type:"lanthanide","Atomic Weight":"167.259",Name:"Erbium",Symbol:"Er","Melting Point":"1522","Boiling Point":"2510",Density:"9.07",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f12 6s2"},{Number:"69",Type:"lanthanide","Atomic Weight":"168.934",Name:"Thulium",Symbol:"Tm","Melting Point":"1545","Boiling Point":"1727",Density:"9.32",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f13 6s2"},{Number:"70",Type:"lanthanide","Atomic Weight":"173.04",Name:"Ytterbium",Symbol:"Yb","Melting Point":"824","Boiling Point":"1466",Density:"6.9",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f14 6s2"},{Number:"71",Type:"lanthanide","Atomic Weight":"174.967",Name:"Lutetium",Symbol:"Lu","Melting Point":"1656","Boiling Point":"3315",Density:"9.84",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f14 5d1 6s2"},{Number:"72",Type:"transition metal","Atomic Weight":"178.49",Name:"Hafnium",Symbol:"Hf","Melting Point":"2150","Boiling Point":"5400",Density:"13.31",Earth:"",Group:"4","Electron Configuration":"[Xe] 4f14 5d2 6s2"},{Number:"73",Type:"transition metal","Atomic Weight":"180.948",Name:"Tantalum",Symbol:"Ta","Melting Point":"2996","Boiling Point":"5425",Density:"16.65",Earth:"",Group:"5","Electron Configuration":"[Xe] 4f14 5d3 6s2"},{Number:"74",Type:"transition metal","Atomic Weight":"183.84",Name:"Tungsten",Symbol:"W","Melting Point":"3410","Boiling Point":"5660",Density:"19.35",Earth:"",Group:"6","Electron Configuration":"[Xe] 4f14 5d4 6s2"},{Number:"75",Type:"transition metal","Atomic Weight":"186.207",Name:"Rhenium",Symbol:"Re","Melting Point":"3180","Boiling Point":"5627",Density:"21.04",Earth:"",Group:"7","Electron Configuration":"[Xe] 4f14 5d5 6s2"},{Number:"76",Type:"transition metal","Atomic Weight":"190.23",Name:"Osmium",Symbol:"Os","Melting Point":"3045","Boiling Point":"5027",Density:"22.6",Earth:"",Group:"8","Electron Configuration":"[Xe] 4f14 5d6 6s2"},{Number:"77",Type:"transition metal","Atomic Weight":"192.217",Name:"Iridium",Symbol:"Ir","Melting Point":"2410","Boiling Point":"4527",Density:"22.4",Earth:"",Group:"9","Electron Configuration":"[Xe] 4f14 5d7 6s2"},{Number:"78",Type:"transition metal","Atomic Weight":"195.078",Name:"Platinum",Symbol:"Pt","Melting Point":"1772","Boiling Point":"3827",Density:"21.45",Earth:"",Group:"10","Electron Configuration":"[Xe] 4f14 5d9 6s1"},{Number:"79",Type:"transition metal","Atomic Weight":"196.967",Name:"Gold",Symbol:"Au","Melting Point":"1064","Boiling Point":"2807",Density:"19.32",Earth:"",Group:"11","Electron Configuration":"[Xe] 4f14 5d10 6s1"},{Number:"80",Type:"transition metal","Atomic Weight":"200.59",Name:"Mercury",Symbol:"Hg","Melting Point":"-39","Boiling Point":"357",Density:"13.55",Earth:"",Group:"12","Electron Configuration":"[Xe] 4f14 5d10 6s2"},{Number:"81",Type:"post transition metal","Atomic Weight":"204.383",Name:"Thallium",Symbol:"Tl","Melting Point":"303","Boiling Point":"1457",Density:"11.85",Earth:"",Group:"13","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p1"},{Number:"82",Type:"post transition metal","Atomic Weight":"207.2",Name:"Lead",Symbol:"Pb","Melting Point":"327","Boiling Point":"1740",Density:"11.35",Earth:"",Group:"14","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p2"},{Number:"83",Type:"post transition metal","Atomic Weight":"208.98",Name:"Bismuth",Symbol:"Bi","Melting Point":"271","Boiling Point":"1560",Density:"9.75",Earth:"",Group:"15","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p3"},{Number:"84",Type:"metalloid","Atomic Weight":"209",Name:"Polonium",Symbol:"Po","Melting Point":"254","Boiling Point":"962",Density:"9.3",Earth:"",Group:"16","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p4"},{Number:"85",Type:"halogen","Atomic Weight":"210",Name:"Astatine",Symbol:"At","Melting Point":"302","Boiling Point":"337",Density:"0",Earth:"",Group:"17","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p5"},{Number:"86",Type:"noble gas","Atomic Weight":"222",Name:"Radon",Symbol:"Rn","Melting Point":"-71","Boiling Point":"-62",Density:"9.73",Earth:"",Group:"18","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p6"},{Number:"87",Type:"alkali metal","Atomic Weight":"223",Name:"Francium",Symbol:"Fr","Melting Point":"27","Boiling Point":"677",Density:"0",Earth:"",Group:"1","Electron Configuration":"[Rn] 7s1"},{Number:"88",Type:"alkaline earth metal","Atomic Weight":"226",Name:"Radium",Symbol:"Ra","Melting Point":"700","Boiling Point":"1737",Density:"5.5",Earth:"",Group:"2","Electron Configuration":"[Rn] 7s2"},{Number:"89",Type:"actinide","Atomic Weight":"227",Name:"Actinium",Symbol:"Ac","Melting Point":"1050","Boiling Point":"3200",Density:"10.07",Earth:"",Group:"3","Electron Configuration":"[Rn] 6d1 7s2"},{Number:"90",Type:"actinide","Atomic Weight":"232.038",Name:"Thorium",Symbol:"Th","Melting Point":"1750","Boiling Point":"4790",Density:"11.72",Earth:"",Group:"102","Electron Configuration":"[Rn] 6d2 7s2"},{Number:"91",Type:"actinide","Atomic Weight":"231.036",Name:"Protactinium",Symbol:"Pa","Melting Point":"1568","Boiling Point":"0",Density:"15.4",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f2 6d1 7s2"},{Number:"92",Type:"actinide","Atomic Weight":"238.029",Name:"Uranium",Symbol:"U","Melting Point":"1132","Boiling Point":"3818",Density:"18.95",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f3 6d1 7s2"},{Number:"93",Type:"actinide","Atomic Weight":"237",Name:"Neptunium",Symbol:"Np","Melting Point":"640","Boiling Point":"3902",Density:"20.2",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f4 6d1 7s2"},{Number:"94",Type:"actinide","Atomic Weight":"244",Name:"Plutonium",Symbol:"Pu","Melting Point":"640","Boiling Point":"3235",Density:"19.84",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f6 7s2"},{Number:"95",Type:"actinide","Atomic Weight":"243",Name:"Americium",Symbol:"Am","Melting Point":"994","Boiling Point":"2607",Density:"13.67",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f7 7s2"},{Number:"96",Type:"actinide","Atomic Weight":"247",Name:"Curium",Symbol:"Cm","Melting Point":"1340","Boiling Point":"0",Density:"13.5",Earth:"",Group:"102","Electron Configuration":""},{Number:"97",Type:"actinide","Atomic Weight":"247",Name:"Berkelium",Symbol:"Bk","Melting Point":"986","Boiling Point":"0",Density:"14.78",Earth:"",Group:"102","Electron Configuration":""},{Number:"98",Type:"actinide","Atomic Weight":"251",Name:"Californium",Symbol:"Cf","Melting Point":"900","Boiling Point":"0",Density:"15.1",Earth:"",Group:"102","Electron Configuration":""},{Number:"99",Type:"actinide","Atomic Weight":"252",Name:"Einsteinium",Symbol:"Es","Melting Point":"860","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"100",Type:"actinide","Atomic Weight":"257",Name:"Fermium",Symbol:"Fm","Melting Point":"1527","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"101",Type:"actinide","Atomic Weight":"258",Name:"Mendelevium",Symbol:"Md","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"102",Type:"actinide","Atomic Weight":"259",Name:"Nobelium",Symbol:"No","Melting Point":"827","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"103",Type:"actinide","Atomic Weight":"262",Name:"Lawrencium",Symbol:"Lr","Melting Point":"1627","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"104",Type:"transition metal","Atomic Weight":"261",Name:"Rutherfordium",Symbol:"Rf","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"4","Electron Configuration":""},{Number:"105",Type:"transition metal","Atomic Weight":"262",Name:"Dubnium",Symbol:"Db","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"5","Electron Configuration":""},{Number:"106",Type:"transition metal","Atomic Weight":"266",Name:"Seaborgium",Symbol:"Sg","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"6","Electron Configuration":""},{Number:"107",Type:"transition metal","Atomic Weight":"264",Name:"Bohrium",Symbol:"Bh","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"7","Electron Configuration":""},{Number:"108",Type:"transition metal","Atomic Weight":"277",Name:"Hassium",Symbol:"Hs","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"8","Electron Configuration":""},{Number:"109",Type:"transition metal","Atomic Weight":"268",Name:"Meitnerium",Symbol:"Mt","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"9","Electron Configuration":""}];var Cc=function(){return Cc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{s==null||s.apply(null,[l,a])},style:{backgroundColor:t.has(a.Symbol)?e:r,textAlign:"center",position:"relative",display:"flex",flexDirection:"column",border:"1px solid black",borderRadius:3,height:"100%",justifyContent:"center",alignItems:"center"},children:E.jsx("div",{className:"symbol",style:{color:t.has(a.Symbol)?n:e,fontSize:"small",width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:a.Symbol})}):E.jsx("div",{})}}function hre(t){const e=(a,l)=>{t.onClickElement(l.Symbol)},n=xu(),r=n.palette.background.default,i=n.palette.primary.main,o=n.palette.primary.contrastText,s=n.palette.primary.dark;return E.jsx(Ws,{sx:{bgcolor:r},children:E.jsx(nre,{onClick:e,Element:dre({availableElements:t.availableElements,backgroundColor:i,textColor:o,disabledColor:s}),squareSize:t.elementSize,margin:0})})}function pre(t){const e=t.availableElements,[n,r]=T.useState(null),i=xu(),o=Fz(i.breakpoints.down("lg")),s=f=>{r(f.currentTarget)},a=()=>{r(null)},l=!!n,c=l?"simple-popover":void 0,u=o?30:55;return E.jsxs(is,{direction:"row",spacing:2,children:[E.jsxs(d6,{children:[E.jsx(m6,{id:"Element",children:"Element"}),E.jsxs(RR,{sx:{minWidth:150},labelId:"Element",id:"Element",value:t.selectedElement,label:"Element",onChange:f=>t.setSelectedElement(f.target.value),children:[E.jsx(h4,{value:"all",children:"All Elements"}),[...e].map((f,h)=>E.jsx(h4,{value:f,children:f},h))]})]}),E.jsx(cu,{"aria-describedby":c,variant:"outlined",sx:{textTransform:"none"},onClick:s,children:"Periodic Table"}),E.jsx(_6,{id:c,open:l,anchorEl:n,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:E.jsx(hre,{availableElements:t.availableElements,onClickElement:f=>{t.availableElements.has(f)&&t.setSelectedElement(f),r(null)},elementSize:u})})]})}const rl=7,Gh=Ge(Ps)(({theme:t})=>({[`&.${bm.head}`]:{backgroundColor:t.palette.common.black,color:t.palette.common.white},[`&.${bm.body}`]:{fontSize:14,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),mre=Ge(Kb)(({theme:t})=>({"&:nth-of-type(odd):not(:hover):not(.activeclicked)":{backgroundColor:t.palette.action.selected},"&:last-child td, &:last-child th":{border:0}}));function gre(t){var n,r,i,o,s;const e=t.xasstandard===t.selected?"activeclicked":"";return E.jsxs(mre,{onClick:()=>{t.setSelectedRow(t.key),t.updatePlot(t.xasstandard)},className:e,hover:!0,selected:t.selectedRow===t.key,sx:{"&:last-child td, &:last-child th":{border:0}},children:[E.jsx(Gh,{align:"left",children:((n=t.xasstandard)==null?void 0:n.element.symbol)??" "}),E.jsx(Gh,{align:"center",children:((r=t.xasstandard)==null?void 0:r.edge.name)??""}),E.jsx(Gh,{align:"center",children:((i=t.xasstandard)==null?void 0:i.sample.name)??""}),E.jsx(Gh,{align:"center",children:((o=t.xasstandard)==null?void 0:o.sample.prep)??""}),E.jsx(Gh,{align:"right",children:((s=t.xasstandard)==null?void 0:s.beamline.name)??""})]},t.key)}function vre(t){const[e,n]=T.useState(-1),r=()=>{t.setOffset(t.offset+rl)},i=()=>{t.setOffset(t.offset-rl)},o=a=>{t.updatePlot(a.location),t.setSelectedStandard(a)};let s=[...t.standards];if(s.length<=rl)for(;s.lengthgre({key:l,xasstandard:a,selected:t.selectedStandard,updatePlot:o,selectedRow:e,setSelectedRow:n}))})]})}),E.jsxs(is,{direction:"row",spacing:2,children:[E.jsx(cu,{variant:"contained",disabled:t.offset===0,onClick:i,children:"<"}),E.jsx(cu,{variant:"contained",disabled:t.standards.length"})]})]})}function yre(t){const[e,n]=T.useState(),[r,i]=T.useState("all"),[o,s]=T.useState(0),a=t.standards.map(f=>f.element.symbol),l=new Set(a);let c=[];r!="all"?c=t.standards.filter(f=>f.element.symbol==r):c=t.standards;const u=f=>{i(f),s(0)};return E.jsxs(is,{spacing:2,children:[E.jsx(pre,{availableElements:l,selectedElement:r,setSelectedElement:u}),E.jsx(vre,{standards:c,updatePlot:t.updatePlot,selectedStandard:e,setSelectedStandard:n,offset:o,setOffset:s}),e&&E.jsx(IR,{standard:e,showDownload:!0,showCompare:!0})]})}class xre{constructor(e,n,r,i){$t(this,"namespace");$t(this,"tag");$t(this,"value");$t(this,"unit");this.namespace=e,this.tag=n,this.value=r,this.unit=i}}const pt=class pt{constructor(e,n,r,i,o,s,a,l,c,u){$t(this,"element");$t(this,"edge");$t(this,"sample");$t(this,"beamline");$t(this,"date");$t(this,"columns");$t(this,"comments");$t(this,"data");$t(this,"raw");$t(this,"id");this.element=e,this.edge=n,this.sample=r,this.beamline=i,this.date=o,this.columns=s,this.comments=a,this.data=l,this.raw=c,this.id=u}static parseFile(e,n){const r=e.split(` + */function I1(){return I1=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Dne(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Fne(t,e){return t.button===0&&(!e||e==="_self")&&!Dne(t)}const zne=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Une=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Bne="6";try{window.__reactRouterVersion=Bne}catch{}const jne=T.createContext({isTransitioning:!1}),Vne="startTransition",I4=Yp[Vne];function $ne(t){let{basename:e,children:n,future:r,window:i}=t,o=T.useRef();o.current==null&&(o.current=Gte({window:i,v5Compat:!0}));let s=o.current,[a,l]=T.useState({action:s.action,location:s.location}),{v7_startTransition:c}=r||{},u=T.useCallback(f=>{c&&I4?I4(()=>l(f)):l(f)},[l,c]);return T.useLayoutEffect(()=>s.listen(u),[s,u]),T.useEffect(()=>kne(r),[r]),T.createElement(Lne,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const Wne=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Hne=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zy=T.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:u,viewTransition:f}=e,h=U6(e,zne),{basename:m}=T.useContext($l),v,x=!1;if(typeof c=="string"&&Hne.test(c)&&(v=c,Wne))try{let _=new URL(window.location.href),S=c.startsWith("//")?new URL(_.protocol+c):new URL(c),A=Ed(S.pathname,m);S.origin===_.origin&&A!=null?c=A+S.search+S.hash:x=!0}catch{}let y=vne(c,{relative:i}),g=Xne(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:f});function b(_){r&&r(_),_.defaultPrevented||g(_)}return T.createElement("a",I1({},h,{href:v||y,onClick:x||o?r:b,ref:n,target:l}))}),B6=T.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,viewTransition:c,children:u}=e,f=U6(e,Une),h=t_(l,{relative:f.relative}),m=Jd(),v=T.useContext(L6),{navigator:x,basename:y}=T.useContext($l),g=v!=null&&qne(h)&&c===!0,b=x.encodeLocation?x.encodeLocation(h).pathname:h.pathname,_=m.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(_=_.toLowerCase(),S=S?S.toLowerCase():null,b=b.toLowerCase()),S&&y&&(S=Ed(S,y)||S);const A=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let P=_===b||!s&&_.startsWith(b)&&_.charAt(A)==="/",R=S!=null&&(S===b||!s&&S.startsWith(b)&&S.charAt(b.length)==="/"),L={isActive:P,isPending:R,isTransitioning:g},k=P?r:void 0,C;typeof o=="function"?C=o(L):C=[o,P?"active":null,R?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let N=typeof a=="function"?a(L):a;return T.createElement(zy,I1({},f,{"aria-current":k,className:C,ref:n,style:N,to:l,viewTransition:c}),typeof u=="function"?u(L):u)});var Z2;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Z2||(Z2={}));var N4;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(N4||(N4={}));function Gne(t){let e=T.useContext(Qb);return e||Hn(!1),e}function Xne(t,e){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,viewTransition:a}=e===void 0?{}:e,l=yne(),c=Jd(),u=t_(t,{relative:s});return T.useCallback(f=>{if(Fne(f,n)){f.preventDefault();let h=r!==void 0?r:R1(c)===R1(u);l(t,{replace:h,state:i,preventScrollReset:o,relative:s,viewTransition:a})}},[c,l,u,r,i,n,t,o,s,a])}function qne(t,e){e===void 0&&(e={});let n=T.useContext(jne);n==null&&Hn(!1);let{basename:r}=Gne(Z2.useViewTransitionState),i=t_(t,{relative:e.relative});if(!n.isTransitioning)return!1;let o=Ed(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Ed(n.nextLocation.pathname,r)||n.nextLocation.pathname;return A1(i.pathname,s)!=null||A1(i.pathname,o)!=null}function Yne(t){var n;const e=t.standard;return E.jsxs(gZ,{variant:"outlined",children:[E.jsxs(CZ,{children:[E.jsx(ar,{sx:{fontSize:14},color:"text.secondary",gutterBottom:!0,children:"XAS Metadata"}),E.jsx(ar,{variant:"h5",component:"div",children:e.sample.name}),E.jsx(ar,{variant:"h6",component:"div",children:e.sample.formula}),E.jsx(ar,{sx:{mb:1.5},color:"text.secondary",children:e.sample.prep}),E.jsxs(ar,{sx:{mb:1.5},children:["Measured at ",(n=e.facility)==null?void 0:n.name," on beamline"," ",e.beamline.name]}),E.jsx(ar,{sx:{mb:1.5},children:e.start_time})]}),t.showDownload&&E.jsx(_Z,{children:E.jsxs(is,{children:[E.jsx(a4,{href:"/webxdiviewer/xdidata/"+String(e.location),download:String(e.id)+".xdi",children:"Download XDI"}),E.jsx(a4,{component:B6,to:"/xdi/"+String(e.location),children:"Persistent Link"})]})})]})}const ug=T.createContext({xdiFile:null,setXDIFile:()=>{},comparisonFiles:[],setComparisonFiles:()=>{}});function PR(t){const{children:e}=t;return E.jsx(ug.Provider,{value:t.value,children:e})}function Kne(){const t=T.useContext(ug);return E.jsx(Hs,{children:E.jsx(ar,{sx:{whiteSpace:"pre-line",overflow:"scroll",maxHeight:"20em"},children:t.xdiFile===null?"":t.xdiFile.rawText()})})}const iM=Ge(Is)(({theme:t})=>({[`&.${bm.head}`]:{backgroundColor:t.palette.common.black,color:t.palette.common.white},[`&.${bm.body}`]:{fontSize:14,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),Zne=Ge(Jb)(({theme:t})=>({"&:nth-of-type(odd):not(:hover):not(.activeclicked)":{backgroundColor:t.palette.action.selected},"&:last-child td, &:last-child th":{border:0}}));function Jne(t){var e,n,r,i;return E.jsxs(Zne,{hover:!0,sx:{"&:last-child td, &:last-child th":{border:0}},children:[E.jsx(iM,{align:"left",children:((e=t.xdiFile)==null?void 0:e.element)??" "}),E.jsx(iM,{align:"center",children:((n=t.xdiFile)==null?void 0:n.edge)??""}),E.jsx(iM,{align:"center",children:((i=(r=t.xdiFile)==null?void 0:r.sample)==null?void 0:i.name)??""})]},t.key)}function Qne(){const t=T.useContext(ug),e=()=>{const r=t.xdiFile;if(r!=null&&!t.comparisonFiles.some(i=>i.id==(r==null?void 0:r.id))){const o=[...t.comparisonFiles.length>=3?t.comparisonFiles.slice(1,3):t.comparisonFiles,r];t.setComparisonFiles(o)}},n=()=>{t.setComparisonFiles([])};return E.jsxs(Hs,{children:[E.jsx(cu,{variant:"contained",onClick:e,children:"Store Selected"}),E.jsx(cu,{variant:"outlined",onClick:n,children:"Clear All"}),E.jsx(T6,{component:bu,children:E.jsxs(E6,{sx:{minWidth:650},size:"small","aria-label":"a dense table",children:[E.jsx(R6,{children:E.jsxs(Jb,{children:[E.jsx(Is,{children:"Element"}),E.jsx(Is,{align:"center",children:"Edge"}),E.jsx(Is,{align:"center",children:"Name"})]})}),E.jsx(C6,{children:t.comparisonFiles.map((r,i)=>Jne({key:i,xdiFile:r}))})]})})]})}function oM(t){const{children:e,value:n,index:r,...i}=t;return E.jsx("div",{role:"tabpanel",hidden:n!==r,id:`simple-tabpanel-${r}`,"aria-labelledby":`simple-tab-${r}`,...i,children:n===r&&E.jsx(Hs,{sx:{p:1},children:e})})}function sM(t){return{id:`simple-tab-${t}`,"aria-controls":`simple-tabpanel-${t}`}}function IR(t){const[e,n]=T.useState(0),r=(i,o)=>{n(o)};return E.jsxs(Hs,{sx:{width:"100%"},children:[E.jsx(Hs,{sx:{borderBottom:1,borderColor:"divider"},children:E.jsxs(Ute,{value:e,onChange:r,"aria-label":"basic tabs example",children:[E.jsx(tM,{label:"Metadata",...sM(0)}),E.jsx(tM,{label:"Raw File",...sM(1)}),t.showCompare&&E.jsx(tM,{label:"Comparison",...sM(2)})]})}),E.jsx(oM,{value:e,index:0,children:E.jsx(Yne,{standard:t.standard,showDownload:t.showDownload})}),E.jsx(oM,{value:e,index:1,children:E.jsx(Kne,{})}),t.showCompare&&E.jsx(oM,{value:e,index:2,children:E.jsx(Qne,{})})]})}const j6=[{Number:"1",Type:"nonmetal","Atomic Weight":"1.008",Name:"Hydrogen",Symbol:"H","Melting Point":"-259","Boiling Point":"-253",Density:"0.09",Earth:"0.14",Group:"1","Electron Configuration":"1s1"},{Number:"2",Type:"noble gas","Atomic Weight":"4.003",Name:"Helium",Symbol:"He","Melting Point":"-272","Boiling Point":"-269",Density:"0.18",Earth:"",Group:"18","Electron Configuration":"1s2"},{Number:"3",Type:"alkali metal","Atomic Weight":"6.941",Name:"Lithium",Symbol:"Li","Melting Point":"180","Boiling Point":"1347",Density:"0.53",Earth:"",Group:"1","Electron Configuration":"[He] 2s1"},{Number:"4",Type:"alkaline earth metal","Atomic Weight":"9.012",Name:"Beryllium",Symbol:"Be","Melting Point":"1278","Boiling Point":"2970",Density:"1.85",Earth:"",Group:"2","Electron Configuration":"[He] 2s2"},{Number:"5",Type:"metalloid","Atomic Weight":"10.811",Name:"Boron",Symbol:"B","Melting Point":"2300","Boiling Point":"2550",Density:"2.34",Earth:"",Group:"13","Electron Configuration":"[He] 2s2 2p1"},{Number:"6",Type:"nonmetal","Atomic Weight":"12.011",Name:"Carbon",Symbol:"C","Melting Point":"3500","Boiling Point":"4827",Density:"2.26",Earth:"0.09",Group:"14","Electron Configuration":"[He] 2s2 2p2"},{Number:"7",Type:"nonmetal","Atomic Weight":"14.007",Name:"Nitrogen",Symbol:"N","Melting Point":"-210","Boiling Point":"-196",Density:"1.25",Earth:"",Group:"15","Electron Configuration":"[He] 2s2 2p3"},{Number:"8",Type:"nonmetal","Atomic Weight":"15.999",Name:"Oxygen",Symbol:"O","Melting Point":"-218","Boiling Point":"-183",Density:"1.43",Earth:"46.71",Group:"16","Electron Configuration":"[He] 2s2 2p4"},{Number:"9",Type:"halogen","Atomic Weight":"18.998",Name:"Fluorine",Symbol:"F","Melting Point":"-220","Boiling Point":"-188",Density:"1.7",Earth:"0.03",Group:"17","Electron Configuration":"[He] 2s2 2p5"},{Number:"10",Type:"noble gas","Atomic Weight":"20.18",Name:"Neon",Symbol:"Ne","Melting Point":"-249","Boiling Point":"-246",Density:"0.9",Earth:"",Group:"18","Electron Configuration":"[He] 2s2 2p6"},{Number:"11",Type:"alkali metal","Atomic Weight":"22.99",Name:"Sodium",Symbol:"Na","Melting Point":"98","Boiling Point":"883",Density:"0.97",Earth:"2.75",Group:"1","Electron Configuration":"[Ne] 3s1"},{Number:"12",Type:"alkaline earth metal","Atomic Weight":"24.305",Name:"Magnesium",Symbol:"Mg","Melting Point":"639","Boiling Point":"1090",Density:"1.74",Earth:"2.08",Group:"2","Electron Configuration":"[Ne] 3s2"},{Number:"13",Type:"post transition metal","Atomic Weight":"26.982",Name:"Aluminum",Symbol:"Al","Melting Point":"660","Boiling Point":"2467",Density:"2.7",Earth:"8.07",Group:"13","Electron Configuration":"[Ne] 3s2 3p1"},{Number:"14",Type:"metalloid","Atomic Weight":"28.086",Name:"Silicon",Symbol:"Si","Melting Point":"1410","Boiling Point":"2355",Density:"2.33",Earth:"27.69",Group:"14","Electron Configuration":"[Ne] 3s2 3p2"},{Number:"15",Type:"nonmetal","Atomic Weight":"30.974",Name:"Phosphorus",Symbol:"P","Melting Point":"44","Boiling Point":"280",Density:"1.82",Earth:"0.13",Group:"15","Electron Configuration":"[Ne] 3s2 3p3"},{Number:"16",Type:"nonmetal","Atomic Weight":"32.065",Name:"Sulfur",Symbol:"S","Melting Point":"113","Boiling Point":"445",Density:"2.07",Earth:"0.05",Group:"16","Electron Configuration":"[Ne] 3s2 3p4"},{Number:"17",Type:"halogen","Atomic Weight":"35.453",Name:"Chlorine",Symbol:"Cl","Melting Point":"-101","Boiling Point":"-35",Density:"3.21",Earth:"0.05",Group:"17","Electron Configuration":"[Ne] 3s2 3p5"},{Number:"18",Type:"noble gas","Atomic Weight":"39.948",Name:"Argon",Symbol:"Ar","Melting Point":"-189","Boiling Point":"-186",Density:"1.78",Earth:"",Group:"18","Electron Configuration":"[Ne] 3s2 3p6"},{Number:"19",Type:"alkali metal","Atomic Weight":"39.098",Name:"Potassium",Symbol:"K","Melting Point":"64","Boiling Point":"774",Density:"0.86",Earth:"2.58",Group:"1","Electron Configuration":"[Ar] 4s1"},{Number:"20",Type:"alkaline earth metal","Atomic Weight":"40.078",Name:"Calcium",Symbol:"Ca","Melting Point":"839","Boiling Point":"1484",Density:"1.55",Earth:"3.65",Group:"2","Electron Configuration":"[Ar] 4s2"},{Number:"21",Type:"transition metal","Atomic Weight":"44.956",Name:"Scandium",Symbol:"Sc","Melting Point":"1539","Boiling Point":"2832",Density:"2.99",Earth:"",Group:"3","Electron Configuration":"[Ar] 3d1 4s2"},{Number:"22",Type:"transition metal","Atomic Weight":"47.867",Name:"Titanium",Symbol:"Ti","Melting Point":"1660","Boiling Point":"3287",Density:"4.54",Earth:"0.62",Group:"4","Electron Configuration":"[Ar] 3d2 4s2"},{Number:"23",Type:"transition metal","Atomic Weight":"50.942",Name:"Vanadium",Symbol:"V","Melting Point":"1890","Boiling Point":"3380",Density:"6.11",Earth:"",Group:"5","Electron Configuration":"[Ar] 3d3 4s2"},{Number:"24",Type:"transition metal","Atomic Weight":"51.996",Name:"Chromium",Symbol:"Cr","Melting Point":"1857","Boiling Point":"2672",Density:"7.19",Earth:"0.04",Group:"6","Electron Configuration":"[Ar] 3d5 4s1"},{Number:"25",Type:"transition metal","Atomic Weight":"54.938",Name:"Manganese",Symbol:"Mn","Melting Point":"1245","Boiling Point":"1962",Density:"7.43",Earth:"0.09",Group:"7","Electron Configuration":"[Ar] 3d5 4s2"},{Number:"26",Type:"transition metal","Atomic Weight":"55.845",Name:"Iron",Symbol:"Fe","Melting Point":"1535","Boiling Point":"2750",Density:"7.87",Earth:"5.05",Group:"8","Electron Configuration":"[Ar] 3d6 4s2"},{Number:"27",Type:"transition metal","Atomic Weight":"58.933",Name:"Cobalt",Symbol:"Co","Melting Point":"1495","Boiling Point":"2870",Density:"8.9",Earth:"",Group:"9","Electron Configuration":"[Ar] 3d7 4s2"},{Number:"28",Type:"transition metal","Atomic Weight":"58.693",Name:"Nickel",Symbol:"Ni","Melting Point":"1453","Boiling Point":"2732",Density:"8.9",Earth:"0.02",Group:"10","Electron Configuration":"[Ar] 3d8 4s2"},{Number:"29",Type:"transition metal","Atomic Weight":"63.546",Name:"Copper",Symbol:"Cu","Melting Point":"1083","Boiling Point":"2567",Density:"8.96",Earth:"",Group:"11","Electron Configuration":"[Ar] 3d10 4s1"},{Number:"30",Type:"transition metal","Atomic Weight":"65.39",Name:"Zinc",Symbol:"Zn","Melting Point":"420","Boiling Point":"907",Density:"7.13",Earth:"",Group:"12","Electron Configuration":"[Ar] 3d10 4s2"},{Number:"31",Type:"post transition metal","Atomic Weight":"69.723",Name:"Gallium",Symbol:"Ga","Melting Point":"30","Boiling Point":"2403",Density:"5.91",Earth:"",Group:"13","Electron Configuration":"[Ar] 3d10 4s2 4p1"},{Number:"32",Type:"metalloid","Atomic Weight":"72.64",Name:"Germanium",Symbol:"Ge","Melting Point":"937","Boiling Point":"2830",Density:"5.32",Earth:"",Group:"14","Electron Configuration":"[Ar] 3d10 4s2 4p2"},{Number:"33",Type:"metalloid","Atomic Weight":"74.922",Name:"Arsenic",Symbol:"As","Melting Point":"81","Boiling Point":"613",Density:"5.72",Earth:"",Group:"15","Electron Configuration":"[Ar] 3d10 4s2 4p3"},{Number:"34",Type:"nonmetal","Atomic Weight":"78.96",Name:"Selenium",Symbol:"Se","Melting Point":"217","Boiling Point":"685",Density:"4.79",Earth:"",Group:"16","Electron Configuration":"[Ar] 3d10 4s2 4p4"},{Number:"35",Type:"halogen","Atomic Weight":"79.904",Name:"Bromine",Symbol:"Br","Melting Point":"-7","Boiling Point":"59",Density:"3.12",Earth:"",Group:"17","Electron Configuration":"[Ar] 3d10 4s2 4p5"},{Number:"36",Type:"noble gas","Atomic Weight":"83.8",Name:"Krypton",Symbol:"Kr","Melting Point":"-157","Boiling Point":"-153",Density:"3.75",Earth:"",Group:"18","Electron Configuration":"[Ar] 3d10 4s2 4p6"},{Number:"37",Type:"alkali metal","Atomic Weight":"85.468",Name:"Rubidium",Symbol:"Rb","Melting Point":"39","Boiling Point":"688",Density:"1.63",Earth:"",Group:"1","Electron Configuration":"[Kr] 5s1"},{Number:"38",Type:"alkaline earth metal","Atomic Weight":"87.62",Name:"Strontium",Symbol:"Sr","Melting Point":"769","Boiling Point":"1384",Density:"2.54",Earth:"",Group:"2","Electron Configuration":"[Kr] 5s2"},{Number:"39",Type:"transition metal","Atomic Weight":"88.906",Name:"Yttrium",Symbol:"Y","Melting Point":"1523","Boiling Point":"3337",Density:"4.47",Earth:"",Group:"3","Electron Configuration":"[Kr] 4d1 5s2"},{Number:"40",Type:"transition metal","Atomic Weight":"91.224",Name:"Zirconium",Symbol:"Zr","Melting Point":"1852","Boiling Point":"4377",Density:"6.51",Earth:"0.03",Group:"4","Electron Configuration":"[Kr] 4d2 5s2"},{Number:"41",Type:"transition metal","Atomic Weight":"92.906",Name:"Niobium",Symbol:"Nb","Melting Point":"2468","Boiling Point":"4927",Density:"8.57",Earth:"",Group:"5","Electron Configuration":"[Kr] 4d4 5s1"},{Number:"42",Type:"transition metal","Atomic Weight":"95.94",Name:"Molybdenum",Symbol:"Mo","Melting Point":"2617","Boiling Point":"4612",Density:"10.22",Earth:"",Group:"6","Electron Configuration":"[Kr] 4d5 5s1"},{Number:"43",Type:"transition metal","Atomic Weight":"98",Name:"Technetium",Symbol:"Tc","Melting Point":"2200","Boiling Point":"4877",Density:"11.5",Earth:"",Group:"7","Electron Configuration":"[Kr] 4d5 5s2"},{Number:"44",Type:"transition metal","Atomic Weight":"101.07",Name:"Ruthenium",Symbol:"Ru","Melting Point":"2250","Boiling Point":"3900",Density:"12.37",Earth:"",Group:"8","Electron Configuration":"[Kr] 4d7 5s1"},{Number:"45",Type:"transition metal","Atomic Weight":"102.906",Name:"Rhodium",Symbol:"Rh","Melting Point":"1966","Boiling Point":"3727",Density:"12.41",Earth:"",Group:"9","Electron Configuration":"[Kr] 4d8 5s1"},{Number:"46",Type:"transition metal","Atomic Weight":"106.42",Name:"Palladium",Symbol:"Pd","Melting Point":"1552","Boiling Point":"2927",Density:"12.02",Earth:"",Group:"10","Electron Configuration":"[Kr] 4d10"},{Number:"47",Type:"transition metal","Atomic Weight":"107.868",Name:"Silver",Symbol:"Ag","Melting Point":"962","Boiling Point":"2212",Density:"10.5",Earth:"",Group:"11","Electron Configuration":"[Kr] 4d10 5s1"},{Number:"48",Type:"transition metal","Atomic Weight":"112.411",Name:"Cadmium",Symbol:"Cd","Melting Point":"321","Boiling Point":"765",Density:"8.65",Earth:"",Group:"12","Electron Configuration":"[Kr] 4d10 5s2"},{Number:"49",Type:"post transition metal","Atomic Weight":"114.818",Name:"Indium",Symbol:"In","Melting Point":"157","Boiling Point":"2000",Density:"7.31",Earth:"",Group:"13","Electron Configuration":"[Kr] 4d10 5s2 5p1"},{Number:"50",Type:"post transition metal","Atomic Weight":"118.71",Name:"Tin",Symbol:"Sn","Melting Point":"232","Boiling Point":"2270",Density:"7.31",Earth:"",Group:"14","Electron Configuration":"[Kr] 4d10 5s2 5p2"},{Number:"51",Type:"metalloid","Atomic Weight":"121.76",Name:"Antimony",Symbol:"Sb","Melting Point":"630","Boiling Point":"1750",Density:"6.68",Earth:"",Group:"15","Electron Configuration":"[Kr] 4d10 5s2 5p3"},{Number:"52",Type:"metalloid","Atomic Weight":"127.6",Name:"Tellurium",Symbol:"Te","Melting Point":"449","Boiling Point":"990",Density:"6.24",Earth:"",Group:"16","Electron Configuration":"[Kr] 4d10 5s2 5p4"},{Number:"53",Type:"halogen","Atomic Weight":"126.905",Name:"Iodine",Symbol:"I","Melting Point":"114","Boiling Point":"184",Density:"4.93",Earth:"",Group:"17","Electron Configuration":"[Kr] 4d10 5s2 5p5"},{Number:"54",Type:"noble gas","Atomic Weight":"131.293",Name:"Xenon",Symbol:"Xe","Melting Point":"-112","Boiling Point":"-108",Density:"5.9",Earth:"",Group:"18","Electron Configuration":"[Kr] 4d10 5s2 5p6"},{Number:"55",Type:"alkali metal","Atomic Weight":"132.906",Name:"Cesium",Symbol:"Cs","Melting Point":"29","Boiling Point":"678",Density:"1.87",Earth:"",Group:"1","Electron Configuration":"[Xe] 6s1"},{Number:"56",Type:"alkaline earth metal","Atomic Weight":"137.327",Name:"Barium",Symbol:"Ba","Melting Point":"725","Boiling Point":"1140",Density:"3.59",Earth:"0.05",Group:"2","Electron Configuration":"[Xe] 6s2"},{Number:"57",Type:"lanthanide","Atomic Weight":"138.906",Name:"Lanthanum",Symbol:"La","Melting Point":"920","Boiling Point":"3469",Density:"6.15",Earth:"",Group:"3","Electron Configuration":"[Xe] 5d1 6s2"},{Number:"58",Type:"lanthanide","Atomic Weight":"140.116",Name:"Cerium",Symbol:"Ce","Melting Point":"795","Boiling Point":"3257",Density:"6.77",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f1 5d1 6s2"},{Number:"59",Type:"lanthanide","Atomic Weight":"140.908",Name:"Praseodymium",Symbol:"Pr","Melting Point":"935","Boiling Point":"3127",Density:"6.77",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f3 6s2"},{Number:"60",Type:"lanthanide","Atomic Weight":"144.24",Name:"Neodymium",Symbol:"Nd","Melting Point":"1010","Boiling Point":"3127",Density:"7.01",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f4 6s2"},{Number:"61",Type:"lanthanide","Atomic Weight":"145",Name:"Promethium",Symbol:"Pm","Melting Point":"1100","Boiling Point":"3000",Density:"7.3",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f5 6s2"},{Number:"62",Type:"lanthanide","Atomic Weight":"150.36",Name:"Samarium",Symbol:"Sm","Melting Point":"1072","Boiling Point":"1900",Density:"7.52",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f6 6s2"},{Number:"63",Type:"lanthanide","Atomic Weight":"151.964",Name:"Europium",Symbol:"Eu","Melting Point":"822","Boiling Point":"1597",Density:"5.24",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f7 6s2"},{Number:"64",Type:"lanthanide","Atomic Weight":"157.25",Name:"Gadolinium",Symbol:"Gd","Melting Point":"1311","Boiling Point":"3233",Density:"7.9",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f7 5d1 6s2"},{Number:"65",Type:"lanthanide","Atomic Weight":"158.925",Name:"Terbium",Symbol:"Tb","Melting Point":"1360","Boiling Point":"3041",Density:"8.23",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f9 6s2"},{Number:"66",Type:"lanthanide","Atomic Weight":"162.5",Name:"Dysprosium",Symbol:"Dy","Melting Point":"1412","Boiling Point":"2562",Density:"8.55",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f10 6s2"},{Number:"67",Type:"lanthanide","Atomic Weight":"164.93",Name:"Holmium",Symbol:"Ho","Melting Point":"1470","Boiling Point":"2720",Density:"8.8",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f11 6s2"},{Number:"68",Type:"lanthanide","Atomic Weight":"167.259",Name:"Erbium",Symbol:"Er","Melting Point":"1522","Boiling Point":"2510",Density:"9.07",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f12 6s2"},{Number:"69",Type:"lanthanide","Atomic Weight":"168.934",Name:"Thulium",Symbol:"Tm","Melting Point":"1545","Boiling Point":"1727",Density:"9.32",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f13 6s2"},{Number:"70",Type:"lanthanide","Atomic Weight":"173.04",Name:"Ytterbium",Symbol:"Yb","Melting Point":"824","Boiling Point":"1466",Density:"6.9",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f14 6s2"},{Number:"71",Type:"lanthanide","Atomic Weight":"174.967",Name:"Lutetium",Symbol:"Lu","Melting Point":"1656","Boiling Point":"3315",Density:"9.84",Earth:"",Group:"101","Electron Configuration":"[Xe] 4f14 5d1 6s2"},{Number:"72",Type:"transition metal","Atomic Weight":"178.49",Name:"Hafnium",Symbol:"Hf","Melting Point":"2150","Boiling Point":"5400",Density:"13.31",Earth:"",Group:"4","Electron Configuration":"[Xe] 4f14 5d2 6s2"},{Number:"73",Type:"transition metal","Atomic Weight":"180.948",Name:"Tantalum",Symbol:"Ta","Melting Point":"2996","Boiling Point":"5425",Density:"16.65",Earth:"",Group:"5","Electron Configuration":"[Xe] 4f14 5d3 6s2"},{Number:"74",Type:"transition metal","Atomic Weight":"183.84",Name:"Tungsten",Symbol:"W","Melting Point":"3410","Boiling Point":"5660",Density:"19.35",Earth:"",Group:"6","Electron Configuration":"[Xe] 4f14 5d4 6s2"},{Number:"75",Type:"transition metal","Atomic Weight":"186.207",Name:"Rhenium",Symbol:"Re","Melting Point":"3180","Boiling Point":"5627",Density:"21.04",Earth:"",Group:"7","Electron Configuration":"[Xe] 4f14 5d5 6s2"},{Number:"76",Type:"transition metal","Atomic Weight":"190.23",Name:"Osmium",Symbol:"Os","Melting Point":"3045","Boiling Point":"5027",Density:"22.6",Earth:"",Group:"8","Electron Configuration":"[Xe] 4f14 5d6 6s2"},{Number:"77",Type:"transition metal","Atomic Weight":"192.217",Name:"Iridium",Symbol:"Ir","Melting Point":"2410","Boiling Point":"4527",Density:"22.4",Earth:"",Group:"9","Electron Configuration":"[Xe] 4f14 5d7 6s2"},{Number:"78",Type:"transition metal","Atomic Weight":"195.078",Name:"Platinum",Symbol:"Pt","Melting Point":"1772","Boiling Point":"3827",Density:"21.45",Earth:"",Group:"10","Electron Configuration":"[Xe] 4f14 5d9 6s1"},{Number:"79",Type:"transition metal","Atomic Weight":"196.967",Name:"Gold",Symbol:"Au","Melting Point":"1064","Boiling Point":"2807",Density:"19.32",Earth:"",Group:"11","Electron Configuration":"[Xe] 4f14 5d10 6s1"},{Number:"80",Type:"transition metal","Atomic Weight":"200.59",Name:"Mercury",Symbol:"Hg","Melting Point":"-39","Boiling Point":"357",Density:"13.55",Earth:"",Group:"12","Electron Configuration":"[Xe] 4f14 5d10 6s2"},{Number:"81",Type:"post transition metal","Atomic Weight":"204.383",Name:"Thallium",Symbol:"Tl","Melting Point":"303","Boiling Point":"1457",Density:"11.85",Earth:"",Group:"13","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p1"},{Number:"82",Type:"post transition metal","Atomic Weight":"207.2",Name:"Lead",Symbol:"Pb","Melting Point":"327","Boiling Point":"1740",Density:"11.35",Earth:"",Group:"14","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p2"},{Number:"83",Type:"post transition metal","Atomic Weight":"208.98",Name:"Bismuth",Symbol:"Bi","Melting Point":"271","Boiling Point":"1560",Density:"9.75",Earth:"",Group:"15","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p3"},{Number:"84",Type:"metalloid","Atomic Weight":"209",Name:"Polonium",Symbol:"Po","Melting Point":"254","Boiling Point":"962",Density:"9.3",Earth:"",Group:"16","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p4"},{Number:"85",Type:"halogen","Atomic Weight":"210",Name:"Astatine",Symbol:"At","Melting Point":"302","Boiling Point":"337",Density:"0",Earth:"",Group:"17","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p5"},{Number:"86",Type:"noble gas","Atomic Weight":"222",Name:"Radon",Symbol:"Rn","Melting Point":"-71","Boiling Point":"-62",Density:"9.73",Earth:"",Group:"18","Electron Configuration":"[Xe] 4f14 5d10 6s2 6p6"},{Number:"87",Type:"alkali metal","Atomic Weight":"223",Name:"Francium",Symbol:"Fr","Melting Point":"27","Boiling Point":"677",Density:"0",Earth:"",Group:"1","Electron Configuration":"[Rn] 7s1"},{Number:"88",Type:"alkaline earth metal","Atomic Weight":"226",Name:"Radium",Symbol:"Ra","Melting Point":"700","Boiling Point":"1737",Density:"5.5",Earth:"",Group:"2","Electron Configuration":"[Rn] 7s2"},{Number:"89",Type:"actinide","Atomic Weight":"227",Name:"Actinium",Symbol:"Ac","Melting Point":"1050","Boiling Point":"3200",Density:"10.07",Earth:"",Group:"3","Electron Configuration":"[Rn] 6d1 7s2"},{Number:"90",Type:"actinide","Atomic Weight":"232.038",Name:"Thorium",Symbol:"Th","Melting Point":"1750","Boiling Point":"4790",Density:"11.72",Earth:"",Group:"102","Electron Configuration":"[Rn] 6d2 7s2"},{Number:"91",Type:"actinide","Atomic Weight":"231.036",Name:"Protactinium",Symbol:"Pa","Melting Point":"1568","Boiling Point":"0",Density:"15.4",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f2 6d1 7s2"},{Number:"92",Type:"actinide","Atomic Weight":"238.029",Name:"Uranium",Symbol:"U","Melting Point":"1132","Boiling Point":"3818",Density:"18.95",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f3 6d1 7s2"},{Number:"93",Type:"actinide","Atomic Weight":"237",Name:"Neptunium",Symbol:"Np","Melting Point":"640","Boiling Point":"3902",Density:"20.2",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f4 6d1 7s2"},{Number:"94",Type:"actinide","Atomic Weight":"244",Name:"Plutonium",Symbol:"Pu","Melting Point":"640","Boiling Point":"3235",Density:"19.84",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f6 7s2"},{Number:"95",Type:"actinide","Atomic Weight":"243",Name:"Americium",Symbol:"Am","Melting Point":"994","Boiling Point":"2607",Density:"13.67",Earth:"",Group:"102","Electron Configuration":"[Rn] 5f7 7s2"},{Number:"96",Type:"actinide","Atomic Weight":"247",Name:"Curium",Symbol:"Cm","Melting Point":"1340","Boiling Point":"0",Density:"13.5",Earth:"",Group:"102","Electron Configuration":""},{Number:"97",Type:"actinide","Atomic Weight":"247",Name:"Berkelium",Symbol:"Bk","Melting Point":"986","Boiling Point":"0",Density:"14.78",Earth:"",Group:"102","Electron Configuration":""},{Number:"98",Type:"actinide","Atomic Weight":"251",Name:"Californium",Symbol:"Cf","Melting Point":"900","Boiling Point":"0",Density:"15.1",Earth:"",Group:"102","Electron Configuration":""},{Number:"99",Type:"actinide","Atomic Weight":"252",Name:"Einsteinium",Symbol:"Es","Melting Point":"860","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"100",Type:"actinide","Atomic Weight":"257",Name:"Fermium",Symbol:"Fm","Melting Point":"1527","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"101",Type:"actinide","Atomic Weight":"258",Name:"Mendelevium",Symbol:"Md","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"102",Type:"actinide","Atomic Weight":"259",Name:"Nobelium",Symbol:"No","Melting Point":"827","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"103",Type:"actinide","Atomic Weight":"262",Name:"Lawrencium",Symbol:"Lr","Melting Point":"1627","Boiling Point":"0",Density:"0",Earth:"",Group:"102","Electron Configuration":""},{Number:"104",Type:"transition metal","Atomic Weight":"261",Name:"Rutherfordium",Symbol:"Rf","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"4","Electron Configuration":""},{Number:"105",Type:"transition metal","Atomic Weight":"262",Name:"Dubnium",Symbol:"Db","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"5","Electron Configuration":""},{Number:"106",Type:"transition metal","Atomic Weight":"266",Name:"Seaborgium",Symbol:"Sg","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"6","Electron Configuration":""},{Number:"107",Type:"transition metal","Atomic Weight":"264",Name:"Bohrium",Symbol:"Bh","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"7","Electron Configuration":""},{Number:"108",Type:"transition metal","Atomic Weight":"277",Name:"Hassium",Symbol:"Hs","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"8","Electron Configuration":""},{Number:"109",Type:"transition metal","Atomic Weight":"268",Name:"Meitnerium",Symbol:"Mt","Melting Point":"0","Boiling Point":"0",Density:"0",Earth:"",Group:"9","Electron Configuration":""}];var Cc=function(){return Cc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{s==null||s.apply(null,[l,a])},style:{backgroundColor:t.has(a.Symbol)?e:r,textAlign:"center",position:"relative",display:"flex",flexDirection:"column",border:"1px solid black",borderRadius:3,height:"100%",justifyContent:"center",alignItems:"center"},children:E.jsx("div",{className:"symbol",style:{color:t.has(a.Symbol)?n:e,fontSize:"small",width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:a.Symbol})}):E.jsx("div",{})}}function hre(t){const e=(a,l)=>{t.onClickElement(l.Symbol)},n=xu(),r=n.palette.background.default,i=n.palette.primary.main,o=n.palette.primary.contrastText,s=n.palette.primary.dark;return E.jsx(Hs,{sx:{bgcolor:r},children:E.jsx(nre,{onClick:e,Element:dre({availableElements:t.availableElements,backgroundColor:i,textColor:o,disabledColor:s}),squareSize:t.elementSize,margin:0})})}function pre(t){const e=t.availableElements,[n,r]=T.useState(null),i=xu(),o=Fz(i.breakpoints.down("lg")),s=f=>{r(f.currentTarget)},a=()=>{r(null)},l=!!n,c=l?"simple-popover":void 0,u=o?30:55;return E.jsxs(is,{direction:"row",spacing:2,children:[E.jsxs(d6,{children:[E.jsx(m6,{id:"Element",children:"Element"}),E.jsxs(RR,{sx:{minWidth:150},labelId:"Element",id:"Element",value:t.selectedElement,label:"Element",onChange:f=>t.setSelectedElement(f.target.value),children:[E.jsx(h4,{value:"all",children:"All Elements"}),[...e].map((f,h)=>E.jsx(h4,{value:f,children:f},h))]})]}),E.jsx(cu,{"aria-describedby":c,variant:"outlined",sx:{textTransform:"none"},onClick:s,children:"Periodic Table"}),E.jsx(_6,{id:c,open:l,anchorEl:n,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:E.jsx(hre,{availableElements:t.availableElements,onClickElement:f=>{t.availableElements.has(f)&&t.setSelectedElement(f),r(null)},elementSize:u})})]})}const rl=7,Gh=Ge(Is)(({theme:t})=>({[`&.${bm.head}`]:{backgroundColor:t.palette.common.black,color:t.palette.common.white},[`&.${bm.body}`]:{fontSize:14,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),mre=Ge(Jb)(({theme:t})=>({"&:nth-of-type(odd):not(:hover):not(.activeclicked)":{backgroundColor:t.palette.action.selected},"&:last-child td, &:last-child th":{border:0}}));function gre(t){var n,r,i,o,s;const e=t.xasstandard===t.selected?"activeclicked":"";return E.jsxs(mre,{onClick:()=>{t.setSelectedRow(t.key),t.updatePlot(t.xasstandard)},className:e,hover:!0,selected:t.selectedRow===t.key,sx:{"&:last-child td, &:last-child th":{border:0}},children:[E.jsx(Gh,{align:"left",children:((n=t.xasstandard)==null?void 0:n.element.symbol)??" "}),E.jsx(Gh,{align:"center",children:((r=t.xasstandard)==null?void 0:r.edge.name)??""}),E.jsx(Gh,{align:"center",children:((i=t.xasstandard)==null?void 0:i.sample.name)??""}),E.jsx(Gh,{align:"center",children:((o=t.xasstandard)==null?void 0:o.sample.prep)??""}),E.jsx(Gh,{align:"right",children:((s=t.xasstandard)==null?void 0:s.beamline.name)??""})]},t.key)}function vre(t){const[e,n]=T.useState(-1),r=()=>{t.setOffset(t.offset+rl)},i=()=>{t.setOffset(t.offset-rl)},o=a=>{t.updatePlot(a.location),t.setSelectedStandard(a)};let s=[...t.standards];if(s.length<=rl)for(;s.lengthgre({key:l,xasstandard:a,selected:t.selectedStandard,updatePlot:o,selectedRow:e,setSelectedRow:n}))})]})}),E.jsxs(is,{direction:"row",spacing:2,children:[E.jsx(cu,{variant:"contained",disabled:t.offset===0,onClick:i,children:"<"}),E.jsx(cu,{variant:"contained",disabled:t.standards.length"})]})]})}function yre(t){const[e,n]=T.useState(),[r,i]=T.useState("all"),[o,s]=T.useState(0),a=t.standards.map(f=>f.element.symbol),l=new Set(a);let c=[];r!="all"?c=t.standards.filter(f=>f.element.symbol==r):c=t.standards;const u=f=>{i(f),s(0)};return E.jsxs(is,{spacing:2,children:[E.jsx(pre,{availableElements:l,selectedElement:r,setSelectedElement:u}),E.jsx(vre,{standards:c,updatePlot:t.updatePlot,selectedStandard:e,setSelectedStandard:n,offset:o,setOffset:s}),e&&E.jsx(IR,{standard:e,showDownload:!0,showCompare:!0})]})}class xre{constructor(e,n,r,i){$t(this,"namespace");$t(this,"tag");$t(this,"value");$t(this,"unit");this.namespace=e,this.tag=n,this.value=r,this.unit=i}}const pt=class pt{constructor(e,n,r,i,o,s,a,l,c,u){$t(this,"element");$t(this,"edge");$t(this,"sample");$t(this,"beamline");$t(this,"date");$t(this,"columns");$t(this,"comments");$t(this,"data");$t(this,"raw");$t(this,"id");this.element=e,this.edge=n,this.sample=r,this.beamline=i,this.date=o,this.columns=s,this.comments=a,this.data=l,this.raw=c,this.id=u}static parseFile(e,n){const r=e.split(` `),i={},o=[];let s=null,a=null,l=null,c=null;const u=[];let f=!1,h="";for(let v=0;vMath.log2(v/m.itrans[x]))),!("murefer"in m)&&"irefer"in m&&"i0"in m&&(m.murefer=m.i0.map((v,x)=>Math.log2(v/m.irefer[x]))),!("mufluor"in m)&&"ifluor"in m&&"i0"in m&&(m.mufluor=m.i0.map((v,x)=>m.ifluor[x]/v)),new pt(a,l,i,s,c,o,h,m,e,n)}static checkHeaderLine(e){const n=e.slice(1).trim();if(n.slice(0,3)!="XDI")throw new Error("XDI header not matched by: "+n)}muTrans(){return pt.MUSPEC[0]in this.data?this.data[pt.MUSPEC[0]]:null}muFluor(){return pt.MUSPEC[1]in this.data?this.data[pt.MUSPEC[1]]:null}energy(){return this.data[pt.ENERGY]}build_sample(){return this.sample?{name:"name"in this.sample?this.sample.name:"Unknown name",prep:"prep"in this.sample?this.sample.prep:"Unknown prep",formula:"formula"in this.sample?this.sample.formula:"Unknown formula"}:null}muRefer(){return pt.MUREFER in this.data?this.data[pt.MUREFER]:null}rawText(){return this.raw}checkValid(){if(!this.columns.includes(pt.ENERGY))throw new Error("Required column energy is missing!");const e=this.columns.includes(pt.I0);if(!(this.columns.includes(pt.IREFER)&&e)||!this.columns.includes(pt.MUREFER))throw new Error("Required reference data is missing!");const n=(o,s)=>s.some(a=>o.includes(a));return!!(n(this.columns,pt.MUSPEC)||n(this.columns,pt.ISPEC)&&e)}static parseMetadataLine(e){const n=e.slice(1).trim(),r=n.indexOf(pt.HEADER_SPLIT_TOKEN),i=n.slice(0,r).trim(),o=n.slice(r+1).trim(),s=i.indexOf("."),a=i.slice(0,s),l=i.slice(s+1).toLowerCase(),c=a===pt.COLUMN;let u=o,f=null;if(c){const h=o.split(" ");u=h[0].trim(),f=c&&h.length>1?h[1].trim():null}return new xre(a,l,u,f)}};$t(pt,"COMMENT_TOKEN","#"),$t(pt,"HEADER_SPLIT_TOKEN",":"),$t(pt,"NAMESPACE_SEPARATOR","."),$t(pt,"SAMPLE","Sample"),$t(pt,"ELEMENT","Element"),$t(pt,"BEAMLINE","Beamline"),$t(pt,"SCAN","Scan"),$t(pt,"SYMBOL","symbol"),$t(pt,"EDGE","edge"),$t(pt,"PREP","prep"),$t(pt,"STOICHIOMETRY","stoichiometry"),$t(pt,"COLUMN","Column"),$t(pt,"START_TIME","start_time"),$t(pt,"NAME","name"),$t(pt,"ENERGY","energy"),$t(pt,"IREFER","irefer"),$t(pt,"MUREFER","murefer"),$t(pt,"TRANS","trans"),$t(pt,"FLUOR","fluor"),$t(pt,"MU","mu"),$t(pt,"I","i"),$t(pt,"I0","i0"),$t(pt,"MUSPEC",[pt.MU+pt.TRANS,pt.MU+pt.FLUOR]),$t(pt,"ISPEC",[pt.I+pt.TRANS,pt.I+pt.FLUOR]);let Cd=pt;const bre="/webxdiviewer/xdidata/db.json";function _re(){const[t,e]=T.useState([]);return T.useEffect(()=>{Fn.get(bre).then(n=>{e(n.data)})},[]),t}const NR=T.createContext([]);function wre(t){const{children:e}=t,n=_re();return E.jsx(NR.Provider,{value:n,children:e})}function xr(t){const e=T.useRef(t);return e.current=t,T.useMemo(()=>Object.freeze({get current(){return e.current}}),[])}function kR(t){const e=xr(t);T.useEffect(()=>()=>{e.current()},[])}const I1=typeof window<"u"&&typeof navigator<"u"&&typeof document<"u";function W6(t){const e=xr(t),n=T.useRef(0),r=T.useCallback(()=>{I1&&n.current&&(cancelAnimationFrame(n.current),n.current=0)},[]);return kR(r),[T.useMemo(()=>{const i=(...o)=>{I1&&(r(),n.current=requestAnimationFrame(()=>{e.current(...o),n.current=0}))};return Object.defineProperties(i,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__raf`}}),i},[]),r]}function Sre(t,e,n,r=!1){const i=T.useRef(),o=T.useRef();return kR(()=>{i.current&&(clearTimeout(i.current),i.current=void 0)}),T.useMemo(()=>{const s=(l,c)=>{o.current=void 0,t.apply(l,c),i.current=setTimeout(()=>{i.current=void 0,!r&&o.current&&(s(o.current.this,o.current.args),o.current=void 0)},n)},a=function(...l){if(i.current){o.current={args:l,this:this};return}s(this,l)};return Object.defineProperties(a,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__throttled__${n}`}}),a},[n,r,...e])}function H6(t,...e){var n;(n=t==null?void 0:t.addEventListener)==null||n.call(t,...e)}function G6(t,...e){var n;(n=t==null?void 0:t.removeEventListener)==null||n.call(t,...e)}const Mre=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function Ere(t=!1){const e=T.useRef(t),n=T.useCallback(()=>e.current,[]);return T.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),n}const Cre=t=>(t+1)%Number.MAX_SAFE_INTEGER;function X6(){const[,t]=T.useState(0);return T.useCallback(()=>{t(Cre)},[])}function Tre(t,e){return typeof t=="function"?t(e):t}const oM=Map.prototype;function Rre(t){const e=T.useRef(),n=X6();if(!e.current){const r=new Map(t);e.current=r,r.set=(...i)=>(oM.set.apply(r,i),n(),r),r.clear=(...i)=>{oM.clear.apply(r,i),n()},r.delete=(...i)=>{const o=oM.delete.apply(r,i);return n(),o}}return e.current}function k4(t){const e=T.useRef();return T.useEffect(()=>{e.current=t}),e.current}function Are(t){const[e,n]=T.useState(t),[r,i]=W6(n);return kR(i),[e,r]}function e_(t=!1,e=!0){const[n,r]=T.useState(t),i=xr(e);return[n,T.useCallback(o=>{r(s=>o===void 0||i.current&&typeof o=="object"&&(o.constructor.name==="SyntheticBaseEvent"||typeof o._reactName=="string")?!s:!!Tre(o,s))},[])]}function Pre(t,e,n){const r=xr(e),i=xr(n);return T.useMemo(()=>{let o=t;return{get current(){return i.current===void 0?o:i.current(o)},set current(s){o=r.current===void 0?s:r.current(s)}}},[])}let av;function Ire(){if(!I1)return;if(av)return av;const t=new Map,e=new ResizeObserver(n=>{var r;for(const i of n)(r=t.get(i.target))==null||r.forEach(o=>setTimeout(()=>{o(i)},0))});return av={observer:e,subscribe(n,r){let i=t.get(n);i||(i=new Set,t.set(n,i),e.observe(n)),i.add(r)},unsubscribe(n,r){const i=t.get(n);i&&(i.delete(r),i.size===0&&(t.delete(n),e.unobserve(n)))}},av}function Nre(t,e,n=!0){const r=n&&Ire(),i=xr(e),o=t&&"current"in t?t.current:t;T.useEffect(()=>{const s=t&&"current"in t?t.current:t;if(!r||!s)return;let a=!0;const l=(...c)=>{a&&i.current(...c)};return r.subscribe(s,l),()=>{a=!1,r.unsubscribe(s,l)}},[o,r])}function kre(t=!0){const[e,n]=T.useState(null),r=Pre(null,a=>(n(a),a)),[i,o]=T.useState(),[s]=W6(a=>{o({width:a.contentRect.width,height:a.contentRect.height})});return Nre(e,s,t),[i,r]}function Wc(t,...e){const n=Ere(),r=xr(e[1]),i=T.useMemo(()=>function(...o){n()&&(typeof r.current=="function"?r.current.apply(this,o):typeof r.current.handleEvent=="function"&&r.current.handleEvent.apply(this,o))},[]);T.useEffect(()=>{const o=Lre(t)?t.current:t;if(!o)return;const s=e.slice(2);return H6(o,e[0],i,...s),()=>{G6(o,e[0],i,...s)}},[t,e[0]])}function Lre(t){return t!==null&&typeof t=="object"&&Mre(t,"current")}const Ore=t=>e=>e.key===t,Dre=I1?window:null;function q6(t,e,n=[],r={}){const{event:i="keydown",target:o=Dre,eventOptions:s}=r,a=xr(e),l=T.useMemo(()=>{const c=Ore(t);return function(u){c(u)&&a.current.call(this,u)}},n);Wc(o,i,l,s)}const Fre=["mousedown","touchstart"];function zre(t,e,n=Fre){const r=xr(e),i=xr(t);T.useEffect(()=>{function o(s){if(!i.current.current)return;const{target:a}=s,l=r.current;(!a||a&&!i.current.current.contains(a))&&l.call(this,s)}for(const s of n)H6(document,s,o,{passive:!0});return()=>{for(const s of n)G6(document,s,o,{passive:!0})}},[...n])}function zy(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function Ure(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function Y6(t){let e,n,r;t.length!==2?(e=zy,n=(a,l)=>zy(t(a),l),r=(a,l)=>t(a)-l):(e=t===zy||t===Ure?t:Bre,n=t,r=t);function i(a,l,c=0,u=a.length){if(c>>1;n(a[f],l)<0?c=f+1:u=f}while(c>>1;n(a[f],l)<=0?c=f+1:u=f}while(cc&&r(a[f-1],l)>-r(a[f],l)?f-1:f}return{left:i,center:s,right:o}}function Bre(){return 0}function jre(t){return t===null?NaN:+t}const Vre=Y6(zy),$re=Vre.right;Y6(jre).center;const Wre=Math.sqrt(50),Hre=Math.sqrt(10),Gre=Math.sqrt(2);function N1(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=Wre?10:o>=Hre?5:o>=Gre?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(t*c),l=Math.round(e*c),a/ce&&--l,c=-c):(c=Math.pow(10,i)*s,a=Math.round(t/c),l=Math.round(e/c),a*ce&&--l),l0))return[];if(t===e)return[t];const r=e=i))return[];const a=o-i+1,l=new Array(a);if(r)if(s<0)for(let c=0;c=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function k1(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Td(t){return t=k1(Math.abs(t)),t?t[1]:NaN}function qre(t,e){return function(n,r){for(var i=n.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function Yre(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Kre=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sm(t){if(!(e=Kre.exec(t)))throw new Error("invalid format: "+t);var e;return new LR({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]})}Sm.prototype=LR.prototype;function LR(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+""}LR.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 Zre(t){e:for(var e=t.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var J6;function Jre(t,e){var n=k1(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(J6=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+k1(t,Math.max(0,e+o-1))[0]}function L4(t,e){var n=k1(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 O4={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Xre,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)=>L4(t*100,e),r:L4,s:Jre,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function D4(t){return t}var F4=Array.prototype.map,z4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Qre(t){var e=t.grouping===void 0||t.thousands===void 0?D4:qre(F4.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+"",o=t.numerals===void 0?D4:Yre(F4.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(f){f=Sm(f);var h=f.fill,m=f.align,v=f.sign,x=f.symbol,y=f.zero,g=f.width,b=f.comma,_=f.precision,S=f.trim,A=f.type;A==="n"?(b=!0,A="g"):O4[A]||(_===void 0&&(_=12),S=!0,A="g"),(y||h==="0"&&m==="=")&&(y=!0,h="0",m="=");var P=x==="$"?n:x==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",R=x==="$"?r:/[%p]/.test(A)?s:"",L=O4[A],k=/[defgprs%]/.test(A);_=_===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function C(N){var z=P,D=R,B,G,X;if(A==="c")D=L(N)+D,N="";else{N=+N;var Z=N<0||1/N<0;if(N=isNaN(N)?l:L(Math.abs(N),_),S&&(N=Zre(N)),Z&&+N==0&&v!=="+"&&(Z=!1),z=(Z?v==="("?v:a:v==="-"||v==="("?"":v)+z,D=(A==="s"?z4[8+J6/3]:"")+D+(Z&&v==="("?")":""),k){for(B=-1,G=N.length;++BX||X>57){D=(X===46?i+N.slice(B+1):N.slice(B))+D,N=N.slice(0,B);break}}}b&&!y&&(N=e(N,1/0));var F=z.length+N.length+D.length,q=F>1)+z+N+D+q.slice(F);break;default:N=q+z+N+D;break}return o(N)}return C.toString=function(){return f+""},C}function u(f,h){var m=c((f=Sm(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(Td(h)/3)))*3,x=Math.pow(10,-v),y=z4[8+v/3];return function(g){return m(x*g)+y}}return{format:c,formatPrefix:u}}var lv,Ks,Q6;eie({thousands:",",grouping:[3],currency:["$",""]});function eie(t){return lv=Qre(t),Ks=lv.format,Q6=lv.formatPrefix,lv}function tie(t){return Math.max(0,-Td(Math.abs(t)))}function nie(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Td(e)/3)))*3-Td(Math.abs(t)))}function rie(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Td(e)-Td(t))+1}function iie(t){for(var e=new Array(t),n=0;nMath.log2(v/m.itrans[x]))),!("murefer"in m)&&"irefer"in m&&"i0"in m&&(m.murefer=m.i0.map((v,x)=>Math.log2(v/m.irefer[x]))),!("mufluor"in m)&&"ifluor"in m&&"i0"in m&&(m.mufluor=m.i0.map((v,x)=>m.ifluor[x]/v)),new pt(a,l,i,s,c,o,h,m,e,n)}static checkHeaderLine(e){const n=e.slice(1).trim();if(n.slice(0,3)!="XDI")throw new Error("XDI header not matched by: "+n)}muTrans(){return pt.MUSPEC[0]in this.data?this.data[pt.MUSPEC[0]]:null}muFluor(){return pt.MUSPEC[1]in this.data?this.data[pt.MUSPEC[1]]:null}energy(){return this.data[pt.ENERGY]}build_sample(){return this.sample?{name:"name"in this.sample?this.sample.name:"Unknown name",prep:"prep"in this.sample?this.sample.prep:"Unknown prep",formula:"formula"in this.sample?this.sample.formula:"Unknown formula"}:null}muRefer(){return pt.MUREFER in this.data?this.data[pt.MUREFER]:null}rawText(){return this.raw}checkValid(){if(!this.columns.includes(pt.ENERGY))throw new Error("Required column energy is missing!");const e=this.columns.includes(pt.I0);if(!(this.columns.includes(pt.IREFER)&&e)||!this.columns.includes(pt.MUREFER))throw new Error("Required reference data is missing!");const n=(o,s)=>s.some(a=>o.includes(a));return!!(n(this.columns,pt.MUSPEC)||n(this.columns,pt.ISPEC)&&e)}static parseMetadataLine(e){const n=e.slice(1).trim(),r=n.indexOf(pt.HEADER_SPLIT_TOKEN),i=n.slice(0,r).trim(),o=n.slice(r+1).trim(),s=i.indexOf("."),a=i.slice(0,s),l=i.slice(s+1).toLowerCase(),c=a===pt.COLUMN;let u=o,f=null;if(c){const h=o.split(" ");u=h[0].trim(),f=c&&h.length>1?h[1].trim():null}return new xre(a,l,u,f)}};$t(pt,"COMMENT_TOKEN","#"),$t(pt,"HEADER_SPLIT_TOKEN",":"),$t(pt,"NAMESPACE_SEPARATOR","."),$t(pt,"SAMPLE","Sample"),$t(pt,"ELEMENT","Element"),$t(pt,"BEAMLINE","Beamline"),$t(pt,"SCAN","Scan"),$t(pt,"SYMBOL","symbol"),$t(pt,"EDGE","edge"),$t(pt,"PREP","prep"),$t(pt,"STOICHIOMETRY","stoichiometry"),$t(pt,"COLUMN","Column"),$t(pt,"START_TIME","start_time"),$t(pt,"NAME","name"),$t(pt,"ENERGY","energy"),$t(pt,"IREFER","irefer"),$t(pt,"MUREFER","murefer"),$t(pt,"TRANS","trans"),$t(pt,"FLUOR","fluor"),$t(pt,"MU","mu"),$t(pt,"I","i"),$t(pt,"I0","i0"),$t(pt,"MUSPEC",[pt.MU+pt.TRANS,pt.MU+pt.FLUOR]),$t(pt,"ISPEC",[pt.I+pt.TRANS,pt.I+pt.FLUOR]);let Cd=pt;const bre="/webxdiviewer/xdidata/db.json";function _re(){const[t,e]=T.useState([]);return T.useEffect(()=>{Fn.get(bre).then(n=>{e(n.data)})},[]),t}const NR=T.createContext([]);function wre(t){const{children:e}=t,n=_re();return E.jsx(NR.Provider,{value:n,children:e})}function xr(t){const e=T.useRef(t);return e.current=t,T.useMemo(()=>Object.freeze({get current(){return e.current}}),[])}function kR(t){const e=xr(t);T.useEffect(()=>()=>{e.current()},[])}const N1=typeof window<"u"&&typeof navigator<"u"&&typeof document<"u";function W6(t){const e=xr(t),n=T.useRef(0),r=T.useCallback(()=>{N1&&n.current&&(cancelAnimationFrame(n.current),n.current=0)},[]);return kR(r),[T.useMemo(()=>{const i=(...o)=>{N1&&(r(),n.current=requestAnimationFrame(()=>{e.current(...o),n.current=0}))};return Object.defineProperties(i,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__raf`}}),i},[]),r]}function Sre(t,e,n,r=!1){const i=T.useRef(),o=T.useRef();return kR(()=>{i.current&&(clearTimeout(i.current),i.current=void 0)}),T.useMemo(()=>{const s=(l,c)=>{o.current=void 0,t.apply(l,c),i.current=setTimeout(()=>{i.current=void 0,!r&&o.current&&(s(o.current.this,o.current.args),o.current=void 0)},n)},a=function(...l){if(i.current){o.current={args:l,this:this};return}s(this,l)};return Object.defineProperties(a,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__throttled__${n}`}}),a},[n,r,...e])}function H6(t,...e){var n;(n=t==null?void 0:t.addEventListener)==null||n.call(t,...e)}function G6(t,...e){var n;(n=t==null?void 0:t.removeEventListener)==null||n.call(t,...e)}const Mre=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function Ere(t=!1){const e=T.useRef(t),n=T.useCallback(()=>e.current,[]);return T.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),n}const Cre=t=>(t+1)%Number.MAX_SAFE_INTEGER;function X6(){const[,t]=T.useState(0);return T.useCallback(()=>{t(Cre)},[])}function Tre(t,e){return typeof t=="function"?t(e):t}const aM=Map.prototype;function Rre(t){const e=T.useRef(),n=X6();if(!e.current){const r=new Map(t);e.current=r,r.set=(...i)=>(aM.set.apply(r,i),n(),r),r.clear=(...i)=>{aM.clear.apply(r,i),n()},r.delete=(...i)=>{const o=aM.delete.apply(r,i);return n(),o}}return e.current}function k4(t){const e=T.useRef();return T.useEffect(()=>{e.current=t}),e.current}function Are(t){const[e,n]=T.useState(t),[r,i]=W6(n);return kR(i),[e,r]}function n_(t=!1,e=!0){const[n,r]=T.useState(t),i=xr(e);return[n,T.useCallback(o=>{r(s=>o===void 0||i.current&&typeof o=="object"&&(o.constructor.name==="SyntheticBaseEvent"||typeof o._reactName=="string")?!s:!!Tre(o,s))},[])]}function Pre(t,e,n){const r=xr(e),i=xr(n);return T.useMemo(()=>{let o=t;return{get current(){return i.current===void 0?o:i.current(o)},set current(s){o=r.current===void 0?s:r.current(s)}}},[])}let av;function Ire(){if(!N1)return;if(av)return av;const t=new Map,e=new ResizeObserver(n=>{var r;for(const i of n)(r=t.get(i.target))==null||r.forEach(o=>setTimeout(()=>{o(i)},0))});return av={observer:e,subscribe(n,r){let i=t.get(n);i||(i=new Set,t.set(n,i),e.observe(n)),i.add(r)},unsubscribe(n,r){const i=t.get(n);i&&(i.delete(r),i.size===0&&(t.delete(n),e.unobserve(n)))}},av}function Nre(t,e,n=!0){const r=n&&Ire(),i=xr(e),o=t&&"current"in t?t.current:t;T.useEffect(()=>{const s=t&&"current"in t?t.current:t;if(!r||!s)return;let a=!0;const l=(...c)=>{a&&i.current(...c)};return r.subscribe(s,l),()=>{a=!1,r.unsubscribe(s,l)}},[o,r])}function kre(t=!0){const[e,n]=T.useState(null),r=Pre(null,a=>(n(a),a)),[i,o]=T.useState(),[s]=W6(a=>{o({width:a.contentRect.width,height:a.contentRect.height})});return Nre(e,s,t),[i,r]}function Wc(t,...e){const n=Ere(),r=xr(e[1]),i=T.useMemo(()=>function(...o){n()&&(typeof r.current=="function"?r.current.apply(this,o):typeof r.current.handleEvent=="function"&&r.current.handleEvent.apply(this,o))},[]);T.useEffect(()=>{const o=Lre(t)?t.current:t;if(!o)return;const s=e.slice(2);return H6(o,e[0],i,...s),()=>{G6(o,e[0],i,...s)}},[t,e[0]])}function Lre(t){return t!==null&&typeof t=="object"&&Mre(t,"current")}const Ore=t=>e=>e.key===t,Dre=N1?window:null;function q6(t,e,n=[],r={}){const{event:i="keydown",target:o=Dre,eventOptions:s}=r,a=xr(e),l=T.useMemo(()=>{const c=Ore(t);return function(u){c(u)&&a.current.call(this,u)}},n);Wc(o,i,l,s)}const Fre=["mousedown","touchstart"];function zre(t,e,n=Fre){const r=xr(e),i=xr(t);T.useEffect(()=>{function o(s){if(!i.current.current)return;const{target:a}=s,l=r.current;(!a||a&&!i.current.current.contains(a))&&l.call(this,s)}for(const s of n)H6(document,s,o,{passive:!0});return()=>{for(const s of n)G6(document,s,o,{passive:!0})}},[...n])}function Uy(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function Ure(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function Y6(t){let e,n,r;t.length!==2?(e=Uy,n=(a,l)=>Uy(t(a),l),r=(a,l)=>t(a)-l):(e=t===Uy||t===Ure?t:Bre,n=t,r=t);function i(a,l,c=0,u=a.length){if(c>>1;n(a[f],l)<0?c=f+1:u=f}while(c>>1;n(a[f],l)<=0?c=f+1:u=f}while(cc&&r(a[f-1],l)>-r(a[f],l)?f-1:f}return{left:i,center:s,right:o}}function Bre(){return 0}function jre(t){return t===null?NaN:+t}const Vre=Y6(Uy),$re=Vre.right;Y6(jre).center;const Wre=Math.sqrt(50),Hre=Math.sqrt(10),Gre=Math.sqrt(2);function k1(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=Wre?10:o>=Hre?5:o>=Gre?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(t*c),l=Math.round(e*c),a/ce&&--l,c=-c):(c=Math.pow(10,i)*s,a=Math.round(t/c),l=Math.round(e/c),a*ce&&--l),l0))return[];if(t===e)return[t];const r=e=i))return[];const a=o-i+1,l=new Array(a);if(r)if(s<0)for(let c=0;c=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function L1(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Td(t){return t=L1(Math.abs(t)),t?t[1]:NaN}function qre(t,e){return function(n,r){for(var i=n.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function Yre(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Kre=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sm(t){if(!(e=Kre.exec(t)))throw new Error("invalid format: "+t);var e;return new LR({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]})}Sm.prototype=LR.prototype;function LR(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+""}LR.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 Zre(t){e:for(var e=t.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var J6;function Jre(t,e){var n=L1(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(J6=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+L1(t,Math.max(0,e+o-1))[0]}function L4(t,e){var n=L1(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 O4={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Xre,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)=>L4(t*100,e),r:L4,s:Jre,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function D4(t){return t}var F4=Array.prototype.map,z4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Qre(t){var e=t.grouping===void 0||t.thousands===void 0?D4:qre(F4.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+"",o=t.numerals===void 0?D4:Yre(F4.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(f){f=Sm(f);var h=f.fill,m=f.align,v=f.sign,x=f.symbol,y=f.zero,g=f.width,b=f.comma,_=f.precision,S=f.trim,A=f.type;A==="n"?(b=!0,A="g"):O4[A]||(_===void 0&&(_=12),S=!0,A="g"),(y||h==="0"&&m==="=")&&(y=!0,h="0",m="=");var P=x==="$"?n:x==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",R=x==="$"?r:/[%p]/.test(A)?s:"",L=O4[A],k=/[defgprs%]/.test(A);_=_===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function C(N){var z=P,D=R,B,G,X;if(A==="c")D=L(N)+D,N="";else{N=+N;var Z=N<0||1/N<0;if(N=isNaN(N)?l:L(Math.abs(N),_),S&&(N=Zre(N)),Z&&+N==0&&v!=="+"&&(Z=!1),z=(Z?v==="("?v:a:v==="-"||v==="("?"":v)+z,D=(A==="s"?z4[8+J6/3]:"")+D+(Z&&v==="("?")":""),k){for(B=-1,G=N.length;++BX||X>57){D=(X===46?i+N.slice(B+1):N.slice(B))+D,N=N.slice(0,B);break}}}b&&!y&&(N=e(N,1/0));var F=z.length+N.length+D.length,q=F>1)+z+N+D+q.slice(F);break;default:N=q+z+N+D;break}return o(N)}return C.toString=function(){return f+""},C}function u(f,h){var m=c((f=Sm(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(Td(h)/3)))*3,x=Math.pow(10,-v),y=z4[8+v/3];return function(g){return m(x*g)+y}}return{format:c,formatPrefix:u}}var lv,Zs,Q6;eie({thousands:",",grouping:[3],currency:["$",""]});function eie(t){return lv=Qre(t),Zs=lv.format,Q6=lv.formatPrefix,lv}function tie(t){return Math.max(0,-Td(Math.abs(t)))}function nie(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Td(e)/3)))*3-Td(Math.abs(t)))}function rie(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Td(e)-Td(t))+1}function iie(t){for(var e=new Array(t),n=0;n * @license MIT - */var sie=function(t){return t!=null&&(eU(t)||aie(t)||!!t._isBuffer)};function eU(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function aie(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&eU(t.slice(0,0))}var lie=oie,cie=sie,uie=typeof Float64Array<"u";function fie(t,e){return t[0]-e[0]}function die(){var t=this.stride,e=new Array(t.length),n;for(n=0;nMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):e===3&&i.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):i.push("ORDER})")),i.push("proto.set=function "+n+"_set("+s.join(",")+",v){"),r?i.push("return this.data.set("+a+",v)}"):i.push("return this.data["+a+"]=v}"),i.push("proto.get=function "+n+"_get("+s.join(",")+"){"),r?i.push("return this.data.get("+a+")}"):i.push("return this.data["+a+"]}"),i.push("proto.index=function "+n+"_index(",s.join(),"){return "+a+"}"),i.push("proto.hi=function "+n+"_hi("+s.join(",")+"){return new "+n+"(this.data,"+o.map(function(y){return["(typeof i",y,"!=='number'||i",y,"<0)?this.shape[",y,"]:i",y,"|0"].join("")}).join(",")+","+o.map(function(y){return"this.stride["+y+"]"}).join(",")+",this.offset)}");var u=o.map(function(y){return"a"+y+"=this.shape["+y+"]"}),f=o.map(function(y){return"c"+y+"=this.stride["+y+"]"});i.push("proto.lo=function "+n+"_lo("+s.join(",")+"){var b=this.offset,d=0,"+u.join(",")+","+f.join(","));for(var h=0;h=0){d=i"+h+"|0;b+=c"+h+"*d;a"+h+"-=d}");i.push("return new "+n+"(this.data,"+o.map(function(y){return"a"+y}).join(",")+","+o.map(function(y){return"c"+y}).join(",")+",b)}"),i.push("proto.step=function "+n+"_step("+s.join(",")+"){var "+o.map(function(y){return"a"+y+"=this.shape["+y+"]"}).join(",")+","+o.map(function(y){return"b"+y+"=this.stride["+y+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var h=0;h=0){c=(c+this.stride["+h+"]*i"+h+")|0}else{a.push(this.shape["+h+"]);b.push(this.stride["+h+"])}");i.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),i.push("return function construct_"+n+"(data,shape,stride,offset){return new "+n+"(data,"+o.map(function(y){return"shape["+y+"]"}).join(",")+","+o.map(function(y){return"stride["+y+"]"}).join(",")+",offset)}");var x=new Function("CTOR_LIST","ORDER",i.join(` -`));return x(L1[t],die)}function pie(t){if(cie(t))return"buffer";if(uie)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(t)?"array":"generic"}var L1={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],bigint64:[],biguint64:[],buffer:[],generic:[]};function mie(t,e,n,r){if(t===void 0){var c=L1.array[0];return c([])}else typeof t=="number"&&(t=[t]);e===void 0&&(e=[t.length]);var i=e.length;if(n===void 0){n=new Array(i);for(var o=i-1,s=1;o>=0;--o)n[o]=s,s*=e[o]}if(r===void 0){r=0;for(var o=0;o0,s=[],a=[],l=0,c=0,u,f;for(u=0;u0&&s.push("var "+a.join(",")),u=r-1;u>=0;--u)l=t[u],s.push(["for(i",u,"=0;i",u,"0&&s.push(["index[",c,"]-=s",c].join("")),s.push(["++index[",l,"]"].join(""))),s.push("}")}return s.join(` + */var sie=function(t){return t!=null&&(eU(t)||aie(t)||!!t._isBuffer)};function eU(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function aie(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&eU(t.slice(0,0))}var lie=oie,cie=sie,uie=typeof Float64Array<"u";function fie(t,e){return t[0]-e[0]}function die(){var t=this.stride,e=new Array(t.length),n;for(n=0;nMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):e===3&&i.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):i.push("ORDER})")),i.push("proto.set=function "+n+"_set("+s.join(",")+",v){"),r?i.push("return this.data.set("+a+",v)}"):i.push("return this.data["+a+"]=v}"),i.push("proto.get=function "+n+"_get("+s.join(",")+"){"),r?i.push("return this.data.get("+a+")}"):i.push("return this.data["+a+"]}"),i.push("proto.index=function "+n+"_index(",s.join(),"){return "+a+"}"),i.push("proto.hi=function "+n+"_hi("+s.join(",")+"){return new "+n+"(this.data,"+o.map(function(y){return["(typeof i",y,"!=='number'||i",y,"<0)?this.shape[",y,"]:i",y,"|0"].join("")}).join(",")+","+o.map(function(y){return"this.stride["+y+"]"}).join(",")+",this.offset)}");var u=o.map(function(y){return"a"+y+"=this.shape["+y+"]"}),f=o.map(function(y){return"c"+y+"=this.stride["+y+"]"});i.push("proto.lo=function "+n+"_lo("+s.join(",")+"){var b=this.offset,d=0,"+u.join(",")+","+f.join(","));for(var h=0;h=0){d=i"+h+"|0;b+=c"+h+"*d;a"+h+"-=d}");i.push("return new "+n+"(this.data,"+o.map(function(y){return"a"+y}).join(",")+","+o.map(function(y){return"c"+y}).join(",")+",b)}"),i.push("proto.step=function "+n+"_step("+s.join(",")+"){var "+o.map(function(y){return"a"+y+"=this.shape["+y+"]"}).join(",")+","+o.map(function(y){return"b"+y+"=this.stride["+y+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var h=0;h=0){c=(c+this.stride["+h+"]*i"+h+")|0}else{a.push(this.shape["+h+"]);b.push(this.stride["+h+"])}");i.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),i.push("return function construct_"+n+"(data,shape,stride,offset){return new "+n+"(data,"+o.map(function(y){return"shape["+y+"]"}).join(",")+","+o.map(function(y){return"stride["+y+"]"}).join(",")+",offset)}");var x=new Function("CTOR_LIST","ORDER",i.join(` +`));return x(O1[t],die)}function pie(t){if(cie(t))return"buffer";if(uie)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(t)?"array":"generic"}var O1={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],bigint64:[],biguint64:[],buffer:[],generic:[]};function mie(t,e,n,r){if(t===void 0){var c=O1.array[0];return c([])}else typeof t=="number"&&(t=[t]);e===void 0&&(e=[t.length]);var i=e.length;if(n===void 0){n=new Array(i);for(var o=i-1,s=1;o>=0;--o)n[o]=s,s*=e[o]}if(r===void 0){r=0;for(var o=0;o0,s=[],a=[],l=0,c=0,u,f;for(u=0;u0&&s.push("var "+a.join(",")),u=r-1;u>=0;--u)l=t[u],s.push(["for(i",u,"=0;i",u,"0&&s.push(["index[",c,"]-=s",c].join("")),s.push(["++index[",l,"]"].join(""))),s.push("}")}return s.join(` `)}function Sie(t,e,n,r){for(var i=e.length,o=n.arrayArgs.length,s=n.blockSize,a=n.indexArgs.length>0,l=[],c=0;c0;){"].join("")),l.push(["if(j",c,"<",s,"){"].join("")),l.push(["s",e[c],"=j",c].join("")),l.push(["j",c,"=0"].join("")),l.push(["}else{s",e[c],"=",s].join("")),l.push(["j",c,"-=",s,"}"].join("")),a&&l.push(["index[",e[c],"]=j",c].join(""));for(var c=0;c0&&(n=n&&e[r]===e[r-1])}return n?e[0]:e.join("")}function Cie(t,e){for(var n=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,r=new Array(t.arrayArgs.length),i=new Array(t.arrayArgs.length),o=0;o0&&x.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var y=new Array(n),o=0;o0&&v.push("var "+x.join(","));for(var o=0;o3&&v.push(sM(t.pre,t,i));var S=sM(t.body,t,i),A=Mie(u);A3&&v.push(sM(t.post,t,i)),t.debug&&console.log("-----Generated cwise routine for ",e,`: +`).trim()}function Eie(t){for(var e=new Array(t.length),n=!0,r=0;r0&&(n=n&&e[r]===e[r-1])}return n?e[0]:e.join("")}function Cie(t,e){for(var n=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,r=new Array(t.arrayArgs.length),i=new Array(t.arrayArgs.length),o=0;o0&&x.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var y=new Array(n),o=0;o0&&v.push("var "+x.join(","));for(var o=0;o3&&v.push(lM(t.pre,t,i));var S=lM(t.body,t,i),A=Mie(u);A3&&v.push(lM(t.post,t,i)),t.debug&&console.log("-----Generated cwise routine for ",e,`: `+v.join(` `)+` ----------`);var P=[t.funcName||"unnamed","_cwise_loop_",r[0].join("s"),"m",A,Eie(i)].join(""),R=new Function(["function ",P,"(",m.join(","),"){",v.join(` @@ -184,11 +184,11 @@ Error generating stack: `+o.message+` * @license * Copyright 2010-2024 Three.js Authors * SPDX-License-Identifier: MIT - */const t_="170",Oie={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Die={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},rU=0,eC=1,iU=2,Fie=3,oU=0,n_=1,kp=2,Ko=3,La=0,di=1,es=2,Ea=0,Hc=1,tC=2,nC=3,rC=4,sU=5,gl=100,aU=101,lU=102,cU=103,uU=104,fU=200,dU=201,hU=202,pU=203,O1=204,D1=205,mU=206,gU=207,vU=208,yU=209,xU=210,bU=211,_U=212,wU=213,SU=214,F1=0,z1=1,U1=2,uu=3,B1=4,j1=5,V1=6,$1=7,fg=0,MU=1,EU=2,zs=0,CU=1,TU=2,RU=3,OR=4,AU=5,PU=6,IU=7,iC="attached",NU="detached",dg=300,Oa=301,Ll=302,Mm=303,Em=304,Qd=306,Cm=1e3,Ii=1001,Tm=1002,Mr=1003,DR=1004,zie=1004,Hf=1005,Uie=1005,cr=1006,Lp=1007,Bie=1007,Is=1008,jie=1008,ji=1009,FR=1010,zR=1011,Rd=1012,r_=1013,Da=1014,li=1015,Eu=1016,i_=1017,o_=1018,fu=1020,UR=35902,BR=1021,jR=1022,Ir=1023,VR=1024,$R=1025,Gc=1026,du=1027,hg=1028,pg=1029,WR=1030,s_=1031,Vie=1032,a_=1033,Op=33776,Dp=33777,Fp=33778,zp=33779,W1=35840,H1=35841,G1=35842,X1=35843,q1=36196,Y1=37492,K1=37496,Z1=37808,J1=37809,Q1=37810,ex=37811,tx=37812,nx=37813,rx=37814,ix=37815,ox=37816,sx=37817,ax=37818,lx=37819,cx=37820,ux=37821,Up=36492,fx=36494,dx=36495,HR=36283,hx=36284,px=36285,mx=36286,kU=2200,LU=2201,OU=2202,Rm=2300,gx=2301,Uy=2302,Oc=2400,Dc=2401,Am=2402,l_=2500,GR=2501,$ie=0,Wie=1,Hie=2,DU=3200,FU=3201,Gie=3202,Xie=3203,Wl=0,zU=1,ga="",Si="srgb",Cu="srgb-linear",mg="linear",dn="srgb",qie=0,Sc=7680,Yie=7681,Kie=7682,Zie=7683,Jie=34055,Qie=34056,eoe=5386,toe=512,noe=513,roe=514,ioe=515,ooe=516,soe=517,aoe=518,oC=519,UU=512,BU=513,jU=514,XR=515,VU=516,$U=517,WU=518,HU=519,Pm=35044,loe=35048,coe=35040,uoe=35045,foe=35049,doe=35041,hoe=35046,poe=35050,moe=35042,goe="100",sC="300 es",Ns=2e3,Im=2001;class Zs{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){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const r=this._listeners[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let o=0,s=i.length;o>8&255]+$r[t>>16&255]+$r[t>>24&255]+"-"+$r[e&255]+$r[e>>8&255]+"-"+$r[e>>16&15|64]+$r[e>>24&255]+"-"+$r[n&63|128]+$r[n>>8&255]+"-"+$r[n>>16&255]+$r[n>>24&255]+$r[r&255]+$r[r>>8&255]+$r[r>>16&255]+$r[r>>24&255]).toLowerCase()}function Wn(t,e,n){return Math.max(e,Math.min(n,t))}function qR(t,e){return(t%e+e)%e}function voe(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function yoe(t,e,n){return t!==e?(n-t)/(e-t):0}function Bp(t,e,n){return(1-n)*t+n*e}function xoe(t,e,n,r){return Bp(t,e,1-Math.exp(-n*r))}function boe(t,e=1){return e-Math.abs(qR(t,e*2)-e)}function _oe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function woe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function Soe(t,e){return t+Math.floor(Math.random()*(e-t+1))}function Moe(t,e){return t+Math.random()*(e-t)}function Eoe(t){return t*(.5-Math.random())}function Coe(t){t!==void 0&&(U4=t);let e=U4+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function Toe(t){return t*Xc}function Roe(t){return t*Ad}function Aoe(t){return(t&t-1)===0&&t!==0}function Poe(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Ioe(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Noe(t,e,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((e+r)/2),u=s((e+r)/2),f=o((e-r)/2),h=s((e-r)/2),m=o((r-e)/2),v=s((r-e)/2);switch(i){case"XYX":t.set(a*u,l*f,l*h,a*c);break;case"YZY":t.set(l*h,a*u,l*f,a*c);break;case"ZXZ":t.set(l*f,l*h,a*u,a*c);break;case"XZX":t.set(a*u,l*v,l*m,a*c);break;case"YXY":t.set(l*m,a*u,l*v,a*c);break;case"ZYZ":t.set(l*v,l*m,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function ai(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 zt(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const GU={DEG2RAD:Xc,RAD2DEG:Ad,generateUUID:ro,clamp:Wn,euclideanModulo:qR,mapLinear:voe,inverseLerp:yoe,lerp:Bp,damp:xoe,pingpong:boe,smoothstep:_oe,smootherstep:woe,randInt:Soe,randFloat:Moe,randFloatSpread:Eoe,seededRandom:Coe,degToRad:Toe,radToDeg:Roe,isPowerOfTwo:Aoe,ceilPowerOfTwo:Poe,floorPowerOfTwo:Ioe,setQuaternionFromProperEuler:Noe,normalize:zt,denormalize:ai};class Ne{constructor(e=0,n=0){Ne.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=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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(Wn(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),o=this.x-e.x,s=this.y-e.y;return this.x=o*r-s*i+e.x,this.y=o*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 Ot{constructor(e,n,r,i,o,s,a,l,c){Ot.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,s,a,l,c)}set(e,n,r,i,o,s,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=o,u[5]=l,u[6]=r,u[7]=s,u[8]=c,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,o=this.elements,s=r[0],a=r[3],l=r[6],c=r[1],u=r[4],f=r[7],h=r[2],m=r[5],v=r[8],x=i[0],y=i[3],g=i[6],b=i[1],_=i[4],S=i[7],A=i[2],P=i[5],R=i[8];return o[0]=s*x+a*b+l*A,o[3]=s*y+a*_+l*P,o[6]=s*g+a*S+l*R,o[1]=c*x+u*b+f*A,o[4]=c*y+u*_+f*P,o[7]=c*g+u*S+f*R,o[2]=h*x+m*b+v*A,o[5]=h*y+m*_+v*P,o[8]=h*g+m*S+v*R,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],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*s*u-n*a*c-r*o*u+r*a*l+i*o*c-i*s*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*s-a*c,h=a*l-u*o,m=c*o-s*l,v=n*f+r*h+i*m;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/v;return e[0]=f*x,e[1]=(i*c-u*r)*x,e[2]=(a*r-i*s)*x,e[3]=h*x,e[4]=(u*n-i*l)*x,e[5]=(i*o-a*n)*x,e[6]=m*x,e[7]=(r*l-c*n)*x,e[8]=(s*n-r*o)*x,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,o,s,a){const l=Math.cos(o),c=Math.sin(o);return this.set(r*l,r*c,-r*(l*s+c*a)+s+e,-i*c,i*l,-i*(-c*s+l*a)+a+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 Ot;function XU(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const koe={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Gf(t,e){return new koe[t](e)}function Nm(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function qU(){const t=Nm("canvas");return t.style.display="block",t}const B4={};function vp(t){t in B4||(B4[t]=!0,console.warn(t))}function Loe(t,e,n){return new Promise(function(r,i){function o(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(o,n);break;default:r()}}setTimeout(o,n)})}function Ooe(t){const e=t.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function Doe(t){const e=t.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const Jt={enabled:!0,workingColorSpace:Cu,spaces:{},convert:function(t,e,n){return this.enabled===!1||e===n||!e||!n||(this.spaces[e].transfer===dn&&(t.r=Ca(t.r),t.g=Ca(t.g),t.b=Ca(t.b)),this.spaces[e].primaries!==this.spaces[n].primaries&&(t.applyMatrix3(this.spaces[e].toXYZ),t.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===dn&&(t.r=cd(t.r),t.g=cd(t.g),t.b=cd(t.b))),t},fromWorkingColorSpace:function(t,e){return this.convert(t,this.workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this.workingColorSpace)},getPrimaries:function(t){return this.spaces[t].primaries},getTransfer:function(t){return t===ga?mg:this.spaces[t].transfer},getLuminanceCoefficients:function(t,e=this.workingColorSpace){return t.fromArray(this.spaces[e].luminanceCoefficients)},define:function(t){Object.assign(this.spaces,t)},_getMatrix:function(t,e,n){return t.copy(this.spaces[e].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(t){return this.spaces[t].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(t=this.workingColorSpace){return this.spaces[t].workingColorSpaceConfig.unpackColorSpace}};function Ca(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function cd(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}const j4=[.64,.33,.3,.6,.15,.06],V4=[.2126,.7152,.0722],$4=[.3127,.329],W4=new Ot().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),H4=new Ot().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);Jt.define({[Cu]:{primaries:j4,whitePoint:$4,transfer:mg,toXYZ:W4,fromXYZ:H4,luminanceCoefficients:V4,workingColorSpaceConfig:{unpackColorSpace:Si},outputColorSpaceConfig:{drawingBufferColorSpace:Si}},[Si]:{primaries:j4,whitePoint:$4,transfer:dn,toXYZ:W4,fromXYZ:H4,luminanceCoefficients:V4,outputColorSpaceConfig:{drawingBufferColorSpace:Si}}});let tf;class YU{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{tf===void 0&&(tf=Nm("canvas")),tf.width=e.width,tf.height=e.height;const r=tf.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=tf}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Nm("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),o=i.data;for(let s=0;s0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==dg)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Cm:e.x=e.x-Math.floor(e.x);break;case Ii:e.x=e.x<0?0:1;break;case Tm: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 Cm:e.y=e.y-Math.floor(e.y);break;case Ii:e.y=e.y<0?0:1;break;case Tm: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++}}On.DEFAULT_IMAGE=null;On.DEFAULT_MAPPING=dg;On.DEFAULT_ANISOTROPY=1;class en{constructor(e=0,n=0,r=0,i=1){en.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,o=this.w,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i+s[12]*o,this.y=s[1]*n+s[5]*r+s[9]*i+s[13]*o,this.z=s[2]*n+s[6]*r+s[10]*i+s[14]*o,this.w=s[3]*n+s[7]*r+s[11]*i+s[15]*o,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,o;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],m=l[5],v=l[9],x=l[2],y=l[6],g=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-x)<.01&&Math.abs(v-y)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+x)<.1&&Math.abs(v+y)<.1&&Math.abs(c+m+g-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const _=(c+1)/2,S=(m+1)/2,A=(g+1)/2,P=(u+h)/4,R=(f+x)/4,L=(v+y)/4;return _>S&&_>A?_<.01?(r=0,i=.707106781,o=.707106781):(r=Math.sqrt(_),i=P/r,o=R/r):S>A?S<.01?(r=.707106781,i=0,o=.707106781):(i=Math.sqrt(S),r=P/i,o=L/i):A<.01?(r=.707106781,i=.707106781,o=0):(o=Math.sqrt(A),r=R/o,i=L/o),this.set(r,i,o,n),this}let b=Math.sqrt((y-v)*(y-v)+(f-x)*(f-x)+(h-u)*(h-u));return Math.abs(b)<.001&&(b=1),this.x=(y-v)/b,this.y=(f-x)/b,this.z=(h-u)/b,this.w=Math.acos((c+m+g-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=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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 KU extends Zs{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new en(0,0,e,n),this.scissorTest=!1,this.viewport=new en(0,0,e,n);const i={width:e,height:n,depth:1};r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:cr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},r);const o=new On(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace);o.flipY=!1,o.generateMipmaps=r.generateMipmaps,o.internalFormat=r.internalFormat,this.textures=[];const s=r.count;for(let a=0;a=0?1:-1,_=1-g*g;if(_>Number.EPSILON){const A=Math.sqrt(_),P=Math.atan2(A,g*b);y=Math.sin(y*P)/A,a=Math.sin(a*P)/A}const S=a*b;if(l=l*y+h*S,c=c*y+m*S,u=u*y+v*S,f=f*y+x*S,y===1-a){const A=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=A,c*=A,u*=A,f*=A}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f}static multiplyQuaternionsFlat(e,n,r,i,o,s){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],f=o[s],h=o[s+1],m=o[s+2],v=o[s+3];return e[n]=a*v+u*f+l*m-c*h,e[n+1]=l*v+u*h+c*f-a*m,e[n+2]=c*v+u*m+a*h-l*f,e[n+3]=u*v-a*f-l*h-c*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,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,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),f=a(o/2),h=l(r/2),m=l(i/2),v=l(o/2);switch(s){case"XYZ":this._x=h*u*f+c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f-h*m*v;break;case"YXZ":this._x=h*u*f+c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f+h*m*v;break;case"ZXY":this._x=h*u*f-c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f-h*m*v;break;case"ZYX":this._x=h*u*f-c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f+h*m*v;break;case"YZX":this._x=h*u*f+c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f-h*m*v;break;case"XZY":this._x=h*u*f-c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f+h*m*v;break;default:console.warn("THREE.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],o=n[8],s=n[1],a=n[5],l=n[9],c=n[2],u=n[6],f=n[10],h=r+a+f;if(h>0){const m=.5/Math.sqrt(h+1);this._w=.25/m,this._x=(u-l)*m,this._y=(o-c)*m,this._z=(s-i)*m}else if(r>a&&r>f){const m=2*Math.sqrt(1+r-a-f);this._w=(u-l)/m,this._x=.25*m,this._y=(i+s)/m,this._z=(o+c)/m}else if(a>f){const m=2*Math.sqrt(1+a-r-f);this._w=(o-c)/m,this._x=(i+s)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+f-r-a);this._w=(s-i)/m,this._x=(o+c)/m,this._y=(l+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.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(Wn(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,o=e._z,s=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+s*a+i*c-o*l,this._y=i*u+s*l+o*a-r*c,this._z=o*u+s*c+r*l-i*a,this._w=s*u-r*a-i*l-o*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,o=this._z,s=this._w;let a=s*e._w+r*e._x+i*e._y+o*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=r,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-n;return this._w=m*s+n*this._w,this._x=m*r+n*this._x,this._y=m*i+n*this._y,this._z=m*o+n*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=s*f+this._w*h,this._x=r*f+this._x*h,this._y=i*f+this._y*h,this._z=o*f+this._z*h,this._onChangeCallback(),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),o=Math.sqrt(r);return this.set(i*Math.sin(e),i*Math.cos(e),o*Math.sin(n),o*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 H{constructor(e=0,n=0,r=0){H.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(G4.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(G4.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=e.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*s,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*s,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*s,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*i-a*r),u=2*(a*n-o*i),f=2*(o*r-s*n);return this.x=n+l*c+s*f-a*u,this.y=r+l*u+a*c-o*f,this.z=i+l*f+o*u-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[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=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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,o=e.z,s=n.x,a=n.y,l=n.z;return this.x=i*l-o*a,this.y=o*s-r*l,this.z=r*a-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 cM.copy(this).projectOnVector(e),this.sub(cM)}reflect(e){return this.sub(cM.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(Wn(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 cM=new H,G4=new zi;class kr{constructor(e=new H(1/0,1/0,1/0),n=new H(-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=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,Ho),Ho.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(Xh),uv.subVectors(this.max,Xh),nf.subVectors(e.a,Xh),rf.subVectors(e.b,Xh),of.subVectors(e.c,Xh),il.subVectors(rf,nf),ol.subVectors(of,rf),sc.subVectors(nf,of);let n=[0,-il.z,il.y,0,-ol.z,ol.y,0,-sc.z,sc.y,il.z,0,-il.x,ol.z,0,-ol.x,sc.z,0,-sc.x,-il.y,il.x,0,-ol.y,ol.x,0,-sc.y,sc.x,0];return!uM(n,nf,rf,of,uv)||(n=[1,0,0,0,1,0,0,0,1],!uM(n,nf,rf,of,uv))?!1:(fv.crossVectors(il,ol),n=[fv.x,fv.y,fv.z],uM(n,nf,rf,of,uv))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ho).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ho).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:(sa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),sa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),sa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),sa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),sa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),sa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),sa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),sa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(sa),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const sa=[new H,new H,new H,new H,new H,new H,new H,new H],Ho=new H,cv=new kr,nf=new H,rf=new H,of=new H,il=new H,ol=new H,sc=new H,Xh=new H,uv=new H,fv=new H,ac=new H;function uM(t,e,n,r,i){for(let o=0,s=t.length-3;o<=s;o+=3){ac.fromArray(t,o);const a=i.x*Math.abs(ac.x)+i.y*Math.abs(ac.y)+i.z*Math.abs(ac.z),l=e.dot(ac),c=n.dot(ac),u=r.dot(ac);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const joe=new kr,qh=new H,fM=new H;class Kr{constructor(e=new H,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):joe.setFromPoints(e).getCenter(r);let i=0;for(let o=0,s=e.length;othis.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;qh.subVectors(e,this.center);const n=qh.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(qh,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):(fM.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(qh.copy(e.center).add(fM)),this.expandByPoint(qh.copy(e.center).sub(fM))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const aa=new H,dM=new H,dv=new H,sl=new H,hM=new H,hv=new H,pM=new H;class eh{constructor(e=new H,n=new H(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,aa)),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=aa.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(aa.copy(this.origin).addScaledVector(this.direction,n),aa.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){dM.copy(e).add(n).multiplyScalar(.5),dv.copy(n).sub(e).normalize(),sl.copy(this.origin).sub(dM);const o=e.distanceTo(n)*.5,s=-this.direction.dot(dv),a=sl.dot(this.direction),l=-sl.dot(dv),c=sl.lengthSq(),u=Math.abs(1-s*s);let f,h,m,v;if(u>0)if(f=s*l-a,h=s*a-l,v=o*u,f>=0)if(h>=-v)if(h<=v){const x=1/u;f*=x,h*=x,m=f*(f+s*h+2*a)+h*(s*f+h+2*l)+c}else h=o,f=Math.max(0,-(s*h+a)),m=-f*f+h*(h+2*l)+c;else h=-o,f=Math.max(0,-(s*h+a)),m=-f*f+h*(h+2*l)+c;else h<=-v?(f=Math.max(0,-(-s*o+a)),h=f>0?-o:Math.min(Math.max(-o,-l),o),m=-f*f+h*(h+2*l)+c):h<=v?(f=0,h=Math.min(Math.max(-o,-l),o),m=h*(h+2*l)+c):(f=Math.max(0,-(s*o+a)),h=f>0?o:Math.min(Math.max(-o,-l),o),m=-f*f+h*(h+2*l)+c);else h=s>0?-o:o,f=Math.max(0,-(s*h+a)),m=-f*f+h*(h+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(dM).addScaledVector(dv,h),m}intersectSphere(e,n){aa.subVectors(e.center,this.origin);const r=aa.dot(this.direction),i=aa.dot(aa)-r*r,o=e.radius*e.radius;if(i>o)return null;const s=Math.sqrt(o-i),a=r-s,l=r+s;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const 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,o,s,a,l;const c=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return c>=0?(r=(e.min.x-h.x)*c,i=(e.max.x-h.x)*c):(r=(e.max.x-h.x)*c,i=(e.min.x-h.x)*c),u>=0?(o=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(o=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),r>s||o>i||((o>r||isNaN(r))&&(r=o),(s=0?(a=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(a=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),r>l||a>i)||((a>r||r!==r)&&(r=a),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,aa)!==null}intersectTriangle(e,n,r,i,o){hM.subVectors(n,e),hv.subVectors(r,e),pM.crossVectors(hM,hv);let s=this.direction.dot(pM),a;if(s>0){if(i)return null;a=1}else if(s<0)a=-1,s=-s;else return null;sl.subVectors(this.origin,e);const l=a*this.direction.dot(hv.crossVectors(sl,hv));if(l<0)return null;const c=a*this.direction.dot(hM.cross(sl));if(c<0||l+c>s)return null;const u=-a*sl.dot(pM);return u<0?null:this.at(u/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Mt{constructor(e,n,r,i,o,s,a,l,c,u,f,h,m,v,x,y){Mt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,s,a,l,c,u,f,h,m,v,x,y)}set(e,n,r,i,o,s,a,l,c,u,f,h,m,v,x,y){const g=this.elements;return g[0]=e,g[4]=n,g[8]=r,g[12]=i,g[1]=o,g[5]=s,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=f,g[14]=h,g[3]=m,g[7]=v,g[11]=x,g[15]=y,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Mt().fromArray(this.elements)}copy(e){const 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 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){const n=this.elements,r=e.elements,i=1/sf.setFromMatrixColumn(e,0).length(),o=1/sf.setFromMatrixColumn(e,1).length(),s=1/sf.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]*o,n[5]=r[5]*o,n[6]=r[6]*o,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,o=e.z,s=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),f=Math.sin(o);if(e.order==="XYZ"){const h=s*u,m=s*f,v=a*u,x=a*f;n[0]=l*u,n[4]=-l*f,n[8]=c,n[1]=m+v*c,n[5]=h-x*c,n[9]=-a*l,n[2]=x-h*c,n[6]=v+m*c,n[10]=s*l}else if(e.order==="YXZ"){const h=l*u,m=l*f,v=c*u,x=c*f;n[0]=h+x*a,n[4]=v*a-m,n[8]=s*c,n[1]=s*f,n[5]=s*u,n[9]=-a,n[2]=m*a-v,n[6]=x+h*a,n[10]=s*l}else if(e.order==="ZXY"){const h=l*u,m=l*f,v=c*u,x=c*f;n[0]=h-x*a,n[4]=-s*f,n[8]=v+m*a,n[1]=m+v*a,n[5]=s*u,n[9]=x-h*a,n[2]=-s*c,n[6]=a,n[10]=s*l}else if(e.order==="ZYX"){const h=s*u,m=s*f,v=a*u,x=a*f;n[0]=l*u,n[4]=v*c-m,n[8]=h*c+x,n[1]=l*f,n[5]=x*c+h,n[9]=m*c-v,n[2]=-c,n[6]=a*l,n[10]=s*l}else if(e.order==="YZX"){const h=s*l,m=s*c,v=a*l,x=a*c;n[0]=l*u,n[4]=x-h*f,n[8]=v*f+m,n[1]=f,n[5]=s*u,n[9]=-a*u,n[2]=-c*u,n[6]=m*f+v,n[10]=h-x*f}else if(e.order==="XZY"){const h=s*l,m=s*c,v=a*l,x=a*c;n[0]=l*u,n[4]=-f,n[8]=c*u,n[1]=h*f+x,n[5]=s*u,n[9]=m*f-v,n[2]=v*f-m,n[6]=a*u,n[10]=x*f+h}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(Voe,e,$oe)}lookAt(e,n,r){const i=this.elements;return Xi.subVectors(e,n),Xi.lengthSq()===0&&(Xi.z=1),Xi.normalize(),al.crossVectors(r,Xi),al.lengthSq()===0&&(Math.abs(r.z)===1?Xi.x+=1e-4:Xi.z+=1e-4,Xi.normalize(),al.crossVectors(r,Xi)),al.normalize(),pv.crossVectors(Xi,al),i[0]=al.x,i[4]=pv.x,i[8]=Xi.x,i[1]=al.y,i[5]=pv.y,i[9]=Xi.y,i[2]=al.z,i[6]=pv.z,i[10]=Xi.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,o=this.elements,s=r[0],a=r[4],l=r[8],c=r[12],u=r[1],f=r[5],h=r[9],m=r[13],v=r[2],x=r[6],y=r[10],g=r[14],b=r[3],_=r[7],S=r[11],A=r[15],P=i[0],R=i[4],L=i[8],k=i[12],C=i[1],N=i[5],z=i[9],D=i[13],B=i[2],G=i[6],X=i[10],Z=i[14],F=i[3],q=i[7],K=i[11],Q=i[15];return o[0]=s*P+a*C+l*B+c*F,o[4]=s*R+a*N+l*G+c*q,o[8]=s*L+a*z+l*X+c*K,o[12]=s*k+a*D+l*Z+c*Q,o[1]=u*P+f*C+h*B+m*F,o[5]=u*R+f*N+h*G+m*q,o[9]=u*L+f*z+h*X+m*K,o[13]=u*k+f*D+h*Z+m*Q,o[2]=v*P+x*C+y*B+g*F,o[6]=v*R+x*N+y*G+g*q,o[10]=v*L+x*z+y*X+g*K,o[14]=v*k+x*D+y*Z+g*Q,o[3]=b*P+_*C+S*B+A*F,o[7]=b*R+_*N+S*G+A*q,o[11]=b*L+_*z+S*X+A*K,o[15]=b*k+_*D+S*Z+A*Q,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],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],m=e[14],v=e[3],x=e[7],y=e[11],g=e[15];return v*(+o*l*f-i*c*f-o*a*h+r*c*h+i*a*m-r*l*m)+x*(+n*l*m-n*c*h+o*s*h-i*s*m+i*c*u-o*l*u)+y*(+n*c*f-n*a*m-o*s*f+r*s*m+o*a*u-r*c*u)+g*(-i*a*u-n*l*f+n*a*h+i*s*f-r*s*h+r*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,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],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],m=e[11],v=e[12],x=e[13],y=e[14],g=e[15],b=f*y*c-x*h*c+x*l*m-a*y*m-f*l*g+a*h*g,_=v*h*c-u*y*c-v*l*m+s*y*m+u*l*g-s*h*g,S=u*x*c-v*f*c+v*a*m-s*x*m-u*a*g+s*f*g,A=v*f*l-u*x*l-v*a*h+s*x*h+u*a*y-s*f*y,P=n*b+r*_+i*S+o*A;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const R=1/P;return e[0]=b*R,e[1]=(x*h*o-f*y*o-x*i*m+r*y*m+f*i*g-r*h*g)*R,e[2]=(a*y*o-x*l*o+x*i*c-r*y*c-a*i*g+r*l*g)*R,e[3]=(f*l*o-a*h*o-f*i*c+r*h*c+a*i*m-r*l*m)*R,e[4]=_*R,e[5]=(u*y*o-v*h*o+v*i*m-n*y*m-u*i*g+n*h*g)*R,e[6]=(v*l*o-s*y*o-v*i*c+n*y*c+s*i*g-n*l*g)*R,e[7]=(s*h*o-u*l*o+u*i*c-n*h*c-s*i*m+n*l*m)*R,e[8]=S*R,e[9]=(v*f*o-u*x*o-v*r*m+n*x*m+u*r*g-n*f*g)*R,e[10]=(s*x*o-v*a*o+v*r*c-n*x*c-s*r*g+n*a*g)*R,e[11]=(u*a*o-s*f*o-u*r*c+n*f*c+s*r*m-n*a*m)*R,e[12]=A*R,e[13]=(u*x*i-v*f*i+v*r*h-n*x*h-u*r*y+n*f*y)*R,e[14]=(v*a*i-s*x*i-v*r*l+n*x*l+s*r*y-n*a*y)*R,e[15]=(s*f*i-u*a*i+u*r*l-n*f*l-s*r*h+n*a*h)*R,this}scale(e){const n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,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),o=1-r,s=e.x,a=e.y,l=e.z,c=o*s,u=o*a;return this.set(c*s+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*s,0,c*l-i*a,u*l+i*s,o*l*l+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,o,s){return this.set(1,r,o,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,o=n._x,s=n._y,a=n._z,l=n._w,c=o+o,u=s+s,f=a+a,h=o*c,m=o*u,v=o*f,x=s*u,y=s*f,g=a*f,b=l*c,_=l*u,S=l*f,A=r.x,P=r.y,R=r.z;return i[0]=(1-(x+g))*A,i[1]=(m+S)*A,i[2]=(v-_)*A,i[3]=0,i[4]=(m-S)*P,i[5]=(1-(h+g))*P,i[6]=(y+b)*P,i[7]=0,i[8]=(v+_)*R,i[9]=(y-b)*R,i[10]=(1-(h+x))*R,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;let o=sf.set(i[0],i[1],i[2]).length();const s=sf.set(i[4],i[5],i[6]).length(),a=sf.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],Go.copy(this);const c=1/o,u=1/s,f=1/a;return Go.elements[0]*=c,Go.elements[1]*=c,Go.elements[2]*=c,Go.elements[4]*=u,Go.elements[5]*=u,Go.elements[6]*=u,Go.elements[8]*=f,Go.elements[9]*=f,Go.elements[10]*=f,n.setFromRotationMatrix(Go),r.x=o,r.y=s,r.z=a,this}makePerspective(e,n,r,i,o,s,a=Ns){const l=this.elements,c=2*o/(n-e),u=2*o/(r-i),f=(n+e)/(n-e),h=(r+i)/(r-i);let m,v;if(a===Ns)m=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Im)m=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=v,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,o,s,a=Ns){const l=this.elements,c=1/(n-e),u=1/(r-i),f=1/(s-o),h=(n+e)*c,m=(r+i)*u;let v,x;if(a===Ns)v=(s+o)*f,x=-2*f;else if(a===Im)v=o*f,x=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=x,l[14]=-v,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 sf=new H,Go=new Mt,Voe=new H(0,0,0),$oe=new H(1,1,1),al=new H,pv=new H,Xi=new H,X4=new Mt,q4=new zi;class so{constructor(e=0,n=0,r=0,i=so.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,o=i[0],s=i[4],a=i[8],l=i[1],c=i[5],u=i[9],f=i[2],h=i[6],m=i[10];switch(n){case"XYZ":this._y=Math.asin(Wn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Wn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,o),this._z=0);break;case"ZXY":this._x=Math.asin(Wn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Wn(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,m),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(Wn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,o)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Wn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-u,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return X4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(X4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return q4.setFromEuler(this),this.setFromQuaternion(q4,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}}so.DEFAULT_ORDER="XYZ";class qc{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),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.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function o(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.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=o(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),m.length>0&&(r.animations=m),v.length>0&&(r.nodes=v)}return r.object=i,r;function s(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,n,r,i,o){Xo.subVectors(i,n),ca.subVectors(r,n),gM.subVectors(e,n);const s=Xo.dot(Xo),a=Xo.dot(ca),l=Xo.dot(gM),c=ca.dot(ca),u=ca.dot(gM),f=s*c-a*a;if(f===0)return o.set(0,0,0),null;const h=1/f,m=(c*l-a*u)*h,v=(s*u-a*l)*h;return o.set(1-m-v,v,m)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,ua)===null?!1:ua.x>=0&&ua.y>=0&&ua.x+ua.y<=1}static getInterpolation(e,n,r,i,o,s,a,l){return this.getBarycoord(e,n,r,i,ua)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,ua.x),l.addScaledVector(s,ua.y),l.addScaledVector(a,ua.z),l)}static getInterpolatedAttribute(e,n,r,i,o,s){return bM.setScalar(0),_M.setScalar(0),wM.setScalar(0),bM.fromBufferAttribute(e,n),_M.fromBufferAttribute(e,r),wM.fromBufferAttribute(e,i),s.setScalar(0),s.addScaledVector(bM,o.x),s.addScaledVector(_M,o.y),s.addScaledVector(wM,o.z),s}static isFrontFacing(e,n,r,i){return Xo.subVectors(r,n),ca.subVectors(e,n),Xo.cross(ca).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 Xo.subVectors(this.c,this.b),ca.subVectors(this.a,this.b),Xo.cross(ca).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ri.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return Ri.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,r,i,o){return Ri.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}containsPoint(e){return Ri.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ri.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,o=this.c;let s,a;cf.subVectors(i,r),uf.subVectors(o,r),vM.subVectors(e,r);const l=cf.dot(vM),c=uf.dot(vM);if(l<=0&&c<=0)return n.copy(r);yM.subVectors(e,i);const u=cf.dot(yM),f=uf.dot(yM);if(u>=0&&f<=u)return n.copy(i);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return s=l/(l-u),n.copy(r).addScaledVector(cf,s);xM.subVectors(e,o);const m=cf.dot(xM),v=uf.dot(xM);if(v>=0&&m<=v)return n.copy(o);const x=m*c-l*v;if(x<=0&&c>=0&&v<=0)return a=c/(c-v),n.copy(r).addScaledVector(uf,a);const y=u*v-m*f;if(y<=0&&f-u>=0&&m-v>=0)return ek.subVectors(o,i),a=(f-u)/(f-u+(m-v)),n.copy(i).addScaledVector(ek,a);const g=1/(y+x+h);return s=x*g,a=h*g,n.copy(r).addScaledVector(cf,s).addScaledVector(uf,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const ZU={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},ll={h:0,s:0,l:0},gv={h:0,s:0,l:0};function SM(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}let at=class{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=Si){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Jt.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=Jt.workingColorSpace){return this.r=e,this.g=n,this.b=r,Jt.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=Jt.workingColorSpace){if(e=qR(e,1),n=Wn(n,0,1),r=Wn(r,0,1),n===0)this.r=this.g=this.b=r;else{const o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=SM(s,o,e+1/3),this.g=SM(s,o,e),this.b=SM(s,o,e-1/3)}return Jt.toWorkingColorSpace(this,i),this}setStyle(e,n=Si){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,n);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,n);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=i[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(o,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Si){const r=ZU[e.toLowerCase()];return r!==void 0?this.setHex(r,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Ca(e.r),this.g=Ca(e.g),this.b=Ca(e.b),this}copyLinearToSRGB(e){return this.r=cd(e.r),this.g=cd(e.g),this.b=cd(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Si){return Jt.fromWorkingColorSpace(Wr.copy(this),e),Math.round(Wn(Wr.r*255,0,255))*65536+Math.round(Wn(Wr.g*255,0,255))*256+Math.round(Wn(Wr.b*255,0,255))}getHexString(e=Si){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Jt.workingColorSpace){Jt.fromWorkingColorSpace(Wr.copy(this),n);const r=Wr.r,i=Wr.g,o=Wr.b,s=Math.max(r,i,o),a=Math.min(r,i,o);let l,c;const u=(a+s)/2;if(a===s)l=0,c=0;else{const f=s-a;switch(c=u<=.5?f/(s+a):f/(2-s-a),s){case r:l=(i-o)/f+(i0!=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){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.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.6,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.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!==Hc&&(r.blending=this.blending),this.side!==La&&(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!==O1&&(r.blendSrc=this.blendSrc),this.blendDst!==D1&&(r.blendDst=this.blendDst),this.blendEquation!==gl&&(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!==uu&&(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!==oC&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Sc&&(r.stencilFail=this.stencilFail),this.stencilZFail!==Sc&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==Sc&&(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.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(o){const s=[];for(const a in o){const l=o[a];delete l.metadata,s.push(l)}return s}if(n){const o=i(e.textures),s=i(e.images);o.length>0&&(r.textures=o),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 o=0;o!==i;++o)r[o]=n[o].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.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class Hl extends Or{static get type(){return"MeshBasicMaterial"}constructor(e){super(),this.isMeshBasicMaterial=!0,this.color=new at(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 so,this.combine=fg,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 va=Yoe();function Yoe(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(r[l]=0,r[l|256]=32768,i[l]=24,i[l|256]=24):c<-14?(r[l]=1024>>-c-14,r[l|256]=1024>>-c-14|32768,i[l]=-c-1,i[l|256]=-c-1):c<=15?(r[l]=c+15<<10,r[l|256]=c+15<<10|32768,i[l]=13,i[l|256]=13):c<128?(r[l]=31744,r[l|256]=64512,i[l]=24,i[l|256]=24):(r[l]=31744,r[l|256]=64512,i[l]=13,i[l|256]=13)}const o=new Uint32Array(2048),s=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;!(c&8388608);)c<<=1,u-=8388608;c&=-8388609,u+=947912704,o[l]=c|u}for(let l=1024;l<2048;++l)o[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)s[l]=l<<23;s[31]=1199570944,s[32]=2147483648;for(let l=33;l<63;++l)s[l]=2147483648+(l-32<<23);s[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:o,exponentTable:s,offsetTable:a}}function wi(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Wn(t,-65504,65504),va.floatView[0]=t;const e=va.uint32View[0],n=e>>23&511;return va.baseTable[n]+((e&8388607)>>va.shiftTable[n])}function yp(t){const e=t>>10;return va.uint32View[0]=va.mantissaTable[va.offsetTable[e]+(t&1023)]+va.exponentTable[e],va.floatView[0]}const Koe={toHalfFloat:wi,fromHalfFloat:yp},er=new H,vv=new Ne;class pn{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=Pm,this.updateRanges=[],this.gpuType=li,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,o=this.itemSize;in.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),n.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new kr);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new H(-1/0,-1/0,-1/0),new H(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let r=0,i=n.length;r0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let o=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(i[l]=u,o=!0)}o&&(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 a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(n))}const o=e.morphAttributes;for(const c in o){const u=[],f=o[c];for(let h=0,m=f.length;h0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o(e.far-e.near)**2))&&(tk.copy(o).invert(),lc.copy(e.ray).applyMatrix4(tk),!(r.boundingBox!==null&&lc.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,lc)))}_computeIntersections(e,n,r){let i;const o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,u=o.attributes.uv1,f=o.attributes.normal,h=o.groups,m=o.drawRange;if(a!==null)if(Array.isArray(s))for(let v=0,x=h.length;vn.far?null:{distance:c,point:Sv.clone(),object:t}}function Mv(t,e,n,r,i,o,s,a,l,c){t.getVertexPosition(a,xv),t.getVertexPosition(l,bv),t.getVertexPosition(c,_v);const u=ise(t,e,n,r,xv,bv,_v,rk);if(u){const f=new H;Ri.getBarycoord(rk,xv,bv,_v,f),i&&(u.uv=Ri.getInterpolatedAttribute(i,a,l,c,f,new Ne)),o&&(u.uv1=Ri.getInterpolatedAttribute(o,a,l,c,f,new Ne)),s&&(u.normal=Ri.getInterpolatedAttribute(s,a,l,c,f,new H),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new H,materialIndex:0};Ri.getNormal(xv,bv,_v,h.normal),u.face=h,u.barycoord=f}return u}class Tu extends Dt{constructor(e=1,n=1,r=1,i=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:s};const a=this;i=Math.floor(i),o=Math.floor(o),s=Math.floor(s);const l=[],c=[],u=[],f=[];let h=0,m=0;v("z","y","x",-1,-1,r,n,e,s,o,0),v("z","y","x",1,-1,r,n,-e,s,o,1),v("x","z","y",1,1,e,r,n,i,s,2),v("x","z","y",1,-1,e,r,-n,i,s,3),v("x","y","z",1,-1,e,n,r,i,o,4),v("x","y","z",-1,-1,e,n,-r,i,o,5),this.setIndex(l),this.setAttribute("position",new mt(c,3)),this.setAttribute("normal",new mt(u,3)),this.setAttribute("uv",new mt(f,2));function v(x,y,g,b,_,S,A,P,R,L,k){const C=S/R,N=A/L,z=S/2,D=A/2,B=P/2,G=R+1,X=L+1;let Z=0,F=0;const q=new H;for(let K=0;K0?1:-1,u.push(q.x,q.y,q.z),f.push(de/R),f.push(1-K/L),Z+=1}}for(let K=0;K>8&255]+$r[t>>16&255]+$r[t>>24&255]+"-"+$r[e&255]+$r[e>>8&255]+"-"+$r[e>>16&15|64]+$r[e>>24&255]+"-"+$r[n&63|128]+$r[n>>8&255]+"-"+$r[n>>16&255]+$r[n>>24&255]+$r[r&255]+$r[r>>8&255]+$r[r>>16&255]+$r[r>>24&255]).toLowerCase()}function Wn(t,e,n){return Math.max(e,Math.min(n,t))}function qR(t,e){return(t%e+e)%e}function voe(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function yoe(t,e,n){return t!==e?(n-t)/(e-t):0}function Bp(t,e,n){return(1-n)*t+n*e}function xoe(t,e,n,r){return Bp(t,e,1-Math.exp(-n*r))}function boe(t,e=1){return e-Math.abs(qR(t,e*2)-e)}function _oe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function woe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function Soe(t,e){return t+Math.floor(Math.random()*(e-t+1))}function Moe(t,e){return t+Math.random()*(e-t)}function Eoe(t){return t*(.5-Math.random())}function Coe(t){t!==void 0&&(U4=t);let e=U4+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function Toe(t){return t*Xc}function Roe(t){return t*Ad}function Aoe(t){return(t&t-1)===0&&t!==0}function Poe(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Ioe(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Noe(t,e,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((e+r)/2),u=s((e+r)/2),f=o((e-r)/2),h=s((e-r)/2),m=o((r-e)/2),v=s((r-e)/2);switch(i){case"XYX":t.set(a*u,l*f,l*h,a*c);break;case"YZY":t.set(l*h,a*u,l*f,a*c);break;case"ZXZ":t.set(l*f,l*h,a*u,a*c);break;case"XZX":t.set(a*u,l*v,l*m,a*c);break;case"YXY":t.set(l*m,a*u,l*v,a*c);break;case"ZYZ":t.set(l*v,l*m,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function li(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 zt(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const GU={DEG2RAD:Xc,RAD2DEG:Ad,generateUUID:ro,clamp:Wn,euclideanModulo:qR,mapLinear:voe,inverseLerp:yoe,lerp:Bp,damp:xoe,pingpong:boe,smoothstep:_oe,smootherstep:woe,randInt:Soe,randFloat:Moe,randFloatSpread:Eoe,seededRandom:Coe,degToRad:Toe,radToDeg:Roe,isPowerOfTwo:Aoe,ceilPowerOfTwo:Poe,floorPowerOfTwo:Ioe,setQuaternionFromProperEuler:Noe,normalize:zt,denormalize:li};class Ne{constructor(e=0,n=0){Ne.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=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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(Wn(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),o=this.x-e.x,s=this.y-e.y;return this.x=o*r-s*i+e.x,this.y=o*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 Ot{constructor(e,n,r,i,o,s,a,l,c){Ot.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,s,a,l,c)}set(e,n,r,i,o,s,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=o,u[5]=l,u[6]=r,u[7]=s,u[8]=c,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,o=this.elements,s=r[0],a=r[3],l=r[6],c=r[1],u=r[4],f=r[7],h=r[2],m=r[5],v=r[8],x=i[0],y=i[3],g=i[6],b=i[1],_=i[4],S=i[7],A=i[2],P=i[5],R=i[8];return o[0]=s*x+a*b+l*A,o[3]=s*y+a*_+l*P,o[6]=s*g+a*S+l*R,o[1]=c*x+u*b+f*A,o[4]=c*y+u*_+f*P,o[7]=c*g+u*S+f*R,o[2]=h*x+m*b+v*A,o[5]=h*y+m*_+v*P,o[8]=h*g+m*S+v*R,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],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*s*u-n*a*c-r*o*u+r*a*l+i*o*c-i*s*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*s-a*c,h=a*l-u*o,m=c*o-s*l,v=n*f+r*h+i*m;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/v;return e[0]=f*x,e[1]=(i*c-u*r)*x,e[2]=(a*r-i*s)*x,e[3]=h*x,e[4]=(u*n-i*l)*x,e[5]=(i*o-a*n)*x,e[6]=m*x,e[7]=(r*l-c*n)*x,e[8]=(s*n-r*o)*x,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,o,s,a){const l=Math.cos(o),c=Math.sin(o);return this.set(r*l,r*c,-r*(l*s+c*a)+s+e,-i*c,i*l,-i*(-c*s+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(cM.makeScale(e,n)),this}rotate(e){return this.premultiply(cM.makeRotation(-e)),this}translate(e,n){return this.premultiply(cM.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 cM=new Ot;function XU(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const koe={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Gf(t,e){return new koe[t](e)}function Nm(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function qU(){const t=Nm("canvas");return t.style.display="block",t}const B4={};function vp(t){t in B4||(B4[t]=!0,console.warn(t))}function Loe(t,e,n){return new Promise(function(r,i){function o(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(o,n);break;default:r()}}setTimeout(o,n)})}function Ooe(t){const e=t.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function Doe(t){const e=t.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const Jt={enabled:!0,workingColorSpace:Cu,spaces:{},convert:function(t,e,n){return this.enabled===!1||e===n||!e||!n||(this.spaces[e].transfer===dn&&(t.r=Ta(t.r),t.g=Ta(t.g),t.b=Ta(t.b)),this.spaces[e].primaries!==this.spaces[n].primaries&&(t.applyMatrix3(this.spaces[e].toXYZ),t.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===dn&&(t.r=cd(t.r),t.g=cd(t.g),t.b=cd(t.b))),t},fromWorkingColorSpace:function(t,e){return this.convert(t,this.workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this.workingColorSpace)},getPrimaries:function(t){return this.spaces[t].primaries},getTransfer:function(t){return t===va?mg:this.spaces[t].transfer},getLuminanceCoefficients:function(t,e=this.workingColorSpace){return t.fromArray(this.spaces[e].luminanceCoefficients)},define:function(t){Object.assign(this.spaces,t)},_getMatrix:function(t,e,n){return t.copy(this.spaces[e].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(t){return this.spaces[t].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(t=this.workingColorSpace){return this.spaces[t].workingColorSpaceConfig.unpackColorSpace}};function Ta(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function cd(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}const j4=[.64,.33,.3,.6,.15,.06],V4=[.2126,.7152,.0722],$4=[.3127,.329],W4=new Ot().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),H4=new Ot().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);Jt.define({[Cu]:{primaries:j4,whitePoint:$4,transfer:mg,toXYZ:W4,fromXYZ:H4,luminanceCoefficients:V4,workingColorSpaceConfig:{unpackColorSpace:Mi},outputColorSpaceConfig:{drawingBufferColorSpace:Mi}},[Mi]:{primaries:j4,whitePoint:$4,transfer:dn,toXYZ:W4,fromXYZ:H4,luminanceCoefficients:V4,outputColorSpaceConfig:{drawingBufferColorSpace:Mi}}});let tf;class YU{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{tf===void 0&&(tf=Nm("canvas")),tf.width=e.width,tf.height=e.height;const r=tf.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=tf}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Nm("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),o=i.data;for(let s=0;s0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==dg)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Cm:e.x=e.x-Math.floor(e.x);break;case Ni:e.x=e.x<0?0:1;break;case Tm: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 Cm:e.y=e.y-Math.floor(e.y);break;case Ni:e.y=e.y<0?0:1;break;case Tm: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++}}On.DEFAULT_IMAGE=null;On.DEFAULT_MAPPING=dg;On.DEFAULT_ANISOTROPY=1;class en{constructor(e=0,n=0,r=0,i=1){en.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,o=this.w,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i+s[12]*o,this.y=s[1]*n+s[5]*r+s[9]*i+s[13]*o,this.z=s[2]*n+s[6]*r+s[10]*i+s[14]*o,this.w=s[3]*n+s[7]*r+s[11]*i+s[15]*o,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,o;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],m=l[5],v=l[9],x=l[2],y=l[6],g=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-x)<.01&&Math.abs(v-y)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+x)<.1&&Math.abs(v+y)<.1&&Math.abs(c+m+g-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const _=(c+1)/2,S=(m+1)/2,A=(g+1)/2,P=(u+h)/4,R=(f+x)/4,L=(v+y)/4;return _>S&&_>A?_<.01?(r=0,i=.707106781,o=.707106781):(r=Math.sqrt(_),i=P/r,o=R/r):S>A?S<.01?(r=.707106781,i=0,o=.707106781):(i=Math.sqrt(S),r=P/i,o=L/i):A<.01?(r=.707106781,i=.707106781,o=0):(o=Math.sqrt(A),r=R/o,i=L/o),this.set(r,i,o,n),this}let b=Math.sqrt((y-v)*(y-v)+(f-x)*(f-x)+(h-u)*(h-u));return Math.abs(b)<.001&&(b=1),this.x=(y-v)/b,this.y=(f-x)/b,this.z=(h-u)/b,this.w=Math.acos((c+m+g-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=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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 KU extends Js{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new en(0,0,e,n),this.scissorTest=!1,this.viewport=new en(0,0,e,n);const i={width:e,height:n,depth:1};r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:cr,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},r);const o=new On(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace);o.flipY=!1,o.generateMipmaps=r.generateMipmaps,o.internalFormat=r.internalFormat,this.textures=[];const s=r.count;for(let a=0;a=0?1:-1,_=1-g*g;if(_>Number.EPSILON){const A=Math.sqrt(_),P=Math.atan2(A,g*b);y=Math.sin(y*P)/A,a=Math.sin(a*P)/A}const S=a*b;if(l=l*y+h*S,c=c*y+m*S,u=u*y+v*S,f=f*y+x*S,y===1-a){const A=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=A,c*=A,u*=A,f*=A}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=f}static multiplyQuaternionsFlat(e,n,r,i,o,s){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],f=o[s],h=o[s+1],m=o[s+2],v=o[s+3];return e[n]=a*v+u*f+l*m-c*h,e[n+1]=l*v+u*h+c*f-a*m,e[n+2]=c*v+u*m+a*h-l*f,e[n+3]=u*v-a*f-l*h-c*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,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,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),f=a(o/2),h=l(r/2),m=l(i/2),v=l(o/2);switch(s){case"XYZ":this._x=h*u*f+c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f-h*m*v;break;case"YXZ":this._x=h*u*f+c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f+h*m*v;break;case"ZXY":this._x=h*u*f-c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f-h*m*v;break;case"ZYX":this._x=h*u*f-c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f+h*m*v;break;case"YZX":this._x=h*u*f+c*m*v,this._y=c*m*f+h*u*v,this._z=c*u*v-h*m*f,this._w=c*u*f-h*m*v;break;case"XZY":this._x=h*u*f-c*m*v,this._y=c*m*f-h*u*v,this._z=c*u*v+h*m*f,this._w=c*u*f+h*m*v;break;default:console.warn("THREE.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],o=n[8],s=n[1],a=n[5],l=n[9],c=n[2],u=n[6],f=n[10],h=r+a+f;if(h>0){const m=.5/Math.sqrt(h+1);this._w=.25/m,this._x=(u-l)*m,this._y=(o-c)*m,this._z=(s-i)*m}else if(r>a&&r>f){const m=2*Math.sqrt(1+r-a-f);this._w=(u-l)/m,this._x=.25*m,this._y=(i+s)/m,this._z=(o+c)/m}else if(a>f){const m=2*Math.sqrt(1+a-r-f);this._w=(o-c)/m,this._x=(i+s)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+f-r-a);this._w=(s-i)/m,this._x=(o+c)/m,this._y=(l+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.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(Wn(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,o=e._z,s=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+s*a+i*c-o*l,this._y=i*u+s*l+o*a-r*c,this._z=o*u+s*c+r*l-i*a,this._w=s*u-r*a-i*l-o*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,o=this._z,s=this._w;let a=s*e._w+r*e._x+i*e._y+o*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=r,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-n;return this._w=m*s+n*this._w,this._x=m*r+n*this._x,this._y=m*i+n*this._y,this._z=m*o+n*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=s*f+this._w*h,this._x=r*f+this._x*h,this._y=i*f+this._y*h,this._z=o*f+this._z*h,this._onChangeCallback(),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),o=Math.sqrt(r);return this.set(i*Math.sin(e),i*Math.cos(e),o*Math.sin(n),o*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 H{constructor(e=0,n=0,r=0){H.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(G4.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(G4.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=e.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*s,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*s,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*s,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*i-a*r),u=2*(a*n-o*i),f=2*(o*r-s*n);return this.x=n+l*c+s*f-a*u,this.y=r+l*u+a*c-o*f,this.z=i+l*f+o*u-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[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=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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,o=e.z,s=n.x,a=n.y,l=n.z;return this.x=i*l-o*a,this.y=o*s-r*l,this.z=r*a-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 fM.copy(this).projectOnVector(e),this.sub(fM)}reflect(e){return this.sub(fM.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(Wn(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 fM=new H,G4=new zi;class kr{constructor(e=new H(1/0,1/0,1/0),n=new H(-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=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,Ho),Ho.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(Xh),uv.subVectors(this.max,Xh),nf.subVectors(e.a,Xh),rf.subVectors(e.b,Xh),of.subVectors(e.c,Xh),il.subVectors(rf,nf),ol.subVectors(of,rf),sc.subVectors(nf,of);let n=[0,-il.z,il.y,0,-ol.z,ol.y,0,-sc.z,sc.y,il.z,0,-il.x,ol.z,0,-ol.x,sc.z,0,-sc.x,-il.y,il.x,0,-ol.y,ol.x,0,-sc.y,sc.x,0];return!dM(n,nf,rf,of,uv)||(n=[1,0,0,0,1,0,0,0,1],!dM(n,nf,rf,of,uv))?!1:(fv.crossVectors(il,ol),n=[fv.x,fv.y,fv.z],dM(n,nf,rf,of,uv))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ho).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ho).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:(aa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),aa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),aa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),aa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),aa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),aa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),aa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),aa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(aa),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const aa=[new H,new H,new H,new H,new H,new H,new H,new H],Ho=new H,cv=new kr,nf=new H,rf=new H,of=new H,il=new H,ol=new H,sc=new H,Xh=new H,uv=new H,fv=new H,ac=new H;function dM(t,e,n,r,i){for(let o=0,s=t.length-3;o<=s;o+=3){ac.fromArray(t,o);const a=i.x*Math.abs(ac.x)+i.y*Math.abs(ac.y)+i.z*Math.abs(ac.z),l=e.dot(ac),c=n.dot(ac),u=r.dot(ac);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const joe=new kr,qh=new H,hM=new H;class Zr{constructor(e=new H,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):joe.setFromPoints(e).getCenter(r);let i=0;for(let o=0,s=e.length;othis.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;qh.subVectors(e,this.center);const n=qh.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(qh,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):(hM.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(qh.copy(e.center).add(hM)),this.expandByPoint(qh.copy(e.center).sub(hM))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const la=new H,pM=new H,dv=new H,sl=new H,mM=new H,hv=new H,gM=new H;class eh{constructor(e=new H,n=new H(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,la)),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=la.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(la.copy(this.origin).addScaledVector(this.direction,n),la.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){pM.copy(e).add(n).multiplyScalar(.5),dv.copy(n).sub(e).normalize(),sl.copy(this.origin).sub(pM);const o=e.distanceTo(n)*.5,s=-this.direction.dot(dv),a=sl.dot(this.direction),l=-sl.dot(dv),c=sl.lengthSq(),u=Math.abs(1-s*s);let f,h,m,v;if(u>0)if(f=s*l-a,h=s*a-l,v=o*u,f>=0)if(h>=-v)if(h<=v){const x=1/u;f*=x,h*=x,m=f*(f+s*h+2*a)+h*(s*f+h+2*l)+c}else h=o,f=Math.max(0,-(s*h+a)),m=-f*f+h*(h+2*l)+c;else h=-o,f=Math.max(0,-(s*h+a)),m=-f*f+h*(h+2*l)+c;else h<=-v?(f=Math.max(0,-(-s*o+a)),h=f>0?-o:Math.min(Math.max(-o,-l),o),m=-f*f+h*(h+2*l)+c):h<=v?(f=0,h=Math.min(Math.max(-o,-l),o),m=h*(h+2*l)+c):(f=Math.max(0,-(s*o+a)),h=f>0?o:Math.min(Math.max(-o,-l),o),m=-f*f+h*(h+2*l)+c);else h=s>0?-o:o,f=Math.max(0,-(s*h+a)),m=-f*f+h*(h+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(pM).addScaledVector(dv,h),m}intersectSphere(e,n){la.subVectors(e.center,this.origin);const r=la.dot(this.direction),i=la.dot(la)-r*r,o=e.radius*e.radius;if(i>o)return null;const s=Math.sqrt(o-i),a=r-s,l=r+s;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const 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,o,s,a,l;const c=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return c>=0?(r=(e.min.x-h.x)*c,i=(e.max.x-h.x)*c):(r=(e.max.x-h.x)*c,i=(e.min.x-h.x)*c),u>=0?(o=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(o=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),r>s||o>i||((o>r||isNaN(r))&&(r=o),(s=0?(a=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(a=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),r>l||a>i)||((a>r||r!==r)&&(r=a),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,la)!==null}intersectTriangle(e,n,r,i,o){mM.subVectors(n,e),hv.subVectors(r,e),gM.crossVectors(mM,hv);let s=this.direction.dot(gM),a;if(s>0){if(i)return null;a=1}else if(s<0)a=-1,s=-s;else return null;sl.subVectors(this.origin,e);const l=a*this.direction.dot(hv.crossVectors(sl,hv));if(l<0)return null;const c=a*this.direction.dot(mM.cross(sl));if(c<0||l+c>s)return null;const u=-a*sl.dot(gM);return u<0?null:this.at(u/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Mt{constructor(e,n,r,i,o,s,a,l,c,u,f,h,m,v,x,y){Mt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,s,a,l,c,u,f,h,m,v,x,y)}set(e,n,r,i,o,s,a,l,c,u,f,h,m,v,x,y){const g=this.elements;return g[0]=e,g[4]=n,g[8]=r,g[12]=i,g[1]=o,g[5]=s,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=f,g[14]=h,g[3]=m,g[7]=v,g[11]=x,g[15]=y,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Mt().fromArray(this.elements)}copy(e){const 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 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){const n=this.elements,r=e.elements,i=1/sf.setFromMatrixColumn(e,0).length(),o=1/sf.setFromMatrixColumn(e,1).length(),s=1/sf.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]*o,n[5]=r[5]*o,n[6]=r[6]*o,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,o=e.z,s=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),f=Math.sin(o);if(e.order==="XYZ"){const h=s*u,m=s*f,v=a*u,x=a*f;n[0]=l*u,n[4]=-l*f,n[8]=c,n[1]=m+v*c,n[5]=h-x*c,n[9]=-a*l,n[2]=x-h*c,n[6]=v+m*c,n[10]=s*l}else if(e.order==="YXZ"){const h=l*u,m=l*f,v=c*u,x=c*f;n[0]=h+x*a,n[4]=v*a-m,n[8]=s*c,n[1]=s*f,n[5]=s*u,n[9]=-a,n[2]=m*a-v,n[6]=x+h*a,n[10]=s*l}else if(e.order==="ZXY"){const h=l*u,m=l*f,v=c*u,x=c*f;n[0]=h-x*a,n[4]=-s*f,n[8]=v+m*a,n[1]=m+v*a,n[5]=s*u,n[9]=x-h*a,n[2]=-s*c,n[6]=a,n[10]=s*l}else if(e.order==="ZYX"){const h=s*u,m=s*f,v=a*u,x=a*f;n[0]=l*u,n[4]=v*c-m,n[8]=h*c+x,n[1]=l*f,n[5]=x*c+h,n[9]=m*c-v,n[2]=-c,n[6]=a*l,n[10]=s*l}else if(e.order==="YZX"){const h=s*l,m=s*c,v=a*l,x=a*c;n[0]=l*u,n[4]=x-h*f,n[8]=v*f+m,n[1]=f,n[5]=s*u,n[9]=-a*u,n[2]=-c*u,n[6]=m*f+v,n[10]=h-x*f}else if(e.order==="XZY"){const h=s*l,m=s*c,v=a*l,x=a*c;n[0]=l*u,n[4]=-f,n[8]=c*u,n[1]=h*f+x,n[5]=s*u,n[9]=m*f-v,n[2]=v*f-m,n[6]=a*u,n[10]=x*f+h}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(Voe,e,$oe)}lookAt(e,n,r){const i=this.elements;return Xi.subVectors(e,n),Xi.lengthSq()===0&&(Xi.z=1),Xi.normalize(),al.crossVectors(r,Xi),al.lengthSq()===0&&(Math.abs(r.z)===1?Xi.x+=1e-4:Xi.z+=1e-4,Xi.normalize(),al.crossVectors(r,Xi)),al.normalize(),pv.crossVectors(Xi,al),i[0]=al.x,i[4]=pv.x,i[8]=Xi.x,i[1]=al.y,i[5]=pv.y,i[9]=Xi.y,i[2]=al.z,i[6]=pv.z,i[10]=Xi.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,o=this.elements,s=r[0],a=r[4],l=r[8],c=r[12],u=r[1],f=r[5],h=r[9],m=r[13],v=r[2],x=r[6],y=r[10],g=r[14],b=r[3],_=r[7],S=r[11],A=r[15],P=i[0],R=i[4],L=i[8],k=i[12],C=i[1],N=i[5],z=i[9],D=i[13],B=i[2],G=i[6],X=i[10],Z=i[14],F=i[3],q=i[7],K=i[11],Q=i[15];return o[0]=s*P+a*C+l*B+c*F,o[4]=s*R+a*N+l*G+c*q,o[8]=s*L+a*z+l*X+c*K,o[12]=s*k+a*D+l*Z+c*Q,o[1]=u*P+f*C+h*B+m*F,o[5]=u*R+f*N+h*G+m*q,o[9]=u*L+f*z+h*X+m*K,o[13]=u*k+f*D+h*Z+m*Q,o[2]=v*P+x*C+y*B+g*F,o[6]=v*R+x*N+y*G+g*q,o[10]=v*L+x*z+y*X+g*K,o[14]=v*k+x*D+y*Z+g*Q,o[3]=b*P+_*C+S*B+A*F,o[7]=b*R+_*N+S*G+A*q,o[11]=b*L+_*z+S*X+A*K,o[15]=b*k+_*D+S*Z+A*Q,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],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],m=e[14],v=e[3],x=e[7],y=e[11],g=e[15];return v*(+o*l*f-i*c*f-o*a*h+r*c*h+i*a*m-r*l*m)+x*(+n*l*m-n*c*h+o*s*h-i*s*m+i*c*u-o*l*u)+y*(+n*c*f-n*a*m-o*s*f+r*s*m+o*a*u-r*c*u)+g*(-i*a*u-n*l*f+n*a*h+i*s*f-r*s*h+r*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,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],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],m=e[11],v=e[12],x=e[13],y=e[14],g=e[15],b=f*y*c-x*h*c+x*l*m-a*y*m-f*l*g+a*h*g,_=v*h*c-u*y*c-v*l*m+s*y*m+u*l*g-s*h*g,S=u*x*c-v*f*c+v*a*m-s*x*m-u*a*g+s*f*g,A=v*f*l-u*x*l-v*a*h+s*x*h+u*a*y-s*f*y,P=n*b+r*_+i*S+o*A;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const R=1/P;return e[0]=b*R,e[1]=(x*h*o-f*y*o-x*i*m+r*y*m+f*i*g-r*h*g)*R,e[2]=(a*y*o-x*l*o+x*i*c-r*y*c-a*i*g+r*l*g)*R,e[3]=(f*l*o-a*h*o-f*i*c+r*h*c+a*i*m-r*l*m)*R,e[4]=_*R,e[5]=(u*y*o-v*h*o+v*i*m-n*y*m-u*i*g+n*h*g)*R,e[6]=(v*l*o-s*y*o-v*i*c+n*y*c+s*i*g-n*l*g)*R,e[7]=(s*h*o-u*l*o+u*i*c-n*h*c-s*i*m+n*l*m)*R,e[8]=S*R,e[9]=(v*f*o-u*x*o-v*r*m+n*x*m+u*r*g-n*f*g)*R,e[10]=(s*x*o-v*a*o+v*r*c-n*x*c-s*r*g+n*a*g)*R,e[11]=(u*a*o-s*f*o-u*r*c+n*f*c+s*r*m-n*a*m)*R,e[12]=A*R,e[13]=(u*x*i-v*f*i+v*r*h-n*x*h-u*r*y+n*f*y)*R,e[14]=(v*a*i-s*x*i-v*r*l+n*x*l+s*r*y-n*a*y)*R,e[15]=(s*f*i-u*a*i+u*r*l-n*f*l-s*r*h+n*a*h)*R,this}scale(e){const n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,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),o=1-r,s=e.x,a=e.y,l=e.z,c=o*s,u=o*a;return this.set(c*s+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*s,0,c*l-i*a,u*l+i*s,o*l*l+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,o,s){return this.set(1,r,o,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,o=n._x,s=n._y,a=n._z,l=n._w,c=o+o,u=s+s,f=a+a,h=o*c,m=o*u,v=o*f,x=s*u,y=s*f,g=a*f,b=l*c,_=l*u,S=l*f,A=r.x,P=r.y,R=r.z;return i[0]=(1-(x+g))*A,i[1]=(m+S)*A,i[2]=(v-_)*A,i[3]=0,i[4]=(m-S)*P,i[5]=(1-(h+g))*P,i[6]=(y+b)*P,i[7]=0,i[8]=(v+_)*R,i[9]=(y-b)*R,i[10]=(1-(h+x))*R,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;let o=sf.set(i[0],i[1],i[2]).length();const s=sf.set(i[4],i[5],i[6]).length(),a=sf.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],Go.copy(this);const c=1/o,u=1/s,f=1/a;return Go.elements[0]*=c,Go.elements[1]*=c,Go.elements[2]*=c,Go.elements[4]*=u,Go.elements[5]*=u,Go.elements[6]*=u,Go.elements[8]*=f,Go.elements[9]*=f,Go.elements[10]*=f,n.setFromRotationMatrix(Go),r.x=o,r.y=s,r.z=a,this}makePerspective(e,n,r,i,o,s,a=ks){const l=this.elements,c=2*o/(n-e),u=2*o/(r-i),f=(n+e)/(n-e),h=(r+i)/(r-i);let m,v;if(a===ks)m=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Im)m=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=v,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,o,s,a=ks){const l=this.elements,c=1/(n-e),u=1/(r-i),f=1/(s-o),h=(n+e)*c,m=(r+i)*u;let v,x;if(a===ks)v=(s+o)*f,x=-2*f;else if(a===Im)v=o*f,x=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=x,l[14]=-v,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 sf=new H,Go=new Mt,Voe=new H(0,0,0),$oe=new H(1,1,1),al=new H,pv=new H,Xi=new H,X4=new Mt,q4=new zi;class so{constructor(e=0,n=0,r=0,i=so.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,o=i[0],s=i[4],a=i[8],l=i[1],c=i[5],u=i[9],f=i[2],h=i[6],m=i[10];switch(n){case"XYZ":this._y=Math.asin(Wn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Wn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,o),this._z=0);break;case"ZXY":this._x=Math.asin(Wn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Wn(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,m),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(Wn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,o)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Wn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-u,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return X4.makeRotationFromQuaternion(e),this.setFromRotationMatrix(X4,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return q4.setFromEuler(this),this.setFromQuaternion(q4,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}}so.DEFAULT_ORDER="XYZ";class qc{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),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.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function o(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.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=o(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),m.length>0&&(r.animations=m),v.length>0&&(r.nodes=v)}return r.object=i,r;function s(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,n,r,i,o){Xo.subVectors(i,n),ua.subVectors(r,n),yM.subVectors(e,n);const s=Xo.dot(Xo),a=Xo.dot(ua),l=Xo.dot(yM),c=ua.dot(ua),u=ua.dot(yM),f=s*c-a*a;if(f===0)return o.set(0,0,0),null;const h=1/f,m=(c*l-a*u)*h,v=(s*u-a*l)*h;return o.set(1-m-v,v,m)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,fa)===null?!1:fa.x>=0&&fa.y>=0&&fa.x+fa.y<=1}static getInterpolation(e,n,r,i,o,s,a,l){return this.getBarycoord(e,n,r,i,fa)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,fa.x),l.addScaledVector(s,fa.y),l.addScaledVector(a,fa.z),l)}static getInterpolatedAttribute(e,n,r,i,o,s){return wM.setScalar(0),SM.setScalar(0),MM.setScalar(0),wM.fromBufferAttribute(e,n),SM.fromBufferAttribute(e,r),MM.fromBufferAttribute(e,i),s.setScalar(0),s.addScaledVector(wM,o.x),s.addScaledVector(SM,o.y),s.addScaledVector(MM,o.z),s}static isFrontFacing(e,n,r,i){return Xo.subVectors(r,n),ua.subVectors(e,n),Xo.cross(ua).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 Xo.subVectors(this.c,this.b),ua.subVectors(this.a,this.b),Xo.cross(ua).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ai.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return Ai.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,r,i,o){return Ai.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}containsPoint(e){return Ai.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ai.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,o=this.c;let s,a;cf.subVectors(i,r),uf.subVectors(o,r),xM.subVectors(e,r);const l=cf.dot(xM),c=uf.dot(xM);if(l<=0&&c<=0)return n.copy(r);bM.subVectors(e,i);const u=cf.dot(bM),f=uf.dot(bM);if(u>=0&&f<=u)return n.copy(i);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return s=l/(l-u),n.copy(r).addScaledVector(cf,s);_M.subVectors(e,o);const m=cf.dot(_M),v=uf.dot(_M);if(v>=0&&m<=v)return n.copy(o);const x=m*c-l*v;if(x<=0&&c>=0&&v<=0)return a=c/(c-v),n.copy(r).addScaledVector(uf,a);const y=u*v-m*f;if(y<=0&&f-u>=0&&m-v>=0)return ek.subVectors(o,i),a=(f-u)/(f-u+(m-v)),n.copy(i).addScaledVector(ek,a);const g=1/(y+x+h);return s=x*g,a=h*g,n.copy(r).addScaledVector(cf,s).addScaledVector(uf,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const ZU={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},ll={h:0,s:0,l:0},gv={h:0,s:0,l:0};function EM(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}let at=class{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=Mi){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Jt.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=Jt.workingColorSpace){return this.r=e,this.g=n,this.b=r,Jt.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=Jt.workingColorSpace){if(e=qR(e,1),n=Wn(n,0,1),r=Wn(r,0,1),n===0)this.r=this.g=this.b=r;else{const o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=EM(s,o,e+1/3),this.g=EM(s,o,e),this.b=EM(s,o,e-1/3)}return Jt.toWorkingColorSpace(this,i),this}setStyle(e,n=Mi){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,n);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,n);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=i[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(o,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Mi){const r=ZU[e.toLowerCase()];return r!==void 0?this.setHex(r,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Ta(e.r),this.g=Ta(e.g),this.b=Ta(e.b),this}copyLinearToSRGB(e){return this.r=cd(e.r),this.g=cd(e.g),this.b=cd(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Mi){return Jt.fromWorkingColorSpace(Wr.copy(this),e),Math.round(Wn(Wr.r*255,0,255))*65536+Math.round(Wn(Wr.g*255,0,255))*256+Math.round(Wn(Wr.b*255,0,255))}getHexString(e=Mi){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Jt.workingColorSpace){Jt.fromWorkingColorSpace(Wr.copy(this),n);const r=Wr.r,i=Wr.g,o=Wr.b,s=Math.max(r,i,o),a=Math.min(r,i,o);let l,c;const u=(a+s)/2;if(a===s)l=0,c=0;else{const f=s-a;switch(c=u<=.5?f/(s+a):f/(2-s-a),s){case r:l=(i-o)/f+(i0!=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){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.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.6,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.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!==Hc&&(r.blending=this.blending),this.side!==Oa&&(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!==D1&&(r.blendSrc=this.blendSrc),this.blendDst!==F1&&(r.blendDst=this.blendDst),this.blendEquation!==gl&&(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!==uu&&(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!==sC&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Sc&&(r.stencilFail=this.stencilFail),this.stencilZFail!==Sc&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==Sc&&(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.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(o){const s=[];for(const a in o){const l=o[a];delete l.metadata,s.push(l)}return s}if(n){const o=i(e.textures),s=i(e.images);o.length>0&&(r.textures=o),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 o=0;o!==i;++o)r[o]=n[o].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.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class Hl extends Or{static get type(){return"MeshBasicMaterial"}constructor(e){super(),this.isMeshBasicMaterial=!0,this.color=new at(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 so,this.combine=fg,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 ya=Yoe();function Yoe(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(r[l]=0,r[l|256]=32768,i[l]=24,i[l|256]=24):c<-14?(r[l]=1024>>-c-14,r[l|256]=1024>>-c-14|32768,i[l]=-c-1,i[l|256]=-c-1):c<=15?(r[l]=c+15<<10,r[l|256]=c+15<<10|32768,i[l]=13,i[l|256]=13):c<128?(r[l]=31744,r[l|256]=64512,i[l]=24,i[l|256]=24):(r[l]=31744,r[l|256]=64512,i[l]=13,i[l|256]=13)}const o=new Uint32Array(2048),s=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;!(c&8388608);)c<<=1,u-=8388608;c&=-8388609,u+=947912704,o[l]=c|u}for(let l=1024;l<2048;++l)o[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)s[l]=l<<23;s[31]=1199570944,s[32]=2147483648;for(let l=33;l<63;++l)s[l]=2147483648+(l-32<<23);s[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:o,exponentTable:s,offsetTable:a}}function Si(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Wn(t,-65504,65504),ya.floatView[0]=t;const e=ya.uint32View[0],n=e>>23&511;return ya.baseTable[n]+((e&8388607)>>ya.shiftTable[n])}function yp(t){const e=t>>10;return ya.uint32View[0]=ya.mantissaTable[ya.offsetTable[e]+(t&1023)]+ya.exponentTable[e],ya.floatView[0]}const Koe={toHalfFloat:Si,fromHalfFloat:yp},er=new H,vv=new Ne;class pn{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=Pm,this.updateRanges=[],this.gpuType=ci,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,o=this.itemSize;in.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),n.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new kr);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new H(-1/0,-1/0,-1/0),new H(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let r=0,i=n.length;r0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let o=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(i[l]=u,o=!0)}o&&(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 a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(n))}const o=e.morphAttributes;for(const c in o){const u=[],f=o[c];for(let h=0,m=f.length;h0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o(e.far-e.near)**2))&&(tk.copy(o).invert(),lc.copy(e.ray).applyMatrix4(tk),!(r.boundingBox!==null&&lc.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,lc)))}_computeIntersections(e,n,r){let i;const o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,u=o.attributes.uv1,f=o.attributes.normal,h=o.groups,m=o.drawRange;if(a!==null)if(Array.isArray(s))for(let v=0,x=h.length;vn.far?null:{distance:c,point:Sv.clone(),object:t}}function Mv(t,e,n,r,i,o,s,a,l,c){t.getVertexPosition(a,xv),t.getVertexPosition(l,bv),t.getVertexPosition(c,_v);const u=ise(t,e,n,r,xv,bv,_v,rk);if(u){const f=new H;Ai.getBarycoord(rk,xv,bv,_v,f),i&&(u.uv=Ai.getInterpolatedAttribute(i,a,l,c,f,new Ne)),o&&(u.uv1=Ai.getInterpolatedAttribute(o,a,l,c,f,new Ne)),s&&(u.normal=Ai.getInterpolatedAttribute(s,a,l,c,f,new H),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new H,materialIndex:0};Ai.getNormal(xv,bv,_v,h.normal),u.face=h,u.barycoord=f}return u}class Tu extends Dt{constructor(e=1,n=1,r=1,i=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:s};const a=this;i=Math.floor(i),o=Math.floor(o),s=Math.floor(s);const l=[],c=[],u=[],f=[];let h=0,m=0;v("z","y","x",-1,-1,r,n,e,s,o,0),v("z","y","x",1,-1,r,n,-e,s,o,1),v("x","z","y",1,1,e,r,n,i,s,2),v("x","z","y",1,-1,e,r,-n,i,s,3),v("x","y","z",1,-1,e,n,r,i,o,4),v("x","y","z",-1,-1,e,n,-r,i,o,5),this.setIndex(l),this.setAttribute("position",new mt(c,3)),this.setAttribute("normal",new mt(u,3)),this.setAttribute("uv",new mt(f,2));function v(x,y,g,b,_,S,A,P,R,L,k){const C=S/R,N=A/L,z=S/2,D=A/2,B=P/2,G=R+1,X=L+1;let Z=0,F=0;const q=new H;for(let K=0;K0?1:-1,u.push(q.x,q.y,q.z),f.push(de/R),f.push(1-K/L),Z+=1}}for(let K=0;K0&&(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 gg extends rn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Mt,this.projectionMatrix=new Mt,this.projectionMatrixInverse=new Mt,this.coordinateSystem=Ns}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const cl=new H,ik=new Ne,ok=new Ne;class br extends gg{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=Ad*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Xc*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Ad*2*Math.atan(Math.tan(Xc*.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){cl.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(cl.x,cl.y).multiplyScalar(-e/cl.z),cl.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(cl.x,cl.y).multiplyScalar(-e/cl.z)}getViewSize(e,n){return this.getViewBounds(e,ik,ok),n.subVectors(ok,ik)}setViewOffset(e,n,r,i,o,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=o,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(Xc*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i;const s=this.view;if(this.view!==null&&this.view.enabled){const l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*i/l,n-=s.offsetY*r/c,i*=s.width/l,r*=s.height/c}const a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const df=-90,hf=1;class eB extends rn{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new br(df,hf,e,n);i.layers=this.layers,this.add(i);const o=new br(df,hf,e,n);o.layers=this.layers,this.add(o);const s=new br(df,hf,e,n);s.layers=this.layers,this.add(s);const a=new br(df,hf,e,n);a.layers=this.layers,this.add(a);const l=new br(df,hf,e,n);l.layers=this.layers,this.add(l);const c=new br(df,hf,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,o,s,a,l]=n;for(const c of n)this.remove(c);if(e===Ns)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===Im)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[o,s,a,l,c,u]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const x=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,o),e.setRenderTarget(r,1,i),e.render(n,s),e.setRenderTarget(r,2,i),e.render(n,a),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,c),r.texture.generateMipmaps=x,e.setRenderTarget(r,5,i),e.render(n,u),e.setRenderTarget(f,h,m),e.xr.enabled=v,r.texture.needsPMREMUpdate=!0}}class vg extends On{constructor(e,n,r,i,o,s,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:Oa,super(e,n,r,i,o,s,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class tB extends ss{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 vg(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:cr}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:` +}`;class as extends Or{static get type(){return"ShaderMaterial"}constructor(e){super(),this.isShaderMaterial=!0,this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=sse,this.fragmentShader=ase,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=Pd(e.uniforms),this.uniformsGroups=ose(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const 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 gg extends rn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Mt,this.projectionMatrix=new Mt,this.projectionMatrixInverse=new Mt,this.coordinateSystem=ks}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const cl=new H,ik=new Ne,ok=new Ne;class br extends gg{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=Ad*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Xc*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Ad*2*Math.atan(Math.tan(Xc*.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){cl.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(cl.x,cl.y).multiplyScalar(-e/cl.z),cl.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(cl.x,cl.y).multiplyScalar(-e/cl.z)}getViewSize(e,n){return this.getViewBounds(e,ik,ok),n.subVectors(ok,ik)}setViewOffset(e,n,r,i,o,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=o,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(Xc*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i;const s=this.view;if(this.view!==null&&this.view.enabled){const l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*i/l,n-=s.offsetY*r/c,i*=s.width/l,r*=s.height/c}const a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const df=-90,hf=1;class eB extends rn{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new br(df,hf,e,n);i.layers=this.layers,this.add(i);const o=new br(df,hf,e,n);o.layers=this.layers,this.add(o);const s=new br(df,hf,e,n);s.layers=this.layers,this.add(s);const a=new br(df,hf,e,n);a.layers=this.layers,this.add(a);const l=new br(df,hf,e,n);l.layers=this.layers,this.add(l);const c=new br(df,hf,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,o,s,a,l]=n;for(const c of n)this.remove(c);if(e===ks)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===Im)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[o,s,a,l,c,u]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const x=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,o),e.setRenderTarget(r,1,i),e.render(n,s),e.setRenderTarget(r,2,i),e.render(n,a),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,c),r.texture.generateMipmaps=x,e.setRenderTarget(r,5,i),e.render(n,u),e.setRenderTarget(f,h,m),e.xr.enabled=v,r.texture.needsPMREMUpdate=!0}}class vg extends On{constructor(e,n,r,i,o,s,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:Da,super(e,n,r,i,o,s,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class tB extends ss{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 vg(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:cr}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; @@ -223,7 +223,7 @@ Error generating stack: `+o.message+` gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},i=new Tu(5,5,5),o=new as({name:"CubemapFromEquirect",uniforms:Pd(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:di,blending:Ea});o.uniforms.tEquirect.value=n;const s=new rr(i,o),a=n.minFilter;return n.minFilter===Is&&(n.minFilter=cr),new eB(1,10,this).update(e,s),n.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(e,n,r,i){const o=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(n,r,i);e.setRenderTarget(o)}}const CM=new H,lse=new H,cse=new Ot;class hl{constructor(e=new H(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=CM.subVectors(r,n).cross(lse.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(CM),i=this.normal.dot(r);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?null:n.copy(e.start).addScaledVector(r,o)}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||cse.getNormalMatrix(e),i=this.coplanarPoint(CM).applyMatrix4(e),o=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(o),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 cc=new Kr,Ev=new H;class yg{constructor(e=new hl,n=new hl,r=new hl,i=new hl,o=new hl,s=new hl){this.planes=[e,n,r,i,o,s]}set(e,n,r,i,o,s){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(o),a[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=Ns){const r=this.planes,i=e.elements,o=i[0],s=i[1],a=i[2],l=i[3],c=i[4],u=i[5],f=i[6],h=i[7],m=i[8],v=i[9],x=i[10],y=i[11],g=i[12],b=i[13],_=i[14],S=i[15];if(r[0].setComponents(l-o,h-c,y-m,S-g).normalize(),r[1].setComponents(l+o,h+c,y+m,S+g).normalize(),r[2].setComponents(l+s,h+u,y+v,S+b).normalize(),r[3].setComponents(l-s,h-u,y-v,S-b).normalize(),r[4].setComponents(l-a,h-f,y-x,S-_).normalize(),n===Ns)r[5].setComponents(l+a,h+f,y+x,S+_).normalize();else if(n===Im)r[5].setComponents(a,f,x,_).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(),cc.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),cc.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(cc)}intersectsSprite(e){return cc.center.set(0,0,0),cc.radius=.7071067811865476,cc.applyMatrix4(e.matrixWorld),this.intersectsSphere(cc)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let o=0;o<6;o++)if(n[o].distanceToPoint(r)0?e.max.x:e.min.x,Ev.y=i.normal.y>0?e.max.y:e.min.y,Ev.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Ev)<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)}}function nB(){let t=null,e=!1,n=null,r=null;function i(o,s){n(o,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(o){n=o},setContext:function(o){t=o}}}function use(t){const e=new WeakMap;function n(a,l){const c=a.array,u=a.usage,f=c.byteLength,h=t.createBuffer();t.bindBuffer(l,h),t.bufferData(l,c,u),a.onUploadCallback();let m;if(c instanceof Float32Array)m=t.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?m=t.HALF_FLOAT:m=t.UNSIGNED_SHORT;else if(c instanceof Int16Array)m=t.SHORT;else if(c instanceof Uint32Array)m=t.UNSIGNED_INT;else if(c instanceof Int32Array)m=t.INT;else if(c instanceof Int8Array)m=t.BYTE;else if(c instanceof Uint8Array)m=t.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)m=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:h,type:m,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:f}}function r(a,l,c){const u=l.array,f=l.updateRanges;if(t.bindBuffer(c,a),f.length===0)t.bufferSubData(c,0,u);else{f.sort((m,v)=>m.start-v.start);let h=0;for(let m=1;m1?null:n.copy(e.start).addScaledVector(r,o)}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||cse.getNormalMatrix(e),i=this.coplanarPoint(RM).applyMatrix4(e),o=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(o),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 cc=new Zr,Ev=new H;class yg{constructor(e=new hl,n=new hl,r=new hl,i=new hl,o=new hl,s=new hl){this.planes=[e,n,r,i,o,s]}set(e,n,r,i,o,s){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(o),a[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=ks){const r=this.planes,i=e.elements,o=i[0],s=i[1],a=i[2],l=i[3],c=i[4],u=i[5],f=i[6],h=i[7],m=i[8],v=i[9],x=i[10],y=i[11],g=i[12],b=i[13],_=i[14],S=i[15];if(r[0].setComponents(l-o,h-c,y-m,S-g).normalize(),r[1].setComponents(l+o,h+c,y+m,S+g).normalize(),r[2].setComponents(l+s,h+u,y+v,S+b).normalize(),r[3].setComponents(l-s,h-u,y-v,S-b).normalize(),r[4].setComponents(l-a,h-f,y-x,S-_).normalize(),n===ks)r[5].setComponents(l+a,h+f,y+x,S+_).normalize();else if(n===Im)r[5].setComponents(a,f,x,_).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(),cc.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),cc.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(cc)}intersectsSprite(e){return cc.center.set(0,0,0),cc.radius=.7071067811865476,cc.applyMatrix4(e.matrixWorld),this.intersectsSphere(cc)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let o=0;o<6;o++)if(n[o].distanceToPoint(r)0?e.max.x:e.min.x,Ev.y=i.normal.y>0?e.max.y:e.min.y,Ev.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Ev)<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)}}function nB(){let t=null,e=!1,n=null,r=null;function i(o,s){n(o,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(o){n=o},setContext:function(o){t=o}}}function use(t){const e=new WeakMap;function n(a,l){const c=a.array,u=a.usage,f=c.byteLength,h=t.createBuffer();t.bindBuffer(l,h),t.bufferData(l,c,u),a.onUploadCallback();let m;if(c instanceof Float32Array)m=t.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?m=t.HALF_FLOAT:m=t.UNSIGNED_SHORT;else if(c instanceof Int16Array)m=t.SHORT;else if(c instanceof Uint32Array)m=t.UNSIGNED_INT;else if(c instanceof Int32Array)m=t.INT;else if(c instanceof Int8Array)m=t.BYTE;else if(c instanceof Uint8Array)m=t.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)m=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:h,type:m,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:f}}function r(a,l,c){const u=l.array,f=l.updateRanges;if(t.bindBuffer(c,a),f.length===0)t.bufferSubData(c,0,u);else{f.sort((m,v)=>m.start-v.start);let h=0;for(let m=1;m #include #include -}`,jt={alphahash_fragment:fse,alphahash_pars_fragment:dse,alphamap_fragment:hse,alphamap_pars_fragment:pse,alphatest_fragment:mse,alphatest_pars_fragment:gse,aomap_fragment:vse,aomap_pars_fragment:yse,batching_pars_vertex:xse,batching_vertex:bse,begin_vertex:_se,beginnormal_vertex:wse,bsdfs:Sse,iridescence_fragment:Mse,bumpmap_pars_fragment:Ese,clipping_planes_fragment:Cse,clipping_planes_pars_fragment:Tse,clipping_planes_pars_vertex:Rse,clipping_planes_vertex:Ase,color_fragment:Pse,color_pars_fragment:Ise,color_pars_vertex:Nse,color_vertex:kse,common:Lse,cube_uv_reflection_fragment:Ose,defaultnormal_vertex:Dse,displacementmap_pars_vertex:Fse,displacementmap_vertex:zse,emissivemap_fragment:Use,emissivemap_pars_fragment:Bse,colorspace_fragment:jse,colorspace_pars_fragment:Vse,envmap_fragment:$se,envmap_common_pars_fragment:Wse,envmap_pars_fragment:Hse,envmap_pars_vertex:Gse,envmap_physical_pars_fragment:rae,envmap_vertex:Xse,fog_vertex:qse,fog_pars_vertex:Yse,fog_fragment:Kse,fog_pars_fragment:Zse,gradientmap_pars_fragment:Jse,lightmap_pars_fragment:Qse,lights_lambert_fragment:eae,lights_lambert_pars_fragment:tae,lights_pars_begin:nae,lights_toon_fragment:iae,lights_toon_pars_fragment:oae,lights_phong_fragment:sae,lights_phong_pars_fragment:aae,lights_physical_fragment:lae,lights_physical_pars_fragment:cae,lights_fragment_begin:uae,lights_fragment_maps:fae,lights_fragment_end:dae,logdepthbuf_fragment:hae,logdepthbuf_pars_fragment:pae,logdepthbuf_pars_vertex:mae,logdepthbuf_vertex:gae,map_fragment:vae,map_pars_fragment:yae,map_particle_fragment:xae,map_particle_pars_fragment:bae,metalnessmap_fragment:_ae,metalnessmap_pars_fragment:wae,morphinstance_vertex:Sae,morphcolor_vertex:Mae,morphnormal_vertex:Eae,morphtarget_pars_vertex:Cae,morphtarget_vertex:Tae,normal_fragment_begin:Rae,normal_fragment_maps:Aae,normal_pars_fragment:Pae,normal_pars_vertex:Iae,normal_vertex:Nae,normalmap_pars_fragment:kae,clearcoat_normal_fragment_begin:Lae,clearcoat_normal_fragment_maps:Oae,clearcoat_pars_fragment:Dae,iridescence_pars_fragment:Fae,opaque_fragment:zae,packing:Uae,premultiplied_alpha_fragment:Bae,project_vertex:jae,dithering_fragment:Vae,dithering_pars_fragment:$ae,roughnessmap_fragment:Wae,roughnessmap_pars_fragment:Hae,shadowmap_pars_fragment:Gae,shadowmap_pars_vertex:Xae,shadowmap_vertex:qae,shadowmask_pars_fragment:Yae,skinbase_vertex:Kae,skinning_pars_vertex:Zae,skinning_vertex:Jae,skinnormal_vertex:Qae,specularmap_fragment:ele,specularmap_pars_fragment:tle,tonemapping_fragment:nle,tonemapping_pars_fragment:rle,transmission_fragment:ile,transmission_pars_fragment:ole,uv_pars_fragment:sle,uv_pars_vertex:ale,uv_vertex:lle,worldpos_vertex:cle,background_vert:ule,background_frag:fle,backgroundCube_vert:dle,backgroundCube_frag:hle,cube_vert:ple,cube_frag:mle,depth_vert:gle,depth_frag:vle,distanceRGBA_vert:yle,distanceRGBA_frag:xle,equirect_vert:ble,equirect_frag:_le,linedashed_vert:wle,linedashed_frag:Sle,meshbasic_vert:Mle,meshbasic_frag:Ele,meshlambert_vert:Cle,meshlambert_frag:Tle,meshmatcap_vert:Rle,meshmatcap_frag:Ale,meshnormal_vert:Ple,meshnormal_frag:Ile,meshphong_vert:Nle,meshphong_frag:kle,meshphysical_vert:Lle,meshphysical_frag:Ole,meshtoon_vert:Dle,meshtoon_frag:Fle,points_vert:zle,points_frag:Ule,shadow_vert:Ble,shadow_frag:jle,sprite_vert:Vle,sprite_frag:$le},Qe={common:{diffuse:{value:new at(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ot},alphaMap:{value:null},alphaMapTransform:{value:new Ot},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ot}},envmap:{envMap:{value:null},envMapRotation:{value:new Ot},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ot}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ot}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ot},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ot},normalScale:{value:new Ne(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ot},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ot}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ot}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ot}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new at(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new at(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ot},alphaTest:{value:0},uvTransform:{value:new Ot}},sprite:{diffuse:{value:new at(16777215)},opacity:{value:1},center:{value:new Ne(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ot},alphaMap:{value:null},alphaMapTransform:{value:new Ot},alphaTest:{value:0}}},Qo={basic:{uniforms:ri([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:jt.meshbasic_vert,fragmentShader:jt.meshbasic_frag},lambert:{uniforms:ri([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new at(0)}}]),vertexShader:jt.meshlambert_vert,fragmentShader:jt.meshlambert_frag},phong:{uniforms:ri([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new at(0)},specular:{value:new at(1118481)},shininess:{value:30}}]),vertexShader:jt.meshphong_vert,fragmentShader:jt.meshphong_frag},standard:{uniforms:ri([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new at(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:jt.meshphysical_vert,fragmentShader:jt.meshphysical_frag},toon:{uniforms:ri([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new at(0)}}]),vertexShader:jt.meshtoon_vert,fragmentShader:jt.meshtoon_frag},matcap:{uniforms:ri([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:jt.meshmatcap_vert,fragmentShader:jt.meshmatcap_frag},points:{uniforms:ri([Qe.points,Qe.fog]),vertexShader:jt.points_vert,fragmentShader:jt.points_frag},dashed:{uniforms:ri([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:jt.linedashed_vert,fragmentShader:jt.linedashed_frag},depth:{uniforms:ri([Qe.common,Qe.displacementmap]),vertexShader:jt.depth_vert,fragmentShader:jt.depth_frag},normal:{uniforms:ri([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:jt.meshnormal_vert,fragmentShader:jt.meshnormal_frag},sprite:{uniforms:ri([Qe.sprite,Qe.fog]),vertexShader:jt.sprite_vert,fragmentShader:jt.sprite_frag},background:{uniforms:{uvTransform:{value:new Ot},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:jt.background_vert,fragmentShader:jt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ot}},vertexShader:jt.backgroundCube_vert,fragmentShader:jt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:jt.cube_vert,fragmentShader:jt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:jt.equirect_vert,fragmentShader:jt.equirect_frag},distanceRGBA:{uniforms:ri([Qe.common,Qe.displacementmap,{referencePosition:{value:new H},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:jt.distanceRGBA_vert,fragmentShader:jt.distanceRGBA_frag},shadow:{uniforms:ri([Qe.lights,Qe.fog,{color:{value:new at(0)},opacity:{value:1}}]),vertexShader:jt.shadow_vert,fragmentShader:jt.shadow_frag}};Qo.physical={uniforms:ri([Qo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ot},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ot},clearcoatNormalScale:{value:new Ne(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ot},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ot},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ot},sheen:{value:0},sheenColor:{value:new at(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ot},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ot},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ot},transmissionSamplerSize:{value:new Ne},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ot},attenuationDistance:{value:0},attenuationColor:{value:new at(0)},specularColor:{value:new at(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ot},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ot},anisotropyVector:{value:new Ne},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ot}}]),vertexShader:jt.meshphysical_vert,fragmentShader:jt.meshphysical_frag};const Cv={r:0,b:0,g:0},uc=new so,Wle=new Mt;function Hle(t,e,n,r,i,o,s){const a=new at(0);let l=o===!0?0:1,c,u,f=null,h=0,m=null;function v(b){let _=b.isScene===!0?b.background:null;return _&&_.isTexture&&(_=(b.backgroundBlurriness>0?n:e).get(_)),_}function x(b){let _=!1;const S=v(b);S===null?g(a,l):S&&S.isColor&&(g(S,1),_=!0);const A=t.xr.getEnvironmentBlendMode();A==="additive"?r.buffers.color.setClear(0,0,0,1,s):A==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,s),(t.autoClear||_)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function y(b,_){const S=v(_);S&&(S.isCubeTexture||S.mapping===Qd)?(u===void 0&&(u=new rr(new Tu(1,1,1),new as({name:"BackgroundCubeMaterial",uniforms:Pd(Qo.backgroundCube.uniforms),vertexShader:Qo.backgroundCube.vertexShader,fragmentShader:Qo.backgroundCube.fragmentShader,side:di,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(A,P,R){this.matrixWorld.copyPosition(R.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),uc.copy(_.backgroundRotation),uc.x*=-1,uc.y*=-1,uc.z*=-1,S.isCubeTexture&&S.isRenderTargetTexture===!1&&(uc.y*=-1,uc.z*=-1),u.material.uniforms.envMap.value=S,u.material.uniforms.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=_.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(Wle.makeRotationFromEuler(uc)),u.material.toneMapped=Jt.getTransfer(S.colorSpace)!==dn,(f!==S||h!==S.version||m!==t.toneMapping)&&(u.material.needsUpdate=!0,f=S,h=S.version,m=t.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null)):S&&S.isTexture&&(c===void 0&&(c=new rr(new th(2,2),new as({name:"BackgroundMaterial",uniforms:Pd(Qo.background.uniforms),vertexShader:Qo.background.vertexShader,fragmentShader:Qo.background.fragmentShader,side:La,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=S,c.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,c.material.toneMapped=Jt.getTransfer(S.colorSpace)!==dn,S.matrixAutoUpdate===!0&&S.updateMatrix(),c.material.uniforms.uvTransform.value.copy(S.matrix),(f!==S||h!==S.version||m!==t.toneMapping)&&(c.material.needsUpdate=!0,f=S,h=S.version,m=t.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function g(b,_){b.getRGB(Cv,JU(t)),r.buffers.color.setClear(Cv.r,Cv.g,Cv.b,_,s)}return{getClearColor:function(){return a},setClearColor:function(b,_=1){a.set(b),l=_,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,g(a,l)},render:x,addToRenderList:y}}function Gle(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),r={},i=h(null);let o=i,s=!1;function a(C,N,z,D,B){let G=!1;const X=f(D,z,N);o!==X&&(o=X,c(o.object)),G=m(C,D,z,B),G&&v(C,D,z,B),B!==null&&e.update(B,t.ELEMENT_ARRAY_BUFFER),(G||s)&&(s=!1,S(C,N,z,D),B!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(B).buffer))}function l(){return t.createVertexArray()}function c(C){return t.bindVertexArray(C)}function u(C){return t.deleteVertexArray(C)}function f(C,N,z){const D=z.wireframe===!0;let B=r[C.id];B===void 0&&(B={},r[C.id]=B);let G=B[N.id];G===void 0&&(G={},B[N.id]=G);let X=G[D];return X===void 0&&(X=h(l()),G[D]=X),X}function h(C){const N=[],z=[],D=[];for(let B=0;B=0){const K=B[F];let Q=G[F];if(Q===void 0&&(F==="instanceMatrix"&&C.instanceMatrix&&(Q=C.instanceMatrix),F==="instanceColor"&&C.instanceColor&&(Q=C.instanceColor)),K===void 0||K.attribute!==Q||Q&&K.data!==Q.data)return!0;X++}return o.attributesNum!==X||o.index!==D}function v(C,N,z,D){const B={},G=N.attributes;let X=0;const Z=z.getAttributes();for(const F in Z)if(Z[F].location>=0){let K=G[F];K===void 0&&(F==="instanceMatrix"&&C.instanceMatrix&&(K=C.instanceMatrix),F==="instanceColor"&&C.instanceColor&&(K=C.instanceColor));const Q={};Q.attribute=K,K&&K.data&&(Q.data=K.data),B[F]=Q,X++}o.attributes=B,o.attributesNum=X,o.index=D}function x(){const C=o.newAttributes;for(let N=0,z=C.length;N=0){let q=B[Z];if(q===void 0&&(Z==="instanceMatrix"&&C.instanceMatrix&&(q=C.instanceMatrix),Z==="instanceColor"&&C.instanceColor&&(q=C.instanceColor)),q!==void 0){const K=q.normalized,Q=q.itemSize,de=e.get(q);if(de===void 0)continue;const fe=de.buffer,J=de.type,ce=de.bytesPerElement,_e=J===t.INT||J===t.UNSIGNED_INT||q.gpuType===r_;if(q.isInterleavedBufferAttribute){const be=q.data,Xe=be.stride,$e=q.offset;if(be.isInstancedInterleavedBuffer){for(let tt=0;tt0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";R="mediump"}return R==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=n.precision!==void 0?n.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const f=n.logarithmicDepthBuffer===!0,h=n.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),m=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),v=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),x=t.getParameter(t.MAX_TEXTURE_SIZE),y=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),g=t.getParameter(t.MAX_VERTEX_ATTRIBS),b=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),_=t.getParameter(t.MAX_VARYING_VECTORS),S=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),A=v>0,P=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:o,getMaxPrecision:l,textureFormatReadable:s,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:m,maxVertexTextures:v,maxTextureSize:x,maxCubemapSize:y,maxAttributes:g,maxVertexUniforms:b,maxVaryings:_,maxFragmentUniforms:S,vertexTextures:A,maxSamples:P}}function Yle(t){const e=this;let n=null,r=0,i=!1,o=!1;const s=new hl,a=new Ot,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const m=f.length!==0||h||r!==0||i;return i=h,r=f.length,m},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(f,h){n=u(f,h,0)},this.setState=function(f,h,m){const v=f.clippingPlanes,x=f.clipIntersection,y=f.clipShadows,g=t.get(f);if(!i||v===null||v.length===0||o&&!y)o?u(null):c();else{const b=o?0:r,_=b*4;let S=g.clippingState||null;l.value=S,S=u(v,h,_,m);for(let A=0;A!==_;++A)S[A]=n[A];g.clippingState=S,this.numIntersection=x?this.numPlanes:0,this.numPlanes+=b}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(f,h,m,v){const x=f!==null?f.length:0;let y=null;if(x!==0){if(y=l.value,v!==!0||y===null){const g=m+x*4,b=h.matrixWorldInverse;a.getNormalMatrix(b),(y===null||y.length0){const c=new tB(l.height);return c.fromEquirectangularTexture(t,s),e.set(s,c),s.addEventListener("dispose",i),n(c.texture,s.mapping)}else return null}}return s}function i(s){const a=s.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function o(){e=new WeakMap}return{get:r,dispose:o}}class xg extends gg{constructor(e=-1,n=1,r=1,i=-1,o=.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=o,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,o,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=o,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 o=r-e,s=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const Xf=4,sk=[.125,.215,.35,.446,.526,.582],Tc=20,TM=new xg,ak=new at;let RM=null,AM=0,PM=0,IM=!1;const Mc=(1+Math.sqrt(5))/2,pf=1/Mc,lk=[new H(-Mc,pf,0),new H(Mc,pf,0),new H(-pf,0,Mc),new H(pf,0,Mc),new H(0,Mc,-pf),new H(0,Mc,pf),new H(-1,1,-1),new H(1,1,-1),new H(-1,1,1),new H(1,1,1)];class aC{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,r=.1,i=100){RM=this._renderer.getRenderTarget(),AM=this._renderer.getActiveCubeFace(),PM=this._renderer.getActiveMipmapLevel(),IM=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,i,o),n>0&&this._blur(o,0,0,n),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=fk(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=uk(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?_:0,_,_),u.setRenderTarget(i),x&&u.render(v,a),u.render(e,a)}v.geometry.dispose(),v.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=y}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===Oa||e.mapping===Ll;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=fk()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=uk());const o=i?this._cubemapMaterial:this._equirectMaterial,s=new rr(this._lodPlanes[0],o),a=o.uniforms;a.envMap.value=e;const l=this._cubeSize;Tv(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(s,TM)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;const i=this._lodPlanes.length;for(let o=1;oTc&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${y} samples when the maximum is set to ${Tc}`);const g=[];let b=0;for(let R=0;R_-Xf?i-_+Xf:0),P=4*(this._cubeSize-S);Tv(n,A,P,3*S,2*S),l.setRenderTarget(n),l.render(f,TM)}}function Zle(t){const e=[],n=[],r=[];let i=t;const o=t-Xf+1+sk.length;for(let s=0;st-Xf?l=sk[s-t+Xf-1]:s===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,f=1+c,h=[u,u,f,u,f,f,u,u,f,f,u,f],m=6,v=6,x=3,y=2,g=1,b=new Float32Array(x*v*m),_=new Float32Array(y*v*m),S=new Float32Array(g*v*m);for(let P=0;P2?0:-1,k=[R,L,0,R+2/3,L,0,R+2/3,L+1,0,R,L,0,R+2/3,L+1,0,R,L+1,0];b.set(k,x*v*P),_.set(h,y*v*P);const C=[P,P,P,P,P,P];S.set(C,g*v*P)}const A=new Dt;A.setAttribute("position",new pn(b,x)),A.setAttribute("uv",new pn(_,y)),A.setAttribute("faceIndex",new pn(S,g)),e.push(A),i>Xf&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function ck(t,e,n){const r=new ss(t,e,n);return r.texture.mapping=Qd,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Tv(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function Jle(t,e,n){const r=new Float32Array(Tc),i=new H(0,1,0);return new as({name:"SphericalGaussianBlur",defines:{n:Tc,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:JR(),fragmentShader:` +}`,jt={alphahash_fragment:fse,alphahash_pars_fragment:dse,alphamap_fragment:hse,alphamap_pars_fragment:pse,alphatest_fragment:mse,alphatest_pars_fragment:gse,aomap_fragment:vse,aomap_pars_fragment:yse,batching_pars_vertex:xse,batching_vertex:bse,begin_vertex:_se,beginnormal_vertex:wse,bsdfs:Sse,iridescence_fragment:Mse,bumpmap_pars_fragment:Ese,clipping_planes_fragment:Cse,clipping_planes_pars_fragment:Tse,clipping_planes_pars_vertex:Rse,clipping_planes_vertex:Ase,color_fragment:Pse,color_pars_fragment:Ise,color_pars_vertex:Nse,color_vertex:kse,common:Lse,cube_uv_reflection_fragment:Ose,defaultnormal_vertex:Dse,displacementmap_pars_vertex:Fse,displacementmap_vertex:zse,emissivemap_fragment:Use,emissivemap_pars_fragment:Bse,colorspace_fragment:jse,colorspace_pars_fragment:Vse,envmap_fragment:$se,envmap_common_pars_fragment:Wse,envmap_pars_fragment:Hse,envmap_pars_vertex:Gse,envmap_physical_pars_fragment:rae,envmap_vertex:Xse,fog_vertex:qse,fog_pars_vertex:Yse,fog_fragment:Kse,fog_pars_fragment:Zse,gradientmap_pars_fragment:Jse,lightmap_pars_fragment:Qse,lights_lambert_fragment:eae,lights_lambert_pars_fragment:tae,lights_pars_begin:nae,lights_toon_fragment:iae,lights_toon_pars_fragment:oae,lights_phong_fragment:sae,lights_phong_pars_fragment:aae,lights_physical_fragment:lae,lights_physical_pars_fragment:cae,lights_fragment_begin:uae,lights_fragment_maps:fae,lights_fragment_end:dae,logdepthbuf_fragment:hae,logdepthbuf_pars_fragment:pae,logdepthbuf_pars_vertex:mae,logdepthbuf_vertex:gae,map_fragment:vae,map_pars_fragment:yae,map_particle_fragment:xae,map_particle_pars_fragment:bae,metalnessmap_fragment:_ae,metalnessmap_pars_fragment:wae,morphinstance_vertex:Sae,morphcolor_vertex:Mae,morphnormal_vertex:Eae,morphtarget_pars_vertex:Cae,morphtarget_vertex:Tae,normal_fragment_begin:Rae,normal_fragment_maps:Aae,normal_pars_fragment:Pae,normal_pars_vertex:Iae,normal_vertex:Nae,normalmap_pars_fragment:kae,clearcoat_normal_fragment_begin:Lae,clearcoat_normal_fragment_maps:Oae,clearcoat_pars_fragment:Dae,iridescence_pars_fragment:Fae,opaque_fragment:zae,packing:Uae,premultiplied_alpha_fragment:Bae,project_vertex:jae,dithering_fragment:Vae,dithering_pars_fragment:$ae,roughnessmap_fragment:Wae,roughnessmap_pars_fragment:Hae,shadowmap_pars_fragment:Gae,shadowmap_pars_vertex:Xae,shadowmap_vertex:qae,shadowmask_pars_fragment:Yae,skinbase_vertex:Kae,skinning_pars_vertex:Zae,skinning_vertex:Jae,skinnormal_vertex:Qae,specularmap_fragment:ele,specularmap_pars_fragment:tle,tonemapping_fragment:nle,tonemapping_pars_fragment:rle,transmission_fragment:ile,transmission_pars_fragment:ole,uv_pars_fragment:sle,uv_pars_vertex:ale,uv_vertex:lle,worldpos_vertex:cle,background_vert:ule,background_frag:fle,backgroundCube_vert:dle,backgroundCube_frag:hle,cube_vert:ple,cube_frag:mle,depth_vert:gle,depth_frag:vle,distanceRGBA_vert:yle,distanceRGBA_frag:xle,equirect_vert:ble,equirect_frag:_le,linedashed_vert:wle,linedashed_frag:Sle,meshbasic_vert:Mle,meshbasic_frag:Ele,meshlambert_vert:Cle,meshlambert_frag:Tle,meshmatcap_vert:Rle,meshmatcap_frag:Ale,meshnormal_vert:Ple,meshnormal_frag:Ile,meshphong_vert:Nle,meshphong_frag:kle,meshphysical_vert:Lle,meshphysical_frag:Ole,meshtoon_vert:Dle,meshtoon_frag:Fle,points_vert:zle,points_frag:Ule,shadow_vert:Ble,shadow_frag:jle,sprite_vert:Vle,sprite_frag:$le},Qe={common:{diffuse:{value:new at(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ot},alphaMap:{value:null},alphaMapTransform:{value:new Ot},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ot}},envmap:{envMap:{value:null},envMapRotation:{value:new Ot},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ot}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ot}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ot},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ot},normalScale:{value:new Ne(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ot},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ot}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ot}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ot}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new at(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new at(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ot},alphaTest:{value:0},uvTransform:{value:new Ot}},sprite:{diffuse:{value:new at(16777215)},opacity:{value:1},center:{value:new Ne(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ot},alphaMap:{value:null},alphaMapTransform:{value:new Ot},alphaTest:{value:0}}},Qo={basic:{uniforms:ii([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.fog]),vertexShader:jt.meshbasic_vert,fragmentShader:jt.meshbasic_frag},lambert:{uniforms:ii([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new at(0)}}]),vertexShader:jt.meshlambert_vert,fragmentShader:jt.meshlambert_frag},phong:{uniforms:ii([Qe.common,Qe.specularmap,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,Qe.lights,{emissive:{value:new at(0)},specular:{value:new at(1118481)},shininess:{value:30}}]),vertexShader:jt.meshphong_vert,fragmentShader:jt.meshphong_frag},standard:{uniforms:ii([Qe.common,Qe.envmap,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.roughnessmap,Qe.metalnessmap,Qe.fog,Qe.lights,{emissive:{value:new at(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:jt.meshphysical_vert,fragmentShader:jt.meshphysical_frag},toon:{uniforms:ii([Qe.common,Qe.aomap,Qe.lightmap,Qe.emissivemap,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.gradientmap,Qe.fog,Qe.lights,{emissive:{value:new at(0)}}]),vertexShader:jt.meshtoon_vert,fragmentShader:jt.meshtoon_frag},matcap:{uniforms:ii([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,Qe.fog,{matcap:{value:null}}]),vertexShader:jt.meshmatcap_vert,fragmentShader:jt.meshmatcap_frag},points:{uniforms:ii([Qe.points,Qe.fog]),vertexShader:jt.points_vert,fragmentShader:jt.points_frag},dashed:{uniforms:ii([Qe.common,Qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:jt.linedashed_vert,fragmentShader:jt.linedashed_frag},depth:{uniforms:ii([Qe.common,Qe.displacementmap]),vertexShader:jt.depth_vert,fragmentShader:jt.depth_frag},normal:{uniforms:ii([Qe.common,Qe.bumpmap,Qe.normalmap,Qe.displacementmap,{opacity:{value:1}}]),vertexShader:jt.meshnormal_vert,fragmentShader:jt.meshnormal_frag},sprite:{uniforms:ii([Qe.sprite,Qe.fog]),vertexShader:jt.sprite_vert,fragmentShader:jt.sprite_frag},background:{uniforms:{uvTransform:{value:new Ot},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:jt.background_vert,fragmentShader:jt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ot}},vertexShader:jt.backgroundCube_vert,fragmentShader:jt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:jt.cube_vert,fragmentShader:jt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:jt.equirect_vert,fragmentShader:jt.equirect_frag},distanceRGBA:{uniforms:ii([Qe.common,Qe.displacementmap,{referencePosition:{value:new H},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:jt.distanceRGBA_vert,fragmentShader:jt.distanceRGBA_frag},shadow:{uniforms:ii([Qe.lights,Qe.fog,{color:{value:new at(0)},opacity:{value:1}}]),vertexShader:jt.shadow_vert,fragmentShader:jt.shadow_frag}};Qo.physical={uniforms:ii([Qo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ot},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ot},clearcoatNormalScale:{value:new Ne(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ot},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ot},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ot},sheen:{value:0},sheenColor:{value:new at(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ot},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ot},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ot},transmissionSamplerSize:{value:new Ne},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ot},attenuationDistance:{value:0},attenuationColor:{value:new at(0)},specularColor:{value:new at(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ot},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ot},anisotropyVector:{value:new Ne},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ot}}]),vertexShader:jt.meshphysical_vert,fragmentShader:jt.meshphysical_frag};const Cv={r:0,b:0,g:0},uc=new so,Wle=new Mt;function Hle(t,e,n,r,i,o,s){const a=new at(0);let l=o===!0?0:1,c,u,f=null,h=0,m=null;function v(b){let _=b.isScene===!0?b.background:null;return _&&_.isTexture&&(_=(b.backgroundBlurriness>0?n:e).get(_)),_}function x(b){let _=!1;const S=v(b);S===null?g(a,l):S&&S.isColor&&(g(S,1),_=!0);const A=t.xr.getEnvironmentBlendMode();A==="additive"?r.buffers.color.setClear(0,0,0,1,s):A==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,s),(t.autoClear||_)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function y(b,_){const S=v(_);S&&(S.isCubeTexture||S.mapping===Qd)?(u===void 0&&(u=new rr(new Tu(1,1,1),new as({name:"BackgroundCubeMaterial",uniforms:Pd(Qo.backgroundCube.uniforms),vertexShader:Qo.backgroundCube.vertexShader,fragmentShader:Qo.backgroundCube.fragmentShader,side:hi,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(A,P,R){this.matrixWorld.copyPosition(R.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),uc.copy(_.backgroundRotation),uc.x*=-1,uc.y*=-1,uc.z*=-1,S.isCubeTexture&&S.isRenderTargetTexture===!1&&(uc.y*=-1,uc.z*=-1),u.material.uniforms.envMap.value=S,u.material.uniforms.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=_.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(Wle.makeRotationFromEuler(uc)),u.material.toneMapped=Jt.getTransfer(S.colorSpace)!==dn,(f!==S||h!==S.version||m!==t.toneMapping)&&(u.material.needsUpdate=!0,f=S,h=S.version,m=t.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null)):S&&S.isTexture&&(c===void 0&&(c=new rr(new th(2,2),new as({name:"BackgroundMaterial",uniforms:Pd(Qo.background.uniforms),vertexShader:Qo.background.vertexShader,fragmentShader:Qo.background.fragmentShader,side:Oa,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=S,c.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,c.material.toneMapped=Jt.getTransfer(S.colorSpace)!==dn,S.matrixAutoUpdate===!0&&S.updateMatrix(),c.material.uniforms.uvTransform.value.copy(S.matrix),(f!==S||h!==S.version||m!==t.toneMapping)&&(c.material.needsUpdate=!0,f=S,h=S.version,m=t.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function g(b,_){b.getRGB(Cv,JU(t)),r.buffers.color.setClear(Cv.r,Cv.g,Cv.b,_,s)}return{getClearColor:function(){return a},setClearColor:function(b,_=1){a.set(b),l=_,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,g(a,l)},render:x,addToRenderList:y}}function Gle(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),r={},i=h(null);let o=i,s=!1;function a(C,N,z,D,B){let G=!1;const X=f(D,z,N);o!==X&&(o=X,c(o.object)),G=m(C,D,z,B),G&&v(C,D,z,B),B!==null&&e.update(B,t.ELEMENT_ARRAY_BUFFER),(G||s)&&(s=!1,S(C,N,z,D),B!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(B).buffer))}function l(){return t.createVertexArray()}function c(C){return t.bindVertexArray(C)}function u(C){return t.deleteVertexArray(C)}function f(C,N,z){const D=z.wireframe===!0;let B=r[C.id];B===void 0&&(B={},r[C.id]=B);let G=B[N.id];G===void 0&&(G={},B[N.id]=G);let X=G[D];return X===void 0&&(X=h(l()),G[D]=X),X}function h(C){const N=[],z=[],D=[];for(let B=0;B=0){const K=B[F];let Q=G[F];if(Q===void 0&&(F==="instanceMatrix"&&C.instanceMatrix&&(Q=C.instanceMatrix),F==="instanceColor"&&C.instanceColor&&(Q=C.instanceColor)),K===void 0||K.attribute!==Q||Q&&K.data!==Q.data)return!0;X++}return o.attributesNum!==X||o.index!==D}function v(C,N,z,D){const B={},G=N.attributes;let X=0;const Z=z.getAttributes();for(const F in Z)if(Z[F].location>=0){let K=G[F];K===void 0&&(F==="instanceMatrix"&&C.instanceMatrix&&(K=C.instanceMatrix),F==="instanceColor"&&C.instanceColor&&(K=C.instanceColor));const Q={};Q.attribute=K,K&&K.data&&(Q.data=K.data),B[F]=Q,X++}o.attributes=B,o.attributesNum=X,o.index=D}function x(){const C=o.newAttributes;for(let N=0,z=C.length;N=0){let q=B[Z];if(q===void 0&&(Z==="instanceMatrix"&&C.instanceMatrix&&(q=C.instanceMatrix),Z==="instanceColor"&&C.instanceColor&&(q=C.instanceColor)),q!==void 0){const K=q.normalized,Q=q.itemSize,de=e.get(q);if(de===void 0)continue;const fe=de.buffer,J=de.type,ce=de.bytesPerElement,_e=J===t.INT||J===t.UNSIGNED_INT||q.gpuType===o_;if(q.isInterleavedBufferAttribute){const be=q.data,Xe=be.stride,$e=q.offset;if(be.isInstancedInterleavedBuffer){for(let tt=0;tt0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";R="mediump"}return R==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=n.precision!==void 0?n.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const f=n.logarithmicDepthBuffer===!0,h=n.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),m=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),v=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),x=t.getParameter(t.MAX_TEXTURE_SIZE),y=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),g=t.getParameter(t.MAX_VERTEX_ATTRIBS),b=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),_=t.getParameter(t.MAX_VARYING_VECTORS),S=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),A=v>0,P=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:o,getMaxPrecision:l,textureFormatReadable:s,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:m,maxVertexTextures:v,maxTextureSize:x,maxCubemapSize:y,maxAttributes:g,maxVertexUniforms:b,maxVaryings:_,maxFragmentUniforms:S,vertexTextures:A,maxSamples:P}}function Yle(t){const e=this;let n=null,r=0,i=!1,o=!1;const s=new hl,a=new Ot,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const m=f.length!==0||h||r!==0||i;return i=h,r=f.length,m},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(f,h){n=u(f,h,0)},this.setState=function(f,h,m){const v=f.clippingPlanes,x=f.clipIntersection,y=f.clipShadows,g=t.get(f);if(!i||v===null||v.length===0||o&&!y)o?u(null):c();else{const b=o?0:r,_=b*4;let S=g.clippingState||null;l.value=S,S=u(v,h,_,m);for(let A=0;A!==_;++A)S[A]=n[A];g.clippingState=S,this.numIntersection=x?this.numPlanes:0,this.numPlanes+=b}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(f,h,m,v){const x=f!==null?f.length:0;let y=null;if(x!==0){if(y=l.value,v!==!0||y===null){const g=m+x*4,b=h.matrixWorldInverse;a.getNormalMatrix(b),(y===null||y.length0){const c=new tB(l.height);return c.fromEquirectangularTexture(t,s),e.set(s,c),s.addEventListener("dispose",i),n(c.texture,s.mapping)}else return null}}return s}function i(s){const a=s.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function o(){e=new WeakMap}return{get:r,dispose:o}}class xg extends gg{constructor(e=-1,n=1,r=1,i=-1,o=.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=o,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,o,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=o,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 o=r-e,s=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const Xf=4,sk=[.125,.215,.35,.446,.526,.582],Tc=20,AM=new xg,ak=new at;let PM=null,IM=0,NM=0,kM=!1;const Mc=(1+Math.sqrt(5))/2,pf=1/Mc,lk=[new H(-Mc,pf,0),new H(Mc,pf,0),new H(-pf,0,Mc),new H(pf,0,Mc),new H(0,Mc,-pf),new H(0,Mc,pf),new H(-1,1,-1),new H(1,1,-1),new H(-1,1,1),new H(1,1,1)];class lC{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,r=.1,i=100){PM=this._renderer.getRenderTarget(),IM=this._renderer.getActiveCubeFace(),NM=this._renderer.getActiveMipmapLevel(),kM=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,i,o),n>0&&this._blur(o,0,0,n),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=fk(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=uk(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?_:0,_,_),u.setRenderTarget(i),x&&u.render(v,a),u.render(e,a)}v.geometry.dispose(),v.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=y}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===Da||e.mapping===Ll;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=fk()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=uk());const o=i?this._cubemapMaterial:this._equirectMaterial,s=new rr(this._lodPlanes[0],o),a=o.uniforms;a.envMap.value=e;const l=this._cubeSize;Tv(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(s,AM)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;const i=this._lodPlanes.length;for(let o=1;oTc&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${y} samples when the maximum is set to ${Tc}`);const g=[];let b=0;for(let R=0;R_-Xf?i-_+Xf:0),P=4*(this._cubeSize-S);Tv(n,A,P,3*S,2*S),l.setRenderTarget(n),l.render(f,AM)}}function Zle(t){const e=[],n=[],r=[];let i=t;const o=t-Xf+1+sk.length;for(let s=0;st-Xf?l=sk[s-t+Xf-1]:s===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,f=1+c,h=[u,u,f,u,f,f,u,u,f,f,u,f],m=6,v=6,x=3,y=2,g=1,b=new Float32Array(x*v*m),_=new Float32Array(y*v*m),S=new Float32Array(g*v*m);for(let P=0;P2?0:-1,k=[R,L,0,R+2/3,L,0,R+2/3,L+1,0,R,L,0,R+2/3,L+1,0,R,L+1,0];b.set(k,x*v*P),_.set(h,y*v*P);const C=[P,P,P,P,P,P];S.set(C,g*v*P)}const A=new Dt;A.setAttribute("position",new pn(b,x)),A.setAttribute("uv",new pn(_,y)),A.setAttribute("faceIndex",new pn(S,g)),e.push(A),i>Xf&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function ck(t,e,n){const r=new ss(t,e,n);return r.texture.mapping=Qd,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Tv(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function Jle(t,e,n){const r=new Float32Array(Tc),i=new H(0,1,0);return new as({name:"SphericalGaussianBlur",defines:{n:Tc,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:JR(),fragmentShader:` precision mediump float; precision mediump int; @@ -3814,7 +3814,7 @@ void main() { } } - `,blending:Ea,depthTest:!1,depthWrite:!1})}function uk(){return new as({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:JR(),fragmentShader:` + `,blending:Ca,depthTest:!1,depthWrite:!1})}function uk(){return new as({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:JR(),fragmentShader:` precision mediump float; precision mediump int; @@ -3833,7 +3833,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:Ea,depthTest:!1,depthWrite:!1})}function fk(){return new as({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:JR(),fragmentShader:` + `,blending:Ca,depthTest:!1,depthWrite:!1})}function fk(){return new as({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:JR(),fragmentShader:` precision mediump float; precision mediump int; @@ -3849,7 +3849,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:Ea,depthTest:!1,depthWrite:!1})}function JR(){return` + `,blending:Ca,depthTest:!1,depthWrite:!1})}function JR(){return` precision mediump float; precision mediump int; @@ -3904,7 +3904,7 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function Qle(t){let e=new WeakMap,n=null;function r(a){if(a&&a.isTexture){const l=a.mapping,c=l===Mm||l===Em,u=l===Oa||l===Ll;if(c||u){let f=e.get(a);const h=f!==void 0?f.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==h)return n===null&&(n=new aC(t)),f=c?n.fromEquirectangular(a,f):n.fromCubemap(a,f),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),f.texture;if(f!==void 0)return f.texture;{const m=a.image;return c&&m&&m.height>0||u&&m&&i(m)?(n===null&&(n=new aC(t)),f=c?n.fromEquirectangular(a):n.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",o),f.texture):null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(P=Math.ceil(A/e.maxTextureSize),A=e.maxTextureSize);const R=new Float32Array(A*P*4*f),L=new c_(R,A,P,f);L.type=li,L.needsUpdate=!0;const k=S*4;for(let N=0;N0)return t;const i=e*n;let o=hk[i];if(o===void 0&&(o=new Float32Array(i),hk[i]=o),e!==0){r.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=n,t[s].toArray(o,a)}return o}function ur(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n0||u&&m&&i(m)?(n===null&&(n=new lC(t)),f=c?n.fromEquirectangular(a):n.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",o),f.texture):null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(P=Math.ceil(A/e.maxTextureSize),A=e.maxTextureSize);const R=new Float32Array(A*P*4*f),L=new f_(R,A,P,f);L.type=ci,L.needsUpdate=!0;const k=S*4;for(let N=0;N0)return t;const i=e*n;let o=hk[i];if(o===void 0&&(o=new Float32Array(i),hk[i]=o),e!==0){r.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=n,t[s].toArray(o,a)}return o}function ur(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n":" "} ${a}: ${n[s]}`)}return r.join(` `)}const bk=new Ot;function Qce(t){Jt._getMatrix(bk,Jt.workingColorSpace,t);const e=`mat3( ${bk.elements.map(n=>n.toFixed(4))} )`;switch(Jt.getTransfer(t)){case mg:return[e,"LinearTransferOETF"];case dn:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",t),[e,"LinearTransferOETF"]}}function _k(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const s=parseInt(o[1]);return n.toUpperCase()+` @@ -3914,7 +3914,7 @@ void main() { `)}function tue(t,e){let n;switch(e){case CU:n="Linear";break;case TU:n="Reinhard";break;case RU:n="Cineon";break;case OR:n="ACESFilmic";break;case PU:n="AgX";break;case IU:n="Neutral";break;case AU:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const Rv=new H;function nue(){Jt.getLuminanceCoefficients(Rv);const t=Rv.x.toFixed(4),e=Rv.y.toFixed(4),n=Rv.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${t}, ${e}, ${n} );`," return dot( weights, rgb );","}"].join(` `)}function rue(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(xp).join(` `)}function iue(t){const e=[];for(const n in t){const r=t[n];r!==!1&&e.push("#define "+n+" "+r)}return e.join(` -`)}function oue(t,e){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function lC(t){return t.replace(sue,lue)}const aue=new Map;function lue(t,e){let n=jt[e];if(n===void 0){const r=aue.get(e);if(r!==void 0)n=jt[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return lC(n)}const cue=/#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 Mk(t){return t.replace(cue,uue)}function uue(t,e,n,r){let i="";for(let o=parseInt(e);o/gm;function cC(t){return t.replace(sue,lue)}const aue=new Map;function lue(t,e){let n=jt[e];if(n===void 0){const r=aue.get(e);if(r!==void 0)n=jt[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return cC(n)}const cue=/#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 Mk(t){return t.replace(cue,uue)}function uue(t,e,n,r){let i="";for(let o=parseInt(e);o0&&(y+=` `),g=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(xp).join(` `),g.length>0&&(g+=` `)):(y=[Ek(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,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 "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(xp).join(` -`),g=[Ek(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==zs?"#define TONE_MAPPING":"",n.toneMapping!==zs?jt.tonemapping_pars_fragment:"",n.toneMapping!==zs?tue("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",jt.colorspace_pars_fragment,eue("linearToOutputTexel",n.outputColorSpace),nue(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` +`),g=[Ek(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Us?"#define TONE_MAPPING":"",n.toneMapping!==Us?jt.tonemapping_pars_fragment:"",n.toneMapping!==Us?tue("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",jt.colorspace_pars_fragment,eue("linearToOutputTexel",n.outputColorSpace),nue(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` `].filter(xp).join(` -`)),s=lC(s),s=wk(s,n),s=Sk(s,n),a=lC(a),a=wk(a,n),a=Sk(a,n),s=Mk(s),a=Mk(a),n.isRawShaderMaterial!==!0&&(b=`#version 300 es +`)),s=cC(s),s=wk(s,n),s=Sk(s,n),a=cC(a),a=wk(a,n),a=Sk(a,n),s=Mk(s),a=Mk(a),n.isRawShaderMaterial!==!0&&(b=`#version 300 es `,y=[m,"#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+y,g=["#define varying in",n.glslVersion===sC?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===sC?"":"#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(` +`+y,g=["#define varying in",n.glslVersion===aC?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===aC?"":"#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(` `)+` `+g);const _=b+y+s,S=b+g+a,A=xk(i,i.VERTEX_SHADER,_),P=xk(i,i.FRAGMENT_SHADER,S);i.attachShader(x,A),i.attachShader(x,P),n.index0AttributeName!==void 0?i.bindAttribLocation(x,0,n.index0AttributeName):n.morphTargets===!0&&i.bindAttribLocation(x,0,"position"),i.linkProgram(x);function R(N){if(t.debug.checkShaderErrors){const z=i.getProgramInfoLog(x).trim(),D=i.getShaderInfoLog(A).trim(),B=i.getShaderInfoLog(P).trim();let G=!0,X=!0;if(i.getProgramParameter(x,i.LINK_STATUS)===!1)if(G=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(i,x,A,P);else{const Z=_k(i,A,"vertex"),F=_k(i,P,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(x,i.VALIDATE_STATUS)+` @@ -3955,7 +3955,7 @@ Material Type: `+N.type+` Program Info Log: `+z+` `+Z+` -`+F)}else z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",z):(D===""||B==="")&&(X=!1);X&&(N.diagnostics={runnable:G,programLog:z,vertexShader:{log:D,prefix:y},fragmentShader:{log:B,prefix:g}})}i.deleteShader(A),i.deleteShader(P),L=new By(i,x),k=oue(i,x)}let L;this.getUniforms=function(){return L===void 0&&R(this),L};let k;this.getAttributes=function(){return k===void 0&&R(this),k};let C=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return C===!1&&(C=i.getProgramParameter(x,Kce)),C},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(x),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=Zce++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=A,this.fragmentShader=P,this}let vue=0;class yue{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),o=this._getShaderStage(r),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1&&(s.add(i),i.usedTimes++),s.has(o)===!1&&(s.add(o),o.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 xue(e),n.set(e,r)),r}}class xue{constructor(e){this.id=vue++,this.code=e,this.usedTimes=0}}function bue(t,e,n,r,i,o,s){const a=new qc,l=new yue,c=new Set,u=[],f=i.logarithmicDepthBuffer,h=i.vertexTextures;let m=i.precision;const v={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function x(k){return c.add(k),k===0?"uv":`uv${k}`}function y(k,C,N,z,D){const B=z.fog,G=D.geometry,X=k.isMeshStandardMaterial?z.environment:null,Z=(k.isMeshStandardMaterial?n:e).get(k.envMap||X),F=Z&&Z.mapping===Qd?Z.image.height:null,q=v[k.type];k.precision!==null&&(m=i.getMaxPrecision(k.precision),m!==k.precision&&console.warn("THREE.WebGLProgram.getParameters:",k.precision,"not supported, using",m,"instead."));const K=G.morphAttributes.position||G.morphAttributes.normal||G.morphAttributes.color,Q=K!==void 0?K.length:0;let de=0;G.morphAttributes.position!==void 0&&(de=1),G.morphAttributes.normal!==void 0&&(de=2),G.morphAttributes.color!==void 0&&(de=3);let fe,J,ce,_e;if(q){const on=Qo[q];fe=on.vertexShader,J=on.fragmentShader}else fe=k.vertexShader,J=k.fragmentShader,l.update(k),ce=l.getVertexShaderID(k),_e=l.getFragmentShaderID(k);const be=t.getRenderTarget(),Xe=t.state.buffers.depth.getReversed(),$e=D.isInstancedMesh===!0,tt=D.isBatchedMesh===!0,Ve=!!k.map,se=!!k.matcap,ae=!!Z,W=!!k.aoMap,Ie=!!k.lightMap,Re=!!k.bumpMap,De=!!k.normalMap,he=!!k.displacementMap,qe=!!k.emissiveMap,Le=!!k.metalnessMap,V=!!k.roughnessMap,U=k.anisotropy>0,ne=k.clearcoat>0,le=k.dispersion>0,Ce=k.iridescence>0,ve=k.sheen>0,He=k.transmission>0,Ae=U&&!!k.anisotropyMap,Ee=ne&&!!k.clearcoatMap,bt=ne&&!!k.clearcoatNormalMap,ke=ne&&!!k.clearcoatRoughnessMap,it=Ce&&!!k.iridescenceMap,Oe=Ce&&!!k.iridescenceThicknessMap,Ye=ve&&!!k.sheenColorMap,me=ve&&!!k.sheenRoughnessMap,Fe=!!k.specularMap,Je=!!k.specularColorMap,gt=!!k.specularIntensityMap,ee=He&&!!k.transmissionMap,Ue=He&&!!k.thicknessMap,ye=!!k.gradientMap,Pe=!!k.alphaMap,We=k.alphaTest>0,Ke=!!k.alphaHash,Pt=!!k.extensions;let Mn=zs;k.toneMapped&&(be===null||be.isXRRenderTarget===!0)&&(Mn=t.toneMapping);const ir={shaderID:q,shaderType:k.type,shaderName:k.name,vertexShader:fe,fragmentShader:J,defines:k.defines,customVertexShaderID:ce,customFragmentShaderID:_e,isRawShaderMaterial:k.isRawShaderMaterial===!0,glslVersion:k.glslVersion,precision:m,batching:tt,batchingColor:tt&&D._colorsTexture!==null,instancing:$e,instancingColor:$e&&D.instanceColor!==null,instancingMorph:$e&&D.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:be===null?t.outputColorSpace:be.isXRRenderTarget===!0?be.texture.colorSpace:Cu,alphaToCoverage:!!k.alphaToCoverage,map:Ve,matcap:se,envMap:ae,envMapMode:ae&&Z.mapping,envMapCubeUVHeight:F,aoMap:W,lightMap:Ie,bumpMap:Re,normalMap:De,displacementMap:h&&he,emissiveMap:qe,normalMapObjectSpace:De&&k.normalMapType===zU,normalMapTangentSpace:De&&k.normalMapType===Wl,metalnessMap:Le,roughnessMap:V,anisotropy:U,anisotropyMap:Ae,clearcoat:ne,clearcoatMap:Ee,clearcoatNormalMap:bt,clearcoatRoughnessMap:ke,dispersion:le,iridescence:Ce,iridescenceMap:it,iridescenceThicknessMap:Oe,sheen:ve,sheenColorMap:Ye,sheenRoughnessMap:me,specularMap:Fe,specularColorMap:Je,specularIntensityMap:gt,transmission:He,transmissionMap:ee,thicknessMap:Ue,gradientMap:ye,opaque:k.transparent===!1&&k.blending===Hc&&k.alphaToCoverage===!1,alphaMap:Pe,alphaTest:We,alphaHash:Ke,combine:k.combine,mapUv:Ve&&x(k.map.channel),aoMapUv:W&&x(k.aoMap.channel),lightMapUv:Ie&&x(k.lightMap.channel),bumpMapUv:Re&&x(k.bumpMap.channel),normalMapUv:De&&x(k.normalMap.channel),displacementMapUv:he&&x(k.displacementMap.channel),emissiveMapUv:qe&&x(k.emissiveMap.channel),metalnessMapUv:Le&&x(k.metalnessMap.channel),roughnessMapUv:V&&x(k.roughnessMap.channel),anisotropyMapUv:Ae&&x(k.anisotropyMap.channel),clearcoatMapUv:Ee&&x(k.clearcoatMap.channel),clearcoatNormalMapUv:bt&&x(k.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ke&&x(k.clearcoatRoughnessMap.channel),iridescenceMapUv:it&&x(k.iridescenceMap.channel),iridescenceThicknessMapUv:Oe&&x(k.iridescenceThicknessMap.channel),sheenColorMapUv:Ye&&x(k.sheenColorMap.channel),sheenRoughnessMapUv:me&&x(k.sheenRoughnessMap.channel),specularMapUv:Fe&&x(k.specularMap.channel),specularColorMapUv:Je&&x(k.specularColorMap.channel),specularIntensityMapUv:gt&&x(k.specularIntensityMap.channel),transmissionMapUv:ee&&x(k.transmissionMap.channel),thicknessMapUv:Ue&&x(k.thicknessMap.channel),alphaMapUv:Pe&&x(k.alphaMap.channel),vertexTangents:!!G.attributes.tangent&&(De||U),vertexColors:k.vertexColors,vertexAlphas:k.vertexColors===!0&&!!G.attributes.color&&G.attributes.color.itemSize===4,pointsUvs:D.isPoints===!0&&!!G.attributes.uv&&(Ve||Pe),fog:!!B,useFog:k.fog===!0,fogExp2:!!B&&B.isFogExp2,flatShading:k.flatShading===!0,sizeAttenuation:k.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:Xe,skinning:D.isSkinnedMesh===!0,morphTargets:G.morphAttributes.position!==void 0,morphNormals:G.morphAttributes.normal!==void 0,morphColors:G.morphAttributes.color!==void 0,morphTargetsCount:Q,morphTextureStride:de,numDirLights:C.directional.length,numPointLights:C.point.length,numSpotLights:C.spot.length,numSpotLightMaps:C.spotLightMap.length,numRectAreaLights:C.rectArea.length,numHemiLights:C.hemi.length,numDirLightShadows:C.directionalShadowMap.length,numPointLightShadows:C.pointShadowMap.length,numSpotLightShadows:C.spotShadowMap.length,numSpotLightShadowsWithMaps:C.numSpotLightShadowsWithMaps,numLightProbes:C.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:k.dithering,shadowMapEnabled:t.shadowMap.enabled&&N.length>0,shadowMapType:t.shadowMap.type,toneMapping:Mn,decodeVideoTexture:Ve&&k.map.isVideoTexture===!0&&Jt.getTransfer(k.map.colorSpace)===dn,decodeVideoTextureEmissive:qe&&k.emissiveMap.isVideoTexture===!0&&Jt.getTransfer(k.emissiveMap.colorSpace)===dn,premultipliedAlpha:k.premultipliedAlpha,doubleSided:k.side===es,flipSided:k.side===di,useDepthPacking:k.depthPacking>=0,depthPacking:k.depthPacking||0,index0AttributeName:k.index0AttributeName,extensionClipCullDistance:Pt&&k.extensions.clipCullDistance===!0&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Pt&&k.extensions.multiDraw===!0||tt)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:k.customProgramCacheKey()};return ir.vertexUv1s=c.has(1),ir.vertexUv2s=c.has(2),ir.vertexUv3s=c.has(3),c.clear(),ir}function g(k){const C=[];if(k.shaderID?C.push(k.shaderID):(C.push(k.customVertexShaderID),C.push(k.customFragmentShaderID)),k.defines!==void 0)for(const N in k.defines)C.push(N),C.push(k.defines[N]);return k.isRawShaderMaterial===!1&&(b(C,k),_(C,k),C.push(t.outputColorSpace)),C.push(k.customProgramCacheKey),C.join()}function b(k,C){k.push(C.precision),k.push(C.outputColorSpace),k.push(C.envMapMode),k.push(C.envMapCubeUVHeight),k.push(C.mapUv),k.push(C.alphaMapUv),k.push(C.lightMapUv),k.push(C.aoMapUv),k.push(C.bumpMapUv),k.push(C.normalMapUv),k.push(C.displacementMapUv),k.push(C.emissiveMapUv),k.push(C.metalnessMapUv),k.push(C.roughnessMapUv),k.push(C.anisotropyMapUv),k.push(C.clearcoatMapUv),k.push(C.clearcoatNormalMapUv),k.push(C.clearcoatRoughnessMapUv),k.push(C.iridescenceMapUv),k.push(C.iridescenceThicknessMapUv),k.push(C.sheenColorMapUv),k.push(C.sheenRoughnessMapUv),k.push(C.specularMapUv),k.push(C.specularColorMapUv),k.push(C.specularIntensityMapUv),k.push(C.transmissionMapUv),k.push(C.thicknessMapUv),k.push(C.combine),k.push(C.fogExp2),k.push(C.sizeAttenuation),k.push(C.morphTargetsCount),k.push(C.morphAttributeCount),k.push(C.numDirLights),k.push(C.numPointLights),k.push(C.numSpotLights),k.push(C.numSpotLightMaps),k.push(C.numHemiLights),k.push(C.numRectAreaLights),k.push(C.numDirLightShadows),k.push(C.numPointLightShadows),k.push(C.numSpotLightShadows),k.push(C.numSpotLightShadowsWithMaps),k.push(C.numLightProbes),k.push(C.shadowMapType),k.push(C.toneMapping),k.push(C.numClippingPlanes),k.push(C.numClipIntersection),k.push(C.depthPacking)}function _(k,C){a.disableAll(),C.supportsVertexTextures&&a.enable(0),C.instancing&&a.enable(1),C.instancingColor&&a.enable(2),C.instancingMorph&&a.enable(3),C.matcap&&a.enable(4),C.envMap&&a.enable(5),C.normalMapObjectSpace&&a.enable(6),C.normalMapTangentSpace&&a.enable(7),C.clearcoat&&a.enable(8),C.iridescence&&a.enable(9),C.alphaTest&&a.enable(10),C.vertexColors&&a.enable(11),C.vertexAlphas&&a.enable(12),C.vertexUv1s&&a.enable(13),C.vertexUv2s&&a.enable(14),C.vertexUv3s&&a.enable(15),C.vertexTangents&&a.enable(16),C.anisotropy&&a.enable(17),C.alphaHash&&a.enable(18),C.batching&&a.enable(19),C.dispersion&&a.enable(20),C.batchingColor&&a.enable(21),k.push(a.mask),a.disableAll(),C.fog&&a.enable(0),C.useFog&&a.enable(1),C.flatShading&&a.enable(2),C.logarithmicDepthBuffer&&a.enable(3),C.reverseDepthBuffer&&a.enable(4),C.skinning&&a.enable(5),C.morphTargets&&a.enable(6),C.morphNormals&&a.enable(7),C.morphColors&&a.enable(8),C.premultipliedAlpha&&a.enable(9),C.shadowMapEnabled&&a.enable(10),C.doubleSided&&a.enable(11),C.flipSided&&a.enable(12),C.useDepthPacking&&a.enable(13),C.dithering&&a.enable(14),C.transmission&&a.enable(15),C.sheen&&a.enable(16),C.opaque&&a.enable(17),C.pointsUvs&&a.enable(18),C.decodeVideoTexture&&a.enable(19),C.decodeVideoTextureEmissive&&a.enable(20),C.alphaToCoverage&&a.enable(21),k.push(a.mask)}function S(k){const C=v[k.type];let N;if(C){const z=Qo[C];N=QU.clone(z.uniforms)}else N=k.uniforms;return N}function A(k,C){let N;for(let z=0,D=u.length;z0?r.push(g):m.transparent===!0?i.push(g):n.push(g)}function l(f,h,m,v,x,y){const g=s(f,h,m,v,x,y);m.transmission>0?r.unshift(g):m.transparent===!0?i.unshift(g):n.unshift(g)}function c(f,h){n.length>1&&n.sort(f||wue),r.length>1&&r.sort(h||Ck),i.length>1&&i.sort(h||Ck)}function u(){for(let f=e,h=t.length;f=o.length?(s=new Tk,o.push(s)):s=o[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function Mue(){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 H,color:new at};break;case"SpotLight":n={position:new H,direction:new H,color:new at,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new H,color:new at,distance:0,decay:0};break;case"HemisphereLight":n={direction:new H,skyColor:new at,groundColor:new at};break;case"RectAreaLight":n={color:new at,position:new H,halfWidth:new H,halfHeight:new H};break}return t[e.id]=n,n}}}function Eue(){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 Ne};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ne};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ne,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let Cue=0;function Tue(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function Rue(t){const e=new Mue,n=Eue(),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 c=0;c<9;c++)r.probe.push(new H);const i=new H,o=new Mt,s=new Mt;function a(c){let u=0,f=0,h=0;for(let k=0;k<9;k++)r.probe[k].set(0,0,0);let m=0,v=0,x=0,y=0,g=0,b=0,_=0,S=0,A=0,P=0,R=0;c.sort(Tue);for(let k=0,C=c.length;k0&&(t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Qe.LTC_FLOAT_1,r.rectAreaLTC2=Qe.LTC_FLOAT_2):(r.rectAreaLTC1=Qe.LTC_HALF_1,r.rectAreaLTC2=Qe.LTC_HALF_2)),r.ambient[0]=u,r.ambient[1]=f,r.ambient[2]=h;const L=r.hash;(L.directionalLength!==m||L.pointLength!==v||L.spotLength!==x||L.rectAreaLength!==y||L.hemiLength!==g||L.numDirectionalShadows!==b||L.numPointShadows!==_||L.numSpotShadows!==S||L.numSpotMaps!==A||L.numLightProbes!==R)&&(r.directional.length=m,r.spot.length=x,r.rectArea.length=y,r.point.length=v,r.hemi.length=g,r.directionalShadow.length=b,r.directionalShadowMap.length=b,r.pointShadow.length=_,r.pointShadowMap.length=_,r.spotShadow.length=S,r.spotShadowMap.length=S,r.directionalShadowMatrix.length=b,r.pointShadowMatrix.length=_,r.spotLightMatrix.length=S+A-P,r.spotLightMap.length=A,r.numSpotLightShadowsWithMaps=P,r.numLightProbes=R,L.directionalLength=m,L.pointLength=v,L.spotLength=x,L.rectAreaLength=y,L.hemiLength=g,L.numDirectionalShadows=b,L.numPointShadows=_,L.numSpotShadows=S,L.numSpotMaps=A,L.numLightProbes=R,r.version=Cue++)}function l(c,u){let f=0,h=0,m=0,v=0,x=0;const y=u.matrixWorldInverse;for(let g=0,b=c.length;g=s.length?(a=new Rk(t),s.push(a)):a=s[o],a}function r(){e=new WeakMap}return{get:n,dispose:r}}class eA extends Or{static get type(){return"MeshDepthMaterial"}constructor(e){super(),this.isMeshDepthMaterial=!0,this.depthPacking=DU,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 tA extends Or{static get type(){return"MeshDistanceMaterial"}constructor(e){super(),this.isMeshDistanceMaterial=!0,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const Pue=`void main() { +`+F)}else z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",z):(D===""||B==="")&&(X=!1);X&&(N.diagnostics={runnable:G,programLog:z,vertexShader:{log:D,prefix:y},fragmentShader:{log:B,prefix:g}})}i.deleteShader(A),i.deleteShader(P),L=new jy(i,x),k=oue(i,x)}let L;this.getUniforms=function(){return L===void 0&&R(this),L};let k;this.getAttributes=function(){return k===void 0&&R(this),k};let C=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return C===!1&&(C=i.getProgramParameter(x,Kce)),C},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(x),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=Zce++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=A,this.fragmentShader=P,this}let vue=0;class yue{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),o=this._getShaderStage(r),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1&&(s.add(i),i.usedTimes++),s.has(o)===!1&&(s.add(o),o.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 xue(e),n.set(e,r)),r}}class xue{constructor(e){this.id=vue++,this.code=e,this.usedTimes=0}}function bue(t,e,n,r,i,o,s){const a=new qc,l=new yue,c=new Set,u=[],f=i.logarithmicDepthBuffer,h=i.vertexTextures;let m=i.precision;const v={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function x(k){return c.add(k),k===0?"uv":`uv${k}`}function y(k,C,N,z,D){const B=z.fog,G=D.geometry,X=k.isMeshStandardMaterial?z.environment:null,Z=(k.isMeshStandardMaterial?n:e).get(k.envMap||X),F=Z&&Z.mapping===Qd?Z.image.height:null,q=v[k.type];k.precision!==null&&(m=i.getMaxPrecision(k.precision),m!==k.precision&&console.warn("THREE.WebGLProgram.getParameters:",k.precision,"not supported, using",m,"instead."));const K=G.morphAttributes.position||G.morphAttributes.normal||G.morphAttributes.color,Q=K!==void 0?K.length:0;let de=0;G.morphAttributes.position!==void 0&&(de=1),G.morphAttributes.normal!==void 0&&(de=2),G.morphAttributes.color!==void 0&&(de=3);let fe,J,ce,_e;if(q){const on=Qo[q];fe=on.vertexShader,J=on.fragmentShader}else fe=k.vertexShader,J=k.fragmentShader,l.update(k),ce=l.getVertexShaderID(k),_e=l.getFragmentShaderID(k);const be=t.getRenderTarget(),Xe=t.state.buffers.depth.getReversed(),$e=D.isInstancedMesh===!0,tt=D.isBatchedMesh===!0,Ve=!!k.map,se=!!k.matcap,ae=!!Z,W=!!k.aoMap,Ie=!!k.lightMap,Re=!!k.bumpMap,De=!!k.normalMap,he=!!k.displacementMap,qe=!!k.emissiveMap,Le=!!k.metalnessMap,V=!!k.roughnessMap,U=k.anisotropy>0,ne=k.clearcoat>0,le=k.dispersion>0,Ce=k.iridescence>0,ve=k.sheen>0,He=k.transmission>0,Ae=U&&!!k.anisotropyMap,Ee=ne&&!!k.clearcoatMap,bt=ne&&!!k.clearcoatNormalMap,ke=ne&&!!k.clearcoatRoughnessMap,it=Ce&&!!k.iridescenceMap,Oe=Ce&&!!k.iridescenceThicknessMap,Ye=ve&&!!k.sheenColorMap,me=ve&&!!k.sheenRoughnessMap,Fe=!!k.specularMap,Je=!!k.specularColorMap,gt=!!k.specularIntensityMap,ee=He&&!!k.transmissionMap,Ue=He&&!!k.thicknessMap,ye=!!k.gradientMap,Pe=!!k.alphaMap,We=k.alphaTest>0,Ke=!!k.alphaHash,Pt=!!k.extensions;let Mn=Us;k.toneMapped&&(be===null||be.isXRRenderTarget===!0)&&(Mn=t.toneMapping);const ir={shaderID:q,shaderType:k.type,shaderName:k.name,vertexShader:fe,fragmentShader:J,defines:k.defines,customVertexShaderID:ce,customFragmentShaderID:_e,isRawShaderMaterial:k.isRawShaderMaterial===!0,glslVersion:k.glslVersion,precision:m,batching:tt,batchingColor:tt&&D._colorsTexture!==null,instancing:$e,instancingColor:$e&&D.instanceColor!==null,instancingMorph:$e&&D.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:be===null?t.outputColorSpace:be.isXRRenderTarget===!0?be.texture.colorSpace:Cu,alphaToCoverage:!!k.alphaToCoverage,map:Ve,matcap:se,envMap:ae,envMapMode:ae&&Z.mapping,envMapCubeUVHeight:F,aoMap:W,lightMap:Ie,bumpMap:Re,normalMap:De,displacementMap:h&&he,emissiveMap:qe,normalMapObjectSpace:De&&k.normalMapType===zU,normalMapTangentSpace:De&&k.normalMapType===Wl,metalnessMap:Le,roughnessMap:V,anisotropy:U,anisotropyMap:Ae,clearcoat:ne,clearcoatMap:Ee,clearcoatNormalMap:bt,clearcoatRoughnessMap:ke,dispersion:le,iridescence:Ce,iridescenceMap:it,iridescenceThicknessMap:Oe,sheen:ve,sheenColorMap:Ye,sheenRoughnessMap:me,specularMap:Fe,specularColorMap:Je,specularIntensityMap:gt,transmission:He,transmissionMap:ee,thicknessMap:Ue,gradientMap:ye,opaque:k.transparent===!1&&k.blending===Hc&&k.alphaToCoverage===!1,alphaMap:Pe,alphaTest:We,alphaHash:Ke,combine:k.combine,mapUv:Ve&&x(k.map.channel),aoMapUv:W&&x(k.aoMap.channel),lightMapUv:Ie&&x(k.lightMap.channel),bumpMapUv:Re&&x(k.bumpMap.channel),normalMapUv:De&&x(k.normalMap.channel),displacementMapUv:he&&x(k.displacementMap.channel),emissiveMapUv:qe&&x(k.emissiveMap.channel),metalnessMapUv:Le&&x(k.metalnessMap.channel),roughnessMapUv:V&&x(k.roughnessMap.channel),anisotropyMapUv:Ae&&x(k.anisotropyMap.channel),clearcoatMapUv:Ee&&x(k.clearcoatMap.channel),clearcoatNormalMapUv:bt&&x(k.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ke&&x(k.clearcoatRoughnessMap.channel),iridescenceMapUv:it&&x(k.iridescenceMap.channel),iridescenceThicknessMapUv:Oe&&x(k.iridescenceThicknessMap.channel),sheenColorMapUv:Ye&&x(k.sheenColorMap.channel),sheenRoughnessMapUv:me&&x(k.sheenRoughnessMap.channel),specularMapUv:Fe&&x(k.specularMap.channel),specularColorMapUv:Je&&x(k.specularColorMap.channel),specularIntensityMapUv:gt&&x(k.specularIntensityMap.channel),transmissionMapUv:ee&&x(k.transmissionMap.channel),thicknessMapUv:Ue&&x(k.thicknessMap.channel),alphaMapUv:Pe&&x(k.alphaMap.channel),vertexTangents:!!G.attributes.tangent&&(De||U),vertexColors:k.vertexColors,vertexAlphas:k.vertexColors===!0&&!!G.attributes.color&&G.attributes.color.itemSize===4,pointsUvs:D.isPoints===!0&&!!G.attributes.uv&&(Ve||Pe),fog:!!B,useFog:k.fog===!0,fogExp2:!!B&&B.isFogExp2,flatShading:k.flatShading===!0,sizeAttenuation:k.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:Xe,skinning:D.isSkinnedMesh===!0,morphTargets:G.morphAttributes.position!==void 0,morphNormals:G.morphAttributes.normal!==void 0,morphColors:G.morphAttributes.color!==void 0,morphTargetsCount:Q,morphTextureStride:de,numDirLights:C.directional.length,numPointLights:C.point.length,numSpotLights:C.spot.length,numSpotLightMaps:C.spotLightMap.length,numRectAreaLights:C.rectArea.length,numHemiLights:C.hemi.length,numDirLightShadows:C.directionalShadowMap.length,numPointLightShadows:C.pointShadowMap.length,numSpotLightShadows:C.spotShadowMap.length,numSpotLightShadowsWithMaps:C.numSpotLightShadowsWithMaps,numLightProbes:C.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:k.dithering,shadowMapEnabled:t.shadowMap.enabled&&N.length>0,shadowMapType:t.shadowMap.type,toneMapping:Mn,decodeVideoTexture:Ve&&k.map.isVideoTexture===!0&&Jt.getTransfer(k.map.colorSpace)===dn,decodeVideoTextureEmissive:qe&&k.emissiveMap.isVideoTexture===!0&&Jt.getTransfer(k.emissiveMap.colorSpace)===dn,premultipliedAlpha:k.premultipliedAlpha,doubleSided:k.side===es,flipSided:k.side===hi,useDepthPacking:k.depthPacking>=0,depthPacking:k.depthPacking||0,index0AttributeName:k.index0AttributeName,extensionClipCullDistance:Pt&&k.extensions.clipCullDistance===!0&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Pt&&k.extensions.multiDraw===!0||tt)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:k.customProgramCacheKey()};return ir.vertexUv1s=c.has(1),ir.vertexUv2s=c.has(2),ir.vertexUv3s=c.has(3),c.clear(),ir}function g(k){const C=[];if(k.shaderID?C.push(k.shaderID):(C.push(k.customVertexShaderID),C.push(k.customFragmentShaderID)),k.defines!==void 0)for(const N in k.defines)C.push(N),C.push(k.defines[N]);return k.isRawShaderMaterial===!1&&(b(C,k),_(C,k),C.push(t.outputColorSpace)),C.push(k.customProgramCacheKey),C.join()}function b(k,C){k.push(C.precision),k.push(C.outputColorSpace),k.push(C.envMapMode),k.push(C.envMapCubeUVHeight),k.push(C.mapUv),k.push(C.alphaMapUv),k.push(C.lightMapUv),k.push(C.aoMapUv),k.push(C.bumpMapUv),k.push(C.normalMapUv),k.push(C.displacementMapUv),k.push(C.emissiveMapUv),k.push(C.metalnessMapUv),k.push(C.roughnessMapUv),k.push(C.anisotropyMapUv),k.push(C.clearcoatMapUv),k.push(C.clearcoatNormalMapUv),k.push(C.clearcoatRoughnessMapUv),k.push(C.iridescenceMapUv),k.push(C.iridescenceThicknessMapUv),k.push(C.sheenColorMapUv),k.push(C.sheenRoughnessMapUv),k.push(C.specularMapUv),k.push(C.specularColorMapUv),k.push(C.specularIntensityMapUv),k.push(C.transmissionMapUv),k.push(C.thicknessMapUv),k.push(C.combine),k.push(C.fogExp2),k.push(C.sizeAttenuation),k.push(C.morphTargetsCount),k.push(C.morphAttributeCount),k.push(C.numDirLights),k.push(C.numPointLights),k.push(C.numSpotLights),k.push(C.numSpotLightMaps),k.push(C.numHemiLights),k.push(C.numRectAreaLights),k.push(C.numDirLightShadows),k.push(C.numPointLightShadows),k.push(C.numSpotLightShadows),k.push(C.numSpotLightShadowsWithMaps),k.push(C.numLightProbes),k.push(C.shadowMapType),k.push(C.toneMapping),k.push(C.numClippingPlanes),k.push(C.numClipIntersection),k.push(C.depthPacking)}function _(k,C){a.disableAll(),C.supportsVertexTextures&&a.enable(0),C.instancing&&a.enable(1),C.instancingColor&&a.enable(2),C.instancingMorph&&a.enable(3),C.matcap&&a.enable(4),C.envMap&&a.enable(5),C.normalMapObjectSpace&&a.enable(6),C.normalMapTangentSpace&&a.enable(7),C.clearcoat&&a.enable(8),C.iridescence&&a.enable(9),C.alphaTest&&a.enable(10),C.vertexColors&&a.enable(11),C.vertexAlphas&&a.enable(12),C.vertexUv1s&&a.enable(13),C.vertexUv2s&&a.enable(14),C.vertexUv3s&&a.enable(15),C.vertexTangents&&a.enable(16),C.anisotropy&&a.enable(17),C.alphaHash&&a.enable(18),C.batching&&a.enable(19),C.dispersion&&a.enable(20),C.batchingColor&&a.enable(21),k.push(a.mask),a.disableAll(),C.fog&&a.enable(0),C.useFog&&a.enable(1),C.flatShading&&a.enable(2),C.logarithmicDepthBuffer&&a.enable(3),C.reverseDepthBuffer&&a.enable(4),C.skinning&&a.enable(5),C.morphTargets&&a.enable(6),C.morphNormals&&a.enable(7),C.morphColors&&a.enable(8),C.premultipliedAlpha&&a.enable(9),C.shadowMapEnabled&&a.enable(10),C.doubleSided&&a.enable(11),C.flipSided&&a.enable(12),C.useDepthPacking&&a.enable(13),C.dithering&&a.enable(14),C.transmission&&a.enable(15),C.sheen&&a.enable(16),C.opaque&&a.enable(17),C.pointsUvs&&a.enable(18),C.decodeVideoTexture&&a.enable(19),C.decodeVideoTextureEmissive&&a.enable(20),C.alphaToCoverage&&a.enable(21),k.push(a.mask)}function S(k){const C=v[k.type];let N;if(C){const z=Qo[C];N=QU.clone(z.uniforms)}else N=k.uniforms;return N}function A(k,C){let N;for(let z=0,D=u.length;z0?r.push(g):m.transparent===!0?i.push(g):n.push(g)}function l(f,h,m,v,x,y){const g=s(f,h,m,v,x,y);m.transmission>0?r.unshift(g):m.transparent===!0?i.unshift(g):n.unshift(g)}function c(f,h){n.length>1&&n.sort(f||wue),r.length>1&&r.sort(h||Ck),i.length>1&&i.sort(h||Ck)}function u(){for(let f=e,h=t.length;f=o.length?(s=new Tk,o.push(s)):s=o[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function Mue(){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 H,color:new at};break;case"SpotLight":n={position:new H,direction:new H,color:new at,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new H,color:new at,distance:0,decay:0};break;case"HemisphereLight":n={direction:new H,skyColor:new at,groundColor:new at};break;case"RectAreaLight":n={color:new at,position:new H,halfWidth:new H,halfHeight:new H};break}return t[e.id]=n,n}}}function Eue(){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 Ne};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ne};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ne,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let Cue=0;function Tue(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function Rue(t){const e=new Mue,n=Eue(),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 c=0;c<9;c++)r.probe.push(new H);const i=new H,o=new Mt,s=new Mt;function a(c){let u=0,f=0,h=0;for(let k=0;k<9;k++)r.probe[k].set(0,0,0);let m=0,v=0,x=0,y=0,g=0,b=0,_=0,S=0,A=0,P=0,R=0;c.sort(Tue);for(let k=0,C=c.length;k0&&(t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Qe.LTC_FLOAT_1,r.rectAreaLTC2=Qe.LTC_FLOAT_2):(r.rectAreaLTC1=Qe.LTC_HALF_1,r.rectAreaLTC2=Qe.LTC_HALF_2)),r.ambient[0]=u,r.ambient[1]=f,r.ambient[2]=h;const L=r.hash;(L.directionalLength!==m||L.pointLength!==v||L.spotLength!==x||L.rectAreaLength!==y||L.hemiLength!==g||L.numDirectionalShadows!==b||L.numPointShadows!==_||L.numSpotShadows!==S||L.numSpotMaps!==A||L.numLightProbes!==R)&&(r.directional.length=m,r.spot.length=x,r.rectArea.length=y,r.point.length=v,r.hemi.length=g,r.directionalShadow.length=b,r.directionalShadowMap.length=b,r.pointShadow.length=_,r.pointShadowMap.length=_,r.spotShadow.length=S,r.spotShadowMap.length=S,r.directionalShadowMatrix.length=b,r.pointShadowMatrix.length=_,r.spotLightMatrix.length=S+A-P,r.spotLightMap.length=A,r.numSpotLightShadowsWithMaps=P,r.numLightProbes=R,L.directionalLength=m,L.pointLength=v,L.spotLength=x,L.rectAreaLength=y,L.hemiLength=g,L.numDirectionalShadows=b,L.numPointShadows=_,L.numSpotShadows=S,L.numSpotMaps=A,L.numLightProbes=R,r.version=Cue++)}function l(c,u){let f=0,h=0,m=0,v=0,x=0;const y=u.matrixWorldInverse;for(let g=0,b=c.length;g=s.length?(a=new Rk(t),s.push(a)):a=s[o],a}function r(){e=new WeakMap}return{get:n,dispose:r}}class eA extends Or{static get type(){return"MeshDepthMaterial"}constructor(e){super(),this.isMeshDepthMaterial=!0,this.depthPacking=DU,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 tA extends Or{static get type(){return"MeshDistanceMaterial"}constructor(e){super(),this.isMeshDistanceMaterial=!0,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const Pue=`void main() { gl_Position = vec4( position, 1.0 ); }`,Iue=`uniform sampler2D shadow_pass; uniform vec2 resolution; @@ -3983,7 +3983,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function Nue(t,e,n){let r=new yg;const i=new Ne,o=new Ne,s=new en,a=new eA({depthPacking:FU}),l=new tA,c={},u=n.maxTextureSize,f={[La]:di,[di]:La,[es]:es},h=new as({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ne},radius:{value:4}},vertexShader:Pue,fragmentShader:Iue}),m=h.clone();m.defines.HORIZONTAL_PASS=1;const v=new Dt;v.setAttribute("position",new pn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new rr(v,h),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=n_;let g=this.type;this.render=function(P,R,L){if(y.enabled===!1||y.autoUpdate===!1&&y.needsUpdate===!1||P.length===0)return;const k=t.getRenderTarget(),C=t.getActiveCubeFace(),N=t.getActiveMipmapLevel(),z=t.state;z.setBlending(Ea),z.buffers.color.setClear(1,1,1,1),z.buffers.depth.setTest(!0),z.setScissorTest(!1);const D=g!==Ko&&this.type===Ko,B=g===Ko&&this.type!==Ko;for(let G=0,X=P.length;Gu||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/q.x),i.x=o.x*q.x,F.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/q.y),i.y=o.y*q.y,F.mapSize.y=o.y)),F.map===null||D===!0||B===!0){const Q=this.type!==Ko?{minFilter:Mr,magFilter:Mr}:{};F.map!==null&&F.map.dispose(),F.map=new ss(i.x,i.y,Q),F.map.texture.name=Z.name+".shadowMap",F.camera.updateProjectionMatrix()}t.setRenderTarget(F.map),t.clear();const K=F.getViewportCount();for(let Q=0;Q0||R.map&&R.alphaTest>0){const z=C.uuid,D=R.uuid;let B=c[z];B===void 0&&(B={},c[z]=B);let G=B[D];G===void 0&&(G=C.clone(),B[D]=G,R.addEventListener("dispose",A)),C=G}if(C.visible=R.visible,C.wireframe=R.wireframe,k===Ko?C.side=R.shadowSide!==null?R.shadowSide:R.side:C.side=R.shadowSide!==null?R.shadowSide:f[R.side],C.alphaMap=R.alphaMap,C.alphaTest=R.alphaTest,C.map=R.map,C.clipShadows=R.clipShadows,C.clippingPlanes=R.clippingPlanes,C.clipIntersection=R.clipIntersection,C.displacementMap=R.displacementMap,C.displacementScale=R.displacementScale,C.displacementBias=R.displacementBias,C.wireframeLinewidth=R.wireframeLinewidth,C.linewidth=R.linewidth,L.isPointLight===!0&&C.isMeshDistanceMaterial===!0){const z=t.properties.get(C);z.light=L}return C}function S(P,R,L,k,C){if(P.visible===!1)return;if(P.layers.test(R.layers)&&(P.isMesh||P.isLine||P.isPoints)&&(P.castShadow||P.receiveShadow&&C===Ko)&&(!P.frustumCulled||r.intersectsObject(P))){P.modelViewMatrix.multiplyMatrices(L.matrixWorldInverse,P.matrixWorld);const D=e.update(P),B=P.material;if(Array.isArray(B)){const G=D.groups;for(let X=0,Z=G.length;X=1):F.indexOf("OpenGL ES")!==-1&&(Z=parseFloat(/^OpenGL ES (\d)/.exec(F)[1]),X=Z>=2);let q=null,K={};const Q=t.getParameter(t.SCISSOR_BOX),de=t.getParameter(t.VIEWPORT),fe=new en().fromArray(Q),J=new en().fromArray(de);function ce(ee,Ue,ye,Pe){const We=new Uint8Array(4),Ke=t.createTexture();t.bindTexture(ee,Ke),t.texParameteri(ee,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(ee,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Pt=0;Pte?(t.repeat.x=1,t.repeat.y=n/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2):(t.repeat.x=e/n,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0),t}function Due(t,e){const n=t.image&&t.image.width?t.image.width/t.image.height:1;return n>e?(t.repeat.x=e/n,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0):(t.repeat.x=1,t.repeat.y=n/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2),t}function Fue(t){return t.repeat.x=1,t.repeat.y=1,t.offset.x=0,t.offset.y=0,t}function cC(t,e,n,r){const i=zue(r);switch(n){case BR:return t*e;case VR:return t*e;case $R:return t*e*2;case hg:return t*e/i.components*i.byteLength;case pg:return t*e/i.components*i.byteLength;case WR:return t*e*2/i.components*i.byteLength;case s_:return t*e*2/i.components*i.byteLength;case jR:return t*e*3/i.components*i.byteLength;case Ir:return t*e*4/i.components*i.byteLength;case a_:return t*e*4/i.components*i.byteLength;case Op:case Dp:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Fp:case zp:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case H1:case X1:return Math.max(t,16)*Math.max(e,8)/4;case W1:case G1:return Math.max(t,8)*Math.max(e,8)/2;case q1:case Y1:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case K1:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case Z1:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case J1:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case Q1:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case ex:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case tx:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case nx:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case rx:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case ix:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case ox:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case sx:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case ax:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case lx:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case cx:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case ux:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case Up:case fx:case dx:return Math.ceil(t/4)*Math.ceil(e/4)*16;case HR:case hx:return Math.ceil(t/4)*Math.ceil(e/4)*8;case px:case mx:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function zue(t){switch(t){case ji:case FR:return{byteLength:1,components:1};case Rd:case zR:case Eu:return{byteLength:2,components:1};case i_:case o_:return{byteLength:2,components:4};case Da:case r_:case li:return{byteLength:4,components:1};case UR:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}const Uue={contain:Oue,cover:Due,fill:Fue,getByteLength:cC};function Bue(t,e,n,r,i,o,s){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new Ne,u=new WeakMap;let f;const h=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(V,U){return m?new OffscreenCanvas(V,U):Nm("canvas")}function x(V,U,ne){let le=1;const Ce=Le(V);if((Ce.width>ne||Ce.height>ne)&&(le=ne/Math.max(Ce.width,Ce.height)),le<1)if(typeof HTMLImageElement<"u"&&V instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&V instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&V instanceof ImageBitmap||typeof VideoFrame<"u"&&V instanceof VideoFrame){const ve=Math.floor(le*Ce.width),He=Math.floor(le*Ce.height);f===void 0&&(f=v(ve,He));const Ae=U?v(ve,He):f;return Ae.width=ve,Ae.height=He,Ae.getContext("2d").drawImage(V,0,0,ve,He),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Ce.width+"x"+Ce.height+") to ("+ve+"x"+He+")."),Ae}else return"data"in V&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Ce.width+"x"+Ce.height+")."),V;return V}function y(V){return V.generateMipmaps}function g(V){t.generateMipmap(V)}function b(V){return V.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:V.isWebGL3DRenderTarget?t.TEXTURE_3D:V.isWebGLArrayRenderTarget||V.isCompressedArrayTexture?t.TEXTURE_2D_ARRAY:t.TEXTURE_2D}function _(V,U,ne,le,Ce=!1){if(V!==null){if(t[V]!==void 0)return t[V];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+V+"'")}let ve=U;if(U===t.RED&&(ne===t.FLOAT&&(ve=t.R32F),ne===t.HALF_FLOAT&&(ve=t.R16F),ne===t.UNSIGNED_BYTE&&(ve=t.R8)),U===t.RED_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ve=t.R8UI),ne===t.UNSIGNED_SHORT&&(ve=t.R16UI),ne===t.UNSIGNED_INT&&(ve=t.R32UI),ne===t.BYTE&&(ve=t.R8I),ne===t.SHORT&&(ve=t.R16I),ne===t.INT&&(ve=t.R32I)),U===t.RG&&(ne===t.FLOAT&&(ve=t.RG32F),ne===t.HALF_FLOAT&&(ve=t.RG16F),ne===t.UNSIGNED_BYTE&&(ve=t.RG8)),U===t.RG_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ve=t.RG8UI),ne===t.UNSIGNED_SHORT&&(ve=t.RG16UI),ne===t.UNSIGNED_INT&&(ve=t.RG32UI),ne===t.BYTE&&(ve=t.RG8I),ne===t.SHORT&&(ve=t.RG16I),ne===t.INT&&(ve=t.RG32I)),U===t.RGB_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ve=t.RGB8UI),ne===t.UNSIGNED_SHORT&&(ve=t.RGB16UI),ne===t.UNSIGNED_INT&&(ve=t.RGB32UI),ne===t.BYTE&&(ve=t.RGB8I),ne===t.SHORT&&(ve=t.RGB16I),ne===t.INT&&(ve=t.RGB32I)),U===t.RGBA_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ve=t.RGBA8UI),ne===t.UNSIGNED_SHORT&&(ve=t.RGBA16UI),ne===t.UNSIGNED_INT&&(ve=t.RGBA32UI),ne===t.BYTE&&(ve=t.RGBA8I),ne===t.SHORT&&(ve=t.RGBA16I),ne===t.INT&&(ve=t.RGBA32I)),U===t.RGB&&ne===t.UNSIGNED_INT_5_9_9_9_REV&&(ve=t.RGB9_E5),U===t.RGBA){const He=Ce?mg:Jt.getTransfer(le);ne===t.FLOAT&&(ve=t.RGBA32F),ne===t.HALF_FLOAT&&(ve=t.RGBA16F),ne===t.UNSIGNED_BYTE&&(ve=He===dn?t.SRGB8_ALPHA8:t.RGBA8),ne===t.UNSIGNED_SHORT_4_4_4_4&&(ve=t.RGBA4),ne===t.UNSIGNED_SHORT_5_5_5_1&&(ve=t.RGB5_A1)}return(ve===t.R16F||ve===t.R32F||ve===t.RG16F||ve===t.RG32F||ve===t.RGBA16F||ve===t.RGBA32F)&&e.get("EXT_color_buffer_float"),ve}function S(V,U){let ne;return V?U===null||U===Da||U===fu?ne=t.DEPTH24_STENCIL8:U===li?ne=t.DEPTH32F_STENCIL8:U===Rd&&(ne=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):U===null||U===Da||U===fu?ne=t.DEPTH_COMPONENT24:U===li?ne=t.DEPTH_COMPONENT32F:U===Rd&&(ne=t.DEPTH_COMPONENT16),ne}function A(V,U){return y(V)===!0||V.isFramebufferTexture&&V.minFilter!==Mr&&V.minFilter!==cr?Math.log2(Math.max(U.width,U.height))+1:V.mipmaps!==void 0&&V.mipmaps.length>0?V.mipmaps.length:V.isCompressedTexture&&Array.isArray(V.image)?U.mipmaps.length:1}function P(V){const U=V.target;U.removeEventListener("dispose",P),L(U),U.isVideoTexture&&u.delete(U)}function R(V){const U=V.target;U.removeEventListener("dispose",R),C(U)}function L(V){const U=r.get(V);if(U.__webglInit===void 0)return;const ne=V.source,le=h.get(ne);if(le){const Ce=le[U.__cacheKey];Ce.usedTimes--,Ce.usedTimes===0&&k(V),Object.keys(le).length===0&&h.delete(ne)}r.remove(V)}function k(V){const U=r.get(V);t.deleteTexture(U.__webglTexture);const ne=V.source,le=h.get(ne);delete le[U.__cacheKey],s.memory.textures--}function C(V){const U=r.get(V);if(V.depthTexture&&(V.depthTexture.dispose(),r.remove(V.depthTexture)),V.isWebGLCubeRenderTarget)for(let le=0;le<6;le++){if(Array.isArray(U.__webglFramebuffer[le]))for(let Ce=0;Ce=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+V+" texture units while this GPU supports only "+i.maxTextures),N+=1,V}function B(V){const U=[];return U.push(V.wrapS),U.push(V.wrapT),U.push(V.wrapR||0),U.push(V.magFilter),U.push(V.minFilter),U.push(V.anisotropy),U.push(V.internalFormat),U.push(V.format),U.push(V.type),U.push(V.generateMipmaps),U.push(V.premultiplyAlpha),U.push(V.flipY),U.push(V.unpackAlignment),U.push(V.colorSpace),U.join()}function G(V,U){const ne=r.get(V);if(V.isVideoTexture&&he(V),V.isRenderTargetTexture===!1&&V.version>0&&ne.__version!==V.version){const le=V.image;if(le===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(le.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{J(ne,V,U);return}}n.bindTexture(t.TEXTURE_2D,ne.__webglTexture,t.TEXTURE0+U)}function X(V,U){const ne=r.get(V);if(V.version>0&&ne.__version!==V.version){J(ne,V,U);return}n.bindTexture(t.TEXTURE_2D_ARRAY,ne.__webglTexture,t.TEXTURE0+U)}function Z(V,U){const ne=r.get(V);if(V.version>0&&ne.__version!==V.version){J(ne,V,U);return}n.bindTexture(t.TEXTURE_3D,ne.__webglTexture,t.TEXTURE0+U)}function F(V,U){const ne=r.get(V);if(V.version>0&&ne.__version!==V.version){ce(ne,V,U);return}n.bindTexture(t.TEXTURE_CUBE_MAP,ne.__webglTexture,t.TEXTURE0+U)}const q={[Cm]:t.REPEAT,[Ii]:t.CLAMP_TO_EDGE,[Tm]:t.MIRRORED_REPEAT},K={[Mr]:t.NEAREST,[DR]:t.NEAREST_MIPMAP_NEAREST,[Hf]:t.NEAREST_MIPMAP_LINEAR,[cr]:t.LINEAR,[Lp]:t.LINEAR_MIPMAP_NEAREST,[Is]:t.LINEAR_MIPMAP_LINEAR},Q={[UU]:t.NEVER,[HU]:t.ALWAYS,[BU]:t.LESS,[XR]:t.LEQUAL,[jU]:t.EQUAL,[WU]:t.GEQUAL,[VU]:t.GREATER,[$U]:t.NOTEQUAL};function de(V,U){if(U.type===li&&e.has("OES_texture_float_linear")===!1&&(U.magFilter===cr||U.magFilter===Lp||U.magFilter===Hf||U.magFilter===Is||U.minFilter===cr||U.minFilter===Lp||U.minFilter===Hf||U.minFilter===Is)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(V,t.TEXTURE_WRAP_S,q[U.wrapS]),t.texParameteri(V,t.TEXTURE_WRAP_T,q[U.wrapT]),(V===t.TEXTURE_3D||V===t.TEXTURE_2D_ARRAY)&&t.texParameteri(V,t.TEXTURE_WRAP_R,q[U.wrapR]),t.texParameteri(V,t.TEXTURE_MAG_FILTER,K[U.magFilter]),t.texParameteri(V,t.TEXTURE_MIN_FILTER,K[U.minFilter]),U.compareFunction&&(t.texParameteri(V,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(V,t.TEXTURE_COMPARE_FUNC,Q[U.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(U.magFilter===Mr||U.minFilter!==Hf&&U.minFilter!==Is||U.type===li&&e.has("OES_texture_float_linear")===!1)return;if(U.anisotropy>1||r.get(U).__currentAnisotropy){const ne=e.get("EXT_texture_filter_anisotropic");t.texParameterf(V,ne.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(U.anisotropy,i.getMaxAnisotropy())),r.get(U).__currentAnisotropy=U.anisotropy}}}function fe(V,U){let ne=!1;V.__webglInit===void 0&&(V.__webglInit=!0,U.addEventListener("dispose",P));const le=U.source;let Ce=h.get(le);Ce===void 0&&(Ce={},h.set(le,Ce));const ve=B(U);if(ve!==V.__cacheKey){Ce[ve]===void 0&&(Ce[ve]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,ne=!0),Ce[ve].usedTimes++;const He=Ce[V.__cacheKey];He!==void 0&&(Ce[V.__cacheKey].usedTimes--,He.usedTimes===0&&k(U)),V.__cacheKey=ve,V.__webglTexture=Ce[ve].texture}return ne}function J(V,U,ne){let le=t.TEXTURE_2D;(U.isDataArrayTexture||U.isCompressedArrayTexture)&&(le=t.TEXTURE_2D_ARRAY),U.isData3DTexture&&(le=t.TEXTURE_3D);const Ce=fe(V,U),ve=U.source;n.bindTexture(le,V.__webglTexture,t.TEXTURE0+ne);const He=r.get(ve);if(ve.version!==He.__version||Ce===!0){n.activeTexture(t.TEXTURE0+ne);const Ae=Jt.getPrimaries(Jt.workingColorSpace),Ee=U.colorSpace===ga?null:Jt.getPrimaries(U.colorSpace),bt=U.colorSpace===ga||Ae===Ee?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,U.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,U.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,U.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,bt);let ke=x(U.image,!1,i.maxTextureSize);ke=qe(U,ke);const it=o.convert(U.format,U.colorSpace),Oe=o.convert(U.type);let Ye=_(U.internalFormat,it,Oe,U.colorSpace,U.isVideoTexture);de(le,U);let me;const Fe=U.mipmaps,Je=U.isVideoTexture!==!0,gt=He.__version===void 0||Ce===!0,ee=ve.dataReady,Ue=A(U,ke);if(U.isDepthTexture)Ye=S(U.format===du,U.type),gt&&(Je?n.texStorage2D(t.TEXTURE_2D,1,Ye,ke.width,ke.height):n.texImage2D(t.TEXTURE_2D,0,Ye,ke.width,ke.height,0,it,Oe,null));else if(U.isDataTexture)if(Fe.length>0){Je&>&&n.texStorage2D(t.TEXTURE_2D,Ue,Ye,Fe[0].width,Fe[0].height);for(let ye=0,Pe=Fe.length;ye0){const We=cC(me.width,me.height,U.format,U.type);for(const Ke of U.layerUpdates){const Pt=me.data.subarray(Ke*We/me.data.BYTES_PER_ELEMENT,(Ke+1)*We/me.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,ye,0,0,Ke,me.width,me.height,1,it,Pt)}U.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,ye,0,0,0,me.width,me.height,ke.depth,it,me.data)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,ye,Ye,me.width,me.height,ke.depth,0,me.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Je?ee&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,ye,0,0,0,me.width,me.height,ke.depth,it,Oe,me.data):n.texImage3D(t.TEXTURE_2D_ARRAY,ye,Ye,me.width,me.height,ke.depth,0,it,Oe,me.data)}else{Je&>&&n.texStorage2D(t.TEXTURE_2D,Ue,Ye,Fe[0].width,Fe[0].height);for(let ye=0,Pe=Fe.length;ye0){const ye=cC(ke.width,ke.height,U.format,U.type);for(const Pe of U.layerUpdates){const We=ke.data.subarray(Pe*ye/ke.data.BYTES_PER_ELEMENT,(Pe+1)*ye/ke.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,Pe,ke.width,ke.height,1,it,Oe,We)}U.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,ke.width,ke.height,ke.depth,it,Oe,ke.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,Ye,ke.width,ke.height,ke.depth,0,it,Oe,ke.data);else if(U.isData3DTexture)Je?(gt&&n.texStorage3D(t.TEXTURE_3D,Ue,Ye,ke.width,ke.height,ke.depth),ee&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,ke.width,ke.height,ke.depth,it,Oe,ke.data)):n.texImage3D(t.TEXTURE_3D,0,Ye,ke.width,ke.height,ke.depth,0,it,Oe,ke.data);else if(U.isFramebufferTexture){if(gt)if(Je)n.texStorage2D(t.TEXTURE_2D,Ue,Ye,ke.width,ke.height);else{let ye=ke.width,Pe=ke.height;for(let We=0;We>=1,Pe>>=1}}else if(Fe.length>0){if(Je&>){const ye=Le(Fe[0]);n.texStorage2D(t.TEXTURE_2D,Ue,Ye,ye.width,ye.height)}for(let ye=0,Pe=Fe.length;ye0&&Ue++;const Pe=Le(it[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,Ue,Fe,Pe.width,Pe.height)}for(let Pe=0;Pe<6;Pe++)if(ke){Je?ee&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,0,0,it[Pe].width,it[Pe].height,Ye,me,it[Pe].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,Fe,it[Pe].width,it[Pe].height,0,Ye,me,it[Pe].data);for(let We=0;We>ve),Oe=Math.max(1,U.height>>ve);Ce===t.TEXTURE_3D||Ce===t.TEXTURE_2D_ARRAY?n.texImage3D(Ce,ve,Ee,it,Oe,U.depth,0,He,Ae,null):n.texImage2D(Ce,ve,Ee,it,Oe,0,He,Ae,null)}n.bindFramebuffer(t.FRAMEBUFFER,V),De(U)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,le,Ce,ke.__webglTexture,0,Re(U)):(Ce===t.TEXTURE_2D||Ce>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&Ce<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,le,Ce,ke.__webglTexture,ve),n.bindFramebuffer(t.FRAMEBUFFER,null)}function be(V,U,ne){if(t.bindRenderbuffer(t.RENDERBUFFER,V),U.depthBuffer){const le=U.depthTexture,Ce=le&&le.isDepthTexture?le.type:null,ve=S(U.stencilBuffer,Ce),He=U.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ae=Re(U);De(U)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Ae,ve,U.width,U.height):ne?t.renderbufferStorageMultisample(t.RENDERBUFFER,Ae,ve,U.width,U.height):t.renderbufferStorage(t.RENDERBUFFER,ve,U.width,U.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,He,t.RENDERBUFFER,V)}else{const le=U.textures;for(let Ce=0;Ce{delete U.__boundDepthTexture,delete U.__depthDisposeCallback,le.removeEventListener("dispose",Ce)};le.addEventListener("dispose",Ce),U.__depthDisposeCallback=Ce}U.__boundDepthTexture=le}if(V.depthTexture&&!U.__autoAllocateDepthBuffer){if(ne)throw new Error("target.depthTexture not supported in Cube render targets");Xe(U.__webglFramebuffer,V)}else if(ne){U.__webglDepthbuffer=[];for(let le=0;le<6;le++)if(n.bindFramebuffer(t.FRAMEBUFFER,U.__webglFramebuffer[le]),U.__webglDepthbuffer[le]===void 0)U.__webglDepthbuffer[le]=t.createRenderbuffer(),be(U.__webglDepthbuffer[le],V,!1);else{const Ce=V.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,ve=U.__webglDepthbuffer[le];t.bindRenderbuffer(t.RENDERBUFFER,ve),t.framebufferRenderbuffer(t.FRAMEBUFFER,Ce,t.RENDERBUFFER,ve)}}else if(n.bindFramebuffer(t.FRAMEBUFFER,U.__webglFramebuffer),U.__webglDepthbuffer===void 0)U.__webglDepthbuffer=t.createRenderbuffer(),be(U.__webglDepthbuffer,V,!1);else{const le=V.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ce=U.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,Ce),t.framebufferRenderbuffer(t.FRAMEBUFFER,le,t.RENDERBUFFER,Ce)}n.bindFramebuffer(t.FRAMEBUFFER,null)}function tt(V,U,ne){const le=r.get(V);U!==void 0&&_e(le.__webglFramebuffer,V,V.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),ne!==void 0&&$e(V)}function Ve(V){const U=V.texture,ne=r.get(V),le=r.get(U);V.addEventListener("dispose",R);const Ce=V.textures,ve=V.isWebGLCubeRenderTarget===!0,He=Ce.length>1;if(He||(le.__webglTexture===void 0&&(le.__webglTexture=t.createTexture()),le.__version=U.version,s.memory.textures++),ve){ne.__webglFramebuffer=[];for(let Ae=0;Ae<6;Ae++)if(U.mipmaps&&U.mipmaps.length>0){ne.__webglFramebuffer[Ae]=[];for(let Ee=0;Ee0){ne.__webglFramebuffer=[];for(let Ae=0;Ae0&&De(V)===!1){ne.__webglMultisampledFramebuffer=t.createFramebuffer(),ne.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,ne.__webglMultisampledFramebuffer);for(let Ae=0;Ae0)for(let Ee=0;Ee0)for(let Ee=0;Ee0){if(De(V)===!1){const U=V.textures,ne=V.width,le=V.height;let Ce=t.COLOR_BUFFER_BIT;const ve=V.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,He=r.get(V),Ae=U.length>1;if(Ae)for(let Ee=0;Ee0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&U.__useRenderToTexture!==!1}function he(V){const U=s.render.frame;u.get(V)!==U&&(u.set(V,U),V.update())}function qe(V,U){const ne=V.colorSpace,le=V.format,Ce=V.type;return V.isCompressedTexture===!0||V.isVideoTexture===!0||ne!==Cu&&ne!==ga&&(Jt.getTransfer(ne)===dn?(le!==Ir||Ce!==ji)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ne)),U}function Le(V){return typeof HTMLImageElement<"u"&&V instanceof HTMLImageElement?(c.width=V.naturalWidth||V.width,c.height=V.naturalHeight||V.height):typeof VideoFrame<"u"&&V instanceof VideoFrame?(c.width=V.displayWidth,c.height=V.displayHeight):(c.width=V.width,c.height=V.height),c}this.allocateTextureUnit=D,this.resetTextureUnits=z,this.setTexture2D=G,this.setTexture2DArray=X,this.setTexture3D=Z,this.setTextureCube=F,this.rebindTextures=tt,this.setupRenderTarget=Ve,this.updateRenderTargetMipmap=se,this.updateMultisampleRenderTarget=Ie,this.setupDepthRenderbuffer=$e,this.setupFrameBufferTexture=_e,this.useMultisampledRTT=De}function aB(t,e){function n(r,i=ga){let o;const s=Jt.getTransfer(i);if(r===ji)return t.UNSIGNED_BYTE;if(r===i_)return t.UNSIGNED_SHORT_4_4_4_4;if(r===o_)return t.UNSIGNED_SHORT_5_5_5_1;if(r===UR)return t.UNSIGNED_INT_5_9_9_9_REV;if(r===FR)return t.BYTE;if(r===zR)return t.SHORT;if(r===Rd)return t.UNSIGNED_SHORT;if(r===r_)return t.INT;if(r===Da)return t.UNSIGNED_INT;if(r===li)return t.FLOAT;if(r===Eu)return t.HALF_FLOAT;if(r===BR)return t.ALPHA;if(r===jR)return t.RGB;if(r===Ir)return t.RGBA;if(r===VR)return t.LUMINANCE;if(r===$R)return t.LUMINANCE_ALPHA;if(r===Gc)return t.DEPTH_COMPONENT;if(r===du)return t.DEPTH_STENCIL;if(r===hg)return t.RED;if(r===pg)return t.RED_INTEGER;if(r===WR)return t.RG;if(r===s_)return t.RG_INTEGER;if(r===a_)return t.RGBA_INTEGER;if(r===Op||r===Dp||r===Fp||r===zp)if(s===dn)if(o=e.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(r===Op)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Dp)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===Fp)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===zp)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=e.get("WEBGL_compressed_texture_s3tc"),o!==null){if(r===Op)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Dp)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Fp)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===zp)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===W1||r===H1||r===G1||r===X1)if(o=e.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(r===W1)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===H1)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===G1)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===X1)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===q1||r===Y1||r===K1)if(o=e.get("WEBGL_compressed_texture_etc"),o!==null){if(r===q1||r===Y1)return s===dn?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(r===K1)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===Z1||r===J1||r===Q1||r===ex||r===tx||r===nx||r===rx||r===ix||r===ox||r===sx||r===ax||r===lx||r===cx||r===ux)if(o=e.get("WEBGL_compressed_texture_astc"),o!==null){if(r===Z1)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===J1)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===Q1)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===ex)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===tx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===nx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===rx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===ix)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===ox)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===sx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===ax)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===lx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===cx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===ux)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Up||r===fx||r===dx)if(o=e.get("EXT_texture_compression_bptc"),o!==null){if(r===Up)return s===dn?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===fx)return o.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===dx)return o.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===HR||r===hx||r===px||r===mx)if(o=e.get("EXT_texture_compression_rgtc"),o!==null){if(r===Up)return o.COMPRESSED_RED_RGTC1_EXT;if(r===hx)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===px)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===mx)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===fu?t.UNSIGNED_INT_24_8:t[r]!==void 0?t[r]:null}return{convert:n}}class lB extends br{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}let qf=class extends rn{constructor(){super(),this.isGroup=!0,this.type="Group"}};const jue={type:"move"};class kM{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new qf,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 qf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new H,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new H),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new qf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new H,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new H),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const 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,o=null,s=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){s=!0;for(const x of e.hand.values()){const y=n.getJointPose(x,r),g=this._getHandJoint(c,x);y!==null&&(g.matrix.fromArray(y.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=y.radius),g.visible=y!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),m=.02,v=.005;c.inputState.pinching&&h>m+v?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=m-v&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=n.getPose(e.gripSpace,r),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&o!==null&&(i=o),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(jue)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new qf;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}const Vue=` +}`;function Nue(t,e,n){let r=new yg;const i=new Ne,o=new Ne,s=new en,a=new eA({depthPacking:FU}),l=new tA,c={},u=n.maxTextureSize,f={[Oa]:hi,[hi]:Oa,[es]:es},h=new as({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ne},radius:{value:4}},vertexShader:Pue,fragmentShader:Iue}),m=h.clone();m.defines.HORIZONTAL_PASS=1;const v=new Dt;v.setAttribute("position",new pn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new rr(v,h),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=i_;let g=this.type;this.render=function(P,R,L){if(y.enabled===!1||y.autoUpdate===!1&&y.needsUpdate===!1||P.length===0)return;const k=t.getRenderTarget(),C=t.getActiveCubeFace(),N=t.getActiveMipmapLevel(),z=t.state;z.setBlending(Ca),z.buffers.color.setClear(1,1,1,1),z.buffers.depth.setTest(!0),z.setScissorTest(!1);const D=g!==Ko&&this.type===Ko,B=g===Ko&&this.type!==Ko;for(let G=0,X=P.length;Gu||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/q.x),i.x=o.x*q.x,F.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/q.y),i.y=o.y*q.y,F.mapSize.y=o.y)),F.map===null||D===!0||B===!0){const Q=this.type!==Ko?{minFilter:Mr,magFilter:Mr}:{};F.map!==null&&F.map.dispose(),F.map=new ss(i.x,i.y,Q),F.map.texture.name=Z.name+".shadowMap",F.camera.updateProjectionMatrix()}t.setRenderTarget(F.map),t.clear();const K=F.getViewportCount();for(let Q=0;Q0||R.map&&R.alphaTest>0){const z=C.uuid,D=R.uuid;let B=c[z];B===void 0&&(B={},c[z]=B);let G=B[D];G===void 0&&(G=C.clone(),B[D]=G,R.addEventListener("dispose",A)),C=G}if(C.visible=R.visible,C.wireframe=R.wireframe,k===Ko?C.side=R.shadowSide!==null?R.shadowSide:R.side:C.side=R.shadowSide!==null?R.shadowSide:f[R.side],C.alphaMap=R.alphaMap,C.alphaTest=R.alphaTest,C.map=R.map,C.clipShadows=R.clipShadows,C.clippingPlanes=R.clippingPlanes,C.clipIntersection=R.clipIntersection,C.displacementMap=R.displacementMap,C.displacementScale=R.displacementScale,C.displacementBias=R.displacementBias,C.wireframeLinewidth=R.wireframeLinewidth,C.linewidth=R.linewidth,L.isPointLight===!0&&C.isMeshDistanceMaterial===!0){const z=t.properties.get(C);z.light=L}return C}function S(P,R,L,k,C){if(P.visible===!1)return;if(P.layers.test(R.layers)&&(P.isMesh||P.isLine||P.isPoints)&&(P.castShadow||P.receiveShadow&&C===Ko)&&(!P.frustumCulled||r.intersectsObject(P))){P.modelViewMatrix.multiplyMatrices(L.matrixWorldInverse,P.matrixWorld);const D=e.update(P),B=P.material;if(Array.isArray(B)){const G=D.groups;for(let X=0,Z=G.length;X=1):F.indexOf("OpenGL ES")!==-1&&(Z=parseFloat(/^OpenGL ES (\d)/.exec(F)[1]),X=Z>=2);let q=null,K={};const Q=t.getParameter(t.SCISSOR_BOX),de=t.getParameter(t.VIEWPORT),fe=new en().fromArray(Q),J=new en().fromArray(de);function ce(ee,Ue,ye,Pe){const We=new Uint8Array(4),Ke=t.createTexture();t.bindTexture(ee,Ke),t.texParameteri(ee,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(ee,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Pt=0;Pte?(t.repeat.x=1,t.repeat.y=n/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2):(t.repeat.x=e/n,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0),t}function Due(t,e){const n=t.image&&t.image.width?t.image.width/t.image.height:1;return n>e?(t.repeat.x=e/n,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0):(t.repeat.x=1,t.repeat.y=n/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2),t}function Fue(t){return t.repeat.x=1,t.repeat.y=1,t.offset.x=0,t.offset.y=0,t}function uC(t,e,n,r){const i=zue(r);switch(n){case BR:return t*e;case VR:return t*e;case $R:return t*e*2;case hg:return t*e/i.components*i.byteLength;case pg:return t*e/i.components*i.byteLength;case WR:return t*e*2/i.components*i.byteLength;case l_:return t*e*2/i.components*i.byteLength;case jR:return t*e*3/i.components*i.byteLength;case Ir:return t*e*4/i.components*i.byteLength;case c_:return t*e*4/i.components*i.byteLength;case Op:case Dp:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Fp:case zp:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case G1:case q1:return Math.max(t,16)*Math.max(e,8)/4;case H1:case X1:return Math.max(t,8)*Math.max(e,8)/2;case Y1:case K1:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case Z1:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case J1:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case Q1:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case ex:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case tx:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case nx:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case rx:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case ix:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case ox:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case sx:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case ax:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case lx:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case cx:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case ux:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case fx:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case Up:case dx:case hx:return Math.ceil(t/4)*Math.ceil(e/4)*16;case HR:case px:return Math.ceil(t/4)*Math.ceil(e/4)*8;case mx:case gx:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function zue(t){switch(t){case ji:case FR:return{byteLength:1,components:1};case Rd:case zR:case Eu:return{byteLength:2,components:1};case s_:case a_:return{byteLength:2,components:4};case Fa:case o_:case ci:return{byteLength:4,components:1};case UR:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}const Uue={contain:Oue,cover:Due,fill:Fue,getByteLength:uC};function Bue(t,e,n,r,i,o,s){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new Ne,u=new WeakMap;let f;const h=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(V,U){return m?new OffscreenCanvas(V,U):Nm("canvas")}function x(V,U,ne){let le=1;const Ce=Le(V);if((Ce.width>ne||Ce.height>ne)&&(le=ne/Math.max(Ce.width,Ce.height)),le<1)if(typeof HTMLImageElement<"u"&&V instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&V instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&V instanceof ImageBitmap||typeof VideoFrame<"u"&&V instanceof VideoFrame){const ve=Math.floor(le*Ce.width),He=Math.floor(le*Ce.height);f===void 0&&(f=v(ve,He));const Ae=U?v(ve,He):f;return Ae.width=ve,Ae.height=He,Ae.getContext("2d").drawImage(V,0,0,ve,He),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Ce.width+"x"+Ce.height+") to ("+ve+"x"+He+")."),Ae}else return"data"in V&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Ce.width+"x"+Ce.height+")."),V;return V}function y(V){return V.generateMipmaps}function g(V){t.generateMipmap(V)}function b(V){return V.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:V.isWebGL3DRenderTarget?t.TEXTURE_3D:V.isWebGLArrayRenderTarget||V.isCompressedArrayTexture?t.TEXTURE_2D_ARRAY:t.TEXTURE_2D}function _(V,U,ne,le,Ce=!1){if(V!==null){if(t[V]!==void 0)return t[V];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+V+"'")}let ve=U;if(U===t.RED&&(ne===t.FLOAT&&(ve=t.R32F),ne===t.HALF_FLOAT&&(ve=t.R16F),ne===t.UNSIGNED_BYTE&&(ve=t.R8)),U===t.RED_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ve=t.R8UI),ne===t.UNSIGNED_SHORT&&(ve=t.R16UI),ne===t.UNSIGNED_INT&&(ve=t.R32UI),ne===t.BYTE&&(ve=t.R8I),ne===t.SHORT&&(ve=t.R16I),ne===t.INT&&(ve=t.R32I)),U===t.RG&&(ne===t.FLOAT&&(ve=t.RG32F),ne===t.HALF_FLOAT&&(ve=t.RG16F),ne===t.UNSIGNED_BYTE&&(ve=t.RG8)),U===t.RG_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ve=t.RG8UI),ne===t.UNSIGNED_SHORT&&(ve=t.RG16UI),ne===t.UNSIGNED_INT&&(ve=t.RG32UI),ne===t.BYTE&&(ve=t.RG8I),ne===t.SHORT&&(ve=t.RG16I),ne===t.INT&&(ve=t.RG32I)),U===t.RGB_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ve=t.RGB8UI),ne===t.UNSIGNED_SHORT&&(ve=t.RGB16UI),ne===t.UNSIGNED_INT&&(ve=t.RGB32UI),ne===t.BYTE&&(ve=t.RGB8I),ne===t.SHORT&&(ve=t.RGB16I),ne===t.INT&&(ve=t.RGB32I)),U===t.RGBA_INTEGER&&(ne===t.UNSIGNED_BYTE&&(ve=t.RGBA8UI),ne===t.UNSIGNED_SHORT&&(ve=t.RGBA16UI),ne===t.UNSIGNED_INT&&(ve=t.RGBA32UI),ne===t.BYTE&&(ve=t.RGBA8I),ne===t.SHORT&&(ve=t.RGBA16I),ne===t.INT&&(ve=t.RGBA32I)),U===t.RGB&&ne===t.UNSIGNED_INT_5_9_9_9_REV&&(ve=t.RGB9_E5),U===t.RGBA){const He=Ce?mg:Jt.getTransfer(le);ne===t.FLOAT&&(ve=t.RGBA32F),ne===t.HALF_FLOAT&&(ve=t.RGBA16F),ne===t.UNSIGNED_BYTE&&(ve=He===dn?t.SRGB8_ALPHA8:t.RGBA8),ne===t.UNSIGNED_SHORT_4_4_4_4&&(ve=t.RGBA4),ne===t.UNSIGNED_SHORT_5_5_5_1&&(ve=t.RGB5_A1)}return(ve===t.R16F||ve===t.R32F||ve===t.RG16F||ve===t.RG32F||ve===t.RGBA16F||ve===t.RGBA32F)&&e.get("EXT_color_buffer_float"),ve}function S(V,U){let ne;return V?U===null||U===Fa||U===fu?ne=t.DEPTH24_STENCIL8:U===ci?ne=t.DEPTH32F_STENCIL8:U===Rd&&(ne=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):U===null||U===Fa||U===fu?ne=t.DEPTH_COMPONENT24:U===ci?ne=t.DEPTH_COMPONENT32F:U===Rd&&(ne=t.DEPTH_COMPONENT16),ne}function A(V,U){return y(V)===!0||V.isFramebufferTexture&&V.minFilter!==Mr&&V.minFilter!==cr?Math.log2(Math.max(U.width,U.height))+1:V.mipmaps!==void 0&&V.mipmaps.length>0?V.mipmaps.length:V.isCompressedTexture&&Array.isArray(V.image)?U.mipmaps.length:1}function P(V){const U=V.target;U.removeEventListener("dispose",P),L(U),U.isVideoTexture&&u.delete(U)}function R(V){const U=V.target;U.removeEventListener("dispose",R),C(U)}function L(V){const U=r.get(V);if(U.__webglInit===void 0)return;const ne=V.source,le=h.get(ne);if(le){const Ce=le[U.__cacheKey];Ce.usedTimes--,Ce.usedTimes===0&&k(V),Object.keys(le).length===0&&h.delete(ne)}r.remove(V)}function k(V){const U=r.get(V);t.deleteTexture(U.__webglTexture);const ne=V.source,le=h.get(ne);delete le[U.__cacheKey],s.memory.textures--}function C(V){const U=r.get(V);if(V.depthTexture&&(V.depthTexture.dispose(),r.remove(V.depthTexture)),V.isWebGLCubeRenderTarget)for(let le=0;le<6;le++){if(Array.isArray(U.__webglFramebuffer[le]))for(let Ce=0;Ce=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+V+" texture units while this GPU supports only "+i.maxTextures),N+=1,V}function B(V){const U=[];return U.push(V.wrapS),U.push(V.wrapT),U.push(V.wrapR||0),U.push(V.magFilter),U.push(V.minFilter),U.push(V.anisotropy),U.push(V.internalFormat),U.push(V.format),U.push(V.type),U.push(V.generateMipmaps),U.push(V.premultiplyAlpha),U.push(V.flipY),U.push(V.unpackAlignment),U.push(V.colorSpace),U.join()}function G(V,U){const ne=r.get(V);if(V.isVideoTexture&&he(V),V.isRenderTargetTexture===!1&&V.version>0&&ne.__version!==V.version){const le=V.image;if(le===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(le.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{J(ne,V,U);return}}n.bindTexture(t.TEXTURE_2D,ne.__webglTexture,t.TEXTURE0+U)}function X(V,U){const ne=r.get(V);if(V.version>0&&ne.__version!==V.version){J(ne,V,U);return}n.bindTexture(t.TEXTURE_2D_ARRAY,ne.__webglTexture,t.TEXTURE0+U)}function Z(V,U){const ne=r.get(V);if(V.version>0&&ne.__version!==V.version){J(ne,V,U);return}n.bindTexture(t.TEXTURE_3D,ne.__webglTexture,t.TEXTURE0+U)}function F(V,U){const ne=r.get(V);if(V.version>0&&ne.__version!==V.version){ce(ne,V,U);return}n.bindTexture(t.TEXTURE_CUBE_MAP,ne.__webglTexture,t.TEXTURE0+U)}const q={[Cm]:t.REPEAT,[Ni]:t.CLAMP_TO_EDGE,[Tm]:t.MIRRORED_REPEAT},K={[Mr]:t.NEAREST,[DR]:t.NEAREST_MIPMAP_NEAREST,[Hf]:t.NEAREST_MIPMAP_LINEAR,[cr]:t.LINEAR,[Lp]:t.LINEAR_MIPMAP_NEAREST,[Ns]:t.LINEAR_MIPMAP_LINEAR},Q={[UU]:t.NEVER,[HU]:t.ALWAYS,[BU]:t.LESS,[XR]:t.LEQUAL,[jU]:t.EQUAL,[WU]:t.GEQUAL,[VU]:t.GREATER,[$U]:t.NOTEQUAL};function de(V,U){if(U.type===ci&&e.has("OES_texture_float_linear")===!1&&(U.magFilter===cr||U.magFilter===Lp||U.magFilter===Hf||U.magFilter===Ns||U.minFilter===cr||U.minFilter===Lp||U.minFilter===Hf||U.minFilter===Ns)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(V,t.TEXTURE_WRAP_S,q[U.wrapS]),t.texParameteri(V,t.TEXTURE_WRAP_T,q[U.wrapT]),(V===t.TEXTURE_3D||V===t.TEXTURE_2D_ARRAY)&&t.texParameteri(V,t.TEXTURE_WRAP_R,q[U.wrapR]),t.texParameteri(V,t.TEXTURE_MAG_FILTER,K[U.magFilter]),t.texParameteri(V,t.TEXTURE_MIN_FILTER,K[U.minFilter]),U.compareFunction&&(t.texParameteri(V,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(V,t.TEXTURE_COMPARE_FUNC,Q[U.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(U.magFilter===Mr||U.minFilter!==Hf&&U.minFilter!==Ns||U.type===ci&&e.has("OES_texture_float_linear")===!1)return;if(U.anisotropy>1||r.get(U).__currentAnisotropy){const ne=e.get("EXT_texture_filter_anisotropic");t.texParameterf(V,ne.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(U.anisotropy,i.getMaxAnisotropy())),r.get(U).__currentAnisotropy=U.anisotropy}}}function fe(V,U){let ne=!1;V.__webglInit===void 0&&(V.__webglInit=!0,U.addEventListener("dispose",P));const le=U.source;let Ce=h.get(le);Ce===void 0&&(Ce={},h.set(le,Ce));const ve=B(U);if(ve!==V.__cacheKey){Ce[ve]===void 0&&(Ce[ve]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,ne=!0),Ce[ve].usedTimes++;const He=Ce[V.__cacheKey];He!==void 0&&(Ce[V.__cacheKey].usedTimes--,He.usedTimes===0&&k(U)),V.__cacheKey=ve,V.__webglTexture=Ce[ve].texture}return ne}function J(V,U,ne){let le=t.TEXTURE_2D;(U.isDataArrayTexture||U.isCompressedArrayTexture)&&(le=t.TEXTURE_2D_ARRAY),U.isData3DTexture&&(le=t.TEXTURE_3D);const Ce=fe(V,U),ve=U.source;n.bindTexture(le,V.__webglTexture,t.TEXTURE0+ne);const He=r.get(ve);if(ve.version!==He.__version||Ce===!0){n.activeTexture(t.TEXTURE0+ne);const Ae=Jt.getPrimaries(Jt.workingColorSpace),Ee=U.colorSpace===va?null:Jt.getPrimaries(U.colorSpace),bt=U.colorSpace===va||Ae===Ee?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,U.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,U.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,U.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,bt);let ke=x(U.image,!1,i.maxTextureSize);ke=qe(U,ke);const it=o.convert(U.format,U.colorSpace),Oe=o.convert(U.type);let Ye=_(U.internalFormat,it,Oe,U.colorSpace,U.isVideoTexture);de(le,U);let me;const Fe=U.mipmaps,Je=U.isVideoTexture!==!0,gt=He.__version===void 0||Ce===!0,ee=ve.dataReady,Ue=A(U,ke);if(U.isDepthTexture)Ye=S(U.format===du,U.type),gt&&(Je?n.texStorage2D(t.TEXTURE_2D,1,Ye,ke.width,ke.height):n.texImage2D(t.TEXTURE_2D,0,Ye,ke.width,ke.height,0,it,Oe,null));else if(U.isDataTexture)if(Fe.length>0){Je&>&&n.texStorage2D(t.TEXTURE_2D,Ue,Ye,Fe[0].width,Fe[0].height);for(let ye=0,Pe=Fe.length;ye0){const We=uC(me.width,me.height,U.format,U.type);for(const Ke of U.layerUpdates){const Pt=me.data.subarray(Ke*We/me.data.BYTES_PER_ELEMENT,(Ke+1)*We/me.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,ye,0,0,Ke,me.width,me.height,1,it,Pt)}U.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,ye,0,0,0,me.width,me.height,ke.depth,it,me.data)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,ye,Ye,me.width,me.height,ke.depth,0,me.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Je?ee&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,ye,0,0,0,me.width,me.height,ke.depth,it,Oe,me.data):n.texImage3D(t.TEXTURE_2D_ARRAY,ye,Ye,me.width,me.height,ke.depth,0,it,Oe,me.data)}else{Je&>&&n.texStorage2D(t.TEXTURE_2D,Ue,Ye,Fe[0].width,Fe[0].height);for(let ye=0,Pe=Fe.length;ye0){const ye=uC(ke.width,ke.height,U.format,U.type);for(const Pe of U.layerUpdates){const We=ke.data.subarray(Pe*ye/ke.data.BYTES_PER_ELEMENT,(Pe+1)*ye/ke.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,Pe,ke.width,ke.height,1,it,Oe,We)}U.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,ke.width,ke.height,ke.depth,it,Oe,ke.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,Ye,ke.width,ke.height,ke.depth,0,it,Oe,ke.data);else if(U.isData3DTexture)Je?(gt&&n.texStorage3D(t.TEXTURE_3D,Ue,Ye,ke.width,ke.height,ke.depth),ee&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,ke.width,ke.height,ke.depth,it,Oe,ke.data)):n.texImage3D(t.TEXTURE_3D,0,Ye,ke.width,ke.height,ke.depth,0,it,Oe,ke.data);else if(U.isFramebufferTexture){if(gt)if(Je)n.texStorage2D(t.TEXTURE_2D,Ue,Ye,ke.width,ke.height);else{let ye=ke.width,Pe=ke.height;for(let We=0;We>=1,Pe>>=1}}else if(Fe.length>0){if(Je&>){const ye=Le(Fe[0]);n.texStorage2D(t.TEXTURE_2D,Ue,Ye,ye.width,ye.height)}for(let ye=0,Pe=Fe.length;ye0&&Ue++;const Pe=Le(it[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,Ue,Fe,Pe.width,Pe.height)}for(let Pe=0;Pe<6;Pe++)if(ke){Je?ee&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,0,0,it[Pe].width,it[Pe].height,Ye,me,it[Pe].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,Fe,it[Pe].width,it[Pe].height,0,Ye,me,it[Pe].data);for(let We=0;We>ve),Oe=Math.max(1,U.height>>ve);Ce===t.TEXTURE_3D||Ce===t.TEXTURE_2D_ARRAY?n.texImage3D(Ce,ve,Ee,it,Oe,U.depth,0,He,Ae,null):n.texImage2D(Ce,ve,Ee,it,Oe,0,He,Ae,null)}n.bindFramebuffer(t.FRAMEBUFFER,V),De(U)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,le,Ce,ke.__webglTexture,0,Re(U)):(Ce===t.TEXTURE_2D||Ce>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&Ce<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,le,Ce,ke.__webglTexture,ve),n.bindFramebuffer(t.FRAMEBUFFER,null)}function be(V,U,ne){if(t.bindRenderbuffer(t.RENDERBUFFER,V),U.depthBuffer){const le=U.depthTexture,Ce=le&&le.isDepthTexture?le.type:null,ve=S(U.stencilBuffer,Ce),He=U.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ae=Re(U);De(U)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Ae,ve,U.width,U.height):ne?t.renderbufferStorageMultisample(t.RENDERBUFFER,Ae,ve,U.width,U.height):t.renderbufferStorage(t.RENDERBUFFER,ve,U.width,U.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,He,t.RENDERBUFFER,V)}else{const le=U.textures;for(let Ce=0;Ce{delete U.__boundDepthTexture,delete U.__depthDisposeCallback,le.removeEventListener("dispose",Ce)};le.addEventListener("dispose",Ce),U.__depthDisposeCallback=Ce}U.__boundDepthTexture=le}if(V.depthTexture&&!U.__autoAllocateDepthBuffer){if(ne)throw new Error("target.depthTexture not supported in Cube render targets");Xe(U.__webglFramebuffer,V)}else if(ne){U.__webglDepthbuffer=[];for(let le=0;le<6;le++)if(n.bindFramebuffer(t.FRAMEBUFFER,U.__webglFramebuffer[le]),U.__webglDepthbuffer[le]===void 0)U.__webglDepthbuffer[le]=t.createRenderbuffer(),be(U.__webglDepthbuffer[le],V,!1);else{const Ce=V.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,ve=U.__webglDepthbuffer[le];t.bindRenderbuffer(t.RENDERBUFFER,ve),t.framebufferRenderbuffer(t.FRAMEBUFFER,Ce,t.RENDERBUFFER,ve)}}else if(n.bindFramebuffer(t.FRAMEBUFFER,U.__webglFramebuffer),U.__webglDepthbuffer===void 0)U.__webglDepthbuffer=t.createRenderbuffer(),be(U.__webglDepthbuffer,V,!1);else{const le=V.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ce=U.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,Ce),t.framebufferRenderbuffer(t.FRAMEBUFFER,le,t.RENDERBUFFER,Ce)}n.bindFramebuffer(t.FRAMEBUFFER,null)}function tt(V,U,ne){const le=r.get(V);U!==void 0&&_e(le.__webglFramebuffer,V,V.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),ne!==void 0&&$e(V)}function Ve(V){const U=V.texture,ne=r.get(V),le=r.get(U);V.addEventListener("dispose",R);const Ce=V.textures,ve=V.isWebGLCubeRenderTarget===!0,He=Ce.length>1;if(He||(le.__webglTexture===void 0&&(le.__webglTexture=t.createTexture()),le.__version=U.version,s.memory.textures++),ve){ne.__webglFramebuffer=[];for(let Ae=0;Ae<6;Ae++)if(U.mipmaps&&U.mipmaps.length>0){ne.__webglFramebuffer[Ae]=[];for(let Ee=0;Ee0){ne.__webglFramebuffer=[];for(let Ae=0;Ae0&&De(V)===!1){ne.__webglMultisampledFramebuffer=t.createFramebuffer(),ne.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,ne.__webglMultisampledFramebuffer);for(let Ae=0;Ae0)for(let Ee=0;Ee0)for(let Ee=0;Ee0){if(De(V)===!1){const U=V.textures,ne=V.width,le=V.height;let Ce=t.COLOR_BUFFER_BIT;const ve=V.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,He=r.get(V),Ae=U.length>1;if(Ae)for(let Ee=0;Ee0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&U.__useRenderToTexture!==!1}function he(V){const U=s.render.frame;u.get(V)!==U&&(u.set(V,U),V.update())}function qe(V,U){const ne=V.colorSpace,le=V.format,Ce=V.type;return V.isCompressedTexture===!0||V.isVideoTexture===!0||ne!==Cu&&ne!==va&&(Jt.getTransfer(ne)===dn?(le!==Ir||Ce!==ji)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ne)),U}function Le(V){return typeof HTMLImageElement<"u"&&V instanceof HTMLImageElement?(c.width=V.naturalWidth||V.width,c.height=V.naturalHeight||V.height):typeof VideoFrame<"u"&&V instanceof VideoFrame?(c.width=V.displayWidth,c.height=V.displayHeight):(c.width=V.width,c.height=V.height),c}this.allocateTextureUnit=D,this.resetTextureUnits=z,this.setTexture2D=G,this.setTexture2DArray=X,this.setTexture3D=Z,this.setTextureCube=F,this.rebindTextures=tt,this.setupRenderTarget=Ve,this.updateRenderTargetMipmap=se,this.updateMultisampleRenderTarget=Ie,this.setupDepthRenderbuffer=$e,this.setupFrameBufferTexture=_e,this.useMultisampledRTT=De}function aB(t,e){function n(r,i=va){let o;const s=Jt.getTransfer(i);if(r===ji)return t.UNSIGNED_BYTE;if(r===s_)return t.UNSIGNED_SHORT_4_4_4_4;if(r===a_)return t.UNSIGNED_SHORT_5_5_5_1;if(r===UR)return t.UNSIGNED_INT_5_9_9_9_REV;if(r===FR)return t.BYTE;if(r===zR)return t.SHORT;if(r===Rd)return t.UNSIGNED_SHORT;if(r===o_)return t.INT;if(r===Fa)return t.UNSIGNED_INT;if(r===ci)return t.FLOAT;if(r===Eu)return t.HALF_FLOAT;if(r===BR)return t.ALPHA;if(r===jR)return t.RGB;if(r===Ir)return t.RGBA;if(r===VR)return t.LUMINANCE;if(r===$R)return t.LUMINANCE_ALPHA;if(r===Gc)return t.DEPTH_COMPONENT;if(r===du)return t.DEPTH_STENCIL;if(r===hg)return t.RED;if(r===pg)return t.RED_INTEGER;if(r===WR)return t.RG;if(r===l_)return t.RG_INTEGER;if(r===c_)return t.RGBA_INTEGER;if(r===Op||r===Dp||r===Fp||r===zp)if(s===dn)if(o=e.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(r===Op)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Dp)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===Fp)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===zp)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=e.get("WEBGL_compressed_texture_s3tc"),o!==null){if(r===Op)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Dp)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Fp)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===zp)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===H1||r===G1||r===X1||r===q1)if(o=e.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(r===H1)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===G1)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===X1)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===q1)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===Y1||r===K1||r===Z1)if(o=e.get("WEBGL_compressed_texture_etc"),o!==null){if(r===Y1||r===K1)return s===dn?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(r===Z1)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===J1||r===Q1||r===ex||r===tx||r===nx||r===rx||r===ix||r===ox||r===sx||r===ax||r===lx||r===cx||r===ux||r===fx)if(o=e.get("WEBGL_compressed_texture_astc"),o!==null){if(r===J1)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===Q1)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===ex)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===tx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===nx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===rx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===ix)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===ox)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===sx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===ax)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===lx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===cx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===ux)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===fx)return s===dn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Up||r===dx||r===hx)if(o=e.get("EXT_texture_compression_bptc"),o!==null){if(r===Up)return s===dn?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===dx)return o.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===hx)return o.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===HR||r===px||r===mx||r===gx)if(o=e.get("EXT_texture_compression_rgtc"),o!==null){if(r===Up)return o.COMPRESSED_RED_RGTC1_EXT;if(r===px)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===mx)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===gx)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===fu?t.UNSIGNED_INT_24_8:t[r]!==void 0?t[r]:null}return{convert:n}}class lB extends br{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}let qf=class extends rn{constructor(){super(),this.isGroup=!0,this.type="Group"}};const jue={type:"move"};class OM{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new qf,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 qf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new H,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new H),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new qf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new H,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new H),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const 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,o=null,s=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){s=!0;for(const x of e.hand.values()){const y=n.getJointPose(x,r),g=this._getHandJoint(c,x);y!==null&&(g.matrix.fromArray(y.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=y.radius),g.visible=y!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),m=.02,v=.005;c.inputState.pinching&&h>m+v?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=m-v&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=n.getPose(e.gripSpace,r),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&o!==null&&(i=o),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(jue)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new qf;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}const Vue=` void main() { gl_Position = vec4( position, 1.0 ); @@ -4007,7 +4007,7 @@ void main() { } -}`;class Wue{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n,r){if(this.texture===null){const i=new On,o=e.properties.get(i);o.__webglTexture=n.texture,(n.depthNear!=r.depthNear||n.depthFar!=r.depthFar)&&(this.depthNear=n.depthNear,this.depthFar=n.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const n=e.cameras[0].viewport,r=new as({vertexShader:Vue,fragmentShader:$ue,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new rr(new th(20,20),r)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Hue extends Zs{constructor(e,n){super();const r=this;let i=null,o=1,s=null,a="local-floor",l=1,c=null,u=null,f=null,h=null,m=null,v=null;const x=new Wue,y=n.getContextAttributes();let g=null,b=null;const _=[],S=[],A=new Ne;let P=null;const R=new br;R.viewport=new en;const L=new br;L.viewport=new en;const k=[R,L],C=new lB;let N=null,z=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(J){let ce=_[J];return ce===void 0&&(ce=new kM,_[J]=ce),ce.getTargetRaySpace()},this.getControllerGrip=function(J){let ce=_[J];return ce===void 0&&(ce=new kM,_[J]=ce),ce.getGripSpace()},this.getHand=function(J){let ce=_[J];return ce===void 0&&(ce=new kM,_[J]=ce),ce.getHandSpace()};function D(J){const ce=S.indexOf(J.inputSource);if(ce===-1)return;const _e=_[ce];_e!==void 0&&(_e.update(J.inputSource,J.frame,c||s),_e.dispatchEvent({type:J.type,data:J.inputSource}))}function B(){i.removeEventListener("select",D),i.removeEventListener("selectstart",D),i.removeEventListener("selectend",D),i.removeEventListener("squeeze",D),i.removeEventListener("squeezestart",D),i.removeEventListener("squeezeend",D),i.removeEventListener("end",B),i.removeEventListener("inputsourceschange",G);for(let J=0;J<_.length;J++){const ce=S[J];ce!==null&&(S[J]=null,_[J].disconnect(ce))}N=null,z=null,x.reset(),e.setRenderTarget(g),m=null,h=null,f=null,i=null,b=null,fe.stop(),r.isPresenting=!1,e.setPixelRatio(P),e.setSize(A.width,A.height,!1),r.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(J){o=J,r.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(J){a=J,r.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||s},this.setReferenceSpace=function(J){c=J},this.getBaseLayer=function(){return h!==null?h:m},this.getBinding=function(){return f},this.getFrame=function(){return v},this.getSession=function(){return i},this.setSession=async function(J){if(i=J,i!==null){if(g=e.getRenderTarget(),i.addEventListener("select",D),i.addEventListener("selectstart",D),i.addEventListener("selectend",D),i.addEventListener("squeeze",D),i.addEventListener("squeezestart",D),i.addEventListener("squeezeend",D),i.addEventListener("end",B),i.addEventListener("inputsourceschange",G),y.xrCompatible!==!0&&await n.makeXRCompatible(),P=e.getPixelRatio(),e.getSize(A),i.renderState.layers===void 0){const ce={antialias:y.antialias,alpha:!0,depth:y.depth,stencil:y.stencil,framebufferScaleFactor:o};m=new XRWebGLLayer(i,n,ce),i.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),b=new ss(m.framebufferWidth,m.framebufferHeight,{format:Ir,type:ji,colorSpace:e.outputColorSpace,stencilBuffer:y.stencil})}else{let ce=null,_e=null,be=null;y.depth&&(be=y.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,ce=y.stencil?du:Gc,_e=y.stencil?fu:Da);const Xe={colorFormat:n.RGBA8,depthFormat:be,scaleFactor:o};f=new XRWebGLBinding(i,n),h=f.createProjectionLayer(Xe),i.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),b=new ss(h.textureWidth,h.textureHeight,{format:Ir,type:ji,depthTexture:new QR(h.textureWidth,h.textureHeight,_e,void 0,void 0,void 0,void 0,void 0,void 0,ce),stencilBuffer:y.stencil,colorSpace:e.outputColorSpace,samples:y.antialias?4:0,resolveDepthBuffer:h.ignoreDepthValues===!1})}b.isXRRenderTarget=!0,this.setFoveation(l),c=null,s=await i.requestReferenceSpace(a),fe.setContext(i),fe.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return x.getDepthTexture()};function G(J){for(let ce=0;ce=0&&(S[be]=null,_[be].disconnect(_e))}for(let ce=0;ce=S.length){S.push(_e),be=$e;break}else if(S[$e]===null){S[$e]=_e,be=$e;break}if(be===-1)break}const Xe=_[be];Xe&&Xe.connect(_e)}}const X=new H,Z=new H;function F(J,ce,_e){X.setFromMatrixPosition(ce.matrixWorld),Z.setFromMatrixPosition(_e.matrixWorld);const be=X.distanceTo(Z),Xe=ce.projectionMatrix.elements,$e=_e.projectionMatrix.elements,tt=Xe[14]/(Xe[10]-1),Ve=Xe[14]/(Xe[10]+1),se=(Xe[9]+1)/Xe[5],ae=(Xe[9]-1)/Xe[5],W=(Xe[8]-1)/Xe[0],Ie=($e[8]+1)/$e[0],Re=tt*W,De=tt*Ie,he=be/(-W+Ie),qe=he*-W;if(ce.matrixWorld.decompose(J.position,J.quaternion,J.scale),J.translateX(qe),J.translateZ(he),J.matrixWorld.compose(J.position,J.quaternion,J.scale),J.matrixWorldInverse.copy(J.matrixWorld).invert(),Xe[10]===-1)J.projectionMatrix.copy(ce.projectionMatrix),J.projectionMatrixInverse.copy(ce.projectionMatrixInverse);else{const Le=tt+he,V=Ve+he,U=Re-qe,ne=De+(be-qe),le=se*Ve/V*Le,Ce=ae*Ve/V*Le;J.projectionMatrix.makePerspective(U,ne,le,Ce,Le,V),J.projectionMatrixInverse.copy(J.projectionMatrix).invert()}}function q(J,ce){ce===null?J.matrixWorld.copy(J.matrix):J.matrixWorld.multiplyMatrices(ce.matrixWorld,J.matrix),J.matrixWorldInverse.copy(J.matrixWorld).invert()}this.updateCamera=function(J){if(i===null)return;let ce=J.near,_e=J.far;x.texture!==null&&(x.depthNear>0&&(ce=x.depthNear),x.depthFar>0&&(_e=x.depthFar)),C.near=L.near=R.near=ce,C.far=L.far=R.far=_e,(N!==C.near||z!==C.far)&&(i.updateRenderState({depthNear:C.near,depthFar:C.far}),N=C.near,z=C.far),R.layers.mask=J.layers.mask|2,L.layers.mask=J.layers.mask|4,C.layers.mask=R.layers.mask|L.layers.mask;const be=J.parent,Xe=C.cameras;q(C,be);for(let $e=0;$e0&&(y.alphaTest.value=g.alphaTest);const b=e.get(g),_=b.envMap,S=b.envMapRotation;_&&(y.envMap.value=_,fc.copy(S),fc.x*=-1,fc.y*=-1,fc.z*=-1,_.isCubeTexture&&_.isRenderTargetTexture===!1&&(fc.y*=-1,fc.z*=-1),y.envMapRotation.value.setFromMatrix4(Gue.makeRotationFromEuler(fc)),y.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,y.reflectivity.value=g.reflectivity,y.ior.value=g.ior,y.refractionRatio.value=g.refractionRatio),g.lightMap&&(y.lightMap.value=g.lightMap,y.lightMapIntensity.value=g.lightMapIntensity,n(g.lightMap,y.lightMapTransform)),g.aoMap&&(y.aoMap.value=g.aoMap,y.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,y.aoMapTransform))}function s(y,g){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,g.map&&(y.map.value=g.map,n(g.map,y.mapTransform))}function a(y,g){y.dashSize.value=g.dashSize,y.totalSize.value=g.dashSize+g.gapSize,y.scale.value=g.scale}function l(y,g,b,_){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,y.size.value=g.size*b,y.scale.value=_*.5,g.map&&(y.map.value=g.map,n(g.map,y.uvTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,n(g.alphaMap,y.alphaMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest)}function c(y,g){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,y.rotation.value=g.rotation,g.map&&(y.map.value=g.map,n(g.map,y.mapTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,n(g.alphaMap,y.alphaMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest)}function u(y,g){y.specular.value.copy(g.specular),y.shininess.value=Math.max(g.shininess,1e-4)}function f(y,g){g.gradientMap&&(y.gradientMap.value=g.gradientMap)}function h(y,g){y.metalness.value=g.metalness,g.metalnessMap&&(y.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,y.metalnessMapTransform)),y.roughness.value=g.roughness,g.roughnessMap&&(y.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,y.roughnessMapTransform)),g.envMap&&(y.envMapIntensity.value=g.envMapIntensity)}function m(y,g,b){y.ior.value=g.ior,g.sheen>0&&(y.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),y.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(y.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,y.sheenColorMapTransform)),g.sheenRoughnessMap&&(y.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,y.sheenRoughnessMapTransform))),g.clearcoat>0&&(y.clearcoat.value=g.clearcoat,y.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(y.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,y.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,y.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(y.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,y.clearcoatNormalMapTransform),y.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===di&&y.clearcoatNormalScale.value.negate())),g.dispersion>0&&(y.dispersion.value=g.dispersion),g.iridescence>0&&(y.iridescence.value=g.iridescence,y.iridescenceIOR.value=g.iridescenceIOR,y.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],y.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(y.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,y.iridescenceMapTransform)),g.iridescenceThicknessMap&&(y.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,y.iridescenceThicknessMapTransform))),g.transmission>0&&(y.transmission.value=g.transmission,y.transmissionSamplerMap.value=b.texture,y.transmissionSamplerSize.value.set(b.width,b.height),g.transmissionMap&&(y.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,y.transmissionMapTransform)),y.thickness.value=g.thickness,g.thicknessMap&&(y.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,y.thicknessMapTransform)),y.attenuationDistance.value=g.attenuationDistance,y.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(y.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(y.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,y.anisotropyMapTransform))),y.specularIntensity.value=g.specularIntensity,y.specularColor.value.copy(g.specularColor),g.specularColorMap&&(y.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,y.specularColorMapTransform)),g.specularIntensityMap&&(y.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,y.specularIntensityMapTransform))}function v(y,g){g.matcap&&(y.matcap.value=g.matcap)}function x(y,g){const b=e.get(g).light;y.referencePosition.value.setFromMatrixPosition(b.matrixWorld),y.nearDistance.value=b.shadow.camera.near,y.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function que(t,e,n,r){let i={},o={},s=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(b,_){const S=_.program;r.uniformBlockBinding(b,S)}function c(b,_){let S=i[b.id];S===void 0&&(v(b),S=u(b),i[b.id]=S,b.addEventListener("dispose",y));const A=_.program;r.updateUBOMapping(b,A);const P=e.render.frame;o[b.id]!==P&&(h(b),o[b.id]=P)}function u(b){const _=f();b.__bindingPointIndex=_;const S=t.createBuffer(),A=b.__size,P=b.usage;return t.bindBuffer(t.UNIFORM_BUFFER,S),t.bufferData(t.UNIFORM_BUFFER,A,P),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,_,S),S}function f(){for(let b=0;b0&&(S+=A-P),b.__size=S,b.__cache={},this}function x(b){const _={boundary:0,storage:0};return typeof b=="number"||typeof b=="boolean"?(_.boundary=4,_.storage=4):b.isVector2?(_.boundary=8,_.storage=8):b.isVector3||b.isColor?(_.boundary=16,_.storage=12):b.isVector4?(_.boundary=16,_.storage=16):b.isMatrix3?(_.boundary=48,_.storage=48):b.isMatrix4?(_.boundary=64,_.storage=64):b.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",b),_}function y(b){const _=b.target;_.removeEventListener("dispose",y);const S=s.indexOf(_.__bindingPointIndex);s.splice(S,1),t.deleteBuffer(i[_.id]),delete i[_.id],delete o[_.id]}function g(){for(const b in i)t.deleteBuffer(i[b]);s=[],i={},o={}}return{bind:l,update:c,dispose:g}}class cB{constructor(e={}){const{canvas:n=qU(),context:r=null,depth:i=!0,stencil:o=!1,alpha:s=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1,reverseDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let m;if(r!==null){if(typeof WebGLRenderingContext<"u"&&r instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");m=r.getContextAttributes().alpha}else m=s;const v=new Uint32Array(4),x=new Int32Array(4);let y=null,g=null;const b=[],_=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Si,this.toneMapping=zs,this.toneMappingExposure=1;const S=this;let A=!1,P=0,R=0,L=null,k=-1,C=null;const N=new en,z=new en;let D=null;const B=new at(0);let G=0,X=n.width,Z=n.height,F=1,q=null,K=null;const Q=new en(0,0,X,Z),de=new en(0,0,X,Z);let fe=!1;const J=new yg;let ce=!1,_e=!1;const be=new Mt,Xe=new Mt,$e=new H,tt=new en,Ve={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let se=!1;function ae(){return L===null?F:1}let W=r;function Ie(j,re){return n.getContext(j,re)}try{const j={alpha:!0,depth:i,stencil:o,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${t_}`),n.addEventListener("webglcontextlost",Pe,!1),n.addEventListener("webglcontextrestored",We,!1),n.addEventListener("webglcontextcreationerror",Ke,!1),W===null){const re="webgl2";if(W=Ie(re,j),W===null)throw Ie(re)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(j){throw console.error("THREE.WebGLRenderer: "+j.message),j}let Re,De,he,qe,Le,V,U,ne,le,Ce,ve,He,Ae,Ee,bt,ke,it,Oe,Ye,me,Fe,Je,gt,ee;function Ue(){Re=new ece(W),Re.init(),Je=new aB(W,Re),De=new qle(W,Re,e,Je),he=new Lue(W,Re),De.reverseDepthBuffer&&h&&he.buffers.depth.setReversed(!0),qe=new rce(W),Le=new _ue,V=new Bue(W,Re,he,Le,De,Je,qe),U=new Kle(S),ne=new Qle(S),le=new use(W),gt=new Gle(W,le),Ce=new tce(W,le,qe,gt),ve=new oce(W,Ce,le,qe),Ye=new ice(W,De,V),ke=new Yle(Le),He=new bue(S,U,ne,Re,De,gt,ke),Ae=new Xue(S,Le),Ee=new Sue,bt=new Aue(Re),Oe=new Hle(S,U,ne,he,ve,m,l),it=new Nue(S,ve,De),ee=new que(W,qe,De,he),me=new Xle(W,Re,qe),Fe=new nce(W,Re,qe),qe.programs=He.programs,S.capabilities=De,S.extensions=Re,S.properties=Le,S.renderLists=Ee,S.shadowMap=it,S.state=he,S.info=qe}Ue();const ye=new Hue(S,W);this.xr=ye,this.getContext=function(){return W},this.getContextAttributes=function(){return W.getContextAttributes()},this.forceContextLoss=function(){const j=Re.get("WEBGL_lose_context");j&&j.loseContext()},this.forceContextRestore=function(){const j=Re.get("WEBGL_lose_context");j&&j.restoreContext()},this.getPixelRatio=function(){return F},this.setPixelRatio=function(j){j!==void 0&&(F=j,this.setSize(X,Z,!1))},this.getSize=function(j){return j.set(X,Z)},this.setSize=function(j,re,pe=!0){if(ye.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}X=j,Z=re,n.width=Math.floor(j*F),n.height=Math.floor(re*F),pe===!0&&(n.style.width=j+"px",n.style.height=re+"px"),this.setViewport(0,0,j,re)},this.getDrawingBufferSize=function(j){return j.set(X*F,Z*F).floor()},this.setDrawingBufferSize=function(j,re,pe){X=j,Z=re,F=pe,n.width=Math.floor(j*pe),n.height=Math.floor(re*pe),this.setViewport(0,0,j,re)},this.getCurrentViewport=function(j){return j.copy(N)},this.getViewport=function(j){return j.copy(Q)},this.setViewport=function(j,re,pe,ge){j.isVector4?Q.set(j.x,j.y,j.z,j.w):Q.set(j,re,pe,ge),he.viewport(N.copy(Q).multiplyScalar(F).round())},this.getScissor=function(j){return j.copy(de)},this.setScissor=function(j,re,pe,ge){j.isVector4?de.set(j.x,j.y,j.z,j.w):de.set(j,re,pe,ge),he.scissor(z.copy(de).multiplyScalar(F).round())},this.getScissorTest=function(){return fe},this.setScissorTest=function(j){he.setScissorTest(fe=j)},this.setOpaqueSort=function(j){q=j},this.setTransparentSort=function(j){K=j},this.getClearColor=function(j){return j.copy(Oe.getClearColor())},this.setClearColor=function(){Oe.setClearColor.apply(Oe,arguments)},this.getClearAlpha=function(){return Oe.getClearAlpha()},this.setClearAlpha=function(){Oe.setClearAlpha.apply(Oe,arguments)},this.clear=function(j=!0,re=!0,pe=!0){let ge=0;if(j){let oe=!1;if(L!==null){const je=L.texture.format;oe=je===a_||je===s_||je===pg}if(oe){const je=L.texture.type,nt=je===ji||je===Da||je===Rd||je===fu||je===i_||je===o_,ft=Oe.getClearColor(),dt=Oe.getClearAlpha(),Et=ft.r,It=ft.g,ht=ft.b;nt?(v[0]=Et,v[1]=It,v[2]=ht,v[3]=dt,W.clearBufferuiv(W.COLOR,0,v)):(x[0]=Et,x[1]=It,x[2]=ht,x[3]=dt,W.clearBufferiv(W.COLOR,0,x))}else ge|=W.COLOR_BUFFER_BIT}re&&(ge|=W.DEPTH_BUFFER_BIT),pe&&(ge|=W.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),W.clear(ge)},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",Pe,!1),n.removeEventListener("webglcontextrestored",We,!1),n.removeEventListener("webglcontextcreationerror",Ke,!1),Ee.dispose(),bt.dispose(),Le.dispose(),U.dispose(),ne.dispose(),ve.dispose(),gt.dispose(),ee.dispose(),He.dispose(),ye.dispose(),ye.removeEventListener("sessionstart",Og),ye.removeEventListener("sessionend",Dg),ps.stop()};function Pe(j){j.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),A=!0}function We(){console.log("THREE.WebGLRenderer: Context Restored."),A=!1;const j=qe.autoReset,re=it.enabled,pe=it.autoUpdate,ge=it.needsUpdate,oe=it.type;Ue(),qe.autoReset=j,it.enabled=re,it.autoUpdate=pe,it.needsUpdate=ge,it.type=oe}function Ke(j){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",j.statusMessage)}function Pt(j){const re=j.target;re.removeEventListener("dispose",Pt),Mn(re)}function Mn(j){ir(j),Le.remove(j)}function ir(j){const re=Le.get(j).programs;re!==void 0&&(re.forEach(function(pe){He.releaseProgram(pe)}),j.isShaderMaterial&&He.releaseShaderCache(j))}this.renderBufferDirect=function(j,re,pe,ge,oe,je){re===null&&(re=Ve);const nt=oe.isMesh&&oe.matrixWorld.determinant()<0,ft=tw(j,re,pe,ge,oe);he.setMaterial(ge,nt);let dt=pe.index,Et=1;if(ge.wireframe===!0){if(dt=Ce.getWireframeAttribute(pe),dt===void 0)return;Et=2}const It=pe.drawRange,ht=pe.attributes.position;let Wt=It.start*Et,Zt=(It.start+It.count)*Et;je!==null&&(Wt=Math.max(Wt,je.start*Et),Zt=Math.min(Zt,(je.start+je.count)*Et)),dt!==null?(Wt=Math.max(Wt,0),Zt=Math.min(Zt,dt.count)):ht!=null&&(Wt=Math.max(Wt,0),Zt=Math.min(Zt,ht.count));const wt=Zt-Wt;if(wt<0||wt===1/0)return;gt.setup(oe,ge,ft,pe,dt);let Bt,Ht=me;if(dt!==null&&(Bt=le.get(dt),Ht=Fe,Ht.setIndex(Bt)),oe.isMesh)ge.wireframe===!0?(he.setLineWidth(ge.wireframeLinewidth*ae()),Ht.setMode(W.LINES)):Ht.setMode(W.TRIANGLES);else if(oe.isLine){let ot=ge.linewidth;ot===void 0&&(ot=1),he.setLineWidth(ot*ae()),oe.isLineSegments?Ht.setMode(W.LINES):oe.isLineLoop?Ht.setMode(W.LINE_LOOP):Ht.setMode(W.LINE_STRIP)}else oe.isPoints?Ht.setMode(W.POINTS):oe.isSprite&&Ht.setMode(W.TRIANGLES);if(oe.isBatchedMesh)if(oe._multiDrawInstances!==null)Ht.renderMultiDrawInstances(oe._multiDrawStarts,oe._multiDrawCounts,oe._multiDrawCount,oe._multiDrawInstances);else if(Re.get("WEBGL_multi_draw"))Ht.renderMultiDraw(oe._multiDrawStarts,oe._multiDrawCounts,oe._multiDrawCount);else{const ot=oe._multiDrawStarts,En=oe._multiDrawCounts,qt=oe._multiDrawCount,dr=dt?le.get(dt).bytesPerElement:1,Gn=Le.get(ge).currentProgram.getUniforms();for(let hr=0;hr{function je(){if(ge.forEach(function(nt){Le.get(nt).currentProgram.isReady()&&ge.delete(nt)}),ge.size===0){oe(j);return}setTimeout(je,10)}Re.get("KHR_parallel_shader_compile")!==null?je():setTimeout(je,10)})};let vi=null;function Bo(j){vi&&vi(j)}function Og(){ps.stop()}function Dg(){ps.start()}const ps=new nB;ps.setAnimationLoop(Bo),typeof self<"u"&&ps.setContext(self),this.setAnimationLoop=function(j){vi=j,ye.setAnimationLoop(j),j===null?ps.stop():ps.start()},ye.addEventListener("sessionstart",Og),ye.addEventListener("sessionend",Dg),this.render=function(j,re){if(re!==void 0&&re.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(A===!0)return;if(j.matrixWorldAutoUpdate===!0&&j.updateMatrixWorld(),re.parent===null&&re.matrixWorldAutoUpdate===!0&&re.updateMatrixWorld(),ye.enabled===!0&&ye.isPresenting===!0&&(ye.cameraAutoUpdate===!0&&ye.updateCamera(re),re=ye.getCamera()),j.isScene===!0&&j.onBeforeRender(S,j,re,L),g=bt.get(j,_.length),g.init(re),_.push(g),Xe.multiplyMatrices(re.projectionMatrix,re.matrixWorldInverse),J.setFromProjectionMatrix(Xe),_e=this.localClippingEnabled,ce=ke.init(this.clippingPlanes,_e),y=Ee.get(j,b.length),y.init(),b.push(y),ye.enabled===!0&&ye.isPresenting===!0){const je=S.xr.getDepthSensingMesh();je!==null&&Yl(je,re,-1/0,S.sortObjects)}Yl(j,re,0,S.sortObjects),y.finish(),S.sortObjects===!0&&y.sort(q,K),se=ye.enabled===!1||ye.isPresenting===!1||ye.hasDepthSensing()===!1,se&&Oe.addToRenderList(y,j),this.info.render.frame++,ce===!0&&ke.beginShadows();const pe=g.state.shadowsArray;it.render(pe,j,re),ce===!0&&ke.endShadows(),this.info.autoReset===!0&&this.info.reset();const ge=y.opaque,oe=y.transmissive;if(g.setupLights(),re.isArrayCamera){const je=re.cameras;if(oe.length>0)for(let nt=0,ft=je.length;nt0&&Va(ge,oe,j,re),se&&Oe.render(j),Fg(y,j,re);L!==null&&(V.updateMultisampleRenderTarget(L),V.updateRenderTargetMipmap(L)),j.isScene===!0&&j.onAfterRender(S,j,re),gt.resetDefaultState(),k=-1,C=null,_.pop(),_.length>0?(g=_[_.length-1],ce===!0&&ke.setGlobalState(S.clippingPlanes,g.state.camera)):g=null,b.pop(),b.length>0?y=b[b.length-1]:y=null};function Yl(j,re,pe,ge){if(j.visible===!1)return;if(j.layers.test(re.layers)){if(j.isGroup)pe=j.renderOrder;else if(j.isLOD)j.autoUpdate===!0&&j.update(re);else if(j.isLight)g.pushLight(j),j.castShadow&&g.pushShadow(j);else if(j.isSprite){if(!j.frustumCulled||J.intersectsSprite(j)){ge&&tt.setFromMatrixPosition(j.matrixWorld).applyMatrix4(Xe);const nt=ve.update(j),ft=j.material;ft.visible&&y.push(j,nt,ft,pe,tt.z,null)}}else if((j.isMesh||j.isLine||j.isPoints)&&(!j.frustumCulled||J.intersectsObject(j))){const nt=ve.update(j),ft=j.material;if(ge&&(j.boundingSphere!==void 0?(j.boundingSphere===null&&j.computeBoundingSphere(),tt.copy(j.boundingSphere.center)):(nt.boundingSphere===null&&nt.computeBoundingSphere(),tt.copy(nt.boundingSphere.center)),tt.applyMatrix4(j.matrixWorld).applyMatrix4(Xe)),Array.isArray(ft)){const dt=nt.groups;for(let Et=0,It=dt.length;Et0&&ku(oe,re,pe),je.length>0&&ku(je,re,pe),nt.length>0&&ku(nt,re,pe),he.buffers.depth.setTest(!0),he.buffers.depth.setMask(!0),he.buffers.color.setMask(!0),he.setPolygonOffset(!1)}function Va(j,re,pe,ge){if((pe.isScene===!0?pe.overrideMaterial:null)!==null)return;g.state.transmissionRenderTarget[ge.id]===void 0&&(g.state.transmissionRenderTarget[ge.id]=new ss(1,1,{generateMipmaps:!0,type:Re.has("EXT_color_buffer_half_float")||Re.has("EXT_color_buffer_float")?Eu:ji,minFilter:Is,samples:4,stencilBuffer:o,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jt.workingColorSpace}));const je=g.state.transmissionRenderTarget[ge.id],nt=ge.viewport||N;je.setSize(nt.z,nt.w);const ft=S.getRenderTarget();S.setRenderTarget(je),S.getClearColor(B),G=S.getClearAlpha(),G<1&&S.setClearColor(16777215,.5),S.clear(),se&&Oe.render(pe);const dt=S.toneMapping;S.toneMapping=zs;const Et=ge.viewport;if(ge.viewport!==void 0&&(ge.viewport=void 0),g.setupLightsView(ge),ce===!0&&ke.setGlobalState(S.clippingPlanes,ge),ku(j,pe,ge),V.updateMultisampleRenderTarget(je),V.updateRenderTargetMipmap(je),Re.has("WEBGL_multisampled_render_to_texture")===!1){let It=!1;for(let ht=0,Wt=re.length;ht0),ht=!!pe.morphAttributes.position,Wt=!!pe.morphAttributes.normal,Zt=!!pe.morphAttributes.color;let wt=zs;ge.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(wt=S.toneMapping);const Bt=pe.morphAttributes.position||pe.morphAttributes.normal||pe.morphAttributes.color,Ht=Bt!==void 0?Bt.length:0,ot=Le.get(ge),En=g.state.lights;if(ce===!0&&(_e===!0||j!==C)){const Cn=j===C&&ge.id===k;ke.setState(ge,j,Cn)}let qt=!1;ge.version===ot.__version?(ot.needsLights&&ot.lightsStateVersion!==En.state.version||ot.outputColorSpace!==ft||oe.isBatchedMesh&&ot.batching===!1||!oe.isBatchedMesh&&ot.batching===!0||oe.isBatchedMesh&&ot.batchingColor===!0&&oe.colorTexture===null||oe.isBatchedMesh&&ot.batchingColor===!1&&oe.colorTexture!==null||oe.isInstancedMesh&&ot.instancing===!1||!oe.isInstancedMesh&&ot.instancing===!0||oe.isSkinnedMesh&&ot.skinning===!1||!oe.isSkinnedMesh&&ot.skinning===!0||oe.isInstancedMesh&&ot.instancingColor===!0&&oe.instanceColor===null||oe.isInstancedMesh&&ot.instancingColor===!1&&oe.instanceColor!==null||oe.isInstancedMesh&&ot.instancingMorph===!0&&oe.morphTexture===null||oe.isInstancedMesh&&ot.instancingMorph===!1&&oe.morphTexture!==null||ot.envMap!==dt||ge.fog===!0&&ot.fog!==je||ot.numClippingPlanes!==void 0&&(ot.numClippingPlanes!==ke.numPlanes||ot.numIntersection!==ke.numIntersection)||ot.vertexAlphas!==Et||ot.vertexTangents!==It||ot.morphTargets!==ht||ot.morphNormals!==Wt||ot.morphColors!==Zt||ot.toneMapping!==wt||ot.morphTargetsCount!==Ht)&&(qt=!0):(qt=!0,ot.__version=ge.version);let dr=ot.currentProgram;qt===!0&&(dr=Lu(ge,re,oe));let Gn=!1,hr=!1,$a=!1;const vn=dr.getUniforms(),Jr=ot.uniforms;if(he.useProgram(dr.program)&&(Gn=!0,hr=!0,$a=!0),ge.id!==k&&(k=ge.id,hr=!0),Gn||C!==j){he.buffers.depth.getReversed()?(be.copy(j.projectionMatrix),Ooe(be),Doe(be),vn.setValue(W,"projectionMatrix",be)):vn.setValue(W,"projectionMatrix",j.projectionMatrix),vn.setValue(W,"viewMatrix",j.matrixWorldInverse);const ms=vn.map.cameraPosition;ms!==void 0&&ms.setValue(W,$e.setFromMatrixPosition(j.matrixWorld)),De.logarithmicDepthBuffer&&vn.setValue(W,"logDepthBufFC",2/(Math.log(j.far+1)/Math.LN2)),(ge.isMeshPhongMaterial||ge.isMeshToonMaterial||ge.isMeshLambertMaterial||ge.isMeshBasicMaterial||ge.isMeshStandardMaterial||ge.isShaderMaterial)&&vn.setValue(W,"isOrthographic",j.isOrthographicCamera===!0),C!==j&&(C=j,hr=!0,$a=!0)}if(oe.isSkinnedMesh){vn.setOptional(W,oe,"bindMatrix"),vn.setOptional(W,oe,"bindMatrixInverse");const Cn=oe.skeleton;Cn&&(Cn.boneTexture===null&&Cn.computeBoneTexture(),vn.setValue(W,"boneTexture",Cn.boneTexture,V))}oe.isBatchedMesh&&(vn.setOptional(W,oe,"batchingTexture"),vn.setValue(W,"batchingTexture",oe._matricesTexture,V),vn.setOptional(W,oe,"batchingIdTexture"),vn.setValue(W,"batchingIdTexture",oe._indirectTexture,V),vn.setOptional(W,oe,"batchingColorTexture"),oe._colorsTexture!==null&&vn.setValue(W,"batchingColorTexture",oe._colorsTexture,V));const Wa=pe.morphAttributes;if((Wa.position!==void 0||Wa.normal!==void 0||Wa.color!==void 0)&&Ye.update(oe,pe,dr),(hr||ot.receiveShadow!==oe.receiveShadow)&&(ot.receiveShadow=oe.receiveShadow,vn.setValue(W,"receiveShadow",oe.receiveShadow)),ge.isMeshGouraudMaterial&&ge.envMap!==null&&(Jr.envMap.value=dt,Jr.flipEnvMap.value=dt.isCubeTexture&&dt.isRenderTargetTexture===!1?-1:1),ge.isMeshStandardMaterial&&ge.envMap===null&&re.environment!==null&&(Jr.envMapIntensity.value=re.environmentIntensity),hr&&(vn.setValue(W,"toneMappingExposure",S.toneMappingExposure),ot.needsLights&&nw(Jr,$a),je&&ge.fog===!0&&Ae.refreshFogUniforms(Jr,je),Ae.refreshMaterialUniforms(Jr,ge,F,Z,g.state.transmissionRenderTarget[j.id]),By.upload(W,Ug(ot),Jr,V)),ge.isShaderMaterial&&ge.uniformsNeedUpdate===!0&&(By.upload(W,Ug(ot),Jr,V),ge.uniformsNeedUpdate=!1),ge.isSpriteMaterial&&vn.setValue(W,"center",oe.center),vn.setValue(W,"modelViewMatrix",oe.modelViewMatrix),vn.setValue(W,"normalMatrix",oe.normalMatrix),vn.setValue(W,"modelMatrix",oe.matrixWorld),ge.isShaderMaterial||ge.isRawShaderMaterial){const Cn=ge.uniformsGroups;for(let ms=0,gs=Cn.length;ms0&&V.useMultisampledRTT(j)===!1?oe=Le.get(j).__webglMultisampledFramebuffer:Array.isArray(It)?oe=It[pe]:oe=It,N.copy(j.viewport),z.copy(j.scissor),D=j.scissorTest}else N.copy(Q).multiplyScalar(F).floor(),z.copy(de).multiplyScalar(F).floor(),D=fe;if(he.bindFramebuffer(W.FRAMEBUFFER,oe)&&ge&&he.drawBuffers(j,oe),he.viewport(N),he.scissor(z),he.setScissorTest(D),je){const dt=Le.get(j.texture);W.framebufferTexture2D(W.FRAMEBUFFER,W.COLOR_ATTACHMENT0,W.TEXTURE_CUBE_MAP_POSITIVE_X+re,dt.__webglTexture,pe)}else if(nt){const dt=Le.get(j.texture),Et=re||0;W.framebufferTextureLayer(W.FRAMEBUFFER,W.COLOR_ATTACHMENT0,dt.__webglTexture,pe||0,Et)}k=-1},this.readRenderTargetPixels=function(j,re,pe,ge,oe,je,nt){if(!(j&&j.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ft=Le.get(j).__webglFramebuffer;if(j.isWebGLCubeRenderTarget&&nt!==void 0&&(ft=ft[nt]),ft){he.bindFramebuffer(W.FRAMEBUFFER,ft);try{const dt=j.texture,Et=dt.format,It=dt.type;if(!De.textureFormatReadable(Et)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!De.textureTypeReadable(It)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}re>=0&&re<=j.width-ge&&pe>=0&&pe<=j.height-oe&&W.readPixels(re,pe,ge,oe,Je.convert(Et),Je.convert(It),je)}finally{const dt=L!==null?Le.get(L).__webglFramebuffer:null;he.bindFramebuffer(W.FRAMEBUFFER,dt)}}},this.readRenderTargetPixelsAsync=async function(j,re,pe,ge,oe,je,nt){if(!(j&&j.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let ft=Le.get(j).__webglFramebuffer;if(j.isWebGLCubeRenderTarget&&nt!==void 0&&(ft=ft[nt]),ft){const dt=j.texture,Et=dt.format,It=dt.type;if(!De.textureFormatReadable(Et))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!De.textureTypeReadable(It))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(re>=0&&re<=j.width-ge&&pe>=0&&pe<=j.height-oe){he.bindFramebuffer(W.FRAMEBUFFER,ft);const ht=W.createBuffer();W.bindBuffer(W.PIXEL_PACK_BUFFER,ht),W.bufferData(W.PIXEL_PACK_BUFFER,je.byteLength,W.STREAM_READ),W.readPixels(re,pe,ge,oe,Je.convert(Et),Je.convert(It),0);const Wt=L!==null?Le.get(L).__webglFramebuffer:null;he.bindFramebuffer(W.FRAMEBUFFER,Wt);const Zt=W.fenceSync(W.SYNC_GPU_COMMANDS_COMPLETE,0);return W.flush(),await Loe(W,Zt,4),W.bindBuffer(W.PIXEL_PACK_BUFFER,ht),W.getBufferSubData(W.PIXEL_PACK_BUFFER,0,je),W.deleteBuffer(ht),W.deleteSync(Zt),je}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(j,re=null,pe=0){j.isTexture!==!0&&(vp("WebGLRenderer: copyFramebufferToTexture function signature has changed."),re=arguments[0]||null,j=arguments[1]);const ge=Math.pow(2,-pe),oe=Math.floor(j.image.width*ge),je=Math.floor(j.image.height*ge),nt=re!==null?re.x:0,ft=re!==null?re.y:0;V.setTexture2D(j,0),W.copyTexSubImage2D(W.TEXTURE_2D,pe,0,0,nt,ft,oe,je),he.unbindTexture()},this.copyTextureToTexture=function(j,re,pe=null,ge=null,oe=0){j.isTexture!==!0&&(vp("WebGLRenderer: copyTextureToTexture function signature has changed."),ge=arguments[0]||null,j=arguments[1],re=arguments[2],oe=arguments[3]||0,pe=null);let je,nt,ft,dt,Et,It,ht,Wt,Zt;const wt=j.isCompressedTexture?j.mipmaps[oe]:j.image;pe!==null?(je=pe.max.x-pe.min.x,nt=pe.max.y-pe.min.y,ft=pe.isBox3?pe.max.z-pe.min.z:1,dt=pe.min.x,Et=pe.min.y,It=pe.isBox3?pe.min.z:0):(je=wt.width,nt=wt.height,ft=wt.depth||1,dt=0,Et=0,It=0),ge!==null?(ht=ge.x,Wt=ge.y,Zt=ge.z):(ht=0,Wt=0,Zt=0);const Bt=Je.convert(re.format),Ht=Je.convert(re.type);let ot;re.isData3DTexture?(V.setTexture3D(re,0),ot=W.TEXTURE_3D):re.isDataArrayTexture||re.isCompressedArrayTexture?(V.setTexture2DArray(re,0),ot=W.TEXTURE_2D_ARRAY):(V.setTexture2D(re,0),ot=W.TEXTURE_2D),W.pixelStorei(W.UNPACK_FLIP_Y_WEBGL,re.flipY),W.pixelStorei(W.UNPACK_PREMULTIPLY_ALPHA_WEBGL,re.premultiplyAlpha),W.pixelStorei(W.UNPACK_ALIGNMENT,re.unpackAlignment);const En=W.getParameter(W.UNPACK_ROW_LENGTH),qt=W.getParameter(W.UNPACK_IMAGE_HEIGHT),dr=W.getParameter(W.UNPACK_SKIP_PIXELS),Gn=W.getParameter(W.UNPACK_SKIP_ROWS),hr=W.getParameter(W.UNPACK_SKIP_IMAGES);W.pixelStorei(W.UNPACK_ROW_LENGTH,wt.width),W.pixelStorei(W.UNPACK_IMAGE_HEIGHT,wt.height),W.pixelStorei(W.UNPACK_SKIP_PIXELS,dt),W.pixelStorei(W.UNPACK_SKIP_ROWS,Et),W.pixelStorei(W.UNPACK_SKIP_IMAGES,It);const $a=j.isDataArrayTexture||j.isData3DTexture,vn=re.isDataArrayTexture||re.isData3DTexture;if(j.isRenderTargetTexture||j.isDepthTexture){const Jr=Le.get(j),Wa=Le.get(re),Cn=Le.get(Jr.__renderTarget),ms=Le.get(Wa.__renderTarget);he.bindFramebuffer(W.READ_FRAMEBUFFER,Cn.__webglFramebuffer),he.bindFramebuffer(W.DRAW_FRAMEBUFFER,ms.__webglFramebuffer);for(let gs=0;gs0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}class h_{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Pm,this.updateRanges=[],this.version=0,this.uuid=ro()}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,o=this.stride;ie.far||n.push({distance:l,point:Zh.clone(),uv:Ri.getInterpolation(Zh,Av,Qh,Pv,Ak,LM,Pk,new Ne),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 Iv(t,e,n,r,i,o){yf.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(Jh.x=o*yf.x-i*yf.y,Jh.y=i*yf.x+o*yf.y):Jh.copy(yf),t.copy(e),t.x+=Jh.x,t.y+=Jh.y,t.applyMatrix4(uB)}const Nv=new H,Ik=new H;class dB extends rn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const n=e.levels;for(let r=0,i=n.length;r0){let r,i;for(r=1,i=n.length;r0){Nv.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(Nv);this.getObjectForDistance(i).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){Nv.setFromMatrixPosition(e.matrixWorld),Ik.setFromMatrixPosition(this.matrixWorld);const r=Nv.distanceTo(Ik)/e.zoom;n[0].object.visible=!0;let i,o;for(i=1,o=n.length;i=s)n[i-1].object.visible=!1,n[i].object.visible=!0;else break}for(this._currentLevel=i-1;i=o.length&&o.push({start:-1,count:-1,z:-1,index:-1});const a=o[this.index];s.push(a),this.index++,a.start=e,a.count=n,a.z=r,a.index=i}reset(){this.list.length=0,this.index=0}}const _i=new Mt,tfe=new at(1,1,1),zM=new yg,Ov=new kr,dc=new Kr,np=new H,Bk=new H,nfe=new H,UM=new efe,Hr=new rr,Dv=[];function rfe(t,e,n=0){const r=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const i=t.count;for(let o=0;o65535?new Uint32Array(i):new Uint16Array(i);n.setIndex(new pn(o,1))}this._geometryInitialized=!0}}_validateGeometry(e){const n=this.geometry;if(!!e.getIndex()!=!!n.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const r in n.attributes){if(!e.hasAttribute(r))throw new Error(`BatchedMesh: Added geometry missing "${r}". All geometries must have consistent attributes.`);const i=e.getAttribute(r),o=n.getAttribute(r);if(i.itemSize!==o.itemSize||i.normalized!==o.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new kr);const e=this.boundingBox,n=this._instanceInfo;e.makeEmpty();for(let r=0,i=n.length;r=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("BatchedMesh: Maximum item count reached.");const r={visible:!0,active:!0,geometryIndex:e};let i=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(FM),i=this._availableInstanceIds.shift(),this._instanceInfo[i]=r):(i=this._instanceInfo.length,this._instanceInfo.push(r));const o=this._matricesTexture;_i.identity().toArray(o.image.data,i*16),o.needsUpdate=!0;const s=this._colorsTexture;return s&&(tfe.toArray(s.image.data,i*4),s.needsUpdate=!0),this._visibilityChanged=!0,i}addGeometry(e,n=-1,r=-1){this._initializeGeometry(e),this._validateGeometry(e);const i={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},o=this._geometryInfo;i.vertexStart=this._nextVertexStart,i.reservedVertexCount=n===-1?e.getAttribute("position").count:n;const s=e.getIndex();if(s!==null&&(i.indexStart=this._nextIndexStart,i.reservedIndexCount=r===-1?s.count:r),i.indexStart!==-1&&i.indexStart+i.reservedIndexCount>this._maxIndexCount||i.vertexStart+i.reservedVertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");let l;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(FM),l=this._availableGeometryIds.shift(),o[l]=i):(l=this._geometryCount,this._geometryCount++,o.push(i)),this.setGeometryAt(l,e),this._nextIndexStart=i.indexStart+i.reservedIndexCount,this._nextVertexStart=i.vertexStart+i.reservedVertexCount,l}setGeometryAt(e,n){if(e>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(n);const r=this.geometry,i=r.getIndex()!==null,o=r.getIndex(),s=n.getIndex(),a=this._geometryInfo[e];if(i&&s.count>a.reservedIndexCount||n.attributes.position.count>a.reservedVertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.reservedVertexCount;a.vertexCount=n.getAttribute("position").count;for(const u in r.attributes){const f=n.getAttribute(u),h=r.getAttribute(u);rfe(f,h,l);const m=f.itemSize;for(let v=f.count,x=c;v=n.length||n[e].active===!1)return this;const r=this._instanceInfo;for(let i=0,o=r.length;i=n.length||n[e].active===!1?this:(n[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this)}optimize(){let e=0,n=0;const r=this._geometryInfo,i=r.map((s,a)=>a).sort((s,a)=>r[s].vertexStart-r[a].vertexStart),o=this.geometry;for(let s=0,a=r.length;s=this._geometryCount)return null;const r=this.geometry,i=this._geometryInfo[e];if(i.boundingBox===null){const o=new kr,s=r.index,a=r.attributes.position;for(let l=i.start,c=i.start+i.count;l=this._geometryCount)return null;const r=this.geometry,i=this._geometryInfo[e];if(i.boundingSphere===null){const o=new Kr;this.getBoundingBoxAt(e,Ov),Ov.getCenter(o.center);const s=r.index,a=r.attributes.position;let l=0;for(let c=i.start,u=i.start+i.count;c=r.length||r[e].active===!1?this:(n.toArray(o,e*16),i.needsUpdate=!0,this)}getMatrixAt(e,n){const r=this._instanceInfo,i=this._matricesTexture.image.data;return e>=r.length||r[e].active===!1?null:n.fromArray(i,e*16)}setColorAt(e,n){this._colorsTexture===null&&this._initColorsTexture();const r=this._colorsTexture,i=this._colorsTexture.image.data,o=this._instanceInfo;return e>=o.length||o[e].active===!1?this:(n.toArray(i,e*4),r.needsUpdate=!0,this)}getColorAt(e,n){const r=this._colorsTexture.image.data,i=this._instanceInfo;return e>=i.length||i[e].active===!1?null:n.fromArray(r,e*4)}setVisibleAt(e,n){const r=this._instanceInfo;return e>=r.length||r[e].active===!1||r[e].visible===n?this:(r[e].visible=n,this._visibilityChanged=!0,this)}getVisibleAt(e){const n=this._instanceInfo;return e>=n.length||n[e].active===!1?!1:n[e].visible}setGeometryIdAt(e,n){const r=this._instanceInfo,i=this._geometryInfo;return e>=r.length||r[e].active===!1||n>=i.length||i[n].active===!1?null:(r[e].geometryIndex=n,this)}getGeometryIdAt(e){const n=this._instanceInfo;return e>=n.length||n[e].active===!1?-1:n[e].geometryIndex}getGeometryRangeAt(e,n={}){if(e<0||e>=this._geometryCount)return null;const r=this._geometryInfo[e];return n.vertexStart=r.vertexStart,n.vertexCount=r.vertexCount,n.reservedVertexCount=r.reservedVertexCount,n.indexStart=r.indexStart,n.indexCount=r.indexCount,n.reservedIndexCount=r.reservedIndexCount,n.start=r.start,n.count=r.count,n}setInstanceCount(e){const n=this._availableInstanceIds,r=this._instanceInfo;for(n.sort(FM);n[n.length-1]===r.length;)r.pop(),n.pop();if(ea.active);if(Math.max(...r.map(a=>a.vertexStart+a.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${n}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...r.map(l=>l.indexStart+l.reservedIndexCount))>n)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${n}. Cannot shrink further.`);const o=this.geometry;o.dispose(),this._maxVertexCount=e,this._maxIndexCount=n,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new Dt,this._initializeGeometry(o));const s=this.geometry;o.index&&hc(o.index.array,s.index.array);for(const a in o.attributes)hc(o.attributes[a].array,s.attributes[a].array)}raycast(e,n){const r=this._instanceInfo,i=this._geometryInfo,o=this.matrixWorld,s=this.geometry;Hr.material=this.material,Hr.geometry.index=s.index,Hr.geometry.attributes=s.attributes,Hr.geometry.boundingBox===null&&(Hr.geometry.boundingBox=new kr),Hr.geometry.boundingSphere===null&&(Hr.geometry.boundingSphere=new Kr);for(let a=0,l=r.length;a({...n,boundingBox:n.boundingBox!==null?n.boundingBox.clone():null,boundingSphere:n.boundingSphere!==null?n.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(n=>({...n})),this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(e,n,r,i,o){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const s=i.getIndex(),a=s===null?1:s.array.BYTES_PER_ELEMENT,l=this._instanceInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,f=this._geometryInfo,h=this.perObjectFrustumCulled,m=this._indirectTexture,v=m.image.data;h&&(_i.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse).multiply(this.matrixWorld),zM.setFromProjectionMatrix(_i,e.coordinateSystem));let x=0;if(this.sortObjects){_i.copy(this.matrixWorld).invert(),np.setFromMatrixPosition(r.matrixWorld).applyMatrix4(_i),Bk.set(0,0,-1).transformDirection(r.matrixWorld).transformDirection(_i);for(let b=0,_=l.length;b<_;b++)if(l[b].visible&&l[b].active){const S=l[b].geometryIndex;this.getMatrixAt(b,_i),this.getBoundingSphereAt(S,dc).applyMatrix4(_i);let A=!1;if(h&&(A=!zM.intersectsSphere(dc)),!A){const P=f[S],R=nfe.subVectors(dc.center,np).dot(Bk);UM.push(P.start,P.count,R,b)}}const y=UM.list,g=this.customSort;g===null?y.sort(o.transparent?Que:Jue):g.call(this,y,r);for(let b=0,_=y.length;b<_;b++){const S=y[b];c[x]=S.start*a,u[x]=S.count,v[x]=S.index,x++}UM.reset()}else for(let y=0,g=l.length;y0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;or)return;BM.applyMatrix4(t.matrixWorld);const l=e.ray.origin.distanceTo(BM);if(!(le.far))return{distance:l,point:Vk.clone().applyMatrix4(t.matrixWorld),index:i,face:null,faceIndex:null,barycoord:null,object:t}}const $k=new H,Wk=new H;class Js extends Fa{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,o=n.count;i0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;oi.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:s})}}class ife extends On{constructor(e,n,r,i,o,s,a,l,c){super(e,n,r,i,o,s,a,l,c),this.isVideoTexture=!0,this.minFilter=s!==void 0?s:cr,this.magFilter=o!==void 0?o:cr,this.generateMipmaps=!1;const u=this;function f(){u.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class ofe extends On{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=Mr,this.minFilter=Mr,this.generateMipmaps=!1,this.needsUpdate=!0}}class m_ extends On{constructor(e,n,r,i,o,s,a,l,c,u,f,h){super(null,s,a,l,c,u,i,o,f,h),this.isCompressedTexture=!0,this.image={width:n,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class sfe extends m_{constructor(e,n,r,i,o,s){super(e,n,r,o,s),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Ii,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class afe extends m_{constructor(e,n,r){super(void 0,e[0].width,e[0].height,n,r,Oa),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class lfe extends On{constructor(e,n,r,i,o,s,a,l,c){super(e,n,r,i,o,s,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class fs{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const r=this.getUtoTmapping(e);return this.getPoint(r,n)}getPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPoint(r/e));return n}getSpacedPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPointAt(r/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const n=[];let r,i=this.getPoint(0),o=0;n.push(0);for(let s=1;s<=e;s++)r=this.getPoint(s/e),o+=r.distanceTo(i),n.push(o),i=r;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const r=this.getLengths();let i=0;const o=r.length;let s;n?s=n:s=e*r[o-1];let a=0,l=o-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=r[i]-s,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,r[i]===s)return i/(o-1);const u=r[i],h=r[i+1]-u,m=(s-u)/h;return(i+m)/(o-1)}getTangent(e,n){let i=e-1e-4,o=e+1e-4;i<0&&(i=0),o>1&&(o=1);const s=this.getPoint(i),a=this.getPoint(o),l=n||(s.isVector2?new Ne:new H);return l.copy(a).sub(s).normalize(),l}getTangentAt(e,n){const r=this.getUtoTmapping(e);return this.getTangent(r,n)}computeFrenetFrames(e,n){const r=new H,i=[],o=[],s=[],a=new H,l=new Mt;for(let m=0;m<=e;m++){const v=m/e;i[m]=this.getTangentAt(v,new H)}o[0]=new H,s[0]=new H;let c=Number.MAX_VALUE;const u=Math.abs(i[0].x),f=Math.abs(i[0].y),h=Math.abs(i[0].z);u<=c&&(c=u,r.set(1,0,0)),f<=c&&(c=f,r.set(0,1,0)),h<=c&&r.set(0,0,1),a.crossVectors(i[0],r).normalize(),o[0].crossVectors(i[0],a),s[0].crossVectors(i[0],o[0]);for(let m=1;m<=e;m++){if(o[m]=o[m-1].clone(),s[m]=s[m-1].clone(),a.crossVectors(i[m-1],i[m]),a.length()>Number.EPSILON){a.normalize();const v=Math.acos(Wn(i[m-1].dot(i[m]),-1,1));o[m].applyMatrix4(l.makeRotationAxis(a,v))}s[m].crossVectors(i[m],o[m])}if(n===!0){let m=Math.acos(Wn(o[0].dot(o[e]),-1,1));m/=e,i[0].dot(a.crossVectors(o[0],o[e]))>0&&(m=-m);for(let v=1;v<=e;v++)o[v].applyMatrix4(l.makeRotationAxis(i[v],m*v)),s[v].crossVectors(i[v],o[v])}return{tangents:i,normals:o,binormals:s}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class g_ extends fs{constructor(e=0,n=0,r=1,i=1,o=0,s=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=r,this.yRadius=i,this.aStartAngle=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(e,n=new Ne){const r=n,i=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const s=Math.abs(o)i;)o-=i;o0?0:(Math.floor(Math.abs(a)/o)+1)*o:l===0&&a===o-1&&(a=o-2,l=1);let c,u;this.closed||a>0?c=i[(a-1)%o]:(jv.subVectors(i[0],i[1]).add(i[0]),c=jv);const f=i[a%o],h=i[(a+1)%o];if(this.closed||a+2i.length-2?i.length-1:s+1],f=i[s>i.length-3?i.length-1:s+2];return r.set(Xk(a,l.x,c.x,u.x,f.x),Xk(a,l.y,c.y,u.y,f.y)),r}copy(e){super.copy(e),this.points=[];for(let n=0,r=e.points.length;n=r){const s=i[o]-r,a=this.curves[o],l=a.getLength(),c=l===0?0:1-s/l;return a.getPointAt(c,n)}o++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let r=0,i=this.curves.length;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,r=e.curves.length;n0){const f=c.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class bg extends Dt{constructor(e=[new Ne(0,-.5),new Ne(.5,0),new Ne(0,.5)],n=12,r=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=Wn(i,0,Math.PI*2);const o=[],s=[],a=[],l=[],c=[],u=1/n,f=new H,h=new Ne,m=new H,v=new H,x=new H;let y=0,g=0;for(let b=0;b<=e.length-1;b++)switch(b){case 0:y=e[b+1].x-e[b].x,g=e[b+1].y-e[b].y,m.x=g*1,m.y=-y,m.z=g*0,x.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(x.x,x.y,x.z);break;default:y=e[b+1].x-e[b].x,g=e[b+1].y-e[b].y,m.x=g*1,m.y=-y,m.z=g*0,v.copy(m),m.x+=x.x,m.y+=x.y,m.z+=x.z,m.normalize(),l.push(m.x,m.y,m.z),x.copy(v)}for(let b=0;b<=n;b++){const _=r+b*u*i,S=Math.sin(_),A=Math.cos(_);for(let P=0;P<=e.length-1;P++){f.x=e[P].x*S,f.y=e[P].y,f.z=e[P].x*A,s.push(f.x,f.y,f.z),h.x=b/n,h.y=P/(e.length-1),a.push(h.x,h.y);const R=l[3*P+0]*S,L=l[3*P+1],k=l[3*P+0]*A;c.push(R,L,k)}}for(let b=0;b0&&_(!0),n>0&&_(!1)),this.setIndex(u),this.setAttribute("position",new mt(f,3)),this.setAttribute("normal",new mt(h,3)),this.setAttribute("uv",new mt(m,2));function b(){const S=new H,A=new H;let P=0;const R=(n-e)/r;for(let L=0;L<=o;L++){const k=[],C=L/o,N=C*(n-e)+e;for(let z=0;z<=i;z++){const D=z/i,B=D*l+a,G=Math.sin(B),X=Math.cos(B);A.x=N*G,A.y=-C*r+y,A.z=N*X,f.push(A.x,A.y,A.z),S.set(G,R,X).normalize(),h.push(S.x,S.y,S.z),m.push(D,1-C),k.push(v++)}x.push(k)}for(let L=0;L0||k!==0)&&(u.push(C,N,D),P+=3),(n>0||k!==o-1)&&(u.push(N,z,D),P+=3)}c.addGroup(g,P,0),g+=P}function _(S){const A=v,P=new Ne,R=new H;let L=0;const k=S===!0?e:n,C=S===!0?1:-1;for(let z=1;z<=i;z++)f.push(0,y*C,0),h.push(0,C,0),m.push(.5,.5),v++;const N=v;for(let z=0;z<=i;z++){const B=z/i*l+a,G=Math.cos(B),X=Math.sin(B);R.x=k*X,R.y=y*C,R.z=k*G,f.push(R.x,R.y,R.z),h.push(0,C,0),P.x=G*.5+.5,P.y=X*.5*C+.5,m.push(P.x,P.y),v++}for(let z=0;z.9&&R<.1&&(_<.2&&(s[b+0]+=1),S<.2&&(s[b+2]+=1),A<.2&&(s[b+4]+=1))}}function h(b){o.push(b.x,b.y,b.z)}function m(b,_){const S=b*3;_.x=e[S+0],_.y=e[S+1],_.z=e[S+2]}function v(){const b=new H,_=new H,S=new H,A=new H,P=new Ne,R=new Ne,L=new Ne;for(let k=0,C=0;k80*n){a=c=t[0],l=u=t[1];for(let v=n;vc&&(c=f),h>u&&(u=h);m=Math.max(c-a,u-l),m=m!==0?32767/m:0}return Lm(o,s,n,a,l,m,0),s}};function MB(t,e,n,r,i){let o,s;if(i===Nfe(t,e,n,r)>0)for(o=e;o=e;o-=r)s=qk(o,t[o],t[o+1],s);return s&&__(s,s.next)&&(Dm(s),s=s.next),s}function pu(t,e){if(!t)return t;e||(e=t);let n=t,r;do if(r=!1,!n.steiner&&(__(n,n.next)||kn(n.prev,n,n.next)===0)){if(Dm(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function Lm(t,e,n,r,i,o,s){if(!t)return;!s&&o&&Cfe(t,r,i,o);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,o?yfe(t,r,i,o):vfe(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),Dm(t),t=c.next,a=c.next;continue}if(t=c,t===a){s?s===1?(t=xfe(pu(t),e,n),Lm(t,e,n,r,i,o,2)):s===2&&bfe(t,e,n,r,i,o):Lm(pu(t),e,n,r,i,o,1);break}}}function vfe(t){const e=t.prev,n=t,r=t.next;if(kn(e,n,r)>=0)return!1;const i=e.x,o=n.x,s=r.x,a=e.y,l=n.y,c=r.y,u=io?i>s?i:s:o>s?o:s,m=a>l?a>c?a:c:l>c?l:c;let v=r.next;for(;v!==e;){if(v.x>=u&&v.x<=h&&v.y>=f&&v.y<=m&&Yf(i,a,o,l,s,c,v.x,v.y)&&kn(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function yfe(t,e,n,r){const i=t.prev,o=t,s=t.next;if(kn(i,o,s)>=0)return!1;const a=i.x,l=o.x,c=s.x,u=i.y,f=o.y,h=s.y,m=al?a>c?a:c:l>c?l:c,y=u>f?u>h?u:h:f>h?f:h,g=fC(m,v,e,n,r),b=fC(x,y,e,n,r);let _=t.prevZ,S=t.nextZ;for(;_&&_.z>=g&&S&&S.z<=b;){if(_.x>=m&&_.x<=x&&_.y>=v&&_.y<=y&&_!==i&&_!==s&&Yf(a,u,l,f,c,h,_.x,_.y)&&kn(_.prev,_,_.next)>=0||(_=_.prevZ,S.x>=m&&S.x<=x&&S.y>=v&&S.y<=y&&S!==i&&S!==s&&Yf(a,u,l,f,c,h,S.x,S.y)&&kn(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;_&&_.z>=g;){if(_.x>=m&&_.x<=x&&_.y>=v&&_.y<=y&&_!==i&&_!==s&&Yf(a,u,l,f,c,h,_.x,_.y)&&kn(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;S&&S.z<=b;){if(S.x>=m&&S.x<=x&&S.y>=v&&S.y<=y&&S!==i&&S!==s&&Yf(a,u,l,f,c,h,S.x,S.y)&&kn(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function xfe(t,e,n){let r=t;do{const i=r.prev,o=r.next.next;!__(i,o)&&EB(i,r,r.next,o)&&Om(i,o)&&Om(o,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(o.i/n|0),Dm(r),Dm(r.next),r=t=o),r=r.next}while(r!==t);return pu(r)}function bfe(t,e,n,r,i,o){let s=t;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&Afe(s,a)){let l=CB(s,a);s=pu(s,s.next),l=pu(l,l.next),Lm(s,e,n,r,i,o,0),Lm(l,e,n,r,i,o,0);return}a=a.next}s=s.next}while(s!==t)}function _fe(t,e,n,r){const i=[];let o,s,a,l,c;for(o=0,s=e.length;o=n.next.y&&n.next.y!==n.y){const h=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(h<=o&&h>r&&(r=h,i=n.x=n.x&&n.x>=l&&o!==n.x&&Yf(si.x||n.x===i.x&&Efe(i,n)))&&(i=n,u=f)),n=n.next;while(n!==a);return i}function Efe(t,e){return kn(t.prev,t,e.prev)<0&&kn(e.next,t,t.next)<0}function Cfe(t,e,n,r){let i=t;do i.z===0&&(i.z=fC(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,Tfe(i)}function Tfe(t){let e,n,r,i,o,s,a,l,c=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,r=n,a=0,e=0;e0||l>0&&r;)a!==0&&(l===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1);return t}function fC(t,e,n,r,i){return t=(t-n)*i|0,e=(e-r)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function Rfe(t){let e=t,n=t;do(e.x=(t-s)*(o-a)&&(t-s)*(r-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function Afe(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Pfe(t,e)&&(Om(t,e)&&Om(e,t)&&Ife(t,e)&&(kn(t.prev,t,e.prev)||kn(t,e.prev,e))||__(t,e)&&kn(t.prev,t,t.next)>0&&kn(e.prev,e,e.next)>0)}function kn(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function __(t,e){return t.x===e.x&&t.y===e.y}function EB(t,e,n,r){const i=Gv(kn(t,e,n)),o=Gv(kn(t,e,r)),s=Gv(kn(n,r,t)),a=Gv(kn(n,r,e));return!!(i!==o&&s!==a||i===0&&Hv(t,n,e)||o===0&&Hv(t,r,e)||s===0&&Hv(n,t,r)||a===0&&Hv(n,e,r))}function Hv(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Gv(t){return t>0?1:t<0?-1:0}function Pfe(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&EB(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function Om(t,e){return kn(t.prev,t,t.next)<0?kn(t,e,t.next)>=0&&kn(t,t.prev,e)>=0:kn(t,e,t.prev)<0||kn(t,t.next,e)<0}function Ife(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,o=(t.y+e.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function CB(t,e){const n=new dC(t.i,t.x,t.y),r=new dC(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function qk(t,e,n,r){const i=new dC(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Dm(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function dC(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Nfe(t,e,n,r){let i=0;for(let o=e,s=n-r;o2&&t[e-1].equals(t[0])&&t.pop()}function Kk(t,e){for(let n=0;nNumber.EPSILON){const le=Math.sqrt(U),Ce=Math.sqrt(Le*Le+V*V),ve=ae.x-qe/le,He=ae.y+he/le,Ae=W.x-V/Ce,Ee=W.y+Le/Ce,bt=((Ae-ve)*V-(Ee-He)*Le)/(he*V-qe*Le);Ie=ve+he*bt-se.x,Re=He+qe*bt-se.y;const ke=Ie*Ie+Re*Re;if(ke<=2)return new Ne(Ie,Re);De=Math.sqrt(ke/2)}else{let le=!1;he>Number.EPSILON?Le>Number.EPSILON&&(le=!0):he<-Number.EPSILON?Le<-Number.EPSILON&&(le=!0):Math.sign(qe)===Math.sign(V)&&(le=!0),le?(Ie=-qe,Re=he,De=Math.sqrt(U)):(Ie=he,Re=qe,De=Math.sqrt(U/2))}return new Ne(Ie/De,Re/De)}const q=[];for(let se=0,ae=B.length,W=ae-1,Ie=se+1;se=0;se--){const ae=se/y,W=m*Math.cos(ae*Math.PI/2),Ie=v*Math.sin(ae*Math.PI/2)+x;for(let Re=0,De=B.length;Re=0;){const Ie=W;let Re=W-1;Re<0&&(Re=se.length-1);for(let De=0,he=u+y*2;De0)&&m.push(_,S,P),(g!==r-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class IB extends Or{static get type(){return"MeshPhongMaterial"}constructor(e){super(),this.isMeshPhongMaterial=!0,this.color=new at(16777215),this.specular=new at(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new at(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new so,this.combine=fg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class NB extends Or{static get type(){return"MeshToonMaterial"}constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.color=new at(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new at(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class kB extends Or{static get type(){return"MeshNormalMaterial"}constructor(e){super(),this.isMeshNormalMaterial=!0,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class LB extends Or{static get type(){return"MeshLambertMaterial"}constructor(e){super(),this.isMeshLambertMaterial=!0,this.color=new at(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new at(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new so,this.combine=fg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class OB extends Or{static get type(){return"MeshMatcapMaterial"}constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.color=new at(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class DB extends gi{static get type(){return"LineDashedMaterial"}constructor(e){super(),this.isLineDashedMaterial=!0,this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function zc(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function FB(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function zB(t){function e(i,o){return t[i]-t[o]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function hC(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,s=0;s!==r;++o){const a=n[o]*e;for(let l=0;l!==e;++l)i[s++]=t[a+l]}return i}function dA(t,e,n,r){let i=1,o=t[0];for(;o!==void 0&&o[r]===void 0;)o=t[i++];if(o===void 0)return;let s=o[r];if(s!==void 0)if(Array.isArray(s))do s=o[r],s!==void 0&&(e.push(o.time),n.push.apply(n,s)),o=t[i++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[r],s!==void 0&&(e.push(o.time),s.toArray(n,n.length)),o=t[i++];while(o!==void 0);else do s=o[r],s!==void 0&&(e.push(o.time),n.push(s)),o=t[i++];while(o!==void 0)}function Dfe(t,e,n,r,i=30){const o=t.clone();o.name=e;const s=[];for(let l=0;l=r)){f.push(c.times[m]);for(let x=0;xo.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l=a.times[v]){const g=v*f+u,b=g+f-u;x=a.values.slice(g,b)}else{const g=a.createInterpolant(),b=u,_=f-u;g.evaluate(o),x=g.resultBuffer.slice(b,_)}l==="quaternion"&&new zi().fromArray(x).normalize().conjugate().toArray(x);const y=c.times.length;for(let g=0;g=o)){const a=n[1];e=o)break t}s=r,r=0;break n}break e}for(;r>>1;en;)--s;if(++s,o!==0||s!==i){o>=s&&(s=Math.max(s,1),o=s-1);const a=this.getValueSize();this.times=r.slice(o,s),this.values=this.values.slice(o*a,s*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(i!==void 0&&FB(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===Uy,o=e.length-1;let s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*r,l=s*r,c=0;c!==r;++c)n[l+c]=n[a+c];++s}return s!==e.length?(this.times=e.slice(0,s),this.values=n.slice(0,s*r)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}ds.prototype.TimeBufferType=Float32Array;ds.prototype.ValueBufferType=Float32Array;ds.prototype.DefaultInterpolation=gx;class Ru extends ds{constructor(e,n,r){super(e,n,r)}}Ru.prototype.ValueTypeName="bool";Ru.prototype.ValueBufferType=Array;Ru.prototype.DefaultInterpolation=Rm;Ru.prototype.InterpolantFactoryMethodLinear=void 0;Ru.prototype.InterpolantFactoryMethodSmooth=void 0;class pA extends ds{}pA.prototype.ValueTypeName="color";class Fm extends ds{}Fm.prototype.ValueTypeName="number";class jB extends Sg{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)zi.slerpFlat(o,0,s,c-a,s,c,l);return o}}class Mg extends ds{InterpolantFactoryMethodLinear(e){return new jB(this.times,this.values,this.getValueSize(),e)}}Mg.prototype.ValueTypeName="quaternion";Mg.prototype.InterpolantFactoryMethodSmooth=void 0;class Au extends ds{constructor(e,n,r){super(e,n,r)}}Au.prototype.ValueTypeName="string";Au.prototype.ValueBufferType=Array;Au.prototype.DefaultInterpolation=Rm;Au.prototype.InterpolantFactoryMethodLinear=void 0;Au.prototype.InterpolantFactoryMethodSmooth=void 0;class zm extends ds{}zm.prototype.ValueTypeName="vector";class Um{constructor(e="",n=-1,r=[],i=l_){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=ro(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let s=0,a=r.length;s!==a;++s)n.push(Bfe(r[s]).scale(i));const o=new this(e.name,e.duration,n,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=r.length;o!==s;++o)n.push(ds.toJSON(r[o]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const o=n.length,s=[];for(let a=0;a1){const f=u[1];let h=i[f];h||(i[f]=h=[]),h.push(c)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return s}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(f,h,m,v,x){if(m.length!==0){const y=[],g=[];dA(m,y,g,v),y.length!==0&&x.push(new f(h,y,g))}},i=[],o=e.name||"default",s=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f{n&&n(o),this.manager.itemEnd(e)},0),o;if(fa[e]!==void 0){fa[e].push({onLoad:n,onProgress:r,onError:i});return}fa[e]=[],fa[e].push({onLoad:n,onProgress:r,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(s).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=fa[e],f=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),m=h?parseInt(h):0,v=m!==0;let x=0;const y=new ReadableStream({start(g){b();function b(){f.read().then(({done:_,value:S})=>{if(_)g.close();else{x+=S.byteLength;const A=new ProgressEvent("progress",{lengthComputable:v,loaded:x,total:m});for(let P=0,R=u.length;P{g.error(_)})}}});return new Response(y)}else throw new jfe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),h=f&&f[1]?f[1].toLowerCase():void 0,m=new TextDecoder(h);return c.arrayBuffer().then(v=>m.decode(v))}}}).then(c=>{_a.add(e,c);const u=fa[e];delete fa[e];for(let f=0,h=u.length;f{const u=fa[e];if(u===void 0)throw this.manager.itemError(e),c;delete fa[e];for(let f=0,h=u.length;f{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Vfe extends Vi{constructor(e){super(e)}load(e,n,r,i){const o=this,s=new za(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{n(o.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},r,i)}parse(e){const n=[];for(let r=0;r0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const s=e.uniforms[o];switch(i.uniforms[o]={},s.type){case"t":i.uniforms[o].value=r(s.value);break;case"c":i.uniforms[o].value=new at().setHex(s.value);break;case"v2":i.uniforms[o].value=new Ne().fromArray(s.value);break;case"v3":i.uniforms[o].value=new H().fromArray(s.value);break;case"v4":i.uniforms[o].value=new en().fromArray(s.value);break;case"m3":i.uniforms[o].value=new Ot().fromArray(s.value);break;case"m4":i.uniforms[o].value=new Mt().fromArray(s.value);break;default:i.uniforms[o].value=s.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(i.glslVersion=e.glslVersion),e.extensions!==void 0)for(const o in e.extensions)i.extensions[o]=e.extensions[o];if(e.lights!==void 0&&(i.lights=e.lights),e.clipping!==void 0&&(i.clipping=e.clipping),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=r(e.map)),e.matcap!==void 0&&(i.matcap=r(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=r(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=r(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=r(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new Ne().fromArray(o)}return e.displacementMap!==void 0&&(i.displacementMap=r(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=r(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=r(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=r(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=r(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=r(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=r(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=r(e.envMap)),e.envMapRotation!==void 0&&i.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=r(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=r(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=r(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=r(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=r(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=r(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Ne().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=r(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=r(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=r(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=r(e.thicknessMap)),e.anisotropyMap!==void 0&&(i.anisotropyMap=r(e.anisotropyMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=r(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=r(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return P_.createMaterialFromType(e)}static createMaterialFromType(e){const n={ShadowMaterial:RB,SpriteMaterial:nA,RawShaderMaterial:AB,ShaderMaterial:as,PointsMaterial:iA,MeshPhysicalMaterial:PB,MeshStandardMaterial:fA,MeshPhongMaterial:IB,MeshToonMaterial:NB,MeshNormalMaterial:kB,MeshLambertMaterial:LB,MeshDepthMaterial:eA,MeshDistanceMaterial:tA,MeshBasicMaterial:Hl,MeshMatcapMaterial:OB,LineDashedMaterial:DB,LineBasicMaterial:gi,Material:Or};return new n[e]}}class pC{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r0){const l=new mA(n);o=new Bm(l),o.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){i=new Bm(this.manager),i.setCrossOrigin(this.crossOrigin);for(let s=0,a=e.length;s{const y=new kr;y.min.fromArray(x.boxMin),y.max.fromArray(x.boxMax);const g=new Kr;return g.radius=x.sphereRadius,g.center.fromArray(x.sphereCenter),{boxInitialized:x.boxInitialized,box:y,sphereInitialized:x.sphereInitialized,sphere:g}}),s._maxInstanceCount=e.maxInstanceCount,s._maxVertexCount=e.maxVertexCount,s._maxIndexCount=e.maxIndexCount,s._geometryInitialized=e.geometryInitialized,s._geometryCount=e.geometryCount,s._matricesTexture=c(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(s._colorsTexture=c(e.colorsTexture.uuid));break;case"LOD":s=new dB;break;case"Line":s=new Fa(a(e.geometry),l(e.material));break;case"LineLoop":s=new gB(a(e.geometry),l(e.material));break;case"LineSegments":s=new Js(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":s=new vB(a(e.geometry),l(e.material));break;case"Sprite":s=new fB(l(e.material));break;case"Group":s=new qf;break;case"Bone":s=new rA;break;default:s=new rn}if(s.uuid=e.uuid,e.name!==void 0&&(s.name=e.name),e.matrix!==void 0?(s.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=e.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(e.position!==void 0&&s.position.fromArray(e.position),e.rotation!==void 0&&s.rotation.fromArray(e.rotation),e.quaternion!==void 0&&s.quaternion.fromArray(e.quaternion),e.scale!==void 0&&s.scale.fromArray(e.scale)),e.up!==void 0&&s.up.fromArray(e.up),e.castShadow!==void 0&&(s.castShadow=e.castShadow),e.receiveShadow!==void 0&&(s.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(s.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(s.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(s.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(s.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(s.visible=e.visible),e.frustumCulled!==void 0&&(s.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(s.renderOrder=e.renderOrder),e.userData!==void 0&&(s.userData=e.userData),e.layers!==void 0&&(s.layers.mask=e.layers),e.children!==void 0){const h=e.children;for(let m=0;m"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=_a.get(e);if(s!==void 0){if(o.manager.itemStart(e),s.then){s.then(c=>{n&&n(c),o.manager.itemEnd(e)}).catch(c=>{i&&i(c)});return}return setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(c){return _a.add(e,c),n&&n(c),o.manager.itemEnd(e),c}).catch(function(c){i&&i(c),_a.remove(e),o.manager.itemError(e),o.manager.itemEnd(e)});_a.add(e,l),o.manager.itemStart(e)}}let Xv;class vA{static getContext(){return Xv===void 0&&(Xv=new(window.AudioContext||window.webkitAudioContext)),Xv}static setContext(e){Xv=e}}class Qfe extends Vi{constructor(e){super(e)}load(e,n,r,i){const o=this,s=new za(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(l){try{const c=l.slice(0);vA.getContext().decodeAudioData(c,function(f){n(f)}).catch(a)}catch(c){a(c)}},r,i);function a(l){i?i(l):console.error(l),o.manager.itemError(e)}}}const iL=new Mt,oL=new Mt,pc=new Mt;class ede{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new br,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new br,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,pc.copy(e.projectionMatrix);const i=n.eyeSep/2,o=i*n.near/n.focus,s=n.near*Math.tan(Xc*n.fov*.5)/n.zoom;let a,l;oL.elements[12]=-i,iL.elements[12]=i,a=-s*n.aspect+o,l=s*n.aspect+o,pc.elements[0]=2*n.near/(l-a),pc.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(pc),a=-s*n.aspect-o,l=s*n.aspect-o,pc.elements[0]=2*n.near/(l-a),pc.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(pc)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(oL),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(iL)}}class yA{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=sL(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const n=sL();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function sL(){return performance.now()}const mc=new H,aL=new zi,tde=new H,gc=new H;class nde extends rn{constructor(){super(),this.type="AudioListener",this.context=vA.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new yA}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(mc,aL,tde),gc.set(0,0,-1).applyQuaternion(aL),n.positionX){const i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(mc.x,i),n.positionY.linearRampToValueAtTime(mc.y,i),n.positionZ.linearRampToValueAtTime(mc.z,i),n.forwardX.linearRampToValueAtTime(gc.x,i),n.forwardY.linearRampToValueAtTime(gc.y,i),n.forwardZ.linearRampToValueAtTime(gc.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(mc.x,mc.y,mc.z),n.setOrientation(gc.x,gc.y,gc.z,r.x,r.y,r.z)}}class QB extends rn{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,n=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,n=this.filters.length;e0&&this._mixBufferRegionAdditive(r,i,this._addIndex*n,1,n);for(let l=n,c=n+n;l!==c;++l)if(r[l]!==r[l+n]){a.setValue(r,i);break}}saveOriginalState(){const e=this.binding,n=this.buffer,r=this.valueSize,i=r*this._origIndex;e.getValue(n,i);for(let o=r,s=i;o!==s;++o)n[o]=n[i+o%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,n=e+this.valueSize;for(let r=e;r=.5)for(let s=0;s!==o;++s)e[n+s]=e[r+s]}_slerp(e,n,r,i){zi.slerpFlat(e,n,e,n,e,r,i)}_slerpAdditive(e,n,r,i,o){const s=this._workIndex*o;zi.multiplyQuaternionsFlat(e,s,e,n,e,r),zi.slerpFlat(e,n,e,n,e,s,i)}_lerp(e,n,r,i,o){const s=1-i;for(let a=0;a!==o;++a){const l=n+a;e[l]=e[l]*s+e[r+a]*i}}_lerpAdditive(e,n,r,i,o){for(let s=0;s!==o;++s){const a=n+s;e[a]=e[a]+e[r+s]*i}}}const xA="\\[\\]\\.:\\/",sde=new RegExp("["+xA+"]","g"),bA="[^"+xA+"]",ade="[^"+xA.replace("\\.","")+"]",lde=/((?:WC+[\/:])*)/.source.replace("WC",bA),cde=/(WCOD+)?/.source.replace("WCOD",ade),ude=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",bA),fde=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",bA),dde=new RegExp("^"+lde+cde+ude+fde+"$"),hde=["material","materials","bones","map"];class pde{constructor(e,n,r){const i=r||tn.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=r.length;i!==o;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class tn{constructor(e,n,r){this.path=n,this.parsedPath=r||tn.parseTrackName(n),this.node=tn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new tn.Composite(e,n,r):new tn(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(sde,"")}static parseTrackName(e){const n=dde.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const o=r.nodeName.substring(i+1);hde.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(o){for(let s=0;s=o){const f=o++,h=e[f];n[h.uuid]=u,e[u]=h,n[c]=f,e[f]=l;for(let m=0,v=i;m!==v;++m){const x=r[m],y=x[f],g=x[u];x[u]=y,x[f]=g}}}this.nCachedObjects_=o}uncache(){const e=this._objects,n=this._indicesByUUID,r=this._bindings,i=r.length;let o=this.nCachedObjects_,s=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,f=n[u];if(f!==void 0)if(delete n[u],f0&&(n[m.uuid]=f),e[f]=m,e.pop();for(let v=0,x=i;v!==x;++v){const y=r[v];y[f]=y[h],y.pop()}}}this.nCachedObjects_=o}subscribe_(e,n){const r=this._bindingsIndicesByPath;let i=r[e];const o=this._bindings;if(i!==void 0)return o[i];const s=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);i=o.length,r[e]=i,s.push(e),a.push(n),o.push(f);for(let h=u,m=l.length;h!==m;++h){const v=l[h];f[h]=new tn(v,e,n)}return f}unsubscribe_(e){const n=this._bindingsIndicesByPath,r=n[e];if(r!==void 0){const i=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length-1,l=s[a],c=e[a];n[c]=r,s[r]=l,s.pop(),o[r]=o[a],o.pop(),i[r]=i[a],i.pop()}}}class t8{constructor(e,n,r=null,i=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=r,this.blendMode=i;const o=n.tracks,s=o.length,a=new Array(s),l={endingStart:Oc,endingEnd:Oc};for(let c=0;c!==s;++c){const u=o[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=LU,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,n){return this.loop=e,this.repetitions=n,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,n,r){if(e.fadeOut(n),this.fadeIn(n),r){const i=this._clip.duration,o=e._clip.duration,s=o/i,a=i/o;e.warp(1,s,n),this.warp(a,1,n)}return this}crossFadeTo(e,n,r){return e.crossFadeFrom(this,n,r)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,n,r){const i=this._mixer,o=i.time,s=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=o,l[1]=o+r,c[0]=e/s,c[1]=n/s,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,n,r,i){if(!this.enabled){this._updateWeight(e);return}const o=this._startTime;if(o!==null){const l=(e-o)*r;l<0||r===0?n=0:(this._startTime=null,n=r*l)}n*=this._updateTimeScale(e);const s=this._updateTime(n),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case GR:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(s),c[u].accumulateAdditive(a);break;case l_:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(s),c[u].accumulate(i,a)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const r=this._weightInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const r=this._timeScaleInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,r=this.loop;let i=this.time+e,o=this._loopCount;const s=r===OU;if(e===0)return o===-1?i:s&&(o&1)===1?n-i:i;if(r===kU){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=n)i=n;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),i>=n||i<0){const a=Math.floor(i/n);i-=n*a,o+=Math.abs(a);const l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?n:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(s&&(o&1)===1)return n-i}return i}_setEndings(e,n,r){const i=this._interpolantSettings;r?(i.endingStart=Dc,i.endingEnd=Dc):(e?i.endingStart=this.zeroSlopeAtStart?Dc:Oc:i.endingStart=Am,n?i.endingEnd=this.zeroSlopeAtEnd?Dc:Oc:i.endingEnd=Am)}_scheduleFading(e,n,r){const i=this._mixer,o=i.time;let s=this._weightInterpolant;s===null&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,l=s.sampleValues;return a[0]=o,l[0]=n,a[1]=o+e,l[1]=r,this}}const gde=new Float32Array(1);class vde extends Zs{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const r=e._localRoot||this._root,i=e._clip.tracks,o=i.length,s=e._propertyBindings,a=e._interpolants,l=r.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let f=0;f!==o;++f){const h=i[f],m=h.name;let v=u[m];if(v!==void 0)++v.referenceCount,s[f]=v;else{if(v=s[f],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,l,m));continue}const x=n&&n._propertyBindings[f].binding.parsedPath;v=new e8(tn.create(r,m,x),h.ValueTypeName,h.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,l,m),s[f]=v}a[f].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,o=this._actionsByClip[i];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,i,r)}const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const n=e._cacheIndex;return n!==null&&n=0;--r)e[r].stop();return this}update(e){e*=this.timeScale;const n=this._actions,r=this._nActiveActions,i=this.time+=e,o=Math.sign(e),s=this._accuIndex^=1;for(let c=0;c!==r;++c)n[c]._update(i,e,o,s);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(s);return this}setTime(e){this.time=0;for(let n=0;n=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,fL).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const dL=new H,qv=new H;class Ede{constructor(e=new H,n=new H){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){dL.subVectors(e,this.start),qv.subVectors(this.end,this.start);const r=qv.dot(qv);let o=qv.dot(dL)/r;return n&&(o=Wn(o,0,1)),o}closestPointToPoint(e,n,r){const i=this.closestPointToPointParameter(e,n);return this.delta(r).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const hL=new H;class Cde extends rn{constructor(e,n){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const r=new Dt,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,a=1,l=32;s1)for(let f=0;f.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{yL.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(yL,n)}}setLength(e,n=e*.2,r=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(r,n,r),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Ude extends Js{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new Dt;i.setAttribute("position",new mt(n,3)),i.setAttribute("color",new mt(r,3));const o=new gi({vertexColors:!0,toneMapped:!1});super(i,o),this.type="AxesHelper"}setColors(e,n,r){const i=new at,o=this.geometry.attributes.color.array;return i.set(e),i.toArray(o,0),i.toArray(o,3),i.set(n),i.toArray(o,6),i.toArray(o,9),i.set(r),i.toArray(o,12),i.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Bde{constructor(){this.type="ShapePath",this.color=new at,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new km,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,r,i){return this.currentPath.quadraticCurveTo(e,n,r,i),this}bezierCurveTo(e,n,r,i,o,s){return this.currentPath.bezierCurveTo(e,n,r,i,o,s),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(g){const b=[];for(let _=0,S=g.length;_Number.EPSILON){if(C<0&&(R=b[P],k=-k,L=b[A],C=-C),g.yL.y)continue;if(g.y===R.y){if(g.x===R.x)return!0}else{const N=C*(g.x-R.x)-k*(g.y-R.y);if(N===0)return!0;if(N<0)continue;S=!S}}else{if(g.y!==R.y)continue;if(L.x<=g.x&&g.x<=R.x||R.x<=g.x&&g.x<=L.x)return!0}}return S}const i=Us.isClockWise,o=this.subPaths;if(o.length===0)return[];let s,a,l;const c=[];if(o.length===1)return a=o[0],l=new Yc,l.curves=a.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;const f=[],h=[];let m=[],v=0,x;h[v]=void 0,m[v]=[];for(let g=0,b=o.length;g1){let g=!1,b=0;for(let _=0,S=h.length;_0&&g===!1&&(m=f)}let y;for(let g=0,b=h.length;g=0&&(S[be]=null,_[be].disconnect(_e))}for(let ce=0;ce=S.length){S.push(_e),be=$e;break}else if(S[$e]===null){S[$e]=_e,be=$e;break}if(be===-1)break}const Xe=_[be];Xe&&Xe.connect(_e)}}const X=new H,Z=new H;function F(J,ce,_e){X.setFromMatrixPosition(ce.matrixWorld),Z.setFromMatrixPosition(_e.matrixWorld);const be=X.distanceTo(Z),Xe=ce.projectionMatrix.elements,$e=_e.projectionMatrix.elements,tt=Xe[14]/(Xe[10]-1),Ve=Xe[14]/(Xe[10]+1),se=(Xe[9]+1)/Xe[5],ae=(Xe[9]-1)/Xe[5],W=(Xe[8]-1)/Xe[0],Ie=($e[8]+1)/$e[0],Re=tt*W,De=tt*Ie,he=be/(-W+Ie),qe=he*-W;if(ce.matrixWorld.decompose(J.position,J.quaternion,J.scale),J.translateX(qe),J.translateZ(he),J.matrixWorld.compose(J.position,J.quaternion,J.scale),J.matrixWorldInverse.copy(J.matrixWorld).invert(),Xe[10]===-1)J.projectionMatrix.copy(ce.projectionMatrix),J.projectionMatrixInverse.copy(ce.projectionMatrixInverse);else{const Le=tt+he,V=Ve+he,U=Re-qe,ne=De+(be-qe),le=se*Ve/V*Le,Ce=ae*Ve/V*Le;J.projectionMatrix.makePerspective(U,ne,le,Ce,Le,V),J.projectionMatrixInverse.copy(J.projectionMatrix).invert()}}function q(J,ce){ce===null?J.matrixWorld.copy(J.matrix):J.matrixWorld.multiplyMatrices(ce.matrixWorld,J.matrix),J.matrixWorldInverse.copy(J.matrixWorld).invert()}this.updateCamera=function(J){if(i===null)return;let ce=J.near,_e=J.far;x.texture!==null&&(x.depthNear>0&&(ce=x.depthNear),x.depthFar>0&&(_e=x.depthFar)),C.near=L.near=R.near=ce,C.far=L.far=R.far=_e,(N!==C.near||z!==C.far)&&(i.updateRenderState({depthNear:C.near,depthFar:C.far}),N=C.near,z=C.far),R.layers.mask=J.layers.mask|2,L.layers.mask=J.layers.mask|4,C.layers.mask=R.layers.mask|L.layers.mask;const be=J.parent,Xe=C.cameras;q(C,be);for(let $e=0;$e0&&(y.alphaTest.value=g.alphaTest);const b=e.get(g),_=b.envMap,S=b.envMapRotation;_&&(y.envMap.value=_,fc.copy(S),fc.x*=-1,fc.y*=-1,fc.z*=-1,_.isCubeTexture&&_.isRenderTargetTexture===!1&&(fc.y*=-1,fc.z*=-1),y.envMapRotation.value.setFromMatrix4(Gue.makeRotationFromEuler(fc)),y.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,y.reflectivity.value=g.reflectivity,y.ior.value=g.ior,y.refractionRatio.value=g.refractionRatio),g.lightMap&&(y.lightMap.value=g.lightMap,y.lightMapIntensity.value=g.lightMapIntensity,n(g.lightMap,y.lightMapTransform)),g.aoMap&&(y.aoMap.value=g.aoMap,y.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,y.aoMapTransform))}function s(y,g){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,g.map&&(y.map.value=g.map,n(g.map,y.mapTransform))}function a(y,g){y.dashSize.value=g.dashSize,y.totalSize.value=g.dashSize+g.gapSize,y.scale.value=g.scale}function l(y,g,b,_){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,y.size.value=g.size*b,y.scale.value=_*.5,g.map&&(y.map.value=g.map,n(g.map,y.uvTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,n(g.alphaMap,y.alphaMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest)}function c(y,g){y.diffuse.value.copy(g.color),y.opacity.value=g.opacity,y.rotation.value=g.rotation,g.map&&(y.map.value=g.map,n(g.map,y.mapTransform)),g.alphaMap&&(y.alphaMap.value=g.alphaMap,n(g.alphaMap,y.alphaMapTransform)),g.alphaTest>0&&(y.alphaTest.value=g.alphaTest)}function u(y,g){y.specular.value.copy(g.specular),y.shininess.value=Math.max(g.shininess,1e-4)}function f(y,g){g.gradientMap&&(y.gradientMap.value=g.gradientMap)}function h(y,g){y.metalness.value=g.metalness,g.metalnessMap&&(y.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,y.metalnessMapTransform)),y.roughness.value=g.roughness,g.roughnessMap&&(y.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,y.roughnessMapTransform)),g.envMap&&(y.envMapIntensity.value=g.envMapIntensity)}function m(y,g,b){y.ior.value=g.ior,g.sheen>0&&(y.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),y.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(y.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,y.sheenColorMapTransform)),g.sheenRoughnessMap&&(y.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,y.sheenRoughnessMapTransform))),g.clearcoat>0&&(y.clearcoat.value=g.clearcoat,y.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(y.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,y.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,y.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(y.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,y.clearcoatNormalMapTransform),y.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===hi&&y.clearcoatNormalScale.value.negate())),g.dispersion>0&&(y.dispersion.value=g.dispersion),g.iridescence>0&&(y.iridescence.value=g.iridescence,y.iridescenceIOR.value=g.iridescenceIOR,y.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],y.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(y.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,y.iridescenceMapTransform)),g.iridescenceThicknessMap&&(y.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,y.iridescenceThicknessMapTransform))),g.transmission>0&&(y.transmission.value=g.transmission,y.transmissionSamplerMap.value=b.texture,y.transmissionSamplerSize.value.set(b.width,b.height),g.transmissionMap&&(y.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,y.transmissionMapTransform)),y.thickness.value=g.thickness,g.thicknessMap&&(y.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,y.thicknessMapTransform)),y.attenuationDistance.value=g.attenuationDistance,y.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(y.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(y.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,y.anisotropyMapTransform))),y.specularIntensity.value=g.specularIntensity,y.specularColor.value.copy(g.specularColor),g.specularColorMap&&(y.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,y.specularColorMapTransform)),g.specularIntensityMap&&(y.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,y.specularIntensityMapTransform))}function v(y,g){g.matcap&&(y.matcap.value=g.matcap)}function x(y,g){const b=e.get(g).light;y.referencePosition.value.setFromMatrixPosition(b.matrixWorld),y.nearDistance.value=b.shadow.camera.near,y.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function que(t,e,n,r){let i={},o={},s=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(b,_){const S=_.program;r.uniformBlockBinding(b,S)}function c(b,_){let S=i[b.id];S===void 0&&(v(b),S=u(b),i[b.id]=S,b.addEventListener("dispose",y));const A=_.program;r.updateUBOMapping(b,A);const P=e.render.frame;o[b.id]!==P&&(h(b),o[b.id]=P)}function u(b){const _=f();b.__bindingPointIndex=_;const S=t.createBuffer(),A=b.__size,P=b.usage;return t.bindBuffer(t.UNIFORM_BUFFER,S),t.bufferData(t.UNIFORM_BUFFER,A,P),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,_,S),S}function f(){for(let b=0;b0&&(S+=A-P),b.__size=S,b.__cache={},this}function x(b){const _={boundary:0,storage:0};return typeof b=="number"||typeof b=="boolean"?(_.boundary=4,_.storage=4):b.isVector2?(_.boundary=8,_.storage=8):b.isVector3||b.isColor?(_.boundary=16,_.storage=12):b.isVector4?(_.boundary=16,_.storage=16):b.isMatrix3?(_.boundary=48,_.storage=48):b.isMatrix4?(_.boundary=64,_.storage=64):b.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",b),_}function y(b){const _=b.target;_.removeEventListener("dispose",y);const S=s.indexOf(_.__bindingPointIndex);s.splice(S,1),t.deleteBuffer(i[_.id]),delete i[_.id],delete o[_.id]}function g(){for(const b in i)t.deleteBuffer(i[b]);s=[],i={},o={}}return{bind:l,update:c,dispose:g}}class cB{constructor(e={}){const{canvas:n=qU(),context:r=null,depth:i=!0,stencil:o=!1,alpha:s=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1,reverseDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let m;if(r!==null){if(typeof WebGLRenderingContext<"u"&&r instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");m=r.getContextAttributes().alpha}else m=s;const v=new Uint32Array(4),x=new Int32Array(4);let y=null,g=null;const b=[],_=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Mi,this.toneMapping=Us,this.toneMappingExposure=1;const S=this;let A=!1,P=0,R=0,L=null,k=-1,C=null;const N=new en,z=new en;let D=null;const B=new at(0);let G=0,X=n.width,Z=n.height,F=1,q=null,K=null;const Q=new en(0,0,X,Z),de=new en(0,0,X,Z);let fe=!1;const J=new yg;let ce=!1,_e=!1;const be=new Mt,Xe=new Mt,$e=new H,tt=new en,Ve={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let se=!1;function ae(){return L===null?F:1}let W=r;function Ie(j,re){return n.getContext(j,re)}try{const j={alpha:!0,depth:i,stencil:o,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${r_}`),n.addEventListener("webglcontextlost",Pe,!1),n.addEventListener("webglcontextrestored",We,!1),n.addEventListener("webglcontextcreationerror",Ke,!1),W===null){const re="webgl2";if(W=Ie(re,j),W===null)throw Ie(re)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(j){throw console.error("THREE.WebGLRenderer: "+j.message),j}let Re,De,he,qe,Le,V,U,ne,le,Ce,ve,He,Ae,Ee,bt,ke,it,Oe,Ye,me,Fe,Je,gt,ee;function Ue(){Re=new ece(W),Re.init(),Je=new aB(W,Re),De=new qle(W,Re,e,Je),he=new Lue(W,Re),De.reverseDepthBuffer&&h&&he.buffers.depth.setReversed(!0),qe=new rce(W),Le=new _ue,V=new Bue(W,Re,he,Le,De,Je,qe),U=new Kle(S),ne=new Qle(S),le=new use(W),gt=new Gle(W,le),Ce=new tce(W,le,qe,gt),ve=new oce(W,Ce,le,qe),Ye=new ice(W,De,V),ke=new Yle(Le),He=new bue(S,U,ne,Re,De,gt,ke),Ae=new Xue(S,Le),Ee=new Sue,bt=new Aue(Re),Oe=new Hle(S,U,ne,he,ve,m,l),it=new Nue(S,ve,De),ee=new que(W,qe,De,he),me=new Xle(W,Re,qe),Fe=new nce(W,Re,qe),qe.programs=He.programs,S.capabilities=De,S.extensions=Re,S.properties=Le,S.renderLists=Ee,S.shadowMap=it,S.state=he,S.info=qe}Ue();const ye=new Hue(S,W);this.xr=ye,this.getContext=function(){return W},this.getContextAttributes=function(){return W.getContextAttributes()},this.forceContextLoss=function(){const j=Re.get("WEBGL_lose_context");j&&j.loseContext()},this.forceContextRestore=function(){const j=Re.get("WEBGL_lose_context");j&&j.restoreContext()},this.getPixelRatio=function(){return F},this.setPixelRatio=function(j){j!==void 0&&(F=j,this.setSize(X,Z,!1))},this.getSize=function(j){return j.set(X,Z)},this.setSize=function(j,re,pe=!0){if(ye.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}X=j,Z=re,n.width=Math.floor(j*F),n.height=Math.floor(re*F),pe===!0&&(n.style.width=j+"px",n.style.height=re+"px"),this.setViewport(0,0,j,re)},this.getDrawingBufferSize=function(j){return j.set(X*F,Z*F).floor()},this.setDrawingBufferSize=function(j,re,pe){X=j,Z=re,F=pe,n.width=Math.floor(j*pe),n.height=Math.floor(re*pe),this.setViewport(0,0,j,re)},this.getCurrentViewport=function(j){return j.copy(N)},this.getViewport=function(j){return j.copy(Q)},this.setViewport=function(j,re,pe,ge){j.isVector4?Q.set(j.x,j.y,j.z,j.w):Q.set(j,re,pe,ge),he.viewport(N.copy(Q).multiplyScalar(F).round())},this.getScissor=function(j){return j.copy(de)},this.setScissor=function(j,re,pe,ge){j.isVector4?de.set(j.x,j.y,j.z,j.w):de.set(j,re,pe,ge),he.scissor(z.copy(de).multiplyScalar(F).round())},this.getScissorTest=function(){return fe},this.setScissorTest=function(j){he.setScissorTest(fe=j)},this.setOpaqueSort=function(j){q=j},this.setTransparentSort=function(j){K=j},this.getClearColor=function(j){return j.copy(Oe.getClearColor())},this.setClearColor=function(){Oe.setClearColor.apply(Oe,arguments)},this.getClearAlpha=function(){return Oe.getClearAlpha()},this.setClearAlpha=function(){Oe.setClearAlpha.apply(Oe,arguments)},this.clear=function(j=!0,re=!0,pe=!0){let ge=0;if(j){let oe=!1;if(L!==null){const je=L.texture.format;oe=je===c_||je===l_||je===pg}if(oe){const je=L.texture.type,nt=je===ji||je===Fa||je===Rd||je===fu||je===s_||je===a_,ft=Oe.getClearColor(),dt=Oe.getClearAlpha(),Et=ft.r,It=ft.g,ht=ft.b;nt?(v[0]=Et,v[1]=It,v[2]=ht,v[3]=dt,W.clearBufferuiv(W.COLOR,0,v)):(x[0]=Et,x[1]=It,x[2]=ht,x[3]=dt,W.clearBufferiv(W.COLOR,0,x))}else ge|=W.COLOR_BUFFER_BIT}re&&(ge|=W.DEPTH_BUFFER_BIT),pe&&(ge|=W.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),W.clear(ge)},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",Pe,!1),n.removeEventListener("webglcontextrestored",We,!1),n.removeEventListener("webglcontextcreationerror",Ke,!1),Ee.dispose(),bt.dispose(),Le.dispose(),U.dispose(),ne.dispose(),ve.dispose(),gt.dispose(),ee.dispose(),He.dispose(),ye.dispose(),ye.removeEventListener("sessionstart",Og),ye.removeEventListener("sessionend",Dg),ps.stop()};function Pe(j){j.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),A=!0}function We(){console.log("THREE.WebGLRenderer: Context Restored."),A=!1;const j=qe.autoReset,re=it.enabled,pe=it.autoUpdate,ge=it.needsUpdate,oe=it.type;Ue(),qe.autoReset=j,it.enabled=re,it.autoUpdate=pe,it.needsUpdate=ge,it.type=oe}function Ke(j){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",j.statusMessage)}function Pt(j){const re=j.target;re.removeEventListener("dispose",Pt),Mn(re)}function Mn(j){ir(j),Le.remove(j)}function ir(j){const re=Le.get(j).programs;re!==void 0&&(re.forEach(function(pe){He.releaseProgram(pe)}),j.isShaderMaterial&&He.releaseShaderCache(j))}this.renderBufferDirect=function(j,re,pe,ge,oe,je){re===null&&(re=Ve);const nt=oe.isMesh&&oe.matrixWorld.determinant()<0,ft=rw(j,re,pe,ge,oe);he.setMaterial(ge,nt);let dt=pe.index,Et=1;if(ge.wireframe===!0){if(dt=Ce.getWireframeAttribute(pe),dt===void 0)return;Et=2}const It=pe.drawRange,ht=pe.attributes.position;let Wt=It.start*Et,Zt=(It.start+It.count)*Et;je!==null&&(Wt=Math.max(Wt,je.start*Et),Zt=Math.min(Zt,(je.start+je.count)*Et)),dt!==null?(Wt=Math.max(Wt,0),Zt=Math.min(Zt,dt.count)):ht!=null&&(Wt=Math.max(Wt,0),Zt=Math.min(Zt,ht.count));const wt=Zt-Wt;if(wt<0||wt===1/0)return;gt.setup(oe,ge,ft,pe,dt);let Bt,Ht=me;if(dt!==null&&(Bt=le.get(dt),Ht=Fe,Ht.setIndex(Bt)),oe.isMesh)ge.wireframe===!0?(he.setLineWidth(ge.wireframeLinewidth*ae()),Ht.setMode(W.LINES)):Ht.setMode(W.TRIANGLES);else if(oe.isLine){let ot=ge.linewidth;ot===void 0&&(ot=1),he.setLineWidth(ot*ae()),oe.isLineSegments?Ht.setMode(W.LINES):oe.isLineLoop?Ht.setMode(W.LINE_LOOP):Ht.setMode(W.LINE_STRIP)}else oe.isPoints?Ht.setMode(W.POINTS):oe.isSprite&&Ht.setMode(W.TRIANGLES);if(oe.isBatchedMesh)if(oe._multiDrawInstances!==null)Ht.renderMultiDrawInstances(oe._multiDrawStarts,oe._multiDrawCounts,oe._multiDrawCount,oe._multiDrawInstances);else if(Re.get("WEBGL_multi_draw"))Ht.renderMultiDraw(oe._multiDrawStarts,oe._multiDrawCounts,oe._multiDrawCount);else{const ot=oe._multiDrawStarts,En=oe._multiDrawCounts,qt=oe._multiDrawCount,dr=dt?le.get(dt).bytesPerElement:1,Gn=Le.get(ge).currentProgram.getUniforms();for(let hr=0;hr{function je(){if(ge.forEach(function(nt){Le.get(nt).currentProgram.isReady()&&ge.delete(nt)}),ge.size===0){oe(j);return}setTimeout(je,10)}Re.get("KHR_parallel_shader_compile")!==null?je():setTimeout(je,10)})};let yi=null;function Bo(j){yi&&yi(j)}function Og(){ps.stop()}function Dg(){ps.start()}const ps=new nB;ps.setAnimationLoop(Bo),typeof self<"u"&&ps.setContext(self),this.setAnimationLoop=function(j){yi=j,ye.setAnimationLoop(j),j===null?ps.stop():ps.start()},ye.addEventListener("sessionstart",Og),ye.addEventListener("sessionend",Dg),this.render=function(j,re){if(re!==void 0&&re.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(A===!0)return;if(j.matrixWorldAutoUpdate===!0&&j.updateMatrixWorld(),re.parent===null&&re.matrixWorldAutoUpdate===!0&&re.updateMatrixWorld(),ye.enabled===!0&&ye.isPresenting===!0&&(ye.cameraAutoUpdate===!0&&ye.updateCamera(re),re=ye.getCamera()),j.isScene===!0&&j.onBeforeRender(S,j,re,L),g=bt.get(j,_.length),g.init(re),_.push(g),Xe.multiplyMatrices(re.projectionMatrix,re.matrixWorldInverse),J.setFromProjectionMatrix(Xe),_e=this.localClippingEnabled,ce=ke.init(this.clippingPlanes,_e),y=Ee.get(j,b.length),y.init(),b.push(y),ye.enabled===!0&&ye.isPresenting===!0){const je=S.xr.getDepthSensingMesh();je!==null&&Yl(je,re,-1/0,S.sortObjects)}Yl(j,re,0,S.sortObjects),y.finish(),S.sortObjects===!0&&y.sort(q,K),se=ye.enabled===!1||ye.isPresenting===!1||ye.hasDepthSensing()===!1,se&&Oe.addToRenderList(y,j),this.info.render.frame++,ce===!0&&ke.beginShadows();const pe=g.state.shadowsArray;it.render(pe,j,re),ce===!0&&ke.endShadows(),this.info.autoReset===!0&&this.info.reset();const ge=y.opaque,oe=y.transmissive;if(g.setupLights(),re.isArrayCamera){const je=re.cameras;if(oe.length>0)for(let nt=0,ft=je.length;nt0&&$a(ge,oe,j,re),se&&Oe.render(j),Fg(y,j,re);L!==null&&(V.updateMultisampleRenderTarget(L),V.updateRenderTargetMipmap(L)),j.isScene===!0&&j.onAfterRender(S,j,re),gt.resetDefaultState(),k=-1,C=null,_.pop(),_.length>0?(g=_[_.length-1],ce===!0&&ke.setGlobalState(S.clippingPlanes,g.state.camera)):g=null,b.pop(),b.length>0?y=b[b.length-1]:y=null};function Yl(j,re,pe,ge){if(j.visible===!1)return;if(j.layers.test(re.layers)){if(j.isGroup)pe=j.renderOrder;else if(j.isLOD)j.autoUpdate===!0&&j.update(re);else if(j.isLight)g.pushLight(j),j.castShadow&&g.pushShadow(j);else if(j.isSprite){if(!j.frustumCulled||J.intersectsSprite(j)){ge&&tt.setFromMatrixPosition(j.matrixWorld).applyMatrix4(Xe);const nt=ve.update(j),ft=j.material;ft.visible&&y.push(j,nt,ft,pe,tt.z,null)}}else if((j.isMesh||j.isLine||j.isPoints)&&(!j.frustumCulled||J.intersectsObject(j))){const nt=ve.update(j),ft=j.material;if(ge&&(j.boundingSphere!==void 0?(j.boundingSphere===null&&j.computeBoundingSphere(),tt.copy(j.boundingSphere.center)):(nt.boundingSphere===null&&nt.computeBoundingSphere(),tt.copy(nt.boundingSphere.center)),tt.applyMatrix4(j.matrixWorld).applyMatrix4(Xe)),Array.isArray(ft)){const dt=nt.groups;for(let Et=0,It=dt.length;Et0&&ku(oe,re,pe),je.length>0&&ku(je,re,pe),nt.length>0&&ku(nt,re,pe),he.buffers.depth.setTest(!0),he.buffers.depth.setMask(!0),he.buffers.color.setMask(!0),he.setPolygonOffset(!1)}function $a(j,re,pe,ge){if((pe.isScene===!0?pe.overrideMaterial:null)!==null)return;g.state.transmissionRenderTarget[ge.id]===void 0&&(g.state.transmissionRenderTarget[ge.id]=new ss(1,1,{generateMipmaps:!0,type:Re.has("EXT_color_buffer_half_float")||Re.has("EXT_color_buffer_float")?Eu:ji,minFilter:Ns,samples:4,stencilBuffer:o,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Jt.workingColorSpace}));const je=g.state.transmissionRenderTarget[ge.id],nt=ge.viewport||N;je.setSize(nt.z,nt.w);const ft=S.getRenderTarget();S.setRenderTarget(je),S.getClearColor(B),G=S.getClearAlpha(),G<1&&S.setClearColor(16777215,.5),S.clear(),se&&Oe.render(pe);const dt=S.toneMapping;S.toneMapping=Us;const Et=ge.viewport;if(ge.viewport!==void 0&&(ge.viewport=void 0),g.setupLightsView(ge),ce===!0&&ke.setGlobalState(S.clippingPlanes,ge),ku(j,pe,ge),V.updateMultisampleRenderTarget(je),V.updateRenderTargetMipmap(je),Re.has("WEBGL_multisampled_render_to_texture")===!1){let It=!1;for(let ht=0,Wt=re.length;ht0),ht=!!pe.morphAttributes.position,Wt=!!pe.morphAttributes.normal,Zt=!!pe.morphAttributes.color;let wt=Us;ge.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(wt=S.toneMapping);const Bt=pe.morphAttributes.position||pe.morphAttributes.normal||pe.morphAttributes.color,Ht=Bt!==void 0?Bt.length:0,ot=Le.get(ge),En=g.state.lights;if(ce===!0&&(_e===!0||j!==C)){const Cn=j===C&&ge.id===k;ke.setState(ge,j,Cn)}let qt=!1;ge.version===ot.__version?(ot.needsLights&&ot.lightsStateVersion!==En.state.version||ot.outputColorSpace!==ft||oe.isBatchedMesh&&ot.batching===!1||!oe.isBatchedMesh&&ot.batching===!0||oe.isBatchedMesh&&ot.batchingColor===!0&&oe.colorTexture===null||oe.isBatchedMesh&&ot.batchingColor===!1&&oe.colorTexture!==null||oe.isInstancedMesh&&ot.instancing===!1||!oe.isInstancedMesh&&ot.instancing===!0||oe.isSkinnedMesh&&ot.skinning===!1||!oe.isSkinnedMesh&&ot.skinning===!0||oe.isInstancedMesh&&ot.instancingColor===!0&&oe.instanceColor===null||oe.isInstancedMesh&&ot.instancingColor===!1&&oe.instanceColor!==null||oe.isInstancedMesh&&ot.instancingMorph===!0&&oe.morphTexture===null||oe.isInstancedMesh&&ot.instancingMorph===!1&&oe.morphTexture!==null||ot.envMap!==dt||ge.fog===!0&&ot.fog!==je||ot.numClippingPlanes!==void 0&&(ot.numClippingPlanes!==ke.numPlanes||ot.numIntersection!==ke.numIntersection)||ot.vertexAlphas!==Et||ot.vertexTangents!==It||ot.morphTargets!==ht||ot.morphNormals!==Wt||ot.morphColors!==Zt||ot.toneMapping!==wt||ot.morphTargetsCount!==Ht)&&(qt=!0):(qt=!0,ot.__version=ge.version);let dr=ot.currentProgram;qt===!0&&(dr=Lu(ge,re,oe));let Gn=!1,hr=!1,Wa=!1;const vn=dr.getUniforms(),Qr=ot.uniforms;if(he.useProgram(dr.program)&&(Gn=!0,hr=!0,Wa=!0),ge.id!==k&&(k=ge.id,hr=!0),Gn||C!==j){he.buffers.depth.getReversed()?(be.copy(j.projectionMatrix),Ooe(be),Doe(be),vn.setValue(W,"projectionMatrix",be)):vn.setValue(W,"projectionMatrix",j.projectionMatrix),vn.setValue(W,"viewMatrix",j.matrixWorldInverse);const ms=vn.map.cameraPosition;ms!==void 0&&ms.setValue(W,$e.setFromMatrixPosition(j.matrixWorld)),De.logarithmicDepthBuffer&&vn.setValue(W,"logDepthBufFC",2/(Math.log(j.far+1)/Math.LN2)),(ge.isMeshPhongMaterial||ge.isMeshToonMaterial||ge.isMeshLambertMaterial||ge.isMeshBasicMaterial||ge.isMeshStandardMaterial||ge.isShaderMaterial)&&vn.setValue(W,"isOrthographic",j.isOrthographicCamera===!0),C!==j&&(C=j,hr=!0,Wa=!0)}if(oe.isSkinnedMesh){vn.setOptional(W,oe,"bindMatrix"),vn.setOptional(W,oe,"bindMatrixInverse");const Cn=oe.skeleton;Cn&&(Cn.boneTexture===null&&Cn.computeBoneTexture(),vn.setValue(W,"boneTexture",Cn.boneTexture,V))}oe.isBatchedMesh&&(vn.setOptional(W,oe,"batchingTexture"),vn.setValue(W,"batchingTexture",oe._matricesTexture,V),vn.setOptional(W,oe,"batchingIdTexture"),vn.setValue(W,"batchingIdTexture",oe._indirectTexture,V),vn.setOptional(W,oe,"batchingColorTexture"),oe._colorsTexture!==null&&vn.setValue(W,"batchingColorTexture",oe._colorsTexture,V));const Ha=pe.morphAttributes;if((Ha.position!==void 0||Ha.normal!==void 0||Ha.color!==void 0)&&Ye.update(oe,pe,dr),(hr||ot.receiveShadow!==oe.receiveShadow)&&(ot.receiveShadow=oe.receiveShadow,vn.setValue(W,"receiveShadow",oe.receiveShadow)),ge.isMeshGouraudMaterial&&ge.envMap!==null&&(Qr.envMap.value=dt,Qr.flipEnvMap.value=dt.isCubeTexture&&dt.isRenderTargetTexture===!1?-1:1),ge.isMeshStandardMaterial&&ge.envMap===null&&re.environment!==null&&(Qr.envMapIntensity.value=re.environmentIntensity),hr&&(vn.setValue(W,"toneMappingExposure",S.toneMappingExposure),ot.needsLights&&iw(Qr,Wa),je&&ge.fog===!0&&Ae.refreshFogUniforms(Qr,je),Ae.refreshMaterialUniforms(Qr,ge,F,Z,g.state.transmissionRenderTarget[j.id]),jy.upload(W,Ug(ot),Qr,V)),ge.isShaderMaterial&&ge.uniformsNeedUpdate===!0&&(jy.upload(W,Ug(ot),Qr,V),ge.uniformsNeedUpdate=!1),ge.isSpriteMaterial&&vn.setValue(W,"center",oe.center),vn.setValue(W,"modelViewMatrix",oe.modelViewMatrix),vn.setValue(W,"normalMatrix",oe.normalMatrix),vn.setValue(W,"modelMatrix",oe.matrixWorld),ge.isShaderMaterial||ge.isRawShaderMaterial){const Cn=ge.uniformsGroups;for(let ms=0,gs=Cn.length;ms0&&V.useMultisampledRTT(j)===!1?oe=Le.get(j).__webglMultisampledFramebuffer:Array.isArray(It)?oe=It[pe]:oe=It,N.copy(j.viewport),z.copy(j.scissor),D=j.scissorTest}else N.copy(Q).multiplyScalar(F).floor(),z.copy(de).multiplyScalar(F).floor(),D=fe;if(he.bindFramebuffer(W.FRAMEBUFFER,oe)&&ge&&he.drawBuffers(j,oe),he.viewport(N),he.scissor(z),he.setScissorTest(D),je){const dt=Le.get(j.texture);W.framebufferTexture2D(W.FRAMEBUFFER,W.COLOR_ATTACHMENT0,W.TEXTURE_CUBE_MAP_POSITIVE_X+re,dt.__webglTexture,pe)}else if(nt){const dt=Le.get(j.texture),Et=re||0;W.framebufferTextureLayer(W.FRAMEBUFFER,W.COLOR_ATTACHMENT0,dt.__webglTexture,pe||0,Et)}k=-1},this.readRenderTargetPixels=function(j,re,pe,ge,oe,je,nt){if(!(j&&j.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ft=Le.get(j).__webglFramebuffer;if(j.isWebGLCubeRenderTarget&&nt!==void 0&&(ft=ft[nt]),ft){he.bindFramebuffer(W.FRAMEBUFFER,ft);try{const dt=j.texture,Et=dt.format,It=dt.type;if(!De.textureFormatReadable(Et)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!De.textureTypeReadable(It)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}re>=0&&re<=j.width-ge&&pe>=0&&pe<=j.height-oe&&W.readPixels(re,pe,ge,oe,Je.convert(Et),Je.convert(It),je)}finally{const dt=L!==null?Le.get(L).__webglFramebuffer:null;he.bindFramebuffer(W.FRAMEBUFFER,dt)}}},this.readRenderTargetPixelsAsync=async function(j,re,pe,ge,oe,je,nt){if(!(j&&j.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let ft=Le.get(j).__webglFramebuffer;if(j.isWebGLCubeRenderTarget&&nt!==void 0&&(ft=ft[nt]),ft){const dt=j.texture,Et=dt.format,It=dt.type;if(!De.textureFormatReadable(Et))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!De.textureTypeReadable(It))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(re>=0&&re<=j.width-ge&&pe>=0&&pe<=j.height-oe){he.bindFramebuffer(W.FRAMEBUFFER,ft);const ht=W.createBuffer();W.bindBuffer(W.PIXEL_PACK_BUFFER,ht),W.bufferData(W.PIXEL_PACK_BUFFER,je.byteLength,W.STREAM_READ),W.readPixels(re,pe,ge,oe,Je.convert(Et),Je.convert(It),0);const Wt=L!==null?Le.get(L).__webglFramebuffer:null;he.bindFramebuffer(W.FRAMEBUFFER,Wt);const Zt=W.fenceSync(W.SYNC_GPU_COMMANDS_COMPLETE,0);return W.flush(),await Loe(W,Zt,4),W.bindBuffer(W.PIXEL_PACK_BUFFER,ht),W.getBufferSubData(W.PIXEL_PACK_BUFFER,0,je),W.deleteBuffer(ht),W.deleteSync(Zt),je}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(j,re=null,pe=0){j.isTexture!==!0&&(vp("WebGLRenderer: copyFramebufferToTexture function signature has changed."),re=arguments[0]||null,j=arguments[1]);const ge=Math.pow(2,-pe),oe=Math.floor(j.image.width*ge),je=Math.floor(j.image.height*ge),nt=re!==null?re.x:0,ft=re!==null?re.y:0;V.setTexture2D(j,0),W.copyTexSubImage2D(W.TEXTURE_2D,pe,0,0,nt,ft,oe,je),he.unbindTexture()},this.copyTextureToTexture=function(j,re,pe=null,ge=null,oe=0){j.isTexture!==!0&&(vp("WebGLRenderer: copyTextureToTexture function signature has changed."),ge=arguments[0]||null,j=arguments[1],re=arguments[2],oe=arguments[3]||0,pe=null);let je,nt,ft,dt,Et,It,ht,Wt,Zt;const wt=j.isCompressedTexture?j.mipmaps[oe]:j.image;pe!==null?(je=pe.max.x-pe.min.x,nt=pe.max.y-pe.min.y,ft=pe.isBox3?pe.max.z-pe.min.z:1,dt=pe.min.x,Et=pe.min.y,It=pe.isBox3?pe.min.z:0):(je=wt.width,nt=wt.height,ft=wt.depth||1,dt=0,Et=0,It=0),ge!==null?(ht=ge.x,Wt=ge.y,Zt=ge.z):(ht=0,Wt=0,Zt=0);const Bt=Je.convert(re.format),Ht=Je.convert(re.type);let ot;re.isData3DTexture?(V.setTexture3D(re,0),ot=W.TEXTURE_3D):re.isDataArrayTexture||re.isCompressedArrayTexture?(V.setTexture2DArray(re,0),ot=W.TEXTURE_2D_ARRAY):(V.setTexture2D(re,0),ot=W.TEXTURE_2D),W.pixelStorei(W.UNPACK_FLIP_Y_WEBGL,re.flipY),W.pixelStorei(W.UNPACK_PREMULTIPLY_ALPHA_WEBGL,re.premultiplyAlpha),W.pixelStorei(W.UNPACK_ALIGNMENT,re.unpackAlignment);const En=W.getParameter(W.UNPACK_ROW_LENGTH),qt=W.getParameter(W.UNPACK_IMAGE_HEIGHT),dr=W.getParameter(W.UNPACK_SKIP_PIXELS),Gn=W.getParameter(W.UNPACK_SKIP_ROWS),hr=W.getParameter(W.UNPACK_SKIP_IMAGES);W.pixelStorei(W.UNPACK_ROW_LENGTH,wt.width),W.pixelStorei(W.UNPACK_IMAGE_HEIGHT,wt.height),W.pixelStorei(W.UNPACK_SKIP_PIXELS,dt),W.pixelStorei(W.UNPACK_SKIP_ROWS,Et),W.pixelStorei(W.UNPACK_SKIP_IMAGES,It);const Wa=j.isDataArrayTexture||j.isData3DTexture,vn=re.isDataArrayTexture||re.isData3DTexture;if(j.isRenderTargetTexture||j.isDepthTexture){const Qr=Le.get(j),Ha=Le.get(re),Cn=Le.get(Qr.__renderTarget),ms=Le.get(Ha.__renderTarget);he.bindFramebuffer(W.READ_FRAMEBUFFER,Cn.__webglFramebuffer),he.bindFramebuffer(W.DRAW_FRAMEBUFFER,ms.__webglFramebuffer);for(let gs=0;gs0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}class m_{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Pm,this.updateRanges=[],this.version=0,this.uuid=ro()}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,o=this.stride;ie.far||n.push({distance:l,point:Zh.clone(),uv:Ai.getInterpolation(Zh,Av,Qh,Pv,Ak,DM,Pk,new Ne),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 Iv(t,e,n,r,i,o){yf.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(Jh.x=o*yf.x-i*yf.y,Jh.y=i*yf.x+o*yf.y):Jh.copy(yf),t.copy(e),t.x+=Jh.x,t.y+=Jh.y,t.applyMatrix4(uB)}const Nv=new H,Ik=new H;class dB extends rn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const n=e.levels;for(let r=0,i=n.length;r0){let r,i;for(r=1,i=n.length;r0){Nv.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(Nv);this.getObjectForDistance(i).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){Nv.setFromMatrixPosition(e.matrixWorld),Ik.setFromMatrixPosition(this.matrixWorld);const r=Nv.distanceTo(Ik)/e.zoom;n[0].object.visible=!0;let i,o;for(i=1,o=n.length;i=s)n[i-1].object.visible=!1,n[i].object.visible=!0;else break}for(this._currentLevel=i-1;i=o.length&&o.push({start:-1,count:-1,z:-1,index:-1});const a=o[this.index];s.push(a),this.index++,a.start=e,a.count=n,a.z=r,a.index=i}reset(){this.list.length=0,this.index=0}}const wi=new Mt,tfe=new at(1,1,1),BM=new yg,Ov=new kr,dc=new Zr,np=new H,Bk=new H,nfe=new H,jM=new efe,Hr=new rr,Dv=[];function rfe(t,e,n=0){const r=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const i=t.count;for(let o=0;o65535?new Uint32Array(i):new Uint16Array(i);n.setIndex(new pn(o,1))}this._geometryInitialized=!0}}_validateGeometry(e){const n=this.geometry;if(!!e.getIndex()!=!!n.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const r in n.attributes){if(!e.hasAttribute(r))throw new Error(`BatchedMesh: Added geometry missing "${r}". All geometries must have consistent attributes.`);const i=e.getAttribute(r),o=n.getAttribute(r);if(i.itemSize!==o.itemSize||i.normalized!==o.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new kr);const e=this.boundingBox,n=this._instanceInfo;e.makeEmpty();for(let r=0,i=n.length;r=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("BatchedMesh: Maximum item count reached.");const r={visible:!0,active:!0,geometryIndex:e};let i=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(UM),i=this._availableInstanceIds.shift(),this._instanceInfo[i]=r):(i=this._instanceInfo.length,this._instanceInfo.push(r));const o=this._matricesTexture;wi.identity().toArray(o.image.data,i*16),o.needsUpdate=!0;const s=this._colorsTexture;return s&&(tfe.toArray(s.image.data,i*4),s.needsUpdate=!0),this._visibilityChanged=!0,i}addGeometry(e,n=-1,r=-1){this._initializeGeometry(e),this._validateGeometry(e);const i={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},o=this._geometryInfo;i.vertexStart=this._nextVertexStart,i.reservedVertexCount=n===-1?e.getAttribute("position").count:n;const s=e.getIndex();if(s!==null&&(i.indexStart=this._nextIndexStart,i.reservedIndexCount=r===-1?s.count:r),i.indexStart!==-1&&i.indexStart+i.reservedIndexCount>this._maxIndexCount||i.vertexStart+i.reservedVertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");let l;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(UM),l=this._availableGeometryIds.shift(),o[l]=i):(l=this._geometryCount,this._geometryCount++,o.push(i)),this.setGeometryAt(l,e),this._nextIndexStart=i.indexStart+i.reservedIndexCount,this._nextVertexStart=i.vertexStart+i.reservedVertexCount,l}setGeometryAt(e,n){if(e>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(n);const r=this.geometry,i=r.getIndex()!==null,o=r.getIndex(),s=n.getIndex(),a=this._geometryInfo[e];if(i&&s.count>a.reservedIndexCount||n.attributes.position.count>a.reservedVertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.reservedVertexCount;a.vertexCount=n.getAttribute("position").count;for(const u in r.attributes){const f=n.getAttribute(u),h=r.getAttribute(u);rfe(f,h,l);const m=f.itemSize;for(let v=f.count,x=c;v=n.length||n[e].active===!1)return this;const r=this._instanceInfo;for(let i=0,o=r.length;i=n.length||n[e].active===!1?this:(n[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this)}optimize(){let e=0,n=0;const r=this._geometryInfo,i=r.map((s,a)=>a).sort((s,a)=>r[s].vertexStart-r[a].vertexStart),o=this.geometry;for(let s=0,a=r.length;s=this._geometryCount)return null;const r=this.geometry,i=this._geometryInfo[e];if(i.boundingBox===null){const o=new kr,s=r.index,a=r.attributes.position;for(let l=i.start,c=i.start+i.count;l=this._geometryCount)return null;const r=this.geometry,i=this._geometryInfo[e];if(i.boundingSphere===null){const o=new Zr;this.getBoundingBoxAt(e,Ov),Ov.getCenter(o.center);const s=r.index,a=r.attributes.position;let l=0;for(let c=i.start,u=i.start+i.count;c=r.length||r[e].active===!1?this:(n.toArray(o,e*16),i.needsUpdate=!0,this)}getMatrixAt(e,n){const r=this._instanceInfo,i=this._matricesTexture.image.data;return e>=r.length||r[e].active===!1?null:n.fromArray(i,e*16)}setColorAt(e,n){this._colorsTexture===null&&this._initColorsTexture();const r=this._colorsTexture,i=this._colorsTexture.image.data,o=this._instanceInfo;return e>=o.length||o[e].active===!1?this:(n.toArray(i,e*4),r.needsUpdate=!0,this)}getColorAt(e,n){const r=this._colorsTexture.image.data,i=this._instanceInfo;return e>=i.length||i[e].active===!1?null:n.fromArray(r,e*4)}setVisibleAt(e,n){const r=this._instanceInfo;return e>=r.length||r[e].active===!1||r[e].visible===n?this:(r[e].visible=n,this._visibilityChanged=!0,this)}getVisibleAt(e){const n=this._instanceInfo;return e>=n.length||n[e].active===!1?!1:n[e].visible}setGeometryIdAt(e,n){const r=this._instanceInfo,i=this._geometryInfo;return e>=r.length||r[e].active===!1||n>=i.length||i[n].active===!1?null:(r[e].geometryIndex=n,this)}getGeometryIdAt(e){const n=this._instanceInfo;return e>=n.length||n[e].active===!1?-1:n[e].geometryIndex}getGeometryRangeAt(e,n={}){if(e<0||e>=this._geometryCount)return null;const r=this._geometryInfo[e];return n.vertexStart=r.vertexStart,n.vertexCount=r.vertexCount,n.reservedVertexCount=r.reservedVertexCount,n.indexStart=r.indexStart,n.indexCount=r.indexCount,n.reservedIndexCount=r.reservedIndexCount,n.start=r.start,n.count=r.count,n}setInstanceCount(e){const n=this._availableInstanceIds,r=this._instanceInfo;for(n.sort(UM);n[n.length-1]===r.length;)r.pop(),n.pop();if(ea.active);if(Math.max(...r.map(a=>a.vertexStart+a.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${n}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...r.map(l=>l.indexStart+l.reservedIndexCount))>n)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${n}. Cannot shrink further.`);const o=this.geometry;o.dispose(),this._maxVertexCount=e,this._maxIndexCount=n,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new Dt,this._initializeGeometry(o));const s=this.geometry;o.index&&hc(o.index.array,s.index.array);for(const a in o.attributes)hc(o.attributes[a].array,s.attributes[a].array)}raycast(e,n){const r=this._instanceInfo,i=this._geometryInfo,o=this.matrixWorld,s=this.geometry;Hr.material=this.material,Hr.geometry.index=s.index,Hr.geometry.attributes=s.attributes,Hr.geometry.boundingBox===null&&(Hr.geometry.boundingBox=new kr),Hr.geometry.boundingSphere===null&&(Hr.geometry.boundingSphere=new Zr);for(let a=0,l=r.length;a({...n,boundingBox:n.boundingBox!==null?n.boundingBox.clone():null,boundingSphere:n.boundingSphere!==null?n.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(n=>({...n})),this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(e,n,r,i,o){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const s=i.getIndex(),a=s===null?1:s.array.BYTES_PER_ELEMENT,l=this._instanceInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,f=this._geometryInfo,h=this.perObjectFrustumCulled,m=this._indirectTexture,v=m.image.data;h&&(wi.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse).multiply(this.matrixWorld),BM.setFromProjectionMatrix(wi,e.coordinateSystem));let x=0;if(this.sortObjects){wi.copy(this.matrixWorld).invert(),np.setFromMatrixPosition(r.matrixWorld).applyMatrix4(wi),Bk.set(0,0,-1).transformDirection(r.matrixWorld).transformDirection(wi);for(let b=0,_=l.length;b<_;b++)if(l[b].visible&&l[b].active){const S=l[b].geometryIndex;this.getMatrixAt(b,wi),this.getBoundingSphereAt(S,dc).applyMatrix4(wi);let A=!1;if(h&&(A=!BM.intersectsSphere(dc)),!A){const P=f[S],R=nfe.subVectors(dc.center,np).dot(Bk);jM.push(P.start,P.count,R,b)}}const y=jM.list,g=this.customSort;g===null?y.sort(o.transparent?Que:Jue):g.call(this,y,r);for(let b=0,_=y.length;b<_;b++){const S=y[b];c[x]=S.start*a,u[x]=S.count,v[x]=S.index,x++}jM.reset()}else for(let y=0,g=l.length;y0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;or)return;VM.applyMatrix4(t.matrixWorld);const l=e.ray.origin.distanceTo(VM);if(!(le.far))return{distance:l,point:Vk.clone().applyMatrix4(t.matrixWorld),index:i,face:null,faceIndex:null,barycoord:null,object:t}}const $k=new H,Wk=new H;class Qs extends za{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,o=n.count;i0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;oi.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:s})}}class ife extends On{constructor(e,n,r,i,o,s,a,l,c){super(e,n,r,i,o,s,a,l,c),this.isVideoTexture=!0,this.minFilter=s!==void 0?s:cr,this.magFilter=o!==void 0?o:cr,this.generateMipmaps=!1;const u=this;function f(){u.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class ofe extends On{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=Mr,this.minFilter=Mr,this.generateMipmaps=!1,this.needsUpdate=!0}}class v_ extends On{constructor(e,n,r,i,o,s,a,l,c,u,f,h){super(null,s,a,l,c,u,i,o,f,h),this.isCompressedTexture=!0,this.image={width:n,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class sfe extends v_{constructor(e,n,r,i,o,s){super(e,n,r,o,s),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Ni,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class afe extends v_{constructor(e,n,r){super(void 0,e[0].width,e[0].height,n,r,Da),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class lfe extends On{constructor(e,n,r,i,o,s,a,l,c){super(e,n,r,i,o,s,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class fs{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const r=this.getUtoTmapping(e);return this.getPoint(r,n)}getPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPoint(r/e));return n}getSpacedPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPointAt(r/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const n=[];let r,i=this.getPoint(0),o=0;n.push(0);for(let s=1;s<=e;s++)r=this.getPoint(s/e),o+=r.distanceTo(i),n.push(o),i=r;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const r=this.getLengths();let i=0;const o=r.length;let s;n?s=n:s=e*r[o-1];let a=0,l=o-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=r[i]-s,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,r[i]===s)return i/(o-1);const u=r[i],h=r[i+1]-u,m=(s-u)/h;return(i+m)/(o-1)}getTangent(e,n){let i=e-1e-4,o=e+1e-4;i<0&&(i=0),o>1&&(o=1);const s=this.getPoint(i),a=this.getPoint(o),l=n||(s.isVector2?new Ne:new H);return l.copy(a).sub(s).normalize(),l}getTangentAt(e,n){const r=this.getUtoTmapping(e);return this.getTangent(r,n)}computeFrenetFrames(e,n){const r=new H,i=[],o=[],s=[],a=new H,l=new Mt;for(let m=0;m<=e;m++){const v=m/e;i[m]=this.getTangentAt(v,new H)}o[0]=new H,s[0]=new H;let c=Number.MAX_VALUE;const u=Math.abs(i[0].x),f=Math.abs(i[0].y),h=Math.abs(i[0].z);u<=c&&(c=u,r.set(1,0,0)),f<=c&&(c=f,r.set(0,1,0)),h<=c&&r.set(0,0,1),a.crossVectors(i[0],r).normalize(),o[0].crossVectors(i[0],a),s[0].crossVectors(i[0],o[0]);for(let m=1;m<=e;m++){if(o[m]=o[m-1].clone(),s[m]=s[m-1].clone(),a.crossVectors(i[m-1],i[m]),a.length()>Number.EPSILON){a.normalize();const v=Math.acos(Wn(i[m-1].dot(i[m]),-1,1));o[m].applyMatrix4(l.makeRotationAxis(a,v))}s[m].crossVectors(i[m],o[m])}if(n===!0){let m=Math.acos(Wn(o[0].dot(o[e]),-1,1));m/=e,i[0].dot(a.crossVectors(o[0],o[e]))>0&&(m=-m);for(let v=1;v<=e;v++)o[v].applyMatrix4(l.makeRotationAxis(i[v],m*v)),s[v].crossVectors(i[v],o[v])}return{tangents:i,normals:o,binormals:s}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class y_ extends fs{constructor(e=0,n=0,r=1,i=1,o=0,s=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=r,this.yRadius=i,this.aStartAngle=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(e,n=new Ne){const r=n,i=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const s=Math.abs(o)i;)o-=i;o0?0:(Math.floor(Math.abs(a)/o)+1)*o:l===0&&a===o-1&&(a=o-2,l=1);let c,u;this.closed||a>0?c=i[(a-1)%o]:(jv.subVectors(i[0],i[1]).add(i[0]),c=jv);const f=i[a%o],h=i[(a+1)%o];if(this.closed||a+2i.length-2?i.length-1:s+1],f=i[s>i.length-3?i.length-1:s+2];return r.set(Xk(a,l.x,c.x,u.x,f.x),Xk(a,l.y,c.y,u.y,f.y)),r}copy(e){super.copy(e),this.points=[];for(let n=0,r=e.points.length;n=r){const s=i[o]-r,a=this.curves[o],l=a.getLength(),c=l===0?0:1-s/l;return a.getPointAt(c,n)}o++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let r=0,i=this.curves.length;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,r=e.curves.length;n0){const f=c.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class bg extends Dt{constructor(e=[new Ne(0,-.5),new Ne(.5,0),new Ne(0,.5)],n=12,r=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=Wn(i,0,Math.PI*2);const o=[],s=[],a=[],l=[],c=[],u=1/n,f=new H,h=new Ne,m=new H,v=new H,x=new H;let y=0,g=0;for(let b=0;b<=e.length-1;b++)switch(b){case 0:y=e[b+1].x-e[b].x,g=e[b+1].y-e[b].y,m.x=g*1,m.y=-y,m.z=g*0,x.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(x.x,x.y,x.z);break;default:y=e[b+1].x-e[b].x,g=e[b+1].y-e[b].y,m.x=g*1,m.y=-y,m.z=g*0,v.copy(m),m.x+=x.x,m.y+=x.y,m.z+=x.z,m.normalize(),l.push(m.x,m.y,m.z),x.copy(v)}for(let b=0;b<=n;b++){const _=r+b*u*i,S=Math.sin(_),A=Math.cos(_);for(let P=0;P<=e.length-1;P++){f.x=e[P].x*S,f.y=e[P].y,f.z=e[P].x*A,s.push(f.x,f.y,f.z),h.x=b/n,h.y=P/(e.length-1),a.push(h.x,h.y);const R=l[3*P+0]*S,L=l[3*P+1],k=l[3*P+0]*A;c.push(R,L,k)}}for(let b=0;b0&&_(!0),n>0&&_(!1)),this.setIndex(u),this.setAttribute("position",new mt(f,3)),this.setAttribute("normal",new mt(h,3)),this.setAttribute("uv",new mt(m,2));function b(){const S=new H,A=new H;let P=0;const R=(n-e)/r;for(let L=0;L<=o;L++){const k=[],C=L/o,N=C*(n-e)+e;for(let z=0;z<=i;z++){const D=z/i,B=D*l+a,G=Math.sin(B),X=Math.cos(B);A.x=N*G,A.y=-C*r+y,A.z=N*X,f.push(A.x,A.y,A.z),S.set(G,R,X).normalize(),h.push(S.x,S.y,S.z),m.push(D,1-C),k.push(v++)}x.push(k)}for(let L=0;L0||k!==0)&&(u.push(C,N,D),P+=3),(n>0||k!==o-1)&&(u.push(N,z,D),P+=3)}c.addGroup(g,P,0),g+=P}function _(S){const A=v,P=new Ne,R=new H;let L=0;const k=S===!0?e:n,C=S===!0?1:-1;for(let z=1;z<=i;z++)f.push(0,y*C,0),h.push(0,C,0),m.push(.5,.5),v++;const N=v;for(let z=0;z<=i;z++){const B=z/i*l+a,G=Math.cos(B),X=Math.sin(B);R.x=k*X,R.y=y*C,R.z=k*G,f.push(R.x,R.y,R.z),h.push(0,C,0),P.x=G*.5+.5,P.y=X*.5*C+.5,m.push(P.x,P.y),v++}for(let z=0;z.9&&R<.1&&(_<.2&&(s[b+0]+=1),S<.2&&(s[b+2]+=1),A<.2&&(s[b+4]+=1))}}function h(b){o.push(b.x,b.y,b.z)}function m(b,_){const S=b*3;_.x=e[S+0],_.y=e[S+1],_.z=e[S+2]}function v(){const b=new H,_=new H,S=new H,A=new H,P=new Ne,R=new Ne,L=new Ne;for(let k=0,C=0;k80*n){a=c=t[0],l=u=t[1];for(let v=n;vc&&(c=f),h>u&&(u=h);m=Math.max(c-a,u-l),m=m!==0?32767/m:0}return Lm(o,s,n,a,l,m,0),s}};function MB(t,e,n,r,i){let o,s;if(i===Nfe(t,e,n,r)>0)for(o=e;o=e;o-=r)s=qk(o,t[o],t[o+1],s);return s&&S_(s,s.next)&&(Dm(s),s=s.next),s}function pu(t,e){if(!t)return t;e||(e=t);let n=t,r;do if(r=!1,!n.steiner&&(S_(n,n.next)||kn(n.prev,n,n.next)===0)){if(Dm(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function Lm(t,e,n,r,i,o,s){if(!t)return;!s&&o&&Cfe(t,r,i,o);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,o?yfe(t,r,i,o):vfe(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),Dm(t),t=c.next,a=c.next;continue}if(t=c,t===a){s?s===1?(t=xfe(pu(t),e,n),Lm(t,e,n,r,i,o,2)):s===2&&bfe(t,e,n,r,i,o):Lm(pu(t),e,n,r,i,o,1);break}}}function vfe(t){const e=t.prev,n=t,r=t.next;if(kn(e,n,r)>=0)return!1;const i=e.x,o=n.x,s=r.x,a=e.y,l=n.y,c=r.y,u=io?i>s?i:s:o>s?o:s,m=a>l?a>c?a:c:l>c?l:c;let v=r.next;for(;v!==e;){if(v.x>=u&&v.x<=h&&v.y>=f&&v.y<=m&&Yf(i,a,o,l,s,c,v.x,v.y)&&kn(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function yfe(t,e,n,r){const i=t.prev,o=t,s=t.next;if(kn(i,o,s)>=0)return!1;const a=i.x,l=o.x,c=s.x,u=i.y,f=o.y,h=s.y,m=al?a>c?a:c:l>c?l:c,y=u>f?u>h?u:h:f>h?f:h,g=dC(m,v,e,n,r),b=dC(x,y,e,n,r);let _=t.prevZ,S=t.nextZ;for(;_&&_.z>=g&&S&&S.z<=b;){if(_.x>=m&&_.x<=x&&_.y>=v&&_.y<=y&&_!==i&&_!==s&&Yf(a,u,l,f,c,h,_.x,_.y)&&kn(_.prev,_,_.next)>=0||(_=_.prevZ,S.x>=m&&S.x<=x&&S.y>=v&&S.y<=y&&S!==i&&S!==s&&Yf(a,u,l,f,c,h,S.x,S.y)&&kn(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;_&&_.z>=g;){if(_.x>=m&&_.x<=x&&_.y>=v&&_.y<=y&&_!==i&&_!==s&&Yf(a,u,l,f,c,h,_.x,_.y)&&kn(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;S&&S.z<=b;){if(S.x>=m&&S.x<=x&&S.y>=v&&S.y<=y&&S!==i&&S!==s&&Yf(a,u,l,f,c,h,S.x,S.y)&&kn(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function xfe(t,e,n){let r=t;do{const i=r.prev,o=r.next.next;!S_(i,o)&&EB(i,r,r.next,o)&&Om(i,o)&&Om(o,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(o.i/n|0),Dm(r),Dm(r.next),r=t=o),r=r.next}while(r!==t);return pu(r)}function bfe(t,e,n,r,i,o){let s=t;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&Afe(s,a)){let l=CB(s,a);s=pu(s,s.next),l=pu(l,l.next),Lm(s,e,n,r,i,o,0),Lm(l,e,n,r,i,o,0);return}a=a.next}s=s.next}while(s!==t)}function _fe(t,e,n,r){const i=[];let o,s,a,l,c;for(o=0,s=e.length;o=n.next.y&&n.next.y!==n.y){const h=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(h<=o&&h>r&&(r=h,i=n.x=n.x&&n.x>=l&&o!==n.x&&Yf(si.x||n.x===i.x&&Efe(i,n)))&&(i=n,u=f)),n=n.next;while(n!==a);return i}function Efe(t,e){return kn(t.prev,t,e.prev)<0&&kn(e.next,t,t.next)<0}function Cfe(t,e,n,r){let i=t;do i.z===0&&(i.z=dC(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,Tfe(i)}function Tfe(t){let e,n,r,i,o,s,a,l,c=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,r=n,a=0,e=0;e0||l>0&&r;)a!==0&&(l===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1);return t}function dC(t,e,n,r,i){return t=(t-n)*i|0,e=(e-r)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function Rfe(t){let e=t,n=t;do(e.x=(t-s)*(o-a)&&(t-s)*(r-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function Afe(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Pfe(t,e)&&(Om(t,e)&&Om(e,t)&&Ife(t,e)&&(kn(t.prev,t,e.prev)||kn(t,e.prev,e))||S_(t,e)&&kn(t.prev,t,t.next)>0&&kn(e.prev,e,e.next)>0)}function kn(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function S_(t,e){return t.x===e.x&&t.y===e.y}function EB(t,e,n,r){const i=Gv(kn(t,e,n)),o=Gv(kn(t,e,r)),s=Gv(kn(n,r,t)),a=Gv(kn(n,r,e));return!!(i!==o&&s!==a||i===0&&Hv(t,n,e)||o===0&&Hv(t,r,e)||s===0&&Hv(n,t,r)||a===0&&Hv(n,e,r))}function Hv(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Gv(t){return t>0?1:t<0?-1:0}function Pfe(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&EB(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function Om(t,e){return kn(t.prev,t,t.next)<0?kn(t,e,t.next)>=0&&kn(t,t.prev,e)>=0:kn(t,e,t.prev)<0||kn(t,t.next,e)<0}function Ife(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,o=(t.y+e.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function CB(t,e){const n=new hC(t.i,t.x,t.y),r=new hC(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function qk(t,e,n,r){const i=new hC(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Dm(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function hC(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Nfe(t,e,n,r){let i=0;for(let o=e,s=n-r;o2&&t[e-1].equals(t[0])&&t.pop()}function Kk(t,e){for(let n=0;nNumber.EPSILON){const le=Math.sqrt(U),Ce=Math.sqrt(Le*Le+V*V),ve=ae.x-qe/le,He=ae.y+he/le,Ae=W.x-V/Ce,Ee=W.y+Le/Ce,bt=((Ae-ve)*V-(Ee-He)*Le)/(he*V-qe*Le);Ie=ve+he*bt-se.x,Re=He+qe*bt-se.y;const ke=Ie*Ie+Re*Re;if(ke<=2)return new Ne(Ie,Re);De=Math.sqrt(ke/2)}else{let le=!1;he>Number.EPSILON?Le>Number.EPSILON&&(le=!0):he<-Number.EPSILON?Le<-Number.EPSILON&&(le=!0):Math.sign(qe)===Math.sign(V)&&(le=!0),le?(Ie=-qe,Re=he,De=Math.sqrt(U)):(Ie=he,Re=qe,De=Math.sqrt(U/2))}return new Ne(Ie/De,Re/De)}const q=[];for(let se=0,ae=B.length,W=ae-1,Ie=se+1;se=0;se--){const ae=se/y,W=m*Math.cos(ae*Math.PI/2),Ie=v*Math.sin(ae*Math.PI/2)+x;for(let Re=0,De=B.length;Re=0;){const Ie=W;let Re=W-1;Re<0&&(Re=se.length-1);for(let De=0,he=u+y*2;De0)&&m.push(_,S,P),(g!==r-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class IB extends Or{static get type(){return"MeshPhongMaterial"}constructor(e){super(),this.isMeshPhongMaterial=!0,this.color=new at(16777215),this.specular=new at(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new at(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new so,this.combine=fg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class NB extends Or{static get type(){return"MeshToonMaterial"}constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.color=new at(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new at(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class kB extends Or{static get type(){return"MeshNormalMaterial"}constructor(e){super(),this.isMeshNormalMaterial=!0,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class LB extends Or{static get type(){return"MeshLambertMaterial"}constructor(e){super(),this.isMeshLambertMaterial=!0,this.color=new at(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new at(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new so,this.combine=fg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class OB extends Or{static get type(){return"MeshMatcapMaterial"}constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.color=new at(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wl,this.normalScale=new Ne(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class DB extends vi{static get type(){return"LineDashedMaterial"}constructor(e){super(),this.isLineDashedMaterial=!0,this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function zc(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function FB(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function zB(t){function e(i,o){return t[i]-t[o]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function pC(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,s=0;s!==r;++o){const a=n[o]*e;for(let l=0;l!==e;++l)i[s++]=t[a+l]}return i}function dA(t,e,n,r){let i=1,o=t[0];for(;o!==void 0&&o[r]===void 0;)o=t[i++];if(o===void 0)return;let s=o[r];if(s!==void 0)if(Array.isArray(s))do s=o[r],s!==void 0&&(e.push(o.time),n.push.apply(n,s)),o=t[i++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[r],s!==void 0&&(e.push(o.time),s.toArray(n,n.length)),o=t[i++];while(o!==void 0);else do s=o[r],s!==void 0&&(e.push(o.time),n.push(s)),o=t[i++];while(o!==void 0)}function Dfe(t,e,n,r,i=30){const o=t.clone();o.name=e;const s=[];for(let l=0;l=r)){f.push(c.times[m]);for(let x=0;xo.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l=a.times[v]){const g=v*f+u,b=g+f-u;x=a.values.slice(g,b)}else{const g=a.createInterpolant(),b=u,_=f-u;g.evaluate(o),x=g.resultBuffer.slice(b,_)}l==="quaternion"&&new zi().fromArray(x).normalize().conjugate().toArray(x);const y=c.times.length;for(let g=0;g=o)){const a=n[1];e=o)break t}s=r,r=0;break n}break e}for(;r>>1;en;)--s;if(++s,o!==0||s!==i){o>=s&&(s=Math.max(s,1),o=s-1);const a=this.getValueSize();this.times=r.slice(o,s),this.values=this.values.slice(o*a,s*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(i!==void 0&&FB(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===By,o=e.length-1;let s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*r,l=s*r,c=0;c!==r;++c)n[l+c]=n[a+c];++s}return s!==e.length?(this.times=e.slice(0,s),this.values=n.slice(0,s*r)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}ds.prototype.TimeBufferType=Float32Array;ds.prototype.ValueBufferType=Float32Array;ds.prototype.DefaultInterpolation=vx;class Ru extends ds{constructor(e,n,r){super(e,n,r)}}Ru.prototype.ValueTypeName="bool";Ru.prototype.ValueBufferType=Array;Ru.prototype.DefaultInterpolation=Rm;Ru.prototype.InterpolantFactoryMethodLinear=void 0;Ru.prototype.InterpolantFactoryMethodSmooth=void 0;class pA extends ds{}pA.prototype.ValueTypeName="color";class Fm extends ds{}Fm.prototype.ValueTypeName="number";class jB extends Sg{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)zi.slerpFlat(o,0,s,c-a,s,c,l);return o}}class Mg extends ds{InterpolantFactoryMethodLinear(e){return new jB(this.times,this.values,this.getValueSize(),e)}}Mg.prototype.ValueTypeName="quaternion";Mg.prototype.InterpolantFactoryMethodSmooth=void 0;class Au extends ds{constructor(e,n,r){super(e,n,r)}}Au.prototype.ValueTypeName="string";Au.prototype.ValueBufferType=Array;Au.prototype.DefaultInterpolation=Rm;Au.prototype.InterpolantFactoryMethodLinear=void 0;Au.prototype.InterpolantFactoryMethodSmooth=void 0;class zm extends ds{}zm.prototype.ValueTypeName="vector";class Um{constructor(e="",n=-1,r=[],i=u_){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=ro(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let s=0,a=r.length;s!==a;++s)n.push(Bfe(r[s]).scale(i));const o=new this(e.name,e.duration,n,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=r.length;o!==s;++o)n.push(ds.toJSON(r[o]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const o=n.length,s=[];for(let a=0;a1){const f=u[1];let h=i[f];h||(i[f]=h=[]),h.push(c)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return s}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(f,h,m,v,x){if(m.length!==0){const y=[],g=[];dA(m,y,g,v),y.length!==0&&x.push(new f(h,y,g))}},i=[],o=e.name||"default",s=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f{n&&n(o),this.manager.itemEnd(e)},0),o;if(da[e]!==void 0){da[e].push({onLoad:n,onProgress:r,onError:i});return}da[e]=[],da[e].push({onLoad:n,onProgress:r,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(s).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=da[e],f=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),m=h?parseInt(h):0,v=m!==0;let x=0;const y=new ReadableStream({start(g){b();function b(){f.read().then(({done:_,value:S})=>{if(_)g.close();else{x+=S.byteLength;const A=new ProgressEvent("progress",{lengthComputable:v,loaded:x,total:m});for(let P=0,R=u.length;P{g.error(_)})}}});return new Response(y)}else throw new jfe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),h=f&&f[1]?f[1].toLowerCase():void 0,m=new TextDecoder(h);return c.arrayBuffer().then(v=>m.decode(v))}}}).then(c=>{wa.add(e,c);const u=da[e];delete da[e];for(let f=0,h=u.length;f{const u=da[e];if(u===void 0)throw this.manager.itemError(e),c;delete da[e];for(let f=0,h=u.length;f{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Vfe extends Vi{constructor(e){super(e)}load(e,n,r,i){const o=this,s=new Ua(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{n(o.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},r,i)}parse(e){const n=[];for(let r=0;r0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const s=e.uniforms[o];switch(i.uniforms[o]={},s.type){case"t":i.uniforms[o].value=r(s.value);break;case"c":i.uniforms[o].value=new at().setHex(s.value);break;case"v2":i.uniforms[o].value=new Ne().fromArray(s.value);break;case"v3":i.uniforms[o].value=new H().fromArray(s.value);break;case"v4":i.uniforms[o].value=new en().fromArray(s.value);break;case"m3":i.uniforms[o].value=new Ot().fromArray(s.value);break;case"m4":i.uniforms[o].value=new Mt().fromArray(s.value);break;default:i.uniforms[o].value=s.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(i.glslVersion=e.glslVersion),e.extensions!==void 0)for(const o in e.extensions)i.extensions[o]=e.extensions[o];if(e.lights!==void 0&&(i.lights=e.lights),e.clipping!==void 0&&(i.clipping=e.clipping),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=r(e.map)),e.matcap!==void 0&&(i.matcap=r(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=r(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=r(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=r(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new Ne().fromArray(o)}return e.displacementMap!==void 0&&(i.displacementMap=r(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=r(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=r(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=r(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=r(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=r(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=r(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=r(e.envMap)),e.envMapRotation!==void 0&&i.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=r(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=r(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=r(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=r(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=r(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=r(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Ne().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=r(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=r(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=r(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=r(e.thicknessMap)),e.anisotropyMap!==void 0&&(i.anisotropyMap=r(e.anisotropyMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=r(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=r(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return N_.createMaterialFromType(e)}static createMaterialFromType(e){const n={ShadowMaterial:RB,SpriteMaterial:nA,RawShaderMaterial:AB,ShaderMaterial:as,PointsMaterial:iA,MeshPhysicalMaterial:PB,MeshStandardMaterial:fA,MeshPhongMaterial:IB,MeshToonMaterial:NB,MeshNormalMaterial:kB,MeshLambertMaterial:LB,MeshDepthMaterial:eA,MeshDistanceMaterial:tA,MeshBasicMaterial:Hl,MeshMatcapMaterial:OB,LineDashedMaterial:DB,LineBasicMaterial:vi,Material:Or};return new n[e]}}class mC{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r0){const l=new mA(n);o=new Bm(l),o.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){i=new Bm(this.manager),i.setCrossOrigin(this.crossOrigin);for(let s=0,a=e.length;s{const y=new kr;y.min.fromArray(x.boxMin),y.max.fromArray(x.boxMax);const g=new Zr;return g.radius=x.sphereRadius,g.center.fromArray(x.sphereCenter),{boxInitialized:x.boxInitialized,box:y,sphereInitialized:x.sphereInitialized,sphere:g}}),s._maxInstanceCount=e.maxInstanceCount,s._maxVertexCount=e.maxVertexCount,s._maxIndexCount=e.maxIndexCount,s._geometryInitialized=e.geometryInitialized,s._geometryCount=e.geometryCount,s._matricesTexture=c(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(s._colorsTexture=c(e.colorsTexture.uuid));break;case"LOD":s=new dB;break;case"Line":s=new za(a(e.geometry),l(e.material));break;case"LineLoop":s=new gB(a(e.geometry),l(e.material));break;case"LineSegments":s=new Qs(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":s=new vB(a(e.geometry),l(e.material));break;case"Sprite":s=new fB(l(e.material));break;case"Group":s=new qf;break;case"Bone":s=new rA;break;default:s=new rn}if(s.uuid=e.uuid,e.name!==void 0&&(s.name=e.name),e.matrix!==void 0?(s.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(s.matrixAutoUpdate=e.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(e.position!==void 0&&s.position.fromArray(e.position),e.rotation!==void 0&&s.rotation.fromArray(e.rotation),e.quaternion!==void 0&&s.quaternion.fromArray(e.quaternion),e.scale!==void 0&&s.scale.fromArray(e.scale)),e.up!==void 0&&s.up.fromArray(e.up),e.castShadow!==void 0&&(s.castShadow=e.castShadow),e.receiveShadow!==void 0&&(s.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(s.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(s.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(s.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(s.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&s.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(s.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(s.visible=e.visible),e.frustumCulled!==void 0&&(s.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(s.renderOrder=e.renderOrder),e.userData!==void 0&&(s.userData=e.userData),e.layers!==void 0&&(s.layers.mask=e.layers),e.children!==void 0){const h=e.children;for(let m=0;m"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=wa.get(e);if(s!==void 0){if(o.manager.itemStart(e),s.then){s.then(c=>{n&&n(c),o.manager.itemEnd(e)}).catch(c=>{i&&i(c)});return}return setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(c){return wa.add(e,c),n&&n(c),o.manager.itemEnd(e),c}).catch(function(c){i&&i(c),wa.remove(e),o.manager.itemError(e),o.manager.itemEnd(e)});wa.add(e,l),o.manager.itemStart(e)}}let Xv;class vA{static getContext(){return Xv===void 0&&(Xv=new(window.AudioContext||window.webkitAudioContext)),Xv}static setContext(e){Xv=e}}class Qfe extends Vi{constructor(e){super(e)}load(e,n,r,i){const o=this,s=new Ua(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(l){try{const c=l.slice(0);vA.getContext().decodeAudioData(c,function(f){n(f)}).catch(a)}catch(c){a(c)}},r,i);function a(l){i?i(l):console.error(l),o.manager.itemError(e)}}}const iL=new Mt,oL=new Mt,pc=new Mt;class ede{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new br,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new br,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,pc.copy(e.projectionMatrix);const i=n.eyeSep/2,o=i*n.near/n.focus,s=n.near*Math.tan(Xc*n.fov*.5)/n.zoom;let a,l;oL.elements[12]=-i,iL.elements[12]=i,a=-s*n.aspect+o,l=s*n.aspect+o,pc.elements[0]=2*n.near/(l-a),pc.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(pc),a=-s*n.aspect-o,l=s*n.aspect-o,pc.elements[0]=2*n.near/(l-a),pc.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(pc)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(oL),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(iL)}}class yA{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=sL(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const n=sL();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function sL(){return performance.now()}const mc=new H,aL=new zi,tde=new H,gc=new H;class nde extends rn{constructor(){super(),this.type="AudioListener",this.context=vA.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new yA}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(mc,aL,tde),gc.set(0,0,-1).applyQuaternion(aL),n.positionX){const i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(mc.x,i),n.positionY.linearRampToValueAtTime(mc.y,i),n.positionZ.linearRampToValueAtTime(mc.z,i),n.forwardX.linearRampToValueAtTime(gc.x,i),n.forwardY.linearRampToValueAtTime(gc.y,i),n.forwardZ.linearRampToValueAtTime(gc.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(mc.x,mc.y,mc.z),n.setOrientation(gc.x,gc.y,gc.z,r.x,r.y,r.z)}}class QB extends rn{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,n=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,n=this.filters.length;e0&&this._mixBufferRegionAdditive(r,i,this._addIndex*n,1,n);for(let l=n,c=n+n;l!==c;++l)if(r[l]!==r[l+n]){a.setValue(r,i);break}}saveOriginalState(){const e=this.binding,n=this.buffer,r=this.valueSize,i=r*this._origIndex;e.getValue(n,i);for(let o=r,s=i;o!==s;++o)n[o]=n[i+o%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,n=e+this.valueSize;for(let r=e;r=.5)for(let s=0;s!==o;++s)e[n+s]=e[r+s]}_slerp(e,n,r,i){zi.slerpFlat(e,n,e,n,e,r,i)}_slerpAdditive(e,n,r,i,o){const s=this._workIndex*o;zi.multiplyQuaternionsFlat(e,s,e,n,e,r),zi.slerpFlat(e,n,e,n,e,s,i)}_lerp(e,n,r,i,o){const s=1-i;for(let a=0;a!==o;++a){const l=n+a;e[l]=e[l]*s+e[r+a]*i}}_lerpAdditive(e,n,r,i,o){for(let s=0;s!==o;++s){const a=n+s;e[a]=e[a]+e[r+s]*i}}}const xA="\\[\\]\\.:\\/",sde=new RegExp("["+xA+"]","g"),bA="[^"+xA+"]",ade="[^"+xA.replace("\\.","")+"]",lde=/((?:WC+[\/:])*)/.source.replace("WC",bA),cde=/(WCOD+)?/.source.replace("WCOD",ade),ude=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",bA),fde=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",bA),dde=new RegExp("^"+lde+cde+ude+fde+"$"),hde=["material","materials","bones","map"];class pde{constructor(e,n,r){const i=r||tn.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=r.length;i!==o;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class tn{constructor(e,n,r){this.path=n,this.parsedPath=r||tn.parseTrackName(n),this.node=tn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new tn.Composite(e,n,r):new tn(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(sde,"")}static parseTrackName(e){const n=dde.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const o=r.nodeName.substring(i+1);hde.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(o){for(let s=0;s=o){const f=o++,h=e[f];n[h.uuid]=u,e[u]=h,n[c]=f,e[f]=l;for(let m=0,v=i;m!==v;++m){const x=r[m],y=x[f],g=x[u];x[u]=y,x[f]=g}}}this.nCachedObjects_=o}uncache(){const e=this._objects,n=this._indicesByUUID,r=this._bindings,i=r.length;let o=this.nCachedObjects_,s=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,f=n[u];if(f!==void 0)if(delete n[u],f0&&(n[m.uuid]=f),e[f]=m,e.pop();for(let v=0,x=i;v!==x;++v){const y=r[v];y[f]=y[h],y.pop()}}}this.nCachedObjects_=o}subscribe_(e,n){const r=this._bindingsIndicesByPath;let i=r[e];const o=this._bindings;if(i!==void 0)return o[i];const s=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);i=o.length,r[e]=i,s.push(e),a.push(n),o.push(f);for(let h=u,m=l.length;h!==m;++h){const v=l[h];f[h]=new tn(v,e,n)}return f}unsubscribe_(e){const n=this._bindingsIndicesByPath,r=n[e];if(r!==void 0){const i=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length-1,l=s[a],c=e[a];n[c]=r,s[r]=l,s.pop(),o[r]=o[a],o.pop(),i[r]=i[a],i.pop()}}}class t8{constructor(e,n,r=null,i=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=r,this.blendMode=i;const o=n.tracks,s=o.length,a=new Array(s),l={endingStart:Oc,endingEnd:Oc};for(let c=0;c!==s;++c){const u=o[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=LU,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,n){return this.loop=e,this.repetitions=n,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,n,r){if(e.fadeOut(n),this.fadeIn(n),r){const i=this._clip.duration,o=e._clip.duration,s=o/i,a=i/o;e.warp(1,s,n),this.warp(a,1,n)}return this}crossFadeTo(e,n,r){return e.crossFadeFrom(this,n,r)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,n,r){const i=this._mixer,o=i.time,s=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=o,l[1]=o+r,c[0]=e/s,c[1]=n/s,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,n,r,i){if(!this.enabled){this._updateWeight(e);return}const o=this._startTime;if(o!==null){const l=(e-o)*r;l<0||r===0?n=0:(this._startTime=null,n=r*l)}n*=this._updateTimeScale(e);const s=this._updateTime(n),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case GR:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(s),c[u].accumulateAdditive(a);break;case u_:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(s),c[u].accumulate(i,a)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const r=this._weightInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const r=this._timeScaleInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,r=this.loop;let i=this.time+e,o=this._loopCount;const s=r===OU;if(e===0)return o===-1?i:s&&(o&1)===1?n-i:i;if(r===kU){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=n)i=n;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),i>=n||i<0){const a=Math.floor(i/n);i-=n*a,o+=Math.abs(a);const l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?n:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(s&&(o&1)===1)return n-i}return i}_setEndings(e,n,r){const i=this._interpolantSettings;r?(i.endingStart=Dc,i.endingEnd=Dc):(e?i.endingStart=this.zeroSlopeAtStart?Dc:Oc:i.endingStart=Am,n?i.endingEnd=this.zeroSlopeAtEnd?Dc:Oc:i.endingEnd=Am)}_scheduleFading(e,n,r){const i=this._mixer,o=i.time;let s=this._weightInterpolant;s===null&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,l=s.sampleValues;return a[0]=o,l[0]=n,a[1]=o+e,l[1]=r,this}}const gde=new Float32Array(1);class vde extends Js{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const r=e._localRoot||this._root,i=e._clip.tracks,o=i.length,s=e._propertyBindings,a=e._interpolants,l=r.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let f=0;f!==o;++f){const h=i[f],m=h.name;let v=u[m];if(v!==void 0)++v.referenceCount,s[f]=v;else{if(v=s[f],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,l,m));continue}const x=n&&n._propertyBindings[f].binding.parsedPath;v=new e8(tn.create(r,m,x),h.ValueTypeName,h.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,l,m),s[f]=v}a[f].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,o=this._actionsByClip[i];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,i,r)}const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const n=e._cacheIndex;return n!==null&&n=0;--r)e[r].stop();return this}update(e){e*=this.timeScale;const n=this._actions,r=this._nActiveActions,i=this.time+=e,o=Math.sign(e),s=this._accuIndex^=1;for(let c=0;c!==r;++c)n[c]._update(i,e,o,s);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(s);return this}setTime(e){this.time=0;for(let n=0;n=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,fL).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const dL=new H,qv=new H;class Ede{constructor(e=new H,n=new H){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){dL.subVectors(e,this.start),qv.subVectors(this.end,this.start);const r=qv.dot(qv);let o=qv.dot(dL)/r;return n&&(o=Wn(o,0,1)),o}closestPointToPoint(e,n,r){const i=this.closestPointToPointParameter(e,n);return this.delta(r).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const hL=new H;class Cde extends rn{constructor(e,n){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const r=new Dt,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,a=1,l=32;s1)for(let f=0;f.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{yL.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(yL,n)}}setLength(e,n=e*.2,r=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(r,n,r),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Ude extends Qs{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new Dt;i.setAttribute("position",new mt(n,3)),i.setAttribute("color",new mt(r,3));const o=new vi({vertexColors:!0,toneMapped:!1});super(i,o),this.type="AxesHelper"}setColors(e,n,r){const i=new at,o=this.geometry.attributes.color.array;return i.set(e),i.toArray(o,0),i.toArray(o,3),i.set(n),i.toArray(o,6),i.toArray(o,9),i.set(r),i.toArray(o,12),i.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Bde{constructor(){this.type="ShapePath",this.color=new at,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new km,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,r,i){return this.currentPath.quadraticCurveTo(e,n,r,i),this}bezierCurveTo(e,n,r,i,o,s){return this.currentPath.bezierCurveTo(e,n,r,i,o,s),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(g){const b=[];for(let _=0,S=g.length;_Number.EPSILON){if(C<0&&(R=b[P],k=-k,L=b[A],C=-C),g.yL.y)continue;if(g.y===R.y){if(g.x===R.x)return!0}else{const N=C*(g.x-R.x)-k*(g.y-R.y);if(N===0)return!0;if(N<0)continue;S=!S}}else{if(g.y!==R.y)continue;if(L.x<=g.x&&g.x<=R.x||R.x<=g.x&&g.x<=L.x)return!0}}return S}const i=Bs.isClockWise,o=this.subPaths;if(o.length===0)return[];let s,a,l;const c=[];if(o.length===1)return a=o[0],l=new Yc,l.curves=a.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;const f=[],h=[];let m=[],v=0,x;h[v]=void 0,m[v]=[];for(let g=0,b=o.length;g1){let g=!1,b=0;for(let _=0,S=h.length;_0&&g===!1&&(m=f)}let y;for(let g=0,b=h.length;g>>1,de=F[Q];if(0>>1;Qi(ce,K))_ei(be,ce)?(F[Q]=be,F[_e]=K,Q=_e):(F[Q]=ce,F[J]=K,Q=J);else if(_ei(be,K))F[Q]=be,F[_e]=K,Q=_e;else break e}}return q}function i(F,q){var K=F.sortIndex-q.sortIndex;return K!==0?K:F.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,v=!1,x=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(F){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=F)r(c),q.sortIndex=q.expirationTime,e(l,q);else break;q=n(c)}}function S(F){if(x=!1,_(F),!v)if(n(l)!==null)v=!0,X(A);else{var q=n(c);q!==null&&Z(S,q.startTime-F)}}function A(F,q){v=!1,x&&(x=!1,g(L),L=-1),m=!0;var K=h;try{for(_(q),f=n(l);f!==null&&(!(f.expirationTime>q)||F&&!N());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,h=f.priorityLevel;var de=Q(f.expirationTime<=q);q=t.unstable_now(),typeof de=="function"?f.callback=de:f===n(l)&&r(l),_(q)}else r(l);f=n(l)}if(f!==null)var fe=!0;else{var J=n(c);J!==null&&Z(S,J.startTime-q),fe=!1}return fe}finally{f=null,h=K,m=!1}}var P=!1,R=null,L=-1,k=5,C=-1;function N(){return!(t.unstable_now()-CF||125Q?(F.sortIndex=K,e(c,F),n(l)===null&&F===n(c)&&(x?(g(L),L=-1):x=!0,Z(S,K-Q))):(F.sortIndex=de,e(l,F),v||m||(v=!0,X(A))),F},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(F){var q=h;return function(){var K=h;h=q;try{return F.apply(this,arguments)}finally{h=K}}}})(a8);s8.exports=a8;var gC=s8.exports;/** + */(function(t){function e(F,q){var K=F.length;F.push(q);e:for(;0>>1,de=F[Q];if(0>>1;Qi(ce,K))_ei(be,ce)?(F[Q]=be,F[_e]=K,Q=_e):(F[Q]=ce,F[J]=K,Q=J);else if(_ei(be,K))F[Q]=be,F[_e]=K,Q=_e;else break e}}return q}function i(F,q){var K=F.sortIndex-q.sortIndex;return K!==0?K:F.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,v=!1,x=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(F){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=F)r(c),q.sortIndex=q.expirationTime,e(l,q);else break;q=n(c)}}function S(F){if(x=!1,_(F),!v)if(n(l)!==null)v=!0,X(A);else{var q=n(c);q!==null&&Z(S,q.startTime-F)}}function A(F,q){v=!1,x&&(x=!1,g(L),L=-1),m=!0;var K=h;try{for(_(q),f=n(l);f!==null&&(!(f.expirationTime>q)||F&&!N());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,h=f.priorityLevel;var de=Q(f.expirationTime<=q);q=t.unstable_now(),typeof de=="function"?f.callback=de:f===n(l)&&r(l),_(q)}else r(l);f=n(l)}if(f!==null)var fe=!0;else{var J=n(c);J!==null&&Z(S,J.startTime-q),fe=!1}return fe}finally{f=null,h=K,m=!1}}var P=!1,R=null,L=-1,k=5,C=-1;function N(){return!(t.unstable_now()-CF||125Q?(F.sortIndex=K,e(c,F),n(l)===null&&F===n(c)&&(x?(g(L),L=-1):x=!0,Z(S,K-Q))):(F.sortIndex=de,e(l,F),v||m||(v=!0,X(A))),F},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(F){var q=h;return function(){var K=h;h=q;try{return F.apply(this,arguments)}finally{h=K}}}})(a8);s8.exports=a8;var vC=s8.exports;/** * @license React * react-reconciler.production.min.js * @@ -4031,21 +4031,21 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Xde=function(e){var n={},r=T,i=gC,o=Object.assign;function s(d){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+d,w=1;wte||I[Y]!==O[te]){var Me=` -`+I[Y].replace(" at new "," at ");return d.displayName&&Me.includes("")&&(Me=Me.replace("",d.displayName)),Me}while(1<=Y&&0<=te);break}}}finally{dt=!1,Error.prepareStackTrace=w}return(d=d?d.displayName||d.name:"")?ft(d):""}var It=Object.prototype.hasOwnProperty,ht=[],Wt=-1;function Zt(d){return{current:d}}function wt(d){0>Wt||(d.current=ht[Wt],ht[Wt]=null,Wt--)}function Bt(d,p){Wt++,ht[Wt]=d.current,d.current=p}var Ht={},ot=Zt(Ht),En=Zt(!1),qt=Ht;function dr(d,p){var w=d.type.contextTypes;if(!w)return Ht;var M=d.stateNode;if(M&&M.__reactInternalMemoizedUnmaskedChildContext===p)return M.__reactInternalMemoizedMaskedChildContext;var I={},O;for(O in w)I[O]=p[O];return M&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=p,d.__reactInternalMemoizedMaskedChildContext=I),I}function Gn(d){return d=d.childContextTypes,d!=null}function hr(){wt(En),wt(ot)}function $a(d,p,w){if(ot.current!==Ht)throw Error(s(168));Bt(ot,p),Bt(En,w)}function vn(d,p,w){var M=d.stateNode;if(p=p.childContextTypes,typeof M.getChildContext!="function")return w;M=M.getChildContext();for(var I in M)if(!(I in p))throw Error(s(108,L(d)||"Unknown",I));return o({},w,M)}function Jr(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Ht,qt=ot.current,Bt(ot,d),Bt(En,En.current),!0}function Wa(d,p,w){var M=d.stateNode;if(!M)throw Error(s(169));w?(d=vn(d,p,qt),M.__reactInternalMemoizedMergedChildContext=d,wt(En),wt(ot),Bt(ot,d)):wt(En),Bt(En,w)}var Cn=Math.clz32?Math.clz32:Vg,ms=Math.log,gs=Math.LN2;function Vg(d){return d>>>=0,d===0?32:31-(ms(d)/gs|0)|0}var $g=64,Wg=4194304;function fh(d){switch(d&-d){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 d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Hg(d,p){var w=d.pendingLanes;if(w===0)return 0;var M=0,I=d.suspendedLanes,O=d.pingedLanes,Y=w&268435455;if(Y!==0){var te=Y&~I;te!==0?M=fh(te):(O&=Y,O!==0&&(M=fh(O)))}else Y=w&~I,Y!==0?M=fh(Y):O!==0&&(M=fh(O));if(M===0)return 0;if(p!==0&&p!==M&&!(p&I)&&(I=M&-M,O=p&-p,I>=O||I===16&&(O&4194240)!==0))return p;if(M&4&&(M|=w&16),p=d.entangledLanes,p!==0)for(d=d.entanglements,p&=M;0w;w++)p.push(d);return p}function dh(d,p,w){d.pendingLanes|=p,p!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,p=31-Cn(p),d[p]=w}function P7(d,p){var w=d.pendingLanes&~p;d.pendingLanes=p,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=p,d.mutableReadLanes&=p,d.entangledLanes&=p,p=d.entanglements;var M=d.eventTimes;for(d=d.expirationTimes;0>=Y,I-=Y,na=1<<32-Cn(p)+I|w<an?(gr=kt,kt=null):gr=kt.sibling;var ln=_t(ue,kt,xe[an],st);if(ln===null){kt===null&&(kt=gr);break}d&&kt&&ln.alternate===null&&p(ue,kt),ie=O(ln,ie,an),Vt===null?vt=ln:Vt.sibling=ln,Vt=ln,kt=gr}if(an===xe.length)return w(ue,kt),Tn&&Zl(ue,an),vt;if(kt===null){for(;anan?(gr=kt,kt=null):gr=kt.sibling;var Ja=_t(ue,kt,ln.value,st);if(Ja===null){kt===null&&(kt=gr);break}d&&kt&&Ja.alternate===null&&p(ue,kt),ie=O(Ja,ie,an),Vt===null?vt=Ja:Vt.sibling=Ja,Vt=Ja,kt=gr}if(ln.done)return w(ue,kt),Tn&&Zl(ue,an),vt;if(kt===null){for(;!ln.done;an++,ln=xe.next())ln=Nt(ue,ln.value,st),ln!==null&&(ie=O(ln,ie,an),Vt===null?vt=ln:Vt.sibling=ln,Vt=ln);return Tn&&Zl(ue,an),vt}for(kt=M(ue,kt);!ln.done;an++,ln=xe.next())ln=yn(kt,ue,an,ln.value,st),ln!==null&&(d&&ln.alternate!==null&&kt.delete(ln.key===null?an:ln.key),ie=O(ln,ie,an),Vt===null?vt=ln:Vt.sibling=ln,Vt=ln);return d&&kt.forEach(function(mj){return p(ue,mj)}),Tn&&Zl(ue,an),vt}function bo(ue,ie,xe,st){if(typeof xe=="object"&&xe!==null&&xe.type===u&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case l:e:{for(var vt=xe.key,Vt=ie;Vt!==null;){if(Vt.key===vt){if(vt=xe.type,vt===u){if(Vt.tag===7){w(ue,Vt.sibling),ie=I(Vt,xe.props.children),ie.return=ue,ue=ie;break e}}else if(Vt.elementType===vt||typeof vt=="object"&&vt!==null&&vt.$$typeof===_&&NP(vt)===Vt.type){w(ue,Vt.sibling),ie=I(Vt,xe.props),ie.ref=mh(ue,Vt,xe),ie.return=ue,ue=ie;break e}w(ue,Vt);break}else p(ue,Vt);Vt=Vt.sibling}xe.type===u?(ie=ic(xe.props.children,ue.mode,st,xe.key),ie.return=ue,ue=ie):(st=k0(xe.type,xe.key,xe.props,null,ue.mode,st),st.ref=mh(ue,ie,xe),st.return=ue,ue=st)}return Y(ue);case c:e:{for(Vt=xe.key;ie!==null;){if(ie.key===Vt)if(ie.tag===4&&ie.stateNode.containerInfo===xe.containerInfo&&ie.stateNode.implementation===xe.implementation){w(ue,ie.sibling),ie=I(ie,xe.children||[]),ie.return=ue,ue=ie;break e}else{w(ue,ie);break}else p(ue,ie);ie=ie.sibling}ie=oS(xe,ue.mode,st),ie.return=ue,ue=ie}return Y(ue);case _:return Vt=xe._init,bo(ue,ie,Vt(xe._payload),st)}if(G(xe))return yt(ue,ie,xe,st);if(P(xe))return Br(ue,ie,xe,st);n0(ue,xe)}return typeof xe=="string"&&xe!==""||typeof xe=="number"?(xe=""+xe,ie!==null&&ie.tag===6?(w(ue,ie.sibling),ie=I(ie,xe),ie.return=ue,ue=ie):(w(ue,ie),ie=iS(xe,ue.mode,st),ie.return=ue,ue=ie),Y(ue)):w(ue,ie)}return bo}var Bu=kP(!0),LP=kP(!1),gh={},go=Zt(gh),vh=Zt(gh),ju=Zt(gh);function _s(d){if(d===gh)throw Error(s(174));return d}function ww(d,p){Bt(ju,p),Bt(vh,d),Bt(go,gh),d=Z(p),wt(go),Bt(go,d)}function Vu(){wt(go),wt(vh),wt(ju)}function OP(d){var p=_s(ju.current),w=_s(go.current);p=F(w,d.type,p),w!==p&&(Bt(vh,d),Bt(go,p))}function Sw(d){vh.current===d&&(wt(go),wt(vh))}var In=Zt(0);function r0(d){for(var p=d;p!==null;){if(p.tag===13){var w=p.memoizedState;if(w!==null&&(w=w.dehydrated,w===null||ps(w)||Yl(w)))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if(p.flags&128)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===d)break;for(;p.sibling===null;){if(p.return===null||p.return===d)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var Mw=[];function Ew(){for(var d=0;dw?w:4,d(!0);var M=vo.transition;vo.transition={};try{d(!1),p()}finally{sn=w,vo.transition=M}}function YP(){return ws().memoizedState}function V7(d,p,w){var M=Ya(d);w={lane:M,action:w,hasEagerState:!1,eagerState:null,next:null},KP(d)?ZP(p,w):(JP(d,p,w),w=ei(),d=yo(d,M,w),d!==null&&QP(d,p,M))}function $7(d,p,w){var M=Ya(d),I={lane:M,action:w,hasEagerState:!1,eagerState:null,next:null};if(KP(d))ZP(p,I);else{JP(d,p,I);var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=p.lastRenderedReducer,O!==null))try{var Y=p.lastRenderedState,te=O(Y,w);if(I.hasEagerState=!0,I.eagerState=te,ys(te,Y))return}catch{}finally{}w=ei(),d=yo(d,M,w),d!==null&&QP(d,p,M)}}function KP(d){var p=d.alternate;return d===Un||p!==null&&p===Un}function ZP(d,p){yh=o0=!0;var w=d.pending;w===null?p.next=p:(p.next=w.next,w.next=p),d.pending=p}function JP(d,p,w){Jn!==null&&d.mode&1&&!(Gt&2)?(d=p.interleaved,d===null?(w.next=w,bs===null?bs=[p]:bs.push(p)):(w.next=d.next,d.next=w),p.interleaved=w):(d=p.pending,d===null?w.next=w:(w.next=d.next,d.next=w),p.pending=w)}function QP(d,p,w){if(w&4194240){var M=p.lanes;M&=d.pendingLanes,w|=M,p.lanes=w,ow(d,w)}}var u0={readContext:ho,useCallback:zr,useContext:zr,useEffect:zr,useImperativeHandle:zr,useInsertionEffect:zr,useLayoutEffect:zr,useMemo:zr,useReducer:zr,useRef:zr,useState:zr,useDebugValue:zr,useDeferredValue:zr,useTransition:zr,useMutableSource:zr,useSyncExternalStore:zr,useId:zr,unstable_isNewReconciler:!1},W7={readContext:ho,useCallback:function(d,p){return ia().memoizedState=[d,p===void 0?null:p],d},useContext:ho,useEffect:Pw,useImperativeHandle:function(d,p,w){return w=w!=null?w.concat([d]):null,l0(4194308,4,HP.bind(null,p,d),w)},useLayoutEffect:function(d,p){return l0(4194308,4,d,p)},useInsertionEffect:function(d,p){return l0(4,2,d,p)},useMemo:function(d,p){var w=ia();return p=p===void 0?null:p,d=d(),w.memoizedState=[d,p],d},useReducer:function(d,p,w){var M=ia();return p=w!==void 0?w(p):p,M.memoizedState=M.baseState=p,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:p},M.queue=d,d=d.dispatch=V7.bind(null,Un,d),[M.memoizedState,d]},useRef:function(d){var p=ia();return d={current:d},p.memoizedState=d},useState:Aw,useDebugValue:Iw,useDeferredValue:function(d){var p=Aw(d),w=p[0],M=p[1];return Pw(function(){var I=vo.transition;vo.transition={};try{M(d)}finally{vo.transition=I}},[d]),w},useTransition:function(){var d=Aw(!1),p=d[0];return d=j7.bind(null,d[1]),ia().memoizedState=d,[p,d]},useMutableSource:function(){},useSyncExternalStore:function(d,p,w){var M=Un,I=ia();if(Tn){if(w===void 0)throw Error(s(407));w=w()}else{if(w=p(),Jn===null)throw Error(s(349));$u&30||zP(M,p,w)}I.memoizedState=w;var O={value:w,getSnapshot:p};return I.queue=O,Pw(BP.bind(null,M,O,d),[d]),M.flags|=2048,bh(9,UP.bind(null,M,O,w,p),void 0,null),w},useId:function(){var d=ia(),p=Jn.identifierPrefix;if(Tn){var w=ra,M=na;w=(M&~(1<<32-Cn(M)-1)).toString(32)+w,p=":"+p+"R"+w,w=xh++,0")&&(Me=Me.replace("",d.displayName)),Me}while(1<=Y&&0<=te);break}}}finally{dt=!1,Error.prepareStackTrace=w}return(d=d?d.displayName||d.name:"")?ft(d):""}var It=Object.prototype.hasOwnProperty,ht=[],Wt=-1;function Zt(d){return{current:d}}function wt(d){0>Wt||(d.current=ht[Wt],ht[Wt]=null,Wt--)}function Bt(d,p){Wt++,ht[Wt]=d.current,d.current=p}var Ht={},ot=Zt(Ht),En=Zt(!1),qt=Ht;function dr(d,p){var w=d.type.contextTypes;if(!w)return Ht;var M=d.stateNode;if(M&&M.__reactInternalMemoizedUnmaskedChildContext===p)return M.__reactInternalMemoizedMaskedChildContext;var I={},O;for(O in w)I[O]=p[O];return M&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=p,d.__reactInternalMemoizedMaskedChildContext=I),I}function Gn(d){return d=d.childContextTypes,d!=null}function hr(){wt(En),wt(ot)}function Wa(d,p,w){if(ot.current!==Ht)throw Error(s(168));Bt(ot,p),Bt(En,w)}function vn(d,p,w){var M=d.stateNode;if(p=p.childContextTypes,typeof M.getChildContext!="function")return w;M=M.getChildContext();for(var I in M)if(!(I in p))throw Error(s(108,L(d)||"Unknown",I));return o({},w,M)}function Qr(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Ht,qt=ot.current,Bt(ot,d),Bt(En,En.current),!0}function Ha(d,p,w){var M=d.stateNode;if(!M)throw Error(s(169));w?(d=vn(d,p,qt),M.__reactInternalMemoizedMergedChildContext=d,wt(En),wt(ot),Bt(ot,d)):wt(En),Bt(En,w)}var Cn=Math.clz32?Math.clz32:Vg,ms=Math.log,gs=Math.LN2;function Vg(d){return d>>>=0,d===0?32:31-(ms(d)/gs|0)|0}var $g=64,Wg=4194304;function fh(d){switch(d&-d){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 d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Hg(d,p){var w=d.pendingLanes;if(w===0)return 0;var M=0,I=d.suspendedLanes,O=d.pingedLanes,Y=w&268435455;if(Y!==0){var te=Y&~I;te!==0?M=fh(te):(O&=Y,O!==0&&(M=fh(O)))}else Y=w&~I,Y!==0?M=fh(Y):O!==0&&(M=fh(O));if(M===0)return 0;if(p!==0&&p!==M&&!(p&I)&&(I=M&-M,O=p&-p,I>=O||I===16&&(O&4194240)!==0))return p;if(M&4&&(M|=w&16),p=d.entangledLanes,p!==0)for(d=d.entanglements,p&=M;0w;w++)p.push(d);return p}function dh(d,p,w){d.pendingLanes|=p,p!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,p=31-Cn(p),d[p]=w}function P7(d,p){var w=d.pendingLanes&~p;d.pendingLanes=p,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=p,d.mutableReadLanes&=p,d.entangledLanes&=p,p=d.entanglements;var M=d.eventTimes;for(d=d.expirationTimes;0>=Y,I-=Y,ra=1<<32-Cn(p)+I|w<an?(gr=kt,kt=null):gr=kt.sibling;var ln=_t(ue,kt,xe[an],st);if(ln===null){kt===null&&(kt=gr);break}d&&kt&&ln.alternate===null&&p(ue,kt),ie=O(ln,ie,an),Vt===null?vt=ln:Vt.sibling=ln,Vt=ln,kt=gr}if(an===xe.length)return w(ue,kt),Tn&&Zl(ue,an),vt;if(kt===null){for(;anan?(gr=kt,kt=null):gr=kt.sibling;var Qa=_t(ue,kt,ln.value,st);if(Qa===null){kt===null&&(kt=gr);break}d&&kt&&Qa.alternate===null&&p(ue,kt),ie=O(Qa,ie,an),Vt===null?vt=Qa:Vt.sibling=Qa,Vt=Qa,kt=gr}if(ln.done)return w(ue,kt),Tn&&Zl(ue,an),vt;if(kt===null){for(;!ln.done;an++,ln=xe.next())ln=Nt(ue,ln.value,st),ln!==null&&(ie=O(ln,ie,an),Vt===null?vt=ln:Vt.sibling=ln,Vt=ln);return Tn&&Zl(ue,an),vt}for(kt=M(ue,kt);!ln.done;an++,ln=xe.next())ln=yn(kt,ue,an,ln.value,st),ln!==null&&(d&&ln.alternate!==null&&kt.delete(ln.key===null?an:ln.key),ie=O(ln,ie,an),Vt===null?vt=ln:Vt.sibling=ln,Vt=ln);return d&&kt.forEach(function(mj){return p(ue,mj)}),Tn&&Zl(ue,an),vt}function bo(ue,ie,xe,st){if(typeof xe=="object"&&xe!==null&&xe.type===u&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case l:e:{for(var vt=xe.key,Vt=ie;Vt!==null;){if(Vt.key===vt){if(vt=xe.type,vt===u){if(Vt.tag===7){w(ue,Vt.sibling),ie=I(Vt,xe.props.children),ie.return=ue,ue=ie;break e}}else if(Vt.elementType===vt||typeof vt=="object"&&vt!==null&&vt.$$typeof===_&&NP(vt)===Vt.type){w(ue,Vt.sibling),ie=I(Vt,xe.props),ie.ref=mh(ue,Vt,xe),ie.return=ue,ue=ie;break e}w(ue,Vt);break}else p(ue,Vt);Vt=Vt.sibling}xe.type===u?(ie=ic(xe.props.children,ue.mode,st,xe.key),ie.return=ue,ue=ie):(st=k0(xe.type,xe.key,xe.props,null,ue.mode,st),st.ref=mh(ue,ie,xe),st.return=ue,ue=st)}return Y(ue);case c:e:{for(Vt=xe.key;ie!==null;){if(ie.key===Vt)if(ie.tag===4&&ie.stateNode.containerInfo===xe.containerInfo&&ie.stateNode.implementation===xe.implementation){w(ue,ie.sibling),ie=I(ie,xe.children||[]),ie.return=ue,ue=ie;break e}else{w(ue,ie);break}else p(ue,ie);ie=ie.sibling}ie=aS(xe,ue.mode,st),ie.return=ue,ue=ie}return Y(ue);case _:return Vt=xe._init,bo(ue,ie,Vt(xe._payload),st)}if(G(xe))return yt(ue,ie,xe,st);if(P(xe))return Br(ue,ie,xe,st);n0(ue,xe)}return typeof xe=="string"&&xe!==""||typeof xe=="number"?(xe=""+xe,ie!==null&&ie.tag===6?(w(ue,ie.sibling),ie=I(ie,xe),ie.return=ue,ue=ie):(w(ue,ie),ie=sS(xe,ue.mode,st),ie.return=ue,ue=ie),Y(ue)):w(ue,ie)}return bo}var Bu=kP(!0),LP=kP(!1),gh={},go=Zt(gh),vh=Zt(gh),ju=Zt(gh);function _s(d){if(d===gh)throw Error(s(174));return d}function Mw(d,p){Bt(ju,p),Bt(vh,d),Bt(go,gh),d=Z(p),wt(go),Bt(go,d)}function Vu(){wt(go),wt(vh),wt(ju)}function OP(d){var p=_s(ju.current),w=_s(go.current);p=F(w,d.type,p),w!==p&&(Bt(vh,d),Bt(go,p))}function Ew(d){vh.current===d&&(wt(go),wt(vh))}var In=Zt(0);function r0(d){for(var p=d;p!==null;){if(p.tag===13){var w=p.memoizedState;if(w!==null&&(w=w.dehydrated,w===null||ps(w)||Yl(w)))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if(p.flags&128)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===d)break;for(;p.sibling===null;){if(p.return===null||p.return===d)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var Cw=[];function Tw(){for(var d=0;dw?w:4,d(!0);var M=vo.transition;vo.transition={};try{d(!1),p()}finally{sn=w,vo.transition=M}}function YP(){return ws().memoizedState}function V7(d,p,w){var M=Ka(d);w={lane:M,action:w,hasEagerState:!1,eagerState:null,next:null},KP(d)?ZP(p,w):(JP(d,p,w),w=ti(),d=yo(d,M,w),d!==null&&QP(d,p,M))}function $7(d,p,w){var M=Ka(d),I={lane:M,action:w,hasEagerState:!1,eagerState:null,next:null};if(KP(d))ZP(p,I);else{JP(d,p,I);var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=p.lastRenderedReducer,O!==null))try{var Y=p.lastRenderedState,te=O(Y,w);if(I.hasEagerState=!0,I.eagerState=te,ys(te,Y))return}catch{}finally{}w=ti(),d=yo(d,M,w),d!==null&&QP(d,p,M)}}function KP(d){var p=d.alternate;return d===Un||p!==null&&p===Un}function ZP(d,p){yh=o0=!0;var w=d.pending;w===null?p.next=p:(p.next=w.next,w.next=p),d.pending=p}function JP(d,p,w){Jn!==null&&d.mode&1&&!(Gt&2)?(d=p.interleaved,d===null?(w.next=w,bs===null?bs=[p]:bs.push(p)):(w.next=d.next,d.next=w),p.interleaved=w):(d=p.pending,d===null?w.next=w:(w.next=d.next,d.next=w),p.pending=w)}function QP(d,p,w){if(w&4194240){var M=p.lanes;M&=d.pendingLanes,w|=M,p.lanes=w,aw(d,w)}}var u0={readContext:ho,useCallback:zr,useContext:zr,useEffect:zr,useImperativeHandle:zr,useInsertionEffect:zr,useLayoutEffect:zr,useMemo:zr,useReducer:zr,useRef:zr,useState:zr,useDebugValue:zr,useDeferredValue:zr,useTransition:zr,useMutableSource:zr,useSyncExternalStore:zr,useId:zr,unstable_isNewReconciler:!1},W7={readContext:ho,useCallback:function(d,p){return oa().memoizedState=[d,p===void 0?null:p],d},useContext:ho,useEffect:Nw,useImperativeHandle:function(d,p,w){return w=w!=null?w.concat([d]):null,l0(4194308,4,HP.bind(null,p,d),w)},useLayoutEffect:function(d,p){return l0(4194308,4,d,p)},useInsertionEffect:function(d,p){return l0(4,2,d,p)},useMemo:function(d,p){var w=oa();return p=p===void 0?null:p,d=d(),w.memoizedState=[d,p],d},useReducer:function(d,p,w){var M=oa();return p=w!==void 0?w(p):p,M.memoizedState=M.baseState=p,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:p},M.queue=d,d=d.dispatch=V7.bind(null,Un,d),[M.memoizedState,d]},useRef:function(d){var p=oa();return d={current:d},p.memoizedState=d},useState:Iw,useDebugValue:kw,useDeferredValue:function(d){var p=Iw(d),w=p[0],M=p[1];return Nw(function(){var I=vo.transition;vo.transition={};try{M(d)}finally{vo.transition=I}},[d]),w},useTransition:function(){var d=Iw(!1),p=d[0];return d=j7.bind(null,d[1]),oa().memoizedState=d,[p,d]},useMutableSource:function(){},useSyncExternalStore:function(d,p,w){var M=Un,I=oa();if(Tn){if(w===void 0)throw Error(s(407));w=w()}else{if(w=p(),Jn===null)throw Error(s(349));$u&30||zP(M,p,w)}I.memoizedState=w;var O={value:w,getSnapshot:p};return I.queue=O,Nw(BP.bind(null,M,O,d),[d]),M.flags|=2048,bh(9,UP.bind(null,M,O,w,p),void 0,null),w},useId:function(){var d=oa(),p=Jn.identifierPrefix;if(Tn){var w=ia,M=ra;w=(M&~(1<<32-Cn(M)-1)).toString(32)+w,p=":"+p+"R"+w,w=xh++,0Kw&&(p.flags|=128,M=!0,Mh(I,!1),p.lanes=4194304)}else{if(!M)if(d=r0(O),d!==null){if(p.flags|=128,M=!0,d=d.updateQueue,d!==null&&(p.updateQueue=d,p.flags|=4),Mh(I,!0),I.tail===null&&I.tailMode==="hidden"&&!O.alternate&&!Tn)return Ur(p),null}else 2*pr()-I.renderingStartTime>Kw&&w!==1073741824&&(p.flags|=128,M=!0,Mh(I,!1),p.lanes=4194304);I.isBackwards?(O.sibling=p.child,p.child=O):(d=I.last,d!==null?d.sibling=O:p.child=O,I.last=O)}return I.tail!==null?(p=I.tail,I.rendering=p,I.tail=p.sibling,I.renderingStartTime=pr(),p.sibling=null,d=In.current,Bt(In,M?d&1|2:d&1),p):(Ur(p),null);case 22:case 23:return tS(),M=p.memoizedState!==null,d!==null&&d.memoizedState!==null!==M&&(p.flags|=8192),M&&p.mode&1?Gi&1073741824&&(Ur(p),Ve&&p.subtreeFlags&6&&(p.flags|=8192)):Ur(p),null;case 24:return null;case 25:return null}throw Error(s(156,p.tag))}var Y7=a.ReactCurrentOwner,Hi=!1;function Qr(d,p,w,M){p.child=d===null?LP(p,null,w,M):Bu(p,d.child,w,M)}function a3(d,p,w,M,I){w=w.render;var O=p.ref;return Du(p,I),M=Tw(d,p,w,M,O,I),w=Rw(),d!==null&&!Hi?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~I,oa(d,p,I)):(Tn&&w&&vw(p),p.flags|=1,Qr(d,p,M,I),p.child)}function l3(d,p,w,M,I){if(d===null){var O=w.type;return typeof O=="function"&&!rS(O)&&O.defaultProps===void 0&&w.compare===null&&w.defaultProps===void 0?(p.tag=15,p.type=O,c3(d,p,O,M,I)):(d=k0(w.type,null,M,p,p.mode,I),d.ref=p.ref,d.return=p,p.child=d)}if(O=d.child,!(d.lanes&I)){var Y=O.memoizedProps;if(w=w.compare,w=w!==null?w:qg,w(Y,M)&&d.ref===p.ref)return oa(d,p,I)}return p.flags|=1,d=Za(O,M),d.ref=p.ref,d.return=p,p.child=d}function c3(d,p,w,M,I){if(d!==null&&qg(d.memoizedProps,M)&&d.ref===p.ref)if(Hi=!1,(d.lanes&I)!==0)d.flags&131072&&(Hi=!0);else return p.lanes=d.lanes,oa(d,p,I);return Lw(d,p,w,M,I)}function u3(d,p,w){var M=p.pendingProps,I=M.children,O=d!==null?d.memoizedState:null;if(M.mode==="hidden")if(!(p.mode&1))p.memoizedState={baseLanes:0,cachePool:null},Bt(Wu,Gi),Gi|=w;else if(w&1073741824)p.memoizedState={baseLanes:0,cachePool:null},M=O!==null?O.baseLanes:w,Bt(Wu,Gi),Gi|=M;else return d=O!==null?O.baseLanes|w:w,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:d,cachePool:null},p.updateQueue=null,Bt(Wu,Gi),Gi|=d,null;else O!==null?(M=O.baseLanes|w,p.memoizedState=null):M=w,Bt(Wu,Gi),Gi|=M;return Qr(d,p,I,w),p.child}function f3(d,p){var w=p.ref;(d===null&&w!==null||d!==null&&d.ref!==w)&&(p.flags|=512,p.flags|=2097152)}function Lw(d,p,w,M,I){var O=Gn(w)?qt:ot.current;return O=dr(p,O),Du(p,I),w=Tw(d,p,w,M,O,I),M=Rw(),d!==null&&!Hi?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~I,oa(d,p,I)):(Tn&&M&&vw(p),p.flags|=1,Qr(d,p,w,I),p.child)}function d3(d,p,w,M,I){if(Gn(w)){var O=!0;Jr(p)}else O=!1;if(Du(p,I),p.stateNode===null)d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),CP(p,w,M),gw(p,w,M,I),M=!0;else if(d===null){var Y=p.stateNode,te=p.memoizedProps;Y.props=te;var Me=Y.context,Be=w.contextType;typeof Be=="object"&&Be!==null?Be=ho(Be):(Be=Gn(w)?qt:ot.current,Be=dr(p,Be));var ut=w.getDerivedStateFromProps,Nt=typeof ut=="function"||typeof Y.getSnapshotBeforeUpdate=="function";Nt||typeof Y.UNSAFE_componentWillReceiveProps!="function"&&typeof Y.componentWillReceiveProps!="function"||(te!==M||Me!==Be)&&TP(p,Y,M,Be),Ha=!1;var _t=p.memoizedState;Y.state=_t,Jg(p,M,Y,I),Me=p.memoizedState,te!==M||_t!==Me||En.current||Ha?(typeof ut=="function"&&(mw(p,w,ut,M),Me=p.memoizedState),(te=Ha||EP(p,w,te,M,_t,Me,Be))?(Nt||typeof Y.UNSAFE_componentWillMount!="function"&&typeof Y.componentWillMount!="function"||(typeof Y.componentWillMount=="function"&&Y.componentWillMount(),typeof Y.UNSAFE_componentWillMount=="function"&&Y.UNSAFE_componentWillMount()),typeof Y.componentDidMount=="function"&&(p.flags|=4194308)):(typeof Y.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=M,p.memoizedState=Me),Y.props=M,Y.state=Me,Y.context=Be,M=te):(typeof Y.componentDidMount=="function"&&(p.flags|=4194308),M=!1)}else{Y=p.stateNode,_P(d,p),te=p.memoizedProps,Be=p.type===p.elementType?te:jo(p.type,te),Y.props=Be,Nt=p.pendingProps,_t=Y.context,Me=w.contextType,typeof Me=="object"&&Me!==null?Me=ho(Me):(Me=Gn(w)?qt:ot.current,Me=dr(p,Me));var yn=w.getDerivedStateFromProps;(ut=typeof yn=="function"||typeof Y.getSnapshotBeforeUpdate=="function")||typeof Y.UNSAFE_componentWillReceiveProps!="function"&&typeof Y.componentWillReceiveProps!="function"||(te!==Nt||_t!==Me)&&TP(p,Y,M,Me),Ha=!1,_t=p.memoizedState,Y.state=_t,Jg(p,M,Y,I);var yt=p.memoizedState;te!==Nt||_t!==yt||En.current||Ha?(typeof yn=="function"&&(mw(p,w,yn,M),yt=p.memoizedState),(Be=Ha||EP(p,w,Be,M,_t,yt,Me)||!1)?(ut||typeof Y.UNSAFE_componentWillUpdate!="function"&&typeof Y.componentWillUpdate!="function"||(typeof Y.componentWillUpdate=="function"&&Y.componentWillUpdate(M,yt,Me),typeof Y.UNSAFE_componentWillUpdate=="function"&&Y.UNSAFE_componentWillUpdate(M,yt,Me)),typeof Y.componentDidUpdate=="function"&&(p.flags|=4),typeof Y.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof Y.componentDidUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=4),typeof Y.getSnapshotBeforeUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=1024),p.memoizedProps=M,p.memoizedState=yt),Y.props=M,Y.state=yt,Y.context=Me,M=Be):(typeof Y.componentDidUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=4),typeof Y.getSnapshotBeforeUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=1024),M=!1)}return Ow(d,p,w,M,O,I)}function Ow(d,p,w,M,I,O){f3(d,p);var Y=(p.flags&128)!==0;if(!M&&!Y)return I&&Wa(p,w,!1),oa(d,p,O);M=p.stateNode,Y7.current=p;var te=Y&&typeof w.getDerivedStateFromError!="function"?null:M.render();return p.flags|=1,d!==null&&Y?(p.child=Bu(p,d.child,null,O),p.child=Bu(p,null,te,O)):Qr(d,p,te,O),p.memoizedState=M.state,I&&Wa(p,w,!0),p.child}function h3(d){var p=d.stateNode;p.pendingContext?$a(d,p.pendingContext,p.pendingContext!==p.context):p.context&&$a(d,p.context,!1),ww(d,p.containerInfo)}function p3(d,p,w,M,I){return Uu(),_w(I),p.flags|=256,Qr(d,p,w,M),p.child}var h0={dehydrated:null,treeContext:null,retryLane:0};function p0(d){return{baseLanes:d,cachePool:null}}function m3(d,p,w){var M=p.pendingProps,I=In.current,O=!1,Y=(p.flags&128)!==0,te;if((te=Y)||(te=d!==null&&d.memoizedState===null?!1:(I&2)!==0),te?(O=!0,p.flags&=-129):(d===null||d.memoizedState!==null)&&(I|=1),Bt(In,I&1),d===null)return bw(p),d=p.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?(p.mode&1?Yl(d)?p.lanes=8:p.lanes=1073741824:p.lanes=1,null):(I=M.children,d=M.fallback,O?(M=p.mode,O=p.child,I={mode:"hidden",children:I},!(M&1)&&O!==null?(O.childLanes=0,O.pendingProps=I):O=L0(I,M,0,null),d=ic(d,M,w,null),O.return=p,d.return=p,O.sibling=d,p.child=O,p.child.memoizedState=p0(w),p.memoizedState=h0,d):Dw(p,I));if(I=d.memoizedState,I!==null){if(te=I.dehydrated,te!==null){if(Y)return p.flags&256?(p.flags&=-257,m0(d,p,w,Error(s(422)))):p.memoizedState!==null?(p.child=d.child,p.flags|=128,null):(O=M.fallback,I=p.mode,M=L0({mode:"visible",children:M.children},I,0,null),O=ic(O,I,w,null),O.flags|=2,M.return=p,O.return=p,M.sibling=O,p.child=M,p.mode&1&&Bu(p,d.child,null,w),p.child.memoizedState=p0(w),p.memoizedState=h0,O);if(!(p.mode&1))p=m0(d,p,w,null);else if(Yl(te))p=m0(d,p,w,Error(s(419)));else if(M=(w&d.childLanes)!==0,Hi||M){if(M=Jn,M!==null){switch(w&-w){case 4:O=2;break;case 16:O=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:O=32;break;case 536870912:O=268435456;break;default:O=0}M=O&(M.suspendedLanes|w)?0:O,M!==0&&M!==I.retryLane&&(I.retryLane=M,yo(d,M,-1))}nS(),p=m0(d,p,w,Error(s(421)))}else ps(te)?(p.flags|=128,p.child=d.child,p=lj.bind(null,d),Fg(te,p),p=null):(w=I.treeContext,ae&&(Wi=Lu(te),$i=p,Tn=!0,Vo=null,hh=!1,w!==null&&(po[mo++]=na,po[mo++]=ra,po[mo++]=Kl,na=w.id,ra=w.overflow,Kl=p)),p=Dw(p,p.pendingProps.children),p.flags|=4096);return p}return O?(M=v3(d,p,M.children,M.fallback,w),O=p.child,I=d.child.memoizedState,O.memoizedState=I===null?p0(w):{baseLanes:I.baseLanes|w,cachePool:null},O.childLanes=d.childLanes&~w,p.memoizedState=h0,M):(w=g3(d,p,M.children,w),p.memoizedState=null,w)}return O?(M=v3(d,p,M.children,M.fallback,w),O=p.child,I=d.child.memoizedState,O.memoizedState=I===null?p0(w):{baseLanes:I.baseLanes|w,cachePool:null},O.childLanes=d.childLanes&~w,p.memoizedState=h0,M):(w=g3(d,p,M.children,w),p.memoizedState=null,w)}function Dw(d,p){return p=L0({mode:"visible",children:p},d.mode,0,null),p.return=d,d.child=p}function g3(d,p,w,M){var I=d.child;return d=I.sibling,w=Za(I,{mode:"visible",children:w}),!(p.mode&1)&&(w.lanes=M),w.return=p,w.sibling=null,d!==null&&(M=p.deletions,M===null?(p.deletions=[d],p.flags|=16):M.push(d)),p.child=w}function v3(d,p,w,M,I){var O=p.mode;d=d.child;var Y=d.sibling,te={mode:"hidden",children:w};return!(O&1)&&p.child!==d?(w=p.child,w.childLanes=0,w.pendingProps=te,p.deletions=null):(w=Za(d,te),w.subtreeFlags=d.subtreeFlags&14680064),Y!==null?M=Za(Y,M):(M=ic(M,O,I,null),M.flags|=2),M.return=p,w.return=p,w.sibling=M,p.child=w,M}function m0(d,p,w,M){return M!==null&&_w(M),Bu(p,d.child,null,w),d=Dw(p,p.pendingProps.children),d.flags|=2,p.memoizedState=null,d}function y3(d,p,w){d.lanes|=p;var M=d.alternate;M!==null&&(M.lanes|=p),hw(d.return,p,w)}function Fw(d,p,w,M,I){var O=d.memoizedState;O===null?d.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:M,tail:w,tailMode:I}:(O.isBackwards=p,O.rendering=null,O.renderingStartTime=0,O.last=M,O.tail=w,O.tailMode=I)}function x3(d,p,w){var M=p.pendingProps,I=M.revealOrder,O=M.tail;if(Qr(d,p,M.children,w),M=In.current,M&2)M=M&1|2,p.flags|=128;else{if(d!==null&&d.flags&128)e:for(d=p.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&y3(d,w,p);else if(d.tag===19)y3(d,w,p);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===p)break e;for(;d.sibling===null;){if(d.return===null||d.return===p)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}M&=1}if(Bt(In,M),!(p.mode&1))p.memoizedState=null;else switch(I){case"forwards":for(w=p.child,I=null;w!==null;)d=w.alternate,d!==null&&r0(d)===null&&(I=w),w=w.sibling;w=I,w===null?(I=p.child,p.child=null):(I=w.sibling,w.sibling=null),Fw(p,!1,I,w,O);break;case"backwards":for(w=null,I=p.child,p.child=null;I!==null;){if(d=I.alternate,d!==null&&r0(d)===null){p.child=I;break}d=I.sibling,I.sibling=w,w=I,I=d}Fw(p,!0,w,null,O);break;case"together":Fw(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function oa(d,p,w){if(d!==null&&(p.dependencies=d.dependencies),Hu|=p.lanes,!(w&p.childLanes))return null;if(d!==null&&p.child!==d.child)throw Error(s(153));if(p.child!==null){for(d=p.child,w=Za(d,d.pendingProps),p.child=w,w.return=p;d.sibling!==null;)d=d.sibling,w=w.sibling=Za(d,d.pendingProps),w.return=p;w.sibling=null}return p.child}function K7(d,p,w){switch(p.tag){case 3:h3(p),Uu();break;case 5:OP(p);break;case 1:Gn(p.type)&&Jr(p);break;case 4:ww(p,p.stateNode.containerInfo);break;case 10:bP(p,p.type._context,p.memoizedProps.value);break;case 13:var M=p.memoizedState;if(M!==null)return M.dehydrated!==null?(Bt(In,In.current&1),p.flags|=128,null):w&p.child.childLanes?m3(d,p,w):(Bt(In,In.current&1),d=oa(d,p,w),d!==null?d.sibling:null);Bt(In,In.current&1);break;case 19:if(M=(w&p.childLanes)!==0,d.flags&128){if(M)return x3(d,p,w);p.flags|=128}var I=p.memoizedState;if(I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),Bt(In,In.current),M)break;return null;case 22:case 23:return p.lanes=0,u3(d,p,w)}return oa(d,p,w)}function Z7(d,p){switch(yw(p),p.tag){case 1:return Gn(p.type)&&hr(),d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 3:return Vu(),wt(En),wt(ot),Ew(),d=p.flags,d&65536&&!(d&128)?(p.flags=d&-65537|128,p):null;case 5:return Sw(p),null;case 13:if(wt(In),d=p.memoizedState,d!==null&&d.dehydrated!==null){if(p.alternate===null)throw Error(s(340));Uu()}return d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 19:return wt(In),null;case 4:return Vu(),null;case 10:return dw(p.type._context),null;case 22:case 23:return tS(),null;case 24:return null;default:return null}}var g0=!1,Ql=!1,J7=typeof WeakSet=="function"?WeakSet:Set,rt=null;function v0(d,p){var w=d.ref;if(w!==null)if(typeof w=="function")try{w(null)}catch(M){bi(d,p,M)}else w.current=null}function zw(d,p,w){try{w()}catch(M){bi(d,p,M)}}var b3=!1;function Q7(d,p){for(q(d.containerInfo),rt=p;rt!==null;)if(d=rt,p=d.child,(d.subtreeFlags&1028)!==0&&p!==null)p.return=d,rt=p;else for(;rt!==null;){d=rt;try{var w=d.alternate;if(d.flags&1024)switch(d.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var M=w.memoizedProps,I=w.memoizedState,O=d.stateNode,Y=O.getSnapshotBeforeUpdate(d.elementType===d.type?M:jo(d.type,M),I);O.__reactInternalSnapshotBeforeUpdate=Y}break;case 3:Ve&&Pe(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(te){bi(d,d.return,te)}if(p=d.sibling,p!==null){p.return=d.return,rt=p;break}rt=d.return}return w=b3,b3=!1,w}function ec(d,p,w){var M=p.updateQueue;if(M=M!==null?M.lastEffect:null,M!==null){var I=M=M.next;do{if((I.tag&d)===d){var O=I.destroy;I.destroy=void 0,O!==void 0&&zw(p,w,O)}I=I.next}while(I!==M)}}function Eh(d,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var w=p=p.next;do{if((w.tag&d)===d){var M=w.create;w.destroy=M()}w=w.next}while(w!==p)}}function Uw(d){var p=d.ref;if(p!==null){var w=d.stateNode;switch(d.tag){case 5:d=X(w);break;default:d=w}typeof p=="function"?p(d):p.current=d}}function _3(d,p,w){if(vs&&typeof vs.onCommitFiberUnmount=="function")try{vs.onCommitFiberUnmount(Gg,p)}catch{}switch(p.tag){case 0:case 11:case 14:case 15:if(d=p.updateQueue,d!==null&&(d=d.lastEffect,d!==null)){var M=d=d.next;do{var I=M,O=I.destroy;I=I.tag,O!==void 0&&(I&2||I&4)&&zw(p,w,O),M=M.next}while(M!==d)}break;case 1:if(v0(p,w),d=p.stateNode,typeof d.componentWillUnmount=="function")try{d.props=p.memoizedProps,d.state=p.memoizedState,d.componentWillUnmount()}catch(Y){bi(p,w,Y)}break;case 5:v0(p,w);break;case 4:Ve?T3(d,p,w):se&&se&&(p=p.stateNode.containerInfo,w=Ke(p),ir(p,w))}}function w3(d,p,w){for(var M=p;;)if(_3(d,M,w),M.child===null||Ve&&M.tag===4){if(M===p)break;for(;M.sibling===null;){if(M.return===null||M.return===p)return;M=M.return}M.sibling.return=M.return,M=M.sibling}else M.child.return=M,M=M.child}function S3(d){var p=d.alternate;p!==null&&(d.alternate=null,S3(p)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(p=d.stateNode,p!==null&&De(p)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function M3(d){return d.tag===5||d.tag===3||d.tag===4}function E3(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||M3(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function C3(d){if(Ve){e:{for(var p=d.return;p!==null;){if(M3(p))break e;p=p.return}throw Error(s(160))}var w=p;switch(w.tag){case 5:p=w.stateNode,w.flags&32&&(Je(p),w.flags&=-33),w=E3(d),jw(d,w,p);break;case 3:case 4:p=w.stateNode.containerInfo,w=E3(d),Bw(d,w,p);break;default:throw Error(s(161))}}}function Bw(d,p,w){var M=d.tag;if(M===5||M===6)d=d.stateNode,p?Ye(w,d,p):Ee(w,d);else if(M!==4&&(d=d.child,d!==null))for(Bw(d,p,w),d=d.sibling;d!==null;)Bw(d,p,w),d=d.sibling}function jw(d,p,w){var M=d.tag;if(M===5||M===6)d=d.stateNode,p?Oe(w,d,p):Ae(w,d);else if(M!==4&&(d=d.child,d!==null))for(jw(d,p,w),d=d.sibling;d!==null;)jw(d,p,w),d=d.sibling}function T3(d,p,w){for(var M=p,I=!1,O,Y;;){if(!I){I=M.return;e:for(;;){if(I===null)throw Error(s(160));switch(O=I.stateNode,I.tag){case 5:Y=!1;break e;case 3:O=O.containerInfo,Y=!0;break e;case 4:O=O.containerInfo,Y=!0;break e}I=I.return}I=!0}if(M.tag===5||M.tag===6)w3(d,M,w),Y?Fe(O,M.stateNode):me(O,M.stateNode);else if(M.tag===18)Y?pe(O,M.stateNode):re(O,M.stateNode);else if(M.tag===4){if(M.child!==null){O=M.stateNode.containerInfo,Y=!0,M.child.return=M,M=M.child;continue}}else if(_3(d,M,w),M.child!==null){M.child.return=M,M=M.child;continue}if(M===p)break;for(;M.sibling===null;){if(M.return===null||M.return===p)return;M=M.return,M.tag===4&&(I=!1)}M.sibling.return=M.return,M=M.sibling}}function Vw(d,p){if(Ve){switch(p.tag){case 0:case 11:case 14:case 15:ec(3,p,p.return),Eh(3,p),ec(5,p,p.return);return;case 1:return;case 5:var w=p.stateNode;if(w!=null){var M=p.memoizedProps;d=d!==null?d.memoizedProps:M;var I=p.type,O=p.updateQueue;p.updateQueue=null,O!==null&&it(w,O,I,d,M,p)}return;case 6:if(p.stateNode===null)throw Error(s(162));w=p.memoizedProps,bt(p.stateNode,d!==null?d.memoizedProps:w,w);return;case 3:ae&&d!==null&&d.memoizedState.isDehydrated&&jg(p.stateNode.containerInfo);return;case 12:return;case 13:y0(p);return;case 19:y0(p);return;case 17:return}throw Error(s(163))}switch(p.tag){case 0:case 11:case 14:case 15:ec(3,p,p.return),Eh(3,p),ec(5,p,p.return);return;case 12:return;case 13:y0(p);return;case 19:y0(p);return;case 3:ae&&d!==null&&d.memoizedState.isDehydrated&&jg(p.stateNode.containerInfo);break;case 22:case 23:return}e:if(se){switch(p.tag){case 1:case 5:case 6:break e;case 3:case 4:p=p.stateNode,ir(p.containerInfo,p.pendingChildren);break e}throw Error(s(163))}}function y0(d){var p=d.updateQueue;if(p!==null){d.updateQueue=null;var w=d.stateNode;w===null&&(w=d.stateNode=new J7),p.forEach(function(M){var I=cj.bind(null,d,M);w.has(M)||(w.add(M),M.then(I,I))})}}function ej(d,p){for(rt=p;rt!==null;){p=rt;var w=p.deletions;if(w!==null)for(var M=0;M";case b0:return":has("+(Hw(d)||"")+")";case _0:return'[role="'+d.value+'"]';case S0:return'"'+d.value+'"';case w0:return'[data-testname="'+d.value+'"]';default:throw Error(s(365))}}function N3(d,p){var w=[];d=[d,0];for(var M=0;MI&&(I=Y),M&=~O}if(M=I,M=pr()-M,M=(120>M?120:480>M?480:1080>M?1080:1920>M?1920:3e3>M?3e3:4320>M?4320:1960*nj(M/1960))-M,10d?16:d,qa===null)var M=!1;else{if(d=qa,qa=null,R0=0,Gt&6)throw Error(s(331));var I=Gt;for(Gt|=4,rt=d.current;rt!==null;){var O=rt,Y=O.child;if(rt.flags&16){var te=O.deletions;if(te!==null){for(var Me=0;Mepr()-Yw?tc(d,0):qw|=w),xi(d,p)}function j3(d,p){p===0&&(d.mode&1?(p=Wg,Wg<<=1,!(Wg&130023424)&&(Wg=4194304)):p=1);var w=ei();d=I0(d,p),d!==null&&(dh(d,p,w),xi(d,w))}function lj(d){var p=d.memoizedState,w=0;p!==null&&(w=p.retryLane),j3(d,w)}function cj(d,p){var w=0;switch(d.tag){case 13:var M=d.stateNode,I=d.memoizedState;I!==null&&(w=I.retryLane);break;case 19:M=d.stateNode;break;default:throw Error(s(314))}M!==null&&M.delete(p),j3(d,w)}var V3;V3=function(d,p,w){if(d!==null)if(d.memoizedProps!==p.pendingProps||En.current)Hi=!0;else{if(!(d.lanes&w)&&!(p.flags&128))return Hi=!1,K7(d,p,w);Hi=!!(d.flags&131072)}else Hi=!1,Tn&&p.flags&1048576&&RP(p,t0,p.index);switch(p.lanes=0,p.tag){case 2:var M=p.type;d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps;var I=dr(p,ot.current);Du(p,w),I=Tw(null,p,M,d,I,w);var O=Rw();return p.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,Gn(M)?(O=!0,Jr(p)):O=!1,p.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,pw(p),I.updater=Qg,p.stateNode=I,I._reactInternals=p,gw(p,M,d,w),p=Ow(null,p,M,!0,O,w)):(p.tag=0,Tn&&O&&vw(p),Qr(null,p,I,w),p=p.child),p;case 16:M=p.elementType;e:{switch(d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps,I=M._init,M=I(M._payload),p.type=M,I=p.tag=fj(M),d=jo(M,d),I){case 0:p=Lw(null,p,M,d,w);break e;case 1:p=d3(null,p,M,d,w);break e;case 11:p=a3(null,p,M,d,w);break e;case 14:p=l3(null,p,M,jo(M.type,d),w);break e}throw Error(s(306,M,""))}return p;case 0:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:jo(M,I),Lw(d,p,M,I,w);case 1:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:jo(M,I),d3(d,p,M,I,w);case 3:e:{if(h3(p),d===null)throw Error(s(387));M=p.pendingProps,O=p.memoizedState,I=O.element,_P(d,p),Jg(p,M,null,w);var Y=p.memoizedState;if(M=Y.element,ae&&O.isDehydrated)if(O={element:M,isDehydrated:!1,cache:Y.cache,transitions:Y.transitions},p.updateQueue.baseState=O,p.memoizedState=O,p.flags&256){I=Error(s(423)),p=p3(d,p,M,w,I);break e}else if(M!==I){I=Error(s(424)),p=p3(d,p,M,w,I);break e}else for(ae&&(Wi=zg(p.stateNode.containerInfo),$i=p,Tn=!0,Vo=null,hh=!1),w=LP(p,null,M,w),p.child=w;w;)w.flags=w.flags&-3|4096,w=w.sibling;else{if(Uu(),M===I){p=oa(d,p,w);break e}Qr(d,p,M,w)}p=p.child}return p;case 5:return OP(p),d===null&&bw(p),M=p.type,I=p.pendingProps,O=d!==null?d.memoizedProps:null,Y=I.children,ce(M,I)?Y=null:O!==null&&ce(M,O)&&(p.flags|=32),f3(d,p),Qr(d,p,Y,w),p.child;case 6:return d===null&&bw(p),null;case 13:return m3(d,p,w);case 4:return ww(p,p.stateNode.containerInfo),M=p.pendingProps,d===null?p.child=Bu(p,null,M,w):Qr(d,p,M,w),p.child;case 11:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:jo(M,I),a3(d,p,M,I,w);case 7:return Qr(d,p,p.pendingProps,w),p.child;case 8:return Qr(d,p,p.pendingProps.children,w),p.child;case 12:return Qr(d,p,p.pendingProps.children,w),p.child;case 10:e:{if(M=p.type._context,I=p.pendingProps,O=p.memoizedProps,Y=I.value,bP(p,M,Y),O!==null)if(ys(O.value,Y)){if(O.children===I.children&&!En.current){p=oa(d,p,w);break e}}else for(O=p.child,O!==null&&(O.return=p);O!==null;){var te=O.dependencies;if(te!==null){Y=O.child;for(var Me=te.firstContext;Me!==null;){if(Me.context===M){if(O.tag===1){Me=ta(-1,w&-w),Me.tag=2;var Be=O.updateQueue;if(Be!==null){Be=Be.shared;var ut=Be.pending;ut===null?Me.next=Me:(Me.next=ut.next,ut.next=Me),Be.pending=Me}}O.lanes|=w,Me=O.alternate,Me!==null&&(Me.lanes|=w),hw(O.return,w,p),te.lanes|=w;break}Me=Me.next}}else if(O.tag===10)Y=O.type===p.type?null:O.child;else if(O.tag===18){if(Y=O.return,Y===null)throw Error(s(341));Y.lanes|=w,te=Y.alternate,te!==null&&(te.lanes|=w),hw(Y,w,p),Y=O.sibling}else Y=O.child;if(Y!==null)Y.return=O;else for(Y=O;Y!==null;){if(Y===p){Y=null;break}if(O=Y.sibling,O!==null){O.return=Y.return,Y=O;break}Y=Y.return}O=Y}Qr(d,p,I.children,w),p=p.child}return p;case 9:return I=p.type,M=p.pendingProps.children,Du(p,w),I=ho(I),M=M(I),p.flags|=1,Qr(d,p,M,w),p.child;case 14:return M=p.type,I=jo(M,p.pendingProps),I=jo(M.type,I),l3(d,p,M,I,w);case 15:return c3(d,p,p.type,p.pendingProps,w);case 17:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:jo(M,I),d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),p.tag=1,Gn(M)?(d=!0,Jr(p)):d=!1,Du(p,w),CP(p,M,I),gw(p,M,I,w),Ow(null,p,M,!0,d,w);case 19:return x3(d,p,w);case 22:return u3(d,p,w)}throw Error(s(156,p.tag))};function $3(d,p){return sw(d,p)}function uj(d,p,w,M){this.tag=d,this.key=w,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=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xo(d,p,w,M){return new uj(d,p,w,M)}function rS(d){return d=d.prototype,!(!d||!d.isReactComponent)}function fj(d){if(typeof d=="function")return rS(d)?1:0;if(d!=null){if(d=d.$$typeof,d===x)return 11;if(d===b)return 14}return 2}function Za(d,p){var w=d.alternate;return w===null?(w=xo(d.tag,p,d.key,d.mode),w.elementType=d.elementType,w.type=d.type,w.stateNode=d.stateNode,w.alternate=d,d.alternate=w):(w.pendingProps=p,w.type=d.type,w.flags=0,w.subtreeFlags=0,w.deletions=null),w.flags=d.flags&14680064,w.childLanes=d.childLanes,w.lanes=d.lanes,w.child=d.child,w.memoizedProps=d.memoizedProps,w.memoizedState=d.memoizedState,w.updateQueue=d.updateQueue,p=d.dependencies,w.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},w.sibling=d.sibling,w.index=d.index,w.ref=d.ref,w}function k0(d,p,w,M,I,O){var Y=2;if(M=d,typeof d=="function")rS(d)&&(Y=1);else if(typeof d=="string")Y=5;else e:switch(d){case u:return ic(w.children,I,O,p);case f:Y=8,I|=8;break;case h:return d=xo(12,w,p,I|2),d.elementType=h,d.lanes=O,d;case y:return d=xo(13,w,p,I),d.elementType=y,d.lanes=O,d;case g:return d=xo(19,w,p,I),d.elementType=g,d.lanes=O,d;case S:return L0(w,I,O,p);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case m:Y=10;break e;case v:Y=9;break e;case x:Y=11;break e;case b:Y=14;break e;case _:Y=16,M=null;break e}throw Error(s(130,d==null?d:typeof d,""))}return p=xo(Y,w,p,I),p.elementType=d,p.type=M,p.lanes=O,p}function ic(d,p,w,M){return d=xo(7,d,M,p),d.lanes=w,d}function L0(d,p,w,M){return d=xo(22,d,M,p),d.elementType=S,d.lanes=w,d.stateNode={},d}function iS(d,p,w){return d=xo(6,d,null,p),d.lanes=w,d}function oS(d,p,w){return p=xo(4,d.children!==null?d.children:[],d.key,p),p.lanes=w,p.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},p}function dj(d,p,w,M,I){this.tag=p,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=$e,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=iw(0),this.expirationTimes=iw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=iw(0),this.identifierPrefix=M,this.onRecoverableError=I,ae&&(this.mutableSourceEagerHydrationData=null)}function W3(d,p,w,M,I,O,Y,te,Me){return d=new dj(d,p,w,te,Me),p===1?(p=1,O===!0&&(p|=8)):p=0,O=xo(3,null,null,p),d.current=O,O.stateNode=d,O.memoizedState={element:M,isDehydrated:w,cache:null,transitions:null},pw(O),d}function H3(d){if(!d)return Ht;d=d._reactInternals;e:{if(k(d)!==d||d.tag!==1)throw Error(s(170));var p=d;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(Gn(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(s(171))}if(d.tag===1){var w=d.type;if(Gn(w))return vn(d,w,p)}return p}function G3(d){var p=d._reactInternals;if(p===void 0)throw typeof d.render=="function"?Error(s(188)):(d=Object.keys(d).join(","),Error(s(268,d)));return d=z(p),d===null?null:d.stateNode}function X3(d,p){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var w=d.retryLane;d.retryLane=w!==0&&w=Be&&O>=Nt&&I<=ut&&Y<=_t){d.splice(p,1);break}else if(M!==Be||w.width!==Me.width||_tY){if(!(O!==Nt||w.height!==Me.height||utI)){Be>M&&(Me.width+=Be-M,Me.x=M),utO&&(Me.height+=Nt-O,Me.y=O),_tw&&(w=Y)),YJw&&(p.flags|=128,M=!0,Mh(I,!1),p.lanes=4194304)}else{if(!M)if(d=r0(O),d!==null){if(p.flags|=128,M=!0,d=d.updateQueue,d!==null&&(p.updateQueue=d,p.flags|=4),Mh(I,!0),I.tail===null&&I.tailMode==="hidden"&&!O.alternate&&!Tn)return Ur(p),null}else 2*pr()-I.renderingStartTime>Jw&&w!==1073741824&&(p.flags|=128,M=!0,Mh(I,!1),p.lanes=4194304);I.isBackwards?(O.sibling=p.child,p.child=O):(d=I.last,d!==null?d.sibling=O:p.child=O,I.last=O)}return I.tail!==null?(p=I.tail,I.rendering=p,I.tail=p.sibling,I.renderingStartTime=pr(),p.sibling=null,d=In.current,Bt(In,M?d&1|2:d&1),p):(Ur(p),null);case 22:case 23:return rS(),M=p.memoizedState!==null,d!==null&&d.memoizedState!==null!==M&&(p.flags|=8192),M&&p.mode&1?Gi&1073741824&&(Ur(p),Ve&&p.subtreeFlags&6&&(p.flags|=8192)):Ur(p),null;case 24:return null;case 25:return null}throw Error(s(156,p.tag))}var Y7=a.ReactCurrentOwner,Hi=!1;function ei(d,p,w,M){p.child=d===null?LP(p,null,w,M):Bu(p,d.child,w,M)}function a3(d,p,w,M,I){w=w.render;var O=p.ref;return Du(p,I),M=Aw(d,p,w,M,O,I),w=Pw(),d!==null&&!Hi?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~I,sa(d,p,I)):(Tn&&w&&xw(p),p.flags|=1,ei(d,p,M,I),p.child)}function l3(d,p,w,M,I){if(d===null){var O=w.type;return typeof O=="function"&&!oS(O)&&O.defaultProps===void 0&&w.compare===null&&w.defaultProps===void 0?(p.tag=15,p.type=O,c3(d,p,O,M,I)):(d=k0(w.type,null,M,p,p.mode,I),d.ref=p.ref,d.return=p,p.child=d)}if(O=d.child,!(d.lanes&I)){var Y=O.memoizedProps;if(w=w.compare,w=w!==null?w:qg,w(Y,M)&&d.ref===p.ref)return sa(d,p,I)}return p.flags|=1,d=Ja(O,M),d.ref=p.ref,d.return=p,p.child=d}function c3(d,p,w,M,I){if(d!==null&&qg(d.memoizedProps,M)&&d.ref===p.ref)if(Hi=!1,(d.lanes&I)!==0)d.flags&131072&&(Hi=!0);else return p.lanes=d.lanes,sa(d,p,I);return Dw(d,p,w,M,I)}function u3(d,p,w){var M=p.pendingProps,I=M.children,O=d!==null?d.memoizedState:null;if(M.mode==="hidden")if(!(p.mode&1))p.memoizedState={baseLanes:0,cachePool:null},Bt(Wu,Gi),Gi|=w;else if(w&1073741824)p.memoizedState={baseLanes:0,cachePool:null},M=O!==null?O.baseLanes:w,Bt(Wu,Gi),Gi|=M;else return d=O!==null?O.baseLanes|w:w,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:d,cachePool:null},p.updateQueue=null,Bt(Wu,Gi),Gi|=d,null;else O!==null?(M=O.baseLanes|w,p.memoizedState=null):M=w,Bt(Wu,Gi),Gi|=M;return ei(d,p,I,w),p.child}function f3(d,p){var w=p.ref;(d===null&&w!==null||d!==null&&d.ref!==w)&&(p.flags|=512,p.flags|=2097152)}function Dw(d,p,w,M,I){var O=Gn(w)?qt:ot.current;return O=dr(p,O),Du(p,I),w=Aw(d,p,w,M,O,I),M=Pw(),d!==null&&!Hi?(p.updateQueue=d.updateQueue,p.flags&=-2053,d.lanes&=~I,sa(d,p,I)):(Tn&&M&&xw(p),p.flags|=1,ei(d,p,w,I),p.child)}function d3(d,p,w,M,I){if(Gn(w)){var O=!0;Qr(p)}else O=!1;if(Du(p,I),p.stateNode===null)d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),CP(p,w,M),yw(p,w,M,I),M=!0;else if(d===null){var Y=p.stateNode,te=p.memoizedProps;Y.props=te;var Me=Y.context,Be=w.contextType;typeof Be=="object"&&Be!==null?Be=ho(Be):(Be=Gn(w)?qt:ot.current,Be=dr(p,Be));var ut=w.getDerivedStateFromProps,Nt=typeof ut=="function"||typeof Y.getSnapshotBeforeUpdate=="function";Nt||typeof Y.UNSAFE_componentWillReceiveProps!="function"&&typeof Y.componentWillReceiveProps!="function"||(te!==M||Me!==Be)&&TP(p,Y,M,Be),Ga=!1;var _t=p.memoizedState;Y.state=_t,Jg(p,M,Y,I),Me=p.memoizedState,te!==M||_t!==Me||En.current||Ga?(typeof ut=="function"&&(vw(p,w,ut,M),Me=p.memoizedState),(te=Ga||EP(p,w,te,M,_t,Me,Be))?(Nt||typeof Y.UNSAFE_componentWillMount!="function"&&typeof Y.componentWillMount!="function"||(typeof Y.componentWillMount=="function"&&Y.componentWillMount(),typeof Y.UNSAFE_componentWillMount=="function"&&Y.UNSAFE_componentWillMount()),typeof Y.componentDidMount=="function"&&(p.flags|=4194308)):(typeof Y.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=M,p.memoizedState=Me),Y.props=M,Y.state=Me,Y.context=Be,M=te):(typeof Y.componentDidMount=="function"&&(p.flags|=4194308),M=!1)}else{Y=p.stateNode,_P(d,p),te=p.memoizedProps,Be=p.type===p.elementType?te:jo(p.type,te),Y.props=Be,Nt=p.pendingProps,_t=Y.context,Me=w.contextType,typeof Me=="object"&&Me!==null?Me=ho(Me):(Me=Gn(w)?qt:ot.current,Me=dr(p,Me));var yn=w.getDerivedStateFromProps;(ut=typeof yn=="function"||typeof Y.getSnapshotBeforeUpdate=="function")||typeof Y.UNSAFE_componentWillReceiveProps!="function"&&typeof Y.componentWillReceiveProps!="function"||(te!==Nt||_t!==Me)&&TP(p,Y,M,Me),Ga=!1,_t=p.memoizedState,Y.state=_t,Jg(p,M,Y,I);var yt=p.memoizedState;te!==Nt||_t!==yt||En.current||Ga?(typeof yn=="function"&&(vw(p,w,yn,M),yt=p.memoizedState),(Be=Ga||EP(p,w,Be,M,_t,yt,Me)||!1)?(ut||typeof Y.UNSAFE_componentWillUpdate!="function"&&typeof Y.componentWillUpdate!="function"||(typeof Y.componentWillUpdate=="function"&&Y.componentWillUpdate(M,yt,Me),typeof Y.UNSAFE_componentWillUpdate=="function"&&Y.UNSAFE_componentWillUpdate(M,yt,Me)),typeof Y.componentDidUpdate=="function"&&(p.flags|=4),typeof Y.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof Y.componentDidUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=4),typeof Y.getSnapshotBeforeUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=1024),p.memoizedProps=M,p.memoizedState=yt),Y.props=M,Y.state=yt,Y.context=Me,M=Be):(typeof Y.componentDidUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=4),typeof Y.getSnapshotBeforeUpdate!="function"||te===d.memoizedProps&&_t===d.memoizedState||(p.flags|=1024),M=!1)}return Fw(d,p,w,M,O,I)}function Fw(d,p,w,M,I,O){f3(d,p);var Y=(p.flags&128)!==0;if(!M&&!Y)return I&&Ha(p,w,!1),sa(d,p,O);M=p.stateNode,Y7.current=p;var te=Y&&typeof w.getDerivedStateFromError!="function"?null:M.render();return p.flags|=1,d!==null&&Y?(p.child=Bu(p,d.child,null,O),p.child=Bu(p,null,te,O)):ei(d,p,te,O),p.memoizedState=M.state,I&&Ha(p,w,!0),p.child}function h3(d){var p=d.stateNode;p.pendingContext?Wa(d,p.pendingContext,p.pendingContext!==p.context):p.context&&Wa(d,p.context,!1),Mw(d,p.containerInfo)}function p3(d,p,w,M,I){return Uu(),Sw(I),p.flags|=256,ei(d,p,w,M),p.child}var h0={dehydrated:null,treeContext:null,retryLane:0};function p0(d){return{baseLanes:d,cachePool:null}}function m3(d,p,w){var M=p.pendingProps,I=In.current,O=!1,Y=(p.flags&128)!==0,te;if((te=Y)||(te=d!==null&&d.memoizedState===null?!1:(I&2)!==0),te?(O=!0,p.flags&=-129):(d===null||d.memoizedState!==null)&&(I|=1),Bt(In,I&1),d===null)return ww(p),d=p.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?(p.mode&1?Yl(d)?p.lanes=8:p.lanes=1073741824:p.lanes=1,null):(I=M.children,d=M.fallback,O?(M=p.mode,O=p.child,I={mode:"hidden",children:I},!(M&1)&&O!==null?(O.childLanes=0,O.pendingProps=I):O=L0(I,M,0,null),d=ic(d,M,w,null),O.return=p,d.return=p,O.sibling=d,p.child=O,p.child.memoizedState=p0(w),p.memoizedState=h0,d):zw(p,I));if(I=d.memoizedState,I!==null){if(te=I.dehydrated,te!==null){if(Y)return p.flags&256?(p.flags&=-257,m0(d,p,w,Error(s(422)))):p.memoizedState!==null?(p.child=d.child,p.flags|=128,null):(O=M.fallback,I=p.mode,M=L0({mode:"visible",children:M.children},I,0,null),O=ic(O,I,w,null),O.flags|=2,M.return=p,O.return=p,M.sibling=O,p.child=M,p.mode&1&&Bu(p,d.child,null,w),p.child.memoizedState=p0(w),p.memoizedState=h0,O);if(!(p.mode&1))p=m0(d,p,w,null);else if(Yl(te))p=m0(d,p,w,Error(s(419)));else if(M=(w&d.childLanes)!==0,Hi||M){if(M=Jn,M!==null){switch(w&-w){case 4:O=2;break;case 16:O=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:O=32;break;case 536870912:O=268435456;break;default:O=0}M=O&(M.suspendedLanes|w)?0:O,M!==0&&M!==I.retryLane&&(I.retryLane=M,yo(d,M,-1))}iS(),p=m0(d,p,w,Error(s(421)))}else ps(te)?(p.flags|=128,p.child=d.child,p=lj.bind(null,d),Fg(te,p),p=null):(w=I.treeContext,ae&&(Wi=Lu(te),$i=p,Tn=!0,Vo=null,hh=!1,w!==null&&(po[mo++]=ra,po[mo++]=ia,po[mo++]=Kl,ra=w.id,ia=w.overflow,Kl=p)),p=zw(p,p.pendingProps.children),p.flags|=4096);return p}return O?(M=v3(d,p,M.children,M.fallback,w),O=p.child,I=d.child.memoizedState,O.memoizedState=I===null?p0(w):{baseLanes:I.baseLanes|w,cachePool:null},O.childLanes=d.childLanes&~w,p.memoizedState=h0,M):(w=g3(d,p,M.children,w),p.memoizedState=null,w)}return O?(M=v3(d,p,M.children,M.fallback,w),O=p.child,I=d.child.memoizedState,O.memoizedState=I===null?p0(w):{baseLanes:I.baseLanes|w,cachePool:null},O.childLanes=d.childLanes&~w,p.memoizedState=h0,M):(w=g3(d,p,M.children,w),p.memoizedState=null,w)}function zw(d,p){return p=L0({mode:"visible",children:p},d.mode,0,null),p.return=d,d.child=p}function g3(d,p,w,M){var I=d.child;return d=I.sibling,w=Ja(I,{mode:"visible",children:w}),!(p.mode&1)&&(w.lanes=M),w.return=p,w.sibling=null,d!==null&&(M=p.deletions,M===null?(p.deletions=[d],p.flags|=16):M.push(d)),p.child=w}function v3(d,p,w,M,I){var O=p.mode;d=d.child;var Y=d.sibling,te={mode:"hidden",children:w};return!(O&1)&&p.child!==d?(w=p.child,w.childLanes=0,w.pendingProps=te,p.deletions=null):(w=Ja(d,te),w.subtreeFlags=d.subtreeFlags&14680064),Y!==null?M=Ja(Y,M):(M=ic(M,O,I,null),M.flags|=2),M.return=p,w.return=p,w.sibling=M,p.child=w,M}function m0(d,p,w,M){return M!==null&&Sw(M),Bu(p,d.child,null,w),d=zw(p,p.pendingProps.children),d.flags|=2,p.memoizedState=null,d}function y3(d,p,w){d.lanes|=p;var M=d.alternate;M!==null&&(M.lanes|=p),mw(d.return,p,w)}function Uw(d,p,w,M,I){var O=d.memoizedState;O===null?d.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:M,tail:w,tailMode:I}:(O.isBackwards=p,O.rendering=null,O.renderingStartTime=0,O.last=M,O.tail=w,O.tailMode=I)}function x3(d,p,w){var M=p.pendingProps,I=M.revealOrder,O=M.tail;if(ei(d,p,M.children,w),M=In.current,M&2)M=M&1|2,p.flags|=128;else{if(d!==null&&d.flags&128)e:for(d=p.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&y3(d,w,p);else if(d.tag===19)y3(d,w,p);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===p)break e;for(;d.sibling===null;){if(d.return===null||d.return===p)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}M&=1}if(Bt(In,M),!(p.mode&1))p.memoizedState=null;else switch(I){case"forwards":for(w=p.child,I=null;w!==null;)d=w.alternate,d!==null&&r0(d)===null&&(I=w),w=w.sibling;w=I,w===null?(I=p.child,p.child=null):(I=w.sibling,w.sibling=null),Uw(p,!1,I,w,O);break;case"backwards":for(w=null,I=p.child,p.child=null;I!==null;){if(d=I.alternate,d!==null&&r0(d)===null){p.child=I;break}d=I.sibling,I.sibling=w,w=I,I=d}Uw(p,!0,w,null,O);break;case"together":Uw(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function sa(d,p,w){if(d!==null&&(p.dependencies=d.dependencies),Hu|=p.lanes,!(w&p.childLanes))return null;if(d!==null&&p.child!==d.child)throw Error(s(153));if(p.child!==null){for(d=p.child,w=Ja(d,d.pendingProps),p.child=w,w.return=p;d.sibling!==null;)d=d.sibling,w=w.sibling=Ja(d,d.pendingProps),w.return=p;w.sibling=null}return p.child}function K7(d,p,w){switch(p.tag){case 3:h3(p),Uu();break;case 5:OP(p);break;case 1:Gn(p.type)&&Qr(p);break;case 4:Mw(p,p.stateNode.containerInfo);break;case 10:bP(p,p.type._context,p.memoizedProps.value);break;case 13:var M=p.memoizedState;if(M!==null)return M.dehydrated!==null?(Bt(In,In.current&1),p.flags|=128,null):w&p.child.childLanes?m3(d,p,w):(Bt(In,In.current&1),d=sa(d,p,w),d!==null?d.sibling:null);Bt(In,In.current&1);break;case 19:if(M=(w&p.childLanes)!==0,d.flags&128){if(M)return x3(d,p,w);p.flags|=128}var I=p.memoizedState;if(I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),Bt(In,In.current),M)break;return null;case 22:case 23:return p.lanes=0,u3(d,p,w)}return sa(d,p,w)}function Z7(d,p){switch(bw(p),p.tag){case 1:return Gn(p.type)&&hr(),d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 3:return Vu(),wt(En),wt(ot),Tw(),d=p.flags,d&65536&&!(d&128)?(p.flags=d&-65537|128,p):null;case 5:return Ew(p),null;case 13:if(wt(In),d=p.memoizedState,d!==null&&d.dehydrated!==null){if(p.alternate===null)throw Error(s(340));Uu()}return d=p.flags,d&65536?(p.flags=d&-65537|128,p):null;case 19:return wt(In),null;case 4:return Vu(),null;case 10:return pw(p.type._context),null;case 22:case 23:return rS(),null;case 24:return null;default:return null}}var g0=!1,Ql=!1,J7=typeof WeakSet=="function"?WeakSet:Set,rt=null;function v0(d,p){var w=d.ref;if(w!==null)if(typeof w=="function")try{w(null)}catch(M){_i(d,p,M)}else w.current=null}function Bw(d,p,w){try{w()}catch(M){_i(d,p,M)}}var b3=!1;function Q7(d,p){for(q(d.containerInfo),rt=p;rt!==null;)if(d=rt,p=d.child,(d.subtreeFlags&1028)!==0&&p!==null)p.return=d,rt=p;else for(;rt!==null;){d=rt;try{var w=d.alternate;if(d.flags&1024)switch(d.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var M=w.memoizedProps,I=w.memoizedState,O=d.stateNode,Y=O.getSnapshotBeforeUpdate(d.elementType===d.type?M:jo(d.type,M),I);O.__reactInternalSnapshotBeforeUpdate=Y}break;case 3:Ve&&Pe(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(te){_i(d,d.return,te)}if(p=d.sibling,p!==null){p.return=d.return,rt=p;break}rt=d.return}return w=b3,b3=!1,w}function ec(d,p,w){var M=p.updateQueue;if(M=M!==null?M.lastEffect:null,M!==null){var I=M=M.next;do{if((I.tag&d)===d){var O=I.destroy;I.destroy=void 0,O!==void 0&&Bw(p,w,O)}I=I.next}while(I!==M)}}function Eh(d,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var w=p=p.next;do{if((w.tag&d)===d){var M=w.create;w.destroy=M()}w=w.next}while(w!==p)}}function jw(d){var p=d.ref;if(p!==null){var w=d.stateNode;switch(d.tag){case 5:d=X(w);break;default:d=w}typeof p=="function"?p(d):p.current=d}}function _3(d,p,w){if(vs&&typeof vs.onCommitFiberUnmount=="function")try{vs.onCommitFiberUnmount(Gg,p)}catch{}switch(p.tag){case 0:case 11:case 14:case 15:if(d=p.updateQueue,d!==null&&(d=d.lastEffect,d!==null)){var M=d=d.next;do{var I=M,O=I.destroy;I=I.tag,O!==void 0&&(I&2||I&4)&&Bw(p,w,O),M=M.next}while(M!==d)}break;case 1:if(v0(p,w),d=p.stateNode,typeof d.componentWillUnmount=="function")try{d.props=p.memoizedProps,d.state=p.memoizedState,d.componentWillUnmount()}catch(Y){_i(p,w,Y)}break;case 5:v0(p,w);break;case 4:Ve?T3(d,p,w):se&&se&&(p=p.stateNode.containerInfo,w=Ke(p),ir(p,w))}}function w3(d,p,w){for(var M=p;;)if(_3(d,M,w),M.child===null||Ve&&M.tag===4){if(M===p)break;for(;M.sibling===null;){if(M.return===null||M.return===p)return;M=M.return}M.sibling.return=M.return,M=M.sibling}else M.child.return=M,M=M.child}function S3(d){var p=d.alternate;p!==null&&(d.alternate=null,S3(p)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(p=d.stateNode,p!==null&&De(p)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function M3(d){return d.tag===5||d.tag===3||d.tag===4}function E3(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||M3(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function C3(d){if(Ve){e:{for(var p=d.return;p!==null;){if(M3(p))break e;p=p.return}throw Error(s(160))}var w=p;switch(w.tag){case 5:p=w.stateNode,w.flags&32&&(Je(p),w.flags&=-33),w=E3(d),$w(d,w,p);break;case 3:case 4:p=w.stateNode.containerInfo,w=E3(d),Vw(d,w,p);break;default:throw Error(s(161))}}}function Vw(d,p,w){var M=d.tag;if(M===5||M===6)d=d.stateNode,p?Ye(w,d,p):Ee(w,d);else if(M!==4&&(d=d.child,d!==null))for(Vw(d,p,w),d=d.sibling;d!==null;)Vw(d,p,w),d=d.sibling}function $w(d,p,w){var M=d.tag;if(M===5||M===6)d=d.stateNode,p?Oe(w,d,p):Ae(w,d);else if(M!==4&&(d=d.child,d!==null))for($w(d,p,w),d=d.sibling;d!==null;)$w(d,p,w),d=d.sibling}function T3(d,p,w){for(var M=p,I=!1,O,Y;;){if(!I){I=M.return;e:for(;;){if(I===null)throw Error(s(160));switch(O=I.stateNode,I.tag){case 5:Y=!1;break e;case 3:O=O.containerInfo,Y=!0;break e;case 4:O=O.containerInfo,Y=!0;break e}I=I.return}I=!0}if(M.tag===5||M.tag===6)w3(d,M,w),Y?Fe(O,M.stateNode):me(O,M.stateNode);else if(M.tag===18)Y?pe(O,M.stateNode):re(O,M.stateNode);else if(M.tag===4){if(M.child!==null){O=M.stateNode.containerInfo,Y=!0,M.child.return=M,M=M.child;continue}}else if(_3(d,M,w),M.child!==null){M.child.return=M,M=M.child;continue}if(M===p)break;for(;M.sibling===null;){if(M.return===null||M.return===p)return;M=M.return,M.tag===4&&(I=!1)}M.sibling.return=M.return,M=M.sibling}}function Ww(d,p){if(Ve){switch(p.tag){case 0:case 11:case 14:case 15:ec(3,p,p.return),Eh(3,p),ec(5,p,p.return);return;case 1:return;case 5:var w=p.stateNode;if(w!=null){var M=p.memoizedProps;d=d!==null?d.memoizedProps:M;var I=p.type,O=p.updateQueue;p.updateQueue=null,O!==null&&it(w,O,I,d,M,p)}return;case 6:if(p.stateNode===null)throw Error(s(162));w=p.memoizedProps,bt(p.stateNode,d!==null?d.memoizedProps:w,w);return;case 3:ae&&d!==null&&d.memoizedState.isDehydrated&&jg(p.stateNode.containerInfo);return;case 12:return;case 13:y0(p);return;case 19:y0(p);return;case 17:return}throw Error(s(163))}switch(p.tag){case 0:case 11:case 14:case 15:ec(3,p,p.return),Eh(3,p),ec(5,p,p.return);return;case 12:return;case 13:y0(p);return;case 19:y0(p);return;case 3:ae&&d!==null&&d.memoizedState.isDehydrated&&jg(p.stateNode.containerInfo);break;case 22:case 23:return}e:if(se){switch(p.tag){case 1:case 5:case 6:break e;case 3:case 4:p=p.stateNode,ir(p.containerInfo,p.pendingChildren);break e}throw Error(s(163))}}function y0(d){var p=d.updateQueue;if(p!==null){d.updateQueue=null;var w=d.stateNode;w===null&&(w=d.stateNode=new J7),p.forEach(function(M){var I=cj.bind(null,d,M);w.has(M)||(w.add(M),M.then(I,I))})}}function ej(d,p){for(rt=p;rt!==null;){p=rt;var w=p.deletions;if(w!==null)for(var M=0;M";case b0:return":has("+(Xw(d)||"")+")";case _0:return'[role="'+d.value+'"]';case S0:return'"'+d.value+'"';case w0:return'[data-testname="'+d.value+'"]';default:throw Error(s(365))}}function N3(d,p){var w=[];d=[d,0];for(var M=0;MI&&(I=Y),M&=~O}if(M=I,M=pr()-M,M=(120>M?120:480>M?480:1080>M?1080:1920>M?1920:3e3>M?3e3:4320>M?4320:1960*nj(M/1960))-M,10d?16:d,Ya===null)var M=!1;else{if(d=Ya,Ya=null,R0=0,Gt&6)throw Error(s(331));var I=Gt;for(Gt|=4,rt=d.current;rt!==null;){var O=rt,Y=O.child;if(rt.flags&16){var te=O.deletions;if(te!==null){for(var Me=0;Mepr()-Zw?tc(d,0):Kw|=w),bi(d,p)}function j3(d,p){p===0&&(d.mode&1?(p=Wg,Wg<<=1,!(Wg&130023424)&&(Wg=4194304)):p=1);var w=ti();d=I0(d,p),d!==null&&(dh(d,p,w),bi(d,w))}function lj(d){var p=d.memoizedState,w=0;p!==null&&(w=p.retryLane),j3(d,w)}function cj(d,p){var w=0;switch(d.tag){case 13:var M=d.stateNode,I=d.memoizedState;I!==null&&(w=I.retryLane);break;case 19:M=d.stateNode;break;default:throw Error(s(314))}M!==null&&M.delete(p),j3(d,w)}var V3;V3=function(d,p,w){if(d!==null)if(d.memoizedProps!==p.pendingProps||En.current)Hi=!0;else{if(!(d.lanes&w)&&!(p.flags&128))return Hi=!1,K7(d,p,w);Hi=!!(d.flags&131072)}else Hi=!1,Tn&&p.flags&1048576&&RP(p,t0,p.index);switch(p.lanes=0,p.tag){case 2:var M=p.type;d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps;var I=dr(p,ot.current);Du(p,w),I=Aw(null,p,M,d,I,w);var O=Pw();return p.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,Gn(M)?(O=!0,Qr(p)):O=!1,p.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,gw(p),I.updater=Qg,p.stateNode=I,I._reactInternals=p,yw(p,M,d,w),p=Fw(null,p,M,!0,O,w)):(p.tag=0,Tn&&O&&xw(p),ei(null,p,I,w),p=p.child),p;case 16:M=p.elementType;e:{switch(d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),d=p.pendingProps,I=M._init,M=I(M._payload),p.type=M,I=p.tag=fj(M),d=jo(M,d),I){case 0:p=Dw(null,p,M,d,w);break e;case 1:p=d3(null,p,M,d,w);break e;case 11:p=a3(null,p,M,d,w);break e;case 14:p=l3(null,p,M,jo(M.type,d),w);break e}throw Error(s(306,M,""))}return p;case 0:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:jo(M,I),Dw(d,p,M,I,w);case 1:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:jo(M,I),d3(d,p,M,I,w);case 3:e:{if(h3(p),d===null)throw Error(s(387));M=p.pendingProps,O=p.memoizedState,I=O.element,_P(d,p),Jg(p,M,null,w);var Y=p.memoizedState;if(M=Y.element,ae&&O.isDehydrated)if(O={element:M,isDehydrated:!1,cache:Y.cache,transitions:Y.transitions},p.updateQueue.baseState=O,p.memoizedState=O,p.flags&256){I=Error(s(423)),p=p3(d,p,M,w,I);break e}else if(M!==I){I=Error(s(424)),p=p3(d,p,M,w,I);break e}else for(ae&&(Wi=zg(p.stateNode.containerInfo),$i=p,Tn=!0,Vo=null,hh=!1),w=LP(p,null,M,w),p.child=w;w;)w.flags=w.flags&-3|4096,w=w.sibling;else{if(Uu(),M===I){p=sa(d,p,w);break e}ei(d,p,M,w)}p=p.child}return p;case 5:return OP(p),d===null&&ww(p),M=p.type,I=p.pendingProps,O=d!==null?d.memoizedProps:null,Y=I.children,ce(M,I)?Y=null:O!==null&&ce(M,O)&&(p.flags|=32),f3(d,p),ei(d,p,Y,w),p.child;case 6:return d===null&&ww(p),null;case 13:return m3(d,p,w);case 4:return Mw(p,p.stateNode.containerInfo),M=p.pendingProps,d===null?p.child=Bu(p,null,M,w):ei(d,p,M,w),p.child;case 11:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:jo(M,I),a3(d,p,M,I,w);case 7:return ei(d,p,p.pendingProps,w),p.child;case 8:return ei(d,p,p.pendingProps.children,w),p.child;case 12:return ei(d,p,p.pendingProps.children,w),p.child;case 10:e:{if(M=p.type._context,I=p.pendingProps,O=p.memoizedProps,Y=I.value,bP(p,M,Y),O!==null)if(ys(O.value,Y)){if(O.children===I.children&&!En.current){p=sa(d,p,w);break e}}else for(O=p.child,O!==null&&(O.return=p);O!==null;){var te=O.dependencies;if(te!==null){Y=O.child;for(var Me=te.firstContext;Me!==null;){if(Me.context===M){if(O.tag===1){Me=na(-1,w&-w),Me.tag=2;var Be=O.updateQueue;if(Be!==null){Be=Be.shared;var ut=Be.pending;ut===null?Me.next=Me:(Me.next=ut.next,ut.next=Me),Be.pending=Me}}O.lanes|=w,Me=O.alternate,Me!==null&&(Me.lanes|=w),mw(O.return,w,p),te.lanes|=w;break}Me=Me.next}}else if(O.tag===10)Y=O.type===p.type?null:O.child;else if(O.tag===18){if(Y=O.return,Y===null)throw Error(s(341));Y.lanes|=w,te=Y.alternate,te!==null&&(te.lanes|=w),mw(Y,w,p),Y=O.sibling}else Y=O.child;if(Y!==null)Y.return=O;else for(Y=O;Y!==null;){if(Y===p){Y=null;break}if(O=Y.sibling,O!==null){O.return=Y.return,Y=O;break}Y=Y.return}O=Y}ei(d,p,I.children,w),p=p.child}return p;case 9:return I=p.type,M=p.pendingProps.children,Du(p,w),I=ho(I),M=M(I),p.flags|=1,ei(d,p,M,w),p.child;case 14:return M=p.type,I=jo(M,p.pendingProps),I=jo(M.type,I),l3(d,p,M,I,w);case 15:return c3(d,p,p.type,p.pendingProps,w);case 17:return M=p.type,I=p.pendingProps,I=p.elementType===M?I:jo(M,I),d!==null&&(d.alternate=null,p.alternate=null,p.flags|=2),p.tag=1,Gn(M)?(d=!0,Qr(p)):d=!1,Du(p,w),CP(p,M,I),yw(p,M,I,w),Fw(null,p,M,!0,d,w);case 19:return x3(d,p,w);case 22:return u3(d,p,w)}throw Error(s(156,p.tag))};function $3(d,p){return lw(d,p)}function uj(d,p,w,M){this.tag=d,this.key=w,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=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xo(d,p,w,M){return new uj(d,p,w,M)}function oS(d){return d=d.prototype,!(!d||!d.isReactComponent)}function fj(d){if(typeof d=="function")return oS(d)?1:0;if(d!=null){if(d=d.$$typeof,d===x)return 11;if(d===b)return 14}return 2}function Ja(d,p){var w=d.alternate;return w===null?(w=xo(d.tag,p,d.key,d.mode),w.elementType=d.elementType,w.type=d.type,w.stateNode=d.stateNode,w.alternate=d,d.alternate=w):(w.pendingProps=p,w.type=d.type,w.flags=0,w.subtreeFlags=0,w.deletions=null),w.flags=d.flags&14680064,w.childLanes=d.childLanes,w.lanes=d.lanes,w.child=d.child,w.memoizedProps=d.memoizedProps,w.memoizedState=d.memoizedState,w.updateQueue=d.updateQueue,p=d.dependencies,w.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},w.sibling=d.sibling,w.index=d.index,w.ref=d.ref,w}function k0(d,p,w,M,I,O){var Y=2;if(M=d,typeof d=="function")oS(d)&&(Y=1);else if(typeof d=="string")Y=5;else e:switch(d){case u:return ic(w.children,I,O,p);case f:Y=8,I|=8;break;case h:return d=xo(12,w,p,I|2),d.elementType=h,d.lanes=O,d;case y:return d=xo(13,w,p,I),d.elementType=y,d.lanes=O,d;case g:return d=xo(19,w,p,I),d.elementType=g,d.lanes=O,d;case S:return L0(w,I,O,p);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case m:Y=10;break e;case v:Y=9;break e;case x:Y=11;break e;case b:Y=14;break e;case _:Y=16,M=null;break e}throw Error(s(130,d==null?d:typeof d,""))}return p=xo(Y,w,p,I),p.elementType=d,p.type=M,p.lanes=O,p}function ic(d,p,w,M){return d=xo(7,d,M,p),d.lanes=w,d}function L0(d,p,w,M){return d=xo(22,d,M,p),d.elementType=S,d.lanes=w,d.stateNode={},d}function sS(d,p,w){return d=xo(6,d,null,p),d.lanes=w,d}function aS(d,p,w){return p=xo(4,d.children!==null?d.children:[],d.key,p),p.lanes=w,p.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},p}function dj(d,p,w,M,I){this.tag=p,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=$e,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sw(0),this.expirationTimes=sw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sw(0),this.identifierPrefix=M,this.onRecoverableError=I,ae&&(this.mutableSourceEagerHydrationData=null)}function W3(d,p,w,M,I,O,Y,te,Me){return d=new dj(d,p,w,te,Me),p===1?(p=1,O===!0&&(p|=8)):p=0,O=xo(3,null,null,p),d.current=O,O.stateNode=d,O.memoizedState={element:M,isDehydrated:w,cache:null,transitions:null},gw(O),d}function H3(d){if(!d)return Ht;d=d._reactInternals;e:{if(k(d)!==d||d.tag!==1)throw Error(s(170));var p=d;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(Gn(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(s(171))}if(d.tag===1){var w=d.type;if(Gn(w))return vn(d,w,p)}return p}function G3(d){var p=d._reactInternals;if(p===void 0)throw typeof d.render=="function"?Error(s(188)):(d=Object.keys(d).join(","),Error(s(268,d)));return d=z(p),d===null?null:d.stateNode}function X3(d,p){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var w=d.retryLane;d.retryLane=w!==0&&w=Be&&O>=Nt&&I<=ut&&Y<=_t){d.splice(p,1);break}else if(M!==Be||w.width!==Me.width||_tY){if(!(O!==Nt||w.height!==Me.height||utI)){Be>M&&(Me.width+=Be-M,Me.x=M),utO&&(Me.height+=Nt-O,Me.y=O),_tw&&(w=Y)),Y ")+` No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return X(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:hj,findFiberByHostInstance:d.findFiberByHostInstance||pj,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var p=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(p.isDisabled||!p.supportsFiber)d=!0;else{try{Gg=p.inject(d),vs=p}catch{}d=!!p.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,p,w,M){if(!Le)throw Error(s(363));d=Gw(d,p);var I=He(d,w,M).disconnect;return{disconnect:function(){I()}}},n.registerMutableSourceForHydration=function(d,p){var w=p._getVersion;w=w(p._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[p,w]:d.mutableSourceEagerHydrationData.push(p,w)},n.runWithPriority=function(d,p){var w=sn;try{return sn=d,p()}finally{sn=w}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,p,w,M){var I=p.current,O=ei(),Y=Ya(I);return w=H3(w),p.context===null?p.context=w:p.pendingContext=w,p=ta(O,Y),p.payload={element:d},M=M===void 0?null:M,M!==null&&(p.callback=M),Ga(I,p),d=yo(I,Y,O),d!==null&&Zg(d,I,Y),Y},n};o8.exports=Xde;var qde=o8.exports;const Yde=Xs(qde),SA={},l8=t=>void Object.assign(SA,t);function Kde(t,e){function n(u,{args:f=[],attach:h,...m},v){let x=`${u[0].toUpperCase()}${u.slice(1)}`,y;if(u==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;y=Af(g,{type:u,root:v,attach:h,primitive:!0})}else{const g=SA[x];if(!g)throw new Error(`R3F: ${x} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(f))throw new Error("R3F: The args prop must be an array!");y=Af(new g(...f),{type:u,root:v,attach:h,memoizedProps:{args:f}})}return y.__r3f.attach===void 0&&(y instanceof Dt?y.__r3f.attach="geometry":y instanceof Or&&(y.__r3f.attach="material")),x!=="inject"&&ZM(y,m),y}function r(u,f){let h=!1;if(f){var m,v;(m=f.__r3f)!=null&&m.attach?KM(u,f,f.__r3f.attach):f.isObject3D&&u.isObject3D&&(u.add(f),h=!0),h||(v=u.__r3f)==null||v.objects.push(f),f.__r3f||Af(f,{}),f.__r3f.parent=u,yC(f),Pf(f)}}function i(u,f,h){let m=!1;if(f){var v,x;if((v=f.__r3f)!=null&&v.attach)KM(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){f.parent=u,f.dispatchEvent({type:"added"}),u.dispatchEvent({type:"childadded",child:f});const y=u.children.filter(b=>b!==f),g=y.indexOf(h);u.children=[...y.slice(0,g),f,...y.slice(g)],m=!0}m||(x=u.__r3f)==null||x.objects.push(f),f.__r3f||Af(f,{}),f.__r3f.parent=u,yC(f),Pf(f)}}function o(u,f,h=!1){u&&[...u].forEach(m=>s(f,m,h))}function s(u,f,h){if(f){var m,v,x;if(f.__r3f&&(f.__r3f.parent=null),(m=u.__r3f)!=null&&m.objects&&(u.__r3f.objects=u.__r3f.objects.filter(S=>S!==f)),(v=f.__r3f)!=null&&v.attach)ML(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){var y;u.remove(f),(y=f.__r3f)!=null&&y.root&&ihe(jy(f),f)}const b=(x=f.__r3f)==null?void 0:x.primitive,_=!b&&(h===void 0?f.dispose!==null:h);if(!b){var g;o((g=f.__r3f)==null?void 0:g.objects,f,_),o(f.children,f,_)}if(delete f.__r3f,_&&f.dispose&&f.type!=="Scene"){const S=()=>{try{f.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?gC.unstable_scheduleCallback(gC.unstable_IdlePriority,S):S()}Pf(u)}}function a(u,f,h,m){var v;const x=(v=u.__r3f)==null?void 0:v.parent;if(!x)return;const y=n(f,h,u.__r3f.root);if(u.children){for(const g of u.children)g.__r3f&&r(y,g);u.children=u.children.filter(g=>!g.__r3f)}u.__r3f.objects.forEach(g=>r(y,g)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||s(x,u),y.parent&&(y.__r3f.autoRemovedBeforeAppend=!0),r(x,y),y.raycast&&y.__r3f.eventCount&&jy(y).getState().internal.interaction.push(y),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=y,g.ref&&(typeof g.ref=="function"?g.ref(y):g.ref.current=y))})}const l=()=>{};return{reconciler:Yde({createInstance:n,removeChild:s,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(u,f)=>{if(!f)return;const h=u.getState().scene;h.__r3f&&(h.__r3f.root=u,r(h,f))},removeChildFromContainer:(u,f)=>{f&&s(u.getState().scene,f)},insertInContainerBefore:(u,f,h)=>{if(!f||!h)return;const m=u.getState().scene;m.__r3f&&i(m,f,h)},getRootHostContext:()=>null,getChildHostContext:u=>u,finalizeInitialChildren(u){var f;return!!((f=u==null?void 0:u.__r3f)!=null?f:{}).handlers},prepareUpdate(u,f,h,m){var v;if(((v=u==null?void 0:u.__r3f)!=null?v:{}).primitive&&m.object&&m.object!==u)return[!0];{const{args:y=[],children:g,...b}=m,{args:_=[],children:S,...A}=h;if(!Array.isArray(y))throw new Error("R3F: the args prop must be an array!");if(y.some((R,L)=>R!==_[L]))return[!0];const P=m8(u,b,A,!0);return P.changes.length?[!1,P]:null}},commitUpdate(u,[f,h],m,v,x,y){f?a(u,m,x,y):ZM(u,h)},commitMount(u,f,h,m){var v;const x=(v=u.__r3f)!=null?v:{};u.raycast&&x.handlers&&x.eventCount&&jy(u).getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>Af(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var f;const{attach:h,parent:m}=(f=u.__r3f)!=null?f:{};h&&m&&ML(m,u,h),u.isObject3D&&(u.visible=!1),Pf(u)},unhideInstance(u,f){var h;const{attach:m,parent:v}=(h=u.__r3f)!=null?h:{};m&&v&&KM(v,u,m),(u.isObject3D&&f.visible==null||f.visible)&&(u.visible=!0),Pf(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():Kf.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&wn.fun(performance.now)?performance.now:wn.fun(Date.now)?Date.now:()=>0,scheduleTimeout:wn.fun(setTimeout)?setTimeout:void 0,cancelTimeout:wn.fun(clearTimeout)?clearTimeout:void 0}),applyProps:ZM}}var bL,_L;const YM=t=>"colorSpace"in t||"outputColorSpace"in t,c8=()=>{var t;return(t=SA.ColorManagement)!=null?t:null},u8=t=>t&&t.isOrthographicCamera,Zde=t=>t&&t.hasOwnProperty("current"),Eg=typeof window<"u"&&((bL=window.document)!=null&&bL.createElement||((_L=window.navigator)==null?void 0:_L.product)==="ReactNative")?T.useLayoutEffect:T.useEffect;function f8(t){const e=T.useRef(t);return Eg(()=>void(e.current=t),[t]),e}function Jde({set:t}){return Eg(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class d8 extends T.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}d8.getDerivedStateFromError=()=>({error:!0});const h8="__default",wL=new Map,Qde=t=>t&&!!t.memoized&&!!t.changes;function p8(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const op=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()};function jy(t){let e=t.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const wn={obj:t=>t===Object(t)&&!wn.arr(t)&&typeof t!="function",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",boo:t=>typeof t=="boolean",und:t=>t===void 0,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(wn.str(t)||wn.num(t)||wn.boo(t))return t===e;const o=wn.obj(t);if(o&&r==="reference")return t===e;const s=wn.arr(t);if(s&&n==="reference")return t===e;if((s||o)&&t===e)return!0;let a;for(a in t)if(!(a in e))return!1;if(o&&n==="shallow"&&r==="shallow"){for(a in i?e:t)if(!wn.equ(t[a],e[a],{strict:i,objects:"reference"}))return!1}else for(a in i?e:t)if(t[a]!==e[a])return!1;if(wn.und(a)){if(s&&t.length===0&&e.length===0||o&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function ehe(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function Af(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function vC(t,e){let n=t;if(e.includes("-")){const r=e.split("-"),i=r.pop();return n=r.reduce((o,s)=>o[s],t),{target:n,key:i}}else return{target:n,key:e}}const SL=/-\d+$/;function KM(t,e,n){if(wn.str(n)){if(SL.test(n)){const o=n.replace(SL,""),{target:s,key:a}=vC(t,o);Array.isArray(s[a])||(s[a]=[])}const{target:r,key:i}=vC(t,n);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=n(t,e)}function ML(t,e,n){var r,i;if(wn.str(n)){const{target:o,key:s}=vC(t,n),a=e.__r3f.previousAttach;a===void 0?delete o[s]:o[s]=a}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(t,e);(i=e.__r3f)==null||delete i.previousAttach}function m8(t,{children:e,key:n,ref:r,...i},{children:o,key:s,ref:a,...l}={},c=!1){const u=t.__r3f,f=Object.entries(i),h=[];if(c){const v=Object.keys(l);for(let x=0;x{var y;if((y=t.__r3f)!=null&&y.primitive&&v==="object"||wn.equ(x,l[v]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(v))return h.push([v,x,!0,[]]);let g=[];v.includes("-")&&(g=v.split("-")),h.push([v,x,!1,g]);for(const b in i){const _=i[b];b.startsWith(`${v}-`)&&h.push([b,_,!1,b.split("-")])}});const m={...i};return u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.args&&(m.args=u.memoizedProps.args),u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.attach&&(m.attach=u.memoizedProps.attach),{memoized:m,changes:h}}const the=typeof process<"u"&&!1;function ZM(t,e){var n;const r=t.__r3f,i=r==null?void 0:r.root,o=i==null||i.getState==null?void 0:i.getState(),{memoized:s,changes:a}=Qde(e)?e:m8(t,e),l=r==null?void 0:r.eventCount;t.__r3f&&(t.__r3f.memoizedProps=s);for(let u=0;ug[b],t),!(y&&y.set))){const[g,...b]=v.reverse();x=b.reverse().reduce((_,S)=>_[S],t),f=g}if(h===h8+"remove")if(x.constructor){let g=wL.get(x.constructor);g||(g=new x.constructor,wL.set(x.constructor,g)),h=g[f]}else h=0;if(m&&r)h?r.handlers[f]=h:delete r.handlers[f],r.eventCount=Object.keys(r.handlers).length;else if(y&&y.set&&(y.copy||y instanceof qc)){if(Array.isArray(h))y.fromArray?y.fromArray(h):y.set(...h);else if(y.copy&&h&&h.constructor&&(the?y.constructor.name===h.constructor.name:y.constructor===h.constructor))y.copy(h);else if(h!==void 0){const g=y instanceof at;!g&&y.setScalar?y.setScalar(h):y instanceof qc&&h instanceof qc?y.mask=h.mask:y.set(h),!c8()&&o&&!o.linear&&g&&y.convertSRGBToLinear()}}else if(x[f]=h,x[f]instanceof On&&x[f].format===Ir&&x[f].type===ji&&o){const g=x[f];YM(g)&&YM(o.gl)?g.colorSpace=o.gl.outputColorSpace:g.encoding=o.gl.outputEncoding}Pf(t)}if(r&&r.parent&&t.raycast&&l!==r.eventCount){const u=jy(t).getState().internal,f=u.interaction.indexOf(t);f>-1&&u.interaction.splice(f,1),r.eventCount&&u.interaction.push(t)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(n=t.__r3f)!=null&&n.parent&&yC(t),t}function Pf(t){var e,n;const r=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();r&&r.internal.frames===0&&r.invalidate()}function yC(t){t.onUpdate==null||t.onUpdate(t)}function nhe(t,e){t.manual||(u8(t)?(t.left=e.width/-2,t.right=e.width/2,t.top=e.height/2,t.bottom=e.height/-2):t.aspect=e.width/e.height,t.updateProjectionMatrix(),t.updateMatrixWorld())}function ey(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function rhe(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Kf.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Kf.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Kf.ContinuousEventPriority;default:return Kf.DefaultEventPriority}}function g8(t,e,n,r){const i=n.get(e);i&&(n.delete(e),n.size===0&&(t.delete(r),i.target.releasePointerCapture(r)))}function ihe(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(r=>r!==e),n.initialHits=n.initialHits.filter(r=>r!==e),n.hovered.forEach((r,i)=>{(r.eventObject===e||r.object===e)&&n.hovered.delete(i)}),n.capturedMap.forEach((r,i)=>{g8(n.capturedMap,e,r,i)})}function ohe(t){function e(l){const{internal:c}=t.getState(),u=l.offsetX-c.initialClick[0],f=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(u*u+f*f))}function n(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(u=>{var f;return(f=c.__r3f)==null?void 0:f.handlers["onPointer"+u]}))}function r(l,c){const u=t.getState(),f=new Set,h=[],m=c?c(u.internal.interaction):u.internal.interaction;for(let g=0;g{const _=op(g.object),S=op(b.object);return!_||!S?g.distance-b.distance:S.events.priority-_.events.priority||g.distance-b.distance}).filter(g=>{const b=ey(g);return f.has(b)?!1:(f.add(b),!0)});u.events.filter&&(x=u.events.filter(x,u));for(const g of x){let b=g.object;for(;b;){var y;(y=b.__r3f)!=null&&y.eventCount&&h.push({...g,eventObject:b}),b=b.parent}}if("pointerId"in l&&u.internal.capturedMap.has(l.pointerId))for(let g of u.internal.capturedMap.get(l.pointerId).values())f.has(ey(g.intersection))||h.push(g.intersection);return h}function i(l,c,u,f){const h=t.getState();if(l.length){const m={stopped:!1};for(const v of l){const x=op(v.object)||h,{raycaster:y,pointer:g,camera:b,internal:_}=x,S=new H(g.x,g.y,0).unproject(b),A=C=>{var N,z;return(N=(z=_.capturedMap.get(C))==null?void 0:z.has(v.eventObject))!=null?N:!1},P=C=>{const N={intersection:v,target:c.target};_.capturedMap.has(C)?_.capturedMap.get(C).set(v.eventObject,N):_.capturedMap.set(C,new Map([[v.eventObject,N]])),c.target.setPointerCapture(C)},R=C=>{const N=_.capturedMap.get(C);N&&g8(_.capturedMap,v.eventObject,N,C)};let L={};for(let C in c){let N=c[C];typeof N!="function"&&(L[C]=N)}let k={...v,...L,pointer:g,intersections:l,stopped:m.stopped,delta:u,unprojectedPoint:S,ray:y.ray,camera:b,stopPropagation(){const C="pointerId"in c&&_.capturedMap.get(c.pointerId);if((!C||C.has(v.eventObject))&&(k.stopped=m.stopped=!0,_.hovered.size&&Array.from(_.hovered.values()).find(N=>N.eventObject===v.eventObject))){const N=l.slice(0,l.indexOf(v));o([...N,v])}},target:{hasPointerCapture:A,setPointerCapture:P,releasePointerCapture:R},currentTarget:{hasPointerCapture:A,setPointerCapture:P,releasePointerCapture:R},nativeEvent:c};if(f(k),m.stopped===!0)break}}return l}function o(l){const{internal:c}=t.getState();for(const u of c.hovered.values())if(!l.length||!l.find(f=>f.object===u.object&&f.index===u.index&&f.instanceId===u.instanceId)){const h=u.eventObject.__r3f,m=h==null?void 0:h.handlers;if(c.hovered.delete(ey(u)),h!=null&&h.eventCount){const v={...u,intersections:l};m.onPointerOut==null||m.onPointerOut(v),m.onPointerLeave==null||m.onPointerLeave(v)}}}function s(l,c){for(let u=0;uo([]);case"onLostPointerCapture":return c=>{const{internal:u}=t.getState();"pointerId"in c&&u.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{u.capturedMap.has(c.pointerId)&&(u.capturedMap.delete(c.pointerId),o([]))})}}return function(u){const{onPointerMissed:f,internal:h}=t.getState();h.lastEvent.current=u;const m=l==="onPointerMove",v=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",y=r(u,m?n:void 0),g=v?e(u):0;l==="onPointerDown"&&(h.initialClick=[u.offsetX,u.offsetY],h.initialHits=y.map(_=>_.eventObject)),v&&!y.length&&g<=2&&(s(u,h.interaction),f&&f(u)),m&&o(y);function b(_){const S=_.eventObject,A=S.__r3f,P=A==null?void 0:A.handlers;if(A!=null&&A.eventCount)if(m){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const R=ey(_),L=h.hovered.get(R);L?L.stopped&&_.stopPropagation():(h.hovered.set(R,_),P.onPointerOver==null||P.onPointerOver(_),P.onPointerEnter==null||P.onPointerEnter(_))}P.onPointerMove==null||P.onPointerMove(_)}else{const R=P[l];R?(!v||h.initialHits.includes(S))&&(s(u,h.interaction.filter(L=>!h.initialHits.includes(L))),R(_)):v&&h.initialHits.includes(S)&&s(u,h.interaction.filter(L=>!h.initialHits.includes(L)))}}i(y,u,g,b)}}return{handlePointer:a}}const v8=t=>!!(t!=null&&t.render),y8=T.createContext(null),she=(t,e)=>{const n=Gde((a,l)=>{const c=new H,u=new H,f=new H;function h(g=l().camera,b=u,_=l().size){const{width:S,height:A,top:P,left:R}=_,L=S/A;b instanceof H?f.copy(b):f.set(...b);const k=g.getWorldPosition(c).distanceTo(f);if(u8(g))return{width:S/g.zoom,height:A/g.zoom,top:P,left:R,factor:1,distance:k,aspect:L};{const C=g.fov*Math.PI/180,N=2*Math.tan(C/2)*k,z=N*(S/A);return{width:z,height:N,top:P,left:R,factor:S/z,distance:k,aspect:L}}}let m;const v=g=>a(b=>({performance:{...b.performance,current:g}})),x=new Ne;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(g=1)=>t(l(),g),advance:(g,b)=>e(g,b,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new yA,pointer:x,mouse:x,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const g=l();m&&clearTimeout(m),g.performance.current!==g.performance.min&&v(g.performance.min),m=setTimeout(()=>v(l().performance.max),g.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:h},setEvents:g=>a(b=>({...b,events:{...b.events,...g}})),setSize:(g,b,_,S,A)=>{const P=l().camera,R={width:g,height:b,top:S||0,left:A||0,updateStyle:_};a(L=>({size:R,viewport:{...L.viewport,...h(P,u,R)}}))},setDpr:g=>a(b=>{const _=p8(g);return{viewport:{...b.viewport,dpr:_,initialDpr:b.viewport.initialDpr||_}}}),setFrameloop:(g="always")=>{const b=l().clock;b.stop(),b.elapsedTime=0,g!=="never"&&(b.start(),b.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:T.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,b,_)=>{const S=l().internal;return S.priority=S.priority+(b>0?1:0),S.subscribers.push({ref:g,priority:b,store:_}),S.subscribers=S.subscribers.sort((A,P)=>A.priority-P.priority),()=>{const A=l().internal;A!=null&&A.subscribers&&(A.priority=A.priority-(b>0?1:0),A.subscribers=A.subscribers.filter(P=>P.ref!==g))}}}}}),r=n.getState();let i=r.size,o=r.viewport.dpr,s=r.camera;return n.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:u,set:f}=n.getState();if(l.width!==i.width||l.height!==i.height||c.dpr!==o){var h;i=l,o=c.dpr,nhe(a,l),u.setPixelRatio(c.dpr);const m=(h=l.updateStyle)!=null?h:typeof HTMLCanvasElement<"u"&&u.domElement instanceof HTMLCanvasElement;u.setSize(l.width,l.height,m)}a!==s&&(s=a,f(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),n.subscribe(a=>t(a)),n};let ty,ahe=new Set,lhe=new Set,che=new Set;function JM(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function sp(t,e){switch(t){case"before":return JM(ahe,e);case"after":return JM(lhe,e);case"tail":return JM(che,e)}}let QM,eE;function tE(t,e,n){let r=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(r=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),QM=e.internal.subscribers,ty=0;ty0)&&!((u=o.gl.xr)!=null&&u.isPresenting)&&(r+=tE(c,o))}if(n=!1,sp("after",c),r===0)return sp("tail",c),e=!1,cancelAnimationFrame(i)}function a(c,u=1){var f;if(!c)return t.forEach(h=>a(h.store.getState(),u));(f=c.gl.xr)!=null&&f.isPresenting||!c.internal.active||c.frameloop==="never"||(u>1?c.internal.frames=Math.min(60,c.internal.frames+u):n?c.internal.frames=2:c.internal.frames=1,e||(e=!0,requestAnimationFrame(s)))}function l(c,u=!0,f,h){if(u&&sp("before",c),f)tE(c,f,h);else for(const m of t.values())tE(c,m.store.getState());u&&sp("after",c)}return{loop:s,invalidate:a,advance:l}}function x8(){const t=T.useContext(y8);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function Cr(t=n=>n,e){return x8()(t,e)}function MA(t,e=0){const n=x8(),r=n.getState().internal.subscribe,i=f8(t);return Eg(()=>r(i,e,n),[e,r,n]),null}const Nd=new Map,{invalidate:EL,advance:CL}=uhe(Nd),{reconciler:_x,applyProps:bf}=Kde(Nd,rhe),_f={objects:"shallow",strict:!1},fhe=(t,e)=>{const n=typeof t=="function"?t(e):t;return v8(n)?n:new cB({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function dhe(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:r,height:i,top:o,left:s,updateStyle:a=n}=e;return{width:r,height:i,top:o,left:s,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:r,height:i,top:o,left:s}=t.parentElement.getBoundingClientRect();return{width:r,height:i,top:o,left:s,updateStyle:n}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0,updateStyle:n};return{width:0,height:0,top:0,left:0}}function hhe(t){const e=Nd.get(t),n=e==null?void 0:e.fiber,r=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,o=r||she(EL,CL),s=n||_x.createContainer(o,Kf.ConcurrentRoot,null,!1,null,"",i,null);e||Nd.set(t,{fiber:s,store:o});let a,l=!1,c;return{configure(u={}){let{gl:f,size:h,scene:m,events:v,onCreated:x,shadows:y=!1,linear:g=!1,flat:b=!1,legacy:_=!1,orthographic:S=!1,frameloop:A="always",dpr:P=[1,2],performance:R,raycaster:L,camera:k,onPointerMissed:C}=u,N=o.getState(),z=N.gl;N.gl||N.set({gl:z=fhe(f,t)});let D=N.raycaster;D||N.set({raycaster:D=new n8});const{params:B,...G}=L||{};if(wn.equ(G,D,_f)||bf(D,{...G}),wn.equ(B,D.params,_f)||bf(D,{params:{...D.params,...B}}),!N.camera||N.camera===c&&!wn.equ(c,k,_f)){c=k;const K=k instanceof gg,Q=K?k:S?new xg(0,0,0,0,.1,1e3):new br(75,0,.1,1e3);K||(Q.position.z=5,k&&(bf(Q,k),("aspect"in k||"left"in k||"right"in k||"bottom"in k||"top"in k)&&(Q.manual=!0,Q.updateProjectionMatrix())),!N.camera&&!(k!=null&&k.rotation)&&Q.lookAt(0,0,0)),N.set({camera:Q}),D.camera=Q}if(!N.scene){let K;m instanceof vx?K=m:(K=new vx,m&&bf(K,m)),N.set({scene:Af(K)})}if(!N.xr){var X;const K=(fe,J)=>{const ce=o.getState();ce.frameloop!=="never"&&CL(fe,!0,ce,J)},Q=()=>{const fe=o.getState();fe.gl.xr.enabled=fe.gl.xr.isPresenting,fe.gl.xr.setAnimationLoop(fe.gl.xr.isPresenting?K:null),fe.gl.xr.isPresenting||EL(fe)},de={connect(){const fe=o.getState().gl;fe.xr.addEventListener("sessionstart",Q),fe.xr.addEventListener("sessionend",Q)},disconnect(){const fe=o.getState().gl;fe.xr.removeEventListener("sessionstart",Q),fe.xr.removeEventListener("sessionend",Q)}};typeof((X=z.xr)==null?void 0:X.addEventListener)=="function"&&de.connect(),N.set({xr:de})}if(z.shadowMap){const K=z.shadowMap.enabled,Q=z.shadowMap.type;if(z.shadowMap.enabled=!!y,wn.boo(y))z.shadowMap.type=kp;else if(wn.str(y)){var Z;const de={basic:oU,percentage:n_,soft:kp,variance:Ko};z.shadowMap.type=(Z=de[y])!=null?Z:kp}else wn.obj(y)&&Object.assign(z.shadowMap,y);(K!==z.shadowMap.enabled||Q!==z.shadowMap.type)&&(z.shadowMap.needsUpdate=!0)}const F=c8();F&&("enabled"in F?F.enabled=!_:"legacyMode"in F&&(F.legacyMode=_)),l||bf(z,{outputEncoding:g?3e3:3001,toneMapping:b?zs:OR}),N.legacy!==_&&N.set(()=>({legacy:_})),N.linear!==g&&N.set(()=>({linear:g})),N.flat!==b&&N.set(()=>({flat:b})),f&&!wn.fun(f)&&!v8(f)&&!wn.equ(f,z,_f)&&bf(z,f),v&&!N.events.handlers&&N.set({events:v(o)});const q=dhe(t,h);return wn.equ(q,N.size,_f)||N.setSize(q.width,q.height,q.updateStyle,q.top,q.left),P&&N.viewport.dpr!==p8(P)&&N.setDpr(P),N.frameloop!==A&&N.setFrameloop(A),N.onPointerMissed||N.set({onPointerMissed:C}),R&&!wn.equ(R,N.performance,_f)&&N.set(K=>({performance:{...K.performance,...R}})),a=x,l=!0,this},render(u){return l||this.configure(),_x.updateContainer(E.jsx(phe,{store:o,children:u,onCreated:a,rootElement:t}),s,null,()=>{}),o},unmount(){b8(t)}}}function phe({store:t,children:e,onCreated:n,rootElement:r}){return Eg(()=>{const i=t.getState();i.set(o=>({internal:{...o.internal,active:!0}})),n&&n(i),t.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),E.jsx(y8.Provider,{value:t,children:e})}function b8(t,e){const n=Nd.get(t),r=n==null?void 0:n.fiber;if(r){const i=n==null?void 0:n.store.getState();i&&(i.internal.active=!1),_x.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var o,s,a,l;i.events.disconnect==null||i.events.disconnect(),(o=i.gl)==null||(s=o.renderLists)==null||s.dispose==null||s.dispose(),(a=i.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),ehe(i),Nd.delete(t)}catch{}},500)})}}_x.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:T.version});const nE={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function mhe(t){const{handlePointer:e}=ohe(t);return{priority:1,enabled:!0,compute(n,r,i){r.pointer.set(n.offsetX/r.size.width*2-1,-(n.offsetY/r.size.height)*2+1),r.raycaster.setFromCamera(r.pointer,r.camera)},connected:void 0,handlers:Object.keys(nE).reduce((n,r)=>({...n,[r]:e(r)}),{}),update:()=>{var n;const{events:r,internal:i}=t.getState();(n=i.lastEvent)!=null&&n.current&&r.handlers&&r.handlers.onPointerMove(i.lastEvent.current)},connect:n=>{var r;const{set:i,events:o}=t.getState();o.disconnect==null||o.disconnect(),i(s=>({events:{...s.events,connected:n}})),Object.entries((r=o.handlers)!=null?r:[]).forEach(([s,a])=>{const[l,c]=nE[s];n.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:n,events:r}=t.getState();if(r.connected){var i;Object.entries((i=r.handlers)!=null?i:[]).forEach(([o,s])=>{if(r&&r.connected instanceof HTMLElement){const[a]=nE[o];r.connected.removeEventListener(a,s)}}),n(o=>({events:{...o.events,connected:void 0}}))}}}}function xC(t,e,n){var r,i,o,s,a;e==null&&(e=100);function l(){var u=Date.now()-s;u=0?r=setTimeout(l,e-u):(r=null,n||(a=t.apply(o,i),o=i=null))}var c=function(){o=this,i=arguments,s=Date.now();var u=n&&!r;return r||(r=setTimeout(l,e)),u&&(a=t.apply(o,i),o=i=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}xC.debounce=xC;var ghe=xC;const TL=Xs(ghe);var vhe=Object.defineProperty,yhe=Object.defineProperties,xhe=Object.getOwnPropertyDescriptors,RL=Object.getOwnPropertySymbols,bhe=Object.prototype.hasOwnProperty,_he=Object.prototype.propertyIsEnumerable,AL=(t,e,n)=>e in t?vhe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PL=(t,e)=>{for(var n in e||(e={}))bhe.call(e,n)&&AL(t,n,e[n]);if(RL)for(var n of RL(e))_he.call(e,n)&&AL(t,n,e[n]);return t},whe=(t,e)=>yhe(t,xhe(e)),IL,NL;typeof window<"u"&&((IL=window.document)!=null&&IL.createElement||((NL=window.navigator)==null?void 0:NL.product)==="ReactNative")?T.useLayoutEffect:T.useEffect;function _8(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=t.child;for(;r;){const i=_8(r,e,n);if(i)return i;r=r.sibling}}function w8(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const kL=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=kL;return}return kL.apply(this,arguments)};const EA=w8(T.createContext(null));class S8 extends T.Component{render(){return T.createElement(EA.Provider,{value:this._reactInternals},this.props.children)}}function She(){const t=T.useContext(EA);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=T.useId();return T.useMemo(()=>{for(const r of[t,t==null?void 0:t.alternate]){if(!r)continue;const i=_8(r,!1,o=>{let s=o.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}});if(i)return i}},[t,e])}function Mhe(){const t=She(),[e]=T.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const i=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;i&&i!==EA&&!e.has(i)&&e.set(i,T.useContext(w8(i)))}n=n.return}return e}function Ehe(){const t=Mhe();return T.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>T.createElement(e,null,T.createElement(n.Provider,whe(PL({},r),{value:t.get(n)}))),e=>T.createElement(S8,PL({},e))),[t])}function Che({debounce:t,scroll:e,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=n||typeof window<"u"&&window.ResizeObserver,[o,s]=T.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0});if(!i)return o.width=1280,o.height=800,[()=>{},o,()=>{}];const a=T.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o,orientationHandler:null}),l=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,u=T.useRef(!1);T.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[f,h,m]=T.useMemo(()=>{const g=()=>{if(!a.current.element)return;const{left:b,top:_,width:S,height:A,bottom:P,right:R,x:L,y:k}=a.current.element.getBoundingClientRect(),C={left:b,top:_,width:S,height:A,bottom:P,right:R,x:L,y:k};a.current.element instanceof HTMLElement&&r&&(C.height=a.current.element.offsetHeight,C.width=a.current.element.offsetWidth),Object.freeze(C),u.current&&!Phe(a.current.lastBounds,C)&&s(a.current.lastBounds=C)};return[g,c?TL(g,c):g,l?TL(g,l):g]},[s,r,l,c]);function v(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(g=>g.removeEventListener("scroll",m,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",a.current.orientationHandler))}function x(){var g;a.current.element&&(a.current.resizeObserver=new i(h),(g=a.current.resizeObserver)==null||g.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(b=>b.addEventListener("scroll",m,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{m()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}const y=g=>{!g||g===a.current.element||(v(),a.current.element=g,a.current.scrollContainers=M8(g),x())};return Rhe(m,!!e),The(h),T.useEffect(()=>{v(),x()},[e,m,h]),T.useEffect(()=>v,[]),[y,o,f]}function The(t){T.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Rhe(t,e){T.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function M8(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(t);return[n,r,i].some(o=>o==="auto"||o==="scroll")&&e.push(t),[...e,...M8(t.parentElement)]}const Ahe=["x","y","top","bottom","left","right","width","height"],Phe=(t,e)=>Ahe.every(n=>t[n]===e[n]),Ihe=T.forwardRef(function({children:e,fallback:n,resize:r,style:i,gl:o,events:s=mhe,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:v,dpr:x,performance:y,raycaster:g,camera:b,scene:_,onPointerMissed:S,onCreated:A,...P},R){T.useMemo(()=>l8($de),[]);const L=Ehe(),[k,C]=Che({scroll:!0,debounce:{scroll:50,resize:0},...r}),N=T.useRef(null),z=T.useRef(null);T.useImperativeHandle(R,()=>N.current);const D=f8(S),[B,G]=T.useState(!1),[X,Z]=T.useState(!1);if(B)throw B;if(X)throw X;const F=T.useRef(null);Eg(()=>{const K=N.current;C.width>0&&C.height>0&&K&&(F.current||(F.current=hhe(K)),F.current.configure({gl:o,events:s,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:v,dpr:x,performance:y,raycaster:g,camera:b,scene:_,size:C,onPointerMissed:(...Q)=>D.current==null?void 0:D.current(...Q),onCreated:Q=>{Q.events.connect==null||Q.events.connect(a?Zde(a)?a.current:a:z.current),l&&Q.setEvents({compute:(de,fe)=>{const J=de[l+"X"],ce=de[l+"Y"];fe.pointer.set(J/fe.size.width*2-1,-(ce/fe.size.height)*2+1),fe.raycaster.setFromCamera(fe.pointer,fe.camera)}}),A==null||A(Q)}}),F.current.render(E.jsx(L,{children:E.jsx(d8,{set:Z,children:E.jsx(T.Suspense,{fallback:E.jsx(Jde,{set:G}),children:e})})})))}),T.useEffect(()=>{const K=N.current;if(K)return()=>b8(K)},[]);const q=a?"none":"auto";return E.jsx("div",{ref:z,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:q,...i},...P,children:E.jsx("div",{ref:k,style:{width:"100%",height:"100%"},children:E.jsx("canvas",{ref:N,style:{display:"block"},children:n})})})}),Nhe=T.forwardRef(function(e,n){return E.jsx(S8,{children:E.jsx(Ihe,{...e,ref:n})})});function I_(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function ih(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Cg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ql(){}var mu=.7,kd=1/mu,ud="\\s*([+-]?\\d+)\\s*",jm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",khe=/^#([0-9a-f]{3,8})$/,Lhe=new RegExp(`^rgb\\(${ud},${ud},${ud}\\)$`),Ohe=new RegExp(`^rgb\\(${Bs},${Bs},${Bs}\\)$`),Dhe=new RegExp(`^rgba\\(${ud},${ud},${ud},${jm}\\)$`),Fhe=new RegExp(`^rgba\\(${Bs},${Bs},${Bs},${jm}\\)$`),zhe=new RegExp(`^hsl\\(${jm},${Bs},${Bs}\\)$`),Uhe=new RegExp(`^hsla\\(${jm},${Bs},${Bs},${jm}\\)$`),LL={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};ih(ql,Vm,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:OL,formatHex:OL,formatHex8:Bhe,formatHsl:jhe,formatRgb:DL,toString:DL});function OL(){return this.rgb().formatHex()}function Bhe(){return this.rgb().formatHex8()}function jhe(){return E8(this).formatHsl()}function DL(){return this.rgb().formatRgb()}function Vm(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=khe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?FL(e):n===3?new _r(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ny(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ny(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=Lhe.exec(t))?new _r(e[1],e[2],e[3],1):(e=Ohe.exec(t))?new _r(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Dhe.exec(t))?ny(e[1],e[2],e[3],e[4]):(e=Fhe.exec(t))?ny(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=zhe.exec(t))?BL(e[1],e[2]/100,e[3]/100,1):(e=Uhe.exec(t))?BL(e[1],e[2]/100,e[3]/100,e[4]):LL.hasOwnProperty(t)?FL(LL[t]):t==="transparent"?new _r(NaN,NaN,NaN,0):null}function FL(t){return new _r(t>>16&255,t>>8&255,t&255,1)}function ny(t,e,n,r){return r<=0&&(t=e=n=NaN),new _r(t,e,n,r)}function CA(t){return t instanceof ql||(t=Vm(t)),t?(t=t.rgb(),new _r(t.r,t.g,t.b,t.opacity)):new _r}function Ol(t,e,n,r){return arguments.length===1?CA(t):new _r(t,e,n,r??1)}function _r(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}ih(_r,Ol,Cg(ql,{brighter(t){return t=t==null?kd:Math.pow(kd,t),new _r(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?mu:Math.pow(mu,t),new _r(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _r(Kc(this.r),Kc(this.g),Kc(this.b),wx(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:zL,formatHex:zL,formatHex8:Vhe,formatRgb:UL,toString:UL}));function zL(){return`#${Uc(this.r)}${Uc(this.g)}${Uc(this.b)}`}function Vhe(){return`#${Uc(this.r)}${Uc(this.g)}${Uc(this.b)}${Uc((isNaN(this.opacity)?1:this.opacity)*255)}`}function UL(){const t=wx(this.opacity);return`${t===1?"rgb(":"rgba("}${Kc(this.r)}, ${Kc(this.g)}, ${Kc(this.b)}${t===1?")":`, ${t})`}`}function wx(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Kc(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Uc(t){return t=Kc(t),(t<16?"0":"")+t.toString(16)}function BL(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ts(t,e,n,r)}function E8(t){if(t instanceof ts)return new ts(t.h,t.s,t.l,t.opacity);if(t instanceof ql||(t=Vm(t)),!t)return new ts;if(t instanceof ts)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(e===o?s=(n-r)/a+(n0&&l<1?0:s,new ts(s,a,l,t.opacity)}function Sx(t,e,n,r){return arguments.length===1?E8(t):new ts(t,e,n,r??1)}function ts(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ih(ts,Sx,Cg(ql,{brighter(t){return t=t==null?kd:Math.pow(kd,t),new ts(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?mu:Math.pow(mu,t),new ts(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 _r(rE(t>=240?t-240:t+120,i,r),rE(t,i,r),rE(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new ts(jL(this.h),ry(this.s),ry(this.l),wx(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=wx(this.opacity);return`${t===1?"hsl(":"hsla("}${jL(this.h)}, ${ry(this.s)*100}%, ${ry(this.l)*100}%${t===1?")":`, ${t})`}`}}));function jL(t){return t=(t||0)%360,t<0?t+360:t}function ry(t){return Math.max(0,Math.min(1,t||0))}function rE(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 C8=Math.PI/180,T8=180/Math.PI,Mx=18,R8=.96422,A8=1,P8=.82521,I8=4/29,fd=6/29,N8=3*fd*fd,$he=fd*fd*fd;function k8(t){if(t instanceof js)return new js(t.l,t.a,t.b,t.opacity);if(t instanceof wa)return L8(t);t instanceof _r||(t=CA(t));var e=aE(t.r),n=aE(t.g),r=aE(t.b),i=iE((.2225045*e+.7168786*n+.0606169*r)/A8),o,s;return e===n&&n===r?o=s=i:(o=iE((.4360747*e+.3850649*n+.1430804*r)/R8),s=iE((.0139322*e+.0971045*n+.7141733*r)/P8)),new js(116*i-16,500*(o-i),200*(i-s),t.opacity)}function bC(t,e,n,r){return arguments.length===1?k8(t):new js(t,e,n,r??1)}function js(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}ih(js,bC,Cg(ql,{brighter(t){return new js(this.l+Mx*(t??1),this.a,this.b,this.opacity)},darker(t){return new js(this.l-Mx*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=R8*oE(e),t=A8*oE(t),n=P8*oE(n),new _r(sE(3.1338561*e-1.6168667*t-.4906146*n),sE(-.9787684*e+1.9161415*t+.033454*n),sE(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function iE(t){return t>$he?Math.pow(t,1/3):t/N8+I8}function oE(t){return t>fd?t*t*t:N8*(t-I8)}function sE(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function aE(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Whe(t){if(t instanceof wa)return new wa(t.h,t.c,t.l,t.opacity);if(t instanceof js||(t=k8(t)),t.a===0&&t.b===0)return new wa(NaN,0=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],s=r>0?t[r-1]:2*i-o,a=r()=>t;function D8(t,e){return function(n){return t+n*e}}function qhe(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 AA(t,e){var n=e-t;return n?D8(t,n>180||n<-180?n-360*Math.round(n/360):n):k_(isNaN(t)?e:t)}function Yhe(t){return(t=+t)==1?wr:function(e,n){return n-e?qhe(e,n,t):k_(isNaN(e)?n:e)}}function wr(t,e){var n=e-t;return n?D8(t,n):k_(isNaN(t)?e:t)}const wC=function t(e){var n=Yhe(e);function r(i,o){var s=n((i=Ol(i)).r,(o=Ol(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=wr(i.opacity,o.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=t,r}(1);function Khe(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),s,a;for(s=0;sn&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ld(r,i)})),n=lE.lastIndex;return ne&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function mpe(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i2?gpe:mpe,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?o:(l||(l=a(t.map(r),e,n)))(r(s(h)))}return f.invert=function(h){return s(i((c||(c=a(e,t.map(r),Ld)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,hpe),u()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),u()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=IA,u()},f.clamp=function(h){return arguments.length?(s=h?!0:ks,u()):s!==ks},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,m){return r=h,i=m,u()}}function vpe(){return D_()(ks,ks)}function ype(t,e,n,r){var i=K6(t,e,n),o;switch(r=Sm(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=nie(i,s))&&(r.precision=o),Q6(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=rie(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=tie(i))&&(r.precision=o-(r.type==="%")*2);break}}return Ks(r)}function NA(t){var e=t.domain;return t.ticks=function(n){var r=e();return J2(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return ype(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],a=r[o],l,c,u=10;for(a0;){if(c=Q2(s,a,n),c===l)return r[i]=s,r[o]=a,e(r);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function B8(){var t=vpe();return t.copy=function(){return O_(t,B8())},I_.apply(t,arguments),NA(t)}function xpe(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],s;return oMath.pow(t,e)}function Mpe(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 qL(t){return(e,n)=>-t(-e,n)}function Epe(t){const e=t(GL,XL),n=e.domain;let r=10,i,o;function s(){return i=Mpe(r),o=Spe(r),n()[0]<0?(i=qL(i),o=qL(o),t(bpe,_pe)):t(GL,XL),e}return e.base=function(a){return arguments.length?(r=+a,s()):r},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const l=n();let c=l[0],u=l[l.length-1];const f=u0){for(;h<=m;++h)for(v=1;vu)break;g.push(x)}}else for(;h<=m;++h)for(v=r-1;v>=1;--v)if(x=h>0?v/o(-h):v*o(h),!(xu)break;g.push(x)}g.length*2{if(a==null&&(a=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Sm(l)).precision==null&&(l.trim=!0),l=Ks(l)),a===1/0)return l;const c=Math.max(1,r*a/e.ticks().length);return u=>{let f=u/o(Math.round(i(u)));return f*rn(xpe(n(),{floor:a=>o(Math.floor(i(a))),ceil:a=>o(Math.ceil(i(a)))})),e}function j8(){const t=Epe(D_()).domain([1,10]);return t.copy=()=>O_(t,j8()).base(t.base()),I_.apply(t,arguments),t}function YL(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function KL(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Cpe(t){var e=1,n=t(YL(e),KL(e));return n.constant=function(r){return arguments.length?t(YL(e=+r),KL(e)):e},NA(n)}function V8(){var t=Cpe(D_());return t.copy=function(){return O_(t,V8()).constant(t.constant())},I_.apply(t,arguments)}function ZL(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Tpe(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Rpe(t){return t<0?-t*t:t*t}function Ape(t){var e=t(ks,ks),n=1;function r(){return n===1?t(ks,ks):n===.5?t(Tpe,Rpe):t(ZL(n),ZL(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},NA(e)}function kA(){var t=Ape(D_());return t.copy=function(){return O_(t,kA()).exponent(t.exponent())},I_.apply(t,arguments),t}function Ppe(){return kA.apply(null,arguments).exponent(.5)}const cE=new Date,uE=new Date;function Dr(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const s=i(o),a=i.ceil(o);return o-s(e(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{const l=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o0))return l;let c;do l.push(c=new Date(+o)),e(o,a),t(o);while(cDr(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),n&&(i.count=(o,s)=>(cE.setTime(+o),uE.setTime(+s),t(cE),t(uE),Math.floor(n(cE,uE))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const Wm=1e3,Dl=Wm*60,Hm=Dl*60,Gm=Hm*24,$8=Gm*7,LA=Dr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Wm)},(t,e)=>(e-t)/Wm,t=>t.getUTCSeconds());LA.range;const W8=Dr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Wm)},(t,e)=>{t.setTime(+t+e*Dl)},(t,e)=>(e-t)/Dl,t=>t.getMinutes());W8.range;const H8=Dr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Dl)},(t,e)=>(e-t)/Dl,t=>t.getUTCMinutes());H8.range;const G8=Dr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Wm-t.getMinutes()*Dl)},(t,e)=>{t.setTime(+t+e*Hm)},(t,e)=>(e-t)/Hm,t=>t.getHours());G8.range;const X8=Dr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Hm)},(t,e)=>(e-t)/Hm,t=>t.getUTCHours());X8.range;const q8=Dr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Dl)/Gm,t=>t.getDate()-1);q8.range;const Y8=Dr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Gm,t=>t.getUTCDate()-1);Y8.range;const Ipe=Dr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Gm,t=>Math.floor(t/Gm));Ipe.range;function Iu(t){return Dr(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())*Dl)/$8)}const K8=Iu(0),Npe=Iu(1),kpe=Iu(2),Lpe=Iu(3),Ope=Iu(4),Dpe=Iu(5),Fpe=Iu(6);K8.range;Npe.range;kpe.range;Lpe.range;Ope.range;Dpe.range;Fpe.range;function Nu(t){return Dr(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)/$8)}const Z8=Nu(0),zpe=Nu(1),Upe=Nu(2),Bpe=Nu(3),jpe=Nu(4),Vpe=Nu(5),$pe=Nu(6);Z8.range;zpe.range;Upe.range;Bpe.range;jpe.range;Vpe.range;$pe.range;const J8=Dr(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());J8.range;const Q8=Dr(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());Q8.range;const OA=Dr(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());OA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Dr(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)});OA.range;const DA=Dr(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());DA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Dr(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)});DA.range;function Wpe(t,e){e.domain&&("nice"in t||"quantiles"in t||"padding"in t,t.domain(e.domain))}function Hpe(t,e){e.range&&("padding"in t,t.range(e.range))}function Gpe(t,e){"align"in t&&"align"in e&&typeof e.align<"u"&&t.align(e.align)}function Xpe(t,e){"base"in t&&"base"in e&&typeof e.base<"u"&&t.base(e.base)}function qpe(t,e){"clamp"in t&&"clamp"in e&&typeof e.clamp<"u"&&t.clamp(e.clamp)}function Ype(t,e){"constant"in t&&"constant"in e&&typeof e.constant<"u"&&t.constant(e.constant)}function Kpe(t,e){"exponent"in t&&"exponent"in e&&typeof e.exponent<"u"&&t.exponent(e.exponent)}var JL={lab:lpe,hcl:cpe,"hcl-long":upe,hsl:spe,"hsl-long":ape,cubehelix:fpe,"cubehelix-long":L_,rgb:wC};function Zpe(t){switch(t){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return JL[t]}var e=t.type,n=t.gamma,r=JL[e];return typeof n>"u"?r:r.gamma(n)}function Jpe(t,e){if("interpolate"in e&&"interpolate"in t&&typeof e.interpolate<"u"){var n=Zpe(e.interpolate);t.interpolate(n)}}var Qpe=new Date(Date.UTC(2020,1,2,3,4,5)),eme="%Y-%m-%d %H:%M";function tme(t){var e=t.tickFormat(1,eme)(Qpe);return e==="2020-02-02 03:04"}var QL={day:q8,hour:G8,minute:W8,month:J8,second:LA,week:K8,year:OA},eO={day:Y8,hour:X8,minute:H8,month:Q8,second:LA,week:Z8,year:DA};function nme(t,e){if("nice"in e&&typeof e.nice<"u"&&"nice"in t){var n=e.nice;if(typeof n=="boolean")n&&t.nice();else if(typeof n=="number")t.nice(n);else{var r=t,i=tme(r);if(typeof n=="string")r.nice(i?eO[n]:QL[n]);else{var o=n.interval,s=n.step,a=(i?eO[o]:QL[o]).every(s);a!=null&&r.nice(a)}}}}function rme(t,e){"padding"in t&&"padding"in e&&typeof e.padding<"u"&&t.padding(e.padding),"paddingInner"in t&&"paddingInner"in e&&typeof e.paddingInner<"u"&&t.paddingInner(e.paddingInner),"paddingOuter"in t&&"paddingOuter"in e&&typeof e.paddingOuter<"u"&&t.paddingOuter(e.paddingOuter)}function ime(t,e){if(e.reverse){var n=t.range().slice().reverse();"padding"in t,t.range(n)}}function ome(t,e){"round"in e&&typeof e.round<"u"&&(e.round&&"interpolate"in e&&typeof e.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",e):"round"in t?t.round(e.round):"interpolate"in t&&e.round&&t.interpolate(IA))}function sme(t,e){"unknown"in t&&"unknown"in e&&typeof e.unknown<"u"&&t.unknown(e.unknown)}function ame(t,e){if("zero"in e&&e.zero===!0){var n=t.domain(),r=n[0],i=n[1],o=i=0)&&(n[i]=t[i]);return n}function Ex(){return Ex=Object.assign?Object.assign.bind():function(t){for(var e=1;e ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return X(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:hj,findFiberByHostInstance:d.findFiberByHostInstance||pj,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var p=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(p.isDisabled||!p.supportsFiber)d=!0;else{try{Gg=p.inject(d),vs=p}catch{}d=!!p.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,p,w,M){if(!Le)throw Error(s(363));d=qw(d,p);var I=He(d,w,M).disconnect;return{disconnect:function(){I()}}},n.registerMutableSourceForHydration=function(d,p){var w=p._getVersion;w=w(p._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[p,w]:d.mutableSourceEagerHydrationData.push(p,w)},n.runWithPriority=function(d,p){var w=sn;try{return sn=d,p()}finally{sn=w}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,p,w,M){var I=p.current,O=ti(),Y=Ka(I);return w=H3(w),p.context===null?p.context=w:p.pendingContext=w,p=na(O,Y),p.payload={element:d},M=M===void 0?null:M,M!==null&&(p.callback=M),Xa(I,p),d=yo(I,Y,O),d!==null&&Zg(d,I,Y),Y},n};o8.exports=Xde;var qde=o8.exports;const Yde=qs(qde),SA={},l8=t=>void Object.assign(SA,t);function Kde(t,e){function n(u,{args:f=[],attach:h,...m},v){let x=`${u[0].toUpperCase()}${u.slice(1)}`,y;if(u==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;y=Af(g,{type:u,root:v,attach:h,primitive:!0})}else{const g=SA[x];if(!g)throw new Error(`R3F: ${x} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(f))throw new Error("R3F: The args prop must be an array!");y=Af(new g(...f),{type:u,root:v,attach:h,memoizedProps:{args:f}})}return y.__r3f.attach===void 0&&(y instanceof Dt?y.__r3f.attach="geometry":y instanceof Or&&(y.__r3f.attach="material")),x!=="inject"&&QM(y,m),y}function r(u,f){let h=!1;if(f){var m,v;(m=f.__r3f)!=null&&m.attach?JM(u,f,f.__r3f.attach):f.isObject3D&&u.isObject3D&&(u.add(f),h=!0),h||(v=u.__r3f)==null||v.objects.push(f),f.__r3f||Af(f,{}),f.__r3f.parent=u,xC(f),Pf(f)}}function i(u,f,h){let m=!1;if(f){var v,x;if((v=f.__r3f)!=null&&v.attach)JM(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){f.parent=u,f.dispatchEvent({type:"added"}),u.dispatchEvent({type:"childadded",child:f});const y=u.children.filter(b=>b!==f),g=y.indexOf(h);u.children=[...y.slice(0,g),f,...y.slice(g)],m=!0}m||(x=u.__r3f)==null||x.objects.push(f),f.__r3f||Af(f,{}),f.__r3f.parent=u,xC(f),Pf(f)}}function o(u,f,h=!1){u&&[...u].forEach(m=>s(f,m,h))}function s(u,f,h){if(f){var m,v,x;if(f.__r3f&&(f.__r3f.parent=null),(m=u.__r3f)!=null&&m.objects&&(u.__r3f.objects=u.__r3f.objects.filter(S=>S!==f)),(v=f.__r3f)!=null&&v.attach)ML(u,f,f.__r3f.attach);else if(f.isObject3D&&u.isObject3D){var y;u.remove(f),(y=f.__r3f)!=null&&y.root&&ihe(Vy(f),f)}const b=(x=f.__r3f)==null?void 0:x.primitive,_=!b&&(h===void 0?f.dispose!==null:h);if(!b){var g;o((g=f.__r3f)==null?void 0:g.objects,f,_),o(f.children,f,_)}if(delete f.__r3f,_&&f.dispose&&f.type!=="Scene"){const S=()=>{try{f.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?vC.unstable_scheduleCallback(vC.unstable_IdlePriority,S):S()}Pf(u)}}function a(u,f,h,m){var v;const x=(v=u.__r3f)==null?void 0:v.parent;if(!x)return;const y=n(f,h,u.__r3f.root);if(u.children){for(const g of u.children)g.__r3f&&r(y,g);u.children=u.children.filter(g=>!g.__r3f)}u.__r3f.objects.forEach(g=>r(y,g)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||s(x,u),y.parent&&(y.__r3f.autoRemovedBeforeAppend=!0),r(x,y),y.raycast&&y.__r3f.eventCount&&Vy(y).getState().internal.interaction.push(y),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=y,g.ref&&(typeof g.ref=="function"?g.ref(y):g.ref.current=y))})}const l=()=>{};return{reconciler:Yde({createInstance:n,removeChild:s,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(u,f)=>{if(!f)return;const h=u.getState().scene;h.__r3f&&(h.__r3f.root=u,r(h,f))},removeChildFromContainer:(u,f)=>{f&&s(u.getState().scene,f)},insertInContainerBefore:(u,f,h)=>{if(!f||!h)return;const m=u.getState().scene;m.__r3f&&i(m,f,h)},getRootHostContext:()=>null,getChildHostContext:u=>u,finalizeInitialChildren(u){var f;return!!((f=u==null?void 0:u.__r3f)!=null?f:{}).handlers},prepareUpdate(u,f,h,m){var v;if(((v=u==null?void 0:u.__r3f)!=null?v:{}).primitive&&m.object&&m.object!==u)return[!0];{const{args:y=[],children:g,...b}=m,{args:_=[],children:S,...A}=h;if(!Array.isArray(y))throw new Error("R3F: the args prop must be an array!");if(y.some((R,L)=>R!==_[L]))return[!0];const P=m8(u,b,A,!0);return P.changes.length?[!1,P]:null}},commitUpdate(u,[f,h],m,v,x,y){f?a(u,m,x,y):QM(u,h)},commitMount(u,f,h,m){var v;const x=(v=u.__r3f)!=null?v:{};u.raycast&&x.handlers&&x.eventCount&&Vy(u).getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>Af(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var f;const{attach:h,parent:m}=(f=u.__r3f)!=null?f:{};h&&m&&ML(m,u,h),u.isObject3D&&(u.visible=!1),Pf(u)},unhideInstance(u,f){var h;const{attach:m,parent:v}=(h=u.__r3f)!=null?h:{};m&&v&&JM(v,u,m),(u.isObject3D&&f.visible==null||f.visible)&&(u.visible=!0),Pf(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():Kf.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&wn.fun(performance.now)?performance.now:wn.fun(Date.now)?Date.now:()=>0,scheduleTimeout:wn.fun(setTimeout)?setTimeout:void 0,cancelTimeout:wn.fun(clearTimeout)?clearTimeout:void 0}),applyProps:QM}}var bL,_L;const ZM=t=>"colorSpace"in t||"outputColorSpace"in t,c8=()=>{var t;return(t=SA.ColorManagement)!=null?t:null},u8=t=>t&&t.isOrthographicCamera,Zde=t=>t&&t.hasOwnProperty("current"),Eg=typeof window<"u"&&((bL=window.document)!=null&&bL.createElement||((_L=window.navigator)==null?void 0:_L.product)==="ReactNative")?T.useLayoutEffect:T.useEffect;function f8(t){const e=T.useRef(t);return Eg(()=>void(e.current=t),[t]),e}function Jde({set:t}){return Eg(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class d8 extends T.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}d8.getDerivedStateFromError=()=>({error:!0});const h8="__default",wL=new Map,Qde=t=>t&&!!t.memoized&&!!t.changes;function p8(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const op=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()};function Vy(t){let e=t.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const wn={obj:t=>t===Object(t)&&!wn.arr(t)&&typeof t!="function",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",boo:t=>typeof t=="boolean",und:t=>t===void 0,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(wn.str(t)||wn.num(t)||wn.boo(t))return t===e;const o=wn.obj(t);if(o&&r==="reference")return t===e;const s=wn.arr(t);if(s&&n==="reference")return t===e;if((s||o)&&t===e)return!0;let a;for(a in t)if(!(a in e))return!1;if(o&&n==="shallow"&&r==="shallow"){for(a in i?e:t)if(!wn.equ(t[a],e[a],{strict:i,objects:"reference"}))return!1}else for(a in i?e:t)if(t[a]!==e[a])return!1;if(wn.und(a)){if(s&&t.length===0&&e.length===0||o&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function ehe(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function Af(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function yC(t,e){let n=t;if(e.includes("-")){const r=e.split("-"),i=r.pop();return n=r.reduce((o,s)=>o[s],t),{target:n,key:i}}else return{target:n,key:e}}const SL=/-\d+$/;function JM(t,e,n){if(wn.str(n)){if(SL.test(n)){const o=n.replace(SL,""),{target:s,key:a}=yC(t,o);Array.isArray(s[a])||(s[a]=[])}const{target:r,key:i}=yC(t,n);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=n(t,e)}function ML(t,e,n){var r,i;if(wn.str(n)){const{target:o,key:s}=yC(t,n),a=e.__r3f.previousAttach;a===void 0?delete o[s]:o[s]=a}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(t,e);(i=e.__r3f)==null||delete i.previousAttach}function m8(t,{children:e,key:n,ref:r,...i},{children:o,key:s,ref:a,...l}={},c=!1){const u=t.__r3f,f=Object.entries(i),h=[];if(c){const v=Object.keys(l);for(let x=0;x{var y;if((y=t.__r3f)!=null&&y.primitive&&v==="object"||wn.equ(x,l[v]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(v))return h.push([v,x,!0,[]]);let g=[];v.includes("-")&&(g=v.split("-")),h.push([v,x,!1,g]);for(const b in i){const _=i[b];b.startsWith(`${v}-`)&&h.push([b,_,!1,b.split("-")])}});const m={...i};return u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.args&&(m.args=u.memoizedProps.args),u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.attach&&(m.attach=u.memoizedProps.attach),{memoized:m,changes:h}}const the=typeof process<"u"&&!1;function QM(t,e){var n;const r=t.__r3f,i=r==null?void 0:r.root,o=i==null||i.getState==null?void 0:i.getState(),{memoized:s,changes:a}=Qde(e)?e:m8(t,e),l=r==null?void 0:r.eventCount;t.__r3f&&(t.__r3f.memoizedProps=s);for(let u=0;ug[b],t),!(y&&y.set))){const[g,...b]=v.reverse();x=b.reverse().reduce((_,S)=>_[S],t),f=g}if(h===h8+"remove")if(x.constructor){let g=wL.get(x.constructor);g||(g=new x.constructor,wL.set(x.constructor,g)),h=g[f]}else h=0;if(m&&r)h?r.handlers[f]=h:delete r.handlers[f],r.eventCount=Object.keys(r.handlers).length;else if(y&&y.set&&(y.copy||y instanceof qc)){if(Array.isArray(h))y.fromArray?y.fromArray(h):y.set(...h);else if(y.copy&&h&&h.constructor&&(the?y.constructor.name===h.constructor.name:y.constructor===h.constructor))y.copy(h);else if(h!==void 0){const g=y instanceof at;!g&&y.setScalar?y.setScalar(h):y instanceof qc&&h instanceof qc?y.mask=h.mask:y.set(h),!c8()&&o&&!o.linear&&g&&y.convertSRGBToLinear()}}else if(x[f]=h,x[f]instanceof On&&x[f].format===Ir&&x[f].type===ji&&o){const g=x[f];ZM(g)&&ZM(o.gl)?g.colorSpace=o.gl.outputColorSpace:g.encoding=o.gl.outputEncoding}Pf(t)}if(r&&r.parent&&t.raycast&&l!==r.eventCount){const u=Vy(t).getState().internal,f=u.interaction.indexOf(t);f>-1&&u.interaction.splice(f,1),r.eventCount&&u.interaction.push(t)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(n=t.__r3f)!=null&&n.parent&&xC(t),t}function Pf(t){var e,n;const r=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();r&&r.internal.frames===0&&r.invalidate()}function xC(t){t.onUpdate==null||t.onUpdate(t)}function nhe(t,e){t.manual||(u8(t)?(t.left=e.width/-2,t.right=e.width/2,t.top=e.height/2,t.bottom=e.height/-2):t.aspect=e.width/e.height,t.updateProjectionMatrix(),t.updateMatrixWorld())}function ey(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function rhe(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Kf.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Kf.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Kf.ContinuousEventPriority;default:return Kf.DefaultEventPriority}}function g8(t,e,n,r){const i=n.get(e);i&&(n.delete(e),n.size===0&&(t.delete(r),i.target.releasePointerCapture(r)))}function ihe(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(r=>r!==e),n.initialHits=n.initialHits.filter(r=>r!==e),n.hovered.forEach((r,i)=>{(r.eventObject===e||r.object===e)&&n.hovered.delete(i)}),n.capturedMap.forEach((r,i)=>{g8(n.capturedMap,e,r,i)})}function ohe(t){function e(l){const{internal:c}=t.getState(),u=l.offsetX-c.initialClick[0],f=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(u*u+f*f))}function n(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(u=>{var f;return(f=c.__r3f)==null?void 0:f.handlers["onPointer"+u]}))}function r(l,c){const u=t.getState(),f=new Set,h=[],m=c?c(u.internal.interaction):u.internal.interaction;for(let g=0;g{const _=op(g.object),S=op(b.object);return!_||!S?g.distance-b.distance:S.events.priority-_.events.priority||g.distance-b.distance}).filter(g=>{const b=ey(g);return f.has(b)?!1:(f.add(b),!0)});u.events.filter&&(x=u.events.filter(x,u));for(const g of x){let b=g.object;for(;b;){var y;(y=b.__r3f)!=null&&y.eventCount&&h.push({...g,eventObject:b}),b=b.parent}}if("pointerId"in l&&u.internal.capturedMap.has(l.pointerId))for(let g of u.internal.capturedMap.get(l.pointerId).values())f.has(ey(g.intersection))||h.push(g.intersection);return h}function i(l,c,u,f){const h=t.getState();if(l.length){const m={stopped:!1};for(const v of l){const x=op(v.object)||h,{raycaster:y,pointer:g,camera:b,internal:_}=x,S=new H(g.x,g.y,0).unproject(b),A=C=>{var N,z;return(N=(z=_.capturedMap.get(C))==null?void 0:z.has(v.eventObject))!=null?N:!1},P=C=>{const N={intersection:v,target:c.target};_.capturedMap.has(C)?_.capturedMap.get(C).set(v.eventObject,N):_.capturedMap.set(C,new Map([[v.eventObject,N]])),c.target.setPointerCapture(C)},R=C=>{const N=_.capturedMap.get(C);N&&g8(_.capturedMap,v.eventObject,N,C)};let L={};for(let C in c){let N=c[C];typeof N!="function"&&(L[C]=N)}let k={...v,...L,pointer:g,intersections:l,stopped:m.stopped,delta:u,unprojectedPoint:S,ray:y.ray,camera:b,stopPropagation(){const C="pointerId"in c&&_.capturedMap.get(c.pointerId);if((!C||C.has(v.eventObject))&&(k.stopped=m.stopped=!0,_.hovered.size&&Array.from(_.hovered.values()).find(N=>N.eventObject===v.eventObject))){const N=l.slice(0,l.indexOf(v));o([...N,v])}},target:{hasPointerCapture:A,setPointerCapture:P,releasePointerCapture:R},currentTarget:{hasPointerCapture:A,setPointerCapture:P,releasePointerCapture:R},nativeEvent:c};if(f(k),m.stopped===!0)break}}return l}function o(l){const{internal:c}=t.getState();for(const u of c.hovered.values())if(!l.length||!l.find(f=>f.object===u.object&&f.index===u.index&&f.instanceId===u.instanceId)){const h=u.eventObject.__r3f,m=h==null?void 0:h.handlers;if(c.hovered.delete(ey(u)),h!=null&&h.eventCount){const v={...u,intersections:l};m.onPointerOut==null||m.onPointerOut(v),m.onPointerLeave==null||m.onPointerLeave(v)}}}function s(l,c){for(let u=0;uo([]);case"onLostPointerCapture":return c=>{const{internal:u}=t.getState();"pointerId"in c&&u.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{u.capturedMap.has(c.pointerId)&&(u.capturedMap.delete(c.pointerId),o([]))})}}return function(u){const{onPointerMissed:f,internal:h}=t.getState();h.lastEvent.current=u;const m=l==="onPointerMove",v=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",y=r(u,m?n:void 0),g=v?e(u):0;l==="onPointerDown"&&(h.initialClick=[u.offsetX,u.offsetY],h.initialHits=y.map(_=>_.eventObject)),v&&!y.length&&g<=2&&(s(u,h.interaction),f&&f(u)),m&&o(y);function b(_){const S=_.eventObject,A=S.__r3f,P=A==null?void 0:A.handlers;if(A!=null&&A.eventCount)if(m){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const R=ey(_),L=h.hovered.get(R);L?L.stopped&&_.stopPropagation():(h.hovered.set(R,_),P.onPointerOver==null||P.onPointerOver(_),P.onPointerEnter==null||P.onPointerEnter(_))}P.onPointerMove==null||P.onPointerMove(_)}else{const R=P[l];R?(!v||h.initialHits.includes(S))&&(s(u,h.interaction.filter(L=>!h.initialHits.includes(L))),R(_)):v&&h.initialHits.includes(S)&&s(u,h.interaction.filter(L=>!h.initialHits.includes(L)))}}i(y,u,g,b)}}return{handlePointer:a}}const v8=t=>!!(t!=null&&t.render),y8=T.createContext(null),she=(t,e)=>{const n=Gde((a,l)=>{const c=new H,u=new H,f=new H;function h(g=l().camera,b=u,_=l().size){const{width:S,height:A,top:P,left:R}=_,L=S/A;b instanceof H?f.copy(b):f.set(...b);const k=g.getWorldPosition(c).distanceTo(f);if(u8(g))return{width:S/g.zoom,height:A/g.zoom,top:P,left:R,factor:1,distance:k,aspect:L};{const C=g.fov*Math.PI/180,N=2*Math.tan(C/2)*k,z=N*(S/A);return{width:z,height:N,top:P,left:R,factor:S/z,distance:k,aspect:L}}}let m;const v=g=>a(b=>({performance:{...b.performance,current:g}})),x=new Ne;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(g=1)=>t(l(),g),advance:(g,b)=>e(g,b,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new yA,pointer:x,mouse:x,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const g=l();m&&clearTimeout(m),g.performance.current!==g.performance.min&&v(g.performance.min),m=setTimeout(()=>v(l().performance.max),g.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:h},setEvents:g=>a(b=>({...b,events:{...b.events,...g}})),setSize:(g,b,_,S,A)=>{const P=l().camera,R={width:g,height:b,top:S||0,left:A||0,updateStyle:_};a(L=>({size:R,viewport:{...L.viewport,...h(P,u,R)}}))},setDpr:g=>a(b=>{const _=p8(g);return{viewport:{...b.viewport,dpr:_,initialDpr:b.viewport.initialDpr||_}}}),setFrameloop:(g="always")=>{const b=l().clock;b.stop(),b.elapsedTime=0,g!=="never"&&(b.start(),b.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:T.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,b,_)=>{const S=l().internal;return S.priority=S.priority+(b>0?1:0),S.subscribers.push({ref:g,priority:b,store:_}),S.subscribers=S.subscribers.sort((A,P)=>A.priority-P.priority),()=>{const A=l().internal;A!=null&&A.subscribers&&(A.priority=A.priority-(b>0?1:0),A.subscribers=A.subscribers.filter(P=>P.ref!==g))}}}}}),r=n.getState();let i=r.size,o=r.viewport.dpr,s=r.camera;return n.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:u,set:f}=n.getState();if(l.width!==i.width||l.height!==i.height||c.dpr!==o){var h;i=l,o=c.dpr,nhe(a,l),u.setPixelRatio(c.dpr);const m=(h=l.updateStyle)!=null?h:typeof HTMLCanvasElement<"u"&&u.domElement instanceof HTMLCanvasElement;u.setSize(l.width,l.height,m)}a!==s&&(s=a,f(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),n.subscribe(a=>t(a)),n};let ty,ahe=new Set,lhe=new Set,che=new Set;function eE(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function sp(t,e){switch(t){case"before":return eE(ahe,e);case"after":return eE(lhe,e);case"tail":return eE(che,e)}}let tE,nE;function rE(t,e,n){let r=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(r=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),tE=e.internal.subscribers,ty=0;ty0)&&!((u=o.gl.xr)!=null&&u.isPresenting)&&(r+=rE(c,o))}if(n=!1,sp("after",c),r===0)return sp("tail",c),e=!1,cancelAnimationFrame(i)}function a(c,u=1){var f;if(!c)return t.forEach(h=>a(h.store.getState(),u));(f=c.gl.xr)!=null&&f.isPresenting||!c.internal.active||c.frameloop==="never"||(u>1?c.internal.frames=Math.min(60,c.internal.frames+u):n?c.internal.frames=2:c.internal.frames=1,e||(e=!0,requestAnimationFrame(s)))}function l(c,u=!0,f,h){if(u&&sp("before",c),f)rE(c,f,h);else for(const m of t.values())rE(c,m.store.getState());u&&sp("after",c)}return{loop:s,invalidate:a,advance:l}}function x8(){const t=T.useContext(y8);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function Cr(t=n=>n,e){return x8()(t,e)}function MA(t,e=0){const n=x8(),r=n.getState().internal.subscribe,i=f8(t);return Eg(()=>r(i,e,n),[e,r,n]),null}const Nd=new Map,{invalidate:EL,advance:CL}=uhe(Nd),{reconciler:wx,applyProps:bf}=Kde(Nd,rhe),_f={objects:"shallow",strict:!1},fhe=(t,e)=>{const n=typeof t=="function"?t(e):t;return v8(n)?n:new cB({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function dhe(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:r,height:i,top:o,left:s,updateStyle:a=n}=e;return{width:r,height:i,top:o,left:s,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:r,height:i,top:o,left:s}=t.parentElement.getBoundingClientRect();return{width:r,height:i,top:o,left:s,updateStyle:n}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0,updateStyle:n};return{width:0,height:0,top:0,left:0}}function hhe(t){const e=Nd.get(t),n=e==null?void 0:e.fiber,r=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,o=r||she(EL,CL),s=n||wx.createContainer(o,Kf.ConcurrentRoot,null,!1,null,"",i,null);e||Nd.set(t,{fiber:s,store:o});let a,l=!1,c;return{configure(u={}){let{gl:f,size:h,scene:m,events:v,onCreated:x,shadows:y=!1,linear:g=!1,flat:b=!1,legacy:_=!1,orthographic:S=!1,frameloop:A="always",dpr:P=[1,2],performance:R,raycaster:L,camera:k,onPointerMissed:C}=u,N=o.getState(),z=N.gl;N.gl||N.set({gl:z=fhe(f,t)});let D=N.raycaster;D||N.set({raycaster:D=new n8});const{params:B,...G}=L||{};if(wn.equ(G,D,_f)||bf(D,{...G}),wn.equ(B,D.params,_f)||bf(D,{params:{...D.params,...B}}),!N.camera||N.camera===c&&!wn.equ(c,k,_f)){c=k;const K=k instanceof gg,Q=K?k:S?new xg(0,0,0,0,.1,1e3):new br(75,0,.1,1e3);K||(Q.position.z=5,k&&(bf(Q,k),("aspect"in k||"left"in k||"right"in k||"bottom"in k||"top"in k)&&(Q.manual=!0,Q.updateProjectionMatrix())),!N.camera&&!(k!=null&&k.rotation)&&Q.lookAt(0,0,0)),N.set({camera:Q}),D.camera=Q}if(!N.scene){let K;m instanceof yx?K=m:(K=new yx,m&&bf(K,m)),N.set({scene:Af(K)})}if(!N.xr){var X;const K=(fe,J)=>{const ce=o.getState();ce.frameloop!=="never"&&CL(fe,!0,ce,J)},Q=()=>{const fe=o.getState();fe.gl.xr.enabled=fe.gl.xr.isPresenting,fe.gl.xr.setAnimationLoop(fe.gl.xr.isPresenting?K:null),fe.gl.xr.isPresenting||EL(fe)},de={connect(){const fe=o.getState().gl;fe.xr.addEventListener("sessionstart",Q),fe.xr.addEventListener("sessionend",Q)},disconnect(){const fe=o.getState().gl;fe.xr.removeEventListener("sessionstart",Q),fe.xr.removeEventListener("sessionend",Q)}};typeof((X=z.xr)==null?void 0:X.addEventListener)=="function"&&de.connect(),N.set({xr:de})}if(z.shadowMap){const K=z.shadowMap.enabled,Q=z.shadowMap.type;if(z.shadowMap.enabled=!!y,wn.boo(y))z.shadowMap.type=kp;else if(wn.str(y)){var Z;const de={basic:oU,percentage:i_,soft:kp,variance:Ko};z.shadowMap.type=(Z=de[y])!=null?Z:kp}else wn.obj(y)&&Object.assign(z.shadowMap,y);(K!==z.shadowMap.enabled||Q!==z.shadowMap.type)&&(z.shadowMap.needsUpdate=!0)}const F=c8();F&&("enabled"in F?F.enabled=!_:"legacyMode"in F&&(F.legacyMode=_)),l||bf(z,{outputEncoding:g?3e3:3001,toneMapping:b?Us:OR}),N.legacy!==_&&N.set(()=>({legacy:_})),N.linear!==g&&N.set(()=>({linear:g})),N.flat!==b&&N.set(()=>({flat:b})),f&&!wn.fun(f)&&!v8(f)&&!wn.equ(f,z,_f)&&bf(z,f),v&&!N.events.handlers&&N.set({events:v(o)});const q=dhe(t,h);return wn.equ(q,N.size,_f)||N.setSize(q.width,q.height,q.updateStyle,q.top,q.left),P&&N.viewport.dpr!==p8(P)&&N.setDpr(P),N.frameloop!==A&&N.setFrameloop(A),N.onPointerMissed||N.set({onPointerMissed:C}),R&&!wn.equ(R,N.performance,_f)&&N.set(K=>({performance:{...K.performance,...R}})),a=x,l=!0,this},render(u){return l||this.configure(),wx.updateContainer(E.jsx(phe,{store:o,children:u,onCreated:a,rootElement:t}),s,null,()=>{}),o},unmount(){b8(t)}}}function phe({store:t,children:e,onCreated:n,rootElement:r}){return Eg(()=>{const i=t.getState();i.set(o=>({internal:{...o.internal,active:!0}})),n&&n(i),t.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),E.jsx(y8.Provider,{value:t,children:e})}function b8(t,e){const n=Nd.get(t),r=n==null?void 0:n.fiber;if(r){const i=n==null?void 0:n.store.getState();i&&(i.internal.active=!1),wx.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var o,s,a,l;i.events.disconnect==null||i.events.disconnect(),(o=i.gl)==null||(s=o.renderLists)==null||s.dispose==null||s.dispose(),(a=i.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),ehe(i),Nd.delete(t)}catch{}},500)})}}wx.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:T.version});const iE={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function mhe(t){const{handlePointer:e}=ohe(t);return{priority:1,enabled:!0,compute(n,r,i){r.pointer.set(n.offsetX/r.size.width*2-1,-(n.offsetY/r.size.height)*2+1),r.raycaster.setFromCamera(r.pointer,r.camera)},connected:void 0,handlers:Object.keys(iE).reduce((n,r)=>({...n,[r]:e(r)}),{}),update:()=>{var n;const{events:r,internal:i}=t.getState();(n=i.lastEvent)!=null&&n.current&&r.handlers&&r.handlers.onPointerMove(i.lastEvent.current)},connect:n=>{var r;const{set:i,events:o}=t.getState();o.disconnect==null||o.disconnect(),i(s=>({events:{...s.events,connected:n}})),Object.entries((r=o.handlers)!=null?r:[]).forEach(([s,a])=>{const[l,c]=iE[s];n.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:n,events:r}=t.getState();if(r.connected){var i;Object.entries((i=r.handlers)!=null?i:[]).forEach(([o,s])=>{if(r&&r.connected instanceof HTMLElement){const[a]=iE[o];r.connected.removeEventListener(a,s)}}),n(o=>({events:{...o.events,connected:void 0}}))}}}}function bC(t,e,n){var r,i,o,s,a;e==null&&(e=100);function l(){var u=Date.now()-s;u=0?r=setTimeout(l,e-u):(r=null,n||(a=t.apply(o,i),o=i=null))}var c=function(){o=this,i=arguments,s=Date.now();var u=n&&!r;return r||(r=setTimeout(l,e)),u&&(a=t.apply(o,i),o=i=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}bC.debounce=bC;var ghe=bC;const TL=qs(ghe);var vhe=Object.defineProperty,yhe=Object.defineProperties,xhe=Object.getOwnPropertyDescriptors,RL=Object.getOwnPropertySymbols,bhe=Object.prototype.hasOwnProperty,_he=Object.prototype.propertyIsEnumerable,AL=(t,e,n)=>e in t?vhe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PL=(t,e)=>{for(var n in e||(e={}))bhe.call(e,n)&&AL(t,n,e[n]);if(RL)for(var n of RL(e))_he.call(e,n)&&AL(t,n,e[n]);return t},whe=(t,e)=>yhe(t,xhe(e)),IL,NL;typeof window<"u"&&((IL=window.document)!=null&&IL.createElement||((NL=window.navigator)==null?void 0:NL.product)==="ReactNative")?T.useLayoutEffect:T.useEffect;function _8(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=t.child;for(;r;){const i=_8(r,e,n);if(i)return i;r=r.sibling}}function w8(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const kL=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=kL;return}return kL.apply(this,arguments)};const EA=w8(T.createContext(null));class S8 extends T.Component{render(){return T.createElement(EA.Provider,{value:this._reactInternals},this.props.children)}}function She(){const t=T.useContext(EA);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=T.useId();return T.useMemo(()=>{for(const r of[t,t==null?void 0:t.alternate]){if(!r)continue;const i=_8(r,!1,o=>{let s=o.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}});if(i)return i}},[t,e])}function Mhe(){const t=She(),[e]=T.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const i=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;i&&i!==EA&&!e.has(i)&&e.set(i,T.useContext(w8(i)))}n=n.return}return e}function Ehe(){const t=Mhe();return T.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>T.createElement(e,null,T.createElement(n.Provider,whe(PL({},r),{value:t.get(n)}))),e=>T.createElement(S8,PL({},e))),[t])}function Che({debounce:t,scroll:e,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=n||typeof window<"u"&&window.ResizeObserver,[o,s]=T.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0});if(!i)return o.width=1280,o.height=800,[()=>{},o,()=>{}];const a=T.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o,orientationHandler:null}),l=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,u=T.useRef(!1);T.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[f,h,m]=T.useMemo(()=>{const g=()=>{if(!a.current.element)return;const{left:b,top:_,width:S,height:A,bottom:P,right:R,x:L,y:k}=a.current.element.getBoundingClientRect(),C={left:b,top:_,width:S,height:A,bottom:P,right:R,x:L,y:k};a.current.element instanceof HTMLElement&&r&&(C.height=a.current.element.offsetHeight,C.width=a.current.element.offsetWidth),Object.freeze(C),u.current&&!Phe(a.current.lastBounds,C)&&s(a.current.lastBounds=C)};return[g,c?TL(g,c):g,l?TL(g,l):g]},[s,r,l,c]);function v(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(g=>g.removeEventListener("scroll",m,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",a.current.orientationHandler))}function x(){var g;a.current.element&&(a.current.resizeObserver=new i(h),(g=a.current.resizeObserver)==null||g.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(b=>b.addEventListener("scroll",m,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{m()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}const y=g=>{!g||g===a.current.element||(v(),a.current.element=g,a.current.scrollContainers=M8(g),x())};return Rhe(m,!!e),The(h),T.useEffect(()=>{v(),x()},[e,m,h]),T.useEffect(()=>v,[]),[y,o,f]}function The(t){T.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Rhe(t,e){T.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function M8(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(t);return[n,r,i].some(o=>o==="auto"||o==="scroll")&&e.push(t),[...e,...M8(t.parentElement)]}const Ahe=["x","y","top","bottom","left","right","width","height"],Phe=(t,e)=>Ahe.every(n=>t[n]===e[n]),Ihe=T.forwardRef(function({children:e,fallback:n,resize:r,style:i,gl:o,events:s=mhe,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:v,dpr:x,performance:y,raycaster:g,camera:b,scene:_,onPointerMissed:S,onCreated:A,...P},R){T.useMemo(()=>l8($de),[]);const L=Ehe(),[k,C]=Che({scroll:!0,debounce:{scroll:50,resize:0},...r}),N=T.useRef(null),z=T.useRef(null);T.useImperativeHandle(R,()=>N.current);const D=f8(S),[B,G]=T.useState(!1),[X,Z]=T.useState(!1);if(B)throw B;if(X)throw X;const F=T.useRef(null);Eg(()=>{const K=N.current;C.width>0&&C.height>0&&K&&(F.current||(F.current=hhe(K)),F.current.configure({gl:o,events:s,shadows:c,linear:u,flat:f,legacy:h,orthographic:m,frameloop:v,dpr:x,performance:y,raycaster:g,camera:b,scene:_,size:C,onPointerMissed:(...Q)=>D.current==null?void 0:D.current(...Q),onCreated:Q=>{Q.events.connect==null||Q.events.connect(a?Zde(a)?a.current:a:z.current),l&&Q.setEvents({compute:(de,fe)=>{const J=de[l+"X"],ce=de[l+"Y"];fe.pointer.set(J/fe.size.width*2-1,-(ce/fe.size.height)*2+1),fe.raycaster.setFromCamera(fe.pointer,fe.camera)}}),A==null||A(Q)}}),F.current.render(E.jsx(L,{children:E.jsx(d8,{set:Z,children:E.jsx(T.Suspense,{fallback:E.jsx(Jde,{set:G}),children:e})})})))}),T.useEffect(()=>{const K=N.current;if(K)return()=>b8(K)},[]);const q=a?"none":"auto";return E.jsx("div",{ref:z,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:q,...i},...P,children:E.jsx("div",{ref:k,style:{width:"100%",height:"100%"},children:E.jsx("canvas",{ref:N,style:{display:"block"},children:n})})})}),Nhe=T.forwardRef(function(e,n){return E.jsx(S8,{children:E.jsx(Ihe,{...e,ref:n})})});function k_(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function ih(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Cg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ql(){}var mu=.7,kd=1/mu,ud="\\s*([+-]?\\d+)\\s*",jm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",js="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",khe=/^#([0-9a-f]{3,8})$/,Lhe=new RegExp(`^rgb\\(${ud},${ud},${ud}\\)$`),Ohe=new RegExp(`^rgb\\(${js},${js},${js}\\)$`),Dhe=new RegExp(`^rgba\\(${ud},${ud},${ud},${jm}\\)$`),Fhe=new RegExp(`^rgba\\(${js},${js},${js},${jm}\\)$`),zhe=new RegExp(`^hsl\\(${jm},${js},${js}\\)$`),Uhe=new RegExp(`^hsla\\(${jm},${js},${js},${jm}\\)$`),LL={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};ih(ql,Vm,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:OL,formatHex:OL,formatHex8:Bhe,formatHsl:jhe,formatRgb:DL,toString:DL});function OL(){return this.rgb().formatHex()}function Bhe(){return this.rgb().formatHex8()}function jhe(){return E8(this).formatHsl()}function DL(){return this.rgb().formatRgb()}function Vm(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=khe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?FL(e):n===3?new _r(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ny(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ny(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=Lhe.exec(t))?new _r(e[1],e[2],e[3],1):(e=Ohe.exec(t))?new _r(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Dhe.exec(t))?ny(e[1],e[2],e[3],e[4]):(e=Fhe.exec(t))?ny(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=zhe.exec(t))?BL(e[1],e[2]/100,e[3]/100,1):(e=Uhe.exec(t))?BL(e[1],e[2]/100,e[3]/100,e[4]):LL.hasOwnProperty(t)?FL(LL[t]):t==="transparent"?new _r(NaN,NaN,NaN,0):null}function FL(t){return new _r(t>>16&255,t>>8&255,t&255,1)}function ny(t,e,n,r){return r<=0&&(t=e=n=NaN),new _r(t,e,n,r)}function CA(t){return t instanceof ql||(t=Vm(t)),t?(t=t.rgb(),new _r(t.r,t.g,t.b,t.opacity)):new _r}function Ol(t,e,n,r){return arguments.length===1?CA(t):new _r(t,e,n,r??1)}function _r(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}ih(_r,Ol,Cg(ql,{brighter(t){return t=t==null?kd:Math.pow(kd,t),new _r(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?mu:Math.pow(mu,t),new _r(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _r(Kc(this.r),Kc(this.g),Kc(this.b),Sx(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:zL,formatHex:zL,formatHex8:Vhe,formatRgb:UL,toString:UL}));function zL(){return`#${Uc(this.r)}${Uc(this.g)}${Uc(this.b)}`}function Vhe(){return`#${Uc(this.r)}${Uc(this.g)}${Uc(this.b)}${Uc((isNaN(this.opacity)?1:this.opacity)*255)}`}function UL(){const t=Sx(this.opacity);return`${t===1?"rgb(":"rgba("}${Kc(this.r)}, ${Kc(this.g)}, ${Kc(this.b)}${t===1?")":`, ${t})`}`}function Sx(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Kc(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Uc(t){return t=Kc(t),(t<16?"0":"")+t.toString(16)}function BL(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ts(t,e,n,r)}function E8(t){if(t instanceof ts)return new ts(t.h,t.s,t.l,t.opacity);if(t instanceof ql||(t=Vm(t)),!t)return new ts;if(t instanceof ts)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(e===o?s=(n-r)/a+(n0&&l<1?0:s,new ts(s,a,l,t.opacity)}function Mx(t,e,n,r){return arguments.length===1?E8(t):new ts(t,e,n,r??1)}function ts(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ih(ts,Mx,Cg(ql,{brighter(t){return t=t==null?kd:Math.pow(kd,t),new ts(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?mu:Math.pow(mu,t),new ts(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 _r(oE(t>=240?t-240:t+120,i,r),oE(t,i,r),oE(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new ts(jL(this.h),ry(this.s),ry(this.l),Sx(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=Sx(this.opacity);return`${t===1?"hsl(":"hsla("}${jL(this.h)}, ${ry(this.s)*100}%, ${ry(this.l)*100}%${t===1?")":`, ${t})`}`}}));function jL(t){return t=(t||0)%360,t<0?t+360:t}function ry(t){return Math.max(0,Math.min(1,t||0))}function oE(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 C8=Math.PI/180,T8=180/Math.PI,Ex=18,R8=.96422,A8=1,P8=.82521,I8=4/29,fd=6/29,N8=3*fd*fd,$he=fd*fd*fd;function k8(t){if(t instanceof Vs)return new Vs(t.l,t.a,t.b,t.opacity);if(t instanceof Sa)return L8(t);t instanceof _r||(t=CA(t));var e=cE(t.r),n=cE(t.g),r=cE(t.b),i=sE((.2225045*e+.7168786*n+.0606169*r)/A8),o,s;return e===n&&n===r?o=s=i:(o=sE((.4360747*e+.3850649*n+.1430804*r)/R8),s=sE((.0139322*e+.0971045*n+.7141733*r)/P8)),new Vs(116*i-16,500*(o-i),200*(i-s),t.opacity)}function _C(t,e,n,r){return arguments.length===1?k8(t):new Vs(t,e,n,r??1)}function Vs(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}ih(Vs,_C,Cg(ql,{brighter(t){return new Vs(this.l+Ex*(t??1),this.a,this.b,this.opacity)},darker(t){return new Vs(this.l-Ex*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=R8*aE(e),t=A8*aE(t),n=P8*aE(n),new _r(lE(3.1338561*e-1.6168667*t-.4906146*n),lE(-.9787684*e+1.9161415*t+.033454*n),lE(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function sE(t){return t>$he?Math.pow(t,1/3):t/N8+I8}function aE(t){return t>fd?t*t*t:N8*(t-I8)}function lE(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function cE(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Whe(t){if(t instanceof Sa)return new Sa(t.h,t.c,t.l,t.opacity);if(t instanceof Vs||(t=k8(t)),t.a===0&&t.b===0)return new Sa(NaN,0=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],s=r>0?t[r-1]:2*i-o,a=r()=>t;function D8(t,e){return function(n){return t+n*e}}function qhe(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 AA(t,e){var n=e-t;return n?D8(t,n>180||n<-180?n-360*Math.round(n/360):n):O_(isNaN(t)?e:t)}function Yhe(t){return(t=+t)==1?wr:function(e,n){return n-e?qhe(e,n,t):O_(isNaN(e)?n:e)}}function wr(t,e){var n=e-t;return n?D8(t,n):O_(isNaN(t)?e:t)}const SC=function t(e){var n=Yhe(e);function r(i,o){var s=n((i=Ol(i)).r,(o=Ol(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=wr(i.opacity,o.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=t,r}(1);function Khe(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),s,a;for(s=0;sn&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ld(r,i)})),n=uE.lastIndex;return ne&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function mpe(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i2?gpe:mpe,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?o:(l||(l=a(t.map(r),e,n)))(r(s(h)))}return f.invert=function(h){return s(i((c||(c=a(e,t.map(r),Ld)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,hpe),u()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),u()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=IA,u()},f.clamp=function(h){return arguments.length?(s=h?!0:Ls,u()):s!==Ls},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,m){return r=h,i=m,u()}}function vpe(){return z_()(Ls,Ls)}function ype(t,e,n,r){var i=K6(t,e,n),o;switch(r=Sm(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=nie(i,s))&&(r.precision=o),Q6(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=rie(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=tie(i))&&(r.precision=o-(r.type==="%")*2);break}}return Zs(r)}function NA(t){var e=t.domain;return t.ticks=function(n){var r=e();return Q2(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return ype(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],a=r[o],l,c,u=10;for(a0;){if(c=eC(s,a,n),c===l)return r[i]=s,r[o]=a,e(r);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function B8(){var t=vpe();return t.copy=function(){return F_(t,B8())},k_.apply(t,arguments),NA(t)}function xpe(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],s;return oMath.pow(t,e)}function Mpe(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 qL(t){return(e,n)=>-t(-e,n)}function Epe(t){const e=t(GL,XL),n=e.domain;let r=10,i,o;function s(){return i=Mpe(r),o=Spe(r),n()[0]<0?(i=qL(i),o=qL(o),t(bpe,_pe)):t(GL,XL),e}return e.base=function(a){return arguments.length?(r=+a,s()):r},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const l=n();let c=l[0],u=l[l.length-1];const f=u0){for(;h<=m;++h)for(v=1;vu)break;g.push(x)}}else for(;h<=m;++h)for(v=r-1;v>=1;--v)if(x=h>0?v/o(-h):v*o(h),!(xu)break;g.push(x)}g.length*2{if(a==null&&(a=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Sm(l)).precision==null&&(l.trim=!0),l=Zs(l)),a===1/0)return l;const c=Math.max(1,r*a/e.ticks().length);return u=>{let f=u/o(Math.round(i(u)));return f*rn(xpe(n(),{floor:a=>o(Math.floor(i(a))),ceil:a=>o(Math.ceil(i(a)))})),e}function j8(){const t=Epe(z_()).domain([1,10]);return t.copy=()=>F_(t,j8()).base(t.base()),k_.apply(t,arguments),t}function YL(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function KL(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Cpe(t){var e=1,n=t(YL(e),KL(e));return n.constant=function(r){return arguments.length?t(YL(e=+r),KL(e)):e},NA(n)}function V8(){var t=Cpe(z_());return t.copy=function(){return F_(t,V8()).constant(t.constant())},k_.apply(t,arguments)}function ZL(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Tpe(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Rpe(t){return t<0?-t*t:t*t}function Ape(t){var e=t(Ls,Ls),n=1;function r(){return n===1?t(Ls,Ls):n===.5?t(Tpe,Rpe):t(ZL(n),ZL(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},NA(e)}function kA(){var t=Ape(z_());return t.copy=function(){return F_(t,kA()).exponent(t.exponent())},k_.apply(t,arguments),t}function Ppe(){return kA.apply(null,arguments).exponent(.5)}const fE=new Date,dE=new Date;function Dr(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const s=i(o),a=i.ceil(o);return o-s(e(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{const l=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o0))return l;let c;do l.push(c=new Date(+o)),e(o,a),t(o);while(cDr(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),n&&(i.count=(o,s)=>(fE.setTime(+o),dE.setTime(+s),t(fE),t(dE),Math.floor(n(fE,dE))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const Wm=1e3,Dl=Wm*60,Hm=Dl*60,Gm=Hm*24,$8=Gm*7,LA=Dr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Wm)},(t,e)=>(e-t)/Wm,t=>t.getUTCSeconds());LA.range;const W8=Dr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Wm)},(t,e)=>{t.setTime(+t+e*Dl)},(t,e)=>(e-t)/Dl,t=>t.getMinutes());W8.range;const H8=Dr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Dl)},(t,e)=>(e-t)/Dl,t=>t.getUTCMinutes());H8.range;const G8=Dr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Wm-t.getMinutes()*Dl)},(t,e)=>{t.setTime(+t+e*Hm)},(t,e)=>(e-t)/Hm,t=>t.getHours());G8.range;const X8=Dr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Hm)},(t,e)=>(e-t)/Hm,t=>t.getUTCHours());X8.range;const q8=Dr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Dl)/Gm,t=>t.getDate()-1);q8.range;const Y8=Dr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Gm,t=>t.getUTCDate()-1);Y8.range;const Ipe=Dr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Gm,t=>Math.floor(t/Gm));Ipe.range;function Iu(t){return Dr(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())*Dl)/$8)}const K8=Iu(0),Npe=Iu(1),kpe=Iu(2),Lpe=Iu(3),Ope=Iu(4),Dpe=Iu(5),Fpe=Iu(6);K8.range;Npe.range;kpe.range;Lpe.range;Ope.range;Dpe.range;Fpe.range;function Nu(t){return Dr(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)/$8)}const Z8=Nu(0),zpe=Nu(1),Upe=Nu(2),Bpe=Nu(3),jpe=Nu(4),Vpe=Nu(5),$pe=Nu(6);Z8.range;zpe.range;Upe.range;Bpe.range;jpe.range;Vpe.range;$pe.range;const J8=Dr(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());J8.range;const Q8=Dr(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());Q8.range;const OA=Dr(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());OA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Dr(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)});OA.range;const DA=Dr(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());DA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Dr(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)});DA.range;function Wpe(t,e){e.domain&&("nice"in t||"quantiles"in t||"padding"in t,t.domain(e.domain))}function Hpe(t,e){e.range&&("padding"in t,t.range(e.range))}function Gpe(t,e){"align"in t&&"align"in e&&typeof e.align<"u"&&t.align(e.align)}function Xpe(t,e){"base"in t&&"base"in e&&typeof e.base<"u"&&t.base(e.base)}function qpe(t,e){"clamp"in t&&"clamp"in e&&typeof e.clamp<"u"&&t.clamp(e.clamp)}function Ype(t,e){"constant"in t&&"constant"in e&&typeof e.constant<"u"&&t.constant(e.constant)}function Kpe(t,e){"exponent"in t&&"exponent"in e&&typeof e.exponent<"u"&&t.exponent(e.exponent)}var JL={lab:lpe,hcl:cpe,"hcl-long":upe,hsl:spe,"hsl-long":ape,cubehelix:fpe,"cubehelix-long":D_,rgb:SC};function Zpe(t){switch(t){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return JL[t]}var e=t.type,n=t.gamma,r=JL[e];return typeof n>"u"?r:r.gamma(n)}function Jpe(t,e){if("interpolate"in e&&"interpolate"in t&&typeof e.interpolate<"u"){var n=Zpe(e.interpolate);t.interpolate(n)}}var Qpe=new Date(Date.UTC(2020,1,2,3,4,5)),eme="%Y-%m-%d %H:%M";function tme(t){var e=t.tickFormat(1,eme)(Qpe);return e==="2020-02-02 03:04"}var QL={day:q8,hour:G8,minute:W8,month:J8,second:LA,week:K8,year:OA},eO={day:Y8,hour:X8,minute:H8,month:Q8,second:LA,week:Z8,year:DA};function nme(t,e){if("nice"in e&&typeof e.nice<"u"&&"nice"in t){var n=e.nice;if(typeof n=="boolean")n&&t.nice();else if(typeof n=="number")t.nice(n);else{var r=t,i=tme(r);if(typeof n=="string")r.nice(i?eO[n]:QL[n]);else{var o=n.interval,s=n.step,a=(i?eO[o]:QL[o]).every(s);a!=null&&r.nice(a)}}}}function rme(t,e){"padding"in t&&"padding"in e&&typeof e.padding<"u"&&t.padding(e.padding),"paddingInner"in t&&"paddingInner"in e&&typeof e.paddingInner<"u"&&t.paddingInner(e.paddingInner),"paddingOuter"in t&&"paddingOuter"in e&&typeof e.paddingOuter<"u"&&t.paddingOuter(e.paddingOuter)}function ime(t,e){if(e.reverse){var n=t.range().slice().reverse();"padding"in t,t.range(n)}}function ome(t,e){"round"in e&&typeof e.round<"u"&&(e.round&&"interpolate"in e&&typeof e.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",e):"round"in t?t.round(e.round):"interpolate"in t&&e.round&&t.interpolate(IA))}function sme(t,e){"unknown"in t&&"unknown"in e&&typeof e.unknown<"u"&&t.unknown(e.unknown)}function ame(t,e){if("zero"in e&&e.zero===!0){var n=t.domain(),r=n[0],i=n[1],o=i=0)&&(n[i]=t[i]);return n}function Cx(){return Cx=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var n9={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},BA=St.forwardRef(function(t,e){var n=t.className,r=t.top,i=t.left,o=t.offsetLeft,s=o===void 0?10:o,a=t.offsetTop,l=a===void 0?10:a,c=t.style,u=c===void 0?n9:c,f=t.children,h=t.unstyled,m=h===void 0?!1:h,v=t.applyPositionStyle,x=v===void 0?!1:v,y=Mme(t,Sme);return St.createElement("div",Cx({ref:e,className:ls("visx-tooltip",n),style:Cx({top:r==null||l==null?r:r+l,left:i==null||s==null?i:i+s},x&&{position:"absolute"},!m&&u)},y),f)});BA.propTypes={children:Qt.node,className:Qt.string,left:Qt.number,offsetLeft:Qt.number,offsetTop:Qt.number,top:Qt.number,applyPositionStyle:Qt.bool,unstyled:Qt.bool};BA.displayName="Tooltip";function EC(){return EC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function i9(t){var e=t.children;t.getRects;var n=t.left,r=n===void 0?0:n,i=t.offsetLeft,o=i===void 0?10:i,s=t.offsetTop,a=s===void 0?10:s,l=t.parentRect,c=t.rect,u=t.style,f=u===void 0?n9:u,h=t.top,m=h===void 0?0:h,v=t.unstyled,x=v===void 0?!1:v,y=t.nodeRef,g=Pme(t,Ame),b,_=!1,S=!1;if(c&&l){var A=r,P=m;if(l.width){var R=A+o+c.width-l.width,L=c.width-A-o;_=R>0&&R>L}else{var k=A+o+c.width-window.innerWidth,C=c.width-A-o;_=k>0&&k>C}if(l.height){var N=P+a+c.height-l.height,z=c.height-P-a;S=N>0&&N>z}else S=P+a+c.height>window.innerHeight;A=_?A-c.width-o:A+o,P=S?P-c.height-a:P+a,A=Math.round(A),P=Math.round(P),b="translate("+A+"px, "+P+"px)"}return St.createElement(BA,Tx({ref:y,style:Tx({left:0,top:0,transform:b},!x&&f)},g),St.createElement(Rme,{value:{isFlippedVertically:!S,isFlippedHorizontally:!_}},e))}i9.propTypes={nodeRef:Qt.oneOfType([Qt.string,Qt.func,Qt.object])};const Ime=Tme(i9);var Nme=["top","left","transform","className","children","innerRef"];function TC(){return TC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Rg(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.transform,s=t.className,a=t.children,l=t.innerRef,c=kme(t,Nme);return St.createElement("g",TC({ref:l,className:ls("visx-group",s),transform:o||"translate("+i+", "+n+")"},c),a)}Rg.propTypes={top:Qt.number,left:Qt.number,transform:Qt.string,className:Qt.string,children:Qt.node,innerRef:Qt.oneOfType([Qt.string,Qt.func,Qt.object])};var Lme=["from","to","fill","className","innerRef"];function RC(){return RC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Rx(t){var e=t.from,n=e===void 0?{x:0,y:0}:e,r=t.to,i=r===void 0?{x:1,y:1}:r,o=t.fill,s=o===void 0?"transparent":o,a=t.className,l=t.innerRef,c=Ome(t,Lme),u=n.x===i.x||n.y===i.y;return St.createElement("line",RC({ref:l,className:ls("visx-line",a),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:s,shapeRendering:u?"crispEdges":"auto"},c))}var Dme=o9;function o9(t,e,n){t instanceof RegExp&&(t=nO(t,n)),e instanceof RegExp&&(e=nO(e,n));var r=s9(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function nO(t,e){var n=e.match(t);return n?n[0]:null}o9.range=s9;function s9(t,e,n){var r,i,o,s,a,l=n.indexOf(t),c=n.indexOf(e,l+1),u=l;if(l>=0&&c>0){for(r=[],o=n.length;u>=0&&!a;)u==l?(r.push(u),l=n.indexOf(t,u+1)):r.length==1?a=[r.pop(),c]:(i=r.pop(),i=0?l:c;r.length&&(a=[o,s])}return a}var Fme=a9;function a9(t,e,n){t instanceof RegExp&&(t=rO(t,n)),e instanceof RegExp&&(e=rO(e,n));var r=l9(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function rO(t,e){var n=e.match(t);return n?n[0]:null}a9.range=l9;function l9(t,e,n){var r,i,o,s,a,l=n.indexOf(t),c=n.indexOf(e,l+1),u=l;if(l>=0&&c>0){if(t===e)return[l,c];for(r=[],o=n.length;u>=0&&!a;)u==l?(r.push(u),l=n.indexOf(t,u+1)):r.length==1?a=[r.pop(),c]:(i=r.pop(),i=0?l:c;r.length&&(a=[o,s])}return a}var zme=Fme,Ume=c9;function c9(t,e,n){var r=t;return Bme(t,e).reduce(function(i,o){return i.replace(o.functionIdentifier+"("+o.matches.body+")",jme(o.matches.body,o.functionIdentifier,n,r,e))},t)}function Bme(t,e){var n=[],r=typeof e=="string"?new RegExp("\\b("+e+")\\("):e;do{var i=r.exec(t);if(!i)return n;if(i[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+e);var o=i[1],s=i.index,a=zme("(",")",t.substring(s));if(!a||a.start!==i[0].length-1)throw new SyntaxError(o+"(): missing closing ')' in the value '"+t+"'");n.push({matches:a,functionIdentifier:o}),t=a.post}while(r.test(t));return n}function jme(t,e,n,r,i){return n(c9(t,i,n),e,r)}var ii=function(t){this.value=t};ii.math={isDegree:!0,acos:function(t){return ii.math.isDegree?180/Math.PI*Math.acos(t):Math.acos(t)},add:function(t,e){return t+e},asin:function(t){return ii.math.isDegree?180/Math.PI*Math.asin(t):Math.asin(t)},atan:function(t){return ii.math.isDegree?180/Math.PI*Math.atan(t):Math.atan(t)},acosh:function(t){return Math.log(t+Math.sqrt(t*t-1))},asinh:function(t){return Math.log(t+Math.sqrt(t*t+1))},atanh:function(t){return Math.log((1+t)/(1-t))},C:function(t,e){var n=1,r=t-e,i=e;isi.length-2?si.length-1:t.length-s;i>0;i--)if(si[i]!==void 0)for(o=0;o0&&cr)s.push(e);else{for(;r>=i&&!c||c&&i"u"?e[e.length-1].value.push(o[a]):e[e.length-1].value=o[a].value(e[e.length-1].value);else if(o[a].type===7)typeof e[e.length-1].type>"u"?e[e.length-1].value.push(o[a]):e[e.length-1].value=o[a].value(e[e.length-1].value);else if(o[a].type===8){for(var l=[],c=0;c"u"?(r.value=r.concat(n),r.value.push(o[a]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(o[a]),e.push(n)):e.push({type:1,value:o[a].value(r.value,n.value)})):o[a].type===2||o[a].type===9?(n=e.pop(),r=e.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(o[a]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(o[a]),e.push(n)):e.push({type:1,value:o[a].value(r.value,n.value)})):o[a].type===12?(n=e.pop(),typeof n.type<"u"&&(n=[n]),r=e.pop(),i=e.pop(),e.push({type:1,value:o[a].value(i.value,r.value,new $p(n))})):o[a].type===13&&(s?e.push({value:t[o[a].value],type:3}):e.push([o[a]]));if(e.length>1)throw new $p.Exception("Uncaught Syntax error");return e[0].value>1e15?"Infinity":parseFloat(e[0].value.toFixed(15))};$p.eval=function(t,e,n){return typeof e>"u"?this.lex(t).toPostfix().postfixEval():typeof n>"u"?typeof e.length<"u"?this.lex(t,e).toPostfix().postfixEval():this.lex(t).toPostfix().postfixEval(e):this.lex(t,e).toPostfix().postfixEval(n)};var Kme=$p,f9=Kme;f9.prototype.formulaEval=function(){for(var t,e,n,r=[],i=this.value,o=0;o"+e.value+""+i[o].show+""+t.value+"",type:10}):r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+""+t.value+"",type:1})):i[o].type===2||i[o].type===9?(t=r.pop(),e=r.pop(),r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+i[o].show+(t.type!=1?"(":"")+t.value+(t.type!=1?")":""),type:i[o].type})):i[o].type===12&&(t=r.pop(),e=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+e.value+","+t.value+")",type:12}));return r[0].value};var Zme=f9,Jme=Dme,Qme=Ume,ege=Zme,tge=100,nge=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,fE,rge=ige;function ige(t,e){fE=0,e=Math.pow(10,e===void 0?5:e),t=t.replace(/\n+/g," ");function n(i,o,s){if(fE++>tge)throw fE=0,new Error("Call stack overflow for "+s);if(i==="")throw new Error(o+"(): '"+s+"' must contain a non-whitespace string");i=r(i,s);var a=oge(i);if(a.length>1||i.indexOf("var(")>-1)return o+"("+i+")";var l=a[0]||"";l==="%"&&(i=i.replace(/\b[0-9\.]+%/g,function(f){return parseFloat(f.slice(0,-1))*.01}));var c=i.replace(new RegExp(l,"gi"),""),u;try{u=ege.eval(c)}catch{return o+"("+i+")"}return l==="%"&&(u*=100),(o.length||l==="%")&&(u=Math.round(u*e)/e),u+=l,u}function r(i,o){i=i.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var s="",a=i,l;l=nge.exec(a);){l[0].index>0&&(s+=a.substring(0,l[0].index));var c=Jme("(",")",a.substring([0].index));if(c.body==="")throw new Error("'"+i+"' must contain a non-whitespace string");var u=n(c.body,"",o);s+=c.pre+u,a=c.post}return s+a}return Qme(t,/((?:\-[a-z]+\-)?calc)\(/,n)}function oge(t){for(var e=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(t);i;)!i||!i[1]||(n.indexOf(i[1].toLowerCase())===-1&&(e.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(t));return e}const dE=Xs(rge);var sge=typeof D0=="object"&&D0&&D0.Object===Object&&D0,age=sge,lge=age,cge=typeof self=="object"&&self&&self.Object===Object&&self,uge=lge||cge||Function("return this")(),jA=uge,fge=jA,dge=fge.Symbol,d9=dge,iO=d9,h9=Object.prototype,hge=h9.hasOwnProperty,pge=h9.toString,cp=iO?iO.toStringTag:void 0;function mge(t){var e=hge.call(t,cp),n=t[cp];try{t[cp]=void 0;var r=!0}catch{}var i=pge.call(t);return r&&(e?t[cp]=n:delete t[cp]),i}var gge=mge,vge=Object.prototype,yge=vge.toString;function xge(t){return yge.call(t)}var bge=xge,oO=d9,_ge=gge,wge=bge,Sge="[object Null]",Mge="[object Undefined]",sO=oO?oO.toStringTag:void 0;function Ege(t){return t==null?t===void 0?Mge:Sge:sO&&sO in Object(t)?_ge(t):wge(t)}var Cge=Ege;function Tge(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var p9=Tge,Rge=Cge,Age=p9,Pge="[object AsyncFunction]",Ige="[object Function]",Nge="[object GeneratorFunction]",kge="[object Proxy]";function Lge(t){if(!Age(t))return!1;var e=Rge(t);return e==Ige||e==Nge||e==Pge||e==kge}var Oge=Lge,Dge=jA,Fge=Dge["__core-js_shared__"],zge=Fge,hE=zge,aO=function(){var t=/[^.]+$/.exec(hE&&hE.keys&&hE.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Uge(t){return!!aO&&aO in t}var Bge=Uge,jge=Function.prototype,Vge=jge.toString;function $ge(t){if(t!=null){try{return Vge.call(t)}catch{}try{return t+""}catch{}}return""}var Wge=$ge,Hge=Oge,Gge=Bge,Xge=p9,qge=Wge,Yge=/[\\^$.*+?()[\]{}|]/g,Kge=/^\[object .+?Constructor\]$/,Zge=Function.prototype,Jge=Object.prototype,Qge=Zge.toString,e0e=Jge.hasOwnProperty,t0e=RegExp("^"+Qge.call(e0e).replace(Yge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function n0e(t){if(!Xge(t)||Gge(t))return!1;var e=Hge(t)?t0e:Kge;return e.test(qge(t))}var r0e=n0e;function i0e(t,e){return t==null?void 0:t[e]}var o0e=i0e,s0e=r0e,a0e=o0e;function l0e(t,e){var n=a0e(t,e);return s0e(n)?n:void 0}var m9=l0e,c0e=m9,u0e=c0e(Object,"create"),F_=u0e,lO=F_;function f0e(){this.__data__=lO?lO(null):{},this.size=0}var d0e=f0e;function h0e(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var p0e=h0e,m0e=F_,g0e="__lodash_hash_undefined__",v0e=Object.prototype,y0e=v0e.hasOwnProperty;function x0e(t){var e=this.__data__;if(m0e){var n=e[t];return n===g0e?void 0:n}return y0e.call(e,t)?e[t]:void 0}var b0e=x0e,_0e=F_,w0e=Object.prototype,S0e=w0e.hasOwnProperty;function M0e(t){var e=this.__data__;return _0e?e[t]!==void 0:S0e.call(e,t)}var E0e=M0e,C0e=F_,T0e="__lodash_hash_undefined__";function R0e(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=C0e&&e===void 0?T0e:e,this}var A0e=R0e,P0e=d0e,I0e=p0e,N0e=b0e,k0e=E0e,L0e=A0e;function oh(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}var J0e=Z0e,Q0e=z_;function eve(t,e){var n=this.__data__,r=Q0e(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var tve=eve,nve=F0e,rve=G0e,ive=Y0e,ove=J0e,sve=tve;function sh(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e=0)&&(n[i]=t[i]);return n}function pE(t){return typeof t=="number"}function dO(t){return typeof t=="number"&&Number.isFinite(t)||typeof t=="string"}function Wve(t){var e=t.verticalAnchor,n=e===void 0?"end":e,r=t.scaleToFit,i=r===void 0?!1:r,o=t.angle,s=t.width,a=t.lineHeight,l=a===void 0?"1em":a,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.children,h=t.style,m=$ve(t,Vve),v=m.x,x=v===void 0?0:v,y=m.y,g=y===void 0?0:y,b=!dO(x)||!dO(g),_=T.useMemo(function(){var k=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:k.map(function(C){return{word:C,wordWidth:fO(C,h)||0}}),spaceWidth:fO(" ",h)||0}},[f,h]),S=_.wordsWithWidth,A=_.spaceWidth,P=T.useMemo(function(){return b?[]:s||i?S.reduce(function(k,C){var N=C.word,z=C.wordWidth,D=k[k.length-1];if(D&&(s==null||i||(D.width||0)+z+A0){var C=P[0].width||1,N=i==="shrink-only"?Math.min(s/C,1):s/C,z=N,D=x-N*x,B=g-z*g;k.push("matrix("+N+", 0, 0, "+z+", "+D+", "+B+")")}return o&&k.push("rotate("+o+", "+x+", "+g+")"),k.length>0?k.join(" "):""},[b,x,g,s,i,P,o]);return{wordsByLines:P,startDy:R,transform:L}}var Hve=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function IC(){return IC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var Xve={overflow:"visible"};function v9(t){var e=t.dx,n=e===void 0?0:e,r=t.dy,i=r===void 0?0:r,o=t.textAnchor,s=o===void 0?"start":o,a=t.innerRef,l=t.innerTextRef;t.verticalAnchor,t.angle;var c=t.lineHeight,u=c===void 0?"1em":c;t.scaleToFit,t.capHeight,t.width;var f=Gve(t,Hve),h=f.x,m=h===void 0?0:h,v=f.fontSize,x=Wve(t),y=x.wordsByLines,g=x.startDy,b=x.transform;return St.createElement("svg",{ref:a,x:n,y:i,fontSize:v,style:Xve},y.length>0?St.createElement("text",IC({ref:l,transform:b},f,{textAnchor:s}),y.map(function(_,S){return St.createElement("tspan",{key:S,x:m,dy:S===0?g:u},_.words.join(" "))})):null)}var Ji={top:"top",left:"left",right:"right",bottom:"bottom"};function qve(t){var e=t.labelOffset,n=t.labelProps,r=t.orientation,i=t.range,o=t.tickLabelFontSize,s=t.tickLength,a=r===Ji.left||r===Ji.top?-1:1,l,c,u;if(r===Ji.top||r===Ji.bottom){var f=r===Ji.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,c=a*(s+e+o+f)}else l=a*((Number(i[0])+Number(i[i.length-1]))/2),c=-(s+e),u="rotate("+a*90+")";return{x:l,y:c,transform:u}}function Wp(){return Wp=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function y9(t){var e=t.children,n=e===void 0?Kve:e,r=t.axisClassName,i=t.hideAxisLine,o=i===void 0?!1:i,s=t.hideTicks,a=s===void 0?!1:s,l=t.hideZero,c=l===void 0?!1:l,u=t.innerRef,f=t.left,h=f===void 0?0:f,m=t.numTicks,v=m===void 0?10:m,x=t.orientation,y=x===void 0?Ji.bottom:x,g=t.rangePadding,b=g===void 0?0:g,_=t.scale,S=t.tickFormat,A=t.tickLength,P=A===void 0?8:A,R=t.tickValues,L=t.top,k=L===void 0?0:L,C=tye(t,eye),N=S??Jve(_),z=y===Ji.left,D=y===Ji.top,B=D||y===Ji.bottom,G=Zve(_),X=z||D?-1:1,Z=_.range(),F=Qve(b),q=sy({x:Number(Z[0])+.5-F.start,y:0},B),K=sy({x:Number(Z[Z.length-1])+.5+F.end,y:0},B),Q=(R??UA(_,v)).filter(function(fe){return!c||fe!==0&&fe!=="0"}).map(function(fe,J){return{value:fe,index:J}}),de=Q.map(function(fe){var J=fe.value,ce=fe.index,_e=zA(G(J));return{value:J,index:ce,from:sy({x:_e,y:0},B),to:sy({x:_e,y:P*X},B),formattedValue:N(J,ce,Q)}});return St.createElement(Rg,{className:ls("visx-axis",r),innerRef:u,top:k,left:h},n(kC({},C,{axisFromPoint:q,axisToPoint:K,hideAxisLine:o,hideTicks:a,hideZero:c,horizontal:B,numTicks:v,orientation:y,rangePadding:b,scale:_,tickFormat:N,tickLength:P,tickPosition:G,tickSign:X,ticks:de})))}var nye=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Ax(){return Ax=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var iye={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function oye(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?36:n,i=t.tickLength,o=i===void 0?8:i,s=t.tickLabelProps,a=rye(t,nye),l=typeof s=="function"?s:Ax({},iye,s);return St.createElement(y9,Ax({axisClassName:ls("visx-axis-left",e),labelOffset:r,orientation:Ji.left,tickLabelProps:l,tickLength:o},a))}var sye=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Px(){return Px=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var lye={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function cye(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?8:n,i=t.tickLength,o=i===void 0?8:i,s=t.tickLabelProps,a=aye(t,sye),l=typeof s=="function"?s:Px({},lye,s);return St.createElement(y9,Px({axisClassName:ls("visx-axis-bottom",e),labelOffset:r,orientation:Ji.bottom,tickLabelProps:l,tickLength:o},a))}var x9=pye,uye=b9(T),fye=b9(t9),dye=["from","to","fill","className","innerRef"];function b9(t){return t&&t.__esModule?t:{default:t}}function LC(){return LC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function pye(t){var e=t.from,n=e===void 0?{x:0,y:0}:e,r=t.to,i=r===void 0?{x:1,y:1}:r,o=t.fill,s=o===void 0?"transparent":o,a=t.className,l=t.innerRef,c=hye(t,dye),u=n.x===i.x||n.y===i.y;return uye.default.createElement("line",LC({ref:l,className:(0,fye.default)("visx-line",a),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:s,shapeRendering:u?"crispEdges":"auto"},c))}function _9(t){return"bandwidth"in t?t.bandwidth():0}var mye=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function OC(){return OC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function w9(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.scale,s=t.width,a=t.stroke,l=a===void 0?"#eaf0f6":a,c=t.strokeWidth,u=c===void 0?1:c,f=t.strokeDasharray,h=t.className,m=t.children,v=t.numTicks,x=v===void 0?10:v,y=t.lineStyle,g=t.offset,b=t.tickValues,_=gye(t,mye),S=b??UA(o,x),A=(g??0)+_9(o)/2,P=S.map(function(R,L){var k,C=((k=zA(o(R)))!=null?k:0)+A;return{index:L,from:new Xm({x:0,y:C}),to:new Xm({x:s,y:C})}});return St.createElement(Rg,{className:ls("visx-rows",h),top:n,left:i},m?m({lines:P}):P.map(function(R){var L=R.from,k=R.to,C=R.index;return St.createElement(x9,OC({key:"row-line-"+C,from:L,to:k,stroke:l,strokeWidth:u,strokeDasharray:f,style:y},_))}))}w9.propTypes={tickValues:Qt.array,width:Qt.number.isRequired};var vye=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function DC(){return DC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function S9(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.scale,s=t.height,a=t.stroke,l=a===void 0?"#eaf0f6":a,c=t.strokeWidth,u=c===void 0?1:c,f=t.strokeDasharray,h=t.className,m=t.numTicks,v=m===void 0?10:m,x=t.lineStyle,y=t.offset,g=t.tickValues,b=t.children,_=yye(t,vye),S=g??UA(o,v),A=(y??0)+_9(o)/2,P=S.map(function(R,L){var k,C=((k=zA(o(R)))!=null?k:0)+A;return{index:L,from:new Xm({x:C,y:0}),to:new Xm({x:C,y:s})}});return St.createElement(Rg,{className:ls("visx-columns",h),top:n,left:i},b?b({lines:P}):P.map(function(R){var L=R.from,k=R.to,C=R.index;return St.createElement(x9,DC({key:"column-line-"+C,from:L,to:k,stroke:l,strokeWidth:u,strokeDasharray:f,style:x},_))}))}S9.propTypes={tickValues:Qt.array,height:Qt.number.isRequired};function fn(t){for(var e=t.length/6|0,n=new Array(e),r=0;rZhe(t[t.length-1]);var xye=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(fn);const bye=xn(xye);var _ye=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(fn);const wye=xn(_ye);var Sye=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(fn);const Mye=xn(Sye);var Eye=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(fn);const Cye=xn(Eye);var Tye=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(fn);const Rye=xn(Tye);var Aye=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(fn);const Pye=xn(Aye);var Iye=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(fn);const Nye=xn(Iye);var kye=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(fn);const Lye=xn(kye);var Oye=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(fn);const Dye=xn(Oye);var Fye=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(fn);const zye=xn(Fye);var Uye=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(fn);const Bye=xn(Uye);var jye=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(fn);const Vye=xn(jye);var $ye=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(fn);const Wye=xn($ye);var Hye=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(fn);const Gye=xn(Hye);var Xye=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(fn);const qye=xn(Xye);var Yye=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(fn);const Kye=xn(Yye);var Zye=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(fn);const Jye=xn(Zye);var Qye=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(fn);const e1e=xn(Qye);var t1e=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(fn);const n1e=xn(t1e);var r1e=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(fn);const i1e=xn(r1e);var o1e=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(fn);const s1e=xn(o1e);var a1e=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(fn);const l1e=xn(a1e);var c1e=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(fn);const u1e=xn(c1e);var f1e=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(fn);const d1e=xn(f1e);var h1e=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(fn);const p1e=xn(h1e);var m1e=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(fn);const g1e=xn(m1e);var v1e=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(fn);const y1e=xn(v1e);function x1e(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const b1e=L_(Hs(300,.5,0),Hs(-240,.5,1));var _1e=L_(Hs(-100,.75,.35),Hs(80,1.5,.8)),w1e=L_(Hs(260,.75,.35),Hs(80,1.5,.8)),ay=Hs();function S1e(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return ay.h=360*t-100,ay.s=1.5-1.5*e,ay.l=.8-.9*e,ay+""}var ly=Ol(),M1e=Math.PI/3,E1e=Math.PI*2/3;function C1e(t){var e;return t=(.5-t)*Math.PI,ly.r=255*(e=Math.sin(t))*e,ly.g=255*(e=Math.sin(t+M1e))*e,ly.b=255*(e=Math.sin(t+E1e))*e,ly+""}function T1e(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function B_(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const R1e=B_(fn("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var A1e=B_(fn("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),P1e=B_(fn("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),I1e=B_(fn("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function $A(t,e=0,n=[]){return T.Children.toArray(t).reduce((r,i,o)=>(U2.isFragment(i)?r.push.apply(r,$A(i.props.children,e+1,n.concat(i.key||o))):T.isValidElement(i)?r.push(T.cloneElement(i,{key:n.concat(String(i.key)).join(".")})):(typeof i=="string"||typeof i=="number")&&r.push(i),r),[])}function j_(){return typeof window<"u"}function lh(t){return M9(t)?(t.nodeName||"").toLowerCase():"#document"}function io(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Qs(t){var e;return(e=(M9(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function M9(t){return j_()?t instanceof Node||t instanceof io(t).Node:!1}function ci(t){return j_()?t instanceof Element||t instanceof io(t).Element:!1}function ao(t){return j_()?t instanceof HTMLElement||t instanceof io(t).HTMLElement:!1}function FC(t){return!j_()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof io(t).ShadowRoot}function Ag(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=cs(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function N1e(t){return["table","td","th"].includes(lh(t))}function V_(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function WA(t){const e=HA(),n=ci(t)?cs(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function k1e(t){let e=Fl(t);for(;ao(e)&&!Od(e);){if(WA(e))return e;if(V_(e))return null;e=Fl(e)}return null}function HA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Od(t){return["html","body","#document"].includes(lh(t))}function cs(t){return io(t).getComputedStyle(t)}function $_(t){return ci(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Fl(t){if(lh(t)==="html")return t;const e=t.assignedSlot||t.parentNode||FC(t)&&t.host||Qs(t);return FC(e)?e.host:e}function E9(t){const e=Fl(t);return Od(e)?t.ownerDocument?t.ownerDocument.body:t.body:ao(e)&&Ag(e)?e:E9(e)}function qm(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=E9(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=io(i);if(o){const a=zC(s);return e.concat(s,s.visualViewport||[],Ag(i)?i:[],a&&n?qm(a):[])}return e.concat(i,qm(i,[],n))}function zC(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function pO(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function L1e(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&FC(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function C9(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function T9(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function O1e(t){return t.mozInputSource===0&&t.isTrusted?!0:UC()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function D1e(t){return U1e()?!1:!UC()&&t.width===0&&t.height===0||UC()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function F1e(){return/apple/i.test(navigator.vendor)}function UC(){const t=/android/i;return t.test(C9())||t.test(T9())}function z1e(){return C9().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function U1e(){return T9().includes("jsdom/")}function mO(t,e){return["mouse","pen"].includes(t)}function B1e(t){return(t==null?void 0:t.ownerDocument)||document}const j1e="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function R9(t){return ao(t)&&t.matches(j1e)}function Eo(t){t.preventDefault(),t.stopPropagation()}function V1e(t){return t?t.getAttribute("role")==="combobox"&&R9(t):!1}const Dd=Math.min,Ki=Math.max,Ix=Math.round,Zf=Math.floor,Vs=t=>({x:t,y:t});function gO(t,e,n){return Ki(t,Dd(e,n))}function W_(t,e){return typeof t=="function"?t(e):t}function Pg(t){return t.split("-")[0]}function GA(t){return t.split("-")[1]}function A9(t){return t==="x"?"y":"x"}function $1e(t){return t==="y"?"height":"width"}function Ig(t){return["top","bottom"].includes(Pg(t))?"y":"x"}function W1e(t){return A9(Ig(t))}function H1e(t){return{top:0,right:0,bottom:0,left:0,...t}}function G1e(t){return typeof t!="number"?H1e(t):{top:t,right:t,bottom:t,left:t}}function Nx(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function vO(t,e,n){let{reference:r,floating:i}=t;const o=Ig(e),s=W1e(e),a=$1e(s),l=Pg(e),c=o==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let m;switch(l){case"top":m={x:u,y:r.y-i.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-i.width,y:f};break;default:m={x:r.x,y:r.y}}switch(GA(e)){case"start":m[s]-=h*(n&&c?-1:1);break;case"end":m[s]+=h*(n&&c?-1:1);break}return m}const X1e=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=vO(c,r,l),h=r,m={},v=0;for(let x=0;x{let{x:g,y:b}=y;return{x:g,y:b}}},...l}=W_(t,e),c={x:n,y:r},u=await P9(e,l),f=Ig(Pg(i)),h=A9(f);let m=c[h],v=c[f];if(o){const y=h==="y"?"top":"left",g=h==="y"?"bottom":"right",b=m+u[y],_=m-u[g];m=gO(b,m,_)}if(s){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=v+u[y],_=v-u[g];v=gO(b,v,_)}const x=a.fn({...e,[h]:m,[f]:v});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[h]:o,[f]:s}}}}}},Z1e=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:o,platform:s,elements:a}=e,{apply:l=()=>{},...c}=W_(t,e),u=await P9(e,c),f=Pg(i),h=GA(i),m=Ig(i)==="y",{width:v,height:x}=o.floating;let y,g;f==="top"||f==="bottom"?(y=f,g=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=f,y=h==="end"?"top":"bottom");const b=x-u.top-u.bottom,_=v-u.left-u.right,S=Dd(x-u[y],b),A=Dd(v-u[g],_),P=!e.middlewareData.shift;let R=S,L=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(L=_),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(R=b),P&&!h){const C=Ki(u.left,0),N=Ki(u.right,0),z=Ki(u.top,0),D=Ki(u.bottom,0);m?L=v-2*(C!==0||N!==0?C+N:Ki(u.left,u.right)):R=x-2*(z!==0||D!==0?z+D:Ki(u.top,u.bottom))}await l({...e,availableWidth:L,availableHeight:R});const k=await s.getDimensions(a.floating);return v!==k.width||x!==k.height?{reset:{rects:!0}}:{}}}};function I9(t){const e=cs(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=ao(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Ix(n)!==o||Ix(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function XA(t){return ci(t)?t:t.contextElement}function dd(t){const e=XA(t);if(!ao(e))return Vs(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=I9(e);let s=(o?Ix(n.width):n.width)/r,a=(o?Ix(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const J1e=Vs(0);function N9(t){const e=io(t);return!HA()||!e.visualViewport?J1e:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Q1e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==io(t)?!1:e}function gu(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=XA(t);let s=Vs(1);e&&(r?ci(r)&&(s=dd(r)):s=dd(t));const a=Q1e(o,n,r)?N9(o):Vs(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,f=i.height/s.y;if(o){const h=io(o),m=r&&ci(r)?io(r):r;let v=h,x=zC(v);for(;x&&r&&m!==v;){const y=dd(x),g=x.getBoundingClientRect(),b=cs(x),_=g.left+(x.clientLeft+parseFloat(b.paddingLeft))*y.x,S=g.top+(x.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=_,c+=S,v=io(x),x=zC(v)}}return Nx({width:u,height:f,x:l,y:c})}function qA(t,e){const n=$_(t).scrollLeft;return e?e.left+n:gu(Qs(t)).left+n}function k9(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:qA(t,r)),o=r.top+e.scrollTop;return{x:i,y:o}}function exe(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=Qs(r),a=e?V_(e.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Vs(1);const u=Vs(0),f=ao(r);if((f||!f&&!o)&&((lh(r)!=="body"||Ag(s))&&(l=$_(r)),ao(r))){const m=gu(r);c=dd(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const h=s&&!f&&!o?k9(s,l,!0):Vs(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function txe(t){return Array.from(t.getClientRects())}function nxe(t){const e=Qs(t),n=$_(t),r=t.ownerDocument.body,i=Ki(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Ki(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+qA(t);const a=-n.scrollTop;return cs(r).direction==="rtl"&&(s+=Ki(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function rxe(t,e){const n=io(t),r=Qs(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const c=HA();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}function ixe(t,e){const n=gu(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=ao(t)?dd(t):Vs(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:s,height:a,x:l,y:c}}function yO(t,e,n){let r;if(e==="viewport")r=rxe(t,n);else if(e==="document")r=nxe(Qs(t));else if(ci(e))r=ixe(e,n);else{const i=N9(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Nx(r)}function L9(t,e){const n=Fl(t);return n===e||!ci(n)||Od(n)?!1:cs(n).position==="fixed"||L9(n,e)}function oxe(t,e){const n=e.get(t);if(n)return n;let r=qm(t,[],!1).filter(a=>ci(a)&&lh(a)!=="body"),i=null;const o=cs(t).position==="fixed";let s=o?Fl(t):t;for(;ci(s)&&!Od(s);){const a=cs(s),l=WA(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ag(s)&&!l&&L9(t,s))?r=r.filter(u=>u!==s):i=a,s=Fl(s)}return e.set(t,r),r}function sxe(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const s=[...n==="clippingAncestors"?V_(e)?[]:oxe(e,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=yO(e,u,i);return c.top=Ki(f.top,c.top),c.right=Dd(f.right,c.right),c.bottom=Dd(f.bottom,c.bottom),c.left=Ki(f.left,c.left),c},yO(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function axe(t){const{width:e,height:n}=I9(t);return{width:e,height:n}}function lxe(t,e,n){const r=ao(e),i=Qs(e),o=n==="fixed",s=gu(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Vs(0);if(r||!r&&!o)if((lh(e)!=="body"||Ag(i))&&(a=$_(e)),r){const h=gu(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&(l.x=qA(i));const c=i&&!r&&!o?k9(i,a):Vs(0),u=s.left+a.scrollLeft-l.x-c.x,f=s.top+a.scrollTop-l.y-c.y;return{x:u,y:f,width:s.width,height:s.height}}function gE(t){return cs(t).position==="static"}function xO(t,e){if(!ao(t)||cs(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Qs(t)===n&&(n=n.ownerDocument.body),n}function O9(t,e){const n=io(t);if(V_(t))return n;if(!ao(t)){let i=Fl(t);for(;i&&!Od(i);){if(ci(i)&&!gE(i))return i;i=Fl(i)}return n}let r=xO(t,e);for(;r&&N1e(r)&&gE(r);)r=xO(r,e);return r&&Od(r)&&gE(r)&&!WA(r)?n:r||k1e(t)||n}const cxe=async function(t){const e=this.getOffsetParent||O9,n=this.getDimensions,r=await n(t.floating);return{reference:lxe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uxe(t){return cs(t).direction==="rtl"}const fxe={convertOffsetParentRelativeRectToViewportRelativeRect:exe,getDocumentElement:Qs,getClippingRect:sxe,getOffsetParent:O9,getElementRects:cxe,getClientRects:txe,getDimensions:axe,getScale:dd,isElement:ci,isRTL:uxe};function dxe(t,e){let n=null,r;const i=Qs(t);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:c,top:u,width:f,height:h}=t.getBoundingClientRect();if(a||e(),!f||!h)return;const m=Zf(u),v=Zf(i.clientWidth-(c+f)),x=Zf(i.clientHeight-(u+h)),y=Zf(c),b={rootMargin:-m+"px "+-v+"px "+-x+"px "+-y+"px",threshold:Ki(0,Dd(1,l))||1};let _=!0;function S(A){const P=A[0].intersectionRatio;if(P!==l){if(!_)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}_=!1}try{n=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(t)}return s(!0),o}function YA(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=XA(t),u=i||o?[...c?qm(c):[],...qm(e)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const f=c&&a?dxe(c,n):null;let h=-1,m=null;s&&(m=new ResizeObserver(g=>{let[b]=g;b&&b.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var _;(_=m)==null||_.observe(e)})),n()}),c&&!l&&m.observe(c),m.observe(e));let v,x=l?gu(t):null;l&&y();function y(){const g=gu(t);x&&(g.x!==x.x||g.y!==x.y||g.width!==x.width||g.height!==x.height)&&n(),x=g,v=requestAnimationFrame(y)}return n(),()=>{var g;u.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),f==null||f(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(v)}}const hxe=Y1e,pxe=K1e,mxe=Z1e,gxe=(t,e,n)=>{const r=new Map,i={platform:fxe,...n},o={...i.platform,_c:r};return X1e(t,e,{...i,platform:o})};var Vy=typeof document<"u"?T.useLayoutEffect:T.useEffect;function kx(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!kx(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!kx(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function D9(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function bO(t,e){const n=D9(t);return Math.round(e*n)/n}function vE(t){const e=T.useRef(t);return Vy(()=>{e.current=t}),e}function vxe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=T.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,m]=T.useState(r);kx(h,r)||m(r);const[v,x]=T.useState(null),[y,g]=T.useState(null),b=T.useCallback(F=>{F!==P.current&&(P.current=F,x(F))},[]),_=T.useCallback(F=>{F!==R.current&&(R.current=F,g(F))},[]),S=o||v,A=s||y,P=T.useRef(null),R=T.useRef(null),L=T.useRef(u),k=l!=null,C=vE(l),N=vE(i),z=vE(c),D=T.useCallback(()=>{if(!P.current||!R.current)return;const F={placement:e,strategy:n,middleware:h};N.current&&(F.platform=N.current),gxe(P.current,R.current,F).then(q=>{const K={...q,isPositioned:z.current!==!1};B.current&&!kx(L.current,K)&&(L.current=K,Vl.flushSync(()=>{f(K)}))})},[h,e,n,N,z]);Vy(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[c]);const B=T.useRef(!1);Vy(()=>(B.current=!0,()=>{B.current=!1}),[]),Vy(()=>{if(S&&(P.current=S),A&&(R.current=A),S&&A){if(C.current)return C.current(S,A,D);D()}},[S,A,D,C,k]);const G=T.useMemo(()=>({reference:P,floating:R,setReference:b,setFloating:_}),[b,_]),X=T.useMemo(()=>({reference:S,floating:A}),[S,A]),Z=T.useMemo(()=>{const F={position:n,left:0,top:0};if(!X.floating)return F;const q=bO(X.floating,u.x),K=bO(X.floating,u.y);return a?{...F,transform:"translate("+q+"px, "+K+"px)",...D9(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:K}},[n,a,X.floating,u.x,u.y]);return T.useMemo(()=>({...u,update:D,refs:G,elements:X,floatingStyles:Z}),[u,D,G,X,Z])}const KA=(t,e)=>({...hxe(t),options:[t,e]}),ZA=(t,e)=>({...pxe(t),options:[t,e]}),yxe=(t,e)=>({...mxe(t),options:[t,e]}),F9={...Yp},xxe=F9.useInsertionEffect,bxe=xxe||(t=>t());function BC(t){const e=T.useRef(()=>{});return bxe(()=>{e.current=t}),T.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i=t.current.length}function yE(t,e){return qr(t,{disabledIndices:e})}function _O(t,e){return qr(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function qr(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=e===void 0?{}:e;const s=t.current,a=i?c=>i.includes(c):c=>{const u=s[c];return u==null||u.hasAttribute("disabled")||u.getAttribute("aria-disabled")==="true"};let l=n;do l+=r?-o:o;while(l>=0&&l<=s.length-1&&a(l));return l}function _xe(t,e){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=e,f=c;if(n.key===JA){if(u&&Eo(n),c===-1)f=l;else if(f=qr(t,{startingIndex:f,amount:o,decrement:!0,disabledIndices:s}),i&&(c-oh?v:v-o}Gp(t,f)&&(f=c)}if(n.key===Ng&&(u&&Eo(n),c===-1?f=a:(f=qr(t,{startingIndex:c,amount:o,disabledIndices:s}),i&&c+o>l&&(f=qr(t,{startingIndex:c%o-o,amount:o,disabledIndices:s}))),Gp(t,f)&&(f=c)),r==="both"){const h=Zf(c/o);n.key===ch&&(u&&Eo(n),c%o!==o-1?(f=qr(t,{startingIndex:c,disabledIndices:s}),i&&cy(f,o,h)&&(f=qr(t,{startingIndex:c-c%o-1,disabledIndices:s}))):i&&(f=qr(t,{startingIndex:c-c%o-1,disabledIndices:s})),cy(f,o,h)&&(f=c)),n.key===Fd&&(u&&Eo(n),c%o!==0?(f=qr(t,{startingIndex:c,disabledIndices:s,decrement:!0}),i&&cy(f,o,h)&&(f=qr(t,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:s}))):i&&(f=qr(t,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:s})),cy(f,o,h)&&(f=c));const m=Zf(l/o)===h;Gp(t,f)&&(i&&m?f=n.key===Fd?l:qr(t,{startingIndex:c-c%o-1,disabledIndices:s}):f=c)}return f}function wxe(t,e,n){const r=[];let i=0;return t.forEach((o,s)=>{let{width:a,height:l}=o,c=!1;for(n&&(i=0);!c;){const u=[];for(let f=0;fr[f]==null)?(u.forEach(f=>{r[f]=s}),c=!0):i++}}),[...r]}function Sxe(t,e,n,r,i){if(t===-1)return-1;const o=n.indexOf(t);switch(i){case"tl":return o;case"tr":return o+e[t].width-1;case"bl":return o+(e[t].height-1)*r;case"br":return n.lastIndexOf(t)}}function Mxe(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}let wO=0;function SO(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=e;r&&cancelAnimationFrame(wO);const o=()=>t==null?void 0:t.focus({preventScroll:n});i?o():wO=requestAnimationFrame(o)}var Mi=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Exe(t,e){const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function Cxe(t,e){if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(r!==e.get(n))return!1;return!0}const z9=T.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Txe(t){const{children:e,elementsRef:n,labelsRef:r}=t,[i,o]=T.useState(()=>new Map),s=T.useCallback(l=>{o(c=>new Map(c).set(l,null))},[]),a=T.useCallback(l=>{o(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Mi(()=>{const l=new Map(i);Array.from(l.keys()).sort(Exe).forEach((u,f)=>{l.set(u,f)}),Cxe(i,l)||o(l)},[i]),T.createElement(z9.Provider,{value:T.useMemo(()=>({register:s,unregister:a,map:i,elementsRef:n,labelsRef:r}),[s,a,i,n,r])},e)}function Rxe(t){t===void 0&&(t={});const{label:e}=t,{register:n,unregister:r,map:i,elementsRef:o,labelsRef:s}=T.useContext(z9),[a,l]=T.useState(null),c=T.useRef(null),u=T.useCallback(f=>{if(c.current=f,a!==null&&(o.current[a]=f,s)){var h;const m=e!==void 0;s.current[a]=m?e:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,o,s,e]);return Mi(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),Mi(()=>{const f=c.current?i.get(c.current):null;f!=null&&l(f)},[i]),T.useMemo(()=>({ref:u,index:a??-1}),[a,u])}let MO=!1,Axe=0;const EO=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Axe++;function Pxe(){const[t,e]=T.useState(()=>MO?EO():void 0);return Mi(()=>{t==null&&e(EO())},[]),T.useEffect(()=>{MO=!0},[]),t}const Ixe=F9.useId,Nxe=Ixe||Pxe;function kxe(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(i=>i(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(i=>i!==n))||[])}}}const Lxe=T.createContext(null),Oxe=T.createContext(null),U9=()=>{var t;return((t=T.useContext(Lxe))==null?void 0:t.id)||null},B9=()=>T.useContext(Oxe);function uy(t){const e=T.useRef(t);return Mi(()=>{e.current=t}),e}function Dxe(t,e){let n=t.filter(i=>{var o;return i.parentId===e&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=t.filter(i=>{var o;return(o=r)==null?void 0:o.some(s=>{var a;return i.parentId===s.id&&((a=i.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function Fxe(t,e){let n,r=-1;function i(o,s){s>r&&(n=o,r=s),Dxe(t,o).forEach(l=>{i(l.id,s+1)})}return i(e,0),t.find(o=>o.id===n)}function CO(t){return ao(t.target)&&t.target.tagName==="BUTTON"}function TO(t){return R9(t)}function QA(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=t,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=e,f=T.useRef(),h=T.useRef(!1);return T.useMemo(()=>s?{reference:{onPointerDown(m){f.current=m.pointerType},onMouseDown(m){m.button===0&&(mO(f.current)&&c||a!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){if(a==="mousedown"&&f.current){f.current=void 0;return}mO(f.current)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){f.current=void 0,!(m.defaultPrevented||!u||CO(m))&&(m.key===" "&&!TO(o)&&(m.preventDefault(),h.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||CO(m)||TO(o)||m.key===" "&&h.current&&(h.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}}:{},[s,i,a,c,u,o,l,n,r])}function zxe(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=Nxe(),o=T.useRef({}),[s]=T.useState(()=>kxe()),a=U9()!=null,[l,c]=T.useState(r.reference),u=BC((m,v,x)=>{o.current.openEvent=m?v:void 0,s.emit("openchange",{open:m,event:v,reason:x,nested:a}),n==null||n(m,v,x)}),f=T.useMemo(()=>({setPositionReference:c}),[]),h=T.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return T.useMemo(()=>({dataRef:o,open:e,onOpenChange:u,elements:h,events:s,floatingId:i,refs:f}),[e,u,h,s,i,f])}function eP(t){t===void 0&&(t={});const{nodeId:e}=t,n=zxe({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,i=r.elements,[o,s]=T.useState(null),[a,l]=T.useState(null),u=(i==null?void 0:i.reference)||o,f=T.useRef(null),h=B9();Mi(()=>{u&&(f.current=u)},[u]);const m=vxe({...t,elements:{...i,...a&&{reference:a}}}),v=T.useCallback(_=>{const S=ci(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;l(S),m.refs.setReference(S)},[m.refs]),x=T.useCallback(_=>{(ci(_)||_===null)&&(f.current=_,s(_)),(ci(m.refs.reference.current)||m.refs.reference.current===null||_!==null&&!ci(_))&&m.refs.setReference(_)},[m.refs]),y=T.useMemo(()=>({...m.refs,setReference:x,setPositionReference:v,domReference:f}),[m.refs,x,v]),g=T.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),b=T.useMemo(()=>({...m,...r,refs:y,elements:g,nodeId:e}),[m,y,g,e,r]);return Mi(()=>{r.dataRef.current.floatingContext=b;const _=h==null?void 0:h.nodesRef.current.find(S=>S.id===e);_&&(_.context=b)}),T.useMemo(()=>({...m,context:b,refs:y,elements:g}),[m,y,g,b])}const RO="active",AO="selected";function xE(t,e,n){const r=new Map,i=n==="item";let o=t;if(i&&t){const{[RO]:s,[AO]:a,...l}=t;o=l}return{...n==="floating"&&{tabIndex:-1},...o,...e.map(s=>{const a=s?s[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(i&&[RO,AO].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),s[c]=function(){for(var h,m=arguments.length,v=new Array(m),x=0;xy(...v)).find(y=>y!==void 0)}}}else s[c]=u}),s),{})}}function tP(t){t===void 0&&(t=[]);const e=t,n=T.useCallback(o=>xE(o,t,"reference"),e),r=T.useCallback(o=>xE(o,t,"floating"),e),i=T.useCallback(o=>xE(o,t,"item"),t.map(o=>o==null?void 0:o.item));return T.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let PO=!1;function H_(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function IO(t,e){return H_(e,t===JA||t===Ng,t===Fd||t===ch)}function bE(t,e,n){return H_(e,t===Ng,n?t===Fd:t===ch)||t==="Enter"||t===" "||t===""}function Uxe(t,e,n){return H_(e,n?t===Fd:t===ch,t===Ng)}function NO(t,e,n){return H_(e,n?t===ch:t===Fd,t===JA)}function Bxe(t,e){const{open:n,onOpenChange:r,elements:{domReference:i,floating:o}}=t,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:f=!1,loop:h=!1,nested:m=!1,rtl:v=!1,virtual:x=!1,focusItemOnOpen:y="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:_=void 0,orientation:S="vertical",cols:A=1,scrollItemIntoView:P=!0,virtualItemRef:R,itemSizes:L,dense:k=!1}=e,C=U9(),N=B9(),z=BC(l),D=T.useRef(y),B=T.useRef(u??-1),G=T.useRef(null),X=T.useRef(!0),Z=T.useRef(z),F=T.useRef(!!o),q=T.useRef(!1),K=T.useRef(!1),Q=uy(_),de=uy(n),fe=uy(P),J=uy(o),[ce,_e]=T.useState(),[be,Xe]=T.useState(),$e=BC(function(se,ae,W){W===void 0&&(W=!1);const Ie=se.current[ae.current];Ie&&(x?(_e(Ie.id),N==null||N.events.emit("virtualfocus",Ie),R&&(R.current=Ie)):SO(Ie,{preventScroll:!0,sync:z1e()&&F1e()?PO||q.current:!1}),requestAnimationFrame(()=>{const Re=fe.current;Re&&Ie&&(W||!X.current)&&(Ie.scrollIntoView==null||Ie.scrollIntoView(typeof Re=="boolean"?{block:"nearest",inline:"nearest"}:Re))}))});Mi(()=>{document.createElement("div").focus({get preventScroll(){return PO=!0,!1}})},[]),Mi(()=>{c&&(n&&o?D.current&&u!=null&&(K.current=!0,B.current=u,z(u)):F.current&&(B.current=-1,Z.current(null)))},[c,n,o,u,z]),Mi(()=>{if(c&&n&&o)if(a==null){if(q.current=!1,u!=null)return;if(F.current&&(B.current=-1,$e(s,B)),!F.current&&D.current&&(G.current!=null||D.current===!0&&G.current==null)){let se=0;const ae=()=>{s.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(ae),se++):(B.current=G.current==null||bE(G.current,S,v)||m?yE(s,Q.current):_O(s,Q.current),G.current=null,z(B.current))};ae()}}else Gp(s,a)||(B.current=a,$e(s,B,K.current),K.current=!1)},[c,n,o,a,u,m,s,S,v,z,$e,Q]),Mi(()=>{var se;if(!c||o||!N||x||!F.current)return;const ae=N.nodesRef.current,W=(se=ae.find(De=>De.id===C))==null||(se=se.context)==null?void 0:se.elements.floating,Ie=pO(B1e(o)),Re=ae.some(De=>De.context&&L1e(De.context.elements.floating,Ie));W&&!Re&&X.current&&W.focus({preventScroll:!0})},[c,o,N,C,x]),Mi(()=>{if(!c||!N||!x||C)return;function se(ae){Xe(ae.id),R&&(R.current=ae)}return N.events.on("virtualfocus",se),()=>{N.events.off("virtualfocus",se)}},[c,N,x,C,R]),Mi(()=>{Z.current=z,F.current=!!o}),Mi(()=>{n||(G.current=null)},[n]);const tt=a!=null,Ve=T.useMemo(()=>{function se(W){if(!n)return;const Ie=s.current.indexOf(W);Ie!==-1&&z(Ie)}return{onFocus(W){let{currentTarget:Ie}=W;se(Ie)},onClick:W=>{let{currentTarget:Ie}=W;return Ie.focus({preventScroll:!0})},...g&&{onMouseMove(W){let{currentTarget:Ie}=W;se(Ie)},onPointerLeave(W){let{pointerType:Ie}=W;!X.current||Ie==="touch"||(B.current=-1,$e(s,B),z(null),x||SO(J.current,{preventScroll:!0}))}}}},[n,J,$e,g,s,z,x]);return T.useMemo(()=>{if(!c)return{};const se=Q.current;function ae(he){if(X.current=!1,q.current=!0,!de.current&&he.currentTarget===J.current)return;if(m&&NO(he.key,S,v)){Eo(he),r(!1,he.nativeEvent,"list-navigation"),ao(i)&&!x&&i.focus();return}const qe=B.current,Le=yE(s,se),V=_O(s,se);if(he.key==="Home"&&(Eo(he),B.current=Le,z(B.current)),he.key==="End"&&(Eo(he),B.current=V,z(B.current)),A>1){const U=L||Array.from({length:s.current.length},()=>({width:1,height:1})),ne=wxe(U,A,k),le=ne.findIndex(ve=>ve!=null&&!(se!=null&&se.includes(ve))),Ce=ne.reduce((ve,He,Ae)=>He!=null&&!(se!=null&&se.includes(He))?Ae:ve,-1);if(B.current=ne[_xe({current:ne.map(ve=>ve!=null?s.current[ve]:null)},{event:he,orientation:S,loop:h,cols:A,disabledIndices:Mxe([...se||[],void 0],ne),minIndex:le,maxIndex:Ce,prevIndex:Sxe(B.current,U,ne,A,he.key===Ng?"bl":he.key===ch?"tr":"tl"),stopEvent:!0})],z(B.current),S==="both")return}if(IO(he.key,S)){if(Eo(he),n&&!x&&pO(he.currentTarget.ownerDocument)===he.currentTarget){B.current=bE(he.key,S,v)?Le:V,z(B.current);return}bE(he.key,S,v)?h?B.current=qe>=V?f&&qe!==s.current.length?-1:Le:qr(s,{startingIndex:qe,disabledIndices:se}):B.current=Math.min(V,qr(s,{startingIndex:qe,disabledIndices:se})):h?B.current=qe<=Le?f&&qe!==-1?s.current.length:V:qr(s,{startingIndex:qe,decrement:!0,disabledIndices:se}):B.current=Math.max(Le,qr(s,{startingIndex:qe,decrement:!0,disabledIndices:se})),Gp(s,B.current)?z(null):z(B.current)}}function W(he){y==="auto"&&O1e(he.nativeEvent)&&(D.current=!0)}function Ie(he){D.current=y,y==="auto"&&D1e(he.nativeEvent)&&(D.current=!0)}const Re=x&&n&&tt&&{"aria-activedescendant":be||ce},De=s.current.find(he=>(he==null?void 0:he.id)===ce);return{reference:{...Re,onKeyDown(he){X.current=!1;const qe=he.key.indexOf("Arrow")===0,Le=Uxe(he.key,S,v),V=NO(he.key,S,v),U=IO(he.key,S),ne=(m?Le:U)||he.key==="Enter"||he.key.trim()==="";if(x&&n){const He=N==null?void 0:N.nodesRef.current.find(Ee=>Ee.parentId==null),Ae=N&&He?Fxe(N.nodesRef.current,He.id):null;if(qe&&Ae&&R){const Ee=new KeyboardEvent("keydown",{key:he.key,bubbles:!0});if(Le||V){var le,Ce;const bt=((le=Ae.context)==null?void 0:le.elements.domReference)===he.currentTarget,ke=V&&!bt?(Ce=Ae.context)==null?void 0:Ce.elements.domReference:Le?De:null;ke&&(Eo(he),ke.dispatchEvent(Ee),Xe(void 0))}if(U&&Ae.context&&Ae.context.open&&Ae.parentId&&he.currentTarget!==Ae.context.elements.domReference){var ve;Eo(he),(ve=Ae.context.elements.domReference)==null||ve.dispatchEvent(Ee);return}}return ae(he)}if(!(!n&&!b&&qe)){if(ne&&(G.current=m&&U?null:he.key),m){Le&&(Eo(he),n?(B.current=yE(s,se),z(B.current)):r(!0,he.nativeEvent,"list-navigation"));return}U&&(u!=null&&(B.current=u),Eo(he),!n&&b?r(!0,he.nativeEvent,"list-navigation"):ae(he),n&&z(B.current))}},onFocus(){n&&z(null)},onPointerDown:Ie,onMouseDown:W,onClick:W},floating:{"aria-orientation":S==="both"?void 0:S,...!V1e(i)&&Re,onKeyDown:ae,onPointerMove(){X.current=!0}},item:Ve}},[i,J,ce,be,Q,de,s,c,S,v,x,n,tt,m,u,b,f,A,h,y,z,r,Ve,N,R,L,k])}var j9={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},kO=St.createContext&&St.createContext(j9),jxe=["attr","size","title"];function Vxe(t,e){if(t==null)return{};var n=$xe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function $xe(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 Lx(){return Lx=Object.assign?Object.assign.bind():function(t){for(var e=1;eSt.createElement(e.tag,Ox({key:n},e.attr),V9(e.child)))}function hs(t){return e=>St.createElement(Xxe,Lx({attr:Ox({},t.attr)},e),V9(t.child))}function Xxe(t){var e=n=>{var{attr:r,size:i,title:o}=t,s=Vxe(t,jxe),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),St.createElement("svg",Lx({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:Ox(Ox({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&St.createElement("title",null,o),t.children)};return kO!==void 0?St.createElement(kO.Consumer,null,n=>e(n)):e(j9)}function qxe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12.01",y2:"16"},child:[]}]})(t)}function Yxe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(t)}function Kxe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 10 20 15 15 20"},child:[]},{tag:"path",attr:{d:"M4 4v7a4 4 0 0 0 4 4h12"},child:[]}]})(t)}function Zxe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(t)}function Jxe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(t)}function Qxe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"4.93",y1:"4.93",x2:"19.07",y2:"19.07"},child:[]}]})(t)}function ebe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(t)}function tbe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"},child:[]}]})(t)}function nbe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"},child:[]}]})(t)}function rbe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 11H1v2h6v-2zm2.17-3.24L7.05 5.64 5.64 7.05l2.12 2.12 1.41-1.41zM13 1h-2v6h2V1zm5.36 6.05-1.41-1.41-2.12 2.12 1.41 1.41 2.12-2.12zM17 11v2h6v-2h-6zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24 2.12 2.12 1.41-1.41-2.12-2.12-1.41 1.41zm-9.19.71 1.41 1.41 2.12-2.12-1.41-1.41-2.12 2.12zM11 23h2v-6h-2v6z"},child:[]}]})(t)}function $9(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 10 5 5 5-5z"},child:[]}]})(t)}var W9=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i0},t.prototype.connect_=function(){!jC||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),cbe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!jC||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=lbe.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),H9=function(t,e){for(var n=0,r=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof zd(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new ybe(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof zd(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new xbe(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),X9=typeof WeakMap<"u"?new WeakMap:new W9,q9=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=ube.getInstance(),r=new bbe(e,n,this);X9.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){q9.prototype[t]=function(){var e;return(e=X9.get(this))[t].apply(e,arguments)}});var _be=function(){return typeof Dx.ResizeObserver<"u"?Dx.ResizeObserver:q9}(),wbe=["client","offset","scroll","bounds","margin"];function DO(t){var e=[];return wbe.forEach(function(n){t[n]&&e.push(n)}),e}function FO(t,e){var n={};if(e.indexOf("client")>-1&&(n.client={top:t.clientTop,left:t.clientLeft,width:t.clientWidth,height:t.clientHeight}),e.indexOf("offset")>-1&&(n.offset={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}),e.indexOf("scroll")>-1&&(n.scroll={top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}),e.indexOf("bounds")>-1){var r=t.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(e.indexOf("margin")>-1){var i=getComputedStyle(t);n.margin={top:i?parseInt(i.marginTop):0,right:i?parseInt(i.marginRight):0,bottom:i?parseInt(i.marginBottom):0,left:i?parseInt(i.marginLeft):0}}return n}function Sbe(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||window}function Mbe(t){return function(e){var n,r;return r=n=function(i){yR(o,i);function o(){for(var a,l=arguments.length,c=new Array(l),u=0;u{let e;const n=new Set,r=(u,f)=>{const h=typeof u=="function"?u(e):u;if(!Object.is(h,e)){const m=e;e=f??(typeof h!="object"||h===null)?h:Object.assign({},e,h),n.forEach(v=>v(e,m))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(Ebe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},Cbe=t=>t?zO(t):zO;var Y9={exports:{}},K9={},Z9={exports:{}},J9={};/** +*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",s=0;s=0)&&(n[i]=t[i]);return n}var n9={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},BA=St.forwardRef(function(t,e){var n=t.className,r=t.top,i=t.left,o=t.offsetLeft,s=o===void 0?10:o,a=t.offsetTop,l=a===void 0?10:a,c=t.style,u=c===void 0?n9:c,f=t.children,h=t.unstyled,m=h===void 0?!1:h,v=t.applyPositionStyle,x=v===void 0?!1:v,y=Mme(t,Sme);return St.createElement("div",Tx({ref:e,className:ls("visx-tooltip",n),style:Tx({top:r==null||l==null?r:r+l,left:i==null||s==null?i:i+s},x&&{position:"absolute"},!m&&u)},y),f)});BA.propTypes={children:Qt.node,className:Qt.string,left:Qt.number,offsetLeft:Qt.number,offsetTop:Qt.number,top:Qt.number,applyPositionStyle:Qt.bool,unstyled:Qt.bool};BA.displayName="Tooltip";function CC(){return CC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function i9(t){var e=t.children;t.getRects;var n=t.left,r=n===void 0?0:n,i=t.offsetLeft,o=i===void 0?10:i,s=t.offsetTop,a=s===void 0?10:s,l=t.parentRect,c=t.rect,u=t.style,f=u===void 0?n9:u,h=t.top,m=h===void 0?0:h,v=t.unstyled,x=v===void 0?!1:v,y=t.nodeRef,g=Pme(t,Ame),b,_=!1,S=!1;if(c&&l){var A=r,P=m;if(l.width){var R=A+o+c.width-l.width,L=c.width-A-o;_=R>0&&R>L}else{var k=A+o+c.width-window.innerWidth,C=c.width-A-o;_=k>0&&k>C}if(l.height){var N=P+a+c.height-l.height,z=c.height-P-a;S=N>0&&N>z}else S=P+a+c.height>window.innerHeight;A=_?A-c.width-o:A+o,P=S?P-c.height-a:P+a,A=Math.round(A),P=Math.round(P),b="translate("+A+"px, "+P+"px)"}return St.createElement(BA,Rx({ref:y,style:Rx({left:0,top:0,transform:b},!x&&f)},g),St.createElement(Rme,{value:{isFlippedVertically:!S,isFlippedHorizontally:!_}},e))}i9.propTypes={nodeRef:Qt.oneOfType([Qt.string,Qt.func,Qt.object])};const Ime=Tme(i9);var Nme=["top","left","transform","className","children","innerRef"];function RC(){return RC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Rg(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.transform,s=t.className,a=t.children,l=t.innerRef,c=kme(t,Nme);return St.createElement("g",RC({ref:l,className:ls("visx-group",s),transform:o||"translate("+i+", "+n+")"},c),a)}Rg.propTypes={top:Qt.number,left:Qt.number,transform:Qt.string,className:Qt.string,children:Qt.node,innerRef:Qt.oneOfType([Qt.string,Qt.func,Qt.object])};var Lme=["from","to","fill","className","innerRef"];function AC(){return AC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Ax(t){var e=t.from,n=e===void 0?{x:0,y:0}:e,r=t.to,i=r===void 0?{x:1,y:1}:r,o=t.fill,s=o===void 0?"transparent":o,a=t.className,l=t.innerRef,c=Ome(t,Lme),u=n.x===i.x||n.y===i.y;return St.createElement("line",AC({ref:l,className:ls("visx-line",a),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:s,shapeRendering:u?"crispEdges":"auto"},c))}var Dme=o9;function o9(t,e,n){t instanceof RegExp&&(t=nO(t,n)),e instanceof RegExp&&(e=nO(e,n));var r=s9(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function nO(t,e){var n=e.match(t);return n?n[0]:null}o9.range=s9;function s9(t,e,n){var r,i,o,s,a,l=n.indexOf(t),c=n.indexOf(e,l+1),u=l;if(l>=0&&c>0){for(r=[],o=n.length;u>=0&&!a;)u==l?(r.push(u),l=n.indexOf(t,u+1)):r.length==1?a=[r.pop(),c]:(i=r.pop(),i=0?l:c;r.length&&(a=[o,s])}return a}var Fme=a9;function a9(t,e,n){t instanceof RegExp&&(t=rO(t,n)),e instanceof RegExp&&(e=rO(e,n));var r=l9(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function rO(t,e){var n=e.match(t);return n?n[0]:null}a9.range=l9;function l9(t,e,n){var r,i,o,s,a,l=n.indexOf(t),c=n.indexOf(e,l+1),u=l;if(l>=0&&c>0){if(t===e)return[l,c];for(r=[],o=n.length;u>=0&&!a;)u==l?(r.push(u),l=n.indexOf(t,u+1)):r.length==1?a=[r.pop(),c]:(i=r.pop(),i=0?l:c;r.length&&(a=[o,s])}return a}var zme=Fme,Ume=c9;function c9(t,e,n){var r=t;return Bme(t,e).reduce(function(i,o){return i.replace(o.functionIdentifier+"("+o.matches.body+")",jme(o.matches.body,o.functionIdentifier,n,r,e))},t)}function Bme(t,e){var n=[],r=typeof e=="string"?new RegExp("\\b("+e+")\\("):e;do{var i=r.exec(t);if(!i)return n;if(i[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+e);var o=i[1],s=i.index,a=zme("(",")",t.substring(s));if(!a||a.start!==i[0].length-1)throw new SyntaxError(o+"(): missing closing ')' in the value '"+t+"'");n.push({matches:a,functionIdentifier:o}),t=a.post}while(r.test(t));return n}function jme(t,e,n,r,i){return n(c9(t,i,n),e,r)}var oi=function(t){this.value=t};oi.math={isDegree:!0,acos:function(t){return oi.math.isDegree?180/Math.PI*Math.acos(t):Math.acos(t)},add:function(t,e){return t+e},asin:function(t){return oi.math.isDegree?180/Math.PI*Math.asin(t):Math.asin(t)},atan:function(t){return oi.math.isDegree?180/Math.PI*Math.atan(t):Math.atan(t)},acosh:function(t){return Math.log(t+Math.sqrt(t*t-1))},asinh:function(t){return Math.log(t+Math.sqrt(t*t+1))},atanh:function(t){return Math.log((1+t)/(1-t))},C:function(t,e){var n=1,r=t-e,i=e;iai.length-2?ai.length-1:t.length-s;i>0;i--)if(ai[i]!==void 0)for(o=0;o0&&cr)s.push(e);else{for(;r>=i&&!c||c&&i"u"?e[e.length-1].value.push(o[a]):e[e.length-1].value=o[a].value(e[e.length-1].value);else if(o[a].type===7)typeof e[e.length-1].type>"u"?e[e.length-1].value.push(o[a]):e[e.length-1].value=o[a].value(e[e.length-1].value);else if(o[a].type===8){for(var l=[],c=0;c"u"?(r.value=r.concat(n),r.value.push(o[a]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(o[a]),e.push(n)):e.push({type:1,value:o[a].value(r.value,n.value)})):o[a].type===2||o[a].type===9?(n=e.pop(),r=e.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(o[a]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(o[a]),e.push(n)):e.push({type:1,value:o[a].value(r.value,n.value)})):o[a].type===12?(n=e.pop(),typeof n.type<"u"&&(n=[n]),r=e.pop(),i=e.pop(),e.push({type:1,value:o[a].value(i.value,r.value,new $p(n))})):o[a].type===13&&(s?e.push({value:t[o[a].value],type:3}):e.push([o[a]]));if(e.length>1)throw new $p.Exception("Uncaught Syntax error");return e[0].value>1e15?"Infinity":parseFloat(e[0].value.toFixed(15))};$p.eval=function(t,e,n){return typeof e>"u"?this.lex(t).toPostfix().postfixEval():typeof n>"u"?typeof e.length<"u"?this.lex(t,e).toPostfix().postfixEval():this.lex(t).toPostfix().postfixEval(e):this.lex(t,e).toPostfix().postfixEval(n)};var Kme=$p,f9=Kme;f9.prototype.formulaEval=function(){for(var t,e,n,r=[],i=this.value,o=0;o"+e.value+""+i[o].show+""+t.value+"",type:10}):r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+""+t.value+"",type:1})):i[o].type===2||i[o].type===9?(t=r.pop(),e=r.pop(),r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+i[o].show+(t.type!=1?"(":"")+t.value+(t.type!=1?")":""),type:i[o].type})):i[o].type===12&&(t=r.pop(),e=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+e.value+","+t.value+")",type:12}));return r[0].value};var Zme=f9,Jme=Dme,Qme=Ume,ege=Zme,tge=100,nge=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,hE,rge=ige;function ige(t,e){hE=0,e=Math.pow(10,e===void 0?5:e),t=t.replace(/\n+/g," ");function n(i,o,s){if(hE++>tge)throw hE=0,new Error("Call stack overflow for "+s);if(i==="")throw new Error(o+"(): '"+s+"' must contain a non-whitespace string");i=r(i,s);var a=oge(i);if(a.length>1||i.indexOf("var(")>-1)return o+"("+i+")";var l=a[0]||"";l==="%"&&(i=i.replace(/\b[0-9\.]+%/g,function(f){return parseFloat(f.slice(0,-1))*.01}));var c=i.replace(new RegExp(l,"gi"),""),u;try{u=ege.eval(c)}catch{return o+"("+i+")"}return l==="%"&&(u*=100),(o.length||l==="%")&&(u=Math.round(u*e)/e),u+=l,u}function r(i,o){i=i.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var s="",a=i,l;l=nge.exec(a);){l[0].index>0&&(s+=a.substring(0,l[0].index));var c=Jme("(",")",a.substring([0].index));if(c.body==="")throw new Error("'"+i+"' must contain a non-whitespace string");var u=n(c.body,"",o);s+=c.pre+u,a=c.post}return s+a}return Qme(t,/((?:\-[a-z]+\-)?calc)\(/,n)}function oge(t){for(var e=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(t);i;)!i||!i[1]||(n.indexOf(i[1].toLowerCase())===-1&&(e.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(t));return e}const pE=qs(rge);var sge=typeof D0=="object"&&D0&&D0.Object===Object&&D0,age=sge,lge=age,cge=typeof self=="object"&&self&&self.Object===Object&&self,uge=lge||cge||Function("return this")(),jA=uge,fge=jA,dge=fge.Symbol,d9=dge,iO=d9,h9=Object.prototype,hge=h9.hasOwnProperty,pge=h9.toString,cp=iO?iO.toStringTag:void 0;function mge(t){var e=hge.call(t,cp),n=t[cp];try{t[cp]=void 0;var r=!0}catch{}var i=pge.call(t);return r&&(e?t[cp]=n:delete t[cp]),i}var gge=mge,vge=Object.prototype,yge=vge.toString;function xge(t){return yge.call(t)}var bge=xge,oO=d9,_ge=gge,wge=bge,Sge="[object Null]",Mge="[object Undefined]",sO=oO?oO.toStringTag:void 0;function Ege(t){return t==null?t===void 0?Mge:Sge:sO&&sO in Object(t)?_ge(t):wge(t)}var Cge=Ege;function Tge(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var p9=Tge,Rge=Cge,Age=p9,Pge="[object AsyncFunction]",Ige="[object Function]",Nge="[object GeneratorFunction]",kge="[object Proxy]";function Lge(t){if(!Age(t))return!1;var e=Rge(t);return e==Ige||e==Nge||e==Pge||e==kge}var Oge=Lge,Dge=jA,Fge=Dge["__core-js_shared__"],zge=Fge,mE=zge,aO=function(){var t=/[^.]+$/.exec(mE&&mE.keys&&mE.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Uge(t){return!!aO&&aO in t}var Bge=Uge,jge=Function.prototype,Vge=jge.toString;function $ge(t){if(t!=null){try{return Vge.call(t)}catch{}try{return t+""}catch{}}return""}var Wge=$ge,Hge=Oge,Gge=Bge,Xge=p9,qge=Wge,Yge=/[\\^$.*+?()[\]{}|]/g,Kge=/^\[object .+?Constructor\]$/,Zge=Function.prototype,Jge=Object.prototype,Qge=Zge.toString,e0e=Jge.hasOwnProperty,t0e=RegExp("^"+Qge.call(e0e).replace(Yge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function n0e(t){if(!Xge(t)||Gge(t))return!1;var e=Hge(t)?t0e:Kge;return e.test(qge(t))}var r0e=n0e;function i0e(t,e){return t==null?void 0:t[e]}var o0e=i0e,s0e=r0e,a0e=o0e;function l0e(t,e){var n=a0e(t,e);return s0e(n)?n:void 0}var m9=l0e,c0e=m9,u0e=c0e(Object,"create"),U_=u0e,lO=U_;function f0e(){this.__data__=lO?lO(null):{},this.size=0}var d0e=f0e;function h0e(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var p0e=h0e,m0e=U_,g0e="__lodash_hash_undefined__",v0e=Object.prototype,y0e=v0e.hasOwnProperty;function x0e(t){var e=this.__data__;if(m0e){var n=e[t];return n===g0e?void 0:n}return y0e.call(e,t)?e[t]:void 0}var b0e=x0e,_0e=U_,w0e=Object.prototype,S0e=w0e.hasOwnProperty;function M0e(t){var e=this.__data__;return _0e?e[t]!==void 0:S0e.call(e,t)}var E0e=M0e,C0e=U_,T0e="__lodash_hash_undefined__";function R0e(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=C0e&&e===void 0?T0e:e,this}var A0e=R0e,P0e=d0e,I0e=p0e,N0e=b0e,k0e=E0e,L0e=A0e;function oh(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}var J0e=Z0e,Q0e=B_;function eve(t,e){var n=this.__data__,r=Q0e(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var tve=eve,nve=F0e,rve=G0e,ive=Y0e,ove=J0e,sve=tve;function sh(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e=0)&&(n[i]=t[i]);return n}function gE(t){return typeof t=="number"}function dO(t){return typeof t=="number"&&Number.isFinite(t)||typeof t=="string"}function Wve(t){var e=t.verticalAnchor,n=e===void 0?"end":e,r=t.scaleToFit,i=r===void 0?!1:r,o=t.angle,s=t.width,a=t.lineHeight,l=a===void 0?"1em":a,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.children,h=t.style,m=$ve(t,Vve),v=m.x,x=v===void 0?0:v,y=m.y,g=y===void 0?0:y,b=!dO(x)||!dO(g),_=T.useMemo(function(){var k=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:k.map(function(C){return{word:C,wordWidth:fO(C,h)||0}}),spaceWidth:fO(" ",h)||0}},[f,h]),S=_.wordsWithWidth,A=_.spaceWidth,P=T.useMemo(function(){return b?[]:s||i?S.reduce(function(k,C){var N=C.word,z=C.wordWidth,D=k[k.length-1];if(D&&(s==null||i||(D.width||0)+z+A0){var C=P[0].width||1,N=i==="shrink-only"?Math.min(s/C,1):s/C,z=N,D=x-N*x,B=g-z*g;k.push("matrix("+N+", 0, 0, "+z+", "+D+", "+B+")")}return o&&k.push("rotate("+o+", "+x+", "+g+")"),k.length>0?k.join(" "):""},[b,x,g,s,i,P,o]);return{wordsByLines:P,startDy:R,transform:L}}var Hve=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function NC(){return NC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var Xve={overflow:"visible"};function v9(t){var e=t.dx,n=e===void 0?0:e,r=t.dy,i=r===void 0?0:r,o=t.textAnchor,s=o===void 0?"start":o,a=t.innerRef,l=t.innerTextRef;t.verticalAnchor,t.angle;var c=t.lineHeight,u=c===void 0?"1em":c;t.scaleToFit,t.capHeight,t.width;var f=Gve(t,Hve),h=f.x,m=h===void 0?0:h,v=f.fontSize,x=Wve(t),y=x.wordsByLines,g=x.startDy,b=x.transform;return St.createElement("svg",{ref:a,x:n,y:i,fontSize:v,style:Xve},y.length>0?St.createElement("text",NC({ref:l,transform:b},f,{textAnchor:s}),y.map(function(_,S){return St.createElement("tspan",{key:S,x:m,dy:S===0?g:u},_.words.join(" "))})):null)}var Ji={top:"top",left:"left",right:"right",bottom:"bottom"};function qve(t){var e=t.labelOffset,n=t.labelProps,r=t.orientation,i=t.range,o=t.tickLabelFontSize,s=t.tickLength,a=r===Ji.left||r===Ji.top?-1:1,l,c,u;if(r===Ji.top||r===Ji.bottom){var f=r===Ji.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,c=a*(s+e+o+f)}else l=a*((Number(i[0])+Number(i[i.length-1]))/2),c=-(s+e),u="rotate("+a*90+")";return{x:l,y:c,transform:u}}function Wp(){return Wp=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function y9(t){var e=t.children,n=e===void 0?Kve:e,r=t.axisClassName,i=t.hideAxisLine,o=i===void 0?!1:i,s=t.hideTicks,a=s===void 0?!1:s,l=t.hideZero,c=l===void 0?!1:l,u=t.innerRef,f=t.left,h=f===void 0?0:f,m=t.numTicks,v=m===void 0?10:m,x=t.orientation,y=x===void 0?Ji.bottom:x,g=t.rangePadding,b=g===void 0?0:g,_=t.scale,S=t.tickFormat,A=t.tickLength,P=A===void 0?8:A,R=t.tickValues,L=t.top,k=L===void 0?0:L,C=tye(t,eye),N=S??Jve(_),z=y===Ji.left,D=y===Ji.top,B=D||y===Ji.bottom,G=Zve(_),X=z||D?-1:1,Z=_.range(),F=Qve(b),q=sy({x:Number(Z[0])+.5-F.start,y:0},B),K=sy({x:Number(Z[Z.length-1])+.5+F.end,y:0},B),Q=(R??UA(_,v)).filter(function(fe){return!c||fe!==0&&fe!=="0"}).map(function(fe,J){return{value:fe,index:J}}),de=Q.map(function(fe){var J=fe.value,ce=fe.index,_e=zA(G(J));return{value:J,index:ce,from:sy({x:_e,y:0},B),to:sy({x:_e,y:P*X},B),formattedValue:N(J,ce,Q)}});return St.createElement(Rg,{className:ls("visx-axis",r),innerRef:u,top:k,left:h},n(LC({},C,{axisFromPoint:q,axisToPoint:K,hideAxisLine:o,hideTicks:a,hideZero:c,horizontal:B,numTicks:v,orientation:y,rangePadding:b,scale:_,tickFormat:N,tickLength:P,tickPosition:G,tickSign:X,ticks:de})))}var nye=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Px(){return Px=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var iye={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function oye(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?36:n,i=t.tickLength,o=i===void 0?8:i,s=t.tickLabelProps,a=rye(t,nye),l=typeof s=="function"?s:Px({},iye,s);return St.createElement(y9,Px({axisClassName:ls("visx-axis-left",e),labelOffset:r,orientation:Ji.left,tickLabelProps:l,tickLength:o},a))}var sye=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Ix(){return Ix=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var lye={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function cye(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?8:n,i=t.tickLength,o=i===void 0?8:i,s=t.tickLabelProps,a=aye(t,sye),l=typeof s=="function"?s:Ix({},lye,s);return St.createElement(y9,Ix({axisClassName:ls("visx-axis-bottom",e),labelOffset:r,orientation:Ji.bottom,tickLabelProps:l,tickLength:o},a))}var x9=pye,uye=b9(T),fye=b9(t9),dye=["from","to","fill","className","innerRef"];function b9(t){return t&&t.__esModule?t:{default:t}}function OC(){return OC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function pye(t){var e=t.from,n=e===void 0?{x:0,y:0}:e,r=t.to,i=r===void 0?{x:1,y:1}:r,o=t.fill,s=o===void 0?"transparent":o,a=t.className,l=t.innerRef,c=hye(t,dye),u=n.x===i.x||n.y===i.y;return uye.default.createElement("line",OC({ref:l,className:(0,fye.default)("visx-line",a),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:s,shapeRendering:u?"crispEdges":"auto"},c))}function _9(t){return"bandwidth"in t?t.bandwidth():0}var mye=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function DC(){return DC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function w9(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.scale,s=t.width,a=t.stroke,l=a===void 0?"#eaf0f6":a,c=t.strokeWidth,u=c===void 0?1:c,f=t.strokeDasharray,h=t.className,m=t.children,v=t.numTicks,x=v===void 0?10:v,y=t.lineStyle,g=t.offset,b=t.tickValues,_=gye(t,mye),S=b??UA(o,x),A=(g??0)+_9(o)/2,P=S.map(function(R,L){var k,C=((k=zA(o(R)))!=null?k:0)+A;return{index:L,from:new Xm({x:0,y:C}),to:new Xm({x:s,y:C})}});return St.createElement(Rg,{className:ls("visx-rows",h),top:n,left:i},m?m({lines:P}):P.map(function(R){var L=R.from,k=R.to,C=R.index;return St.createElement(x9,DC({key:"row-line-"+C,from:L,to:k,stroke:l,strokeWidth:u,strokeDasharray:f,style:y},_))}))}w9.propTypes={tickValues:Qt.array,width:Qt.number.isRequired};var vye=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function FC(){return FC=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function S9(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.scale,s=t.height,a=t.stroke,l=a===void 0?"#eaf0f6":a,c=t.strokeWidth,u=c===void 0?1:c,f=t.strokeDasharray,h=t.className,m=t.numTicks,v=m===void 0?10:m,x=t.lineStyle,y=t.offset,g=t.tickValues,b=t.children,_=yye(t,vye),S=g??UA(o,v),A=(y??0)+_9(o)/2,P=S.map(function(R,L){var k,C=((k=zA(o(R)))!=null?k:0)+A;return{index:L,from:new Xm({x:C,y:0}),to:new Xm({x:C,y:s})}});return St.createElement(Rg,{className:ls("visx-columns",h),top:n,left:i},b?b({lines:P}):P.map(function(R){var L=R.from,k=R.to,C=R.index;return St.createElement(x9,FC({key:"column-line-"+C,from:L,to:k,stroke:l,strokeWidth:u,strokeDasharray:f,style:x},_))}))}S9.propTypes={tickValues:Qt.array,height:Qt.number.isRequired};function fn(t){for(var e=t.length/6|0,n=new Array(e),r=0;rZhe(t[t.length-1]);var xye=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(fn);const bye=xn(xye);var _ye=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(fn);const wye=xn(_ye);var Sye=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(fn);const Mye=xn(Sye);var Eye=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(fn);const Cye=xn(Eye);var Tye=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(fn);const Rye=xn(Tye);var Aye=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(fn);const Pye=xn(Aye);var Iye=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(fn);const Nye=xn(Iye);var kye=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(fn);const Lye=xn(kye);var Oye=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(fn);const Dye=xn(Oye);var Fye=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(fn);const zye=xn(Fye);var Uye=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(fn);const Bye=xn(Uye);var jye=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(fn);const Vye=xn(jye);var $ye=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(fn);const Wye=xn($ye);var Hye=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(fn);const Gye=xn(Hye);var Xye=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(fn);const qye=xn(Xye);var Yye=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(fn);const Kye=xn(Yye);var Zye=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(fn);const Jye=xn(Zye);var Qye=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(fn);const e1e=xn(Qye);var t1e=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(fn);const n1e=xn(t1e);var r1e=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(fn);const i1e=xn(r1e);var o1e=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(fn);const s1e=xn(o1e);var a1e=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(fn);const l1e=xn(a1e);var c1e=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(fn);const u1e=xn(c1e);var f1e=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(fn);const d1e=xn(f1e);var h1e=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(fn);const p1e=xn(h1e);var m1e=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(fn);const g1e=xn(m1e);var v1e=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(fn);const y1e=xn(v1e);function x1e(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const b1e=D_(Gs(300,.5,0),Gs(-240,.5,1));var _1e=D_(Gs(-100,.75,.35),Gs(80,1.5,.8)),w1e=D_(Gs(260,.75,.35),Gs(80,1.5,.8)),ay=Gs();function S1e(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return ay.h=360*t-100,ay.s=1.5-1.5*e,ay.l=.8-.9*e,ay+""}var ly=Ol(),M1e=Math.PI/3,E1e=Math.PI*2/3;function C1e(t){var e;return t=(.5-t)*Math.PI,ly.r=255*(e=Math.sin(t))*e,ly.g=255*(e=Math.sin(t+M1e))*e,ly.b=255*(e=Math.sin(t+E1e))*e,ly+""}function T1e(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function V_(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const R1e=V_(fn("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var A1e=V_(fn("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),P1e=V_(fn("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),I1e=V_(fn("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function $A(t,e=0,n=[]){return T.Children.toArray(t).reduce((r,i,o)=>(B2.isFragment(i)?r.push.apply(r,$A(i.props.children,e+1,n.concat(i.key||o))):T.isValidElement(i)?r.push(T.cloneElement(i,{key:n.concat(String(i.key)).join(".")})):(typeof i=="string"||typeof i=="number")&&r.push(i),r),[])}function $_(){return typeof window<"u"}function lh(t){return M9(t)?(t.nodeName||"").toLowerCase():"#document"}function io(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ea(t){var e;return(e=(M9(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function M9(t){return $_()?t instanceof Node||t instanceof io(t).Node:!1}function ui(t){return $_()?t instanceof Element||t instanceof io(t).Element:!1}function ao(t){return $_()?t instanceof HTMLElement||t instanceof io(t).HTMLElement:!1}function zC(t){return!$_()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof io(t).ShadowRoot}function Ag(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=cs(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function N1e(t){return["table","td","th"].includes(lh(t))}function W_(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function WA(t){const e=HA(),n=ui(t)?cs(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function k1e(t){let e=Fl(t);for(;ao(e)&&!Od(e);){if(WA(e))return e;if(W_(e))return null;e=Fl(e)}return null}function HA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Od(t){return["html","body","#document"].includes(lh(t))}function cs(t){return io(t).getComputedStyle(t)}function H_(t){return ui(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Fl(t){if(lh(t)==="html")return t;const e=t.assignedSlot||t.parentNode||zC(t)&&t.host||ea(t);return zC(e)?e.host:e}function E9(t){const e=Fl(t);return Od(e)?t.ownerDocument?t.ownerDocument.body:t.body:ao(e)&&Ag(e)?e:E9(e)}function qm(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=E9(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=io(i);if(o){const a=UC(s);return e.concat(s,s.visualViewport||[],Ag(i)?i:[],a&&n?qm(a):[])}return e.concat(i,qm(i,[],n))}function UC(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function pO(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function L1e(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&zC(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function C9(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function T9(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function O1e(t){return t.mozInputSource===0&&t.isTrusted?!0:BC()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function D1e(t){return U1e()?!1:!BC()&&t.width===0&&t.height===0||BC()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function F1e(){return/apple/i.test(navigator.vendor)}function BC(){const t=/android/i;return t.test(C9())||t.test(T9())}function z1e(){return C9().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function U1e(){return T9().includes("jsdom/")}function mO(t,e){return["mouse","pen"].includes(t)}function B1e(t){return(t==null?void 0:t.ownerDocument)||document}const j1e="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function R9(t){return ao(t)&&t.matches(j1e)}function Eo(t){t.preventDefault(),t.stopPropagation()}function V1e(t){return t?t.getAttribute("role")==="combobox"&&R9(t):!1}const Dd=Math.min,Ki=Math.max,Nx=Math.round,Zf=Math.floor,$s=t=>({x:t,y:t});function gO(t,e,n){return Ki(t,Dd(e,n))}function G_(t,e){return typeof t=="function"?t(e):t}function Pg(t){return t.split("-")[0]}function GA(t){return t.split("-")[1]}function A9(t){return t==="x"?"y":"x"}function $1e(t){return t==="y"?"height":"width"}function Ig(t){return["top","bottom"].includes(Pg(t))?"y":"x"}function W1e(t){return A9(Ig(t))}function H1e(t){return{top:0,right:0,bottom:0,left:0,...t}}function G1e(t){return typeof t!="number"?H1e(t):{top:t,right:t,bottom:t,left:t}}function kx(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function vO(t,e,n){let{reference:r,floating:i}=t;const o=Ig(e),s=W1e(e),a=$1e(s),l=Pg(e),c=o==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let m;switch(l){case"top":m={x:u,y:r.y-i.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-i.width,y:f};break;default:m={x:r.x,y:r.y}}switch(GA(e)){case"start":m[s]-=h*(n&&c?-1:1);break;case"end":m[s]+=h*(n&&c?-1:1);break}return m}const X1e=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=vO(c,r,l),h=r,m={},v=0;for(let x=0;x{let{x:g,y:b}=y;return{x:g,y:b}}},...l}=G_(t,e),c={x:n,y:r},u=await P9(e,l),f=Ig(Pg(i)),h=A9(f);let m=c[h],v=c[f];if(o){const y=h==="y"?"top":"left",g=h==="y"?"bottom":"right",b=m+u[y],_=m-u[g];m=gO(b,m,_)}if(s){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=v+u[y],_=v-u[g];v=gO(b,v,_)}const x=a.fn({...e,[h]:m,[f]:v});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[h]:o,[f]:s}}}}}},Z1e=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:o,platform:s,elements:a}=e,{apply:l=()=>{},...c}=G_(t,e),u=await P9(e,c),f=Pg(i),h=GA(i),m=Ig(i)==="y",{width:v,height:x}=o.floating;let y,g;f==="top"||f==="bottom"?(y=f,g=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=f,y=h==="end"?"top":"bottom");const b=x-u.top-u.bottom,_=v-u.left-u.right,S=Dd(x-u[y],b),A=Dd(v-u[g],_),P=!e.middlewareData.shift;let R=S,L=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(L=_),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(R=b),P&&!h){const C=Ki(u.left,0),N=Ki(u.right,0),z=Ki(u.top,0),D=Ki(u.bottom,0);m?L=v-2*(C!==0||N!==0?C+N:Ki(u.left,u.right)):R=x-2*(z!==0||D!==0?z+D:Ki(u.top,u.bottom))}await l({...e,availableWidth:L,availableHeight:R});const k=await s.getDimensions(a.floating);return v!==k.width||x!==k.height?{reset:{rects:!0}}:{}}}};function I9(t){const e=cs(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=ao(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Nx(n)!==o||Nx(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function XA(t){return ui(t)?t:t.contextElement}function dd(t){const e=XA(t);if(!ao(e))return $s(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=I9(e);let s=(o?Nx(n.width):n.width)/r,a=(o?Nx(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const J1e=$s(0);function N9(t){const e=io(t);return!HA()||!e.visualViewport?J1e:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Q1e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==io(t)?!1:e}function gu(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=XA(t);let s=$s(1);e&&(r?ui(r)&&(s=dd(r)):s=dd(t));const a=Q1e(o,n,r)?N9(o):$s(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,f=i.height/s.y;if(o){const h=io(o),m=r&&ui(r)?io(r):r;let v=h,x=UC(v);for(;x&&r&&m!==v;){const y=dd(x),g=x.getBoundingClientRect(),b=cs(x),_=g.left+(x.clientLeft+parseFloat(b.paddingLeft))*y.x,S=g.top+(x.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=_,c+=S,v=io(x),x=UC(v)}}return kx({width:u,height:f,x:l,y:c})}function qA(t,e){const n=H_(t).scrollLeft;return e?e.left+n:gu(ea(t)).left+n}function k9(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:qA(t,r)),o=r.top+e.scrollTop;return{x:i,y:o}}function exe(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=ea(r),a=e?W_(e.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=$s(1);const u=$s(0),f=ao(r);if((f||!f&&!o)&&((lh(r)!=="body"||Ag(s))&&(l=H_(r)),ao(r))){const m=gu(r);c=dd(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const h=s&&!f&&!o?k9(s,l,!0):$s(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function txe(t){return Array.from(t.getClientRects())}function nxe(t){const e=ea(t),n=H_(t),r=t.ownerDocument.body,i=Ki(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Ki(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+qA(t);const a=-n.scrollTop;return cs(r).direction==="rtl"&&(s+=Ki(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function rxe(t,e){const n=io(t),r=ea(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const c=HA();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}function ixe(t,e){const n=gu(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=ao(t)?dd(t):$s(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:s,height:a,x:l,y:c}}function yO(t,e,n){let r;if(e==="viewport")r=rxe(t,n);else if(e==="document")r=nxe(ea(t));else if(ui(e))r=ixe(e,n);else{const i=N9(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return kx(r)}function L9(t,e){const n=Fl(t);return n===e||!ui(n)||Od(n)?!1:cs(n).position==="fixed"||L9(n,e)}function oxe(t,e){const n=e.get(t);if(n)return n;let r=qm(t,[],!1).filter(a=>ui(a)&&lh(a)!=="body"),i=null;const o=cs(t).position==="fixed";let s=o?Fl(t):t;for(;ui(s)&&!Od(s);){const a=cs(s),l=WA(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ag(s)&&!l&&L9(t,s))?r=r.filter(u=>u!==s):i=a,s=Fl(s)}return e.set(t,r),r}function sxe(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const s=[...n==="clippingAncestors"?W_(e)?[]:oxe(e,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=yO(e,u,i);return c.top=Ki(f.top,c.top),c.right=Dd(f.right,c.right),c.bottom=Dd(f.bottom,c.bottom),c.left=Ki(f.left,c.left),c},yO(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function axe(t){const{width:e,height:n}=I9(t);return{width:e,height:n}}function lxe(t,e,n){const r=ao(e),i=ea(e),o=n==="fixed",s=gu(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=$s(0);if(r||!r&&!o)if((lh(e)!=="body"||Ag(i))&&(a=H_(e)),r){const h=gu(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&(l.x=qA(i));const c=i&&!r&&!o?k9(i,a):$s(0),u=s.left+a.scrollLeft-l.x-c.x,f=s.top+a.scrollTop-l.y-c.y;return{x:u,y:f,width:s.width,height:s.height}}function yE(t){return cs(t).position==="static"}function xO(t,e){if(!ao(t)||cs(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ea(t)===n&&(n=n.ownerDocument.body),n}function O9(t,e){const n=io(t);if(W_(t))return n;if(!ao(t)){let i=Fl(t);for(;i&&!Od(i);){if(ui(i)&&!yE(i))return i;i=Fl(i)}return n}let r=xO(t,e);for(;r&&N1e(r)&&yE(r);)r=xO(r,e);return r&&Od(r)&&yE(r)&&!WA(r)?n:r||k1e(t)||n}const cxe=async function(t){const e=this.getOffsetParent||O9,n=this.getDimensions,r=await n(t.floating);return{reference:lxe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uxe(t){return cs(t).direction==="rtl"}const fxe={convertOffsetParentRelativeRectToViewportRelativeRect:exe,getDocumentElement:ea,getClippingRect:sxe,getOffsetParent:O9,getElementRects:cxe,getClientRects:txe,getDimensions:axe,getScale:dd,isElement:ui,isRTL:uxe};function dxe(t,e){let n=null,r;const i=ea(t);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:c,top:u,width:f,height:h}=t.getBoundingClientRect();if(a||e(),!f||!h)return;const m=Zf(u),v=Zf(i.clientWidth-(c+f)),x=Zf(i.clientHeight-(u+h)),y=Zf(c),b={rootMargin:-m+"px "+-v+"px "+-x+"px "+-y+"px",threshold:Ki(0,Dd(1,l))||1};let _=!0;function S(A){const P=A[0].intersectionRatio;if(P!==l){if(!_)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}_=!1}try{n=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(t)}return s(!0),o}function YA(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=XA(t),u=i||o?[...c?qm(c):[],...qm(e)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const f=c&&a?dxe(c,n):null;let h=-1,m=null;s&&(m=new ResizeObserver(g=>{let[b]=g;b&&b.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var _;(_=m)==null||_.observe(e)})),n()}),c&&!l&&m.observe(c),m.observe(e));let v,x=l?gu(t):null;l&&y();function y(){const g=gu(t);x&&(g.x!==x.x||g.y!==x.y||g.width!==x.width||g.height!==x.height)&&n(),x=g,v=requestAnimationFrame(y)}return n(),()=>{var g;u.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),f==null||f(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(v)}}const hxe=Y1e,pxe=K1e,mxe=Z1e,gxe=(t,e,n)=>{const r=new Map,i={platform:fxe,...n},o={...i.platform,_c:r};return X1e(t,e,{...i,platform:o})};var $y=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Lx(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Lx(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!Lx(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function D9(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function bO(t,e){const n=D9(t);return Math.round(e*n)/n}function xE(t){const e=T.useRef(t);return $y(()=>{e.current=t}),e}function vxe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=T.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,m]=T.useState(r);Lx(h,r)||m(r);const[v,x]=T.useState(null),[y,g]=T.useState(null),b=T.useCallback(F=>{F!==P.current&&(P.current=F,x(F))},[]),_=T.useCallback(F=>{F!==R.current&&(R.current=F,g(F))},[]),S=o||v,A=s||y,P=T.useRef(null),R=T.useRef(null),L=T.useRef(u),k=l!=null,C=xE(l),N=xE(i),z=xE(c),D=T.useCallback(()=>{if(!P.current||!R.current)return;const F={placement:e,strategy:n,middleware:h};N.current&&(F.platform=N.current),gxe(P.current,R.current,F).then(q=>{const K={...q,isPositioned:z.current!==!1};B.current&&!Lx(L.current,K)&&(L.current=K,Vl.flushSync(()=>{f(K)}))})},[h,e,n,N,z]);$y(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[c]);const B=T.useRef(!1);$y(()=>(B.current=!0,()=>{B.current=!1}),[]),$y(()=>{if(S&&(P.current=S),A&&(R.current=A),S&&A){if(C.current)return C.current(S,A,D);D()}},[S,A,D,C,k]);const G=T.useMemo(()=>({reference:P,floating:R,setReference:b,setFloating:_}),[b,_]),X=T.useMemo(()=>({reference:S,floating:A}),[S,A]),Z=T.useMemo(()=>{const F={position:n,left:0,top:0};if(!X.floating)return F;const q=bO(X.floating,u.x),K=bO(X.floating,u.y);return a?{...F,transform:"translate("+q+"px, "+K+"px)",...D9(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:K}},[n,a,X.floating,u.x,u.y]);return T.useMemo(()=>({...u,update:D,refs:G,elements:X,floatingStyles:Z}),[u,D,G,X,Z])}const KA=(t,e)=>({...hxe(t),options:[t,e]}),ZA=(t,e)=>({...pxe(t),options:[t,e]}),yxe=(t,e)=>({...mxe(t),options:[t,e]}),F9={...Yp},xxe=F9.useInsertionEffect,bxe=xxe||(t=>t());function jC(t){const e=T.useRef(()=>{});return bxe(()=>{e.current=t}),T.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i=t.current.length}function bE(t,e){return qr(t,{disabledIndices:e})}function _O(t,e){return qr(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function qr(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=e===void 0?{}:e;const s=t.current,a=i?c=>i.includes(c):c=>{const u=s[c];return u==null||u.hasAttribute("disabled")||u.getAttribute("aria-disabled")==="true"};let l=n;do l+=r?-o:o;while(l>=0&&l<=s.length-1&&a(l));return l}function _xe(t,e){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=e,f=c;if(n.key===JA){if(u&&Eo(n),c===-1)f=l;else if(f=qr(t,{startingIndex:f,amount:o,decrement:!0,disabledIndices:s}),i&&(c-oh?v:v-o}Gp(t,f)&&(f=c)}if(n.key===Ng&&(u&&Eo(n),c===-1?f=a:(f=qr(t,{startingIndex:c,amount:o,disabledIndices:s}),i&&c+o>l&&(f=qr(t,{startingIndex:c%o-o,amount:o,disabledIndices:s}))),Gp(t,f)&&(f=c)),r==="both"){const h=Zf(c/o);n.key===ch&&(u&&Eo(n),c%o!==o-1?(f=qr(t,{startingIndex:c,disabledIndices:s}),i&&cy(f,o,h)&&(f=qr(t,{startingIndex:c-c%o-1,disabledIndices:s}))):i&&(f=qr(t,{startingIndex:c-c%o-1,disabledIndices:s})),cy(f,o,h)&&(f=c)),n.key===Fd&&(u&&Eo(n),c%o!==0?(f=qr(t,{startingIndex:c,disabledIndices:s,decrement:!0}),i&&cy(f,o,h)&&(f=qr(t,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:s}))):i&&(f=qr(t,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:s})),cy(f,o,h)&&(f=c));const m=Zf(l/o)===h;Gp(t,f)&&(i&&m?f=n.key===Fd?l:qr(t,{startingIndex:c-c%o-1,disabledIndices:s}):f=c)}return f}function wxe(t,e,n){const r=[];let i=0;return t.forEach((o,s)=>{let{width:a,height:l}=o,c=!1;for(n&&(i=0);!c;){const u=[];for(let f=0;fr[f]==null)?(u.forEach(f=>{r[f]=s}),c=!0):i++}}),[...r]}function Sxe(t,e,n,r,i){if(t===-1)return-1;const o=n.indexOf(t);switch(i){case"tl":return o;case"tr":return o+e[t].width-1;case"bl":return o+(e[t].height-1)*r;case"br":return n.lastIndexOf(t)}}function Mxe(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}let wO=0;function SO(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=e;r&&cancelAnimationFrame(wO);const o=()=>t==null?void 0:t.focus({preventScroll:n});i?o():wO=requestAnimationFrame(o)}var Ei=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Exe(t,e){const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function Cxe(t,e){if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(r!==e.get(n))return!1;return!0}const z9=T.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Txe(t){const{children:e,elementsRef:n,labelsRef:r}=t,[i,o]=T.useState(()=>new Map),s=T.useCallback(l=>{o(c=>new Map(c).set(l,null))},[]),a=T.useCallback(l=>{o(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ei(()=>{const l=new Map(i);Array.from(l.keys()).sort(Exe).forEach((u,f)=>{l.set(u,f)}),Cxe(i,l)||o(l)},[i]),T.createElement(z9.Provider,{value:T.useMemo(()=>({register:s,unregister:a,map:i,elementsRef:n,labelsRef:r}),[s,a,i,n,r])},e)}function Rxe(t){t===void 0&&(t={});const{label:e}=t,{register:n,unregister:r,map:i,elementsRef:o,labelsRef:s}=T.useContext(z9),[a,l]=T.useState(null),c=T.useRef(null),u=T.useCallback(f=>{if(c.current=f,a!==null&&(o.current[a]=f,s)){var h;const m=e!==void 0;s.current[a]=m?e:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,o,s,e]);return Ei(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),Ei(()=>{const f=c.current?i.get(c.current):null;f!=null&&l(f)},[i]),T.useMemo(()=>({ref:u,index:a??-1}),[a,u])}let MO=!1,Axe=0;const EO=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Axe++;function Pxe(){const[t,e]=T.useState(()=>MO?EO():void 0);return Ei(()=>{t==null&&e(EO())},[]),T.useEffect(()=>{MO=!0},[]),t}const Ixe=F9.useId,Nxe=Ixe||Pxe;function kxe(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(i=>i(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(i=>i!==n))||[])}}}const Lxe=T.createContext(null),Oxe=T.createContext(null),U9=()=>{var t;return((t=T.useContext(Lxe))==null?void 0:t.id)||null},B9=()=>T.useContext(Oxe);function uy(t){const e=T.useRef(t);return Ei(()=>{e.current=t}),e}function Dxe(t,e){let n=t.filter(i=>{var o;return i.parentId===e&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=t.filter(i=>{var o;return(o=r)==null?void 0:o.some(s=>{var a;return i.parentId===s.id&&((a=i.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function Fxe(t,e){let n,r=-1;function i(o,s){s>r&&(n=o,r=s),Dxe(t,o).forEach(l=>{i(l.id,s+1)})}return i(e,0),t.find(o=>o.id===n)}function CO(t){return ao(t.target)&&t.target.tagName==="BUTTON"}function TO(t){return R9(t)}function QA(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=t,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=e,f=T.useRef(),h=T.useRef(!1);return T.useMemo(()=>s?{reference:{onPointerDown(m){f.current=m.pointerType},onMouseDown(m){m.button===0&&(mO(f.current)&&c||a!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){if(a==="mousedown"&&f.current){f.current=void 0;return}mO(f.current)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){f.current=void 0,!(m.defaultPrevented||!u||CO(m))&&(m.key===" "&&!TO(o)&&(m.preventDefault(),h.current=!0),m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||CO(m)||TO(o)||m.key===" "&&h.current&&(h.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}}:{},[s,i,a,c,u,o,l,n,r])}function zxe(t){const{open:e=!1,onOpenChange:n,elements:r}=t,i=Nxe(),o=T.useRef({}),[s]=T.useState(()=>kxe()),a=U9()!=null,[l,c]=T.useState(r.reference),u=jC((m,v,x)=>{o.current.openEvent=m?v:void 0,s.emit("openchange",{open:m,event:v,reason:x,nested:a}),n==null||n(m,v,x)}),f=T.useMemo(()=>({setPositionReference:c}),[]),h=T.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return T.useMemo(()=>({dataRef:o,open:e,onOpenChange:u,elements:h,events:s,floatingId:i,refs:f}),[e,u,h,s,i,f])}function eP(t){t===void 0&&(t={});const{nodeId:e}=t,n=zxe({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,i=r.elements,[o,s]=T.useState(null),[a,l]=T.useState(null),u=(i==null?void 0:i.reference)||o,f=T.useRef(null),h=B9();Ei(()=>{u&&(f.current=u)},[u]);const m=vxe({...t,elements:{...i,...a&&{reference:a}}}),v=T.useCallback(_=>{const S=ui(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;l(S),m.refs.setReference(S)},[m.refs]),x=T.useCallback(_=>{(ui(_)||_===null)&&(f.current=_,s(_)),(ui(m.refs.reference.current)||m.refs.reference.current===null||_!==null&&!ui(_))&&m.refs.setReference(_)},[m.refs]),y=T.useMemo(()=>({...m.refs,setReference:x,setPositionReference:v,domReference:f}),[m.refs,x,v]),g=T.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),b=T.useMemo(()=>({...m,...r,refs:y,elements:g,nodeId:e}),[m,y,g,e,r]);return Ei(()=>{r.dataRef.current.floatingContext=b;const _=h==null?void 0:h.nodesRef.current.find(S=>S.id===e);_&&(_.context=b)}),T.useMemo(()=>({...m,context:b,refs:y,elements:g}),[m,y,g,b])}const RO="active",AO="selected";function _E(t,e,n){const r=new Map,i=n==="item";let o=t;if(i&&t){const{[RO]:s,[AO]:a,...l}=t;o=l}return{...n==="floating"&&{tabIndex:-1},...o,...e.map(s=>{const a=s?s[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(i&&[RO,AO].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),s[c]=function(){for(var h,m=arguments.length,v=new Array(m),x=0;xy(...v)).find(y=>y!==void 0)}}}else s[c]=u}),s),{})}}function tP(t){t===void 0&&(t=[]);const e=t,n=T.useCallback(o=>_E(o,t,"reference"),e),r=T.useCallback(o=>_E(o,t,"floating"),e),i=T.useCallback(o=>_E(o,t,"item"),t.map(o=>o==null?void 0:o.item));return T.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let PO=!1;function X_(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function IO(t,e){return X_(e,t===JA||t===Ng,t===Fd||t===ch)}function wE(t,e,n){return X_(e,t===Ng,n?t===Fd:t===ch)||t==="Enter"||t===" "||t===""}function Uxe(t,e,n){return X_(e,n?t===Fd:t===ch,t===Ng)}function NO(t,e,n){return X_(e,n?t===ch:t===Fd,t===JA)}function Bxe(t,e){const{open:n,onOpenChange:r,elements:{domReference:i,floating:o}}=t,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:f=!1,loop:h=!1,nested:m=!1,rtl:v=!1,virtual:x=!1,focusItemOnOpen:y="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:_=void 0,orientation:S="vertical",cols:A=1,scrollItemIntoView:P=!0,virtualItemRef:R,itemSizes:L,dense:k=!1}=e,C=U9(),N=B9(),z=jC(l),D=T.useRef(y),B=T.useRef(u??-1),G=T.useRef(null),X=T.useRef(!0),Z=T.useRef(z),F=T.useRef(!!o),q=T.useRef(!1),K=T.useRef(!1),Q=uy(_),de=uy(n),fe=uy(P),J=uy(o),[ce,_e]=T.useState(),[be,Xe]=T.useState(),$e=jC(function(se,ae,W){W===void 0&&(W=!1);const Ie=se.current[ae.current];Ie&&(x?(_e(Ie.id),N==null||N.events.emit("virtualfocus",Ie),R&&(R.current=Ie)):SO(Ie,{preventScroll:!0,sync:z1e()&&F1e()?PO||q.current:!1}),requestAnimationFrame(()=>{const Re=fe.current;Re&&Ie&&(W||!X.current)&&(Ie.scrollIntoView==null||Ie.scrollIntoView(typeof Re=="boolean"?{block:"nearest",inline:"nearest"}:Re))}))});Ei(()=>{document.createElement("div").focus({get preventScroll(){return PO=!0,!1}})},[]),Ei(()=>{c&&(n&&o?D.current&&u!=null&&(K.current=!0,B.current=u,z(u)):F.current&&(B.current=-1,Z.current(null)))},[c,n,o,u,z]),Ei(()=>{if(c&&n&&o)if(a==null){if(q.current=!1,u!=null)return;if(F.current&&(B.current=-1,$e(s,B)),!F.current&&D.current&&(G.current!=null||D.current===!0&&G.current==null)){let se=0;const ae=()=>{s.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(ae),se++):(B.current=G.current==null||wE(G.current,S,v)||m?bE(s,Q.current):_O(s,Q.current),G.current=null,z(B.current))};ae()}}else Gp(s,a)||(B.current=a,$e(s,B,K.current),K.current=!1)},[c,n,o,a,u,m,s,S,v,z,$e,Q]),Ei(()=>{var se;if(!c||o||!N||x||!F.current)return;const ae=N.nodesRef.current,W=(se=ae.find(De=>De.id===C))==null||(se=se.context)==null?void 0:se.elements.floating,Ie=pO(B1e(o)),Re=ae.some(De=>De.context&&L1e(De.context.elements.floating,Ie));W&&!Re&&X.current&&W.focus({preventScroll:!0})},[c,o,N,C,x]),Ei(()=>{if(!c||!N||!x||C)return;function se(ae){Xe(ae.id),R&&(R.current=ae)}return N.events.on("virtualfocus",se),()=>{N.events.off("virtualfocus",se)}},[c,N,x,C,R]),Ei(()=>{Z.current=z,F.current=!!o}),Ei(()=>{n||(G.current=null)},[n]);const tt=a!=null,Ve=T.useMemo(()=>{function se(W){if(!n)return;const Ie=s.current.indexOf(W);Ie!==-1&&z(Ie)}return{onFocus(W){let{currentTarget:Ie}=W;se(Ie)},onClick:W=>{let{currentTarget:Ie}=W;return Ie.focus({preventScroll:!0})},...g&&{onMouseMove(W){let{currentTarget:Ie}=W;se(Ie)},onPointerLeave(W){let{pointerType:Ie}=W;!X.current||Ie==="touch"||(B.current=-1,$e(s,B),z(null),x||SO(J.current,{preventScroll:!0}))}}}},[n,J,$e,g,s,z,x]);return T.useMemo(()=>{if(!c)return{};const se=Q.current;function ae(he){if(X.current=!1,q.current=!0,!de.current&&he.currentTarget===J.current)return;if(m&&NO(he.key,S,v)){Eo(he),r(!1,he.nativeEvent,"list-navigation"),ao(i)&&!x&&i.focus();return}const qe=B.current,Le=bE(s,se),V=_O(s,se);if(he.key==="Home"&&(Eo(he),B.current=Le,z(B.current)),he.key==="End"&&(Eo(he),B.current=V,z(B.current)),A>1){const U=L||Array.from({length:s.current.length},()=>({width:1,height:1})),ne=wxe(U,A,k),le=ne.findIndex(ve=>ve!=null&&!(se!=null&&se.includes(ve))),Ce=ne.reduce((ve,He,Ae)=>He!=null&&!(se!=null&&se.includes(He))?Ae:ve,-1);if(B.current=ne[_xe({current:ne.map(ve=>ve!=null?s.current[ve]:null)},{event:he,orientation:S,loop:h,cols:A,disabledIndices:Mxe([...se||[],void 0],ne),minIndex:le,maxIndex:Ce,prevIndex:Sxe(B.current,U,ne,A,he.key===Ng?"bl":he.key===ch?"tr":"tl"),stopEvent:!0})],z(B.current),S==="both")return}if(IO(he.key,S)){if(Eo(he),n&&!x&&pO(he.currentTarget.ownerDocument)===he.currentTarget){B.current=wE(he.key,S,v)?Le:V,z(B.current);return}wE(he.key,S,v)?h?B.current=qe>=V?f&&qe!==s.current.length?-1:Le:qr(s,{startingIndex:qe,disabledIndices:se}):B.current=Math.min(V,qr(s,{startingIndex:qe,disabledIndices:se})):h?B.current=qe<=Le?f&&qe!==-1?s.current.length:V:qr(s,{startingIndex:qe,decrement:!0,disabledIndices:se}):B.current=Math.max(Le,qr(s,{startingIndex:qe,decrement:!0,disabledIndices:se})),Gp(s,B.current)?z(null):z(B.current)}}function W(he){y==="auto"&&O1e(he.nativeEvent)&&(D.current=!0)}function Ie(he){D.current=y,y==="auto"&&D1e(he.nativeEvent)&&(D.current=!0)}const Re=x&&n&&tt&&{"aria-activedescendant":be||ce},De=s.current.find(he=>(he==null?void 0:he.id)===ce);return{reference:{...Re,onKeyDown(he){X.current=!1;const qe=he.key.indexOf("Arrow")===0,Le=Uxe(he.key,S,v),V=NO(he.key,S,v),U=IO(he.key,S),ne=(m?Le:U)||he.key==="Enter"||he.key.trim()==="";if(x&&n){const He=N==null?void 0:N.nodesRef.current.find(Ee=>Ee.parentId==null),Ae=N&&He?Fxe(N.nodesRef.current,He.id):null;if(qe&&Ae&&R){const Ee=new KeyboardEvent("keydown",{key:he.key,bubbles:!0});if(Le||V){var le,Ce;const bt=((le=Ae.context)==null?void 0:le.elements.domReference)===he.currentTarget,ke=V&&!bt?(Ce=Ae.context)==null?void 0:Ce.elements.domReference:Le?De:null;ke&&(Eo(he),ke.dispatchEvent(Ee),Xe(void 0))}if(U&&Ae.context&&Ae.context.open&&Ae.parentId&&he.currentTarget!==Ae.context.elements.domReference){var ve;Eo(he),(ve=Ae.context.elements.domReference)==null||ve.dispatchEvent(Ee);return}}return ae(he)}if(!(!n&&!b&&qe)){if(ne&&(G.current=m&&U?null:he.key),m){Le&&(Eo(he),n?(B.current=bE(s,se),z(B.current)):r(!0,he.nativeEvent,"list-navigation"));return}U&&(u!=null&&(B.current=u),Eo(he),!n&&b?r(!0,he.nativeEvent,"list-navigation"):ae(he),n&&z(B.current))}},onFocus(){n&&z(null)},onPointerDown:Ie,onMouseDown:W,onClick:W},floating:{"aria-orientation":S==="both"?void 0:S,...!V1e(i)&&Re,onKeyDown:ae,onPointerMove(){X.current=!0}},item:Ve}},[i,J,ce,be,Q,de,s,c,S,v,x,n,tt,m,u,b,f,A,h,y,z,r,Ve,N,R,L,k])}var j9={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},kO=St.createContext&&St.createContext(j9),jxe=["attr","size","title"];function Vxe(t,e){if(t==null)return{};var n=$xe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function $xe(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 Ox(){return Ox=Object.assign?Object.assign.bind():function(t){for(var e=1;eSt.createElement(e.tag,Dx({key:n},e.attr),V9(e.child)))}function hs(t){return e=>St.createElement(Xxe,Ox({attr:Dx({},t.attr)},e),V9(t.child))}function Xxe(t){var e=n=>{var{attr:r,size:i,title:o}=t,s=Vxe(t,jxe),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),St.createElement("svg",Ox({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:Dx(Dx({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&St.createElement("title",null,o),t.children)};return kO!==void 0?St.createElement(kO.Consumer,null,n=>e(n)):e(j9)}function qxe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12.01",y2:"16"},child:[]}]})(t)}function Yxe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(t)}function Kxe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 10 20 15 15 20"},child:[]},{tag:"path",attr:{d:"M4 4v7a4 4 0 0 0 4 4h12"},child:[]}]})(t)}function Zxe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(t)}function Jxe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(t)}function Qxe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"4.93",y1:"4.93",x2:"19.07",y2:"19.07"},child:[]}]})(t)}function ebe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(t)}function tbe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"},child:[]}]})(t)}function nbe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"},child:[]}]})(t)}function rbe(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 11H1v2h6v-2zm2.17-3.24L7.05 5.64 5.64 7.05l2.12 2.12 1.41-1.41zM13 1h-2v6h2V1zm5.36 6.05-1.41-1.41-2.12 2.12 1.41 1.41 2.12-2.12zM17 11v2h6v-2h-6zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24 2.12 2.12 1.41-1.41-2.12-2.12-1.41 1.41zm-9.19.71 1.41 1.41 2.12-2.12-1.41-1.41-2.12 2.12zM11 23h2v-6h-2v6z"},child:[]}]})(t)}function $9(t){return hs({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 10 5 5 5-5z"},child:[]}]})(t)}var W9=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i0},t.prototype.connect_=function(){!VC||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),cbe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!VC||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=lbe.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),H9=function(t,e){for(var n=0,r=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof zd(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new ybe(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof zd(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new xbe(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),X9=typeof WeakMap<"u"?new WeakMap:new W9,q9=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=ube.getInstance(),r=new bbe(e,n,this);X9.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){q9.prototype[t]=function(){var e;return(e=X9.get(this))[t].apply(e,arguments)}});var _be=function(){return typeof Fx.ResizeObserver<"u"?Fx.ResizeObserver:q9}(),wbe=["client","offset","scroll","bounds","margin"];function DO(t){var e=[];return wbe.forEach(function(n){t[n]&&e.push(n)}),e}function FO(t,e){var n={};if(e.indexOf("client")>-1&&(n.client={top:t.clientTop,left:t.clientLeft,width:t.clientWidth,height:t.clientHeight}),e.indexOf("offset")>-1&&(n.offset={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}),e.indexOf("scroll")>-1&&(n.scroll={top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}),e.indexOf("bounds")>-1){var r=t.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(e.indexOf("margin")>-1){var i=getComputedStyle(t);n.margin={top:i?parseInt(i.marginTop):0,right:i?parseInt(i.marginRight):0,bottom:i?parseInt(i.marginBottom):0,left:i?parseInt(i.marginLeft):0}}return n}function Sbe(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||window}function Mbe(t){return function(e){var n,r;return r=n=function(i){yR(o,i);function o(){for(var a,l=arguments.length,c=new Array(l),u=0;u{let e;const n=new Set,r=(u,f)=>{const h=typeof u=="function"?u(e):u;if(!Object.is(h,e)){const m=e;e=f??(typeof h!="object"||h===null)?h:Object.assign({},e,h),n.forEach(v=>v(e,m))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(Ebe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},Cbe=t=>t?zO(t):zO;var Y9={exports:{}},K9={},Z9={exports:{}},J9={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -4053,7 +4053,7 @@ No matching component was found for: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Ud=T;function Tbe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Rbe=typeof Object.is=="function"?Object.is:Tbe,Abe=Ud.useState,Pbe=Ud.useEffect,Ibe=Ud.useLayoutEffect,Nbe=Ud.useDebugValue;function kbe(t,e){var n=e(),r=Abe({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Ibe(function(){i.value=n,i.getSnapshot=e,_E(i)&&o({inst:i})},[t,n,e]),Pbe(function(){return _E(i)&&o({inst:i}),t(function(){_E(i)&&o({inst:i})})},[t]),Nbe(n),n}function _E(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Rbe(t,n)}catch{return!0}}function Lbe(t,e){return e()}var Obe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Lbe:kbe;J9.useSyncExternalStore=Ud.useSyncExternalStore!==void 0?Ud.useSyncExternalStore:Obe;Z9.exports=J9;var Dbe=Z9.exports;/** + */var Ud=T;function Tbe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Rbe=typeof Object.is=="function"?Object.is:Tbe,Abe=Ud.useState,Pbe=Ud.useEffect,Ibe=Ud.useLayoutEffect,Nbe=Ud.useDebugValue;function kbe(t,e){var n=e(),r=Abe({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Ibe(function(){i.value=n,i.getSnapshot=e,SE(i)&&o({inst:i})},[t,n,e]),Pbe(function(){return SE(i)&&o({inst:i}),t(function(){SE(i)&&o({inst:i})})},[t]),Nbe(n),n}function SE(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Rbe(t,n)}catch{return!0}}function Lbe(t,e){return e()}var Obe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Lbe:kbe;J9.useSyncExternalStore=Ud.useSyncExternalStore!==void 0?Ud.useSyncExternalStore:Obe;Z9.exports=J9;var Dbe=Z9.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -4061,14 +4061,14 @@ No matching component was found for: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var X_=T,Fbe=Dbe;function zbe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ube=typeof Object.is=="function"?Object.is:zbe,Bbe=Fbe.useSyncExternalStore,jbe=X_.useRef,Vbe=X_.useEffect,$be=X_.useMemo,Wbe=X_.useDebugValue;K9.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=jbe(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=$be(function(){function l(m){if(!c){if(c=!0,u=m,m=r(m),i!==void 0&&s.hasValue){var v=s.value;if(i(v,m))return f=v}return f=m}if(v=f,Ube(u,m))return v;var x=r(m);return i!==void 0&&i(v,x)?v:(u=m,f=x)}var c=!1,u,f,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,i]);var a=Bbe(t,o[0],o[1]);return Vbe(function(){s.hasValue=!0,s.value=a},[a]),Wbe(a),a};Y9.exports=K9;var Hbe=Y9.exports;const Gbe=Xs(Hbe),Q9={BASE_URL:"/webxdiviewer/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_XDI_REPO_LOCATION:"NSLS-II-BMM/bmm-standards"},{useDebugValue:Xbe}=St,{useSyncExternalStoreWithSelector:qbe}=Gbe;let UO=!1;const Ybe=t=>t;function Kbe(t,e=Ybe,n){(Q9?"production":void 0)!=="production"&&n&&!UO&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),UO=!0);const r=qbe(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Xbe(r),r}const BO=t=>{(Q9?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?Cbe(t):t,n=(r,i)=>Kbe(e,r,i);return Object.assign(n,e),n},Zbe=t=>t?BO(t):BO;var Jbe=Object.defineProperty,Qbe=(t,e,n)=>e in t?Jbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bp=(t,e,n)=>(Qbe(t,typeof e!="symbol"?e+"":e,n),n);const rP=T.createContext({}),e_e=T.createContext(void 0),t_e="_wrapper_9665499",n_e="_grid_5146261",r_e="_innerContainer_27a3adb",i_e="_colHeaders_a985f35",o_e="_rowHeaders_63b4056",s_e="_indexCell_080a16e",a_e="_stickyGrid_33fa7fa",l_e="_cell_2658e21",c_e="_topLeftCell_e826718 _indexCell_080a16e",Rc={wrapper:t_e,grid:n_e,innerContainer:r_e,colHeaders:i_e,rowHeaders:o_e,indexCell:s_e,stickyGrid:a_e,cell:l_e,topLeftCell:c_e};function u_e(t){const{rowIndex:e,columnIndex:n,style:r}=t,{rowHeaderCellsWidth:i,cellSize:o,cellFormatter:s}=T.useContext(rP);return E.jsx("div",{className:Rc.cell,style:{...r,left:r.left+i,top:r.top+o.height},role:"cell","aria-rowindex":e,"aria-colindex":n,"data-bg":(e+n)%2===1||void 0,children:s(e,n)})}T.memo(u_e);function jO(t){const{indexMin:e,indexMax:n,width:r,transform:i,headers:o}=t,{cellSize:s}=T.useContext(rP);return Z6(e,n+1).map(a=>E.jsx("div",{className:Rc.indexCell,style:{width:r||s.width,height:s.height,transform:i},"data-bg":a%2===1?"":void 0,children:a>=0&&o?o[a]:a},a.toString()))}const f_e=T.forwardRef((t,e)=>{const{children:n,style:r}=t,{rowCount:i,columnCount:o,cellSize:s,sticky:a,rowHeaderCellsWidth:l,columnHeaders:c}=T.useContext(rP),u=T.useContext(e_e),{overscanColumnStartIndex:f=0,overscanColumnStopIndex:h=0,overscanRowStartIndex:m=0,overscanRowStopIndex:v=0}=u||{};return E.jsxs("div",{ref:e,className:Rc.stickyGrid,style:{...r,width:r.width+l,height:r.height+s.height},role:"table","aria-rowcount":i,"aria-colcount":o,"data-sticky":a||void 0,children:[E.jsxs("div",{className:Rc.colHeaders,children:[E.jsx("div",{className:Rc.topLeftCell,style:{width:l,height:s.height},"data-bg":!0,"aria-hidden":"true"}),E.jsx(jO,{indexMin:f,indexMax:h,transform:`translateX(${s.width*f}px)`,headers:c})]}),E.jsxs("div",{className:Rc.innerContainer,children:[E.jsx("div",{className:Rc.rowHeaders,"aria-hidden":"true",children:E.jsx(jO,{indexMin:m,indexMax:v,transform:`translateY(${s.height*m}px)`,width:l})}),n]})]})});f_e.displayName="StickyGrid";var Ec=(t=>(t.Bool="Boolean",t.Integer="Integer",t.Unsigned="Integer (unsigned)",t.Float="Float",t.Complex="Complex",t.String="String",t.Compound="Compound",t.Array="Array",t.VLen="Array (variable length)",t.Enum="Enumeration",t.Time="Time",t.Bitfield="Bitfield",t.Opaque="Opaque",t.Reference="Reference",t.Unknown="Unknown",t))(Ec||{}),Xt=(t=>(t.Linear="linear",t.Log="log",t.SymLog="symlog",t.Sqrt="sqrt",t.Gamma="gamma",t))(Xt||{}),$y=(t=>(t.Phase="phase",t.Amplitude="amplitude",t.PhaseAmplitude="phase-amplitude",t))($y||{});Xt.Linear,Xt.Log,Xt.SymLog;Xt.Linear,Xt.Log,Xt.SymLog,Xt.Sqrt;const VO=Ks(".3~e"),wE=Ks(".5~e");Ks(".5~g");Ks(".3~g");m_e(".12~g");const iP=3,d_e=/0\.([0-9]+)$/u,h_e=Ks(`.${iP}~g`),p_e=Ks(`.${iP}~e`);function SE(t){const e=h_e(t),n=d_e.exec(e);return n&&n[1].length>iP?p_e(t):e}function m_e(t,e=!1){const n=Ks(t);return r=>{const[i,o]=r;if(o===0&&!e)return`${n(i)}`;if(i===0&&!e)return`${n(o)} i`;const s=Math.sign(o)>=0?" + ":" − ";return`${n(i)}${s}${n(Math.abs(o))} i`}}function VC(t){return __e(t)?t.data:t}function ME(t,e){const{min:n,max:r,positiveMin:i,strictPositiveMin:o}=t;return{min:Math.min(e,n),max:Math.max(e,r),positiveMin:e>=0?Math.min(e,i):i,strictPositiveMin:e>0?Math.min(e,o):o}}function g_e(t,e,n){const r=VC(t),i=e&&VC(e);b_e(e,r.length,"error");const o=r.reduce((s,a,l)=>{if(!Number.isFinite(a)||n!=null&&n(a))return s;const c=ME(s,a),u=i==null?void 0:i[l];return u?ME(ME(c,a-u),a+u):c},{min:1/0,max:-1/0,positiveMin:1/0,strictPositiveMin:1/0});return Number.isFinite(o.min)?o:void 0}function v_e(t,e){if(t===void 0)return;const{min:n,max:r,positiveMin:i,strictPositiveMin:o}=t;return e===Xt.Log&&n*r<=0?Number.isFinite(o)?[o,r]:void 0:e===Xt.Sqrt&&n*r<0?[i,r]:[n,r]}function y_e(t){const[e,n]=t.shape;return{rows:e,cols:n}}function $C(t){return Array.isArray(t)?t:[t]}Ec.Unsigned,Ec.Integer,Ec.Float,Ec.String,Ec.Bool,Ec.Complex;function e7(t){return t!==void 0}function x_e(t){return t!==null}function Wy(t,e="Expected some value"){if(!e7(t))throw new TypeError(e)}function EE(t,e="Expected value to not be null"){if(!x_e(t))throw new TypeError(e)}function b_e(t,e,n){if(!t)return;const{length:r}=VC(t);if(r!==e)throw new Error(`Expected ${n} array to have length ${e} instead of ${r}`)}function __e(t){return"data"in t}const w_e=new H(0,0,0);class Jf extends kr{get size(){const{x:e,y:n}=this.getSize(new H);return{width:e,height:n}}get center(){return this.getCenter(new H)}static empty(e=w_e){return new Jf(e.clone(),e.clone())}static fromPoints(...e){return new Jf().setFromPoints(e)}static fromSize({width:e,height:n}){return Jf.empty().expandBySize(e,n)}clampPoint(e){return super.clampPoint(e,new H)}expandBySize(e,n){const{size:r}=this,i=e<0?Math.max(e,-r.width):e,o=n<0?Math.max(n,-r.height):n;return this.expandByVector(new H(i,o).divideScalar(2))}expandToRatio(e){if(e===void 0||e<=0)return this;const{width:n,height:r}=this.size,i=n/r;return e>i?this.expandBySize(r*e-n,0):this.expandBySize(0,n/e-r)}hasMinSize(e,n=e){const{width:r,height:i}=this.size;return r>=e&&i>=n}keepWithin(e){const{center:n,size:r}=this,{width:i,height:o}=e.size,s=Jf.empty(e.center).expandBySize(Math.max(i-r.width,0),Math.max(o-r.height,0)).clampPoint(n).sub(n).setZ(0);return this.translate(s)}toRect(){return[this.min,this.max]}}const zl=Jf;function $O(t,e){const n=e-t;return r=>n!==0?(r-t)/n:.5}function t7(t){let e=(t==null?void 0:t.domain)||[0,1],n=(t==null?void 0:t.range)||[0,1],r=(t==null?void 0:t.exponent)??1,i=(t==null?void 0:t.clamp)||!1,o=Ld,s;const a=function(R){const L=typeof R=="number"?R:R.valueOf();return Number.isNaN(L)?s:o(...n)($O(...e)(l(L))**r)};function l(R){if(!i)return R;const[L,k]=e;return Math.max(L,Math.min(k,R))}function c(R){return R?(e=R,P):[...e]}function u(R){return R?(n=R,P):[...n]}function f(R){return R?(n=R,o=IA,P):[...n]}function h(R){return R?(i=R,P):i}function m(){return s}function v(R){return R?(o=R,P):o}function x(R){return R?(r=R,P):r}function y(R){return l(Ld(...e)($O(...n)(R)**(1/r)))}function g(){return pme({domain:e,range:n,exponent:r,clamp:i})}function b(R){return e=g().nice(R).domain(),P}function _(R){return g().ticks(R)}function S(R,L){return g().tickFormat(R,L)}function A(){return t7().domain(e).range(n).exponent(r).clamp(i).interpolate(o)}const P=Object.assign(a,{domain:c,range:u,rangeRound:f,clamp:h,interpolate:v,invert:y,unknown:m,exponent:x,nice:b,ticks:_,tickFormat:S,copy:A});return P}const S_e=0,oP=1e3,n7=oP,M_e=n7-oP,Ci=M_e-1,E_e=[.1,1],C_e={left:80,right:24,top:16,bottom:34},T_e=28,WO=24;Xt.Linear+"",Xt.Log+"",Number.MIN_VALUE,Xt.SymLog+"",Xt.Sqrt+"",Xt.Gamma+"";const R_e=FA({domain:[300,900],range:[3,10],clamp:!0,round:!0}),A_e=FA({domain:[300,500],range:[.8,1.4]});function r7(t,e){if(Array.isArray(t)){const[,n]=t;return t7({...e,exponent:n})}switch(t){case Xt.Linear:return FA(e);case Xt.Log:return dme(e);case Xt.SymLog:return gme(e);case Xt.Sqrt:return yme(e)}throw new Error("Unknown scale type")}function P_e(t,e){const{width:n,height:r}=t;return e?n/r>e?{width:r*e,height:r}:{width:n,height:n/e}:{width:n,height:r}}function HO(t,e=Xt.Linear,n,r){const i=g_e(t,n,r);return v_e(i,e)}function I_e(t,e=[-Number.MAX_VALUE/2,Number.MAX_VALUE/2]){const[n,r]=e;return GU.clamp(t,n,r)}function GO(t,e){const{scaleType:n,visDomain:r,flip:i,nice:o=!1}=t;return r7(n??Xt.Linear,{domain:r,range:[-e/2,e/2],reverse:i,nice:o})}function N_e(t,e){const n=Math.min(...t),r=Math.max(...t),i=Math.ceil(n),o=Math.floor(r),s=o-i+1,a=Math.min(s,e);if(a===0)return[];const l=Math.max(K6(i,o,a),1),c=Math.ceil(n/l),u=Math.floor(r/l)-c+1;return Array.from({length:u},(f,h)=>(c+h)*l)}function k_e(t,e,n){if(n!==Xt.Log)return SE;const[r,i]=t[0]>0?t:[-t[1],-[t[0]]],o=A_e(e);return i/r<10**o?SE:s=>{const a=Math.log10(Math.abs(s.valueOf()));return a===Math.floor(a)?SE(s):""}}function XO(t){const e=t.filter(e7);if(e.length!==0)return e.reduce((n,r)=>[Math.min(n[0],r[0]),Math.max(n[1],r[1])])}function i7(t,e,n){if(t==="auto")return;if(t==="equal")return i7(1,e,n);const[r,i]=e,[o,s]=n;return Math.abs(i-r)/Math.abs(s-o)/t}function L_e(t={}){const{left:e,right:n,top:r,bottom:i}=C_e;return{left:e+(t.left?WO:0),right:n,top:r+(t.top?T_e:0),bottom:i+(t.bottom?WO:0)}}const O_e=` + */var Y_=T,Fbe=Dbe;function zbe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ube=typeof Object.is=="function"?Object.is:zbe,Bbe=Fbe.useSyncExternalStore,jbe=Y_.useRef,Vbe=Y_.useEffect,$be=Y_.useMemo,Wbe=Y_.useDebugValue;K9.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=jbe(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=$be(function(){function l(m){if(!c){if(c=!0,u=m,m=r(m),i!==void 0&&s.hasValue){var v=s.value;if(i(v,m))return f=v}return f=m}if(v=f,Ube(u,m))return v;var x=r(m);return i!==void 0&&i(v,x)?v:(u=m,f=x)}var c=!1,u,f,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,i]);var a=Bbe(t,o[0],o[1]);return Vbe(function(){s.hasValue=!0,s.value=a},[a]),Wbe(a),a};Y9.exports=K9;var Hbe=Y9.exports;const Gbe=qs(Hbe),Q9={BASE_URL:"/webxdiviewer/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_XDI_REPO_LOCATION:"NSLS-II-BMM/bmm-standards"},{useDebugValue:Xbe}=St,{useSyncExternalStoreWithSelector:qbe}=Gbe;let UO=!1;const Ybe=t=>t;function Kbe(t,e=Ybe,n){(Q9?"production":void 0)!=="production"&&n&&!UO&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),UO=!0);const r=qbe(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Xbe(r),r}const BO=t=>{(Q9?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?Cbe(t):t,n=(r,i)=>Kbe(e,r,i);return Object.assign(n,e),n},Zbe=t=>t?BO(t):BO;var Jbe=Object.defineProperty,Qbe=(t,e,n)=>e in t?Jbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bp=(t,e,n)=>(Qbe(t,typeof e!="symbol"?e+"":e,n),n);const rP=T.createContext({}),e_e=T.createContext(void 0),t_e="_wrapper_9665499",n_e="_grid_5146261",r_e="_innerContainer_27a3adb",i_e="_colHeaders_a985f35",o_e="_rowHeaders_63b4056",s_e="_indexCell_080a16e",a_e="_stickyGrid_33fa7fa",l_e="_cell_2658e21",c_e="_topLeftCell_e826718 _indexCell_080a16e",Rc={wrapper:t_e,grid:n_e,innerContainer:r_e,colHeaders:i_e,rowHeaders:o_e,indexCell:s_e,stickyGrid:a_e,cell:l_e,topLeftCell:c_e};function u_e(t){const{rowIndex:e,columnIndex:n,style:r}=t,{rowHeaderCellsWidth:i,cellSize:o,cellFormatter:s}=T.useContext(rP);return E.jsx("div",{className:Rc.cell,style:{...r,left:r.left+i,top:r.top+o.height},role:"cell","aria-rowindex":e,"aria-colindex":n,"data-bg":(e+n)%2===1||void 0,children:s(e,n)})}T.memo(u_e);function jO(t){const{indexMin:e,indexMax:n,width:r,transform:i,headers:o}=t,{cellSize:s}=T.useContext(rP);return Z6(e,n+1).map(a=>E.jsx("div",{className:Rc.indexCell,style:{width:r||s.width,height:s.height,transform:i},"data-bg":a%2===1?"":void 0,children:a>=0&&o?o[a]:a},a.toString()))}const f_e=T.forwardRef((t,e)=>{const{children:n,style:r}=t,{rowCount:i,columnCount:o,cellSize:s,sticky:a,rowHeaderCellsWidth:l,columnHeaders:c}=T.useContext(rP),u=T.useContext(e_e),{overscanColumnStartIndex:f=0,overscanColumnStopIndex:h=0,overscanRowStartIndex:m=0,overscanRowStopIndex:v=0}=u||{};return E.jsxs("div",{ref:e,className:Rc.stickyGrid,style:{...r,width:r.width+l,height:r.height+s.height},role:"table","aria-rowcount":i,"aria-colcount":o,"data-sticky":a||void 0,children:[E.jsxs("div",{className:Rc.colHeaders,children:[E.jsx("div",{className:Rc.topLeftCell,style:{width:l,height:s.height},"data-bg":!0,"aria-hidden":"true"}),E.jsx(jO,{indexMin:f,indexMax:h,transform:`translateX(${s.width*f}px)`,headers:c})]}),E.jsxs("div",{className:Rc.innerContainer,children:[E.jsx("div",{className:Rc.rowHeaders,"aria-hidden":"true",children:E.jsx(jO,{indexMin:m,indexMax:v,transform:`translateY(${s.height*m}px)`,width:l})}),n]})]})});f_e.displayName="StickyGrid";var Ec=(t=>(t.Bool="Boolean",t.Integer="Integer",t.Unsigned="Integer (unsigned)",t.Float="Float",t.Complex="Complex",t.String="String",t.Compound="Compound",t.Array="Array",t.VLen="Array (variable length)",t.Enum="Enumeration",t.Time="Time",t.Bitfield="Bitfield",t.Opaque="Opaque",t.Reference="Reference",t.Unknown="Unknown",t))(Ec||{}),Xt=(t=>(t.Linear="linear",t.Log="log",t.SymLog="symlog",t.Sqrt="sqrt",t.Gamma="gamma",t))(Xt||{}),Wy=(t=>(t.Phase="phase",t.Amplitude="amplitude",t.PhaseAmplitude="phase-amplitude",t))(Wy||{});Xt.Linear,Xt.Log,Xt.SymLog;Xt.Linear,Xt.Log,Xt.SymLog,Xt.Sqrt;const VO=Zs(".3~e"),ME=Zs(".5~e");Zs(".5~g");Zs(".3~g");m_e(".12~g");const iP=3,d_e=/0\.([0-9]+)$/u,h_e=Zs(`.${iP}~g`),p_e=Zs(`.${iP}~e`);function EE(t){const e=h_e(t),n=d_e.exec(e);return n&&n[1].length>iP?p_e(t):e}function m_e(t,e=!1){const n=Zs(t);return r=>{const[i,o]=r;if(o===0&&!e)return`${n(i)}`;if(i===0&&!e)return`${n(o)} i`;const s=Math.sign(o)>=0?" + ":" − ";return`${n(i)}${s}${n(Math.abs(o))} i`}}function $C(t){return __e(t)?t.data:t}function CE(t,e){const{min:n,max:r,positiveMin:i,strictPositiveMin:o}=t;return{min:Math.min(e,n),max:Math.max(e,r),positiveMin:e>=0?Math.min(e,i):i,strictPositiveMin:e>0?Math.min(e,o):o}}function g_e(t,e,n){const r=$C(t),i=e&&$C(e);b_e(e,r.length,"error");const o=r.reduce((s,a,l)=>{if(!Number.isFinite(a)||n!=null&&n(a))return s;const c=CE(s,a),u=i==null?void 0:i[l];return u?CE(CE(c,a-u),a+u):c},{min:1/0,max:-1/0,positiveMin:1/0,strictPositiveMin:1/0});return Number.isFinite(o.min)?o:void 0}function v_e(t,e){if(t===void 0)return;const{min:n,max:r,positiveMin:i,strictPositiveMin:o}=t;return e===Xt.Log&&n*r<=0?Number.isFinite(o)?[o,r]:void 0:e===Xt.Sqrt&&n*r<0?[i,r]:[n,r]}function y_e(t){const[e,n]=t.shape;return{rows:e,cols:n}}function WC(t){return Array.isArray(t)?t:[t]}Ec.Unsigned,Ec.Integer,Ec.Float,Ec.String,Ec.Bool,Ec.Complex;function e7(t){return t!==void 0}function x_e(t){return t!==null}function Hy(t,e="Expected some value"){if(!e7(t))throw new TypeError(e)}function TE(t,e="Expected value to not be null"){if(!x_e(t))throw new TypeError(e)}function b_e(t,e,n){if(!t)return;const{length:r}=$C(t);if(r!==e)throw new Error(`Expected ${n} array to have length ${e} instead of ${r}`)}function __e(t){return"data"in t}const w_e=new H(0,0,0);class Jf extends kr{get size(){const{x:e,y:n}=this.getSize(new H);return{width:e,height:n}}get center(){return this.getCenter(new H)}static empty(e=w_e){return new Jf(e.clone(),e.clone())}static fromPoints(...e){return new Jf().setFromPoints(e)}static fromSize({width:e,height:n}){return Jf.empty().expandBySize(e,n)}clampPoint(e){return super.clampPoint(e,new H)}expandBySize(e,n){const{size:r}=this,i=e<0?Math.max(e,-r.width):e,o=n<0?Math.max(n,-r.height):n;return this.expandByVector(new H(i,o).divideScalar(2))}expandToRatio(e){if(e===void 0||e<=0)return this;const{width:n,height:r}=this.size,i=n/r;return e>i?this.expandBySize(r*e-n,0):this.expandBySize(0,n/e-r)}hasMinSize(e,n=e){const{width:r,height:i}=this.size;return r>=e&&i>=n}keepWithin(e){const{center:n,size:r}=this,{width:i,height:o}=e.size,s=Jf.empty(e.center).expandBySize(Math.max(i-r.width,0),Math.max(o-r.height,0)).clampPoint(n).sub(n).setZ(0);return this.translate(s)}toRect(){return[this.min,this.max]}}const zl=Jf;function $O(t,e){const n=e-t;return r=>n!==0?(r-t)/n:.5}function t7(t){let e=(t==null?void 0:t.domain)||[0,1],n=(t==null?void 0:t.range)||[0,1],r=(t==null?void 0:t.exponent)??1,i=(t==null?void 0:t.clamp)||!1,o=Ld,s;const a=function(R){const L=typeof R=="number"?R:R.valueOf();return Number.isNaN(L)?s:o(...n)($O(...e)(l(L))**r)};function l(R){if(!i)return R;const[L,k]=e;return Math.max(L,Math.min(k,R))}function c(R){return R?(e=R,P):[...e]}function u(R){return R?(n=R,P):[...n]}function f(R){return R?(n=R,o=IA,P):[...n]}function h(R){return R?(i=R,P):i}function m(){return s}function v(R){return R?(o=R,P):o}function x(R){return R?(r=R,P):r}function y(R){return l(Ld(...e)($O(...n)(R)**(1/r)))}function g(){return pme({domain:e,range:n,exponent:r,clamp:i})}function b(R){return e=g().nice(R).domain(),P}function _(R){return g().ticks(R)}function S(R,L){return g().tickFormat(R,L)}function A(){return t7().domain(e).range(n).exponent(r).clamp(i).interpolate(o)}const P=Object.assign(a,{domain:c,range:u,rangeRound:f,clamp:h,interpolate:v,invert:y,unknown:m,exponent:x,nice:b,ticks:_,tickFormat:S,copy:A});return P}const S_e=0,oP=1e3,n7=oP,M_e=n7-oP,Ti=M_e-1,E_e=[.1,1],C_e={left:80,right:24,top:16,bottom:34},T_e=28,WO=24;Xt.Linear+"",Xt.Log+"",Number.MIN_VALUE,Xt.SymLog+"",Xt.Sqrt+"",Xt.Gamma+"";const R_e=FA({domain:[300,900],range:[3,10],clamp:!0,round:!0}),A_e=FA({domain:[300,500],range:[.8,1.4]});function r7(t,e){if(Array.isArray(t)){const[,n]=t;return t7({...e,exponent:n})}switch(t){case Xt.Linear:return FA(e);case Xt.Log:return dme(e);case Xt.SymLog:return gme(e);case Xt.Sqrt:return yme(e)}throw new Error("Unknown scale type")}function P_e(t,e){const{width:n,height:r}=t;return e?n/r>e?{width:r*e,height:r}:{width:n,height:n/e}:{width:n,height:r}}function HO(t,e=Xt.Linear,n,r){const i=g_e(t,n,r);return v_e(i,e)}function I_e(t,e=[-Number.MAX_VALUE/2,Number.MAX_VALUE/2]){const[n,r]=e;return GU.clamp(t,n,r)}function GO(t,e){const{scaleType:n,visDomain:r,flip:i,nice:o=!1}=t;return r7(n??Xt.Linear,{domain:r,range:[-e/2,e/2],reverse:i,nice:o})}function N_e(t,e){const n=Math.min(...t),r=Math.max(...t),i=Math.ceil(n),o=Math.floor(r),s=o-i+1,a=Math.min(s,e);if(a===0)return[];const l=Math.max(K6(i,o,a),1),c=Math.ceil(n/l),u=Math.floor(r/l)-c+1;return Array.from({length:u},(f,h)=>(c+h)*l)}function k_e(t,e,n){if(n!==Xt.Log)return EE;const[r,i]=t[0]>0?t:[-t[1],-[t[0]]],o=A_e(e);return i/r<10**o?EE:s=>{const a=Math.log10(Math.abs(s.valueOf()));return a===Math.floor(a)?EE(s):""}}function XO(t){const e=t.filter(e7);if(e.length!==0)return e.reduce((n,r)=>[Math.min(n[0],r[0]),Math.max(n[1],r[1])])}function i7(t,e,n){if(t==="auto")return;if(t==="equal")return i7(1,e,n);const[r,i]=e,[o,s]=n;return Math.abs(i-r)/Math.abs(s-o)/t}function L_e(t={}){const{left:e,right:n,top:r,bottom:i}=C_e;return{left:e+(t.left?WO:0),right:n,top:r+(t.top?T_e:0),bottom:i+(t.bottom?WO:0)}}const O_e=` varying vec2 coords; void main() { coords = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); } -`;function o7(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{value:n}]))}function q_(t,e=3,n=Float32Array){return new pn(new n(t*e),e)}function s7(t){return Object.keys(t).some(e=>/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/u.test(e))}const a7=T.createContext({});function zn(){return T.useContext(a7)}function D_e(t){const{visRatio:e,abscissaConfig:n,ordinateConfig:r,svgOverlay:i,floatingToolbar:o,children:s}=t,{width:a,height:l}=Cr(z=>z.size),c={width:a,height:l},u=a/l,f=P_e(c,e),h=T.useMemo(()=>zl.empty().expandByPoint(new H(a,l)),[a,l]),m=GO(n,f.width),v=GO(r,f.height),x=T.useCallback(z=>new H(m(z.x),v(z.y)),[m,v]),y=T.useCallback(z=>new H(m.invert(z.x),v.invert(z.y)),[m,v]),g=T.useMemo(()=>new Mt().makeScale(a/2,-l/2,1).setPosition(a/2,l/2,0),[a,l]),b=T.useMemo(()=>g.clone().invert(),[g]),_=T.useCallback((z,D)=>D.clone().project(z).applyMatrix4(g),[g]),S=T.useCallback((z,D)=>D.clone().applyMatrix4(b).unproject(z),[b]),A=T.useCallback((z,D)=>_(z,x(D)),[x,_]),P=T.useCallback((z,D)=>y(S(z,D)),[S,y]),R=T.useCallback((z,D=z.position)=>{const{scale:B}=z;return zl.empty(D).expandBySize(a*B.x,l*B.y)},[a,l]),L=T.useCallback(z=>{const[D,B]=R(z).toRect().map(y);return{xVisibleDomain:[D.x,B.x],yVisibleDomain:[D.y,B.y]}},[R,y]),k=Cr(z=>{var D;return(D=z.gl.domElement.parentElement)==null?void 0:D.parentElement});Wy(k),EE(k);const C=k.parentElement;EE(C);const N=C.parentElement;return EE(N),E.jsx(a7.Provider,{value:{canvasSize:c,canvasRatio:u,canvasBox:h,visRatio:e,visSize:f,abscissaConfig:n,ordinateConfig:r,abscissaScale:m,ordinateScale:v,dataToWorld:x,dataToHtml:A,worldToHtml:_,worldToData:y,htmlToWorld:S,htmlToData:P,getFovBox:R,getVisibleDomains:L,visCanvas:N,canvasArea:C,r3fRoot:k,svgOverlay:i,floatingToolbar:o},children:s})}var Y_=(t=>(t[t.Left=0]="Left",t[t.Middle=1]="Middle",t))(Y_||{});class F_e{constructor(e,n){bp(this,"buttons"),bp(this,"modifierKeys"),bp(this,"isWheel"),bp(this,"isEnabled"),this.id=e;const{button:r=Y_.Left,modifierKey:i=[],disabled:o=!1}=n;r==="Wheel"?(this.buttons=[],this.isWheel=!0):(this.buttons=$C(r),this.isWheel=!1),this.modifierKeys=$C(i),this.isEnabled=!o}matches(e){return this.isEnabled&&(e instanceof WheelEvent?this.isWheel:this.buttons.includes(e.button))&&this.modifierKeys.every(n=>e.getModifierState(n))}}const l7=T.createContext({});function z_e(){return T.useContext(l7)}function U_e(t){const{children:e}=t,[n]=T.useState(new Map),r=T.useCallback((s,a)=>{n.has(s)?console.warn(`An interaction with ID "${s}" is already registered.`):n.set(s,new F_e(s,a))},[n]),i=T.useCallback(s=>{n.delete(s)},[n]),o=T.useCallback((s,a)=>{const l=[...n.values()];if(!n.has(s))throw new Error(`Interaction ${s} is not registered`);const c=l.filter(u=>u.matches(a));return c.length===0?!1:c.length===1?c[0].id===s:c.reduce((u,f)=>f.modifierKeys.length>u.modifierKeys.length?f:u).id===s},[n]);return E.jsx(l7.Provider,{value:{registerInteraction:r,unregisterInteraction:i,shouldInteract:o},children:e})}const qO=.95,YO=new H(1,1,1),B_e=["Alt","Control","Shift"];function kg(){const{visSize:t,getFovBox:e}=zn(),n=Cr(i=>i.camera),r=Cr(i=>i.invalidate);return T.useCallback(i=>{const{position:o}=n,s=zl.fromSize(t),a=e(n,i).keepWithin(s);o.copy(a.center.setZ(o.z)),n.updateMatrixWorld(),r()},[n,t,e,r])}function c7(){const{canvasSize:t}=zn(),e=Cr(r=>r.camera),n=kg();return T.useCallback(({world:r})=>{const{width:i,height:o}=t,s=zl.fromPoints(...r),{width:a,height:l}=s.size;e.scale.set(Math.max(a,1)/i,Math.max(l,1)/o,1),n(s.center)},[e,t,n])}function sP(){const{canvasArea:t}=zn();Wc(t,"wheel",e=>e.preventDefault(),{passive:!1})}function aP(t){const e=Cr(r=>r.camera),n=kg();return function(r){const{sourceEvent:i,worldPt:o}=r,{x:s,y:a}=t(i);if(!s&&!a)return;const l=new H(s?qO:1,a?qO:1,1);i.deltaY<0?e.scale.multiply(l).min(YO):e.scale.divide(l).min(YO);const c=e.position.clone().sub(o);i.deltaY<0?c.multiply(l):c.divide(l),n(o.clone().add(c))}}function Ta(t,e,n={}){const r=xr(e),i=Cr(c=>c.camera),{htmlToWorld:o,worldToData:s,canvasArea:a}=zn();function l(c){const{offsetX:u,offsetY:f}=c,h=new H(u,f),m=o(i,h),v=s(m);r.current({htmlPt:h,worldPt:m,dataPt:v,sourceEvent:c})}Wc(a,t,l,n)}function Lg(t,e){const{shouldInteract:n,registerInteraction:r,unregisterInteraction:i}=z_e();return T.useEffect(()=>(r(t,e),()=>i(t)),[t,r,i,e]),T.useCallback(o=>n(t,o),[t,n])}function u7(t=[]){const{canvasArea:e}=zn(),n=$C(t),[r]=T.useState(new Map),[i,o]=e_(!1);function s(){const a=n.every(l=>r.get(l));i!==a&&o(a)}return Wc(window,"keyup",a=>{const{key:l}=a;r.set(l,!1),s()}),Wc(window,"keydown",a=>{const{key:l}=a;r.set(l,!0),s()}),Wc(e,"pointerdown",a=>{B_e.forEach(l=>{r.set(l,a.getModifierState(l))}),s()}),i}function j_e(t){const{id:e="Pan",button:n=Y_.Left,modifierKey:r,disabled:i}=t,o=Lg(e,{button:n,modifierKey:r,disabled:i}),s=Cr(m=>m.camera),a=kg(),l=T.useRef(),c=u7(r);function u(m){const{worldPt:v,sourceEvent:x}=m,{target:y,pointerId:g}=x;o(x)&&(y.setPointerCapture(g),l.current=v.clone())}function f(m){if(!l.current||!c)return;const{worldPt:v}=m,x=l.current.clone().sub(v);a(s.position.clone().add(x))}function h(m){const{sourceEvent:v}=m,{target:x,pointerId:y}=v;x.releasePointerCapture(y),l.current=void 0}return Ta("pointerdown",u),Ta("pointermove",f),Ta("pointerup",h),null}function f7(t){const{id:e="Selection",modifierKey:n,disabled:r,transform:i=Q=>Q,validate:o=()=>!0,onSelectionStart:s,onSelectionChange:a,onSelectionEnd:l,onValidSelection:c,children:u}=t,f=xr(i),h=xr(o),m=xr(s),v=xr(a),x=xr(l),y=xr(c),g=Cr(Q=>Q.camera),b=zn(),{canvasBox:_,htmlToWorld:S,worldToData:A}=b,[P,R]=Are(),L=T.useRef(),k=T.useRef(!1),C=u7(n),N=Lg(e,{button:Y_.Left,modifierKey:n,disabled:r});function z(Q,de=Q){const fe=[Q,_.clampPoint(de)],J=fe.map(_e=>S(g,_e)),ce=J.map(A);return{html:fe,world:J,data:ce}}function D(Q){const{sourceEvent:de}=Q;if(!N(de))return;const{target:fe,pointerId:J}=de;fe.setPointerCapture(J),L.current=Q,R(z(Q.htmlPt))}function B(Q){const{current:de}=L;de&&R(z(de.htmlPt,Q.htmlPt))}function G(Q){if(!L.current)return;const{sourceEvent:de}=Q,{target:fe,pointerId:J}=de;fe.releasePointerCapture(J),L.current=void 0,k.current=N(de),R(void 0)}Ta("pointerdown",D),Ta("pointermove",B),Ta("pointerup",G);function X(){L.current=void 0,R(void 0)}q6("Escape",X,[],{event:"keydown"}),Wc(window,"contextmenu",Q=>{L.current&&(Q.preventDefault(),X())});const Z=T.useMemo(()=>P&&f.current(P,g,b),[P,f,g,b]),F=T.useMemo(()=>!!Z&&h.current(Z),[Z,h]),q=k4(Z),K=k4(F);return T.useEffect(()=>{var Q,de,fe,J;if(Z){Wy(P),q||(Q=m.current)==null||Q.call(m),(de=v.current)==null||de.call(v,C?Z:void 0,P,F);return}q&&(Wy(K),(fe=x.current)==null||fe.call(x,k.current?q:void 0,K),K&&k.current&&((J=y.current)==null||J.call(y,q)),k.current=!1)},[Z,q,P,F,K,C,m,v,x,y]),!Z||!C?null:(Wy(P),u(Z,P,F))}const V_e="_selection_0f4643e",WC={selection:V_e};function K_(t){const{overflowCanvas:e=!1,children:n}=t,{r3fRoot:r,canvasArea:i}=zn(),o=e?i:r,[s]=T.useState(()=>{const l=document.createElement("div");return l.setAttribute("hidden",""),l}),[a]=T.useState(()=>$T(s));return T.useLayoutEffect(()=>{a.render(Vl.createPortal(n,o))},[n,o,a]),T.useLayoutEffect(()=>(r.append(s),()=>{a.unmount(),s.remove()}),[r,a,s]),null}function d7(t){const{children:e}=t,{svgOverlay:n}=zn();return n?E.jsx(K_,{children:Vl.createPortal(e,n)}):null}function HC(t){const{coords:e,strokePosition:n,...r}=t,{stroke:i,strokeWidth:o=1}=r,s=i&&n?o*(n==="outside"?1:-1):0,{min:a,max:l}=zl.fromPoints(...e).expandBySize(s,s);return E.jsx("path",{d:`M ${a.x},${a.y} H ${l.x} V ${l.y} H ${a.x} z`,...r})}const $_e=20;function W_e(t){const{minZoom:e=$_e,...n}=t,{canvasSize:r,canvasRatio:i,canvasBox:o,visRatio:s,visSize:a,htmlToWorld:l,worldToData:c}=zn(),u=c7(),f=Cr(v=>v.camera),h=s!==void 0;function m(v){if(!h)return v;const{scale:x}=f,y=zl.empty(new H(r.width/2,r.height/2)).expandBySize(a.width/x.x,a.height/x.y),g=zl.fromPoints(...v.html).expandToRatio(i).keepWithin(o).keepWithin(y).toRect(),b=g.map(S=>l(f,S)),_=b.map(c);return{html:g,world:b,data:_}}return E.jsx(f7,{id:"SelectToZoom",transform:m,validate:({html:v})=>v[0].manhattanDistanceTo(v[1])>=e,onValidSelection:u,...n,children:({html:v},{html:x},y)=>E.jsxs(d7,{children:[E.jsx(HC,{className:WC.selection,coords:x,fill:"white",fillOpacity:!h&&y?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:h||!y?4:void 0}),h&&E.jsx(HC,{className:WC.selection,coords:v,fill:"white",fillOpacity:y?.25:0,stroke:"black",strokePosition:"inside"})]})})}function H_e(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=zn(),i=Lg("XAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),o=s=>({x:i(s),y:!1});return sP(),Ta("wheel",aP(o)),null}function G_e(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=zn(),i=Lg("YAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),o=s=>({x:!1,y:i(s)});return sP(),Ta("wheel",aP(o)),null}function X_e(t){const{modifierKey:e,disabled:n}=t,r=Lg("Zoom",{button:"Wheel",modifierKey:e,disabled:n}),i=o=>{const s=r(o);return{x:s,y:s}};return sP(),Ta("wheel",aP(i)),null}function q_e(t){const{axis:e,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,children:o,...s}=t;function a(l,c,u){const{canvasSize:f,htmlToWorld:h,worldToData:m}=u,{width:v,height:x}=f,[y,g]=l.html,b=e==="x"?[new H(y.x,0),new H(g.x,x)]:[new H(0,y.y),new H(v,g.y)],_=b.map(A=>h(c,A)),S=_.map(m);return{html:b,world:_,data:S}}return E.jsx(f7,{transform:a,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,...s,children:o})}const Y_e=20;function KO(t){const{axis:e,modifierKey:n,disabled:r,minZoom:i=Y_e}=t,{visRatio:o}=zn(),s=c7();return E.jsx(q_e,{axis:e,id:`${e.toUpperCase()}SelectToZoom`,modifierKey:n,disabled:o!==void 0||r,validate:({html:a})=>zl.fromPoints(...a).hasMinSize(i),onValidSelection:s,children:({html:a},l,c)=>E.jsx(d7,{children:E.jsx(HC,{className:WC.selection,coords:a,fill:"white",fillOpacity:c?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:c?void 0:4})})})}function K_e(t){const{...e}=t;return E.jsxs(E.Fragment,{children:[e.pan!==!1&&E.jsx(j_e,{...e.pan}),e.zoom!==!1&&E.jsx(X_e,{...e.zoom}),e.xAxisZoom!==!1&&E.jsx(H_e,{modifierKey:"Alt",...e.xAxisZoom}),e.yAxisZoom!==!1&&E.jsx(G_e,{modifierKey:"Shift",...e.yAxisZoom}),e.selectToZoom!==!1&&E.jsx(W_e,{modifierKey:"Control",...e.selectToZoom}),e.xSelectToZoom!==!1&&E.jsx(KO,{axis:"x",modifierKey:["Control","Alt"],...e.xSelectToZoom}),e.ySelectToZoom!==!1&&E.jsx(KO,{axis:"y",modifierKey:["Control","Shift"],...e.ySelectToZoom})]})}function Z_e(t){return(...e)=>T.useMemo(()=>t(...e),e)}function h7(t,e,n=(r,i)=>Object.is(r,i)){const r=Cr(a=>a.camera),i=X6(),o=T.useRef(),s=xr(t);return T.useMemo(()=>{o.current=s.current(r)},e),MA(()=>{const a=s.current(r);n(o.current,a)||(o.current=a,i())}),o.current}function zx(t,e,n,r=!1){const i=T.useMemo(()=>new t(e),[t,e]),o=Cr(s=>s.invalidate);return T.useLayoutEffect(()=>{if(n){i.prepare(n);for(let s=0;s{s.needsUpdate=!0}),i.index&&(i.index.needsUpdate=!0),o()}},[i,...Object.values(n||{}),o]),i}function J_e(t){const{children:e}=t,{floatingToolbar:n}=zn();return n?E.jsx(K_,{children:Vl.createPortal(e,n)}):null}const Q_e="_btnLike_0154b53",ewe="_icon_bcb8f77",twe="_label_5a75092",nwe="_popup_954b735",rwe="_btn_f1cebe5 btnClean",lP={btnLike:Q_e,icon:ewe,label:twe,popup:nwe,btn:rwe},{btn:iwe,btnLike:owe}=lP,swe=`_btn_579cee1 ${iwe}`,awe=`_btnLike_5797793 ${owe}`,ZO={btn:swe,btnLike:awe};function lwe(){const t=Cr(i=>i.camera),e=Cr(i=>i.invalidate),n=h7(({scale:i})=>i.x<1||i.y<1,[]);function r(){t.scale.x=1,t.scale.y=1,t.position.x=0,t.position.y=0,t.updateMatrixWorld(),e()}return E.jsx(J_e,{children:E.jsx("button",{className:ZO.btn,type:"button",hidden:!n,onClick:()=>r(),children:E.jsx("span",{className:ZO.btnLike,children:"Reset zoom"})})})}function p7(t){const{children:e,style:n,className:r}=t,{canvasSize:i}=zn();return E.jsx(K_,{overflowCanvas:!0,children:E.jsx("div",{className:r,style:{position:"absolute",top:0,left:0,...i,...n},children:e})})}const cwe="_overlay_df4a4fe",uwe="_tooltip_c303daa",fwe="_guides_073d0c4",CE={overlay:cwe,tooltip:uwe,guides:fwe};function dwe(t){const{tooltipOpen:e,tooltipLeft:n,tooltipTop:r,guides:i,children:o}=t,{canvasSize:s}=zn(),{width:a,height:l}=s;return E.jsx(p7,{className:CE.overlay,children:e&&o&&E.jsxs(E.Fragment,{children:[E.jsx(Ime,{className:CE.tooltip,top:r,left:n,unstyled:!0,applyPositionStyle:!0,children:o},Math.random()),i&&E.jsxs("svg",{className:CE.guides,children:[i!=="horizontal"&&E.jsx(Rx,{from:{x:n,y:0},to:{x:n,y:l}}),i!=="vertical"&&E.jsx(Rx,{from:{x:0,y:r},to:{x:a,y:r}})]})]})})}function m7(t){const{children:e,size:n,...r}=t,{visSize:i}=zn(),{width:o,height:s}=n??i;return E.jsxs("mesh",{...r,children:[E.jsx("planeGeometry",{args:[o,s]}),e]})}function hwe(t){const{guides:e,renderTooltip:n,size:r}=t,{canvasSize:i,worldToData:o}=zn(),{width:s,height:a}=i,{tooltipOpen:l,tooltipTop:c,tooltipLeft:u,tooltipData:f,showTooltip:h,hideTooltip:m}=wme(),v=T.useCallback(_=>{const{unprojectedPoint:S,nativeEvent:A}=_;if(A.buttons!==0)return;const P=o(S);h({tooltipLeft:A.offsetX,tooltipTop:A.offsetY,tooltipData:[P.x,P.y]})},[o,h]),x=T.useCallback(()=>{l&&m()},[m,l]),y=T.useCallback(()=>m(),[m]),g=T.useCallback(_=>{const{nativeEvent:S}=_,{offsetX:A,offsetY:P}=S;A>=0&&A<=s&&P>=0&&P<=a&&v(_)},[a,v,s]),b=f&&n(...f);return E.jsxs(E.Fragment,{children:[E.jsx(m7,{onPointerMove:v,onPointerOut:x,onPointerDown:y,onPointerUp:g,size:r,children:E.jsx("meshBasicMaterial",{opacity:0,transparent:!0})}),E.jsx(dwe,{tooltipOpen:l,tooltipLeft:u,tooltipTop:c,guides:e,children:b})]})}const pwe="_axis_1002b06",mwe="_grid_a397f58",gwe="_tick_44c4d9c",vwe="_label_4a1d111",Ux={axis:pwe,grid:mwe,tick:gwe,label:vwe};function ywe(t){const{formattedValue:e,...n}=t;return E.jsx("text",{...n,dy:"0.3125em",children:e})}const xwe={labelClassName:Ux.label,labelProps:{fontSize:"inherit"},tickClassName:Ux.tick,tickComponent:ywe},bwe={abscissa:[cye,S9],ordinate:[oye,w9]};function JO(t){const{type:e,config:n,domain:r,canvasSize:i,offset:o,flipAxis:s,showAxis:a}=t,{width:l,height:c}=i,u=e==="abscissa",f=u?l:c,{scaleType:h=Xt.Linear,isIndexAxis:m,showGrid:v,label:x,nice:y=!1}=n,g=r7(h,{domain:r,range:s?[f,0]:[0,f],nice:y}),[b,_]=bwe[e],S=R_e(f),A=m?{tickValues:N_e(r,S)}:{numTicks:S};return E.jsxs(E.Fragment,{children:[a&&E.jsx("svg",{className:Ux.axis,"data-type":e,style:u?{width:l,height:o}:{width:o,height:c},children:E.jsx(b,{scale:g,tickFormat:k_e(r,f,h),label:x,labelOffset:o-(u?32:36),hideAxisLine:v,...A,...xwe})}),v&&E.jsx("svg",{className:Ux.grid,...i,children:E.jsx(_,{scale:g,...i,...A})})]})}function _we(t){const{axisOffsets:e,showAxes:n}=t,{canvasSize:r,visCanvas:i,abscissaConfig:o,ordinateConfig:s,getVisibleDomains:a}=zn(),l=h7(a,[a]);return E.jsx(K_,{children:Vl.createPortal(E.jsxs(E.Fragment,{children:[E.jsx(JO,{type:"abscissa",config:o,domain:l.xVisibleDomain,canvasSize:r,offset:e.bottom,showAxis:n}),E.jsx(JO,{type:"ordinate",config:s,domain:l.yVisibleDomain,canvasSize:r,offset:e.left,showAxis:n,flipAxis:!0})]}),i)})}function wwe(t){const{className:e,orthographic:n,children:r}=t;return E.jsxs(Nhe,{className:e,orthographic:n,flat:!0,frameloop:"demand",dpr:[1,3],resize:{debounce:{scroll:20,resize:200},scroll:!1},gl:{preserveDrawingBuffer:!0},camera:{near:S_e,far:oP,position:[0,0,n7]},children:[E.jsx("ambientLight",{}),r]})}function Swe(){const{visRatio:t}=zn(),e=Cr(r=>r.camera),n=kg();return T.useEffect(()=>{if(!t||e.scale.x===e.scale.y)return;const r=Math.max(e.scale.x,e.scale.y);e.scale.x=r,e.scale.y=r,n(e.position)},[e,n,t]),null}function Mwe(t){const{value:e}=t,n=Cr(i=>i.raycaster),r=Cr(i=>i.camera);return T.useEffect(()=>{const i=n.params.Points,o=i?i.threshold:1;return i&&(i.threshold=e),()=>{i&&(i.threshold=o)}},[n,e]),MA(()=>{const i=(r.scale.x+r.scale.y)/2;n.params.Points&&(n.params.Points.threshold=e*i/2)}),null}function Ewe(){const{dataToWorld:t,worldToData:e}=zn(),n=T.useRef(),r=Cr(o=>o.camera),i=kg();return MA(()=>{n.current=e(r.position)}),T.useEffect(()=>{n.current&&i(t(n.current))},[n,i,t,r]),null}const Cwe="_visCanvas_2387375",Twe="_title_313417a",Rwe="_canvasArea_6300bb7",Awe="_r3fRoot_f557f0c",Pwe="_svgOverlay_3f84e2f",Iwe="_floatingToolbar_de4854e",Sf={visCanvas:Cwe,title:Twe,canvasArea:Rwe,r3fRoot:Awe,svgOverlay:Pwe,floatingToolbar:Iwe},Nwe={left:0,right:0,top:0,bottom:0};function kwe(t){const{title:e,aspect:n="auto",abscissaConfig:r,ordinateConfig:i,raycasterThreshold:o,showAxes:s=!0,children:a}=t,l=i7(n,r.visDomain,i.visDomain),c=s?L_e({left:!!i.label,bottom:!!r.label,top:!!e}):Nwe,[u,f]=T.useState(null),[h,m]=T.useState(null);return E.jsxs("div",{className:Sf.visCanvas,style:{gridTemplateColumns:`${c.left}px minmax(0, 1fr) ${c.right}px`,gridTemplateRows:`${c.top}px minmax(0, 1fr) ${c.bottom}px`},children:[s&&e&&E.jsx("p",{className:Sf.title,children:e}),E.jsxs("div",{className:Sf.canvasArea,children:[E.jsx(wwe,{className:Sf.r3fRoot,orthographic:!0,children:E.jsxs(D_e,{visRatio:l,abscissaConfig:r,ordinateConfig:i,svgOverlay:u,floatingToolbar:h,children:[E.jsx(_we,{axisOffsets:c,showAxes:s}),E.jsx(U_e,{children:a}),E.jsx(Ewe,{}),E.jsx(Swe,{}),o!==void 0&&E.jsx(Mwe,{value:o})]})}),E.jsx("svg",{ref:f,className:Sf.svgOverlay,overflow:"hidden"})]}),E.jsx("div",{ref:m,className:Sf.floatingToolbar})]})}class Lwe extends Dt{constructor(){super(...arguments),bp(this,"params")}prepare(e){this.params=e}}const Z_=Lwe;class Owe extends Z_{constructor(e){super(),this.setAttribute("position",q_(e*2))}update(e){const{abscissas:n,ordinates:r,errors:i,abscissaScale:o,ordinateScale:s,ignoreValue:a}=this.params,l=r[e],c=a?a(l):!1,u=e*2;if(c){this.attributes.position.setXYZ(u,0,0,Ci),this.attributes.position.setXYZ(u+1,0,0,Ci);return}const f=o(n[e]),h=s(l);if(!Number.isFinite(f)||!Number.isFinite(h)){this.attributes.position.setXYZ(u,0,0,Ci),this.attributes.position.setXYZ(u+1,0,0,Ci);return}const m=i[e],v=s(l-m),x=s(l+m),y=Number.isFinite(v)?v:h,g=Number.isFinite(x)?x:h;this.attributes.position.setXYZ(u,f,y,0),this.attributes.position.setXYZ(u+1,f,g,0)}}const Dwe=Owe;class Fwe extends Z_{constructor(e){super(),this.setAttribute("position",q_(e*2))}update(e){const{abscissas:n,ordinates:r,errors:i,abscissaScale:o,ordinateScale:s,ignoreValue:a}=this.params,l=r[e],c=a?a(l):!1,u=e*2;if(c){this.attributes.position.setXYZ(u,0,0,Ci),this.attributes.position.setXYZ(u+1,0,0,Ci);return}const f=o(n[e]),h=s(l);if(!Number.isFinite(f)||!Number.isFinite(h)){this.attributes.position.setXYZ(u,0,0,Ci),this.attributes.position.setXYZ(u+1,0,0,Ci);return}const m=i[e],v=s(l-m),x=s(l+m);Number.isFinite(v)?this.attributes.position.setXYZ(u,f,v,0):this.attributes.position.setXYZ(u,0,0,Ci),Number.isFinite(x)?this.attributes.position.setXYZ(u+1,f,x,0):this.attributes.position.setXYZ(u+1,0,0,Ci)}}const zwe=Fwe;var Xp=(t=>(t.LineOnly="OnlyLine",t.GlyphsOnly="OnlyGlyphs",t.LineAndGlyphs="LineAndGlyphs",t))(Xp||{}),bl=(t=>(t.Circle="Circle",t.Cross="Cross",t.Square="Square",t.Cap="Cap",t))(bl||{});const Uwe={[bl.Cross]:` +`;function o7(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{value:n}]))}function K_(t,e=3,n=Float32Array){return new pn(new n(t*e),e)}function s7(t){return Object.keys(t).some(e=>/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/u.test(e))}const a7=T.createContext({});function zn(){return T.useContext(a7)}function D_e(t){const{visRatio:e,abscissaConfig:n,ordinateConfig:r,svgOverlay:i,floatingToolbar:o,children:s}=t,{width:a,height:l}=Cr(z=>z.size),c={width:a,height:l},u=a/l,f=P_e(c,e),h=T.useMemo(()=>zl.empty().expandByPoint(new H(a,l)),[a,l]),m=GO(n,f.width),v=GO(r,f.height),x=T.useCallback(z=>new H(m(z.x),v(z.y)),[m,v]),y=T.useCallback(z=>new H(m.invert(z.x),v.invert(z.y)),[m,v]),g=T.useMemo(()=>new Mt().makeScale(a/2,-l/2,1).setPosition(a/2,l/2,0),[a,l]),b=T.useMemo(()=>g.clone().invert(),[g]),_=T.useCallback((z,D)=>D.clone().project(z).applyMatrix4(g),[g]),S=T.useCallback((z,D)=>D.clone().applyMatrix4(b).unproject(z),[b]),A=T.useCallback((z,D)=>_(z,x(D)),[x,_]),P=T.useCallback((z,D)=>y(S(z,D)),[S,y]),R=T.useCallback((z,D=z.position)=>{const{scale:B}=z;return zl.empty(D).expandBySize(a*B.x,l*B.y)},[a,l]),L=T.useCallback(z=>{const[D,B]=R(z).toRect().map(y);return{xVisibleDomain:[D.x,B.x],yVisibleDomain:[D.y,B.y]}},[R,y]),k=Cr(z=>{var D;return(D=z.gl.domElement.parentElement)==null?void 0:D.parentElement});Hy(k),TE(k);const C=k.parentElement;TE(C);const N=C.parentElement;return TE(N),E.jsx(a7.Provider,{value:{canvasSize:c,canvasRatio:u,canvasBox:h,visRatio:e,visSize:f,abscissaConfig:n,ordinateConfig:r,abscissaScale:m,ordinateScale:v,dataToWorld:x,dataToHtml:A,worldToHtml:_,worldToData:y,htmlToWorld:S,htmlToData:P,getFovBox:R,getVisibleDomains:L,visCanvas:N,canvasArea:C,r3fRoot:k,svgOverlay:i,floatingToolbar:o},children:s})}var Z_=(t=>(t[t.Left=0]="Left",t[t.Middle=1]="Middle",t))(Z_||{});class F_e{constructor(e,n){bp(this,"buttons"),bp(this,"modifierKeys"),bp(this,"isWheel"),bp(this,"isEnabled"),this.id=e;const{button:r=Z_.Left,modifierKey:i=[],disabled:o=!1}=n;r==="Wheel"?(this.buttons=[],this.isWheel=!0):(this.buttons=WC(r),this.isWheel=!1),this.modifierKeys=WC(i),this.isEnabled=!o}matches(e){return this.isEnabled&&(e instanceof WheelEvent?this.isWheel:this.buttons.includes(e.button))&&this.modifierKeys.every(n=>e.getModifierState(n))}}const l7=T.createContext({});function z_e(){return T.useContext(l7)}function U_e(t){const{children:e}=t,[n]=T.useState(new Map),r=T.useCallback((s,a)=>{n.has(s)?console.warn(`An interaction with ID "${s}" is already registered.`):n.set(s,new F_e(s,a))},[n]),i=T.useCallback(s=>{n.delete(s)},[n]),o=T.useCallback((s,a)=>{const l=[...n.values()];if(!n.has(s))throw new Error(`Interaction ${s} is not registered`);const c=l.filter(u=>u.matches(a));return c.length===0?!1:c.length===1?c[0].id===s:c.reduce((u,f)=>f.modifierKeys.length>u.modifierKeys.length?f:u).id===s},[n]);return E.jsx(l7.Provider,{value:{registerInteraction:r,unregisterInteraction:i,shouldInteract:o},children:e})}const qO=.95,YO=new H(1,1,1),B_e=["Alt","Control","Shift"];function kg(){const{visSize:t,getFovBox:e}=zn(),n=Cr(i=>i.camera),r=Cr(i=>i.invalidate);return T.useCallback(i=>{const{position:o}=n,s=zl.fromSize(t),a=e(n,i).keepWithin(s);o.copy(a.center.setZ(o.z)),n.updateMatrixWorld(),r()},[n,t,e,r])}function c7(){const{canvasSize:t}=zn(),e=Cr(r=>r.camera),n=kg();return T.useCallback(({world:r})=>{const{width:i,height:o}=t,s=zl.fromPoints(...r),{width:a,height:l}=s.size;e.scale.set(Math.max(a,1)/i,Math.max(l,1)/o,1),n(s.center)},[e,t,n])}function sP(){const{canvasArea:t}=zn();Wc(t,"wheel",e=>e.preventDefault(),{passive:!1})}function aP(t){const e=Cr(r=>r.camera),n=kg();return function(r){const{sourceEvent:i,worldPt:o}=r,{x:s,y:a}=t(i);if(!s&&!a)return;const l=new H(s?qO:1,a?qO:1,1);i.deltaY<0?e.scale.multiply(l).min(YO):e.scale.divide(l).min(YO);const c=e.position.clone().sub(o);i.deltaY<0?c.multiply(l):c.divide(l),n(o.clone().add(c))}}function Ra(t,e,n={}){const r=xr(e),i=Cr(c=>c.camera),{htmlToWorld:o,worldToData:s,canvasArea:a}=zn();function l(c){const{offsetX:u,offsetY:f}=c,h=new H(u,f),m=o(i,h),v=s(m);r.current({htmlPt:h,worldPt:m,dataPt:v,sourceEvent:c})}Wc(a,t,l,n)}function Lg(t,e){const{shouldInteract:n,registerInteraction:r,unregisterInteraction:i}=z_e();return T.useEffect(()=>(r(t,e),()=>i(t)),[t,r,i,e]),T.useCallback(o=>n(t,o),[t,n])}function u7(t=[]){const{canvasArea:e}=zn(),n=WC(t),[r]=T.useState(new Map),[i,o]=n_(!1);function s(){const a=n.every(l=>r.get(l));i!==a&&o(a)}return Wc(window,"keyup",a=>{const{key:l}=a;r.set(l,!1),s()}),Wc(window,"keydown",a=>{const{key:l}=a;r.set(l,!0),s()}),Wc(e,"pointerdown",a=>{B_e.forEach(l=>{r.set(l,a.getModifierState(l))}),s()}),i}function j_e(t){const{id:e="Pan",button:n=Z_.Left,modifierKey:r,disabled:i}=t,o=Lg(e,{button:n,modifierKey:r,disabled:i}),s=Cr(m=>m.camera),a=kg(),l=T.useRef(),c=u7(r);function u(m){const{worldPt:v,sourceEvent:x}=m,{target:y,pointerId:g}=x;o(x)&&(y.setPointerCapture(g),l.current=v.clone())}function f(m){if(!l.current||!c)return;const{worldPt:v}=m,x=l.current.clone().sub(v);a(s.position.clone().add(x))}function h(m){const{sourceEvent:v}=m,{target:x,pointerId:y}=v;x.releasePointerCapture(y),l.current=void 0}return Ra("pointerdown",u),Ra("pointermove",f),Ra("pointerup",h),null}function f7(t){const{id:e="Selection",modifierKey:n,disabled:r,transform:i=Q=>Q,validate:o=()=>!0,onSelectionStart:s,onSelectionChange:a,onSelectionEnd:l,onValidSelection:c,children:u}=t,f=xr(i),h=xr(o),m=xr(s),v=xr(a),x=xr(l),y=xr(c),g=Cr(Q=>Q.camera),b=zn(),{canvasBox:_,htmlToWorld:S,worldToData:A}=b,[P,R]=Are(),L=T.useRef(),k=T.useRef(!1),C=u7(n),N=Lg(e,{button:Z_.Left,modifierKey:n,disabled:r});function z(Q,de=Q){const fe=[Q,_.clampPoint(de)],J=fe.map(_e=>S(g,_e)),ce=J.map(A);return{html:fe,world:J,data:ce}}function D(Q){const{sourceEvent:de}=Q;if(!N(de))return;const{target:fe,pointerId:J}=de;fe.setPointerCapture(J),L.current=Q,R(z(Q.htmlPt))}function B(Q){const{current:de}=L;de&&R(z(de.htmlPt,Q.htmlPt))}function G(Q){if(!L.current)return;const{sourceEvent:de}=Q,{target:fe,pointerId:J}=de;fe.releasePointerCapture(J),L.current=void 0,k.current=N(de),R(void 0)}Ra("pointerdown",D),Ra("pointermove",B),Ra("pointerup",G);function X(){L.current=void 0,R(void 0)}q6("Escape",X,[],{event:"keydown"}),Wc(window,"contextmenu",Q=>{L.current&&(Q.preventDefault(),X())});const Z=T.useMemo(()=>P&&f.current(P,g,b),[P,f,g,b]),F=T.useMemo(()=>!!Z&&h.current(Z),[Z,h]),q=k4(Z),K=k4(F);return T.useEffect(()=>{var Q,de,fe,J;if(Z){Hy(P),q||(Q=m.current)==null||Q.call(m),(de=v.current)==null||de.call(v,C?Z:void 0,P,F);return}q&&(Hy(K),(fe=x.current)==null||fe.call(x,k.current?q:void 0,K),K&&k.current&&((J=y.current)==null||J.call(y,q)),k.current=!1)},[Z,q,P,F,K,C,m,v,x,y]),!Z||!C?null:(Hy(P),u(Z,P,F))}const V_e="_selection_0f4643e",HC={selection:V_e};function J_(t){const{overflowCanvas:e=!1,children:n}=t,{r3fRoot:r,canvasArea:i}=zn(),o=e?i:r,[s]=T.useState(()=>{const l=document.createElement("div");return l.setAttribute("hidden",""),l}),[a]=T.useState(()=>WT(s));return T.useLayoutEffect(()=>{a.render(Vl.createPortal(n,o))},[n,o,a]),T.useLayoutEffect(()=>(r.append(s),()=>{a.unmount(),s.remove()}),[r,a,s]),null}function d7(t){const{children:e}=t,{svgOverlay:n}=zn();return n?E.jsx(J_,{children:Vl.createPortal(e,n)}):null}function GC(t){const{coords:e,strokePosition:n,...r}=t,{stroke:i,strokeWidth:o=1}=r,s=i&&n?o*(n==="outside"?1:-1):0,{min:a,max:l}=zl.fromPoints(...e).expandBySize(s,s);return E.jsx("path",{d:`M ${a.x},${a.y} H ${l.x} V ${l.y} H ${a.x} z`,...r})}const $_e=20;function W_e(t){const{minZoom:e=$_e,...n}=t,{canvasSize:r,canvasRatio:i,canvasBox:o,visRatio:s,visSize:a,htmlToWorld:l,worldToData:c}=zn(),u=c7(),f=Cr(v=>v.camera),h=s!==void 0;function m(v){if(!h)return v;const{scale:x}=f,y=zl.empty(new H(r.width/2,r.height/2)).expandBySize(a.width/x.x,a.height/x.y),g=zl.fromPoints(...v.html).expandToRatio(i).keepWithin(o).keepWithin(y).toRect(),b=g.map(S=>l(f,S)),_=b.map(c);return{html:g,world:b,data:_}}return E.jsx(f7,{id:"SelectToZoom",transform:m,validate:({html:v})=>v[0].manhattanDistanceTo(v[1])>=e,onValidSelection:u,...n,children:({html:v},{html:x},y)=>E.jsxs(d7,{children:[E.jsx(GC,{className:HC.selection,coords:x,fill:"white",fillOpacity:!h&&y?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:h||!y?4:void 0}),h&&E.jsx(GC,{className:HC.selection,coords:v,fill:"white",fillOpacity:y?.25:0,stroke:"black",strokePosition:"inside"})]})})}function H_e(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=zn(),i=Lg("XAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),o=s=>({x:i(s),y:!1});return sP(),Ra("wheel",aP(o)),null}function G_e(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=zn(),i=Lg("YAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),o=s=>({x:!1,y:i(s)});return sP(),Ra("wheel",aP(o)),null}function X_e(t){const{modifierKey:e,disabled:n}=t,r=Lg("Zoom",{button:"Wheel",modifierKey:e,disabled:n}),i=o=>{const s=r(o);return{x:s,y:s}};return sP(),Ra("wheel",aP(i)),null}function q_e(t){const{axis:e,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,children:o,...s}=t;function a(l,c,u){const{canvasSize:f,htmlToWorld:h,worldToData:m}=u,{width:v,height:x}=f,[y,g]=l.html,b=e==="x"?[new H(y.x,0),new H(g.x,x)]:[new H(0,y.y),new H(v,g.y)],_=b.map(A=>h(c,A)),S=_.map(m);return{html:b,world:_,data:S}}return E.jsx(f7,{transform:a,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,...s,children:o})}const Y_e=20;function KO(t){const{axis:e,modifierKey:n,disabled:r,minZoom:i=Y_e}=t,{visRatio:o}=zn(),s=c7();return E.jsx(q_e,{axis:e,id:`${e.toUpperCase()}SelectToZoom`,modifierKey:n,disabled:o!==void 0||r,validate:({html:a})=>zl.fromPoints(...a).hasMinSize(i),onValidSelection:s,children:({html:a},l,c)=>E.jsx(d7,{children:E.jsx(GC,{className:HC.selection,coords:a,fill:"white",fillOpacity:c?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:c?void 0:4})})})}function K_e(t){const{...e}=t;return E.jsxs(E.Fragment,{children:[e.pan!==!1&&E.jsx(j_e,{...e.pan}),e.zoom!==!1&&E.jsx(X_e,{...e.zoom}),e.xAxisZoom!==!1&&E.jsx(H_e,{modifierKey:"Alt",...e.xAxisZoom}),e.yAxisZoom!==!1&&E.jsx(G_e,{modifierKey:"Shift",...e.yAxisZoom}),e.selectToZoom!==!1&&E.jsx(W_e,{modifierKey:"Control",...e.selectToZoom}),e.xSelectToZoom!==!1&&E.jsx(KO,{axis:"x",modifierKey:["Control","Alt"],...e.xSelectToZoom}),e.ySelectToZoom!==!1&&E.jsx(KO,{axis:"y",modifierKey:["Control","Shift"],...e.ySelectToZoom})]})}function Z_e(t){return(...e)=>T.useMemo(()=>t(...e),e)}function h7(t,e,n=(r,i)=>Object.is(r,i)){const r=Cr(a=>a.camera),i=X6(),o=T.useRef(),s=xr(t);return T.useMemo(()=>{o.current=s.current(r)},e),MA(()=>{const a=s.current(r);n(o.current,a)||(o.current=a,i())}),o.current}function Ux(t,e,n,r=!1){const i=T.useMemo(()=>new t(e),[t,e]),o=Cr(s=>s.invalidate);return T.useLayoutEffect(()=>{if(n){i.prepare(n);for(let s=0;s{s.needsUpdate=!0}),i.index&&(i.index.needsUpdate=!0),o()}},[i,...Object.values(n||{}),o]),i}function J_e(t){const{children:e}=t,{floatingToolbar:n}=zn();return n?E.jsx(J_,{children:Vl.createPortal(e,n)}):null}const Q_e="_btnLike_0154b53",ewe="_icon_bcb8f77",twe="_label_5a75092",nwe="_popup_954b735",rwe="_btn_f1cebe5 btnClean",lP={btnLike:Q_e,icon:ewe,label:twe,popup:nwe,btn:rwe},{btn:iwe,btnLike:owe}=lP,swe=`_btn_579cee1 ${iwe}`,awe=`_btnLike_5797793 ${owe}`,ZO={btn:swe,btnLike:awe};function lwe(){const t=Cr(i=>i.camera),e=Cr(i=>i.invalidate),n=h7(({scale:i})=>i.x<1||i.y<1,[]);function r(){t.scale.x=1,t.scale.y=1,t.position.x=0,t.position.y=0,t.updateMatrixWorld(),e()}return E.jsx(J_e,{children:E.jsx("button",{className:ZO.btn,type:"button",hidden:!n,onClick:()=>r(),children:E.jsx("span",{className:ZO.btnLike,children:"Reset zoom"})})})}function p7(t){const{children:e,style:n,className:r}=t,{canvasSize:i}=zn();return E.jsx(J_,{overflowCanvas:!0,children:E.jsx("div",{className:r,style:{position:"absolute",top:0,left:0,...i,...n},children:e})})}const cwe="_overlay_df4a4fe",uwe="_tooltip_c303daa",fwe="_guides_073d0c4",RE={overlay:cwe,tooltip:uwe,guides:fwe};function dwe(t){const{tooltipOpen:e,tooltipLeft:n,tooltipTop:r,guides:i,children:o}=t,{canvasSize:s}=zn(),{width:a,height:l}=s;return E.jsx(p7,{className:RE.overlay,children:e&&o&&E.jsxs(E.Fragment,{children:[E.jsx(Ime,{className:RE.tooltip,top:r,left:n,unstyled:!0,applyPositionStyle:!0,children:o},Math.random()),i&&E.jsxs("svg",{className:RE.guides,children:[i!=="horizontal"&&E.jsx(Ax,{from:{x:n,y:0},to:{x:n,y:l}}),i!=="vertical"&&E.jsx(Ax,{from:{x:0,y:r},to:{x:a,y:r}})]})]})})}function m7(t){const{children:e,size:n,...r}=t,{visSize:i}=zn(),{width:o,height:s}=n??i;return E.jsxs("mesh",{...r,children:[E.jsx("planeGeometry",{args:[o,s]}),e]})}function hwe(t){const{guides:e,renderTooltip:n,size:r}=t,{canvasSize:i,worldToData:o}=zn(),{width:s,height:a}=i,{tooltipOpen:l,tooltipTop:c,tooltipLeft:u,tooltipData:f,showTooltip:h,hideTooltip:m}=wme(),v=T.useCallback(_=>{const{unprojectedPoint:S,nativeEvent:A}=_;if(A.buttons!==0)return;const P=o(S);h({tooltipLeft:A.offsetX,tooltipTop:A.offsetY,tooltipData:[P.x,P.y]})},[o,h]),x=T.useCallback(()=>{l&&m()},[m,l]),y=T.useCallback(()=>m(),[m]),g=T.useCallback(_=>{const{nativeEvent:S}=_,{offsetX:A,offsetY:P}=S;A>=0&&A<=s&&P>=0&&P<=a&&v(_)},[a,v,s]),b=f&&n(...f);return E.jsxs(E.Fragment,{children:[E.jsx(m7,{onPointerMove:v,onPointerOut:x,onPointerDown:y,onPointerUp:g,size:r,children:E.jsx("meshBasicMaterial",{opacity:0,transparent:!0})}),E.jsx(dwe,{tooltipOpen:l,tooltipLeft:u,tooltipTop:c,guides:e,children:b})]})}const pwe="_axis_1002b06",mwe="_grid_a397f58",gwe="_tick_44c4d9c",vwe="_label_4a1d111",Bx={axis:pwe,grid:mwe,tick:gwe,label:vwe};function ywe(t){const{formattedValue:e,...n}=t;return E.jsx("text",{...n,dy:"0.3125em",children:e})}const xwe={labelClassName:Bx.label,labelProps:{fontSize:"inherit"},tickClassName:Bx.tick,tickComponent:ywe},bwe={abscissa:[cye,S9],ordinate:[oye,w9]};function JO(t){const{type:e,config:n,domain:r,canvasSize:i,offset:o,flipAxis:s,showAxis:a}=t,{width:l,height:c}=i,u=e==="abscissa",f=u?l:c,{scaleType:h=Xt.Linear,isIndexAxis:m,showGrid:v,label:x,nice:y=!1}=n,g=r7(h,{domain:r,range:s?[f,0]:[0,f],nice:y}),[b,_]=bwe[e],S=R_e(f),A=m?{tickValues:N_e(r,S)}:{numTicks:S};return E.jsxs(E.Fragment,{children:[a&&E.jsx("svg",{className:Bx.axis,"data-type":e,style:u?{width:l,height:o}:{width:o,height:c},children:E.jsx(b,{scale:g,tickFormat:k_e(r,f,h),label:x,labelOffset:o-(u?32:36),hideAxisLine:v,...A,...xwe})}),v&&E.jsx("svg",{className:Bx.grid,...i,children:E.jsx(_,{scale:g,...i,...A})})]})}function _we(t){const{axisOffsets:e,showAxes:n}=t,{canvasSize:r,visCanvas:i,abscissaConfig:o,ordinateConfig:s,getVisibleDomains:a}=zn(),l=h7(a,[a]);return E.jsx(J_,{children:Vl.createPortal(E.jsxs(E.Fragment,{children:[E.jsx(JO,{type:"abscissa",config:o,domain:l.xVisibleDomain,canvasSize:r,offset:e.bottom,showAxis:n}),E.jsx(JO,{type:"ordinate",config:s,domain:l.yVisibleDomain,canvasSize:r,offset:e.left,showAxis:n,flipAxis:!0})]}),i)})}function wwe(t){const{className:e,orthographic:n,children:r}=t;return E.jsxs(Nhe,{className:e,orthographic:n,flat:!0,frameloop:"demand",dpr:[1,3],resize:{debounce:{scroll:20,resize:200},scroll:!1},gl:{preserveDrawingBuffer:!0},camera:{near:S_e,far:oP,position:[0,0,n7]},children:[E.jsx("ambientLight",{}),r]})}function Swe(){const{visRatio:t}=zn(),e=Cr(r=>r.camera),n=kg();return T.useEffect(()=>{if(!t||e.scale.x===e.scale.y)return;const r=Math.max(e.scale.x,e.scale.y);e.scale.x=r,e.scale.y=r,n(e.position)},[e,n,t]),null}function Mwe(t){const{value:e}=t,n=Cr(i=>i.raycaster),r=Cr(i=>i.camera);return T.useEffect(()=>{const i=n.params.Points,o=i?i.threshold:1;return i&&(i.threshold=e),()=>{i&&(i.threshold=o)}},[n,e]),MA(()=>{const i=(r.scale.x+r.scale.y)/2;n.params.Points&&(n.params.Points.threshold=e*i/2)}),null}function Ewe(){const{dataToWorld:t,worldToData:e}=zn(),n=T.useRef(),r=Cr(o=>o.camera),i=kg();return MA(()=>{n.current=e(r.position)}),T.useEffect(()=>{n.current&&i(t(n.current))},[n,i,t,r]),null}const Cwe="_visCanvas_2387375",Twe="_title_313417a",Rwe="_canvasArea_6300bb7",Awe="_r3fRoot_f557f0c",Pwe="_svgOverlay_3f84e2f",Iwe="_floatingToolbar_de4854e",Sf={visCanvas:Cwe,title:Twe,canvasArea:Rwe,r3fRoot:Awe,svgOverlay:Pwe,floatingToolbar:Iwe},Nwe={left:0,right:0,top:0,bottom:0};function kwe(t){const{title:e,aspect:n="auto",abscissaConfig:r,ordinateConfig:i,raycasterThreshold:o,showAxes:s=!0,children:a}=t,l=i7(n,r.visDomain,i.visDomain),c=s?L_e({left:!!i.label,bottom:!!r.label,top:!!e}):Nwe,[u,f]=T.useState(null),[h,m]=T.useState(null);return E.jsxs("div",{className:Sf.visCanvas,style:{gridTemplateColumns:`${c.left}px minmax(0, 1fr) ${c.right}px`,gridTemplateRows:`${c.top}px minmax(0, 1fr) ${c.bottom}px`},children:[s&&e&&E.jsx("p",{className:Sf.title,children:e}),E.jsxs("div",{className:Sf.canvasArea,children:[E.jsx(wwe,{className:Sf.r3fRoot,orthographic:!0,children:E.jsxs(D_e,{visRatio:l,abscissaConfig:r,ordinateConfig:i,svgOverlay:u,floatingToolbar:h,children:[E.jsx(_we,{axisOffsets:c,showAxes:s}),E.jsx(U_e,{children:a}),E.jsx(Ewe,{}),E.jsx(Swe,{}),o!==void 0&&E.jsx(Mwe,{value:o})]})}),E.jsx("svg",{ref:f,className:Sf.svgOverlay,overflow:"hidden"})]}),E.jsx("div",{ref:m,className:Sf.floatingToolbar})]})}class Lwe extends Dt{constructor(){super(...arguments),bp(this,"params")}prepare(e){this.params=e}}const Q_=Lwe;class Owe extends Q_{constructor(e){super(),this.setAttribute("position",K_(e*2))}update(e){const{abscissas:n,ordinates:r,errors:i,abscissaScale:o,ordinateScale:s,ignoreValue:a}=this.params,l=r[e],c=a?a(l):!1,u=e*2;if(c){this.attributes.position.setXYZ(u,0,0,Ti),this.attributes.position.setXYZ(u+1,0,0,Ti);return}const f=o(n[e]),h=s(l);if(!Number.isFinite(f)||!Number.isFinite(h)){this.attributes.position.setXYZ(u,0,0,Ti),this.attributes.position.setXYZ(u+1,0,0,Ti);return}const m=i[e],v=s(l-m),x=s(l+m),y=Number.isFinite(v)?v:h,g=Number.isFinite(x)?x:h;this.attributes.position.setXYZ(u,f,y,0),this.attributes.position.setXYZ(u+1,f,g,0)}}const Dwe=Owe;class Fwe extends Q_{constructor(e){super(),this.setAttribute("position",K_(e*2))}update(e){const{abscissas:n,ordinates:r,errors:i,abscissaScale:o,ordinateScale:s,ignoreValue:a}=this.params,l=r[e],c=a?a(l):!1,u=e*2;if(c){this.attributes.position.setXYZ(u,0,0,Ti),this.attributes.position.setXYZ(u+1,0,0,Ti);return}const f=o(n[e]),h=s(l);if(!Number.isFinite(f)||!Number.isFinite(h)){this.attributes.position.setXYZ(u,0,0,Ti),this.attributes.position.setXYZ(u+1,0,0,Ti);return}const m=i[e],v=s(l-m),x=s(l+m);Number.isFinite(v)?this.attributes.position.setXYZ(u,f,v,0):this.attributes.position.setXYZ(u,0,0,Ti),Number.isFinite(x)?this.attributes.position.setXYZ(u+1,f,x,0):this.attributes.position.setXYZ(u+1,0,0,Ti)}}const zwe=Fwe;var Xp=(t=>(t.LineOnly="OnlyLine",t.GlyphsOnly="OnlyGlyphs",t.LineAndGlyphs="LineAndGlyphs",t))(Xp||{}),bl=(t=>(t.Circle="Circle",t.Cross="Cross",t.Square="Square",t.Cap="Cap",t))(bl||{});const Uwe={[bl.Cross]:` float alphaSymbol(vec2 coord, float size) { vec2 pos = floor(size * coord) + 0.5; vec2 d_x = abs(pos.x + vec2(- pos.y, pos.y - size)); @@ -4124,7 +4124,7 @@ No matching component was found for: gl_FragColor = vec4(vertexColor.rgb, alpha); } } - `};return E.jsx("shaderMaterial",{args:[o],vertexColors:i})}function Bwe(t){const{abscissas:e,ordinates:n,errors:r,color:i,visible:o,ignoreValue:s}=t,{abscissaScale:a,ordinateScale:l}=zn(),c=o&&{abscissas:e,ordinates:n,errors:r,abscissaScale:a,ordinateScale:l,ignoreValue:s},u=zx(Dwe,n.length,c),f=zx(zwe,n.length,c);return E.jsxs(E.Fragment,{children:[E.jsx("lineSegments",{geometry:u,visible:o,children:E.jsx("lineBasicMaterial",{color:i})}),E.jsx("points",{geometry:f,visible:o,children:E.jsx(g7,{glyphType:bl.Cap,color:i,size:9})})]})}class jwe extends Z_{constructor(e){super(),this.setAttribute("position",q_(e))}update(e){const{abscissas:n,ordinates:r,abscissaScale:i,ordinateScale:o,ignoreValue:s}=this.params,a=r[e];if(s&&s(a)){this.attributes.position.setXYZ(e,0,0,Ci);return}const l=i(n[e]),c=o(a);if(!Number.isFinite(l)||!Number.isFinite(c)){this.attributes.position.setXYZ(e,0,0,Ci);return}this.attributes.position.setXYZ(e,l,c,0)}}const Vwe=jwe;function $we(t){const{abscissas:e,ordinates:n,glyphType:r=bl.Cross,color:i,size:o=6,visible:s=!0,ignoreValue:a,...l}=t,{abscissaScale:c,ordinateScale:u}=zn(),f=zx(Vwe,n.length,s&&{abscissas:e,ordinates:n,abscissaScale:c,ordinateScale:u,ignoreValue:a},s7(l));return E.jsx("points",{geometry:f,visible:s,...l,children:E.jsx(g7,{glyphType:r,color:i,size:o})})}class Wwe extends Z_{constructor(e){super(),this.setAttribute("position",q_(e))}update(e){const{abscissas:n,ordinates:r,abscissaScale:i,ordinateScale:o,ignoreValue:s}=this.params,a=r[e];if(s&&s(a)){this.attributes.position.setXYZ(e,0,0,Ci);return}const l=i(n[e]),c=o(a);if(!Number.isFinite(l)||!Number.isFinite(c)){this.attributes.position.setXYZ(e,0,0,Ci);return}this.attributes.position.setXYZ(e,l,c,0)}}const Hwe=Wwe;class Gwe extends Fa{}l8({Line_:Gwe});function Xwe(t){const{abscissas:e,ordinates:n,color:r,visible:i=!0,ignoreValue:o,...s}=t,{abscissaScale:a,ordinateScale:l}=zn(),c=zx(Hwe,n.length,i&&{abscissas:e,ordinates:n,abscissaScale:a,ordinateScale:l,ignoreValue:o},s7(s));return E.jsx("line_",{geometry:c,visible:i,...s,children:E.jsx("lineBasicMaterial",{color:r})})}function qwe(t){const{abscissas:e,ordinates:n,errors:r,showErrors:i,color:o,curveType:s=Xp.LineOnly,glyphType:a=bl.Cross,glyphSize:l=6,visible:c=!0,onDataPointClick:u,onDataPointEnter:f,onDataPointLeave:h,ignoreValue:m}=t,v=T.useCallback(g=>{const{index:b}=g;u&&b!==void 0&&u(b,g)},[u]),x=T.useCallback(g=>{const{index:b}=g;f&&b!==void 0&&f(b,g)},[f]),y=T.useCallback(g=>{const{index:b}=g;h&&b!==void 0&&h(b,g)},[h]);return E.jsxs(E.Fragment,{children:[E.jsx(Xwe,{abscissas:e,ordinates:n,color:o,ignoreValue:m,visible:s!==Xp.GlyphsOnly&&c}),E.jsx($we,{abscissas:e,ordinates:n,glyphType:a,color:o,size:l,ignoreValue:m,visible:s!==Xp.LineOnly&&c,onClick:u&&v,onPointerEnter:f&&x,onPointerLeave:h&&y}),r&&E.jsx(Bwe,{abscissas:e,ordinates:n,errors:r,color:o,ignoreValue:m,visible:c&&i})]})}var Qf=(t=>(t.MinGreater="min-greater",t.InvalidMinWithScale="invalid-min-with-scale",t.InvalidMaxWithScale="invalid-max-with-scale",t.CustomMaxFallback="custom-max-fallback",t))(Qf||{});function Ywe(t){return Sx(t*360,1,.5).formatRgb()}function Mf(t){return e=>t(1-e)}const Kwe={Blues:Mf(l1e),Greens:Mf(u1e),Greys:Mf(d1e),Oranges:Mf(y1e),Purples:Mf(p1e),Reds:Mf(g1e),Turbo:T1e,Viridis:R1e,Inferno:P1e,Magma:A1e,Plasma:I1e,Cividis:x1e,Warm:_1e,Cool:w1e,Cubehelix:b1e,BuGn:zye,BuPu:Bye,GnBu:Vye,OrRd:Wye,PuBuGn:Gye,PuBu:qye,PuRd:Kye,RdPu:Jye,YlGnBu:e1e,YlGn:n1e,YlOrBr:i1e,YlOrRd:s1e,Rainbow:S1e,Sinebow:C1e,HSL:Ywe,BrBG:bye,PRGn:wye,PiYG:Mye,PuOr:Cye,RdBu:Rye,RdGy:Pye,RdYlBu:Nye,RdYlGn:Lye,Spectral:Dye},QO=1/20;Z6(0,1+QO,QO);const Zwe={[Xt.Linear]:t=>t,[Xt.Log]:Math.log10,[Xt.SymLog]:t=>Math.sign(t)*Math.log10(1+Math.abs(t)),[Xt.Sqrt]:Math.sqrt,[Xt.Gamma]:t=>t},Jwe={float32:li,uint16:Eu,uint8:ji,uint8_clamped:ji};function Qwe(t,e){const n=Kwe[t];return e?r=>n(1-r):n}function eSe(t,e=Xt.Linear){const n=Zwe[e];return[n(t[0]),n(t[1])]}function tSe(t,e=Mr){if(!t)return;const{rows:n,cols:r}=y_e(t),i=new No(t.data,r,n,hg,Jwe[t.dtype],dg,Ii,Ii,e);return i.needsUpdate=!0,i}const TE=Z_e(tSe),nSe=Ol(255,255,255,0),RE=256,rSe={[Xt.Log]:"log(value) * oneOverLog10",[Xt.SymLog]:"sign(value) * log(1. + abs(value)) * oneOverLog10",[Xt.Sqrt]:"sqrt(value)"},iSe={[Xt.Log]:"value > 0.",[Xt.Sqrt]:"value >= 0."};function oSe(t){const{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:o=!1,magFilter:s,alphaValues:a,alphaDomain:l=E_e,badColor:c=nSe,mask:u}=t,f=TE(e,s),h=TE(a),m=TE(u),v=T.useMemo(()=>{const S=Qwe(i,o),A=Array.from({length:RE}).flatMap((R,L)=>{const{r:k,g:C,b:N}=Ol(S(L/(RE-1)));return[k,C,N,255]}),P=new No(Uint8Array.from(A),RE,1,Ir,ji);return P.needsUpdate=!0,P},[i,o]),[x,y]=Array.isArray(r)?r:[r,1],g=eSe(n,x),b=typeof c=="string"?Ol(c):c,_={uniforms:o7({data:f,mask:m,colorMap:v,min:g[0],oneOverRange:1/(g[1]-g[0]),gammaExponent:y,normRevertFactor:e.dtype==="uint8"?255:1,alpha:h,withAlpha:a?1:0,alphaMin:l[0],oneOverAlphaRange:1/(l[1]-l[0]),badColor:new en(b.r/255,b.g/255,b.b/255,b.opacity)}),vertexShader:O_e,fragmentShader:` + `};return E.jsx("shaderMaterial",{args:[o],vertexColors:i})}function Bwe(t){const{abscissas:e,ordinates:n,errors:r,color:i,visible:o,ignoreValue:s}=t,{abscissaScale:a,ordinateScale:l}=zn(),c=o&&{abscissas:e,ordinates:n,errors:r,abscissaScale:a,ordinateScale:l,ignoreValue:s},u=Ux(Dwe,n.length,c),f=Ux(zwe,n.length,c);return E.jsxs(E.Fragment,{children:[E.jsx("lineSegments",{geometry:u,visible:o,children:E.jsx("lineBasicMaterial",{color:i})}),E.jsx("points",{geometry:f,visible:o,children:E.jsx(g7,{glyphType:bl.Cap,color:i,size:9})})]})}class jwe extends Q_{constructor(e){super(),this.setAttribute("position",K_(e))}update(e){const{abscissas:n,ordinates:r,abscissaScale:i,ordinateScale:o,ignoreValue:s}=this.params,a=r[e];if(s&&s(a)){this.attributes.position.setXYZ(e,0,0,Ti);return}const l=i(n[e]),c=o(a);if(!Number.isFinite(l)||!Number.isFinite(c)){this.attributes.position.setXYZ(e,0,0,Ti);return}this.attributes.position.setXYZ(e,l,c,0)}}const Vwe=jwe;function $we(t){const{abscissas:e,ordinates:n,glyphType:r=bl.Cross,color:i,size:o=6,visible:s=!0,ignoreValue:a,...l}=t,{abscissaScale:c,ordinateScale:u}=zn(),f=Ux(Vwe,n.length,s&&{abscissas:e,ordinates:n,abscissaScale:c,ordinateScale:u,ignoreValue:a},s7(l));return E.jsx("points",{geometry:f,visible:s,...l,children:E.jsx(g7,{glyphType:r,color:i,size:o})})}class Wwe extends Q_{constructor(e){super(),this.setAttribute("position",K_(e))}update(e){const{abscissas:n,ordinates:r,abscissaScale:i,ordinateScale:o,ignoreValue:s}=this.params,a=r[e];if(s&&s(a)){this.attributes.position.setXYZ(e,0,0,Ti);return}const l=i(n[e]),c=o(a);if(!Number.isFinite(l)||!Number.isFinite(c)){this.attributes.position.setXYZ(e,0,0,Ti);return}this.attributes.position.setXYZ(e,l,c,0)}}const Hwe=Wwe;class Gwe extends za{}l8({Line_:Gwe});function Xwe(t){const{abscissas:e,ordinates:n,color:r,visible:i=!0,ignoreValue:o,...s}=t,{abscissaScale:a,ordinateScale:l}=zn(),c=Ux(Hwe,n.length,i&&{abscissas:e,ordinates:n,abscissaScale:a,ordinateScale:l,ignoreValue:o},s7(s));return E.jsx("line_",{geometry:c,visible:i,...s,children:E.jsx("lineBasicMaterial",{color:r})})}function qwe(t){const{abscissas:e,ordinates:n,errors:r,showErrors:i,color:o,curveType:s=Xp.LineOnly,glyphType:a=bl.Cross,glyphSize:l=6,visible:c=!0,onDataPointClick:u,onDataPointEnter:f,onDataPointLeave:h,ignoreValue:m}=t,v=T.useCallback(g=>{const{index:b}=g;u&&b!==void 0&&u(b,g)},[u]),x=T.useCallback(g=>{const{index:b}=g;f&&b!==void 0&&f(b,g)},[f]),y=T.useCallback(g=>{const{index:b}=g;h&&b!==void 0&&h(b,g)},[h]);return E.jsxs(E.Fragment,{children:[E.jsx(Xwe,{abscissas:e,ordinates:n,color:o,ignoreValue:m,visible:s!==Xp.GlyphsOnly&&c}),E.jsx($we,{abscissas:e,ordinates:n,glyphType:a,color:o,size:l,ignoreValue:m,visible:s!==Xp.LineOnly&&c,onClick:u&&v,onPointerEnter:f&&x,onPointerLeave:h&&y}),r&&E.jsx(Bwe,{abscissas:e,ordinates:n,errors:r,color:o,ignoreValue:m,visible:c&&i})]})}var Qf=(t=>(t.MinGreater="min-greater",t.InvalidMinWithScale="invalid-min-with-scale",t.InvalidMaxWithScale="invalid-max-with-scale",t.CustomMaxFallback="custom-max-fallback",t))(Qf||{});function Ywe(t){return Mx(t*360,1,.5).formatRgb()}function Mf(t){return e=>t(1-e)}const Kwe={Blues:Mf(l1e),Greens:Mf(u1e),Greys:Mf(d1e),Oranges:Mf(y1e),Purples:Mf(p1e),Reds:Mf(g1e),Turbo:T1e,Viridis:R1e,Inferno:P1e,Magma:A1e,Plasma:I1e,Cividis:x1e,Warm:_1e,Cool:w1e,Cubehelix:b1e,BuGn:zye,BuPu:Bye,GnBu:Vye,OrRd:Wye,PuBuGn:Gye,PuBu:qye,PuRd:Kye,RdPu:Jye,YlGnBu:e1e,YlGn:n1e,YlOrBr:i1e,YlOrRd:s1e,Rainbow:S1e,Sinebow:C1e,HSL:Ywe,BrBG:bye,PRGn:wye,PiYG:Mye,PuOr:Cye,RdBu:Rye,RdGy:Pye,RdYlBu:Nye,RdYlGn:Lye,Spectral:Dye},QO=1/20;Z6(0,1+QO,QO);const Zwe={[Xt.Linear]:t=>t,[Xt.Log]:Math.log10,[Xt.SymLog]:t=>Math.sign(t)*Math.log10(1+Math.abs(t)),[Xt.Sqrt]:Math.sqrt,[Xt.Gamma]:t=>t},Jwe={float32:ci,uint16:Eu,uint8:ji,uint8_clamped:ji};function Qwe(t,e){const n=Kwe[t];return e?r=>n(1-r):n}function eSe(t,e=Xt.Linear){const n=Zwe[e];return[n(t[0]),n(t[1])]}function tSe(t,e=Mr){if(!t)return;const{rows:n,cols:r}=y_e(t),i=new No(t.data,r,n,hg,Jwe[t.dtype],dg,Ni,Ni,e);return i.needsUpdate=!0,i}const AE=Z_e(tSe),nSe=Ol(255,255,255,0),PE=256,rSe={[Xt.Log]:"log(value) * oneOverLog10",[Xt.SymLog]:"sign(value) * log(1. + abs(value)) * oneOverLog10",[Xt.Sqrt]:"sqrt(value)"},iSe={[Xt.Log]:"value > 0.",[Xt.Sqrt]:"value >= 0."};function oSe(t){const{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:o=!1,magFilter:s,alphaValues:a,alphaDomain:l=E_e,badColor:c=nSe,mask:u}=t,f=AE(e,s),h=AE(a),m=AE(u),v=T.useMemo(()=>{const S=Qwe(i,o),A=Array.from({length:PE}).flatMap((R,L)=>{const{r:k,g:C,b:N}=Ol(S(L/(PE-1)));return[k,C,N,255]}),P=new No(Uint8Array.from(A),PE,1,Ir,ji);return P.needsUpdate=!0,P},[i,o]),[x,y]=Array.isArray(r)?r:[r,1],g=eSe(n,x),b=typeof c=="string"?Ol(c):c,_={uniforms:o7({data:f,mask:m,colorMap:v,min:g[0],oneOverRange:1/(g[1]-g[0]),gammaExponent:y,normRevertFactor:e.dtype==="uint8"?255:1,alpha:h,withAlpha:a?1:0,alphaMin:l[0],oneOverAlphaRange:1/(l[1]-l[0]),badColor:new en(b.r/255,b.g/255,b.b/255,b.opacity)}),vertexShader:O_e,fragmentShader:` uniform sampler2D data; uniform sampler2D colorMap; @@ -4170,11 +4170,11 @@ No matching component was found for: } } } - `};return E.jsx("shaderMaterial",{args:[_],side:es})}const sSe=T.memo(oSe);function aSe(t){const{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:o,magFilter:s,alphaValues:a,alphaDomain:l,badColor:c,mask:u,...f}=t;return E.jsx(m7,{...f,children:E.jsx(sSe,{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:o,magFilter:s,alphaValues:a,alphaDomain:l,badColor:c,mask:u})})}const{btn:lSe,btnLike:cSe,icon:uSe,label:fSe,popup:dSe}=lP,hSe="_toolbar_d77010c",pSe="_controls_6f2898a",mSe="_controlWrapper_c53184f",gSe="_control_72c50d3",vSe="_sep_9963159",ySe="_arrowIcon_52a7a56",xSe="_menu_9a962f8",bSe="_btnOption_14b8d45 btnClean",_Se=`_btn_ea88005 ${lSe}`,wSe=`_btnLike_059b9d6 ${cSe}`,SSe=`_icon_b73dfea ${uSe}`,MSe=`_label_917dfbf ${fSe}`,ESe=`_popup_486e2ed ${dSe}`,Ai={toolbar:hSe,controls:pSe,controlWrapper:mSe,control:gSe,sep:vSe,arrowIcon:ySe,menu:xSe,btnOption:bSe,btn:_Se,btnLike:wSe,icon:SSe,label:MSe,popup:ESe},CSe=T.forwardRef((t,e)=>{const{label:n,icon:r,iconOnly:i,small:o,raised:s,withArrow:a,disabled:l,...c}=t;return E.jsx("button",{ref:e,className:Ai.btn,type:"button",title:i?n:void 0,"aria-label":i?n:void 0,disabled:l,"data-small":o||void 0,"data-raised":s||void 0,...c,children:E.jsxs("span",{className:Ai.btnLike,children:[r&&E.jsx(r,{className:Ai.icon}),!i&&E.jsx("span",{className:Ai.label,children:n}),a&&E.jsx($9,{className:Ai.arrowIcon})]})})}),cP=CSe,Jc=6,TSe=320;function RSe(){const[t,e]=e_();return eP({open:t,middleware:[KA(Jc),yxe({padding:Jc*2,apply({availableHeight:n,elements:r,rects:i}){Object.assign(r.floating.style,{maxHeight:`${Math.min(n,TSe)}px`,minWidth:`${i.reference.width}px`})}}),ZA({padding:Jc})],onOpenChange:e,whileElementsMounted:YA})}function uP(t){const{refs:e,onOpenChange:n}=t,{domReference:r,floating:i}=e,o=T.useCallback(l=>{var c,u;const{relatedTarget:f}=l;f&&!((c=r.current)!=null&&c.contains(f))&&!((u=i.current)!=null&&u.contains(f))&&n(!1)},[r,i,n]),s=T.useMemo(()=>({onBlur:o}),[o]),a=T.useMemo(()=>({onBlur:o}),[o]);return q6("Escape",()=>n(!1)),zre(e.floating,l=>{const c=e.domReference.current;l.target instanceof Element&&c!=null&&c.contains(l.target)||n(!1)}),T.useMemo(()=>({reference:s,floating:a}),[s,a])}const ASe="_list_0eb2b49",PSe="_entry_d2776e7",ISe="_shortcut_cf4534d",AE={list:ASe,entry:PSe,shortcut:ISe};function NSe(t){const{interactions:e}=t,[n,r]=e_(),i=T.useId(),{refs:o,floatingStyles:s,context:a}=eP({open:n,middleware:[KA(Jc),ZA({padding:Jc})],onOpenChange:r,whileElementsMounted:YA}),{getReferenceProps:l,getFloatingProps:c}=tP([QA(a),uP(a)]);return E.jsxs(E.Fragment,{children:[E.jsx(cP,{ref:o.setReference,id:i,label:"Show help",icon:Zxe,iconOnly:!0,"aria-haspopup":"dialog","aria-expanded":n,"aria-controls":n&&a.floatingId||void 0,...l()}),n&&E.jsx("div",{ref:o.setFloating,id:a.floatingId,className:Ai.popup,style:s,role:"dialog","aria-labelledby":i,...c(),children:E.jsx("ul",{className:AE.list,children:e.map(({shortcut:u,description:f})=>E.jsxs("li",{className:AE.entry,children:[E.jsx("span",{children:f})," ",E.jsx("kbd",{className:AE.shortcut,children:u})]},u))})})]})}const kSe="_controlWrapper_8627c21",LSe="_control_0b569a9",e5={controlWrapper:kSe,control:LSe};function OSe(t){const{children:e,knownWidth:n,onMeasure:r}=t;return E.jsx(nP,{onResize:({entry:i})=>{i&&i.width>(n||0)&&r(i.width)},children:({measureRef:i})=>E.jsx("div",{className:e5.controlWrapper,"data-measured":n!==void 0,children:E.jsx("div",{ref:i,className:e5.control,children:e})})})}const{popup:DSe}=lP,FSe="_control_ad90dfa",zSe=`_popup_c29165d ${DSe}`,t5={control:FSe,popup:zSe};function Qc(t){return E.jsx("span",{className:Ai.sep,...t})}function USe(t){const{children:e}=t,n=$A(e).filter(T.isValidElement),[r,i]=e_(),o=T.useId(),{refs:s,floatingStyles:a,context:l}=eP({open:r,placement:"bottom-end",middleware:[KA(Jc),ZA({padding:Jc})],onOpenChange:i,whileElementsMounted:YA}),{getReferenceProps:c,getFloatingProps:u}=tP([QA(l),uP(l)]);return n.length===0?null:E.jsxs(E.Fragment,{children:[E.jsx(Qc,{}),E.jsx(cP,{ref:s.setReference,id:o,label:"More controls",icon:Jxe,iconOnly:!0,"aria-haspopup":"dialog","aria-expanded":r,"aria-controls":r&&l.floatingId||void 0,...c()}),r&&E.jsx("div",{ref:s.setFloating,id:l.floatingId,className:t5.popup,style:a,role:"dialog","aria-labelledby":o,...u(),children:n.map(f=>E.jsx("div",{className:t5.control,children:T.cloneElement(f)},f.key))})]})}function BSe(t){var e;const{children:n,interactions:r,overflowChildren:i=[]}=t,o=$A(n).filter(T.isValidElement),[s,a]=kre(),l=s?s.width:0,c=Rre(),[u,f]=o.reduce(([m,v,x],y)=>{const g=c.get(y.key)??0,b=x+g>l;return[b?m:[...m,y],b?[...v,y]:v,x+g]},[[],[],0]),h=((e=u[u.length-1])==null?void 0:e.type)===Qc;return E.jsxs("div",{className:Ai.toolbar,children:[E.jsx("div",{ref:a,className:Ai.controls,children:(h?u.slice(0,-1):u).map(m=>E.jsx(OSe,{knownWidth:c.get(m.key),onMeasure:v=>{c.set(m.key,v)},children:m},m.key))}),E.jsxs(USe,{children:[i,f.filter(m=>m.type!==Qc)]}),r&&E.jsx(Qc,{}),r&&E.jsx(NSe,{interactions:r})]})}function Ac(t){const{value:e,onToggle:n,...r}=t;return E.jsx(cP,{...r,"aria-pressed":e,onClick:()=>n()})}T.createContext(void 0);const jSe="_boundEditor_ce4a770",VSe="_label_1e85446",$Se="_value_c7f465d",PE={boundEditor:jSe,label:VSe,value:$Se},WSe="_root_86b0b1e",HSe="_dataRange_03d542e",GSe="_autoscale_8ea032e",XSe="_error_841a0df",qSe="_errorMessage_a16acf6",YSe="_actionBtn_18350cd btnClean",KSe="_swapBtn_2e22485 _actionBtn_18350cd btnClean",Il={root:WSe,dataRange:HSe,autoscale:GSe,error:XSe,errorMessage:qSe,actionBtn:YSe,swapBtn:KSe},GC=T.forwardRef((t,e)=>{const{bound:n,value:r,isEditing:i,hasError:o,onEditToggle:s,onChange:a}=t,l=`${n}-bound`,c=T.useRef(null),[u,f]=T.useState("");function h(){s(!1),f(wE(r))}return T.useImperativeHandle(e,()=>({cancel:h})),T.useEffect(()=>{f(wE(r))},[r,f]),T.useEffect(()=>{var m,v;i||(m=c.current)==null||m.blur(),i&&n==="min"&&((v=c.current)==null||v.focus())},[i,n]),E.jsxs("form",{className:PE.boundEditor,"data-error":o||void 0,"data-editing":i,onSubmit:m=>{m.preventDefault();const v=Number.parseFloat(u.replace("−","-")),x=Number.isNaN(v)?r:I_e(v);f(wE(x)),a(x),s(!1)},children:[E.jsx("label",{id:`${l}-label`,className:PE.label,htmlFor:l,children:n}),E.jsx("input",{id:l,ref:c,className:PE.value,type:"text",name:"bound",value:u,title:i?void 0:r.toString(),"aria-labelledby":`${l}-label`,onChange:m=>f(m.target.value),onFocus:()=>{i||s(!0)}}),E.jsx("button",{className:Il.actionBtn,type:"submit",disabled:!i,"aria-label":`Apply ${n}`,children:E.jsx(Yxe,{})}),E.jsx("button",{className:Il.actionBtn,type:"button",disabled:!i,"aria-label":`Cancel ${n}`,onClick:()=>h(),children:E.jsx(Qxe,{})})]})});GC.displayName="BoundEditor";const ZSe={[Qf.MinGreater]:{message:"Min greater than max",fallback:"data range"},[Qf.InvalidMinWithScale]:{message:"Custom min invalid with this scale",fallback:"data min"},[Qf.InvalidMaxWithScale]:{message:"Custom max invalid with this scale",fallback:"data max"},[Qf.CustomMaxFallback]:{message:"Custom min invalid with this scale",fallback:"custom max"}};function IE(t){const{error:e,showSwapBtn:n=!1,onSwap:r}=t,{message:i,fallback:o}=ZSe[e];return E.jsxs("p",{className:Il.error,children:[E.jsxs("span",{className:Il.errorMessage,children:[i,E.jsx("br",{}),E.jsx(Kxe,{})," falling back to ",E.jsx("strong",{children:o})]}),n&&r&&E.jsx("button",{className:Il.swapBtn,type:"button","aria-label":"Swap min and max",onClick:()=>r(),children:E.jsx(ebe,{})})]})}const JSe=T.forwardRef((t,e)=>{const{sliderDomain:n,dataDomain:r,errors:i}=t,{isAutoMin:o,isAutoMax:s,isEditingMin:a,isEditingMax:l}=t,{onAutoMinToggle:c,onAutoMaxToggle:u,onEditMin:f,onEditMax:h,onChangeMin:m,onChangeMax:v,onSwap:x}=t,{minGreater:y,minError:g,maxError:b}=i,_=T.useRef(null),S=T.useRef(null);return T.useImperativeHandle(e,()=>({cancelEditing:()=>{var A,P;(A=_.current)==null||A.cancel(),(P=S.current)==null||P.cancel()}})),E.jsxs("div",{className:Il.root,children:[y&&E.jsx(IE,{error:Qf.MinGreater,showSwapBtn:!o&&!s,onSwap:x}),E.jsx(GC,{ref:_,bound:"min",value:n[0],isEditing:a,hasError:y||!!g,onEditToggle:f,onChange:m}),g&&E.jsx(IE,{error:g}),E.jsx(GC,{ref:S,bound:"max",value:n[1],isEditing:l,hasError:y||!!b,onEditToggle:h,onChange:v}),b&&E.jsx(IE,{error:b}),E.jsxs("p",{className:Il.dataRange,children:["Data range"," ",E.jsxs("span",{children:["["," ",E.jsx("abbr",{title:r[0].toString(),children:VO(r[0])})," ",","," ",E.jsx("abbr",{title:r[1].toString(),children:VO(r[1])})," ","]"]})]}),E.jsxs("p",{className:Il.autoscale,children:["Autoscale"," ",E.jsx(Ac,{label:"Min",raised:!0,value:o,onToggle:c}),E.jsx(Ac,{label:"Max",raised:!0,value:s,onToggle:u})]})]})});JSe.displayName="DomainControls";const QSe="_thumb_be15bc7",eMe="_thumbBtnLike_3744319",tMe="_icon_4b34f14",fy={thumb:QSe,thumbBtnLike:eMe,icon:tMe},nMe=T.forwardRef((t,e)=>{const{bound:n,isAuto:r,hasError:i,disabled:o,AutoIcon:s,...a}=t;return E.jsx("div",{ref:e,...a,className:fy.thumb,"aria-label":`Change ${n} limit`,"aria-disabled":o||void 0,tabIndex:o?-1:a.tabIndex,"data-auto":r,"data-error":i||void 0,children:E.jsxs("div",{className:fy.thumbBtnLike,children:[r&&E.jsx(s,{className:fy.icon}),!r&&i&&E.jsx(qxe,{className:fy.icon,strokeWidth:"3"})]})})});nMe.displayName="Thumb";function rMe(t){return Array.isArray(t)?t:Object.values(t).flat()}function n5(t){const{activeIndex:e,selectedIndex:n,children:r,getItemProps:i,onSelect:o}=t,{ref:s,index:a}=Rxe();return E.jsx("button",{ref:s,className:Ai.btnOption,type:"button",role:"option","aria-selected":a===n||void 0,tabIndex:a===e?0:-1,"data-active":a===e||void 0,...i({onClick:()=>o(a)}),children:r})}const iMe="_label_568c73e",oMe="_groups_6cecc1b",sMe="_groupLabel_b6d0922",NE={label:iMe,groups:oMe,groupLabel:sMe};function aMe(t){const{label:e,value:n,disabled:r,onChange:i,options:o,renderOption:s}=t,{context:a,refs:l,floatingStyles:c}=RSe(),{open:u,onOpenChange:f}=a,h=T.useId(),m=T.useId(),v=T.useId(),x=T.useRef([]),[y,g]=T.useState(null),[b,_]=T.useState(()=>rMe(o).indexOf(n)),{getReferenceProps:S,getFloatingProps:A,getItemProps:P}=tP([QA(a),uP(a),Bxe(a,{listRef:x,activeIndex:y,loop:!0,focusItemOnHover:!1,onNavigate:g})]);function R(L,k){_(L),f(!1),i(k)}return E.jsxs(E.Fragment,{children:[e&&E.jsx("span",{id:h,className:NE.label,children:e}),E.jsx("button",{ref:l.setReference,id:m,className:Ai.btn,type:"button",disabled:r,role:"combobox","aria-labelledby":`${e?h:""} ${v}`,"aria-haspopup":"listbox","aria-expanded":u,"aria-controls":u&&a.floatingId||void 0,...S(),children:E.jsxs("span",{id:v,className:Ai.btnLike,children:[s(n),E.jsx($9,{className:Ai.arrowIcon})]})}),u&&E.jsx("div",{ref:l.setFloating,id:a.floatingId,className:Ai.menu,style:c,role:"listbox","aria-labelledby":m,...A(),children:E.jsx(Txe,{elementsRef:x,children:Array.isArray(o)?o.map(L=>E.jsx(n5,{activeIndex:y,selectedIndex:b,getItemProps:P,onSelect:k=>R(k,L),children:s(L)},L)):E.jsx("ul",{className:NE.groups,children:Object.entries(o).map(([L,k])=>E.jsxs("li",{children:[E.jsx("span",{className:NE.groupLabel,children:L}),k.map(C=>E.jsx(n5,{activeIndex:y,selectedIndex:b,getItemProps:P,onSelect:N=>R(N,C),children:s(C)},C))]},L))})})})]})}function lMe(t){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:E.jsx("path",{d:"M18 17v-2H6v2zm4-4v-2H2v2zm-8 8v-2h-4v2zm4-12V7H6v2zm-8-4h4V3h-4z",stroke:"none"})})}function cMe(t){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",...t,children:E.jsx("polyline",{points:"2 12 6 12 9 21 15 3 19 3"})})}Xt.Linear+"",Xt.Log+"",Xt.SymLog+"",Xt.Sqrt+"",Xt.Gamma+"";$y.Phase+"",$y.Amplitude+"",$y.PhaseAmplitude+"";Zbe(t=>({val:void 0,setTooltipValue:(e,n,r)=>t(()=>({val:{x:e,y:n,v:r}}))}));function uMe(t){const{api:e,layer:n,x:r,y:i,magFilter:o,onPointerMove:s,...a}=t,l=e.get(n,new Ne(r,i)),[c,u]=l.shape,f=Sre(h=>{s==null||s(h,l)},[s],50);return E.jsx("group",{position:[r+u/2,i+c/2,0],children:E.jsx(aSe,{values:l,...a,magFilter:o,size:{width:u,height:c},onPointerMove:s&&f})})}T.memo(uMe);new kr(new H(-1,-1,-1),new H(1,1,1));var v7={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},r5=St.createContext&&St.createContext(v7),fMe=["attr","size","title"];function dMe(t,e){if(t==null)return{};var n=hMe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hMe(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 Bx(){return Bx=Object.assign?Object.assign.bind():function(t){for(var e=1;eSt.createElement(e.tag,jx({key:n},e.attr),y7(e.child)))}function fP(t){return e=>St.createElement(vMe,Bx({attr:jx({},t.attr)},e),y7(t.child))}function vMe(t){var e=n=>{var{attr:r,size:i,title:o}=t,s=dMe(t,fMe),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),St.createElement("svg",Bx({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:jx(jx({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&St.createElement("title",null,o),t.children)};return r5!==void 0?St.createElement(r5.Consumer,null,n=>e(n)):e(v7)}function yMe(t){return fP({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z"},child:[]}]})(t)}function xMe(t){return fP({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"},child:[]}]})(t)}function bMe(t){return fP({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"},child:[]}]})(t)}var Kt={};const _Me=Object.prototype.toString;function Gs(t){const e=_Me.call(t);return e.endsWith("Array]")&&!e.includes("Big")}const wMe=Object.freeze(Object.defineProperty({__proto__:null,isAnyArray:Gs},Symbol.toStringTag,{value:"Module"})),SMe=qs(wMe);function MMe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Gs(t))throw new TypeError("input must be an array");if(t.length===0)throw new TypeError("input must not be empty");var n=e.fromIndex,r=n===void 0?0:n,i=e.toIndex,o=i===void 0?t.length:i;if(r<0||r>=t.length||!Number.isInteger(r))throw new Error("fromIndex must be a positive integer smaller than length");if(o<=r||o>t.length||!Number.isInteger(o))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var s=t[r],a=r+1;as&&(s=t[a]);return s}function EMe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Gs(t))throw new TypeError("input must be an array");if(t.length===0)throw new TypeError("input must not be empty");var n=e.fromIndex,r=n===void 0?0:n,i=e.toIndex,o=i===void 0?t.length:i;if(r<0||r>=t.length||!Number.isInteger(r))throw new Error("fromIndex must be a positive integer smaller than length");if(o<=r||o>t.length||!Number.isInteger(o))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var s=t[r],a=r+1;a1&&arguments[1]!==void 0?arguments[1]:{};if(Gs(t)){if(t.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var n;if(e.output!==void 0){if(!Gs(e.output))throw new TypeError("output option must be an array if specified");n=e.output}else n=new Array(t.length);var r=EMe(t),i=MMe(t);if(r===i)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var o=e.min,s=o===void 0?e.autoMinMax?r:0:o,a=e.max,l=a===void 0?e.autoMinMax?i:1:a;if(s>=l)throw new RangeError("min option must be smaller than max option");for(var c=(l-s)/(i-r),u=0;u{const{label:n,icon:r,iconOnly:i,small:o,raised:s,withArrow:a,disabled:l,...c}=t;return E.jsx("button",{ref:e,className:Pi.btn,type:"button",title:i?n:void 0,"aria-label":i?n:void 0,disabled:l,"data-small":o||void 0,"data-raised":s||void 0,...c,children:E.jsxs("span",{className:Pi.btnLike,children:[r&&E.jsx(r,{className:Pi.icon}),!i&&E.jsx("span",{className:Pi.label,children:n}),a&&E.jsx($9,{className:Pi.arrowIcon})]})})}),cP=CSe,Jc=6,TSe=320;function RSe(){const[t,e]=n_();return eP({open:t,middleware:[KA(Jc),yxe({padding:Jc*2,apply({availableHeight:n,elements:r,rects:i}){Object.assign(r.floating.style,{maxHeight:`${Math.min(n,TSe)}px`,minWidth:`${i.reference.width}px`})}}),ZA({padding:Jc})],onOpenChange:e,whileElementsMounted:YA})}function uP(t){const{refs:e,onOpenChange:n}=t,{domReference:r,floating:i}=e,o=T.useCallback(l=>{var c,u;const{relatedTarget:f}=l;f&&!((c=r.current)!=null&&c.contains(f))&&!((u=i.current)!=null&&u.contains(f))&&n(!1)},[r,i,n]),s=T.useMemo(()=>({onBlur:o}),[o]),a=T.useMemo(()=>({onBlur:o}),[o]);return q6("Escape",()=>n(!1)),zre(e.floating,l=>{const c=e.domReference.current;l.target instanceof Element&&c!=null&&c.contains(l.target)||n(!1)}),T.useMemo(()=>({reference:s,floating:a}),[s,a])}const ASe="_list_0eb2b49",PSe="_entry_d2776e7",ISe="_shortcut_cf4534d",IE={list:ASe,entry:PSe,shortcut:ISe};function NSe(t){const{interactions:e}=t,[n,r]=n_(),i=T.useId(),{refs:o,floatingStyles:s,context:a}=eP({open:n,middleware:[KA(Jc),ZA({padding:Jc})],onOpenChange:r,whileElementsMounted:YA}),{getReferenceProps:l,getFloatingProps:c}=tP([QA(a),uP(a)]);return E.jsxs(E.Fragment,{children:[E.jsx(cP,{ref:o.setReference,id:i,label:"Show help",icon:Zxe,iconOnly:!0,"aria-haspopup":"dialog","aria-expanded":n,"aria-controls":n&&a.floatingId||void 0,...l()}),n&&E.jsx("div",{ref:o.setFloating,id:a.floatingId,className:Pi.popup,style:s,role:"dialog","aria-labelledby":i,...c(),children:E.jsx("ul",{className:IE.list,children:e.map(({shortcut:u,description:f})=>E.jsxs("li",{className:IE.entry,children:[E.jsx("span",{children:f})," ",E.jsx("kbd",{className:IE.shortcut,children:u})]},u))})})]})}const kSe="_controlWrapper_8627c21",LSe="_control_0b569a9",e5={controlWrapper:kSe,control:LSe};function OSe(t){const{children:e,knownWidth:n,onMeasure:r}=t;return E.jsx(nP,{onResize:({entry:i})=>{i&&i.width>(n||0)&&r(i.width)},children:({measureRef:i})=>E.jsx("div",{className:e5.controlWrapper,"data-measured":n!==void 0,children:E.jsx("div",{ref:i,className:e5.control,children:e})})})}const{popup:DSe}=lP,FSe="_control_ad90dfa",zSe=`_popup_c29165d ${DSe}`,t5={control:FSe,popup:zSe};function Qc(t){return E.jsx("span",{className:Pi.sep,...t})}function USe(t){const{children:e}=t,n=$A(e).filter(T.isValidElement),[r,i]=n_(),o=T.useId(),{refs:s,floatingStyles:a,context:l}=eP({open:r,placement:"bottom-end",middleware:[KA(Jc),ZA({padding:Jc})],onOpenChange:i,whileElementsMounted:YA}),{getReferenceProps:c,getFloatingProps:u}=tP([QA(l),uP(l)]);return n.length===0?null:E.jsxs(E.Fragment,{children:[E.jsx(Qc,{}),E.jsx(cP,{ref:s.setReference,id:o,label:"More controls",icon:Jxe,iconOnly:!0,"aria-haspopup":"dialog","aria-expanded":r,"aria-controls":r&&l.floatingId||void 0,...c()}),r&&E.jsx("div",{ref:s.setFloating,id:l.floatingId,className:t5.popup,style:a,role:"dialog","aria-labelledby":o,...u(),children:n.map(f=>E.jsx("div",{className:t5.control,children:T.cloneElement(f)},f.key))})]})}function BSe(t){var e;const{children:n,interactions:r,overflowChildren:i=[]}=t,o=$A(n).filter(T.isValidElement),[s,a]=kre(),l=s?s.width:0,c=Rre(),[u,f]=o.reduce(([m,v,x],y)=>{const g=c.get(y.key)??0,b=x+g>l;return[b?m:[...m,y],b?[...v,y]:v,x+g]},[[],[],0]),h=((e=u[u.length-1])==null?void 0:e.type)===Qc;return E.jsxs("div",{className:Pi.toolbar,children:[E.jsx("div",{ref:a,className:Pi.controls,children:(h?u.slice(0,-1):u).map(m=>E.jsx(OSe,{knownWidth:c.get(m.key),onMeasure:v=>{c.set(m.key,v)},children:m},m.key))}),E.jsxs(USe,{children:[i,f.filter(m=>m.type!==Qc)]}),r&&E.jsx(Qc,{}),r&&E.jsx(NSe,{interactions:r})]})}function Ac(t){const{value:e,onToggle:n,...r}=t;return E.jsx(cP,{...r,"aria-pressed":e,onClick:()=>n()})}T.createContext(void 0);const jSe="_boundEditor_ce4a770",VSe="_label_1e85446",$Se="_value_c7f465d",NE={boundEditor:jSe,label:VSe,value:$Se},WSe="_root_86b0b1e",HSe="_dataRange_03d542e",GSe="_autoscale_8ea032e",XSe="_error_841a0df",qSe="_errorMessage_a16acf6",YSe="_actionBtn_18350cd btnClean",KSe="_swapBtn_2e22485 _actionBtn_18350cd btnClean",Il={root:WSe,dataRange:HSe,autoscale:GSe,error:XSe,errorMessage:qSe,actionBtn:YSe,swapBtn:KSe},XC=T.forwardRef((t,e)=>{const{bound:n,value:r,isEditing:i,hasError:o,onEditToggle:s,onChange:a}=t,l=`${n}-bound`,c=T.useRef(null),[u,f]=T.useState("");function h(){s(!1),f(ME(r))}return T.useImperativeHandle(e,()=>({cancel:h})),T.useEffect(()=>{f(ME(r))},[r,f]),T.useEffect(()=>{var m,v;i||(m=c.current)==null||m.blur(),i&&n==="min"&&((v=c.current)==null||v.focus())},[i,n]),E.jsxs("form",{className:NE.boundEditor,"data-error":o||void 0,"data-editing":i,onSubmit:m=>{m.preventDefault();const v=Number.parseFloat(u.replace("−","-")),x=Number.isNaN(v)?r:I_e(v);f(ME(x)),a(x),s(!1)},children:[E.jsx("label",{id:`${l}-label`,className:NE.label,htmlFor:l,children:n}),E.jsx("input",{id:l,ref:c,className:NE.value,type:"text",name:"bound",value:u,title:i?void 0:r.toString(),"aria-labelledby":`${l}-label`,onChange:m=>f(m.target.value),onFocus:()=>{i||s(!0)}}),E.jsx("button",{className:Il.actionBtn,type:"submit",disabled:!i,"aria-label":`Apply ${n}`,children:E.jsx(Yxe,{})}),E.jsx("button",{className:Il.actionBtn,type:"button",disabled:!i,"aria-label":`Cancel ${n}`,onClick:()=>h(),children:E.jsx(Qxe,{})})]})});XC.displayName="BoundEditor";const ZSe={[Qf.MinGreater]:{message:"Min greater than max",fallback:"data range"},[Qf.InvalidMinWithScale]:{message:"Custom min invalid with this scale",fallback:"data min"},[Qf.InvalidMaxWithScale]:{message:"Custom max invalid with this scale",fallback:"data max"},[Qf.CustomMaxFallback]:{message:"Custom min invalid with this scale",fallback:"custom max"}};function kE(t){const{error:e,showSwapBtn:n=!1,onSwap:r}=t,{message:i,fallback:o}=ZSe[e];return E.jsxs("p",{className:Il.error,children:[E.jsxs("span",{className:Il.errorMessage,children:[i,E.jsx("br",{}),E.jsx(Kxe,{})," falling back to ",E.jsx("strong",{children:o})]}),n&&r&&E.jsx("button",{className:Il.swapBtn,type:"button","aria-label":"Swap min and max",onClick:()=>r(),children:E.jsx(ebe,{})})]})}const JSe=T.forwardRef((t,e)=>{const{sliderDomain:n,dataDomain:r,errors:i}=t,{isAutoMin:o,isAutoMax:s,isEditingMin:a,isEditingMax:l}=t,{onAutoMinToggle:c,onAutoMaxToggle:u,onEditMin:f,onEditMax:h,onChangeMin:m,onChangeMax:v,onSwap:x}=t,{minGreater:y,minError:g,maxError:b}=i,_=T.useRef(null),S=T.useRef(null);return T.useImperativeHandle(e,()=>({cancelEditing:()=>{var A,P;(A=_.current)==null||A.cancel(),(P=S.current)==null||P.cancel()}})),E.jsxs("div",{className:Il.root,children:[y&&E.jsx(kE,{error:Qf.MinGreater,showSwapBtn:!o&&!s,onSwap:x}),E.jsx(XC,{ref:_,bound:"min",value:n[0],isEditing:a,hasError:y||!!g,onEditToggle:f,onChange:m}),g&&E.jsx(kE,{error:g}),E.jsx(XC,{ref:S,bound:"max",value:n[1],isEditing:l,hasError:y||!!b,onEditToggle:h,onChange:v}),b&&E.jsx(kE,{error:b}),E.jsxs("p",{className:Il.dataRange,children:["Data range"," ",E.jsxs("span",{children:["["," ",E.jsx("abbr",{title:r[0].toString(),children:VO(r[0])})," ",","," ",E.jsx("abbr",{title:r[1].toString(),children:VO(r[1])})," ","]"]})]}),E.jsxs("p",{className:Il.autoscale,children:["Autoscale"," ",E.jsx(Ac,{label:"Min",raised:!0,value:o,onToggle:c}),E.jsx(Ac,{label:"Max",raised:!0,value:s,onToggle:u})]})]})});JSe.displayName="DomainControls";const QSe="_thumb_be15bc7",eMe="_thumbBtnLike_3744319",tMe="_icon_4b34f14",fy={thumb:QSe,thumbBtnLike:eMe,icon:tMe},nMe=T.forwardRef((t,e)=>{const{bound:n,isAuto:r,hasError:i,disabled:o,AutoIcon:s,...a}=t;return E.jsx("div",{ref:e,...a,className:fy.thumb,"aria-label":`Change ${n} limit`,"aria-disabled":o||void 0,tabIndex:o?-1:a.tabIndex,"data-auto":r,"data-error":i||void 0,children:E.jsxs("div",{className:fy.thumbBtnLike,children:[r&&E.jsx(s,{className:fy.icon}),!r&&i&&E.jsx(qxe,{className:fy.icon,strokeWidth:"3"})]})})});nMe.displayName="Thumb";function rMe(t){return Array.isArray(t)?t:Object.values(t).flat()}function n5(t){const{activeIndex:e,selectedIndex:n,children:r,getItemProps:i,onSelect:o}=t,{ref:s,index:a}=Rxe();return E.jsx("button",{ref:s,className:Pi.btnOption,type:"button",role:"option","aria-selected":a===n||void 0,tabIndex:a===e?0:-1,"data-active":a===e||void 0,...i({onClick:()=>o(a)}),children:r})}const iMe="_label_568c73e",oMe="_groups_6cecc1b",sMe="_groupLabel_b6d0922",LE={label:iMe,groups:oMe,groupLabel:sMe};function aMe(t){const{label:e,value:n,disabled:r,onChange:i,options:o,renderOption:s}=t,{context:a,refs:l,floatingStyles:c}=RSe(),{open:u,onOpenChange:f}=a,h=T.useId(),m=T.useId(),v=T.useId(),x=T.useRef([]),[y,g]=T.useState(null),[b,_]=T.useState(()=>rMe(o).indexOf(n)),{getReferenceProps:S,getFloatingProps:A,getItemProps:P}=tP([QA(a),uP(a),Bxe(a,{listRef:x,activeIndex:y,loop:!0,focusItemOnHover:!1,onNavigate:g})]);function R(L,k){_(L),f(!1),i(k)}return E.jsxs(E.Fragment,{children:[e&&E.jsx("span",{id:h,className:LE.label,children:e}),E.jsx("button",{ref:l.setReference,id:m,className:Pi.btn,type:"button",disabled:r,role:"combobox","aria-labelledby":`${e?h:""} ${v}`,"aria-haspopup":"listbox","aria-expanded":u,"aria-controls":u&&a.floatingId||void 0,...S(),children:E.jsxs("span",{id:v,className:Pi.btnLike,children:[s(n),E.jsx($9,{className:Pi.arrowIcon})]})}),u&&E.jsx("div",{ref:l.setFloating,id:a.floatingId,className:Pi.menu,style:c,role:"listbox","aria-labelledby":m,...A(),children:E.jsx(Txe,{elementsRef:x,children:Array.isArray(o)?o.map(L=>E.jsx(n5,{activeIndex:y,selectedIndex:b,getItemProps:P,onSelect:k=>R(k,L),children:s(L)},L)):E.jsx("ul",{className:LE.groups,children:Object.entries(o).map(([L,k])=>E.jsxs("li",{children:[E.jsx("span",{className:LE.groupLabel,children:L}),k.map(C=>E.jsx(n5,{activeIndex:y,selectedIndex:b,getItemProps:P,onSelect:N=>R(N,C),children:s(C)},C))]},L))})})})]})}function lMe(t){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:E.jsx("path",{d:"M18 17v-2H6v2zm4-4v-2H2v2zm-8 8v-2h-4v2zm4-12V7H6v2zm-8-4h4V3h-4z",stroke:"none"})})}function cMe(t){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",...t,children:E.jsx("polyline",{points:"2 12 6 12 9 21 15 3 19 3"})})}Xt.Linear+"",Xt.Log+"",Xt.SymLog+"",Xt.Sqrt+"",Xt.Gamma+"";Wy.Phase+"",Wy.Amplitude+"",Wy.PhaseAmplitude+"";Zbe(t=>({val:void 0,setTooltipValue:(e,n,r)=>t(()=>({val:{x:e,y:n,v:r}}))}));function uMe(t){const{api:e,layer:n,x:r,y:i,magFilter:o,onPointerMove:s,...a}=t,l=e.get(n,new Ne(r,i)),[c,u]=l.shape,f=Sre(h=>{s==null||s(h,l)},[s],50);return E.jsx("group",{position:[r+u/2,i+c/2,0],children:E.jsx(aSe,{values:l,...a,magFilter:o,size:{width:u,height:c},onPointerMove:s&&f})})}T.memo(uMe);new kr(new H(-1,-1,-1),new H(1,1,1));var v7={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},r5=St.createContext&&St.createContext(v7),fMe=["attr","size","title"];function dMe(t,e){if(t==null)return{};var n=hMe(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hMe(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 jx(){return jx=Object.assign?Object.assign.bind():function(t){for(var e=1;eSt.createElement(e.tag,Vx({key:n},e.attr),y7(e.child)))}function fP(t){return e=>St.createElement(vMe,jx({attr:Vx({},t.attr)},e),y7(t.child))}function vMe(t){var e=n=>{var{attr:r,size:i,title:o}=t,s=dMe(t,fMe),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),St.createElement("svg",jx({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:Vx(Vx({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&St.createElement("title",null,o),t.children)};return r5!==void 0?St.createElement(r5.Consumer,null,n=>e(n)):e(v7)}function yMe(t){return fP({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z"},child:[]}]})(t)}function xMe(t){return fP({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"},child:[]}]})(t)}function bMe(t){return fP({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"},child:[]}]})(t)}var Kt={};const _Me=Object.prototype.toString;function Xs(t){const e=_Me.call(t);return e.endsWith("Array]")&&!e.includes("Big")}const wMe=Object.freeze(Object.defineProperty({__proto__:null,isAnyArray:Xs},Symbol.toStringTag,{value:"Module"})),SMe=Ys(wMe);function MMe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Xs(t))throw new TypeError("input must be an array");if(t.length===0)throw new TypeError("input must not be empty");var n=e.fromIndex,r=n===void 0?0:n,i=e.toIndex,o=i===void 0?t.length:i;if(r<0||r>=t.length||!Number.isInteger(r))throw new Error("fromIndex must be a positive integer smaller than length");if(o<=r||o>t.length||!Number.isInteger(o))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var s=t[r],a=r+1;as&&(s=t[a]);return s}function EMe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Xs(t))throw new TypeError("input must be an array");if(t.length===0)throw new TypeError("input must not be empty");var n=e.fromIndex,r=n===void 0?0:n,i=e.toIndex,o=i===void 0?t.length:i;if(r<0||r>=t.length||!Number.isInteger(r))throw new Error("fromIndex must be a positive integer smaller than length");if(o<=r||o>t.length||!Number.isInteger(o))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var s=t[r],a=r+1;a1&&arguments[1]!==void 0?arguments[1]:{};if(Xs(t)){if(t.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var n;if(e.output!==void 0){if(!Xs(e.output))throw new TypeError("output option must be an array if specified");n=e.output}else n=new Array(t.length);var r=EMe(t),i=MMe(t);if(r===i)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var o=e.min,s=o===void 0?e.autoMinMax?r:0:o,a=e.max,l=a===void 0?e.autoMinMax?i:1:a;if(s>=l)throw new RangeError("min option must be smaller than max option");for(var c=(l-s)/(i-r),u=0;u=0&&n?` ${s5(t,e-1)}`:s5(t,e)).padEnd(e)}function s5(t,e){let n=t.toString();if(n.length<=e)return n;let r=t.toFixed(e);if(r.length>e&&(r=t.toFixed(Math.max(0,e-(r.length-e)))),r.length<=e&&!r.startsWith("0.000")&&!r.startsWith("-0.000"))return r;let i=t.toExponential(e);return i.length>e&&(i=t.toExponential(Math.max(0,e-(i.length-e)))),i.slice(0)}function NMe(t,e){t.prototype.add=function(r){return typeof r=="number"?this.addS(r):this.addM(r)},t.prototype.addS=function(r){for(let i=0;i>r);return this},t.prototype.signPropagatingRightShiftM=function(r){if(r=e.checkMatrix(r),this.rows!==r.rows||this.columns!==r.columns)throw new RangeError("Matrices dimensions must be equal");for(let i=0;i>r.get(i,o));return this},t.signPropagatingRightShift=function(r,i){return new e(r).signPropagatingRightShift(i)},t.prototype.rightShift=function(r){return typeof r=="number"?this.rightShiftS(r):this.rightShiftM(r)},t.prototype.rightShiftS=function(r){for(let i=0;i>>r);return this},t.prototype.rightShiftM=function(r){if(r=e.checkMatrix(r),this.rows!==r.rows||this.columns!==r.columns)throw new RangeError("Matrices dimensions must be equal");for(let i=0;i>>r.get(i,o));return this},t.rightShift=function(r,i){return new e(r).rightShift(i)},t.prototype.zeroFillRightShift=t.prototype.rightShift,t.prototype.zeroFillRightShiftS=t.prototype.rightShiftS,t.prototype.zeroFillRightShiftM=t.prototype.rightShiftM,t.zeroFillRightShift=t.rightShift,t.prototype.not=function(){for(let r=0;rr)throw new RangeError("Row index out of range")}function So(t,e,n){let r=n?t.columns:t.columns-1;if(e<0||e>r)throw new RangeError("Column index out of range")}function If(t,e){if(e.to1DArray&&(e=e.to1DArray()),e.length!==t.columns)throw new RangeError("vector size must be the same as the number of columns");return e}function Nf(t,e){if(e.to1DArray&&(e=e.to1DArray()),e.length!==t.rows)throw new RangeError("vector size must be the same as the number of rows");return e}function dP(t,e){if(!Ti.isAnyArray(e))throw new TypeError("row indices must be an array");for(let n=0;n=t.rows)throw new RangeError("row indices are out of range")}function hP(t,e){if(!Ti.isAnyArray(e))throw new TypeError("column indices must be an array");for(let n=0;n=t.columns)throw new RangeError("column indices are out of range")}function XC(t,e,n,r,i){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(hy("startRow",e),hy("endRow",n),hy("startColumn",r),hy("endColumn",i),e>n||r>i||e<0||e>=t.rows||n<0||n>=t.rows||r<0||r>=t.columns||i<0||i>=t.columns)throw new RangeError("Submatrix indices are out of range")}function J_(t,e=0){let n=[];for(let r=0;r=o)throw new RangeError("min must be smaller than max");let a=o-i,l=new Ze(e,n);for(let c=0;cr?(o=!0,r=n):(i=!1,o=!0);e++}return i}isReducedEchelonForm(){let e=0,n=0,r=-1,i=!0,o=!1;for(;er?(o=!0,r=n):(i=!1,o=!0);for(let s=n+1;se.get(i,r)&&(i=o);if(e.get(i,r)===0)r++;else{e.swapRows(n,i);let o=e.get(n,r);for(let s=r;s=0;)if(e.maxRow(i)===0)i--;else{let o=0,s=!1;for(;on[r]&&(n[r]=this.get(r,i));return n}case"column":{const n=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let r=0;rn[i]&&(n[i]=this.get(r,i));return n}case void 0:{let n=this.get(0,0);for(let r=0;rn&&(n=this.get(r,i));return n}default:throw new Error(`invalid option: ${e}`)}}maxIndex(){Ef(this);let e=this.get(0,0),n=[0,0];for(let r=0;re&&(e=this.get(r,i),n[0]=r,n[1]=i);return n}min(e){if(this.isEmpty())return NaN;switch(e){case"row":{const n=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let r=0;rn&&(n=this.get(e,r));return n}maxRowIndex(e){wo(this,e),Ef(this);let n=this.get(e,0),r=[e,0];for(let i=1;in&&(n=this.get(e,i),r[1]=i);return r}minRow(e){if(wo(this,e),this.isEmpty())return NaN;let n=this.get(e,0);for(let r=1;rn&&(n=this.get(r,e));return n}maxColumnIndex(e){So(this,e),Ef(this);let n=this.get(0,e),r=[0,e];for(let i=1;in&&(n=this.get(i,e),r[0]=i);return r}minColumn(e){if(So(this,e),this.isEmpty())return NaN;let n=this.get(0,e);for(let r=1;r1;i/=2)i&1&&(n=n.mmul(r)),r=r.mmul(r);return n}strassen2x2(e){e=Ze.checkMatrix(e);let n=new Ze(2,2);const r=this.get(0,0),i=e.get(0,0),o=this.get(0,1),s=e.get(0,1),a=this.get(1,0),l=e.get(1,0),c=this.get(1,1),u=e.get(1,1),f=(r+c)*(i+u),h=(a+c)*i,m=r*(s-u),v=c*(l-i),x=(r+o)*u,y=(a-r)*(i+s),g=(o-c)*(l+u),b=f+v-x+g,_=m+x,S=h+v,A=f-h+m+y;return n.set(0,0,b),n.set(0,1,_),n.set(1,0,S),n.set(1,1,A),n}strassen3x3(e){e=Ze.checkMatrix(e);let n=new Ze(3,3);const r=this.get(0,0),i=this.get(0,1),o=this.get(0,2),s=this.get(1,0),a=this.get(1,1),l=this.get(1,2),c=this.get(2,0),u=this.get(2,1),f=this.get(2,2),h=e.get(0,0),m=e.get(0,1),v=e.get(0,2),x=e.get(1,0),y=e.get(1,1),g=e.get(1,2),b=e.get(2,0),_=e.get(2,1),S=e.get(2,2),A=(r+i+o-s-a-u-f)*y,P=(r-s)*(-m+y),R=a*(-h+m+x-y-g-b+S),L=(-r+s+a)*(h-m+y),k=(s+a)*(-h+m),C=r*h,N=(-r+c+u)*(h-v+g),z=(-r+c)*(v-g),D=(c+u)*(-h+v),B=(r+i+o-a-l-c-u)*g,G=u*(-h+v+x-y-g-b+_),X=(-o+u+f)*(y+b-_),Z=(o-f)*(y-_),F=o*b,q=(u+f)*(-b+_),K=(-o+a+l)*(g+b-S),Q=(o-l)*(g-S),de=(a+l)*(-b+S),fe=i*x,J=l*_,ce=s*v,_e=c*m,be=f*S,Xe=C+F+fe,$e=A+L+k+C+X+F+q,tt=C+N+D+B+F+K+de,Ve=P+R+L+C+F+K+Q,se=P+L+k+C+J,ae=F+K+Q+de+ce,W=C+N+z+G+X+Z+F,Ie=X+Z+F+q+_e,Re=C+N+z+D+be;return n.set(0,0,Xe),n.set(0,1,$e),n.set(0,2,tt),n.set(1,0,Ve),n.set(1,1,se),n.set(1,2,ae),n.set(2,0,W),n.set(2,1,Ie),n.set(2,2,Re),n}mmulStrassen(e){e=Ze.checkMatrix(e);let n=this.clone(),r=n.rows,i=n.columns,o=e.rows,s=e.columns;i!==o&&console.warn(`Multiplying ${r} x ${i} and ${o} x ${s} matrix: dimensions do not match.`);function a(f,h,m){let v=f.rows,x=f.columns;if(v===h&&x===m)return f;{let y=Ft.zeros(h,m);return y=y.setSubMatrix(f,0,0),y}}let l=Math.max(r,o),c=Math.max(i,s);n=a(n,l,c),e=a(e,l,c);function u(f,h,m,v){if(m<=512||v<=512)return f.mmul(h);m%2===1&&v%2===1?(f=a(f,m+1,v+1),h=a(h,m+1,v+1)):m%2===1?(f=a(f,m+1,v),h=a(h,m+1,v)):v%2===1&&(f=a(f,m,v+1),h=a(h,m,v+1));let x=parseInt(f.rows/2,10),y=parseInt(f.columns/2,10),g=f.subMatrix(0,x-1,0,y-1),b=h.subMatrix(0,x-1,0,y-1),_=f.subMatrix(0,x-1,y,f.columns-1),S=h.subMatrix(0,x-1,y,h.columns-1),A=f.subMatrix(x,f.rows-1,0,y-1),P=h.subMatrix(x,h.rows-1,0,y-1),R=f.subMatrix(x,f.rows-1,y,f.columns-1),L=h.subMatrix(x,h.rows-1,y,h.columns-1),k=u(Ft.add(g,R),Ft.add(b,L),x,y),C=u(Ft.add(A,R),b,x,y),N=u(g,Ft.sub(S,L),x,y),z=u(R,Ft.sub(P,b),x,y),D=u(Ft.add(g,_),L,x,y),B=u(Ft.sub(A,g),Ft.add(b,S),x,y),G=u(Ft.sub(_,R),Ft.add(P,L),x,y),X=Ft.add(k,z);X.sub(D),X.add(G);let Z=Ft.add(N,D),F=Ft.add(C,z),q=Ft.sub(k,C);q.add(N),q.add(B);let K=Ft.zeros(2*X.rows,2*X.columns);return K=K.setSubMatrix(X,0,0),K=K.setSubMatrix(Z,X.rows,0),K=K.setSubMatrix(F,0,X.columns),K=K.setSubMatrix(q,X.rows,X.columns),K.subMatrix(0,m-1,0,v-1)}return u(n,e,l,c)}scaleRows(e={}){if(typeof e!="object")throw new TypeError("options must be an object");const{min:n=0,max:r=1}=e;if(!Number.isFinite(n))throw new TypeError("min must be a number");if(!Number.isFinite(r))throw new TypeError("max must be a number");if(n>=r)throw new RangeError("min must be smaller than max");let i=new Ze(this.rows,this.columns);for(let o=0;o0&&o5(s,{min:n,max:r,output:s}),i.setRow(o,s)}return i}scaleColumns(e={}){if(typeof e!="object")throw new TypeError("options must be an object");const{min:n=0,max:r=1}=e;if(!Number.isFinite(n))throw new TypeError("min must be a number");if(!Number.isFinite(r))throw new TypeError("max must be a number");if(n>=r)throw new RangeError("min must be smaller than max");let i=new Ze(this.rows,this.columns);for(let o=0;or||n<0||n>=this.columns||r<0||r>=this.columns)throw new RangeError("Argument out of range");let i=new Ze(e.length,r-n+1);for(let o=0;o=this.rows)throw new RangeError(`Row index out of range: ${e[o]}`);i.set(o,s-n,this.get(e[o],s))}return i}subMatrixColumn(e,n,r){if(n===void 0&&(n=0),r===void 0&&(r=this.rows-1),n>r||n<0||n>=this.rows||r<0||r>=this.rows)throw new RangeError("Argument out of range");let i=new Ze(r-n+1,e.length);for(let o=0;o=this.columns)throw new RangeError(`Column index out of range: ${e[o]}`);i.set(s-n,o,this.get(s,e[o]))}return i}setSubMatrix(e,n,r){if(e=Ze.checkMatrix(e),e.isEmpty())return this;let i=n+e.rows-1,o=r+e.columns-1;XC(this,n,i,r,o);for(let s=0;stypeof e=="number")}Ft.random=Ft.rand;Ft.randomInt=Ft.randInt;Ft.diagonal=Ft.diag;Ft.prototype.diagonal=Ft.prototype.diag;Ft.identity=Ft.eye;Ft.prototype.negate=Ft.prototype.neg;Ft.prototype.tensorProduct=Ft.prototype.kroneckerProduct;var Ym,qC,tu;let Ze=(tu=class extends Ft{constructor(n,r){super();lS(this,Ym);$t(this,"data");if(tu.isMatrix(n))cS(this,Ym,qC).call(this,n.rows,n.columns),tu.copy(n,this);else if(Number.isInteger(n)&&n>=0)cS(this,Ym,qC).call(this,n,r);else if(Ti.isAnyArray(n)){const i=n;if(n=i.length,r=n?i[0].length:0,typeof r!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let o=0;o"u"&&(r=n,n=this.columns),So(this,n,!0),r=Nf(this,r);for(let i=0;i=0)for(let i=0;i=0)O0(this,Xr,new Ze(n,n));else if(O0(this,Xr,new Ze(n)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return $o(this,Xr).size}get rows(){return $o(this,Xr).rows}get columns(){return $o(this,Xr).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(n){return Ze.isMatrix(n)&&n.klassType==="SymmetricMatrix"}static zeros(n){return new this(n)}static ones(n){return new this(n).fill(1)}clone(){const n=new $x(this.diagonalSize);for(const[r,i,o]of this.upperRightEntries())n.set(r,i,o);return n}toMatrix(){return new Ze(this)}get(n,r){return $o(this,Xr).get(n,r)}set(n,r,i){return $o(this,Xr).set(n,r,i),$o(this,Xr).set(r,n,i),this}removeCross(n){return $o(this,Xr).removeRow(n),$o(this,Xr).removeColumn(n),this}addCross(n,r){r===void 0&&(r=n,n=this.diagonalSize);const i=r.slice();return i.splice(n,1),$o(this,Xr).addRow(n,i),$o(this,Xr).addColumn(n,r),this}applyMask(n){if(n.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const r=[];for(const[i,o]of n.entries())o||r.push(i);r.reverse();for(const i of r)this.removeCross(i);return this}toCompact(){const{diagonalSize:n}=this,r=new Array(n*(n+1)/2);for(let i=0,o=0,s=0;s=n&&(i=++o);return r}static fromCompact(n){const r=n.length,i=(Math.sqrt(8*r+1)-1)/2;if(!Number.isInteger(i))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(n)}`);const o=new $x(i);for(let s=0,a=0,l=0;l=i&&(s=++a);return o}*upperRightEntries(){for(let n=0,r=0;n=this.diagonalSize&&(r=++n)}}*upperRightValues(){for(let n=0,r=0;n=this.diagonalSize&&(r=++n)}};Xr=new WeakMap;let eu=$x;eu.prototype.klassType="SymmetricMatrix";class Q_ extends eu{static isDistanceMatrix(e){return eu.isSymmetricMatrix(e)&&e.klassSubType==="DistanceMatrix"}constructor(e){if(super(e),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(e,n,r){return e===n&&(r=0),super.set(e,n,r)}addCross(e,n){return n===void 0&&(n=e,e=this.diagonalSize),n=n.slice(),n[e]=0,super.addCross(e,n)}toSymmetricMatrix(){return new eu(this)}clone(){const e=new Q_(this.diagonalSize);for(const[n,r,i]of this.upperRightEntries())n!==r&&e.set(n,r,i);return e}toCompact(){const{diagonalSize:e}=this,n=(e-1)*e/2,r=new Array(n);for(let i=1,o=0,s=0;s=e&&(i=++o+1);return r}static fromCompact(e){const n=e.length;if(n===0)return new this(0);const r=(Math.sqrt(8*n+1)+1)/2;if(!Number.isInteger(r))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(e)}`);const i=new this(r);for(let o=1,s=0,a=0;a=r&&(o=++s+1);return i}}Q_.prototype.klassSubType="DistanceMatrix";class ja extends Ft{constructor(e,n,r){super(),this.matrix=e,this.rows=n,this.columns=r}}class JMe extends ja{constructor(e,n){So(e,n),super(e,e.rows,1),this.column=n}set(e,n,r){return this.matrix.set(e,this.column,r),this}get(e){return this.matrix.get(e,this.column)}}class QMe extends ja{constructor(e,n){hP(e,n),super(e,e.rows,n.length),this.columnIndices=n}set(e,n,r){return this.matrix.set(e,this.columnIndices[n],r),this}get(e,n){return this.matrix.get(e,this.columnIndices[n])}}class eEe extends ja{constructor(e){super(e,e.rows,e.columns)}set(e,n,r){return this.matrix.set(e,this.columns-n-1,r),this}get(e,n){return this.matrix.get(e,this.columns-n-1)}}class tEe extends ja{constructor(e){super(e,e.rows,e.columns)}set(e,n,r){return this.matrix.set(this.rows-e-1,n,r),this}get(e,n){return this.matrix.get(this.rows-e-1,n)}}class nEe extends ja{constructor(e,n){wo(e,n),super(e,1,e.columns),this.row=n}set(e,n,r){return this.matrix.set(this.row,n,r),this}get(e,n){return this.matrix.get(this.row,n)}}class rEe extends ja{constructor(e,n){dP(e,n),super(e,n.length,e.columns),this.rowIndices=n}set(e,n,r){return this.matrix.set(this.rowIndices[e],n,r),this}get(e,n){return this.matrix.get(this.rowIndices[e],n)}}class Hy extends ja{constructor(e,n,r){dP(e,n),hP(e,r),super(e,n.length,r.length),this.rowIndices=n,this.columnIndices=r}set(e,n,r){return this.matrix.set(this.rowIndices[e],this.columnIndices[n],r),this}get(e,n){return this.matrix.get(this.rowIndices[e],this.columnIndices[n])}}class iEe extends ja{constructor(e,n,r,i,o){XC(e,n,r,i,o),super(e,r-n+1,o-i+1),this.startRow=n,this.startColumn=i}set(e,n,r){return this.matrix.set(this.startRow+e,this.startColumn+n,r),this}get(e,n){return this.matrix.get(this.startRow+e,this.startColumn+n)}}let oEe=class extends ja{constructor(e){super(e,e.columns,e.rows)}set(e,n,r){return this.matrix.set(n,e,r),this}get(e,n){return this.matrix.get(n,e)}};class _7 extends Ft{constructor(e,n={}){const{rows:r=1}=n;if(e.length%r!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=r,this.columns=e.length/r,this.data=e}set(e,n,r){let i=this._calculateIndex(e,n);return this.data[i]=r,this}get(e,n){let r=this._calculateIndex(e,n);return this.data[r]}_calculateIndex(e,n){return e*this.columns+n}}class lo extends Ft{constructor(e){super(),this.data=e,this.rows=e.length,this.columns=e[0].length}set(e,n,r){return this.data[e][n]=r,this}get(e,n){return this.data[e][n]}}function sEe(t,e){if(Ti.isAnyArray(t))return t[0]&&Ti.isAnyArray(t[0])?new lo(t):new _7(t,e);throw new Error("the argument is not an array")}class ew{constructor(e){e=lo.checkMatrix(e);let n=e.clone(),r=n.rows,i=n.columns,o=new Float64Array(r),s=1,a,l,c,u,f,h,m,v,x;for(a=0;aMath.abs(v[u])&&(u=a);if(u!==l){for(c=0;c=0;c--){for(l=0;ls?i.set(o,s,e.get(o,s)):o===s?i.set(o,s,1):i.set(o,s,0);return i}get upperTriangularMatrix(){let e=this.LU,n=e.rows,r=e.columns,i=new Ze(n,r);for(let o=0;oMath.abs(e)?(n=e/t,Math.abs(t)*Math.sqrt(1+n*n)):e!==0?(n=t/e,Math.abs(e)*Math.sqrt(1+n*n)):0}class pP{constructor(e){e=lo.checkMatrix(e);let n=e.clone(),r=e.rows,i=e.columns,o=new Float64Array(i),s,a,l,c;for(l=0;l=0;c--){for(l=0;l=0;a--){for(o=0;o=0;C--)if(v[C]!==0){for(let N=C+1;N=0;C--){if(C0;){let C,N;for(C=R-2;C>=-1&&C!==-1;C--){const z=Number.MIN_VALUE+k*Math.abs(v[C]+Math.abs(v[C+1]));if(Math.abs(g[C])<=z||Number.isNaN(g[C])){g[C]=0;break}}if(C===R-2)N=4;else{let z;for(z=R-1;z>=C&&z!==C;z--){let D=(z!==R?Math.abs(g[z]):0)+(z!==C+1?Math.abs(g[z-1]):0);if(Math.abs(v[z])<=k*D){v[z]=0;break}}z===C?N=3:z===R-1?N=1:(N=2,C=z)}switch(C++,N){case 1:{let z=g[R-2];g[R-2]=0;for(let D=R-2;D>=C;D--){let B=pa(v[D],z),G=v[D]/B,X=z/B;if(v[D]=B,D!==C&&(z=-X*g[D-1],g[D-1]=G*g[D-1]),c)for(let Z=0;Z=v[C+1]);){let z=v[C];if(v[C]=v[C+1],v[C+1]=z,c&&Cn&&o.set(u,f,e.get(u,f)/this.s[f]);let s=this.U,a=s.rows,l=s.columns,c=new Ze(r,a);for(let u=0;ue&&n++;return n}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return Ze.diag(this.s)}}function aEe(t,e=!1){return t=lo.checkMatrix(t),e?new uh(t).inverse():w7(t,Ze.eye(t.rows))}function w7(t,e,n=!1){return t=lo.checkMatrix(t),e=lo.checkMatrix(e),n?new uh(t).solve(e):t.isSquare()?new ew(t).solve(e):new pP(t).solve(e)}function Gy(t){if(t=Ze.checkMatrix(t),t.isSquare()){if(t.columns===0)return 1;let e,n,r,i;if(t.columns===2)return e=t.get(0,0),n=t.get(0,1),r=t.get(1,0),i=t.get(1,1),e*i-n*r;if(t.columns===3){let o,s,a;return o=new Hy(t,[1,2],[1,2]),s=new Hy(t,[1,2],[0,2]),a=new Hy(t,[1,2],[0,1]),e=t.get(0,0),n=t.get(0,1),r=t.get(0,2),e*Gy(o)-n*Gy(s)+r*Gy(a)}else return new ew(t).determinant}else throw Error("determinant can only be calculated for a square matrix")}function lEe(t,e){let n=[];for(let r=0;ri)return new Array(e.rows+1).fill(0);{let o=e.addRow(n,[0]);for(let s=0;se?o[s]=1/o[s]:o[s]=0;return i.mmul(Ze.diag(o).mmul(r.transpose()))}function dEe(t,e=t,n={}){t=new Ze(t);let r=!1;if(typeof e=="object"&&!Ze.isMatrix(e)&&!Ti.isAnyArray(e)?(n=e,e=t,r=!0):e=new Ze(e),t.rows!==e.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:i=!0}=n;i&&(t=t.center("column"),r||(e=e.center("column")));const o=t.transpose().mmul(e);for(let s=0;s0?i.set(o,o+1,n[o]):n[o]<0&&i.set(o,o-1,n[o])}return i}}function pEe(t,e,n,r){let i,o,s,a,l,c,u,f;for(l=0;l0;a--){for(f=0,s=0,c=0;c0&&(o=-o),e[a]=f*o,s=s-i*o,n[a-1]=i-o,l=0;lc)do{for(i=n[c],f=(n[c+1]-i)/(2*e[c]),h=pa(f,1),f<0&&(h=-h),n[c]=e[c]/(f+h),n[c+1]=e[c]*(f+h),m=n[c+1],o=i-n[c],s=c+2;s=c;s--)for(y=x,x=v,_=b,i=v*e[s],o=v*f,h=pa(f,e[s]),e[s+1]=b*h,b=e[s]/h,v=f/h,f=v*n[s]-b*i,n[s+1]=o+b*(v*i+b*n[s]),l=0;lP*A);n[c]=n[c]+S,e[c]=0}for(s=0;s=f;c--)n[c]=e.get(c,f-1)/h,l+=n[c]*n[c];for(a=Math.sqrt(l),n[f]>0&&(a=-a),l=l-n[f]*a,n[f]=n[f]-a,u=f;u=f;c--)s+=n[c]*e.get(c,u);for(s=s/l,c=f;c<=o;c++)e.set(c,u,e.get(c,u)-s*n[c])}for(c=0;c<=o;c++){for(s=0,u=o;u>=f;u--)s+=n[u]*e.get(c,u);for(s=s/l,u=f;u<=o;u++)e.set(c,u,e.get(c,u)-s*n[u])}n[f]=h*n[f],e.set(f,f-1,h*a)}}for(c=0;c=i+1;f--)if(e.get(f,f-1)!==0){for(c=f+1;c<=o;c++)n[c]=e.get(c,f-1);for(u=f;u<=o;u++){for(a=0,c=f;c<=o;c++)a+=n[c]*r.get(c,u);for(a=a/n[f]/e.get(f,f-1),c=f;c<=o;c++)r.set(c,u,r.get(c,u)+a*n[c])}}}function vEe(t,e,n,r,i){let o=t-1,s=0,a=t-1,l=Number.EPSILON,c=0,u=0,f=0,h=0,m=0,v=0,x=0,y=0,g,b,_,S,A,P,R,L,k,C,N,z,D,B,G;for(g=0;ga)&&(n[g]=i.get(g,g),e[g]=0),b=Math.max(g-1,0);b=s;){for(S=o;S>s&&(v=Math.abs(i.get(S-1,S-1))+Math.abs(i.get(S,S)),v===0&&(v=u),!(Math.abs(i.get(S,S-1))=0){for(x=f>=0?f+x:f-x,n[o-1]=L+x,n[o]=n[o-1],x!==0&&(n[o]=L-R/x),e[o-1]=0,e[o]=0,L=i.get(o,o-1),v=Math.abs(L)+Math.abs(x),f=L/v,h=x/v,m=Math.sqrt(f*f+h*h),f=f/m,h=h/m,b=o-1;b0)){for(v=Math.sqrt(v),k=S&&(x=i.get(A,A),m=L-x,v=k-x,f=(m*v-R)/i.get(A+1,A)+i.get(A,A+1),h=i.get(A+1,A+1)-x-m-v,m=i.get(A+2,A+1),v=Math.abs(f)+Math.abs(h)+Math.abs(m),f=f/v,h=h/v,m=m/v,!(A===S||Math.abs(i.get(A,A-1))*(Math.abs(h)+Math.abs(m))A+2&&i.set(g,g-3,0);for(_=A;_<=o-1&&(B=_!==o-1,_!==A&&(f=i.get(_,_-1),h=i.get(_+1,_-1),m=B?i.get(_+2,_-1):0,L=Math.abs(f)+Math.abs(h)+Math.abs(m),L!==0&&(f=f/L,h=h/L,m=m/L)),L!==0);_++)if(v=Math.sqrt(f*f+h*h+m*m),f<0&&(v=-v),v!==0){for(_!==A?i.set(_,_-1,-v*L):S!==A&&i.set(_,_-1,-i.get(_,_-1)),f=f+v,L=f/v,k=h/v,x=m/v,h=h/f,m=m/f,b=_;b=0;o--)if(f=n[o],h=e[o],h===0)for(S=o,i.set(o,o,1),g=o-1;g>=0;g--){for(R=i.get(g,g)-f,m=0,b=S;b<=o;b++)m=m+i.get(g,b)*i.get(b,o);if(e[g]<0)x=R,v=m;else if(S=g,e[g]===0?i.set(g,o,R!==0?-m/R:-m/(l*u)):(L=i.get(g,g+1),k=i.get(g+1,g),h=(n[g]-f)*(n[g]-f)+e[g]*e[g],P=(L*v-x*m)/h,i.set(g,o,P),i.set(g+1,o,Math.abs(L)>Math.abs(x)?(-m-R*P)/L:(-v-k*P)/x)),P=Math.abs(i.get(g,o)),l*P*P>1)for(b=g;b<=o;b++)i.set(b,o,i.get(b,o)/P)}else if(h<0)for(S=o-1,Math.abs(i.get(o,o-1))>Math.abs(i.get(o-1,o))?(i.set(o-1,o-1,h/i.get(o,o-1)),i.set(o-1,o,-(i.get(o,o)-f)/i.get(o,o-1))):(G=py(0,-i.get(o-1,o),i.get(o-1,o-1)-f,h),i.set(o-1,o-1,G[0]),i.set(o-1,o,G[1])),i.set(o,o-1,0),i.set(o,o,1),g=o-2;g>=0;g--){for(C=0,N=0,b=S;b<=o;b++)C=C+i.get(g,b)*i.get(b,o-1),N=N+i.get(g,b)*i.get(b,o);if(R=i.get(g,g)-f,e[g]<0)x=R,m=C,v=N;else if(S=g,e[g]===0?(G=py(-C,-N,R,h),i.set(g,o-1,G[0]),i.set(g,o,G[1])):(L=i.get(g,g+1),k=i.get(g+1,g),z=(n[g]-f)*(n[g]-f)+e[g]*e[g]-h*h,D=(n[g]-f)*2*h,z===0&&D===0&&(z=l*u*(Math.abs(R)+Math.abs(h)+Math.abs(L)+Math.abs(k)+Math.abs(x))),G=py(L*m-x*C+h*N,L*v-x*N-h*C,z,D),i.set(g,o-1,G[0]),i.set(g,o,G[1]),Math.abs(L)>Math.abs(x)+Math.abs(h)?(i.set(g+1,o-1,(-C-R*i.get(g,o-1)+h*i.get(g,o))/L),i.set(g+1,o,(-N-R*i.get(g,o)-h*i.get(g,o-1))/L)):(G=py(-m-k*i.get(g,o-1),-v-k*i.get(g,o),x,h),i.set(g+1,o-1,G[0]),i.set(g+1,o,G[1]))),P=Math.max(Math.abs(i.get(g,o-1)),Math.abs(i.get(g,o))),l*P*P>1)for(b=g;b<=o;b++)i.set(b,o-1,i.get(b,o-1)/P),i.set(b,o,i.get(b,o)/P)}for(g=0;ga)for(b=g;b=s;b--)for(g=s;g<=a;g++){for(x=0,_=s;_<=Math.min(b,a);_++)x=x+r.get(g,_)*i.get(_,b);r.set(g,b,x)}}}function py(t,e,n,r){let i,o;return Math.abs(n)>Math.abs(r)?(i=r/n,o=n+i*r,[(t+i*e)/o,(e-i*t)/o]):(i=n/r,o=r+i*n,[(i*t+e)/o,(i*e-t)/o])}class M7{constructor(e){if(e=lo.checkMatrix(e),!e.isSymmetric())throw new Error("Matrix is not symmetric");let n=e,r=n.rows,i=new Ze(r,r),o=!0,s,a,l;for(a=0;a0),i.set(a,a,Math.sqrt(Math.max(c,0))),l=a+1;l=0;l--)for(a=0;as;m++)f=e.transpose().mmul(a).div(a.transpose().mmul(a).get(0,0)),f=f.div(f.norm()),c=e.mmul(f).div(f.transpose().mmul(f).get(0,0)),m>0&&(l=c.clone().sub(h).pow(2).sum()),h=c.clone(),r?(u=r.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0)),u=u.div(u.norm()),a=r.mmul(u).div(u.transpose().mmul(u).get(0,0))):a=c;if(r){let m=e.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0));m=m.div(m.norm());let v=e.clone().sub(c.clone().mmul(m.transpose())),x=a.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0)),y=r.clone().sub(c.clone().mulS(x.get(0,0)).mmul(u.transpose()));this.t=c,this.p=m.transpose(),this.w=f.transpose(),this.q=u,this.u=a,this.s=c.transpose().mmul(c),this.xResidual=v,this.yResidual=y,this.betas=x}else this.w=f.transpose(),this.s=c.transpose().mmul(c).sqrt(),i?this.t=c.clone().div(this.s.get(0,0)):this.t=c,this.xResidual=e.sub(c.mmul(f.transpose()))}}Kt.AbstractMatrix=Ft;Kt.CHO=M7;Kt.CholeskyDecomposition=M7;Kt.DistanceMatrix=Q_;Kt.EVD=S7;Kt.EigenvalueDecomposition=S7;Kt.LU=ew;Kt.LuDecomposition=ew;var C7=Kt.Matrix=Ze;Kt.MatrixColumnSelectionView=QMe;Kt.MatrixColumnView=JMe;Kt.MatrixFlipColumnView=eEe;Kt.MatrixFlipRowView=tEe;Kt.MatrixRowSelectionView=rEe;Kt.MatrixRowView=nEe;Kt.MatrixSelectionView=Hy;Kt.MatrixSubView=iEe;var yEe=Kt.MatrixTransposeView=oEe;Kt.NIPALS=E7;Kt.Nipals=E7;Kt.QR=pP;Kt.QrDecomposition=pP;Kt.SVD=uh;Kt.SingularValueDecomposition=uh;Kt.SymmetricMatrix=eu;Kt.WrapperMatrix1D=_7;Kt.WrapperMatrix2D=lo;Kt.correlation=hEe;Kt.covariance=dEe;var l5=Kt.default=Ze;Kt.determinant=Gy;Kt.inverse=aEe;Kt.linearDependencies=uEe;Kt.pseudoInverse=fEe;var xEe=Kt.solve=w7;Kt.wrap=sEe;const c5=C7,u5=yEe;l5.Matrix&&l5.Matrix;const bEe=xEe;function T7(t,e){if(!Gs(t)||!Gs(e))throw new TypeError("x and y must be arrays");if(t.length!==e.length)throw new RangeError("x and y arrays must have the same length")}class mP{constructor(){if(new.target===mP)throw new Error("BaseRegression must be subclassed")}predict(e){if(typeof e=="number")return this._predict(e);if(Gs(e)){const n=[];for(const r of e)n.push(this._predict(r));return n}else throw new TypeError("x must be a number or array")}_predict(e){throw new Error("_predict must be implemented")}train(){}toString(e){return""}toLaTeX(e){return""}score(e,n){T7(e,n);const r=e.length,i=new Array(r);for(let m=0;m0&&l!==this.coefficients.length-1?a=` + ${a}`:l!==this.coefficients.length-1&&(a=` ${a}`)),s=a+s;return s.startsWith("+")&&(s=s.slice(1)),`f(x) = ${s}`}static load(e){if(e.name!=="polynomialRegression")throw new TypeError("not a polynomial regression model");return new Vx(!0,e)}}function _Ee(t,e,n,r={}){const i=t.length;let{interceptAtZero:o=!1}=r,s=[];if(Array.isArray(n))s=n,o=!1;else if(typeof n=="number")if(o){s=new Array(n);for(let m=0;m"u")throw new TypeError("X must be defined");if(r>t.length)throw new RangeError(`Window size is higher than the data length ${r}>${t.length}`);if(i<0||!Number.isInteger(i))throw new RangeError("Derivative should be a positive integer");if(o<1||!Number.isInteger(o))throw new RangeError("Polynomial should be a positive integer");o>=6&&console.warn("You should not use polynomial grade higher than 5 if you are not sure that your data arises from such a model. Possible polynomial oscillation problems");const s=Math.floor(r/2),a=t.length,l=new Float64Array(a),c=MEe(r,o,i);let u=0,f=!0;Gs(e)?f=!1:u=e**i;for(let m=0;m=0&&s0?i=(4*n-2)/(n*(2*e-n+1))*(t*qp(t,e,n-1,r)+r*qp(t,e,n-1,r-1))-(n-1)*(2*e+n)/(n*(2*e-n+1))*qp(t,e,n-2,r):n===0&&r===0?i=1:i=0,i}function f5(t,e){let n=1;if(t>=e)for(let r=t-e+1;r<=t;r++)n*=r;return n}function SEe(t,e,n,r,i){let o=0;for(let s=0;s<=r;s++)o+=(2*s+1)*(f5(2*n,s)/f5(2*n+s+1,s+1))*qp(t,n,s,0)*qp(e,n,s,i);return o}function MEe(t,e,n){const r=new Array(t),i=Math.floor(t/2);for(let o=-i;o<=i;o++){r[o+i]=new Float64Array(t);for(let s=-i;s<=i;s++)r[o+i][s+i]=SEe(s,o,i,e,n)}return r}function my(t,e){let n=1/0,r=0;for(let i=0;ie&&(e=t[r],n=r);return n}function CEe(t,e){const n=wEe(e,t,{windowSize:9,derivative:1,polynomial:3}),r=EEe(n),i=t[r];let o=5;r<20&&(o=2);const s=o*Math.round((t[1]-i)/o),a=.5*s,l=my(t,s+i),c=my(t,a+i),u=e.slice(l,c),f=t.slice(l,c),h=new Vx(f,u,1),m=e.map((P,R)=>P-h.predict(t[R])),v=5*Math.round((t[t.length-1]-i)/5),x=5*Math.round(v/15),y=2,g=my(t,x+i),b=my(t,v+i),_=new Vx(t.slice(g,b),m.slice(g,b),y),S=_.predict(i);for(let P=r;PP/S),[m.length])}function OE(t,e,n,r,i){const o=t[e],s=t.energy,a=n?CEe(s,o):tU(o,[o.length]);return{x:s,y:a,label:r+":"+e,color:i}}function d5(t,e,n,r,i,o){const s=!e&&!n&&!r,a=[];return s||t==null||(r&&t.murefer&&a.push(OE(t,"murefer",i,t.id,o[2])),n&&t.mufluor&&a.push(OE(t,"mufluor",i,t.id,o[1])),e&&t.mutrans&&a.push(OE(t,"mutrans",i,t.id,o[0]))),a}function TEe(t,e){return E.jsx(qwe,{abscissas:t.x,ordinates:t.y.data,curveType:e,color:t.color},t.label)}function REe(t){var C,N,z,D;const[e,n]=T.useState({showTrans:!1,showFluor:!1,showRefer:!1});T.useEffect(()=>{var B,G,X;n({showTrans:((B=t.xasData)==null?void 0:B.mutrans)!=null,showFluor:((G=t.xasData)==null?void 0:G.mufluor)!=null,showRefer:((X=t.xasData)==null?void 0:X.murefer)!=null})},[t.xasData]);const r=Object.values(Xp),[i,o]=T.useState(!0),[s,a]=T.useState(!0),[l,c]=T.useState(r[0]),u=xu(),{showTrans:f,showFluor:h,showRefer:m}=e,v=[((C=t.xasData)==null?void 0:C.mutrans)!=null,((N=t.xasData)==null?void 0:N.mufluor)!=null,((z=t.xasData)==null?void 0:z.murefer)!=null],x=(B,G)=>E.jsxs("p",{children:[B.toPrecision(8),", ",G.toPrecision(8)]}),y=d5(t.xasData,f,h,m,s,[VS(u.palette.primary.dark,.3),VS(u.palette.success.light,.3),VS(u.palette.secondary.dark,.3)]),b=t.comparisonFiles.filter(B=>{var G;return B.id!=((G=t.xasData)==null?void 0:G.id)}).map((B,G)=>d5(B,f,h,m,s,[$S(u.palette.primary.dark,G*.3),$S(u.palette.success.light,G*.3),$S(u.palette.secondary.dark,G*.3)])).flat();y.push(...b);const _=XO(y.map(B=>HO(B.y))),A={visDomain:XO(y.map(B=>HO(B.x)))??[0,1],showGrid:!0,isIndexAxis:!1,label:"Energy (eV)"},P={visDomain:_??[0,1],showGrid:!0,isIndexAxis:!1,label:s?"mu(E) (norm)":"mu(E)"},R=u.palette.action.hover,L={"--h5w-toolbar--bgColor":u.palette.action.hover,"--h5w-tickLabels--color":u.palette.text.primary,"--h5w-ticks--color":u.palette.text.primary,"--h5w-grid--color":"black","--h5w-toolbar-label--color":u.palette.primary.dark,"--h5w-btn-hover--bgColor":u.palette.action.hover,"--h5w-btnPressed--bgColor":u.palette.action.selected,"--h5w-selector-menu--bgColor":u.palette.background.default,"--h5w-selector-option-selected--bgColor":u.palette.action.selected},k={"--h5w-tickLabels--color":u.palette.text.primary,"--h5w-ticks--color":u.palette.text.primary,"--h5w-grid--color":u.palette.text.secondary,"--h5w-axisLabels--color":u.palette.text.primary,"--h5w-line--color":u.palette.primary.dark,"--h5w-tooltip--bgColor":u.palette.action.hover,"--h5w-tooltip--color":u.palette.text.primary,"--h5w-line--colorAux":[u.palette.success.light,u.palette.secondary.dark]};return E.jsxs(bu,{sx:{height:"100%",display:"flex",flexDirection:"column",backgroundColor:B=>B.palette.background.default,fontFamily:B=>B.typography.fontFamily},children:[E.jsx(Ws,{style:L,children:E.jsxs(BSe,{children:[E.jsx(Ac,{label:"Normalize",value:s,onToggle:()=>{a(!s)}}),E.jsx(Qc,{}),E.jsx(Ac,{label:"Transmission",value:f,onToggle:()=>{n({...e,showTrans:!f})},disabled:!v[0]}),E.jsx(Ac,{label:"Fluorescence",value:h,onToggle:()=>{n({...e,showFluor:!h})},disabled:!v[1]}),E.jsx(Ac,{label:"Reference",value:m,onToggle:()=>{n({...e,showRefer:!m})},disabled:!v[2]}),E.jsx(Qc,{}),E.jsx(aMe,{label:"Line Style",onChange:B=>{c(B)},options:r,value:l,renderOption:B=>E.jsx("div",{children:E.jsx("span",{children:String(B)})})}),E.jsx(Qc,{}),E.jsx(Ac,{label:"Grid",icon:bMe,value:i,onToggle:()=>o(!i)})]})}),E.jsx(Ws,{style:k,flex:1,display:"flex",children:E.jsxs(kwe,{title:((D=t.xasData)==null?void 0:D.id)??" ",abscissaConfig:A,ordinateConfig:P,children:[y.map(B=>TEe(B,l)),E.jsx(hwe,{renderTooltip:x}),E.jsx(K_e,{}),E.jsx(lwe,{}),E.jsx(p7,{children:E.jsx("div",{style:{color:u.palette.text.primary,position:"absolute",maxWidth:"35%",minWidth:"15em",padding:"0 1rem",bottom:"2.5rem",right:"0px",background:R},children:y.reverse().map(B=>E.jsxs("div",{children:[E.jsx("span",{style:{color:B.color},children:" ■"}),E.jsx("span",{children:" "+B.label})]},B.label))})})]})})]})}function gP(){const t=T.useContext(ug);let e=null,n=[];if(t.xdiFile!=null){const r=t.xdiFile,i=r.energy(),o=r.muTrans(),s=r.muFluor(),a=r.muRefer();e={id:r.id,energy:i,mutrans:o,mufluor:s,murefer:a},n=t.comparisonFiles.map(l=>({id:l.id,energy:l.energy(),mutrans:l.muTrans(),mufluor:l.muFluor(),murefer:l.muRefer()}))}return E.jsx(REe,{xasData:e,comparisonFiles:n})}function AEe(){const[t,e]=T.useState(null),[n,r]=T.useState([]),i=T.useContext(NR);function o(){return a=>{Fn.get("/webxdiviewer/xdidata/"+a).then(l=>{const c=Cd.parseFile(l.data,a);e(c)})}}const s=o();return E.jsx(PR,{value:{xdiFile:t,setXDIFile:e,comparisonFiles:n,setComparisonFiles:r},children:E.jsxs(Ma,{height:"100%",container:!0,children:[E.jsx(Ma,{item:!0,lg:5,md:12,padding:1,children:E.jsx(yre,{standards:i,updatePlot:s})}),E.jsx(Ma,{item:!0,height:"100%",lg:7,md:12,padding:1,children:E.jsx(gP,{})})]})})}const PEe="NSLS-II-BMM/bmm-standards";function IEe(){const t=PEe;return E.jsxs(WZ,{maxWidth:"md",sx:{alignSelf:"center",p:"24px"},children:[E.jsx(ar,{variant:"h4",padding:"24px",children:"Welcome to the XAS Data Viewer!"}),E.jsxs(Ws,{children:[E.jsxs(ar,{paragraph:!0,children:["A prototype viewer for"," ",E.jsx(Fy,{to:"https://docs.xrayabsorption.org/xaslib/xdi.html",children:"XDI files"})," ","stored in a github repository. As part of the website build process, the XDI files are pulled in and indexed, giving simple static website to display open data. The website is currently pointing as a fork of the data in"," ",E.jsx(Fy,{to:"https://github.com/"+t,children:t}),"."]}),E.jsxs(ar,{paragraph:!0,children:["The database is open to ",E.jsx(Fy,{to:"view",children:" search and download "}),"."]})]})]})}function NEe(){return E.jsx(w1,{fontSize:"large",children:E.jsx("svg",{"xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape",width:"128mm",height:"128mm",stroke:"currentColor",strokeWidth:"10",fill:"currentColor",fillOpacity:0,viewBox:"0 0 128 128",version:"1.1",id:"svg8","inkscape:version":"1.0.2 (e86c870879, 2021-01-15)","sodipodi:docname":"xas.svg",children:E.jsxs("g",{children:[E.jsx("ellipse",{id:"path10",cx:"63.999969",cy:"63.999977","inkscape:transform-center-x":"-5.865903","inkscape:transform-center-y":"5.0209768",rx:"56.583519",ry:"56.583527"}),E.jsx("path",{d:"m 16.735593,100.44088 c 0,0 7.70744,-0.26134 11.237986,-2.870607 3.530546,-2.609263 5.156198,-5.498236 7.679809,-12.583372 2.523611,-7.085136 2.848188,-18.380097 4.131012,-30.102996 1.282824,-11.722899 3.230562,-44.480225 3.230562,-44.480225 4.962867,19.231513 6.224793,38.773768 14.888602,57.69454 2.414322,5.272605 9.885109,-17.110327 17.038135,-18.175536 7.378059,-1.10638 11.361319,13.99222 22.096164,13.889823 7.447127,0.173557 14.641057,-5.092574 22.300757,-7.450702 v 0",id:"path835","sodipodi:nodetypes":"czzzcscccc"})]})})})}function kEe(t){const e={Home:"/",Explore:"/view",Viewer:"/xdiviewer"};return E.jsx(NK,{style:{position:"static"},children:E.jsxs(hte,{sx:{justifyContent:"space-between",alignItems:"center"},children:[E.jsxs(is,{direction:"row",alignItems:"center",spacing:2,children:[E.jsx(Ws,{children:E.jsx(NEe,{})}),E.jsx(ar,{variant:"h4",component:"div",sx:{flexGrow:1},children:"XAS Data Viewer"}),E.jsx(v6,{component:is,direction:"row",children:Object.entries(e).map(([n,r])=>E.jsx(kQ,{children:E.jsx(wQ,{component:B6,to:r,sx:{"&.active":{color:i=>i.palette.text.secondary}},children:E.jsx(zQ,{primary:n})})},n))})]}),E.jsx(is,{direction:"row",alignItems:"center",children:E.jsx($Z,{icon:E.jsx(xMe,{}),checkedIcon:E.jsx(yMe,{}),checked:t.colorMode==="dark",onChange:t.toggleColorMode})})]})})}const LEe=Ge("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1});function OEe(t){const[e,n]=T.useState(""),[r,i]=T.useState("No file"),o=T.useContext(ug),s=l=>{l.preventDefault(),Fn.get(e).then(c=>{const u=Cd.parseFile(c.data,e);o.setXDIFile(u);const f={id:e,beamline:u.beamline,edge:u.edge,element:u.element,sample:u.sample,start_time:u.date};i(e),t.setXASMetadata(f)})},a=l=>{if(l.target.files!=null){const c=new FileReader;c.onload=async u=>{if(u.target!=null&&typeof u.target.result=="string"){let f;try{f=Cd.parseFile(u.target.result,"localfile"),o.setXDIFile(f);const h={id:e,beamline:{name:f.beamline},edge:f.edge,element:f.element,sample:f.build_sample(),start_time:f.date};t.setXASMetadata(h)}catch(h){console.log(h)}}},i(l.target.files[0].name),c.readAsText(l.target.files[0])}};return E.jsx(bu,{elevation:3,variant:"outlined",square:!1,sx:{p:2},children:E.jsxs(is,{spacing:2,sx:{justifyContent:"flex-start",alignItems:"flex-start"},children:[E.jsx(ar,{variant:"h5",children:"Upload XDI File"}),E.jsxs(is,{direction:"row",component:"form",onSubmit:s,spacing:1,children:[E.jsx(Hte,{margin:"dense",sx:{width:"75%"},id:"xdi-url",label:"XDI file URL",variant:"outlined",value:e,onChange:l=>{n(l.target.value)}}),E.jsx(cu,{variant:"contained",type:"submit",children:"Fetch"})]}),E.jsxs(cu,{variant:"contained",role:void 0,tabIndex:-1,component:"label",children:["Upload Local File",E.jsx(LEe,{type:"file",name:"file1",onChange:a})]}),E.jsx(ar,{noWrap:!0,sx:{overflow:"hidden",textOverflow:"ellipsis",width:"100%"},children:r})]})})}function DEe(){const[t,e]=T.useState(null);return E.jsxs(is,{spacing:2,children:[E.jsx(OEe,{setXASMetadata:e}),t&&E.jsx(IR,{standard:t,showDownload:!1,showCompare:!1})]})}function FEe(){const[t,e]=T.useState(null);return E.jsx(PR,{value:{xdiFile:t,setXDIFile:e,comparisonFiles:[],setComparisonFiles:()=>{}},children:E.jsxs(Ma,{height:"100%",container:!0,children:[E.jsx(Ma,{item:!0,lg:5,md:12,padding:1,children:E.jsx(DEe,{})}),E.jsx(Ma,{item:!0,height:"100%",lg:7,md:12,padding:1,children:E.jsx(gP,{})})]})})}function zEe(){const e=Jd().pathname.slice(5),[n,r]=T.useState(null),o=T.useContext(NR).find(s=>s.location===e);return T.useEffect(()=>{Fn.get("/webxdiviewer/xdidata/"+e).then(s=>{let a=null;try{a=Cd.parseFile(s.data,e)}catch{console.log("Could not read {}",focus)}r(a)})},[e]),E.jsx(PR,{value:{xdiFile:n,setXDIFile:r,comparisonFiles:[],setComparisonFiles:()=>{}},children:E.jsxs(Ma,{height:"100%",container:!0,children:[E.jsx(Ma,{item:!0,lg:5,md:12,padding:1,children:o?E.jsx(IR,{standard:o,showDownload:!0,showCompare:!1}):E.jsxs(ar,{children:[" Could not find ",e," "]})}),E.jsx(Ma,{item:!0,height:"100%",lg:7,md:12,padding:1,children:E.jsx(gP,{})})]})})}function UEe(){const t=Fz("(prefers-color-scheme: dark)"),[e,n]=T.useState(t?"dark":"light"),r=T.useMemo(()=>({toggleColorMode:()=>{n(o=>o==="light"?"dark":"light")}}),[]),i=T.useMemo(()=>gR({palette:{mode:e}}),[e]);return E.jsxs(GY,{theme:i,children:[E.jsx(qZ,{}),E.jsxs(is,{height:"100vh",width:"100vw",spacing:1,children:[E.jsx(kEe,{colorMode:e,toggleColorMode:r.toggleColorMode}),E.jsx(wre,{children:E.jsxs(One,{children:[E.jsx(gp,{path:"/",element:E.jsx(IEe,{})}),E.jsx(gp,{path:"/view",element:E.jsx(AEe,{})}),E.jsx(gp,{path:"/xdiviewer",element:E.jsx(FEe,{})}),E.jsx(gp,{path:"/xdi/:id/*",element:E.jsx(zEe,{})})]})})]})]})}$T(document.getElementById("root")).render(E.jsx(T.StrictMode,{children:E.jsx($ne,{children:E.jsx(UEe,{})})})); +${x7}`)}function IMe(t,e,n){return(t>=0&&n?` ${s5(t,e-1)}`:s5(t,e)).padEnd(e)}function s5(t,e){let n=t.toString();if(n.length<=e)return n;let r=t.toFixed(e);if(r.length>e&&(r=t.toFixed(Math.max(0,e-(r.length-e)))),r.length<=e&&!r.startsWith("0.000")&&!r.startsWith("-0.000"))return r;let i=t.toExponential(e);return i.length>e&&(i=t.toExponential(Math.max(0,e-(i.length-e)))),i.slice(0)}function NMe(t,e){t.prototype.add=function(r){return typeof r=="number"?this.addS(r):this.addM(r)},t.prototype.addS=function(r){for(let i=0;i>r);return this},t.prototype.signPropagatingRightShiftM=function(r){if(r=e.checkMatrix(r),this.rows!==r.rows||this.columns!==r.columns)throw new RangeError("Matrices dimensions must be equal");for(let i=0;i>r.get(i,o));return this},t.signPropagatingRightShift=function(r,i){return new e(r).signPropagatingRightShift(i)},t.prototype.rightShift=function(r){return typeof r=="number"?this.rightShiftS(r):this.rightShiftM(r)},t.prototype.rightShiftS=function(r){for(let i=0;i>>r);return this},t.prototype.rightShiftM=function(r){if(r=e.checkMatrix(r),this.rows!==r.rows||this.columns!==r.columns)throw new RangeError("Matrices dimensions must be equal");for(let i=0;i>>r.get(i,o));return this},t.rightShift=function(r,i){return new e(r).rightShift(i)},t.prototype.zeroFillRightShift=t.prototype.rightShift,t.prototype.zeroFillRightShiftS=t.prototype.rightShiftS,t.prototype.zeroFillRightShiftM=t.prototype.rightShiftM,t.zeroFillRightShift=t.rightShift,t.prototype.not=function(){for(let r=0;rr)throw new RangeError("Row index out of range")}function So(t,e,n){let r=n?t.columns:t.columns-1;if(e<0||e>r)throw new RangeError("Column index out of range")}function If(t,e){if(e.to1DArray&&(e=e.to1DArray()),e.length!==t.columns)throw new RangeError("vector size must be the same as the number of columns");return e}function Nf(t,e){if(e.to1DArray&&(e=e.to1DArray()),e.length!==t.rows)throw new RangeError("vector size must be the same as the number of rows");return e}function dP(t,e){if(!Ri.isAnyArray(e))throw new TypeError("row indices must be an array");for(let n=0;n=t.rows)throw new RangeError("row indices are out of range")}function hP(t,e){if(!Ri.isAnyArray(e))throw new TypeError("column indices must be an array");for(let n=0;n=t.columns)throw new RangeError("column indices are out of range")}function qC(t,e,n,r,i){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(hy("startRow",e),hy("endRow",n),hy("startColumn",r),hy("endColumn",i),e>n||r>i||e<0||e>=t.rows||n<0||n>=t.rows||r<0||r>=t.columns||i<0||i>=t.columns)throw new RangeError("Submatrix indices are out of range")}function ew(t,e=0){let n=[];for(let r=0;r=o)throw new RangeError("min must be smaller than max");let a=o-i,l=new Ze(e,n);for(let c=0;cr?(o=!0,r=n):(i=!1,o=!0);e++}return i}isReducedEchelonForm(){let e=0,n=0,r=-1,i=!0,o=!1;for(;er?(o=!0,r=n):(i=!1,o=!0);for(let s=n+1;se.get(i,r)&&(i=o);if(e.get(i,r)===0)r++;else{e.swapRows(n,i);let o=e.get(n,r);for(let s=r;s=0;)if(e.maxRow(i)===0)i--;else{let o=0,s=!1;for(;on[r]&&(n[r]=this.get(r,i));return n}case"column":{const n=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let r=0;rn[i]&&(n[i]=this.get(r,i));return n}case void 0:{let n=this.get(0,0);for(let r=0;rn&&(n=this.get(r,i));return n}default:throw new Error(`invalid option: ${e}`)}}maxIndex(){Ef(this);let e=this.get(0,0),n=[0,0];for(let r=0;re&&(e=this.get(r,i),n[0]=r,n[1]=i);return n}min(e){if(this.isEmpty())return NaN;switch(e){case"row":{const n=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let r=0;rn&&(n=this.get(e,r));return n}maxRowIndex(e){wo(this,e),Ef(this);let n=this.get(e,0),r=[e,0];for(let i=1;in&&(n=this.get(e,i),r[1]=i);return r}minRow(e){if(wo(this,e),this.isEmpty())return NaN;let n=this.get(e,0);for(let r=1;rn&&(n=this.get(r,e));return n}maxColumnIndex(e){So(this,e),Ef(this);let n=this.get(0,e),r=[0,e];for(let i=1;in&&(n=this.get(i,e),r[0]=i);return r}minColumn(e){if(So(this,e),this.isEmpty())return NaN;let n=this.get(0,e);for(let r=1;r1;i/=2)i&1&&(n=n.mmul(r)),r=r.mmul(r);return n}strassen2x2(e){e=Ze.checkMatrix(e);let n=new Ze(2,2);const r=this.get(0,0),i=e.get(0,0),o=this.get(0,1),s=e.get(0,1),a=this.get(1,0),l=e.get(1,0),c=this.get(1,1),u=e.get(1,1),f=(r+c)*(i+u),h=(a+c)*i,m=r*(s-u),v=c*(l-i),x=(r+o)*u,y=(a-r)*(i+s),g=(o-c)*(l+u),b=f+v-x+g,_=m+x,S=h+v,A=f-h+m+y;return n.set(0,0,b),n.set(0,1,_),n.set(1,0,S),n.set(1,1,A),n}strassen3x3(e){e=Ze.checkMatrix(e);let n=new Ze(3,3);const r=this.get(0,0),i=this.get(0,1),o=this.get(0,2),s=this.get(1,0),a=this.get(1,1),l=this.get(1,2),c=this.get(2,0),u=this.get(2,1),f=this.get(2,2),h=e.get(0,0),m=e.get(0,1),v=e.get(0,2),x=e.get(1,0),y=e.get(1,1),g=e.get(1,2),b=e.get(2,0),_=e.get(2,1),S=e.get(2,2),A=(r+i+o-s-a-u-f)*y,P=(r-s)*(-m+y),R=a*(-h+m+x-y-g-b+S),L=(-r+s+a)*(h-m+y),k=(s+a)*(-h+m),C=r*h,N=(-r+c+u)*(h-v+g),z=(-r+c)*(v-g),D=(c+u)*(-h+v),B=(r+i+o-a-l-c-u)*g,G=u*(-h+v+x-y-g-b+_),X=(-o+u+f)*(y+b-_),Z=(o-f)*(y-_),F=o*b,q=(u+f)*(-b+_),K=(-o+a+l)*(g+b-S),Q=(o-l)*(g-S),de=(a+l)*(-b+S),fe=i*x,J=l*_,ce=s*v,_e=c*m,be=f*S,Xe=C+F+fe,$e=A+L+k+C+X+F+q,tt=C+N+D+B+F+K+de,Ve=P+R+L+C+F+K+Q,se=P+L+k+C+J,ae=F+K+Q+de+ce,W=C+N+z+G+X+Z+F,Ie=X+Z+F+q+_e,Re=C+N+z+D+be;return n.set(0,0,Xe),n.set(0,1,$e),n.set(0,2,tt),n.set(1,0,Ve),n.set(1,1,se),n.set(1,2,ae),n.set(2,0,W),n.set(2,1,Ie),n.set(2,2,Re),n}mmulStrassen(e){e=Ze.checkMatrix(e);let n=this.clone(),r=n.rows,i=n.columns,o=e.rows,s=e.columns;i!==o&&console.warn(`Multiplying ${r} x ${i} and ${o} x ${s} matrix: dimensions do not match.`);function a(f,h,m){let v=f.rows,x=f.columns;if(v===h&&x===m)return f;{let y=Ft.zeros(h,m);return y=y.setSubMatrix(f,0,0),y}}let l=Math.max(r,o),c=Math.max(i,s);n=a(n,l,c),e=a(e,l,c);function u(f,h,m,v){if(m<=512||v<=512)return f.mmul(h);m%2===1&&v%2===1?(f=a(f,m+1,v+1),h=a(h,m+1,v+1)):m%2===1?(f=a(f,m+1,v),h=a(h,m+1,v)):v%2===1&&(f=a(f,m,v+1),h=a(h,m,v+1));let x=parseInt(f.rows/2,10),y=parseInt(f.columns/2,10),g=f.subMatrix(0,x-1,0,y-1),b=h.subMatrix(0,x-1,0,y-1),_=f.subMatrix(0,x-1,y,f.columns-1),S=h.subMatrix(0,x-1,y,h.columns-1),A=f.subMatrix(x,f.rows-1,0,y-1),P=h.subMatrix(x,h.rows-1,0,y-1),R=f.subMatrix(x,f.rows-1,y,f.columns-1),L=h.subMatrix(x,h.rows-1,y,h.columns-1),k=u(Ft.add(g,R),Ft.add(b,L),x,y),C=u(Ft.add(A,R),b,x,y),N=u(g,Ft.sub(S,L),x,y),z=u(R,Ft.sub(P,b),x,y),D=u(Ft.add(g,_),L,x,y),B=u(Ft.sub(A,g),Ft.add(b,S),x,y),G=u(Ft.sub(_,R),Ft.add(P,L),x,y),X=Ft.add(k,z);X.sub(D),X.add(G);let Z=Ft.add(N,D),F=Ft.add(C,z),q=Ft.sub(k,C);q.add(N),q.add(B);let K=Ft.zeros(2*X.rows,2*X.columns);return K=K.setSubMatrix(X,0,0),K=K.setSubMatrix(Z,X.rows,0),K=K.setSubMatrix(F,0,X.columns),K=K.setSubMatrix(q,X.rows,X.columns),K.subMatrix(0,m-1,0,v-1)}return u(n,e,l,c)}scaleRows(e={}){if(typeof e!="object")throw new TypeError("options must be an object");const{min:n=0,max:r=1}=e;if(!Number.isFinite(n))throw new TypeError("min must be a number");if(!Number.isFinite(r))throw new TypeError("max must be a number");if(n>=r)throw new RangeError("min must be smaller than max");let i=new Ze(this.rows,this.columns);for(let o=0;o0&&o5(s,{min:n,max:r,output:s}),i.setRow(o,s)}return i}scaleColumns(e={}){if(typeof e!="object")throw new TypeError("options must be an object");const{min:n=0,max:r=1}=e;if(!Number.isFinite(n))throw new TypeError("min must be a number");if(!Number.isFinite(r))throw new TypeError("max must be a number");if(n>=r)throw new RangeError("min must be smaller than max");let i=new Ze(this.rows,this.columns);for(let o=0;or||n<0||n>=this.columns||r<0||r>=this.columns)throw new RangeError("Argument out of range");let i=new Ze(e.length,r-n+1);for(let o=0;o=this.rows)throw new RangeError(`Row index out of range: ${e[o]}`);i.set(o,s-n,this.get(e[o],s))}return i}subMatrixColumn(e,n,r){if(n===void 0&&(n=0),r===void 0&&(r=this.rows-1),n>r||n<0||n>=this.rows||r<0||r>=this.rows)throw new RangeError("Argument out of range");let i=new Ze(r-n+1,e.length);for(let o=0;o=this.columns)throw new RangeError(`Column index out of range: ${e[o]}`);i.set(s-n,o,this.get(s,e[o]))}return i}setSubMatrix(e,n,r){if(e=Ze.checkMatrix(e),e.isEmpty())return this;let i=n+e.rows-1,o=r+e.columns-1;qC(this,n,i,r,o);for(let s=0;stypeof e=="number")}Ft.random=Ft.rand;Ft.randomInt=Ft.randInt;Ft.diagonal=Ft.diag;Ft.prototype.diagonal=Ft.prototype.diag;Ft.identity=Ft.eye;Ft.prototype.negate=Ft.prototype.neg;Ft.prototype.tensorProduct=Ft.prototype.kroneckerProduct;var Ym,YC,tu;let Ze=(tu=class extends Ft{constructor(n,r){super();uS(this,Ym);$t(this,"data");if(tu.isMatrix(n))fS(this,Ym,YC).call(this,n.rows,n.columns),tu.copy(n,this);else if(Number.isInteger(n)&&n>=0)fS(this,Ym,YC).call(this,n,r);else if(Ri.isAnyArray(n)){const i=n;if(n=i.length,r=n?i[0].length:0,typeof r!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let o=0;o"u"&&(r=n,n=this.columns),So(this,n,!0),r=Nf(this,r);for(let i=0;i=0)for(let i=0;i=0)O0(this,Xr,new Ze(n,n));else if(O0(this,Xr,new Ze(n)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return $o(this,Xr).size}get rows(){return $o(this,Xr).rows}get columns(){return $o(this,Xr).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(n){return Ze.isMatrix(n)&&n.klassType==="SymmetricMatrix"}static zeros(n){return new this(n)}static ones(n){return new this(n).fill(1)}clone(){const n=new Wx(this.diagonalSize);for(const[r,i,o]of this.upperRightEntries())n.set(r,i,o);return n}toMatrix(){return new Ze(this)}get(n,r){return $o(this,Xr).get(n,r)}set(n,r,i){return $o(this,Xr).set(n,r,i),$o(this,Xr).set(r,n,i),this}removeCross(n){return $o(this,Xr).removeRow(n),$o(this,Xr).removeColumn(n),this}addCross(n,r){r===void 0&&(r=n,n=this.diagonalSize);const i=r.slice();return i.splice(n,1),$o(this,Xr).addRow(n,i),$o(this,Xr).addColumn(n,r),this}applyMask(n){if(n.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const r=[];for(const[i,o]of n.entries())o||r.push(i);r.reverse();for(const i of r)this.removeCross(i);return this}toCompact(){const{diagonalSize:n}=this,r=new Array(n*(n+1)/2);for(let i=0,o=0,s=0;s=n&&(i=++o);return r}static fromCompact(n){const r=n.length,i=(Math.sqrt(8*r+1)-1)/2;if(!Number.isInteger(i))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(n)}`);const o=new Wx(i);for(let s=0,a=0,l=0;l=i&&(s=++a);return o}*upperRightEntries(){for(let n=0,r=0;n=this.diagonalSize&&(r=++n)}}*upperRightValues(){for(let n=0,r=0;n=this.diagonalSize&&(r=++n)}};Xr=new WeakMap;let eu=Wx;eu.prototype.klassType="SymmetricMatrix";class tw extends eu{static isDistanceMatrix(e){return eu.isSymmetricMatrix(e)&&e.klassSubType==="DistanceMatrix"}constructor(e){if(super(e),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(e,n,r){return e===n&&(r=0),super.set(e,n,r)}addCross(e,n){return n===void 0&&(n=e,e=this.diagonalSize),n=n.slice(),n[e]=0,super.addCross(e,n)}toSymmetricMatrix(){return new eu(this)}clone(){const e=new tw(this.diagonalSize);for(const[n,r,i]of this.upperRightEntries())n!==r&&e.set(n,r,i);return e}toCompact(){const{diagonalSize:e}=this,n=(e-1)*e/2,r=new Array(n);for(let i=1,o=0,s=0;s=e&&(i=++o+1);return r}static fromCompact(e){const n=e.length;if(n===0)return new this(0);const r=(Math.sqrt(8*n+1)+1)/2;if(!Number.isInteger(r))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(e)}`);const i=new this(r);for(let o=1,s=0,a=0;a=r&&(o=++s+1);return i}}tw.prototype.klassSubType="DistanceMatrix";class Va extends Ft{constructor(e,n,r){super(),this.matrix=e,this.rows=n,this.columns=r}}class JMe extends Va{constructor(e,n){So(e,n),super(e,e.rows,1),this.column=n}set(e,n,r){return this.matrix.set(e,this.column,r),this}get(e){return this.matrix.get(e,this.column)}}class QMe extends Va{constructor(e,n){hP(e,n),super(e,e.rows,n.length),this.columnIndices=n}set(e,n,r){return this.matrix.set(e,this.columnIndices[n],r),this}get(e,n){return this.matrix.get(e,this.columnIndices[n])}}class eEe extends Va{constructor(e){super(e,e.rows,e.columns)}set(e,n,r){return this.matrix.set(e,this.columns-n-1,r),this}get(e,n){return this.matrix.get(e,this.columns-n-1)}}class tEe extends Va{constructor(e){super(e,e.rows,e.columns)}set(e,n,r){return this.matrix.set(this.rows-e-1,n,r),this}get(e,n){return this.matrix.get(this.rows-e-1,n)}}class nEe extends Va{constructor(e,n){wo(e,n),super(e,1,e.columns),this.row=n}set(e,n,r){return this.matrix.set(this.row,n,r),this}get(e,n){return this.matrix.get(this.row,n)}}class rEe extends Va{constructor(e,n){dP(e,n),super(e,n.length,e.columns),this.rowIndices=n}set(e,n,r){return this.matrix.set(this.rowIndices[e],n,r),this}get(e,n){return this.matrix.get(this.rowIndices[e],n)}}class Gy extends Va{constructor(e,n,r){dP(e,n),hP(e,r),super(e,n.length,r.length),this.rowIndices=n,this.columnIndices=r}set(e,n,r){return this.matrix.set(this.rowIndices[e],this.columnIndices[n],r),this}get(e,n){return this.matrix.get(this.rowIndices[e],this.columnIndices[n])}}class iEe extends Va{constructor(e,n,r,i,o){qC(e,n,r,i,o),super(e,r-n+1,o-i+1),this.startRow=n,this.startColumn=i}set(e,n,r){return this.matrix.set(this.startRow+e,this.startColumn+n,r),this}get(e,n){return this.matrix.get(this.startRow+e,this.startColumn+n)}}let oEe=class extends Va{constructor(e){super(e,e.columns,e.rows)}set(e,n,r){return this.matrix.set(n,e,r),this}get(e,n){return this.matrix.get(n,e)}};class _7 extends Ft{constructor(e,n={}){const{rows:r=1}=n;if(e.length%r!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=r,this.columns=e.length/r,this.data=e}set(e,n,r){let i=this._calculateIndex(e,n);return this.data[i]=r,this}get(e,n){let r=this._calculateIndex(e,n);return this.data[r]}_calculateIndex(e,n){return e*this.columns+n}}class lo extends Ft{constructor(e){super(),this.data=e,this.rows=e.length,this.columns=e[0].length}set(e,n,r){return this.data[e][n]=r,this}get(e,n){return this.data[e][n]}}function sEe(t,e){if(Ri.isAnyArray(t))return t[0]&&Ri.isAnyArray(t[0])?new lo(t):new _7(t,e);throw new Error("the argument is not an array")}class nw{constructor(e){e=lo.checkMatrix(e);let n=e.clone(),r=n.rows,i=n.columns,o=new Float64Array(r),s=1,a,l,c,u,f,h,m,v,x;for(a=0;aMath.abs(v[u])&&(u=a);if(u!==l){for(c=0;c=0;c--){for(l=0;ls?i.set(o,s,e.get(o,s)):o===s?i.set(o,s,1):i.set(o,s,0);return i}get upperTriangularMatrix(){let e=this.LU,n=e.rows,r=e.columns,i=new Ze(n,r);for(let o=0;oMath.abs(e)?(n=e/t,Math.abs(t)*Math.sqrt(1+n*n)):e!==0?(n=t/e,Math.abs(e)*Math.sqrt(1+n*n)):0}class pP{constructor(e){e=lo.checkMatrix(e);let n=e.clone(),r=e.rows,i=e.columns,o=new Float64Array(i),s,a,l,c;for(l=0;l=0;c--){for(l=0;l=0;a--){for(o=0;o=0;C--)if(v[C]!==0){for(let N=C+1;N=0;C--){if(C0;){let C,N;for(C=R-2;C>=-1&&C!==-1;C--){const z=Number.MIN_VALUE+k*Math.abs(v[C]+Math.abs(v[C+1]));if(Math.abs(g[C])<=z||Number.isNaN(g[C])){g[C]=0;break}}if(C===R-2)N=4;else{let z;for(z=R-1;z>=C&&z!==C;z--){let D=(z!==R?Math.abs(g[z]):0)+(z!==C+1?Math.abs(g[z-1]):0);if(Math.abs(v[z])<=k*D){v[z]=0;break}}z===C?N=3:z===R-1?N=1:(N=2,C=z)}switch(C++,N){case 1:{let z=g[R-2];g[R-2]=0;for(let D=R-2;D>=C;D--){let B=ma(v[D],z),G=v[D]/B,X=z/B;if(v[D]=B,D!==C&&(z=-X*g[D-1],g[D-1]=G*g[D-1]),c)for(let Z=0;Z=v[C+1]);){let z=v[C];if(v[C]=v[C+1],v[C+1]=z,c&&Cn&&o.set(u,f,e.get(u,f)/this.s[f]);let s=this.U,a=s.rows,l=s.columns,c=new Ze(r,a);for(let u=0;ue&&n++;return n}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return Ze.diag(this.s)}}function aEe(t,e=!1){return t=lo.checkMatrix(t),e?new uh(t).inverse():w7(t,Ze.eye(t.rows))}function w7(t,e,n=!1){return t=lo.checkMatrix(t),e=lo.checkMatrix(e),n?new uh(t).solve(e):t.isSquare()?new nw(t).solve(e):new pP(t).solve(e)}function Xy(t){if(t=Ze.checkMatrix(t),t.isSquare()){if(t.columns===0)return 1;let e,n,r,i;if(t.columns===2)return e=t.get(0,0),n=t.get(0,1),r=t.get(1,0),i=t.get(1,1),e*i-n*r;if(t.columns===3){let o,s,a;return o=new Gy(t,[1,2],[1,2]),s=new Gy(t,[1,2],[0,2]),a=new Gy(t,[1,2],[0,1]),e=t.get(0,0),n=t.get(0,1),r=t.get(0,2),e*Xy(o)-n*Xy(s)+r*Xy(a)}else return new nw(t).determinant}else throw Error("determinant can only be calculated for a square matrix")}function lEe(t,e){let n=[];for(let r=0;ri)return new Array(e.rows+1).fill(0);{let o=e.addRow(n,[0]);for(let s=0;se?o[s]=1/o[s]:o[s]=0;return i.mmul(Ze.diag(o).mmul(r.transpose()))}function dEe(t,e=t,n={}){t=new Ze(t);let r=!1;if(typeof e=="object"&&!Ze.isMatrix(e)&&!Ri.isAnyArray(e)?(n=e,e=t,r=!0):e=new Ze(e),t.rows!==e.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:i=!0}=n;i&&(t=t.center("column"),r||(e=e.center("column")));const o=t.transpose().mmul(e);for(let s=0;s0?i.set(o,o+1,n[o]):n[o]<0&&i.set(o,o-1,n[o])}return i}}function pEe(t,e,n,r){let i,o,s,a,l,c,u,f;for(l=0;l0;a--){for(f=0,s=0,c=0;c0&&(o=-o),e[a]=f*o,s=s-i*o,n[a-1]=i-o,l=0;lc)do{for(i=n[c],f=(n[c+1]-i)/(2*e[c]),h=ma(f,1),f<0&&(h=-h),n[c]=e[c]/(f+h),n[c+1]=e[c]*(f+h),m=n[c+1],o=i-n[c],s=c+2;s=c;s--)for(y=x,x=v,_=b,i=v*e[s],o=v*f,h=ma(f,e[s]),e[s+1]=b*h,b=e[s]/h,v=f/h,f=v*n[s]-b*i,n[s+1]=o+b*(v*i+b*n[s]),l=0;lP*A);n[c]=n[c]+S,e[c]=0}for(s=0;s=f;c--)n[c]=e.get(c,f-1)/h,l+=n[c]*n[c];for(a=Math.sqrt(l),n[f]>0&&(a=-a),l=l-n[f]*a,n[f]=n[f]-a,u=f;u=f;c--)s+=n[c]*e.get(c,u);for(s=s/l,c=f;c<=o;c++)e.set(c,u,e.get(c,u)-s*n[c])}for(c=0;c<=o;c++){for(s=0,u=o;u>=f;u--)s+=n[u]*e.get(c,u);for(s=s/l,u=f;u<=o;u++)e.set(c,u,e.get(c,u)-s*n[u])}n[f]=h*n[f],e.set(f,f-1,h*a)}}for(c=0;c=i+1;f--)if(e.get(f,f-1)!==0){for(c=f+1;c<=o;c++)n[c]=e.get(c,f-1);for(u=f;u<=o;u++){for(a=0,c=f;c<=o;c++)a+=n[c]*r.get(c,u);for(a=a/n[f]/e.get(f,f-1),c=f;c<=o;c++)r.set(c,u,r.get(c,u)+a*n[c])}}}function vEe(t,e,n,r,i){let o=t-1,s=0,a=t-1,l=Number.EPSILON,c=0,u=0,f=0,h=0,m=0,v=0,x=0,y=0,g,b,_,S,A,P,R,L,k,C,N,z,D,B,G;for(g=0;ga)&&(n[g]=i.get(g,g),e[g]=0),b=Math.max(g-1,0);b=s;){for(S=o;S>s&&(v=Math.abs(i.get(S-1,S-1))+Math.abs(i.get(S,S)),v===0&&(v=u),!(Math.abs(i.get(S,S-1))=0){for(x=f>=0?f+x:f-x,n[o-1]=L+x,n[o]=n[o-1],x!==0&&(n[o]=L-R/x),e[o-1]=0,e[o]=0,L=i.get(o,o-1),v=Math.abs(L)+Math.abs(x),f=L/v,h=x/v,m=Math.sqrt(f*f+h*h),f=f/m,h=h/m,b=o-1;b0)){for(v=Math.sqrt(v),k=S&&(x=i.get(A,A),m=L-x,v=k-x,f=(m*v-R)/i.get(A+1,A)+i.get(A,A+1),h=i.get(A+1,A+1)-x-m-v,m=i.get(A+2,A+1),v=Math.abs(f)+Math.abs(h)+Math.abs(m),f=f/v,h=h/v,m=m/v,!(A===S||Math.abs(i.get(A,A-1))*(Math.abs(h)+Math.abs(m))A+2&&i.set(g,g-3,0);for(_=A;_<=o-1&&(B=_!==o-1,_!==A&&(f=i.get(_,_-1),h=i.get(_+1,_-1),m=B?i.get(_+2,_-1):0,L=Math.abs(f)+Math.abs(h)+Math.abs(m),L!==0&&(f=f/L,h=h/L,m=m/L)),L!==0);_++)if(v=Math.sqrt(f*f+h*h+m*m),f<0&&(v=-v),v!==0){for(_!==A?i.set(_,_-1,-v*L):S!==A&&i.set(_,_-1,-i.get(_,_-1)),f=f+v,L=f/v,k=h/v,x=m/v,h=h/f,m=m/f,b=_;b=0;o--)if(f=n[o],h=e[o],h===0)for(S=o,i.set(o,o,1),g=o-1;g>=0;g--){for(R=i.get(g,g)-f,m=0,b=S;b<=o;b++)m=m+i.get(g,b)*i.get(b,o);if(e[g]<0)x=R,v=m;else if(S=g,e[g]===0?i.set(g,o,R!==0?-m/R:-m/(l*u)):(L=i.get(g,g+1),k=i.get(g+1,g),h=(n[g]-f)*(n[g]-f)+e[g]*e[g],P=(L*v-x*m)/h,i.set(g,o,P),i.set(g+1,o,Math.abs(L)>Math.abs(x)?(-m-R*P)/L:(-v-k*P)/x)),P=Math.abs(i.get(g,o)),l*P*P>1)for(b=g;b<=o;b++)i.set(b,o,i.get(b,o)/P)}else if(h<0)for(S=o-1,Math.abs(i.get(o,o-1))>Math.abs(i.get(o-1,o))?(i.set(o-1,o-1,h/i.get(o,o-1)),i.set(o-1,o,-(i.get(o,o)-f)/i.get(o,o-1))):(G=py(0,-i.get(o-1,o),i.get(o-1,o-1)-f,h),i.set(o-1,o-1,G[0]),i.set(o-1,o,G[1])),i.set(o,o-1,0),i.set(o,o,1),g=o-2;g>=0;g--){for(C=0,N=0,b=S;b<=o;b++)C=C+i.get(g,b)*i.get(b,o-1),N=N+i.get(g,b)*i.get(b,o);if(R=i.get(g,g)-f,e[g]<0)x=R,m=C,v=N;else if(S=g,e[g]===0?(G=py(-C,-N,R,h),i.set(g,o-1,G[0]),i.set(g,o,G[1])):(L=i.get(g,g+1),k=i.get(g+1,g),z=(n[g]-f)*(n[g]-f)+e[g]*e[g]-h*h,D=(n[g]-f)*2*h,z===0&&D===0&&(z=l*u*(Math.abs(R)+Math.abs(h)+Math.abs(L)+Math.abs(k)+Math.abs(x))),G=py(L*m-x*C+h*N,L*v-x*N-h*C,z,D),i.set(g,o-1,G[0]),i.set(g,o,G[1]),Math.abs(L)>Math.abs(x)+Math.abs(h)?(i.set(g+1,o-1,(-C-R*i.get(g,o-1)+h*i.get(g,o))/L),i.set(g+1,o,(-N-R*i.get(g,o)-h*i.get(g,o-1))/L)):(G=py(-m-k*i.get(g,o-1),-v-k*i.get(g,o),x,h),i.set(g+1,o-1,G[0]),i.set(g+1,o,G[1]))),P=Math.max(Math.abs(i.get(g,o-1)),Math.abs(i.get(g,o))),l*P*P>1)for(b=g;b<=o;b++)i.set(b,o-1,i.get(b,o-1)/P),i.set(b,o,i.get(b,o)/P)}for(g=0;ga)for(b=g;b=s;b--)for(g=s;g<=a;g++){for(x=0,_=s;_<=Math.min(b,a);_++)x=x+r.get(g,_)*i.get(_,b);r.set(g,b,x)}}}function py(t,e,n,r){let i,o;return Math.abs(n)>Math.abs(r)?(i=r/n,o=n+i*r,[(t+i*e)/o,(e-i*t)/o]):(i=n/r,o=r+i*n,[(i*t+e)/o,(i*e-t)/o])}class M7{constructor(e){if(e=lo.checkMatrix(e),!e.isSymmetric())throw new Error("Matrix is not symmetric");let n=e,r=n.rows,i=new Ze(r,r),o=!0,s,a,l;for(a=0;a0),i.set(a,a,Math.sqrt(Math.max(c,0))),l=a+1;l=0;l--)for(a=0;as;m++)f=e.transpose().mmul(a).div(a.transpose().mmul(a).get(0,0)),f=f.div(f.norm()),c=e.mmul(f).div(f.transpose().mmul(f).get(0,0)),m>0&&(l=c.clone().sub(h).pow(2).sum()),h=c.clone(),r?(u=r.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0)),u=u.div(u.norm()),a=r.mmul(u).div(u.transpose().mmul(u).get(0,0))):a=c;if(r){let m=e.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0));m=m.div(m.norm());let v=e.clone().sub(c.clone().mmul(m.transpose())),x=a.transpose().mmul(c).div(c.transpose().mmul(c).get(0,0)),y=r.clone().sub(c.clone().mulS(x.get(0,0)).mmul(u.transpose()));this.t=c,this.p=m.transpose(),this.w=f.transpose(),this.q=u,this.u=a,this.s=c.transpose().mmul(c),this.xResidual=v,this.yResidual=y,this.betas=x}else this.w=f.transpose(),this.s=c.transpose().mmul(c).sqrt(),i?this.t=c.clone().div(this.s.get(0,0)):this.t=c,this.xResidual=e.sub(c.mmul(f.transpose()))}}Kt.AbstractMatrix=Ft;Kt.CHO=M7;Kt.CholeskyDecomposition=M7;Kt.DistanceMatrix=tw;Kt.EVD=S7;Kt.EigenvalueDecomposition=S7;Kt.LU=nw;Kt.LuDecomposition=nw;var C7=Kt.Matrix=Ze;Kt.MatrixColumnSelectionView=QMe;Kt.MatrixColumnView=JMe;Kt.MatrixFlipColumnView=eEe;Kt.MatrixFlipRowView=tEe;Kt.MatrixRowSelectionView=rEe;Kt.MatrixRowView=nEe;Kt.MatrixSelectionView=Gy;Kt.MatrixSubView=iEe;var yEe=Kt.MatrixTransposeView=oEe;Kt.NIPALS=E7;Kt.Nipals=E7;Kt.QR=pP;Kt.QrDecomposition=pP;Kt.SVD=uh;Kt.SingularValueDecomposition=uh;Kt.SymmetricMatrix=eu;Kt.WrapperMatrix1D=_7;Kt.WrapperMatrix2D=lo;Kt.correlation=hEe;Kt.covariance=dEe;var l5=Kt.default=Ze;Kt.determinant=Xy;Kt.inverse=aEe;Kt.linearDependencies=uEe;Kt.pseudoInverse=fEe;var xEe=Kt.solve=w7;Kt.wrap=sEe;const c5=C7,u5=yEe;l5.Matrix&&l5.Matrix;const bEe=xEe;function T7(t,e){if(!Xs(t)||!Xs(e))throw new TypeError("x and y must be arrays");if(t.length!==e.length)throw new RangeError("x and y arrays must have the same length")}class mP{constructor(){if(new.target===mP)throw new Error("BaseRegression must be subclassed")}predict(e){if(typeof e=="number")return this._predict(e);if(Xs(e)){const n=[];for(const r of e)n.push(this._predict(r));return n}else throw new TypeError("x must be a number or array")}_predict(e){throw new Error("_predict must be implemented")}train(){}toString(e){return""}toLaTeX(e){return""}score(e,n){T7(e,n);const r=e.length,i=new Array(r);for(let m=0;m0&&l!==this.coefficients.length-1?a=` + ${a}`:l!==this.coefficients.length-1&&(a=` ${a}`)),s=a+s;return s.startsWith("+")&&(s=s.slice(1)),`f(x) = ${s}`}static load(e){if(e.name!=="polynomialRegression")throw new TypeError("not a polynomial regression model");return new $x(!0,e)}}function _Ee(t,e,n,r={}){const i=t.length;let{interceptAtZero:o=!1}=r,s=[];if(Array.isArray(n))s=n,o=!1;else if(typeof n=="number")if(o){s=new Array(n);for(let m=0;m"u")throw new TypeError("X must be defined");if(r>t.length)throw new RangeError(`Window size is higher than the data length ${r}>${t.length}`);if(i<0||!Number.isInteger(i))throw new RangeError("Derivative should be a positive integer");if(o<1||!Number.isInteger(o))throw new RangeError("Polynomial should be a positive integer");o>=6&&console.warn("You should not use polynomial grade higher than 5 if you are not sure that your data arises from such a model. Possible polynomial oscillation problems");const s=Math.floor(r/2),a=t.length,l=new Float64Array(a),c=MEe(r,o,i);let u=0,f=!0;Xs(e)?f=!1:u=e**i;for(let m=0;m=0&&s0?i=(4*n-2)/(n*(2*e-n+1))*(t*qp(t,e,n-1,r)+r*qp(t,e,n-1,r-1))-(n-1)*(2*e+n)/(n*(2*e-n+1))*qp(t,e,n-2,r):n===0&&r===0?i=1:i=0,i}function f5(t,e){let n=1;if(t>=e)for(let r=t-e+1;r<=t;r++)n*=r;return n}function SEe(t,e,n,r,i){let o=0;for(let s=0;s<=r;s++)o+=(2*s+1)*(f5(2*n,s)/f5(2*n+s+1,s+1))*qp(t,n,s,0)*qp(e,n,s,i);return o}function MEe(t,e,n){const r=new Array(t),i=Math.floor(t/2);for(let o=-i;o<=i;o++){r[o+i]=new Float64Array(t);for(let s=-i;s<=i;s++)r[o+i][s+i]=SEe(s,o,i,e,n)}return r}function my(t,e){let n=1/0,r=0;for(let i=0;ie&&(e=t[r],n=r);return n}function CEe(t,e){const n=wEe(e,t,{windowSize:9,derivative:1,polynomial:3}),r=EEe(n),i=t[r];let o=5;r<20&&(o=2);const s=o*Math.round((t[1]-i)/o),a=.5*s,l=my(t,s+i),c=my(t,a+i),u=e.slice(l,c),f=t.slice(l,c),h=new $x(f,u,1),m=e.map((P,R)=>P-h.predict(t[R])),v=5*Math.round((t[t.length-1]-i)/5),x=5*Math.round(v/15),y=2,g=my(t,x+i),b=my(t,v+i),_=new $x(t.slice(g,b),m.slice(g,b),y),S=_.predict(i);for(let P=r;PP/S),[m.length])}function FE(t,e,n,r,i){const o=t[e],s=t.energy,a=n?CEe(s,o):tU(o,[o.length]);return{x:s,y:a,label:r+":"+e,color:i}}function d5(t,e,n,r,i,o){const s=!e&&!n&&!r,a=[];return s||t==null||(r&&t.murefer&&a.push(FE(t,"murefer",i,t.id,o[2])),n&&t.mufluor&&a.push(FE(t,"mufluor",i,t.id,o[1])),e&&t.mutrans&&a.push(FE(t,"mutrans",i,t.id,o[0]))),a}function TEe(t,e){return E.jsx(qwe,{abscissas:t.x,ordinates:t.y.data,curveType:e,color:t.color},t.label)}function REe(t){var C,N,z,D;const[e,n]=T.useState({showTrans:!1,showFluor:!1,showRefer:!1});T.useEffect(()=>{var B,G,X;n({showTrans:((B=t.xasData)==null?void 0:B.mutrans)!=null,showFluor:((G=t.xasData)==null?void 0:G.mufluor)!=null,showRefer:((X=t.xasData)==null?void 0:X.murefer)!=null})},[t.xasData]);const r=Object.values(Xp),[i,o]=T.useState(!0),[s,a]=T.useState(!0),[l,c]=T.useState(r[0]),u=xu(),{showTrans:f,showFluor:h,showRefer:m}=e,v=[((C=t.xasData)==null?void 0:C.mutrans)!=null,((N=t.xasData)==null?void 0:N.mufluor)!=null,((z=t.xasData)==null?void 0:z.murefer)!=null],x=(B,G)=>E.jsxs("p",{children:[B.toPrecision(8),", ",G.toPrecision(8)]}),y=d5(t.xasData,f,h,m,s,[WS(u.palette.primary.dark,.3),WS(u.palette.success.light,.3),WS(u.palette.secondary.dark,.3)]),b=t.comparisonFiles.filter(B=>{var G;return B.id!=((G=t.xasData)==null?void 0:G.id)}).map((B,G)=>d5(B,f,h,m,s,[HS(u.palette.primary.dark,G*.3),HS(u.palette.success.light,G*.3),HS(u.palette.secondary.dark,G*.3)])).flat();y.push(...b);const _=XO(y.map(B=>HO(B.y))),A={visDomain:XO(y.map(B=>HO(B.x)))??[0,1],showGrid:!0,isIndexAxis:!1,label:"Energy (eV)"},P={visDomain:_??[0,1],showGrid:!0,isIndexAxis:!1,label:s?"mu(E) (norm)":"mu(E)"},R=u.palette.action.hover,L={"--h5w-toolbar--bgColor":u.palette.action.hover,"--h5w-tickLabels--color":u.palette.text.primary,"--h5w-ticks--color":u.palette.text.primary,"--h5w-grid--color":"black","--h5w-toolbar-label--color":u.palette.primary.dark,"--h5w-btn-hover--bgColor":u.palette.action.hover,"--h5w-btnPressed--bgColor":u.palette.action.selected,"--h5w-selector-menu--bgColor":u.palette.background.default,"--h5w-selector-option-selected--bgColor":u.palette.action.selected},k={"--h5w-tickLabels--color":u.palette.text.primary,"--h5w-ticks--color":u.palette.text.primary,"--h5w-grid--color":u.palette.text.secondary,"--h5w-axisLabels--color":u.palette.text.primary,"--h5w-line--color":u.palette.primary.dark,"--h5w-tooltip--bgColor":u.palette.action.hover,"--h5w-tooltip--color":u.palette.text.primary,"--h5w-line--colorAux":[u.palette.success.light,u.palette.secondary.dark]};return E.jsxs(bu,{sx:{height:"100%",display:"flex",flexDirection:"column",backgroundColor:B=>B.palette.background.default,fontFamily:B=>B.typography.fontFamily},children:[E.jsx(Hs,{style:L,children:E.jsxs(BSe,{children:[E.jsx(Ac,{label:"Normalize",value:s,onToggle:()=>{a(!s)}}),E.jsx(Qc,{}),E.jsx(Ac,{label:"Transmission",value:f,onToggle:()=>{n({...e,showTrans:!f})},disabled:!v[0]}),E.jsx(Ac,{label:"Fluorescence",value:h,onToggle:()=>{n({...e,showFluor:!h})},disabled:!v[1]}),E.jsx(Ac,{label:"Reference",value:m,onToggle:()=>{n({...e,showRefer:!m})},disabled:!v[2]}),E.jsx(Qc,{}),E.jsx(aMe,{label:"Line Style",onChange:B=>{c(B)},options:r,value:l,renderOption:B=>E.jsx("div",{children:E.jsx("span",{children:String(B)})})}),E.jsx(Qc,{}),E.jsx(Ac,{label:"Grid",icon:bMe,value:i,onToggle:()=>o(!i)})]})}),E.jsx(Hs,{style:k,flex:1,display:"flex",children:E.jsxs(kwe,{title:((D=t.xasData)==null?void 0:D.id)??" ",abscissaConfig:A,ordinateConfig:P,children:[y.map(B=>TEe(B,l)),E.jsx(hwe,{renderTooltip:x}),E.jsx(K_e,{}),E.jsx(lwe,{}),E.jsx(p7,{children:E.jsx("div",{style:{color:u.palette.text.primary,position:"absolute",maxWidth:"35%",minWidth:"15em",padding:"0 1rem",bottom:"2.5rem",right:"0px",background:R},children:y.reverse().map(B=>E.jsxs("div",{children:[E.jsx("span",{style:{color:B.color},children:" ■"}),E.jsx("span",{children:" "+B.label})]},B.label))})})]})})]})}function gP(){const t=T.useContext(ug);let e=null,n=[];if(t.xdiFile!=null){const r=t.xdiFile,i=r.energy(),o=r.muTrans(),s=r.muFluor(),a=r.muRefer();e={id:r.id,energy:i,mutrans:o,mufluor:s,murefer:a},n=t.comparisonFiles.map(l=>({id:l.id,energy:l.energy(),mutrans:l.muTrans(),mufluor:l.muFluor(),murefer:l.muRefer()}))}return E.jsx(REe,{xasData:e,comparisonFiles:n})}function AEe(){const[t,e]=T.useState(null),[n,r]=T.useState([]),i=T.useContext(NR);function o(){return a=>{Fn.get("/webxdiviewer/xdidata/"+a).then(l=>{const c=Cd.parseFile(l.data,a);e(c)})}}const s=o();return E.jsx(PR,{value:{xdiFile:t,setXDIFile:e,comparisonFiles:n,setComparisonFiles:r},children:E.jsxs(Ea,{height:"100%",container:!0,children:[E.jsx(Ea,{item:!0,lg:5,md:12,padding:1,children:E.jsx(yre,{standards:i,updatePlot:s})}),E.jsx(Ea,{item:!0,height:"100%",lg:7,md:12,padding:1,children:E.jsx(gP,{})})]})})}const PEe="NSLS-II-BMM/bmm-standards";function IEe(){const t=PEe;return E.jsxs(WZ,{maxWidth:"md",sx:{alignSelf:"center",p:"24px"},children:[E.jsx(ar,{variant:"h4",padding:"24px",children:"Welcome to the XAS Data Viewer!"}),E.jsxs(Hs,{children:[E.jsxs(ar,{paragraph:!0,children:["A prototype viewer for"," ",E.jsx(zy,{to:"https://docs.xrayabsorption.org/xaslib/xdi.html",children:"XDI files"})," ","stored in a github repository. As part of the website build process, the XDI files are pulled in and indexed, giving simple static website to display open data. The website is currently pointing as a fork of the data in"," ",E.jsx(zy,{to:"https://github.com/"+t,children:t}),"."]}),E.jsxs(ar,{paragraph:!0,children:["The database is open to ",E.jsx(zy,{to:"view",children:" search and download "}),"."]})]})]})}function NEe(){return E.jsx(S1,{fontSize:"large",children:E.jsx("svg",{"xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","xmlns:inkscape":"http://www.inkscape.org/namespaces/inkscape",width:"128mm",height:"128mm",stroke:"currentColor",strokeWidth:"10",fill:"currentColor",fillOpacity:0,viewBox:"0 0 128 128",version:"1.1",id:"svg8","inkscape:version":"1.0.2 (e86c870879, 2021-01-15)","sodipodi:docname":"xas.svg",children:E.jsxs("g",{children:[E.jsx("ellipse",{id:"path10",cx:"63.999969",cy:"63.999977","inkscape:transform-center-x":"-5.865903","inkscape:transform-center-y":"5.0209768",rx:"56.583519",ry:"56.583527"}),E.jsx("path",{d:"m 16.735593,100.44088 c 0,0 7.70744,-0.26134 11.237986,-2.870607 3.530546,-2.609263 5.156198,-5.498236 7.679809,-12.583372 2.523611,-7.085136 2.848188,-18.380097 4.131012,-30.102996 1.282824,-11.722899 3.230562,-44.480225 3.230562,-44.480225 4.962867,19.231513 6.224793,38.773768 14.888602,57.69454 2.414322,5.272605 9.885109,-17.110327 17.038135,-18.175536 7.378059,-1.10638 11.361319,13.99222 22.096164,13.889823 7.447127,0.173557 14.641057,-5.092574 22.300757,-7.450702 v 0",id:"path835","sodipodi:nodetypes":"czzzcscccc"})]})})})}function kEe(t){const e={Home:"/",Explore:"/view",Viewer:"/xdiviewer"};return E.jsx(NK,{style:{position:"static"},children:E.jsxs(hte,{sx:{justifyContent:"space-between",alignItems:"center"},children:[E.jsxs(is,{direction:"row",alignItems:"center",spacing:2,children:[E.jsx(Hs,{children:E.jsx(NEe,{})}),E.jsx(ar,{variant:"h4",component:"div",sx:{flexGrow:1},children:"XAS Data Viewer"}),E.jsx(v6,{component:is,direction:"row",children:Object.entries(e).map(([n,r])=>E.jsx(kQ,{children:E.jsx(wQ,{component:B6,to:r,sx:{"&.active":{color:i=>i.palette.text.secondary}},children:E.jsx(zQ,{primary:n})})},n))})]}),E.jsx(is,{direction:"row",alignItems:"center",children:E.jsx($Z,{icon:E.jsx(xMe,{}),checkedIcon:E.jsx(yMe,{}),checked:t.colorMode==="dark",onChange:t.toggleColorMode})})]})})}const LEe=Ge("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1});function OEe(t){const[e,n]=T.useState(""),[r,i]=T.useState("No file"),o=T.useContext(ug),s=l=>{l.preventDefault(),Fn.get(e).then(c=>{const u=Cd.parseFile(c.data,e);o.setXDIFile(u);const f={id:e,beamline:u.beamline,edge:u.edge,element:u.element,sample:u.sample,start_time:u.date};i(e),t.setXASMetadata(f)})},a=l=>{if(l.target.files!=null){const c=new FileReader;c.onload=async u=>{if(u.target!=null&&typeof u.target.result=="string"){let f;try{f=Cd.parseFile(u.target.result,"localfile"),o.setXDIFile(f);const h={id:e,beamline:{name:f.beamline},edge:f.edge,element:f.element,sample:f.build_sample(),start_time:f.date};t.setXASMetadata(h)}catch(h){console.log(h)}}},i(l.target.files[0].name),c.readAsText(l.target.files[0])}};return E.jsx(bu,{elevation:3,variant:"outlined",square:!1,sx:{p:2},children:E.jsxs(is,{spacing:2,sx:{justifyContent:"flex-start",alignItems:"flex-start"},children:[E.jsx(ar,{variant:"h5",children:"Upload XDI File"}),E.jsxs(is,{direction:"row",component:"form",onSubmit:s,spacing:1,children:[E.jsx(Hte,{margin:"dense",sx:{width:"75%"},id:"xdi-url",label:"XDI file URL",variant:"outlined",value:e,onChange:l=>{n(l.target.value)}}),E.jsx(cu,{variant:"contained",type:"submit",children:"Fetch"})]}),E.jsxs(cu,{variant:"contained",role:void 0,tabIndex:-1,component:"label",children:["Upload Local File",E.jsx(LEe,{type:"file",name:"file1",onChange:a})]}),E.jsx(ar,{noWrap:!0,sx:{overflow:"hidden",textOverflow:"ellipsis",width:"100%"},children:r})]})})}function DEe(){const[t,e]=T.useState(null);return E.jsxs(is,{spacing:2,children:[E.jsx(OEe,{setXASMetadata:e}),t&&E.jsx(IR,{standard:t,showDownload:!1,showCompare:!1})]})}function FEe(){const[t,e]=T.useState(null);return E.jsx(PR,{value:{xdiFile:t,setXDIFile:e,comparisonFiles:[],setComparisonFiles:()=>{}},children:E.jsxs(Ea,{height:"100%",container:!0,children:[E.jsx(Ea,{item:!0,lg:5,md:12,padding:1,children:E.jsx(DEe,{})}),E.jsx(Ea,{item:!0,height:"100%",lg:7,md:12,padding:1,children:E.jsx(gP,{})})]})})}function zEe(){const e=Jd().pathname.slice(5),[n,r]=T.useState(null),o=T.useContext(NR).find(s=>s.location===e);return T.useEffect(()=>{Fn.get("/webxdiviewer/xdidata/"+e).then(s=>{let a=null;try{a=Cd.parseFile(s.data,e)}catch{console.log("Could not read {}",focus)}r(a)})},[e]),E.jsx(PR,{value:{xdiFile:n,setXDIFile:r,comparisonFiles:[],setComparisonFiles:()=>{}},children:E.jsxs(Ea,{height:"100%",container:!0,children:[E.jsx(Ea,{item:!0,lg:5,md:12,padding:1,children:o?E.jsx(IR,{standard:o,showDownload:!0,showCompare:!1}):E.jsxs(ar,{children:[" Could not find ",e," "]})}),E.jsx(Ea,{item:!0,height:"100%",lg:7,md:12,padding:1,children:E.jsx(gP,{})})]})})}function UEe(){const t=Fz("(prefers-color-scheme: dark)"),[e,n]=T.useState(t?"dark":"light"),r=T.useMemo(()=>({toggleColorMode:()=>{n(o=>o==="light"?"dark":"light")}}),[]),i=T.useMemo(()=>gR({palette:{mode:e}}),[e]);return E.jsxs(GY,{theme:i,children:[E.jsx(qZ,{}),E.jsxs(is,{height:"100vh",width:"100vw",spacing:1,children:[E.jsx(kEe,{colorMode:e,toggleColorMode:r.toggleColorMode}),E.jsx(wre,{children:E.jsxs(One,{children:[E.jsx(gp,{path:"/",element:E.jsx(IEe,{})}),E.jsx(gp,{path:"/view",element:E.jsx(AEe,{})}),E.jsx(gp,{path:"/xdiviewer",element:E.jsx(FEe,{})}),E.jsx(gp,{path:"/xdi/:id/*",element:E.jsx(zEe,{})})]})})]})]})}WT(document.getElementById("root")).render(E.jsx(T.StrictMode,{children:E.jsx($ne,{children:E.jsx(UEe,{})})})); diff --git a/index.html b/index.html index 06d3b75..09ce8e1 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Web XDI Viewer - +