1
0
mirror of https://github.com/niespodd/browser-fingerprinting.git synced 2021-11-01 22:44:07 +03:00
Files
browser-fingerprinting-bot-…/public/assets/vendor.4ca41b87.js
2021-06-08 07:02:28 +02:00

78 lines
1.3 MiB

var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,a=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,s=(e,t)=>{for(var n in t||(t={}))i.call(t,n)&&a(e,n,t[n]);if(r)for(var n of r(t))o.call(t,n)&&a(e,n,t[n]);return e},l=(e,r)=>t(e,n(r)),c=(e,t)=>{var n={};for(var a in e)i.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&r)for(var a of r(e))t.indexOf(a)<0&&o.call(e,a)&&(n[a]=e[a]);return n},u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h={exports:{}},f={},p=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;function v(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var y=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,r,i=v(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))m.call(n,a)&&(i[a]=n[a]);if(p){r=p(n);for(var s=0;s<r.length;s++)g.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},b=y,x=60103,_=60106;
/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/f.Fragment=60107,f.StrictMode=60108,f.Profiler=60114;var w=60109,S=60110,M=60112;f.Suspense=60113;var E=60115,T=60116;if("function"==typeof Symbol&&Symbol.for){var A=Symbol.for;x=A("react.element"),_=A("react.portal"),f.Fragment=A("react.fragment"),f.StrictMode=A("react.strict_mode"),f.Profiler=A("react.profiler"),w=A("react.provider"),S=A("react.context"),M=A("react.forward_ref"),f.Suspense=A("react.suspense"),E=A("react.memo"),T=A("react.lazy")}var C="function"==typeof Symbol&&Symbol.iterator;function k(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L={};function R(e,t,n){this.props=e,this.context=t,this.refs=L,this.updater=n||P}function O(){}function D(e,t,n){this.props=e,this.context=t,this.refs=L,this.updater=n||P}R.prototype.isReactComponent={},R.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(k(85));this.updater.enqueueSetState(this,e,t,"setState")},R.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},O.prototype=R.prototype;var I=D.prototype=new O;I.constructor=D,b(I,R.prototype),I.isPureReactComponent=!0;var z={current:null},N=Object.prototype.hasOwnProperty,B={key:!0,ref:!0,__self:!0,__source:!0};function F(e,t,n){var r,i={},o=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)N.call(t,r)&&!B.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:x,type:e,key:o,ref:a,props:i,_owner:z.current}}function H(e){return"object"==typeof e&&null!==e&&e.$$typeof===x}var U=/\/+/g;function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function V(e,t,n,r,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case x:case _:a=!0}}if(a)return i=i(a=e),e=""===r?"."+j(a,0):r,Array.isArray(i)?(n="",null!=e&&(n=e.replace(U,"$&/")+"/"),V(i,t,n,"",(function(e){return e}))):null!=i&&(H(i)&&(i=function(e,t){return{$$typeof:x,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(U,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=""===r?".":r+":",Array.isArray(e))for(var s=0;s<e.length;s++){var l=r+j(o=e[s],s);a+=V(o,t,n,l,i)}else if("function"==typeof(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=C&&e[C]||e["@@iterator"])?e:null}(e)))for(e=l.call(e),s=0;!(o=e.next()).done;)a+=V(o=o.value,t,n,l=r+j(o,s++),i);else if("object"===o)throw t=""+e,Error(k(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return a}function W(e,t,n){if(null==e)return e;var r=[],i=0;return V(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function G(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var q={current:null};function X(){var e=q.current;if(null===e)throw Error(k(321));return e}var Y={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:z,IsSomeRendererActing:{current:!1},assign:b};f.Children={map:W,forEach:function(e,t,n){W(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return W(e,(function(){t++})),t},toArray:function(e){return W(e,(function(e){return e}))||[]},only:function(e){if(!H(e))throw Error(k(143));return e}},f.Component=R,f.PureComponent=D,f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,f.cloneElement=function(e,t,n){if(null==e)throw Error(k(267,e));var r=b({},e.props),i=e.key,o=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,a=z.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)N.call(t,l)&&!B.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];r.children=s}return{$$typeof:x,type:e.type,key:i,ref:o,props:r,_owner:a}},f.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:S,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:w,_context:e},e.Consumer=e},f.createElement=F,f.createFactory=function(e){var t=F.bind(null,e);return t.type=e,t},f.createRef=function(){return{current:null}},f.forwardRef=function(e){return{$$typeof:M,render:e}},f.isValidElement=H,f.lazy=function(e){return{$$typeof:T,_payload:{_status:-1,_result:e},_init:G}},f.memo=function(e,t){return{$$typeof:E,type:e,compare:void 0===t?null:t}},f.useCallback=function(e,t){return X().useCallback(e,t)},f.useContext=function(e,t){return X().useContext(e,t)},f.useDebugValue=function(){},f.useEffect=function(e,t){return X().useEffect(e,t)},f.useImperativeHandle=function(e,t,n){return X().useImperativeHandle(e,t,n)},f.useLayoutEffect=function(e,t){return X().useLayoutEffect(e,t)},f.useMemo=function(e,t){return X().useMemo(e,t)},f.useReducer=function(e,t,n){return X().useReducer(e,t,n)},f.useRef=function(e){return X().useRef(e)},f.useState=function(e){return X().useState(e)},f.version="17.0.2",h.exports=f;var $=h.exports,Z={exports:{}},J={},Q={exports:{}},K={};
/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
!function(e){var t,n,r,i;if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,c=null,u=function(){if(null!==l)try{var t=e.unstable_now();l(!0,t),l=null}catch(n){throw setTimeout(u,0),n}};t=function(e){null!==l?setTimeout(t,0,e):(l=e,setTimeout(u,0))},n=function(e,t){c=setTimeout(e,t)},r=function(){clearTimeout(c)},e.unstable_shouldYield=function(){return!1},i=e.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var f=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof f&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var p=!1,m=null,g=-1,v=5,y=0;e.unstable_shouldYield=function(){return e.unstable_now()>=y},i=function(){},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<e?Math.floor(1e3/e):5};var b=new MessageChannel,x=b.port2;b.port1.onmessage=function(){if(null!==m){var t=e.unstable_now();y=t+v;try{m(!0,t)?x.postMessage(null):(p=!1,m=null)}catch(n){throw x.postMessage(null),n}}else p=!1},t=function(e){m=e,p||(p=!0,x.postMessage(null))},n=function(t,n){g=d((function(){t(e.unstable_now())}),n)},r=function(){h(g),g=-1}}function _(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<M(i,t)))break e;e[r]=t,e[n]=i,n=r}}function w(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,l=e[s];if(void 0!==a&&0>M(a,n))void 0!==l&&0>M(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==l&&0>M(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function M(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var E=[],T=[],A=1,C=null,k=3,P=!1,L=!1,R=!1;function O(e){for(var t=w(T);null!==t;){if(null===t.callback)S(T);else{if(!(t.startTime<=e))break;S(T),t.sortIndex=t.expirationTime,_(E,t)}t=w(T)}}function D(e){if(R=!1,O(e),!L)if(null!==w(E))L=!0,t(I);else{var r=w(T);null!==r&&n(D,r.startTime-e)}}function I(t,i){L=!1,R&&(R=!1,r()),P=!0;var o=k;try{for(O(i),C=w(E);null!==C&&(!(C.expirationTime>i)||t&&!e.unstable_shouldYield());){var a=C.callback;if("function"==typeof a){C.callback=null,k=C.priorityLevel;var s=a(C.expirationTime<=i);i=e.unstable_now(),"function"==typeof s?C.callback=s:C===w(E)&&S(E),O(i)}else S(E);C=w(E)}if(null!==C)var l=!0;else{var c=w(T);null!==c&&n(D,c.startTime-i),l=!1}return l}finally{C=null,k=o,P=!1}}var z=i;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){L||P||(L=!0,t(I))},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_getFirstCallbackNode=function(){return w(E)},e.unstable_next=function(e){switch(k){case 1:case 2:case 3:var t=3;break;default:t=k}var n=k;k=t;try{return e()}finally{k=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=z,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=k;k=e;try{return t()}finally{k=n}},e.unstable_scheduleCallback=function(i,o,a){var s=e.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?s+a:s:a=s,i){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return i={id:A++,callback:o,priorityLevel:i,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(i.sortIndex=a,_(T,i),null===w(E)&&i===w(T)&&(R?r():R=!0,n(D,a-s))):(i.sortIndex=l,_(E,i),L||P||(L=!0,t(I))),i},e.unstable_wrapCallback=function(e){var t=k;return function(){var n=k;k=t;try{return e.apply(this,arguments)}finally{k=n}}}}(K),Q.exports=K;
/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var ee=h.exports,te=y,ne=Q.exports;function re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!ee)throw Error(re(227));var ie=new Set,oe={};function ae(e,t){se(e,t),se(e+"Capture",t)}function se(e,t){for(oe[e]=t,e=0;e<t.length;e++)ie.add(t[e])}var le=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),ce=/^[: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]*$/,ue=Object.prototype.hasOwnProperty,de={},he={};function fe(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){pe[e]=new fe(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];pe[t]=new fe(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){pe[e]=new fe(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){pe[e]=new fe(e,2,!1,e,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(e){pe[e]=new fe(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){pe[e]=new fe(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){pe[e]=new fe(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){pe[e]=new fe(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){pe[e]=new fe(e,5,!1,e.toLowerCase(),null,!1,!1)}));var me=/[\-:]([a-z])/g;function ge(e){return e[1].toUpperCase()}function ve(e,t,n,r){var i=pe.hasOwnProperty(t)?pe[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!ue.call(he,e)||!ue.call(de,e)&&(ce.test(e)?he[e]=!0:(de[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(e){var t=e.replace(me,ge);pe[t]=new fe(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(me,ge);pe[t]=new fe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(me,ge);pe[t]=new fe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){pe[e]=new fe(e,1,!1,e.toLowerCase(),null,!1,!1)})),pe.xlinkHref=new fe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){pe[e]=new fe(e,1,!1,e.toLowerCase(),null,!0,!0)}));var ye=ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,be=60103,xe=60106,_e=60107,we=60108,Se=60114,Me=60109,Ee=60110,Te=60112,Ae=60113,Ce=60120,ke=60115,Pe=60116,Le=60121,Re=60128,Oe=60129,De=60130,Ie=60131;if("function"==typeof Symbol&&Symbol.for){var ze=Symbol.for;be=ze("react.element"),xe=ze("react.portal"),_e=ze("react.fragment"),we=ze("react.strict_mode"),Se=ze("react.profiler"),Me=ze("react.provider"),Ee=ze("react.context"),Te=ze("react.forward_ref"),Ae=ze("react.suspense"),Ce=ze("react.suspense_list"),ke=ze("react.memo"),Pe=ze("react.lazy"),Le=ze("react.block"),ze("react.scope"),Re=ze("react.opaque.id"),Oe=ze("react.debug_trace_mode"),De=ze("react.offscreen"),Ie=ze("react.legacy_hidden")}var Ne,Be="function"==typeof Symbol&&Symbol.iterator;function Fe(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Be&&e[Be]||e["@@iterator"])?e:null}function He(e){if(void 0===Ne)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ne=t&&t[1]||""}return"\n"+Ne+e}var Ue=!1;function je(e,t){if(!e||Ue)return"";Ue=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"==typeof l.stack){for(var i=l.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{Ue=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?He(e):""}function Ve(e){switch(e.tag){case 5:return He(e.type);case 16:return He("Lazy");case 13:return He("Suspense");case 19:return He("SuspenseList");case 0:case 2:case 15:return e=je(e.type,!1);case 11:return e=je(e.type.render,!1);case 22:return e=je(e.type._render,!1);case 1:return e=je(e.type,!0);default:return""}}function We(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _e:return"Fragment";case xe:return"Portal";case Se:return"Profiler";case we:return"StrictMode";case Ae:return"Suspense";case Ce:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Ee:return(e.displayName||"Context")+".Consumer";case Me:return(e._context.displayName||"Context")+".Provider";case Te:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case ke:return We(e.type);case Le:return We(e._render);case Pe:t=e._payload,e=e._init;try{return We(e(t))}catch(n){}}return null}function Ge(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function qe(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Xe(e){e._valueTracker||(e._valueTracker=function(e){var t=qe(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ye(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qe(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function $e(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Ze(e,t){var n=t.checked;return te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Je(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Ge(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Qe(e,t){null!=(t=t.checked)&&ve(e,"checked",t,!1)}function Ke(e,t){Qe(e,t);var n=Ge(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?tt(e,t.type,n):t.hasOwnProperty("defaultValue")&&tt(e,t.type,Ge(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function et(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function tt(e,t,n){"number"===t&&$e(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function nt(e,t){return e=te({children:void 0},t),(t=function(e){var t="";return ee.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function rt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ge(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function it(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(re(91));return te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ot(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(re(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(re(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Ge(n)}}function at(e,t){var n=Ge(t.value),r=Ge(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function st(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var lt="http://www.w3.org/1999/xhtml",ct="http://www.w3.org/2000/svg";function ut(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function dt(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ut(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ht,ft,pt=(ft=function(e,t){if(e.namespaceURI!==ct||"innerHTML"in e)e.innerHTML=t;else{for((ht=ht||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ht.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ft(e,t)}))}:ft);function mt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var gt={animationIterationCount:!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},vt=["Webkit","ms","Moz","O"];function yt(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||gt.hasOwnProperty(e)&&gt[e]?(""+t).trim():t+"px"}function bt(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=yt(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(gt).forEach((function(e){vt.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),gt[t]=gt[e]}))}));var xt=te({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 _t(e,t){if(t){if(xt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(re(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(re(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(re(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(re(62))}}function wt(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){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}}function St(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Mt=null,Et=null,Tt=null;function At(e){if(e=Ji(e)){if("function"!=typeof Mt)throw Error(re(280));var t=e.stateNode;t&&(t=Ki(t),Mt(e.stateNode,e.type,t))}}function Ct(e){Et?Tt?Tt.push(e):Tt=[e]:Et=e}function kt(){if(Et){var e=Et,t=Tt;if(Tt=Et=null,At(e),t)for(e=0;e<t.length;e++)At(t[e])}}function Pt(e,t){return e(t)}function Lt(e,t,n,r,i){return e(t,n,r,i)}function Rt(){}var Ot=Pt,Dt=!1,It=!1;function zt(){null===Et&&null===Tt||(Rt(),kt())}function Nt(e,t){var n=e.stateNode;if(null===n)return null;var r=Ki(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(re(231,t,typeof n));return n}var Bt=!1;if(le)try{var Ft={};Object.defineProperty(Ft,"passive",{get:function(){Bt=!0}}),window.addEventListener("test",Ft,Ft),window.removeEventListener("test",Ft,Ft)}catch(ft){Bt=!1}function Ht(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Ut=!1,jt=null,Vt=!1,Wt=null,Gt={onError:function(e){Ut=!0,jt=e}};function qt(e,t,n,r,i,o,a,s,l){Ut=!1,jt=null,Ht.apply(Gt,arguments)}function Xt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Yt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function $t(e){if(Xt(e)!==e)throw Error(re(188))}function Zt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Xt(e)))throw Error(re(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return $t(i),e;if(o===r)return $t(i),t;o=o.sibling}throw Error(re(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(re(189))}}if(n.alternate!==r)throw Error(re(190))}if(3!==n.tag)throw Error(re(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Jt(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var Qt,Kt,en,tn,nn=!1,rn=[],on=null,an=null,sn=null,ln=new Map,cn=new Map,un=[],dn="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function hn(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function fn(e,t){switch(e){case"focusin":case"focusout":on=null;break;case"dragenter":case"dragleave":an=null;break;case"mouseover":case"mouseout":sn=null;break;case"pointerover":case"pointerout":ln.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":cn.delete(t.pointerId)}}function pn(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=hn(t,n,r,i,o),null!==t&&(null!==(t=Ji(t))&&Kt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function mn(e){var t=Zi(e.target);if(null!==t){var n=Xt(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Yt(n)))return e.blockedOn=t,void tn(e.lanePriority,(function(){ne.unstable_runWithPriority(e.priority,(function(){en(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function gn(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Ji(n))&&Kt(t),e.blockedOn=n,!1;t.shift()}return!0}function vn(e,t,n){gn(e)&&n.delete(t)}function yn(){for(nn=!1;0<rn.length;){var e=rn[0];if(null!==e.blockedOn){null!==(e=Ji(e.blockedOn))&&Qt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Jn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&rn.shift()}null!==on&&gn(on)&&(on=null),null!==an&&gn(an)&&(an=null),null!==sn&&gn(sn)&&(sn=null),ln.forEach(vn),cn.forEach(vn)}function bn(e,t){e.blockedOn===t&&(e.blockedOn=null,nn||(nn=!0,ne.unstable_scheduleCallback(ne.unstable_NormalPriority,yn)))}function xn(e){function t(t){return bn(t,e)}if(0<rn.length){bn(rn[0],e);for(var n=1;n<rn.length;n++){var r=rn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==on&&bn(on,e),null!==an&&bn(an,e),null!==sn&&bn(sn,e),ln.forEach(t),cn.forEach(t),n=0;n<un.length;n++)(r=un[n]).blockedOn===e&&(r.blockedOn=null);for(;0<un.length&&null===(n=un[0]).blockedOn;)mn(n),null===n.blockedOn&&un.shift()}function _n(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wn={animationend:_n("Animation","AnimationEnd"),animationiteration:_n("Animation","AnimationIteration"),animationstart:_n("Animation","AnimationStart"),transitionend:_n("Transition","TransitionEnd")},Sn={},Mn={};function En(e){if(Sn[e])return Sn[e];if(!wn[e])return e;var t,n=wn[e];for(t in n)if(n.hasOwnProperty(t)&&t in Mn)return Sn[e]=n[t];return e}le&&(Mn=document.createElement("div").style,"AnimationEvent"in window||(delete wn.animationend.animation,delete wn.animationiteration.animation,delete wn.animationstart.animation),"TransitionEvent"in window||delete wn.transitionend.transition);var Tn=En("animationend"),An=En("animationiteration"),Cn=En("animationstart"),kn=En("transitionend"),Pn=new Map,Ln=new Map,Rn=["abort","abort",Tn,"animationEnd",An,"animationIteration",Cn,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",kn,"transitionEnd","waiting","waiting"];function On(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Ln.set(r,t),Pn.set(r,i),ae(i,[r])}}(0,ne.unstable_now)();var Dn=8;function In(e){if(0!=(1&e))return Dn=15,1;if(0!=(2&e))return Dn=14,2;if(0!=(4&e))return Dn=13,4;var t=24&e;return 0!==t?(Dn=12,t):0!=(32&e)?(Dn=11,32):0!==(t=192&e)?(Dn=10,t):0!=(256&e)?(Dn=9,256):0!==(t=3584&e)?(Dn=8,t):0!=(4096&e)?(Dn=7,4096):0!==(t=4186112&e)?(Dn=6,t):0!==(t=62914560&e)?(Dn=5,t):67108864&e?(Dn=4,67108864):0!=(134217728&e)?(Dn=3,134217728):0!==(t=805306368&e)?(Dn=2,t):0!=(1073741824&e)?(Dn=1,1073741824):(Dn=8,e)}function zn(e,t){var n=e.pendingLanes;if(0===n)return Dn=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)r=o,i=Dn=15;else if(0!==(o=134217727&n)){var l=o&~a;0!==l?(r=In(l),i=Dn):0!==(s&=o)&&(r=In(s),i=Dn)}else 0!==(o=n&~a)?(r=In(o),i=Dn):0!==s&&(r=In(s),i=Dn);if(0===r)return 0;if(r=n&((0>(r=31-jn(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&a)){if(In(t),i<=Dn)return t;Dn=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-jn(t)),r|=e[n],t&=~i;return r}function Nn(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Bn(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Fn(24&~t))?Bn(10,t):e;case 10:return 0===(e=Fn(192&~t))?Bn(8,t):e;case 8:return 0===(e=Fn(3584&~t))&&(0===(e=Fn(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Fn(805306368&~t))&&(t=268435456),t}throw Error(re(358,e))}function Fn(e){return e&-e}function Hn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Un(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-jn(t)]=n}var jn=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Vn(e)/Wn|0)|0},Vn=Math.log,Wn=Math.LN2;var Gn=ne.unstable_UserBlockingPriority,qn=ne.unstable_runWithPriority,Xn=!0;function Yn(e,t,n,r){Dt||Rt();var i=Zn,o=Dt;Dt=!0;try{Lt(i,e,t,n,r)}finally{(Dt=o)||zt()}}function $n(e,t,n,r){qn(Gn,Zn.bind(null,e,t,n,r))}function Zn(e,t,n,r){var i;if(Xn)if((i=0==(4&t))&&0<rn.length&&-1<dn.indexOf(e))e=hn(null,e,t,n,r),rn.push(e);else{var o=Jn(e,t,n,r);if(null===o)i&&fn(e,r);else{if(i){if(-1<dn.indexOf(e))return e=hn(o,e,t,n,r),void rn.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return on=pn(on,e,t,n,r,i),!0;case"dragenter":return an=pn(an,e,t,n,r,i),!0;case"mouseover":return sn=pn(sn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return ln.set(o,pn(ln.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,cn.set(o,pn(cn.get(o)||null,e,t,n,r,i)),!0}return!1}(o,e,t,n,r))return;fn(e,r)}ki(e,t,r,null,n)}}}function Jn(e,t,n,r){var i=St(r);if(null!==(i=Zi(i))){var o=Xt(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Yt(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return ki(e,t,r,i,n),null}var Qn=null,Kn=null,er=null;function tr(){if(er)return er;var e,t,n=Kn,r=n.length,i="value"in Qn?Qn.value:Qn.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return er=i.slice(e,1<t?1-t:void 0)}function nr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rr(){return!0}function ir(){return!1}function or(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?rr:ir,this.isPropagationStopped=ir,this}return te(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var ar,sr,lr,cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ur=or(cr),dr=te({},cr,{view:0,detail:0}),hr=or(dr),fr=te({},dr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==lr&&(lr&&"mousemove"===e.type?(ar=e.screenX-lr.screenX,sr=e.screenY-lr.screenY):sr=ar=0,lr=e),ar)},movementY:function(e){return"movementY"in e?e.movementY:sr}}),pr=or(fr),mr=or(te({},fr,{dataTransfer:0})),gr=or(te({},dr,{relatedTarget:0})),vr=or(te({},cr,{animationName:0,elapsedTime:0,pseudoElement:0})),yr=or(te({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),br=or(te({},cr,{data:0})),xr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_r={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=wr[e])&&!!t[e]}function Mr(){return Sr}var Er=or(te({},dr,{key:function(e){if(e.key){var t=xr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_r[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mr,charCode:function(e){return"keypress"===e.type?nr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),Tr=or(te({},fr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ar=or(te({},dr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mr})),Cr=or(te({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0})),kr=or(te({},fr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Pr=[9,13,27,32],Lr=le&&"CompositionEvent"in window,Rr=null;le&&"documentMode"in document&&(Rr=document.documentMode);var Or=le&&"TextEvent"in window&&!Rr,Dr=le&&(!Lr||Rr&&8<Rr&&11>=Rr),Ir=String.fromCharCode(32),zr=!1;function Nr(e,t){switch(e){case"keyup":return-1!==Pr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Br(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Fr=!1;var Hr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hr[e.type]:"textarea"===t}function jr(e,t,n,r){Ct(r),0<(t=Li(t,"onChange")).length&&(n=new ur("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vr=null,Wr=null;function Gr(e){Si(e,0)}function qr(e){if(Ye(Qi(e)))return e}function Xr(e,t){if("change"===e)return t}var Yr=!1;if(le){var $r;if(le){var Zr="oninput"in document;if(!Zr){var Jr=document.createElement("div");Jr.setAttribute("oninput","return;"),Zr="function"==typeof Jr.oninput}$r=Zr}else $r=!1;Yr=$r&&(!document.documentMode||9<document.documentMode)}function Qr(){Vr&&(Vr.detachEvent("onpropertychange",Kr),Wr=Vr=null)}function Kr(e){if("value"===e.propertyName&&qr(Wr)){var t=[];if(jr(t,Wr,e,St(e)),e=Gr,Dt)e(t);else{Dt=!0;try{Pt(e,t)}finally{Dt=!1,zt()}}}}function ei(e,t,n){"focusin"===e?(Qr(),Wr=n,(Vr=t).attachEvent("onpropertychange",Kr)):"focusout"===e&&Qr()}function ti(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return qr(Wr)}function ni(e,t){if("click"===e)return qr(t)}function ri(e,t){if("input"===e||"change"===e)return qr(t)}var ii="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},oi=Object.prototype.hasOwnProperty;function ai(e,t){if(ii(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!oi.call(t,n[r])||!ii(e[n[r]],t[n[r]]))return!1;return!0}function si(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function li(e,t){var n,r=si(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=si(r)}}function ci(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ci(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ui(){for(var e=window,t=$e();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=$e((e=t.contentWindow).document)}return t}function di(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var hi=le&&"documentMode"in document&&11>=document.documentMode,fi=null,pi=null,mi=null,gi=!1;function vi(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;gi||null==fi||fi!==$e(r)||("selectionStart"in(r=fi)&&di(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},mi&&ai(mi,r)||(mi=r,0<(r=Li(pi,"onSelect")).length&&(t=new ur("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fi)))}On("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),On("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),On(Rn,2);for(var yi="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),bi=0;bi<yi.length;bi++)Ln.set(yi[bi],0);se("onMouseEnter",["mouseout","mouseover"]),se("onMouseLeave",["mouseout","mouseover"]),se("onPointerEnter",["pointerout","pointerover"]),se("onPointerLeave",["pointerout","pointerover"]),ae("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ae("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ae("onBeforeInput",["compositionend","keypress","textInput","paste"]),ae("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ae("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ae("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_i=new Set("cancel close invalid load scroll toggle".split(" ").concat(xi));function wi(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,l){if(qt.apply(this,arguments),Ut){if(!Ut)throw Error(re(198));var c=jt;Ut=!1,jt=null,Vt||(Vt=!0,Wt=c)}}(r,t,void 0,e),e.currentTarget=null}function Si(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;wi(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;wi(i,s,c),o=l}}}if(Vt)throw e=Wt,Vt=!1,Wt=null,e}function Mi(e,t){var n=eo(t),r=e+"__bubble";n.has(r)||(Ci(t,e,2,!1),n.add(r))}var Ei="_reactListening"+Math.random().toString(36).slice(2);function Ti(e){e[Ei]||(e[Ei]=!0,ie.forEach((function(t){_i.has(t)||Ai(t,!1,e,null),Ai(t,!0,e,null)})))}function Ai(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&_i.has(e)){if("scroll"!==e)return;i|=2,o=r}var a=eo(o),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(i|=4),Ci(o,e,i,t),a.add(s))}function Ci(e,t,n,r){var i=Ln.get(t);switch(void 0===i?2:i){case 0:i=Yn;break;case 1:i=$n;break;default:i=Zn}n=i.bind(null,t,n,e),i=void 0,!Bt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function ki(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Zi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(It)return e(t,n);It=!0;try{Ot(e,t,n)}finally{It=!1,zt()}}((function(){var r=o,i=St(n),a=[];e:{var s=Pn.get(e);if(void 0!==s){var l=ur,c=e;switch(e){case"keypress":if(0===nr(n))break e;case"keydown":case"keyup":l=Er;break;case"focusin":c="focus",l=gr;break;case"focusout":c="blur",l=gr;break;case"beforeblur":case"afterblur":l=gr;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Ar;break;case Tn:case An:case Cn:l=vr;break;case kn:l=Cr;break;case"scroll":l=hr;break;case"wheel":l=kr;break;case"copy":case"cut":case"paste":l=yr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tr}var u=0!=(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==h&&(null!=(m=Nt(p,h))&&u.push(Pi(p,m,f)))),d)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!=(16&t)||!(c=n.relatedTarget||n.fromElement)||!Zi(c)&&!c[Yi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?Zi(c):null)&&(c!==(d=Xt(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=pr,m="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=Tr,m="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?s:Qi(l),f=null==c?s:Qi(c),(s=new u(m,p+"leave",l,n,i)).target=d,s.relatedTarget=f,m=null,Zi(i)===r&&((u=new u(h,p+"enter",c,n,i)).target=f,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(h=c,p=0,f=u=l;f;f=Ri(f))p++;for(f=0,m=h;m;m=Ri(m))f++;for(;0<p-f;)u=Ri(u),p--;for(;0<f-p;)h=Ri(h),f--;for(;p--;){if(u===h||null!==h&&u===h.alternate)break e;u=Ri(u),h=Ri(h)}u=null}else u=null;null!==l&&Oi(a,s,l,u,!1),null!==c&&null!==d&&Oi(a,d,c,u,!0)}if("select"===(l=(s=r?Qi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Xr;else if(Ur(s))if(Yr)g=ri;else{g=ti;var v=ei}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ni);switch(g&&(g=g(e,r))?jr(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&tt(s,"number",s.value)),v=r?Qi(r):window,e){case"focusin":(Ur(v)||"true"===v.contentEditable)&&(fi=v,pi=r,mi=null);break;case"focusout":mi=pi=fi=null;break;case"mousedown":gi=!0;break;case"contextmenu":case"mouseup":case"dragend":gi=!1,vi(a,n,i);break;case"selectionchange":if(hi)break;case"keydown":case"keyup":vi(a,n,i)}var y;if(Lr)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Fr?Nr(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Dr&&"ko"!==n.locale&&(Fr||"onCompositionStart"!==b?"onCompositionEnd"===b&&Fr&&(y=tr()):(Kn="value"in(Qn=i)?Qn.value:Qn.textContent,Fr=!0)),0<(v=Li(r,b)).length&&(b=new br(b,e,null,n,i),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=Br(n))&&(b.data=y))),(y=Or?function(e,t){switch(e){case"compositionend":return Br(t);case"keypress":return 32!==t.which?null:(zr=!0,Ir);case"textInput":return(e=t.data)===Ir&&zr?null:e;default:return null}}(e,n):function(e,t){if(Fr)return"compositionend"===e||!Lr&&Nr(e,t)?(e=tr(),er=Kn=Qn=null,Fr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dr&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=Li(r,"onBeforeInput")).length&&(i=new br("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Si(a,t)}))}function Pi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Li(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Nt(e,n))&&r.unshift(Pi(e,o,i)),null!=(o=Nt(e,t))&&r.push(Pi(e,o,i))),e=e.return}return r}function Ri(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Oi(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=Nt(n,o))&&a.unshift(Pi(n,l,s)):i||null!=(l=Nt(n,o))&&a.push(Pi(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Di(){}var Ii=null,zi=null;function Ni(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Bi(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Fi="function"==typeof setTimeout?setTimeout:void 0,Hi="function"==typeof clearTimeout?clearTimeout:void 0;function Ui(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function ji(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Vi(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Wi=0;var Gi=Math.random().toString(36).slice(2),qi="__reactFiber$"+Gi,Xi="__reactProps$"+Gi,Yi="__reactContainer$"+Gi,$i="__reactEvents$"+Gi;function Zi(e){var t=e[qi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yi]||n[qi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Vi(e);null!==e;){if(n=e[qi])return n;e=Vi(e)}return t}n=(e=n).parentNode}return null}function Ji(e){return!(e=e[qi]||e[Yi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Qi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(re(33))}function Ki(e){return e[Xi]||null}function eo(e){var t=e[$i];return void 0===t&&(t=e[$i]=new Set),t}var to=[],no=-1;function ro(e){return{current:e}}function io(e){0>no||(e.current=to[no],to[no]=null,no--)}function oo(e,t){no++,to[no]=e.current,e.current=t}var ao={},so=ro(ao),lo=ro(!1),co=ao;function uo(e,t){var n=e.type.contextTypes;if(!n)return ao;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ho(e){return null!=(e=e.childContextTypes)}function fo(){io(lo),io(so)}function po(e,t,n){if(so.current!==ao)throw Error(re(168));oo(so,t),oo(lo,n)}function mo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(re(108,We(t)||"Unknown",i));return te({},n,r)}function go(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ao,co=so.current,oo(so,e),oo(lo,lo.current),!0}function vo(e,t,n){var r=e.stateNode;if(!r)throw Error(re(169));n?(e=mo(e,t,co),r.__reactInternalMemoizedMergedChildContext=e,io(lo),io(so),oo(so,e)):io(lo),oo(lo,n)}var yo=null,bo=null,xo=ne.unstable_runWithPriority,_o=ne.unstable_scheduleCallback,wo=ne.unstable_cancelCallback,So=ne.unstable_shouldYield,Mo=ne.unstable_requestPaint,Eo=ne.unstable_now,To=ne.unstable_getCurrentPriorityLevel,Ao=ne.unstable_ImmediatePriority,Co=ne.unstable_UserBlockingPriority,ko=ne.unstable_NormalPriority,Po=ne.unstable_LowPriority,Lo=ne.unstable_IdlePriority,Ro={},Oo=void 0!==Mo?Mo:function(){},Do=null,Io=null,zo=!1,No=Eo(),Bo=1e4>No?Eo:function(){return Eo()-No};function Fo(){switch(To()){case Ao:return 99;case Co:return 98;case ko:return 97;case Po:return 96;case Lo:return 95;default:throw Error(re(332))}}function Ho(e){switch(e){case 99:return Ao;case 98:return Co;case 97:return ko;case 96:return Po;case 95:return Lo;default:throw Error(re(332))}}function Uo(e,t){return e=Ho(e),xo(e,t)}function jo(e,t,n){return e=Ho(e),_o(e,t,n)}function Vo(){if(null!==Io){var e=Io;Io=null,wo(e)}Wo()}function Wo(){if(!zo&&null!==Do){zo=!0;var e=0;try{var t=Do;Uo(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Do=null}catch(n){throw null!==Do&&(Do=Do.slice(e+1)),_o(Ao,Vo),n}finally{zo=!1}}}var Go=ye.ReactCurrentBatchConfig;function qo(e,t){if(e&&e.defaultProps){for(var n in t=te({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Xo=ro(null),Yo=null,$o=null,Zo=null;function Jo(){Zo=$o=Yo=null}function Qo(e){var t=Xo.current;io(Xo),e.type._context._currentValue=t}function Ko(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ea(e,t){Yo=e,Zo=$o=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Ls=!0),e.firstContext=null)}function ta(e,t){if(Zo!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Zo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===$o){if(null===Yo)throw Error(re(308));$o=t,Yo.dependencies={lanes:0,firstContext:t,responders:null}}else $o=$o.next=t;return e._currentValue}var na=!1;function ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ia(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function oa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function aa(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function sa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function la(e,t,n,r){var i=e.updateQueue;na=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;if(null!==u){var d=(u=u.updateQueue).lastBaseUpdate;d!==a&&(null===d?u.firstBaseUpdate=c:d.next=c,u.lastBaseUpdate=l)}}if(null!==o){for(d=i.baseState,a=0,u=c=l=null;;){s=o.lane;var h=o.eventTime;if((r&s)===s){null!==u&&(u=u.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var f=e,p=o;switch(s=t,h=n,p.tag){case 1:if("function"==typeof(f=p.payload)){d=f.call(h,d,s);break e}d=f;break e;case 3:f.flags=-4097&f.flags|64;case 0:if(null==(s="function"==typeof(f=p.payload)?f.call(h,d,s):f))break e;d=te({},d,s);break e;case 2:na=!0}}null!==o.callback&&(e.flags|=32,null===(s=i.effects)?i.effects=[o]:s.push(o))}else h={eventTime:h,lane:s,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===u?(c=u=h,l=d):u=u.next=h,a|=s;if(null===(o=o.next)){if(null===(s=i.shared.pending))break;o=s.next,s.next=null,i.lastBaseUpdate=s,i.shared.pending=null}}null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,Il|=a,e.lanes=a,e.memoizedState=d}}function ca(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(re(191,i));i.call(r)}}}var ua=(new ee.Component).refs;function da(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:te({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ha={isMounted:function(e){return!!(e=e._reactInternals)&&Xt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ac(),i=sc(e),o=oa(r,i);o.payload=t,null!=n&&(o.callback=n),aa(e,o),lc(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ac(),i=sc(e),o=oa(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),aa(e,o),lc(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ac(),r=sc(e),i=oa(n,r);i.tag=2,null!=t&&(i.callback=t),aa(e,i),lc(e,r,n)}};function fa(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!ai(n,r)||!ai(i,o))}function pa(e,t,n){var r=!1,i=ao,o=t.contextType;return"object"==typeof o&&null!==o?o=ta(o):(i=ho(t)?co:so.current,o=(r=null!=(r=t.contextTypes))?uo(e,i):ao),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ha,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ma(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ha.enqueueReplaceState(t,t.state,null)}function ga(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ua,ra(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=ta(o):(o=ho(t)?co:so.current,i.context=uo(e,o)),la(e,n,i,r),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(da(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ha.enqueueReplaceState(i,i.state,null),la(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4)}var va=Array.isArray;function ya(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(re(309));var r=n.stateNode}if(!r)throw Error(re(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===ua&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(re(284));if(!n._owner)throw Error(re(290,e))}return e}function ba(e,t){if("textarea"!==e.type)throw Error(re(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function xa(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Hc(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function a(t){return e&&null===t.alternate&&(t.flags=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Wc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=ya(e,t,n),r.return=e,r):((r=Uc(n.type,n.key,n.props,null,e.mode,r)).ref=ya(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Gc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=jc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Wc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case be:return(n=Uc(t.type,t.key,t.props,null,e.mode,n)).ref=ya(e,null,t),n.return=e,n;case xe:return(t=Gc(t,e.mode,n)).return=e,t}if(va(t)||Fe(t))return(t=jc(t,e.mode,n,null)).return=e,t;ba(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case be:return n.key===i?n.type===_e?u(e,t,n.props.children,r,i):l(e,t,n,r):null;case xe:return n.key===i?c(e,t,n,r):null}if(va(n)||Fe(n))return null!==i?null:u(e,t,n,r,null);ba(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case be:return e=e.get(null===r.key?n:r.key)||null,r.type===_e?u(t,e,r.props.children,i,r.key):l(t,e,r,i);case xe:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(va(r)||Fe(r))return u(t,e=e.get(n)||null,r,i,null);ba(t,r)}return null}return function(s,l,c,u){var p="object"==typeof c&&null!==c&&c.type===_e&&null===c.key;p&&(c=c.props.children);var m="object"==typeof c&&null!==c;if(m)switch(c.$$typeof){case be:e:{for(m=c.key,p=l;null!==p;){if(p.key===m){switch(p.tag){case 7:if(c.type===_e){n(s,p.sibling),(l=i(p,c.props.children)).return=s,s=l;break e}break;default:if(p.elementType===c.type){n(s,p.sibling),(l=i(p,c.props)).ref=ya(s,p,c),l.return=s,s=l;break e}}n(s,p);break}t(s,p),p=p.sibling}c.type===_e?((l=jc(c.props.children,s.mode,u,c.key)).return=s,s=l):((u=Uc(c.type,c.key,c.props,null,s.mode,u)).ref=ya(s,l,c),u.return=s,s=u)}return a(s);case xe:e:{for(p=c.key;null!==l;){if(l.key===p){if(4===l.tag&&l.stateNode.containerInfo===c.containerInfo&&l.stateNode.implementation===c.implementation){n(s,l.sibling),(l=i(l,c.children||[])).return=s,s=l;break e}n(s,l);break}t(s,l),l=l.sibling}(l=Gc(c,s.mode,u)).return=s,s=l}return a(s)}if("string"==typeof c||"number"==typeof c)return c=""+c,null!==l&&6===l.tag?(n(s,l.sibling),(l=i(l,c)).return=s,s=l):(n(s,l),(l=Wc(c,s.mode,u)).return=s,s=l),a(s);if(va(c))return function(i,a,s,l){for(var c=null,u=null,p=a,m=a=0,g=null;null!==p&&m<s.length;m++){p.index>m?(g=p,p=null):g=p.sibling;var v=h(i,p,s[m],l);if(null===v){null===p&&(p=g);break}e&&p&&null===v.alternate&&t(i,p),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,p=g}if(m===s.length)return n(i,p),c;if(null===p){for(;m<s.length;m++)null!==(p=d(i,s[m],l))&&(a=o(p,a,m),null===u?c=p:u.sibling=p,u=p);return c}for(p=r(i,p);m<s.length;m++)null!==(g=f(p,i,m,s[m],l))&&(e&&null!==g.alternate&&p.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&p.forEach((function(e){return t(i,e)})),c}(s,l,c,u);if(Fe(c))return function(i,a,s,l){var c=Fe(s);if("function"!=typeof c)throw Error(re(150));if(null==(s=c.call(s)))throw Error(re(151));for(var u=c=null,p=a,m=a=0,g=null,v=s.next();null!==p&&!v.done;m++,v=s.next()){p.index>m?(g=p,p=null):g=p.sibling;var y=h(i,p,v.value,l);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(i,p),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y,p=g}if(v.done)return n(i,p),c;if(null===p){for(;!v.done;m++,v=s.next())null!==(v=d(i,v.value,l))&&(a=o(v,a,m),null===u?c=v:u.sibling=v,u=v);return c}for(p=r(i,p);!v.done;m++,v=s.next())null!==(v=f(p,i,m,v.value,l))&&(e&&null!==v.alternate&&p.delete(null===v.key?m:v.key),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v);return e&&p.forEach((function(e){return t(i,e)})),c}(s,l,c,u);if(m&&ba(s,c),void 0===c&&!p)switch(s.tag){case 1:case 22:case 0:case 11:case 15:throw Error(re(152,We(s.type)||"Component"))}return n(s,l)}}var _a=xa(!0),wa=xa(!1),Sa={},Ma=ro(Sa),Ea=ro(Sa),Ta=ro(Sa);function Aa(e){if(e===Sa)throw Error(re(174));return e}function Ca(e,t){switch(oo(Ta,t),oo(Ea,e),oo(Ma,Sa),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:dt(null,"");break;default:t=dt(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}io(Ma),oo(Ma,t)}function ka(){io(Ma),io(Ea),io(Ta)}function Pa(e){Aa(Ta.current);var t=Aa(Ma.current),n=dt(t,e.type);t!==n&&(oo(Ea,e),oo(Ma,n))}function La(e){Ea.current===e&&(io(Ma),io(Ea))}var Ra=ro(0);function Oa(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Da=null,Ia=null,za=!1;function Na(e,t){var n=Bc(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ba(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Fa(e){if(za){var t=Ia;if(t){var n=t;if(!Ba(e,t)){if(!(t=ji(n.nextSibling))||!Ba(e,t))return e.flags=-1025&e.flags|2,za=!1,void(Da=e);Na(Da,n)}Da=e,Ia=ji(t.firstChild)}else e.flags=-1025&e.flags|2,za=!1,Da=e}}function Ha(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Da=e}function Ua(e){if(e!==Da)return!1;if(!za)return Ha(e),za=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Bi(t,e.memoizedProps))for(t=Ia;t;)Na(e,t),t=ji(t.nextSibling);if(Ha(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(re(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ia=ji(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ia=null}}else Ia=Da?ji(e.stateNode.nextSibling):null;return!0}function ja(){Ia=Da=null,za=!1}var Va=[];function Wa(){for(var e=0;e<Va.length;e++)Va[e]._workInProgressVersionPrimary=null;Va.length=0}var Ga=ye.ReactCurrentDispatcher,qa=ye.ReactCurrentBatchConfig,Xa=0,Ya=null,$a=null,Za=null,Ja=!1,Qa=!1;function Ka(){throw Error(re(321))}function es(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ii(e[n],t[n]))return!1;return!0}function ts(e,t,n,r,i,o){if(Xa=o,Ya=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ga.current=null===e||null===e.memoizedState?As:Cs,e=n(r,i),Qa){o=0;do{if(Qa=!1,!(25>o))throw Error(re(301));o+=1,Za=$a=null,t.updateQueue=null,Ga.current=ks,e=n(r,i)}while(Qa)}if(Ga.current=Ts,t=null!==$a&&null!==$a.next,Xa=0,Za=$a=Ya=null,Ja=!1,t)throw Error(re(300));return e}function ns(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Za?Ya.memoizedState=Za=e:Za=Za.next=e,Za}function rs(){if(null===$a){var e=Ya.alternate;e=null!==e?e.memoizedState:null}else e=$a.next;var t=null===Za?Ya.memoizedState:Za.next;if(null!==t)Za=t,$a=e;else{if(null===e)throw Error(re(310));e={memoizedState:($a=e).memoizedState,baseState:$a.baseState,baseQueue:$a.baseQueue,queue:$a.queue,next:null},null===Za?Ya.memoizedState=Za=e:Za=Za.next=e}return Za}function is(e,t){return"function"==typeof t?t(e):t}function os(e){var t=rs(),n=t.queue;if(null===n)throw Error(re(311));n.lastRenderedReducer=e;var r=$a,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var s=a=o=null,l=i;do{var c=l.lane;if((Xa&c)===c)null!==s&&(s=s.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var u={lane:c,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};null===s?(a=s=u,o=r):s=s.next=u,Ya.lanes|=c,Il|=c}l=l.next}while(null!==l&&l!==i);null===s?o=r:s.next=a,ii(r,t.memoizedState)||(Ls=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function as(e){var t=rs(),n=t.queue;if(null===n)throw Error(re(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);ii(o,t.memoizedState)||(Ls=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ss(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Xa&e)===e)&&(t._workInProgressVersionPrimary=r,Va.push(t))),e)return n(t._source);throw Va.push(t),Error(re(350))}function ls(e,t,n,r){var i=Al;if(null===i)throw Error(re(349));var o=t._getVersion,a=o(t._source),s=Ga.current,l=s.useState((function(){return ss(i,t,n)})),c=l[1],u=l[0];l=Za;var d=e.memoizedState,h=d.refs,f=h.getSnapshot,p=d.source;d=d.subscribe;var m=Ya;return e.memoizedState={refs:h,source:t,subscribe:r},s.useEffect((function(){h.getSnapshot=n,h.setSnapshot=c;var e=o(t._source);if(!ii(a,e)){e=n(t._source),ii(u,e)||(c(e),e=sc(m),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,s=e;0<s;){var l=31-jn(s),d=1<<l;r[l]|=e,s&=~d}}}),[n,t,r]),s.useEffect((function(){return r(t._source,(function(){var e=h.getSnapshot,n=h.setSnapshot;try{n(e(t._source));var r=sc(m);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),ii(f,n)&&ii(p,t)&&ii(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:is,lastRenderedState:u}).dispatch=c=Es.bind(null,Ya,e),l.queue=e,l.baseQueue=null,u=ss(i,t,n),l.memoizedState=l.baseState=u),u}function cs(e,t,n){return ls(rs(),e,t,n)}function us(e){var t=ns();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:is,lastRenderedState:e}).dispatch=Es.bind(null,Ya,e),[t.memoizedState,e]}function ds(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Ya.updateQueue)?(t={lastEffect:null},Ya.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function hs(e){return e={current:e},ns().memoizedState=e}function fs(){return rs().memoizedState}function ps(e,t,n,r){var i=ns();Ya.flags|=e,i.memoizedState=ds(1|t,n,void 0,void 0===r?null:r)}function ms(e,t,n,r){var i=rs();r=void 0===r?null:r;var o=void 0;if(null!==$a){var a=$a.memoizedState;if(o=a.destroy,null!==r&&es(r,a.deps))return void ds(t,n,o,r)}Ya.flags|=e,i.memoizedState=ds(1|t,n,o,r)}function gs(e,t){return ps(516,4,e,t)}function vs(e,t){return ms(516,4,e,t)}function ys(e,t){return ms(4,2,e,t)}function bs(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function xs(e,t,n){return n=null!=n?n.concat([e]):null,ms(4,2,bs.bind(null,t,e),n)}function _s(){}function ws(e,t){var n=rs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&es(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ss(e,t){var n=rs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&es(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ms(e,t){var n=Fo();Uo(98>n?98:n,(function(){e(!0)})),Uo(97<n?97:n,(function(){var n=qa.transition;qa.transition=1;try{e(!1),t()}finally{qa.transition=n}}))}function Es(e,t,n){var r=ac(),i=sc(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===Ya||null!==a&&a===Ya)Qa=Ja=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(o.eagerReducer=a,o.eagerState=l,ii(l,s))return}catch(c){}lc(e,i,r)}}var Ts={readContext:ta,useCallback:Ka,useContext:Ka,useEffect:Ka,useImperativeHandle:Ka,useLayoutEffect:Ka,useMemo:Ka,useReducer:Ka,useRef:Ka,useState:Ka,useDebugValue:Ka,useDeferredValue:Ka,useTransition:Ka,useMutableSource:Ka,useOpaqueIdentifier:Ka,unstable_isNewReconciler:!1},As={readContext:ta,useCallback:function(e,t){return ns().memoizedState=[e,void 0===t?null:t],e},useContext:ta,useEffect:gs,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ps(4,2,bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4,2,e,t)},useMemo:function(e,t){var n=ns();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ns();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Es.bind(null,Ya,e),[r.memoizedState,e]},useRef:hs,useState:us,useDebugValue:_s,useDeferredValue:function(e){var t=us(e),n=t[0],r=t[1];return gs((function(){var t=qa.transition;qa.transition=1;try{r(e)}finally{qa.transition=t}}),[e]),n},useTransition:function(){var e=us(!1),t=e[0];return hs(e=Ms.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ns();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ls(r,e,t,n)},useOpaqueIdentifier:function(){if(za){var e=!1,t=function(e){return{$$typeof:Re,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Wi++).toString(36))),Error(re(355))})),n=us(t)[1];return 0==(2&Ya.mode)&&(Ya.flags|=516,ds(5,(function(){n("r:"+(Wi++).toString(36))}),void 0,null)),t}return us(t="r:"+(Wi++).toString(36)),t},unstable_isNewReconciler:!1},Cs={readContext:ta,useCallback:ws,useContext:ta,useEffect:vs,useImperativeHandle:xs,useLayoutEffect:ys,useMemo:Ss,useReducer:os,useRef:fs,useState:function(){return os(is)},useDebugValue:_s,useDeferredValue:function(e){var t=os(is),n=t[0],r=t[1];return vs((function(){var t=qa.transition;qa.transition=1;try{r(e)}finally{qa.transition=t}}),[e]),n},useTransition:function(){var e=os(is)[0];return[fs().current,e]},useMutableSource:cs,useOpaqueIdentifier:function(){return os(is)[0]},unstable_isNewReconciler:!1},ks={readContext:ta,useCallback:ws,useContext:ta,useEffect:vs,useImperativeHandle:xs,useLayoutEffect:ys,useMemo:Ss,useReducer:as,useRef:fs,useState:function(){return as(is)},useDebugValue:_s,useDeferredValue:function(e){var t=as(is),n=t[0],r=t[1];return vs((function(){var t=qa.transition;qa.transition=1;try{r(e)}finally{qa.transition=t}}),[e]),n},useTransition:function(){var e=as(is)[0];return[fs().current,e]},useMutableSource:cs,useOpaqueIdentifier:function(){return as(is)[0]},unstable_isNewReconciler:!1},Ps=ye.ReactCurrentOwner,Ls=!1;function Rs(e,t,n,r){t.child=null===e?wa(t,null,n,r):_a(t,e.child,n,r)}function Os(e,t,n,r,i){n=n.render;var o=t.ref;return ea(t,i),r=ts(e,t,n,r,o,i),null===e||Ls?(t.flags|=1,Rs(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,Ks(e,t,i))}function Ds(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||Fc(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Uc(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Is(e,t,a,r,i,o))}return a=e.child,0==(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:ai)(i,r)&&e.ref===t.ref)?Ks(e,t,o):(t.flags|=1,(e=Hc(a,r)).ref=t.ref,e.return=t,t.child=e)}function Is(e,t,n,r,i,o){if(null!==e&&ai(e.memoizedProps,r)&&e.ref===t.ref){if(Ls=!1,0==(o&i))return t.lanes=e.lanes,Ks(e,t,o);0!=(16384&e.flags)&&(Ls=!0)}return Bs(e,t,n,r,o)}function zs(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},gc(t,n);else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},gc(t,e),null;t.memoizedState={baseLanes:0},gc(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,gc(t,r);return Rs(e,t,i,n),t.child}function Ns(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Bs(e,t,n,r,i){var o=ho(n)?co:so.current;return o=uo(t,o),ea(t,i),n=ts(e,t,n,r,o,i),null===e||Ls?(t.flags|=1,Rs(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,Ks(e,t,i))}function Fs(e,t,n,r,i){if(ho(n)){var o=!0;go(t)}else o=!1;if(ea(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),pa(t,n,r),ga(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=ta(c):c=uo(t,c=ho(n)?co:so.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ma(t,a,r,c),na=!1;var h=t.memoizedState;a.state=h,la(t,r,a,i),l=t.memoizedState,s!==r||h!==l||lo.current||na?("function"==typeof u&&(da(t,n,u,r),l=t.memoizedState),(s=na||fa(t,n,s,r,h,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4)):("function"==typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,ia(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:qo(t.type,s),a.props=c,d=t.pendingProps,h=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=ta(l):l=uo(t,l=ho(n)?co:so.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&ma(t,a,r,l),na=!1,h=t.memoizedState,a.state=h,la(t,r,a,i);var p=t.memoizedState;s!==d||h!==p||lo.current||na?("function"==typeof f&&(da(t,n,f,r),p=t.memoizedState),(c=na||fa(t,n,c,r,h,p,l))?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),r=!1)}return Hs(e,t,n,r,o,i)}function Hs(e,t,n,r,i,o){Ns(e,t);var a=0!=(64&t.flags);if(!r&&!a)return i&&vo(t,n,!1),Ks(e,t,o);r=t.stateNode,Ps.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=_a(t,e.child,null,o),t.child=_a(t,null,s,o)):Rs(e,t,s,o),t.memoizedState=r.state,i&&vo(t,n,!0),t.child}function Us(e){var t=e.stateNode;t.pendingContext?po(0,t.pendingContext,t.pendingContext!==t.context):t.context&&po(0,t.context,!1),Ca(e,t.containerInfo)}var js,Vs,Ws,Gs={dehydrated:null,retryLane:0};function qs(e,t,n){var r,i=t.pendingProps,o=Ra.current,a=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),oo(Ra,1&o),null===e?(void 0!==i.fallback&&Fa(t),e=i.children,o=i.fallback,a?(e=Xs(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Gs,e):"number"==typeof i.unstable_expectedLoadTime?(e=Xs(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Gs,t.lanes=33554432,e):((n=Vc({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=$s(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Gs,i):(n=Ys(e,t,i.children,n),t.memoizedState=null,n))}function Xs(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0==(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Vc(t,i,0,null),n=jc(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function Ys(e,t,n,r){var i=e.child;return e=i.sibling,n=Hc(i,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function $s(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0==(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Hc(a,s),null!==e?r=Hc(e,r):(r=jc(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Zs(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),Ko(e.return,t)}function Js(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function Qs(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Rs(e,t,r.children,n),0!=(2&(r=Ra.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Zs(e,n);else if(19===e.tag)Zs(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oo(Ra,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Oa(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Js(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Oa(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Js(t,!0,n,null,o,t.lastEffect);break;case"together":Js(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Ks(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Il|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(re(153));if(null!==t.child){for(n=Hc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Hc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function el(e,t){if(!za)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function tl(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return ho(t.type)&&fo(),null;case 3:return ka(),io(lo),io(so),Wa(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ua(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:La(t);var i=Aa(Ta.current);if(n=t.type,null!==e&&null!=t.stateNode)Vs(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(re(166));return null}if(e=Aa(Ma.current),Ua(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[qi]=t,r[Xi]=o,n){case"dialog":Mi("cancel",r),Mi("close",r);break;case"iframe":case"object":case"embed":Mi("load",r);break;case"video":case"audio":for(e=0;e<xi.length;e++)Mi(xi[e],r);break;case"source":Mi("error",r);break;case"img":case"image":case"link":Mi("error",r),Mi("load",r);break;case"details":Mi("toggle",r);break;case"input":Je(r,o),Mi("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Mi("invalid",r);break;case"textarea":ot(r,o),Mi("invalid",r)}for(var a in _t(n,o),e=null,o)o.hasOwnProperty(a)&&(i=o[a],"children"===a?"string"==typeof i?r.textContent!==i&&(e=["children",i]):"number"==typeof i&&r.textContent!==""+i&&(e=["children",""+i]):oe.hasOwnProperty(a)&&null!=i&&"onScroll"===a&&Mi("scroll",r));switch(n){case"input":Xe(r),et(r,o,!0);break;case"textarea":Xe(r),st(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Di)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(a=9===i.nodeType?i:i.ownerDocument,e===lt&&(e=ut(n)),e===lt?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[qi]=t,e[Xi]=r,js(e,t),t.stateNode=e,a=wt(n,r),n){case"dialog":Mi("cancel",e),Mi("close",e),i=r;break;case"iframe":case"object":case"embed":Mi("load",e),i=r;break;case"video":case"audio":for(i=0;i<xi.length;i++)Mi(xi[i],e);i=r;break;case"source":Mi("error",e),i=r;break;case"img":case"image":case"link":Mi("error",e),Mi("load",e),i=r;break;case"details":Mi("toggle",e),i=r;break;case"input":Je(e,r),i=Ze(e,r),Mi("invalid",e);break;case"option":i=nt(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=te({},r,{value:void 0}),Mi("invalid",e);break;case"textarea":ot(e,r),i=it(e,r),Mi("invalid",e);break;default:i=r}_t(n,i);var s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];"style"===o?bt(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&pt(e,l):"children"===o?"string"==typeof l?("textarea"!==n||""!==l)&&mt(e,l):"number"==typeof l&&mt(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(oe.hasOwnProperty(o)?null!=l&&"onScroll"===o&&Mi("scroll",e):null!=l&&ve(e,o,l,a))}switch(n){case"input":Xe(e),et(e,r,!1);break;case"textarea":Xe(e),st(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Ge(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?rt(e,!!r.multiple,o,!1):null!=r.defaultValue&&rt(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Di)}Ni(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ws(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(re(166));n=Aa(Ta.current),Aa(Ma.current),Ua(t)?(r=t.stateNode,n=t.memoizedProps,r[qi]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[qi]=t,t.stateNode=r)}return null;case 13:return io(Ra),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Ua(t):n=null!==e.memoizedState,r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ra.current)?0===Rl&&(Rl=3):(0!==Rl&&3!==Rl||(Rl=4),null===Al||0==(134217727&Il)&&0==(134217727&zl)||hc(Al,kl))),(r||n)&&(t.flags|=4),null);case 4:return ka(),null===e&&Ti(t.stateNode.containerInfo),null;case 10:return Qo(t),null;case 17:return ho(t.type)&&fo(),null;case 19:if(io(Ra),null===(r=t.memoizedState))return null;if(o=0!=(64&t.flags),null===(a=r.rendering))if(o)el(r,!1);else{if(0!==Rl||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(a=Oa(e))){for(t.flags|=64,el(r,!1),null!==(o=a.updateQueue)&&(t.updateQueue=o,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(a=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oo(Ra,1&Ra.current|2),t.child}e=e.sibling}null!==r.tail&&Bo()>Hl&&(t.flags|=64,o=!0,el(r,!1),t.lanes=33554432)}else{if(!o)if(null!==(e=Oa(a))){if(t.flags|=64,o=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),el(r,!0),null===r.tail&&"hidden"===r.tailMode&&!a.alternate&&!za)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Bo()-r.renderingStartTime>Hl&&1073741824!==n&&(t.flags|=64,o=!0,el(r,!1),t.lanes=33554432);r.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=r.last)?n.sibling=a:t.child=a,r.last=a)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Bo(),n.sibling=null,t=Ra.current,oo(Ra,o?1&t|2:1&t),n):null;case 23:case 24:return vc(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(re(156,t.tag))}function nl(e){switch(e.tag){case 1:ho(e.type)&&fo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(ka(),io(lo),io(so),Wa(),0!=(64&(t=e.flags)))throw Error(re(285));return e.flags=-4097&t|64,e;case 5:return La(e),null;case 13:return io(Ra),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return io(Ra),null;case 4:return ka(),null;case 10:return Qo(e),null;case 23:case 24:return vc(),null;default:return null}}function rl(e,t){try{var n="",r=t;do{n+=Ve(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i}}function il(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}js=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Vs=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Aa(Ma.current);var o,a=null;switch(n){case"input":i=Ze(e,i),r=Ze(e,r),a=[];break;case"option":i=nt(e,i),r=nt(e,r),a=[];break;case"select":i=te({},i,{value:void 0}),r=te({},r,{value:void 0}),a=[];break;case"textarea":i=it(e,i),r=it(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Di)}for(c in _t(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(oe.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(a||(a=[]),a.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(oe.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&Mi("scroll",e),a||s===l||(a=[])):"object"==typeof l&&null!==l&&l.$$typeof===Re?l.toString():(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Ws=function(e,t,n,r){n!==r&&(t.flags|=4)};var ol="function"==typeof WeakMap?WeakMap:Map;function al(e,t,n){(n=oa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wl||(Wl=!0,Gl=r),il(0,t)},n}function sl(e,t,n){(n=oa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return il(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===ql?ql=new Set([this]):ql.add(this),il(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var ll="function"==typeof WeakSet?WeakSet:Set;function cl(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(n){Dc(e,n)}else t.current=null}function ul(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:qo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Ui(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(re(163))}function dl(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!=(4&(i=i.tag))&&0!=(1&i)&&(Lc(n,e),Pc(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:qo(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&ca(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}ca(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Ni(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xn(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(re(163))}function hl(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=null!=i&&i.hasOwnProperty("display")?i.display:null,r.style.display=yt("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function fl(e,t){if(bo&&"function"==typeof bo.onCommitFiberUnmount)try{bo.onCommitFiberUnmount(yo,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!=(4&r))Lc(t,n);else{r=t;try{i()}catch(o){Dc(r,o)}}n=n.next}while(n!==e)}break;case 1:if(cl(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){Dc(t,o)}break;case 5:cl(t);break;case 4:bl(e,t)}}function pl(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ml(e){return 5===e.tag||3===e.tag||4===e.tag}function gl(e){e:{for(var t=e.return;null!==t;){if(ml(t))break e;t=t.return}throw Error(re(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(re(161))}16&n.flags&&(mt(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ml(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?vl(e,n,t):yl(e,n,t)}function vl(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Di));else if(4!==r&&null!==(e=e.child))for(vl(e,t,n),e=e.sibling;null!==e;)vl(e,t,n),e=e.sibling}function yl(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(yl(e,t,n),e=e.sibling;null!==e;)yl(e,t,n),e=e.sibling}function bl(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(re(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var a=e,s=i,l=s;;)if(fl(a,l),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===s)break e;for(;null===l.sibling;){if(null===l.return||l.return===s)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}r?(a=n,s=i.stateNode,8===a.nodeType?a.parentNode.removeChild(s):a.removeChild(s)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(fl(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function xl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Xi]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Qe(n,r),wt(e,i),t=wt(e,r),i=0;i<o.length;i+=2){var a=o[i],s=o[i+1];"style"===a?bt(n,s):"dangerouslySetInnerHTML"===a?pt(n,s):"children"===a?mt(n,s):ve(n,a,s,t)}switch(e){case"input":Ke(n,r);break;case"textarea":at(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?rt(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?rt(n,!!r.multiple,r.defaultValue,!0):rt(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(re(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,xn(n.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(Fl=Bo(),hl(t.child,!0)),void _l(t);case 19:return void _l(t);case 17:return;case 23:case 24:return void hl(t,null!==t.memoizedState)}throw Error(re(163))}function _l(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ll),t.forEach((function(t){var r=zc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function wl(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Sl=Math.ceil,Ml=ye.ReactCurrentDispatcher,El=ye.ReactCurrentOwner,Tl=0,Al=null,Cl=null,kl=0,Pl=0,Ll=ro(0),Rl=0,Ol=null,Dl=0,Il=0,zl=0,Nl=0,Bl=null,Fl=0,Hl=1/0;function Ul(){Hl=Bo()+500}var jl,Vl=null,Wl=!1,Gl=null,ql=null,Xl=!1,Yl=null,$l=90,Zl=[],Jl=[],Ql=null,Kl=0,ec=null,tc=-1,nc=0,rc=0,ic=null,oc=!1;function ac(){return 0!=(48&Tl)?Bo():-1!==tc?tc:tc=Bo()}function sc(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===Fo()?1:2;if(0===nc&&(nc=Dl),0!==Go.transition){0!==rc&&(rc=null!==Bl?Bl.pendingLanes:0),e=nc;var t=4186112&~rc;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Fo(),0!=(4&Tl)&&98===e?e=Bn(12,nc):e=Bn(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),nc),e}function lc(e,t,n){if(50<Kl)throw Kl=0,ec=null,Error(re(185));if(null===(e=cc(e,t)))return null;Un(e,t,n),e===Al&&(zl|=t,4===Rl&&hc(e,kl));var r=Fo();1===t?0!=(8&Tl)&&0==(48&Tl)?fc(e):(uc(e,n),0===Tl&&(Ul(),Vo())):(0==(4&Tl)||98!==r&&99!==r||(null===Ql?Ql=new Set([e]):Ql.add(e)),uc(e,n)),Bl=e}function cc(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function uc(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var s=31-jn(a),l=1<<s,c=o[s];if(-1===c){if(0==(l&r)||0!=(l&i)){c=t,In(l);var u=Dn;o[s]=10<=u?c+250:6<=u?c+5e3:-1}}else c<=t&&(e.expiredLanes|=l);a&=~l}if(r=zn(e,e===Al?kl:0),t=Dn,0===r)null!==n&&(n!==Ro&&wo(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Ro&&wo(n)}15===t?(n=fc.bind(null,e),null===Do?(Do=[n],Io=_o(Ao,Wo)):Do.push(n),n=Ro):14===t?n=jo(99,fc.bind(null,e)):n=jo(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(re(358,e))}}(t),dc.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function dc(e){if(tc=-1,rc=nc=0,0!=(48&Tl))throw Error(re(327));var t=e.callbackNode;if(kc()&&e.callbackNode!==t)return null;var n=zn(e,e===Al?kl:0);if(0===n)return null;var r=n,i=Tl;Tl|=16;var o=xc();for(Al===e&&kl===r||(Ul(),yc(e,r));;)try{Sc();break}catch(s){bc(e,s)}if(Jo(),Ml.current=o,Tl=i,null!==Cl?r=0:(Al=null,kl=0,r=Rl),0!=(Dl&zl))yc(e,0);else if(0!==r){if(2===r&&(Tl|=64,e.hydrate&&(e.hydrate=!1,Ui(e.containerInfo)),0!==(n=Nn(e))&&(r=_c(e,n))),1===r)throw t=Ol,yc(e,0),hc(e,n),uc(e,Bo()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(re(345));case 2:Tc(e);break;case 3:if(hc(e,n),(62914560&n)===n&&10<(r=Fl+500-Bo())){if(0!==zn(e,0))break;if(((i=e.suspendedLanes)&n)!==n){ac(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Fi(Tc.bind(null,e),r);break}Tc(e);break;case 4:if(hc(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var a=31-jn(n);o=1<<a,(a=r[a])>i&&(i=a),n&=~o}if(n=i,10<(n=(120>(n=Bo()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Sl(n/1960))-n)){e.timeoutHandle=Fi(Tc.bind(null,e),n);break}Tc(e);break;case 5:Tc(e);break;default:throw Error(re(329))}}return uc(e,Bo()),e.callbackNode===t?dc.bind(null,e):null}function hc(e,t){for(t&=~Nl,t&=~zl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-jn(t),r=1<<n;e[n]=-1,t&=~r}}function fc(e){if(0!=(48&Tl))throw Error(re(327));if(kc(),e===Al&&0!=(e.expiredLanes&kl)){var t=kl,n=_c(e,t);0!=(Dl&zl)&&(n=_c(e,t=zn(e,t)))}else n=_c(e,t=zn(e,0));if(0!==e.tag&&2===n&&(Tl|=64,e.hydrate&&(e.hydrate=!1,Ui(e.containerInfo)),0!==(t=Nn(e))&&(n=_c(e,t))),1===n)throw n=Ol,yc(e,0),hc(e,t),uc(e,Bo()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tc(e),uc(e,Bo()),null}function pc(e,t){var n=Tl;Tl|=1;try{return e(t)}finally{0===(Tl=n)&&(Ul(),Vo())}}function mc(e,t){var n=Tl;Tl&=-2,Tl|=8;try{return e(t)}finally{0===(Tl=n)&&(Ul(),Vo())}}function gc(e,t){oo(Ll,Pl),Pl|=t,Dl|=t}function vc(){Pl=Ll.current,io(Ll)}function yc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Hi(n)),null!==Cl)for(n=Cl.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&fo();break;case 3:ka(),io(lo),io(so),Wa();break;case 5:La(r);break;case 4:ka();break;case 13:case 19:io(Ra);break;case 10:Qo(r);break;case 23:case 24:vc()}n=n.return}Al=e,Cl=Hc(e.current,null),kl=Pl=Dl=t,Rl=0,Ol=null,Nl=zl=Il=0}function bc(e,t){for(;;){var n=Cl;try{if(Jo(),Ga.current=Ts,Ja){for(var r=Ya.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}Ja=!1}if(Xa=0,Za=$a=Ya=null,Qa=!1,El.current=null,null===n||null===n.return){Rl=1,Ol=t,Cl=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=kl,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l;if(0==(2&s.mode)){var u=s.alternate;u?(s.updateQueue=u.updateQueue,s.memoizedState=u.memoizedState,s.lanes=u.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=0!=(1&Ra.current),h=a;do{var f;if(f=13===h.tag){var p=h.memoizedState;if(null!==p)f=null!==p.dehydrated;else{var m=h.memoizedProps;f=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(f){var g=h.updateQueue;if(null===g){var v=new Set;v.add(c),h.updateQueue=v}else g.add(c);if(0==(2&h.mode)){if(h.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=oa(-1,1);y.tag=2,aa(s,y)}s.lanes|=1;break e}l=void 0,s=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new ol,l=new Set,b.set(c,l)):void 0===(l=b.get(c))&&(l=new Set,b.set(c,l)),!l.has(s)){l.add(s);var x=Ic.bind(null,o,c,s);c.then(x,x)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(null!==h);l=Error((We(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Rl&&(Rl=2),l=rl(l,s),h=a;do{switch(h.tag){case 3:o=l,h.flags|=4096,t&=-t,h.lanes|=t,sa(h,al(0,o,t));break e;case 1:o=l;var _=h.type,w=h.stateNode;if(0==(64&h.flags)&&("function"==typeof _.getDerivedStateFromError||null!==w&&"function"==typeof w.componentDidCatch&&(null===ql||!ql.has(w)))){h.flags|=4096,t&=-t,h.lanes|=t,sa(h,sl(h,o,t));break e}}h=h.return}while(null!==h)}Ec(n)}catch(S){t=S,Cl===n&&null!==n&&(Cl=n=n.return);continue}break}}function xc(){var e=Ml.current;return Ml.current=Ts,null===e?Ts:e}function _c(e,t){var n=Tl;Tl|=16;var r=xc();for(Al===e&&kl===t||yc(e,t);;)try{wc();break}catch(i){bc(e,i)}if(Jo(),Tl=n,Ml.current=r,null!==Cl)throw Error(re(261));return Al=null,kl=0,Rl}function wc(){for(;null!==Cl;)Mc(Cl)}function Sc(){for(;null!==Cl&&!So();)Mc(Cl)}function Mc(e){var t=jl(e.alternate,e,Pl);e.memoizedProps=e.pendingProps,null===t?Ec(e):Cl=t,El.current=null}function Ec(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=tl(n,t,Pl)))return void(Cl=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Pl)||0==(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=nl(t)))return n.flags&=2047,void(Cl=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Cl=t);Cl=t=e}while(null!==t);0===Rl&&(Rl=5)}function Tc(e){var t=Fo();return Uo(99,Ac.bind(null,e,t)),null}function Ac(e,t){do{kc()}while(null!==Yl);if(0!=(48&Tl))throw Error(re(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(re(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var a=e.eventTimes,s=e.expirationTimes;0<o;){var l=31-jn(o),c=1<<l;i[l]=0,a[l]=-1,s[l]=-1,o&=~c}if(null!==Ql&&0==(24&r)&&Ql.has(e)&&Ql.delete(e),e===Al&&(Cl=Al=null,kl=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Tl,Tl|=32,El.current=null,Ii=Xn,di(a=ui())){if("selectionStart"in a)s={start:a.selectionStart,end:a.selectionEnd};else e:if(s=(s=a.ownerDocument)&&s.defaultView||window,(c=s.getSelection&&s.getSelection())&&0!==c.rangeCount){s=c.anchorNode,o=c.anchorOffset,l=c.focusNode,c=c.focusOffset;try{s.nodeType,l.nodeType}catch(E){s=null;break e}var u=0,d=-1,h=-1,f=0,p=0,m=a,g=null;t:for(;;){for(var v;m!==s||0!==o&&3!==m.nodeType||(d=u+o),m!==l||0!==c&&3!==m.nodeType||(h=u+c),3===m.nodeType&&(u+=m.nodeValue.length),null!==(v=m.firstChild);)g=m,m=v;for(;;){if(m===a)break t;if(g===s&&++f===o&&(d=u),g===l&&++p===c&&(h=u),null!==(v=m.nextSibling))break;g=(m=g).parentNode}m=v}s=-1===d||-1===h?null:{start:d,end:h}}else s=null;s=s||{start:0,end:0}}else s=null;zi={focusedElem:a,selectionRange:s},Xn=!1,ic=null,oc=!1,Vl=r;do{try{Cc()}catch(E){if(null===Vl)throw Error(re(330));Dc(Vl,E),Vl=Vl.nextEffect}}while(null!==Vl);ic=null,Vl=r;do{try{for(a=e;null!==Vl;){var y=Vl.flags;if(16&y&&mt(Vl.stateNode,""),128&y){var b=Vl.alternate;if(null!==b){var x=b.ref;null!==x&&("function"==typeof x?x(null):x.current=null)}}switch(1038&y){case 2:gl(Vl),Vl.flags&=-3;break;case 6:gl(Vl),Vl.flags&=-3,xl(Vl.alternate,Vl);break;case 1024:Vl.flags&=-1025;break;case 1028:Vl.flags&=-1025,xl(Vl.alternate,Vl);break;case 4:xl(Vl.alternate,Vl);break;case 8:bl(a,s=Vl);var _=s.alternate;pl(s),null!==_&&pl(_)}Vl=Vl.nextEffect}}catch(E){if(null===Vl)throw Error(re(330));Dc(Vl,E),Vl=Vl.nextEffect}}while(null!==Vl);if(x=zi,b=ui(),y=x.focusedElem,a=x.selectionRange,b!==y&&y&&y.ownerDocument&&ci(y.ownerDocument.documentElement,y)){null!==a&&di(y)&&(b=a.start,void 0===(x=a.end)&&(x=b),"selectionStart"in y?(y.selectionStart=b,y.selectionEnd=Math.min(x,y.value.length)):(x=(b=y.ownerDocument||document)&&b.defaultView||window).getSelection&&(x=x.getSelection(),s=y.textContent.length,_=Math.min(a.start,s),a=void 0===a.end?_:Math.min(a.end,s),!x.extend&&_>a&&(s=a,a=_,_=s),s=li(y,_),o=li(y,a),s&&o&&(1!==x.rangeCount||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==o.node||x.focusOffset!==o.offset)&&((b=b.createRange()).setStart(s.node,s.offset),x.removeAllRanges(),_>a?(x.addRange(b),x.extend(o.node,o.offset)):(b.setEnd(o.node,o.offset),x.addRange(b))))),b=[];for(x=y;x=x.parentNode;)1===x.nodeType&&b.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof y.focus&&y.focus(),y=0;y<b.length;y++)(x=b[y]).element.scrollLeft=x.left,x.element.scrollTop=x.top}Xn=!!Ii,zi=Ii=null,e.current=n,Vl=r;do{try{for(y=e;null!==Vl;){var w=Vl.flags;if(36&w&&dl(y,Vl.alternate,Vl),128&w){b=void 0;var S=Vl.ref;if(null!==S){var M=Vl.stateNode;switch(Vl.tag){case 5:b=M;break;default:b=M}"function"==typeof S?S(b):S.current=b}}Vl=Vl.nextEffect}}catch(E){if(null===Vl)throw Error(re(330));Dc(Vl,E),Vl=Vl.nextEffect}}while(null!==Vl);Vl=null,Oo(),Tl=i}else e.current=n;if(Xl)Xl=!1,Yl=e,$l=t;else for(Vl=r;null!==Vl;)t=Vl.nextEffect,Vl.nextEffect=null,8&Vl.flags&&((w=Vl).sibling=null,w.stateNode=null),Vl=t;if(0===(r=e.pendingLanes)&&(ql=null),1===r?e===ec?Kl++:(Kl=0,ec=e):Kl=0,n=n.stateNode,bo&&"function"==typeof bo.onCommitFiberRoot)try{bo.onCommitFiberRoot(yo,n,void 0,64==(64&n.current.flags))}catch(E){}if(uc(e,Bo()),Wl)throw Wl=!1,e=Gl,Gl=null,e;return 0!=(8&Tl)||Vo(),null}function Cc(){for(;null!==Vl;){var e=Vl.alternate;oc||null===ic||(0!=(8&Vl.flags)?Jt(Vl,ic)&&(oc=!0):13===Vl.tag&&wl(e,Vl)&&Jt(Vl,ic)&&(oc=!0));var t=Vl.flags;0!=(256&t)&&ul(e,Vl),0==(512&t)||Xl||(Xl=!0,jo(97,(function(){return kc(),null}))),Vl=Vl.nextEffect}}function kc(){if(90!==$l){var e=97<$l?97:$l;return $l=90,Uo(e,Rc)}return!1}function Pc(e,t){Zl.push(t,e),Xl||(Xl=!0,jo(97,(function(){return kc(),null})))}function Lc(e,t){Jl.push(t,e),Xl||(Xl=!0,jo(97,(function(){return kc(),null})))}function Rc(){if(null===Yl)return!1;var e=Yl;if(Yl=null,0!=(48&Tl))throw Error(re(331));var t=Tl;Tl|=32;var n=Jl;Jl=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],a=i.destroy;if(i.destroy=void 0,"function"==typeof a)try{a()}catch(l){if(null===o)throw Error(re(330));Dc(o,l)}}for(n=Zl,Zl=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var s=i.create;i.destroy=s()}catch(l){if(null===o)throw Error(re(330));Dc(o,l)}}for(s=e.current.firstEffect;null!==s;)e=s.nextEffect,s.nextEffect=null,8&s.flags&&(s.sibling=null,s.stateNode=null),s=e;return Tl=t,Vo(),!0}function Oc(e,t,n){aa(e,t=al(0,t=rl(n,t),1)),t=ac(),null!==(e=cc(e,1))&&(Un(e,1,t),uc(e,t))}function Dc(e,t){if(3===e.tag)Oc(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Oc(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ql||!ql.has(r))){var i=sl(n,e=rl(t,e),1);if(aa(n,i),i=ac(),null!==(n=cc(n,1)))Un(n,1,i),uc(n,i);else if("function"==typeof r.componentDidCatch&&(null===ql||!ql.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function Ic(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ac(),e.pingedLanes|=e.suspendedLanes&n,Al===e&&(kl&n)===n&&(4===Rl||3===Rl&&(62914560&kl)===kl&&500>Bo()-Fl?yc(e,0):Nl|=n),uc(e,t)}function zc(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Fo()?1:2:(0===nc&&(nc=Dl),0===(t=Fn(62914560&~nc))&&(t=4194304))),n=ac(),null!==(e=cc(e,t))&&(Un(e,t,n),uc(e,n))}function Nc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Bc(e,t,n,r){return new Nc(e,t,n,r)}function Fc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Hc(e,t){var n=e.alternate;return null===n?((n=Bc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Uc(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)Fc(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case _e:return jc(n.children,i,o,t);case Oe:a=8,i|=16;break;case we:a=8,i|=1;break;case Se:return(e=Bc(12,n,t,8|i)).elementType=Se,e.type=Se,e.lanes=o,e;case Ae:return(e=Bc(13,n,t,i)).type=Ae,e.elementType=Ae,e.lanes=o,e;case Ce:return(e=Bc(19,n,t,i)).elementType=Ce,e.lanes=o,e;case De:return Vc(n,i,o,t);case Ie:return(e=Bc(24,n,t,i)).elementType=Ie,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Me:a=10;break e;case Ee:a=9;break e;case Te:a=11;break e;case ke:a=14;break e;case Pe:a=16,r=null;break e;case Le:a=22;break e}throw Error(re(130,null==e?e:typeof e,""))}return(t=Bc(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function jc(e,t,n,r){return(e=Bc(7,e,r,t)).lanes=n,e}function Vc(e,t,n,r){return(e=Bc(23,e,r,t)).elementType=De,e.lanes=n,e}function Wc(e,t,n){return(e=Bc(6,e,null,t)).lanes=n,e}function Gc(e,t,n){return(t=Bc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qc(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Hn(0),this.expirationTimes=Hn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hn(0),this.mutableSourceEagerHydrationData=null}function Xc(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:xe,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Yc(e,t,n,r){var i=t.current,o=ac(),a=sc(i);e:if(n){t:{if(Xt(n=n._reactInternals)!==n||1!==n.tag)throw Error(re(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(ho(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw Error(re(171))}if(1===n.tag){var l=n.type;if(ho(l)){n=mo(n,l,s);break e}}n=s}else n=ao;return null===t.context?t.context=n:t.pendingContext=n,(t=oa(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),aa(i,t),lc(i,a,o),a}function $c(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Zc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Jc(e,t){Zc(e,t),(e=e.alternate)&&Zc(e,t)}function Qc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new qc(e,t,null!=n&&!0===n.hydrate),t=Bc(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,ra(t),e[Yi]=n.current,Ti(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function Kc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function eu(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"==typeof i){var s=i;i=function(){var e=$c(a);s.call(e)}}Yc(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Qc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"==typeof i){var l=i;i=function(){var e=$c(a);l.call(e)}}mc((function(){Yc(t,a,e,i)}))}return $c(a)}function tu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Kc(t))throw Error(re(200));return Xc(e,t,null,n)}jl=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||lo.current)Ls=!0;else{if(0==(n&r)){switch(Ls=!1,t.tag){case 3:Us(t),ja();break;case 5:Pa(t);break;case 1:ho(t.type)&&go(t);break;case 4:Ca(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;oo(Xo,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?qs(e,t,n):(oo(Ra,1&Ra.current),null!==(t=Ks(e,t,n))?t.sibling:null);oo(Ra,1&Ra.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return Qs(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),oo(Ra,Ra.current),r)break;return null;case 23:case 24:return t.lanes=0,zs(e,t,n)}return Ks(e,t,n)}Ls=0!=(16384&e.flags)}else Ls=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=uo(t,so.current),ea(t,n),i=ts(null,t,r,e,i,n),t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ho(r)){var o=!0;go(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,ra(t);var a=r.getDerivedStateFromProps;"function"==typeof a&&da(t,r,a,e),i.updater=ha,t.stateNode=i,i._reactInternals=t,ga(t,r,e,n),t=Hs(null,t,r,!0,o,n)}else t.tag=0,Rs(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return Fc(e)?1:0;if(null!=e){if((e=e.$$typeof)===Te)return 11;if(e===ke)return 14}return 2}(i),e=qo(i,e),o){case 0:t=Bs(null,t,i,e,n);break e;case 1:t=Fs(null,t,i,e,n);break e;case 11:t=Os(null,t,i,e,n);break e;case 14:t=Ds(null,t,i,qo(i.type,e),r,n);break e}throw Error(re(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Bs(e,t,r,i=t.elementType===r?i:qo(r,i),n);case 1:return r=t.type,i=t.pendingProps,Fs(e,t,r,i=t.elementType===r?i:qo(r,i),n);case 3:if(Us(t),r=t.updateQueue,null===e||null===r)throw Error(re(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,ia(e,t),la(t,r,null,n),(r=t.memoizedState.element)===i)ja(),t=Ks(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(Ia=ji(t.stateNode.containerInfo.firstChild),Da=t,o=za=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],Va.push(o);for(n=wa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Rs(e,t,r,n),ja();t=t.child}return t;case 5:return Pa(t),null===e&&Fa(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,Bi(r,i)?a=null:null!==o&&Bi(r,o)&&(t.flags|=16),Ns(e,t),Rs(e,t,a,n),t.child;case 6:return null===e&&Fa(t),null;case 13:return qs(e,t,n);case 4:return Ca(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=_a(t,null,r,n):Rs(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Os(e,t,r,i=t.elementType===r?i:qo(r,i),n);case 7:return Rs(e,t,t.pendingProps,n),t.child;case 8:case 12:return Rs(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value;var s=t.type._context;if(oo(Xo,s._currentValue),s._currentValue=o,null!==a)if(s=a.value,0===(o=ii(s,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,o):1073741823))){if(a.children===i.children&&!lo.current){t=Ks(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.dependencies;if(null!==l){a=s.child;for(var c=l.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&o)){1===s.tag&&((c=oa(-1,n&-n)).tag=2,aa(s,c)),s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),Ko(s.return,n),l.lanes|=n;break}c=c.next}}else a=10===s.tag&&s.type===t.type?null:s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}Rs(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,ea(t,n),r=r(i=ta(i,o.unstable_observedBits)),t.flags|=1,Rs(e,t,r,n),t.child;case 14:return o=qo(i=t.type,t.pendingProps),Ds(e,t,i,o=qo(i.type,o),r,n);case 15:return Is(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qo(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,ho(r)?(e=!0,go(t)):e=!1,ea(t,n),pa(t,r,i),ga(t,r,i,n),Hs(null,t,r,!0,e,n);case 19:return Qs(e,t,n);case 23:case 24:return zs(e,t,n)}throw Error(re(156,t.tag))},Qc.prototype.render=function(e){Yc(e,this._internalRoot,null,null)},Qc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Yc(null,e,null,(function(){t[Yi]=null}))},Qt=function(e){13===e.tag&&(lc(e,4,ac()),Jc(e,4))},Kt=function(e){13===e.tag&&(lc(e,67108864,ac()),Jc(e,67108864))},en=function(e){if(13===e.tag){var t=ac(),n=sc(e);lc(e,n,t),Jc(e,n)}},tn=function(e,t){return t()},Mt=function(e,t,n){switch(t){case"input":if(Ke(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Ki(r);if(!i)throw Error(re(90));Ye(r),Ke(r,i)}}}break;case"textarea":at(e,n);break;case"select":null!=(t=n.value)&&rt(e,!!n.multiple,t,!1)}},Pt=pc,Lt=function(e,t,n,r,i){var o=Tl;Tl|=4;try{return Uo(98,e.bind(null,t,n,r,i))}finally{0===(Tl=o)&&(Ul(),Vo())}},Rt=function(){0==(49&Tl)&&(function(){if(null!==Ql){var e=Ql;Ql=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,uc(e,Bo())}))}Vo()}(),kc())},Ot=function(e,t){var n=Tl;Tl|=2;try{return e(t)}finally{0===(Tl=n)&&(Ul(),Vo())}};var nu={Events:[Ji,Qi,Ki,Ct,kt,kc,{current:!1}]},ru={findFiberByHostInstance:Zi,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},iu={bundleType:ru.bundleType,version:ru.version,rendererPackageName:ru.rendererPackageName,rendererConfig:ru.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ye.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Zt(e))?null:e.stateNode},findFiberByHostInstance:ru.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{yo=ou.inject(iu),bo=ou}catch(ft){}}J.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nu,J.createPortal=tu,J.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(re(188));throw Error(re(268,Object.keys(e)))}return e=null===(e=Zt(t))?null:e.stateNode},J.flushSync=function(e,t){var n=Tl;if(0!=(48&n))return e(t);Tl|=1;try{if(e)return Uo(99,e.bind(null,t))}finally{Tl=n,Vo()}},J.hydrate=function(e,t,n){if(!Kc(t))throw Error(re(200));return eu(null,e,t,!0,n)},J.render=function(e,t,n){if(!Kc(t))throw Error(re(200));return eu(null,e,t,!1,n)},J.unmountComponentAtNode=function(e){if(!Kc(e))throw Error(re(40));return!!e._reactRootContainer&&(mc((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[Yi]=null}))})),!0)},J.unstable_batchedUpdates=pc,J.unstable_createPortal=function(e,t){return tu(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},J.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Kc(n))throw Error(re(200));if(null==e||void 0===e._reactInternals)throw Error(re(38));return eu(e,t,n,!1,r)},J.version="17.0.2",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),Z.exports=J;var au=Z.exports;var su=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),lu="-ms-",cu="-moz-",uu="-webkit-",du=Math.abs,hu=String.fromCharCode;function fu(e){return e.trim()}function pu(e,t,n){return e.replace(t,n)}function mu(e,t){return e.indexOf(t)}function gu(e,t){return 0|e.charCodeAt(t)}function vu(e,t,n){return e.slice(t,n)}function yu(e){return e.length}function bu(e){return e.length}function xu(e,t){return t.push(e),e}var _u=1,wu=1,Su=0,Mu=0,Eu=0,Tu="";function Au(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:_u,column:wu,length:a,return:""}}function Cu(e,t,n){return Au(e,t.root,t.parent,n,t.props,t.children,0)}function ku(){return Eu=Mu<Su?gu(Tu,Mu++):0,wu++,10===Eu&&(wu=1,_u++),Eu}function Pu(){return gu(Tu,Mu)}function Lu(){return Mu}function Ru(e,t){return vu(Tu,e,t)}function Ou(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Du(e){return _u=wu=1,Su=yu(Tu=e),Mu=0,[]}function Iu(e){return Tu="",e}function zu(e){return fu(Ru(Mu-1,Fu(91===e?e+2:40===e?e+1:e)))}function Nu(e){for(;(Eu=Pu())&&Eu<33;)ku();return Ou(e)>2||Ou(Eu)>3?"":" "}function Bu(e,t){for(;--t&&ku()&&!(Eu<48||Eu>102||Eu>57&&Eu<65||Eu>70&&Eu<97););return Ru(e,Lu()+(t<6&&32==Pu()&&32==ku()))}function Fu(e){for(;ku();)switch(Eu){case e:return Mu;case 34:case 39:return Fu(34===e||39===e?e:Eu);case 40:41===e&&Fu(e);break;case 92:ku()}return Mu}function Hu(e,t){for(;ku()&&e+Eu!==57&&(e+Eu!==84||47!==Pu()););return"/*"+Ru(t,Mu-1)+"*"+hu(47===e?e:ku())}function Uu(e){for(;!Ou(Pu());)ku();return Ru(e,Mu)}function ju(e){return Iu(Vu("",null,null,null,[""],e=Du(e),0,[0],e))}function Vu(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,h=0,f=0,p=0,m=1,g=1,v=1,y=0,b="",x=i,_=o,w=r,S=b;g;)switch(p=y,y=ku()){case 34:case 39:case 91:case 40:S+=zu(y);break;case 9:case 10:case 13:case 32:S+=Nu(p);break;case 92:S+=Bu(Lu()-1,7);continue;case 47:switch(Pu()){case 42:case 47:xu(Gu(Hu(ku(),Lu()),t,n),l);break;default:S+="/"}break;case 123*m:s[c++]=yu(S)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+u:f>0&&yu(S)-d&&xu(f>32?qu(S+";",r,n,d-1):qu(pu(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(xu(w=Wu(S,t,n,c,u,i,s,b,x=[],_=[],d),o),123===y)if(0===u)Vu(S,t,w,w,x,o,d,s,_);else switch(h){case 100:case 109:case 115:Vu(e,w,w,r&&xu(Wu(e,w,w,0,0,i,s,b,i,x=[],d),_),i,_,d,s,r?x:_);break;default:Vu(S,w,w,w,[""],_,d,s,_)}}c=u=f=0,m=v=1,b=S="",d=a;break;case 58:d=1+yu(S),f=p;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==(Eu=Mu>0?gu(Tu,--Mu):0,wu--,10===Eu&&(wu=1,_u--),Eu))continue;switch(S+=hu(y),y*m){case 38:v=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(yu(S)-1)*v,v=1;break;case 64:45===Pu()&&(S+=zu(ku())),h=Pu(),u=yu(b=S+=Uu(Lu())),y++;break;case 45:45===p&&2==yu(S)&&(m=0)}}return o}function Wu(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,h=0===i?o:[""],f=bu(h),p=0,m=0,g=0;p<r;++p)for(var v=0,y=vu(e,d+1,d=du(m=a[p])),b=e;v<f;++v)(b=fu(m>0?h[v]+" "+y:pu(y,/&\f/g,h[v])))&&(l[g++]=b);return Au(e,t,n,0===i?"rule":s,l,c,u)}function Gu(e,t,n){return Au(e,t,n,"comm",hu(Eu),vu(e,2,-2),0)}function qu(e,t,n,r){return Au(e,t,n,"decl",vu(e,0,r),vu(e,r+1,-1),r)}function Xu(e,t){switch(function(e,t){return(((t<<2^gu(e,0))<<2^gu(e,1))<<2^gu(e,2))<<2^gu(e,3)}(e,t)){case 5103:return uu+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return uu+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return uu+e+cu+e+lu+e+e;case 6828:case 4268:return uu+e+lu+e+e;case 6165:return uu+e+lu+"flex-"+e+e;case 5187:return uu+e+pu(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return uu+e+lu+"flex-item-"+pu(e,/flex-|-self/,"")+e;case 4675:return uu+e+lu+"flex-line-pack"+pu(e,/align-content|flex-|-self/,"")+e;case 5548:return uu+e+lu+pu(e,"shrink","negative")+e;case 5292:return uu+e+lu+pu(e,"basis","preferred-size")+e;case 6060:return uu+"box-"+pu(e,"-grow","")+uu+e+lu+pu(e,"grow","positive")+e;case 4554:return uu+pu(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return pu(pu(pu(e,/(zoom-|grab)/,uu+"$1"),/(image-set)/,uu+"$1"),e,"")+e;case 5495:case 3959:return pu(e,/(image-set\([^]*)/,uu+"$1$`$1");case 4968:return pu(pu(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+uu+e+e;case 4095:case 3583:case 4068:case 2532:return pu(e,/(.+)-inline(.+)/,uu+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(yu(e)-1-t>6)switch(gu(e,t+1)){case 109:if(45!==gu(e,t+4))break;case 102:return pu(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+cu+(108==gu(e,t+3)?"$3":"$2-$3"))+e;case 115:return~mu(e,"stretch")?Xu(pu(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==gu(e,t+1))break;case 6444:switch(gu(e,yu(e)-3-(~mu(e,"!important")&&10))){case 107:return pu(e,":",":"+uu)+e;case 101:return pu(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+uu+(45===gu(e,14)?"inline-":"")+"box$3$1"+uu+"$2$3$1"+lu+"$2box$3")+e}break;case 5936:switch(gu(e,t+11)){case 114:return uu+e+lu+pu(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return uu+e+lu+pu(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return uu+e+lu+pu(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return uu+e+lu+e+e}return e}function Yu(e,t){for(var n="",r=bu(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function $u(e,t,n,r){switch(e.type){case"@import":case"decl":return e.return=e.return||e.value;case"comm":return"";case"rule":e.value=e.props.join(",")}return yu(n=Yu(e.children,r))?e.return=e.value+"{"+n+"}":""}var Zu=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}};function Ju(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Qu=function(e,t){return Iu(function(e,t){var n=-1,r=44;do{switch(Ou(r)){case 0:38===r&&12===Pu()&&(t[n]=1),e[n]+=Uu(Mu-1);break;case 2:e[n]+=zu(r);break;case 4:if(44===r){e[++n]=58===Pu()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=hu(r)}}while(r=ku());return e}(Du(e),t))},Ku=new WeakMap,ed=function(e){if("rule"===e.type&&e.parent&&e.length){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ku.get(n))&&!r){Ku.set(e,!0);for(var i=[],o=Qu(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},td=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},nd=[function(e,t,n,r){if(!e.return)switch(e.type){case"decl":e.return=Xu(e.value,e.length);break;case"@keyframes":return Yu([Cu(pu(e.value,"@","@"+uu),e,"")],r);case"rule":if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Yu([Cu(pu(t,/:(read-\w+)/,":-moz-$1"),e,"")],r);case"::placeholder":return Yu([Cu(pu(t,/:(plac\w+)/,":-webkit-input-$1"),e,""),Cu(pu(t,/:(plac\w+)/,":-moz-$1"),e,""),Cu(pu(t,/:(plac\w+)/,lu+"input-$1"),e,"")],r)}return""}))}}],rd=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,o=e.stylisPlugins||nd,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u,d,h=[$u,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(c=[ed,td].concat(o,h),u=bu(c),function(e,t,n,r){for(var i="",o=0;o<u;o++)i+=c[o](e,t,n,r)||"";return i});i=function(e,t,n,r){l=n,Yu(ju(e?e+"{"+t.styles+"}":t.styles),f),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new su({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend}),nonce:e.nonce,inserted:a,registered:{},insert:i};return p.sheet.hydrate(s),p};function id(){return(id=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var od={exports:{}},ad={},sd="function"==typeof Symbol&&Symbol.for,ld=sd?Symbol.for("react.element"):60103,cd=sd?Symbol.for("react.portal"):60106,ud=sd?Symbol.for("react.fragment"):60107,dd=sd?Symbol.for("react.strict_mode"):60108,hd=sd?Symbol.for("react.profiler"):60114,fd=sd?Symbol.for("react.provider"):60109,pd=sd?Symbol.for("react.context"):60110,md=sd?Symbol.for("react.async_mode"):60111,gd=sd?Symbol.for("react.concurrent_mode"):60111,vd=sd?Symbol.for("react.forward_ref"):60112,yd=sd?Symbol.for("react.suspense"):60113,bd=sd?Symbol.for("react.suspense_list"):60120,xd=sd?Symbol.for("react.memo"):60115,_d=sd?Symbol.for("react.lazy"):60116,wd=sd?Symbol.for("react.block"):60121,Sd=sd?Symbol.for("react.fundamental"):60117,Md=sd?Symbol.for("react.responder"):60118,Ed=sd?Symbol.for("react.scope"):60119;function Td(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case ld:switch(e=e.type){case md:case gd:case ud:case hd:case dd:case yd:return e;default:switch(e=e&&e.$$typeof){case pd:case vd:case _d:case xd:case fd:return e;default:return t}}case cd:return t}}}function Ad(e){return Td(e)===gd}ad.AsyncMode=md,ad.ConcurrentMode=gd,ad.ContextConsumer=pd,ad.ContextProvider=fd,ad.Element=ld,ad.ForwardRef=vd,ad.Fragment=ud,ad.Lazy=_d,ad.Memo=xd,ad.Portal=cd,ad.Profiler=hd,ad.StrictMode=dd,ad.Suspense=yd,ad.isAsyncMode=function(e){return Ad(e)||Td(e)===md},ad.isConcurrentMode=Ad,ad.isContextConsumer=function(e){return Td(e)===pd},ad.isContextProvider=function(e){return Td(e)===fd},ad.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===ld},ad.isForwardRef=function(e){return Td(e)===vd},ad.isFragment=function(e){return Td(e)===ud},ad.isLazy=function(e){return Td(e)===_d},ad.isMemo=function(e){return Td(e)===xd},ad.isPortal=function(e){return Td(e)===cd},ad.isProfiler=function(e){return Td(e)===hd},ad.isStrictMode=function(e){return Td(e)===dd},ad.isSuspense=function(e){return Td(e)===yd},ad.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===ud||e===gd||e===hd||e===dd||e===yd||e===bd||"object"==typeof e&&null!==e&&(e.$$typeof===_d||e.$$typeof===xd||e.$$typeof===fd||e.$$typeof===pd||e.$$typeof===vd||e.$$typeof===Sd||e.$$typeof===Md||e.$$typeof===Ed||e.$$typeof===wd)},ad.typeOf=Td,od.exports=ad;var Cd=od.exports,kd={};kd[Cd.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},kd[Cd.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};function Pd(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Ld=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var Rd={animationIterationCount: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,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},Od=/[A-Z]|^ms/g,Dd=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Id=function(e){return 45===e.charCodeAt(1)},zd=function(e){return null!=e&&"boolean"!=typeof e},Nd=Ju((function(e){return Id(e)?e:e.replace(Od,"-$&").toLowerCase()})),Bd=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Dd,(function(e,t,n){return Hd={name:t,styles:n,next:Hd},t}))}return 1===Rd[e]||Id(e)||"number"!=typeof t||0===t?t:t+"px"};function Fd(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Hd={name:n.name,styles:n.styles,next:Hd},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)Hd={name:r.name,styles:r.styles,next:Hd},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Fd(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":zd(a)&&(r+=Nd(o)+":"+Bd(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=Fd(e,t,a);switch(o){case"animation":case"animationName":r+=Nd(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var l=0;l<a.length;l++)zd(a[l])&&(r+=Nd(o)+":"+Bd(o,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=Hd,o=n(e);return Hd=i,Fd(e,t,o)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var Hd,Ud=/label:\s*([^\s;\n{]+)\s*(;|$)/g,jd=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";Hd=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=Fd(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=Fd(n,t,e[a]),r&&(i+=o[a]);Ud.lastIndex=0;for(var s,l="";null!==(s=Ud.exec(i));)l+="-"+s[1];return{name:function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l,styles:i,next:Hd}},Vd=h.exports.createContext("undefined"!=typeof HTMLElement?rd({key:"css"}):null);Vd.Provider;var Wd=function(e){return h.exports.forwardRef((function(t,n){var r=h.exports.useContext(Vd);return e(t,r,n)}))},Gd=h.exports.createContext({}),qd=Zu((function(e){return Zu((function(t){return function(e,t){return"function"==typeof t?t(e):id({},e,t)}(e,t)}))})),Xd=function(e){var t=h.exports.useContext(Gd);return e.theme!==t&&(t=qd(t)(e.theme)),h.exports.createElement(Gd.Provider,{value:t},e.children)},Yd=Wd((function(e,t){var n=e.styles,r=jd([n],void 0,"function"==typeof n||Array.isArray(n)?h.exports.useContext(Gd):void 0),i=h.exports.useRef();return h.exports.useLayoutEffect((function(){var e=t.key+"-global",n=new su({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,a=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==a&&(o=!0,a.setAttribute("data-emotion",e),n.hydrate([a])),i.current=[n,o],function(){n.flush()}}),[t]),h.exports.useLayoutEffect((function(){var e=i.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&Ld(t,r.next,!0),n.tags.length){var o=n.tags[n.tags.length-1].nextElementSibling;n.before=o,n.flush()}t.insert("",r,n,!1)}}),[t,r.name]),null}));function $d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return jd(t)}var Zd=function(){var e=$d.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},Jd=()=>h.exports.createElement(Yd,{styles:'\n html {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n font-family: system-ui, sans-serif;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility; \n -moz-osx-font-smoothing: grayscale; \n touch-action: manipulation; \n }\n\n body {\n position: relative;\n min-height: 100%;\n font-feature-settings: \'kern\';\n }\n\n *,\n *::before,\n *::after {\n border-width: 0;\n border-style: solid;\n box-sizing: border-box;\n }\n\n main {\n display: block;\n }\n\n hr {\n border-top-width: 1px;\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n pre,\n code,\n kbd,\n samp {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 1em;\n }\n\n a {\n background-color: transparent;\n color: inherit;\n text-decoration: inherit;\n }\n\n abbr[title] {\n border-bottom: none;\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n\n b,\n strong {\n font-weight: bold;\n }\n\n small {\n font-size: 80%;\n }\n\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n\n sub {\n bottom: -0.25em;\n }\n\n sup {\n top: -0.5em;\n }\n\n img {\n border-style: none;\n }\n\n button,\n input,\n optgroup,\n select,\n textarea {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n }\n\n button,\n input {\n overflow: visible;\n }\n\n button,\n select {\n text-transform: none;\n }\n\n button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n }\n\n fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n\n legend {\n box-sizing: border-box;\n color: inherit;\n display: table;\n max-width: 100%;\n padding: 0;\n white-space: normal;\n }\n\n progress {\n vertical-align: baseline;\n }\n\n textarea {\n overflow: auto;\n }\n\n [type="checkbox"],\n [type="radio"] {\n box-sizing: border-box;\n padding: 0;\n }\n\n [type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button {\n -webkit-appearance: none !important;\n }\n\n input[type="number"] {\n -moz-appearance: textfield;\n }\n\n [type="search"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n }\n\n [type="search"]::-webkit-search-decoration {\n -webkit-appearance: none !important;\n }\n\n ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n }\n\n details {\n display: block;\n }\n\n summary {\n display: list-item;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n body,\n blockquote,\n dl,\n dd,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n hr,\n figure,\n p,\n pre {\n margin: 0;\n }\n\n button {\n background: transparent;\n padding: 0;\n }\n\n fieldset {\n margin: 0;\n padding: 0;\n }\n\n ol,\n ul {\n margin: 0;\n padding: 0;\n }\n\n textarea {\n resize: vertical;\n }\n\n button,\n [role="button"] {\n cursor: pointer;\n }\n\n button::-moz-focus-inner {\n border: 0 !important;\n }\n\n table {\n border-collapse: collapse;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n\n button,\n input,\n optgroup,\n select,\n textarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n }\n\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n display: block;\n vertical-align: middle;\n }\n\n img,\n video {\n max-width: 100%;\n height: auto;\n }\n\n [data-js-focus-visible] :focus:not([data-focus-visible-added]) {\n outline: none;\n box-shadow: none;\n }\n\n select::-ms-expand {\n display: none;\n }\n '});function Qd(e){return"number"==typeof e}function Kd(e){return Array.isArray(e)}function eh(e){return"function"==typeof e}function th(e){var t=typeof e;return null!=e&&("object"===t||"function"===t)&&!Kd(e)}function nh(e){return null==e}function rh(e){return"[object String]"===Object.prototype.toString.call(e)}function ih(e){return/^var\(--.+\)$/.test(e)}var oh={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",a="[object Object]",s=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[o]=c["[object Map]"]=c["[object Number]"]=c[a]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var d="object"==typeof u&&u&&u.Object===Object&&u,h="object"==typeof self&&self&&self.Object===Object&&self,f=d||h||Function("return this")(),p=t&&!t.nodeType&&t,m=p&&e&&!e.nodeType&&e,g=m&&m.exports===p,v=g&&d.process,y=function(){try{var e=m&&m.require&&m.require("util").types;return e||v&&v.binding&&v.binding("util")}catch(t){}}(),b=y&&y.isTypedArray;function x(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var _,w,S,M=Array.prototype,E=Function.prototype,T=Object.prototype,A=f["__core-js_shared__"],C=E.toString,k=T.hasOwnProperty,P=(_=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+_:"",L=T.toString,R=C.call(Object),O=RegExp("^"+C.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=g?f.Buffer:void 0,I=f.Symbol,z=f.Uint8Array,N=D?D.allocUnsafe:void 0,B=(w=Object.getPrototypeOf,S=Object,function(e){return w(S(e))}),F=Object.create,H=T.propertyIsEnumerable,U=M.splice,j=I?I.toStringTag:void 0,V=function(){try{var e=pe(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),W=D?D.isBuffer:void 0,G=Math.max,q=Date.now,X=pe(f,"Map"),Y=pe(Object,"create"),$=function(){function e(){}return function(t){if(!Te(t))return{};if(F)return F(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function J(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function K(e){var t=this.__data__=new J(e);this.size=t.size}function ee(e,t){var n=_e(e),r=!n&&xe(e),i=!n&&!r&&Se(e),o=!n&&!r&&!i&&Ce(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!k.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||me(c,l))||s.push(c);return s}function te(e,t,n){(void 0!==n&&!be(e[t],n)||void 0===n&&!(t in e))&&ie(e,t,n)}function ne(e,t,n){var r=e[t];k.call(e,t)&&be(r,n)&&(void 0!==n||t in e)||ie(e,t,n)}function re(e,t){for(var n=e.length;n--;)if(be(e[n][0],t))return n;return-1}function ie(e,t,n){"__proto__"==t&&V?V(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}Z.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},Z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Z.prototype.get=function(e){var t=this.__data__;if(Y){var r=t[e];return r===n?void 0:r}return k.call(t,e)?t[e]:void 0},Z.prototype.has=function(e){var t=this.__data__;return Y?void 0!==t[e]:k.call(t,e)},Z.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Y&&void 0===t?n:t,this},J.prototype.clear=function(){this.__data__=[],this.size=0},J.prototype.delete=function(e){var t=this.__data__,n=re(t,e);return!(n<0)&&(n==t.length-1?t.pop():U.call(t,n,1),--this.size,!0)},J.prototype.get=function(e){var t=this.__data__,n=re(t,e);return n<0?void 0:t[n][1]},J.prototype.has=function(e){return re(this.__data__,e)>-1},J.prototype.set=function(e,t){var n=this.__data__,r=re(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Q.prototype.clear=function(){this.size=0,this.__data__={hash:new Z,map:new(X||J),string:new Z}},Q.prototype.delete=function(e){var t=fe(this,e).delete(e);return this.size-=t?1:0,t},Q.prototype.get=function(e){return fe(this,e).get(e)},Q.prototype.has=function(e){return fe(this,e).has(e)},Q.prototype.set=function(e,t){var n=fe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},K.prototype.clear=function(){this.__data__=new J,this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},K.prototype.get=function(e){return this.__data__.get(e)},K.prototype.has=function(e){return this.__data__.has(e)},K.prototype.set=function(e,t){var n=this.__data__;if(n instanceof J){var r=n.__data__;if(!X||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Q(r)}return n.set(e,t),this.size=n.size,this};var oe,ae=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[oe?a:++r];if(!1===t(i[s],s,i))break}return e};function se(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":j&&j in Object(e)?function(e){var t=k.call(e,j),n=e[j];try{e[j]=void 0;var r=!0}catch(o){}var i=L.call(e);r&&(t?e[j]=n:delete e[j]);return i}(e):function(e){return L.call(e)}(e)}function le(e){return Ae(e)&&se(e)==i}function ce(e){return!(!Te(e)||function(e){return!!P&&P in e}(e))&&(Me(e)?O:s).test(function(e){if(null!=e){try{return C.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function ue(e){if(!Te(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ge(e),n=[];for(var r in e)("constructor"!=r||!t&&k.call(e,r))&&n.push(r);return n}function de(e,t,n,r,i){e!==t&&ae(t,(function(o,s){if(i||(i=new K),Te(o))!function(e,t,n,r,i,o,s){var l=ve(e,n),c=ve(t,n),u=s.get(c);if(u)return void te(e,n,u);var d=o?o(l,c,n+"",e,t,s):void 0,h=void 0===d;if(h){var f=_e(c),p=!f&&Se(c),m=!f&&!p&&Ce(c);d=c,f||p||m?_e(l)?d=l:Ae(x=l)&&we(x)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(l):p?(h=!1,d=function(e,t){if(t)return e.slice();var n=e.length,r=N?N(n):new e.constructor(n);return e.copy(r),r}(c,!0)):m?(h=!1,g=c,v=!0?(y=g.buffer,b=new y.constructor(y.byteLength),new z(b).set(new z(y)),b):g.buffer,d=new g.constructor(v,g.byteOffset,g.length)):d=[]:function(e){if(!Ae(e)||se(e)!=a)return!1;var t=B(e);if(null===t)return!0;var n=k.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&C.call(n)==R}(c)||xe(c)?(d=l,xe(l)?d=function(e){return function(e,t,n,r){var i=!n;n||(n={});var o=-1,a=t.length;for(;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?ie(n,s,l):ne(n,s,l)}return n}(e,ke(e))}(l):Te(l)&&!Me(l)||(d=function(e){return"function"!=typeof e.constructor||ge(e)?{}:$(B(e))}(c))):h=!1}var g,v,y,b;var x;h&&(s.set(c,d),i(d,c,r,o,s),s.delete(c));te(e,n,d)}(e,t,s,n,de,r,i);else{var l=r?r(ve(e,s),o,s+"",e,t,i):void 0;void 0===l&&(l=o),te(e,s,l)}}),ke)}function he(e,t){return ye(function(e,t,n){return t=G(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=G(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),x(e,this,s)}}(e,t,Re),e+"")}function fe(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function pe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ce(n)?n:void 0}function me(e,t){var n=typeof e;return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&l.test(e))&&e>-1&&e%1==0&&e<t}function ge(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||T)}function ve(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ye=function(e){var t=0,n=0;return function(){var r=q(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(V?function(e,t){return V(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Re);function be(e,t){return e===t||e!=e&&t!=t}var xe=le(function(){return arguments}())?le:function(e){return Ae(e)&&k.call(e,"callee")&&!H.call(e,"callee")},_e=Array.isArray;function we(e){return null!=e&&Ee(e.length)&&!Me(e)}var Se=W||function(){return!1};function Me(e){if(!Te(e))return!1;var t=se(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ee(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Te(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ae(e){return null!=e&&"object"==typeof e}var Ce=b?function(e){return function(t){return e(t)}}(b):function(e){return Ae(e)&&Ee(e.length)&&!!c[se(e)]};function ke(e){return we(e)?ee(e,!0):ue(e)}var Pe,Le=(Pe=function(e,t,n,r){de(e,t,n,r)},he((function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=Pe.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(e,t,n){if(!Te(n))return!1;var r=typeof t;return!!("number"==r?we(n)&&me(t,n.length):"string"==r&&t in n)&&be(n[t],e)}(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n<r;){var a=t[n];a&&Pe(e,a,n,i)}return e})));function Re(e){return e}e.exports=Le}(oh,oh.exports);var ah=oh.exports;function sh(e,t){var n={};return Object.keys(e).forEach((r=>{t.includes(r)||(n[r]=e[r])})),n}var lh,ch,uh=(lh=function(e,t,n,r){var i="string"==typeof t?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return void 0===e?n:e},ch=new WeakMap,(e,t,n,r)=>{if(void 0===e)return lh(e,t,n);ch.has(e)||ch.set(e,new Map);var i=ch.get(e);if(i.has(t))return i.get(t);var o=lh(e,t,n,r);return i.set(t,o),o});function dh(e,t){var n={};return Object.keys(e).forEach((r=>{var i=e[r];t(i,r,e)&&(n[r]=i)})),n}var hh=e=>dh(e,(e=>null!=e)),fh=e=>Object.keys(e);function ph(e){if(null==e)return e;var{unitless:t}=function(e){var t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}(e);return t||Qd(e)?e+"px":e}var mh=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,gh=e=>Object.entries(e).sort(mh).reduce(((e,t)=>{var[n,r]=t;return e[n]=r,e}),{});function vh(e){var t=gh(e);return Object.assign(Object.values(t),t)}function yh(e,t){var n=[];return e&&n.push("@media screen and (min-width: "+ph(e)+")"),n.length>0&&t&&n.push("and"),t&&n.push("@media screen and (max-width: "+ph(t)+")"),n.join(" ")}function bh(e){var t;if(!e)return null;e.base=null!=(t=e.base)?t:"0px";var n=vh(e),r=Object.entries(e).sort(mh).map(((e,t,n)=>{var r,[i,o]=e,[,a]=null!=(r=n[t+1])?r:[];return{breakpoint:i,minW:o,maxW:a=parseFloat(a)>0?function(e){var t;if(!e)return e;var n=(e=null!=(t=ph(e))?t:e).endsWith("px")?-1:-.0635;return Qd(e)?""+(e+n):e.replace(/([0-9]+\.?[0-9]*)/,(e=>""+(parseFloat(e)+n)))}(a):void 0,maxWQuery:yh(null,a),minWQuery:yh(o),minMaxQuery:yh(o,a)}})),i=function(e){var t=Object.keys(gh(e));return new Set(t)}(e),o=Array.from(i.values());return{keys:i,normalized:n,isResponsive(e){var t=Object.keys(e);return t.length>0&&t.every((e=>i.has(e)))},asObject:gh(e),asArray:vh(e),details:r,media:[null,...n.map((e=>yh(e))).slice(1)],toArrayValue(e){if(!th(e))throw new Error("toArrayValue: value must be an object");for(var t,n,r=o.map((t=>{var n;return null!=(n=e[t])?n:null}));null===(n=void 0,(n=null==(t=r)?0:t.length)?t[n-1]:void 0);)r.pop();return r},toObjectValue(e){if(!Array.isArray(e))throw new Error("toObjectValue: value must be an array");return e.reduce(((e,t,n)=>{var r=o[n];return null!=r&&null!=t&&(e[r]=t),e}),{})}}}function xh(e){var t;return e instanceof Element&&null!=(t=e.ownerDocument)?t:document}var _h=!("undefined"==typeof window||!window.document||!window.document.createElement),wh=e=>e?"":void 0,Sh=e=>!!e||void 0,Mh=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")};function Eh(e){return(e instanceof HTMLElement?xh(e):document).activeElement===e}function Th(e){return e instanceof HTMLElement}function Ah(e){return!(!e.parentElement||!Ah(e.parentElement))||e.hidden}function Ch(e){if(!Th(e)||Ah(e)||function(e){return!0===Boolean(e.getAttribute("disabled"))||!0===Boolean(e.getAttribute("aria-disabled"))}(e))return!1;var{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;var n={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in n?n[t]():!!function(e){var t=e.getAttribute("contenteditable");return"false"!==t&&null!=t}(e)||(e=>e.hasAttribute("tabindex"))(e)}var kh=["input:not([disabled])","select:not([disabled])","textarea:not([disabled])","embed","iframe","object","a[href]","area[href]","button:not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"].join();function Ph(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return eh(e)?e(...n):e}function Lh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.some((t=>(null==t||t(e),null==e?void 0:e.defaultPrevented)))}}var Rh=()=>{},Oh=function(e){var t;return function(){if(e){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t=e.apply(this,r),e=null}return t}}((e=>()=>{var{condition:t,message:n}=e}));function Dh(e,t){void 0===t&&(t={});var{isActive:n=Eh,nextTick:r,preventScroll:i=!0,selectTextIfInput:o=!0}=t;if(!e||n(e))return-1;function a(){if(e){if(function(){if(null==Ih){Ih=!1;try{document.createElement("div").focus({get preventScroll(){return Ih=!0,!0}})}catch(e){}}return Ih}())e.focus({preventScroll:i});else if(e.focus(),i)!function(e){for(var{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(function(e){var t=xh(e),n=e.parentNode,r=[],i=t.scrollingElement||t.documentElement;for(;n instanceof HTMLElement&&n!==i;)(n.offsetHeight<n.scrollHeight||n.offsetWidth<n.scrollWidth)&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),n=n.parentNode;i instanceof HTMLElement&&r.push({element:i,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft});return r}(e));(function(e){return Th(e)&&"input"===e.tagName.toLowerCase()&&"select"in e})(e)&&o&&e.select()}else Oh({condition:!0,message:"[chakra-ui]: can't call focus() on `null` or `undefined` element"})}return r?requestAnimationFrame(a):(a(),-1)}var Ih=null;var zh="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},Nh="undefined"!=typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(zh())}),16.666666666666668)};var Bh=!0,Fh=!1,Hh=!1,Uh={delta:0,timestamp:0},jh=["read","update","preRender","render","postRender"],Vh=jh.reduce((function(e,t){var n,r,i,o,a,s,l;return e[t]=(n=function(){return Fh=!0},r=[],i=[],o=0,a=!1,s=new WeakSet,l={schedule:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var l=n&&a,c=l?r:i;return t&&s.add(e),-1===c.indexOf(e)&&(c.push(e),l&&a&&(o=r.length)),e},cancel:function(e){var t=i.indexOf(e);-1!==t&&i.splice(t,1),s.delete(e)},process:function(e){var t;if(a=!0,r=(t=[i,r])[0],(i=t[1]).length=0,o=r.length)for(var c=0;c<o;c++){var u=r[c];u(e),s.has(u)&&(l.schedule(u),n())}a=!1}}),e}),{}),Wh=jh.reduce((function(e,t){var n=Vh[t];return e[t]=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!1),Fh||$h(),n.schedule(e,t,r)},e}),{}),Gh=jh.reduce((function(e,t){return e[t]=Vh[t].cancel,e}),{}),qh=jh.reduce((function(e,t){return e[t]=function(){return Vh[t].process(Uh)},e}),{}),Xh=function(e){return Vh[e].process(Uh)},Yh=function(e){Fh=!1,Uh.delta=Bh?16.666666666666668:Math.max(Math.min(e-Uh.timestamp,40),1),Uh.timestamp=e,Hh=!0,jh.forEach(Xh),Hh=!1,Fh&&(Bh=!1,Nh(Yh))},$h=function(){Fh=!0,Bh=!0,Hh||Nh(Yh)},Zh=function(){return Uh};function Jh(e,t){return Kd(e)?e.map((e=>null===e?null:t(e))):th(e)?fh(e).reduce(((n,r)=>(n[r]=t(e[r]),n)),{}):null!=e?t(e):null}function Qh(e,t){if(null!=e)if(eh(e))e(t);else try{e.current=t}catch(n){throw new Error("Cannot assign value '"+t+"' to ref '"+e+"'")}}function Kh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach((t=>Qh(t,e)))}}function ef(e){void 0===e&&(e={});var{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=h.exports.createContext(void 0);return i.displayName=r,[i.Provider,function e(){var r=h.exports.useContext(i);if(!r&&t){var o=new Error(n);throw o.name="ContextError",null==Error.captureStackTrace||Error.captureStackTrace(o,e),o}return r},i]}function tf(e){return h.exports.Children.toArray(e).filter((e=>h.exports.isValidElement(e)))}Object.freeze(["base","sm","md","lg","xl","2xl"]);var[nf,rf]=ef({strict:!1,name:"PortalManagerContext"});function of(e){var{children:t,zIndex:n}=e;return h.exports.createElement(nf,{value:{zIndex:n}},t)}var af=_h?h.exports.useLayoutEffect:h.exports.useEffect,sf=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}},lf={"text/plain":"Text","text/html":"Url",default:"Text"};var cf=function(e,t){var n,r,i,o,a,s,l=!1;t||(t={}),n=t.debug||!1;try{if(i=sf(),o=document.createRange(),a=document.getSelection(),(s=document.createElement("span")).textContent=e,s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=lf[t.format]||lf.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(c){n&&console.error("unable to copy using execCommand: ",c),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(u){n&&console.error("unable to copy using clipboardData: ",u),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l},uf=!1,df=0,hf=()=>++df;function ff(e,t){var n=e||(uf?hf():null),[r,i]=h.exports.useState(n);af((()=>{null===r&&i(hf())}),[]),h.exports.useEffect((()=>{!1===uf&&(uf=!0)}),[]);var o=null!=r?r.toString():void 0;return t?t+"-"+o:o}function pf(){var e=h.exports.useRef(!1),[t,n]=h.exports.useState(0);return function(e,t){void 0===t&&(t=[]),h.exports.useEffect((()=>()=>e()),t)}((()=>{e.current=!0})),h.exports.useCallback((()=>{e.current||n(t+1)}),[t])}function mf(){return(mf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var[gf,vf]=ef({strict:!1,name:"PortalContext"}),yf=e=>h.exports.createElement("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0}},e.children),bf=e=>{var{appendToParentPortal:t,children:n}=e,r=h.exports.useRef(null),i=h.exports.useRef(null),o=pf(),a=vf(),s=rf();af((()=>{if(r.current){var e=r.current.ownerDocument,n=t&&null!=a?a:e.body;if(n){i.current=e.createElement("div"),i.current.className="chakra-portal",n.appendChild(i.current),o();var s=i.current;return()=>{n.contains(s)&&n.removeChild(s)}}}}),[]);var l=null!=s&&s.zIndex?h.exports.createElement(yf,{zIndex:null==s?void 0:s.zIndex},n):n;return i.current?Z.exports.createPortal(h.exports.createElement(gf,{value:i.current},l),i.current):h.exports.createElement("span",{ref:r})},xf=e=>{var{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=null!=i?i:_h?document.body:void 0,a=h.exports.useMemo((()=>{var e=null==i?void 0:i.ownerDocument.createElement("div");return e&&(e.className="chakra-portal"),e}),[i]),s=pf();return af((()=>{s()}),[]),af((()=>{if(a&&o)return o.appendChild(a),()=>{o.removeChild(a)}}),[a,o]),o&&a?Z.exports.createPortal(h.exports.createElement(gf,{value:r?a:null},t),a):null};function _f(e){var{containerRef:t}=e,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["containerRef"]);return t?h.exports.createElement(xf,mf({containerRef:t},n)):h.exports.createElement(bf,n)}_f.defaultProps={appendToParentPortal:!0},_f.className="chakra-portal",_f.selector=".chakra-portal";var wf="chakra-ui-light",Sf="chakra-ui-dark",Mf={classList:{add:Rh,remove:Rh}};function Ef(e){var t=_h?document.body:Mf;t.classList.add(e?Sf:wf),t.classList.remove(e?wf:Sf)}var Tf="(prefers-color-scheme: dark)";function Af(e){var t;return(null!=(t=function(e){var t=null==window.matchMedia?void 0:window.matchMedia(e);if(t)return!!t.media===t.matches}(Tf))?t:"dark"===e)?"dark":"light"}var Cf=()=>document.documentElement.style.getPropertyValue("--chakra-ui-color-mode"),kf=e=>{_h&&document.documentElement.style.setProperty("--chakra-ui-color-mode",e)},Pf=()=>"undefined"!=typeof Storage,Lf={get(e){if(!Pf())return e;try{var t=localStorage.getItem("chakra-ui-color-mode");return null!=t?t:e}catch(n){return e}},set(e){if(Pf())try{localStorage.setItem("chakra-ui-color-mode",e)}catch(t){}},type:"localStorage"},Rf=h.exports.createContext({}),Of=()=>{var e=h.exports.useContext(Rf);if(void 0===e)throw new Error("useColorMode must be used within a ColorModeProvider");return e};function Df(e){var{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i},colorModeManager:o=Lf}=e,[a,s]=h.exports.useState("cookie"===o.type?o.get(i):i);h.exports.useEffect((()=>{if(_h&&"localStorage"===o.type){var e=r?Af(i):Cf()||o.get();e&&s(e)}}),[o,r,i]),h.exports.useEffect((()=>{var e="dark"===a;Ef(e),kf(e?"dark":"light")}),[a]);var l=h.exports.useCallback((e=>{o.set(e),s(e)}),[o]),c=h.exports.useCallback((()=>{l("light"===a?"dark":"light")}),[a,l]);h.exports.useEffect((()=>{var e;return r&&(e=function(e){if(!("matchMedia"in window))return Rh;var t=window.matchMedia(Tf),n=()=>{e(t.matches?"dark":"light")};return n(),t.addListener(n),()=>{t.removeListener(n)}}(l)),()=>{e&&r&&e()}}),[l,r]);var u=h.exports.useMemo((()=>({colorMode:null!=t?t:a,toggleColorMode:t?Rh:c,setColorMode:t?Rh:l})),[a,l,c,t]);return h.exports.createElement(Rf.Provider,{value:u},n)}var If=(e,t)=>n=>{var r=String(t),i=e?e+"."+r:r;return th(n.__cssMap)&&i in n.__cssMap?n.__cssMap[i].varRef:t};function zf(e){var{scale:t,transform:n,compose:r}=e;return(e,i)=>{var o,a=If(t,e)(i),s=null!=(o=null==n?void 0:n(a,i))?o:a;return r&&(s=r(s,i)),s}}function Nf(e,t){return n=>{var r={property:n,scale:e};return r.transform=zf({scale:e,transform:t}),r}}var Bf=e=>{var{rtl:t,ltr:n}=e;return e=>"rtl"===e.direction?t:n};var Ff=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];var Hf={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Uf={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};var jf={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Vf={"& > :not(style) ~ :not(style)":{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},Wf={"& > :not(style) ~ :not(style)":{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}};function Gf(e,t){Gf=function(e,t){return new o(e,void 0,t)};var n=Xf(RegExp),r=RegExp.prototype,i=new WeakMap;function o(e,t,r){var o=n.call(this,e,t);return i.set(o,r||i.get(e)),o}function a(e,t){var n=i.get(t);return Object.keys(n).reduce((function(t,r){return t[r]=e[n[r]],t}),Object.create(null))}return qf(o,n),o.prototype.exec=function(e){var t=r.exec.call(this,e);return t&&(t.groups=a(t,this)),t},o.prototype[Symbol.replace]=function(e,t){if("string"==typeof t){var n=i.get(this);return r[Symbol.replace].call(this,e,t.replace(/\$<([^>]+)>/g,(function(e,t){return"$"+n[t]})))}if("function"==typeof t){var o=this;return r[Symbol.replace].call(this,e,(function(){var e=[];return e.push.apply(e,arguments),"object"!=typeof e[e.length-1]&&e.push(a(e,o)),t.apply(this,e)}))}return r[Symbol.replace].call(this,e,t)},Gf.apply(this,arguments)}function qf(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zf(e,t)}function Xf(e){var t="function"==typeof Map?new Map:void 0;return(Xf=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Yf(e,arguments,Jf(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Zf(n,e)})(e)}function Yf(e,t,n){return(Yf=$f()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Zf(i,n.prototype),i}).apply(null,arguments)}function $f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Zf(e,t){return(Zf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jf(e){return(Jf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qf={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},Kf=new Set(Object.values(Qf)),ep=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),tp=e=>e.trim();var np=e=>t=>e+"("+t+")",rp={filter:e=>"auto"!==e?e:Hf,backdropFilter:e=>"auto"!==e?e:Uf,ring:e=>function(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}(rp.px(e)),bgClip:e=>"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e},transform:e=>"auto"===e?["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...Ff].join(" "):"auto-gpu"===e?["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...Ff].join(" "):e,px(e){if(null==e)return e;var{unitless:t}=(e=>{var t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}})(e);return t||Qd(e)?e+"px":e},fraction:e=>!Qd(e)||e>1?e:100*e+"%",float:(e,t)=>"rtl"===t.direction?{left:"right",right:"left"}[e]:e,degree(e){if(ih(e)||null==e)return e;var t=rh(e)&&!e.endsWith("deg");return Qd(e)||t?e+"deg":e},gradient:(e,t)=>function(e,t){var n,r;if(null==e||ep.has(e))return e;var i=Gf(/(^[\x2DA-Za-z]+)\(((.*))\)/g,{type:1,values:2}),{type:o,values:a}=null!=(n=null==(r=i.exec(e))?void 0:r.groups)?n:{};if(!o||!a)return e;var s=o.includes("-gradient")?o:o+"-gradient",[l,...c]=a.split(",").map(tp).filter(Boolean);if(0===(null==c?void 0:c.length))return e;var u=l in Qf?Qf[l]:l;return c.unshift(u),s+"("+c.map((e=>{if(Kf.has(e))return e;var[n,r]=e.split(" "),i="colors."+n,o=i in t.__cssMap?t.__cssMap[i].varRef:n;return r?[o,r].join(" "):o})).join(", ")+")"}(e,null!=t?t:{}),blur:np("blur"),opacity:np("opacity"),brightness:np("brightness"),contrast:np("contrast"),dropShadow:np("drop-shadow"),grayscale:np("grayscale"),hueRotate:np("hue-rotate"),invert:np("invert"),saturate:np("saturate"),sepia:np("sepia"),bgImage:e=>null==e||ip(e)||ep.has(e)?e:"url("+e+")",outline(e){var t="0"===String(e)||"none"===String(e);return null!==e&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t,{space:n,divide:r}=null!=(t=jf[e])?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},ip=e=>rh(e)&&e.includes("(")&&e.includes(")");function op(){return(op=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ap={borderWidths:Nf("borderWidths"),borderStyles:Nf("borderStyles"),colors:Nf("colors"),borders:Nf("borders"),radii:Nf("radii",rp.px),space:Nf("space",rp.px),spaceT:Nf("space",rp.px),degreeT:e=>({property:e,transform:rp.degree}),prop:(e,t,n)=>op({property:e,scale:t},t&&{transform:zf({scale:t,transform:n})}),propT:(e,t)=>({property:e,transform:t}),sizes:Nf("sizes",rp.px),sizesT:Nf("sizes",rp.fraction),shadows:Nf("shadows"),logical:function(e){var{property:t,scale:n,transform:r}=e;return{scale:n,property:Bf(t),transform:n?zf({scale:n,compose:r}):r}},blur:Nf("blur",rp.blur)},sp={background:ap.colors("background"),backgroundColor:ap.colors("backgroundColor"),backgroundImage:ap.propT("backgroundImage",rp.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rp.bgClip},bgSize:ap.prop("backgroundSize"),bgPosition:ap.prop("backgroundPosition"),bg:ap.colors("background"),bgColor:ap.colors("backgroundColor"),bgPos:ap.prop("backgroundPosition"),bgRepeat:ap.prop("backgroundRepeat"),bgAttachment:ap.prop("backgroundAttachment"),bgGradient:ap.propT("backgroundImage",rp.gradient),bgClip:{transform:rp.bgClip}};Object.assign(sp,{bgImage:sp.backgroundImage,bgImg:sp.backgroundImage});var lp={border:ap.borders("border"),borderWidth:ap.borderWidths("borderWidth"),borderStyle:ap.borderStyles("borderStyle"),borderColor:ap.colors("borderColor"),borderRadius:ap.radii("borderRadius"),borderTop:ap.borders("borderTop"),borderBlockStart:ap.borders("borderBlockStart"),borderTopLeftRadius:ap.radii("borderTopLeftRadius"),borderStartStartRadius:ap.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ap.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ap.radii("borderTopRightRadius"),borderStartEndRadius:ap.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ap.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ap.borders("borderRight"),borderInlineEnd:ap.borders("borderInlineEnd"),borderBottom:ap.borders("borderBottom"),borderBlockEnd:ap.borders("borderBlockEnd"),borderBottomLeftRadius:ap.radii("borderBottomLeftRadius"),borderBottomRightRadius:ap.radii("borderBottomRightRadius"),borderLeft:ap.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ap.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ap.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ap.borders(["borderLeft","borderRight"]),borderInline:ap.borders("borderInline"),borderY:ap.borders(["borderTop","borderBottom"]),borderBlock:ap.borders("borderBlock"),borderTopWidth:ap.borderWidths("borderTopWidth"),borderBlockStartWidth:ap.borderWidths("borderBlockStartWidth"),borderTopColor:ap.colors("borderTopColor"),borderBlockStartColor:ap.colors("borderBlockStartColor"),borderTopStyle:ap.borderStyles("borderTopStyle"),borderBlockStartStyle:ap.borderStyles("borderBlockStartStyle"),borderBottomWidth:ap.borderWidths("borderBottomWidth"),borderBlockEndWidth:ap.borderWidths("borderBlockEndWidth"),borderBottomColor:ap.colors("borderBottomColor"),borderBlockEndColor:ap.colors("borderBlockEndColor"),borderBottomStyle:ap.borderStyles("borderBottomStyle"),borderBlockEndStyle:ap.borderStyles("borderBlockEndStyle"),borderLeftWidth:ap.borderWidths("borderLeftWidth"),borderInlineStartWidth:ap.borderWidths("borderInlineStartWidth"),borderLeftColor:ap.colors("borderLeftColor"),borderInlineStartColor:ap.colors("borderInlineStartColor"),borderLeftStyle:ap.borderStyles("borderLeftStyle"),borderInlineStartStyle:ap.borderStyles("borderInlineStartStyle"),borderRightWidth:ap.borderWidths("borderRightWidth"),borderInlineEndWidth:ap.borderWidths("borderInlineEndWidth"),borderRightColor:ap.colors("borderRightColor"),borderInlineEndColor:ap.colors("borderInlineEndColor"),borderRightStyle:ap.borderStyles("borderRightStyle"),borderInlineEndStyle:ap.borderStyles("borderInlineEndStyle"),borderTopRadius:ap.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ap.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ap.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ap.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(lp,{rounded:lp.borderRadius,roundedTop:lp.borderTopRadius,roundedTopLeft:lp.borderTopLeftRadius,roundedTopRight:lp.borderTopRightRadius,roundedTopStart:lp.borderStartStartRadius,roundedTopEnd:lp.borderStartEndRadius,roundedBottom:lp.borderBottomRadius,roundedBottomLeft:lp.borderBottomLeftRadius,roundedBottomRight:lp.borderBottomRightRadius,roundedBottomStart:lp.borderEndStartRadius,roundedBottomEnd:lp.borderEndEndRadius,roundedLeft:lp.borderLeftRadius,roundedRight:lp.borderRightRadius,roundedStart:lp.borderInlineStartRadius,roundedEnd:lp.borderInlineEndRadius,borderStart:lp.borderInlineStart,borderEnd:lp.borderInlineEnd,borderTopStartRadius:lp.borderStartStartRadius,borderTopEndRadius:lp.borderStartEndRadius,borderBottomStartRadius:lp.borderEndStartRadius,borderBottomEndRadius:lp.borderEndEndRadius,borderStartRadius:lp.borderInlineStartRadius,borderEndRadius:lp.borderInlineEndRadius,borderStartWidth:lp.borderInlineStartWidth,borderEndWidth:lp.borderInlineEndWidth,borderStartColor:lp.borderInlineStartColor,borderEndColor:lp.borderInlineEndColor,borderStartStyle:lp.borderInlineStartStyle,borderEndStyle:lp.borderInlineEndStyle});var cp={color:ap.colors("color"),textColor:ap.colors("color"),fill:ap.colors("fill"),stroke:ap.colors("stroke")},up={boxShadow:ap.shadows("boxShadow"),mixBlendMode:!0,blendMode:ap.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ap.prop("backgroundBlendMode"),opacity:!0};Object.assign(up,{shadow:up.boxShadow});var dp={filter:{transform:rp.filter},blur:ap.blur("--chakra-blur"),brightness:ap.propT("--chakra-brightness",rp.brightness),contrast:ap.propT("--chakra-contrast",rp.contrast),hueRotate:ap.degreeT("--chakra-hue-rotate"),invert:ap.propT("--chakra-invert",rp.invert),saturate:ap.propT("--chakra-saturate",rp.saturate),dropShadow:ap.propT("--chakra-drop-shadow",rp.dropShadow),backdropFilter:{transform:rp.backdropFilter},backdropBlur:ap.blur("--chakra-backdrop-blur"),backdropBrightness:ap.propT("--chakra-backdrop-brightness",rp.brightness),backdropContrast:ap.propT("--chakra-backdrop-contrast",rp.contrast),backdropHueRotate:ap.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ap.propT("--chakra-backdrop-invert",rp.invert),backdropSaturate:ap.propT("--chakra-backdrop-saturate",rp.saturate)},hp={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rp.flexDirection},experimental_spaceX:{static:Vf,transform:zf({scale:"space",transform:e=>null!==e?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:Wf,transform:zf({scale:"space",transform:e=>null!=e?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ap.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0};Object.assign(hp,{flexDir:hp.flexDirection});var fp={gridGap:ap.space("gridGap"),gridColumnGap:ap.space("gridColumnGap"),gridRowGap:ap.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},pp={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rp.outline},outlineOffset:!0,outlineColor:ap.colors("outlineColor")},mp={width:ap.sizesT("width"),inlineSize:ap.sizesT("inlineSize"),height:ap.sizes("height"),blockSize:ap.sizes("blockSize"),boxSize:ap.sizes(["width","height"]),minWidth:ap.sizes("minWidth"),minInlineSize:ap.sizes("minInlineSize"),minHeight:ap.sizes("minHeight"),minBlockSize:ap.sizes("minBlockSize"),maxWidth:ap.sizes("maxWidth"),maxInlineSize:ap.sizes("maxInlineSize"),maxHeight:ap.sizes("maxHeight"),maxBlockSize:ap.sizes("maxBlockSize"),d:ap.prop("display"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ap.propT("float",rp.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(mp,{w:mp.width,h:mp.height,minW:mp.minWidth,maxW:mp.maxWidth,minH:mp.minHeight,maxH:mp.maxHeight,overscroll:mp.overscrollBehavior,overscrollX:mp.overscrollBehaviorX,overscrollY:mp.overscrollBehaviorY});var gp={listStyleType:!0,listStylePosition:!0,listStylePos:ap.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ap.prop("listStyleImage")},vp={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},yp={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},bp=(e,t,n)=>{var r={},i=uh(e,t,{});for(var o in i){o in n&&null!=n[o]||(r[o]=i[o])}return r},xp={srOnly:{transform:e=>!0===e?vp:"focusable"===e?yp:{}},layerStyle:{processResult:!0,transform:(e,t,n)=>bp(t,"layerStyles."+e,n)},textStyle:{processResult:!0,transform:(e,t,n)=>bp(t,"textStyles."+e,n)},apply:{processResult:!0,transform:(e,t,n)=>bp(t,e,n)}},_p={position:!0,pos:ap.prop("position"),zIndex:ap.prop("zIndex","zIndices"),inset:ap.spaceT(["top","right","bottom","left"]),insetX:ap.spaceT(["left","right"]),insetInline:ap.spaceT("insetInline"),insetY:ap.spaceT(["top","bottom"]),insetBlock:ap.spaceT("insetBlock"),top:ap.spaceT("top"),insetBlockStart:ap.spaceT("insetBlockStart"),bottom:ap.spaceT("bottom"),insetBlockEnd:ap.spaceT("insetBlockEnd"),left:ap.spaceT("left"),insetInlineStart:ap.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ap.spaceT("right"),insetInlineEnd:ap.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(_p,{insetStart:_p.insetInlineStart,insetEnd:_p.insetInlineEnd});var wp={ring:{transform:rp.ring},ringColor:ap.colors("--chakra-ring-color"),ringOffset:ap.prop("--chakra-ring-offset-width"),ringOffsetColor:ap.colors("--chakra-ring-offset-color"),ringInset:ap.prop("--chakra-ring-inset")},Sp={margin:ap.spaceT("margin"),marginTop:ap.spaceT("marginTop"),marginBlockStart:ap.spaceT("marginBlockStart"),marginRight:ap.spaceT("marginRight"),marginInlineEnd:ap.spaceT("marginInlineEnd"),marginBottom:ap.spaceT("marginBottom"),marginBlockEnd:ap.spaceT("marginBlockEnd"),marginLeft:ap.spaceT("marginLeft"),marginInlineStart:ap.spaceT("marginInlineStart"),marginX:ap.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ap.spaceT("marginInline"),marginY:ap.spaceT(["marginTop","marginBottom"]),marginBlock:ap.spaceT("marginBlock"),padding:ap.space("padding"),paddingTop:ap.space("paddingTop"),paddingBlockStart:ap.space("paddingBlockStart"),paddingRight:ap.space("paddingRight"),paddingBottom:ap.space("paddingBottom"),paddingBlockEnd:ap.space("paddingBlockEnd"),paddingLeft:ap.space("paddingLeft"),paddingInlineStart:ap.space("paddingInlineStart"),paddingInlineEnd:ap.space("paddingInlineEnd"),paddingX:ap.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ap.space("paddingInline"),paddingY:ap.space(["paddingTop","paddingBottom"]),paddingBlock:ap.space("paddingBlock")};Object.assign(Sp,{m:Sp.margin,mt:Sp.marginTop,mr:Sp.marginRight,me:Sp.marginInlineEnd,marginEnd:Sp.marginInlineEnd,mb:Sp.marginBottom,ml:Sp.marginLeft,ms:Sp.marginInlineStart,marginStart:Sp.marginInlineStart,mx:Sp.marginX,my:Sp.marginY,p:Sp.padding,pt:Sp.paddingTop,py:Sp.paddingY,px:Sp.paddingX,pb:Sp.paddingBottom,pl:Sp.paddingLeft,ps:Sp.paddingInlineStart,paddingStart:Sp.paddingInlineStart,pr:Sp.paddingRight,pe:Sp.paddingInlineEnd,paddingEnd:Sp.paddingInlineEnd});var Mp={textDecorationColor:ap.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ap.shadows("textShadow")},Ep={clipPath:!0,transform:ap.propT("transform",rp.transform),transformOrigin:!0,translateX:ap.spaceT("--chakra-translate-x"),translateY:ap.spaceT("--chakra-translate-y"),skewX:ap.degreeT("--chakra-skew-x"),skewY:ap.degreeT("--chakra-skew-y"),scaleX:ap.prop("--chakra-scale-x"),scaleY:ap.prop("--chakra-scale-y"),scale:ap.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ap.degreeT("--chakra-rotate")},Tp={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ap.prop("transitionDuration","transition.duration"),transitionProperty:ap.prop("transitionProperty","transition.property"),transitionTimingFunction:ap.prop("transitionTimingFunction","transition.easing")},Ap={fontFamily:ap.prop("fontFamily","fonts"),fontSize:ap.prop("fontSize","fontSizes",rp.px),fontWeight:ap.prop("fontWeight","fontWeights"),lineHeight:ap.prop("lineHeight","lineHeights"),letterSpacing:ap.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"},isTruncated:{transform(e){if(!0===e)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}},Cp=e=>e+":focus &, "+e+"[data-focus] &",kp=e=>e+":active &, "+e+"[data-active] &",Pp=e=>e+":disabled &, "+e+"[data-disabled] &",Lp=e=>e+":invalid &, "+e+"[data-invalid] &",Rp=e=>e+":checked &, "+e+"[data-checked] &",Op=e=>Dp(e,"[role=group]","[data-group]",".group"),Dp=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.map(e).join(", ")},Ip={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible",_disabled:"&[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Op((e=>e+":hover &, "+e+"[data-hover] &")),_groupFocus:Op(Cp),_groupActive:Op(kp),_groupDisabled:Op(Pp),_groupInvalid:Op(Lp),_groupChecked:Op(Rp),_placeholder:"&::placeholder",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &",_mediaDark:"@media (prefers-color-scheme: dark)",_dark:".chakra-ui-dark &, [data-theme=dark] &, &[data-theme=dark]",_light:".chakra-ui-light &, [data-theme=light] &, &[data-theme=light]"},zp=fh(Ip);function Np(){return(Np=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Bp=ah({},sp,lp,cp,hp,mp,dp,wp,pp,fp,xp,_p,up,Sp,Ap,Mp,Ep,gp,Tp);Object.assign({},Sp,mp,hp,fp,_p);var Fp=[...fh(Bp),...zp],Hp=Np({},Bp,Ip),Up=(e,t)=>e.startsWith("--")&&rh(t)&&!ih(t),jp=(e,t)=>{var n,r;if(null==t)return t;var i=t=>{var n,r;return null==(n=e.__cssMap)||null==(r=n[t])?void 0:r.varRef},o=e=>{var t;return null!=(t=i(e))?t:e},a=t.split(",").map((e=>e.trim())),[s,l]=a;return t=null!=(n=null!=(r=i(s))?r:o(l))?n:o(t)};function Vp(e){var{configs:t={},pseudos:n={},theme:r}=e;return function e(i,o){void 0===o&&(o=!1);var a=Ph(i,r),s=(e=>t=>{if(!t.__breakpoints)return e;var{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(var a in e){var s=Ph(e[a],t);if(null!=s)if(s=th(s)&&n(s)?r(s):s,Array.isArray(s))for(var l=s.slice(0,i.length).length,c=0;c<l;c+=1){var u=null==i?void 0:i[c];u?(o[u]=o[u]||{},null!=s[c]&&(o[u][a]=s[c])):o[a]=s[c]}else o[a]=s}return o})(a)(r),l={};for(var c in s){var u,d,h,f,p,m=Ph(s[c],r);c in n&&(c=n[c]),Up(c,m)&&(m=jp(r,m));var g=t[c];if(!0===g&&(g={property:c}),th(m)){var v;l[c]=null!=(v=l[c])?v:{},l[c]=ah({},l[c],e(m,!0))}else{var y=null!=(u=null==(d=g)||null==d.transform?void 0:d.transform(m,r,a))?u:m;y=null!=(h=g)&&h.processResult?e(y,!0):y;var b=Ph(null==(f=g)?void 0:f.property,r);if(!o&&null!=(p=g)&&p.static){var x=Ph(g.static,r);l=ah({},l,x)}if(b&&Array.isArray(b))for(var _ of b)l[_]=y;else b?"&"===b&&th(y)?l=ah({},l,y):l[b]=y:th(y)?l=ah({},l,y):l[c]=y}}return l}}var Wp=e=>t=>Vp({theme:t,pseudos:Ip,configs:Bp})(e);function Gp(e){return th(e)&&e.reference?e.reference:String(e)}var qp=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.map(Gp).join(" "+e+" ").replace(/calc/g,"")},Xp=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"calc("+qp("+",...t)+")"},Yp=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"calc("+qp("-",...t)+")"},$p=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"calc("+qp("*",...t)+")"},Zp=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"calc("+qp("/",...t)+")"},Jp=e=>{var t=Gp(e);return null==t||Number.isNaN(parseFloat(t))?$p(t,-1):String(t).startsWith("-")?String(t).slice(1):"-"+t},Qp=Object.assign((e=>({add:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qp(Xp(e,...n))},subtract:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qp(Yp(e,...n))},multiply:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qp($p(e,...n))},divide:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qp(Zp(e,...n))},negate:()=>Qp(Jp(e)),toString:()=>e.toString()})),{add:Xp,subtract:Yp,multiply:$p,divide:Zp,negate:Jp});function Kp(e){var t=function(e,t){return void 0===t&&(t="-"),e.replace(/\s+/g,t)}(e.toString());return t.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?t.replace(".","\\."):e}function em(e,t){return"var("+Kp(e)+(t?", "+t:"")+")"}function tm(e,t){return void 0===t&&(t=""),"--"+function(e,t){return void 0===t&&(t=""),[t,Kp(e)].filter(Boolean).join("-")}(e,t)}function nm(e,t,n){var r=tm(e,n);return{variable:r,reference:em(r,t)}}function rm(){return(rm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function im(e,t){var n={cssMap:{},cssVars:{}};return function(e,t){(function e(n,r){return void 0===r&&(r=[]),Kd(n)?n.map(((t,n)=>e(t,[...r,String(n)]))):th(n)?Object.fromEntries(Object.entries(n).map((t=>{var[n,i]=t;return[n,e(i,[...r,n])]}))):t(n,r)})(e)}(e,((e,r)=>{var i,[o]=r,a=null!=(i=om[o])?i:om.defaultHandler,{cssVars:s,cssMap:l}=a(r,e,t);Object.assign(n.cssVars,s),Object.assign(n.cssMap,l)})),n}var om={space:(e,t,n)=>{var r=om.defaultHandler(e,t,n),[i,...o]=e,a=i+".-"+o.join("."),s=e.join("-"),{variable:l,reference:c}=nm(s,void 0,n.cssVarPrefix),u=Qp.negate(t),d=Qp.negate(c);return{cssVars:r.cssVars,cssMap:rm({},r.cssMap,{[a]:{value:""+u,var:""+l,varRef:d}})}},defaultHandler:(e,t,n)=>{var r=e.join("."),i=e.join("-"),{variable:o,reference:a}=nm(i,void 0,n.cssVarPrefix);return{cssVars:{[o]:t},cssMap:{[r]:{value:t,var:o,varRef:a}}}}};var am=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function sm(e){return function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["__cssMap","__cssVars","__breakpoints"])}function lm(){return(lm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function cm(e){var t,n=sm(e),r=function(e){var t,n;return t=e,n={},am.forEach((e=>{e in t&&(n[e]=t[e])})),n}(n),i=null==(t=n.config)?void 0:t.cssVarPrefix,{cssMap:o,cssVars:a}=im(r,{cssVarPrefix:i});return Object.assign(n,{__cssVars:lm({},{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},a),__cssMap:o,__breakpoints:bh(n.breakpoints)}),n}var um="undefined"!=typeof Element,dm="function"==typeof Map,hm="function"==typeof Set,fm="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function pm(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,i,o;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!pm(e[r],t[r]))return!1;return!0}if(dm&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!pm(r.value[1],t.get(r.value[0])))return!1;return!0}if(hm&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(fm&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(um&&e instanceof Element)return!1;for(r=n;0!=r--;)if(("_owner"!==i[r]&&"__v"!==i[r]&&"__o"!==i[r]||!e.$$typeof)&&!pm(e[i[r]],t[i[r]]))return!1;return!0}return e!=e&&t!=t}var mm=function(e,t){try{return pm(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}},gm=e=>{var{cssVarsRoot:t=":host, :root",theme:n,children:r}=e,i=h.exports.useMemo((()=>cm(n)),[n]);return h.exports.createElement(Xd,{theme:i},h.exports.createElement(Yd,{styles:e=>({[t]:e.__cssVars})}),r)};var[vm,ym]=ef({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "}),bm=()=>{var{colorMode:e}=Of();return h.exports.createElement(Yd,{styles:t=>{var n=Ph(uh(t,"styles.global"),{theme:t,colorMode:e});if(n)return Wp(n)(t)}})};function xm(e){return sh(e,["styleConfig","size","variant","colorScheme"])}function _m(){return(_m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function wm(){return _m({},Of(),{theme:function(){var e=h.exports.useContext(Gd);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}()})}var Sm=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Mm=Ju((function(e){return Sm.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Em=function(e){return"theme"!==e},Tm=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Mm:Em},Am=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Cm=function e(t,n){var r,i,o=t.__emotion_real===t,a=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var s=Am(t,n,o),l=s||Tm(a),c=!l("as");return function(){var u=arguments,d=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,p=1;p<f;p++)d.push(u[p],u[0][p])}var m=Wd((function(e,t,n){var r=c&&e.as||a,o="",u=[],f=e;if(null==e.theme){for(var p in f={},e)f[p]=e[p];f.theme=h.exports.useContext(Gd)}"string"==typeof e.className?o=Pd(t.registered,u,e.className):null!=e.className&&(o=e.className+" ");var m=jd(d.concat(u),t.registered,f);Ld(t,m,"string"==typeof r),o+=t.key+"-"+m.name,void 0!==i&&(o+=" "+i);var g=c&&void 0===s?Tm(r):l,v={};for(var y in e)c&&"as"===y||g(y)&&(v[y]=e[y]);return v.className=o,v.ref=n,h.exports.createElement(r,v)}));return m.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=d,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(t,r){return e(t,id({},n,r,{shouldForwardProp:Am(m,r,!0)})).apply(void 0,d)},m}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Cm[e]=Cm(e)}));var km=new Set([...Fp,"textStyle","layerStyle","apply","isTruncated","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Pm=new Set(["htmlWidth","htmlHeight","htmlSize"]),Lm=e=>Pm.has(e)||!km.has(e);function Rm(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Om=e=>{var{baseStyle:t}=e;return e=>{var{css:n,__css:r,sx:i}=e,o=dh(Rm(e,["theme","css","__css","sx"]),((e,t)=>(e=>e in Hp)(t))),a=Object.assign({},r,t,o,i),s=Wp(a)(e.theme);return n?[s,n]:s}};var Dm=function(e,t){var n=null!=t?t:{},{baseStyle:r}=n,i=Rm(n,["baseStyle"]);i.shouldForwardProp||(i.shouldForwardProp=Lm);var o=Om({baseStyle:r});return Cm(e,i)(o)};function Im(e){return h.exports.forwardRef(e)}function zm(e,t,n){var r,i;void 0===t&&(t={}),void 0===n&&(n={});var{styleConfig:o}=t,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["styleConfig"]),{theme:s,colorMode:l}=wm(),c=uh(s,"components."+e),u=o||c,d=ah({theme:s,colorMode:l},null!=(r=null==u?void 0:u.defaultProps)?r:{},hh(sh(a,["children"]))),f=h.exports.useRef({});return h.exports.useMemo((()=>{if(u){var e,t,r,i,o,a,s=Ph(null!=(e=u.baseStyle)?e:{},d),l=Ph(null!=(t=null==(r=u.variants)?void 0:r[d.variant])?t:{},d),c=Ph(null!=(i=null==(o=u.sizes)?void 0:o[d.size])?i:{},d),h=ah({},s,c,l);null!=(a=n)&&a.isMultiPart&&u.parts&&u.parts.forEach((e=>{var t;h[e]=null!=(t=h[e])?t:{}})),mm(f.current,h)||(f.current=h)}return f.current}),[u,d,null==(i=n)?void 0:i.isMultiPart])}function Nm(e,t){return zm(e,t,{isMultiPart:!0})}["a","b","article","aside","blockquote","button","caption","cite","circle","code","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","img","input","kbd","label","li","main","mark","nav","ol","p","path","pre","q","rect","s","svg","section","select","strong","small","span","sub","sup","table","tbody","td","textarea","tfoot","th","thead","tr","ul"].forEach((e=>{Dm[e]=Dm(e)}));var Bm,Fm={parts:["container","button","panel","icon"],baseStyle:{container:{borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},button:{fontSize:"1rem",_focus:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:4,py:2},panel:{pt:2,px:4,pb:5},icon:{fontSize:"1.25em"}}},Hm={exports:{}};Bm=Hm,function(e){var t=/^\s+/,n=/\s+$/,r=0,i=e.round,o=e.min,a=e.max,s=e.random;function l(s,c){if(c=c||{},(s=s||"")instanceof l)return s;if(!(this instanceof l))return new l(s,c);var u=function(r){var i,s,l,c={r:0,g:0,b:0},u=1,d=null,h=null,f=null,p=!1,m=!1;return"string"==typeof r&&(r=function(e){e=e.replace(t,"").replace(n,"").toLowerCase();var r,i=!1;if(T[e])e=T[e],i=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(r=F.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=F.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=F.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=F.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=F.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=F.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=F.hex8.exec(e))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),a:I(r[4]),format:i?"name":"hex8"}:(r=F.hex6.exec(e))?{r:L(r[1]),g:L(r[2]),b:L(r[3]),format:i?"name":"hex"}:(r=F.hex4.exec(e))?{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),a:I(r[4]+""+r[4]),format:i?"name":"hex8"}:!!(r=F.hex3.exec(e))&&{r:L(r[1]+""+r[1]),g:L(r[2]+""+r[2]),b:L(r[3]+""+r[3]),format:i?"name":"hex"}}(r)),"object"==typeof r&&(H(r.r)&&H(r.g)&&H(r.b)?(i=r.r,s=r.g,l=r.b,c={r:255*k(i,255),g:255*k(s,255),b:255*k(l,255)},p=!0,m="%"===String(r.r).substr(-1)?"prgb":"rgb"):H(r.h)&&H(r.s)&&H(r.v)?(d=O(r.s),h=O(r.v),c=function(t,n,r){t=6*k(t,360),n=k(n,100),r=k(r,100);var i=e.floor(t),o=t-i,a=r*(1-n),s=r*(1-o*n),l=r*(1-(1-o)*n),c=i%6;return{r:255*[r,s,a,a,l,r][c],g:255*[l,r,r,s,a,a][c],b:255*[a,a,l,r,r,s][c]}}(r.h,d,h),p=!0,m="hsv"):H(r.h)&&H(r.s)&&H(r.l)&&(d=O(r.s),f=O(r.l),c=function(e,t,n){var r,i,o;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=k(e,360),t=k(t,100),n=k(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(r.h,d,f),p=!0,m="hsl"),r.hasOwnProperty("a")&&(u=r.a)),u=C(u),{ok:p,format:r.format||m,r:o(255,a(c.r,0)),g:o(255,a(c.g,0)),b:o(255,a(c.b,0)),a:u}}(s);this._originalInput=s,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=i(100*this._a)/100,this._format=c.format||u.format,this._gradientType=c.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=u.ok,this._tc_id=r++}function c(e,t,n){e=k(e,255),t=k(t,255),n=k(n,255);var r,i,s=a(e,t,n),l=o(e,t,n),c=(s+l)/2;if(s==l)r=i=0;else{var u=s-l;switch(i=c>.5?u/(2-s-l):u/(s+l),s){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:i,l:c}}function u(e,t,n){e=k(e,255),t=k(t,255),n=k(n,255);var r,i,s=a(e,t,n),l=o(e,t,n),c=s,u=s-l;if(i=0===s?0:u/s,s==l)r=0;else{switch(s){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:i,v:c}}function d(e,t,n,r){var o=[R(i(e).toString(16)),R(i(t).toString(16)),R(i(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function h(e,t,n,r){return[R(D(r)),R(i(e).toString(16)),R(i(t).toString(16)),R(i(n).toString(16))].join("")}function f(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.s-=t/100,n.s=P(n.s),l(n)}function p(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.s+=t/100,n.s=P(n.s),l(n)}function m(e){return l(e).desaturate(100)}function g(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.l+=t/100,n.l=P(n.l),l(n)}function v(e,t){t=0===t?0:t||10;var n=l(e).toRgb();return n.r=a(0,o(255,n.r-i(-t/100*255))),n.g=a(0,o(255,n.g-i(-t/100*255))),n.b=a(0,o(255,n.b-i(-t/100*255))),l(n)}function y(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.l-=t/100,n.l=P(n.l),l(n)}function b(e,t){var n=l(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,l(n)}function x(e){var t=l(e).toHsl();return t.h=(t.h+180)%360,l(t)}function _(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+120)%360,s:t.s,l:t.l}),l({h:(n+240)%360,s:t.s,l:t.l})]}function w(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+90)%360,s:t.s,l:t.l}),l({h:(n+180)%360,s:t.s,l:t.l}),l({h:(n+270)%360,s:t.s,l:t.l})]}function S(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+72)%360,s:t.s,l:t.l}),l({h:(n+216)%360,s:t.s,l:t.l})]}function M(e,t,n){t=t||6,n=n||30;var r=l(e).toHsl(),i=360/n,o=[l(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(l(r));return o}function E(e,t){t=t||6;for(var n=l(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(l({h:r,s:i,v:o})),o=(o+s)%1;return a}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var t,n,r,i=this.toRgb();return t=i.r/255,n=i.g/255,r=i.b/255,.2126*(t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=C(e),this._roundA=i(100*this._a)/100,this},toHsv:function(){var e=u(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=u(this._r,this._g,this._b),t=i(360*e.h),n=i(100*e.s),r=i(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=c(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=c(this._r,this._g,this._b),t=i(360*e.h),n=i(100*e.s),r=i(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return d(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[R(i(e).toString(16)),R(i(t).toString(16)),R(i(n).toString(16)),R(D(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*k(this._r,255))+"%",g:i(100*k(this._g,255))+"%",b:i(100*k(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*k(this._r,255))+"%, "+i(100*k(this._g,255))+"%, "+i(100*k(this._b,255))+"%)":"rgba("+i(100*k(this._r,255))+"%, "+i(100*k(this._g,255))+"%, "+i(100*k(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(A[d(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+h(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=l(e);n="#"+h(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return l(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(E,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},l.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:O(e[r]));e=n}return l(e,t)},l.equals=function(e,t){return!(!e||!t)&&l(e).toRgbString()==l(t).toRgbString()},l.random=function(){return l.fromRatio({r:s(),g:s(),b:s()})},l.mix=function(e,t,n){n=0===n?0:n||50;var r=l(e).toRgb(),i=l(t).toRgb(),o=n/100;return l({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},l.readability=function(t,n){var r=l(t),i=l(n);return(e.max(r.getLuminance(),i.getLuminance())+.05)/(e.min(r.getLuminance(),i.getLuminance())+.05)},l.isReadable=function(e,t,n){var r,i,o,a,s,c=l.readability(e,t);switch(i=!1,(o=n,a=((o=o||{level:"AA",size:"small"}).level||"AA").toUpperCase(),s=(o.size||"small").toLowerCase(),"AA"!==a&&"AAA"!==a&&(a="AA"),"small"!==s&&"large"!==s&&(s="small"),r={level:a,size:s}).level+r.size){case"AAsmall":case"AAAlarge":i=c>=4.5;break;case"AAlarge":i=c>=3;break;case"AAAsmall":i=c>=7}return i},l.mostReadable=function(e,t,n){var r,i,o,a,s=null,c=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var u=0;u<t.length;u++)(r=l.readability(e,t[u]))>c&&(c=r,s=l(t[u]));return l.isReadable(e,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,l.mostReadable(e,["#fff","#000"],n))};var T=l.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},A=l.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(T);function C(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function k(t,n){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(t)&&(t="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(t);return t=o(n,a(0,parseFloat(t))),r&&(t=parseInt(t*n,10)/100),e.abs(t-n)<1e-6?1:t%n/parseFloat(n)}function P(e){return o(1,a(0,e))}function L(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function O(e){return e<=1&&(e=100*e+"%"),e}function D(t){return e.round(255*parseFloat(t)).toString(16)}function I(e){return L(e)/255}var z,N,B,F=(N="[\\s|\\(]+("+(z="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",B="[\\s|\\(]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",{CSS_UNIT:new RegExp(z),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+B),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+B),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+B),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function H(e){return!!F.CSS_UNIT.exec(e)}Bm.exports?Bm.exports=l:window.tinycolor=l}(Math);var Um=Hm.exports,jm=(e,t,n)=>{var r=uh(e,"colors."+t,t);return Um(r).isValid()?r:n},Vm=e=>t=>"dark"===(e=>t=>{var n=jm(t,e);return Um(n).isDark()?"dark":"light"})(e)(t),Wm=(e,t)=>n=>{var r=jm(n,e);return Um(r).setAlpha(t).toRgbString()};function Gm(e,t){return void 0===e&&(e="1rem"),void 0===t&&(t="rgba(255, 255, 255, 0.15)"),{backgroundImage:"linear-gradient(\n 45deg,\n "+t+" 25%,\n transparent 25%,\n transparent 50%,\n "+t+" 50%,\n "+t+" 75%,\n transparent 75%,\n transparent\n )",backgroundSize:e+" "+e}}function qm(e){var t,n,r=Um.random().toHexString();return!e||th(t=e)&&0===Object.keys(t).length?r:e.string&&e.colors?function(e,t){var n=0;if(0===e.length)return t[0];for(var r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n&=n;return n=(n%t.length+t.length)%t.length,t[n]}(e.string,e.colors):e.string&&!e.colors?function(e){var t=0;if(0===e.length)return t.toString();for(var n=0;n<e.length;n+=1)t=e.charCodeAt(n)+((t<<5)-t),t&=t;for(var r="#",i=0;i<3;i+=1){r+=("00"+(t>>8*i&255).toString(16)).substr(-2)}return r}(e.string):e.colors&&!e.string?(n=e.colors)[Math.floor(Math.random()*n.length)]:r}function Xm(e,t){return n=>"dark"===n.colorMode?t:e}function Ym(e){var{orientation:t,vertical:n,horizontal:r}=e;return t?"vertical"===t?n:r:{}}function $m(){return($m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Zm(e){var{theme:t,colorScheme:n}=e;return Xm(jm(t,n+".100",n),Wm(n+".200",.16)(t))(e)}var Jm={parts:["container","title","description","icon"],baseStyle:{container:{px:4,py:3},title:{fontWeight:"bold",lineHeight:6,marginEnd:2},description:{lineHeight:6},icon:{flexShrink:0,marginEnd:3,w:5,h:6}},variants:{subtle:function(e){var{colorScheme:t}=e;return{container:{bg:Zm(e)},icon:{color:Xm(t+".500",t+".200")(e)}}},"left-accent":function(e){var{colorScheme:t}=e;return{container:{paddingStart:3,borderStartWidth:"4px",borderStartColor:Xm(t+".500",t+".200")(e),bg:Zm(e)},icon:{color:Xm(t+".500",t+".200")(e)}}},"top-accent":function(e){var{colorScheme:t}=e;return{container:{pt:2,borderTopWidth:"4px",borderTopColor:Xm(t+".500",t+".200")(e),bg:Zm(e)},icon:{color:Xm(t+".500",t+".200")(e)}}},solid:function(e){var{colorScheme:t}=e;return{container:{bg:Xm(t+".500",t+".200")(e),color:Xm("white","gray.900")(e)}}}},defaultProps:{variant:"subtle",colorScheme:"blue"}},Qm={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"};function Km(){return(Km=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var eg=Km({},Qm,{max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem"},{container:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px"}});function tg(e){return{transform:"translate(25%, 25%)",borderRadius:"full",border:"0.2em solid",borderColor:Xm("white","gray.800")(e)}}function ng(e){return{bg:Xm("gray.200","whiteAlpha.400")(e)}}function rg(e){var{name:t,theme:n}=e,r=t?qm({string:t}):"gray.400",i="white";return Vm(r)(n)||(i="gray.800"),{bg:r,color:i,borderColor:Xm("white","gray.800")(e),verticalAlign:"top"}}function ig(e){var t=eg[e];return{container:{width:e,height:e,fontSize:"calc("+(null!=t?t:e)+" / 2.5)"},excessLabel:{width:e,height:e},label:{fontSize:"calc("+(null!=t?t:e)+" / 2.5)",lineHeight:"100%"!==e?null!=t?t:e:void 0}}}var og={parts:["container","excessLabel","badge","label"],baseStyle:e=>({badge:tg(e),excessLabel:ng(e),container:rg(e)}),sizes:{"2xs":ig("4"),xs:ig("6"),sm:ig("8"),md:ig("12"),lg:ig("16"),xl:ig("24"),"2xl":ig("32"),full:ig("100%")},defaultProps:{size:"md"}};var ag={baseStyle:{px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},variants:{solid:function(e){var{colorScheme:t,theme:n}=e;return{bg:Xm(t+".500",Wm(t+".500",.6)(n))(e),color:Xm("white","whiteAlpha.800")(e)}},subtle:function(e){var{colorScheme:t,theme:n}=e;return{bg:Xm(t+".100",Wm(t+".200",.16)(n))(e),color:Xm(t+".800",t+".200")(e)}},outline:function(e){var{colorScheme:t,theme:n}=e,r=Wm(t+".200",.8)(n),i=Xm(jm(n,t+".500"),r)(e);return{color:i,boxShadow:"inset 0 0 0px 1px "+i}}},defaultProps:{variant:"subtle",colorScheme:"gray"}},sg={parts:["container","item","link","separator"],baseStyle:{link:{transition:"all 0.15s ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focus:{boxShadow:"outline"}}}};function lg(){return(lg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function cg(e){var{colorScheme:t,theme:n}=e;if("gray"===t)return{color:Xm("inherit","whiteAlpha.900")(e),_hover:{bg:Xm("gray.100","whiteAlpha.200")(e)},_active:{bg:Xm("gray.200","whiteAlpha.300")(e)}};var r=Wm(t+".200",.12)(n),i=Wm(t+".200",.24)(n);return{color:Xm(t+".600",t+".200")(e),bg:"transparent",_hover:{bg:Xm(t+".50",r)(e)},_active:{bg:Xm(t+".100",i)(e)}}}var ug={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}};var dg={baseStyle:{lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",_focus:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},variants:{ghost:cg,outline:function(e){var{colorScheme:t}=e,n=Xm("gray.200","whiteAlpha.300")(e);return lg({border:"1px solid",borderColor:"gray"===t?n:"currentColor"},cg(e))},solid:function(e){var{colorScheme:t}=e;if("gray"===t){var n=Xm("gray.100","whiteAlpha.200")(e);return{bg:n,_hover:{bg:Xm("gray.200","whiteAlpha.300")(e),_disabled:{bg:n}},_active:{bg:Xm("gray.300","whiteAlpha.400")(e)}}}var{bg:r=t+".500",color:i="white",hoverBg:o=t+".600",activeBg:a=t+".700"}=ug[t]||{},s=Xm(r,t+".200")(e);return{bg:s,color:Xm(i,"gray.800")(e),_hover:{bg:Xm(o,t+".300")(e),_disabled:{bg:s}},_active:{bg:Xm(a,t+".400")(e)}}},link:function(e){var{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Xm(t+".500",t+".200")(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Xm(t+".700",t+".500")(e)}}},unstyled:{bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:0,p:0}},sizes:{lg:{h:12,minW:12,fontSize:"lg",px:6},md:{h:10,minW:10,fontSize:"md",px:4},sm:{h:8,minW:8,fontSize:"sm",px:3},xs:{h:6,minW:6,fontSize:"xs",px:2}},defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}};function hg(e){var{colorScheme:t}=e;return{w:"100%",transition:"box-shadow 250ms",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Xm(t+".500",t+".200")(e),borderColor:Xm(t+".500",t+".200")(e),color:Xm("white","gray.900")(e),_hover:{bg:Xm(t+".600",t+".300")(e),borderColor:Xm(t+".600",t+".300")(e)},_disabled:{borderColor:Xm("gray.200","transparent")(e),bg:Xm("gray.200","whiteAlpha.300")(e),color:Xm("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Xm(t+".500",t+".200")(e),borderColor:Xm(t+".500",t+".200")(e),color:Xm("white","gray.900")(e)},_disabled:{bg:Xm("gray.100","whiteAlpha.100")(e),borderColor:Xm("gray.100","transparent")(e)},_focus:{boxShadow:"outline"},_invalid:{borderColor:Xm("red.500","red.300")(e)}}}var fg={userSelect:"none",_disabled:{opacity:.4}},pg={parts:["container","control","label","icon"],baseStyle:e=>({control:hg(e),label:fg}),sizes:{sm:{control:{h:3,w:3},label:{fontSize:"sm"},icon:{fontSize:"0.45rem"}},md:{control:{w:4,h:4},label:{fontSize:"md"},icon:{fontSize:"0.625rem"}},lg:{control:{w:5,h:5},label:{fontSize:"lg"},icon:{fontSize:"0.625rem"}}},defaultProps:{size:"md",colorScheme:"blue"}};var mg={baseStyle:function(e){return{borderRadius:"md",transition:"all 0.2s",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{bg:Xm("blackAlpha.100","whiteAlpha.100")(e)},_active:{bg:Xm("blackAlpha.200","whiteAlpha.200")(e)},_focus:{boxShadow:"outline"}}},sizes:{lg:{w:"40px",h:"40px",fontSize:"16px"},md:{w:"32px",h:"32px",fontSize:"12px"},sm:{w:"24px",h:"24px",fontSize:"10px"}},defaultProps:{size:"md"}},{variants:gg,defaultProps:vg}=ag,yg={baseStyle:{fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},variants:gg,defaultProps:vg},bg={baseStyle:{w:"100%",mx:"auto",maxW:"60ch",px:"1rem"}},xg={baseStyle:{opacity:.6,borderColor:"inherit"},variants:{solid:{borderStyle:"solid"},dashed:{borderStyle:"dashed"}},defaultProps:{variant:"solid"}},_g={bg:"blackAlpha.600",zIndex:"modal"};function wg(e){var{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:"inside"===n?"hidden":"auto"}}function Sg(e){var{scrollBehavior:t}=e;return{borderRadius:"md",bg:Xm("white","gray.700")(e),color:"inherit",my:"3.75rem",zIndex:"modal",maxH:"inside"===t?"calc(100% - 7.5rem)":void 0,boxShadow:Xm("lg","dark-lg")(e)}}var Mg={px:6,py:4,fontSize:"xl",fontWeight:"semibold"},Eg={position:"absolute",top:2,insetEnd:3};function Tg(e){var{scrollBehavior:t}=e;return{px:6,py:2,flex:1,overflow:"inside"===t?"auto":void 0}}var Ag={px:6,py:4};function Cg(e){return"full"===e?{dialog:{maxW:"100vw",minH:"100vh"}}:{dialog:{maxW:e}}}var kg={parts:["overlay","dialogContainer","dialog","header","closeButton","body","footer"],baseStyle:e=>({overlay:_g,dialogContainer:wg(e),dialog:Sg(e),header:Mg,closeButton:Eg,body:Tg(e),footer:Ag}),sizes:{xs:Cg("xs"),sm:Cg("sm"),md:Cg("md"),lg:Cg("lg"),xl:Cg("xl"),"2xl":Cg("2xl"),"3xl":Cg("3xl"),"4xl":Cg("4xl"),"5xl":Cg("5xl"),"6xl":Cg("6xl"),full:Cg("full")},defaultProps:{size:"md"}};function Pg(){return(Pg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Lg(e){return"full"===e?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}}}var Rg={bg:"blackAlpha.600",zIndex:"overlay"},Og={display:"flex",zIndex:"modal",justifyContent:"center"};function Dg(e){var{isFullHeight:t}=e;return Pg({},t&&{height:"100vh"},{zIndex:"modal",maxH:"100vh",bg:Xm("white","gray.700")(e),color:"inherit",boxShadow:Xm("lg","dark-lg")(e)})}var Ig={px:6,py:4,fontSize:"xl",fontWeight:"semibold"},zg={position:"absolute",top:2,insetEnd:3},Ng={px:6,py:2,flex:1,overflow:"auto"},Bg={px:6,py:4},Fg={parts:kg.parts,baseStyle:e=>({overlay:Rg,dialogContainer:Og,dialog:Dg(e),header:Ig,closeButton:zg,body:Ng,footer:Bg}),sizes:{xs:Lg("xs"),sm:Lg("md"),md:Lg("lg"),lg:Lg("2xl"),xl:Lg("4xl"),full:Lg("full")},defaultProps:{size:"xs"}},Hg={parts:["preview","input"],baseStyle:{preview:{borderRadius:"md",py:"3px",transition:"all 0.2s"},input:{borderRadius:"md",py:"3px",transition:"all 0.2s",width:"full",_focus:{boxShadow:"outline"},_placeholder:{opacity:.6}}}};function Ug(e){return{marginStart:1,color:Xm("red.500","red.300")(e)}}function jg(e){return{mt:2,color:Xm("gray.500","whiteAlpha.600")(e),lineHeight:"normal",fontSize:"sm"}}var Vg={parts:["requiredIndicator","helperText"],baseStyle:e=>({requiredIndicator:Ug(e),helperText:jg(e)})},Wg={baseStyle:{fontSize:"md",marginEnd:3,mb:2,fontWeight:"medium",transition:"all 0.2s",opacity:1,_disabled:{opacity:.4}}},Gg={baseStyle:{fontFamily:"heading",fontWeight:"bold"},sizes:{"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},defaultProps:{size:"xl"}},qg={lg:{fontSize:"lg",px:4,h:12,borderRadius:"md"},md:{fontSize:"md",px:4,h:10,borderRadius:"md"},sm:{fontSize:"sm",px:3,h:8,borderRadius:"sm"},xs:{fontSize:"xs",px:2,h:6,borderRadius:"sm"}};function Xg(e){var{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Xm("blue.500","blue.300")(e),errorBorderColor:n||Xm("red.500","red.300")(e)}}var Yg={parts:["field","addon"],baseStyle:{field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transition:"all 0.2s"}},sizes:{lg:{field:qg.lg,addon:qg.lg},md:{field:qg.md,addon:qg.md},sm:{field:qg.sm,addon:qg.sm},xs:{field:qg.xs,addon:qg.xs}},variants:{outline:function(e){var{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Xg(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Xm("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_disabled:{opacity:.4,cursor:"not-allowed"},_invalid:{borderColor:jm(t,r),boxShadow:"0 0 0 1px "+jm(t,r)},_focus:{zIndex:1,borderColor:jm(t,n),boxShadow:"0 0 0 1px "+jm(t,n)}},addon:{border:"1px solid",borderColor:Xm("inherit","whiteAlpha.50")(e),bg:Xm("gray.100","whiteAlpha.300")(e)}}},filled:function(e){var{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Xg(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Xm("gray.100","whiteAlpha.50")(e),_hover:{bg:Xm("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_disabled:{opacity:.4,cursor:"not-allowed"},_invalid:{borderColor:jm(t,r)},_focus:{bg:"transparent",borderColor:jm(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Xm("gray.100","whiteAlpha.50")(e)}}},flushed:function(e){var{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Xg(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:0,px:0,bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:jm(t,r),boxShadow:"0px 1px 0px 0px "+jm(t,r)},_focus:{borderColor:jm(t,n),boxShadow:"0px 1px 0px 0px "+jm(t,n)}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:0,px:0,bg:"transparent"}}},unstyled:{field:{bg:"transparent",px:0,height:"auto"},addon:{bg:"transparent",px:0,height:"auto"}}},defaultProps:{size:"md",variant:"outline"}};var $g={baseStyle:function(e){return{bg:Xm("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}}},Zg={baseStyle:{transition:"all 0.15s ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focus:{boxShadow:"outline"}}},Jg={parts:["container","item","icon"],baseStyle:{container:{},item:{},icon:{marginEnd:"0.5rem",display:"inline",verticalAlign:"text-bottom"}}};function Qg(e){return{bg:Xm("#fff","gray.700")(e),boxShadow:Xm("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}}function Kg(e){return{py:"0.4rem",px:"0.8rem",transition:"background 50ms ease-in 0s",_focus:{bg:Xm("gray.100","whiteAlpha.100")(e)},_active:{bg:Xm("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Xm("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}}var ev,tv={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},nv={opacity:.6},rv={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"0.5rem",opacity:.6},iv={parts:["item","command","list","button","groupTitle","divider"],baseStyle:e=>({list:Qg(e),item:Kg(e),groupTitle:tv,command:nv,divider:rv})},ov={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}};function av(){return(av=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var{variants:sv,defaultProps:lv}=Yg,cv={"--number-input-stepper-width":"24px","--number-input-field-padding":"calc(var(--number-input-stepper-width) + 0.5rem)"},uv=null==(ev=Yg.baseStyle)?void 0:ev.field,dv={width:"var(--number-input-stepper-width)"};function hv(e){return{borderStart:"1px solid",borderStartColor:Xm("inherit","whiteAlpha.300")(e),color:Xm("inherit","whiteAlpha.800")(e),_active:{bg:Xm("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}}function fv(e){var t=Yg.sizes[e],n={lg:"md",md:"md",sm:"sm",xs:"sm"},r=ov.fontSizes[t.field.fontSize];return{field:av({},t.field,{paddingInlineEnd:"var(--number-input-field-padding)",verticalAlign:"top"}),stepper:{fontSize:"calc("+r+" * 0.75)",_first:{borderTopEndRadius:n[e]},_last:{borderBottomEndRadius:n[e],mt:"-1px",borderTopWidth:1}}}}var pv={parts:["root","field","stepper","stepperGroup"],baseStyle:e=>({root:cv,field:uv,stepperGroup:dv,stepper:hv(e)}),sizes:{xs:fv("xs"),sm:fv("sm"),md:fv("md"),lg:fv("lg")},variants:sv,defaultProps:lv};function mv(){return(mv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gv={baseStyle:mv({},Yg.baseStyle.field,{textAlign:"center"}),sizes:{lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},variants:{outline:e=>Yg.variants.outline(e).field,flushed:e=>Yg.variants.flushed(e).field,filled:e=>Yg.variants.filled(e).field,unstyled:Yg.variants.unstyled.field},defaultProps:Yg.defaultProps},vv={zIndex:10};function yv(e){return{"--popover-bg":"colors."+Xm("white","gray.700")(e),bg:"var(--popover-bg)","--popper-arrow-bg":"var(--popover-bg)","--popper-arrow-shadow-color":"colors."+Xm("gray.200","whiteAlpha.300")(e),width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focus:{outline:0,boxShadow:"outline"}}}var bv={px:3,py:2,borderBottomWidth:"1px"},xv={px:3,py:2},_v={px:3,py:2,borderTopWidth:"1px"},wv={parts:["popper","content","header","body","footer","arrow"],baseStyle:e=>({popper:vv,content:yv(e),header:bv,body:xv,footer:_v,arrow:{}})};function Sv(){return(Sv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Mv={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"};function Ev(e){return{bg:Xm("gray.100","whiteAlpha.300")(e)}}function Tv(e){return Sv({transition:"all 0.3s"},function(e){var{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Xm(Gm(),Gm("1rem","rgba(0,0,0,0.1)"))(e),a=Xm(t+".500",t+".200")(e),s="linear-gradient(\n to right,\n transparent 0%,\n "+jm(n,a)+" 50%,\n transparent 100%\n )";return Sv({},!r&&i&&o,r?{bgImage:s}:{bgColor:a})}(e))}var Av={parts:["track","filledTrack","label"],sizes:{xs:{track:{h:"0.25rem"}},sm:{track:{h:"0.5rem"}},md:{track:{h:"0.75rem"}},lg:{track:{h:"1rem"}}},baseStyle:e=>({label:Mv,filledTrack:Tv(e),track:Ev(e)}),defaultProps:{size:"md",colorScheme:"blue"}};function Cv(){return(Cv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function kv(e){var{control:t}=pg.baseStyle(e);return Cv({},t,{borderRadius:"full",_checked:Cv({},t._checked,{_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}})})}var Pv={parts:["container","control","label"],baseStyle:e=>({label:pg.baseStyle(e).label,control:kv(e)}),sizes:{md:{control:{w:4,h:4},label:{fontSize:"md"}},lg:{control:{w:5,h:5},label:{fontSize:"lg"}},sm:{control:{width:3,height:3},label:{fontSize:"sm"}}},defaultProps:{size:"md",colorScheme:"blue"}};function Lv(){return(Lv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Rv(e){return Lv({},Yg.baseStyle.field,{appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Xm("white","gray.700")(e)}})}var Ov={width:"1.5rem",height:"100%",insetEnd:"0.5rem",position:"relative",color:"currentColor",fontSize:"1.25rem",_disabled:{opacity:.5}},Dv={parts:["field","icon"],baseStyle:e=>({field:Rv(e),icon:Ov}),sizes:ah({},Yg.sizes,{xs:{icon:{insetEnd:"0.25rem"}}}),variants:Yg.variants,defaultProps:Yg.defaultProps},Iv=(e,t)=>Zd({from:{borderColor:e,background:e},to:{borderColor:t,background:t}}),zv={baseStyle:e=>{var t=Xm("gray.100","gray.800")(e),n=Xm("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,speed:o,theme:a}=e,s=jm(a,r),l=jm(a,i);return{opacity:.7,borderRadius:"2px",borderColor:s,background:l,animation:o+"s linear infinite alternate "+Iv(s,l)}}},Nv={baseStyle:e=>({borderRadius:"md",fontWeight:"semibold",_focus:{boxShadow:"outline",padding:"1rem",position:"fixed",top:"1.5rem",insetStart:"1.5rem",bg:Xm("white","gray.700")(e)}})};function Bv(){return(Bv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Fv=e=>{var{orientation:t}=e;return Bv({_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"}},Ym({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}}))};function Hv(e){return{borderRadius:"sm",bg:Xm("gray.200","whiteAlpha.200")(e),_disabled:{bg:Xm("gray.300","whiteAlpha.300")(e)}}}function Uv(e){return Bv({zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transition:"transform 0.2s",_focus:{boxShadow:"outline"},_disabled:{bg:"gray.300"}},function(e){return Ym({orientation:e.orientation,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}})}(e))}function jv(e){var{colorScheme:t}=e;return{bg:Xm(t+".500",t+".200")(e)}}var Vv={parts:["container","thumb","track","filledTrack"],sizes:{lg:function(e){return{thumb:{w:"16px",h:"16px"},track:Ym({orientation:e.orientation,horizontal:{h:"4px"},vertical:{w:"4px"}})}},md:function(e){return{thumb:{w:"14px",h:"14px"},track:Ym({orientation:e.orientation,horizontal:{h:"4px"},vertical:{w:"4px"}})}},sm:function(e){return{thumb:{w:"10px",h:"10px"},track:Ym({orientation:e.orientation,horizontal:{h:"2px"},vertical:{w:"2px"}})}}},baseStyle:e=>({container:Fv(e),track:Hv(e),thumb:Uv(e),filledTrack:jv(e)}),defaultProps:{size:"md",colorScheme:"blue"}},Wv={baseStyle:{width:"var(--spinner-size)",height:"var(--spinner-size)"},sizes:{xs:{"--spinner-size":"0.75rem"},sm:{"--spinner-size":"1rem"},md:{"--spinner-size":"1.5rem"},lg:{"--spinner-size":"2rem"},xl:{"--spinner-size":"3rem"}},defaultProps:{size:"md"}},Gv={parts:["label","number","icon","helpText"],baseStyle:{label:{fontWeight:"medium"},helpText:{opacity:.8,marginBottom:2},number:{verticalAlign:"baseline",fontWeight:"semibold"},icon:{marginEnd:1,w:"14px",h:"14px",verticalAlign:"middle"}},sizes:{md:{label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}}},defaultProps:{size:"md"}};function qv(e){var{colorScheme:t}=e;return{borderRadius:"full",p:"2px",width:"var(--slider-track-width)",height:"var(--slider-track-height)",transition:"all 120ms",bg:Xm("gray.300","whiteAlpha.400")(e),_focus:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{bg:Xm(t+".500",t+".200")(e)}}}var Xv={bg:"white",transition:"transform 250ms",borderRadius:"inherit",width:"var(--slider-track-height)",height:"var(--slider-track-height)",_checked:{transform:"translateX(var(--slider-thumb-x))"}},Yv={parts:["container","track","thumb"],baseStyle:e=>({container:{"--slider-track-diff":"calc(var(--slider-track-width) - var(--slider-track-height))","--slider-thumb-x":"var(--slider-track-diff)",_rtl:{"--slider-thumb-x":"calc(-1 * var(--slider-track-diff))"}},track:qv(e),thumb:Xv}),sizes:{sm:{container:{"--slider-track-width":"1.375rem","--slider-track-height":"0.75rem"}},md:{container:{"--slider-track-width":"1.875rem","--slider-track-height":"1rem"}},lg:{container:{"--slider-track-width":"2.875rem","--slider-track-height":"1.5rem"}}},defaultProps:{size:"md",colorScheme:"blue"}};function $v(){return($v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Zv={"&[data-is-numeric=true]":{textAlign:"end"}},Jv={parts:["table","thead","tbody","tr","th","td","caption"],baseStyle:{table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}},variants:{simple:e=>{var{colorScheme:t}=e;return{th:$v({color:Xm("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Xm(t+".100",t+".700")(e)},Zv),td:$v({borderBottom:"1px",borderColor:Xm(t+".100",t+".700")(e)},Zv),caption:{color:Xm("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}},striped:e=>{var{colorScheme:t}=e;return{th:$v({color:Xm("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Xm(t+".100",t+".700")(e)},Zv),td:$v({borderBottom:"1px",borderColor:Xm(t+".100",t+".700")(e)},Zv),caption:{color:Xm("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Xm(t+".100",t+".700")(e)},td:{background:Xm(t+".100",t+".700")(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}},unstyled:{}},sizes:{sm:{th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}},md:{th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}},lg:{th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}}},defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}};function Qv(e){var{orientation:t}=e;return{display:"vertical"===t?"flex":"block"}}function Kv(e){var{isFitted:t}=e;return{flex:t?1:void 0,transition:"all 0.2s",_focus:{zIndex:1,boxShadow:"outline"}}}function ey(e){var{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:"vertical"===n?"column":"row"}}var ty={p:4};var ny={parts:["root","tablist","tab","tabpanels","tabpanel","indicator"],baseStyle:e=>({root:Qv(e),tab:Kv(e),tablist:ey(e),tabpanel:ty}),sizes:{sm:{tab:{py:"0.25rem",px:"1rem",fontSize:"0.85rem"}},md:{tab:{fontSize:"1rem",py:"0.5rem",px:"1rem"}},lg:{tab:{fontSize:"1.15rem",py:"0.75rem",px:"1rem"}}},variants:{line:function(e){var{colorScheme:t,orientation:n}=e,r="vertical"===n?"borderStart":"borderBottom";return{tablist:{[r]:"2px solid",borderColor:"inherit"},tab:{[r]:"2px solid",borderColor:"transparent",["vertical"===n?"marginStart":"marginBottom"]:"-2px",_selected:{color:Xm(t+".600",t+".300")(e),borderColor:"currentColor"},_active:{bg:Xm("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}}},enclosed:function(e){var{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Xm(t+".600",t+".300")(e),borderColor:"inherit",borderBottomColor:Xm("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}},"enclosed-colored":function(e){var{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Xm("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Xm("#fff","gray.800")(e),color:Xm(t+".600",t+".300")(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}},"soft-rounded":function(e){var{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:jm(n,t+".700"),bg:jm(n,t+".100")}}}},"solid-rounded":function(e){var{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Xm("gray.600","inherit")(e),_selected:{color:Xm("#fff","gray.800")(e),bg:Xm(t+".600",t+".300")(e)}}}},unstyled:{}},defaultProps:{size:"md",variant:"line",colorScheme:"blue"}},ry={parts:["container","label","closeButton"],variants:{subtle:e=>({container:ag.variants.subtle(e)}),solid:e=>({container:ag.variants.solid(e)}),outline:e=>({container:ag.variants.outline(e)})},baseStyle:{container:{fontWeight:"medium",lineHeight:1.2,outline:0,_focus:{boxShadow:"outline"}},label:{lineHeight:1.2},closeButton:{fontSize:"18px",w:"1.25rem",h:"1.25rem",borderRadius:"full",marginStart:"0.375rem",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focus:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}}},sizes:{sm:{container:{minH:"1.25rem",minW:"1.25rem",fontSize:"xs",px:2,borderRadius:"md"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}},md:{container:{minH:"1.5rem",minW:"1.5rem",fontSize:"sm",borderRadius:"md",px:2}},lg:{container:{minH:8,minW:8,fontSize:"md",borderRadius:"md",px:3}}},defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}};function iy(){return(iy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var oy=iy({},Yg.baseStyle.field,{paddingY:"8px",minHeight:"80px",lineHeight:"short"}),ay={outline:e=>Yg.variants.outline(e).field,flushed:e=>Yg.variants.flushed(e).field,filled:e=>Yg.variants.filled(e).field,unstyled:Yg.variants.unstyled.field},sy={xs:Yg.sizes.xs.field,sm:Yg.sizes.sm.field,md:Yg.sizes.md.field,lg:Yg.sizes.lg.field};function ly(e){return{color:Xm("red.500","red.300")(e),mt:2,fontSize:"sm"}}function cy(e){return{marginEnd:"0.5em",color:Xm("red.500","red.300")(e)}}var uy,dy={Accordion:Fm,Alert:Jm,Avatar:og,Badge:ag,Breadcrumb:sg,Button:dg,Checkbox:pg,CloseButton:mg,Code:yg,Container:bg,Divider:xg,Drawer:Fg,Editable:Hg,Form:Vg,FormLabel:Wg,Heading:Gg,Input:Yg,Kbd:$g,Link:Zg,List:Jg,Menu:iv,Modal:kg,NumberInput:pv,PinInput:gv,Popover:wv,Progress:Av,Radio:Pv,Select:Dv,Skeleton:zv,SkipLink:Nv,Slider:Vv,Spinner:Wv,Stat:Gv,Switch:Yv,Table:Jv,Tabs:ny,Tag:ry,Textarea:{baseStyle:oy,sizes:sy,variants:ay,defaultProps:{size:"md",variant:"outline"}},Tooltip:{baseStyle:function(e){return{"--tooltip-bg":"colors."+Xm("gray.700","gray.300")(e),px:"8px",py:"2px",bg:"var(--tooltip-bg)","--popper-arrow-bg":"var(--tooltip-bg)",color:Xm("whiteAlpha.900","gray.900")(e),borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"320px",zIndex:"tooltip"}}},FormError:{parts:["text","icon"],baseStyle:e=>({text:ly(e),icon:cy(e)})}};function hy(){return(hy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function fy(){return(fy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var py=fy({direction:"ltr"},hy({breakpoints:(uy={sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Oh({condition:!0,message:["[chakra-ui]: createBreakpoints(...) will be deprecated pretty soon","simply pass the breakpoints as an object. Remove the createBreakpoint(..) call"].join("")}),$m({base:"0em"},uy)),zIndices:{hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},radii:{none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},blur:{none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},colors:{transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}}},ov,{sizes:eg,shadows:{xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},space:Qm,borders:{none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},transition:{property:{common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},easing:{"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},duration:{"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"}}}),{components:dy,styles:{global:e=>({body:{fontFamily:"body",color:Xm("gray.800","whiteAlpha.900")(e),bg:Xm("white","gray.800")(e),transition:"background-color 0.2s",lineHeight:"base"},"*::placeholder":{color:Xm("gray.400","whiteAlpha.400")(e)},"*, *::before, &::after":{borderColor:Xm("gray.200","whiteAlpha.300")(e),wordWrap:"break-word"}})},config:{useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"}}),my={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]})},gy=()=>{},vy=_h?{window:window,document:document}:{window:{document:my,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:gy,removeEventListener:gy,getComputedStyle:()=>({getPropertyValue:()=>""}),matchMedia:()=>({matches:!1,addListener:gy,removeListener:gy}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)},setTimeout:()=>0,clearTimeout:gy,setInterval:()=>0,clearInterval:gy},document:my},yy=h.exports.createContext(vy);function by(e){var{children:t,environment:n}=e,[r,i]=h.exports.useState(null),o=h.exports.useMemo((()=>{var e,t=null==r?void 0:r.ownerDocument,i=null==r?void 0:r.ownerDocument.defaultView;return null!=(e=null!=n?n:t?{document:t,window:i}:void 0)?e:vy}),[r,n]),a=!r&&!n;return $.createElement(yy.Provider,{value:o},t,a&&$.createElement("span",{ref:e=>{e&&i(e)}}))}var xy=e=>{var{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o=py,environment:a,cssVarsRoot:s}=e;return h.exports.createElement(by,{environment:a},h.exports.createElement(gm,{theme:o,cssVarsRoot:s},h.exports.createElement(Df,{colorModeManager:n,options:o.config},i&&h.exports.createElement(Jd,null),h.exports.createElement(bm,null),r?h.exports.createElement(of,{zIndex:r},t):t)))};function _y(){return(_y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var wy={path:h.exports.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},h.exports.createElement("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),h.exports.createElement("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),h.exports.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})),viewBox:"0 0 24 24"},Sy=Im(((e,t)=>{var{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l}=e,c=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["as","viewBox","color","focusable","children","className","__css"]),u={ref:t,focusable:o,className:Mh("chakra-icon",s),__css:_y({w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i},l)},d=null!=r?r:wy.viewBox;if(n&&"string"!=typeof n)return h.exports.createElement(Dm.svg,_y({as:n},u,c));var f=null!=a?a:wy.path;return h.exports.createElement(Dm.svg,_y({verticalAlign:"middle",viewBox:d},u,c),f)})),My=function(e,t){return(My=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Ey(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}My(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ty=function(){return(Ty=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Ay(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function Cy(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function ky(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}var Py=function(e){return{isEnabled:function(t){return e.some((function(e){return!!t[e]}))}}},Ly={measureLayout:Py(["layout","layoutId","drag","_layoutResetTransform"]),animation:Py(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:Py(["exit"]),drag:Py(["drag","dragControls"]),focus:Py(["whileFocus"]),hover:Py(["whileHover","onHoverStart","onHoverEnd"]),tap:Py(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Py(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:Py(["layout","layoutId"])};var Ry=h.exports.createContext({strict:!1}),Oy=Object.keys(Ly),Dy=Oy.length;var Iy=h.exports.createContext({transformPagePoint:function(e){return e},isStatic:!1}),zy=h.exports.createContext({});var Ny=h.exports.createContext(null);function By(e){var t=h.exports.useRef(null);return null===t.current&&(t.current=e()),t.current}function Fy(){var e=h.exports.useContext(Ny);if(null===e)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,i=jy();h.exports.useEffect((function(){return r(i)}),[]);return!t&&n?[!1,function(){return null==n?void 0:n(i)}]:[!0]}var Hy=0,Uy=function(){return Hy++},jy=function(){return By(Uy)},Vy=h.exports.createContext(null),Wy="undefined"!=typeof window,Gy=Wy?h.exports.useLayoutEffect:h.exports.useEffect;function qy(e,t,n,r){var i=h.exports.useContext(Iy),o=h.exports.useContext(Ry),a=h.exports.useContext(zy).visualElement,s=h.exports.useContext(Ny),l=function(e){var t=e.layoutId,n=h.exports.useContext(Vy);return n&&void 0!==t?n+"-"+t:t}(n),c=h.exports.useRef(void 0);r||(r=o.renderer),!c.current&&r&&(c.current=r(e,{visualState:t,parent:a,props:Ty(Ty({},n),{layoutId:l}),presenceId:null==s?void 0:s.id,blockInitialAnimation:!1===(null==s?void 0:s.initial)}));var u=c.current;return Gy((function(){var e;u&&(u.setProps(Ty(Ty(Ty({},i),n),{layoutId:l})),u.isPresent=null===(e=s)||e.isPresent,u.isPresenceRoot=!a||a.presenceId!==(null==s?void 0:s.id),u.syncRender())})),h.exports.useEffect((function(){var e;u&&(null===(e=u.animationState)||void 0===e||e.animateChanges())})),Gy((function(){return function(){return null==u?void 0:u.notifyUnmount()}}),[]),u}function Xy(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Yy(e){return Array.isArray(e)}function $y(e){return"string"==typeof e||Yy(e)}function Zy(e,t,n,r,i){var o;return void 0===r&&(r={}),void 0===i&&(i={}),"string"==typeof t&&(t=null===(o=e.variants)||void 0===o?void 0:o[t]),"function"==typeof t?t(null!=n?n:e.custom,r,i):t}function Jy(e,t,n){var r=e.getProps();return Zy(r,t,null!=n?n:r.custom,function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.get()})),t}(e),function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.getVelocity()})),t}(e))}function Qy(e){var t;return"function"==typeof(null===(t=e.animate)||void 0===t?void 0:t.start)||$y(e.initial)||$y(e.animate)||$y(e.whileHover)||$y(e.whileDrag)||$y(e.whileTap)||$y(e.whileFocus)||$y(e.exit)}function Ky(e){return Boolean(Qy(e)||e.variants)}function eb(e,t){var n=function(e,t){if(Qy(e)){var n=e.initial,r=e.animate;return{initial:!1===n||$y(n)?n:void 0,animate:$y(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,h.exports.useContext(zy)),r=n.initial,i=n.animate;return h.exports.useMemo((function(){return{initial:r,animate:i}}),t?[tb(r),tb(i)]:[])}function tb(e){return Array.isArray(e)?e.join(" "):e}function nb(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.useRender,i=e.useVisualState,o=e.Component;return t&&function(e){for(var t in e){var n=e[t];null!==n&&(Ly[t].Component=n)}}(t),h.exports.forwardRef((function(e,t){var a=h.exports.useContext(Iy).isStatic,s=null,l=eb(e,a),c=i(e,a);return!a&&Wy&&(l.visualElement=qy(o,c,e,n),s=function(e,t,n){var r=[];if(h.exports.useContext(Ry),!t)return null;for(var i=0;i<Dy;i++){var o=Oy[i],a=Ly[o],s=a.isEnabled,l=a.Component;s(e)&&l&&r.push(h.exports.createElement(l,Ty({key:o},e,{visualElement:t})))}return r}(e,l.visualElement)),h.exports.createElement(h.exports.Fragment,null,h.exports.createElement(zy.Provider,{value:l},r(o,e,function(e,t,n){return h.exports.useCallback((function(r){var i;r&&(null===(i=e.mount)||void 0===i||i.call(e,r)),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Xy(n)&&(n.current=r))}),[t])}(c,l.visualElement,t),c,a)),s)}))}function rb(e){function t(t,n){return void 0===n&&(n={}),nb(e(t,n))}var n=new Map;return new Proxy(t,{get:function(e,r){return n.has(r)||n.set(r,t(r)),n.get(r)}})}var ib=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function ob(e){return"string"==typeof e&&!e.includes("-")&&!!(ib.indexOf(e)>-1||/[A-Z]/.test(e))}var ab={};var sb=["","X","Y","Z"],lb=["transformPerspective","x","y","z"];function cb(e,t){return lb.indexOf(e)-lb.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return sb.forEach((function(t){return lb.push(e+t)}))}));var ub=new Set(lb);function db(e){return ub.has(e)}var hb=new Set(["originX","originY","originZ"]);function fb(e){return hb.has(e)}function pb(e,t){var n=t.layout,r=t.layoutId;return db(e)||fb(e)||(n||void 0!==r)&&(!!ab[e]||"opacity"===e)}var mb=function(e){return null!==e&&"object"==typeof e&&e.getVelocity},gb={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function vb(e){return e.startsWith("--")}var yb=function(e,t){return t&&"number"==typeof e?t.transform(e):e},bb=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},xb=function(e){return e%1?Number(e.toFixed(5)):e},_b=/(-)?([\d]*\.?[\d])+/g,wb=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Sb=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Mb(e){return"string"==typeof e}var Eb={test:function(e){return"number"==typeof e},parse:parseFloat,transform:function(e){return e}},Tb=Ty(Ty({},Eb),{transform:bb(0,1)}),Ab=Ty(Ty({},Eb),{default:1}),Cb=function(e){return{test:function(t){return Mb(t)&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},kb=Cb("deg"),Pb=Cb("%"),Lb=Cb("px"),Rb=Cb("vh"),Ob=Cb("vw"),Db=Ty(Ty({},Pb),{parse:function(e){return Pb.parse(e)/100},transform:function(e){return Pb.transform(100*e)}}),Ib=function(e,t){return function(n){return Boolean(Mb(n)&&Sb.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t))}},zb=function(e,t,n){return function(r){var i;if(!Mb(r))return r;var o=r.match(_b),a=o[0],s=o[1],l=o[2],c=o[3];return(i={})[e]=parseFloat(a),i[t]=parseFloat(s),i[n]=parseFloat(l),i.alpha=void 0!==c?parseFloat(c):1,i}},Nb={test:Ib("hsl","hue"),parse:zb("hue","saturation","lightness"),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,i=e.alpha,o=void 0===i?1:i;return"hsla("+Math.round(t)+", "+Pb.transform(xb(n))+", "+Pb.transform(xb(r))+", "+xb(Tb.transform(o))+")"}},Bb=bb(0,255),Fb=Ty(Ty({},Eb),{transform:function(e){return Math.round(Bb(e))}}),Hb={test:Ib("rgb","red"),parse:zb("red","green","blue"),transform:function(e){var t=e.red,n=e.green,r=e.blue,i=e.alpha,o=void 0===i?1:i;return"rgba("+Fb.transform(t)+", "+Fb.transform(n)+", "+Fb.transform(r)+", "+xb(Tb.transform(o))+")"}};var Ub={test:Ib("#"),parse:function(e){var t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:Hb.transform},jb={test:function(e){return Hb.test(e)||Ub.test(e)||Nb.test(e)},parse:function(e){return Hb.test(e)?Hb.parse(e):Nb.test(e)?Nb.parse(e):Ub.parse(e)},transform:function(e){return Mb(e)?e:e.hasOwnProperty("red")?Hb.transform(e):Nb.transform(e)}};function Vb(e){var t=[],n=0,r=e.match(wb);r&&(n=r.length,e=e.replace(wb,"${c}"),t.push.apply(t,r.map(jb.parse)));var i=e.match(_b);return i&&(e=e.replace(_b,"${n}"),t.push.apply(t,i.map(Eb.parse))),{values:t,numColors:n,tokenised:e}}function Wb(e){return Vb(e).values}function Gb(e){var t=Vb(e),n=t.values,r=t.numColors,i=t.tokenised,o=n.length;return function(e){for(var t=i,n=0;n<o;n++)t=t.replace(n<r?"${c}":"${n}",n<r?jb.transform(e[n]):xb(e[n]));return t}}var qb=function(e){return"number"==typeof e?0:e};var Xb={test:function(e){var t,n,r,i;return isNaN(e)&&Mb(e)&&(null!==(n=null===(t=e.match(_b))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(i=null===(r=e.match(wb))||void 0===r?void 0:r.length)&&void 0!==i?i:0)>0},parse:Wb,createTransformer:Gb,getAnimatableNone:function(e){var t=Wb(e);return Gb(e)(t.map(qb))}},Yb=new Set(["brightness","contrast","saturate","opacity"]);function $b(e){var t=e.slice(0,-1).split("("),n=t[0],r=t[1];if("drop-shadow"===n)return e;var i=(r.match(_b)||[])[0];if(!i)return e;var o=r.replace(i,""),a=Yb.has(n)?1:0;return i!==r&&(a*=100),n+"("+a+o+")"}var Zb=/([a-z-]*)\(.*?\)/g,Jb=Ty(Ty({},Xb),{getAnimatableNone:function(e){var t=e.match(Zb);return t?t.map($b).join(" "):e}}),Qb=Ty(Ty({},Eb),{transform:Math.round}),Kb={borderWidth:Lb,borderTopWidth:Lb,borderRightWidth:Lb,borderBottomWidth:Lb,borderLeftWidth:Lb,borderRadius:Lb,radius:Lb,borderTopLeftRadius:Lb,borderTopRightRadius:Lb,borderBottomRightRadius:Lb,borderBottomLeftRadius:Lb,width:Lb,maxWidth:Lb,height:Lb,maxHeight:Lb,size:Lb,top:Lb,right:Lb,bottom:Lb,left:Lb,padding:Lb,paddingTop:Lb,paddingRight:Lb,paddingBottom:Lb,paddingLeft:Lb,margin:Lb,marginTop:Lb,marginRight:Lb,marginBottom:Lb,marginLeft:Lb,rotate:kb,rotateX:kb,rotateY:kb,rotateZ:kb,scale:Ab,scaleX:Ab,scaleY:Ab,scaleZ:Ab,skew:kb,skewX:kb,skewY:kb,distance:Lb,translateX:Lb,translateY:Lb,translateZ:Lb,x:Lb,y:Lb,z:Lb,perspective:Lb,transformPerspective:Lb,opacity:Tb,originX:Db,originY:Db,originZ:Lb,zIndex:Qb,fillOpacity:Tb,strokeOpacity:Tb,numOctaves:Qb};function ex(e,t,n,r,i,o,a,s){var l,c=e.style,u=e.vars,d=e.transform,h=e.transformKeys,f=e.transformOrigin;h.length=0;var p=!1,m=!1,g=!0;for(var v in t){var y=t[v];if(vb(v))u[v]=y;else{var b=Kb[v],x=yb(y,b);if(db(v)){if(p=!0,d[v]=x,h.push(v),!g)continue;y!==(null!==(l=b.default)&&void 0!==l?l:0)&&(g=!1)}else if(fb(v))f[v]=x,m=!0;else if((null==n?void 0:n.isHydrated)&&(null==r?void 0:r.isHydrated)&&ab[v]){var _=ab[v].process(y,r,n),w=ab[v].applyTo;if(w)for(var S=w.length,M=0;M<S;M++)c[w[M]]=_;else c[v]=_}else c[v]=x}}r&&n&&a&&s?(c.transform=a(r.deltaFinal,r.treeScale,p?d:void 0),o&&(c.transform=o(d,c.transform)),c.transformOrigin=s(r)):(p&&(c.transform=function(e,t,n,r){var i=e.transform,o=e.transformKeys,a=t.enableHardwareAcceleration,s=void 0===a||a,l=t.allowTransformNone,c=void 0===l||l,u="";o.sort(cb);for(var d=!1,h=o.length,f=0;f<h;f++){var p=o[f];u+=(gb[p]||p)+"("+i[p]+") ","z"===p&&(d=!0)}return!d&&s?u+="translateZ(0)":u=u.trim(),r?u=r(i,n?"":u):c&&n&&(u="none"),u}(e,i,g,o)),m&&(c.transformOrigin=function(e){var t=e.originX,n=void 0===t?"50%":t,r=e.originY,i=void 0===r?"50%":r,o=e.originZ;return n+" "+i+" "+(void 0===o?0:o)}(f)))}var tx=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function nx(e,t,n){for(var r in t)mb(t[r])||pb(r,n)||(e[r]=t[r])}function rx(e,t,n){var r={};return nx(r,e.style||{},e),Object.assign(r,function(e,t,n){var r=e.transformTemplate;return h.exports.useMemo((function(){var e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};ex(e,t,void 0,void 0,{enableHardwareAcceleration:!n},r);var i=e.style;return Ty(Ty({},e.vars),i)}),[t])}(e,t,n)),e.transformValues&&(r=e.transformValues(r)),r}function ix(e,t,n){var r={},i=rx(e,t,n);return Boolean(e.drag)&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),r.style=i,r}var ox=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutResetTransform","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function ax(e){return ox.has(e)}var sx=function(e){return!ax(e)};try{var lx=require("@emotion/is-prop-valid").default;sx=function(e){return e.startsWith("on")?!ax(e):lx(e)}}catch(m2){}function cx(e,t,n){return"string"==typeof e?e:Lb.transform(t+n*e)}var ux=function(e,t){return Lb.transform(e*t)},dx={offset:"stroke-dashoffset",array:"stroke-dasharray"},hx={offset:"strokeDashoffset",array:"strokeDasharray"};function fx(e,t,n,r,i,o,a,s){var l=t.attrX,c=t.attrY,u=t.originX,d=t.originY,h=t.pathLength,f=t.pathSpacing,p=void 0===f?1:f,m=t.pathOffset,g=void 0===m?0:m;ex(e,Ay(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r,i,o,a,s),e.attrs=e.style,e.style={};var v=e.attrs,y=e.style,b=e.dimensions,x=e.totalPathLength;v.transform&&(b&&(y.transform=v.transform),delete v.transform),b&&(void 0!==u||void 0!==d||y.transform)&&(y.transformOrigin=function(e,t,n){return cx(t,e.x,e.width)+" "+cx(n,e.y,e.height)}(b,void 0!==u?u:.5,void 0!==d?d:.5)),void 0!==l&&(v.x=l),void 0!==c&&(v.y=c),void 0!==x&&void 0!==h&&function(e,t,n,r,i,o){void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=!0);var a=o?dx:hx;e[a.offset]=ux(-i,t);var s=ux(n,t),l=ux(r,t);e[a.array]=s+" "+l}(v,x,h,p,g,!1)}var px=function(){return Ty(Ty({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function mx(e,t){var n=h.exports.useMemo((function(){var n=px();return fx(n,t,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),Ty(Ty({},n.attrs),{style:Ty({},n.style)})}),[t]);if(e.style){var r={};nx(r,e.style,e),n.style=Ty(Ty({},r),n.style)}return n}function gx(e){void 0===e&&(e=!1);return function(t,n,r,i,o){var a=i.latestValues,s=(ob(t)?mx:ix)(n,a,o),l=function(e,t,n){var r={};for(var i in e)(sx(i)||!0===n&&ax(i)||!t&&!ax(i))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),c=Ty(Ty(Ty({},l),s),{ref:r});return h.exports.createElement(t,c)}}var vx=/([a-z])([A-Z])/g,yx=function(e){return e.replace(vx,"$1-$2").toLowerCase()};function bx(e,t){var n=t.style,r=t.vars;for(var i in Object.assign(e.style,n),r)e.style.setProperty(i,r[i])}var xx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function _x(e,t){for(var n in bx(e,t),t.attrs)e.setAttribute(xx.has(n)?n:yx(n),t.attrs[n])}function wx(e){var t=e.style,n={};for(var r in t)(mb(t[r])||pb(r,e))&&(n[r]=t[r]);return n}function Sx(e){var t=wx(e);for(var n in e){if(mb(e[n]))t["x"===n||"y"===n?"attr"+n.toUpperCase():n]=e[n]}return t}function Mx(e){return"object"==typeof e&&"function"==typeof e.start}var Ex=function(e){return Array.isArray(e)};function Tx(e){var t,n=mb(e)?e.get():e;return t=n,Boolean(t&&"object"==typeof t&&t.mix&&t.toValue)?n.toValue():n}function Ax(e,t,n,r){var i=e.scrapeMotionValuesFromProps,o=e.createRenderState,a=e.onMount,s={latestValues:kx(t,n,r,i),renderState:o()};return a&&(s.mount=function(e){return a(t,e,s)}),s}var Cx=function(e){return function(t,n){var r=h.exports.useContext(zy),i=h.exports.useContext(Ny);return n?Ax(e,t,r,i):By((function(){return Ax(e,t,r,i)}))}};function kx(e,t,n,r){var i={},o=!1===(null==n?void 0:n.initial),a=r(e);for(var s in a)i[s]=Tx(a[s]);var l=e.initial,c=e.animate,u=Qy(e),d=Ky(e);t&&d&&!u&&!1!==e.inherit&&(null!=l||(l=t.initial),null!=c||(c=t.animate));var h=o||!1===l?c:l;h&&"boolean"!=typeof h&&!Mx(h)&&(Array.isArray(h)?h:[h]).forEach((function(t){var n=Zy(e,t);if(n){var r=n.transitionEnd;n.transition;var o=Ay(n,["transitionEnd","transition"]);for(var a in o)i[a]=o[a];for(var a in r)i[a]=r[a]}}));return i}var Px={useVisualState:Cx({scrapeMotionValuesFromProps:Sx,createRenderState:px,onMount:function(e,t,n){var r=n.renderState,i=n.latestValues;try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(o){r.dimensions={x:0,y:0,width:0,height:0}}"path"===t.tagName&&(r.totalPathLength=t.getTotalLength()),fx(r,i,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),_x(t,r)}})};var Lx,Rx,Ox={useVisualState:Cx({scrapeMotionValuesFromProps:wx,createRenderState:tx})};function Dx(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function Ix(e,t,n,r){h.exports.useEffect((function(){var i=e.current;if(n&&i)return Dx(i,t,n,r)}),[e,t,n,r])}function zx(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function Nx(e){return!!e.touches}(Rx=Lx||(Lx={})).Animate="animate",Rx.Hover="whileHover",Rx.Tap="whileTap",Rx.Drag="whileDrag",Rx.Focus="whileFocus",Rx.Exit="exit";var Bx={pageX:0,pageY:0};function Fx(e,t){void 0===t&&(t="page");var n=e.touches[0]||e.changedTouches[0]||Bx;return{x:n[t+"X"],y:n[t+"Y"]}}function Hx(e,t){return void 0===t&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function Ux(e,t){return void 0===t&&(t="page"),{point:Nx(e)?Fx(e,t):Hx(e,t)}}var jx=function(e,t){void 0===t&&(t=!1);var n,r=function(t){return e(t,Ux(t))};return t?(n=r,function(e){var t=e instanceof MouseEvent;(!t||t&&0===e.button)&&n(e)}):r},Vx={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Wx={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Gx(e){return Wy&&null===window.onpointerdown?e:Wy&&null===window.ontouchstart?Wx[e]:Wy&&null===window.onmousedown?Vx[e]:e}function qx(e,t,n,r){return Dx(e,Gx(t),jx(n,"pointerdown"===t),r)}function Xx(e,t,n,r){return Ix(e,Gx(t),n&&jx(n,"pointerdown"===t),r)}function Yx(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var $x=Yx("dragHorizontal"),Zx=Yx("dragVertical");function Jx(e){var t=!1;if("y"===e)t=Zx();else if("x"===e)t=$x();else{var n=$x(),r=Zx();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function Qx(){var e=Jx(!0);return!e||(e(),!1)}function Kx(e,t,n){return function(r,i){var o;zx(r)&&!Qx()&&(null==n||n(r,i),null===(o=e.animationState)||void 0===o||o.setActive(Lx.Hover,t))}}var e_=function(e,t){return!!t&&(e===t||e_(e,t.parentElement))};function t_(e){return h.exports.useEffect((function(){return function(){return e()}}),[])}var n_=function(e,t,n){return Math.min(Math.max(n,e),t)};function r_(e){var t,n,r=e.duration,i=void 0===r?800:r,o=e.bounce,a=void 0===o?.25:o,s=e.velocity,l=void 0===s?0:s,c=e.mass,u=void 0===c?1:c,d=1-a;d=n_(.05,1,d),i=n_(.01,10,i/1e3),d<1?(t=function(e){var t=e*d,n=t*i;return.001-(t-l)/i_(e,d)*Math.exp(-n)},n=function(e){var n=e*d*i,r=n*l+l,o=Math.pow(d,2)*Math.pow(e,2)*i,a=Math.exp(-n),s=i_(Math.pow(e,2),d);return(.001-t(e)>0?-1:1)*((r-o)*a)/s}):(t=function(e){return Math.exp(-e*i)*((e-l)*i+1)-.001},n=function(e){return Math.exp(-e*i)*(i*i*(l-e))});var h=function(e,t,n){for(var r=n,i=1;i<12;i++)r-=e(r)/t(r);return r}(t,n,5/i);if(i*=1e3,isNaN(h))return{stiffness:100,damping:10,duration:i};var f=Math.pow(h,2)*u;return{stiffness:f,damping:2*d*Math.sqrt(u*f),duration:i}}function i_(e,t){return e*Math.sqrt(1-t*t)}var o_=["duration","bounce"],a_=["stiffness","damping","mass"];function s_(e,t){return t.some((function(t){return void 0!==e[t]}))}function l_(e){var t=e.from,n=void 0===t?0:t,r=e.to,i=void 0===r?1:r,o=e.restSpeed,a=void 0===o?2:o,s=e.restDelta,l=Ay(e,["from","to","restSpeed","restDelta"]),c={done:!1,value:n},u=function(e){var t=Ty({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!s_(e,a_)&&s_(e,o_)){var n=r_(e);(t=Ty(Ty(Ty({},t),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(l),d=u.stiffness,h=u.damping,f=u.mass,p=u.velocity,m=u.duration,g=u.isResolvedFromDuration,v=c_,y=c_;function b(){var e=p?-p/1e3:0,t=i-n,r=h/(2*Math.sqrt(d*f)),o=Math.sqrt(d/f)/1e3;if(null!=s||(s=Math.abs(i-n)<=1?.01:.4),r<1){var a=i_(o,r);v=function(n){var s=Math.exp(-r*o*n);return i-s*((e+r*o*t)/a*Math.sin(a*n)+t*Math.cos(a*n))},y=function(n){var i=Math.exp(-r*o*n);return r*o*i*(Math.sin(a*n)*(e+r*o*t)/a+t*Math.cos(a*n))-i*(Math.cos(a*n)*(e+r*o*t)-a*t*Math.sin(a*n))}}else if(1===r)v=function(n){return i-Math.exp(-o*n)*(t+(e+o*t)*n)};else{var l=o*Math.sqrt(r*r-1);v=function(n){var a=Math.exp(-r*o*n),s=Math.min(l*n,300);return i-a*((e+r*o*t)*Math.sinh(s)+l*t*Math.cosh(s))/l}}}return b(),{next:function(e){var t=v(e);if(g)c.done=e>=m;else{var n=1e3*y(e),r=Math.abs(n)<=a,o=Math.abs(i-t)<=s;c.done=r&&o}return c.value=c.done?i:t,c},flipTarget:function(){var e;p=-p,n=(e=[i,n])[0],i=e[1],b()}}}l_.needsInterpolation=function(e,t){return"string"==typeof e||"string"==typeof t};var c_=function(e){return 0},u_=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},d_=function(e,t,n){return-n*e+n*t+e},h_=function(e,t,n){var r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},f_=[Ub,Hb,Nb],p_=function(e){return f_.find((function(t){return t.test(e)}))},m_=function(e,t){var n=p_(e),r=p_(t);n.transform,r.transform;var i=n.parse(e),o=r.parse(t),a=Ty({},i),s=n===Nb?d_:h_;return function(e){for(var t in a)"alpha"!==t&&(a[t]=s(i[t],o[t],e));return a.alpha=d_(i.alpha,o.alpha,e),n.transform(a)}},g_=function(e){return"number"==typeof e},v_=function(e,t){return function(n){return t(e(n))}},y_=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(v_)};function b_(e,t){return g_(e)?function(n){return d_(e,t,n)}:jb.test(e)?m_(e,t):S_(e,t)}var x_=function(e,t){var n=ky([],e),r=n.length,i=e.map((function(e,n){return b_(e,t[n])}));return function(e){for(var t=0;t<r;t++)n[t]=i[t](e);return n}},__=function(e,t){var n=Ty(Ty({},e),t),r={};for(var i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=b_(e[i],t[i]));return function(e){for(var t in r)n[t]=r[t](e);return n}};function w_(e){for(var t=Xb.parse(e),n=t.length,r=0,i=0,o=0,a=0;a<n;a++)r||"number"==typeof t[a]?r++:void 0!==t[a].hue?o++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:o}}var S_=function(e,t){var n=Xb.createTransformer(t),r=w_(e),i=w_(t);return y_(x_(r.parsed,i.parsed),n)},M_=function(e,t){return function(n){return d_(e,t,n)}};function E_(e,t,n){for(var r,i=[],o=n||("number"==typeof(r=e[0])?M_:"string"==typeof r?jb.test(r)?m_:S_:Array.isArray(r)?x_:"object"==typeof r?__:void 0),a=e.length-1,s=0;s<a;s++){var l=o(e[s],e[s+1]);if(t){var c=Array.isArray(t)?t[s]:t;l=y_(c,l)}i.push(l)}return i}function T_(e,t,n){var r=void 0===n?{}:n,i=r.clamp,o=void 0===i||i,a=r.ease,s=r.mixer,l=e.length;t.length,!a||!Array.isArray(a)||a.length,e[0]>e[l-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var c=E_(t,a,s),u=2===l?function(e,t){var n=e[0],r=e[1],i=t[0];return function(e){return i(u_(n,r,e))}}(e,c):function(e,t){var n=e.length,r=n-1;return function(i){var o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){for(var s=1;s<n&&!(e[s]>i||s===r);s++);o=s-1}var l=u_(e[o],e[o+1],i);return t[o](l)}}(e,c);return o?function(t){return u(n_(e[0],e[l-1],t))}:u}var A_,C_=function(e){return function(t){return 1-e(1-t)}},k_=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},P_=function(e){return function(t){return t*t*((e+1)*t-e)}},L_=function(e){return e},R_=(A_=2,function(e){return Math.pow(e,A_)}),O_=C_(R_),D_=k_(R_),I_=function(e){return 1-Math.sin(Math.acos(e))},z_=C_(I_),N_=k_(z_),B_=P_(1.525),F_=C_(B_),H_=k_(B_),U_=function(e){var t=P_(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}}(1.525),j_=function(e){if(1===e||0===e)return e;var t=e*e;return e<.36363636363636365?7.5625*t:e<.7272727272727273?9.075*t-9.9*e+3.4:e<.9?12.066481994459833*t-19.63545706371191*e+8.898060941828255:10.8*e*e-20.52*e+10.72},V_=C_(j_);function W_(e,t){return e.map((function(){return t||D_})).splice(0,e.length-1)}function G_(e){var t=e.from,n=void 0===t?0:t,r=e.to,i=void 0===r?1:r,o=e.ease,a=e.offset,s=e.duration,l=void 0===s?300:s,c={done:!1,value:n},u=Array.isArray(i)?i:[n,i],d=function(e,t){return e.map((function(e){return e*t}))}(a&&a.length===u.length?a:function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(u),l);function h(){return T_(d,u,{ease:Array.isArray(o)?o:W_(u,o)})}var f=h();return{next:function(e){return c.value=f(e),c.done=e>=l,c},flipTarget:function(){u.reverse(),f=h()}}}var q_={keyframes:G_,spring:l_,decay:function(e){var t=e.velocity,n=void 0===t?0:t,r=e.from,i=void 0===r?0:r,o=e.power,a=void 0===o?.8:o,s=e.timeConstant,l=void 0===s?350:s,c=e.restDelta,u=void 0===c?.5:c,d=e.modifyTarget,h={done:!1,value:i},f=a*n,p=i+f,m=void 0===d?p:d(p);return m!==p&&(f=m-i),{next:function(e){var t=-f*Math.exp(-e/l);return h.done=!(t>u||t<-u),h.value=h.done?m:m+t,h},flipTarget:function(){}}}};function X_(e,t,n){return void 0===n&&(n=0),e-t-n}var Y_=function(e){var t=function(t){var n=t.delta;return e(n)};return{start:function(){return Wh.update(t,!0)},stop:function(){return Gh.update(t)}}};function $_(e){var t,n,r,i,o,a=e.from,s=e.autoplay,l=void 0===s||s,c=e.driver,u=void 0===c?Y_:c,d=e.elapsed,h=void 0===d?0:d,f=e.repeat,p=void 0===f?0:f,m=e.repeatType,g=void 0===m?"loop":m,v=e.repeatDelay,y=void 0===v?0:v,b=e.onPlay,x=e.onStop,_=e.onComplete,w=e.onRepeat,S=e.onUpdate,M=Ay(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),E=M.to,T=0,A=M.duration,C=!1,k=!0,P=function(e){if(Array.isArray(e.to))return G_;if(q_[e.type])return q_[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?G_:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?l_:G_}(M);(null===(n=(t=P).needsInterpolation)||void 0===n?void 0:n.call(t,a,E))&&(o=T_([0,100],[a,E],{clamp:!1}),a=0,E=100);var L=P(Ty(Ty({},M),{from:a,to:E}));function R(){T++,"reverse"===g?h=function(e,t,n,r){return void 0===n&&(n=0),void 0===r&&(r=!0),r?X_(t+-e,t,n):t-(e-t)+n}(h,A,y,k=T%2==0):(h=X_(h,A,y),"mirror"===g&&L.flipTarget()),C=!1,w&&w()}function O(e){if(k||(e=-e),h+=e,!C){var t=L.next(Math.max(0,h));i=t.value,o&&(i=o(i)),C=k?t.done:h<=0}null==S||S(i),C&&(0===T&&(null!=A||(A=h)),T<p?function(e,t,n,r){return r?e>=t+n:e<=-n}(h,A,y,k)&&R():(r.stop(),_&&_()))}return l&&(null==b||b(),(r=u(O)).start()),{stop:function(){null==x||x(),r.stop()}}}function Z_(e,t){return t?e*(1e3/t):0}var J_=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},Q_=function(e){return J_(e)&&e.hasOwnProperty("z")},K_=function(e,t){return Math.abs(e-t)};function ew(e,t){if(g_(e)&&g_(t))return K_(e,t);if(J_(e)&&J_(t)){var n=K_(e.x,t.x),r=K_(e.y,t.y),i=Q_(e)&&Q_(t)?K_(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}var tw=function(e,t){return 1-3*t+3*e},nw=function(e,t){return 3*t-6*e},rw=function(e){return 3*e},iw=function(e,t,n){return((tw(t,n)*e+nw(t,n))*e+rw(t))*e},ow=function(e,t,n){return 3*tw(t,n)*e*e+2*nw(t,n)*e+rw(t)};function aw(e,t,n,r){if(e===t&&n===r)return L_;for(var i=new Float32Array(11),o=0;o<11;++o)i[o]=iw(.1*o,e,n);function a(t){for(var r=0,o=1;10!==o&&i[o]<=t;++o)r+=.1;--o;var a=r+.1*((t-i[o])/(i[o+1]-i[o])),s=ow(a,e,n);return s>=.001?function(e,t,n,r){for(var i=0;i<8;++i){var o=ow(t,n,r);if(0===o)return t;t-=(iw(t,n,r)-e)/o}return t}(t,a,e,n):0===s?a:function(e,t,n,r,i){var o,a,s=0;do{(o=iw(a=t+(n-t)/2,r,i)-e)>0?n=a:t=a}while(Math.abs(o)>1e-7&&++s<10);return a}(t,r,r+.1,e,n)}return function(e){return 0===e||1===e?e:iw(a(e),t,r)}}var sw=function(e){return function(t){return e(t),null}},lw={tap:sw((function(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,i=e.whileTap,o=e.visualElement,a=t||n||r||i,s=h.exports.useRef(!1),l=h.exports.useRef(null);function c(){var e;null===(e=l.current)||void 0===e||e.call(l),l.current=null}function u(){var e;return c(),s.current=!1,null===(e=o.animationState)||void 0===e||e.setActive(Lx.Tap,!1),!Qx()}function d(e,n){u()&&(e_(o.getInstance(),e.target)?null==t||t(e,n):null==r||r(e,n))}function f(e,t){u()&&(null==r||r(e,t))}Xx(o,"pointerdown",a?function(e,t){var r;c(),s.current||(s.current=!0,l.current=y_(qx(window,"pointerup",d),qx(window,"pointercancel",f)),null==n||n(e,t),null===(r=o.animationState)||void 0===r||r.setActive(Lx.Tap,!0))}:void 0),t_(c)})),focus:sw((function(e){var t=e.whileFocus,n=e.visualElement;Ix(n,"focus",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(Lx.Focus,!0)}:void 0),Ix(n,"blur",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(Lx.Focus,!1)}:void 0)})),hover:sw((function(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,i=e.visualElement;Xx(i,"pointerenter",t||r?Kx(i,!0,t):void 0),Xx(i,"pointerleave",n||r?Kx(i,!1,n):void 0)}))};function cw(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var uw=function(e){return 1e3*e},dw={linear:L_,easeIn:R_,easeInOut:D_,easeOut:O_,circIn:I_,circInOut:N_,circOut:z_,backIn:B_,backInOut:H_,backOut:F_,anticipate:U_,bounceIn:V_,bounceInOut:function(e){return e<.5?.5*(1-j_(1-2*e)):.5*j_(2*e-1)+.5},bounceOut:j_},hw=function(e){if(Array.isArray(e)){e.length;var t=Cy(e,4);return aw(t[0],t[1],t[2],t[3])}return"string"==typeof e?dw[e]:e},fw=function(e,t){return"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Xb.test(t)||t.startsWith("url(")))},pw=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},mw=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},gw=function(){return{type:"keyframes",ease:"linear",duration:.3}},vw=function(e){return{type:"keyframes",duration:.8,values:e}},yw={x:pw,y:pw,z:pw,rotate:pw,rotateX:pw,rotateY:pw,rotateZ:pw,scaleX:mw,scaleY:mw,scale:mw,opacity:gw,backgroundColor:gw,color:gw,default:mw},bw=Ty(Ty({},Kb),{color:jb,backgroundColor:jb,outlineColor:jb,fill:jb,stroke:jb,borderColor:jb,borderTopColor:jb,borderRightColor:jb,borderBottomColor:jb,borderLeftColor:jb,filter:Jb,WebkitFilter:Jb}),xw=function(e){return bw[e]};function _w(e,t){var n,r=xw(e);return r!==Jb&&(r=Xb),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}function ww(e){var t=e.ease,n=e.times,r=e.yoyo,i=e.flip,o=e.loop,a=Ay(e,["ease","times","yoyo","flip","loop"]),s=Ty({},a);return n&&(s.offset=n),a.duration&&(s.duration=uw(a.duration)),a.repeatDelay&&(s.repeatDelay=uw(a.repeatDelay)),t&&(s.ease=function(e){return Array.isArray(e)&&"number"!=typeof e[0]}(t)?t.map(hw):hw(t)),"tween"===a.type&&(s.type="keyframes"),(r||o||i)&&(r?s.repeatType="reverse":o?s.repeatType="loop":i&&(s.repeatType="mirror"),s.repeat=o||r||i||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}function Sw(e,t,n){var r,i,o,a;return Array.isArray(t.to)&&(null!==(r=e.duration)&&void 0!==r||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=ky([],Cy(e.to)),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=Ay(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=Ty(Ty({},e),(i=n,o=t.to,a=Ex(o)?vw:yw[i]||yw.default,Ty({to:o},a(o))))),Ty(Ty({},t),ww(e))}function Mw(e,t,n,r,i){var o,a=Aw(r,e),s=null!==(o=a.from)&&void 0!==o?o:t.get(),l=fw(e,n);return"none"===s&&l&&"string"==typeof n?s=_w(e,n):Ew(s)&&"string"==typeof n?s=Tw(n):!Array.isArray(n)&&Ew(n)&&"string"==typeof s&&(n=Tw(s)),fw(e,s)&&l&&!1!==a.type?function(){var r={from:s,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:function(e){return t.set(e)}};return"inertia"===a.type||"decay"===a.type?function(e){var t,n=e.from,r=void 0===n?0:n,i=e.velocity,o=void 0===i?0:i,a=e.min,s=e.max,l=e.power,c=void 0===l?.8:l,u=e.timeConstant,d=void 0===u?750:u,h=e.bounceStiffness,f=void 0===h?500:h,p=e.bounceDamping,m=void 0===p?10:p,g=e.restDelta,v=void 0===g?1:g,y=e.modifyTarget,b=e.driver,x=e.onUpdate,_=e.onComplete;function w(e){return void 0!==a&&e<a||void 0!==s&&e>s}function S(e){return void 0===a?s:void 0===s||Math.abs(a-e)<Math.abs(s-e)?a:s}function M(e){null==t||t.stop(),t=$_(Ty(Ty({},e),{driver:b,onUpdate:function(t){var n;null==x||x(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:_}))}function E(e){M(Ty({type:"spring",stiffness:f,damping:m,restDelta:v},e))}if(w(r))E({from:r,velocity:o,to:S(r)});else{var T=c*o+r;void 0!==y&&(T=y(T));var A,C,k=S(T),P=k===a?-1:1;M({type:"decay",from:r,velocity:o,timeConstant:d,power:c,restDelta:v,modifyTarget:y,onUpdate:w(T)?function(e){A=C,C=e,o=Z_(e-A,Zh().delta),(1===P&&e>k||-1===P&&e<k)&&E({from:e,to:k,velocity:o})}:void 0})}return{stop:function(){return null==t?void 0:t.stop()}}}(Ty(Ty({},r),a)):$_(Ty(Ty({},Sw(a,r,e)),{onUpdate:function(e){var t;r.onUpdate(e),null===(t=a.onUpdate)||void 0===t||t.call(a,e)},onComplete:function(){var e;r.onComplete(),null===(e=a.onComplete)||void 0===e||e.call(a)}}))}:function(){var e;return t.set(n),i(),null===(e=null==a?void 0:a.onComplete)||void 0===e||e.call(a),{stop:function(){}}}}function Ew(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function Tw(e){return"number"==typeof e?0:_w("",e)}function Aw(e,t){return e[t]||e.default||e}function Cw(e,t,n,r){return void 0===r&&(r={}),t.start((function(i){var o,a,s=Mw(e,t,n,r,i),l=function(e,t){var n;return null!==(n=(Aw(e,t)||{}).delay)&&void 0!==n?n:0}(r,e),c=function(){return a=s()};return l?o=setTimeout(c,uw(l)):c(),function(){clearTimeout(o),null==a||a.stop()}}))}function kw(e,t){-1===e.indexOf(t)&&e.push(t)}function Pw(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Lw=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return kw(this.subscriptions,e),function(){return Pw(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var i=0;i<r;i++){var o=this.subscriptions[i];o&&o(e,t,n)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),Rw=function(){function e(e){var t,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Lw,this.velocityUpdateSubscribers=new Lw,this.renderSubscribers=new Lw,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),n.prev=n.current,n.current=e;var r=Zh(),i=r.delta,o=r.timestamp;n.lastUpdated!==o&&(n.timeDelta=i,n.lastUpdated=o,Wh.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),t&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return Wh.postRender(n.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t)))}return e.prototype.onChange=function(e){return this.updateSubscribers.add(e)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?Z_(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(n){t.hasAnimated=!0,t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function Ow(e){return new Rw(e)}var Dw=function(e){return function(t){return t.test(e)}},Iw=[Eb,Lb,Pb,kb,Ob,Rb,{test:function(e){return"auto"===e},parse:function(e){return e}}],zw=function(e){return Iw.find(Dw(e))},Nw=ky(ky([],Cy(Iw)),[jb,Xb]),Bw=function(e){return Nw.find(Dw(e))};function Fw(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ow(n))}function Hw(e,t){if(t)return(t[e]||t.default||t).from}function Uw(e,t,n){var r;void 0===n&&(n={});var i=Jy(e,t,n.custom),o=(i||{}).transition,a=void 0===o?e.getDefaultTransition()||{}:o;n.transitionOverride&&(a=n.transitionOverride);var s=i?function(){return jw(e,i,n)}:function(){return Promise.resolve()},l=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var i=a.delayChildren,o=void 0===i?0:i,s=a.staggerChildren,l=a.staggerDirection;return function(e,t,n,r,i,o){void 0===n&&(n=0);void 0===r&&(r=0);void 0===i&&(i=1);var a=[],s=(e.variantChildren.size-1)*r,l=1===i?function(e){return void 0===e&&(e=0),e*r}:function(e){return void 0===e&&(e=0),s-e*r};return Array.from(e.variantChildren).sort(Vw).forEach((function(e,r){a.push(Uw(e,t,Ty(Ty({},o),{delay:n+l(r)})).then((function(){return e.notifyAnimationComplete(t)})))})),Promise.all(a)}(e,t,o+r,s,l,n)}:function(){return Promise.resolve()},c=a.when;if(c){var u=Cy("beforeChildren"===c?[s,l]:[l,s],2),d=u[0],h=u[1];return d().then(h)}return Promise.all([s(),l(n.delay)])}function jw(e,t,n){var r,i=void 0===n?{}:n,o=i.delay,a=void 0===o?0:o,s=i.transitionOverride,l=i.type,c=e.makeTargetAnimatable(t),u=c.transition,d=void 0===u?e.getDefaultTransition():u,h=c.transitionEnd,f=Ay(c,["transition","transitionEnd"]);s&&(d=s);var p=[],m=l&&(null===(r=e.animationState)||void 0===r?void 0:r.getState()[l]);for(var g in f){var v=e.getValue(g),y=f[g];if(!(!v||void 0===y||m&&Ww(m,g))){var b=Cw(g,v,y,Ty({delay:a},d));p.push(b)}}return Promise.all(p).then((function(){h&&function(e,t){var n=Jy(e,t),r=n?e.makeTargetAnimatable(n,!1):{},i=r.transitionEnd,o=void 0===i?{}:i;r.transition;var a,s=Ay(r,["transitionEnd","transition"]);for(var l in s=Ty(Ty({},s),o))Fw(e,l,(a=s[l],Ex(a)?a[a.length-1]||0:a))}(e,h)}))}function Vw(e,t){return e.sortNodePosition(t)}function Ww(e,t){var n=e.protectedKeys,r=e.needsAnimating,i=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,i}var Gw=[Lx.Animate,Lx.Hover,Lx.Tap,Lx.Drag,Lx.Focus,Lx.Exit],qw=ky([],Cy(Gw)).reverse(),Xw=Gw.length;function Yw(e){return function(t){return Promise.all(t.map((function(t){var n=t.animation,r=t.options;return function(e,t,n){var r;if(void 0===n&&(n={}),e.notifyAnimationStart(),Array.isArray(t)){var i=t.map((function(t){return Uw(e,t,n)}));r=Promise.all(i)}else if("string"==typeof t)r=Uw(e,t,n);else{var o="function"==typeof t?Jy(e,t,n.custom):t;r=jw(e,o,n)}return r.then((function(){return e.notifyAnimationComplete(t)}))}(e,n,r)})))}}function $w(e){var t,n=Yw(e),r=((t={})[Lx.Animate]=Zw(!0),t[Lx.Hover]=Zw(),t[Lx.Tap]=Zw(),t[Lx.Drag]=Zw(),t[Lx.Focus]=Zw(),t[Lx.Exit]=Zw(),t),i={},o=!0,a=function(t,n){var r=Jy(e,n);if(r){r.transition;var i=r.transitionEnd,o=Ay(r,["transition","transitionEnd"]);t=Ty(Ty(Ty({},t),o),i)}return t};function s(t,s){for(var l,c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],h=new Set,f={},p=1/0,m=function(n){var i=qw[n],m=r[i],g=null!==(l=c[i])&&void 0!==l?l:u[i],v=$y(g),y=i===s?m.isActive:null;!1===y&&(p=n);var b=g===u[i]&&g!==c[i]&&v;if(b&&o&&e.manuallyAnimateOnMount&&(b=!1),m.protectedKeys=Ty({},f),!m.isActive&&null===y||!g&&!m.prevProp||Mx(g)||"boolean"==typeof g)return"continue";var x=function(e,t){if("string"==typeof t)return t!==e;if(Yy(t))return!cw(t,e);return!1}(m.prevProp,g)||i===s&&m.isActive&&!b&&v||n>p&&v,_=Array.isArray(g)?g:[g],w=_.reduce(a,{});!1===y&&(w={});var S=m.prevResolvedValues,M=void 0===S?{}:S,E=Ty(Ty({},M),w),T=function(e){x=!0,h.delete(e),m.needsAnimating[e]=!0};for(var A in E){var C=w[A],k=M[A];f.hasOwnProperty(A)||(C!==k?Ex(C)&&Ex(k)?cw(C,k)?m.protectedKeys[A]=!0:T(A):void 0!==C?T(A):h.add(A):void 0!==C&&h.has(A)?T(A):m.protectedKeys[A]=!0)}m.prevProp=g,m.prevResolvedValues=w,m.isActive&&(f=Ty(Ty({},f),w)),o&&e.blockInitialAnimation&&(x=!1),x&&!b&&d.push.apply(d,ky([],Cy(_.map((function(e){return{animation:e,options:Ty({type:i},t)}})))))},g=0;g<Xw;g++)m(g);if(i=Ty({},f),h.size){var v={};h.forEach((function(t){var n=e.getBaseTarget(t);void 0!==n&&(v[t]=n)})),d.push({animation:v})}var y=Boolean(d.length);return o&&!1===c.initial&&!e.manuallyAnimateOnMount&&(y=!1),o=!1,y?n(d):Promise.resolve()}return{isAnimated:function(e){return void 0!==i[e]},animateChanges:s,setActive:function(t,n,i){var o;return r[t].isActive===n?Promise.resolve():(null===(o=e.variantChildren)||void 0===o||o.forEach((function(e){var r;return null===(r=e.animationState)||void 0===r?void 0:r.setActive(t,n)})),r[t].isActive=n,s(i,t))},setAnimateFunction:function(t){n=t(e)},getState:function(){return r}}}function Zw(e){return void 0===e&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var Jw={animation:sw((function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=$w(t)),Mx(n)&&h.exports.useEffect((function(){return n.subscribe(t)}),[n])})),exit:sw((function(e){var t=e.custom,n=e.visualElement,r=Cy(Fy(),2),i=r[0],o=r[1],a=h.exports.useContext(Ny);h.exports.useEffect((function(){var e,r,s=null===(e=n.animationState)||void 0===e?void 0:e.setActive(Lx.Exit,!i,{custom:null!==(r=null==a?void 0:a.custom)&&void 0!==r?r:t});!i&&(null==s||s.then(o))}),[i])}))},Qw=function(){function e(e,t,n){var r=this,i=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=tS(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=ew(e.offset,{x:0,y:0})>=3;if(t||n){var i=e.point,o=Zh().timestamp;r.history.push(Ty(Ty({},i),{timestamp:o}));var a=r.handlers,s=a.onStart,l=a.onMove;t||(s&&s(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=Kw(t,r.transformPagePoint),zx(e)&&0===e.buttons?r.handlePointerUp(e,t):Wh.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,i=n.onEnd,o=n.onSessionEnd,a=tS(Kw(t,r.transformPagePoint),r.history);r.startEvent&&i&&i(e,a),o&&o(e,a)},!(Nx(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=i;var o=Kw(Ux(e),this.transformPagePoint),a=o.point,s=Zh().timestamp;this.history=[Ty(Ty({},a),{timestamp:s})];var l=t.onSessionStart;l&&l(e,tS(o,this.history)),this.removeListeners=y_(qx(window,"pointermove",this.handlePointerMove),qx(window,"pointerup",this.handlePointerUp),qx(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),Gh.update(this.updatePoint)},e}();function Kw(e,t){return t?{point:t(e.point)}:e}function eS(e,t){return{x:e.x-t.x,y:e.y-t.y}}function tS(e,t){var n=e.point;return{point:n,delta:eS(n,rS(t)),offset:eS(n,nS(t)),velocity:iS(t,.1)}}function nS(e){return e[0]}function rS(e){return e[e.length-1]}function iS(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,i=rS(e);n>=0&&(r=e[n],!(i.timestamp-r.timestamp>uw(t)));)n--;if(!r)return{x:0,y:0};var o=(i.timestamp-r.timestamp)/1e3;if(0===o)return{x:0,y:0};var a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function oS(e){return e}function aS(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}var sS={translate:0,scale:1,origin:0,originPoint:0};function lS(){return{x:Ty({},sS),y:Ty({},sS)}}function cS(e){return[e("x"),e("y")]}function uS(e,t,n){var r=t.min,i=t.max;return void 0!==r&&e<r?e=n?d_(r,e,n.min):Math.max(e,r):void 0!==i&&e>i&&(e=n?d_(i,e,n.max):Math.min(e,i)),e}function dS(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function hS(e,t){var n,r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(r=(n=Cy([i,r],2))[0],i=n[1]),{min:e.min+r,max:e.min+i}}function fS(e,t,n){return{min:pS(e,t),max:pS(e,n)}}function pS(e,t){var n;return"number"==typeof e?e:null!==(n=e[t])&&void 0!==n?n:0}function mS(e,t){return aS(function(e,t){var n=e.top,r=e.left,i=e.bottom,o=e.right;void 0===t&&(t=oS);var a=t({x:r,y:n}),s=t({x:o,y:i});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(e.getBoundingClientRect(),t))}function gS(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=.01),ew(e,t)<n}function vS(e){return e.max-e.min}function yS(e,t){var n=.5,r=vS(e),i=vS(t);return i>r?n=u_(t.min,t.max-r,e.min):r>i&&(n=u_(e.min,e.max-i,t.min)),n_(0,1,n)}function bS(e,t,n,r){void 0===r&&(r=.5),e.origin=r,e.originPoint=d_(t.min,t.max,e.origin),e.scale=vS(n)/vS(t),gS(e.scale,1,1e-4)&&(e.scale=1),e.translate=d_(n.min,n.max,e.origin)-e.originPoint,gS(e.translate)&&(e.translate=0)}function xS(e,t,n,r){bS(e.x,t.x,n.x,_S(r.originX)),bS(e.y,t.y,n.y,_S(r.originY))}function _S(e){return"number"==typeof e?e:.5}function wS(e,t,n){e.min=n.min+t.min,e.max=e.min+vS(t)}var SS=function(e,t){return e.depth-t.depth};function MS(e){return e.projection.isEnabled||e.shouldResetTransform()}function ES(e,t){void 0===t&&(t=[]);var n=e.parent;return n&&ES(n,t),MS(e)&&t.push(e),t}function TS(e){if(!e.shouldResetTransform()){var t,n=e.getLayoutState();e.notifyBeforeLayoutMeasure(n.layout),n.isHydrated=!0,n.layout=e.measureViewportBox(),n.layoutCorrected=(t=n.layout,{x:Ty({},t.x),y:Ty({},t.y)}),e.notifyLayoutMeasure(n.layout,e.prevViewportBox||n.layout),Wh.update((function(){return e.rebaseProjectionTarget()}))}}function AS(e,t){return{min:t.min-e.min,max:t.max-e.min}}function CS(e,t){return{x:AS(e.x,t.x),y:AS(e.y,t.y)}}function kS(e,t){var n=e.getLayoutId(),r=t.getLayoutId();return n!==r||void 0===r&&e!==t}function PS(e){var t=e.getProps(),n=t.drag,r=t._dragX;return n&&!r}function LS(e,t){e.min=t.min,e.max=t.max}function RS(e,t,n){return n+t*(e-n)}function OS(e,t,n,r,i){return void 0!==i&&(e=RS(e,i,r)),RS(e,n,r)+t}function DS(e,t,n,r,i){void 0===t&&(t=0),void 0===n&&(n=1),e.min=OS(e.min,t,n,r,i),e.max=OS(e.max,t,n,r,i)}function IS(e,t){var n=t.x,r=t.y;DS(e.x,n.translate,n.scale,n.originPoint),DS(e.y,r.translate,r.scale,r.originPoint)}function zS(e,t,n,r){var i=Cy(r,3),o=i[0],a=i[1],s=i[2];e.min=t.min,e.max=t.max;var l=void 0!==n[s]?n[s]:.5,c=d_(t.min,t.max,l);DS(e,n[o],n[a],c,n.scale)}var NS=["x","scaleX","originX"],BS=["y","scaleY","originY"];function FS(e,t,n){zS(e.x,t.x,n,NS),zS(e.y,t.y,n,BS)}function HS(e,t,n,r,i){return e=RS(e-=t,1/n,r),void 0!==i&&(e=RS(e,1/i,r)),e}function US(e,t,n){var r=Cy(n,3),i=r[0],o=r[1],a=r[2];!function(e,t,n,r,i){void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5);var o=d_(e.min,e.max,r)-t;e.min=HS(e.min,t,n,o,i),e.max=HS(e.max,t,n,o,i)}(e,t[i],t[o],t[a],t.scale)}function jS(e,t){US(e.x,t,NS),US(e.y,t,BS)}var VS=new Set;function WS(e,t,n){e[n]||(e[n]=[]),e[n].push(t)}function GS(e){return VS.add(e),function(){return VS.delete(e)}}function qS(){if(VS.size){var e=0,t=[[]],n=[],r=function(n){return WS(t,n,e)},i=function(t){WS(n,t,e),e++};VS.forEach((function(t){t(r,i),e=0})),VS.clear();for(var o=n.length,a=0;a<=o;a++)t[a]&&t[a].forEach(YS),n[a]&&n[a].forEach(YS)}}var XS,YS=function(e){return e()},$S=new WeakMap,ZS=function(){function e(e){var t=e.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=t,this.visualElement.enableLayoutProjection(),$S.set(t,this)}return e.prototype.start=function(e,t){var n=this,r=void 0===t?{}:t,i=r.snapToCursor,o=void 0!==i&&i,a=r.cursorProgress,s=this.props.transformPagePoint;this.panSession=new Qw(e,{onSessionStart:function(e){var t;n.stopMotion();var r=function(e){return Ux(e,"client")}(e).point;null===(t=n.cancelLayout)||void 0===t||t.call(n),n.cancelLayout=GS((function(e,t){var i=ES(n.visualElement),s=function(e){var t=[],n=function(e){MS(e)&&t.push(e),e.children.forEach(n)};return e.children.forEach(n),t.sort(SS)}(n.visualElement),l=ky(ky([],Cy(i)),Cy(s)),c=!1;n.isLayoutDrag()&&n.visualElement.lockProjectionTarget(),t((function(){l.forEach((function(e){return e.resetTransform()}))})),e((function(){TS(n.visualElement),s.forEach(TS)})),t((function(){l.forEach((function(e){return e.restoreTransform()})),o&&(c=n.snapToCursor(r))})),e((function(){Boolean(n.getAxisMotionValue("x")&&!n.isExternalDrag())||n.visualElement.rebaseProjectionTarget(!0,n.visualElement.measureViewportBox(!1)),n.visualElement.scheduleUpdateLayoutProjection();var e=n.visualElement.projection;cS((function(t){if(!c){var i=e.target[t],o=i.min,s=i.max;n.cursorProgress[t]=a?a[t]:u_(o,s,r[t])}var l=n.getAxisMotionValue(t);l&&(n.originPoint[t]=l.get())}))})),t((function(){qh.update(),qh.preRender(),qh.render(),qh.postRender()})),e((function(){return n.resolveDragConstraints()}))}))},onStart:function(e,t){var r,i,o,a=n.props,s=a.drag,l=a.dragPropagation;(!s||l||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Jx(s),n.openGlobalLock))&&(qS(),n.isDragging=!0,n.currentDirection=null,null===(i=(r=n.props).onDragStart)||void 0===i||i.call(r,e,t),null===(o=n.visualElement.animationState)||void 0===o||o.setActive(Lx.Drag,!0))},onMove:function(e,t){var r,i,o,a,s=n.props,l=s.dragPropagation,c=s.dragDirectionLock;if(l||n.openGlobalLock){var u=t.offset;if(c&&null===n.currentDirection)return n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(u),void(null!==n.currentDirection&&(null===(i=(r=n.props).onDirectionLock)||void 0===i||i.call(r,n.currentDirection)));n.updateAxis("x",t.point,u),n.updateAxis("y",t.point,u),null===(a=(o=n.props).onDrag)||void 0===a||a.call(o,e,t),XS=e}},onSessionEnd:function(e,t){return n.stop(e,t)}},{transformPagePoint:s})},e.prototype.resolveDragConstraints=function(){var e=this,t=this.props,n=t.dragConstraints,r=t.dragElastic,i=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!n&&(Xy(n)?this.resolveRefConstraints(i,n):function(e,t){var n=t.top,r=t.left,i=t.bottom,o=t.right;return{x:dS(e.x,r,o),y:dS(e.y,n,i)}}(i,n)),this.elastic=function(e){return!1===e?e=0:!0===e&&(e=.35),{x:fS(e,"left","right"),y:fS(e,"top","bottom")}}(r),this.constraints&&!this.hasMutatedConstraints&&cS((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(i[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(e,t){var n=this.props,r=n.onMeasureDragConstraints,i=n.transformPagePoint,o=t.current;this.constraintsBox=mS(o,i);var a=function(e,t){return{x:hS(e.x,t.x),y:hS(e.y,t.y)}}(e,this.constraintsBox);if(r){var s=r(function(e){var t=e.x,n=e.y;return{top:n.min,bottom:n.max,left:t.min,right:t.max}}(a));this.hasMutatedConstraints=!!s,s&&(a=aS(s))}return a},e.prototype.cancelDrag=function(){var e,t;this.visualElement.unlockProjectionTarget(),null===(e=this.cancelLayout)||void 0===e||e.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(Lx.Drag,!1)},e.prototype.stop=function(e,t){var n,r,i;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var o=this.isDragging;if(this.cancelDrag(),o){var a=t.velocity;this.animateDragEnd(a),null===(i=(r=this.props).onDragEnd)||void 0===i||i.call(r,e,t)}},e.prototype.snapToCursor=function(e){var t=this;return cS((function(n){if(JS(n,t.props.drag,t.currentDirection)){var r=t.getAxisMotionValue(n);if(!r)return t.cursorProgress[n]=.5,!0;var i=t.visualElement.getLayoutState().layout,o=i[n].max-i[n].min,a=i[n].min+o/2,s=e[n]-a;t.originPoint[n]=e[n],r.set(s)}})).includes(!0)},e.prototype.updateAxis=function(e,t,n){if(JS(e,this.props.drag,this.currentDirection))return this.getAxisMotionValue(e)?this.updateAxisMotionValue(e,n):this.updateVisualElementAxis(e,t)},e.prototype.updateAxisMotionValue=function(e,t){var n=this.getAxisMotionValue(e);if(t&&n){var r=this.originPoint[e]+t[e],i=this.constraints?uS(r,this.constraints[e],this.elastic[e]):r;n.set(i)}},e.prototype.updateVisualElementAxis=function(e,t){var n,r=this.visualElement.getLayoutState().layout[e],i=r.max-r.min,o=this.cursorProgress[e],a=function(e,t,n,r,i){var o=e-t*n;return r?uS(o,r,i):o}(t[e],i,o,null===(n=this.constraints)||void 0===n?void 0:n[e],this.elastic[e]);this.visualElement.setProjectionTargetAxis(e,a,a+i)},e.prototype.setProps=function(e){var t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,i=void 0!==r&&r,o=e.dragPropagation,a=void 0!==o&&o,s=e.dragConstraints,l=void 0!==s&&s,c=e.dragElastic,u=void 0===c?.35:c,d=e.dragMomentum,h=void 0===d||d,f=Ay(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Ty({drag:n,dragDirectionLock:i,dragPropagation:a,dragConstraints:l,dragElastic:u,dragMomentum:h},f)},e.prototype.getAxisMotionValue=function(e){var t=this.props,n=t.layout,r=t.layoutId,i="_drag"+e.toUpperCase();return this.props[i]?this.props[i]:n||void 0!==r?void 0:this.visualElement.getValue(e,0)},e.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},e.prototype.isExternalDrag=function(){var e=this.props,t=e._dragX,n=e._dragY;return t||n},e.prototype.animateDragEnd=function(e){var t=this,n=this.props,r=n.drag,i=n.dragMomentum,o=n.dragElastic,a=n.dragTransition,s=function(e,t){void 0===t&&(t=!0);var n,r=e.getProjectionParent();return!!r&&(t?jS(n=CS(r.projection.target,e.projection.target),r.getLatestValues()):n=CS(r.getLayoutState().layout,e.getLayoutState().layout),cS((function(t){return e.setProjectionTargetAxis(t,n[t].min,n[t].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),l=this.constraints||{};if(s&&Object.keys(l).length&&this.isLayoutDrag()){var c=this.visualElement.getProjectionParent();if(c){var u=CS(c.projection.targetFinal,l);cS((function(e){var t=u[e],n=t.min,r=t.max;l[e]={min:isNaN(n)?void 0:n,max:isNaN(r)?void 0:r}}))}}var d=cS((function(n){var c;if(JS(n,r,t.currentDirection)){var u=null!==(c=null==l?void 0:l[n])&&void 0!==c?c:{},d=o?200:1e6,h=o?40:1e7,f=Ty(Ty({type:"inertia",velocity:i?e[n]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10},a),u);return t.getAxisMotionValue(n)?t.startAxisValueAnimation(n,f):t.visualElement.startLayoutAnimation(n,f,s)}}));return Promise.all(d).then((function(){var e,n;null===(n=(e=t.props).onDragTransitionEnd)||void 0===n||n.call(e)}))},e.prototype.stopMotion=function(){var e=this;cS((function(t){var n=e.getAxisMotionValue(t);n?n.stop():e.visualElement.stopLayoutAnimation()}))},e.prototype.startAxisValueAnimation=function(e,t){var n=this.getAxisMotionValue(e);if(n){var r=n.get();return n.set(r),n.set(r),Cw(e,n,0,t)}},e.prototype.scalePoint=function(){var e=this,t=this.props,n=t.drag;if(Xy(t.dragConstraints)&&this.constraintsBox){this.stopMotion();var r={x:0,y:0};cS((function(t){r[t]=yS(e.visualElement.projection.target[t],e.constraintsBox[t])})),this.updateConstraints((function(){cS((function(t){if(JS(t,n,null)){var i=function(e,t,n){var r=e.max-e.min,i=d_(t.min,t.max-r,n);return{min:i,max:i+r}}(e.visualElement.projection.target[t],e.constraintsBox[t],r[t]),o=i.min,a=i.max;e.visualElement.setProjectionTargetAxis(t,o,a)}}))})),setTimeout(qS,1)}},e.prototype.updateConstraints=function(e){var t=this;this.cancelLayout=GS((function(n,r){var i=ES(t.visualElement);r((function(){return i.forEach((function(e){return e.resetTransform()}))})),n((function(){return TS(t.visualElement)})),r((function(){return i.forEach((function(e){return e.restoreTransform()}))})),n((function(){t.resolveDragConstraints()})),e&&r(e)}))},e.prototype.mount=function(e){var t=this,n=qx(e.getInstance(),"pointerdown",(function(e){var n=t.props,r=n.drag,i=n.dragListener;r&&(void 0===i||i)&&t.start(e)})),r=Dx(window,"resize",(function(){t.scalePoint()})),i=e.onLayoutUpdate((function(){t.isDragging&&t.resolveDragConstraints()})),o=e.prevDragCursor;return o&&this.start(XS,{cursorProgress:o}),function(){null==n||n(),null==r||r(),null==i||i(),t.cancelDrag()}},e}();function JS(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var QS,KS,eM,tM,nM={pan:sw((function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,i=e.onPanSessionStart,o=e.visualElement,a=t||n||r||i,s=h.exports.useRef(null),l=h.exports.useContext(Iy).transformPagePoint,c={onSessionStart:i,onStart:n,onMove:t,onEnd:function(e,t){s.current=null,r&&r(e,t)}};h.exports.useEffect((function(){null!==s.current&&s.current.updateHandlers(c)})),Xx(o,"pointerdown",a&&function(e){s.current=new Qw(e,c,{transformPagePoint:l})}),t_((function(){return s.current&&s.current.end()}))})),drag:sw((function(e){var t=e.dragControls,n=e.visualElement,r=h.exports.useContext(Iy).transformPagePoint,i=By((function(){return new ZS({visualElement:n})}));i.setProps(Ty(Ty({},e),{transformPagePoint:r})),h.exports.useEffect((function(){return t&&t.subscribe(i)}),[i]),h.exports.useEffect((function(){return i.mount(n)}),[])}))};function rM(e){return"string"==typeof e&&e.startsWith("var(--")}(KS=QS||(QS={}))[KS.Entering=0]="Entering",KS[KS.Present=1]="Present",KS[KS.Exiting=2]="Exiting",(tM=eM||(eM={}))[tM.Hide=0]="Hide",tM[tM.Show=1]="Show";var iM=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function oM(e,t,n){var r=Cy(function(e){var t=iM.exec(e);if(!t)return[,];var n=Cy(t,3);return[n[1],n[2]]}(e),2),i=r[0],o=r[1];if(i){var a=window.getComputedStyle(t).getPropertyValue(i);return a?a.trim():rM(o)?oM(o,t):o}}function aM(e,t){return e/(t.max-t.min)*100}var sM={process:function(e,t,n){var r=n.target;if("string"==typeof e){if(!Lb.test(e))return e;e=parseFloat(e)}return aM(e,r.x)+"% "+aM(e,r.y)+"%"}},lM={borderRadius:Ty(Ty({},sM),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:sM,borderTopRightRadius:sM,borderBottomLeftRadius:sM,borderBottomRightRadius:sM,boxShadow:{process:function(e,t){var n=t.delta,r=t.treeScale,i=e,o=e.includes("var("),a=[];o&&(e=e.replace(iM,(function(e){return a.push(e),"_$css"})));var s=Xb.parse(e);if(s.length>5)return i;var l=Xb.createTransformer(e),c="number"!=typeof s[0]?1:0,u=n.x.scale*r.x,d=n.y.scale*r.y;s[0+c]/=u,s[1+c]/=d;var h=d_(u,d,.5);"number"==typeof s[2+c]&&(s[2+c]/=h),"number"==typeof s[3+c]&&(s[3+c]/=h);var f=l(s);if(o){var p=0;f=f.replace("_$css",(function(){var e=a[p];return p++,e}))}return f}}},cM=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},t.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},t.isAnimating={x:!1,y:!1},t.stopAxisAnimation={x:void 0,y:void 0},t.isAnimatingTree=!1,t.animate=function(e,n,r){void 0===r&&(r={});var i=r.originBox,o=r.targetBox,a=r.visibilityAction,s=r.shouldStackAnimate,l=r.onComplete,c=r.prevParent,u=Ay(r,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),d=t.props,h=d.visualElement,f=d.layout;if(!1===s)return t.isAnimatingTree=!1,t.safeToRemove();if(!t.isAnimatingTree||!0===s){s&&(t.isAnimatingTree=!0),n=i||n,e=o||e;var p=!1,m=h.getProjectionParent();if(m){var g=m.prevViewportBox,v=m.getLayoutState().layout;c&&(o&&(v=c.getLayoutState().layout),i&&!kS(c,m)&&c.prevViewportBox&&(g=c.prevViewportBox)),g&&mM(c,i,o)&&(p=!0,n=CS(g,n),e=CS(v,e))}var y=uM(n,e),b=cS((function(r){var i,o;if("position"===f){var s=e[r].max-e[r].min;n[r].max=n[r].min+s}if(!h.projection.isTargetLocked)return void 0===a?y?t.animateAxis(r,e[r],n[r],Ty(Ty({},u),{isRelative:p})):(null===(o=(i=t.stopAxisAnimation)[r])||void 0===o||o.call(i),h.setProjectionTargetAxis(r,e[r].min,e[r].max,p)):void h.setVisibility(a===eM.Show)}));return h.syncRender(),Promise.all(b).then((function(){t.isAnimatingTree=!1,l&&l(),h.notifyLayoutAnimationComplete()}))}},t}return Ey(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.visualElement;t.animateMotionValue=Cw,t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate),t.layoutSafeToRemove=function(){return e.safeToRemove()},function(e){for(var t in e)ab[t]=e[t]}(lM)},t.prototype.componentWillUnmount=function(){var e=this;this.unsubLayoutReady(),cS((function(t){var n,r;return null===(r=(n=e.stopAxisAnimation)[t])||void 0===r?void 0:r.call(n)}))},t.prototype.animateAxis=function(e,t,n,r){var i,o,a=this,s=void 0===r?{}:r,l=s.transition,c=s.isRelative;if(!this.isAnimating[e]||!fM(t,this.currentAnimationTarget[e])){null===(o=(i=this.stopAxisAnimation)[e])||void 0===o||o.call(i),this.isAnimating[e]=!0;var u=this.props.visualElement,d=this.frameTarget[e],h=u.getProjectionAnimationProgress()[e];h.clearListeners(),h.set(0),h.set(0);var f=function(){var r=h.get()/1e3;!function(e,t,n,r){e.min=d_(t.min,n.min,r),e.max=d_(t.max,n.max,r)}(d,n,t,r),u.setProjectionTargetAxis(e,d.min,d.max,c)};f();var p=h.onChange(f);this.stopAxisAnimation[e]=function(){a.isAnimating[e]=!1,h.stop(),p()},this.currentAnimationTarget[e]=t;var m=l||u.getDefaultTransition()||pM;return Cw("x"===e?"layoutX":"layoutY",h,1e3,m&&Aw(m,"layout")).then(this.stopAxisAnimation[e])}},t.prototype.safeToRemove=function(){var e,t;null===(t=(e=this.props).safeToRemove)||void 0===t||t.call(e)},t.prototype.render=function(){return null},t}(h.exports.Component);function uM(e,t){return!(hM(e)||hM(t)||fM(e.x,t.x)&&fM(e.y,t.y))}var dM={min:0,max:0};function hM(e){return fM(e.x,dM)&&fM(e.y,dM)}function fM(e,t){return e.min===t.min&&e.max===t.max}var pM={duration:.45,ease:[.4,0,.1,1]};function mM(e,t,n){return e||!e&&!(t||n)}var gM={layoutReady:function(e){return e.notifyLayoutReady()}};function vM(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var n=void 0===t?gM:t,r=n.layoutReady,i=n.parent;GS((function(t,n){var o=Array.from(e).sort(SS),a=i?ES(i):[];n((function(){ky(ky([],Cy(a)),Cy(o)).forEach((function(e){return e.resetTransform()}))})),t((function(){o.forEach(TS)})),n((function(){a.forEach((function(e){return e.restoreTransform()})),o.forEach(r)})),t((function(){o.forEach((function(e){e.isPresent&&(e.presence=QS.Present)}))})),n((function(){qh.preRender(),qh.render()})),t((function(){Wh.postRender((function(){return o.forEach(yM)})),e.clear()}))})),qS()}}}function yM(e){e.prevViewportBox=e.projection.target}var bM=h.exports.createContext(vM()),xM=h.exports.createContext(vM());function _M(e){return!!e.forceUpdate}var wM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ey(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.syncLayout,n=e.framerSyncLayout,r=e.visualElement;_M(t)&&t.register(r),_M(n)&&n.register(r),r.onUnmount((function(){_M(t)&&t.remove(r),_M(n)&&n.remove(r)}))},t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.syncLayout,n=e.visualElement;return _M(t)?t.syncUpdate():(!function(e){e.shouldResetTransform()||(e.prevViewportBox=e.measureViewportBox(!1),e.rebaseProjectionTarget(!1,e.prevViewportBox))}(n),t.add(n)),null},t.prototype.componentDidUpdate=function(){var e=this.props.syncLayout;_M(e)||e.flush()},t.prototype.render=function(){return null},t}($.Component);var SM={measureLayout:function(e){var t=h.exports.useContext(bM),n=h.exports.useContext(xM);return $.createElement(wM,Ty({},e,{syncLayout:t,framerSyncLayout:n}))},layoutAnimation:function(e){var t=Cy(Fy(),2)[1];return h.exports.createElement(cM,Ty({},e,{safeToRemove:t}))}};function MM(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:lS(),deltaFinal:lS(),deltaTransform:""}}var EM=MM();function TM(e,t,n){var r=e.x,i=e.y,o="translate3d("+r.translate/t.x+"px, "+i.translate/t.y+"px, 0) ";if(n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(o+="rotate("+a+") "),s&&(o+="rotateX("+s+") "),l&&(o+="rotateY("+l+") ")}return o+="scale("+r.scale+", "+i.scale+")",n||o!==CM?o:""}function AM(e){var t=e.deltaFinal;return 100*t.x.origin+"% "+100*t.y.origin+"% 0"}var CM=TM(EM.delta,EM.treeScale,{x:1,y:1}),kM=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function PM(e,t,n,r){var i,o,a=e.delta,s=e.layout,l=e.layoutCorrected,c=e.treeScale,u=t.target;o=s,LS((i=l).x,o.x),LS(i.y,o.y),function(e,t,n){var r=n.length;if(r){var i,o;t.x=t.y=1;for(var a=0;a<r;a++)o=(i=n[a]).getLayoutState().delta,t.x*=o.x.scale,t.y*=o.y.scale,IS(e,o),PS(i)&&FS(e,e,i.getLatestValues())}}(l,c,n),xS(a,l,u,r)}var LM=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){kw(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){Pw(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(SS),this.isDirty=!1,this.children.forEach(e)},e}();var RM=function(e){var t=e.treeType,n=void 0===t?"":t,r=e.build,i=e.getBaseTarget,o=e.makeTargetAnimatable,a=e.measureViewportBox,s=e.render,l=e.readValueFromInstance,c=e.resetTransform,u=e.restoreTransform,d=e.removeValueFromRenderState,h=e.sortNodePosition,f=e.scrapeMotionValuesFromProps;return function(e,t){var p=e.parent,m=e.props,g=e.presenceId,v=e.blockInitialAnimation,y=e.visualState;void 0===t&&(t={});var b,x,_,w,S,M,E=y.latestValues,T=y.renderState,A=function(){var e=kM.map((function(){return new Lw})),t={},n={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){return kM.forEach((function(r){var i;null===(i=t[r])||void 0===i||i.call(t);var o="on"+r,a=e[o];a&&(t[r]=n[o](a))}))}};return e.forEach((function(e,t){n["on"+kM[t]]=function(t){return e.add(t)},n["notify"+kM[t]]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.notify.apply(e,ky([],Cy(t)))}})),n}(),C={isEnabled:!1,isHydrated:!1,isTargetLocked:!1,target:{x:{min:0,max:1},y:{min:0,max:1}},targetFinal:{x:{min:0,max:1},y:{min:0,max:1}}},k=C,P=E,L=MM(),R=!1,O=new Map,D=new Map,I={},z=Ty({},E);function N(){b&&(q.isProjectionReady()&&(FS(k.targetFinal,k.target,P),xS(L.deltaFinal,L.layoutCorrected,k.targetFinal,E)),B(),s(b,T))}function B(){var e=E;if(w&&w.isActive()){var n=w.getCrossfadeState(q);n&&(e=n)}r(q,T,e,k,L,t,m)}function F(){A.notifyUpdate(E)}function H(){q.layoutTree.forEach(DM)}var U=f(m);for(var j in U){var V=U[j];void 0!==E[j]&&mb(V)&&V.set(E[j],!1)}var W=Qy(m),G=Ky(m),q=Ty(Ty({treeType:n,current:null,depth:p?p.depth+1:0,parent:p,children:new Set,path:p?ky(ky([],Cy(p.path)),[p]):[],layoutTree:p?p.layoutTree:new LM,presenceId:g,projection:C,variantChildren:G?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==p?void 0:p.isMounted()),blockInitialAnimation:v,isMounted:function(){return Boolean(b)},mount:function(e){b=q.current=e,q.pointTo(q),G&&p&&!W&&(M=null==p?void 0:p.addVariantChild(q)),null==p||p.children.add(q)},unmount:function(){Gh.update(F),Gh.render(N),Gh.preRender(q.updateLayoutProjection),D.forEach((function(e){return e()})),q.stopLayoutAnimation(),q.layoutTree.remove(q),null==M||M(),null==p||p.children.delete(q),null==_||_(),A.clearAllListeners()},addVariantChild:function(e){var t,n=q.getClosestVariantNode();if(n)return null===(t=n.variantChildren)||void 0===t||t.add(e),function(){return n.variantChildren.delete(e)}},sortNodePosition:function(e){return h&&n===e.treeType?h(q.getInstance(),e.getInstance()):0},getClosestVariantNode:function(){return G?q:null==p?void 0:p.getClosestVariantNode()},scheduleUpdateLayoutProjection:p?p.scheduleUpdateLayoutProjection:function(){return Wh.preRender(q.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return m.layoutId},getInstance:function(){return b},getStaticValue:function(e){return E[e]},setStaticValue:function(e,t){return E[e]=t},getLatestValues:function(){return E},setVisibility:function(e){q.isVisible!==e&&(q.isVisible=e,q.scheduleRender())},makeTargetAnimatable:function(e,t){return void 0===t&&(t=!0),o(q,e,m,t)},addValue:function(e,t){q.hasValue(e)&&q.removeValue(e),O.set(e,t),E[e]=t.get(),function(e,t){var n=t.onChange((function(t){E[e]=t,m.onUpdate&&Wh.update(F,!1,!0)})),r=t.onRenderRequest(q.scheduleRender);D.set(e,(function(){n(),r()}))}(e,t)},removeValue:function(e){var t;O.delete(e),null===(t=D.get(e))||void 0===t||t(),D.delete(e),delete E[e],d(e,T)},hasValue:function(e){return O.has(e)},getValue:function(e,t){var n=O.get(e);return void 0===n&&void 0!==t&&(n=Ow(t),q.addValue(e,n)),n},forEachValue:function(e){return O.forEach(e)},readValue:function(e){var n;return null!==(n=E[e])&&void 0!==n?n:l(b,e,t)},setBaseTarget:function(e,t){z[e]=t},getBaseTarget:function(e){if(i){var t=i(m,e);if(void 0!==t&&!mb(t))return t}return z[e]}},A),{build:function(){return B(),T},scheduleRender:function(){Wh.render(N,!1,!0)},syncRender:N,setProps:function(e){m=e,A.updatePropListeners(e),I=function(e,t,n){var r;for(var i in t){var o=t[i],a=n[i];if(mb(o))e.addValue(i,o);else if(mb(a))e.addValue(i,Ow(o));else if(a!==o)if(e.hasValue(i)){var s=e.getValue(i);!s.hasAnimated&&s.set(o)}else e.addValue(i,Ow(null!==(r=e.getStaticValue(i))&&void 0!==r?r:o))}for(var i in n)void 0===t[i]&&e.removeValue(i);return t}(q,f(m),I)},getProps:function(){return m},getVariant:function(e){var t;return null===(t=m.variants)||void 0===t?void 0:t[e]},getDefaultTransition:function(){return m.transition},getVariantContext:function(e){if(void 0===e&&(e=!1),e)return null==p?void 0:p.getVariantContext();if(!W){var t=(null==p?void 0:p.getVariantContext())||{};return void 0!==m.initial&&(t.initial=m.initial),t}for(var n={},r=0;r<BM;r++){var i=NM[r],o=m[i];($y(o)||!1===o)&&(n[i]=o)}return n},enableLayoutProjection:function(){C.isEnabled=!0,q.layoutTree.add(q)},lockProjectionTarget:function(){C.isTargetLocked=!0},unlockProjectionTarget:function(){q.stopLayoutAnimation(),C.isTargetLocked=!1},getLayoutState:function(){return L},setCrossfader:function(e){w=e},isProjectionReady:function(){return C.isEnabled&&C.isHydrated&&L.isHydrated},startLayoutAnimation:function(e,t,n){void 0===n&&(n=!1);var r=q.getProjectionAnimationProgress()[e],i=n?C.relativeTarget[e]:C.target[e],o=i.min,a=i.max-o;return r.clearListeners(),r.set(o),r.set(o),r.onChange((function(t){q.setProjectionTargetAxis(e,t,t+a,n)})),q.animateMotionValue(e,r,0,t)},stopLayoutAnimation:function(){cS((function(e){return q.getProjectionAnimationProgress()[e].stop()}))},measureViewportBox:function(e){void 0===e&&(e=!0);var n=a(b,t);return e||jS(n,E),n},getProjectionAnimationProgress:function(){return S||(S={x:Ow(0),y:Ow(0)}),S},setProjectionTargetAxis:function(e,t,n,r){var i;void 0===r&&(r=!1),r?(C.relativeTarget||(C.relativeTarget={x:{min:0,max:1},y:{min:0,max:1}}),i=C.relativeTarget[e]):(C.relativeTarget=void 0,i=C.target[e]),C.isHydrated=!0,i.min=t,i.max=n,R=!0,A.notifySetAxisTarget()},rebaseProjectionTarget:function(e,t){void 0===t&&(t=L.layout);var n=q.getProjectionAnimationProgress(),r=n.x,i=n.y,o=!(C.relativeTarget||C.isTargetLocked||r.isAnimating()||i.isAnimating());(e||o)&&cS((function(e){var n=t[e],r=n.min,i=n.max;q.setProjectionTargetAxis(e,r,i)}))},notifyLayoutReady:function(e){!function(e){var t=e.getProjectionParent();if(t){var n=CS(t.getLayoutState().layout,e.getLayoutState().layout);cS((function(t){e.setProjectionTargetAxis(t,n[t].min,n[t].max,!0)}))}else e.rebaseProjectionTarget()}(q),q.notifyLayoutUpdate(L.layout,q.prevViewportBox||L.layout,e)},resetTransform:function(){return c(q,b,m)},restoreTransform:function(){return u(b,T)},updateLayoutProjection:function(){if(q.isProjectionReady()){var e=L.delta,t=L.treeScale,n=t.x,r=t.y,i=L.deltaTransform;PM(L,k,q.path,E),R&&q.notifyViewportBoxUpdate(k.target,e),R=!1;var o=TM(e,t);o===i&&n===t.x&&r===t.y||q.scheduleRender(),L.deltaTransform=o}},updateTreeLayoutProjection:function(){q.layoutTree.forEach(OM),Wh.preRender(H,!1,!0)},getProjectionParent:function(){if(void 0===x){for(var e=!1,t=q.path.length-1;t>=0;t--){var n=q.path[t];if(n.projection.isEnabled){e=n;break}}x=e}return x},resolveRelativeTargetBox:function(){var e=q.getProjectionParent();if(C.relativeTarget&&e&&(function(e,t){wS(e.target.x,e.relativeTarget.x,t.target.x),wS(e.target.y,e.relativeTarget.y,t.target.y)}(C,e.projection),PS(e))){var t=C.target;FS(t,t,e.getLatestValues())}},shouldResetTransform:function(){return Boolean(m._layoutResetTransform)},pointTo:function(e){k=e.projection,P=e.getLatestValues(),null==_||_(),_=y_(e.onSetAxisTarget(q.scheduleUpdateLayoutProjection),e.onLayoutAnimationComplete((function(){var e;q.isPresent?q.presence=QS.Present:null===(e=q.layoutSafeToRemove)||void 0===e||e.call(q)})))},isPresent:!0,presence:QS.Entering});return q}};function OM(e){e.resolveRelativeTargetBox()}function DM(e){e.updateLayoutProjection()}var IM,zM,NM=ky(["initial"],Cy(Gw)),BM=NM.length,FM=new Set(["width","height","top","left","right","bottom","x","y"]),HM=function(e){return FM.has(e)},UM=function(e,t){e.set(t,!1),e.set(t)},jM=function(e){return e===Eb||e===Lb};(zM=IM||(IM={})).width="width",zM.height="height",zM.left="left",zM.right="right",zM.top="top",zM.bottom="bottom";var VM=function(e,t){return parseFloat(e.split(", ")[t])},WM=function(e,t){return function(n,r){var i=r.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return VM(o[1],t);var a=i.match(/^matrix\((.+)\)$/);return a?VM(a[1],e):0}},GM=new Set(["x","y","z"]),qM=lb.filter((function(e){return!GM.has(e)}));var XM={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:WM(4,13),y:WM(5,14)},YM=function(e,t,n,r){void 0===n&&(n={}),void 0===r&&(r={}),t=Ty({},t),r=Ty({},r);var i=Object.keys(t).filter(HM),o=[],a=!1,s=[];if(i.forEach((function(i){var l=e.getValue(i);if(e.hasValue(i)){var c,u=n[i],d=t[i],h=zw(u);if(Ex(d))for(var f=d.length,p=null===d[0]?1:0;p<f;p++)c?zw(d[p]):c=zw(d[p]);else c=zw(d);if(h!==c)if(jM(h)&&jM(c)){var m=l.get();"string"==typeof m&&l.set(parseFloat(m)),"string"==typeof d?t[i]=parseFloat(d):Array.isArray(d)&&c===Lb&&(t[i]=d.map(parseFloat))}else(null==h?void 0:h.transform)&&(null==c?void 0:c.transform)&&(0===u||0===d)?0===u?l.set(c.transform(u)):t[i]=h.transform(d):(a||(o=function(e){var t=[];return qM.forEach((function(n){var r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.syncRender(),t}(e),a=!0),s.push(i),r[i]=void 0!==r[i]?r[i]:t[i],UM(l,d))}})),s.length){var l=function(e,t,n){var r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),a=o.display,s={top:o.top,left:o.left,bottom:o.bottom,right:o.right,transform:o.transform};"none"===a&&t.setStaticValue("display",e.display||"block"),t.syncRender();var l=t.measureViewportBox();return n.forEach((function(n){var i=t.getValue(n);UM(i,XM[n](r,s)),e[n]=XM[n](l,o)})),e}(t,e,s);return o.length&&o.forEach((function(t){var n=Cy(t,2),r=n[0],i=n[1];e.getValue(r).set(i)})),e.syncRender(),{target:l,transitionEnd:r}}return{target:t,transitionEnd:r}};function $M(e,t,n,r){return function(e){return Object.keys(e).some(HM)}(t)?YM(e,t,n,r):{target:t,transitionEnd:r}}var ZM=function(e,t,n,r){var i=function(e,t,n){var r,i=Ay(t,[]),o=e.getInstance();if(!(o instanceof HTMLElement))return{target:i,transitionEnd:n};for(var a in n&&(n=Ty({},n)),e.forEachValue((function(e){var t=e.get();if(rM(t)){var n=oM(t,o);n&&e.set(n)}})),i){var s=i[a];if(rM(s)){var l=oM(s,o);l&&(i[a]=l,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=s)))}}return{target:i,transitionEnd:n}}(e,t,r);return $M(e,t=i.target,n,r=i.transitionEnd)};var JM={treeType:"dom",readValueFromInstance:function(e,t){if(db(t)){var n=xw(t);return n&&n.default||0}var r,i=(r=e,window.getComputedStyle(r));return(vb(t)?i.getPropertyValue(t):i[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]},measureViewportBox:function(e,t){return mS(e,t.transformPagePoint)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var i=n.transformValues;void 0===r&&(r=!0);var o=t.transition,a=t.transitionEnd,s=Ay(t,["transition","transitionEnd"]),l=function(e,t,n){var r,i,o={};for(var a in e)o[a]=null!==(r=Hw(a,t))&&void 0!==r?r:null===(i=n.getValue(a))||void 0===i?void 0:i.get();return o}(s,o||{},e);if(i&&(a&&(a=i(a)),s&&(s=i(s)),l&&(l=i(l))),r){!function(e,t,n){var r,i,o,a,s=Object.keys(t).filter((function(t){return!e.hasValue(t)})),l=s.length;if(l)for(var c=0;c<l;c++){var u=s[c],d=t[u],h=null;Array.isArray(d)&&(h=d[0]),null===h&&(h=null!==(i=null!==(r=n[u])&&void 0!==r?r:e.readValue(u))&&void 0!==i?i:t[u]),null!=h&&("string"==typeof h&&/^\-?\d*\.?\d+$/.test(h)?h=parseFloat(h):!Bw(h)&&Xb.test(d)&&(h=_w(u,d)),e.addValue(u,Ow(h)),null!==(o=(a=n)[u])&&void 0!==o||(a[u]=h),e.setBaseTarget(u,h))}}(e,s,l);var c=ZM(e,s,l,a);a=c.transitionEnd,s=c.target}return Ty({transition:o,transitionEnd:a},s)},scrapeMotionValuesFromProps:wx,build:function(e,t,n,r,i,o,a){void 0!==e.isVisible&&(t.style.visibility=e.isVisible?"visible":"hidden");var s=r.isEnabled&&i.isHydrated;ex(t,n,r,i,o,a.transformTemplate,s?TM:void 0,s?AM:void 0)},render:bx},QM=RM(JM),KM=RM(Ty(Ty({},JM),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return db(t)?(null===(n=xw(t))||void 0===n?void 0:n.default)||0:(t=xx.has(t)?t:yx(t),e.getAttribute(t))},scrapeMotionValuesFromProps:Sx,build:function(e,t,n,r,i,o,a){var s=r.isEnabled&&i.isHydrated;fx(t,n,r,i,o,a.transformTemplate,s?TM:void 0,s?AM:void 0)},render:_x})),eE=function(e,t){return ob(e)?KM(t,{enableHardwareAcceleration:!1}):QM(t,{enableHardwareAcceleration:!0})},tE=Ty(Ty(Ty(Ty({},Jw),lw),nM),SM),nE=rb((function(e,t){return function(e,t,n,r){var i=t.forwardMotionProps,o=void 0!==i&&i,a=ob(e)?Px:Ox;return Ty(Ty({},a),{preloadedFeatures:n,useRender:gx(o),createVisualElement:r,Component:e})}(e,t,tE,eE)}));var rE=0;function iE(){var e=rE;return rE++,e}var oE=function(e){var t=e.children,n=e.initial,r=e.isPresent,i=e.onExitComplete,o=e.custom,a=e.presenceAffectsLayout,s=By(aE),l=By(iE),c=h.exports.useMemo((function(){return{id:l,initial:n,isPresent:r,custom:o,onExitComplete:function(e){s.set(e,!0);var t=!0;s.forEach((function(e){e||(t=!1)})),t&&(null==i||i())},register:function(e){return s.set(e,!1),function(){return s.delete(e)}}}}),a?void 0:[r]);return h.exports.useMemo((function(){s.forEach((function(e,t){return s.set(t,!1)}))}),[r]),h.exports.useEffect((function(){!r&&!s.size&&(null==i||i())}),[r]),h.exports.createElement(Ny.Provider,{value:c},t)};function aE(){return new Map}function sE(e){return e.key||""}var lE=function(e){var t=e.children,n=e.custom,r=e.initial,i=void 0===r||r,o=e.onExitComplete,a=e.exitBeforeEnter,s=e.presenceAffectsLayout,l=void 0===s||s,c=function(){var e=h.exports.useRef(!1),t=Cy(h.exports.useState(0),2),n=t[0],r=t[1];return t_((function(){return e.current=!0})),h.exports.useCallback((function(){!e.current&&r(n+1)}),[n])}(),u=h.exports.useContext(bM);_M(u)&&(c=u.forceUpdate);var d=h.exports.useRef(!0),f=function(e){var t=[];return h.exports.Children.forEach(e,(function(e){h.exports.isValidElement(e)&&t.push(e)})),t}(t),p=h.exports.useRef(f),m=h.exports.useRef(new Map).current,g=h.exports.useRef(new Set).current;if(function(e,t){e.forEach((function(e){var n=sE(e);t.set(n,e)}))}(f,m),d.current)return d.current=!1,h.exports.createElement(h.exports.Fragment,null,f.map((function(e){return h.exports.createElement(oE,{key:sE(e),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:l},e)})));for(var v=ky([],Cy(f)),y=p.current.map(sE),b=f.map(sE),x=y.length,_=0;_<x;_++){var w=y[_];-1===b.indexOf(w)?g.add(w):g.delete(w)}return a&&g.size&&(v=[]),g.forEach((function(e){if(-1===b.indexOf(e)){var t=m.get(e);if(t){var r=y.indexOf(e);v.splice(r,0,h.exports.createElement(oE,{key:sE(t),isPresent:!1,onExitComplete:function(){m.delete(e),g.delete(e);var t=p.current.findIndex((function(t){return t.key===e}));p.current.splice(t,1),g.size||(p.current=f,c(),o&&o())},custom:n,presenceAffectsLayout:l},t))}}})),v=v.map((function(e){var t=e.key;return g.has(t)?e:h.exports.createElement(oE,{key:sE(e),isPresent:!0,presenceAffectsLayout:l},e)})),p.current=v,h.exports.createElement(h.exports.Fragment,null,g.size?v:v.map((function(e){return h.exports.cloneElement(e)})))};function cE(){return(cE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var uE={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},dE={enter:{duration:.2,ease:uE.easeOut},exit:{duration:.1,ease:uE.easeIn}},hE=(e,t)=>cE({},e,{delay:Qd(t)?t:null==t?void 0:t.enter}),fE=(e,t)=>cE({},e,{delay:Qd(t)?t:null==t?void 0:t.exit}),pE={initial:"exit",animate:"enter",exit:"exit",variants:{enter:function(e){var t,{transition:n,transitionEnd:r,delay:i}=void 0===e?{}:e;return{opacity:1,transition:null!=(t=null==n?void 0:n.enter)?t:hE(dE.enter,i),transitionEnd:null==r?void 0:r.enter}},exit:function(e){var t,{transition:n,transitionEnd:r,delay:i}=void 0===e?{}:e;return{opacity:0,transition:null!=(t=null==n?void 0:n.exit)?t:fE(dE.exit,i),transitionEnd:null==r?void 0:r.exit}}}};function mE(){return(mE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gE={initial:"exit",animate:"enter",exit:"exit",variants:{exit:e=>{var t,{reverse:n,initialScale:r,transition:i,transitionEnd:o,delay:a}=e;return mE({opacity:0},n?{scale:r,transitionEnd:null==o?void 0:o.exit}:{transitionEnd:mE({scale:r},null==o?void 0:o.exit)},{transition:null!=(t=null==i?void 0:i.exit)?t:fE(dE.exit,a)})},enter:e=>{var t,{transitionEnd:n,transition:r,delay:i}=e;return{opacity:1,scale:1,transition:null!=(t=null==r?void 0:r.enter)?t:hE(dE.enter,i),transitionEnd:null==n?void 0:n.enter}}}};function vE(){return(vE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var yE={initial:"initial",animate:"enter",exit:"exit",variants:{initial:e=>{var t,{offsetX:n,offsetY:r,transition:i,transitionEnd:o,delay:a}=e;return{opacity:0,x:n,y:r,transition:null!=(t=null==i?void 0:i.exit)?t:fE(dE.exit,a),transitionEnd:null==o?void 0:o.exit}},enter:e=>{var t,{transition:n,transitionEnd:r,delay:i}=e;return{opacity:1,x:0,y:0,transition:null!=(t=null==n?void 0:n.enter)?t:hE(dE.enter,i),transitionEnd:null==r?void 0:r.enter}},exit:e=>{var t,{offsetY:n,offsetX:r,transition:i,transitionEnd:o,reverse:a,delay:s}=e,l={x:r,y:n};return vE({opacity:0,transition:null!=(t=null==i?void 0:i.exit)?t:fE(dE.exit,s)},a?vE({},l,{transitionEnd:null==o?void 0:o.exit}):{transitionEnd:vE({},l,null==o?void 0:o.exit)})}}};function bE(){return(bE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var xE=e=>h.exports.createElement(Sy,bE({viewBox:"0 0 24 24"},e),h.exports.createElement("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"}));function _E(){return(_E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var wE={info:{icon:e=>h.exports.createElement(Sy,bE({viewBox:"0 0 24 24"},e),h.exports.createElement("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})),colorScheme:"blue"},warning:{icon:xE,colorScheme:"orange"},success:{icon:e=>h.exports.createElement(Sy,bE({viewBox:"0 0 24 24"},e),h.exports.createElement("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})),colorScheme:"green"},error:{icon:xE,colorScheme:"red"}},[SE,ME]=ef({name:"AlertContext",errorMessage:"useAlertContext: `context` is undefined. Seems you forgot to wrap alert components in `<Alert />`"}),EE=Im(((e,t)=>{var n,r=xm(e),{status:i="info"}=r,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["status"]),a=Nm("Alert",_E({},e,{colorScheme:null!=(n=e.colorScheme)?n:wE[i].colorScheme})),s=_E({width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden"},a.container);return h.exports.createElement(SE,{value:{status:i}},h.exports.createElement(vm,{value:a},h.exports.createElement(Dm.div,_E({role:"alert",ref:t},o,{className:Mh("chakra-alert",e.className),__css:s}))))})),TE=e=>{var{status:t}=ME(),{icon:n}=wE[t],r=ym();return h.exports.createElement(Dm.span,_E({display:"inherit"},e,{className:Mh("chakra-alert__icon",e.className),__css:r.icon}),h.exports.createElement(n,{w:"100%",h:"100%"}))},AE={border:"0px",clip:"rect(0px, 0px, 0px, 0px)",height:"1px",width:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},CE=Dm("span",{baseStyle:AE});function kE(){return(kE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Dm("input",{baseStyle:AE});var PE=Zd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),LE=Im(((e,t)=>{var n=zm("Spinner",e),r=xm(e),{label:i="Loading...",thickness:o="2px",speed:a="0.45s",emptyColor:s="transparent",className:l}=r,c=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["label","thickness","speed","emptyColor","className"]),u=Mh("chakra-spinner",l),d=kE({display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:o,borderBottomColor:s,borderLeftColor:s,animation:PE+" "+a+" linear infinite"},n);return h.exports.createElement(Dm.div,kE({ref:t,__css:d,className:u},c),i&&h.exports.createElement(CE,null,i))})),[RE,OE]=ef({strict:!1,name:"ButtonGroupContext"});function DE(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function IE(){return(IE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var zE=Im(((e,t)=>{var n,r=OE(),i=zm("Button",IE({},r,e)),o=xm(e),{isDisabled:a=(null==r?void 0:r.isDisabled),isLoading:s,isActive:l,isFullWidth:c,children:u,leftIcon:d,rightIcon:f,loadingText:p,iconSpacing:m="0.5rem",type:g,spinner:v,spinnerPlacement:y="start",className:b,as:x}=o,_=DE(o,["isDisabled","isLoading","isActive","isFullWidth","children","leftIcon","rightIcon","loadingText","iconSpacing","type","spinner","spinnerPlacement","className","as"]),w=ah({},null!=(n=null==i?void 0:i._focus)?n:{},{zIndex:1}),S=IE({display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",transition:"all 250ms",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",width:c?"100%":"auto"},i,!!r&&{_focus:w}),[M,E]=h.exports.useState(!x),T=h.exports.useCallback((e=>{e&&E("BUTTON"===e.tagName)}),[]),A=M?"button":void 0;return h.exports.createElement(Dm.button,IE({disabled:a||s,ref:Kh(t,T),as:x,type:null!=g?g:A,"data-active":wh(l),"data-loading":wh(s),__css:S,className:Mh("chakra-button",b)},_),d&&!s&&h.exports.createElement(NE,{marginEnd:m},d),s&&"start"===y&&h.exports.createElement(BE,{label:p,placement:"start"},v),s?p||h.exports.createElement(Dm.span,{opacity:0},u):u,s&&"end"===y&&h.exports.createElement(BE,{label:p,placement:"end"},v),f&&!s&&h.exports.createElement(NE,{marginStart:m},f))})),NE=e=>{var{children:t,className:n}=e,r=DE(e,["children","className"]),i=h.exports.isValidElement(t)?h.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=Mh("chakra-button__icon",n);return h.exports.createElement(Dm.span,IE({display:"inline-flex",alignSelf:"center",flexShrink:0},r,{className:o}),i)},BE=e=>{var{label:t,placement:n,children:r=h.exports.createElement(LE,{color:"currentColor",width:"1em",height:"1em"}),className:i,__css:o}=e,a=DE(e,["label","placement","spacing","children","className","__css"]),s=Mh("chakra-button__spinner",i),l=IE({display:"flex",alignItems:"center",position:t?"relative":"absolute",["start"===n?"marginEnd":"marginStart"]:t?"0.5rem":0,fontSize:"1em",lineHeight:"normal"},o);return h.exports.createElement(Dm.div,IE({className:s},a,{__css:l}),r)};function FE(){return(FE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var HE=e=>h.exports.createElement(Sy,FE({focusable:"false","aria-hidden":!0},e),h.exports.createElement("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})),UE=Im(((e,t)=>{var n=zm("CloseButton",e),r=xm(e),{children:i,isDisabled:o,__css:a}=r,s=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["children","isDisabled","__css"]);return h.exports.createElement(Dm.button,FE({type:"button","aria-label":"Close",ref:t,disabled:o,__css:FE({},{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},n,a)},s),i||h.exports.createElement(HE,{width:"1em",height:"1em"}))})),[jE,VE]=ef({strict:!1,name:"FormControlContext"});function WE(){return(WE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function GE(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function qE(e){var t=function(e){var t,n,r,i=VE(),{id:o,disabled:a,readOnly:s,required:l,isRequired:c,isInvalid:u,isReadOnly:d,isDisabled:h,onFocus:f,onBlur:p}=e,m=GE(e,["id","disabled","readOnly","required","isRequired","isInvalid","isReadOnly","isDisabled","onFocus","onBlur"]),g=[];null!=i&&i.hasFeedbackText&&null!=i&&i.isInvalid&&g.push(i.feedbackId);null!=i&&i.hasHelpText&&g.push(i.helpTextId);return WE({},m,{"aria-describedby":g.join(" ")||void 0,id:null!=o?o:null==i?void 0:i.id,isDisabled:null!=(t=null!=a?a:h)?t:null==i?void 0:i.isDisabled,isReadOnly:null!=(n=null!=s?s:d)?n:null==i?void 0:i.isReadOnly,isRequired:null!=(r=null!=l?l:c)?r:null==i?void 0:i.isRequired,isInvalid:null!=u?u:null==i?void 0:i.isInvalid,onFocus:Lh(null==i?void 0:i.onFocus,f),onBlur:Lh(null==i?void 0:i.onBlur,p)})}(e),{isDisabled:n,isInvalid:r,isReadOnly:i,isRequired:o}=t;return WE({},GE(t,["isDisabled","isInvalid","isReadOnly","isRequired"]),{disabled:n,readOnly:i,required:o,"aria-invalid":Sh(r),"aria-required":Sh(o),"aria-readonly":Sh(i)})}function XE(){return(XE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var YE=Im(((e,t)=>{var n=Nm("Input",e),r=qE(xm(e)),i=Mh("chakra-input",e.className);return h.exports.createElement(Dm.input,XE({},r,{__css:n.field,ref:t,className:i}))}));function $E(){return($E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}YE.id="Input";var ZE=Im(((e,t)=>{var n=Nm("Input",e),r=xm(e),{children:i,className:o}=r,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["children","className"]),s=Mh("chakra-input__group",o),l={},c=tf(i),u=n.field;c.forEach((e=>{if(n){var t,r;if(u&&"InputLeftElement"===e.type.id)l.paddingStart=null!=(t=u.height)?t:u.h;if(u&&"InputRightElement"===e.type.id)l.paddingEnd=null!=(r=u.height)?r:u.h;"InputRightAddon"===e.type.id&&(l.borderEndRadius=0),"InputLeftAddon"===e.type.id&&(l.borderStartRadius=0)}}));var d=c.map((t=>{var n,r,i={size:(null==(n=t.props)?void 0:n.size)||e.size,variant:(null==(r=t.props)?void 0:r.variant)||e.variant};return"Input"!==t.type.id?h.exports.cloneElement(t,i):h.exports.cloneElement(t,Object.assign(i,l,t.props))}));return h.exports.createElement(Dm.div,$E({className:s,ref:t,__css:{width:"100%",display:"flex",position:"relative"}},a),h.exports.createElement(vm,{value:n},d))}));function JE(){return(JE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function QE(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var KE=Dm("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),eT=Im(((e,t)=>{var n,r,{placement:i="left"}=e,o=QE(e,["placement"]),a=ym().field,s={["left"===i?"insetStart":"insetEnd"]:"0",width:null!=(n=null==a?void 0:a.height)?n:null==a?void 0:a.h,height:null!=(r=null==a?void 0:a.height)?r:null==a?void 0:a.h,fontSize:null==a?void 0:a.fontSize};return h.exports.createElement(KE,JE({ref:t,__css:s},o))}));eT.id="InputElement",Im(((e,t)=>{var{className:n}=e,r=QE(e,["className"]),i=Mh("chakra-input__left-element",n);return h.exports.createElement(eT,JE({ref:t,placement:"left",className:i},r))})).id="InputLeftElement";var tT=Im(((e,t)=>{var{className:n}=e,r=QE(e,["className"]),i=Mh("chakra-input__right-element",n);return h.exports.createElement(eT,JE({ref:t,placement:"right",className:i},r))}));tT.id="InputRightElement";var nT=Dm("div");function rT(){return(rT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var iT=Im(((e,t)=>{var n=zm("Code",e),r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(xm(e),["className"]);return h.exports.createElement(Dm.code,rT({ref:t,className:Mh("chakra-code",e.className)},r,{__css:rT({display:"inline-block"},n)}))}));function oT(){return(oT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var aT=Im(((e,t)=>{var n=xm(e),{className:r,centerContent:i}=n,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,["className","centerContent"]),a=zm("Container",e);return h.exports.createElement(Dm.div,oT({ref:t,className:Mh("chakra-container",r)},o,{__css:oT({},a,i&&{display:"flex",flexDirection:"column",alignItems:"center"})}))}));function sT(){return(sT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function lT(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var cT=Im(((e,t)=>{var n=zm("Divider",e),{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:c}=n,u=lT(n,["borderLeftWidth","borderBottomWidth","borderTopWidth","borderRightWidth","borderWidth","borderStyle","borderColor"]),d=xm(e),{className:f,orientation:p="horizontal",__css:m}=d,g=lT(d,["className","orientation","__css"]),v={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return h.exports.createElement(Dm.hr,sT({ref:t,"aria-orientation":p},g,{__css:sT({},u,{border:"0",borderColor:c,borderStyle:l},v[p],m),className:Mh("chakra-divider",f)}))}));function uT(){return(uT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function dT(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var hT=Im(((e,t)=>{var{area:n,templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:c,autoRows:u,templateRows:d,autoColumns:f,templateColumns:p}=e,m=dT(e,["area","templateAreas","gap","rowGap","columnGap","column","row","autoFlow","autoRows","templateRows","autoColumns","templateColumns"]),g={display:"grid",gridArea:n,gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:f,gridColumn:s,gridRow:l,gridAutoFlow:c,gridAutoRows:u,gridTemplateRows:d,gridTemplateColumns:p};return h.exports.createElement(Dm.div,uT({ref:t,__css:g},m))}));function fT(e){return Jh(e,(e=>"auto"===e?"auto":"span "+e+"/span "+e))}var pT=Im(((e,t)=>{var{colSpan:n,colStart:r,colEnd:i,rowEnd:o,rowSpan:a,rowStart:s}=e,l=dT(e,["colSpan","colStart","colEnd","rowEnd","rowSpan","rowStart"]),c=hh({gridColumn:fT(n),gridRow:fT(a),gridColumnStart:r,gridColumnEnd:i,gridRowStart:s,gridRowEnd:o});return h.exports.createElement(Dm.div,uT({ref:t,__css:c},l))}));function mT(){return(mT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gT=Im(((e,t)=>{var n=zm("Heading",e),r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(xm(e),["className"]);return h.exports.createElement(Dm.h2,mT({ref:t,className:Mh("chakra-heading",e.className)},r,{__css:n}))}));function vT(){return(vT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var yT=Im(((e,t)=>{var n=zm("Link",e),r=xm(e),{className:i,isExternal:o}=r,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["className","isExternal"]);return h.exports.createElement(Dm.a,vT({target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,ref:t,className:Mh("chakra-link",i)},a,{__css:n}))}));function bT(){return(bT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var xT=Im(((e,t)=>{var{columns:n,spacingX:r,spacingY:i,spacing:o,minChildWidth:a}=e,s=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["columns","spacingX","spacingY","spacing","minChildWidth"]),l=a?Jh(a,(e=>{return nh(e)?null:"repeat(auto-fit, minmax("+(Qd(t=e)?t+"px":t)+", 1fr))";var t})):Jh(n,(e=>nh(e)?null:"repeat("+e+", minmax(0, 1fr))"));return h.exports.createElement(hT,bT({ref:t,gap:o,columnGap:r,rowGap:i,templateColumns:l},s))}));var _T="& > *:not(style) ~ *:not(style)";function wT(){return(wT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ST=e=>h.exports.createElement(Dm.div,wT({className:"chakra-stack__item"},e,{__css:wT({display:"inline-block",flex:"0 0 auto",minWidth:0},e.__css)})),MT=Im(((e,t)=>{var{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:c,className:u,shouldWrapChildren:d}=e,f=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["isInline","direction","align","justify","spacing","wrap","children","divider","className","shouldWrapChildren"]),p=n?"row":null!=r?r:"column",m=h.exports.useMemo((()=>function(e){var{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[_T]:Jh(n,(e=>r[e]))}}({direction:p,spacing:a})),[p,a]),g=h.exports.useMemo((()=>function(e){var{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":Jh(n,(e=>r[e]))}}({spacing:a,direction:p})),[a,p]),v=!!c,y=!d&&!v,b=tf(l),x=y?b:b.map(((e,t)=>{var n=t+1===b.length,r=d?h.exports.createElement(ST,{key:t},e):e;if(!v)return r;var i=n?null:h.exports.cloneElement(c,{__css:g});return h.exports.createElement(h.exports.Fragment,{key:t},r,i)})),_=Mh("chakra-stack",u);return h.exports.createElement(Dm.div,wT({ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:m.flexDirection,flexWrap:s,className:_,__css:v?{}:{[_T]:m[_T]}},f),x)})),ET=Im(((e,t)=>h.exports.createElement(MT,wT({align:"center"},e,{direction:"row",ref:t}))));function TT(){return(TT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var AT=Im(((e,t)=>{var n=zm("Text",e),r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(xm(e),["className","align","decoration","casing"]),i=hh({textAlign:e.align,textDecoration:e.decoration,textTransform:e.casing});return h.exports.createElement(Dm.p,TT({ref:t,className:Mh("chakra-text",e.className)},i,r,{__css:n}))}));function CT(){return(CT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function kT(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var PT=Im(((e,t)=>{var{spacing:n="0.5rem",children:r,justify:i,direction:o,align:a,className:s,shouldWrapChildren:l}=e,c=kT(e,["spacing","children","justify","direction","align","className","shouldWrapChildren"]),u=h.exports.useMemo((()=>({"--chakra-wrap-spacing":e=>Jh(n,(t=>If("space",t)(e))),"--wrap-spacing":"calc(var(--chakra-wrap-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:i,alignItems:a,flexDirection:o,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-spacing)"}})),[n,i,a,o]),d=l?h.exports.Children.map(r,((e,t)=>h.exports.createElement(LT,{key:t},e))):r;return h.exports.createElement(Dm.div,CT({ref:t,className:Mh("chakra-wrap",s)},c),h.exports.createElement(Dm.ul,{className:"chakra-wrap__list",__css:u},d))})),LT=Im(((e,t)=>{var{className:n}=e,r=kT(e,["className"]);return h.exports.createElement(Dm.li,CT({ref:t,__css:{display:"flex",alignItems:"flex-start"},className:Mh("chakra-wrap__listitem",n)},r))}));function RT(){return(RT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function OT(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var DT=Im(((e,t)=>{var n=Nm("Table",e),r=xm(e),{className:i}=r,o=OT(r,["className"]);return h.exports.createElement(vm,{value:n},h.exports.createElement(Dm.table,RT({role:"table",ref:t,__css:n.table,className:Mh("chakra-table",i)},o)))})),IT=Im(((e,t)=>{var n=ym();return h.exports.createElement(Dm.thead,RT({},e,{ref:t,__css:n.thead}))})),zT=Im(((e,t)=>{var n=ym();return h.exports.createElement(Dm.tbody,RT({},e,{ref:t,__css:n.tbody}))})),NT=Im(((e,t)=>{var{isNumeric:n}=e,r=OT(e,["isNumeric"]),i=ym();return h.exports.createElement(Dm.th,RT({},r,{ref:t,__css:i.th,"data-is-numeric":n}))})),BT=Im(((e,t)=>{var n=ym();return h.exports.createElement(Dm.tr,RT({role:"row"},e,{ref:t,__css:n.tr}))})),FT=Im(((e,t)=>{var{isNumeric:n}=e,r=OT(e,["isNumeric"]),i=ym();return h.exports.createElement(Dm.td,RT({role:"gridcell"},r,{ref:t,__css:i.td,"data-is-numeric":n}))}));var HT={exports:{}};function UT(){}function jT(){}jT.resetWarningCache=UT;HT.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:jT,resetWarningCache:UT};return n.PropTypes=n,n}();function VT(e,t){return n=t,r=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},(i=h.exports.useState((function(){return{value:n,callback:r,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=r,i.facade;var n,r,i}var WT={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},GT=function(){return(GT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function qT(e){return e}function XT(e,t){void 0===t&&(t=qT);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter((function(e){return e!==i}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(o)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}function YT(e,t){return void 0===t&&(t=qT),XT(e,t)}function $T(e){void 0===e&&(e={});var t=XT(null);return t.options=GT({async:!0,ssr:!1},e),t}var ZT=function(e){var t=e.sideCar,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return h.exports.createElement(r,GT({},n))};ZT.isSideCarExport=!0;var JT=YT({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),QT=YT(),KT=YT(),eA=$T({async:!0}),tA=[],nA=h.exports.forwardRef((function(e,t){var n,r=h.exports.useState(),i=r[0],o=r[1],a=h.exports.useRef(),s=h.exports.useRef(!1),l=h.exports.useRef(null),c=e.children,u=e.disabled,d=e.noFocusGuards,f=e.persistentFocus,p=e.crossFrame,m=e.autoFocus;e.allowTextSelection;var g=e.group,v=e.className,y=e.whiteList,b=e.shards,x=void 0===b?tA:b,_=e.as,w=void 0===_?"div":_,S=e.lockProps,M=void 0===S?{}:S,E=e.sideCar,T=e.returnFocus,A=e.onActivation,C=e.onDeactivation,k=h.exports.useState({})[0],P=h.exports.useCallback((function(){l.current=l.current||document&&document.activeElement,a.current&&A&&A(a.current),s.current=!0}),[A]),L=h.exports.useCallback((function(){s.current=!1,C&&C(a.current)}),[C]),R=h.exports.useCallback((function(e){var t=l.current;if(Boolean(T)&&t&&t.focus){var n="object"==typeof T?T:void 0;l.current=null,e?Promise.resolve().then((function(){return t.focus(n)})):t.focus(n)}}),[T]),O=h.exports.useCallback((function(e){s.current&&JT.useMedium(e)}),[]),D=QT.useMedium,I=h.exports.useCallback((function(e){a.current!==e&&(a.current=e,o(e))}),[]),z=id(((n={})["data-focus-lock-disabled"]=u&&"disabled",n["data-focus-lock"]=g,n),M),N=!0!==d,B=N&&"tail"!==d,F=VT([t,I]);return h.exports.createElement(h.exports.Fragment,null,N&&[h.exports.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:u?-1:0,style:WT}),h.exports.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:u?-1:1,style:WT})],!u&&h.exports.createElement(E,{id:k,sideCar:eA,observed:i,disabled:u,persistentFocus:f,crossFrame:p,autoFocus:m,whiteList:y,shards:x,onActivation:P,onDeactivation:L,returnFocus:R}),h.exports.createElement(w,id({ref:F},z,{className:v,onBlur:D,onFocus:O}),c),B&&h.exports.createElement("div",{"data-focus-guard":!0,tabIndex:u?-1:0,style:WT}))}));function rA(e,t){return(rA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}nA.propTypes={},nA.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var iA=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},oA=function(e){return Array.isArray(e)?e:[e]},aA=function(e){return e.parentNode?aA(e.parentNode):e},sA=function(e){return oA(e).filter(Boolean).reduce((function(e,t){var n=t.getAttribute("data-focus-lock");return e.push.apply(e,n?function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter((function(e,n){return!t.has(n)}))}(iA(aA(t).querySelectorAll('[data-focus-lock="'+n+'"]:not([data-focus-lock-disabled="disabled"])'))):[t]),e}),[])},lA=function(e){return!e||e===document||e&&e.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(e,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&lA(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode);var t},cA=function(e){return Boolean(e&&e.dataset&&e.dataset.focusGuard)},uA=function(e){return!cA(e)},dA=function(e){return Boolean(e)},hA=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},fA=function(e,t,n){return iA(e).map((function(e,t){return{node:e,index:t,tabIndex:n&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!t||e.tabIndex>=0})).sort(hA)},pA=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),mA=pA+", [data-focus-guard]",gA=function(e,t){return e.reduce((function(e,n){return e.concat(iA(n.querySelectorAll(t?mA:pA)),n.parentNode?iA(n.parentNode.querySelectorAll(pA)).filter((function(e){return e===n})):[])}),[])},vA=function(e){return iA(e).filter((function(e){return lA(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},yA=function(e,t){return fA(vA(gA(e,t)),!0,t)},bA=function(e){return fA(vA(gA(e)),!1)},xA=function(e){return vA((t=e.querySelectorAll("[data-autofocus-inside]"),iA(t).map((function(e){return gA([e])})).reduce((function(e,t){return e.concat(t)}),[])));var t},_A=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&_A(e.parentNode,t),t},wA=function(e,t){for(var n=_A(e),r=_A(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},SA=function(e,t,n){var r=oA(e),i=oA(t),o=r[0],a=!1;return i.filter(Boolean).forEach((function(e){a=wA(a||e,e)||a,n.filter(Boolean).forEach((function(e){var t=wA(o,e);t&&(a=!a||t.contains(a)?t:wA(t,a))}))})),a},MA=function(e){return Boolean(iA(e.querySelectorAll("iframe")).some((function(e){return e===document.activeElement})))},EA=function(e){var t=document&&document.activeElement;return!(!t||t.dataset&&t.dataset.focusGuard)&&sA(e).reduce((function(e,n){return e||n.contains(t)||MA(n)}),!1)},TA=function(e){return"INPUT"===e.tagName&&"radio"===e.type},AA=function(e,t){return TA(e)&&e.name?function(e,t){return t.filter(TA).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},CA=function(e){return e[0]&&e.length>1?AA(e[0],e):e[0]},kA=function(e,t){return e.length>1?e.indexOf(AA(e[t],e)):t},PA=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=cA(n);if(!(e.indexOf(n)>=0)){var l,c,u=t.indexOf(n),d=r?t.indexOf(r):u,h=r?e.indexOf(r):-1,f=u-d,p=t.indexOf(o),m=t.indexOf(a),g=(l=t,c=new Set,l.forEach((function(e){return c.add(AA(e,l))})),l.filter((function(e){return c.has(e)}))),v=g.indexOf(n)-(r?g.indexOf(r):u),y=kA(e,0),b=kA(e,i-1);return-1===u||-1===h?"NEW_FOCUS":!f&&h>=0?h:u<=p&&s&&Math.abs(f)>1?b:u>=m&&s&&Math.abs(f)>1?y:f&&Math.abs(v)>1?h:u<=p?b:u>m?y:f?Math.abs(f)>1?h:(i+h+f)%i:void 0}},LA=function(e,t){var n=document&&document.activeElement,r=sA(e).filter(uA),i=SA(n||e,e,r),o=bA(r),a=yA(r).filter((function(e){var t=e.node;return uA(t)}));if(a[0]||(a=o)[0]){var s,l,c,u,d=bA([i]).map((function(e){return e.node})),h=(s=d,l=a,c=new Map,l.forEach((function(e){return c.set(e.node,e)})),s.map((function(e){return c.get(e)})).filter(dA)),f=h.map((function(e){return e.node})),p=PA(f,d,n,t);if("NEW_FOCUS"===p){var m=o.map((function(e){return e.node})).filter((u=function(e){return e.reduce((function(e,t){return e.concat(xA(t))}),[])}(r),function(e){return e.autofocus||e.dataset&&!!e.dataset.autofocus||u.indexOf(e)>=0}));return{node:m&&m.length?CA(m):CA(f)}}return void 0===p?p:h[p]}},RA=0,OA=!1,DA=function(e,t){var n,r=LA(e,t);if(!OA&&r){if(RA>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),OA=!0,void setTimeout((function(){OA=!1}),1);RA++,(n=r.node).focus(),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus(),RA--}};function IA(e){var t=window.setImmediate;void 0!==t?t(e):setTimeout(e,1)}var zA=function(){return document&&document.activeElement===document.body||document&&iA(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},NA=null,BA=null,FA=null,HA=!1,UA=function(){return!0};function jA(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else{if(!a.lockItem)break;if(o!==e)return;i=null}}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var VA=function(e){return e&&"current"in e?e.current:e},WA=function(){var e,t,n,r,i,o,a=!1;if(NA){var s=NA,l=s.observed,c=s.persistentFocus,u=s.autoFocus,d=s.shards,h=s.crossFrame,f=l||FA&&FA.portaledElement,p=document&&document.activeElement;if(f){var m=[f].concat(d.map(VA).filter(Boolean));if(p&&!function(e){return(NA.whiteList||UA)(e)}(p)||(c||(h?Boolean(HA):"meanwhile"===HA)||!zA()||!BA&&u)&&(!f||EA(m)||(o=p,FA&&FA.portaledElement===o)||(document&&!BA&&p&&!u?(p.blur&&p.blur(),document.body.focus()):(a=DA(m,BA),FA={})),HA=!1,BA=document&&document.activeElement),document){var g=document&&document.activeElement,v=(t=sA(e=m).filter(uA),n=SA(e,e,t),r=yA([n],!0),i=yA(t).filter((function(e){var t=e.node;return uA(t)})).map((function(e){return e.node})),r.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:i.indexOf(t)>=0,guard:cA(t)}}))),y=v.map((function(e){return e.node})).indexOf(g);y>-1&&(v.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),jA(y,v.length,1,v),jA(y,-1,-1,v))}}}return a},GA=function(e){WA()&&e&&(e.stopPropagation(),e.preventDefault())},qA=function(){return IA(WA)},XA=function(){HA="just",setTimeout((function(){HA="meanwhile"}),0)};JT.assignSyncMedium((function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(FA={observerNode:n,portaledElement:t})})),QT.assignMedium(qA),KT.assignMedium((function(e){return e({moveFocusInside:DA,focusInside:EA})}));var YA,$A,ZA=(YA=function(e){return e.filter((function(e){return!e.disabled}))},$A=function(e){var t=e.slice(-1)[0];t&&!NA&&(document.addEventListener("focusin",GA,!0),document.addEventListener("focusout",qA),window.addEventListener("blur",XA));var n=NA,r=n&&t&&t.id===n.id;NA=t,n&&!r&&(n.onDeactivation(),e.filter((function(e){return e.id===n.id})).length||n.returnFocus(!t)),t?(BA=null,r&&n.observed===t.observed||t.onActivation(),WA(),IA(WA)):(document.removeEventListener("focusin",GA,!0),document.removeEventListener("focusout",qA),window.removeEventListener("blur",XA),BA=null)},function(e){var t,n=[];function r(){t=YA(n.map((function(e){return e.props}))),$A(t)}var i,o,a,s=function(i){var o,a;function s(){return i.apply(this,arguments)||this}a=i,(o=s).prototype=Object.create(a.prototype),o.prototype.constructor=o,rA(o,a),s.peek=function(){return t};var l=s.prototype;return l.componentDidMount=function(){n.push(this),r()},l.componentDidUpdate=function(){r()},l.componentWillUnmount=function(){var e=n.indexOf(this);n.splice(e,1),r()},l.render=function(){return $.createElement(e,this.props)},s}(h.exports.PureComponent);return i=s,o="displayName",a="SideEffect("+function(e){return e.displayName||e.name||"Component"}(e)+")",o in i?Object.defineProperty(i,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[o]=a,s})((function(){return null})),JA=h.exports.forwardRef((function(e,t){return h.exports.createElement(nA,id({sideCar:ZA,ref:t},e))})),QA=nA.propTypes||{};QA.sideCar,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n])}(QA,["sideCar"]),JA.propTypes={};var KA=e=>{var{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:c}=e,u=h.exports.useCallback((()=>{if(null!=t&&t.current)t.current.focus();else if(null!=r&&r.current){0===(e=r.current,(n=Array.from(e.querySelectorAll(kh))).unshift(e),n.filter(Ch).filter((e=>"none"!==window.getComputedStyle(e).display))).length&&Dh(r.current,{nextTick:!0})}var e,n}),[t,r]),d=h.exports.useCallback((()=>{var e;null==n||null==(e=n.current)||e.focus()}),[n]),f=i&&!n;return h.exports.createElement(JA,{crossFrame:c,persistentFocus:l,autoFocus:s,disabled:a,onActivation:u,onDeactivation:d,returnFocus:f},o)},eC=function(){return(eC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var tC=$T(),nC=function(){},rC=h.exports.forwardRef((function(e,t){var n=h.exports.useRef(null),r=h.exports.useState({onScrollCapture:nC,onWheelCapture:nC,onTouchMoveCapture:nC}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,y=void 0===v?"div":v,b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=f,_=VT([n,t]),w=eC({},b,i);return h.exports.createElement(h.exports.Fragment,null,u&&h.exports.createElement(x,{sideCar:tC,removeScrollBar:c,shards:d,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n}),a?h.exports.cloneElement(h.exports.Children.only(s),eC({},w,{ref:_})):h.exports.createElement(y,eC({},w,{className:l,ref:_}),s))}));rC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},rC.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};function iC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var oC=function(){var e=0,t=null;return{add:function(n){var r,i;0==e&&(t=iC())&&(i=n,(r=t).styleSheet?r.styleSheet.cssText=i:r.appendChild(document.createTextNode(i)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},aC=function(){var e,t=(e=oC(),function(t){h.exports.useEffect((function(){return e.add(t),function(){e.remove()}}),[])});return function(e){var n=e.styles;return t(n),null}},sC={left:0,top:0,right:0,gap:0},lC=function(e){return parseInt(e||"",10)||0},cC=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return sC;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[lC(n),lC(r),lC(i)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},uC=aC(),dC=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+s+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[t&&"position: relative "+r+";","margin"===n&&"\n padding-left: "+i+"px;\n padding-top: "+o+"px;\n padding-right: "+a+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+s+"px "+r+";\n ","padding"===n&&"padding-right: "+s+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+s+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+s+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n \n body {\n --removed-body-scroll-bar-size: "+s+"px;\n }\n"},hC=function(e){var t=h.exports.useState(cC(e.gapMode)),n=t[0],r=t[1];h.exports.useEffect((function(){r(cC(e.gapMode))}),[e.gapMode]);var i=e.noRelative,o=e.noImportant,a=e.gapMode,s=void 0===a?"margin":a;return h.exports.createElement(uC,{styles:dC(n,!i,s,o?"":"!important")})},fC=function(e,t){var n=t;do{if(pC(e,n)){var r=mC(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},pC=function(e,t){return"v"===e?function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)}(t):function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)}(t)},mC=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},gC=!1;if("undefined"!=typeof window)try{var vC=Object.defineProperty({},"passive",{get:function(){return gC=!0,!0}});window.addEventListener("test",vC,vC),window.removeEventListener("test",vC,vC)}catch(g2){gC=!1}var yC=!!gC&&{passive:!1},bC=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xC=function(e){return[e.deltaX,e.deltaY]},_C=function(e){return e&&"current"in e?e.current:e},wC=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},SC=0,MC=[];var EC,TC=(EC=function(e){var t=h.exports.useRef([]),n=h.exports.useRef([0,0]),r=h.exports.useRef(),i=h.exports.useState(SC++)[0],o=h.exports.useState((function(){return aC()}))[0],a=h.exports.useRef(e);h.exports.useEffect((function(){a.current=e}),[e]),h.exports.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+i);var t=[e.lockRef.current].concat((e.shards||[]).map(_C)).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-"+i)})),function(){document.body.classList.remove("block-interactivity-"+i),t.forEach((function(e){return e.classList.remove("allow-interactivity-"+i)}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=h.exports.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var i,o=bC(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],c="deltaY"in e?e.deltaY:s[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v",h=fC(d,u);if(!h)return!0;if(h?i=d:(i="v"===d?"h":"v",h=fC(d,u)),!h)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=i),!i)return!0;var f=r.current||i;return function(e,t,n,r,i){var o=r,a=n.target,s=t.contains(a),l=!1,c=o>0,u=0,d=0;do{var h=mC(e,a),f=h[0],p=h[1]-h[2]-f;(f||p)&&pC(e,a)&&(u+=p,d+=f),a=a.parentNode}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(c&&(i&&0===u||!i&&o>u)||!c&&(i&&0===d||!i&&-o>d))&&(l=!0),l}(f,t,e,"h"===f?l:c,!0)}),[]),l=h.exports.useCallback((function(e){var n=e;if(MC.length&&MC[MC.length-1]===o){var r="deltaY"in n?xC(n):bC(n),i=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,i=r,t[0]===i[0]&&t[1]===i[1]);var t,i}))[0];if(i&&i.should)n.preventDefault();else if(!i){var l=(a.current.shards||[]).map(_C).filter(Boolean).filter((function(e){return e.contains(n.target)}));(l.length>0?s(n,l[0]):!a.current.noIsolation)&&n.preventDefault()}}}),[]),c=h.exports.useCallback((function(e,n,r,i){var o={name:e,delta:n,target:r,should:i};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),u=h.exports.useCallback((function(e){n.current=bC(e),r.current=void 0}),[]),d=h.exports.useCallback((function(t){c(t.type,xC(t),t.target,s(t,e.lockRef.current))}),[]),f=h.exports.useCallback((function(t){c(t.type,bC(t),t.target,s(t,e.lockRef.current))}),[]);h.exports.useEffect((function(){return MC.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,yC),document.addEventListener("touchmove",l,yC),document.addEventListener("touchstart",u,yC),function(){MC=MC.filter((function(e){return e!==o})),document.removeEventListener("wheel",l,yC),document.removeEventListener("touchmove",l,yC),document.removeEventListener("touchstart",u,yC)}}),[]);var p=e.removeScrollBar,m=e.inert;return h.exports.createElement(h.exports.Fragment,null,m?h.exports.createElement(o,{styles:wC(i)}):null,p?h.exports.createElement(hC,{gapMode:"margin"}):null)},tC.useMedium(EC),ZT),AC=h.exports.forwardRef((function(e,t){return h.exports.createElement(rC,eC({},e,{ref:t,sideCar:TC}))}));function CC(){return(CC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}AC.classNames=rC.classNames;var kC={slideInBottom:CC({},yE,{custom:{offsetY:16,reverse:!0}}),slideInRight:CC({},yE,{custom:{offsetX:16,reverse:!0}}),scale:CC({},gE,{custom:{initialScale:.95,reverse:!0}}),none:{}},PC=Dm(nE.section),LC=h.exports.forwardRef(((e,t)=>{var{preset:n}=e,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["preset"]),i=kC[n];return h.exports.createElement(PC,CC({ref:t},i,r))})),RC=new WeakMap,OC=new WeakMap,DC={},IC=0,zC=function(e,t,n){void 0===t&&(t=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e)),void 0===n&&(n="data-aria-hidden");var r=Array.isArray(e)?e:[e];DC[n]||(DC[n]=new WeakMap);var i=DC[n],o=[],a=new Set,s=function(e){e&&!a.has(e)&&(a.add(e),s(e.parentNode))};r.forEach(s);var l=function(e){!e||r.indexOf(e)>=0||Array.prototype.forEach.call(e.children,(function(e){if(a.has(e))l(e);else{var t=e.getAttribute("aria-hidden"),r=null!==t&&"false"!==t,s=(RC.get(e)||0)+1,c=(i.get(e)||0)+1;RC.set(e,s),i.set(e,c),o.push(e),1===s&&r&&OC.set(e,!0),1===c&&e.setAttribute(n,"true"),r||e.setAttribute("aria-hidden","true")}}))};return l(t),a.clear(),IC++,function(){o.forEach((function(e){var t=RC.get(e)-1,r=i.get(e)-1;RC.set(e,t),i.set(e,r),t||(OC.has(e)||e.removeAttribute("aria-hidden"),OC.delete(e)),r||e.removeAttribute(n)})),--IC||(RC=new WeakMap,RC=new WeakMap,OC=new WeakMap,DC={})}};var NC=new class{constructor(){var e,t,n;n=void 0,(t="modals")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter((t=>t!==e))}isTopModal(e){return this.modals[this.modals.length-1]===e}};function BC(){return(BC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function FC(e){var t,n,{isOpen:r,onClose:i,id:o,closeOnOverlayClick:a=!0,closeOnEsc:s=!0,useInert:l=!0,onOverlayClick:c,onEsc:u}=e,d=h.exports.useRef(null),f=h.exports.useRef(null),[p,m,g]=function(e){for(var t=ff(e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.map((e=>e+"-"+t))}(o,"chakra-modal","chakra-modal--header","chakra-modal--body");t=d,n=r&&l,h.exports.useEffect((()=>{if(t.current){var e=null;return n&&t.current&&(e=zC(t.current)),()=>{n&&(null==e||e())}}}),[n,t]),function(e,t){h.exports.useEffect((()=>(t&&NC.add(e),()=>{NC.remove(e)})),[t,e])}(d,r);var v=h.exports.useRef(null),y=h.exports.useCallback((e=>{v.current=e.target}),[]),b=h.exports.useCallback((e=>{"Escape"===e.key&&(e.stopPropagation(),s&&(null==i||i()),null==u||u())}),[s,i,u]),[x,_]=h.exports.useState(!1),[w,S]=h.exports.useState(!1),M=h.exports.useCallback((function(e,t){return void 0===e&&(e={}),void 0===t&&(t=null),BC({role:"dialog"},e,{ref:Kh(t,d),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":x?m:void 0,"aria-describedby":w?g:void 0,onClick:Lh(e.onClick,(e=>e.stopPropagation()))})}),[g,w,p,m,x]),E=h.exports.useCallback((e=>{e.stopPropagation(),v.current===e.target&&NC.isTopModal(d)&&(a&&(null==i||i()),null==c||c())}),[i,a,c]),T=h.exports.useCallback((function(e,t){return void 0===e&&(e={}),void 0===t&&(t=null),BC({},e,{ref:Kh(t,f),onClick:Lh(e.onClick,E),onKeyDown:Lh(e.onKeyDown,b),onMouseDown:Lh(e.onMouseDown,y)})}),[b,y,E]);return{isOpen:r,onClose:i,headerId:m,bodyId:g,setBodyMounted:S,setHeaderMounted:_,dialogRef:d,overlayRef:f,getDialogProps:M,getDialogContainerProps:T}}function HC(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function UC(){return(UC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var[jC,VC]=ef({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),WC=e=>{var{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:c,preserveScrollBarGap:u,motionPreset:d,lockFocusAcrossFrames:f}=e,p=Nm("Modal",e),m=UC({},FC(e),{autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:c,preserveScrollBarGap:u,motionPreset:d,lockFocusAcrossFrames:f});return h.exports.createElement(jC,{value:m},h.exports.createElement(vm,{value:p},h.exports.createElement(lE,null,m.isOpen&&h.exports.createElement(_f,t,n))))};WC.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};var GC=Dm(nE.div),qC=Im(((e,t)=>{var{className:n,children:r,containerProps:i}=e,o=HC(e,["className","children","containerProps"]),{getDialogProps:a,getDialogContainerProps:s}=VC(),l=a(o,t),c=s(i),u=Mh("chakra-modal__content",n),d=ym(),f=UC({display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0},d.dialog),p=UC({display:"flex",width:"100vw",height:"100vh","@supports(height: -webkit-fill-available)":{height:"-webkit-fill-available"},position:"fixed",left:0,top:0},d.dialogContainer),{motionPreset:m}=VC();return h.exports.createElement(XC,null,h.exports.createElement(Dm.div,UC({},c,{className:"chakra-modal__content-container",__css:p}),h.exports.createElement(LC,UC({preset:m,className:u},l,{__css:f}),r)))}));function XC(e){var{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:c,lockFocusAcrossFrames:u}=VC(),[d,f]=Fy();return h.exports.useEffect((()=>{!d&&f&&setTimeout(f)}),[d,f]),h.exports.createElement(KA,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:u},h.exports.createElement(AC,{removeScrollBar:!c,allowPinchZoom:a,enabled:o,forwardProps:!0},e.children))}var YC=Im(((e,t)=>{var{className:n}=e,r=HC(e,["className","transition"]),i=Mh("chakra-modal__overlay",n),o=UC({pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh"},ym().overlay),{motionPreset:a}=VC(),s="none"===a?{}:pE;return h.exports.createElement(GC,UC({},s,{__css:o,ref:t,className:i},r))})),$C=Im(((e,t)=>{var{className:n}=e,r=HC(e,["className"]),{headerId:i,setHeaderMounted:o}=VC();h.exports.useEffect((()=>(o(!0),()=>o(!1))),[o]);var a=Mh("chakra-modal__header",n),s=UC({flex:0},ym().header);return h.exports.createElement(Dm.header,UC({ref:t,className:a,id:i},r,{__css:s}))})),ZC=Im(((e,t)=>{var{className:n}=e,r=HC(e,["className"]),{bodyId:i,setBodyMounted:o}=VC();h.exports.useEffect((()=>(o(!0),()=>o(!1))),[o]);var a=Mh("chakra-modal__body",n),s=ym();return h.exports.createElement(Dm.div,UC({ref:t,className:a,id:i},r,{__css:s.body}))})),JC=Im(((e,t)=>{var{onClick:n,className:r}=e,i=HC(e,["onClick","className"]),{onClose:o}=VC(),a=Mh("chakra-modal__close-btn",r),s=ym();return h.exports.createElement(UE,UC({ref:t,__css:s.closeButton,className:a,onClick:Lh(n,(e=>{e.stopPropagation(),o()}))},i))}));function QC(){return(QC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var KC=Im(((e,t)=>{var n=Nm("Tag",e),r=xm(e),i=QC({display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%"},n.container);return h.exports.createElement(vm,{value:n},h.exports.createElement(Dm.span,QC({ref:t},r,{__css:i})))})),ek=$.createContext(null);var tk=function(e){e()},nk={notify:function(){}};function rk(){var e=tk,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var ik=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=nk,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=rk())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=nk)},e}(),ok="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?h.exports.useLayoutEffect:h.exports.useEffect;function ak(e){var t=e.store,n=e.context,r=e.children,i=h.exports.useMemo((function(){var e=new ik(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),o=h.exports.useMemo((function(){return t.getState()}),[t]);ok((function(){var e=i.subscription;return e.trySubscribe(),o!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[i,o]);var a=n||ek;return $.createElement(a.Provider,{value:i},r)}function sk(){return h.exports.useContext(ek)}function lk(e){void 0===e&&(e=ek);var t=e===ek?sk:function(){return h.exports.useContext(e)};return function(){return t().store}}var ck=lk();function uk(e){void 0===e&&(e=ek);var t=e===ek?ck:lk(e);return function(){return t().dispatch}}var dk=uk(),hk=function(e,t){return e===t};function fk(e){void 0===e&&(e=ek);var t=e===ek?sk:function(){return h.exports.useContext(e)};return function(e,n){void 0===n&&(n=hk);var r=t(),i=function(e,t,n,r){var i,o=h.exports.useReducer((function(e){return e+1}),0)[1],a=h.exports.useMemo((function(){return new ik(n,r)}),[n,r]),s=h.exports.useRef(),l=h.exports.useRef(),c=h.exports.useRef(),u=h.exports.useRef(),d=n.getState();try{if(e!==l.current||d!==c.current||s.current){var f=e(d);i=void 0!==u.current&&t(f,u.current)?u.current:f}else i=u.current}catch(g2){throw s.current&&(g2.message+="\nThe error may be correlated with this previous error:\n"+s.current.stack+"\n\n"),g2}return ok((function(){l.current=e,c.current=d,u.current=i,s.current=void 0})),ok((function(){function e(){try{var e=n.getState(),r=l.current(e);if(t(r,u.current))return;u.current=r,c.current=e}catch(g2){s.current=g2}o()}return a.onStateChange=e,a.trySubscribe(),e(),function(){return a.tryUnsubscribe()}}),[n,a]),i}(e,n,r.store,r.subscription);return h.exports.useDebugValue(i),i}}var pk,mk=fk();pk=Z.exports.unstable_batchedUpdates,tk=pk;var gk,vk=u&&u.__extends||(gk=function(e,t){return(gk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}gk(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),yk=u&&u.__assign||function(){return(yk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},bk=u&&u.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},xk=u&&u.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},_k=xk(HT.exports),wk=xk(h.exports);function Sk(e,t,n){var r=function(e,t,n){var r=n[e+"Style"]||"",i=t&&t[e]||"";return r?r+";"+i:i}(e,t,n);return r?' style="'+r+'"':""}var Mk={'"':"&quot;","'":"&apos;","&":"&amp;",">":"&gt;","<":"&lt"};var Ek=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return vk(t,e),t.prototype.render=function(){var e,t=this.props,n=t.json,r=t.data,i=t.replacer,o=t.space,a=t.themeClassName,s=t.theme,l=t.onJSONPrettyError,c=t.onError,u=t.silent,d=t.mainStyle,h=t.keyStyle,f=t.valueStyle,p=t.stringStyle,m=t.booleanStyle,g=t.errorStyle,v=bk(t,["json","data","replacer","space","themeClassName","theme","onJSONPrettyError","onError","silent","mainStyle","keyStyle","valueStyle","stringStyle","booleanStyle","errorStyle"]),y={mainStyle:d,keyStyle:h,valueStyle:f,stringStyle:p,booleanStyle:m,errorStyle:g},b=r||n;if("string"==typeof b)try{b=JSON.parse(b)}catch(x){return u||console.warn("[react-json-pretty]: "+x.message),l&&l(x),!l&&c&&(c(x),console.warn("JSONPretty#onError is deprecated, please use JSONPretty#onJSONPrettyError instead")),wk.createElement("div",yk({},v,{dangerouslySetInnerHTML:{__html:'<pre class="__json-pretty-error__"'+Sk("error",s,y)+">"+(e=b,(e?e.replace(/<|>|&|"|'/g,(function(e){return Mk[e]})):e)+"</pre>")}}))}return wk.createElement("div",yk({},v,{dangerouslySetInnerHTML:{__html:'<pre class="'+a+'"'+Sk("main",s,y)+">"+this._pretty(s,b,i,+o,y)+"</pre>"}}))},t.prototype._pretty=function(e,t,n,r,i){var o=JSON.stringify(t,"function"==typeof n?n:null,isNaN(r)?2:r);return o?o.replace(/&/g,"&amp;").replace(/\\"([^,])/g,"\\&quot;$1").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/^( *)("[^"]+": )?("[^"]*"|[\w.+-]*)?([,[{]|\[\s*\],?|\{\s*\},?)?$/gm,this._replace.bind(null,e,i)):o},t.prototype._replace=function(e,t,n,r,i,o,a){var s="</span>",l='<span class="__json-key__"'+Sk("key",e,t)+">",c='<span class="__json-value__"'+Sk("value",e,t)+">",u='<span class="__json-string__"'+Sk("string",e,t)+">",d='<span class="__json-boolean__"'+Sk("boolean",e,t)+">",h=r||"";return i&&(h=h+'"'+l+i.replace(/^"|":\s$/g,"")+'</span>": '),o&&(h="true"===o||"false"===o?h+d+o+s:h+('"'===o[0]?u:c)+o+s),h+(a||"")},t.propTypes={data:_k.any,json:_k.any,replacer:_k.func,silent:_k.bool,space:_k.oneOfType([_k.number,_k.string]),theme:_k.object,themeClassName:_k.string,onJSONPrettyError:_k.func},t.defaultProps={data:"",json:"",silent:!0,space:2,themeClassName:"__json-pretty__"},t}(wk.Component);function Tk(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Ak="function"==typeof Symbol&&Symbol.observable||"@@observable",Ck=function(){return Math.random().toString(36).substring(7).split("").join(".")},kk={INIT:"@@redux/INIT"+Ck(),REPLACE:"@@redux/REPLACE"+Ck(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ck()}};function Pk(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Lk(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Tk(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Tk(1));return n(Lk)(e,t)}if("function"!=typeof e)throw new Error(Tk(2));var i=e,o=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function u(){if(l)throw new Error(Tk(3));return o}function d(e){if("function"!=typeof e)throw new Error(Tk(4));if(l)throw new Error(Tk(5));var t=!0;return c(),s.push(e),function(){if(t){if(l)throw new Error(Tk(6));t=!1,c();var n=s.indexOf(e);s.splice(n,1),a=null}}}function h(e){if(!Pk(e))throw new Error(Tk(7));if(void 0===e.type)throw new Error(Tk(8));if(l)throw new Error(Tk(9));try{l=!0,o=i(o,e)}finally{l=!1}for(var t=a=s,n=0;n<t.length;n++){(0,t[n])()}return e}function f(e){if("function"!=typeof e)throw new Error(Tk(10));i=e,h({type:kk.REPLACE})}function p(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(Tk(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[Ak]=function(){return this},e}return h({type:kk.INIT}),(r={dispatch:h,subscribe:d,getState:u,replaceReducer:f})[Ak]=p,r}function Rk(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];"function"==typeof e[i]&&(n[i]=e[i])}var o,a=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:kk.INIT}))throw new Error(Tk(12));if(void 0===n(void 0,{type:kk.PROBE_UNKNOWN_ACTION()}))throw new Error(Tk(13))}))}(n)}catch(s){o=s}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,i={},s=0;s<a.length;s++){var l=a[s],c=n[l],u=e[l],d=c(u,t);if(void 0===d)throw t&&t.type,new Error(Tk(14));i[l]=d,r=r||d!==u}return(r=r||a.length!==Object.keys(e).length)?i:e}}var Ok={exports:{}};!function(e,t){function n(e){return"object"!=typeof e||"toString"in e?e:Object.prototype.toString.call(e).slice(8,-1)}Object.defineProperty(t,"__esModule",{value:!0});var r="object"==typeof process&&!0;function i(e,t){if(!e){if(r)throw new Error("Invariant failed");throw new Error(t())}}t.invariant=i;var o=Object.prototype.hasOwnProperty,a=Array.prototype.splice,s=Object.prototype.toString;function l(e){return s.call(e).slice(8,-1)}var c=Object.assign||function(e,t){return u(t).forEach((function(n){o.call(t,n)&&(e[n]=t[n])})),e},u="function"==typeof Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function d(e){return Array.isArray(e)?c(e.constructor(e.length),e):"Map"===l(e)?new Map(e):"Set"===l(e)?new Set(e):e&&"object"==typeof e?c(Object.create(Object.getPrototypeOf(e)),e):e}var h=function(){function e(){this.commands=c({},f),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(e,t){return e===t},this.update.newContext=function(){return(new e).update}}return Object.defineProperty(e.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(e){this.update.isEquals=e},enumerable:!0,configurable:!0}),e.prototype.extend=function(e,t){this.commands[e]=t},e.prototype.update=function(e,t){var n=this,r="function"==typeof t?{$apply:t}:t;Array.isArray(e)&&Array.isArray(r)||i(!Array.isArray(r),(function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."})),i("object"==typeof r&&null!==r,(function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(n.commands).join(", ")+"."}));var a=e;return u(r).forEach((function(t){if(o.call(n.commands,t)){var i=e===a;a=n.commands[t](r[t],a,r,e),i&&n.isEquals(a,e)&&(a=e)}else{var s="Map"===l(e)?n.update(e.get(t),r[t]):n.update(e[t],r[t]),c="Map"===l(a)?a.get(t):a[t];n.isEquals(s,c)&&(void 0!==s||o.call(e,t))||(a===e&&(a=d(e)),"Map"===l(a)?a.set(t,s):a[t]=s)}})),a},e}();t.Context=h;var f={$push:function(e,t,n){return m(t,n,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,n){return m(t,n,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,r,o){return function(e,t){i(Array.isArray(e),(function(){return"Expected $splice target to be an array; got "+n(e)})),v(t.$splice)}(t,r),e.forEach((function(e){v(e),t===o&&e.length&&(t=d(o)),a.apply(t,e)})),t},$set:function(e,t,n){return function(e){i(1===Object.keys(e).length,(function(){return"Cannot have more than one key in an object with $set"}))}(n),e},$toggle:function(e,t){g(e,"$toggle");var n=e.length?d(t):t;return e.forEach((function(e){n[e]=!t[e]})),n},$unset:function(e,t,n,r){return g(e,"$unset"),e.forEach((function(e){Object.hasOwnProperty.call(t,e)&&(t===r&&(t=d(r)),delete t[e])})),t},$add:function(e,t,n,r){return y(t,"$add"),g(e,"$add"),"Map"===l(t)?e.forEach((function(e){var n=e[0],i=e[1];t===r&&t.get(n)!==i&&(t=d(r)),t.set(n,i)})):e.forEach((function(e){t!==r||t.has(e)||(t=d(r)),t.add(e)})),t},$remove:function(e,t,n,r){return y(t,"$remove"),g(e,"$remove"),e.forEach((function(e){t===r&&t.has(e)&&(t=d(r)),t.delete(e)})),t},$merge:function(e,t,r,o){var a,s;return a=t,i((s=e)&&"object"==typeof s,(function(){return"update(): $merge expects a spec of type 'object'; got "+n(s)})),i(a&&"object"==typeof a,(function(){return"update(): $merge expects a target of type 'object'; got "+n(a)})),u(e).forEach((function(n){e[n]!==t[n]&&(t===o&&(t=d(o)),t[n]=e[n])})),t},$apply:function(e,t){return function(e){i("function"==typeof e,(function(){return"update(): expected spec of $apply to be a function; got "+n(e)+"."}))}(e),e(t)}},p=new h;function m(e,t,r){i(Array.isArray(e),(function(){return"update(): expected target of "+n(r)+" to be an array; got "+n(e)+"."})),g(t[r],r)}function g(e,t){i(Array.isArray(e),(function(){return"update(): expected spec of "+n(t)+" to be an array; got "+n(e)+". Did you forget to wrap your parameter in an array?"}))}function v(e){i(Array.isArray(e),(function(){return"update(): expected spec of $splice to be an array of arrays; got "+n(e)+". Did you forget to wrap your parameters in an array?"}))}function y(e,t){var r=l(e);i("Map"===r||"Set"===r,(function(){return"update(): "+n(t)+" expects a target of type Set or Map; got "+n(r)}))}t.isEquals=p.update.isEquals,t.extend=p.extend,t.default=p.update,t.default.default=e.exports=c(t.default,t)}(Ok,Ok.exports);var Dk=d(Ok.exports),Ik=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}},zk=function(e){return"function"==typeof e},Nk=function(e){return e.toString()},Bk=function(e){return"string"==typeof e},Fk=function(e){return e},Hk=function(e){return null===e};function Uk(e,t,n){void 0===t&&(t=Fk),Ik(zk(t)||Hk(t),"Expected payloadCreator to be a function, undefined or null");var r=Hk(t)||t===Fk?Fk:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return e instanceof Error?e:t.apply(void 0,[e].concat(r))},i=zk(n),o=e.toString(),a=function(){var t=r.apply(void 0,arguments),o={type:e};return t instanceof Error&&(o.error=!0),void 0!==t&&(o.payload=t),i&&(o.meta=n.apply(void 0,arguments)),o};return a.toString=function(){return o},a}var jk=function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},Vk=function(e){return Array.isArray(e)},Wk=function(e){return null==e},Gk=function(e){return e[e.length-1]},qk=function(e){return Xk.test(e)?e.toLowerCase():Yk.test(e)?(function(e){return e.replace(Zk,(function(e,t){return t?" "+t:""}))}(e)||e).toLowerCase():$k.test(e)?function(e){return e.replace(Jk,(function(e,t,n){return t+" "+n.toLowerCase().split("").join(" ")}))}(e).toLowerCase():e.toLowerCase()},Xk=/\s/,Yk=/(_|-|\.|:)/,$k=/([a-z][A-Z]|[A-Z][a-z])/;var Zk=/[\W_]+(.|$)/g;var Jk=/(.)([A-Z]+)/g;var Qk=qk;var Kk=function(e){return Qk(e).replace(/[\W_]+(.|$)/g,(function(e,t){return t?" "+t:""})).trim()},eP=function(e){return Kk(e).replace(/\s(\w)/g,(function(e,t){return t.toUpperCase()}))};var tP=function(e){return-1===e.indexOf("/")?eP(e):e.split("/").map(eP).join("/")},nP=function(e,t){return e.reduce((function(e,n){return t(e,n)}),{})},rP=function(e){return"undefined"!=typeof Map&&e instanceof Map};function iP(e){if(rP(e))return Array.from(e.keys());if("undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys)return Reflect.ownKeys(e);var t=Object.getOwnPropertyNames(e);return"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t}function oP(e,t){return rP(t)?t.get(e):t[e]}var aP=function(e){return function t(n,r,i,o){var a=void 0===r?{}:r,s=a.namespace,l=void 0===s?"/":s,c=a.prefix;return void 0===i&&(i={}),void 0===o&&(o=""),iP(n).forEach((function(r){var a=function(e){return o||!c||c&&new RegExp("^"+c+l).test(e)?e:""+c+l+e}(function(e){var t;if(!o)return e;var n=e.toString().split("||"),r=o.split("||");return(t=[]).concat.apply(t,r.map((function(e){return n.map((function(t){return""+e+l+t}))}))).join("||")}(r)),s=oP(r,n);e(s)?t(s,{namespace:l,prefix:c},i,a):i[a]=s})),i}},sP=aP(jk);function lP(e,t){var n=void 0===t?{}:t,r=n.namespace,i=void 0===r?"/":r,o=n.prefix;function a(t,n,r){var i=tP(r.shift());0===r.length?n[i]=e[t]:(n[i]||(n[i]={}),a(t,n[i],r))}var s={};return Object.getOwnPropertyNames(e).forEach((function(e){var t=o?e.replace(""+o+i,""):e;return a(e,s,t.split(i))})),s}function cP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){uP(e,t,n[t])}))}return e}function uP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dP(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=jk(Gk(n))?n.pop():{};return Ik(n.every(Bk)&&(Bk(e)||jk(e)),"Expected optional object followed by string action types"),Bk(e)?pP([e].concat(n),i):cP({},hP(e,i),pP(n,i))}function hP(e,t){return lP(fP(sP(e,t)),t)}function fP(e,t){var n=void 0===t?{}:t,r=n.prefix,i=n.namespace,o=void 0===i?"/":i;return nP(Object.keys(e),(function(t,n){var i,a=e[n];Ik(function(e){if(zk(e)||Wk(e))return!0;if(Vk(e)){var t=e[0],n=void 0===t?Fk:t,r=e[1];return zk(n)&&zk(r)}return!1}(a),"Expected function, undefined, null, or array with payload and meta functions for "+n);var s=r?""+r+o+n:n,l=Vk(a)?Uk.apply(void 0,[s].concat(a)):Uk(s,a);return cP({},t,((i={})[n]=l,i))}))}function pP(e,t){var n=fP(nP(e,(function(e,t){var n;return cP({},e,((n={})[t]=Fk,n))})),t);return nP(Object.keys(n),(function(e,t){var r;return cP({},e,((r={})[tP(t)]=n[t],r))}))}var mP=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r="function"!=typeof t[t.length-1]&&t.pop(),i=t;if(void 0===r)throw new TypeError("The initial state may not be undefined. If you do not want to set a value for this reducer, you can use null instead of undefined.");return function(e,t){for(var n=arguments.length,o=Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];var s=void 0===e,l=void 0===t;return s&&l&&r?r:i.reduce((function(e,n){return n.apply(void 0,[e,t].concat(o))}),s&&!l&&r?r:e)}};var gP=aP((function(e){return(jk(e)||rP(e))&&(t=iP(e),n=t.every((function(e){return"next"===e||"throw"===e})),!(t.length&&t.length<=2&&n));var t,n}));function vP(e,t,n){void 0===n&&(n={}),Ik(jk(e)||rP(e),"Expected handlers to be a plain object.");var r=gP(e,n),i=iP(r).map((function(e){return function(e,t,n){void 0===t&&(t=Fk);var r=Nk(e).split("||");Ik(!(void 0===n),"defaultState for reducer handling "+r.join(", ")+" should be defined"),Ik(zk(t)||jk(t),"Expected reducer to be a function or object with next and throw reducers");var i=zk(t)?[t,t]:[t.next,t.throw].map((function(e){return Wk(e)?Fk:e})),o=i[0],a=i[1];return function(e,t){void 0===e&&(e=n);var i=t.type;return i&&-1!==r.indexOf(Nk(i))?(!0===t.error?a:o)(e,t):e}}(e,oP(e,r),t)})),o=mP.apply(void 0,i.concat([t]));return function(e,n){return void 0===e&&(e=t),o(e,n)}}var yP=["AD","AE","AF","AG","AI","AL","AM","AO","AR","AS","AT","AU","AW","AX","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LGBT","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW","EU","GB-ENG","GB-NIR","GB-SCT","GB-WLS","GB-ZET","US-CA"],bP=function(e){var t=e.country,n=void 0===t?"US":t,r=e.role,i=void 0===r?"img":r,o=e.size,a=void 0===o?24:o,s=e.alt,l=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["country","role","size","alt"]);if(n){var c=n.toUpperCase();if(void 0!==yP.find((function(e){return e===n}))){var u="https://cdn.jsdelivr.net/gh/madebybowtie/FlagKit@2.2/Assets/SVG/"+c+".svg";return $.createElement("img",Object.assign({src:u,role:i,alt:null!=s?s:c+" Flag",height:a,width:a},l))}return $.createElement("span",null,c)}return null};class xP{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}}const _P=[];for(let v2=0;v2<256;v2++)_P[v2]=(v2<16?"0":"")+v2.toString(16);let wP=1234567;const SP=Math.PI/180,MP=180/Math.PI;function EP(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(_P[255&e]+_P[e>>8&255]+_P[e>>16&255]+_P[e>>24&255]+"-"+_P[255&t]+_P[t>>8&255]+"-"+_P[t>>16&15|64]+_P[t>>24&255]+"-"+_P[63&n|128]+_P[n>>8&255]+"-"+_P[n>>16&255]+_P[n>>24&255]+_P[255&r]+_P[r>>8&255]+_P[r>>16&255]+_P[r>>24&255]).toUpperCase()}function TP(e,t,n){return Math.max(t,Math.min(n,e))}function AP(e,t){return(e%t+t)%t}function CP(e,t,n){return(1-n)*e+n*t}function kP(e){return 0==(e&e-1)&&0!==e}function PP(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function LP(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}var RP=Object.freeze({__proto__:null,DEG2RAD:SP,RAD2DEG:MP,generateUUID:EP,clamp:TP,euclideanModulo:AP,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:CP,damp:function(e,t,n,r){return CP(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(AP(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){return void 0!==e&&(wP=e%2147483647),wP=16807*wP%2147483647,(wP-1)/2147483646},degToRad:function(e){return e*SP},radToDeg:function(e){return e*MP},isPowerOfTwo:kP,ceilPowerOfTwo:PP,floorPowerOfTwo:LP,setQuaternionFromProperEuler:function(e,t,n,r,i){const o=Math.cos,a=Math.sin,s=o(n/2),l=a(n/2),c=o((t+r)/2),u=a((t+r)/2),d=o((t-r)/2),h=a((t-r)/2),f=o((r-t)/2),p=a((r-t)/2);switch(i){case"XYX":e.set(s*u,l*d,l*h,s*c);break;case"YZY":e.set(l*h,s*u,l*d,s*c);break;case"ZXZ":e.set(l*d,l*h,s*u,s*c);break;case"XZX":e.set(s*u,l*p,l*f,s*c);break;case"YXY":e.set(l*f,s*u,l*p,s*c);break;case"ZYZ":e.set(l*p,l*f,s*u,s*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}});class OP{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(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}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}}OP.prototype.isVector2=!0;class DP{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,i,o,a,s,l){const c=this.elements;return c[0]=e,c[1]=r,c[2]=a,c[3]=t,c[4]=i,c[5]=s,c[6]=n,c[7]=o,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],l=n[1],c=n[4],u=n[7],d=n[2],h=n[5],f=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],b=r[7],x=r[2],_=r[5],w=r[8];return i[0]=o*p+a*v+s*x,i[3]=o*m+a*y+s*_,i[6]=o*g+a*b+s*w,i[1]=l*p+c*v+u*x,i[4]=l*m+c*y+u*_,i[7]=l*g+c*b+u*w,i[2]=d*p+h*v+f*x,i[5]=d*m+h*y+f*_,i[8]=d*g+h*b+f*w,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8];return t*o*c-t*a*l-n*i*c+n*a*s+r*i*l-r*o*s}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=c*o-a*l,d=a*s-c*i,h=l*i-o*s,f=t*u+n*d+r*h;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);const p=1/f;return e[0]=u*p,e[1]=(r*l-c*n)*p,e[2]=(a*n-r*o)*p,e[3]=d*p,e[4]=(c*t-r*s)*p,e[5]=(r*i-a*t)*p,e[6]=h*p,e[7]=(n*s-l*t)*p,e[8]=(o*t-n*i)*p,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,o,a){const s=Math.cos(i),l=Math.sin(i);return this.set(n*s,n*l,-n*(s*o+l*a)+o+e,-r*l,r*s,-r*(-l*o+s*a)+a+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],l=r[4],c=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*l,r[6]=t*a+n*c,r[1]=-n*i+t*s,r[4]=-n*o+t*l,r[7]=-n*a+t*c,this}translate(e,t){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}let IP;DP.prototype.isMatrix3=!0;class zP{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===IP&&(IP=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),IP.width=e.width,IP.height=e.height;const n=IP.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=IP}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}}let NP=0;class BP extends xP{constructor(e=BP.DEFAULT_IMAGE,t=BP.DEFAULT_MAPPING,n=1001,r=1001,i=1006,o=1008,a=1023,s=1009,l=1,c=3e3){super(),Object.defineProperty(this,"id",{value:NP++}),this.uuid=EP(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=l,this.format=a,this.internalFormat=null,this.type=s,this.offset=new OP(0,0),this.repeat=new OP(1,1),this.center=new OP(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new DP,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.version=0,this.onUpdate=null}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){const r=this.image;if(void 0===r.uuid&&(r.uuid=EP()),!t&&void 0===e.images[r.uuid]){let t;if(Array.isArray(r)){t=[];for(let e=0,n=r.length;e<n;e++)r[e].isDataTexture?t.push(FP(r[e].image)):t.push(FP(r[e]))}else t=FP(r);e.images[r.uuid]={uuid:r.uuid,url:t}}n.image=r.uuid}return t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case 1e3:e.x=e.x-Math.floor(e.x);break;case 1001:e.x=e.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case 1e3:e.y=e.y-Math.floor(e.y);break;case 1001:e.y=e.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&this.version++}}function FP(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?zP.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}BP.DEFAULT_IMAGE=void 0,BP.DEFAULT_MAPPING=300,BP.prototype.isTexture=!0;class HP{constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const o=.01,a=.1,s=e.elements,l=s[0],c=s[4],u=s[8],d=s[1],h=s[5],f=s[9],p=s[2],m=s[6],g=s[10];if(Math.abs(c-d)<o&&Math.abs(u-p)<o&&Math.abs(f-m)<o){if(Math.abs(c+d)<a&&Math.abs(u+p)<a&&Math.abs(f+m)<a&&Math.abs(l+h+g-3)<a)return this.set(1,0,0,0),this;t=Math.PI;const e=(l+1)/2,s=(h+1)/2,v=(g+1)/2,y=(c+d)/4,b=(u+p)/4,x=(f+m)/4;return e>s&&e>v?e<o?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=y/n,i=b/n):s>v?s<o?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(s),n=y/r,i=x/r):v<o?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(v),n=b/i,r=x/i),this.set(n,r,i,t),this}let v=Math.sqrt((m-f)*(m-f)+(u-p)*(u-p)+(d-c)*(d-c));return Math.abs(v)<.001&&(v=1),this.x=(m-f)/v,this.y=(u-p)/v,this.z=(d-c)/v,this.w=Math.acos((l+h+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}}HP.prototype.isVector4=!0;class UP extends xP{constructor(e,t,n){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new HP(0,0,e,t),this.scissorTest=!1,this.viewport=new HP(0,0,e,t),n=n||{},this.texture=new BP(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={},this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=1,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:1006,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}setTexture(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image=s({},this.texture.image),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}UP.prototype.isWebGLRenderTarget=!0;class jP extends UP{constructor(e,t,n){super(e,t);const r=this.texture;this.texture=[];for(let i=0;i<n;i++)this.texture[i]=r.clone()}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.texture.length;r<i;r++)this.texture[r].image.width=e,this.texture[r].image.height=t,this.texture[r].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone();return this}}jP.prototype.isWebGLMultipleRenderTargets=!0;class VP extends UP{constructor(e,t,n){super(e,t,n),this.samples=4}copy(e){return super.copy.call(this,e),this.samples=e.samples,this}}VP.prototype.isWebGLMultisampleRenderTarget=!0;class WP{constructor(e=0,t=0,n=0,r=1){this._x=e,this._y=t,this._z=n,this._w=r}static slerp(e,t,n,r){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(e,t,r)}static slerpFlat(e,t,n,r,i,o,a){let s=n[r+0],l=n[r+1],c=n[r+2],u=n[r+3];const d=i[o+0],h=i[o+1],f=i[o+2],p=i[o+3];if(0===a)return e[t+0]=s,e[t+1]=l,e[t+2]=c,void(e[t+3]=u);if(1===a)return e[t+0]=d,e[t+1]=h,e[t+2]=f,void(e[t+3]=p);if(u!==p||s!==d||l!==h||c!==f){let e=1-a;const t=s*d+l*h+c*f+u*p,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),o=Math.atan2(i,t*n);e=Math.sin(e*o)/i,a=Math.sin(a*o)/i}const i=a*n;if(s=s*e+d*i,l=l*e+h*i,c=c*e+f*i,u=u*e+p*i,e===1-a){const e=1/Math.sqrt(s*s+l*l+c*c+u*u);s*=e,l*=e,c*=e,u*=e}}e[t]=s,e[t+1]=l,e[t+2]=c,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,o){const a=n[r],s=n[r+1],l=n[r+2],c=n[r+3],u=i[o],d=i[o+1],h=i[o+2],f=i[o+3];return e[t]=a*f+c*u+s*h-l*d,e[t+1]=s*f+c*d+l*u-a*h,e[t+2]=l*f+c*h+a*d-s*u,e[t+3]=c*f-a*u-s*d-l*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,r=e._y,i=e._z,o=e._order,a=Math.cos,s=Math.sin,l=a(n/2),c=a(r/2),u=a(i/2),d=s(n/2),h=s(r/2),f=s(i/2);switch(o){case"XYZ":this._x=d*c*u+l*h*f,this._y=l*h*u-d*c*f,this._z=l*c*f+d*h*u,this._w=l*c*u-d*h*f;break;case"YXZ":this._x=d*c*u+l*h*f,this._y=l*h*u-d*c*f,this._z=l*c*f-d*h*u,this._w=l*c*u+d*h*f;break;case"ZXY":this._x=d*c*u-l*h*f,this._y=l*h*u+d*c*f,this._z=l*c*f+d*h*u,this._w=l*c*u-d*h*f;break;case"ZYX":this._x=d*c*u-l*h*f,this._y=l*h*u+d*c*f,this._z=l*c*f-d*h*u,this._w=l*c*u+d*h*f;break;case"YZX":this._x=d*c*u+l*h*f,this._y=l*h*u+d*c*f,this._z=l*c*f-d*h*u,this._w=l*c*u-d*h*f;break;case"XZY":this._x=d*c*u-l*h*f,this._y=l*h*u-d*c*f,this._z=l*c*f+d*h*u,this._w=l*c*u+d*h*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],a=t[5],s=t[9],l=t[2],c=t[6],u=t[10],d=n+a+u;if(d>0){const e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(c-s)*e,this._y=(i-l)*e,this._z=(o-r)*e}else if(n>a&&n>u){const e=2*Math.sqrt(1+n-a-u);this._w=(c-s)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(i+l)/e}else if(a>u){const e=2*Math.sqrt(1+a-n-u);this._w=(i-l)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(s+c)/e}else{const e=2*Math.sqrt(1+u-n-a);this._w=(o-r)/e,this._x=(i+l)/e,this._y=(s+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(TP(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(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,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,l=t._z,c=t._w;return this._x=n*c+o*a+r*l-i*s,this._y=r*c+o*s+i*a-n*l,this._z=i*c+o*l+n*s-r*a,this._w=o*c-n*a-r*s-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,o=this._w;let a=o*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;const s=1-a*a;if(s<=Number.EPSILON){const e=1-t;return this._w=e*o+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(s),c=Math.atan2(l,a),u=Math.sin((1-t)*c)/l,d=Math.sin(t*c)/l;return this._w=o*u+this._w*d,this._x=n*u+this._x*d,this._y=r*u+this._y*d,this._z=i*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,n){this.copy(e).slerp(t,n)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}WP.prototype.isQuaternion=!0;class GP{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(XP.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(XP.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,l=s*t+o*r-a*n,c=s*n+a*t-i*r,u=s*r+i*n-o*t,d=-i*t-o*n-a*r;return this.x=l*s+d*-i+c*-a-u*-o,this.y=c*s+d*-o+u*-i-l*-a,this.z=u*s+d*-a+l*-o-c*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return qP.copy(this).projectOnVector(e),this.sub(qP)}reflect(e){return this.sub(qP.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(TP(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}GP.prototype.isVector3=!0;const qP=new GP,XP=new WP;class YP{constructor(e=new GP(1/0,1/0,1/0),t=new GP(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,l=e.length;s<l;s+=3){const l=e[s],c=e[s+1],u=e[s+2];l<t&&(t=l),c<n&&(n=c),u<r&&(r=u),l>i&&(i=l),c>o&&(o=c),u>a&&(a=u)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,l=e.count;s<l;s++){const l=e.getX(s),c=e.getY(s),u=e.getZ(s);l<t&&(t=l),c<n&&(n=c),u<r&&(r=u),l>i&&(i=l),c>o&&(o=c),u>a&&(a=u)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=ZP.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e){return this.makeEmpty(),this.expandByObject(e)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return void 0===e&&(console.warn("THREE.Box3: .getCenter() target is now required"),e=new GP),this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return void 0===e&&(console.warn("THREE.Box3: .getSize() target is now required"),e=new GP),this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e){e.updateWorldMatrix(!1,!1);const t=e.geometry;void 0!==t&&(null===t.boundingBox&&t.computeBoundingBox(),JP.copy(t.boundingBox),JP.applyMatrix4(e.matrixWorld),this.union(JP));const n=e.children;for(let r=0,i=n.length;r<i;r++)this.expandByObject(n[r]);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new GP),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,ZP),ZP.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(iL),oL.subVectors(this.max,iL),QP.subVectors(e.a,iL),KP.subVectors(e.b,iL),eL.subVectors(e.c,iL),tL.subVectors(KP,QP),nL.subVectors(eL,KP),rL.subVectors(QP,eL);let t=[0,-tL.z,tL.y,0,-nL.z,nL.y,0,-rL.z,rL.y,tL.z,0,-tL.x,nL.z,0,-nL.x,rL.z,0,-rL.x,-tL.y,tL.x,0,-nL.y,nL.x,0,-rL.y,rL.x,0];return!!lL(t,QP,KP,eL,oL)&&(t=[1,0,0,0,1,0,0,0,1],!!lL(t,QP,KP,eL,oL)&&(aL.crossVectors(tL,nL),t=[aL.x,aL.y,aL.z],lL(t,QP,KP,eL,oL)))}clampPoint(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new GP),t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return ZP.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return void 0===e&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=.5*this.getSize(ZP).length(),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()||($P[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),$P[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),$P[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),$P[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),$P[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),$P[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),$P[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),$P[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints($P)),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)}}YP.prototype.isBox3=!0;const $P=[new GP,new GP,new GP,new GP,new GP,new GP,new GP,new GP],ZP=new GP,JP=new YP,QP=new GP,KP=new GP,eL=new GP,tL=new GP,nL=new GP,rL=new GP,iL=new GP,oL=new GP,aL=new GP,sL=new GP;function lL(e,t,n,r,i){for(let o=0,a=e.length-3;o<=a;o+=3){sL.fromArray(e,o);const a=i.x*Math.abs(sL.x)+i.y*Math.abs(sL.y)+i.z*Math.abs(sL.z),s=t.dot(sL),l=n.dot(sL),c=r.dot(sL);if(Math.max(-Math.max(s,l,c),Math.min(s,l,c))>a)return!1}return!0}const cL=new YP,uL=new GP,dL=new GP,hL=new GP;class fL{constructor(e=new GP,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):cL.setFromPoints(e).getCenter(n);let r=0;for(let i=0,o=e.length;i<o;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return void 0===t&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),t=new GP),t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new YP),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){hL.subVectors(e,this.center);const t=hL.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.add(hL.multiplyScalar(n/e)),this.radius+=n}return this}union(e){return dL.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(uL.copy(e.center).add(dL)),this.expandByPoint(uL.copy(e.center).sub(dL)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const pL=new GP,mL=new GP,gL=new GP,vL=new GP,yL=new GP,bL=new GP,xL=new GP;class _L{constructor(e=new GP,t=new GP(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new GP),t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,pL)),this}closestPointToPoint(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new GP),t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=pL.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(pL.copy(this.direction).multiplyScalar(t).add(this.origin),pL.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){mL.copy(e).add(t).multiplyScalar(.5),gL.copy(t).sub(e).normalize(),vL.copy(this.origin).sub(mL);const i=.5*e.distanceTo(t),o=-this.direction.dot(gL),a=vL.dot(this.direction),s=-vL.dot(gL),l=vL.lengthSq(),c=Math.abs(1-o*o);let u,d,h,f;if(c>0)if(u=o*s-a,d=o*a-s,f=i*c,u>=0)if(d>=-f)if(d<=f){const e=1/c;u*=e,d*=e,h=u*(u+o*d+2*a)+d*(o*u+d+2*s)+l}else d=i,u=Math.max(0,-(o*d+a)),h=-u*u+d*(d+2*s)+l;else d=-i,u=Math.max(0,-(o*d+a)),h=-u*u+d*(d+2*s)+l;else d<=-f?(u=Math.max(0,-(-o*i+a)),d=u>0?-i:Math.min(Math.max(-i,-s),i),h=-u*u+d*(d+2*s)+l):d<=f?(u=0,d=Math.min(Math.max(-i,-s),i),h=d*(d+2*s)+l):(u=Math.max(0,-(o*i+a)),d=u>0?i:Math.min(Math.max(-i,-s),i),h=-u*u+d*(d+2*s)+l);else d=o>0?-i:i,u=Math.max(0,-(o*d+a)),h=-u*u+d*(d+2*s)+l;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy(gL).multiplyScalar(d).add(mL),h}intersectSphere(e,t){pL.subVectors(e.center,this.origin);const n=pL.dot(this.direction),r=pL.dot(pL)-n*n,i=e.radius*e.radius;if(r>i)return null;const o=Math.sqrt(i-r),a=n-o,s=n+o;return a<0&&s<0?null:a<0?this.at(s,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,o,a,s;const l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,d=this.origin;return l>=0?(n=(e.min.x-d.x)*l,r=(e.max.x-d.x)*l):(n=(e.max.x-d.x)*l,r=(e.min.x-d.x)*l),c>=0?(i=(e.min.y-d.y)*c,o=(e.max.y-d.y)*c):(i=(e.max.y-d.y)*c,o=(e.min.y-d.y)*c),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),u>=0?(a=(e.min.z-d.z)*u,s=(e.max.z-d.z)*u):(a=(e.max.z-d.z)*u,s=(e.min.z-d.z)*u),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,pL)}intersectTriangle(e,t,n,r,i){yL.subVectors(t,e),bL.subVectors(n,e),xL.crossVectors(yL,bL);let o,a=this.direction.dot(xL);if(a>0){if(r)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}vL.subVectors(this.origin,e);const s=o*this.direction.dot(bL.crossVectors(vL,bL));if(s<0)return null;const l=o*this.direction.dot(yL.cross(vL));if(l<0)return null;if(s+l>a)return null;const c=-o*vL.dot(xL);return c<0?null:this.at(c/a,i)}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 wL{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,i,o,a,s,l,c,u,d,h,f,p,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=l,g[6]=c,g[10]=u,g[14]=d,g[3]=h,g[7]=f,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new wL).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/SL.setFromMatrixColumn(e,0).length(),i=1/SL.setFromMatrixColumn(e,1).length(),o=1/SL.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),l=Math.sin(r),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){const e=o*c,n=o*u,r=a*c,i=a*u;t[0]=s*c,t[4]=-s*u,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-a*s,t[2]=i-e*l,t[6]=r+n*l,t[10]=o*s}else if("YXZ"===e.order){const e=s*c,n=s*u,r=l*c,i=l*u;t[0]=e+i*a,t[4]=r*a-n,t[8]=o*l,t[1]=o*u,t[5]=o*c,t[9]=-a,t[2]=n*a-r,t[6]=i+e*a,t[10]=o*s}else if("ZXY"===e.order){const e=s*c,n=s*u,r=l*c,i=l*u;t[0]=e-i*a,t[4]=-o*u,t[8]=r+n*a,t[1]=n+r*a,t[5]=o*c,t[9]=i-e*a,t[2]=-o*l,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){const e=o*c,n=o*u,r=a*c,i=a*u;t[0]=s*c,t[4]=r*l-n,t[8]=e*l+i,t[1]=s*u,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){const e=o*s,n=o*l,r=a*s,i=a*l;t[0]=s*c,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=o*c,t[9]=-a*c,t[2]=-l*c,t[6]=n*u+r,t[10]=e-i*u}else if("XZY"===e.order){const e=o*s,n=o*l,r=a*s,i=a*l;t[0]=s*c,t[4]=-u,t[8]=l*c,t[1]=e*u+i,t[5]=o*c,t[9]=n*u-r,t[2]=r*u-n,t[6]=a*c,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(EL,e,TL)}lookAt(e,t,n){const r=this.elements;return kL.subVectors(e,t),0===kL.lengthSq()&&(kL.z=1),kL.normalize(),AL.crossVectors(n,kL),0===AL.lengthSq()&&(1===Math.abs(n.z)?kL.x+=1e-4:kL.z+=1e-4,kL.normalize(),AL.crossVectors(n,kL)),AL.normalize(),CL.crossVectors(kL,AL),r[0]=AL.x,r[4]=CL.x,r[8]=kL.x,r[1]=AL.y,r[5]=CL.y,r[9]=kL.y,r[2]=AL.z,r[6]=CL.z,r[10]=kL.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],l=n[12],c=n[1],u=n[5],d=n[9],h=n[13],f=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],b=n[11],x=n[15],_=r[0],w=r[4],S=r[8],M=r[12],E=r[1],T=r[5],A=r[9],C=r[13],k=r[2],P=r[6],L=r[10],R=r[14],O=r[3],D=r[7],I=r[11],z=r[15];return i[0]=o*_+a*E+s*k+l*O,i[4]=o*w+a*T+s*P+l*D,i[8]=o*S+a*A+s*L+l*I,i[12]=o*M+a*C+s*R+l*z,i[1]=c*_+u*E+d*k+h*O,i[5]=c*w+u*T+d*P+h*D,i[9]=c*S+u*A+d*L+h*I,i[13]=c*M+u*C+d*R+h*z,i[2]=f*_+p*E+m*k+g*O,i[6]=f*w+p*T+m*P+g*D,i[10]=f*S+p*A+m*L+g*I,i[14]=f*M+p*C+m*R+g*z,i[3]=v*_+y*E+b*k+x*O,i[7]=v*w+y*T+b*P+x*D,i[11]=v*S+y*A+b*L+x*I,i[15]=v*M+y*C+b*R+x*z,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],l=e[13],c=e[2],u=e[6],d=e[10],h=e[14];return e[3]*(+i*s*u-r*l*u-i*a*d+n*l*d+r*a*h-n*s*h)+e[7]*(+t*s*h-t*l*d+i*o*d-r*o*h+r*l*c-i*s*c)+e[11]*(+t*l*u-t*a*h-i*o*u+n*o*h+i*a*c-n*l*c)+e[15]*(-r*a*c-t*s*u+t*a*d+r*o*u-n*o*d+n*s*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],d=e[10],h=e[11],f=e[12],p=e[13],m=e[14],g=e[15],v=u*m*l-p*d*l+p*s*h-a*m*h-u*s*g+a*d*g,y=f*d*l-c*m*l-f*s*h+o*m*h+c*s*g-o*d*g,b=c*p*l-f*u*l+f*a*h-o*p*h-c*a*g+o*u*g,x=f*u*s-c*p*s-f*a*d+o*p*d+c*a*m-o*u*m,_=t*v+n*y+r*b+i*x;if(0===_)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/_;return e[0]=v*w,e[1]=(p*d*i-u*m*i-p*r*h+n*m*h+u*r*g-n*d*g)*w,e[2]=(a*m*i-p*s*i+p*r*l-n*m*l-a*r*g+n*s*g)*w,e[3]=(u*s*i-a*d*i-u*r*l+n*d*l+a*r*h-n*s*h)*w,e[4]=y*w,e[5]=(c*m*i-f*d*i+f*r*h-t*m*h-c*r*g+t*d*g)*w,e[6]=(f*s*i-o*m*i-f*r*l+t*m*l+o*r*g-t*s*g)*w,e[7]=(o*d*i-c*s*i+c*r*l-t*d*l-o*r*h+t*s*h)*w,e[8]=b*w,e[9]=(f*u*i-c*p*i-f*n*h+t*p*h+c*n*g-t*u*g)*w,e[10]=(o*p*i-f*a*i+f*n*l-t*p*l-o*n*g+t*a*g)*w,e[11]=(c*a*i-o*u*i-c*n*l+t*u*l+o*n*h-t*a*h)*w,e[12]=x*w,e[13]=(c*p*r-f*u*r+f*n*d-t*p*d-c*n*m+t*u*m)*w,e[14]=(f*a*r-o*p*r-f*n*s+t*p*s+o*n*m-t*a*m)*w,e[15]=(o*u*r-c*a*r+c*n*s-t*u*s-o*n*d+t*a*d)*w,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,l=i*o,c=i*a;return this.set(l*o+n,l*a-r*s,l*s+r*a,0,l*a+r*s,c*a+n,c*s-r*o,0,l*s-r*a,c*s+r*o,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,o){return this.set(1,n,i,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,o=t._y,a=t._z,s=t._w,l=i+i,c=o+o,u=a+a,d=i*l,h=i*c,f=i*u,p=o*c,m=o*u,g=a*u,v=s*l,y=s*c,b=s*u,x=n.x,_=n.y,w=n.z;return r[0]=(1-(p+g))*x,r[1]=(h+b)*x,r[2]=(f-y)*x,r[3]=0,r[4]=(h-b)*_,r[5]=(1-(d+g))*_,r[6]=(m+v)*_,r[7]=0,r[8]=(f+y)*w,r[9]=(m-v)*w,r[10]=(1-(d+p))*w,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=SL.set(r[0],r[1],r[2]).length();const o=SL.set(r[4],r[5],r[6]).length(),a=SL.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],ML.copy(this);const s=1/i,l=1/o,c=1/a;return ML.elements[0]*=s,ML.elements[1]*=s,ML.elements[2]*=s,ML.elements[4]*=l,ML.elements[5]*=l,ML.elements[6]*=l,ML.elements[8]*=c,ML.elements[9]*=c,ML.elements[10]*=c,t.setFromRotationMatrix(ML),n.x=i,n.y=o,n.z=a,this}makePerspective(e,t,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,s=2*i/(t-e),l=2*i/(n-r),c=(t+e)/(t-e),u=(n+r)/(n-r),d=-(o+i)/(o-i),h=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=d,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,r,i,o){const a=this.elements,s=1/(t-e),l=1/(n-r),c=1/(o-i),u=(t+e)*s,d=(n+r)*l,h=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-d,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}wL.prototype.isMatrix4=!0;const SL=new GP,ML=new wL,EL=new GP(0,0,0),TL=new GP(1,1,1),AL=new GP,CL=new GP,kL=new GP,PL=new wL,LL=new WP;class RL{constructor(e=0,t=0,n=0,r=RL.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._order=r||this._order,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t,n){const r=e.elements,i=r[0],o=r[4],a=r[8],s=r[1],l=r[5],c=r[9],u=r[2],d=r[6],h=r[10];switch(t=t||this._order){case"XYZ":this._y=Math.asin(TP(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,h),this._z=Math.atan2(-o,i)):(this._x=Math.atan2(d,l),this._z=0);break;case"YXZ":this._x=Math.asin(-TP(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(s,l)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(TP(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-TP(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,h),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(TP(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-TP(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(d,l),this._y=Math.atan2(a,i)):(this._x=Math.atan2(-c,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!1!==n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return PL.makeRotationFromQuaternion(e),this.setFromRotationMatrix(PL,t,n)}setFromVector3(e,t){return this.set(e.x,e.y,e.z,t||this._order)}reorder(e){return LL.setFromEuler(this),this.setFromQuaternion(LL,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],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new GP(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}RL.prototype.isEuler=!0,RL.DefaultOrder="XYZ",RL.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class OL{constructor(){this.mask=1}set(e){this.mask=1<<e|0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return 0!=(this.mask&e.mask)}}let DL=0;const IL=new GP,zL=new WP,NL=new wL,BL=new GP,FL=new GP,HL=new GP,UL=new WP,jL=new GP(1,0,0),VL=new GP(0,1,0),WL=new GP(0,0,1),GL={type:"added"},qL={type:"removed"};class XL extends xP{constructor(){super(),Object.defineProperty(this,"id",{value:DL++}),this.uuid=EP(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=XL.DefaultUp.clone();const e=new GP,t=new RL,n=new WP,r=new GP(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new wL},normalMatrix:{value:new DP}}),this.matrix=new wL,this.matrixWorld=new wL,this.matrixAutoUpdate=XL.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new OL,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return zL.setFromAxisAngle(e,t),this.quaternion.multiply(zL),this}rotateOnWorldAxis(e,t){return zL.setFromAxisAngle(e,t),this.quaternion.premultiply(zL),this}rotateX(e){return this.rotateOnAxis(jL,e)}rotateY(e){return this.rotateOnAxis(VL,e)}rotateZ(e){return this.rotateOnAxis(WL,e)}translateOnAxis(e,t){return IL.copy(e).applyQuaternion(this.quaternion),this.position.add(IL.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(jL,e)}translateY(e){return this.translateOnAxis(VL,e)}translateZ(e){return this.translateOnAxis(WL,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(NL.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?BL.copy(e):BL.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),FL.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?NL.lookAt(FL,BL,this.up):NL.lookAt(BL,FL,this.up),this.quaternion.setFromRotationMatrix(NL),r&&(NL.extractRotation(r.matrixWorld),zL.setFromRotationMatrix(NL),this.quaternion.premultiply(zL.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(GL)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(qL)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(qL)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),NL.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),NL.multiply(e.parent.matrixWorld)),e.applyMatrix4(NL),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getWorldPosition(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),e=new GP),this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),e=new WP),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(FL,e,HL),e}getWorldScale(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),e=new GP),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(FL,UL,e),e}getWorldDirection(e){void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new GP),this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=o(e.geometries),r=o(e.materials),i=o(e.textures),a=o(e.images),s=o(e.shapes),l=o(e.skeletons),c=o(e.animations);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),a.length>0&&(n.images=a),s.length>0&&(n.shapes=s),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c)}return n.object=r,n;function o(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.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.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let n=0;n<e.children.length;n++){const t=e.children[n];this.add(t.clone())}return this}}XL.DefaultUp=new GP(0,1,0),XL.DefaultMatrixAutoUpdate=!0,XL.prototype.isObject3D=!0;const YL=new GP,$L=new GP,ZL=new DP;class JL{constructor(e=new GP(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=YL.subVectors(n,t).cross($L.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new GP),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new GP);const n=e.delta(YL),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new GP),e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||ZL.getNormalMatrix(e),r=this.coplanarPoint(YL).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),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)}}JL.prototype.isPlane=!0;const QL=new GP,KL=new GP,eR=new GP,tR=new GP,nR=new GP,rR=new GP,iR=new GP,oR=new GP,aR=new GP,sR=new GP;class lR{constructor(e=new GP,t=new GP,n=new GP){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new GP),r.subVectors(n,t),QL.subVectors(e,t),r.cross(QL);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){QL.subVectors(r,t),KL.subVectors(n,t),eR.subVectors(e,t);const o=QL.dot(QL),a=QL.dot(KL),s=QL.dot(eR),l=KL.dot(KL),c=KL.dot(eR),u=o*l-a*a;if(void 0===i&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),i=new GP),0===u)return i.set(-2,-1,-1);const d=1/u,h=(l*s-a*c)*d,f=(o*c-a*s)*d;return i.set(1-h-f,f,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,tR),tR.x>=0&&tR.y>=0&&tR.x+tR.y<=1}static getUV(e,t,n,r,i,o,a,s){return this.getBarycoord(e,t,n,r,tR),s.set(0,0),s.addScaledVector(i,tR.x),s.addScaledVector(o,tR.y),s.addScaledVector(a,tR.z),s}static isFrontFacing(e,t,n,r){return QL.subVectors(n,t),KL.subVectors(e,t),QL.cross(KL).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}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 QL.subVectors(this.c,this.b),KL.subVectors(this.a,this.b),.5*QL.cross(KL).length()}getMidpoint(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new GP),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return lR.getNormal(this.a,this.b,this.c,e)}getPlane(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new JL),e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return lR.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return lR.getUV(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return lR.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return lR.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new GP);const n=this.a,r=this.b,i=this.c;let o,a;nR.subVectors(r,n),rR.subVectors(i,n),oR.subVectors(e,n);const s=nR.dot(oR),l=rR.dot(oR);if(s<=0&&l<=0)return t.copy(n);aR.subVectors(e,r);const c=nR.dot(aR),u=rR.dot(aR);if(c>=0&&u<=c)return t.copy(r);const d=s*u-c*l;if(d<=0&&s>=0&&c<=0)return o=s/(s-c),t.copy(n).addScaledVector(nR,o);sR.subVectors(e,i);const h=nR.dot(sR),f=rR.dot(sR);if(f>=0&&h<=f)return t.copy(i);const p=h*l-s*f;if(p<=0&&l>=0&&f<=0)return a=l/(l-f),t.copy(n).addScaledVector(rR,a);const m=c*f-h*u;if(m<=0&&u-c>=0&&h-f>=0)return iR.subVectors(i,r),a=(u-c)/(u-c+(h-f)),t.copy(r).addScaledVector(iR,a);const g=1/(m+p+d);return o=p*g,a=d*g,t.copy(n).addScaledVector(nR,o).addScaledVector(rR,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let cR=0;class uR extends xP{constructor(){super(),Object.defineProperty(this,"id",{value:cR++}),this.uuid=EP(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}onBuild(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if("shading"===t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,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){!0===e&&this.version++}}uR.prototype.isMaterial=!0;const dR={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},hR={h:0,s:0,l:0},fR={h:0,s:0,l:0};function pR(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function mR(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function gR(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class vR{constructor(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this}setRGB(e,t,n){return this.r=e,this.g=t,this.b=n,this}setHSL(e,t,n){if(e=AP(e,1),t=TP(t,0,1),n=TP(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=pR(i,r,e+1/3),this.g=pR(i,r,e),this.b=pR(i,r,e-1/3)}return this}setStyle(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const r=n[1],i=n[2];switch(r){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,t(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,t(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i)){const n=parseFloat(e[1])/360,r=parseInt(e[2],10)/100,i=parseInt(e[3],10)/100;return t(e[4]),this.setHSL(n,r,i)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=n[1],t=e.length;if(3===t)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,this;if(6===t)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){const t=dR[e.toLowerCase()];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copyGammaToLinear(e,t=2){return this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this}copyLinearToGamma(e,t=2){const n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this}convertGammaToLinear(e){return this.copyGammaToLinear(this,e),this}convertLinearToGamma(e){return this.copyLinearToGamma(this,e),this}copySRGBToLinear(e){return this.r=mR(e.r),this.g=mR(e.g),this.b=mR(e.b),this}copyLinearToSRGB(e){return this.r=gR(e.r),this.g=gR(e.g),this.b=gR(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});const t=this.r,n=this.g,r=this.b,i=Math.max(t,n,r),o=Math.min(t,n,r);let a,s;const l=(o+i)/2;if(o===i)a=0,s=0;else{const e=i-o;switch(s=l<=.5?e/(i+o):e/(2-i-o),i){case t:a=(n-r)/e+(n<r?6:0);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return e.h=a,e.s=s,e.l=l,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,t,n){return this.getHSL(hR),hR.h+=e,hR.s+=t,hR.l+=n,this.setHSL(hR.h,hR.s,hR.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(hR),e.getHSL(fR);const n=CP(hR.h,fR.h,t),r=CP(hR.s,fR.s,t),i=CP(hR.l,fR.l,t);return this.setHSL(n,r,i),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}vR.NAMES=dR,vR.prototype.isColor=!0,vR.prototype.r=1,vR.prototype.g=1,vR.prototype.b=1;class yR extends uR{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new vR(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this}}yR.prototype.isMeshBasicMaterial=!0;const bR=new GP,xR=new OP;class _R{constructor(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}copyColorsArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),i=new vR),t[n++]=i.r,t[n++]=i.g,t[n++]=i.b}return this}copyVector2sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),i=new OP),t[n++]=i.x,t[n++]=i.y}return this}copyVector3sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),i=new GP),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z}return this}copyVector4sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),i=new HP),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n++]=i.w}return this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)xR.fromBufferAttribute(this,t),xR.applyMatrix3(e),this.setXY(t,xR.x,xR.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)bR.fromBufferAttribute(this,t),bR.applyMatrix3(e),this.setXYZ(t,bR.x,bR.y,bR.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)bR.x=this.getX(t),bR.y=this.getY(t),bR.z=this.getZ(t),bR.applyMatrix4(e),this.setXYZ(t,bR.x,bR.y,bR.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)bR.x=this.getX(t),bR.y=this.getY(t),bR.z=this.getZ(t),bR.applyNormalMatrix(e),this.setXYZ(t,bR.x,bR.y,bR.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)bR.x=this.getX(t),bR.y=this.getY(t),bR.z=this.getZ(t),bR.transformDirection(e),this.setXYZ(t,bR.x,bR.y,bR.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){return this.array[e*this.itemSize]}setX(e,t){return this.array[e*this.itemSize]=t,this}getY(e){return this.array[e*this.itemSize+1]}setY(e,t){return this.array[e*this.itemSize+1]=t,this}getZ(e){return this.array[e*this.itemSize+2]}setZ(e,t){return this.array[e*this.itemSize+2]=t,this}getW(e){return this.array[e*this.itemSize+3]}setW(e,t){return this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),35044!==this.usage&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}}_R.prototype.isBufferAttribute=!0;class wR extends _R{constructor(e,t,n){super(new Int8Array(e),t,n)}}class SR extends _R{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class MR extends _R{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class ER extends _R{constructor(e,t,n){super(new Int16Array(e),t,n)}}class TR extends _R{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class AR extends _R{constructor(e,t,n){super(new Int32Array(e),t,n)}}class CR extends _R{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class kR extends _R{constructor(e,t,n){super(new Uint16Array(e),t,n)}}kR.prototype.isFloat16BufferAttribute=!0;class PR extends _R{constructor(e,t,n){super(new Float32Array(e),t,n)}}class LR extends _R{constructor(e,t,n){super(new Float64Array(e),t,n)}}function RR(e){if(0===e.length)return-1/0;let t=e[0];for(let n=1,r=e.length;n<r;++n)e[n]>t&&(t=e[n]);return t}const OR={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function DR(e,t){return new OR[e](t)}let IR=0;const zR=new wL,NR=new XL,BR=new GP,FR=new YP,HR=new YP,UR=new GP;class jR extends xP{constructor(){super(),Object.defineProperty(this,"id",{value:IR++}),this.uuid=EP(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(RR(e)>65535?CR:TR)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new DP).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return zR.makeRotationFromQuaternion(e),this.applyMatrix4(zR),this}rotateX(e){return zR.makeRotationX(e),this.applyMatrix4(zR),this}rotateY(e){return zR.makeRotationY(e),this.applyMatrix4(zR),this}rotateZ(e){return zR.makeRotationZ(e),this.applyMatrix4(zR),this}translate(e,t,n){return zR.makeTranslation(e,t,n),this.applyMatrix4(zR),this}scale(e,t,n){return zR.makeScale(e,t,n),this.applyMatrix4(zR),this}lookAt(e){return NR.lookAt(e),NR.updateMatrix(),this.applyMatrix4(NR.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(BR).negate(),this.translate(BR.x,BR.y,BR.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new PR(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new YP);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new GP(-1/0,-1/0,-1/0),new GP(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){const e=t[n];FR.setFromBufferAttribute(e),this.morphTargetsRelative?(UR.addVectors(this.boundingBox.min,FR.min),this.boundingBox.expandByPoint(UR),UR.addVectors(this.boundingBox.max,FR.max),this.boundingBox.expandByPoint(UR)):(this.boundingBox.expandByPoint(FR.min),this.boundingBox.expandByPoint(FR.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new fL);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new GP,1/0);if(e){const n=this.boundingSphere.center;if(FR.setFromBufferAttribute(e),t)for(let e=0,i=t.length;e<i;e++){const n=t[e];HR.setFromBufferAttribute(n),this.morphTargetsRelative?(UR.addVectors(FR.min,HR.min),FR.expandByPoint(UR),UR.addVectors(FR.max,HR.max),FR.expandByPoint(UR)):(FR.expandByPoint(HR.min),FR.expandByPoint(HR.max))}FR.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)UR.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(UR));if(t)for(let i=0,o=t.length;i<o;i++){const o=t[i],a=this.morphTargetsRelative;for(let t=0,i=o.count;t<i;t++)UR.fromBufferAttribute(o,t),a&&(BR.fromBufferAttribute(e,t),UR.add(BR)),r=Math.max(r,n.distanceToSquared(UR))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeFaceNormals(){}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,r=t.position.array,i=t.normal.array,o=t.uv.array,a=r.length/3;void 0===t.tangent&&this.setAttribute("tangent",new _R(new Float32Array(4*a),4));const s=t.tangent.array,l=[],c=[];for(let E=0;E<a;E++)l[E]=new GP,c[E]=new GP;const u=new GP,d=new GP,h=new GP,f=new OP,p=new OP,m=new OP,g=new GP,v=new GP;function y(e,t,n){u.fromArray(r,3*e),d.fromArray(r,3*t),h.fromArray(r,3*n),f.fromArray(o,2*e),p.fromArray(o,2*t),m.fromArray(o,2*n),d.sub(u),h.sub(u),p.sub(f),m.sub(f);const i=1/(p.x*m.y-m.x*p.y);isFinite(i)&&(g.copy(d).multiplyScalar(m.y).addScaledVector(h,-p.y).multiplyScalar(i),v.copy(h).multiplyScalar(p.x).addScaledVector(d,-m.x).multiplyScalar(i),l[e].add(g),l[t].add(g),l[n].add(g),c[e].add(v),c[t].add(v),c[n].add(v))}let b=this.groups;0===b.length&&(b=[{start:0,count:n.length}]);for(let E=0,T=b.length;E<T;++E){const e=b[E],t=e.start;for(let r=t,i=t+e.count;r<i;r+=3)y(n[r+0],n[r+1],n[r+2])}const x=new GP,_=new GP,w=new GP,S=new GP;function M(e){w.fromArray(i,3*e),S.copy(w);const t=l[e];x.copy(t),x.sub(w.multiplyScalar(w.dot(t))).normalize(),_.crossVectors(S,t);const n=_.dot(c[e])<0?-1:1;s[4*e]=x.x,s[4*e+1]=x.y,s[4*e+2]=x.z,s[4*e+3]=n}for(let E=0,T=b.length;E<T;++E){const e=b[E],t=e.start;for(let r=t,i=t+e.count;r<i;r+=3)M(n[r+0]),M(n[r+1]),M(n[r+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new _R(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new GP,i=new GP,o=new GP,a=new GP,s=new GP,l=new GP,c=new GP,u=new GP;if(e)for(let d=0,h=e.count;d<h;d+=3){const h=e.getX(d+0),f=e.getX(d+1),p=e.getX(d+2);r.fromBufferAttribute(t,h),i.fromBufferAttribute(t,f),o.fromBufferAttribute(t,p),c.subVectors(o,i),u.subVectors(r,i),c.cross(u),a.fromBufferAttribute(n,h),s.fromBufferAttribute(n,f),l.fromBufferAttribute(n,p),a.add(c),s.add(c),l.add(c),n.setXYZ(h,a.x,a.y,a.z),n.setXYZ(f,s.x,s.y,s.z),n.setXYZ(p,l.x,l.y,l.z)}else for(let e=0,d=t.count;e<d;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),o.fromBufferAttribute(t,e+2),c.subVectors(o,i),u.subVectors(r,i),c.cross(u),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(e,t){if(!e||!e.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const r in n){if(void 0===e.attributes[r])continue;const i=n[r].array,o=e.attributes[r],a=o.array,s=o.itemSize*t,l=Math.min(a.length,i.length-s);for(let e=0,t=s;e<l;e++,t++)i[t]=a[e]}return this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)UR.fromBufferAttribute(e,t),UR.normalize(),e.setXYZ(t,UR.x,UR.y,UR.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,o=new n.constructor(t.length*r);let a=0,s=0;for(let l=0,c=t.length;l<c;l++){a=t[l]*r;for(let e=0;e<r;e++)o[s++]=n[a++]}return new _R(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new jR,n=this.index.array,r=this.attributes;for(const a in r){const i=e(r[a],n);t.setAttribute(a,i)}const i=this.morphAttributes;for(const a in i){const r=[],o=i[a];for(let t=0,i=o.length;t<i;t++){const i=e(o[t],n);r.push(i)}t.morphAttributes[a]=r}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,s=o.length;a<s;a++){const e=o[a];t.addGroup(e.start,e.count,e.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const s in n){const t=n[s];e.data.attributes[s]=t.toJSON(e.data)}const r={};let i=!1;for(const s in this.morphAttributes){const t=this.morphAttributes[s],n=[];for(let r=0,i=t.length;r<i;r++){const i=t[r];n.push(i.toJSON(e.data))}n.length>0&&(r[s]=n,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return(new jR).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const l in r){const e=r[l];this.setAttribute(l,e.clone(t))}const i=e.morphAttributes;for(const l in i){const e=[],n=i[l];for(let r=0,i=n.length;r<i;r++)e.push(n[r].clone(t));this.morphAttributes[l]=e}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let l=0,c=o.length;l<c;l++){const e=o[l];this.addGroup(e.start,e.count,e.materialIndex)}const a=e.boundingBox;null!==a&&(this.boundingBox=a.clone());const s=e.boundingSphere;return null!==s&&(this.boundingSphere=s.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}jR.prototype.isBufferGeometry=!0;const VR=new wL,WR=new _L,GR=new fL,qR=new GP,XR=new GP,YR=new GP,$R=new GP,ZR=new GP,JR=new GP,QR=new GP,KR=new GP,eO=new GP,tO=new OP,nO=new OP,rO=new OP,iO=new GP,oO=new GP;class aO extends XL{constructor(e=new jR,t=new yR){super(),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0===r)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),GR.copy(n.boundingSphere),GR.applyMatrix4(i),!1===e.ray.intersectsSphere(GR))return;if(VR.copy(i).invert(),WR.copy(e.ray).applyMatrix4(VR),null!==n.boundingBox&&!1===WR.intersectsBox(n.boundingBox))return;let o;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position,s=n.morphAttributes.position,l=n.morphTargetsRelative,c=n.attributes.uv,u=n.attributes.uv2,d=n.groups,h=n.drawRange;if(null!==i)if(Array.isArray(r))for(let n=0,f=d.length;n<f;n++){const f=d[n],p=r[f.materialIndex];for(let n=Math.max(f.start,h.start),r=Math.min(f.start+f.count,h.start+h.count);n<r;n+=3){const r=i.getX(n),d=i.getX(n+1),h=i.getX(n+2);o=sO(this,p,e,WR,a,s,l,c,u,r,d,h),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=f.materialIndex,t.push(o))}}else{for(let n=Math.max(0,h.start),d=Math.min(i.count,h.start+h.count);n<d;n+=3){const d=i.getX(n),h=i.getX(n+1),f=i.getX(n+2);o=sO(this,r,e,WR,a,s,l,c,u,d,h,f),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}else if(void 0!==a)if(Array.isArray(r))for(let n=0,f=d.length;n<f;n++){const i=d[n],f=r[i.materialIndex];for(let n=Math.max(i.start,h.start),r=Math.min(i.start+i.count,h.start+h.count);n<r;n+=3){o=sO(this,f,e,WR,a,s,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=i.materialIndex,t.push(o))}}else{for(let n=Math.max(0,h.start),i=Math.min(a.count,h.start+h.count);n<i;n+=3){o=sO(this,r,e,WR,a,s,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function sO(e,t,n,r,i,o,a,s,l,c,u,d){qR.fromBufferAttribute(i,c),XR.fromBufferAttribute(i,u),YR.fromBufferAttribute(i,d);const h=e.morphTargetInfluences;if(t.morphTargets&&o&&h){QR.set(0,0,0),KR.set(0,0,0),eO.set(0,0,0);for(let e=0,t=o.length;e<t;e++){const t=h[e],n=o[e];0!==t&&($R.fromBufferAttribute(n,c),ZR.fromBufferAttribute(n,u),JR.fromBufferAttribute(n,d),a?(QR.addScaledVector($R,t),KR.addScaledVector(ZR,t),eO.addScaledVector(JR,t)):(QR.addScaledVector($R.sub(qR),t),KR.addScaledVector(ZR.sub(XR),t),eO.addScaledVector(JR.sub(YR),t)))}qR.add(QR),XR.add(KR),YR.add(eO)}e.isSkinnedMesh&&(e.boneTransform(c,qR),e.boneTransform(u,XR),e.boneTransform(d,YR));const f=function(e,t,n,r,i,o,a,s){let l;if(l=1===t.side?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,2!==t.side,s),null===l)return null;oO.copy(s),oO.applyMatrix4(e.matrixWorld);const c=n.ray.origin.distanceTo(oO);return c<n.near||c>n.far?null:{distance:c,point:oO.clone(),object:e}}(e,t,n,r,qR,XR,YR,iO);if(f){s&&(tO.fromBufferAttribute(s,c),nO.fromBufferAttribute(s,u),rO.fromBufferAttribute(s,d),f.uv=lR.getUV(iO,qR,XR,YR,tO,nO,rO,new OP)),l&&(tO.fromBufferAttribute(l,c),nO.fromBufferAttribute(l,u),rO.fromBufferAttribute(l,d),f.uv2=lR.getUV(iO,qR,XR,YR,tO,nO,rO,new OP));const e={a:c,b:u,c:d,normal:new GP,materialIndex:0};lR.getNormal(qR,XR,YR,e.normal),f.face=e}return f}aO.prototype.isMesh=!0;class lO extends jR{constructor(e=1,t=1,n=1,r=1,i=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};const a=this;r=Math.floor(r),i=Math.floor(i),o=Math.floor(o);const s=[],l=[],c=[],u=[];let d=0,h=0;function f(e,t,n,r,i,o,f,p,m,g,v){const y=o/m,b=f/g,x=o/2,_=f/2,w=p/2,S=m+1,M=g+1;let E=0,T=0;const A=new GP;for(let a=0;a<M;a++){const o=a*b-_;for(let s=0;s<S;s++){const d=s*y-x;A[e]=d*r,A[t]=o*i,A[n]=w,l.push(A.x,A.y,A.z),A[e]=0,A[t]=0,A[n]=p>0?1:-1,c.push(A.x,A.y,A.z),u.push(s/m),u.push(1-a/g),E+=1}}for(let a=0;a<g;a++)for(let e=0;e<m;e++){const t=d+e+S*a,n=d+e+S*(a+1),r=d+(e+1)+S*(a+1),i=d+(e+1)+S*a;s.push(t,n,i),s.push(n,r,i),T+=6}a.addGroup(h,T,v),h+=T,d+=E}f("z","y","x",-1,-1,n,t,e,o,i,0),f("z","y","x",1,-1,n,t,-e,o,i,1),f("x","z","y",1,1,e,n,t,r,o,2),f("x","z","y",1,-1,e,n,-t,r,o,3),f("x","y","z",1,-1,e,t,n,r,i,4),f("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute("position",new PR(l,3)),this.setAttribute("normal",new PR(c,3)),this.setAttribute("uv",new PR(u,2))}}function cO(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function uO(e){const t={};for(let n=0;n<e.length;n++){const r=cO(e[n]);for(const e in r)t[e]=r[e]}return t}const dO={clone:cO,merge:uO};class hO extends uR{constructor(e){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=cO(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const r in this.uniforms){const n=this.uniforms[r].value;n&&n.isTexture?t.uniforms[r]={type:"t",value:n.toJSON(e).uuid}:n&&n.isColor?t.uniforms[r]={type:"c",value:n.getHex()}:n&&n.isVector2?t.uniforms[r]={type:"v2",value:n.toArray()}:n&&n.isVector3?t.uniforms[r]={type:"v3",value:n.toArray()}:n&&n.isVector4?t.uniforms[r]={type:"v4",value:n.toArray()}:n&&n.isMatrix3?t.uniforms[r]={type:"m3",value:n.toArray()}:n&&n.isMatrix4?t.uniforms[r]={type:"m4",value:n.toArray()}:t.uniforms[r]={value:n}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const r in this.extensions)!0===this.extensions[r]&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}hO.prototype.isShaderMaterial=!0;class fO extends XL{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new wL,this.projectionMatrix=new wL,this.projectionMatrixInverse=new wL}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new GP),this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}fO.prototype.isCamera=!0;class pO extends fO{constructor(e=50,t=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*MP*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*SP*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*MP*Math.atan(Math.tan(.5*SP*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*SP*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const e=o.fullWidth,a=o.fullHeight;i+=o.offsetX*r/e,t-=o.offsetY*n/a,r*=o.width/e,n*=o.height/a}const a=this.filmOffset;0!==a&&(i+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}pO.prototype.isPerspectiveCamera=!0;class mO extends XL{constructor(e,t,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const r=new pO(90,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new GP(1,0,0)),this.add(r);const i=new pO(90,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new GP(-1,0,0)),this.add(i);const o=new pO(90,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new GP(0,1,0)),this.add(o);const a=new pO(90,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new GP(0,-1,0)),this.add(a);const s=new pO(90,1,e,t);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new GP(0,0,1)),this.add(s);const l=new pO(90,1,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new GP(0,0,-1)),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,o,a,s,l]=this.children,c=e.xr.enabled,u=e.getRenderTarget();e.xr.enabled=!1;const d=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=d,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.xr.enabled=c}}class gO extends BP{constructor(e,t,n,r,i,o,a,s,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:301,n,r,i,o,a=void 0!==a?a:1022,s,l,c),this._needsFlipEnvMap=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}gO.prototype.isCubeTexture=!0;class vO extends UP{constructor(e,t,n){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=n),super(e,e,t),t=t||{},this.texture=new gO(void 0,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:1006,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=1023,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new lO(5,5,5),i=new hO({name:"CubemapFromEquirect",uniforms:cO(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});i.uniforms.tEquirect.value=t;const o=new aO(r,i),a=t.minFilter;1008===t.minFilter&&(t.minFilter=1006);return new mO(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,r);e.setRenderTarget(i)}}vO.prototype.isWebGLCubeRenderTarget=!0;const yO=new fL,bO=new GP;class xO{constructor(e=new JL,t=new JL,n=new JL,r=new JL,i=new JL,o=new JL){this.planes=[e,t,n,r,i,o]}set(e,t,n,r,i,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],c=n[6],u=n[7],d=n[8],h=n[9],f=n[10],p=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return t[0].setComponents(a-r,u-s,p-d,y-m).normalize(),t[1].setComponents(a+r,u+s,p+d,y+m).normalize(),t[2].setComponents(a+i,u+l,p+h,y+g).normalize(),t[3].setComponents(a-i,u-l,p-h,y-g).normalize(),t[4].setComponents(a-o,u-c,p-f,y-v).normalize(),t[5].setComponents(a+o,u+c,p+f,y+v).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),yO.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(yO)}intersectsSprite(e){return yO.center.set(0,0,0),yO.radius=.7071067811865476,yO.applyMatrix4(e.matrixWorld),this.intersectsSphere(yO)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let i=0;i<6;i++){if(t[i].distanceToPoint(n)<r)return!1}return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(bO.x=r.normal.x>0?e.max.x:e.min.x,bO.y=r.normal.y>0?e.max.y:e.min.y,bO.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(bO)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function _O(){let e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function wO(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const o=r.get(t);void 0===o?r.set(t,function(t,r){const i=t.array,o=t.usage,a=e.createBuffer();e.bindBuffer(r,a),e.bufferData(r,i,o),t.onUploadCallback();let s=5126;return i instanceof Float32Array?s=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?t.isFloat16BufferAttribute?n?s=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):s=5123:i instanceof Int16Array?s=5122:i instanceof Uint32Array?s=5125:i instanceof Int32Array?s=5124:i instanceof Int8Array?s=5120:(i instanceof Uint8Array||i instanceof Uint8ClampedArray)&&(s=5121),{buffer:a,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):o.version<t.version&&(!function(t,r,i){const o=r.array,a=r.updateRange;e.bindBuffer(i,t),-1===a.count?e.bufferSubData(i,0,o):(n?e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o,a.offset,a.count):e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o.subarray(a.offset,a.offset+a.count)),a.count=-1)}(o.buffer,t,i),o.version=t.version)}}}class SO extends jR{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,o=t/2,a=Math.floor(n),s=Math.floor(r),l=a+1,c=s+1,u=e/a,d=t/s,h=[],f=[],p=[],m=[];for(let g=0;g<c;g++){const e=g*d-o;for(let t=0;t<l;t++){const n=t*u-i;f.push(n,-e,0),p.push(0,0,1),m.push(t/a),m.push(1-g/s)}}for(let g=0;g<s;g++)for(let e=0;e<a;e++){const t=e+l*g,n=e+l*(g+1),r=e+1+l*(g+1),i=e+1+l*g;h.push(t,n,i),h.push(n,r,i)}this.setIndex(h),this.setAttribute("position",new PR(f,3)),this.setAttribute("normal",new PR(p,3)),this.setAttribute("uv",new PR(m,2))}}const MO={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), rawDiffuseColor, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), rawDiffuseColor, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttotalTransmission *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSNMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition.xyz / vWorldPosition.w;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n\tfloat ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );\n\tvec3 f0 = vec3( pow( ior - 1.0, 2.0 ) / pow( ior + 1.0, 2.0 ) );\n\tvec3 f90 = vec3( 1.0 );\n\tvec3 f_transmission = totalTransmission * getIBLVolumeRefraction(\n\t\tnormal, v, viewDir, roughnessFactor, diffuseColor.rgb, f0, f90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance);\n\tdiffuseColor.rgb = mix( diffuseColor.rgb, f_transmission, totalTransmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec4 vWorldPosition;\n\tvec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {\n\t\tvec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length(vec3(modelMatrix[0].xyz));\n\t\tmodelScale.y = length(vec3(modelMatrix[1].xyz));\n\t\tmodelScale.z = length(vec3(modelMatrix[2].xyz));\n\t\treturn normalize(refractionVector) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness(float roughness, float ior) {\n\t\treturn roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);\n\t}\n\tvec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {\n\t\tfloat framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);\n\t\treturn texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;\n\t}\n\tvec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {\n\t\tif (attenuationDistance == 0.0) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;\n\t\t\tvec3 transmittance = exp(-attenuationCoefficient * transmissionDistance);\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec3 getIBLVolumeRefraction(vec3 n, vec3 v, vec3 viewDir, float perceptualRoughness, vec3 baseColor, vec3 f0, vec3 f90,\n\t\tvec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness, vec3 attenuationColor, float attenuationDistance) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);\n\t\tvec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);\n\t\tfloat NdotV = saturate(dot(n, viewDir));\n\t\tvec2 brdf = integrateSpecularBRDF(NdotV, perceptualRoughness);\n\t\tvec3 specularColor = f0 * brdf.x + f90 * brdf.y;\n\t\treturn (1.0 - specularColor) * attenuatedColor * baseColor;\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform vec3 attenuationColor;\n\tuniform float attenuationDistance;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <transmission_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#ifdef USE_TRANSMISSION\n\t\tfloat totalTransmission = transmission;\n\t\tfloat thicknessFactor = thickness;\n\t#endif\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\tvec3 rawDiffuseColor = diffuseColor.rgb;\n\t#include <transmission_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#ifdef USE_TRANSMISSION\n\tvarying vec4 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition;\n#endif\n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},EO={common:{diffuse:{value:new vR(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new DP},uv2Transform:{value:new DP},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new OP(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new vR(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new vR(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new DP}},sprite:{diffuse:{value:new vR(16777215)},opacity:{value:1},center:{value:new OP(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new DP}}},TO={basic:{uniforms:uO([EO.common,EO.specularmap,EO.envmap,EO.aomap,EO.lightmap,EO.fog]),vertexShader:MO.meshbasic_vert,fragmentShader:MO.meshbasic_frag},lambert:{uniforms:uO([EO.common,EO.specularmap,EO.envmap,EO.aomap,EO.lightmap,EO.emissivemap,EO.fog,EO.lights,{emissive:{value:new vR(0)}}]),vertexShader:MO.meshlambert_vert,fragmentShader:MO.meshlambert_frag},phong:{uniforms:uO([EO.common,EO.specularmap,EO.envmap,EO.aomap,EO.lightmap,EO.emissivemap,EO.bumpmap,EO.normalmap,EO.displacementmap,EO.fog,EO.lights,{emissive:{value:new vR(0)},specular:{value:new vR(1118481)},shininess:{value:30}}]),vertexShader:MO.meshphong_vert,fragmentShader:MO.meshphong_frag},standard:{uniforms:uO([EO.common,EO.envmap,EO.aomap,EO.lightmap,EO.emissivemap,EO.bumpmap,EO.normalmap,EO.displacementmap,EO.roughnessmap,EO.metalnessmap,EO.fog,EO.lights,{emissive:{value:new vR(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:MO.meshphysical_vert,fragmentShader:MO.meshphysical_frag},toon:{uniforms:uO([EO.common,EO.aomap,EO.lightmap,EO.emissivemap,EO.bumpmap,EO.normalmap,EO.displacementmap,EO.gradientmap,EO.fog,EO.lights,{emissive:{value:new vR(0)}}]),vertexShader:MO.meshtoon_vert,fragmentShader:MO.meshtoon_frag},matcap:{uniforms:uO([EO.common,EO.bumpmap,EO.normalmap,EO.displacementmap,EO.fog,{matcap:{value:null}}]),vertexShader:MO.meshmatcap_vert,fragmentShader:MO.meshmatcap_frag},points:{uniforms:uO([EO.points,EO.fog]),vertexShader:MO.points_vert,fragmentShader:MO.points_frag},dashed:{uniforms:uO([EO.common,EO.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:MO.linedashed_vert,fragmentShader:MO.linedashed_frag},depth:{uniforms:uO([EO.common,EO.displacementmap]),vertexShader:MO.depth_vert,fragmentShader:MO.depth_frag},normal:{uniforms:uO([EO.common,EO.bumpmap,EO.normalmap,EO.displacementmap,{opacity:{value:1}}]),vertexShader:MO.normal_vert,fragmentShader:MO.normal_frag},sprite:{uniforms:uO([EO.sprite,EO.fog]),vertexShader:MO.sprite_vert,fragmentShader:MO.sprite_frag},background:{uniforms:{uvTransform:{value:new DP},t2D:{value:null}},vertexShader:MO.background_vert,fragmentShader:MO.background_frag},cube:{uniforms:uO([EO.envmap,{opacity:{value:1}}]),vertexShader:MO.cube_vert,fragmentShader:MO.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:MO.equirect_vert,fragmentShader:MO.equirect_frag},distanceRGBA:{uniforms:uO([EO.common,EO.displacementmap,{referencePosition:{value:new GP},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:MO.distanceRGBA_vert,fragmentShader:MO.distanceRGBA_frag},shadow:{uniforms:uO([EO.lights,EO.fog,{color:{value:new vR(0)},opacity:{value:1}}]),vertexShader:MO.shadow_vert,fragmentShader:MO.shadow_frag}};function AO(e,t,n,r,i){const o=new vR(0);let a,s,l=0,c=null,u=0,d=null;function h(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,i)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),l=t,h(o,l)},getClearAlpha:function(){return l},setClearAlpha:function(e){l=e,h(o,l)},render:function(n,i){let f=!1,p=!0===i.isScene?i.background:null;p&&p.isTexture&&(p=t.get(p));const m=e.xr,g=m.getSession&&m.getSession();g&&"additive"===g.environmentBlendMode&&(p=null),null===p?h(o,l):p&&p.isColor&&(h(p,1),f=!0),(e.autoClear||f)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),p&&(p.isCubeTexture||306===p.mapping)?(void 0===s&&(s=new aO(new lO(1,1,1),new hO({name:"BackgroundCubeMaterial",uniforms:cO(TO.cube.uniforms),vertexShader:TO.cube.vertexShader,fragmentShader:TO.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),s.geometry.deleteAttribute("normal"),s.geometry.deleteAttribute("uv"),s.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(s.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(s)),s.material.uniforms.envMap.value=p,s.material.uniforms.flipEnvMap.value=p.isCubeTexture&&p._needsFlipEnvMap?-1:1,c===p&&u===p.version&&d===e.toneMapping||(s.material.needsUpdate=!0,c=p,u=p.version,d=e.toneMapping),n.unshift(s,s.geometry,s.material,0,0,null)):p&&p.isTexture&&(void 0===a&&(a=new aO(new SO(2,2),new hO({name:"BackgroundMaterial",uniforms:cO(TO.background.uniforms),vertexShader:TO.background.vertexShader,fragmentShader:TO.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(a)),a.material.uniforms.t2D.value=p,!0===p.matrixAutoUpdate&&p.updateMatrix(),a.material.uniforms.uvTransform.value.copy(p.matrix),c===p&&u===p.version&&d===e.toneMapping||(a.material.needsUpdate=!0,c=p,u=p.version,d=e.toneMapping),n.unshift(a,a.geometry,a.material,0,0,null))}}}function CO(e,t,n,r){const i=e.getParameter(34921),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==o,s={},l=h(null);let c=l;function u(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function d(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function h(e){const t=[],n=[],r=[];for(let o=0;o<i;o++)t[o]=0,n[o]=0,r[o]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function f(){const e=c.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function p(e){m(e,0)}function m(n,i){const o=c.newAttributes,a=c.enabledAttributes,s=c.attributeDivisors;if(o[n]=1,0===a[n]&&(e.enableVertexAttribArray(n),a[n]=1),s[n]!==i){(r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i}}function g(){const t=c.newAttributes,n=c.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function v(t,n,i,o,a,s){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,o,a,s):e.vertexAttribIPointer(t,n,i,a,s)}function y(){b(),c!==l&&(c=l,u(c.object))}function b(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(i,l,d,y,b){let x=!1;if(a){const t=function(t,n,i){const a=!0===i.wireframe;let l=s[t.id];void 0===l&&(l={},s[t.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let u=c[a];void 0===u&&(u=h(r.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),c[a]=u);return u}(y,d,l);c!==t&&(c=t,u(c.object)),x=function(e,t){const n=c.attributes,r=e.attributes;let i=0;for(const o in r){const e=n[o],t=r[o];if(void 0===e)return!0;if(e.attribute!==t)return!0;if(e.data!==t.data)return!0;i++}return c.attributesNum!==i||c.index!==t}(y,b),x&&function(e,t){const n={},r=e.attributes;let i=0;for(const o in r){const e=r[o],t={};t.attribute=e,e.data&&(t.data=e.data),n[o]=t,i++}c.attributes=n,c.attributesNum=i,c.index=t}(y,b)}else{const e=!0===l.wireframe;c.geometry===y.id&&c.program===d.id&&c.wireframe===e||(c.geometry=y.id,c.program=d.id,c.wireframe=e,x=!0)}!0===i.isInstancedMesh&&(x=!0),null!==b&&n.update(b,34963),x&&(!function(i,o,a,s){if(!1===r.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();const l=s.attributes,c=a.getAttributes(),u=o.defaultAttributeValues;for(const t in c){const r=c[t];if(r>=0){const o=l[t];if(void 0!==o){const t=o.normalized,i=o.itemSize,a=n.get(o);if(void 0===a)continue;const l=a.buffer,c=a.type,u=a.bytesPerElement;if(o.isInterleavedBufferAttribute){const n=o.data,a=n.stride,d=o.offset;n&&n.isInstancedInterleavedBuffer?(m(r,n.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=n.meshPerAttribute*n.count)):p(r),e.bindBuffer(34962,l),v(r,i,c,t,a*u,d*u)}else o.isInstancedBufferAttribute?(m(r,o.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=o.meshPerAttribute*o.count)):p(r),e.bindBuffer(34962,l),v(r,i,c,t,0,0)}else if("instanceMatrix"===t){const t=n.get(i.instanceMatrix);if(void 0===t)continue;const o=t.buffer,a=t.type;m(r+0,1),m(r+1,1),m(r+2,1),m(r+3,1),e.bindBuffer(34962,o),e.vertexAttribPointer(r+0,4,a,!1,64,0),e.vertexAttribPointer(r+1,4,a,!1,64,16),e.vertexAttribPointer(r+2,4,a,!1,64,32),e.vertexAttribPointer(r+3,4,a,!1,64,48)}else if("instanceColor"===t){const t=n.get(i.instanceColor);if(void 0===t)continue;const o=t.buffer,a=t.type;m(r,1),e.bindBuffer(34962,o),e.vertexAttribPointer(r,3,a,!1,12,0)}else if(void 0!==u){const n=u[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(r,n);break;case 3:e.vertexAttrib3fv(r,n);break;case 4:e.vertexAttrib4fv(r,n);break;default:e.vertexAttrib1fv(r,n)}}}}g()}(i,l,d,y),null!==b&&e.bindBuffer(34963,n.get(b).buffer))},reset:y,resetDefaultState:b,dispose:function(){y();for(const e in s){const t=s[e];for(const e in t){const n=t[e];for(const e in n)d(n[e].object),delete n[e];delete t[e]}delete s[e]}},releaseStatesOfGeometry:function(e){if(void 0===s[e.id])return;const t=s[e.id];for(const n in t){const e=t[n];for(const t in e)d(e[t].object),delete e[t];delete t[n]}delete s[e.id]},releaseStatesOfProgram:function(e){for(const t in s){const n=s[t];if(void 0===n[e.id])continue;const r=n[e.id];for(const e in r)d(r[e].object),delete r[e];delete n[e.id]}},initAttributes:f,enableAttribute:p,disableUnusedAttributes:g}}function kO(e,t,n,r){const i=r.isWebGL2;let o;this.setMode=function(e){o=e},this.render=function(t,r){e.drawArrays(o,t,r),n.update(r,o,1)},this.renderInstances=function(r,a,s){if(0===s)return;let l,c;if(i)l=e,c="drawArraysInstanced";else if(l=t.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](o,r,a,s),n.update(a,o,s)}}function PO(e,t,n){let r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let a=void 0!==n.precision?n.precision:"highp";const s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);const l=o||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,u=e.getParameter(34930),d=e.getParameter(35660),h=e.getParameter(3379),f=e.getParameter(34076),p=e.getParameter(34921),m=e.getParameter(36347),g=e.getParameter(36348),v=e.getParameter(36349),y=d>0,b=o||t.has("OES_texture_float");return{isWebGL2:o,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:d,maxTextureSize:h,maxCubemapSize:f,maxAttributes:p,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:b,floatVertexTextures:y&&b,maxSamples:o?e.getParameter(36183):0}}function LO(e){const t=this;let n=null,r=0,i=!1,o=!1;const a=new JL,s=new DP,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){const o=null!==e?e.length:0;let c=null;if(0!==o){if(c=l.value,!0!==i||null===c){const t=r+4*o,i=n.matrixWorldInverse;s.getNormalMatrix(i),(null===c||c.length<t)&&(c=new Float32Array(t));for(let n=0,l=r;n!==o;++n,l+=4)a.copy(e[n]).applyMatrix4(i,s),a.normal.toArray(c,l),c[l+3]=a.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,o){const a=0!==e.length||t||0!==r||i;return i=t,n=u(e,o,0),r=e.length,a},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1,c()},this.setState=function(t,a,s){const d=t.clippingPlanes,h=t.clipIntersection,f=t.clipShadows,p=e.get(t);if(!i||null===d||0===d.length||o&&!f)o?u(null):c();else{const e=o?0:r,t=4*e;let i=p.clippingState||null;l.value=i,i=u(d,a,t,s);for(let r=0;r!==t;++r)i[r]=n[r];p.clippingState=i,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}}}function RO(e){let t=new WeakMap;function n(e,t){return 303===t?e.mapping=301:304===t&&(e.mapping=302),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping;if(303===o||304===o){if(t.has(i)){return n(t.get(i).texture,i.mapping)}{const o=i.image;if(o&&o.height>0){const a=e.getRenderTarget(),s=new vO(o.height/2);return s.fromEquirectangularTexture(e,i),t.set(i,s),e.setRenderTarget(a),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}function OO(e){const t={};function n(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function DO(e,t,n,r){const i={},o=new WeakMap;function a(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const n in s.attributes)t.remove(s.attributes[n]);s.removeEventListener("dispose",a),delete i[s.id];const l=o.get(s);l&&(t.remove(l),o.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(e){const n=[],r=e.index,i=e.attributes.position;let a=0;if(null!==r){const e=r.array;a=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],o=e[t+2];n.push(r,i,i,o,o,r)}}else{const e=i.array;a=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){const e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}const s=new(RR(n)>65535?CR:TR)(n,1);s.version=a;const l=o.get(e);l&&t.remove(l),o.set(e,s)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",a),i[t.id]=!0,n.memory.geometries++),t},update:function(e){const n=e.attributes;for(const i in n)t.update(n[i],34962);const r=e.morphAttributes;for(const i in r){const e=r[i];for(let n=0,r=e.length;n<r;n++)t.update(e[n],34962)}},getWireframeAttribute:function(e){const t=o.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&s(e)}else s(e);return o.get(e)}}}function IO(e,t,n,r){const i=r.isWebGL2;let o,a,s;this.setMode=function(e){o=e},this.setIndex=function(e){a=e.type,s=e.bytesPerElement},this.render=function(t,r){e.drawElements(o,r,a,t*s),n.update(r,o,1)},this.renderInstances=function(r,l,c){if(0===c)return;let u,d;if(i)u=e,d="drawElementsInstanced";else if(u=t.get("ANGLE_instanced_arrays"),d="drawElementsInstancedANGLE",null===u)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[d](o,l,a,r*s,c),n.update(l,o,c)}}function zO(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function NO(e,t){return e[0]-t[0]}function BO(e,t){return Math.abs(t[1])-Math.abs(e[1])}function FO(e){const t={},n=new Float32Array(8),r=[];for(let i=0;i<8;i++)r[i]=[i,0];return{update:function(i,o,a,s){const l=i.morphTargetInfluences,c=void 0===l?0:l.length;let u=t[o.id];if(void 0===u){u=[];for(let e=0;e<c;e++)u[e]=[e,0];t[o.id]=u}for(let e=0;e<c;e++){const t=u[e];t[0]=e,t[1]=l[e]}u.sort(BO);for(let e=0;e<8;e++)e<c&&u[e][1]?(r[e][0]=u[e][0],r[e][1]=u[e][1]):(r[e][0]=Number.MAX_SAFE_INTEGER,r[e][1]=0);r.sort(NO);const d=a.morphTargets&&o.morphAttributes.position,h=a.morphNormals&&o.morphAttributes.normal;let f=0;for(let e=0;e<8;e++){const t=r[e],i=t[0],a=t[1];i!==Number.MAX_SAFE_INTEGER&&a?(d&&o.getAttribute("morphTarget"+e)!==d[i]&&o.setAttribute("morphTarget"+e,d[i]),h&&o.getAttribute("morphNormal"+e)!==h[i]&&o.setAttribute("morphNormal"+e,h[i]),n[e]=a,f+=a):(d&&!0===o.hasAttribute("morphTarget"+e)&&o.deleteAttribute("morphTarget"+e),h&&!0===o.hasAttribute("morphNormal"+e)&&o.deleteAttribute("morphNormal"+e),n[e]=0)}const p=o.morphTargetsRelative?1:1-f;s.getUniforms().setValue(e,"morphTargetBaseInfluence",p),s.getUniforms().setValue(e,"morphTargetInfluences",n)}}}function HO(e,t,n,r){let i=new WeakMap;function o(e){const t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){const a=r.render.frame,s=e.geometry,l=t.get(e,s);return i.get(l)!==a&&(t.update(l),i.set(l,a)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",o)&&e.addEventListener("dispose",o),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),l},dispose:function(){i=new WeakMap}}}TO.physical={uniforms:uO([TO.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new OP(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new vR(0)},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new OP},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new vR(0)}}]),vertexShader:MO.meshphysical_vert,fragmentShader:MO.meshphysical_frag};class UO extends BP{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}UO.prototype.isDataTexture2DArray=!0;class jO extends BP{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}jO.prototype.isDataTexture3D=!0;const VO=new BP,WO=new UO,GO=new jO,qO=new gO,XO=[],YO=[],$O=new Float32Array(16),ZO=new Float32Array(9),JO=new Float32Array(4);function QO(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let o=XO[i];if(void 0===o&&(o=new Float32Array(i),XO[i]=o),0!==t){r.toArray(o,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(o,i)}return o}function KO(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function eD(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function tD(e,t){let n=YO[t];void 0===n&&(n=new Int32Array(t),YO[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function nD(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function rD(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(KO(n,t))return;e.uniform2fv(this.addr,t),eD(n,t)}}function iD(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(KO(n,t))return;e.uniform3fv(this.addr,t),eD(n,t)}}function oD(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(KO(n,t))return;e.uniform4fv(this.addr,t),eD(n,t)}}function aD(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(KO(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),eD(n,t)}else{if(KO(n,r))return;JO.set(r),e.uniformMatrix2fv(this.addr,!1,JO),eD(n,r)}}function sD(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(KO(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),eD(n,t)}else{if(KO(n,r))return;ZO.set(r),e.uniformMatrix3fv(this.addr,!1,ZO),eD(n,r)}}function lD(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(KO(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),eD(n,t)}else{if(KO(n,r))return;$O.set(r),e.uniformMatrix4fv(this.addr,!1,$O),eD(n,r)}}function cD(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function uD(e,t){const n=this.cache;KO(n,t)||(e.uniform2iv(this.addr,t),eD(n,t))}function dD(e,t){const n=this.cache;KO(n,t)||(e.uniform3iv(this.addr,t),eD(n,t))}function hD(e,t){const n=this.cache;KO(n,t)||(e.uniform4iv(this.addr,t),eD(n,t))}function fD(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function pD(e,t){const n=this.cache;KO(n,t)||(e.uniform2uiv(this.addr,t),eD(n,t))}function mD(e,t){const n=this.cache;KO(n,t)||(e.uniform3uiv(this.addr,t),eD(n,t))}function gD(e,t){const n=this.cache;KO(n,t)||(e.uniform4uiv(this.addr,t),eD(n,t))}function vD(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTexture2D(t||VO,i)}function yD(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||GO,i)}function bD(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTextureCube(t||qO,i)}function xD(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||WO,i)}function _D(e,t){e.uniform1fv(this.addr,t)}function wD(e,t){const n=QO(t,this.size,2);e.uniform2fv(this.addr,n)}function SD(e,t){const n=QO(t,this.size,3);e.uniform3fv(this.addr,n)}function MD(e,t){const n=QO(t,this.size,4);e.uniform4fv(this.addr,n)}function ED(e,t){const n=QO(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function TD(e,t){const n=QO(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function AD(e,t){const n=QO(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function CD(e,t){e.uniform1iv(this.addr,t)}function kD(e,t){e.uniform2iv(this.addr,t)}function PD(e,t){e.uniform3iv(this.addr,t)}function LD(e,t){e.uniform4iv(this.addr,t)}function RD(e,t){e.uniform1uiv(this.addr,t)}function OD(e,t){e.uniform2uiv(this.addr,t)}function DD(e,t){e.uniform3uiv(this.addr,t)}function ID(e,t){e.uniform4uiv(this.addr,t)}function zD(e,t,n){const r=t.length,i=tD(n,r);e.uniform1iv(this.addr,i);for(let o=0;o!==r;++o)n.safeSetTexture2D(t[o]||VO,i[o])}function ND(e,t,n){const r=t.length,i=tD(n,r);e.uniform1iv(this.addr,i);for(let o=0;o!==r;++o)n.safeSetTextureCube(t[o]||qO,i[o])}function BD(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return nD;case 35664:return rD;case 35665:return iD;case 35666:return oD;case 35674:return aD;case 35675:return sD;case 35676:return lD;case 5124:case 35670:return cD;case 35667:case 35671:return uD;case 35668:case 35672:return dD;case 35669:case 35673:return hD;case 5125:return fD;case 36294:return pD;case 36295:return mD;case 36296:return gD;case 35678:case 36198:case 36298:case 36306:case 35682:return vD;case 35679:case 36299:case 36307:return yD;case 35680:case 36300:case 36308:case 36293:return bD;case 36289:case 36303:case 36311:case 36292:return xD}}(t.type)}function FD(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return _D;case 35664:return wD;case 35665:return SD;case 35666:return MD;case 35674:return ED;case 35675:return TD;case 35676:return AD;case 5124:case 35670:return CD;case 35667:case 35671:return kD;case 35668:case 35672:return PD;case 35669:case 35673:return LD;case 5125:return RD;case 36294:return OD;case 36295:return DD;case 36296:return ID;case 35678:case 36198:case 36298:case 36306:case 35682:return zD;case 35680:case 36300:case 36308:case 36293:return ND}}(t.type)}function HD(e){this.id=e,this.seq=[],this.map={}}FD.prototype.updateCache=function(e){const t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),eD(t,e)},HD.prototype.setValue=function(e,t,n){const r=this.seq;for(let i=0,o=r.length;i!==o;++i){const o=r[i];o.setValue(e,t[o.id],n)}};const UD=/(\w+)(\])?(\[|\.)?/g;function jD(e,t){e.seq.push(t),e.map[t.id]=t}function VD(e,t,n){const r=e.name,i=r.length;for(UD.lastIndex=0;;){const o=UD.exec(r),a=UD.lastIndex;let s=o[1];const l="]"===o[2],c=o[3];if(l&&(s|=0),void 0===c||"["===c&&a+2===i){jD(n,void 0===c?new BD(s,e,t):new FD(s,e,t));break}{let e=n.map[s];void 0===e&&(e=new HD(s),jD(n,e)),n=e}}}function WD(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,35718);for(let r=0;r<n;++r){const n=e.getActiveUniform(t,r);VD(n,e.getUniformLocation(t,n.name),this)}}function GD(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}WD.prototype.setValue=function(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)},WD.prototype.setOptional=function(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)},WD.upload=function(e,t,n,r){for(let i=0,o=t.length;i!==o;++i){const o=t[i],a=n[o.id];!1!==a.needsUpdate&&o.setValue(e,a.value,r)}},WD.seqWithValue=function(e,t){const n=[];for(let r=0,i=e.length;r!==i;++r){const i=e[r];i.id in t&&n.push(i)}return n};let qD=0;function XD(e){switch(e){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case 3003:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function YD(e,t,n){const r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();if(r&&""===i)return"";return"THREE.WebGLShader: gl.getShaderInfoLog() "+n+"\n"+i+function(e){const t=e.split("\n");for(let n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}(e.getShaderSource(t))}function $D(e,t){const n=XD(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function ZD(e,t){const n=XD(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function JD(e,t){let n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function QD(e){return""!==e}function KD(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function eI(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const tI=/^[ \t]*#include +<([\w\d./]+)>/gm;function nI(e){return e.replace(tI,rI)}function rI(e,t){const n=MO[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return nI(n)}const iI=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,oI=/#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 aI(e){return e.replace(oI,lI).replace(iI,sI)}function sI(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),lI(e,t,n,r)}function lI(e,t,n,r){let i="";for(let o=parseInt(t);o<parseInt(n);o++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return i}function cI(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function uI(e,t,n,r){const i=e.getContext(),o=n.defines;let a=n.vertexShader,s=n.fragmentShader;const l=function(e){let t="SHADOWMAP_TYPE_BASIC";return 1===e.shadowMapType?t="SHADOWMAP_TYPE_PCF":2===e.shadowMapType?t="SHADOWMAP_TYPE_PCF_SOFT":3===e.shadowMapType&&(t="SHADOWMAP_TYPE_VSM"),t}(n),c=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case 301:case 302:t="ENVMAP_TYPE_CUBE";break;case 306:case 307:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),u=function(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case 302:case 307:t="ENVMAP_MODE_REFRACTION"}return t}(n),d=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2:t="ENVMAP_BLENDING_ADD"}return t}(n),h=e.gammaFactor>0?e.gammaFactor:1,f=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission>0)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(QD).join("\n")}(n),p=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(o),m=i.createProgram();let g,v,y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(g=[p].filter(QD).join("\n"),g.length>0&&(g+="\n"),v=[f,p].filter(QD).join("\n"),v.length>0&&(v+="\n")):(g=[cI(n),"#define SHADER_NAME "+n.shaderName,p,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+h,"#define MAX_BONES "+n.maxBones,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.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",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.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(QD).join("\n"),v=[f,cI(n),"#define SHADER_NAME "+n.shaderName,p,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+h,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",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.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?MO.tonemapping_pars_fragment:"",0!==n.toneMapping?JD("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",MO.encodings_pars_fragment,n.map?$D("mapTexelToLinear",n.mapEncoding):"",n.matcap?$D("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?$D("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?$D("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMap?$D("lightMapTexelToLinear",n.lightMapEncoding):"",ZD("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(QD).join("\n")),a=nI(a),a=KD(a,n),a=eI(a,n),s=nI(s),s=KD(s,n),s=eI(s,n),a=aI(a),s=aI(s),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",g=["#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,v=["#define varying in","300 es"===n.glslVersion?"":"out highp vec4 pc_fragColor;","300 es"===n.glslVersion?"":"#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("\n")+"\n"+v);const b=y+v+s,x=GD(i,35633,y+g+a),_=GD(i,35632,b);if(i.attachShader(m,x),i.attachShader(m,_),void 0!==n.index0AttributeName?i.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(m,0,"position"),i.linkProgram(m),e.debug.checkShaderErrors){const e=i.getProgramInfoLog(m).trim(),t=i.getShaderInfoLog(x).trim(),n=i.getShaderInfoLog(_).trim();let r=!0,o=!0;if(!1===i.getProgramParameter(m,35714)){r=!1;const t=YD(i,x,"vertex"),n=YD(i,_,"fragment");console.error("THREE.WebGLProgram: shader error: ",i.getError(),"35715",i.getProgramParameter(m,35715),"gl.getProgramInfoLog",e,t,n)}else""!==e?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",e):""!==t&&""!==n||(o=!1);o&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:g},fragmentShader:{log:n,prefix:v}})}let w,S;return i.deleteShader(x),i.deleteShader(_),this.getUniforms=function(){return void 0===w&&(w=new WD(i,m)),w},this.getAttributes=function(){return void 0===S&&(S=function(e,t){const n={},r=e.getProgramParameter(t,35721);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i).name;n[r]=e.getAttribLocation(t,r)}return n}(i,m)),S},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(m),this.program=void 0},this.name=n.shaderName,this.id=qD++,this.cacheKey=t,this.usedTimes=1,this.program=m,this.vertexShader=x,this.fragmentShader=_,this}function dI(e,t,n,r,i,o){const a=[],s=r.isWebGL2,l=r.logarithmicDepthBuffer,c=r.floatVertexTextures,u=r.maxVertexUniforms,d=r.vertexTextures;let h=r.precision;const f={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"},p=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen","transmission","transmissionMap","thicknessMap"];function m(e){let t;return e&&e.isTexture?t=e.encoding:e&&e.isWebGLRenderTarget?(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),t=e.texture.encoding):t=3e3,t}return{getParameters:function(i,a,p,g,v){const y=g.fog,b=i.isMeshStandardMaterial?g.environment:null,x=t.get(i.envMap||b),_=f[i.type],w=v.isSkinnedMesh?function(e){const t=e.skeleton.bones;if(c)return 1024;{const e=u,n=Math.floor((e-20)/4),r=Math.min(n,t.length);return r<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+r+"."),0):r}}(v):0;let S,M;if(null!==i.precision&&(h=r.getMaxPrecision(i.precision),h!==i.precision&&console.warn("THREE.WebGLProgram.getParameters:",i.precision,"not supported, using",h,"instead.")),_){const e=TO[_];S=e.vertexShader,M=e.fragmentShader}else S=i.vertexShader,M=i.fragmentShader;const E=e.getRenderTarget();return{isWebGL2:s,shaderID:_,shaderName:i.type,vertexShader:S,fragmentShader:M,defines:i.defines,isRawShaderMaterial:!0===i.isRawShaderMaterial,glslVersion:i.glslVersion,precision:h,instancing:!0===v.isInstancedMesh,instancingColor:!0===v.isInstancedMesh&&null!==v.instanceColor,supportsVertexTextures:d,outputEncoding:null!==E?m(E.texture):e.outputEncoding,map:!!i.map,mapEncoding:m(i.map),matcap:!!i.matcap,matcapEncoding:m(i.matcap),envMap:!!x,envMapMode:x&&x.mapping,envMapEncoding:m(x),envMapCubeUV:!!x&&(306===x.mapping||307===x.mapping),lightMap:!!i.lightMap,lightMapEncoding:m(i.lightMap),aoMap:!!i.aoMap,emissiveMap:!!i.emissiveMap,emissiveMapEncoding:m(i.emissiveMap),bumpMap:!!i.bumpMap,normalMap:!!i.normalMap,objectSpaceNormalMap:1===i.normalMapType,tangentSpaceNormalMap:0===i.normalMapType,clearcoatMap:!!i.clearcoatMap,clearcoatRoughnessMap:!!i.clearcoatRoughnessMap,clearcoatNormalMap:!!i.clearcoatNormalMap,displacementMap:!!i.displacementMap,roughnessMap:!!i.roughnessMap,metalnessMap:!!i.metalnessMap,specularMap:!!i.specularMap,alphaMap:!!i.alphaMap,gradientMap:!!i.gradientMap,sheen:!!i.sheen,transmission:!!i.transmission,transmissionMap:!!i.transmissionMap,thicknessMap:!!i.thicknessMap,combine:i.combine,vertexTangents:i.normalMap&&i.vertexTangents,vertexColors:i.vertexColors,vertexAlphas:!0===i.vertexColors&&v.geometry&&v.geometry.attributes.color&&4===v.geometry.attributes.color.itemSize,vertexUvs:!!(i.map||i.bumpMap||i.normalMap||i.specularMap||i.alphaMap||i.emissiveMap||i.roughnessMap||i.metalnessMap||i.clearcoatMap||i.clearcoatRoughnessMap||i.clearcoatNormalMap||i.displacementMap||i.transmission||i.transmissionMap||i.thicknessMap),uvsVertexOnly:!(i.map||i.bumpMap||i.normalMap||i.specularMap||i.alphaMap||i.emissiveMap||i.roughnessMap||i.metalnessMap||i.clearcoatNormalMap||i.transmission||i.transmissionMap||i.thicknessMap||!i.displacementMap),fog:!!y,useFog:i.fog,fogExp2:y&&y.isFogExp2,flatShading:!!i.flatShading,sizeAttenuation:i.sizeAttenuation,logarithmicDepthBuffer:l,skinning:!0===v.isSkinnedMesh&&w>0,maxBones:w,useVertexTexture:c,morphTargets:i.morphTargets,morphNormals:i.morphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:i.dithering,shadowMapEnabled:e.shadowMap.enabled&&p.length>0,shadowMapType:e.shadowMap.type,toneMapping:i.toneMapped?e.toneMapping:0,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:2===i.side,flipSided:1===i.side,depthPacking:void 0!==i.depthPacking&&i.depthPacking,index0AttributeName:i.index0AttributeName,extensionDerivatives:i.extensions&&i.extensions.derivatives,extensionFragDepth:i.extensions&&i.extensions.fragDepth,extensionDrawBuffers:i.extensions&&i.extensions.drawBuffers,extensionShaderTextureLOD:i.extensions&&i.extensions.shaderTextureLOD,rendererExtensionFragDepth:s||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:s||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:s||n.has("EXT_shader_texture_lod"),customProgramCacheKey:i.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.fragmentShader),n.push(t.vertexShader)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);if(!1===t.isRawShaderMaterial){for(let e=0;e<p.length;e++)n.push(t[p[e]]);n.push(e.outputEncoding),n.push(e.gammaFactor)}return n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=f[e.type];let n;if(t){const e=TO[t];n=dO.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,i=a.length;e<i;e++){const t=a[e];if(t.cacheKey===n){r=t,++r.usedTimes;break}}return void 0===r&&(r=new uI(e,n,t,i),a.push(r)),r},releaseProgram:function(e){if(0==--e.usedTimes){const t=a.indexOf(e);a[t]=a[a.length-1],a.pop(),e.destroy()}},programs:a}}function hI(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function fI(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program!==t.program?e.program.id-t.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function pI(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function mI(e){const t=[];let n=0;const r=[],i=[],o=[],a={id:-1};function s(r,i,o,s,l,c){let u=t[n];const d=e.get(o);return void 0===u?(u={id:r.id,object:r,geometry:i,material:o,program:d.program||a,groupOrder:s,renderOrder:r.renderOrder,z:l,group:c},t[n]=u):(u.id=r.id,u.object=r,u.geometry=i,u.material=o,u.program=d.program||a,u.groupOrder=s,u.renderOrder=r.renderOrder,u.z=l,u.group=c),n++,u}return{opaque:r,transmissive:i,transparent:o,init:function(){n=0,r.length=0,i.length=0,o.length=0},push:function(e,t,n,a,l,c){const u=s(e,t,n,a,l,c);n.transmission>0?i.push(u):!0===n.transparent?o.push(u):r.push(u)},unshift:function(e,t,n,a,l,c){const u=s(e,t,n,a,l,c);n.transmission>0?i.unshift(u):!0===n.transparent?o.unshift(u):r.unshift(u)},finish:function(){for(let e=n,r=t.length;e<r;e++){const n=t[e];if(null===n.id)break;n.id=null,n.object=null,n.geometry=null,n.material=null,n.program=null,n.group=null}},sort:function(e,t){r.length>1&&r.sort(e||fI),i.length>1&&i.sort(t||pI),o.length>1&&o.sort(t||pI)}}}function gI(e){let t=new WeakMap;return{get:function(n,r){let i;return!1===t.has(n)?(i=new mI(e),t.set(n,[i])):r>=t.get(n).length?(i=new mI(e),t.get(n).push(i)):i=t.get(n)[r],i},dispose:function(){t=new WeakMap}}}function vI(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new GP,color:new vR};break;case"SpotLight":n={position:new GP,direction:new GP,color:new vR,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new GP,color:new vR,distance:0,decay:0};break;case"HemisphereLight":n={direction:new GP,skyColor:new vR,groundColor:new vR};break;case"RectAreaLight":n={color:new vR,position:new GP,halfWidth:new GP,halfHeight:new GP}}return e[t.id]=n,n}}}let yI=0;function bI(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function xI(e,t){const n=new vI,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new OP};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new OP,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let l=0;l<9;l++)i.probe.push(new GP);const o=new GP,a=new wL,s=new wL;return{setup:function(o){let a=0,s=0,l=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let c=0,u=0,d=0,h=0,f=0,p=0,m=0,g=0;o.sort(bI);for(let e=0,t=o.length;e<t;e++){const t=o[e],v=t.color,y=t.intensity,b=t.distance,x=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)a+=v.r*y,s+=v.g*y,l+=v.b*y;else if(t.isLightProbe)for(let e=0;e<9;e++)i.probe[e].addScaledVector(t.sh.coefficients[e],y);else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity),t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.directionalShadow[c]=n,i.directionalShadowMap[c]=x,i.directionalShadowMatrix[c]=t.shadow.matrix,p++}i.directional[c]=e,c++}else if(t.isSpotLight){const e=n.get(t);if(e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(v).multiplyScalar(y),e.distance=b,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.spotShadow[d]=n,i.spotShadowMap[d]=x,i.spotShadowMatrix[d]=t.shadow.matrix,g++}i.spot[d]=e,d++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(v).multiplyScalar(y),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),i.rectArea[h]=e,h++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,i.pointShadow[u]=n,i.pointShadowMap[u]=x,i.pointShadowMatrix[u]=t.shadow.matrix,m++}i.point[u]=e,u++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(y),e.groundColor.copy(t.groundColor).multiplyScalar(y),i.hemi[f]=e,f++}}h>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=EO.LTC_FLOAT_1,i.rectAreaLTC2=EO.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=EO.LTC_HALF_1,i.rectAreaLTC2=EO.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=a,i.ambient[1]=s,i.ambient[2]=l;const v=i.hash;v.directionalLength===c&&v.pointLength===u&&v.spotLength===d&&v.rectAreaLength===h&&v.hemiLength===f&&v.numDirectionalShadows===p&&v.numPointShadows===m&&v.numSpotShadows===g||(i.directional.length=c,i.spot.length=d,i.rectArea.length=h,i.point.length=u,i.hemi.length=f,i.directionalShadow.length=p,i.directionalShadowMap.length=p,i.pointShadow.length=m,i.pointShadowMap.length=m,i.spotShadow.length=g,i.spotShadowMap.length=g,i.directionalShadowMatrix.length=p,i.pointShadowMatrix.length=m,i.spotShadowMatrix.length=g,v.directionalLength=c,v.pointLength=u,v.spotLength=d,v.rectAreaLength=h,v.hemiLength=f,v.numDirectionalShadows=p,v.numPointShadows=m,v.numSpotShadows=g,i.version=yI++)},setupView:function(e,t){let n=0,r=0,l=0,c=0,u=0;const d=t.matrixWorldInverse;for(let h=0,f=e.length;h<f;h++){const t=e[h];if(t.isDirectionalLight){const e=i.directional[n];e.direction.setFromMatrixPosition(t.matrixWorld),o.setFromMatrixPosition(t.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(d),n++}else if(t.isSpotLight){const e=i.spot[l];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(d),e.direction.setFromMatrixPosition(t.matrixWorld),o.setFromMatrixPosition(t.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(d),l++}else if(t.isRectAreaLight){const e=i.rectArea[c];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(d),s.identity(),a.copy(t.matrixWorld),a.premultiply(d),s.extractRotation(a),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),e.halfWidth.applyMatrix4(s),e.halfHeight.applyMatrix4(s),c++}else if(t.isPointLight){const e=i.point[r];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(d),r++}else if(t.isHemisphereLight){const e=i.hemi[u];e.direction.setFromMatrixPosition(t.matrixWorld),e.direction.transformDirection(d),e.direction.normalize(),u++}}},state:i}}function _I(e,t){const n=new xI(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(){n.setup(r)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function wI(e,t){let n=new WeakMap;return{get:function(r,i=0){let o;return!1===n.has(r)?(o=new _I(e,t),n.set(r,[o])):i>=n.get(r).length?(o=new _I(e,t),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}class SI extends uR{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.morphTargets=e.morphTargets,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}}SI.prototype.isMeshDepthMaterial=!0;class MI extends uR{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new GP,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}MI.prototype.isMeshDistanceMaterial=!0;function EI(e,t,n){let r=new xO;const i=new OP,o=new OP,a=new HP,s=[],l=[],c={},u=n.maxTextureSize,d={0:1,1:0,2:2},h=new hO({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new OP},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),f=h.clone();f.defines.HORIZONTAL_PASS=1;const p=new jR;p.setAttribute("position",new _R(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new aO(p,h),g=this;function v(n,r){const i=t.update(m);h.uniforms.shadow_pass.value=n.map.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,h,m,null),f.uniforms.shadow_pass.value=n.mapPass.texture,f.uniforms.resolution.value=n.mapSize,f.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,f,m,null)}function y(e){const t=e<<0;let n=s[t];return void 0===n&&(n=new SI({depthPacking:3201,morphTargets:e}),s[t]=n),n}function b(e){const t=e<<0;let n=l[t];return void 0===n&&(n=new MI({morphTargets:e}),l[t]=n),n}function x(t,n,r,i,o,a,s){let l=null,u=y,h=t.customDepthMaterial;if(!0===i.isPointLight&&(u=b,h=t.customDistanceMaterial),void 0===h){let e=!1;!0===r.morphTargets&&(e=n.morphAttributes&&n.morphAttributes.position&&n.morphAttributes.position.length>0),l=u(e)}else l=h;if(e.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){const e=l.uuid,t=r.uuid;let n=c[e];void 0===n&&(n={},c[e]=n);let i=n[t];void 0===i&&(i=l.clone(),n[t]=i),l=i}return l.visible=r.visible,l.wireframe=r.wireframe,l.side=3===s?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:d[r.side],l.clipShadows=r.clipShadows,l.clippingPlanes=r.clippingPlanes,l.clipIntersection=r.clipIntersection,l.wireframeLinewidth=r.wireframeLinewidth,l.linewidth=r.linewidth,!0===i.isPointLight&&!0===l.isMeshDistanceMaterial&&(l.referencePosition.setFromMatrixPosition(i.matrixWorld),l.nearDistance=o,l.farDistance=a),l}function _(n,i,o,a,s){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===s)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let l=0,c=t.length;l<c;l++){const c=t[l],u=i[c.materialIndex];if(u&&u.visible){const t=x(n,r,u,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,c)}}}else if(i.visible){const t=x(n,r,i,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,null)}}const l=n.children;for(let e=0,t=l.length;e<t;e++)_(l[e],i,o,a,s)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,n,s){if(!1===g.enabled)return;if(!1===g.autoUpdate&&!1===g.needsUpdate)return;if(0===t.length)return;const l=e.getRenderTarget(),c=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),h=e.state;h.setBlending(0),h.buffers.color.setClear(1,1,1,1),h.buffers.depth.setTest(!0),h.setScissorTest(!1);for(let f=0,p=t.length;f<p;f++){const l=t[f],c=l.shadow;if(void 0===c){console.warn("THREE.WebGLShadowMap:",l,"has no shadow.");continue}if(!1===c.autoUpdate&&!1===c.needsUpdate)continue;i.copy(c.mapSize);const d=c.getFrameExtents();if(i.multiply(d),o.copy(c.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/d.x),i.x=o.x*d.x,c.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/d.y),i.y=o.y*d.y,c.mapSize.y=o.y)),null===c.map&&!c.isPointLightShadow&&3===this.type){const e={minFilter:1006,magFilter:1006,format:1023};c.map=new UP(i.x,i.y,e),c.map.texture.name=l.name+".shadowMap",c.mapPass=new UP(i.x,i.y,e),c.camera.updateProjectionMatrix()}if(null===c.map){const e={minFilter:1003,magFilter:1003,format:1023};c.map=new UP(i.x,i.y,e),c.map.texture.name=l.name+".shadowMap",c.camera.updateProjectionMatrix()}e.setRenderTarget(c.map),e.clear();const p=c.getViewportCount();for(let e=0;e<p;e++){const t=c.getViewport(e);a.set(o.x*t.x,o.y*t.y,o.x*t.z,o.y*t.w),h.viewport(a),c.updateMatrices(l,e),r=c.getFrustum(),_(n,s,c.camera,l,this.type)}c.isPointLightShadow||3!==this.type||v(c,s),c.needsUpdate=!1}g.needsUpdate=!1,e.setRenderTarget(l,c,d)}}function TI(e,t,n){const r=n.isWebGL2;const i=new function(){let t=!1;const n=new HP;let r=null;const i=new HP(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,a,s){!0===s&&(t*=a,r*=a,o*=a),n.set(t,r,o,a),!1===i.equals(n)&&(e.clearColor(t,r,o,a),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},o=new function(){let t=!1,n=null,r=null,i=null;return{setTest:function(e){e?N(2929):B(2929)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case 0:e.depthFunc(512);break;case 1:e.depthFunc(519);break;case 2:e.depthFunc(513);break;case 3:e.depthFunc(515);break;case 4:e.depthFunc(514);break;case 5:e.depthFunc(518);break;case 6:e.depthFunc(516);break;case 7:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},a=new function(){let t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null;return{setTest:function(e){t||(e?N(2960):B(2960))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,a){r===t&&i===n&&o===a||(e.stencilFunc(t,n,a),r=t,i=n,o=a)},setOp:function(t,n,r){a===t&&s===n&&l===r||(e.stencilOp(t,n,r),a=t,s=n,l=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null}}};let s={},l=null,c={},u=null,d=!1,h=null,f=null,p=null,m=null,g=null,v=null,y=null,b=!1,x=null,_=null,w=null,S=null,M=null;const E=e.getParameter(35661);let T=!1,A=0;const C=e.getParameter(7938);-1!==C.indexOf("WebGL")?(A=parseFloat(/^WebGL (\d)/.exec(C)[1]),T=A>=1):-1!==C.indexOf("OpenGL ES")&&(A=parseFloat(/^OpenGL ES (\d)/.exec(C)[1]),T=A>=2);let k=null,P={};const L=e.getParameter(3088),R=e.getParameter(2978),O=(new HP).fromArray(L),D=(new HP).fromArray(R);function I(t,n,r){const i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let a=0;a<r;a++)e.texImage2D(n+a,0,6408,1,1,0,6408,5121,i);return o}const z={};function N(t){!0!==s[t]&&(e.enable(t),s[t]=!0)}function B(t){!1!==s[t]&&(e.disable(t),s[t]=!1)}z[3553]=I(3553,3553,1),z[34067]=I(34067,34069,6),i.setClear(0,0,0,1),o.setClear(1),a.setClear(0),N(2929),o.setFunc(3),j(!1),V(1),N(2884),U(0);const F={100:32774,101:32778,102:32779};if(r)F[103]=32775,F[104]=32776;else{const e=t.get("EXT_blend_minmax");null!==e&&(F[103]=e.MIN_EXT,F[104]=e.MAX_EXT)}const H={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};function U(t,n,r,i,o,a,s,l){if(0!==t){if(!1===d&&(N(3042),d=!0),5===t)o=o||n,a=a||r,s=s||i,n===f&&o===g||(e.blendEquationSeparate(F[n],F[o]),f=n,g=o),r===p&&i===m&&a===v&&s===y||(e.blendFuncSeparate(H[r],H[i],H[a],H[s]),p=r,m=i,v=a,y=s),h=t,b=null;else if(t!==h||l!==b){if(100===f&&100===g||(e.blendEquation(32774),f=100,g=100),l)switch(t){case 1:e.blendFuncSeparate(1,771,1,771);break;case 2:e.blendFunc(1,1);break;case 3:e.blendFuncSeparate(0,0,769,771);break;case 4:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(770,771,1,771);break;case 2:e.blendFunc(770,1);break;case 3:e.blendFunc(0,769);break;case 4:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}p=null,m=null,v=null,y=null,h=t,b=l}}else!0===d&&(B(3042),d=!1)}function j(t){x!==t&&(t?e.frontFace(2304):e.frontFace(2305),x=t)}function V(t){0!==t?(N(2884),t!==_&&(1===t?e.cullFace(1029):2===t?e.cullFace(1028):e.cullFace(1032))):B(2884),_=t}function W(t,n,r){t?(N(32823),S===n&&M===r||(e.polygonOffset(n,r),S=n,M=r)):B(32823)}function G(t){void 0===t&&(t=33984+E-1),k!==t&&(e.activeTexture(t),k=t)}return{buffers:{color:i,depth:o,stencil:a},enable:N,disable:B,bindFramebuffer:function(t,n){return null===n&&null!==l&&(n=l),c[t]!==n&&(e.bindFramebuffer(t,n),c[t]=n,r&&(36009===t&&(c[36160]=n),36160===t&&(c[36009]=n)),!0)},bindXRFramebuffer:function(t){t!==l&&(e.bindFramebuffer(36160,t),l=t)},useProgram:function(t){return u!==t&&(e.useProgram(t),u=t,!0)},setBlending:U,setMaterial:function(e,t){2===e.side?B(2884):N(2884);let n=1===e.side;t&&(n=!n),j(n),1===e.blending&&!1===e.transparent?U(0):U(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),o.setFunc(e.depthFunc),o.setTest(e.depthTest),o.setMask(e.depthWrite),i.setMask(e.colorWrite);const r=e.stencilWrite;a.setTest(r),r&&(a.setMask(e.stencilWriteMask),a.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),a.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),W(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?N(32926):B(32926)},setFlipSided:j,setCullFace:V,setLineWidth:function(t){t!==w&&(T&&e.lineWidth(t),w=t)},setPolygonOffset:W,setScissorTest:function(e){e?N(3089):B(3089)},activeTexture:G,bindTexture:function(t,n){null===k&&G();let r=P[k];void 0===r&&(r={type:void 0,texture:void 0},P[k]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||z[t]),r.type=t,r.texture=n)},unbindTexture:function(){const t=P[k];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(t){!1===O.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),O.copy(t))},viewport:function(t){!1===D.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),D.copy(t))},reset:function(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),!0===r&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),s={},k=null,P={},l=null,c={},u=null,d=!1,h=null,f=null,p=null,m=null,g=null,v=null,y=null,b=!1,x=null,_=null,w=null,S=null,M=null,O.set(0,0,e.canvas.width,e.canvas.height),D.set(0,0,e.canvas.width,e.canvas.height),i.reset(),o.reset(),a.reset()}}}function AI(e,t,n,r,i,o,a){const s=i.isWebGL2,l=i.maxTextures,c=i.maxCubemapSize,u=i.maxTextureSize,d=i.maxSamples,h=new WeakMap;let f,p=!1;try{p="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(g2){}function m(e,t){return p?new OffscreenCanvas(e,t):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function g(e,t,n,r){let i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?LP:Math.floor,o=r(i*e.width),a=r(i*e.height);void 0===f&&(f=m(o,a));const s=n?m(o,a):f;s.width=o,s.height=a;return s.getContext("2d").drawImage(e,0,0,o,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+a+")."),s}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function v(e){return kP(e.width)&&kP(e.height)}function y(e,t){return e.generateMipmaps&&t&&1003!==e.minFilter&&1006!==e.minFilter}function b(t,n,i,o){e.generateMipmap(t);r.get(n).__maxMipLevel=Math.log2(Math.max(i,o))}function x(n,r,i){if(!1===s)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=r;return 6403===r&&(5126===i&&(o=33326),5131===i&&(o=33325),5121===i&&(o=33321)),6407===r&&(5126===i&&(o=34837),5131===i&&(o=34843),5121===i&&(o=32849)),6408===r&&(5126===i&&(o=34836),5131===i&&(o=34842),5121===i&&(o=32856)),33325!==o&&33326!==o&&34842!==o&&34836!==o||t.get("EXT_color_buffer_float"),o}function _(e){return 1003===e||1004===e||1005===e?9728:9729}function w(t){const n=t.target;n.removeEventListener("dispose",w),function(t){const n=r.get(t);if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture),r.remove(t)}(n),n.isVideoTexture&&h.delete(n),a.memory.textures--}function S(t){const n=t.target;n.removeEventListener("dispose",S),function(t){const n=t.texture,i=r.get(t),o=r.get(n);if(!t)return;void 0!==o.__webglTexture&&(e.deleteTexture(o.__webglTexture),a.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let r=0;r<6;r++)e.deleteFramebuffer(i.__webglFramebuffer[r]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[r]);else e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer&&e.deleteRenderbuffer(i.__webglColorRenderbuffer),i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer);if(t.isWebGLMultipleRenderTargets)for(let s=0,l=n.length;s<l;s++){const t=r.get(n[s]);t.__webglTexture&&(e.deleteTexture(t.__webglTexture),a.memory.textures--),r.remove(n[s])}r.remove(n),r.remove(t)}(n)}let M=0;function E(e,t){const i=r.get(e);if(e.isVideoTexture&&function(e){const t=a.render.frame;h.get(e)!==t&&(h.set(e,t),e.update())}(e),e.version>0&&i.__version!==e.version){const n=e.image;if(void 0===n)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==n.complete)return void L(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}function T(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?function(t,r,i){if(6!==r.image.length)return;P(t,r),n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const a=r&&(r.isCompressedTexture||r.image[0].isCompressedTexture),l=r.image[0]&&r.image[0].isDataTexture,u=[];for(let e=0;e<6;e++)u[e]=a||l?l?r.image[e].image:r.image[e]:g(r.image[e],!1,!0,c);const d=u[0],h=v(d)||s,f=o.convert(r.format),p=o.convert(r.type),m=x(r.internalFormat,f,p);let _;if(k(34067,r,h),a){for(let e=0;e<6;e++){_=u[e].mipmaps;for(let t=0;t<_.length;t++){const i=_[t];1023!==r.format&&1022!==r.format?null!==f?n.compressedTexImage2D(34069+e,t,m,i.width,i.height,0,i.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+e,t,m,i.width,i.height,0,f,p,i.data)}}t.__maxMipLevel=_.length-1}else{_=r.mipmaps;for(let e=0;e<6;e++)if(l){n.texImage2D(34069+e,0,m,u[e].width,u[e].height,0,f,p,u[e].data);for(let t=0;t<_.length;t++){const r=_[t].image[e].image;n.texImage2D(34069+e,t+1,m,r.width,r.height,0,f,p,r.data)}}else{n.texImage2D(34069+e,0,m,f,p,u[e]);for(let t=0;t<_.length;t++){const r=_[t];n.texImage2D(34069+e,t+1,m,f,p,r.image[e])}}t.__maxMipLevel=_.length}y(r,h)&&b(34067,r,d.width,d.height);t.__version=r.version,r.onUpdate&&r.onUpdate(r)}(a,t,i):(n.activeTexture(33984+i),n.bindTexture(34067,a.__webglTexture))}const A={1e3:10497,1001:33071,1002:33648},C={1003:9728,1004:9984,1005:9986,1006:9729,1007:9985,1008:9987};function k(n,o,a){if(a?(e.texParameteri(n,10242,A[o.wrapS]),e.texParameteri(n,10243,A[o.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,A[o.wrapR]),e.texParameteri(n,10240,C[o.magFilter]),e.texParameteri(n,10241,C[o.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),1001===o.wrapS&&1001===o.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,_(o.magFilter)),e.texParameteri(n,10241,_(o.minFilter)),1003!==o.minFilter&&1006!==o.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const a=t.get("EXT_texture_filter_anisotropic");if(1015===o.type&&!1===t.has("OES_texture_float_linear"))return;if(!1===s&&1016===o.type&&!1===t.has("OES_texture_half_float_linear"))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function P(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",w),t.__webglTexture=e.createTexture(),a.memory.textures++)}function L(t,r,i){let a=3553;r.isDataTexture2DArray&&(a=35866),r.isDataTexture3D&&(a=32879),P(t,r),n.activeTexture(33984+i),n.bindTexture(a,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const l=function(e){return!s&&(1001!==e.wrapS||1001!==e.wrapT||1003!==e.minFilter&&1006!==e.minFilter)}(r)&&!1===v(r.image),c=g(r.image,l,!1,u),d=v(c)||s,h=o.convert(r.format);let f,p=o.convert(r.type),m=x(r.internalFormat,h,p);k(a,r,d);const _=r.mipmaps;if(r.isDepthTexture)m=6402,s?m=1015===r.type?36012:1014===r.type?33190:1020===r.type?35056:33189:1015===r.type&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),1026===r.format&&6402===m&&1012!==r.type&&1014!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=1012,p=o.convert(r.type)),1027===r.format&&6402===m&&(m=34041,1020!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=1020,p=o.convert(r.type))),n.texImage2D(3553,0,m,c.width,c.height,0,h,p,null);else if(r.isDataTexture)if(_.length>0&&d){for(let e=0,t=_.length;e<t;e++)f=_[e],n.texImage2D(3553,e,m,f.width,f.height,0,h,p,f.data);r.generateMipmaps=!1,t.__maxMipLevel=_.length-1}else n.texImage2D(3553,0,m,c.width,c.height,0,h,p,c.data),t.__maxMipLevel=0;else if(r.isCompressedTexture){for(let e=0,t=_.length;e<t;e++)f=_[e],1023!==r.format&&1022!==r.format?null!==h?n.compressedTexImage2D(3553,e,m,f.width,f.height,0,f.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,e,m,f.width,f.height,0,h,p,f.data);t.__maxMipLevel=_.length-1}else if(r.isDataTexture2DArray)n.texImage3D(35866,0,m,c.width,c.height,c.depth,0,h,p,c.data),t.__maxMipLevel=0;else if(r.isDataTexture3D)n.texImage3D(32879,0,m,c.width,c.height,c.depth,0,h,p,c.data),t.__maxMipLevel=0;else if(_.length>0&&d){for(let e=0,t=_.length;e<t;e++)f=_[e],n.texImage2D(3553,e,m,h,p,f);r.generateMipmaps=!1,t.__maxMipLevel=_.length-1}else n.texImage2D(3553,0,m,h,p,c),t.__maxMipLevel=0;y(r,d)&&b(a,r,c.width,c.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}function R(t,i,a,s,l){const c=o.convert(a.format),u=o.convert(a.type),d=x(a.internalFormat,c,u);32879===l||35866===l?n.texImage3D(l,0,d,i.width,i.height,i.depth,0,c,u,null):n.texImage2D(l,0,d,i.width,i.height,0,c,u,null),n.bindFramebuffer(36160,t),e.framebufferTexture2D(36160,s,l,r.get(a).__webglTexture,0),n.bindFramebuffer(36160,null)}function O(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){let i=33189;if(r){const t=n.depthTexture;t&&t.isDepthTexture&&(1015===t.type?i=36012:1014===t.type&&(i=33190));const r=I(n);e.renderbufferStorageMultisample(36161,r,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){if(r){const t=I(n);e.renderbufferStorageMultisample(36161,t,35056,n.width,n.height)}else e.renderbufferStorage(36161,34041,n.width,n.height);e.framebufferRenderbuffer(36160,33306,36161,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture[0]:n.texture,i=o.convert(t.format),a=o.convert(t.type),s=x(t.internalFormat,i,a);if(r){const t=I(n);e.renderbufferStorageMultisample(36161,t,s,n.width,n.height)}else e.renderbufferStorage(36161,s,n.width,n.height)}e.bindRenderbuffer(36161,null)}function D(t){const i=r.get(t),o=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture){if(o)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),E(i.depthTexture,0);const o=r.get(i.depthTexture).__webglTexture;if(1026===i.depthTexture.format)e.framebufferTexture2D(36160,36096,3553,o,0);else{if(1027!==i.depthTexture.format)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(36160,33306,3553,o,0)}}(i.__webglFramebuffer,t)}else if(o){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(36160,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),O(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),O(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}function I(e){return s&&e.isWebGLMultisampleRenderTarget?Math.min(d,e.samples):0}let z=!1,N=!1;this.allocateTextureUnit=function(){const e=M;return e>=l&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l),M+=1,e},this.resetTextureUnits=function(){M=0},this.setTexture2D=E,this.setTexture2DArray=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?L(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?L(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=T,this.setupRenderTarget=function(t){const l=t.texture,c=r.get(t),u=r.get(l);t.addEventListener("dispose",S),!0!==t.isWebGLMultipleRenderTargets&&(u.__webglTexture=e.createTexture(),u.__version=l.version,a.memory.textures++);const d=!0===t.isWebGLCubeRenderTarget,h=!0===t.isWebGLMultipleRenderTargets,f=!0===t.isWebGLMultisampleRenderTarget,p=l.isDataTexture3D||l.isDataTexture2DArray,m=v(t)||s;if(!s||1022!==l.format||1015!==l.type&&1016!==l.type||(l.format=1023,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),d){c.__webglFramebuffer=[];for(let t=0;t<6;t++)c.__webglFramebuffer[t]=e.createFramebuffer()}else if(c.__webglFramebuffer=e.createFramebuffer(),h)if(i.drawBuffers){const n=t.texture;for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);void 0===i.__webglTexture&&(i.__webglTexture=e.createTexture(),a.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(f)if(s){c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,c.__webglColorRenderbuffer);const r=o.convert(l.format),i=o.convert(l.type),a=x(l.internalFormat,r,i),s=I(t);e.renderbufferStorageMultisample(36161,s,a,t.width,t.height),n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,c.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(c.__webglDepthRenderbuffer=e.createRenderbuffer(),O(c.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(d){n.bindTexture(34067,u.__webglTexture),k(34067,l,m);for(let e=0;e<6;e++)R(c.__webglFramebuffer[e],t,l,36064,34069+e);y(l,m)&&b(34067,l,t.width,t.height),n.bindTexture(34067,null)}else if(h){const e=t.texture;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=r.get(o);n.bindTexture(3553,a.__webglTexture),k(3553,o,m),R(c.__webglFramebuffer,t,o,36064+i,3553),y(o,m)&&b(3553,o,t.width,t.height)}n.bindTexture(3553,null)}else{let e=3553;if(p)if(s){e=l.isDataTexture3D?32879:35866}else console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.");n.bindTexture(e,u.__webglTexture),k(e,l,m),R(c.__webglFramebuffer,t,l,36064,e),y(l,m)&&b(3553,l,t.width,t.height),n.bindTexture(3553,null)}t.depthBuffer&&D(t)},this.updateRenderTargetMipmap=function(e){const t=v(e)||s,i=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture];for(let o=0,a=i.length;o<a;o++){const a=i[o];if(y(a,t)){const t=e.isWebGLCubeRenderTarget?34067:3553,i=r.get(a).__webglTexture;n.bindTexture(t,i),b(t,a,e.width,e.height),n.bindTexture(t,null)}}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(s){const i=t.width,o=t.height;let a=16384;t.depthBuffer&&(a|=256),t.stencilBuffer&&(a|=1024);const s=r.get(t);n.bindFramebuffer(36008,s.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,s.__webglFramebuffer),e.blitFramebuffer(0,0,i,o,0,0,i,o,a,9728),n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,s.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(e,t){e&&e.isWebGLRenderTarget&&(!1===z&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),z=!0),e=e.texture),E(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===N&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),N=!0),e=e.texture),T(e,t)}}function CI(e,t,n){const r=n.isWebGL2;return{convert:function(e){let n;if(1009===e)return 5121;if(1017===e)return 32819;if(1018===e)return 32820;if(1019===e)return 33635;if(1010===e)return 5120;if(1011===e)return 5122;if(1012===e)return 5123;if(1013===e)return 5124;if(1014===e)return 5125;if(1015===e)return 5126;if(1016===e)return r?5131:(n=t.get("OES_texture_half_float"),null!==n?n.HALF_FLOAT_OES:null);if(1021===e)return 6406;if(1022===e)return 6407;if(1023===e)return 6408;if(1024===e)return 6409;if(1025===e)return 6410;if(1026===e)return 6402;if(1027===e)return 34041;if(1028===e)return 6403;if(1029===e)return 36244;if(1030===e)return 33319;if(1031===e)return 33320;if(1032===e)return 36248;if(1033===e)return 36249;if(33776===e||33777===e||33778===e||33779===e){if(n=t.get("WEBGL_compressed_texture_s3tc"),null===n)return null;if(33776===e)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===e)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===e)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===e)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===e||35841===e||35842===e||35843===e){if(n=t.get("WEBGL_compressed_texture_pvrtc"),null===n)return null;if(35840===e)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===e)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===e)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===e)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===e)return n=t.get("WEBGL_compressed_texture_etc1"),null!==n?n.COMPRESSED_RGB_ETC1_WEBGL:null;if((37492===e||37496===e)&&(n=t.get("WEBGL_compressed_texture_etc"),null!==n)){if(37492===e)return n.COMPRESSED_RGB8_ETC2;if(37496===e)return n.COMPRESSED_RGBA8_ETC2_EAC}return 37808===e||37809===e||37810===e||37811===e||37812===e||37813===e||37814===e||37815===e||37816===e||37817===e||37818===e||37819===e||37820===e||37821===e||37840===e||37841===e||37842===e||37843===e||37844===e||37845===e||37846===e||37847===e||37848===e||37849===e||37850===e||37851===e||37852===e||37853===e?(n=t.get("WEBGL_compressed_texture_astc"),null!==n?e:null):36492===e?(n=t.get("EXT_texture_compression_bptc"),null!==n?e:null):1020===e?r?34042:(n=t.get("WEBGL_depth_texture"),null!==n?n.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}class kI extends pO{constructor(e=[]){super(),this.cameras=e}}kI.prototype.isArrayCamera=!0;class PI extends XL{constructor(){super(),this.type="Group"}}PI.prototype.isGroup=!0;const LI={type:"move"};class RI{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new PI,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new PI,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new GP,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new GP),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new PI,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new GP,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new GP),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,o=null;const a=this._targetRay,s=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(null!==a&&(r=t.getPose(e.targetRaySpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(LI))),l&&e.hand){o=!0;for(const o of e.hand.values()){const e=t.getJointPose(o,n);if(void 0===l.joints[o.jointName]){const e=new PI;e.matrixAutoUpdate=!1,e.visible=!1,l.joints[o.jointName]=e,l.add(e)}const r=l.joints[o.jointName];null!==e&&(r.matrix.fromArray(e.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.jointRadius=e.radius),r.visible=null!==e}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],a=r.position.distanceTo(i.position),s=.02,c=.005;l.inputState.pinching&&a>s+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&a<=s-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==s&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));return null!==a&&(a.visible=null!==r),null!==s&&(s.visible=null!==i),null!==l&&(l.visible=null!==o),this}}class OI extends xP{constructor(e,t){super();const n=this,r=e.state;let i=null,o=1,a=null,s="local-floor",l=null;const c=[],u=new Map,d=new pO;d.layers.enable(1),d.viewport=new HP;const h=new pO;h.layers.enable(2),h.viewport=new HP;const f=[d,h],p=new kI;p.layers.enable(1),p.layers.enable(2);let m=null,g=null;function v(e){const t=u.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function y(){u.forEach((function(e,t){e.disconnect(t)})),u.clear(),m=null,g=null,r.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),M.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function b(e){const t=i.inputSources;for(let n=0;n<c.length;n++)u.set(t[n],c[n]);for(let n=0;n<e.removed.length;n++){const t=e.removed[n],r=u.get(t);r&&(r.dispatchEvent({type:"disconnected",data:t}),u.delete(t))}for(let n=0;n<e.added.length;n++){const t=e.added[n],r=u.get(t);r&&r.dispatchEvent({type:"connected",data:t})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=c[e];return void 0===t&&(t=new RI,c[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=c[e];return void 0===t&&(t=new RI,c[e]=t),t.getGripSpace()},this.getHand=function(e){let t=c[e];return void 0===t&&(t=new RI,c[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){o=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getSession=function(){return i},this.setSession=function(e){return r=this,l=null,c=function*(){if(i=e,null!==i){i.addEventListener("select",v),i.addEventListener("selectstart",v),i.addEventListener("selectend",v),i.addEventListener("squeeze",v),i.addEventListener("squeezestart",v),i.addEventListener("squeezeend",v),i.addEventListener("end",y),i.addEventListener("inputsourceschange",b);const e=t.getContextAttributes();!0!==e.xrCompatible&&(yield t.makeXRCompatible());const r={antialias:e.antialias,alpha:e.alpha,depth:e.depth,stencil:e.stencil,framebufferScaleFactor:o},l=new XRWebGLLayer(i,t,r);i.updateRenderState({baseLayer:l}),a=yield i.requestReferenceSpace(s),M.setContext(i),M.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},new Promise(((e,t)=>{var n=e=>{try{o(c.next(e))}catch(n){t(n)}},i=e=>{try{o(c.throw(e))}catch(n){t(n)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,i);o((c=c.apply(r,l)).next())}));var r,l,c};const x=new GP,_=new GP;function w(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===i)return;p.near=h.near=d.near=e.near,p.far=h.far=d.far=e.far,m===p.near&&g===p.far||(i.updateRenderState({depthNear:p.near,depthFar:p.far}),m=p.near,g=p.far);const t=e.parent,n=p.cameras;w(p,t);for(let i=0;i<n.length;i++)w(n[i],t);e.matrixWorld.copy(p.matrixWorld),e.matrix.copy(p.matrix),e.matrix.decompose(e.position,e.quaternion,e.scale);const r=e.children;for(let i=0,o=r.length;i<o;i++)r[i].updateMatrixWorld(!0);2===n.length?function(e,t,n){x.setFromMatrixPosition(t.matrixWorld),_.setFromMatrixPosition(n.matrixWorld);const r=x.distanceTo(_),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],d=(o[8]+1)/o[0],h=a*u,f=a*d,p=r/(-u+d),m=p*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const g=a+p,v=s+p,y=h-m,b=f+(r-m),w=l*s/v*g,S=c*s/v*g;e.projectionMatrix.makePerspective(y,b,w,S,g,v)}(p,d,h):p.projectionMatrix.copy(d.projectionMatrix)},this.getCamera=function(){return p};let S=null;const M=new _O;M.setAnimationLoop((function(e,t){if(l=t.getViewerPose(a),null!==l){const e=l.views,t=i.renderState.baseLayer;r.bindXRFramebuffer(t.framebuffer);let n=!1;e.length!==p.cameras.length&&(p.cameras.length=0,n=!0);for(let r=0;r<e.length;r++){const i=e[r],o=t.getViewport(i),a=f[r];a.matrix.fromArray(i.transform.matrix),a.projectionMatrix.fromArray(i.projectionMatrix),a.viewport.set(o.x,o.y,o.width,o.height),0===r&&p.matrix.copy(a.matrix),!0===n&&p.cameras.push(a)}}const n=i.inputSources;for(let r=0;r<c.length;r++){const e=c[r],i=n[r];e.update(i,t,a)}S&&S(e,t)})),this.setAnimationLoop=function(e){S=e},this.dispose=function(){}}}function DI(e){function t(t,n){t.opacity.value=n.opacity,n.color&&t.diffuse.value.copy(n.color),n.emissive&&t.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(t.map.value=n.map),n.alphaMap&&(t.alphaMap.value=n.alphaMap),n.specularMap&&(t.specularMap.value=n.specularMap);const r=e.get(n).envMap;if(r){t.envMap.value=r,t.flipEnvMap.value=r.isCubeTexture&&r._needsFlipEnvMap?-1:1,t.reflectivity.value=n.reflectivity,t.refractionRatio.value=n.refractionRatio;const i=e.get(r).__maxMipLevel;void 0!==i&&(t.maxMipLevel.value=i)}let i,o;n.lightMap&&(t.lightMap.value=n.lightMap,t.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(t.aoMap.value=n.aoMap,t.aoMapIntensity.value=n.aoMapIntensity),n.map?i=n.map:n.specularMap?i=n.specularMap:n.displacementMap?i=n.displacementMap:n.normalMap?i=n.normalMap:n.bumpMap?i=n.bumpMap:n.roughnessMap?i=n.roughnessMap:n.metalnessMap?i=n.metalnessMap:n.alphaMap?i=n.alphaMap:n.emissiveMap?i=n.emissiveMap:n.clearcoatMap?i=n.clearcoatMap:n.clearcoatNormalMap?i=n.clearcoatNormalMap:n.clearcoatRoughnessMap&&(i=n.clearcoatRoughnessMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix)),n.aoMap?o=n.aoMap:n.lightMap&&(o=n.lightMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),t.uv2Transform.value.copy(o.matrix))}function n(t,n){t.roughness.value=n.roughness,t.metalness.value=n.metalness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(t.emissiveMap.value=n.emissiveMap),n.bumpMap&&(t.bumpMap.value=n.bumpMap,t.bumpScale.value=n.bumpScale,1===n.side&&(t.bumpScale.value*=-1)),n.normalMap&&(t.normalMap.value=n.normalMap,t.normalScale.value.copy(n.normalScale),1===n.side&&t.normalScale.value.negate()),n.displacementMap&&(t.displacementMap.value=n.displacementMap,t.displacementScale.value=n.displacementScale,t.displacementBias.value=n.displacementBias);e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,o,a){r.isMeshBasicMaterial?t(e,r):r.isMeshLambertMaterial?(t(e,r),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(e,r)):r.isMeshToonMaterial?(t(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap);t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshPhongMaterial?(t(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshStandardMaterial?(t(e,r),r.isMeshPhysicalMaterial?function(e,t,r){n(e,t),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen);t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap);t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap);t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,1===t.side&&e.clearcoatNormalScale.value.negate());e.transmission.value=t.transmission,t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap);t.transmission>0&&(e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height));e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap);e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)}(e,r,a):n(e,r)):r.isMeshMatcapMaterial?(t(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDepthMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDistanceMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias);e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?(t(e,r),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);let i;t.map?i=t.map:t.alphaMap&&(i=t.alphaMap);void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,o):r.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);let n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function II(e){const t=void 0!==(e=e||{}).canvas?e.canvas:function(){const e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return e.style.display="block",e}(),n=void 0!==e.context?e.context:null,r=void 0!==e.alpha&&e.alpha,i=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,a=void 0!==e.antialias&&e.antialias,s=void 0===e.premultipliedAlpha||e.premultipliedAlpha,l=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,c=void 0!==e.powerPreference?e.powerPreference:"default",u=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let d=null,h=null;const f=[],p=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=3e3,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1;const m=this;let g=!1,v=0,y=0,b=null,x=-1,_=null;const w=new HP,S=new HP;let M=null,E=t.width,T=t.height,A=1,C=null,k=null;const P=new HP(0,0,E,T),L=new HP(0,0,E,T);let R=!1;const O=[],D=new xO;let I=!1,z=!1,N=null;const B=new wL,F=new GP,H={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function U(){return null===b?A:1}let j,V,W,G,q,X,Y,$,Z,J,Q,K,ee,te,ne,re,ie,oe,ae,se,le,ce,ue=n;function de(e,n){for(let r=0;r<e.length;r++){const i=e[r],o=t.getContext(i,n);if(null!==o)return o}return null}try{const e={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:u};if(t.addEventListener("webglcontextlost",pe,!1),t.addEventListener("webglcontextrestored",me,!1),null===ue){const t=["webgl2","webgl","experimental-webgl"];if(!0===m.isWebGL1Renderer&&t.shift(),ue=de(t,e),null===ue)throw de(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ue.getShaderPrecisionFormat&&(ue.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Ae){throw console.error("THREE.WebGLRenderer: "+Ae.message),Ae}function he(){j=new OO(ue),V=new PO(ue,j,e),j.init(V),le=new CI(ue,j,V),W=new TI(ue,j,V),O[0]=1029,G=new zO(ue),q=new hI,X=new AI(ue,j,W,q,V,le,G),Y=new RO(m),$=new wO(ue,V),ce=new CO(ue,j,$,V),Z=new DO(ue,$,G,ce),J=new HO(ue,Z,$,G),oe=new FO(ue),ne=new LO(q),Q=new dI(m,Y,j,V,ce,ne),K=new DI(q),ee=new gI(q),te=new wI(j,V),ie=new AO(m,Y,W,J,s),re=new EI(m,J,V),ae=new kO(ue,j,G,V),se=new IO(ue,j,G,V),G.programs=Q.programs,m.capabilities=V,m.extensions=j,m.properties=q,m.renderLists=ee,m.shadowMap=re,m.state=W,m.info=G}he();const fe=new OI(m,ue);function pe(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),g=!0}function me(){console.log("THREE.WebGLRenderer: Context Restored."),g=!1;const e=G.autoReset,t=re.enabled,n=re.autoUpdate,r=re.needsUpdate,i=re.type;he(),G.autoReset=e,re.enabled=t,re.autoUpdate=n,re.needsUpdate=r,re.type=i}function ge(e){const t=e.target;t.removeEventListener("dispose",ge),function(e){(function(e){const t=q.get(e).programs;void 0!==t&&t.forEach((function(e){Q.releaseProgram(e)}))})(e),q.remove(e)}(t)}this.xr=fe,this.getContext=function(){return ue},this.getContextAttributes=function(){return ue.getContextAttributes()},this.forceContextLoss=function(){const e=j.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=j.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return A},this.setPixelRatio=function(e){void 0!==e&&(A=e,this.setSize(E,T,!1))},this.getSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),e=new OP),e.set(E,T)},this.setSize=function(e,n,r){fe.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(E=e,T=n,t.width=Math.floor(e*A),t.height=Math.floor(n*A),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),e=new OP),e.set(E*A,T*A).floor()},this.setDrawingBufferSize=function(e,n,r){E=e,T=n,A=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),e=new HP),e.copy(w)},this.getViewport=function(e){return e.copy(P)},this.setViewport=function(e,t,n,r){e.isVector4?P.set(e.x,e.y,e.z,e.w):P.set(e,t,n,r),W.viewport(w.copy(P).multiplyScalar(A).floor())},this.getScissor=function(e){return e.copy(L)},this.setScissor=function(e,t,n,r){e.isVector4?L.set(e.x,e.y,e.z,e.w):L.set(e,t,n,r),W.scissor(S.copy(L).multiplyScalar(A).floor())},this.getScissorTest=function(){return R},this.setScissorTest=function(e){W.setScissorTest(R=e)},this.setOpaqueSort=function(e){C=e},this.setTransparentSort=function(e){k=e},this.getClearColor=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getClearColor() now requires a Color as an argument"),e=new vR),e.copy(ie.getClearColor())},this.setClearColor=function(){ie.setClearColor.apply(ie,arguments)},this.getClearAlpha=function(){return ie.getClearAlpha()},this.setClearAlpha=function(){ie.setClearAlpha.apply(ie,arguments)},this.clear=function(e,t,n){let r=0;(void 0===e||e)&&(r|=16384),(void 0===t||t)&&(r|=256),(void 0===n||n)&&(r|=1024),ue.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",pe,!1),t.removeEventListener("webglcontextrestored",me,!1),ee.dispose(),te.dispose(),q.dispose(),Y.dispose(),J.dispose(),ce.dispose(),fe.dispose(),fe.removeEventListener("sessionstart",ye),fe.removeEventListener("sessionend",be),N&&(N.dispose(),N=null),xe.stop()},this.renderBufferImmediate=function(e,t){ce.initAttributes();const n=q.get(e);e.hasPositions&&!n.position&&(n.position=ue.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=ue.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=ue.createBuffer()),e.hasColors&&!n.color&&(n.color=ue.createBuffer());const r=t.getAttributes();e.hasPositions&&(ue.bindBuffer(34962,n.position),ue.bufferData(34962,e.positionArray,35048),ce.enableAttribute(r.position),ue.vertexAttribPointer(r.position,3,5126,!1,0,0)),e.hasNormals&&(ue.bindBuffer(34962,n.normal),ue.bufferData(34962,e.normalArray,35048),ce.enableAttribute(r.normal),ue.vertexAttribPointer(r.normal,3,5126,!1,0,0)),e.hasUvs&&(ue.bindBuffer(34962,n.uv),ue.bufferData(34962,e.uvArray,35048),ce.enableAttribute(r.uv),ue.vertexAttribPointer(r.uv,2,5126,!1,0,0)),e.hasColors&&(ue.bindBuffer(34962,n.color),ue.bufferData(34962,e.colorArray,35048),ce.enableAttribute(r.color),ue.vertexAttribPointer(r.color,3,5126,!1,0,0)),ce.disableUnusedAttributes(),ue.drawArrays(4,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,n,r,i,o){null===t&&(t=H);const a=i.isMesh&&i.matrixWorld.determinant()<0,s=Te(e,t,r,i);W.setMaterial(r,a);let l=n.index;const c=n.attributes.position;if(null===l){if(void 0===c||0===c.count)return}else if(0===l.count)return;let u,d=1;!0===r.wireframe&&(l=Z.getWireframeAttribute(n),d=2),(r.morphTargets||r.morphNormals)&&oe.update(i,n,r,s),ce.setup(i,r,s,n,l);let h=ae;null!==l&&(u=$.get(l),h=se,h.setIndex(u));const f=null!==l?l.count:c.count,p=n.drawRange.start*d,m=n.drawRange.count*d,g=null!==o?o.start*d:0,v=null!==o?o.count*d:1/0,y=Math.max(p,g),b=Math.min(f,p+m,g+v)-1,x=Math.max(0,b-y+1);if(0!==x){if(i.isMesh)!0===r.wireframe?(W.setLineWidth(r.wireframeLinewidth*U()),h.setMode(1)):h.setMode(4);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),W.setLineWidth(e*U()),i.isLineSegments?h.setMode(1):i.isLineLoop?h.setMode(2):h.setMode(3)}else i.isPoints?h.setMode(0):i.isSprite&&h.setMode(4);if(i.isInstancedMesh)h.renderInstances(y,x,i.count);else if(n.isInstancedBufferGeometry){const e=Math.min(n.instanceCount,n._maxInstanceCount);h.renderInstances(y,x,e)}else h.render(y,x)}},this.compile=function(e,t){h=te.get(e),h.init(),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(h.pushLight(e),e.castShadow&&h.pushShadow(e))})),h.setupLights(),e.traverse((function(t){const n=t.material;if(n)if(Array.isArray(n))for(let r=0;r<n.length;r++){Me(n[r],e,t)}else Me(n,e,t)}))};let ve=null;function ye(){xe.stop()}function be(){xe.start()}const xe=new _O;function _e(e,t,n,r){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||D.intersectsSprite(e)){r&&F.setFromMatrixPosition(e.matrixWorld).applyMatrix4(B);const t=J.update(e),i=e.material;i.visible&&d.push(e,t,i,n,F.z,null)}}else if(e.isImmediateRenderObject)r&&F.setFromMatrixPosition(e.matrixWorld).applyMatrix4(B),d.push(e,null,e.material,n,F.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==G.render.frame&&(e.skeleton.update(),e.skeleton.frame=G.render.frame),!e.frustumCulled||D.intersectsObject(e))){r&&F.setFromMatrixPosition(e.matrixWorld).applyMatrix4(B);const t=J.update(e),i=e.material;if(Array.isArray(i)){const r=t.groups;for(let o=0,a=r.length;o<a;o++){const a=r[o],s=i[a.materialIndex];s&&s.visible&&d.push(e,t,s,n,F.z,a)}}else i.visible&&d.push(e,t,i,n,F.z,null)}const i=e.children;for(let o=0,a=i.length;o<a;o++)_e(i[o],t,n,r)}function we(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=o.object,s=o.geometry,l=null===r?o.material:r,c=o.group;if(n.isArrayCamera){const e=n.cameras;for(let n=0,r=e.length;n<r;n++){const r=e[n];a.layers.test(r.layers)&&(W.viewport(w.copy(r.viewport)),h.setupLightsView(r),Se(a,t,r,s,l,c))}}else Se(a,t,n,s,l,c)}}function Se(e,t,n,r,i,o){if(e.onBeforeRender(m,t,n,r,i,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){const r=Te(n,t,i,e);W.setMaterial(i),ce.reset(),function(e,t){e.render((function(e){m.renderBufferImmediate(e,t)}))}(e,r)}else m.renderBufferDirect(n,t,r,i,e,o);e.onAfterRender(m,t,n,r,i,o)}function Me(e,t,n){!0!==t.isScene&&(t=H);const r=q.get(e),i=h.state.lights,o=h.state.shadowsArray,a=i.state.version,s=Q.getParameters(e,i.state,o,t,n),l=Q.getProgramCacheKey(s);let c=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=Y.get(e.envMap||r.environment),void 0===c&&(e.addEventListener("dispose",ge),c=new Map,r.programs=c);let u=c.get(l);if(void 0!==u){if(r.currentProgram===u&&r.lightsStateVersion===a)return Ee(e,s),u}else s.uniforms=Q.getUniforms(e),e.onBuild(s,m),e.onBeforeCompile(s,m),u=Q.acquireProgram(s,l),c.set(l,u),r.uniforms=s.uniforms;const d=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(d.clippingPlanes=ne.uniform),Ee(e,s),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=a,r.needsLights&&(d.ambientLightColor.value=i.state.ambient,d.lightProbe.value=i.state.probe,d.directionalLights.value=i.state.directional,d.directionalLightShadows.value=i.state.directionalShadow,d.spotLights.value=i.state.spot,d.spotLightShadows.value=i.state.spotShadow,d.rectAreaLights.value=i.state.rectArea,d.ltc_1.value=i.state.rectAreaLTC1,d.ltc_2.value=i.state.rectAreaLTC2,d.pointLights.value=i.state.point,d.pointLightShadows.value=i.state.pointShadow,d.hemisphereLights.value=i.state.hemi,d.directionalShadowMap.value=i.state.directionalShadowMap,d.directionalShadowMatrix.value=i.state.directionalShadowMatrix,d.spotShadowMap.value=i.state.spotShadowMap,d.spotShadowMatrix.value=i.state.spotShadowMatrix,d.pointShadowMap.value=i.state.pointShadowMap,d.pointShadowMatrix.value=i.state.pointShadowMatrix);const f=u.getUniforms(),p=WD.seqWithValue(f.seq,d);return r.currentProgram=u,r.uniformsList=p,u}function Ee(e,t){const n=q.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas}function Te(e,t,n,r){!0!==t.isScene&&(t=H),X.resetTextureUnits();const i=t.fog,o=n.isMeshStandardMaterial?t.environment:null,a=null===b?m.outputEncoding:b.texture.encoding,s=Y.get(n.envMap||o),l=!0===n.vertexColors&&r.geometry&&r.geometry.attributes.color&&4===r.geometry.attributes.color.itemSize,c=q.get(n),u=h.state.lights;if(!0===I&&(!0===z||e!==_)){const t=e===_&&n.id===x;ne.setState(n,e,t)}let d=!1;n.version===c.__version?c.needsLights&&c.lightsStateVersion!==u.state.version||c.outputEncoding!==a||r.isInstancedMesh&&!1===c.instancing?d=!0:r.isInstancedMesh||!0!==c.instancing?r.isSkinnedMesh&&!1===c.skinning?d=!0:r.isSkinnedMesh||!0!==c.skinning?c.envMap!==s||n.fog&&c.fog!==i?d=!0:void 0===c.numClippingPlanes||c.numClippingPlanes===ne.numPlanes&&c.numIntersection===ne.numIntersection?c.vertexAlphas!==l&&(d=!0):d=!0:d=!0:d=!0:(d=!0,c.__version=n.version);let f=c.currentProgram;!0===d&&(f=Me(n,t,r));let p=!1,g=!1,v=!1;const y=f.getUniforms(),w=c.uniforms;if(W.useProgram(f.program)&&(p=!0,g=!0,v=!0),n.id!==x&&(x=n.id,g=!0),p||_!==e){if(y.setValue(ue,"projectionMatrix",e.projectionMatrix),V.logarithmicDepthBuffer&&y.setValue(ue,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),_!==e&&(_=e,g=!0,v=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){const t=y.map.cameraPosition;void 0!==t&&t.setValue(ue,F.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&y.setValue(ue,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||r.isSkinnedMesh)&&y.setValue(ue,"viewMatrix",e.matrixWorldInverse)}if(r.isSkinnedMesh){y.setOptional(ue,r,"bindMatrix"),y.setOptional(ue,r,"bindMatrixInverse");const e=r.skeleton;e&&(V.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),y.setValue(ue,"boneTexture",e.boneTexture,X),y.setValue(ue,"boneTextureSize",e.boneTextureSize)):y.setOptional(ue,e,"boneMatrices"))}var S,M;return(g||c.receiveShadow!==r.receiveShadow)&&(c.receiveShadow=r.receiveShadow,y.setValue(ue,"receiveShadow",r.receiveShadow)),g&&(y.setValue(ue,"toneMappingExposure",m.toneMappingExposure),c.needsLights&&(M=v,(S=w).ambientLightColor.needsUpdate=M,S.lightProbe.needsUpdate=M,S.directionalLights.needsUpdate=M,S.directionalLightShadows.needsUpdate=M,S.pointLights.needsUpdate=M,S.pointLightShadows.needsUpdate=M,S.spotLights.needsUpdate=M,S.spotLightShadows.needsUpdate=M,S.rectAreaLights.needsUpdate=M,S.hemisphereLights.needsUpdate=M),i&&n.fog&&K.refreshFogUniforms(w,i),K.refreshMaterialUniforms(w,n,A,T,N),WD.upload(ue,c.uniformsList,w,X)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(WD.upload(ue,c.uniformsList,w,X),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&y.setValue(ue,"center",r.center),y.setValue(ue,"modelViewMatrix",r.modelViewMatrix),y.setValue(ue,"normalMatrix",r.normalMatrix),y.setValue(ue,"modelMatrix",r.matrixWorld),f}xe.setAnimationLoop((function(e){ve&&ve(e)})),"undefined"!=typeof window&&xe.setContext(window),this.setAnimationLoop=function(e){ve=e,fe.setAnimationLoop(e),null===e?xe.stop():xe.start()},fe.addEventListener("sessionstart",ye),fe.addEventListener("sessionend",be),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===g)return;!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===fe.enabled&&!0===fe.isPresenting&&(!0===fe.cameraAutoUpdate&&fe.updateCamera(t),t=fe.getCamera()),!0===e.isScene&&e.onBeforeRender(m,e,t,b),h=te.get(e,p.length),h.init(),p.push(h),B.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),D.setFromProjectionMatrix(B),z=this.localClippingEnabled,I=ne.init(this.clippingPlanes,z,t),d=ee.get(e,f.length),d.init(),f.push(d),_e(e,t,0,m.sortObjects),d.finish(),!0===m.sortObjects&&d.sort(C,k),!0===I&&ne.beginShadows();const n=h.state.shadowsArray;re.render(n,e,t),h.setupLights(),h.setupLightsView(t),!0===I&&ne.endShadows(),!0===this.info.autoReset&&this.info.reset(),ie.render(d,e);const r=d.opaque,i=d.transmissive,o=d.transparent;r.length>0&&we(r,e,t),i.length>0&&function(e,t,n,r){null===N&&(N=new UP(1024,1024,{generateMipmaps:!0,minFilter:1008,magFilter:1003,wrapS:1001,wrapT:1001}));const i=m.getRenderTarget();m.setRenderTarget(N),m.clear(),we(e,n,r),X.updateRenderTargetMipmap(N),m.setRenderTarget(i),we(t,n,r)}(r,i,e,t),o.length>0&&we(o,e,t),null!==b&&(X.updateRenderTargetMipmap(b),X.updateMultisampleRenderTarget(b)),!0===e.isScene&&e.onAfterRender(m,e,t),W.buffers.depth.setTest(!0),W.buffers.depth.setMask(!0),W.buffers.color.setMask(!0),W.setPolygonOffset(!1),ce.resetDefaultState(),x=-1,_=null,p.pop(),h=p.length>0?p[p.length-1]:null,f.pop(),d=f.length>0?f[f.length-1]:null},this.getActiveCubeFace=function(){return v},this.getActiveMipmapLevel=function(){return y},this.getRenderTarget=function(){return b},this.setRenderTarget=function(e,t=0,n=0){b=e,v=t,y=n,e&&void 0===q.get(e).__webglFramebuffer&&X.setupRenderTarget(e);let r=null,i=!1,o=!1;if(e){const n=e.texture;(n.isDataTexture3D||n.isDataTexture2DArray)&&(o=!0);const a=q.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=a[t],i=!0):r=e.isWebGLMultisampleRenderTarget?q.get(e).__webglMultisampledFramebuffer:a,w.copy(e.viewport),S.copy(e.scissor),M=e.scissorTest}else w.copy(P).multiplyScalar(A).floor(),S.copy(L).multiplyScalar(A).floor(),M=R;if(W.bindFramebuffer(36160,r)&&V.drawBuffers){let t=!1;if(e)if(e.isWebGLMultipleRenderTargets){const n=e.texture;if(O.length!==n.length||36064!==O[0]){for(let e=0,t=n.length;e<t;e++)O[e]=36064+e;O.length=n.length,t=!0}}else 1===O.length&&36064===O[0]||(O[0]=36064,O.length=1,t=!0);else 1===O.length&&1029===O[0]||(O[0]=1029,O.length=1,t=!0);t&&(V.isWebGL2?ue.drawBuffers(O):j.get("WEBGL_draw_buffers").drawBuffersWEBGL(O))}if(W.viewport(w),W.scissor(S),W.setScissorTest(M),i){const r=q.get(e.texture);ue.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,n)}else if(o){const r=q.get(e.texture),i=t||0;ue.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}},this.readRenderTargetPixels=function(e,t,n,r,i,o,a){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=q.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(s=s[a]),s){W.bindFramebuffer(36160,s);try{const a=e.texture,s=a.format,l=a.type;if(1023!==s&&le.convert(s)!==ue.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=1016===l&&(j.has("EXT_color_buffer_half_float")||V.isWebGL2&&j.has("EXT_color_buffer_float"));if(!(1009===l||le.convert(l)===ue.getParameter(35738)||1015===l&&(V.isWebGL2||j.has("OES_texture_float")||j.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===ue.checkFramebufferStatus(36160)?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ue.readPixels(t,n,r,i,le.convert(s),le.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const e=null!==b?q.get(b).__webglFramebuffer:null;W.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r);let a=le.convert(t.format);V.isWebGL2&&(6407===a&&(a=32849),6408===a&&(a=32856)),X.setTexture2D(t,0),ue.copyTexImage2D(3553,n,a,e.x,e.y,i,o,0),W.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,o=t.image.height,a=le.convert(n.format),s=le.convert(n.type);X.setTexture2D(n,0),ue.pixelStorei(37440,n.flipY),ue.pixelStorei(37441,n.premultiplyAlpha),ue.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ue.texSubImage2D(3553,r,e.x,e.y,i,o,a,s,t.image.data):t.isCompressedTexture?ue.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):ue.texSubImage2D(3553,r,e.x,e.y,a,s,t.image),0===r&&n.generateMipmaps&&ue.generateMipmap(3553),W.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(m.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const{width:o,height:a,data:s}=n.image,l=le.convert(r.format),c=le.convert(r.type);let u;if(r.isDataTexture3D)X.setTexture3D(r,0),u=32879;else{if(!r.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");X.setTexture2DArray(r,0),u=35866}ue.pixelStorei(37440,r.flipY),ue.pixelStorei(37441,r.premultiplyAlpha),ue.pixelStorei(3317,r.unpackAlignment);const d=ue.getParameter(3314),h=ue.getParameter(32878),f=ue.getParameter(3316),p=ue.getParameter(3315),g=ue.getParameter(32877);ue.pixelStorei(3314,o),ue.pixelStorei(32878,a),ue.pixelStorei(3316,e.min.x),ue.pixelStorei(3315,e.min.y),ue.pixelStorei(32877,e.min.z),ue.texSubImage3D(u,i,t.x,t.y,t.z,e.max.x-e.min.x+1,e.max.y-e.min.y+1,e.max.z-e.min.z+1,l,c,s),ue.pixelStorei(3314,d),ue.pixelStorei(32878,h),ue.pixelStorei(3316,f),ue.pixelStorei(3315,p),ue.pixelStorei(32877,g),0===i&&r.generateMipmaps&&ue.generateMipmap(u),W.unbindTexture()},this.initTexture=function(e){X.setTexture2D(e,0),W.unbindTexture()},this.resetState=function(){v=0,y=0,b=null,W.reset(),ce.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}class zI extends II{}zI.prototype.isWebGL1Renderer=!0;class NI{constructor(e,t=25e-5){this.name="",this.color=new vR(e),this.density=t}clone(){return new NI(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}NI.prototype.isFogExp2=!0;class BI{constructor(e,t=1,n=1e3){this.name="",this.color=new vR(e),this.near=t,this.far=n}clone(){return new BI(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}BI.prototype.isFog=!0;class FI extends XL{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.background&&(t.object.background=this.background.toJSON(e)),null!==this.environment&&(t.object.environment=this.environment.toJSON(e)),null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}FI.prototype.isScene=!0;class HI{constructor(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=EP()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=EP()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=EP()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}HI.prototype.isInterleavedBuffer=!0;const UI=new GP;class jI{constructor(e,t,n,r){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)UI.x=this.getX(t),UI.y=this.getY(t),UI.z=this.getZ(t),UI.applyMatrix4(e),this.setXYZ(t,UI.x,UI.y,UI.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)UI.x=this.getX(t),UI.y=this.getY(t),UI.z=this.getZ(t),UI.applyNormalMatrix(e),this.setXYZ(t,UI.x,UI.y,UI.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)UI.x=this.getX(t),UI.y=this.getY(t),UI.z=this.getZ(t),UI.transformDirection(e),this.setXYZ(t,UI.x,UI.y,UI.z);return this}setX(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){return this.data.array[e*this.data.stride+this.offset]}getY(e){return this.data.array[e*this.data.stride+this.offset+1]}getZ(e){return this.data.array[e*this.data.stride+this.offset+2]}getW(e){return this.data.array[e*this.data.stride+this.offset+3]}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new _R(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new jI(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}jI.prototype.isInterleavedBufferAttribute=!0;class VI extends uR{constructor(e){super(),this.type="SpriteMaterial",this.color=new vR(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this}}let WI;VI.prototype.isSpriteMaterial=!0;const GI=new GP,qI=new GP,XI=new GP,YI=new OP,$I=new OP,ZI=new wL,JI=new GP,QI=new GP,KI=new GP,ez=new OP,tz=new OP,nz=new OP;class rz extends XL{constructor(e){if(super(),this.type="Sprite",void 0===WI){WI=new jR;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new HI(e,5);WI.setIndex([0,1,2,0,2,3]),WI.setAttribute("position",new jI(t,3,0,!1)),WI.setAttribute("uv",new jI(t,2,3,!1))}this.geometry=WI,this.material=void 0!==e?e:new VI,this.center=new OP(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),qI.setFromMatrixScale(this.matrixWorld),ZI.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),XI.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&qI.multiplyScalar(-XI.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const o=this.center;iz(JI.set(-.5,-.5,0),XI,o,qI,r,i),iz(QI.set(.5,-.5,0),XI,o,qI,r,i),iz(KI.set(.5,.5,0),XI,o,qI,r,i),ez.set(0,0),tz.set(1,0),nz.set(1,1);let a=e.ray.intersectTriangle(JI,QI,KI,!1,GI);if(null===a&&(iz(QI.set(-.5,.5,0),XI,o,qI,r,i),tz.set(0,1),a=e.ray.intersectTriangle(JI,KI,QI,!1,GI),null===a))return;const s=e.ray.origin.distanceTo(GI);s<e.near||s>e.far||t.push({distance:s,point:GI.clone(),uv:lR.getUV(GI,JI,QI,KI,ez,tz,nz,new OP),face:null,object:this})}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function iz(e,t,n,r,i,o){YI.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?($I.x=o*YI.x-i*YI.y,$I.y=i*YI.x+o*YI.y):$I.copy(YI),e.copy(t),e.x+=$I.x,e.y+=$I.y,e.applyMatrix4(ZI)}rz.prototype.isSprite=!0;const oz=new GP,az=new GP;class sz extends XL{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,r=t.length;n<r;n++){const e=t[n];this.addLevel(e.object.clone(),e.distance)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0){t=Math.abs(t);const n=this.levels;let r;for(r=0;r<n.length&&!(t<n[r].distance);r++);return n.splice(r,0,{distance:t,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,r;for(n=1,r=t.length;n<r&&!(e<t[n].distance);n++);return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){oz.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(oz);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){oz.setFromMatrixPosition(e.matrixWorld),az.setFromMatrixPosition(this.matrixWorld);const n=oz.distanceTo(az)/e.zoom;let r,i;for(t[0].object.visible=!0,r=1,i=t.length;r<i&&n>=t[r].distance;r++)t[r-1].object.visible=!1,t[r].object.visible=!0;for(this._currentLevel=r-1;r<i;r++)t[r].object.visible=!1}}toJSON(e){const t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let r=0,i=n.length;r<i;r++){const e=n[r];t.object.levels.push({object:e.object.uuid,distance:e.distance})}return t}}const lz=new GP,cz=new HP,uz=new HP,dz=new GP,hz=new wL;class fz extends aO{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new wL,this.bindMatrixInverse=new wL}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new HP,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(e,t){const n=this.skeleton,r=this.geometry;cz.fromBufferAttribute(r.attributes.skinIndex,e),uz.fromBufferAttribute(r.attributes.skinWeight,e),lz.fromBufferAttribute(r.attributes.position,e).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let i=0;i<4;i++){const e=uz.getComponent(i);if(0!==e){const r=cz.getComponent(i);hz.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),t.addScaledVector(dz.copy(lz).applyMatrix4(hz),e)}}return t.applyMatrix4(this.bindMatrixInverse)}}fz.prototype.isSkinnedMesh=!0;class pz extends XL{constructor(){super(),this.type="Bone"}}pz.prototype.isBone=!0;class mz extends BP{constructor(e,t,n,r,i,o,a,s,l,c,u,d){super(null,o,a,s,l,c,r,i,u,d),this.image={data:e||null,width:t||1,height:n||1},this.magFilter=void 0!==l?l:1003,this.minFilter=void 0!==c?c:1003,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}mz.prototype.isDataTexture=!0;const gz=new wL,vz=new wL;class yz{constructor(e=[],t=[]){this.uuid=EP(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new wL)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new wL;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let i=0,o=e.length;i<o;i++){const r=e[i]?e[i].matrixWorld:vz;gz.multiplyMatrices(r,t[i]),gz.toArray(n,16*i)}null!==r&&(r.needsUpdate=!0)}clone(){return new yz(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=PP(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new mz(t,e,e,1023,1015);return this.boneMatrices=t,this.boneTexture=n,this.boneTextureSize=e,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const r=e.bones[n];let i=t[r];void 0===i&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),i=new pz),this.bones.push(i),this.boneInverses.push((new wL).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let r=0,i=t.length;r<i;r++){const i=t[r];e.bones.push(i.uuid);const o=n[r];e.boneInverses.push(o.toArray())}return e}}const bz=new wL,xz=new wL,_z=[],wz=new aO;class Sz extends aO{constructor(e,t,n){super(e,t),this.instanceMatrix=new _R(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(e){return super.copy(e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(wz.geometry=this.geometry,wz.material=this.material,void 0!==wz.material)for(let i=0;i<r;i++){this.getMatrixAt(i,bz),xz.multiplyMatrices(n,bz),wz.matrixWorld=xz,wz.raycast(e,_z);for(let e=0,n=_z.length;e<n;e++){const n=_z[e];n.instanceId=i,n.object=this,t.push(n)}_z.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new _R(new Float32Array(3*this.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}Sz.prototype.isInstancedMesh=!0;class Mz extends uR{constructor(e){super(),this.type="LineBasicMaterial",this.color=new vR(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.morphTargets=e.morphTargets,this}}Mz.prototype.isLineBasicMaterial=!0;const Ez=new GP,Tz=new GP,Az=new wL,Cz=new _L,kz=new fL;class Pz extends XL{constructor(e=new jR,t=new Mz){super(),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)Ez.fromBufferAttribute(t,e-1),Tz.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Ez.distanceTo(Tz);e.setAttribute("lineDistance",new PR(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),kz.copy(n.boundingSphere),kz.applyMatrix4(r),kz.radius+=i,!1===e.ray.intersectsSphere(kz))return;Az.copy(r).invert(),Cz.copy(e.ray).applyMatrix4(Az);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a,l=new GP,c=new GP,u=new GP,d=new GP,h=this.isLineSegments?2:1;if(n.isBufferGeometry){const r=n.index,i=n.attributes.position;if(null!==r){for(let n=Math.max(0,o.start),a=Math.min(r.count,o.start+o.count)-1;n<a;n+=h){const o=r.getX(n),a=r.getX(n+1);l.fromBufferAttribute(i,o),c.fromBufferAttribute(i,a);if(Cz.distanceSqToSegment(l,c,d,u)>s)continue;d.applyMatrix4(this.matrixWorld);const h=e.ray.origin.distanceTo(d);h<e.near||h>e.far||t.push({distance:h,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,o.start),r=Math.min(i.count,o.start+o.count)-1;n<r;n+=h){l.fromBufferAttribute(i,n),c.fromBufferAttribute(i,n+1);if(Cz.distanceSqToSegment(l,c,d,u)>s)continue;d.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(d);r<e.near||r>e.far||t.push({distance:r,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}Pz.prototype.isLine=!0;const Lz=new GP,Rz=new GP;class Oz extends Pz{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)Lz.fromBufferAttribute(t,e),Rz.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+Lz.distanceTo(Rz);e.setAttribute("lineDistance",new PR(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}Oz.prototype.isLineSegments=!0;class Dz extends Pz{constructor(e,t){super(e,t),this.type="LineLoop"}}Dz.prototype.isLineLoop=!0;class Iz extends uR{constructor(e){super(),this.type="PointsMaterial",this.color=new vR(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this}}Iz.prototype.isPointsMaterial=!0;const zz=new wL,Nz=new _L,Bz=new fL,Fz=new GP;class Hz extends XL{constructor(e=new jR,t=new Iz){super(),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Bz.copy(n.boundingSphere),Bz.applyMatrix4(r),Bz.radius+=i,!1===e.ray.intersectsSphere(Bz))return;zz.copy(r).invert(),Nz.copy(e.ray).applyMatrix4(zz);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position;if(null!==i){for(let n=Math.max(0,o.start),l=Math.min(i.count,o.start+o.count);n<l;n++){const o=i.getX(n);Fz.fromBufferAttribute(a,o),Uz(Fz,o,s,r,e,t,this)}}else{for(let n=Math.max(0,o.start),i=Math.min(a.count,o.start+o.count);n<i;n++)Fz.fromBufferAttribute(a,n),Uz(Fz,n,s,r,e,t,this)}}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function Uz(e,t,n,r,i,o,a){const s=Nz.distanceSqToPoint(e);if(s<n){const n=new GP;Nz.closestPointToPoint(e,n),n.applyMatrix4(r);const l=i.ray.origin.distanceTo(n);if(l<i.near||l>i.far)return;o.push({distance:l,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,object:a})}}Hz.prototype.isPoints=!0;class jz extends BP{constructor(e,t,n,r,i,o,a,s,l){super(e,t,n,r,i,o,a,s,l),this.format=void 0!==a?a:1022,this.minFilter=void 0!==o?o:1006,this.magFilter=void 0!==i?i:1006,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){c.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}jz.prototype.isVideoTexture=!0;class Vz extends BP{constructor(e,t,n,r,i,o,a,s,l,c,u,d){super(null,o,a,s,l,c,r,i,u,d),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}Vz.prototype.isCompressedTexture=!0;class Wz extends BP{constructor(e,t,n,r,i,o,a,s,l){super(e,t,n,r,i,o,a,s,l),this.needsUpdate=!0}}Wz.prototype.isCanvasTexture=!0;class Gz extends BP{constructor(e,t,n,r,i,o,a,s,l,c){if(1026!==(c=void 0!==c?c:1026)&&1027!==c)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===c&&(n=1012),void 0===n&&1027===c&&(n=1020),super(null,r,i,o,a,s,c,n,l),this.image={width:e,height:t},this.magFilter=void 0!==a?a:1003,this.minFilter=void 0!==s?s:1003,this.flipY=!1,this.generateMipmaps=!1}}Gz.prototype.isDepthTexture=!0;class qz extends jR{constructor(e=1,t=8,n=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const i=[],o=[],a=[],s=[],l=new GP,c=new OP;o.push(0,0,0),a.push(0,0,1),s.push(.5,.5);for(let u=0,d=3;u<=t;u++,d+=3){const i=n+u/t*r;l.x=e*Math.cos(i),l.y=e*Math.sin(i),o.push(l.x,l.y,l.z),a.push(0,0,1),c.x=(o[d]/e+1)/2,c.y=(o[d+1]/e+1)/2,s.push(c.x,c.y)}for(let u=1;u<=t;u++)i.push(u,u+1,0);this.setIndex(i),this.setAttribute("position",new PR(o,3)),this.setAttribute("normal",new PR(a,3)),this.setAttribute("uv",new PR(s,2))}}class Xz extends jR{constructor(e=1,t=1,n=1,r=8,i=1,o=!1,a=0,s=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};const l=this;r=Math.floor(r),i=Math.floor(i);const c=[],u=[],d=[],h=[];let f=0;const p=[],m=n/2;let g=0;function v(n){const i=f,o=new OP,p=new GP;let v=0;const y=!0===n?e:t,b=!0===n?1:-1;for(let e=1;e<=r;e++)u.push(0,m*b,0),d.push(0,b,0),h.push(.5,.5),f++;const x=f;for(let e=0;e<=r;e++){const t=e/r*s+a,n=Math.cos(t),i=Math.sin(t);p.x=y*i,p.y=m*b,p.z=y*n,u.push(p.x,p.y,p.z),d.push(0,b,0),o.x=.5*n+.5,o.y=.5*i*b+.5,h.push(o.x,o.y),f++}for(let e=0;e<r;e++){const t=i+e,r=x+e;!0===n?c.push(r,r+1,t):c.push(r+1,r,t),v+=3}l.addGroup(g,v,!0===n?1:2),g+=v}!function(){const o=new GP,v=new GP;let y=0;const b=(t-e)/n;for(let l=0;l<=i;l++){const c=[],g=l/i,y=g*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*s+a,l=Math.sin(i),p=Math.cos(i);v.x=y*l,v.y=-g*n+m,v.z=y*p,u.push(v.x,v.y,v.z),o.set(l,b,p).normalize(),d.push(o.x,o.y,o.z),h.push(t,1-g),c.push(f++)}p.push(c)}for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=p[t][e],r=p[t+1][e],i=p[t+1][e+1],o=p[t][e+1];c.push(n,r,o),c.push(r,i,o),y+=6}l.addGroup(g,y,0),g+=y}(),!1===o&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(c),this.setAttribute("position",new PR(u,3)),this.setAttribute("normal",new PR(d,3)),this.setAttribute("uv",new PR(h,2))}}class Yz extends Xz{constructor(e=1,t=1,n=8,r=1,i=!1,o=0,a=2*Math.PI){super(0,e,t,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}}class $z extends jR{constructor(e,t,n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const i=[],o=[];function a(e,t,n,r){const i=r+1,o=[];for(let a=0;a<=i;a++){o[a]=[];const r=e.clone().lerp(n,a/i),s=t.clone().lerp(n,a/i),l=i-a;for(let e=0;e<=l;e++)o[a][e]=0===e&&a===i?r:r.clone().lerp(s,e/l)}for(let a=0;a<i;a++)for(let e=0;e<2*(i-a)-1;e++){const t=Math.floor(e/2);e%2==0?(s(o[a][t+1]),s(o[a+1][t]),s(o[a][t])):(s(o[a][t+1]),s(o[a+1][t+1]),s(o[a+1][t]))}}function s(e){i.push(e.x,e.y,e.z)}function l(t,n){const r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function c(e,t,n,r){r<0&&1===e.x&&(o[t]=e.x-1),0===n.x&&0===n.z&&(o[t]=r/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}!function(e){const n=new GP,r=new GP,i=new GP;for(let o=0;o<t.length;o+=3)l(t[o+0],n),l(t[o+1],r),l(t[o+2],i),a(n,r,i,e)}(r),function(e){const t=new GP;for(let n=0;n<i.length;n+=3)t.x=i[n+0],t.y=i[n+1],t.z=i[n+2],t.normalize().multiplyScalar(e),i[n+0]=t.x,i[n+1]=t.y,i[n+2]=t.z}(n),function(){const e=new GP;for(let n=0;n<i.length;n+=3){e.x=i[n+0],e.y=i[n+1],e.z=i[n+2];const r=u(e)/2/Math.PI+.5,a=(t=e,Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))/Math.PI+.5);o.push(r,1-a)}var t;(function(){const e=new GP,t=new GP,n=new GP,r=new GP,a=new OP,s=new OP,l=new OP;for(let d=0,h=0;d<i.length;d+=9,h+=6){e.set(i[d+0],i[d+1],i[d+2]),t.set(i[d+3],i[d+4],i[d+5]),n.set(i[d+6],i[d+7],i[d+8]),a.set(o[h+0],o[h+1]),s.set(o[h+2],o[h+3]),l.set(o[h+4],o[h+5]),r.copy(e).add(t).add(n).divideScalar(3);const f=u(r);c(a,h+0,e,f),c(s,h+2,t,f),c(l,h+4,n,f)}})(),function(){for(let e=0;e<o.length;e+=6){const t=o[e+0],n=o[e+2],r=o[e+4],i=Math.max(t,n,r),a=Math.min(t,n,r);i>.9&&a<.1&&(t<.2&&(o[e+0]+=1),n<.2&&(o[e+2]+=1),r<.2&&(o[e+4]+=1))}}()}(),this.setAttribute("position",new PR(i,3)),this.setAttribute("normal",new PR(i.slice(),3)),this.setAttribute("uv",new PR(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}}class Zz extends $z{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}}const Jz=new GP,Qz=new GP,Kz=new GP,eN=new lR;class tN extends jR{constructor(e,t){if(super(),this.type="EdgesGeometry",this.parameters={thresholdAngle:t},t=void 0!==t?t:1,!0===e.isGeometry)return void console.error("THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");const n=Math.pow(10,4),r=Math.cos(SP*t),i=e.getIndex(),o=e.getAttribute("position"),a=i?i.count:o.count,s=[0,0,0],l=["a","b","c"],c=new Array(3),u={},d=[];for(let h=0;h<a;h+=3){i?(s[0]=i.getX(h),s[1]=i.getX(h+1),s[2]=i.getX(h+2)):(s[0]=h,s[1]=h+1,s[2]=h+2);const{a:e,b:t,c:a}=eN;if(e.fromBufferAttribute(o,s[0]),t.fromBufferAttribute(o,s[1]),a.fromBufferAttribute(o,s[2]),eN.getNormal(Kz),c[0]=`${Math.round(e.x*n)},${Math.round(e.y*n)},${Math.round(e.z*n)}`,c[1]=`${Math.round(t.x*n)},${Math.round(t.y*n)},${Math.round(t.z*n)}`,c[2]=`${Math.round(a.x*n)},${Math.round(a.y*n)},${Math.round(a.z*n)}`,c[0]!==c[1]&&c[1]!==c[2]&&c[2]!==c[0])for(let n=0;n<3;n++){const e=(n+1)%3,t=c[n],i=c[e],o=eN[l[n]],a=eN[l[e]],h=`${t}_${i}`,f=`${i}_${t}`;f in u&&u[f]?(Kz.dot(u[f].normal)<=r&&(d.push(o.x,o.y,o.z),d.push(a.x,a.y,a.z)),u[f]=null):h in u||(u[h]={index0:s[n],index1:s[e],normal:Kz.clone()})}}for(const h in u)if(u[h]){const{index0:e,index1:t}=u[h];Jz.fromBufferAttribute(o,e),Qz.fromBufferAttribute(o,t),d.push(Jz.x,Jz.y,Jz.z),d.push(Qz.x,Qz.y,Qz.z)}this.setAttribute("position",new PR(d,3))}}const nN=function(e,t,n){n=n||2;const r=t&&t.length,i=r?t[0]*n:e.length;let o=rN(e,0,i,n,!0);const a=[];if(!o||o.next===o.prev)return a;let s,l,c,u,d,h,f;if(r&&(o=function(e,t,n,r){const i=[];let o,a,s,l,c;for(o=0,a=t.length;o<a;o++)s=t[o]*r,l=o<a-1?t[o+1]*r:e.length,c=rN(e,s,l,r,!1),c===c.next&&(c.steiner=!0),i.push(pN(c));for(i.sort(uN),o=0;o<i.length;o++)dN(i[o],n),n=iN(n,n.next);return n}(e,t,o,n)),e.length>80*n){s=c=e[0],l=u=e[1];for(let t=n;t<i;t+=n)d=e[t],h=e[t+1],d<s&&(s=d),h<l&&(l=h),d>c&&(c=d),h>u&&(u=h);f=Math.max(c-s,u-l),f=0!==f?1/f:0}return oN(o,a,n,s,l,f),a};function rN(e,t,n,r,i){let o,a;if(i===function(e,t,n,r){let i=0;for(let o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}(e,t,n,r)>0)for(o=t;o<n;o+=r)a=MN(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=MN(o,e[o],e[o+1],a);return a&&yN(a,a.next)&&(EN(a),a=a.next),a}function iN(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!yN(r,r.next)&&0!==vN(r.prev,r,r.next))r=r.next;else{if(EN(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function oN(e,t,n,r,i,o,a){if(!e)return;!a&&o&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=fN(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,o,a,s,l,c=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<c&&(s++,r=r.nextZ,r);t++);for(l=c;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,o);let s,l,c=e;for(;e.prev!==e.next;)if(s=e.prev,l=e.next,o?sN(e,r,i,o):aN(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),EN(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?oN(e=lN(iN(e),t,n),t,n,r,i,o,2):2===a&&cN(e,t,n,r,i,o):oN(iN(e),t,n,r,i,o,1);break}}function aN(e){const t=e.prev,n=e,r=e.next;if(vN(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(mN(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&vN(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function sN(e,t,n,r){const i=e.prev,o=e,a=e.next;if(vN(i,o,a)>=0)return!1;const s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,d=fN(s,l,t,n,r),h=fN(c,u,t,n,r);let f=e.prevZ,p=e.nextZ;for(;f&&f.z>=d&&p&&p.z<=h;){if(f!==e.prev&&f!==e.next&&mN(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&vN(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&mN(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&vN(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=d;){if(f!==e.prev&&f!==e.next&&mN(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&vN(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=h;){if(p!==e.prev&&p!==e.next&&mN(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&vN(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function lN(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!yN(i,o)&&bN(i,r,r.next,o)&&wN(i,o)&&wN(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),EN(r),EN(r.next),r=e=o),r=r.next}while(r!==e);return iN(r)}function cN(e,t,n,r,i,o){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&gN(a,e)){let s=SN(a,e);return a=iN(a,a.next),s=iN(s,s.next),oN(a,t,n,r,i,o),void oN(s,t,n,r,i,o)}e=e.next}a=a.next}while(a!==e)}function uN(e,t){return e.x-t.x}function dN(e,t){if(t=function(e,t){let n=t;const r=e.x,i=e.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a){if(a=e,e===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!o)return null;if(r===a)return o;const s=o,l=o.x,c=o.y;let u,d=1/0;n=o;do{r>=n.x&&n.x>=l&&r!==n.x&&mN(i<c?r:a,i,l,c,i<c?a:r,i,n.x,n.y)&&(u=Math.abs(i-n.y)/(r-n.x),wN(n,e)&&(u<d||u===d&&(n.x>o.x||n.x===o.x&&hN(o,n)))&&(o=n,d=u)),n=n.next}while(n!==s);return o}(e,t)){const n=SN(t,e);iN(t,t.next),iN(n,n.next)}}function hN(e,t){return vN(e.prev,e,t.prev)<0&&vN(t.next,e,e.next)<0}function fN(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function pN(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function mN(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function gN(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&bN(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(wN(e,t)&&wN(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,o=(e.y+t.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!==e);return r}(e,t)&&(vN(e.prev,e,t.prev)||vN(e,t.prev,t))||yN(e,t)&&vN(e.prev,e,e.next)>0&&vN(t.prev,t,t.next)>0)}function vN(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function yN(e,t){return e.x===t.x&&e.y===t.y}function bN(e,t,n,r){const i=_N(vN(e,t,n)),o=_N(vN(e,t,r)),a=_N(vN(n,r,e)),s=_N(vN(n,r,t));return i!==o&&a!==s||(!(0!==i||!xN(e,n,t))||(!(0!==o||!xN(e,r,t))||(!(0!==a||!xN(n,e,r))||!(0!==s||!xN(n,t,r)))))}function xN(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function _N(e){return e>0?1:e<0?-1:0}function wN(e,t){return vN(e.prev,e,e.next)<0?vN(e,t,e.next)>=0&&vN(e,e.prev,t)>=0:vN(e,t,e.prev)<0||vN(e,e.next,t)<0}function SN(e,t){const n=new TN(e.i,e.x,e.y),r=new TN(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function MN(e,t,n,r){const i=new TN(e,t,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 EN(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function TN(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class AN{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n}static isClockWise(e){return AN.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];CN(e),kN(n,e);let o=e.length;t.forEach(CN);for(let s=0;s<t.length;s++)r.push(o),o+=t[s].length,kN(n,t[s]);const a=nN(n,r);for(let s=0;s<a.length;s+=3)i.push(a.slice(s,s+3));return i}}function CN(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function kN(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class PN extends jR{constructor(e,t){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let a=0,s=e.length;a<s;a++){o(e[a])}function o(e){const o=[],a=void 0!==t.curveSegments?t.curveSegments:12,s=void 0!==t.steps?t.steps:1;let l=void 0!==t.depth?t.depth:100,c=void 0===t.bevelEnabled||t.bevelEnabled,u=void 0!==t.bevelThickness?t.bevelThickness:6,d=void 0!==t.bevelSize?t.bevelSize:u-2,h=void 0!==t.bevelOffset?t.bevelOffset:0,f=void 0!==t.bevelSegments?t.bevelSegments:3;const p=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:LN;void 0!==t.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),l=t.amount);let g,v,y,b,x,_=!1;p&&(g=p.getSpacedPoints(s),_=!0,c=!1,v=p.computeFrenetFrames(s,!1),y=new GP,b=new GP,x=new GP),c||(f=0,u=0,d=0,h=0);const w=e.extractPoints(a);let S=w.shape;const M=w.holes;if(!AN.isClockWise(S)){S=S.reverse();for(let e=0,t=M.length;e<t;e++){const t=M[e];AN.isClockWise(t)&&(M[e]=t.reverse())}}const E=AN.triangulateShape(S,M),T=S;for(let t=0,n=M.length;t<n;t++){const e=M[t];S=S.concat(e)}function A(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}const C=S.length,k=E.length;function P(e,t,n){let r,i,o;const a=e.x-t.x,s=e.y-t.y,l=n.x-e.x,c=n.y-e.y,u=a*a+s*s,d=a*c-s*l;if(Math.abs(d)>Number.EPSILON){const d=Math.sqrt(u),h=Math.sqrt(l*l+c*c),f=t.x-s/d,p=t.y+a/d,m=((n.x-c/h-f)*c-(n.y+l/h-p)*l)/(a*c-s*l);r=f+a*m-e.x,i=p+s*m-e.y;const g=r*r+i*i;if(g<=2)return new OP(r,i);o=Math.sqrt(g/2)}else{let e=!1;a>Number.EPSILON?l>Number.EPSILON&&(e=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(s)===Math.sign(c)&&(e=!0),e?(r=-s,i=a,o=Math.sqrt(u)):(r=a,i=s,o=Math.sqrt(u/2))}return new OP(r/o,i/o)}const L=[];for(let t=0,n=T.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),L[t]=P(T[t],T[r],T[i]);const R=[];let O,D=L.concat();for(let t=0,n=M.length;t<n;t++){const e=M[t];O=[];for(let t=0,n=e.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),O[t]=P(e[t],e[r],e[i]);R.push(O),D=D.concat(O)}for(let t=0;t<f;t++){const e=t/f,n=u*Math.cos(e*Math.PI/2),r=d*Math.sin(e*Math.PI/2)+h;for(let t=0,i=T.length;t<i;t++){const e=A(T[t],L[t],r);N(e.x,e.y,-n)}for(let t=0,i=M.length;t<i;t++){const e=M[t];O=R[t];for(let t=0,i=e.length;t<i;t++){const i=A(e[t],O[t],r);N(i.x,i.y,-n)}}}const I=d+h;for(let t=0;t<C;t++){const e=c?A(S[t],D[t],I):S[t];_?(b.copy(v.normals[0]).multiplyScalar(e.x),y.copy(v.binormals[0]).multiplyScalar(e.y),x.copy(g[0]).add(b).add(y),N(x.x,x.y,x.z)):N(e.x,e.y,0)}for(let t=1;t<=s;t++)for(let e=0;e<C;e++){const n=c?A(S[e],D[e],I):S[e];_?(b.copy(v.normals[t]).multiplyScalar(n.x),y.copy(v.binormals[t]).multiplyScalar(n.y),x.copy(g[t]).add(b).add(y),N(x.x,x.y,x.z)):N(n.x,n.y,l/s*t)}for(let t=f-1;t>=0;t--){const e=t/f,n=u*Math.cos(e*Math.PI/2),r=d*Math.sin(e*Math.PI/2)+h;for(let t=0,i=T.length;t<i;t++){const e=A(T[t],L[t],r);N(e.x,e.y,l+n)}for(let t=0,i=M.length;t<i;t++){const e=M[t];O=R[t];for(let t=0,i=e.length;t<i;t++){const i=A(e[t],O[t],r);_?N(i.x,i.y+g[s-1].y,g[s-1].x+n):N(i.x,i.y,l+n)}}}function z(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=s+2*f;e<n;e++){const n=C*e,o=C*(e+1);F(t+r+n,t+i+n,t+i+o,t+r+o)}}}function N(e,t,n){o.push(e),o.push(t),o.push(n)}function B(e,t,i){H(e),H(t),H(i);const o=r.length/3,a=m.generateTopUV(n,r,o-3,o-2,o-1);U(a[0]),U(a[1]),U(a[2])}function F(e,t,i,o){H(e),H(t),H(o),H(t),H(i),H(o);const a=r.length/3,s=m.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);U(s[0]),U(s[1]),U(s[3]),U(s[1]),U(s[2]),U(s[3])}function H(e){r.push(o[3*e+0]),r.push(o[3*e+1]),r.push(o[3*e+2])}function U(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(c){let e=0,t=C*e;for(let n=0;n<k;n++){const e=E[n];B(e[2]+t,e[1]+t,e[0]+t)}e=s+2*f,t=C*e;for(let n=0;n<k;n++){const e=E[n];B(e[0]+t,e[1]+t,e[2]+t)}}else{for(let e=0;e<k;e++){const t=E[e];B(t[2],t[1],t[0])}for(let e=0;e<k;e++){const t=E[e];B(t[0]+C*s,t[1]+C*s,t[2]+C*s)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;z(T,t),t+=T.length;for(let n=0,r=M.length;n<r;n++){const e=M[n];z(e,t),t+=e.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new PR(r,3)),this.setAttribute("uv",new PR(i,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let r=0,i=e.length;r<i;r++){const t=e[r];n.shapes.push(t.uuid)}else n.shapes.push(e.uuid);void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,e)}}const LN={generateTopUV:function(e,t,n,r,i){const o=t[3*n],a=t[3*n+1],s=t[3*r],l=t[3*r+1],c=t[3*i],u=t[3*i+1];return[new OP(o,a),new OP(s,l),new OP(c,u)]},generateSideWallUV:function(e,t,n,r,i,o){const a=t[3*n],s=t[3*n+1],l=t[3*n+2],c=t[3*r],u=t[3*r+1],d=t[3*r+2],h=t[3*i],f=t[3*i+1],p=t[3*i+2],m=t[3*o],g=t[3*o+1],v=t[3*o+2];return Math.abs(s-u)<Math.abs(a-c)?[new OP(a,1-l),new OP(c,1-d),new OP(h,1-p),new OP(m,1-v)]:[new OP(s,1-l),new OP(u,1-d),new OP(f,1-p),new OP(g,1-v)]}};class RN extends $z{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}}class ON extends jR{constructor(e,t=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=TP(r,0,2*Math.PI);const i=[],o=[],a=[],s=1/t,l=new GP,c=new OP;for(let u=0;u<=t;u++){const i=n+u*s*r,d=Math.sin(i),h=Math.cos(i);for(let n=0;n<=e.length-1;n++)l.x=e[n].x*d,l.y=e[n].y,l.z=e[n].x*h,o.push(l.x,l.y,l.z),c.x=u/t,c.y=n/(e.length-1),a.push(c.x,c.y)}for(let u=0;u<t;u++)for(let t=0;t<e.length-1;t++){const n=t+u*e.length,r=n,o=n+e.length,a=n+e.length+1,s=n+1;i.push(r,o,s),i.push(o,a,s)}if(this.setIndex(i),this.setAttribute("position",new PR(o,3)),this.setAttribute("uv",new PR(a,2)),this.computeVertexNormals(),r===2*Math.PI){const n=this.attributes.normal.array,r=new GP,i=new GP,o=new GP,a=t*e.length*3;for(let t=0,s=0;t<e.length;t++,s+=3)r.x=n[s+0],r.y=n[s+1],r.z=n[s+2],i.x=n[a+s+0],i.y=n[a+s+1],i.z=n[a+s+2],o.addVectors(r,i).normalize(),n[s+0]=n[a+s+0]=o.x,n[s+1]=n[a+s+1]=o.y,n[s+2]=n[a+s+2]=o.z}}}class DN extends $z{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}}class IN extends jR{constructor(e,t,n){super(),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n};const r=[],i=[],o=[],a=[],s=1e-5,l=new GP,c=new GP,u=new GP,d=new GP,h=new GP;e.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");const f=t+1;for(let p=0;p<=n;p++){const r=p/n;for(let n=0;n<=t;n++){const f=n/t;e(f,r,c),i.push(c.x,c.y,c.z),f-s>=0?(e(f-s,r,u),d.subVectors(c,u)):(e(f+s,r,u),d.subVectors(u,c)),r-s>=0?(e(f,r-s,u),h.subVectors(c,u)):(e(f,r+s,u),h.subVectors(u,c)),l.crossVectors(d,h).normalize(),o.push(l.x,l.y,l.z),a.push(f,r)}}for(let p=0;p<n;p++)for(let e=0;e<t;e++){const t=p*f+e,n=p*f+e+1,i=(p+1)*f+e+1,o=(p+1)*f+e;r.push(t,n,o),r.push(n,i,o)}this.setIndex(r),this.setAttribute("position",new PR(i,3)),this.setAttribute("normal",new PR(o,3)),this.setAttribute("uv",new PR(a,2))}}class zN extends jR{constructor(e=.5,t=1,n=8,r=1,i=0,o=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},n=Math.max(3,n);const a=[],s=[],l=[],c=[];let u=e;const d=(t-e)/(r=Math.max(1,r)),h=new GP,f=new OP;for(let p=0;p<=r;p++){for(let e=0;e<=n;e++){const r=i+e/n*o;h.x=u*Math.cos(r),h.y=u*Math.sin(r),s.push(h.x,h.y,h.z),l.push(0,0,1),f.x=(h.x/t+1)/2,f.y=(h.y/t+1)/2,c.push(f.x,f.y)}u+=d}for(let p=0;p<r;p++){const e=p*(n+1);for(let t=0;t<n;t++){const r=t+e,i=r,o=r+n+1,s=r+n+2,l=r+1;a.push(i,o,l),a.push(o,s,l)}}this.setIndex(a),this.setAttribute("position",new PR(s,3)),this.setAttribute("normal",new PR(l,3)),this.setAttribute("uv",new PR(c,2))}}class NN extends jR{constructor(e,t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],o=[];let a=0,s=0;if(!1===Array.isArray(e))l(e);else for(let c=0;c<e.length;c++)l(e[c]),this.addGroup(a,s,c),a+=s,s=0;function l(e){const a=r.length/3,l=e.extractPoints(t);let c=l.shape;const u=l.holes;!1===AN.isClockWise(c)&&(c=c.reverse());for(let t=0,n=u.length;t<n;t++){const e=u[t];!0===AN.isClockWise(e)&&(u[t]=e.reverse())}const d=AN.triangulateShape(c,u);for(let t=0,n=u.length;t<n;t++){const e=u[t];c=c.concat(e)}for(let t=0,n=c.length;t<n;t++){const e=c[t];r.push(e.x,e.y,0),i.push(0,0,1),o.push(e.x,e.y)}for(let t=0,r=d.length;t<r;t++){const e=d[t],r=e[0]+a,i=e[1]+a,o=e[2]+a;n.push(r,i,o),s+=3}}this.setIndex(n),this.setAttribute("position",new PR(r,3)),this.setAttribute("normal",new PR(i,3)),this.setAttribute("uv",new PR(o,2))}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}}class BN extends jR{constructor(e=1,t=8,n=6,r=0,i=2*Math.PI,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const s=Math.min(o+a,Math.PI);let l=0;const c=[],u=new GP,d=new GP,h=[],f=[],p=[],m=[];for(let g=0;g<=n;g++){const h=[],v=g/n;let y=0;0==g&&0==o?y=.5/t:g==n&&s==Math.PI&&(y=-.5/t);for(let n=0;n<=t;n++){const s=n/t;u.x=-e*Math.cos(r+s*i)*Math.sin(o+v*a),u.y=e*Math.cos(o+v*a),u.z=e*Math.sin(r+s*i)*Math.sin(o+v*a),f.push(u.x,u.y,u.z),d.copy(u).normalize(),p.push(d.x,d.y,d.z),m.push(s+y,1-v),h.push(l++)}c.push(h)}for(let g=0;g<n;g++)for(let e=0;e<t;e++){const t=c[g][e+1],r=c[g][e],i=c[g+1][e],a=c[g+1][e+1];(0!==g||o>0)&&h.push(t,r,a),(g!==n-1||s<Math.PI)&&h.push(r,i,a)}this.setIndex(h),this.setAttribute("position",new PR(f,3)),this.setAttribute("normal",new PR(p,3)),this.setAttribute("uv",new PR(m,2))}}class FN extends $z{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}}class HN extends PN{constructor(e,t={}){const n=t.font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new jR;const r=n.generateShapes(e,t.size);t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),super(r,t),this.type="TextGeometry"}}class UN extends jR{constructor(e=1,t=.4,n=8,r=6,i=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},n=Math.floor(n),r=Math.floor(r);const o=[],a=[],s=[],l=[],c=new GP,u=new GP,d=new GP;for(let h=0;h<=n;h++)for(let o=0;o<=r;o++){const f=o/r*i,p=h/n*Math.PI*2;u.x=(e+t*Math.cos(p))*Math.cos(f),u.y=(e+t*Math.cos(p))*Math.sin(f),u.z=t*Math.sin(p),a.push(u.x,u.y,u.z),c.x=e*Math.cos(f),c.y=e*Math.sin(f),d.subVectors(u,c).normalize(),s.push(d.x,d.y,d.z),l.push(o/r),l.push(h/n)}for(let h=1;h<=n;h++)for(let e=1;e<=r;e++){const t=(r+1)*h+e-1,n=(r+1)*(h-1)+e-1,i=(r+1)*(h-1)+e,a=(r+1)*h+e;o.push(t,n,a),o.push(n,i,a)}this.setIndex(o),this.setAttribute("position",new PR(a,3)),this.setAttribute("normal",new PR(s,3)),this.setAttribute("uv",new PR(l,2))}}class jN extends jR{constructor(e=1,t=.4,n=64,r=8,i=2,o=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:o},n=Math.floor(n),r=Math.floor(r);const a=[],s=[],l=[],c=[],u=new GP,d=new GP,h=new GP,f=new GP,p=new GP,m=new GP,g=new GP;for(let y=0;y<=n;++y){const a=y/n*i*Math.PI*2;v(a,i,o,e,h),v(a+.01,i,o,e,f),m.subVectors(f,h),g.addVectors(f,h),p.crossVectors(m,g),g.crossVectors(p,m),p.normalize(),g.normalize();for(let e=0;e<=r;++e){const i=e/r*Math.PI*2,o=-t*Math.cos(i),a=t*Math.sin(i);u.x=h.x+(o*g.x+a*p.x),u.y=h.y+(o*g.y+a*p.y),u.z=h.z+(o*g.z+a*p.z),s.push(u.x,u.y,u.z),d.subVectors(u,h).normalize(),l.push(d.x,d.y,d.z),c.push(y/n),c.push(e/r)}}for(let y=1;y<=n;y++)for(let e=1;e<=r;e++){const t=(r+1)*(y-1)+(e-1),n=(r+1)*y+(e-1),i=(r+1)*y+e,o=(r+1)*(y-1)+e;a.push(t,n,o),a.push(n,i,o)}function v(e,t,n,r,i){const o=Math.cos(e),a=Math.sin(e),s=n/t*e,l=Math.cos(s);i.x=r*(2+l)*.5*o,i.y=r*(2+l)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(a),this.setAttribute("position",new PR(s,3)),this.setAttribute("normal",new PR(l,3)),this.setAttribute("uv",new PR(c,2))}}class VN extends jR{constructor(e,t=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const o=e.computeFrenetFrames(t,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new GP,s=new GP,l=new OP;let c=new GP;const u=[],d=[],h=[],f=[];function p(i){c=e.getPointAt(i/t,c);const l=o.normals[i],h=o.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),o=-Math.cos(t);s.x=o*l.x+i*h.x,s.y=o*l.y+i*h.y,s.z=o*l.z+i*h.z,s.normalize(),d.push(s.x,s.y,s.z),a.x=c.x+n*s.x,a.y=c.y+n*s.y,a.z=c.z+n*s.z,u.push(a.x,a.y,a.z)}}!function(){for(let e=0;e<t;e++)p(e);p(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)l.x=e/t,l.y=n/r,h.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),o=(r+1)*e+t,a=(r+1)*(e-1)+t;f.push(n,i,a),f.push(i,o,a)}}()}(),this.setIndex(f),this.setAttribute("position",new PR(u,3)),this.setAttribute("normal",new PR(d,3)),this.setAttribute("uv",new PR(h,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}}class WN extends jR{constructor(e){if(super(),this.type="WireframeGeometry",!0===e.isGeometry)return void console.error("THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");const t=[],n=[0,0],r={},i=new GP;if(null!==e.index){const o=e.attributes.position,a=e.index;let s=e.groups;0===s.length&&(s=[{start:0,count:a.count,materialIndex:0}]);for(let e=0,t=s.length;e<t;++e){const t=s[e],i=t.start;for(let e=i,o=i+t.count;e<o;e+=3)for(let t=0;t<3;t++){const i=a.getX(e+t),o=a.getX(e+(t+1)%3);n[0]=Math.min(i,o),n[1]=Math.max(i,o);const s=n[0]+","+n[1];void 0===r[s]&&(r[s]={index1:n[0],index2:n[1]})}}for(const e in r){const n=r[e];i.fromBufferAttribute(o,n.index1),t.push(i.x,i.y,i.z),i.fromBufferAttribute(o,n.index2),t.push(i.x,i.y,i.z)}}else{const n=e.attributes.position;for(let e=0,r=n.count/3;e<r;e++)for(let o=0;o<3;o++){const r=3*e+o;i.fromBufferAttribute(n,r),t.push(i.x,i.y,i.z);const a=3*e+(o+1)%3;i.fromBufferAttribute(n,a),t.push(i.x,i.y,i.z)}}this.setAttribute("position",new PR(t,3))}}var GN=Object.freeze({__proto__:null,BoxGeometry:lO,BoxBufferGeometry:lO,CircleGeometry:qz,CircleBufferGeometry:qz,ConeGeometry:Yz,ConeBufferGeometry:Yz,CylinderGeometry:Xz,CylinderBufferGeometry:Xz,DodecahedronGeometry:Zz,DodecahedronBufferGeometry:Zz,EdgesGeometry:tN,ExtrudeGeometry:PN,ExtrudeBufferGeometry:PN,IcosahedronGeometry:RN,IcosahedronBufferGeometry:RN,LatheGeometry:ON,LatheBufferGeometry:ON,OctahedronGeometry:DN,OctahedronBufferGeometry:DN,ParametricGeometry:IN,ParametricBufferGeometry:IN,PlaneGeometry:SO,PlaneBufferGeometry:SO,PolyhedronGeometry:$z,PolyhedronBufferGeometry:$z,RingGeometry:zN,RingBufferGeometry:zN,ShapeGeometry:NN,ShapeBufferGeometry:NN,SphereGeometry:BN,SphereBufferGeometry:BN,TetrahedronGeometry:FN,TetrahedronBufferGeometry:FN,TextGeometry:HN,TextBufferGeometry:HN,TorusGeometry:UN,TorusBufferGeometry:UN,TorusKnotGeometry:jN,TorusKnotBufferGeometry:jN,TubeGeometry:VN,TubeBufferGeometry:VN,WireframeGeometry:WN});class qN extends uR{constructor(e){super(),this.type="ShadowMaterial",this.color=new vR(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}}qN.prototype.isShadowMaterial=!0;class XN extends hO{constructor(e){super(e),this.type="RawShaderMaterial"}}XN.prototype.isRawShaderMaterial=!0;class YN extends uR{constructor(e){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new vR(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new vR(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new OP(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.vertexTangents=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this.vertexTangents=e.vertexTangents,this}}YN.prototype.isMeshStandardMaterial=!0;class $N extends YN{constructor(e){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new OP(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(e){this.reflectivity=TP(2.5*(e-1)/(e+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.thickness=.01,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new vR(1,1,1),this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},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.reflectivity=e.reflectivity,e.sheen?this.sheen=(this.sheen||new vR).copy(e.sheen):this.sheen=null,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}}$N.prototype.isMeshPhysicalMaterial=!0;class ZN extends uR{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new vR(16777215),this.specular=new vR(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new vR(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new OP(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}ZN.prototype.isMeshPhongMaterial=!0;class JN extends uR{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new vR(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new vR(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new OP(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.morphTargets=!1,this.morphNormals=!1,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.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this}}JN.prototype.isMeshToonMaterial=!0;class QN extends uR{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new OP(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.morphTargets=!1,this.morphNormals=!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.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}QN.prototype.isMeshNormalMaterial=!0;class KN extends uR{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new vR(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new vR(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,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.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this}}KN.prototype.isMeshLambertMaterial=!0;class eB extends uR{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new vR(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new OP(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,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.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}eB.prototype.isMeshMatcapMaterial=!0;class tB extends Mz{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}tB.prototype.isLineDashedMaterial=!0;var nB=Object.freeze({__proto__:null,ShadowMaterial:qN,SpriteMaterial:VI,RawShaderMaterial:XN,ShaderMaterial:hO,PointsMaterial:Iz,MeshPhysicalMaterial:$N,MeshStandardMaterial:YN,MeshPhongMaterial:ZN,MeshToonMaterial:JN,MeshNormalMaterial:QN,MeshLambertMaterial:KN,MeshDepthMaterial:SI,MeshDistanceMaterial:MI,MeshBasicMaterial:yR,MeshMatcapMaterial:eB,LineDashedMaterial:tB,LineBasicMaterial:Mz,Material:uR});const rB={arraySlice:function(e,t,n){return rB.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){const t=e.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){const r=e.length,i=new e.constructor(r);for(let o=0,a=0;a!==r;++o){const r=n[o]*t;for(let n=0;n!==t;++n)i[a++]=e[r+n]}return i},flattenJSON:function(e,t,n,r){let i=1,o=e[0];for(;void 0!==o&&void 0===o[r];)o=e[i++];if(void 0===o)return;let a=o[r];if(void 0!==a)if(Array.isArray(a))do{a=o[r],void 0!==a&&(t.push(o.time),n.push.apply(n,a)),o=e[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{a=o[r],void 0!==a&&(t.push(o.time),a.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{a=o[r],void 0!==a&&(t.push(o.time),n.push(a)),o=e[i++]}while(void 0!==o)},subclip:function(e,t,n,r,i=30){const o=e.clone();o.name=t;const a=[];for(let l=0;l<o.tracks.length;++l){const e=o.tracks[l],t=e.getValueSize(),s=[],c=[];for(let o=0;o<e.times.length;++o){const a=e.times[o]*i;if(!(a<n||a>=r)){s.push(e.times[o]);for(let n=0;n<t;++n)c.push(e.values[o*t+n])}}0!==s.length&&(e.times=rB.convertArray(s,e.times.constructor),e.values=rB.convertArray(c,e.values.constructor),a.push(e))}o.tracks=a;let s=1/0;for(let l=0;l<o.tracks.length;++l)s>o.tracks[l].times[0]&&(s=o.tracks[l].times[0]);for(let l=0;l<o.tracks.length;++l)o.tracks[l].shift(-1*s);return o.resetDuration(),o},makeClipAdditive:function(e,t=0,n=e,r=30){r<=0&&(r=30);const i=n.tracks.length,o=t/r;for(let a=0;a<i;++a){const t=n.tracks[a],r=t.ValueTypeName;if("bool"===r||"string"===r)continue;const i=e.tracks.find((function(e){return e.name===t.name&&e.ValueTypeName===r}));if(void 0===i)continue;let s=0;const l=t.getValueSize();t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=l/3);let c=0;const u=i.getValueSize();i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);const d=t.times.length-1;let h;if(o<=t.times[0]){const e=s,n=l-s;h=rB.arraySlice(t.values,e,n)}else if(o>=t.times[d]){const e=d*l+s,n=e+l-s;h=rB.arraySlice(t.values,e,n)}else{const e=t.createInterpolant(),n=s,r=l-s;e.evaluate(o),h=rB.arraySlice(e.resultBuffer,n,r)}if("quaternion"===r){(new WP).fromArray(h).normalize().conjugate().toArray(h)}const f=i.times.length;for(let e=0;e<f;++e){const t=e*u+c;if("quaternion"===r)WP.multiplyQuaternionsFlat(i.values,t,h,0,i.values,t);else{const e=u-2*c;for(let n=0;n<e;++n)i.values[t+n]-=h[n]}}}return e.blendMode=2501,e}};class iB{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let o;n:{r:if(!(e<r)){for(let o=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,i)}if(n===o)break;if(i=r,r=t[++n],e<r)break t}o=t.length;break n}if(e>=i)break e;{const a=t[1];e<a&&(n=2,i=a);for(let o=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===o)break;if(r=i,i=t[--n-1],e>=i)break t}o=n,n=0}}for(;n<o;){const r=n+o>>>1;e<t[r]?o=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,i,e)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let o=0;o!==r;++o)t[o]=n[i+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}iB.prototype.beforeStart_=iB.prototype.copySampleValue_,iB.prototype.afterEnd_=iB.prototype.copySampleValue_;class oB extends iB{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:2400,endingEnd:2400}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,o=e+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case 2401:i=e,a=2*t-n;break;case 2402:i=r.length-2,a=t+r[i]-r[i+1];break;default:i=e,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case 2401:o=e,s=2*n-t;break;case 2402:o=1,s=n+r[1]-r[0];break;default:o=e-1,s=t}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-a),this._weightNext=l/(s-n),this._offsetPrev=i*c,this._offsetNext=o*c}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=this._offsetPrev,u=this._offsetNext,d=this._weightPrev,h=this._weightNext,f=(n-t)/(r-t),p=f*f,m=p*f,g=-d*m+2*d*p-d*f,v=(1+d)*m+(-1.5-2*d)*p+(-.5+d)*f+1,y=(-1-h)*m+(1.5+h)*p+.5*f,b=h*m-h*p;for(let x=0;x!==a;++x)i[x]=g*o[c+x]+v*o[l+x]+y*o[s+x]+b*o[u+x];return i}}class aB extends iB{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=(n-t)/(r-t),u=1-c;for(let d=0;d!==a;++d)i[d]=o[l+d]*u+o[s+d]*c;return i}}class sB extends iB{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class lB{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=rB.convertArray(t,this.TimeBufferType),this.values=rB.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:rB.convertArray(e.times,Array),values:rB.convertArray(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new sB(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new aB(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new oB(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,o=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);const e=this.getValueSize();this.times=rB.arraySlice(n,i,o),this.values=rB.arraySlice(this.values,i*e,o*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==i;a++){const t=n[a];if("number"==typeof t&&isNaN(t)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,t),e=!1;break}if(null!==o&&o>t){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,t,o),e=!1;break}o=t}if(void 0!==r&&rB.isTypedArray(r))for(let a=0,s=r.length;a!==s;++a){const t=r[a];if(isNaN(t)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,t),e=!1;break}}return e}optimize(){const e=rB.arraySlice(this.times),t=rB.arraySlice(this.values),n=this.getValueSize(),r=2302===this.getInterpolation(),i=e.length-1;let o=1;for(let a=1;a<i;++a){let i=!1;const s=e[a];if(s!==e[a+1]&&(1!==a||s!==e[0]))if(r)i=!0;else{const e=a*n,r=e-n,o=e+n;for(let a=0;a!==n;++a){const n=t[e+a];if(n!==t[r+a]||n!==t[o+a]){i=!0;break}}}if(i){if(a!==o){e[o]=e[a];const r=a*n,i=o*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++o}}if(i>0){e[o]=e[i];for(let e=i*n,r=o*n,a=0;a!==n;++a)t[r+a]=t[e+a];++o}return o!==e.length?(this.times=rB.arraySlice(e,0,o),this.values=rB.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this}clone(){const e=rB.arraySlice(this.times,0),t=rB.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}lB.prototype.TimeBufferType=Float32Array,lB.prototype.ValueBufferType=Float32Array,lB.prototype.DefaultInterpolation=2301;class cB extends lB{}cB.prototype.ValueTypeName="bool",cB.prototype.ValueBufferType=Array,cB.prototype.DefaultInterpolation=2300,cB.prototype.InterpolantFactoryMethodLinear=void 0,cB.prototype.InterpolantFactoryMethodSmooth=void 0;class uB extends lB{}uB.prototype.ValueTypeName="color";class dB extends lB{}dB.prototype.ValueTypeName="number";class hB extends iB{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(n-t)/(r-t);let l=e*a;for(let c=l+a;l!==c;l+=4)WP.slerpFlat(i,0,o,l-a,o,l,s);return i}}class fB extends lB{InterpolantFactoryMethodLinear(e){return new hB(this.times,this.values,this.getValueSize(),e)}}fB.prototype.ValueTypeName="quaternion",fB.prototype.DefaultInterpolation=2301,fB.prototype.InterpolantFactoryMethodSmooth=void 0;class pB extends lB{}pB.prototype.ValueTypeName="string",pB.prototype.ValueBufferType=Array,pB.prototype.DefaultInterpolation=2300,pB.prototype.InterpolantFactoryMethodLinear=void 0,pB.prototype.InterpolantFactoryMethodSmooth=void 0;class mB extends lB{}mB.prototype.ValueTypeName="vector";class gB{constructor(e,t=-1,n,r=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=EP(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let o=0,a=n.length;o!==a;++o)t.push(vB(n[o]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let i=0,o=n.length;i!==o;++i)t.push(lB.toJSON(n[i]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,o=[];for(let a=0;a<i;a++){let e=[],s=[];e.push((a+i-1)%i,a,(a+1)%i),s.push(0,1,0);const l=rB.getKeyframeOrder(e);e=rB.sortedArray(e,1,l),s=rB.sortedArray(s,1,l),r||0!==e[0]||(e.push(i),s.push(s[0])),o.push(new dB(".morphTargetInfluences["+t[a].name+"]",e,s).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let a=0,s=e.length;a<s;a++){const t=e[a],n=t.name.match(i);if(n&&n.length>1){const e=n[1];let i=r[e];i||(r[e]=i=[]),i.push(t)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const o=[],a=[];rB.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.fps||30,a=e.blendMode;let s=e.length||-1;const l=e.hierarchy||[];for(let c=0;c<l.length;c++){const e=l[c].keys;if(e&&0!==e.length)if(e[0].morphTargets){const t={};let n;for(n=0;n<e.length;n++)if(e[n].morphTargets)for(let r=0;r<e[n].morphTargets.length;r++)t[e[n].morphTargets[r]]=-1;for(const i in t){const t=[],o=[];for(let r=0;r!==e[n].morphTargets.length;++r){const r=e[n];t.push(r.time),o.push(r.morphTarget===i?1:0)}r.push(new dB(".morphTargetInfluence["+i+"]",t,o))}s=t.length*(o||1)}else{const i=".bones["+t[c].name+"]";n(mB,i+".position",e,"pos",r),n(fB,i+".quaternion",e,"rot",r),n(mB,i+".scale",e,"scl",r)}}if(0===r.length)return null;return new this(i,s,r,a)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function vB(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return dB;case"vector":case"vector2":case"vector3":case"vector4":return mB;case"color":return uB;case"quaternion":return fB;case"bool":case"boolean":return cB;case"string":return pB}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];rB.flattenJSON(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const yB={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class bB{constructor(e,t,n){const r=this;let i,o=!1,a=0,s=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){s++,!1===o&&void 0!==r.onStart&&r.onStart(e,a,s),o=!0},this.itemEnd=function(e){a++,void 0!==r.onProgress&&r.onProgress(e,a,s),a===s&&(o=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],r=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null}}}const xB=new bB;class _B{constructor(e){this.manager=void 0!==e?e:xB,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const wB={};class SB extends _B{constructor(e){super(e)}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=yB.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;if(void 0!==wB[e])return void wB[e].push({onLoad:t,onProgress:n,onError:r});const a=e.match(/^data:(.*?)(;base64)?,(.*)$/);let s;if(a){const n=a[1],o=!!a[2];let s=a[3];s=decodeURIComponent(s),o&&(s=atob(s));try{let r;const o=(this.responseType||"").toLowerCase();switch(o){case"arraybuffer":case"blob":const e=new Uint8Array(s.length);for(let n=0;n<s.length;n++)e[n]=s.charCodeAt(n);r="blob"===o?new Blob([e.buffer],{type:n}):e.buffer;break;case"document":const t=new DOMParser;r=t.parseFromString(s,n);break;case"json":r=JSON.parse(s);break;default:r=s}setTimeout((function(){t&&t(r),i.manager.itemEnd(e)}),0)}catch(l){setTimeout((function(){r&&r(l),i.manager.itemError(e),i.manager.itemEnd(e)}),0)}}else{wB[e]=[],wB[e].push({onLoad:t,onProgress:n,onError:r}),s=new XMLHttpRequest,s.open("GET",e,!0),s.addEventListener("load",(function(t){const n=this.response,r=wB[e];if(delete wB[e],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),yB.add(e,n);for(let e=0,t=r.length;e<t;e++){const t=r[e];t.onLoad&&t.onLoad(n)}i.manager.itemEnd(e)}else{for(let e=0,n=r.length;e<n;e++){const n=r[e];n.onError&&n.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}}),!1),s.addEventListener("progress",(function(t){const n=wB[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onProgress&&r.onProgress(t)}}),!1),s.addEventListener("error",(function(t){const n=wB[e];delete wB[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),s.addEventListener("abort",(function(t){const n=wB[e];delete wB[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),void 0!==this.responseType&&(s.responseType=this.responseType),void 0!==this.withCredentials&&(s.withCredentials=this.withCredentials),s.overrideMimeType&&s.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(const e in this.requestHeader)s.setRequestHeader(e,this.requestHeader[e]);s.send(null)}return i.manager.itemStart(e),s}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class MB extends _B{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=yB.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),yB.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}return a.addEventListener("load",s,!1),a.addEventListener("error",l,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a}}class EB extends _B{constructor(e){super(e)}load(e,t,n,r){const i=new gO,o=new MB(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function s(n){o.load(e[n],(function(e){i.images[n]=e,a++,6===a&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(let l=0;l<e.length;++l)s(l);return i}}class TB extends _B{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new mz,a=new SB(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(i.withCredentials),a.load(e,(function(e){const n=i.parse(e);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:1001,o.wrapT=void 0!==n.wrapT?n.wrapT:1001,o.magFilter=void 0!==n.magFilter?n.magFilter:1006,o.minFilter=void 0!==n.minFilter?n.minFilter:1006,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(o.encoding=n.encoding),void 0!==n.flipY&&(o.flipY=n.flipY),void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps,o.minFilter=1008),1===n.mipmapCount&&(o.minFilter=1006),void 0!==n.generateMipmaps&&(o.generateMipmaps=n.generateMipmaps),o.needsUpdate=!0,t&&t(o,n))}),n,r),o}}class AB extends _B{constructor(e){super(e)}load(e,t,n,r){const i=new BP,o=new MB(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(n){i.image=n;const r=e.search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/);i.format=r?1022:1023,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}class CB{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let o;o=t||e*n[i-1];let a,s=0,l=i-1;for(;s<=l;)if(r=Math.floor(s+(l-s)/2),a=n[r]-o,a<0)s=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(r=l,n[r]===o)return r/(i-1);const c=n[r];return(r+(o-c)/(n[r+1]-c))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const o=this.getPoint(r),a=this.getPoint(i),s=t||(o.isVector2?new OP:new GP);return s.copy(a).sub(o).normalize(),s}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new GP,r=[],i=[],o=[],a=new GP,s=new wL;for(let h=0;h<=e;h++){const t=h/e;r[h]=this.getTangentAt(t,new GP),r[h].normalize()}i[0]=new GP,o[0]=new GP;let l=Number.MAX_VALUE;const c=Math.abs(r[0].x),u=Math.abs(r[0].y),d=Math.abs(r[0].z);c<=l&&(l=c,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),d<=l&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),o[0].crossVectors(r[0],i[0]);for(let h=1;h<=e;h++){if(i[h]=i[h-1].clone(),o[h]=o[h-1].clone(),a.crossVectors(r[h-1],r[h]),a.length()>Number.EPSILON){a.normalize();const e=Math.acos(TP(r[h-1].dot(r[h]),-1,1));i[h].applyMatrix4(s.makeRotationAxis(a,e))}o[h].crossVectors(r[h],i[h])}if(!0===t){let t=Math.acos(TP(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(a.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),o[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class kB extends CB{constructor(e=0,t=0,n=1,r=1,i=0,o=2*Math.PI,a=!1,s=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s}getPoint(e,t){const n=t||new OP,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const o=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);const a=this.aStartAngle+e*i;let s=this.aX+this.xRadius*Math.cos(a),l=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=s-this.aX,r=l-this.aY;s=n*e-r*t+this.aX,l=n*t+r*e+this.aY}return n.set(s,l)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}kB.prototype.isEllipseCurve=!0;class PB extends kB{constructor(e,t,n,r,i,o){super(e,t,n,n,r,i,o),this.type="ArcCurve"}}function LB(){let e=0,t=0,n=0,r=0;function i(i,o,a,s){e=i,t=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,a,s){let l=(t-e)/o-(n-e)/(o+a)+(n-t)/a,c=(n-t)/a-(r-t)/(a+s)+(r-n)/s;l*=a,c*=a,i(t,n,l,c)},calc:function(i){const o=i*i;return e+t*i+n*o+r*(o*i)}}}PB.prototype.isArcCurve=!0;const RB=new GP,OB=new LB,DB=new LB,IB=new LB;class zB extends CB{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new GP){const n=t,r=this.points,i=r.length,o=(i-(this.closed?0:1))*e;let a,s,l=Math.floor(o),c=o-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===c&&l===i-1&&(l=i-2,c=1),this.closed||l>0?a=r[(l-1)%i]:(RB.subVectors(r[0],r[1]).add(r[0]),a=RB);const u=r[l%i],d=r[(l+1)%i];if(this.closed||l+2<i?s=r[(l+2)%i]:(RB.subVectors(r[i-1],r[i-2]).add(r[i-1]),s=RB),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(a.distanceToSquared(u),e),n=Math.pow(u.distanceToSquared(d),e),r=Math.pow(d.distanceToSquared(s),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),OB.initNonuniformCatmullRom(a.x,u.x,d.x,s.x,t,n,r),DB.initNonuniformCatmullRom(a.y,u.y,d.y,s.y,t,n,r),IB.initNonuniformCatmullRom(a.z,u.z,d.z,s.z,t,n,r)}else"catmullrom"===this.curveType&&(OB.initCatmullRom(a.x,u.x,d.x,s.x,this.tension),DB.initCatmullRom(a.y,u.y,d.y,s.y,this.tension),IB.initCatmullRom(a.z,u.z,d.z,s.z,this.tension));return n.set(OB.calc(c),DB.calc(c),IB.calc(c)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new GP).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function NB(e,t,n,r,i){const o=.5*(r-t),a=.5*(i-n),s=e*e;return(2*n-2*r+o+a)*(e*s)+(-3*n+3*r-2*o-a)*s+o*e+n}function BB(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function FB(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}zB.prototype.isCatmullRomCurve3=!0;class HB extends CB{constructor(e=new OP,t=new OP,n=new OP,r=new OP){super(),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new OP){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(FB(e,r.x,i.x,o.x,a.x),FB(e,r.y,i.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}HB.prototype.isCubicBezierCurve=!0;class UB extends CB{constructor(e=new GP,t=new GP,n=new GP,r=new GP){super(),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new GP){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(FB(e,r.x,i.x,o.x,a.x),FB(e,r.y,i.y,o.y,a.y),FB(e,r.z,i.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}UB.prototype.isCubicBezierCurve3=!0;class jB extends CB{constructor(e=new OP,t=new OP){super(),this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new OP){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new OP;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}jB.prototype.isLineCurve=!0;class VB extends CB{constructor(e=new GP,t=new GP){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=e,this.v2=t}getPoint(e,t=new GP){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class WB extends CB{constructor(e=new OP,t=new OP,n=new OP){super(),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new OP){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(BB(e,r.x,i.x,o.x),BB(e,r.y,i.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}WB.prototype.isQuadraticBezierCurve=!0;class GB extends CB{constructor(e=new GP,t=new GP,n=new GP){super(),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new GP){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(BB(e,r.x,i.x,o.x),BB(e,r.y,i.y,o.y),BB(e,r.z,i.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}GB.prototype.isQuadraticBezierCurve3=!0;class qB extends CB{constructor(e=[]){super(),this.type="SplineCurve",this.points=e}getPoint(e,t=new OP){const n=t,r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],l=r[o],c=r[o>r.length-2?r.length-1:o+1],u=r[o>r.length-3?r.length-1:o+2];return n.set(NB(a,s.x,l.x,c.x,u.x),NB(a,s.y,l.y,c.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new OP).fromArray(n))}return this}}qB.prototype.isSplineCurve=!0;var XB=Object.freeze({__proto__:null,ArcCurve:PB,CatmullRomCurve3:zB,CubicBezierCurve:HB,CubicBezierCurve3:UB,EllipseCurve:kB,LineCurve:jB,LineCurve3:VB,QuadraticBezierCurve:WB,QuadraticBezierCurve3:GB,SplineCurve:qB});class YB extends CB{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new jB(t,e))}getPoint(e){const t=e*this.getLength(),n=this.getCurveLengths();let r=0;for(;r<n.length;){if(n[r]>=t){const e=n[r]-t,i=this.curves[r],o=i.getLength(),a=0===o?0:1-e/o;return i.getPointAt(a)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const o=i[r],a=o&&o.isEllipseCurve?2*e:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a);for(let e=0;e<s.length;e++){const r=s[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new XB[n.type]).fromJSON(n))}return this}}class $B extends YB{constructor(e){super(),this.type="Path",this.currentPoint=new OP,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new jB(this.currentPoint.clone(),new OP(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new WB(this.currentPoint.clone(),new OP(e,t),new OP(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,o){const a=new HB(this.currentPoint.clone(),new OP(e,t),new OP(n,r),new OP(i,o));return this.curves.push(a),this.currentPoint.set(i,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new qB(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,o){const a=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+a,t+s,n,r,i,o),this}absarc(e,t,n,r,i,o){return this.absellipse(e,t,n,n,r,i,o),this}ellipse(e,t,n,r,i,o,a,s){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,r,i,o,a,s),this}absellipse(e,t,n,r,i,o,a,s){const l=new kB(e,t,n,r,i,o,a,s);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),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 ZB extends $B{constructor(e){super(e),this.uuid=EP(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new $B).fromJSON(n))}return this}}class JB extends XL{constructor(e,t=1){super(),this.type="Light",this.color=new vR(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}JB.prototype.isLight=!0;class QB extends JB{constructor(e,t,n){super(e,n),this.type="HemisphereLight",this.position.copy(XL.DefaultUp),this.updateMatrix(),this.groundColor=new vR(t)}copy(e){return JB.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}QB.prototype.isHemisphereLight=!0;const KB=new wL,eF=new GP,tF=new GP;class nF{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new OP(512,512),this.map=null,this.mapPass=null,this.matrix=new wL,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new xO,this._frameExtents=new OP(1,1),this._viewportCount=1,this._viewports=[new HP(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;eF.setFromMatrixPosition(e.matrixWorld),t.position.copy(eF),tF.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(tF),t.updateMatrixWorld(),KB.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(KB),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class rF extends nF{constructor(){super(new pO(50,1,.5,500)),this.focus=1}updateMatrices(e){const t=this.camera,n=2*MP*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}rF.prototype.isSpotLightShadow=!0;class iF extends JB{constructor(e,t,n=0,r=Math.PI/3,i=0,o=1){super(e,t),this.type="SpotLight",this.position.copy(XL.DefaultUp),this.updateMatrix(),this.target=new XL,this.distance=n,this.angle=r,this.penumbra=i,this.decay=o,this.shadow=new rF}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}iF.prototype.isSpotLight=!0;const oF=new wL,aF=new GP,sF=new GP;class lF extends nF{constructor(){super(new pO(90,1,.5,500)),this._frameExtents=new OP(4,2),this._viewportCount=6,this._viewports=[new HP(2,1,1,1),new HP(0,1,1,1),new HP(3,1,1,1),new HP(1,1,1,1),new HP(3,0,1,1),new HP(1,0,1,1)],this._cubeDirections=[new GP(1,0,0),new GP(-1,0,0),new GP(0,0,1),new GP(0,0,-1),new GP(0,1,0),new GP(0,-1,0)],this._cubeUps=[new GP(0,1,0),new GP(0,1,0),new GP(0,1,0),new GP(0,1,0),new GP(0,0,1),new GP(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),aF.setFromMatrixPosition(e.matrixWorld),n.position.copy(aF),sF.copy(n.position),sF.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(sF),n.updateMatrixWorld(),r.makeTranslation(-aF.x,-aF.y,-aF.z),oF.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(oF)}}lF.prototype.isPointLightShadow=!0;class cF extends JB{constructor(e,t,n=0,r=1){super(e,t),this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new lF}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}cF.prototype.isPointLight=!0;class uF extends fO{constructor(e=-1,t=1,n=1,r=-1,i=.1,o=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,o=i+e*this.view.width,a-=t*this.view.offsetY,s=a-t*this.view.height}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}uF.prototype.isOrthographicCamera=!0;class dF extends nF{constructor(){super(new uF(-5,5,5,-5,.5,500))}}dF.prototype.isDirectionalLightShadow=!0;class hF extends JB{constructor(e,t){super(e,t),this.type="DirectionalLight",this.position.copy(XL.DefaultUp),this.updateMatrix(),this.target=new XL,this.shadow=new dF}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}hF.prototype.isDirectionalLight=!0;class fF extends JB{constructor(e,t){super(e,t),this.type="AmbientLight"}}fF.prototype.isAmbientLight=!0;class pF extends JB{constructor(e,t,n=10,r=10){super(e,t),this.type="RectAreaLight",this.width=n,this.height=r}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}pF.prototype.isRectAreaLight=!0;class mF{constructor(){this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new GP)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*i),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*r*1.092548),t.addScaledVector(o[5],r*i*1.092548),t.addScaledVector(o[6],.315392*(3*i*i-1)),t.addScaledVector(o[7],n*i*1.092548),t.addScaledVector(o[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*r),t.addScaledVector(o[2],1.023328*i),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*r),t.addScaledVector(o[5],.858086*r*i),t.addScaledVector(o[6],.743125*i*i-.247708),t.addScaledVector(o[7],.858086*n*i),t.addScaledVector(o[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}mF.prototype.isSphericalHarmonics3=!0;class gF extends JB{constructor(e=new mF,t=1){super(void 0,t),this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}gF.prototype.isLightProbe=!0;class vF extends _B{constructor(e){super(e),this.textures={}}load(e,t,n,r){const i=this,o=new SB(i.manager);o.setPath(i.path),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(o){r?r(o):console.error(o),i.manager.itemError(e)}}),n,r)}parse(e){const t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}const r=new nB[e.type];if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=(new vR).setHex(e.sheen)),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.thickness&&(r.thickness=e.thickness),void 0!==e.attenuationDistance&&(r.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==r.attenuationColor&&r.attenuationColor.setHex(e.attenuationColor),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),1!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.morphTargets&&(r.morphTargets=e.morphTargets),void 0!==e.morphNormals&&(r.morphNormals=e.morphNormals),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.vertexTangents&&(r.vertexTangents=e.vertexTangents),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const i in e.uniforms){const t=e.uniforms[i];switch(r.uniforms[i]={},t.type){case"t":r.uniforms[i].value=n(t.value);break;case"c":r.uniforms[i].value=(new vR).setHex(t.value);break;case"v2":r.uniforms[i].value=(new OP).fromArray(t.value);break;case"v3":r.uniforms[i].value=(new GP).fromArray(t.value);break;case"v4":r.uniforms[i].value=(new HP).fromArray(t.value);break;case"m3":r.uniforms[i].value=(new DP).fromArray(t.value);break;case"m4":r.uniforms[i].value=(new wL).fromArray(t.value);break;default:r.uniforms[i].value=t.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(const i in e.extensions)r.extensions[i]=e.extensions[i];if(void 0!==e.shading&&(r.flatShading=1===e.shading),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new OP).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new OP).fromArray(e.clearcoatNormalScale)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),r}setTextures(e){return this.textures=e,this}}class yF{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let r=0,i=e.length;r<i;r++)t+=String.fromCharCode(e[r]);try{return decodeURIComponent(escape(t))}catch(n){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}}class bF extends jR{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e=super.toJSON(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}bF.prototype.isInstancedBufferGeometry=!0;class xF extends _R{constructor(e,t,n,r){"number"==typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(e,t,n),this.meshPerAttribute=r||1}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}xF.prototype.isInstancedBufferAttribute=!0;class _F extends _B{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new SB(i.manager);o.setPath(i.path),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(o){r?r(o):console.error(o),i.manager.itemError(e)}}),n,r)}parse(e){const t={},n={};function r(e,r){if(void 0!==t[r])return t[r];const i=e.interleavedBuffers[r],o=function(e,t){if(void 0!==n[t])return n[t];const r=e.arrayBuffers[t],i=new Uint32Array(r).buffer;return n[t]=i,i}(e,i.buffer),a=DR(i.type,o),s=new HI(a,i.stride);return s.uuid=i.uuid,t[r]=s,s}const i=e.isInstancedBufferGeometry?new bF:new jR,o=e.data.index;if(void 0!==o){const e=DR(o.type,o.array);i.setIndex(new _R(e,1))}const a=e.data.attributes;for(const u in a){const t=a[u];let n;if(t.isInterleavedBufferAttribute){const i=r(e.data,t.data);n=new jI(i,t.itemSize,t.offset,t.normalized)}else{const e=DR(t.type,t.array);n=new(t.isInstancedBufferAttribute?xF:_R)(e,t.itemSize,t.normalized)}void 0!==t.name&&(n.name=t.name),void 0!==t.usage&&n.setUsage(t.usage),void 0!==t.updateRange&&(n.updateRange.offset=t.updateRange.offset,n.updateRange.count=t.updateRange.count),i.setAttribute(u,n)}const s=e.data.morphAttributes;if(s)for(const u in s){const t=s[u],n=[];for(let i=0,o=t.length;i<o;i++){const o=t[i];let a;if(o.isInterleavedBufferAttribute){const t=r(e.data,o.data);a=new jI(t,o.itemSize,o.offset,o.normalized)}else{const e=DR(o.type,o.array);a=new _R(e,o.itemSize,o.normalized)}void 0!==o.name&&(a.name=o.name),n.push(a)}i.morphAttributes[u]=n}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);const l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(let u=0,d=l.length;u!==d;++u){const e=l[u];i.addGroup(e.start,e.count,e.materialIndex)}const c=e.data.boundingSphere;if(void 0!==c){const e=new GP;void 0!==c.center&&e.fromArray(c.center),i.boundingSphere=new fL(e,c.radius)}return e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}}const wF={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},SF={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},MF={NearestFilter:1003,NearestMipmapNearestFilter:1004,NearestMipmapLinearFilter:1005,LinearFilter:1006,LinearMipmapNearestFilter:1007,LinearMipmapLinearFilter:1008};class EF extends _B{constructor(e){super(e),"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=yB.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){yB.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}EF.prototype.isImageBitmapLoader=!0;class TF{constructor(){this.type="ShapePath",this.color=new vR,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new $B,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,o){return this.currentPath.bezierCurveTo(e,t,n,r,i,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n],i=new ZB;i.curves=r.curves,t.push(i)}return t}function r(e,t){const n=t.length;let r=!1;for(let i=n-1,o=0;o<n;i=o++){let n=t[i],a=t[o],s=a.x-n.x,l=a.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=t[o],s=-s,a=t[i],l=-l),e.y<n.y||e.y>a.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-s*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(a.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=a.x)return!0}}return r}const i=AN.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===t)return n(o);let a,s,l;const c=[];if(1===o.length)return s=o[0],l=new ZB,l.curves=s.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;const d=[],h=[];let f,p,m=[],g=0;h[g]=void 0,m[g]=[];for(let v=0,y=o.length;v<y;v++)s=o[v],f=s.getPoints(),a=i(f),a=e?!a:a,a?(!u&&h[g]&&g++,h[g]={s:new ZB,p:f},h[g].s.curves=s.curves,u&&g++,m[g]=[]):m[g].push({h:s,p:f[0]});if(!h[0])return n(o);if(h.length>1){let e=!1;const t=[];for(let n=0,r=h.length;n<r;n++)d[n]=[];for(let n=0,i=h.length;n<i;n++){const i=m[n];for(let o=0;o<i.length;o++){const a=i[o];let s=!0;for(let i=0;i<h.length;i++)r(a.p,h[i].p)&&(n!==i&&t.push({froms:n,tos:i,hole:o}),s?(s=!1,d[i].push(a)):e=!0);s&&d[n].push(a)}}t.length>0&&(e||(m=d))}for(let v=0,y=h.length;v<y;v++){l=h[v].s,c.push(l),p=m[v];for(let e=0,t=p.length;e<t;e++)l.holes.push(p[e].h)}return c}}class AF{constructor(e){this.type="Font",this.data=e}generateShapes(e,t=100){const n=[],r=function(e,t,n){const r=Array.from(e),i=t/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,a=[];let s=0,l=0;for(let c=0;c<r.length;c++){const e=r[c];if("\n"===e)s=0,l-=o;else{const t=CF(e,i,s,l,n);s+=t.offsetX,a.push(t.path)}}return a}(e,t,this.data);for(let i=0,o=r.length;i<o;i++)Array.prototype.push.apply(n,r[i].toShapes());return n}}function CF(e,t,n,r,i){const o=i.glyphs[e]||i.glyphs["?"];if(!o)return void console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".");const a=new TF;let s,l,c,u,d,h,f,p;if(o.o){const e=o._cachedOutline||(o._cachedOutline=o.o.split(" "));for(let i=0,o=e.length;i<o;){switch(e[i++]){case"m":s=e[i++]*t+n,l=e[i++]*t+r,a.moveTo(s,l);break;case"l":s=e[i++]*t+n,l=e[i++]*t+r,a.lineTo(s,l);break;case"q":c=e[i++]*t+n,u=e[i++]*t+r,d=e[i++]*t+n,h=e[i++]*t+r,a.quadraticCurveTo(d,h,c,u);break;case"b":c=e[i++]*t+n,u=e[i++]*t+r,d=e[i++]*t+n,h=e[i++]*t+r,f=e[i++]*t+n,p=e[i++]*t+r,a.bezierCurveTo(d,h,f,p,c,u)}}}return{offsetX:o.ha*t,path:a}}AF.prototype.isFont=!0;let kF;const PF={getContext:function(){return void 0===kF&&(kF=new(window.AudioContext||window.webkitAudioContext)),kF},setContext:function(e){kF=e}};class LF extends _B{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new SB(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{const e=n.slice(0);PF.getContext().decodeAudioData(e,(function(e){t(e)}))}catch(o){r?r(o):console.error(o),i.manager.itemError(e)}}),n,r)}}class RF extends gF{constructor(e,t,n=1){super(void 0,n);const r=(new vR).set(e),i=(new vR).set(t),o=new GP(r.r,r.g,r.b),a=new GP(i.r,i.g,i.b),s=Math.sqrt(Math.PI),l=s*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(s),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(l)}}RF.prototype.isHemisphereLightProbe=!0;class OF extends gF{constructor(e,t=1){super(void 0,t);const n=(new vR).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}OF.prototype.isAmbientLightProbe=!0;const DF=new wL,IF=new wL;class zF{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=NF(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=NF();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function NF(){return("undefined"==typeof performance?Date:performance).now()}const BF=new GP,FF=new WP,HF=new GP,UF=new GP;class jF extends XL{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(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}const VF=new GP,WF=new WP,GF=new GP,qF=new GP;class XF{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}class YF{constructor(e,t,n){let r,i,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let o=this.cumulativeWeight;if(0===o){for(let e=0;e!==r;++e)n[i+e]=n[e];o=t}else{o+=t;const e=t/o;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let s=t,l=t+t;s!==l;++s)if(n[s]!==n[s+t]){a.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let i=n,o=r;i!==o;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let o=0;o!==i;++o)e[t+o]=e[n+o]}_slerp(e,t,n,r){WP.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const o=this._workIndex*i;WP.multiplyQuaternionsFlat(e,o,e,t,e,n),WP.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,n,r,i){const o=1-r;for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]*o+e[n+a]*r}}_lerpAdditive(e,t,n,r,i){for(let o=0;o!==i;++o){const i=t+o;e[i]=e[i]+e[n+o]*r}}}const $F=new RegExp("[\\[\\]\\.:\\/]","g"),ZF="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",JF=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),QF=/(WCOD+)?/.source.replace("WCOD",ZF),KF=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),eH=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),tH=new RegExp("^"+JF+QF+KF+eH+"$"),nH=["material","materials","bones"];class rH{constructor(e,t,n){this.path=t,this.parsedPath=n||rH.parseTrackName(t),this.node=rH.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new rH.Composite(e,t,n):new rH(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace($F,"")}static parseTrackName(e){const t=tH.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==nH.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(!t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const o=n(i.children);if(o)return o}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.node[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=rH.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const o=e[r];if(void 0===o){const n=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",e)}let a=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?a=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(a=this.Versioning.MatrixWorldNeedsUpdate);let s=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}s=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=i}else void 0!==o.fromArray&&void 0!==o.toArray?(s=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(s=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[s],this.setValue=this.SetterByBindingTypeAndVersioning[s][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}rH.Composite=class{constructor(e,t,n){const r=n||rH.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},rH.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},rH.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},rH.prototype.GetterByBindingType=[rH.prototype._getValue_direct,rH.prototype._getValue_array,rH.prototype._getValue_arrayElement,rH.prototype._getValue_toArray],rH.prototype.SetterByBindingTypeAndVersioning=[[rH.prototype._setValue_direct,rH.prototype._setValue_direct_setNeedsUpdate,rH.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[rH.prototype._setValue_array,rH.prototype._setValue_array_setNeedsUpdate,rH.prototype._setValue_array_setMatrixWorldNeedsUpdate],[rH.prototype._setValue_arrayElement,rH.prototype._setValue_arrayElement_setNeedsUpdate,rH.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[rH.prototype._setValue_fromArray,rH.prototype._setValue_fromArray_setNeedsUpdate,rH.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class iH{constructor(){this.uuid=EP(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let n=0,r=arguments.length;n!==r;++n)e[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,o=i.length;let a,s=e.length,l=this.nCachedObjects_;for(let c=0,u=arguments.length;c!==u;++c){const u=arguments[c],d=u.uuid;let h=t[d];if(void 0===h){h=s++,t[d]=h,e.push(u);for(let e=0,t=o;e!==t;++e)i[e].push(new rH(u,n[e],r[e]))}else if(h<l){a=e[h];const s=--l,c=e[s];t[c.uuid]=h,e[h]=c,t[d]=s,e[s]=u;for(let e=0,t=o;e!==t;++e){const t=i[e],o=t[s];let a=t[h];t[h]=o,void 0===a&&(a=new rH(u,n[e],r[e])),t[s]=a}}else e[h]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_;for(let o=0,a=arguments.length;o!==a;++o){const a=arguments[o],s=a.uuid,l=t[s];if(void 0!==l&&l>=i){const o=i++,c=e[o];t[c.uuid]=l,e[l]=c,t[s]=o,e[o]=a;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[o],i=t[l];t[l]=r,t[o]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,o=e.length;for(let a=0,s=arguments.length;a!==s;++a){const s=arguments[a].uuid,l=t[s];if(void 0!==l)if(delete t[s],l<i){const a=--i,s=e[a],c=--o,u=e[c];t[s.uuid]=l,e[l]=s,t[u.uuid]=a,e[a]=u,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[a],i=t[c];t[l]=r,t[a]=i,t.pop()}}else{const i=--o,a=e[i];i>0&&(t[a.uuid]=l),e[l]=a,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const o=this._paths,a=this._parsedPaths,s=this._objects,l=s.length,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,o.push(e),a.push(t),i.push(u);for(let d=c,h=s.length;d!==h;++d){const n=s[d];u[d]=new rH(n,e,t)}return u}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];t[e[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}iH.prototype.isAnimationObjectGroup=!0;class oH{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,o=i.length,a=new Array(o),s={endingStart:2400,endingEnd:2400};for(let l=0;l!==o;++l){const e=i[l].createInterpolant(null);a[l]=e,e.settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,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&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,o=n/r;e.warp(1,i,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const s=a.parameterPositions,l=a.sampleValues;return s[0]=i,s[1]=i+n,l[0]=e/o,l[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;if(r<0||0===n)return;this._startTime=null,t=n*r}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const e=this._interpolants,t=this._propertyBindings;switch(this.blendMode){case 2501:for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(o),t[n].accumulateAdditive(a);break;case 2500:default:for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(o),t[n].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const o=2202===n;if(0===e)return-1===i?r:o&&1==(1&i)?t-r:r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const a=this.repetitions-i;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===a){const t=e<0;this._setEndings(t,!t,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(o&&1==(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=2401,r.endingEnd=2401):(r.endingStart=e?this.zeroSlopeAtStart?2401:2400:2402,r.endingEnd=t?this.zeroSlopeAtEnd?2401:2400:2402)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=t,a[1]=i+e,s[1]=n,this}}class aH extends xP{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,a=e._interpolants,s=n.uuid,l=this._bindingsByRootAndName;let c=l[s];void 0===c&&(c={},l[s]=c);for(let u=0;u!==i;++u){const e=r[u],i=e.name;let l=c[i];if(void 0!==l)o[u]=l;else{if(l=o[u],void 0!==l){null===l._cacheIndex&&(++l.referenceCount,this._addInactiveBinding(l,s,i));continue}const r=t&&t._propertyBindings[u].binding.parsedPath;l=new YF(rH.create(n,i,r),e.ValueTypeName,e.getValueSize()),++l.referenceCount,this._addInactiveBinding(l,s,i),o[u]=l}a[u].resultBuffer=l.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,i=this._actionsByClip;let o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{const t=o.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const i=e._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,l=s[s.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,s[c]=l,s.pop(),e._byClipCacheIndex=null;delete a.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){const e=t[n];0==--e.referenceCount&&this._removeInactiveBinding(e)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,i=this._bindings;let o=r[t];void 0===o&&(o={},r[t]=o),o[n]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],l=e._cacheIndex;s._cacheIndex=l,t[l]=s,t.pop(),delete a[i],0===Object.keys(a).length&&delete o[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new aB(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i}clipAction(e,t,n){const r=t||this._root,i=r.uuid;let o="string"==typeof e?gB.findByName(r,e):e;const a=null!==o?o.uuid:e,s=this._actionsByClip[a];let l=null;if(void 0===n&&(n=null!==o?o.blendMode:2500),void 0!==s){const e=s.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;l=s.knownActions[0],null===o&&(o=l._clip)}if(null===o)return null;const c=new oH(this,o,t,n);return this._bindAction(c,l),this._addInactiveAction(c,a,i),c}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"==typeof e?gB.findByName(n,e):e,o=i?i.uuid:e,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1;for(let l=0;l!==n;++l){t[l]._update(r,e,i,o)}const a=this._bindings,s=this._nActiveBindings;for(let l=0;l!==s;++l)a[l].apply(o);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){const e=i.knownActions;for(let n=0,r=e.length;n!==r;++n){const r=e[n];this._deactivateAction(r);const i=r._cacheIndex,o=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,o._cacheIndex=i,t[i]=o,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const i in n){const e=n[i].actionByRoot[t];void 0!==e&&(this._deactivateAction(e),this._removeInactiveAction(e))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const i in r){const e=r[i];e.restoreOriginalState(),this._removeInactiveBinding(e)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}aH.prototype._controlInterpolantsResultBuffer=new Float32Array(1);class sH{constructor(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}clone(){return new sH(void 0===this.value.clone?this.value:this.value.clone())}}class lH extends HI{constructor(e,t,n=1){super(e,t),this.meshPerAttribute=n||1}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}lH.prototype.isInstancedInterleavedBuffer=!0;class cH{constructor(e,t,n,r,i){this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}cH.prototype.isGLBufferAttribute=!0;class uH{constructor(e,t,n=0,r=1/0){this.ray=new _L(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new OL,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!1,n=[]){return hH(e,this,n,t),n.sort(dH),n}intersectObjects(e,t=!1,n=[]){for(let r=0,i=e.length;r<i;r++)hH(e[r],this,n,t);return n.sort(dH),n}}function dH(e,t){return e.distance-t.distance}function hH(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)hH(r[e],t,n,!0)}}const fH=new OP;class pH{constructor(e=new OP(1/0,1/0),t=new OP(-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=fH.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return void 0===e&&(console.warn("THREE.Box2: .getCenter() target is now required"),e=new OP),this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return void 0===e&&(console.warn("THREE.Box2: .getSize() target is now required"),e=new OP),this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new OP),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new OP),t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return fH.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),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)}}pH.prototype.isBox2=!0;const mH=new GP,gH=new GP;class vH{constructor(e=new GP,t=new GP){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new GP),e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new GP),e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new GP),this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){mH.subVectors(e,this.start),gH.subVectors(this.end,this.start);const n=gH.dot(gH);let r=gH.dot(mH)/n;return t&&(r=TP(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new GP),this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}class yH extends XL{constructor(e){super(),this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}}yH.prototype.isImmediateRenderObject=!0;const bH=new GP;const xH=new GP,_H=new wL,wH=new wL;class SH extends Oz{constructor(e){const t=MH(e),n=new jR,r=[],i=[],o=new vR(0,0,1),a=new vR(0,1,0);for(let s=0;s<t.length;s++){const e=t[s];e.parent&&e.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.setAttribute("position",new PR(r,3)),n.setAttribute("color",new PR(i,3));super(n,new Mz({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");wH.copy(this.root.matrixWorld).invert();for(let i=0,o=0;i<t.length;i++){const e=t[i];e.parent&&e.parent.isBone&&(_H.multiplyMatrices(wH,e.matrixWorld),xH.setFromMatrixPosition(_H),r.setXYZ(o,xH.x,xH.y,xH.z),_H.multiplyMatrices(wH,e.parent.matrixWorld),xH.setFromMatrixPosition(_H),r.setXYZ(o+1,xH.x,xH.y,xH.z),o+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}}function MH(e){const t=[];e&&e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push.apply(t,MH(e.children[n]));return t}const EH=new GP,TH=new vR,AH=new vR;class CH extends Oz{constructor(e=10,t=10,n=4473924,r=8947848){n=new vR(n),r=new vR(r);const i=t/2,o=e/t,a=e/2,s=[],l=[];for(let u=0,d=0,h=-a;u<=t;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);const e=u===i?n:r;e.toArray(l,d),d+=3,e.toArray(l,d),d+=3,e.toArray(l,d),d+=3,e.toArray(l,d),d+=3}const c=new jR;c.setAttribute("position",new PR(s,3)),c.setAttribute("color",new PR(l,3));super(c,new Mz({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}const kH=new GP,PH=new GP,LH=new GP;const RH=new GP,OH=new fO;function DH(e,t,n,r,i,o,a){RH.set(i,o,a).unproject(r);const s=t[e];if(void 0!==s){const e=n.getAttribute("position");for(let t=0,n=s.length;t<n;t++)e.setXYZ(s[t],RH.x,RH.y,RH.z)}}const IH=new YP;class zH extends Oz{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new jR;i.setIndex(new _R(n,1)),i.setAttribute("position",new _R(r,3)),super(i,new Mz({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&IH.setFromObject(this.object),IH.isEmpty())return;const t=IH.min,n=IH.max,r=this.geometry.attributes.position,i=r.array;i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=t.x,i[4]=n.y,i[5]=n.z,i[6]=t.x,i[7]=t.y,i[8]=n.z,i[9]=n.x,i[10]=t.y,i[11]=n.z,i[12]=n.x,i[13]=n.y,i[14]=t.z,i[15]=t.x,i[16]=n.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=n.x,i[22]=t.y,i[23]=t.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e){return Oz.prototype.copy.call(this,e),this.object=e.object,this}}const NH=new GP;let BH,FH;class HH extends Oz{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new jR;n.setAttribute("position",new PR(t,3)),n.setAttribute("color",new PR([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));super(n,new Mz({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const UH=new Float32Array(1),jH=new Int32Array(UH.buffer);const VH=Math.pow(2,8),WH=[.125,.215,.35,.446,.526,.582],GH=5+WH.length,qH={3e3:0,3001:1,3002:2,3004:3,3005:4,3006:5,3007:6},XH=new yR({side:1,depthWrite:!1,depthTest:!1}),YH=new aO(new lO,XH),$H=new uF,{_lodPlanes:ZH,_sizeLods:JH,_sigmas:QH}=aU(),KH=new vR;let eU=null;const tU=(1+Math.sqrt(5))/2,nU=1/tU,rU=[new GP(1,1,1),new GP(-1,1,1),new GP(1,1,-1),new GP(-1,1,-1),new GP(0,tU,nU),new GP(0,tU,-nU),new GP(nU,0,tU),new GP(-nU,0,tU),new GP(tU,nU,0),new GP(-tU,nU,0)];function iU(e){const t=Math.max(e.r,e.g,e.b),n=Math.min(Math.max(Math.ceil(Math.log2(t)),-128),127);e.multiplyScalar(Math.pow(2,-n));return(n+128)/255}function oU(e){return void 0!==e&&1009===e.type&&(3e3===e.encoding||3001===e.encoding||3007===e.encoding)}function aU(){const e=[],t=[],n=[];let r=8;for(let i=0;i<GH;i++){const o=Math.pow(2,r);t.push(o);let a=1/o;i>4?a=WH[i-8+4-1]:0==i&&(a=0),n.push(a);const s=1/(o-1),l=-s/2,c=1+s/2,u=[l,l,c,l,c,c,l,l,c,c,l,c],d=6,h=6,f=3,p=2,m=1,g=new Float32Array(f*h*d),v=new Float32Array(p*h*d),y=new Float32Array(m*h*d);for(let e=0;e<d;e++){const t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];g.set(r,f*h*e),v.set(u,p*h*e);const i=[e,e,e,e,e,e];y.set(i,m*h*e)}const b=new jR;b.setAttribute("position",new _R(g,f)),b.setAttribute("uv",new _R(v,p)),b.setAttribute("faceIndex",new _R(y,m)),e.push(b),r>4&&r--}return{_lodPlanes:e,_sizeLods:t,_sigmas:n}}function sU(e){const t=new UP(3*VH,3*VH,e);return t.texture.mapping=306,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function lU(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function cU(){const e=new OP(1,1);return new XN({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:e},inputEncoding:{value:qH[3e3]},outputEncoding:{value:qH[3e3]}},vertexShader:dU(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t${hU()}\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t`,blending:0,depthTest:!1,depthWrite:!1})}function uU(){return new XN({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:qH[3e3]},outputEncoding:{value:qH[3e3]}},vertexShader:dU(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\t${hU()}\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t`,blending:0,depthTest:!1,depthWrite:!1})}function dU(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function hU(){return"\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t"}CB.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(CB.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},$B.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)},CH.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},SH.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},_B.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),yF.extractUrlBase(e)},_B.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},pH.prototype.center=function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},pH.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},pH.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},pH.prototype.size=function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)},YP.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},YP.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},YP.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},YP.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},YP.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)},fL.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},xO.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},vH.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},DP.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},DP.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},DP.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},DP.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},DP.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},DP.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},wL.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},wL.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},wL.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new GP).setFromMatrixColumn(this,3)},wL.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},wL.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},wL.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},wL.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},wL.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},wL.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},wL.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},wL.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},wL.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},wL.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},wL.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},wL.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},wL.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},wL.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},wL.prototype.makeFrustum=function(e,t,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,o)},wL.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},JL.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},WP.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},WP.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},_L.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},_L.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},_L.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},lR.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},lR.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},lR.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},lR.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},lR.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)},lR.barycoordFromPoint=function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),lR.getBarycoord(e,t,n,r,i)},lR.normal=function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),lR.getNormal(e,t,n,r)},ZB.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},ZB.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new PN(this,e)},ZB.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new NN(this,e)},OP.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},OP.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},OP.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},GP.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},GP.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},GP.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},GP.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},GP.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},GP.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},GP.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},GP.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},GP.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},HP.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},HP.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},XL.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},XL.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},XL.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},XL.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},XL.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(XL.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),aO.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(aO.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),fz.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},pO.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(JB.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(_R.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),35048===this.usage},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(35048)}}}),_R.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},_R.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},_R.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},jR.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},jR.prototype.addAttribute=function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new _R(arguments[1],arguments[2])))},jR.prototype.addDrawCall=function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},jR.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},jR.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},jR.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},jR.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(jR.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),HI.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},HI.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},PN.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},PN.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},PN.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},FI.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},sH.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(uR.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new vR}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===e}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}}}),Object.defineProperties(hO.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),II.prototype.clearTarget=function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},II.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},II.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},II.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},II.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},II.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},II.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},II.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},II.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},II.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},II.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},II.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},II.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},II.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},II.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},II.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},II.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},II.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},II.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},II.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},II.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},II.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},II.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},II.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},II.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(II.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?3001:3e3}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(EI.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(UP.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),jF.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const t=this;return(new LF).load(e,(function(e){t.setBuffer(e)})),this},XF.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},mO.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},mO.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)},zP.crossOrigin=void 0,zP.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const i=new AB;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},zP.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const i=new EB;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},zP.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},zP.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};const fU={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"129"}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="129");var pU=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",ACESFilmicToneMapping:4,AddEquation:100,AddOperation:2,AdditiveAnimationBlendMode:2501,AdditiveBlending:2,AlphaFormat:1021,AlwaysDepth:1,AlwaysStencilFunc:519,AmbientLight:fF,AmbientLightProbe:OF,AnimationClip:gB,AnimationLoader:class extends _B{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new SB(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(o){r?r(o):console.error(o),i.manager.itemError(e)}}),n,r)}parse(e){const t=[];for(let n=0;n<e.length;n++){const r=gB.parse(e[n]);t.push(r)}return t}},AnimationMixer:aH,AnimationObjectGroup:iH,AnimationUtils:rB,ArcCurve:PB,ArrayCamera:kI,ArrowHelper:class extends XL{constructor(e=new GP(0,0,1),t=new GP(0,0,0),n=1,r=16776960,i=.2*n,o=.2*i){super(),this.type="ArrowHelper",void 0===BH&&(BH=new jR,BH.setAttribute("position",new PR([0,0,0,0,1,0],3)),FH=new Xz(0,.5,1,5,1),FH.translate(0,-.5,0)),this.position.copy(t),this.line=new Pz(BH,new Mz({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new aO(FH,new yR({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,i,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{NH.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(NH,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}},Audio:jF,AudioAnalyser:XF,AudioContext:PF,AudioListener:class extends XL{constructor(){super(),this.type="AudioListener",this.context=PF.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new zF}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(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 null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(BF,FF,HF),UF.set(0,0,-1).applyQuaternion(FF),t.positionX){const e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(BF.x,e),t.positionY.linearRampToValueAtTime(BF.y,e),t.positionZ.linearRampToValueAtTime(BF.z,e),t.forwardX.linearRampToValueAtTime(UF.x,e),t.forwardY.linearRampToValueAtTime(UF.y,e),t.forwardZ.linearRampToValueAtTime(UF.z,e),t.upX.linearRampToValueAtTime(n.x,e),t.upY.linearRampToValueAtTime(n.y,e),t.upZ.linearRampToValueAtTime(n.z,e)}else t.setPosition(BF.x,BF.y,BF.z),t.setOrientation(UF.x,UF.y,UF.z,n.x,n.y,n.z)}},AudioLoader:LF,AxesHelper:HH,AxisHelper:function(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new HH(e)},BackSide:1,BasicDepthPacking:3200,BasicShadowMap:0,BinaryTextureLoader:function(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new TB(e)},Bone:pz,BooleanKeyframeTrack:cB,BoundingBoxHelper:function(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new zH(e,t)},Box2:pH,Box3:YP,Box3Helper:class extends Oz{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new jR;r.setIndex(new _R(n,1)),r.setAttribute("position",new PR([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(r,new Mz({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}},BoxBufferGeometry:lO,BoxGeometry:lO,BoxHelper:zH,BufferAttribute:_R,BufferGeometry:jR,BufferGeometryLoader:_F,ByteType:1010,Cache:yB,Camera:fO,CameraHelper:class extends Oz{constructor(e){const t=new jR,n=new Mz({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],i=[],o={},a=new vR(16755200),s=new vR(16711680),l=new vR(43775),c=new vR(16777215),u=new vR(3355443);function d(e,t,n){h(e,n),h(t,n)}function h(e,t){r.push(0,0,0),i.push(t.r,t.g,t.b),void 0===o[e]&&(o[e]=[]),o[e].push(r.length/3-1)}d("n1","n2",a),d("n2","n4",a),d("n4","n3",a),d("n3","n1",a),d("f1","f2",a),d("f2","f4",a),d("f4","f3",a),d("f3","f1",a),d("n1","f1",a),d("n2","f2",a),d("n3","f3",a),d("n4","f4",a),d("p","n1",s),d("p","n2",s),d("p","n3",s),d("p","n4",s),d("u1","u2",l),d("u2","u3",l),d("u3","u1",l),d("c","t",c),d("p","c",u),d("cn1","cn2",u),d("cn3","cn4",u),d("cf1","cf2",u),d("cf3","cf4",u),t.setAttribute("position",new PR(r,3)),t.setAttribute("color",new PR(i,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){const e=this.geometry,t=this.pointMap;OH.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),DH("c",t,e,OH,0,0,-1),DH("t",t,e,OH,0,0,1),DH("n1",t,e,OH,-1,-1,-1),DH("n2",t,e,OH,1,-1,-1),DH("n3",t,e,OH,-1,1,-1),DH("n4",t,e,OH,1,1,-1),DH("f1",t,e,OH,-1,-1,1),DH("f2",t,e,OH,1,-1,1),DH("f3",t,e,OH,-1,1,1),DH("f4",t,e,OH,1,1,1),DH("u1",t,e,OH,.7,1.1,-1),DH("u2",t,e,OH,-.7,1.1,-1),DH("u3",t,e,OH,0,2,-1),DH("cf1",t,e,OH,-1,0,1),DH("cf2",t,e,OH,1,0,1),DH("cf3",t,e,OH,0,-1,1),DH("cf4",t,e,OH,0,1,1),DH("cn1",t,e,OH,-1,0,-1),DH("cn2",t,e,OH,1,0,-1),DH("cn3",t,e,OH,0,-1,-1),DH("cn4",t,e,OH,0,1,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}},CanvasRenderer:function(){console.error("THREE.CanvasRenderer has been removed")},CanvasTexture:Wz,CatmullRomCurve3:zB,CineonToneMapping:3,CircleBufferGeometry:qz,CircleGeometry:qz,ClampToEdgeWrapping:1001,Clock:zF,Color:vR,ColorKeyframeTrack:uB,CompressedTexture:Vz,CompressedTextureLoader:class extends _B{constructor(e){super(e)}load(e,t,n,r){const i=this,o=[],a=new Vz,s=new SB(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(i.withCredentials);let l=0;function c(c){s.load(e[c],(function(e){const n=i.parse(e,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(a.minFilter=1006),a.image=o,a.format=n.format,a.needsUpdate=!0,t&&t(a))}),n,r)}if(Array.isArray(e))for(let u=0,d=e.length;u<d;++u)c(u);else s.load(e,(function(e){const n=i.parse(e,!0);if(n.isCubemap){const e=n.mipmaps.length/n.mipmapCount;for(let t=0;t<e;t++){o[t]={mipmaps:[]};for(let e=0;e<n.mipmapCount;e++)o[t].mipmaps.push(n.mipmaps[t*n.mipmapCount+e]),o[t].format=n.format,o[t].width=n.width,o[t].height=n.height}a.image=o}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=1006),a.format=n.format,a.needsUpdate=!0,t&&t(a)}),n,r);return a}},ConeBufferGeometry:Yz,ConeGeometry:Yz,CubeCamera:mO,CubeReflectionMapping:301,CubeRefractionMapping:302,CubeTexture:gO,CubeTextureLoader:EB,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307,CubicBezierCurve:HB,CubicBezierCurve3:UB,CubicInterpolant:oB,CullFaceBack:1,CullFaceFront:2,CullFaceFrontBack:3,CullFaceNone:0,Curve:CB,CurvePath:YB,CustomBlending:5,CustomToneMapping:5,CylinderBufferGeometry:Xz,CylinderGeometry:Xz,Cylindrical:class{constructor(e=1,t=0,n=0){return this.radius=e,this.theta=t,this.y=n,this}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return(new this.constructor).copy(this)}},DataTexture:mz,DataTexture2DArray:UO,DataTexture3D:jO,DataTextureLoader:TB,DataUtils:class{static toHalfFloat(e){UH[0]=e;const t=jH[0];let n=t>>16&32768,r=t>>12&2047;const i=t>>23&255;return i<103?n:i>142?(n|=31744,n|=(255==i?0:1)&&8388607&t,n):i<113?(r|=2048,n|=(r>>114-i)+(r>>113-i&1),n):(n|=i-112<<10|r>>1,n+=1&r,n)}},DecrementStencilOp:7683,DecrementWrapStencilOp:34056,DefaultLoadingManager:xB,DepthFormat:1026,DepthStencilFormat:1027,DepthTexture:Gz,DirectionalLight:hF,DirectionalLightHelper:class extends XL{constructor(e,t,n){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===t&&(t=1);let r=new jR;r.setAttribute("position",new PR([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const i=new Mz({fog:!1,toneMapped:!1});this.lightPlane=new Pz(r,i),this.add(this.lightPlane),r=new jR,r.setAttribute("position",new PR([0,0,0,0,0,1],3)),this.targetLine=new Pz(r,i),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){kH.setFromMatrixPosition(this.light.matrixWorld),PH.setFromMatrixPosition(this.light.target.matrixWorld),LH.subVectors(PH,kH),this.lightPlane.lookAt(PH),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(PH),this.targetLine.scale.z=LH.length()}},DiscreteInterpolant:sB,DodecahedronBufferGeometry:Zz,DodecahedronGeometry:Zz,DoubleSide:2,DstAlphaFactor:206,DstColorFactor:208,DynamicBufferAttribute:function(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new _R(e,t).setUsage(35048)},DynamicCopyUsage:35050,DynamicDrawUsage:35048,DynamicReadUsage:35049,EdgesGeometry:tN,EdgesHelper:function(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Oz(new tN(e.geometry),new Mz({color:void 0!==t?t:16777215}))},EllipseCurve:kB,EqualDepth:4,EqualStencilFunc:514,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,Euler:RL,EventDispatcher:xP,ExtrudeBufferGeometry:PN,ExtrudeGeometry:PN,FaceColors:1,FileLoader:SB,FlatShading:1,Float16BufferAttribute:kR,Float32Attribute:function(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new PR(e,t)},Float32BufferAttribute:PR,Float64Attribute:function(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new LR(e,t)},Float64BufferAttribute:LR,FloatType:1015,Fog:BI,FogExp2:NI,Font:AF,FontLoader:class extends _B{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new SB(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,(function(e){let n;try{n=JSON.parse(e)}catch(o){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(e.substring(65,e.length-2))}const r=i.parse(n);t&&t(r)}),n,r)}parse(e){return new AF(e)}},FrontSide:0,Frustum:xO,GLBufferAttribute:cH,GLSL1:"100",GLSL3:"300 es",GammaEncoding:3007,GreaterDepth:6,GreaterEqualDepth:5,GreaterEqualStencilFunc:518,GreaterStencilFunc:516,GridHelper:CH,Group:PI,HalfFloatType:1016,HemisphereLight:QB,HemisphereLightHelper:class extends XL{constructor(e,t,n){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;const r=new DN(t);r.rotateY(.5*Math.PI),this.material=new yR({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.setAttribute("color",new _R(o,3)),this.add(new aO(r,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");TH.copy(this.light.color),AH.copy(this.light.groundColor);for(let e=0,n=t.count;e<n;e++){const r=e<n/2?TH:AH;t.setXYZ(e,r.r,r.g,r.b)}t.needsUpdate=!0}e.lookAt(EH.setFromMatrixPosition(this.light.matrixWorld).negate())}},HemisphereLightProbe:RF,IcosahedronBufferGeometry:RN,IcosahedronGeometry:RN,ImageBitmapLoader:EF,ImageLoader:MB,ImageUtils:zP,ImmediateRenderObject:yH,IncrementStencilOp:7682,IncrementWrapStencilOp:34055,InstancedBufferAttribute:xF,InstancedBufferGeometry:bF,InstancedInterleavedBuffer:lH,InstancedMesh:Sz,Int16Attribute:function(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new ER(e,t)},Int16BufferAttribute:ER,Int32Attribute:function(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new AR(e,t)},Int32BufferAttribute:AR,Int8Attribute:function(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new wR(e,t)},Int8BufferAttribute:wR,IntType:1013,InterleavedBuffer:HI,InterleavedBufferAttribute:jI,Interpolant:iB,InterpolateDiscrete:2300,InterpolateLinear:2301,InterpolateSmooth:2302,InvertStencilOp:5386,JSONLoader:function(){console.error("THREE.JSONLoader has been removed.")},KeepStencilOp:7680,KeyframeTrack:lB,LOD:sz,LatheBufferGeometry:ON,LatheGeometry:ON,Layers:OL,LensFlare:function(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")},LessDepth:2,LessEqualDepth:3,LessEqualStencilFunc:515,LessStencilFunc:513,Light:JB,LightProbe:gF,Line:Pz,Line3:vH,LineBasicMaterial:Mz,LineCurve:jB,LineCurve3:VB,LineDashedMaterial:tB,LineLoop:Dz,LinePieces:1,LineSegments:Oz,LineStrip:0,LinearEncoding:3e3,LinearFilter:1006,LinearInterpolant:aB,LinearMipMapLinearFilter:1008,LinearMipMapNearestFilter:1007,LinearMipmapLinearFilter:1008,LinearMipmapNearestFilter:1007,LinearToneMapping:1,Loader:_B,LoaderUtils:yF,LoadingManager:bB,LogLuvEncoding:3003,LoopOnce:2200,LoopPingPong:2202,LoopRepeat:2201,LuminanceAlphaFormat:1025,LuminanceFormat:1024,MOUSE:{LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Material:uR,MaterialLoader:vF,Math:RP,MathUtils:RP,Matrix3:DP,Matrix4:wL,MaxEquation:104,Mesh:aO,MeshBasicMaterial:yR,MeshDepthMaterial:SI,MeshDistanceMaterial:MI,MeshFaceMaterial:function(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e},MeshLambertMaterial:KN,MeshMatcapMaterial:eB,MeshNormalMaterial:QN,MeshPhongMaterial:ZN,MeshPhysicalMaterial:$N,MeshStandardMaterial:YN,MeshToonMaterial:JN,MinEquation:103,MirroredRepeatWrapping:1002,MixOperation:1,MultiMaterial:function(e=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e},MultiplyBlending:4,MultiplyOperation:0,NearestFilter:1003,NearestMipMapLinearFilter:1005,NearestMipMapNearestFilter:1004,NearestMipmapLinearFilter:1005,NearestMipmapNearestFilter:1004,NeverDepth:0,NeverStencilFunc:512,NoBlending:0,NoColors:0,NoToneMapping:0,NormalAnimationBlendMode:2500,NormalBlending:1,NotEqualDepth:7,NotEqualStencilFunc:517,NumberKeyframeTrack:dB,Object3D:XL,ObjectLoader:class extends _B{constructor(e){super(e)}load(e,t,n,r){const i=this,o=""===this.path?yF.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const a=new SB(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){let o=null;try{o=JSON.parse(n)}catch(s){return void 0!==r&&r(s),void console.error("THREE:ObjectLoader: Can't parse "+e+".",s.message)}const a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,t):console.error("THREE.ObjectLoader: Can't load "+e)}),n,r)}parse(e,t){const n=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,r),o=this.parseImages(e.images,(function(){void 0!==t&&t(l)})),a=this.parseTextures(e.textures,o),s=this.parseMaterials(e.materials,a),l=this.parseObject(e.object,i,s,n),c=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,c),void 0!==t){let e=!1;for(const t in o)if(o[t]instanceof HTMLImageElement){e=!0;break}!1===e&&t(l)}return l}parseShapes(e){const t={};if(void 0!==e)for(let n=0,r=e.length;n<r;n++){const r=(new ZB).fromJSON(e[n]);t[r.uuid]=r}return t}parseSkeletons(e,t){const n={},r={};if(t.traverse((function(e){e.isBone&&(r[e.uuid]=e)})),void 0!==e)for(let i=0,o=e.length;i<o;i++){const t=(new yz).fromJSON(e[i],r);n[t.uuid]=t}return n}parseGeometries(e,t){const n={};let r;if(void 0!==e){const i=new _F;for(let o=0,a=e.length;o<a;o++){let a;const s=e[o];switch(s.type){case"PlaneGeometry":case"PlaneBufferGeometry":a=new GN[s.type](s.width,s.height,s.widthSegments,s.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":a=new GN[s.type](s.width,s.height,s.depth,s.widthSegments,s.heightSegments,s.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":a=new GN[s.type](s.radius,s.segments,s.thetaStart,s.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":a=new GN[s.type](s.radiusTop,s.radiusBottom,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":a=new GN[s.type](s.radius,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":a=new GN[s.type](s.radius,s.widthSegments,s.heightSegments,s.phiStart,s.phiLength,s.thetaStart,s.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":a=new GN[s.type](s.radius,s.detail);break;case"RingGeometry":case"RingBufferGeometry":a=new GN[s.type](s.innerRadius,s.outerRadius,s.thetaSegments,s.phiSegments,s.thetaStart,s.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":a=new GN[s.type](s.radius,s.tube,s.radialSegments,s.tubularSegments,s.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":a=new GN[s.type](s.radius,s.tube,s.tubularSegments,s.radialSegments,s.p,s.q);break;case"TubeGeometry":case"TubeBufferGeometry":a=new GN[s.type]((new XB[s.path.type]).fromJSON(s.path),s.tubularSegments,s.radius,s.radialSegments,s.closed);break;case"LatheGeometry":case"LatheBufferGeometry":a=new GN[s.type](s.points,s.segments,s.phiStart,s.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":a=new GN[s.type](s.vertices,s.indices,s.radius,s.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":r=[];for(let n=0,i=s.shapes.length;n<i;n++){const e=t[s.shapes[n]];r.push(e)}a=new GN[s.type](r,s.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":r=[];for(let n=0,i=s.shapes.length;n<i;n++){const e=t[s.shapes[n]];r.push(e)}const e=s.options.extrudePath;void 0!==e&&(s.options.extrudePath=(new XB[e.type]).fromJSON(e)),a=new GN[s.type](r,s.options);break;case"BufferGeometry":case"InstancedBufferGeometry":a=i.parse(s);break;case"Geometry":console.error('THREE.ObjectLoader: Loading "Geometry" is not supported anymore.');break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+s.type+'"');continue}a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),!0===a.isBufferGeometry&&void 0!==s.userData&&(a.userData=s.userData),n[s.uuid]=a}}return n}parseMaterials(e,t){const n={},r={};if(void 0!==e){const i=new vF;i.setTextures(t);for(let t=0,o=e.length;t<o;t++){const o=e[t];if("MultiMaterial"===o.type){const e=[];for(let t=0;t<o.materials.length;t++){const r=o.materials[t];void 0===n[r.uuid]&&(n[r.uuid]=i.parse(r)),e.push(n[r.uuid])}r[o.uuid]=e}else void 0===n[o.uuid]&&(n[o.uuid]=i.parse(o)),r[o.uuid]=n[o.uuid]}}return r}parseAnimations(e){const t={};if(void 0!==e)for(let n=0;n<e.length;n++){const r=e[n],i=gB.parse(r);t[i.uuid]=i}return t}parseImages(e,t){const n=this,r={};let i;function o(e){if("string"==typeof e){const t=e;return function(e){return n.manager.itemStart(e),i.load(e,(function(){n.manager.itemEnd(e)}),void 0,(function(){n.manager.itemError(e),n.manager.itemEnd(e)}))}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(t)?t:n.resourcePath+t)}return e.data?{data:DR(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){const n=new bB(t);i=new MB(n),i.setCrossOrigin(this.crossOrigin);for(let t=0,i=e.length;t<i;t++){const n=e[t],i=n.url;if(Array.isArray(i)){r[n.uuid]=[];for(let e=0,t=i.length;e<t;e++){const t=o(i[e]);null!==t&&(t instanceof HTMLImageElement?r[n.uuid].push(t):r[n.uuid].push(new mz(t.data,t.width,t.height)))}}else{const e=o(n.url);null!==e&&(r[n.uuid]=e)}}}return r}parseTextures(e,t){function n(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}const r={};if(void 0!==e)for(let i=0,o=e.length;i<o;i++){const o=e[i];let a;void 0===o.image&&console.warn('THREE.ObjectLoader: No "image" specified for',o.uuid),void 0===t[o.image]&&console.warn("THREE.ObjectLoader: Undefined image",o.image);const s=t[o.image];Array.isArray(s)?(a=new gO(s),6===s.length&&(a.needsUpdate=!0)):(a=s&&s.data?new mz(s.data,s.width,s.height):new BP(s),s&&(a.needsUpdate=!0)),a.uuid=o.uuid,void 0!==o.name&&(a.name=o.name),void 0!==o.mapping&&(a.mapping=n(o.mapping,wF)),void 0!==o.offset&&a.offset.fromArray(o.offset),void 0!==o.repeat&&a.repeat.fromArray(o.repeat),void 0!==o.center&&a.center.fromArray(o.center),void 0!==o.rotation&&(a.rotation=o.rotation),void 0!==o.wrap&&(a.wrapS=n(o.wrap[0],SF),a.wrapT=n(o.wrap[1],SF)),void 0!==o.format&&(a.format=o.format),void 0!==o.type&&(a.type=o.type),void 0!==o.encoding&&(a.encoding=o.encoding),void 0!==o.minFilter&&(a.minFilter=n(o.minFilter,MF)),void 0!==o.magFilter&&(a.magFilter=n(o.magFilter,MF)),void 0!==o.anisotropy&&(a.anisotropy=o.anisotropy),void 0!==o.flipY&&(a.flipY=o.flipY),void 0!==o.premultiplyAlpha&&(a.premultiplyAlpha=o.premultiplyAlpha),void 0!==o.unpackAlignment&&(a.unpackAlignment=o.unpackAlignment),r[o.uuid]=a}return r}parseObject(e,t,n,r){let i,o,a;function s(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function l(e){if(void 0!==e){if(Array.isArray(e)){const t=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];void 0===n[i]&&console.warn("THREE.ObjectLoader: Undefined material",i),t.push(n[i])}return t}return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),n[e]}}switch(e.type){case"Scene":i=new FI,void 0!==e.background&&Number.isInteger(e.background)&&(i.background=new vR(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?i.fog=new BI(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(i.fog=new NI(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":i=new pO(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(i.focus=e.focus),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.filmGauge&&(i.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(i.filmOffset=e.filmOffset),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"OrthographicCamera":i=new uF(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"AmbientLight":i=new fF(e.color,e.intensity);break;case"DirectionalLight":i=new hF(e.color,e.intensity);break;case"PointLight":i=new cF(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":i=new pF(e.color,e.intensity,e.width,e.height);break;case"SpotLight":i=new iF(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":i=new QB(e.color,e.groundColor,e.intensity);break;case"LightProbe":i=(new gF).fromJSON(e);break;case"SkinnedMesh":o=s(e.geometry),a=l(e.material),i=new fz(o,a),void 0!==e.bindMode&&(i.bindMode=e.bindMode),void 0!==e.bindMatrix&&i.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(i.skeleton=e.skeleton);break;case"Mesh":o=s(e.geometry),a=l(e.material),i=new aO(o,a);break;case"InstancedMesh":o=s(e.geometry),a=l(e.material);const t=e.count,n=e.instanceMatrix,r=e.instanceColor;i=new Sz(o,a,t),i.instanceMatrix=new _R(new Float32Array(n.array),16),void 0!==r&&(i.instanceColor=new _R(new Float32Array(r.array),r.itemSize));break;case"LOD":i=new sz;break;case"Line":i=new Pz(s(e.geometry),l(e.material));break;case"LineLoop":i=new Dz(s(e.geometry),l(e.material));break;case"LineSegments":i=new Oz(s(e.geometry),l(e.material));break;case"PointCloud":case"Points":i=new Hz(s(e.geometry),l(e.material));break;case"Sprite":i=new rz(l(e.material));break;case"Group":i=new PI;break;case"Bone":i=new pz;break;default:i=new XL}if(i.uuid=e.uuid,void 0!==e.name&&(i.name=e.name),void 0!==e.matrix?(i.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(i.matrixAutoUpdate=e.matrixAutoUpdate),i.matrixAutoUpdate&&i.matrix.decompose(i.position,i.quaternion,i.scale)):(void 0!==e.position&&i.position.fromArray(e.position),void 0!==e.rotation&&i.rotation.fromArray(e.rotation),void 0!==e.quaternion&&i.quaternion.fromArray(e.quaternion),void 0!==e.scale&&i.scale.fromArray(e.scale)),void 0!==e.castShadow&&(i.castShadow=e.castShadow),void 0!==e.receiveShadow&&(i.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(i.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(i.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(i.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&i.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(i.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(i.visible=e.visible),void 0!==e.frustumCulled&&(i.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(i.renderOrder=e.renderOrder),void 0!==e.userData&&(i.userData=e.userData),void 0!==e.layers&&(i.layers.mask=e.layers),void 0!==e.children){const o=e.children;for(let e=0;e<o.length;e++)i.add(this.parseObject(o[e],t,n,r))}if(void 0!==e.animations){const t=e.animations;for(let e=0;e<t.length;e++){const n=t[e];i.animations.push(r[n])}}if("LOD"===e.type){void 0!==e.autoUpdate&&(i.autoUpdate=e.autoUpdate);const t=e.levels;for(let e=0;e<t.length;e++){const n=t[e],r=i.getObjectByProperty("uuid",n.object);void 0!==r&&i.addLevel(r,n.distance)}}return i}bindSkeletons(e,t){0!==Object.keys(t).length&&e.traverse((function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){const n=t[e.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(n,e.bindMatrix)}}))}setTexturePath(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)}},ObjectSpaceNormalMap:1,OctahedronBufferGeometry:DN,OctahedronGeometry:DN,OneFactor:201,OneMinusDstAlphaFactor:207,OneMinusDstColorFactor:209,OneMinusSrcAlphaFactor:205,OneMinusSrcColorFactor:203,OrthographicCamera:uF,PCFShadowMap:1,PCFSoftShadowMap:2,PMREMGenerator:class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=function(e){const t=new Float32Array(e),n=new GP(0,1,0);return new XN({name:"SphericalGaussianBlur",defines:{n:e},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n},inputEncoding:{value:qH[3e3]},outputEncoding:{value:qH[3e3]}},vertexShader:dU(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t${hU()}\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t`,blending:0,depthTest:!1,depthWrite:!1})}(20),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){eU=this._renderer.getRenderTarget();const i=this._allocateTargets();return this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e){return this._fromTexture(e)}fromCubemap(e){return this._fromTexture(e)}compileCubemapShader(){null===this._cubemapShader&&(this._cubemapShader=uU(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){null===this._equirectShader&&(this._equirectShader=cU(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(let e=0;e<ZH.length;e++)ZH[e].dispose()}_cleanup(e){this._pingPongRenderTarget.dispose(),this._renderer.setRenderTarget(eU),e.scissorTest=!1,lU(e,0,0,e.width,e.height)}_fromTexture(e){eU=this._renderer.getRenderTarget();const t=this._allocateTargets(e);return this._textureToCubeUV(e,t),this._applyPMREM(t),this._cleanup(t),t}_allocateTargets(e){const t={magFilter:1003,minFilter:1003,generateMipmaps:!1,type:1009,format:1023,encoding:oU(e)?e.encoding:3002,depthBuffer:!1},n=sU(t);return n.depthBuffer=!e,this._pingPongRenderTarget=sU(t),n}_compileMaterial(e){const t=new aO(ZH[0],e);this._renderer.compile(t,$H)}_sceneToCubeUV(e,t,n,r){const i=new pO(90,1,t,n),o=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],s=this._renderer,l=s.autoClear,c=s.outputEncoding,u=s.toneMapping;s.getClearColor(KH),s.toneMapping=0,s.outputEncoding=3e3,s.autoClear=!1;let d=!1;const h=e.background;if(h){if(h.isColor){XH.color.copy(h).convertSRGBToLinear(),e.background=null;const t=iU(XH.color);XH.opacity=t,d=!0}}else{XH.color.copy(KH).convertSRGBToLinear();const e=iU(XH.color);XH.opacity=e,d=!0}for(let f=0;f<6;f++){const t=f%3;0==t?(i.up.set(0,o[f],0),i.lookAt(a[f],0,0)):1==t?(i.up.set(0,0,o[f]),i.lookAt(0,a[f],0)):(i.up.set(0,o[f],0),i.lookAt(0,0,a[f])),lU(r,t*VH,f>2?VH:0,VH,VH),s.setRenderTarget(r),d&&s.render(YH,i),s.render(e,i)}s.toneMapping=u,s.outputEncoding=c,s.autoClear=l}_textureToCubeUV(e,t){const n=this._renderer;e.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=uU()):null==this._equirectShader&&(this._equirectShader=cU());const r=e.isCubeTexture?this._cubemapShader:this._equirectShader,i=new aO(ZH[0],r),o=r.uniforms;o.envMap.value=e,e.isCubeTexture||o.texelSize.value.set(1/e.image.width,1/e.image.height),o.inputEncoding.value=qH[e.encoding],o.outputEncoding.value=qH[t.texture.encoding],lU(t,0,0,3*VH,2*VH),n.setRenderTarget(t),n.render(i,$H)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let r=1;r<GH;r++){const t=Math.sqrt(QH[r]*QH[r]-QH[r-1]*QH[r-1]),n=rU[(r-1)%rU.length];this._blur(e,r-1,r,t,n)}t.autoClear=n}_blur(e,t,n,r,i){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,r,"latitudinal",i),this._halfBlur(o,e,n,n,r,"longitudinal",i)}_halfBlur(e,t,n,r,i,o,a){const s=this._renderer,l=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&console.error("blur direction must be either latitudinal or longitudinal!");const c=new aO(ZH[r],l),u=l.uniforms,d=JH[n]-1,h=isFinite(i)?Math.PI/(2*d):2*Math.PI/39,f=i/h,p=isFinite(i)?1+Math.floor(3*f):20;p>20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);const m=[];let g=0;for(let y=0;y<20;++y){const e=y/f,t=Math.exp(-e*e/2);m.push(t),0==y?g+=t:y<p&&(g+=2*t)}for(let y=0;y<m.length;y++)m[y]=m[y]/g;u.envMap.value=e.texture,u.samples.value=p,u.weights.value=m,u.latitudinal.value="latitudinal"===o,a&&(u.poleAxis.value=a),u.dTheta.value=h,u.mipInt.value=8-n,u.inputEncoding.value=qH[e.texture.encoding],u.outputEncoding.value=qH[e.texture.encoding];const v=JH[r];lU(t,3*Math.max(0,VH-2*v),(0===r?0:2*VH)+2*v*(r>4?r-8+4:0),3*v,2*v),s.setRenderTarget(t),s.render(c,$H)}},ParametricBufferGeometry:IN,ParametricGeometry:IN,Particle:function(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new rz(e)},ParticleBasicMaterial:function(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Iz(e)},ParticleSystem:function(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new Hz(e,t)},ParticleSystemMaterial:function(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Iz(e)},Path:$B,PerspectiveCamera:pO,Plane:JL,PlaneBufferGeometry:SO,PlaneGeometry:SO,PlaneHelper:class extends Pz{constructor(e,t=1,n=16776960){const r=n,i=new jR;i.setAttribute("position",new PR([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),i.computeBoundingSphere(),super(i,new Mz({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const o=new jR;o.setAttribute("position",new PR([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new aO(o,new yR({color:r,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){let t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.children[0].material.side=t<0?1:0,this.lookAt(this.plane.normal),super.updateMatrixWorld(e)}},PointCloud:function(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new Hz(e,t)},PointCloudMaterial:function(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Iz(e)},PointLight:cF,PointLightHelper:class extends aO{constructor(e,t,n){super(new BN(t,4,2),new yR({wireframe:!0,fog:!1,toneMapped:!1})),this.light=e,this.light.updateMatrixWorld(),this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}},Points:Hz,PointsMaterial:Iz,PolarGridHelper:class extends Oz{constructor(e=10,t=16,n=8,r=64,i=4473924,o=8947848){i=new vR(i),o=new vR(o);const a=[],s=[];for(let c=0;c<=t;c++){const n=c/t*(2*Math.PI),r=Math.sin(n)*e,l=Math.cos(n)*e;a.push(0,0,0),a.push(r,0,l);const u=1&c?i:o;s.push(u.r,u.g,u.b),s.push(u.r,u.g,u.b)}for(let c=0;c<=n;c++){const t=1&c?i:o,l=e-e/n*c;for(let e=0;e<r;e++){let n=e/r*(2*Math.PI),i=Math.sin(n)*l,o=Math.cos(n)*l;a.push(i,0,o),s.push(t.r,t.g,t.b),n=(e+1)/r*(2*Math.PI),i=Math.sin(n)*l,o=Math.cos(n)*l,a.push(i,0,o),s.push(t.r,t.g,t.b)}}const l=new jR;l.setAttribute("position",new PR(a,3)),l.setAttribute("color",new PR(s,3));super(l,new Mz({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}},PolyhedronBufferGeometry:$z,PolyhedronGeometry:$z,PositionalAudio:class extends jF{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(VF,WF,GF),qF.set(0,0,1).applyQuaternion(WF);const t=this.panner;if(t.positionX){const e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(VF.x,e),t.positionY.linearRampToValueAtTime(VF.y,e),t.positionZ.linearRampToValueAtTime(VF.z,e),t.orientationX.linearRampToValueAtTime(qF.x,e),t.orientationY.linearRampToValueAtTime(qF.y,e),t.orientationZ.linearRampToValueAtTime(qF.z,e)}else t.setPosition(VF.x,VF.y,VF.z),t.setOrientation(qF.x,qF.y,qF.z)}},PropertyBinding:rH,PropertyMixer:YF,QuadraticBezierCurve:WB,QuadraticBezierCurve3:GB,Quaternion:WP,QuaternionKeyframeTrack:fB,QuaternionLinearInterpolant:hB,REVISION:"129",RGBADepthPacking:3201,RGBAFormat:1023,RGBAIntegerFormat:1033,RGBA_ASTC_10x10_Format:37819,RGBA_ASTC_10x5_Format:37816,RGBA_ASTC_10x6_Format:37817,RGBA_ASTC_10x8_Format:37818,RGBA_ASTC_12x10_Format:37820,RGBA_ASTC_12x12_Format:37821,RGBA_ASTC_4x4_Format:37808,RGBA_ASTC_5x4_Format:37809,RGBA_ASTC_5x5_Format:37810,RGBA_ASTC_6x5_Format:37811,RGBA_ASTC_6x6_Format:37812,RGBA_ASTC_8x5_Format:37813,RGBA_ASTC_8x6_Format:37814,RGBA_ASTC_8x8_Format:37815,RGBA_BPTC_Format:36492,RGBA_ETC2_EAC_Format:37496,RGBA_PVRTC_2BPPV1_Format:35843,RGBA_PVRTC_4BPPV1_Format:35842,RGBA_S3TC_DXT1_Format:33777,RGBA_S3TC_DXT3_Format:33778,RGBA_S3TC_DXT5_Format:33779,RGBDEncoding:3006,RGBEEncoding:3002,RGBEFormat:1023,RGBFormat:1022,RGBIntegerFormat:1032,RGBM16Encoding:3005,RGBM7Encoding:3004,RGB_ETC1_Format:36196,RGB_ETC2_Format:37492,RGB_PVRTC_2BPPV1_Format:35841,RGB_PVRTC_4BPPV1_Format:35840,RGB_S3TC_DXT1_Format:33776,RGFormat:1030,RGIntegerFormat:1031,RawShaderMaterial:XN,Ray:_L,Raycaster:uH,RectAreaLight:pF,RedFormat:1028,RedIntegerFormat:1029,ReinhardToneMapping:2,RepeatWrapping:1e3,ReplaceStencilOp:7681,ReverseSubtractEquation:102,RingBufferGeometry:zN,RingGeometry:zN,SRGB8_ALPHA8_ASTC_10x10_Format:37851,SRGB8_ALPHA8_ASTC_10x5_Format:37848,SRGB8_ALPHA8_ASTC_10x6_Format:37849,SRGB8_ALPHA8_ASTC_10x8_Format:37850,SRGB8_ALPHA8_ASTC_12x10_Format:37852,SRGB8_ALPHA8_ASTC_12x12_Format:37853,SRGB8_ALPHA8_ASTC_4x4_Format:37840,SRGB8_ALPHA8_ASTC_5x4_Format:37841,SRGB8_ALPHA8_ASTC_5x5_Format:37842,SRGB8_ALPHA8_ASTC_6x5_Format:37843,SRGB8_ALPHA8_ASTC_6x6_Format:37844,SRGB8_ALPHA8_ASTC_8x5_Format:37845,SRGB8_ALPHA8_ASTC_8x6_Format:37846,SRGB8_ALPHA8_ASTC_8x8_Format:37847,Scene:FI,SceneUtils:fU,ShaderChunk:MO,ShaderLib:TO,ShaderMaterial:hO,ShadowMaterial:qN,Shape:ZB,ShapeBufferGeometry:NN,ShapeGeometry:NN,ShapePath:TF,ShapeUtils:AN,ShortType:1011,Skeleton:yz,SkeletonHelper:SH,SkinnedMesh:fz,SmoothShading:2,Sphere:fL,SphereBufferGeometry:BN,SphereGeometry:BN,Spherical:class{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){const e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(TP(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}},SphericalHarmonics3:mF,SplineCurve:qB,SpotLight:iF,SpotLightHelper:class extends XL{constructor(e,t){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;const n=new jR,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,s=32;o<s;o++,a++){const e=o/s*Math.PI*2,t=a/s*Math.PI*2;r.push(Math.cos(e),Math.sin(e),1,Math.cos(t),Math.sin(t),1)}n.setAttribute("position",new PR(r,3));const i=new Mz({fog:!1,toneMapped:!1});this.cone=new Oz(n,i),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateMatrixWorld();const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),bH.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(bH),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}},Sprite:rz,SpriteMaterial:VI,SrcAlphaFactor:204,SrcAlphaSaturateFactor:210,SrcColorFactor:202,StaticCopyUsage:35046,StaticDrawUsage:35044,StaticReadUsage:35045,StereoCamera:class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new pO,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new pO,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep;const n=e.projectionMatrix.clone(),r=t.eyeSep/2,i=r*t.near/t.focus,o=t.near*Math.tan(SP*t.fov*.5)/t.zoom;let a,s;IF.elements[12]=-r,DF.elements[12]=r,a=-o*t.aspect+i,s=o*t.aspect+i,n.elements[0]=2*t.near/(s-a),n.elements[8]=(s+a)/(s-a),this.cameraL.projectionMatrix.copy(n),a=-o*t.aspect-i,s=o*t.aspect-i,n.elements[0]=2*t.near/(s-a),n.elements[8]=(s+a)/(s-a),this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(IF),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(DF)}},StreamCopyUsage:35042,StreamDrawUsage:35040,StreamReadUsage:35041,StringKeyframeTrack:pB,SubtractEquation:101,SubtractiveBlending:3,TOUCH:{ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},TangentSpaceNormalMap:0,TetrahedronBufferGeometry:FN,TetrahedronGeometry:FN,TextBufferGeometry:HN,TextGeometry:HN,Texture:BP,TextureLoader:AB,TorusBufferGeometry:UN,TorusGeometry:UN,TorusKnotBufferGeometry:jN,TorusKnotGeometry:jN,Triangle:lR,TriangleFanDrawMode:2,TriangleStripDrawMode:1,TrianglesDrawMode:0,TubeBufferGeometry:VN,TubeGeometry:VN,UVMapping:300,Uint16Attribute:function(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new TR(e,t)},Uint16BufferAttribute:TR,Uint32Attribute:function(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new CR(e,t)},Uint32BufferAttribute:CR,Uint8Attribute:function(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new SR(e,t)},Uint8BufferAttribute:SR,Uint8ClampedAttribute:function(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new MR(e,t)},Uint8ClampedBufferAttribute:MR,Uniform:sH,UniformsLib:EO,UniformsUtils:dO,UnsignedByteType:1009,UnsignedInt248Type:1020,UnsignedIntType:1014,UnsignedShort4444Type:1017,UnsignedShort5551Type:1018,UnsignedShort565Type:1019,UnsignedShortType:1012,VSMShadowMap:3,Vector2:OP,Vector3:GP,Vector4:HP,VectorKeyframeTrack:mB,Vertex:function(e,t,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new GP(e,t,n)},VertexColors:2,VideoTexture:jz,WebGL1Renderer:zI,WebGLCubeRenderTarget:vO,WebGLMultipleRenderTargets:jP,WebGLMultisampleRenderTarget:VP,WebGLRenderTarget:UP,WebGLRenderTargetCube:function(e,t,n){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new vO(e,n)},WebGLRenderer:II,WebGLUtils:CI,WireframeGeometry:WN,WireframeHelper:function(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Oz(new WN(e.geometry),new Mz({color:void 0!==t?t:16777215}))},WrapAroundEnding:2402,XHRLoader:function(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new SB(e)},ZeroCurvatureEnding:2400,ZeroFactor:200,ZeroSlopeEnding:2401,ZeroStencilOp:0,sRGBEncoding:3001});function mU(e){let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(i!==t){const e=t;t=r?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,o={setState:r,getState:i,subscribe:(e,r,o)=>r||o?((e,r=i,o=Object.is)=>{let a=r(t);function s(){const n=r(t);if(!o(a,n)){const t=a;e(a=n,t)}}return n.add(s),()=>n.delete(s)})(e,r,o):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,i,o),o}const gU="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?h.exports.useEffect:h.exports.useLayoutEffect;function vU(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}var yU={exports:{}},bU={exports:{}};
/** @license React v0.26.2
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
!function(e){e.exports=function(t){var n={},r=y,i=h.exports,o=Q.exports;function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=60103,c=60106,u=60107,d=60108,f=60114,p=60109,m=60110,g=60112,v=60113,b=60120,x=60115,_=60116,w=60121,S=60129,M=60130,E=60131;if("function"==typeof Symbol&&Symbol.for){var T=Symbol.for;l=T("react.element"),c=T("react.portal"),u=T("react.fragment"),d=T("react.strict_mode"),f=T("react.profiler"),p=T("react.provider"),m=T("react.context"),g=T("react.forward_ref"),v=T("react.suspense"),b=T("react.suspense_list"),x=T("react.memo"),_=T("react.lazy"),w=T("react.block"),T("react.scope"),S=T("react.debug_trace_mode"),M=T("react.offscreen"),E=T("react.legacy_hidden")}var A="function"==typeof Symbol&&Symbol.iterator;function C(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=A&&e[A]||e["@@iterator"])?e:null}function k(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case u:return"Fragment";case c:return"Portal";case f:return"Profiler";case d:return"StrictMode";case v:return"Suspense";case b:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case m:return(e.displayName||"Context")+".Consumer";case p:return(e._context.displayName||"Context")+".Provider";case g:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case x:return k(e.type);case w:return k(e._render);case _:t=e._payload,e=e._init;try{return k(e(t))}catch(n){}}return null}function P(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function L(e){if(P(e)!==e)throw Error(a(188))}function R(e){var t=e.alternate;if(!t){if(null===(t=P(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return L(i),e;if(o===r)return L(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}function O(e){if(!(e=R(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function D(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var I,z=t.getPublicInstance,N=t.getRootHostContext,B=t.getChildHostContext,F=t.prepareForCommit,H=t.resetAfterCommit,U=t.createInstance,j=t.appendInitialChild,V=t.finalizeInitialChildren,W=t.prepareUpdate,G=t.shouldSetTextContent,q=t.createTextInstance,X=t.scheduleTimeout,Y=t.cancelTimeout,$=t.noTimeout,Z=t.isPrimaryRenderer,J=t.supportsMutation,K=t.supportsPersistence,ee=t.supportsHydration,te=t.getInstanceFromNode,ne=t.makeOpaqueHydratingObject,re=t.makeClientId,ie=t.beforeActiveInstanceBlur,oe=t.afterActiveInstanceBlur,ae=t.preparePortalMount,se=t.supportsTestSelectors,le=t.findFiberRoot,ce=t.getBoundingRect,ue=t.getTextContent,de=t.isHiddenSubtree,he=t.matchAccessibilityRole,fe=t.setFocusIfFocusable,pe=t.setupIntersectionObserver,me=t.appendChild,ge=t.appendChildToContainer,ve=t.commitTextUpdate,ye=t.commitMount,be=t.commitUpdate,xe=t.insertBefore,_e=t.insertInContainerBefore,we=t.removeChild,Se=t.removeChildFromContainer,Me=t.resetTextContent,Ee=t.hideInstance,Te=t.hideTextInstance,Ae=t.unhideInstance,Ce=t.unhideTextInstance,ke=t.clearContainer,Pe=t.cloneInstance,Le=t.createContainerChildSet,Re=t.appendChildToContainerChildSet,Oe=t.finalizeContainerChildren,De=t.replaceContainerChildren,Ie=t.cloneHiddenInstance,ze=t.cloneHiddenTextInstance,Ne=t.canHydrateInstance,Be=t.canHydrateTextInstance,Fe=t.isSuspenseInstancePending,He=t.isSuspenseInstanceFallback,Ue=t.getNextHydratableSibling,je=t.getFirstHydratableChild,Ve=t.hydrateInstance,We=t.hydrateTextInstance,Ge=t.getNextHydratableInstanceAfterSuspenseInstance,qe=t.commitHydratedContainer,Xe=t.commitHydratedSuspenseInstance;function Ye(e){if(void 0===I)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);I=t&&t[1]||""}return"\n"+I+e}var $e=!1;function Ze(e,t){if(!e||$e)return"";$e=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"==typeof l.stack){for(var i=l.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{$e=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ye(e):""}var Je=[],Qe=-1;function Ke(e){return{current:e}}function et(e){0>Qe||(e.current=Je[Qe],Je[Qe]=null,Qe--)}function tt(e,t){Qe++,Je[Qe]=e.current,e.current=t}var nt={},rt=Ke(nt),it=Ke(!1),ot=nt;function at(e,t){var n=e.type.contextTypes;if(!n)return nt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function st(e){return null!=(e=e.childContextTypes)}function lt(){et(it),et(rt)}function ct(e,t,n){if(rt.current!==nt)throw Error(a(168));tt(rt,t),tt(it,n)}function ut(e,t,n){var i=e.stateNode;if(e=t.childContextTypes,"function"!=typeof i.getChildContext)return n;for(var o in i=i.getChildContext())if(!(o in e))throw Error(a(108,k(t)||"Unknown",o));return r({},n,i)}function dt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||nt,ot=rt.current,tt(rt,e),tt(it,it.current),!0}function ht(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=ut(e,t,ot),r.__reactInternalMemoizedMergedChildContext=e,et(it),et(rt),tt(rt,e)):et(it),tt(it,n)}var ft=null,pt=null;(0,o.unstable_now)();var mt=0,gt=8;function vt(e){if(0!=(1&e))return gt=15,1;if(0!=(2&e))return gt=14,2;if(0!=(4&e))return gt=13,4;var t=24&e;return 0!==t?(gt=12,t):0!=(32&e)?(gt=11,32):0!==(t=192&e)?(gt=10,t):0!=(256&e)?(gt=9,256):0!==(t=3584&e)?(gt=8,t):0!=(4096&e)?(gt=7,4096):0!==(t=4186112&e)?(gt=6,t):0!==(t=62914560&e)?(gt=5,t):67108864&e?(gt=4,67108864):0!=(134217728&e)?(gt=3,134217728):0!==(t=805306368&e)?(gt=2,t):0!=(1073741824&e)?(gt=1,1073741824):(gt=8,e)}function yt(e,t){var n=e.pendingLanes;if(0===n)return gt=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)r=o,i=gt=15;else if(0!==(o=134217727&n)){var l=o&~a;0!==l?(r=vt(l),i=gt):0!==(s&=o)&&(r=vt(s),i=gt)}else 0!==(o=n&~a)?(r=vt(o),i=gt):0!==s&&(r=vt(s),i=gt);if(0===r)return 0;if(r=n&((0>(r=31-Mt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&a)){if(vt(t),i<=gt)return t;gt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Mt(t)),r|=e[n],t&=~i;return r}function bt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function xt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=_t(24&~t))?xt(10,t):e;case 10:return 0===(e=_t(192&~t))?xt(8,t):e;case 8:return 0===(e=_t(3584&~t))&&(0===(e=_t(4186112&~t))&&(e=512)),e;case 2:return 0===(t=_t(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function _t(e){return e&-e}function wt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function St(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Mt(t)]=n}var Mt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Et(e)/Tt|0)|0},Et=Math.log,Tt=Math.LN2;var At=o.unstable_runWithPriority,Ct=o.unstable_scheduleCallback,kt=o.unstable_cancelCallback,Pt=o.unstable_shouldYield,Lt=o.unstable_requestPaint,Rt=o.unstable_now,Ot=o.unstable_getCurrentPriorityLevel,Dt=o.unstable_ImmediatePriority,It=o.unstable_UserBlockingPriority,zt=o.unstable_NormalPriority,Nt=o.unstable_LowPriority,Bt=o.unstable_IdlePriority,Ft={},Ht=void 0!==Lt?Lt:function(){},Ut=null,jt=null,Vt=!1,Wt=Rt(),Gt=1e4>Wt?Rt:function(){return Rt()-Wt};function qt(){switch(Ot()){case Dt:return 99;case It:return 98;case zt:return 97;case Nt:return 96;case Bt:return 95;default:throw Error(a(332))}}function Xt(e){switch(e){case 99:return Dt;case 98:return It;case 97:return zt;case 96:return Nt;case 95:return Bt;default:throw Error(a(332))}}function Yt(e,t){return e=Xt(e),At(e,t)}function $t(e,t,n){return e=Xt(e),Ct(e,t,n)}function Zt(){if(null!==jt){var e=jt;jt=null,kt(e)}Jt()}function Jt(){if(!Vt&&null!==Ut){Vt=!0;var e=0;try{var t=Ut;Yt(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ut=null}catch(n){throw null!==Ut&&(Ut=Ut.slice(e+1)),Ct(Dt,Zt),n}finally{Vt=!1}}}var Qt=s.ReactCurrentBatchConfig;var Kt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},en=Object.prototype.hasOwnProperty;function tn(e,t){if(Kt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!en.call(t,n[r])||!Kt(e[n[r]],t[n[r]]))return!1;return!0}function nn(e){switch(e.tag){case 5:return Ye(e.type);case 16:return Ye("Lazy");case 13:return Ye("Suspense");case 19:return Ye("SuspenseList");case 0:case 2:case 15:return e=Ze(e.type,!1);case 11:return e=Ze(e.type.render,!1);case 22:return e=Ze(e.type._render,!1);case 1:return e=Ze(e.type,!0);default:return""}}function rn(e,t){if(e&&e.defaultProps){for(var n in t=r({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var on=Ke(null),an=null,sn=null,ln=null;function cn(){ln=sn=an=null}function un(e,t){e=e.type._context,Z?(tt(on,e._currentValue),e._currentValue=t):(tt(on,e._currentValue2),e._currentValue2=t)}function dn(e){var t=on.current;et(on),e=e.type._context,Z?e._currentValue=t:e._currentValue2=t}function hn(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function fn(e,t){an=e,ln=sn=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Wr=!0),e.firstContext=null)}function pn(e,t){if(ln!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(ln=e,t=1073741823),t={context:e,observedBits:t,next:null},null===sn){if(null===an)throw Error(a(308));sn=t,an.dependencies={lanes:0,firstContext:t,responders:null}}else sn=sn.next=t;return Z?e._currentValue:e._currentValue2}var mn=!1;function gn(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function vn(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bn(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function xn(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _n(e,t,n,i){var o=e.updateQueue;mn=!1;var a=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var c=l,u=c.next;c.next=null,null===s?a=u:s.next=u,s=c;var d=e.alternate;if(null!==d){var h=(d=d.updateQueue).lastBaseUpdate;h!==s&&(null===h?d.firstBaseUpdate=u:h.next=u,d.lastBaseUpdate=c)}}if(null!==a){for(h=o.baseState,s=0,d=u=c=null;;){l=a.lane;var f=a.eventTime;if((i&l)===l){null!==d&&(d=d.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(l=t,f=n,m.tag){case 1:if("function"==typeof(p=m.payload)){h=p.call(f,h,l);break e}h=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null==(l="function"==typeof(p=m.payload)?p.call(f,h,l):p))break e;h=r({},h,l);break e;case 2:mn=!0}}null!==a.callback&&(e.flags|=32,null===(l=o.effects)?o.effects=[a]:l.push(a))}else f={eventTime:f,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===d?(u=d=f,c=h):d=d.next=f,s|=l;if(null===(a=a.next)){if(null===(l=o.shared.pending))break;a=l.next,l.next=null,o.lastBaseUpdate=l,o.shared.pending=null}}null===d&&(c=h),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,po|=s,e.lanes=s,e.memoizedState=h}}function wn(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var Sn=(new i.Component).refs;function Mn(e,t,n,i){n=null==(n=n(i,t=e.memoizedState))?t:r({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var En={isMounted:function(e){return!!(e=e._reactInternals)&&P(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fo(),i=Ho(e),o=yn(r,i);o.payload=t,null!=n&&(o.callback=n),bn(e,o),Uo(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fo(),i=Ho(e),o=yn(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),bn(e,o),Uo(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fo(),r=Ho(e),i=yn(n,r);i.tag=2,null!=t&&(i.callback=t),bn(e,i),Uo(e,r,n)}};function Tn(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!tn(n,r)||!tn(i,o))}function An(e,t,n){var r=!1,i=nt,o=t.contextType;return"object"==typeof o&&null!==o?o=pn(o):(i=st(t)?ot:rt.current,o=(r=null!=(r=t.contextTypes))?at(e,i):nt),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=En,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Cn(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&En.enqueueReplaceState(t,t.state,null)}function kn(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Sn,gn(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=pn(o):(o=st(t)?ot:rt.current,i.context=at(e,o)),_n(e,n,i,r),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(Mn(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&En.enqueueReplaceState(i,i.state,null),_n(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4)}var Pn=Array.isArray;function Ln(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===Sn&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Rn(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function On(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Ta(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function d(e,t,n,r){return null===t||6!==t.tag?((t=Pa(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=Ln(e,t,n),r.return=e,r):((r=Aa(n.type,n.key,n.props,null,e.mode,r)).ref=Ln(e,t,n),r.return=e,r)}function f(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=La(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function p(e,t,n,r,o){return null===t||7!==t.tag?((t=Ca(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function m(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Pa(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case l:return(n=Aa(t.type,t.key,t.props,null,e.mode,n)).ref=Ln(e,null,t),n.return=e,n;case c:return(t=La(t,e.mode,n)).return=e,t}if(Pn(t)||C(t))return(t=Ca(t,e.mode,n,null)).return=e,t;Rn(e,t)}return null}function g(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:d(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case l:return n.key===i?n.type===u?p(e,t,n.props.children,r,i):h(e,t,n,r):null;case c:return n.key===i?f(e,t,n,r):null}if(Pn(n)||C(n))return null!==i?null:p(e,t,n,r,null);Rn(e,n)}return null}function v(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return d(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case l:return e=e.get(null===r.key?n:r.key)||null,r.type===u?p(t,e,r.props.children,i,r.key):h(t,e,r,i);case c:return f(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Pn(r)||C(r))return p(t,e=e.get(n)||null,r,i,null);Rn(t,r)}return null}return function(d,h,f,p){var y="object"==typeof f&&null!==f&&f.type===u&&null===f.key;y&&(f=f.props.children);var b="object"==typeof f&&null!==f;if(b)switch(f.$$typeof){case l:e:{for(b=f.key,y=h;null!==y;){if(y.key===b){switch(y.tag){case 7:if(f.type===u){n(d,y.sibling),(h=i(y,f.props.children)).return=d,d=h;break e}break;default:if(y.elementType===f.type){n(d,y.sibling),(h=i(y,f.props)).ref=Ln(d,y,f),h.return=d,d=h;break e}}n(d,y);break}t(d,y),y=y.sibling}f.type===u?((h=Ca(f.props.children,d.mode,p,f.key)).return=d,d=h):((p=Aa(f.type,f.key,f.props,null,d.mode,p)).ref=Ln(d,h,f),p.return=d,d=p)}return s(d);case c:e:{for(y=f.key;null!==h;){if(h.key===y){if(4===h.tag&&h.stateNode.containerInfo===f.containerInfo&&h.stateNode.implementation===f.implementation){n(d,h.sibling),(h=i(h,f.children||[])).return=d,d=h;break e}n(d,h);break}t(d,h),h=h.sibling}(h=La(f,d.mode,p)).return=d,d=h}return s(d)}if("string"==typeof f||"number"==typeof f)return f=""+f,null!==h&&6===h.tag?(n(d,h.sibling),(h=i(h,f)).return=d,d=h):(n(d,h),(h=Pa(f,d.mode,p)).return=d,d=h),s(d);if(Pn(f))return function(i,a,s,l){for(var c=null,u=null,d=a,h=a=0,f=null;null!==d&&h<s.length;h++){d.index>h?(f=d,d=null):f=d.sibling;var p=g(i,d,s[h],l);if(null===p){null===d&&(d=f);break}e&&d&&null===p.alternate&&t(i,d),a=o(p,a,h),null===u?c=p:u.sibling=p,u=p,d=f}if(h===s.length)return n(i,d),c;if(null===d){for(;h<s.length;h++)null!==(d=m(i,s[h],l))&&(a=o(d,a,h),null===u?c=d:u.sibling=d,u=d);return c}for(d=r(i,d);h<s.length;h++)null!==(f=v(d,i,h,s[h],l))&&(e&&null!==f.alternate&&d.delete(null===f.key?h:f.key),a=o(f,a,h),null===u?c=f:u.sibling=f,u=f);return e&&d.forEach((function(e){return t(i,e)})),c}(d,h,f,p);if(C(f))return function(i,s,l,c){var u=C(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,h=s,f=s=0,p=null,y=l.next();null!==h&&!y.done;f++,y=l.next()){h.index>f?(p=h,h=null):p=h.sibling;var b=g(i,h,y.value,c);if(null===b){null===h&&(h=p);break}e&&h&&null===b.alternate&&t(i,h),s=o(b,s,f),null===d?u=b:d.sibling=b,d=b,h=p}if(y.done)return n(i,h),u;if(null===h){for(;!y.done;f++,y=l.next())null!==(y=m(i,y.value,c))&&(s=o(y,s,f),null===d?u=y:d.sibling=y,d=y);return u}for(h=r(i,h);!y.done;f++,y=l.next())null!==(y=v(h,i,f,y.value,c))&&(e&&null!==y.alternate&&h.delete(null===y.key?f:y.key),s=o(y,s,f),null===d?u=y:d.sibling=y,d=y);return e&&h.forEach((function(e){return t(i,e)})),u}(d,h,f,p);if(b&&Rn(d,f),void 0===f&&!y)switch(d.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,k(d.type)||"Component"))}return n(d,h)}}var Dn=On(!0),In=On(!1),zn={},Nn=Ke(zn),Bn=Ke(zn),Fn=Ke(zn);function Hn(e){if(e===zn)throw Error(a(174));return e}function Un(e,t){tt(Fn,t),tt(Bn,e),tt(Nn,zn),e=N(t),et(Nn),tt(Nn,e)}function jn(){et(Nn),et(Bn),et(Fn)}function Vn(e){var t=Hn(Fn.current),n=Hn(Nn.current);n!==(t=B(n,e.type,t))&&(tt(Bn,e),tt(Nn,t))}function Wn(e){Bn.current===e&&(et(Nn),et(Bn))}var Gn=Ke(0);function qn(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Fe(n)||He(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Xn=null,Yn=null,$n=!1;function Zn(e,t){var n=Ma(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Jn(e,t){switch(e.tag){case 5:return null!==(t=Ne(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=Be(t,e.pendingProps))&&(e.stateNode=t,!0);case 13:default:return!1}}function Qn(e){if($n){var t=Yn;if(t){var n=t;if(!Jn(e,t)){if(!(t=Ue(n))||!Jn(e,t))return e.flags=-1025&e.flags|2,$n=!1,void(Xn=e);Zn(Xn,n)}Xn=e,Yn=je(t)}else e.flags=-1025&e.flags|2,$n=!1,Xn=e}}function Kn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Xn=e}function er(e){if(!ee||e!==Xn)return!1;if(!$n)return Kn(e),$n=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!G(t,e.memoizedProps))for(t=Yn;t;)Zn(e,t),t=Ue(t);if(Kn(e),13===e.tag){if(!ee)throw Error(a(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));Yn=Ge(e)}else Yn=Xn?Ue(e.stateNode):null;return!0}function tr(){ee&&(Yn=Xn=null,$n=!1)}var nr=[];function rr(){for(var e=0;e<nr.length;e++){var t=nr[e];Z?t._workInProgressVersionPrimary=null:t._workInProgressVersionSecondary=null}nr.length=0}var ir=s.ReactCurrentDispatcher,or=s.ReactCurrentBatchConfig,ar=0,sr=null,lr=null,cr=null,ur=!1,dr=!1;function hr(){throw Error(a(321))}function fr(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Kt(e[n],t[n]))return!1;return!0}function pr(e,t,n,r,i,o){if(ar=o,sr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ir.current=null===e||null===e.memoizedState?Hr:Ur,e=n(r,i),dr){o=0;do{if(dr=!1,!(25>o))throw Error(a(301));o+=1,cr=lr=null,t.updateQueue=null,ir.current=jr,e=n(r,i)}while(dr)}if(ir.current=Fr,t=null!==lr&&null!==lr.next,ar=0,cr=lr=sr=null,ur=!1,t)throw Error(a(300));return e}function mr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===cr?sr.memoizedState=cr=e:cr=cr.next=e,cr}function gr(){if(null===lr){var e=sr.alternate;e=null!==e?e.memoizedState:null}else e=lr.next;var t=null===cr?sr.memoizedState:cr.next;if(null!==t)cr=t,lr=e;else{if(null===e)throw Error(a(310));e={memoizedState:(lr=e).memoizedState,baseState:lr.baseState,baseQueue:lr.baseQueue,queue:lr.queue,next:null},null===cr?sr.memoizedState=cr=e:cr=cr.next=e}return cr}function vr(e,t){return"function"==typeof t?t(e):t}function yr(e){var t=gr(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=lr,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=s=o=null,c=i;do{var u=c.lane;if((ar&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=d,o=r):l=l.next=d,sr.lanes|=u,po|=u}c=c.next}while(null!==c&&c!==i);null===l?o=r:l.next=s,Kt(r,t.memoizedState)||(Wr=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function br(e){var t=gr(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Kt(o,t.memoizedState)||(Wr=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function xr(e,t,n){var r=t._getVersion;r=r(t._source);var i=Z?t._workInProgressVersionPrimary:t._workInProgressVersionSecondary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(ar&e)===e)&&(Z?t._workInProgressVersionPrimary=r:t._workInProgressVersionSecondary=r,nr.push(t))),e)return n(t._source);throw nr.push(t),Error(a(350))}function _r(e,t,n,r){var i=oo;if(null===i)throw Error(a(349));var o=t._getVersion,s=o(t._source),l=ir.current,c=l.useState((function(){return xr(i,t,n)})),u=c[1],d=c[0];c=cr;var h=e.memoizedState,f=h.refs,p=f.getSnapshot,m=h.source;h=h.subscribe;var g=sr;return e.memoizedState={refs:f,source:t,subscribe:r},l.useEffect((function(){f.getSnapshot=n,f.setSnapshot=u;var e=o(t._source);if(!Kt(s,e)){e=n(t._source),Kt(d,e)||(u(e),e=Ho(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,a=e;0<a;){var l=31-Mt(a),c=1<<l;r[l]|=e,a&=~c}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=f.getSnapshot,n=f.setSnapshot;try{n(e(t._source));var r=Ho(g);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),Kt(p,n)&&Kt(m,t)&&Kt(h,r)||((e={pending:null,dispatch:null,lastRenderedReducer:vr,lastRenderedState:d}).dispatch=u=Br.bind(null,sr,e),c.queue=e,c.baseQueue=null,d=xr(i,t,n),c.memoizedState=c.baseState=d),d}function wr(e,t,n){return _r(gr(),e,t,n)}function Sr(e){var t=mr();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:vr,lastRenderedState:e}).dispatch=Br.bind(null,sr,e),[t.memoizedState,e]}function Mr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=sr.updateQueue)?(t={lastEffect:null},sr.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Er(e){return e={current:e},mr().memoizedState=e}function Tr(){return gr().memoizedState}function Ar(e,t,n,r){var i=mr();sr.flags|=e,i.memoizedState=Mr(1|t,n,void 0,void 0===r?null:r)}function Cr(e,t,n,r){var i=gr();r=void 0===r?null:r;var o=void 0;if(null!==lr){var a=lr.memoizedState;if(o=a.destroy,null!==r&&fr(r,a.deps))return void Mr(t,n,o,r)}sr.flags|=e,i.memoizedState=Mr(1|t,n,o,r)}function kr(e,t){return Ar(516,4,e,t)}function Pr(e,t){return Cr(516,4,e,t)}function Lr(e,t){return Cr(4,2,e,t)}function Rr(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Or(e,t,n){return n=null!=n?n.concat([e]):null,Cr(4,2,Rr.bind(null,t,e),n)}function Dr(){}function Ir(e,t){var n=gr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&fr(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function zr(e,t){var n=gr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&fr(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Nr(e,t){var n=qt();Yt(98>n?98:n,(function(){e(!0)})),Yt(97<n?97:n,(function(){var n=or.transition;or.transition=1;try{e(!1),t()}finally{or.transition=n}}))}function Br(e,t,n){var r=Fo(),i=Ho(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===sr||null!==a&&a===sr)dr=ur=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(o.eagerReducer=a,o.eagerState=l,Kt(l,s))return}catch(c){}Uo(e,i,r)}}var Fr={readContext:pn,useCallback:hr,useContext:hr,useEffect:hr,useImperativeHandle:hr,useLayoutEffect:hr,useMemo:hr,useReducer:hr,useRef:hr,useState:hr,useDebugValue:hr,useDeferredValue:hr,useTransition:hr,useMutableSource:hr,useOpaqueIdentifier:hr,unstable_isNewReconciler:!1},Hr={readContext:pn,useCallback:function(e,t){return mr().memoizedState=[e,void 0===t?null:t],e},useContext:pn,useEffect:kr,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ar(4,2,Rr.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ar(4,2,e,t)},useMemo:function(e,t){var n=mr();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=mr();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Br.bind(null,sr,e),[r.memoizedState,e]},useRef:Er,useState:Sr,useDebugValue:Dr,useDeferredValue:function(e){var t=Sr(e),n=t[0],r=t[1];return kr((function(){var t=or.transition;or.transition=1;try{r(e)}finally{or.transition=t}}),[e]),n},useTransition:function(){var e=Sr(!1),t=e[0];return Er(e=Nr.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=mr();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},_r(r,e,t,n)},useOpaqueIdentifier:function(){if($n){var e=!1,t=ne((function(){throw e||(e=!0,n(re())),Error(a(355))})),n=Sr(t)[1];return 0==(2&sr.mode)&&(sr.flags|=516,Mr(5,(function(){n(re())}),void 0,null)),t}return Sr(t=re()),t},unstable_isNewReconciler:!1},Ur={readContext:pn,useCallback:Ir,useContext:pn,useEffect:Pr,useImperativeHandle:Or,useLayoutEffect:Lr,useMemo:zr,useReducer:yr,useRef:Tr,useState:function(){return yr(vr)},useDebugValue:Dr,useDeferredValue:function(e){var t=yr(vr),n=t[0],r=t[1];return Pr((function(){var t=or.transition;or.transition=1;try{r(e)}finally{or.transition=t}}),[e]),n},useTransition:function(){var e=yr(vr)[0];return[Tr().current,e]},useMutableSource:wr,useOpaqueIdentifier:function(){return yr(vr)[0]},unstable_isNewReconciler:!1},jr={readContext:pn,useCallback:Ir,useContext:pn,useEffect:Pr,useImperativeHandle:Or,useLayoutEffect:Lr,useMemo:zr,useReducer:br,useRef:Tr,useState:function(){return br(vr)},useDebugValue:Dr,useDeferredValue:function(e){var t=br(vr),n=t[0],r=t[1];return Pr((function(){var t=or.transition;or.transition=1;try{r(e)}finally{or.transition=t}}),[e]),n},useTransition:function(){var e=br(vr)[0];return[Tr().current,e]},useMutableSource:wr,useOpaqueIdentifier:function(){return br(vr)[0]},unstable_isNewReconciler:!1},Vr=s.ReactCurrentOwner,Wr=!1;function Gr(e,t,n,r){t.child=null===e?In(t,null,n,r):Dn(t,e.child,n,r)}function qr(e,t,n,r,i){n=n.render;var o=t.ref;return fn(t,i),r=pr(e,t,n,r,o,i),null===e||Wr?(t.flags|=1,Gr(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,fi(e,t,i))}function Xr(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||Ea(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Aa(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Yr(e,t,a,r,i,o))}return a=e.child,0==(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:tn)(i,r)&&e.ref===t.ref)?fi(e,t,o):(t.flags|=1,(e=Ta(a,r)).ref=t.ref,e.return=t,t.child=e)}function Yr(e,t,n,r,i,o){if(null!==e&&tn(e.memoizedProps,r)&&e.ref===t.ref){if(Wr=!1,0==(o&i))return t.lanes=e.lanes,fi(e,t,o);0!=(16384&e.flags)&&(Wr=!0)}return Jr(e,t,n,r,o)}function $r(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},$o(t,n);else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},$o(t,e),null;t.memoizedState={baseLanes:0},$o(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,$o(t,r);return Gr(e,t,i,n),t.child}function Zr(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Jr(e,t,n,r,i){var o=st(n)?ot:rt.current;return o=at(t,o),fn(t,i),n=pr(e,t,n,r,o,i),null===e||Wr?(t.flags|=1,Gr(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,fi(e,t,i))}function Qr(e,t,n,r,i){if(st(n)){var o=!0;dt(t)}else o=!1;if(fn(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),An(t,n,r),kn(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=pn(c):c=at(t,c=st(n)?ot:rt.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&Cn(t,a,r,c),mn=!1;var h=t.memoizedState;a.state=h,_n(t,r,a,i),l=t.memoizedState,s!==r||h!==l||it.current||mn?("function"==typeof u&&(Mn(t,n,u,r),l=t.memoizedState),(s=mn||Tn(t,n,s,r,h,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4)):("function"==typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,vn(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:rn(t.type,s),a.props=c,d=t.pendingProps,h=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=pn(l):l=at(t,l=st(n)?ot:rt.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&Cn(t,a,r,l),mn=!1,h=t.memoizedState,a.state=h,_n(t,r,a,i);var p=t.memoizedState;s!==d||h!==p||it.current||mn?("function"==typeof f&&(Mn(t,n,f,r),p=t.memoizedState),(c=mn||Tn(t,n,c,r,h,p,l))?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),r=!1)}return Kr(e,t,n,r,o,i)}function Kr(e,t,n,r,i,o){Zr(e,t);var a=0!=(64&t.flags);if(!r&&!a)return i&&ht(t,n,!1),fi(e,t,o);r=t.stateNode,Vr.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Dn(t,e.child,null,o),t.child=Dn(t,null,s,o)):Gr(e,t,s,o),t.memoizedState=r.state,i&&ht(t,n,!0),t.child}function ei(e){var t=e.stateNode;t.pendingContext?ct(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ct(0,t.context,!1),Un(e,t.containerInfo)}var ti,ni,ri,ii,oi={dehydrated:null,retryLane:0};function ai(e,t,n){var r,i=t.pendingProps,o=Gn.current,a=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),tt(Gn,1&o),null===e?(void 0!==i.fallback&&Qn(t),e=i.children,o=i.fallback,a?(e=si(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=oi,e):"number"==typeof i.unstable_expectedLoadTime?(e=si(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=oi,t.lanes=33554432,e):((n=ka({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=ci(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=oi,i):(n=li(e,t,i.children,n),t.memoizedState=null,n))}function si(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0==(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=ka(t,i,0,null),n=Ca(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function li(e,t,n,r){var i=e.child;return e=i.sibling,n=Ta(i,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ci(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0==(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Ta(a,s),null!==e?r=Ta(e,r):(r=Ca(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ui(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),hn(e.return,t)}function di(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function hi(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Gr(e,t,r.children,n),0!=(2&(r=Gn.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ui(e,n);else if(19===e.tag)ui(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(tt(Gn,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===qn(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),di(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===qn(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}di(t,!0,n,null,o,t.lastEffect);break;case"together":di(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function fi(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),po|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ta(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ta(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function pi(e){e.flags|=4}if(J)ti=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)j(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ni=function(){},ri=function(e,t,n,r,i){if((e=e.memoizedProps)!==r){var o=t.stateNode,a=Hn(Nn.current);n=W(o,n,e,r,i,a),(t.updateQueue=n)&&pi(t)}},ii=function(e,t,n,r){n!==r&&pi(t)};else if(K){ti=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=Ie(o,i.type,i.memoizedProps,i)),j(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=ze(o,i.memoizedProps,i)),j(e,o);else if(4!==i.tag){if(13===i.tag&&0!=(4&i.flags)&&(o=null!==i.memoizedState)){var a=i.child;if(null!==a&&(null!==a.child&&(a.child.return=a,ti(e,a,!0,o)),null!==(o=a.sibling))){o.return=i,i=o;continue}}if(null!==i.child){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var mi=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=Ie(o,i.type,i.memoizedProps,i)),Re(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=ze(o,i.memoizedProps,i)),Re(e,o);else if(4!==i.tag){if(13===i.tag&&0!=(4&i.flags)&&(o=null!==i.memoizedState)){var a=i.child;if(null!==a&&(null!==a.child&&(a.child.return=a,mi(e,a,!0,o)),null!==(o=a.sibling))){o.return=i,i=o;continue}}if(null!==i.child){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};ni=function(e){var t=e.stateNode;if(null!==e.firstEffect){var n=t.containerInfo,r=Le(n);mi(r,e,!1,!1),t.pendingChildren=r,pi(e),Oe(n,r)}},ri=function(e,t,n,r,i){var o=e.stateNode,a=e.memoizedProps;if((e=null===t.firstEffect)&&a===r)t.stateNode=o;else{var s=t.stateNode,l=Hn(Nn.current),c=null;a!==r&&(c=W(s,n,a,r,i,l)),e&&null===c?t.stateNode=o:(o=Pe(o,c,n,a,r,t,e,s),V(o,n,r,i,l)&&pi(t),t.stateNode=o,e?pi(t):ti(o,t,!1,!1))}},ii=function(e,t,n,r){n!==r?(e=Hn(Fn.current),n=Hn(Nn.current),t.stateNode=q(r,e,n,t),pi(t)):t.stateNode=e.stateNode}}else ni=function(){},ri=function(){},ii=function(){};function gi(e,t){if(!$n)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function vi(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return st(t.type)&&lt(),null;case 3:return jn(),et(it),et(rt),rr(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(er(t)?pi(t):r.hydrate||(t.flags|=256)),ni(t),null;case 5:Wn(t);var i=Hn(Fn.current);if(n=t.type,null!==e&&null!=t.stateNode)ri(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Hn(Nn.current),er(t)){if(!ee)throw Error(a(175));e=Ve(t.stateNode,t.type,t.memoizedProps,i,e,t),t.updateQueue=e,null!==e&&pi(t)}else{var o=U(n,r,i,e,t);ti(o,t,!1,!1),t.stateNode=o,V(o,n,r,i,e)&&pi(t)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)ii(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(e=Hn(Fn.current),i=Hn(Nn.current),er(t)){if(!ee)throw Error(a(176));We(t.stateNode,t.memoizedProps,t)&&pi(t)}else t.stateNode=q(r,e,i,t)}return null;case 13:return et(Gn),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,i=!1,null===e?void 0!==t.memoizedProps.fallback&&er(t):i=null!==e.memoizedState,r&&!i&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Gn.current)?0===uo&&(uo=3):(0!==uo&&3!==uo||(uo=4),null===oo||0==(134217727&po)&&0==(134217727&mo)||Go(oo,so))),K&&r&&(t.flags|=4),J&&(r||i)&&(t.flags|=4),null);case 4:return jn(),ni(t),null===e&&ae(t.stateNode.containerInfo),null;case 10:return dn(t),null;case 17:return st(t.type)&&lt(),null;case 19:if(et(Gn),null===(r=t.memoizedState))return null;if(i=0!=(64&t.flags),null===(o=r.rendering))if(i)gi(r,!1);else{if(0!==uo||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(o=qn(e))){for(t.flags|=64,gi(r,!1),null!==(e=o.updateQueue)&&(t.updateQueue=e,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,e=n,r=t.child;null!==r;)n=e,(i=r).flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(o=i.alternate)?(i.childLanes=0,i.lanes=n,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,n=o.dependencies,i.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext}),r=r.sibling;return tt(Gn,1&Gn.current|2),t.child}e=e.sibling}null!==r.tail&&Gt()>bo&&(t.flags|=64,i=!0,gi(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=qn(o))){if(t.flags|=64,i=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),gi(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!$n)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Gt()-r.renderingStartTime>bo&&1073741824!==n&&(t.flags|=64,i=!0,gi(r,!1),t.lanes=33554432);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Gt(),e.sibling=null,t=Gn.current,tt(Gn,i?1&t|2:1&t),e):null;case 23:case 24:return Zo(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function yi(e){switch(e.tag){case 1:st(e.type)&&lt();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(jn(),et(it),et(rt),rr(),0!=(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Wn(e),null;case 13:return et(Gn),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return et(Gn),null;case 4:return jn(),null;case 10:return dn(e),null;case 23:case 24:return Zo(),null;default:return null}}function bi(e,t){try{var n="",r=t;do{n+=nn(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i}}function xi(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var _i="function"==typeof WeakMap?WeakMap:Map;function wi(e,t,n){(n=yn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){So||(So=!0,Mo=r),xi(0,t)},n}function Si(e,t,n){(n=yn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return xi(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Eo?Eo=new Set([this]):Eo.add(this),xi(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var Mi="function"==typeof WeakSet?WeakSet:Set;function Ei(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(n){fa(e,n)}else t.current=null}function Ti(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:rn(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(J&&256&t.flags&&ke(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(a(163))}function Ai(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function Ci(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!=(4&(i=i.tag))&&0!=(1&i)&&(ua(n,e),ca(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:rn(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&wn(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=z(n.child.stateNode);break;case 1:e=n.child.stateNode}wn(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&ye(e,n.type,n.memoizedProps,n));case 6:case 4:case 12:return;case 13:return void(ee&&null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Xe(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(a(163))}function ki(e,t){if(J)for(var n=e;;){if(5===n.tag){var r=n.stateNode;t?Ee(r):Ae(n.stateNode,n.memoizedProps)}else if(6===n.tag)r=n.stateNode,t?Te(r):Ce(r,n.memoizedProps);else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function Pi(e,t){if(pt&&"function"==typeof pt.onCommitFiberUnmount)try{pt.onCommitFiberUnmount(ft,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!=(4&r))ua(t,n);else{r=t;try{i()}catch(o){fa(r,o)}}n=n.next}while(n!==e)}break;case 1:if(Ei(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){fa(t,o)}break;case 5:Ei(t);break;case 4:J?Ni(e,t):K&&K&&(t=t.stateNode.containerInfo,e=Le(t),De(t,e))}}function Li(e,t){for(var n=t;;)if(Pi(e,n),null===n.child||J&&4===n.tag){if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}else n.child.return=n,n=n.child}function Ri(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Oi(e){return 5===e.tag||3===e.tag||4===e.tag}function Di(e){if(J){e:{for(var t=e.return;null!==t;){if(Oi(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(Me(t),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Oi(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Ii(e,n,t):zi(e,n,t)}}function Ii(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?_e(n,e,t):ge(n,e);else if(4!==r&&null!==(e=e.child))for(Ii(e,t,n),e=e.sibling;null!==e;)Ii(e,t,n),e=e.sibling}function zi(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?xe(n,e,t):me(n,e);else if(4!==r&&null!==(e=e.child))for(zi(e,t,n),e=e.sibling;null!==e;)zi(e,t,n),e=e.sibling}function Ni(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag)Li(e,i),r?Se(n,i.stateNode):we(n,i.stateNode);else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(Pi(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Bi(e,t){if(J){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Ai(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&be(n,o,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(a(162));return n=t.memoizedProps,void ve(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(ee&&(t=t.stateNode,t.hydrate&&(t.hydrate=!1,qe(t.containerInfo))));case 12:return;case 13:return Fi(t),void Hi(t);case 19:return void Hi(t);case 17:return;case 23:case 24:return void ki(t,null!==t.memoizedState)}throw Error(a(163))}switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Ai(3,t);case 12:return;case 13:return Fi(t),void Hi(t);case 19:return void Hi(t);case 3:ee&&((n=t.stateNode).hydrate&&(n.hydrate=!1,qe(n.containerInfo)));break;case 23:case 24:return}e:if(K){switch(t.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:t=t.stateNode,De(t.containerInfo,t.pendingChildren);break e}throw Error(a(163))}}function Fi(e){null!==e.memoizedState&&(yo=Gt(),J&&ki(e.child,!0))}function Hi(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Mi),t.forEach((function(t){var r=ma.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Ui(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var ji=0,Vi=1,Wi=2,Gi=3,qi=4;if("function"==typeof Symbol&&Symbol.for){var Xi=Symbol.for;ji=Xi("selector.component"),Vi=Xi("selector.has_pseudo_class"),Wi=Xi("selector.role"),Gi=Xi("selector.test_id"),qi=Xi("selector.text")}function Yi(e){var t=te(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(a(364));return t}if(null===(e=le(e)))throw Error(a(362));return e.stateNode.current}function $i(e,t){switch(t.$$typeof){case ji:if(e.type===t.value)return!0;break;case Vi:e:{t=t.value,e=[e,0];for(var n=0;n<e.length;){var r=e[n++],i=e[n++],o=t[i];if(5!==r.tag||!de(r)){for(;null!=o&&$i(r,o);)o=t[++i];if(i===t.length){t=!0;break e}for(r=r.child;null!==r;)e.push(r,i),r=r.sibling}}t=!1}return t;case Wi:if(5===e.tag&&he(e.stateNode,t.value))return!0;break;case qi:if((5===e.tag||6===e.tag)&&null!==(e=ue(e))&&0<=e.indexOf(t.value))return!0;break;case Gi:if(5===e.tag&&("string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase()))return!0;break;default:throw Error(a(365,t))}return!1}function Zi(e){switch(e.$$typeof){case ji:return"<"+(k(e.value)||"Unknown")+">";case Vi:return":has("+(Zi(e)||"")+")";case Wi:return'[role="'+e.value+'"]';case qi:return'"'+e.value+'"';case Gi:return'[data-testname="'+e.value+'"]';default:throw Error(a(365,e))}}function Ji(e,t){var n=[];e=[e,0];for(var r=0;r<e.length;){var i=e[r++],o=e[r++],a=t[o];if(5!==i.tag||!de(i)){for(;null!=a&&$i(i,a);)a=t[++o];if(o===t.length)n.push(i);else for(i=i.child;null!==i;)e.push(i,o),i=i.sibling}}return n}function Qi(e,t){if(!se)throw Error(a(363));e=Ji(e=Yi(e),t),t=[],e=Array.from(e);for(var n=0;n<e.length;){var r=e[n++];if(5===r.tag)de(r)||t.push(r.stateNode);else for(r=r.child;null!==r;)e.push(r),r=r.sibling}return t}var Ki=null;var eo=Math.ceil,to=s.ReactCurrentDispatcher,no=s.ReactCurrentOwner,ro=s.IsSomeRendererActing,io=0,oo=null,ao=null,so=0,lo=0,co=Ke(0),uo=0,ho=null,fo=0,po=0,mo=0,go=0,vo=null,yo=0,bo=1/0;function xo(){bo=Gt()+500}var _o,wo=null,So=!1,Mo=null,Eo=null,To=!1,Ao=null,Co=90,ko=[],Po=[],Lo=null,Ro=0,Oo=null,Do=-1,Io=0,zo=0,No=null,Bo=!1;function Fo(){return 0!=(48&io)?Gt():-1!==Do?Do:Do=Gt()}function Ho(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===qt()?1:2;if(0===Io&&(Io=fo),0!==Qt.transition){0!==zo&&(zo=null!==vo?vo.pendingLanes:0),e=Io;var t=4186112&~zo;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=qt(),0!=(4&io)&&98===e?e=xt(12,Io):e=xt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),Io),e}function Uo(e,t,n){if(50<Ro)throw Ro=0,Oo=null,Error(a(185));if(null===(e=jo(e,t)))return null;St(e,t,n),e===oo&&(mo|=t,4===uo&&Go(e,so));var r=qt();1===t?0!=(8&io)&&0==(48&io)?qo(e):(Vo(e,n),0===io&&(xo(),Zt())):(0==(4&io)||98!==r&&99!==r||(null===Lo?Lo=new Set([e]):Lo.add(e)),Vo(e,n)),vo=e}function jo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function Vo(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-Mt(s),c=1<<l,u=o[l];if(-1===u){if(0==(c&r)||0!=(c&i)){u=t,vt(c);var d=gt;o[l]=10<=d?u+250:6<=d?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);s&=~c}if(r=yt(e,e===oo?so:0),t=gt,0===r)null!==n&&(n!==Ft&&kt(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Ft&&kt(n)}15===t?(n=qo.bind(null,e),null===Ut?(Ut=[n],jt=Ct(Dt,Jt)):Ut.push(n),n=Ft):14===t?n=$t(99,qo.bind(null,e)):n=$t(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),Wo.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function Wo(e){if(Do=-1,zo=Io=0,0!=(48&io))throw Error(a(327));var t=e.callbackNode;if(la()&&e.callbackNode!==t)return null;var n=yt(e,e===oo?so:0);if(0===n)return null;var r=n,i=io;io|=16;var o=Ko();for(oo===e&&so===r||(xo(),Jo(e,r));;)try{na();break}catch(l){Qo(e,l)}if(cn(),to.current=o,io=i,null!==ao?r=0:(oo=null,so=0,r=uo),0!=(fo&mo))Jo(e,0);else if(0!==r){if(2===r&&(io|=64,e.hydrate&&(e.hydrate=!1,ke(e.containerInfo)),0!==(n=bt(e))&&(r=ea(e,n))),1===r)throw t=ho,Jo(e,0),Go(e,n),Vo(e,Gt()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:oa(e);break;case 3:if(Go(e,n),(62914560&n)===n&&10<(r=yo+500-Gt())){if(0!==yt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){Fo(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=X(oa.bind(null,e),r);break}oa(e);break;case 4:if(Go(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var s=31-Mt(n);o=1<<s,(s=r[s])>i&&(i=s),n&=~o}if(n=i,10<(n=(120>(n=Gt()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*eo(n/1960))-n)){e.timeoutHandle=X(oa.bind(null,e),n);break}oa(e);break;case 5:oa(e);break;default:throw Error(a(329))}}return Vo(e,Gt()),e.callbackNode===t?Wo.bind(null,e):null}function Go(e,t){for(t&=~go,t&=~mo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mt(t),r=1<<n;e[n]=-1,t&=~r}}function qo(e){if(0!=(48&io))throw Error(a(327));if(la(),e===oo&&0!=(e.expiredLanes&so)){var t=so,n=ea(e,t);0!=(fo&mo)&&(n=ea(e,t=yt(e,t)))}else n=ea(e,t=yt(e,0));if(0!==e.tag&&2===n&&(io|=64,e.hydrate&&(e.hydrate=!1,ke(e.containerInfo)),0!==(t=bt(e))&&(n=ea(e,t))),1===n)throw n=ho,Jo(e,0),Go(e,t),Vo(e,Gt()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,oa(e),Vo(e,Gt()),null}function Xo(e,t){var n=io;io|=1;try{return e(t)}finally{0===(io=n)&&(xo(),Zt())}}function Yo(e,t){var n=io;if(0!=(48&n))return e(t);io|=1;try{if(e)return Yt(99,e.bind(null,t))}finally{io=n,Zt()}}function $o(e,t){tt(co,lo),lo|=t,fo|=t}function Zo(){lo=co.current,et(co)}function Jo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==$&&(e.timeoutHandle=$,Y(n)),null!==ao)for(n=ao.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&lt();break;case 3:jn(),et(it),et(rt),rr();break;case 5:Wn(r);break;case 4:jn();break;case 13:case 19:et(Gn);break;case 10:dn(r);break;case 23:case 24:Zo()}n=n.return}oo=e,ao=Ta(e.current,null),so=lo=fo=t,uo=0,ho=null,go=mo=po=0}function Qo(e,t){for(;;){var n=ao;try{if(cn(),ir.current=Fr,ur){for(var r=sr.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ur=!1}if(ar=0,cr=lr=sr=null,dr=!1,no.current=null,null===n||null===n.return){uo=1,ho=t,ao=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=so,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l;if(0==(2&s.mode)){var u=s.alternate;u?(s.updateQueue=u.updateQueue,s.memoizedState=u.memoizedState,s.lanes=u.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=0!=(1&Gn.current),h=a;do{var f;if(f=13===h.tag){var p=h.memoizedState;if(null!==p)f=null!==p.dehydrated;else{var m=h.memoizedProps;f=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(f){var g=h.updateQueue;if(null===g){var v=new Set;v.add(c),h.updateQueue=v}else g.add(c);if(0==(2&h.mode)){if(h.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=yn(-1,1);y.tag=2,bn(s,y)}s.lanes|=1;break e}l=void 0,s=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new _i,l=new Set,b.set(c,l)):void 0===(l=b.get(c))&&(l=new Set,b.set(c,l)),!l.has(s)){l.add(s);var x=pa.bind(null,o,c,s);c.then(x,x)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(null!==h);l=Error((k(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==uo&&(uo=2),l=bi(l,s),h=a;do{switch(h.tag){case 3:o=l,h.flags|=4096,t&=-t,h.lanes|=t,xn(h,wi(0,o,t));break e;case 1:o=l;var _=h.type,w=h.stateNode;if(0==(64&h.flags)&&("function"==typeof _.getDerivedStateFromError||null!==w&&"function"==typeof w.componentDidCatch&&(null===Eo||!Eo.has(w)))){h.flags|=4096,t&=-t,h.lanes|=t,xn(h,Si(h,o,t));break e}}h=h.return}while(null!==h)}ia(n)}catch(S){t=S,ao===n&&null!==n&&(ao=n=n.return);continue}break}}function Ko(){var e=to.current;return to.current=Fr,null===e?Fr:e}function ea(e,t){var n=io;io|=16;var r=Ko();for(oo===e&&so===t||Jo(e,t);;)try{ta();break}catch(i){Qo(e,i)}if(cn(),io=n,to.current=r,null!==ao)throw Error(a(261));return oo=null,so=0,uo}function ta(){for(;null!==ao;)ra(ao)}function na(){for(;null!==ao&&!Pt();)ra(ao)}function ra(e){var t=_o(e.alternate,e,lo);e.memoizedProps=e.pendingProps,null===t?ia(e):ao=t,no.current=null}function ia(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=vi(n,t,lo)))return void(ao=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&lo)||0==(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=yi(t)))return n.flags&=2047,void(ao=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(ao=t);ao=t=e}while(null!==t);0===uo&&(uo=5)}function oa(e){var t=qt();return Yt(99,aa.bind(null,e,t)),null}function aa(e,t){do{la()}while(null!==Ao);if(0!=(48&io))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<o;){var c=31-Mt(o),u=1<<c;i[c]=0,s[c]=-1,l[c]=-1,o&=~u}if(null!==Lo&&0==(24&r)&&Lo.has(e)&&Lo.delete(e),e===oo&&(ao=oo=null,so=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){i=io,io|=32,no.current=null,No=F(e.containerInfo),Bo=!1,wo=r;do{try{sa()}catch(y){if(null===wo)throw Error(a(330));fa(wo,y),wo=wo.nextEffect}}while(null!==wo);No=null,wo=r;do{try{for(s=e;null!==wo;){var d=wo.flags;if(16&d&&J&&Me(wo.stateNode),128&d){var h=wo.alternate;if(null!==h){var f=h.ref;null!==f&&("function"==typeof f?f(null):f.current=null)}}switch(1038&d){case 2:Di(wo),wo.flags&=-3;break;case 6:Di(wo),wo.flags&=-3,Bi(wo.alternate,wo);break;case 1024:wo.flags&=-1025;break;case 1028:wo.flags&=-1025,Bi(wo.alternate,wo);break;case 4:Bi(wo.alternate,wo);break;case 8:l=s,o=wo,J?Ni(l,o):Li(l,o);var p=o.alternate;Ri(o),null!==p&&Ri(p)}wo=wo.nextEffect}}catch(y){if(null===wo)throw Error(a(330));fa(wo,y),wo=wo.nextEffect}}while(null!==wo);Bo&&oe(),H(e.containerInfo),e.current=n,wo=r;do{try{for(d=e;null!==wo;){var m=wo.flags;if(36&m&&Ci(d,wo.alternate,wo),128&m){h=void 0;var g=wo.ref;if(null!==g){var v=wo.stateNode;switch(wo.tag){case 5:h=z(v);break;default:h=v}"function"==typeof g?g(h):g.current=h}}wo=wo.nextEffect}}catch(y){if(null===wo)throw Error(a(330));fa(wo,y),wo=wo.nextEffect}}while(null!==wo);wo=null,Ht(),io=i}else e.current=n;if(To)To=!1,Ao=e,Co=t;else for(wo=r;null!==wo;)t=wo.nextEffect,wo.nextEffect=null,8&wo.flags&&((m=wo).sibling=null,m.stateNode=null),wo=t;if(0===(r=e.pendingLanes)&&(Eo=null),1===r?e===Oo?Ro++:(Ro=0,Oo=e):Ro=0,n=n.stateNode,pt&&"function"==typeof pt.onCommitFiberRoot)try{pt.onCommitFiberRoot(ft,n,void 0,64==(64&n.current.flags))}catch(y){}if(Vo(e,Gt()),So)throw So=!1,e=Mo,Mo=null,e;return 0!=(8&io)||Zt(),null}function sa(){for(;null!==wo;){var e=wo.alternate;Bo||null===No||(0!=(8&wo.flags)?D(wo,No)&&(Bo=!0,ie()):13===wo.tag&&Ui(e,wo)&&D(wo,No)&&(Bo=!0,ie()));var t=wo.flags;0!=(256&t)&&Ti(e,wo),0==(512&t)||To||(To=!0,$t(97,(function(){return la(),null}))),wo=wo.nextEffect}}function la(){if(90!==Co){var e=97<Co?97:Co;return Co=90,Yt(e,da)}return!1}function ca(e,t){ko.push(t,e),To||(To=!0,$t(97,(function(){return la(),null})))}function ua(e,t){Po.push(t,e),To||(To=!0,$t(97,(function(){return la(),null})))}function da(){if(null===Ao)return!1;var e=Ao;if(Ao=null,0!=(48&io))throw Error(a(331));var t=io;io|=32;var n=Po;Po=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"==typeof s)try{s()}catch(c){if(null===o)throw Error(a(330));fa(o,c)}}for(n=ko,ko=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var l=i.create;i.destroy=l()}catch(c){if(null===o)throw Error(a(330));fa(o,c)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return io=t,Zt(),!0}function ha(e,t,n){bn(e,t=wi(0,t=bi(n,t),1)),t=Fo(),null!==(e=jo(e,1))&&(St(e,1,t),Vo(e,t))}function fa(e,t){if(3===e.tag)ha(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){ha(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Eo||!Eo.has(r))){var i=Si(n,e=bi(t,e),1);if(bn(n,i),i=Fo(),null!==(n=jo(n,1)))St(n,1,i),Vo(n,i);else if("function"==typeof r.componentDidCatch&&(null===Eo||!Eo.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function pa(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Fo(),e.pingedLanes|=e.suspendedLanes&n,oo===e&&(so&n)===n&&(4===uo||3===uo&&(62914560&so)===so&&500>Gt()-yo?Jo(e,0):go|=n),Vo(e,t)}function ma(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===qt()?1:2:(0===Io&&(Io=fo),0===(t=_t(62914560&~Io))&&(t=4194304))),n=Fo(),null!==(e=jo(e,t))&&(St(e,t,n),Vo(e,n))}_o=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||it.current)Wr=!0;else{if(0==(n&r)){switch(Wr=!1,t.tag){case 3:ei(t),tr();break;case 5:Vn(t);break;case 1:st(t.type)&&dt(t);break;case 4:Un(t,t.stateNode.containerInfo);break;case 10:un(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?ai(e,t,n):(tt(Gn,1&Gn.current),null!==(t=fi(e,t,n))?t.sibling:null);tt(Gn,1&Gn.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return hi(e,t,n);t.flags|=64}var i=t.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null),tt(Gn,Gn.current),r)break;return null;case 23:case 24:return t.lanes=0,$r(e,t,n)}return fi(e,t,n)}Wr=0!=(16384&e.flags)}else Wr=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=at(t,rt.current),fn(t,n),i=pr(null,t,r,e,i,n),t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,st(r)){var o=!0;dt(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,gn(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&Mn(t,r,s,e),i.updater=En,t.stateNode=i,i._reactInternals=t,kn(t,r,e,n),t=Kr(null,t,r,!0,o,n)}else t.tag=0,Gr(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return Ea(e)?1:0;if(null!=e){if((e=e.$$typeof)===g)return 11;if(e===x)return 14}return 2}(i),e=rn(i,e),o){case 0:t=Jr(null,t,i,e,n);break e;case 1:t=Qr(null,t,i,e,n);break e;case 11:t=qr(null,t,i,e,n);break e;case 14:t=Xr(null,t,i,rn(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Jr(e,t,r,i=t.elementType===r?i:rn(r,i),n);case 1:return r=t.type,i=t.pendingProps,Qr(e,t,r,i=t.elementType===r?i:rn(r,i),n);case 3:if(ei(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,vn(e,t),_n(t,r,null,n),(r=t.memoizedState.element)===i)tr(),t=fi(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(ee?(Yn=je(t.stateNode.containerInfo),Xn=t,o=$n=!0):o=!1),o){if(ee&&null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)o=e[i],s=e[i+1],Z?o._workInProgressVersionPrimary=s:o._workInProgressVersionSecondary=s,nr.push(o);for(n=In(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Gr(e,t,r,n),tr();t=t.child}return t;case 5:return Vn(t),null===e&&Qn(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,G(r,i)?s=null:null!==o&&G(r,o)&&(t.flags|=16),Zr(e,t),Gr(e,t,s,n),t.child;case 6:return null===e&&Qn(t),null;case 13:return ai(e,t,n);case 4:return Un(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Dn(t,null,r,n):Gr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,qr(e,t,r,i=t.elementType===r?i:rn(r,i),n);case 7:return Gr(e,t,t.pendingProps,n),t.child;case 8:case 12:return Gr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,un(t,o=i.value),null!==s){var l=s.value;if(0===(o=Kt(l,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(s.children===i.children&&!it.current){t=fi(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){s=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!=(u.observedBits&o)){1===l.tag&&((u=yn(-1,n&-n)).tag=2,bn(l,u)),l.lanes|=n,null!==(u=l.alternate)&&(u.lanes|=n),hn(l.return,n),c.lanes|=n;break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}}Gr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,fn(t,n),r=r(i=pn(i,o.unstable_observedBits)),t.flags|=1,Gr(e,t,r,n),t.child;case 14:return o=rn(i=t.type,t.pendingProps),Xr(e,t,i,o=rn(i.type,o),r,n);case 15:return Yr(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:rn(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,st(r)?(e=!0,dt(t)):e=!1,fn(t,n),An(t,r,i),kn(t,r,i,n),Kr(null,t,r,!0,e,n);case 19:return hi(e,t,n);case 23:case 24:return $r(e,t,n)}throw Error(a(156,t.tag))};var ga={current:!1},va=o.unstable_flushAllWithoutAsserting,ya="function"==typeof va;function ba(){if(void 0!==va)return va();for(var e=!1;la();)e=!0;return e}function xa(t){try{ba(),function(t){if(null===Ki)try{var n=("require"+Math.random()).slice(0,7);Ki=(e&&e[n]).call(e,"timers").setImmediate}catch(r){Ki=function(e){var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}Ki(t)}((function(){ba()?xa(t):t()}))}catch(n){t(n)}}var _a=0,wa=!1;function Sa(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Ma(e,t,n,r){return new Sa(e,t,n,r)}function Ea(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ta(e,t){var n=e.alternate;return null===n?((n=Ma(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Aa(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Ea(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case u:return Ca(n.children,i,o,t);case S:s=8,i|=16;break;case d:s=8,i|=1;break;case f:return(e=Ma(12,n,t,8|i)).elementType=f,e.type=f,e.lanes=o,e;case v:return(e=Ma(13,n,t,i)).type=v,e.elementType=v,e.lanes=o,e;case b:return(e=Ma(19,n,t,i)).elementType=b,e.lanes=o,e;case M:return ka(n,i,o,t);case E:return(e=Ma(24,n,t,i)).elementType=E,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case p:s=10;break e;case m:s=9;break e;case g:s=11;break e;case x:s=14;break e;case _:s=16,r=null;break e;case w:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Ma(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Ca(e,t,n,r){return(e=Ma(7,e,r,t)).lanes=n,e}function ka(e,t,n,r){return(e=Ma(23,e,r,t)).elementType=M,e.lanes=n,e}function Pa(e,t,n){return(e=Ma(6,e,null,t)).lanes=n,e}function La(e,t,n){return(t=Ma(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ra(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=$,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=wt(0),this.expirationTimes=wt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wt(0),ee&&(this.mutableSourceEagerHydrationData=null)}function Oa(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=O(t))?null:e.stateNode}function Da(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Ia(e,t){Da(e,t),(e=e.alternate)&&Da(e,t)}function za(e){return null===(e=O(e))?null:e.stateNode}function Na(){return null}return n.IsThisRendererActing=ga,n.act=function(e){function t(){_a--,ro.current=n,ga.current=r}!1===wa&&(wa=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected.")),_a++;var n=ro.current,r=ga.current;ro.current=!0,ga.current=!0;try{var i=Xo(e)}catch(o){throw t(),o}if(null!==i&&"object"==typeof i&&"function"==typeof i.then)return{then:function(e,r){i.then((function(){1<_a||!0===ya&&!0===n?(t(),e()):xa((function(n){t(),n?r(n):e()}))}),(function(e){t(),r(e)}))}};try{1!==_a||!1!==ya&&!1!==n||ba(),t()}catch(o){throw t(),o}return{then:function(e){e()}}},n.attemptContinuousHydration=function(e){13===e.tag&&(Uo(e,67108864,Fo()),Ia(e,67108864))},n.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var t=Fo(),n=Ho(e);Uo(e,n,t),Ia(e,n)}},n.attemptSynchronousHydration=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.hydrate){var n=vt(t.pendingLanes);t.expiredLanes|=n&t.pendingLanes,Vo(t,Gt()),0==(48&io)&&(xo(),Zt())}break;case 13:var r=Fo();Yo((function(){return Uo(e,1,r)})),Ia(e,4)}},n.attemptUserBlockingHydration=function(e){13===e.tag&&(Uo(e,4,Fo()),Ia(e,4))},n.batchedEventUpdates=function(e,t){var n=io;io|=2;try{return e(t)}finally{0===(io=n)&&(xo(),Zt())}},n.batchedUpdates=Xo,n.createComponentSelector=function(e){return{$$typeof:ji,value:e}},n.createContainer=function(e,t,n){return e=new Ra(e,t,n),t=Ma(3,null,null,2===t?7:1===t?3:0),e.current=t,t.stateNode=e,gn(t),e},n.createHasPsuedoClassSelector=function(e){return{$$typeof:Vi,value:e}},n.createPortal=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:c,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},n.createRoleSelector=function(e){return{$$typeof:Wi,value:e}},n.createTestNameSelector=function(e){return{$$typeof:Gi,value:e}},n.createTextSelector=function(e){return{$$typeof:qi,value:e}},n.deferredUpdates=function(e){return Yt(97,e)},n.discreteUpdates=function(e,t,n,r,i){var o=io;io|=4;try{return Yt(98,e.bind(null,t,n,r,i))}finally{0===(io=o)&&(xo(),Zt())}},n.findAllNodes=Qi,n.findBoundingRects=function(e,t){if(!se)throw Error(a(363));t=Qi(e,t),e=[];for(var n=0;n<t.length;n++)e.push(ce(t[n]));for(t=e.length-1;0<t;t--)for(var r=(n=e[t]).x,i=r+n.width,o=n.y,s=o+n.height,l=t-1;0<=l;l--)if(t!==l){var c=e[l],u=c.x,d=u+c.width,h=c.y,f=h+c.height;if(r>=u&&o>=h&&i<=d&&s<=f){e.splice(t,1);break}if(!(r!==u||n.width!==c.width||f<o||h>s)){h>o&&(c.height+=h-o,c.y=o),f<s&&(c.height=s-h),e.splice(t,1);break}if(!(o!==h||n.height!==c.height||d<r||u>i)){u>r&&(c.width+=u-r,c.x=r),d<i&&(c.width=i-u),e.splice(t,1);break}}return e},n.findHostInstance=Oa,n.findHostInstanceWithNoPortals=function(e){return null===(e=function(e){if(!(e=R(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child&&4!==t.tag)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}(e))?null:20===e.tag?e.stateNode.instance:e.stateNode},n.findHostInstanceWithWarning=function(e){return Oa(e)},n.flushControlled=function(e){var t=io;io|=1;try{Yt(99,e)}finally{0===(io=t)&&(xo(),Zt())}},n.flushDiscreteUpdates=function(){0==(49&io)&&(function(){if(null!==Lo){var e=Lo;Lo=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,Vo(e,Gt())}))}Zt()}(),la())},n.flushPassiveEffects=la,n.flushSync=Yo,n.focusWithin=function(e,t){if(!se)throw Error(a(363));for(t=Ji(e=Yi(e),t),t=Array.from(t),e=0;e<t.length;){var n=t[e++];if(!de(n)){if(5===n.tag&&fe(n.stateNode))return!0;for(n=n.child;null!==n;)t.push(n),n=n.sibling}}return!1},n.getCurrentUpdateLanePriority=function(){return mt},n.getFindAllNodesFailureDescription=function(e,t){if(!se)throw Error(a(363));var n=0,r=[];e=[Yi(e),0];for(var i=0;i<e.length;){var o=e[i++],s=e[i++],l=t[s];if((5!==o.tag||!de(o))&&($i(o,l)&&(r.push(Zi(l)),++s>n&&(n=s)),s<t.length))for(o=o.child;null!==o;)e.push(o,s),o=o.sibling}if(n<t.length){for(e=[];n<t.length;n++)e.push(Zi(t[n]));return"findAllNodes was able to match part of the selector:\n "+r.join(" > ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},n.getPublicRootInstance=function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:return z(e.child.stateNode);default:return e.child.stateNode}},n.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:za,findFiberByHostInstance:e.findFiberByHostInstance||Na,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t.isDisabled&&t.supportsFiber)try{ft=t.inject(e),pt=t}catch(n){}e=!0}return e},n.observeVisibleRects=function(e,t,n,r){if(!se)throw Error(a(363));e=Qi(e,t);var i=pe(e,n,r).disconnect;return{disconnect:function(){i()}}},n.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},n.runWithPriority=function(e,t){var n=mt;try{return mt=e,t()}finally{mt=n}},n.shouldSuspend=function(){return!1},n.unbatchedUpdates=function(e,t){var n=io;io&=-2,io|=8;try{return e(t)}finally{0===(io=n)&&(xo(),Zt())}},n.updateContainer=function(e,t,n,r){var i=t.current,o=Fo(),s=Ho(i);e:if(n){t:{if(P(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(st(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(st(c)){n=ut(n,c,l);break e}}n=l}else n=nt;return null===t.context?t.context=n:t.pendingContext=n,(t=yn(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),bn(i,t),Uo(i,s,o),s},n}}(bU),yU.exports=bU.exports;var xU=yU.exports;function _U(e,t,n){var r,i,o,a,s;function l(){var c=Date.now()-a;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(s=e.apply(o,i),o=i=null))}null==t&&(t=100);var c=function(){o=this,i=arguments,a=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(s=e.apply(o,i),o=i=null),s};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(s=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}_U.debounce=_U;var wU=_U;function SU({debounce:e,scroll:t,polyfill:n}={debounce:0,scroll:!1}){const r=n||("undefined"==typeof window?class{}:window.ResizeObserver);if(!r)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,o]=h.exports.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),a=h.exports.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i}),s=e?"number"==typeof e?e:e.scroll:null,l=e?"number"==typeof e?e:e.resize:null,c=h.exports.useRef(!1);h.exports.useEffect((()=>(c.current=!0,()=>{c.current=!1})));const[u,d,f]=h.exports.useMemo((()=>{const e=()=>{if(!a.current.element)return;const{left:e,top:t,width:n,height:r,bottom:i,right:s,x:l,y:u}=a.current.element.getBoundingClientRect(),d={left:e,top:t,width:n,height:r,bottom:i,right:s,x:l,y:u};Object.freeze(d),c.current&&!TU(a.current.lastBounds,d)&&o(a.current.lastBounds=d)};return[e,l?wU.debounce(e,l):e,s?wU.debounce(e,s):e]}),[o,s,l]);function p(){a.current.scrollContainers&&(a.current.scrollContainers.forEach((e=>e.removeEventListener("scroll",f,!0))),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null)}function m(){a.current.element&&(a.current.resizeObserver=new r(f),a.current.resizeObserver.observe(a.current.element),t&&a.current.scrollContainers&&a.current.scrollContainers.forEach((e=>e.addEventListener("scroll",f,{capture:!0,passive:!0}))))}var g,v,y;return g=f,v=Boolean(t),h.exports.useEffect((()=>{if(v){const e=g;return window.addEventListener("scroll",e,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",e,!0)}}}),[g,v]),y=d,h.exports.useEffect((()=>{const e=y;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[y]),h.exports.useEffect((()=>{p(),m()}),[t,f,d]),h.exports.useEffect((()=>p),[]),[e=>{e&&e!==a.current.element&&(p(),a.current.element=e,a.current.scrollContainers=MU(e),m())},i,u]}function MU(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some((e=>"auto"===e||"scroll"===e))&&t.push(e),[...t,...MU(e.parentElement)]}const EU=["x","y","top","bottom","left","right","width","height"],TU=(e,t)=>EU.every((n=>e[n]===t[n])),AU={obj:e=>e===Object(e)&&!AU.arr(e)&&"function"!=typeof e,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,arr:e=>Array.isArray(e),equ(e,t){if(typeof e!=typeof t||!!e!=!!t)return!1;if(AU.str(e)||AU.num(e)||AU.obj(e))return e===t;if(AU.arr(e)&&e==t)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!AU.und(n)||e===t}};function CU(e){return(e.eventObject||e.object).uuid+"/"+e.index}function kU(e){const t=new GP;function n(t){const{internal:n}=e.getState(),r=t.offsetX-n.initialClick[0],i=t.offsetY-n.initialClick[1];return Math.round(Math.sqrt(r*r+i*i))}function r(e){return e.filter((e=>["Move","Over","Enter","Out","Leave"].some((t=>{var n;return null==(n=e.__r3f.handlers)?void 0:n["onPointer"+t]}))))}function i(t){const{internal:n}=e.getState();Array.from(n.hovered.values()).forEach((e=>{if(!t.length||!t.find((t=>t.object===e.object&&t.index===e.index))){const r=e.eventObject.__r3f.handlers;if(n.hovered.delete(CU(e)),r){const n=l(s({},e),{intersections:t||[]});null==r.onPointerOut||r.onPointerOut(n),null==r.onPointerLeave||r.onPointerLeave(n)}}}))}function o(e,t){t.forEach((t=>{var n;return null==(n=t.__r3f.handlers)||null==n.onPointerMissed?void 0:n.onPointerMissed(e)}))}return{handlePointer:a=>{switch(a){case"onPointerLeave":case"onPointerCancel":return()=>i([]);case"onLostPointerCapture":return t=>{"pointerId"in t&&e.getState().internal.capturedMap.delete(t.pointerId),i([])}}return c=>{const{onPointerMissed:u,internal:d}=e.getState();!function(t){var n;const r=e.getState(),{raycaster:i,mouse:o,camera:a,size:s}=r,{offsetX:l,offsetY:c}=null!=(n=null==i.computeOffsets?void 0:i.computeOffsets(t,r))?n:t,{width:u,height:d}=s;o.set(l/u*2-1,-c/d*2+1),i.setFromCamera(o,a)}(c);const h="onPointerMove"===a,f=function(t,n){const{internal:r}=e.getState();return"pointerId"in n&&r.capturedMap.has(n.pointerId)&&t.push(...r.capturedMap.get(n.pointerId).values()),t}(function(t){const n=e.getState(),{raycaster:r,internal:i}=n;if(!r.enabled)return[];const o=new Set,a=[],c=t?t(i.interaction):i.interaction;let u=r.intersectObjects(c,!0).filter((e=>{const t=CU(e);return!o.has(t)&&(o.add(t),!0)}));r.filter&&(u=r.filter(u,n));for(const e of u){let t=e.object;for(;t;){var d;(null==(d=t.__r3f)?void 0:d.handlers)&&a.push(l(s({},e),{eventObject:t})),t=t.parent}}return a}(h?r:void 0),c);h&&i(f),function(r,o,a){const{raycaster:c,mouse:u,camera:d,internal:h}=e.getState();if(r.length){const e=t.set(u.x,u.y,0).unproject(d),f="click"===o.type?n(o):0,p=e=>o.target.releasePointerCapture(e),m={stopped:!1};for(const t of r){const n=e=>{var n,r;return null!=(n=null==(r=h.capturedMap.get(e))?void 0:r.has(t.eventObject))&&n},g=e=>{h.capturedMap.has(e)?h.capturedMap.get(e).set(t.eventObject,t):h.capturedMap.set(e,new Map([[t.eventObject,t]])),o.target.setPointerCapture(e)};let v={};for(let e in Object.getPrototypeOf(o)){let t=o[e];"function"!=typeof t&&(v[e]=t)}let y=l(s(s({},t),v),{spaceX:u.x,spaceY:u.y,intersections:r,stopped:m.stopped,delta:f,unprojectedPoint:e,ray:c.ray,camera:d,stopPropagation:()=>{const e="pointerId"in o&&h.capturedMap.get(o.pointerId);(!e||e.has(t.eventObject))&&(y.stopped=m.stopped=!0,h.hovered.size&&Array.from(h.hovered.values()).find((e=>e.eventObject===t.eventObject)))&&i([...r.slice(0,r.indexOf(t)),t])},target:{hasPointerCapture:n,setPointerCapture:g,releasePointerCapture:p},currentTarget:{hasPointerCapture:n,setPointerCapture:g,releasePointerCapture:p},sourceEvent:o,nativeEvent:o});if(a(y),!0===m.stopped)break}}}(f,c,(e=>{const t=e.eventObject,n=t.__r3f.handlers;if(n)if(h){if(n.onPointerOver||n.onPointerEnter||n.onPointerOut||n.onPointerLeave){const t=CU(e),r=d.hovered.get(t);r?r.stopped&&e.stopPropagation():(d.hovered.set(t,e),null==n.onPointerOver||n.onPointerOver(e),null==n.onPointerEnter||n.onPointerEnter(e))}null==n.onPointerMove||n.onPointerMove(e)}else{const r=null==n?void 0:n[a];r&&("onClick"!==a&&"onContextMenu"!==a&&"onDoubleClick"!==a||d.initialHits.includes(t))&&(r(e),o(c,d.interaction.filter((e=>e!==t))))}})),"onPointerDown"===a&&(d.initialClick=[c.offsetX,c.offsetY],d.initialHits=f.map((e=>e.eventObject))),"onClick"!==a&&"onContextMenu"!==a&&"onDoubleClick"!==a||f.length||n(c)<=2&&(o(c,d.interaction),u&&u(c))}}}}const PU=e=>e&&!!e.getState,LU=(e,t)=>{var n,r;return{root:PU(e)?e:null!=(n=null==(r=e.__r3f)?void 0:r.root)?n:t.__r3f.root,container:PU(e)?e.getState().scene:e}},RU={},OU=["children","key","ref"];let DU={};function IU(e,t){const n=e;return(null!=t&&t.instance||!n.__r3f)&&(n.__r3f=s({root:null,memoizedProps:{},objects:[]},t)),e}const zU=e=>e&&e.isOrthographicCamera,NU=h.exports.createContext(null),BU=(e,t,n,r)=>{const{gl:i,size:o,shadows:a=!1,linear:u=!1,flat:d=!1,vr:f=!1,orthographic:p=!1,frameloop:m="always",dpr:g=1,performance:v,clock:y=new zF,raycaster:b,camera:x,onPointerMissed:_}=r;a&&(i.shadowMap.enabled=!0,"object"==typeof a?Object.assign(i.shadowMap,a):i.shadowMap.type=2),u||(d||(i.toneMapping=4),i.outputEncoding=3001),"never"===m&&(y.stop(),y.elapsedTime=0);const w=function(e){const t="function"==typeof e?mU(e):e,n=(e=t.getState,n=Object.is)=>{const[,r]=h.exports.useReducer((e=>e+1),0),i=t.getState(),o=h.exports.useRef(i),a=h.exports.useRef(e),s=h.exports.useRef(n),l=h.exports.useRef(!1),c=h.exports.useRef();let u;void 0===c.current&&(c.current=e(i));let d=!1;(o.current!==i||a.current!==e||s.current!==n||l.current)&&(u=e(i),d=!n(c.current,u)),gU((()=>{d&&(c.current=u),o.current=i,a.current=e,s.current=n,l.current=!1}));const f=h.exports.useRef(i);return gU((()=>{const e=()=>{try{const e=t.getState(),n=a.current(e);s.current(c.current,n)||(o.current=e,c.current=n,r())}catch(e){l.current=!0,r()}},n=t.subscribe(e);return t.getState()!==f.current&&e(),n}),[]),d?u:c.current};return Object.assign(n,t),n[Symbol.iterator]=function*(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4"),yield n,yield t},n}(((o,a)=>{const h=new uH,w=b||{},{params:S}=w,M=c(w,["params"]);e(h,l(s({enabled:!0},M),{params:s(s({},h.params),S)}),{});const E=x instanceof fO,T=E?x:p?new uF(0,0,0,0,.1,1e3):new pO(75,0,.1,1e3);function A(e){return Array.isArray(e)?Math.min(Math.max(e[0],window.devicePixelRatio),e[1]):e}E||(T.position.z=5,x&&e(T,x,{}),T.lookAt(0,0,0));const C=A(g),k=new GP,P=new GP;function L(e=a().camera,t=P,n=a().size){const{width:r,height:i}=n,o=r/i,s=e.getWorldPosition(k).distanceTo(t);if(zU(e))return{width:r/e.zoom,height:i/e.zoom,factor:1,distance:s,aspect:o};{const t=e.fov*Math.PI/180,n=2*Math.tan(t/2)*s,a=n*(r/i);return{width:a,height:n,factor:r/a,distance:s,aspect:o}}}let R;const O=e=>o((t=>({performance:l(s({},t.performance),{current:e})})));return{gl:i,set:o,get:a,invalidate:()=>t(a()),advance:(e,t)=>n(e,t,a()),linear:u,flat:d,scene:IU(new FI),camera:T,raycaster:h,clock:y,mouse:new OP,vr:f,frameloop:m,onPointerMissed:_,performance:l(s({current:1,min:.5,max:1,debounce:200},v),{regress:()=>{const e=a();R&&clearTimeout(R),e.performance.current!==e.performance.min&&O(e.performance.min),R=setTimeout((()=>O(a().performance.max)),e.performance.debounce)}}),size:{width:0,height:0},viewport:{initialDpr:C,dpr:C,width:0,height:0,aspect:0,distance:0,factor:0,getCurrentViewport:L},setSize:(e,t)=>{const n={width:e,height:t};o((e=>({size:n,viewport:s(s({},e.viewport),L(T,P,n))})))},setDpr:e=>o((t=>({viewport:l(s({},t.viewport),{dpr:A(e)})}))),events:{connected:!1},internal:{active:!1,priority:0,frames:0,lastProps:r,interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(e,t=0)=>(o((({internal:n})=>({internal:l(s({},n),{priority:n.priority+(t?1:0),subscribers:[...n.subscribers,{ref:e,priority:t}].sort(((e,t)=>e.priority-t.priority))})}))),()=>{o((({internal:n})=>({internal:l(s({},n),{priority:n.priority-(t?1:0),subscribers:n.subscribers.filter((t=>t.ref!==e))})})))})}}}));w.subscribe((()=>{const{camera:e,size:t,viewport:n,internal:r}=w.getState();r.lastProps.camera instanceof fO||(zU(e)?(e.left=t.width/-2,e.right=t.width/2,e.top=t.height/2,e.bottom=t.height/-2):e.aspect=t.width/t.height,e.updateProjectionMatrix(),e.updateMatrixWorld()),i.setPixelRatio(n.dpr),i.setSize(t.width,t.height)}),(e=>[e.viewport.dpr,e.size]),vU);const S=w.getState();return o&&S.setSize(o.width,o.height),w.subscribe((e=>t(e))),w};let FU,HU=[],UU=[],jU=[];function VU(e,t){for(FU=0;FU<e.length;FU++)e[FU](t)}function WU(e,t){let n=t.clock.getDelta();for("never"===t.frameloop&&"number"==typeof e&&(n=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),FU=0;FU<t.internal.subscribers.length;FU++)t.internal.subscribers[FU].ref.current(t,n);return!t.internal.priority&&t.gl.render&&t.gl.render(t.scene,t.camera),t.internal.frames=Math.max(0,t.internal.frames-1),"always"===t.frameloop?1:t.internal.frames}function GU(e){const{handlePointer:t}=kU(e),n={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]};return{connected:!1,handlers:Object.keys(n).reduce(((e,n)=>l(s({},e),{[n]:t(n)})),{}),connect:t=>{var r;const{set:i,events:o}=e.getState();null==o.disconnect||o.disconnect(),i((e=>({events:l(s({},e.events),{connected:t})}))),Object.entries(null!=(r=null==o?void 0:o.handlers)?r:[]).forEach((([e,r])=>{const[i,o]=n[e];t.addEventListener(i,r,{passive:o})}))},disconnect:()=>{const{set:t,events:r}=e.getState();var i;r.connected&&(Object.entries(null!=(i=r.handlers)?i:[]).forEach((([e,t])=>{if(r&&r.connected instanceof HTMLElement){const[i]=n[e];r.connected.removeEventListener(i,t)}})),t((e=>({events:l(s({},e.events),{connected:!1})}))))}}}const qU="undefined"!=typeof window?h.exports.useLayoutEffect:h.exports.useEffect;function XU({set:e}){return qU((()=>(e(new Promise((()=>null))),()=>e(!1))),[]),null}class YU extends h.exports.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}function $U(e){var t=e,{children:n,fallback:r,tabIndex:i,resize:o,id:a,style:u,className:d,events:f}=t,p=c(t,["children","fallback","tabIndex","resize","id","style","className","events"]);const[m,g]=SU(s({scroll:!0,debounce:{scroll:50,resize:0}},o)),v=h.exports.useRef(null),[y,b]=h.exports.useState(!1),[x,_]=h.exports.useState(!1);if(y)throw y;if(x)throw x;return qU((()=>{g.width>0&&g.height>0&&function(e,t,n={}){var r,i,o,a,l,u=n,{gl:d,size:f,mode:p=JU[1],events:m,onCreated:g}=u,v=c(u,["gl","size","mode","events","onCreated"]);f||(f={width:null!=(i=null==(o=t.parentElement)?void 0:o.clientWidth)?i:0,height:null!=(a=null==(l=t.parentElement)?void 0:l.clientHeight)?a:0});let y=ZU.get(t),b=null==y?void 0:y.fiber,x=null==y?void 0:y.store,_=null==(r=x)?void 0:r.getState();if(b&&_){const e=_.internal.lastProps;void 0===v.dpr||AU.equ(e.dpr,v.dpr)||_.setDpr(v.dpr),void 0===f||AU.equ(e.size,f)||_.setSize(f.width,f.height);v.linear!==e.linear&&(rj(t),b=void 0)}if(!b){const e=((e,t)=>{return n=e,n&&n.render?e:new II(s({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0},e));var n})(d,t);v.vr&&(e.xr.enabled=!0,e.setAnimationLoop((e=>KU(e,!0)))),x=BU(tj,QU,KU,s({gl:e,size:f},v));const n=x.getState();n.get,b=ej.createContainer(x,JU.indexOf(p),!1,null),ZU.set(t,{fiber:b,store:x}),m&&n.set({events:m(x)})}if(x&&b)return ej.updateContainer(h.exports.createElement(nj,{store:x,element:e,onCreated:g,target:t}),b,null,(()=>{})),x;throw"Error creating root!"}(h.exports.createElement(YU,{set:_},h.exports.createElement(h.exports.Suspense,{fallback:h.exports.createElement(XU,{set:b})},n)),v.current,l(s({},p),{size:g,events:f||GU}))}),[g,n]),qU((()=>{const e=v.current;return()=>rj(e)}),[]),h.exports.createElement("div",{ref:m,id:a,className:d,tabIndex:i,style:s({position:"relative",width:"100%",height:"100%",overflow:"hidden"},u)},h.exports.createElement("canvas",{ref:v,style:{display:"block"}},r))}YU.getDerivedStateFromError=()=>({error:!0});const ZU=new Map,JU=["legacy","blocking","concurrent"],{invalidate:QU,advance:KU}=function(e){let t,n=!1;function r(i){if(n=!0,t=0,VU(HU,i),e.forEach((e=>{const n=e.store.getState();n.internal.active&&("always"===n.frameloop||n.internal.frames>0)&&(t+=WU(i,n))})),VU(UU,i),t>0)return requestAnimationFrame(r);VU(jU,i),n=!1}return{loop:r,invalidate:function t(i){if(!i)return e.forEach((e=>t(e.store.getState())));!i.vr&&i.internal.active&&"never"!==i.frameloop&&(i.internal.frames=Math.min(60,i.internal.frames+1),n||(n=!0,requestAnimationFrame(r)))},advance:function(t,n=!0,r){n&&VU(HU,t),r?WU(t,r):e.forEach((e=>WU(t,e.store.getState()))),n&&VU(UU,t)}}}(ZU),{reconciler:ej,applyProps:tj}=function(e){function t(e,t,i={},o=!1){var a,c,u;const d=null!=(a=null==e?void 0:e.__r3f)?a:{},h=d.root,f=null!=(c=null==h||null==h.getState?void 0:h.getState())?c:{},p=[],m=[],g={};let v=0;Object.entries(t).forEach((([e,t])=>{-1===OU.indexOf(e)&&(g[e]=t)})),d.memoizedProps&&d.memoizedProps.args&&(g.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(g.attach=d.memoizedProps.attach),e.__r3f&&(e.__r3f.memoizedProps=g);let y=Object.keys(t);for(v=0;v<y.length;v++)AU.equ(t[y[v]],i[y[v]])&&p.push(y[v]),AU.fun(t[y[v]])&&/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(y[v])&&m.push(y[v]);const b=[];if(o)for(y=Object.keys(i),v=0;v<y.length;v++)t.hasOwnProperty(y[v])||b.push(y[v]);const x=[...p,...OU];null!=(u=e.__r3f)&&u.instance&&x.push("object");const _=s({},t);for(y=Object.keys(_),v=0;v<y.length;v++)x.indexOf(y[v])>-1&&delete _[y[v]];const w=Object.entries(_);for(v=0;v<b.length;v++)"children"!==b[v]&&w.unshift([b[v],"__defaultremove"]);if(w.length>0){if(w.forEach((([t,r])=>{if(!m.includes(t)){let i=e,o=i[t];if(t.includes("-")){const n=t.split("-");if(o=n.reduce(((e,t)=>e[t]),e),!o||!o.set){const[r,...o]=n.reverse();i=o.reverse().reduce(((e,t)=>e[t]),e),t=r}}if("__defaultremove"===r)if(o&&o.constructor)r=new o.constructor(g.args);else if(i.constructor){const e=new i.constructor(i.__r3f.memoizedProps.args);r=e[o],e.dispose&&e.dispose()}else r=0;if(o&&o.set&&(o.copy||o instanceof OL)){if(Array.isArray(r))o.fromArray?o.fromArray(r):o.set(...r);else if(o.copy&&r&&r.constructor&&o.constructor.name===r.constructor.name)o.copy(r);else if(void 0!==r){const e=o instanceof vR;!e&&o.setScalar?o.setScalar(r):o instanceof OL&&r instanceof OL?o.mask=r.mask:o.set(r),!f.linear&&e&&o.convertSRGBToLinear()}}else i[t]=r,!f.linear&&i[t]instanceof BP&&(i[t].encoding=3001);n(e)}})),o&&h&&e.raycast&&d.handlers){d.handlers=void 0;const t=f.internal.interaction.indexOf(e);t>-1&&f.internal.interaction.splice(t,1)}m.length&&(o&&h&&e.raycast&&f.internal.interaction.push(e),d.handlers=m.reduce(((e,n)=>l(s({},e),{[n]:t[n]})),{})),e.parent&&r(e)}}function n(e){var t,n;const r=null==(t=e.__r3f)||null==(n=t.root)||null==n.getState?void 0:n.getState();r&&0===r.internal.frames&&r.invalidate()}function r(e){null==e.onUpdate||e.onUpdate(e)}function i(e,n,r,i,o){var a=n,{args:l=[]}=a,u=c(a,["args"]);let d,h=`${e[0].toUpperCase()}${e.slice(1)}`;if(!PU(r)&&o){const e=t=>t.return?e(t.return):t.stateNode&&t.stateNode.containerInfo;r=e(o)}if(!r||!PU(r))throw`No valid root for ${h}!`;if("primitive"===e){if(void 0===u.object)throw"Primitives without 'object' are invalid!";d=IU(u.object,{root:r,instance:!0})}else{const e=DU[h]||pU[h];if(!e)throw`${h} is not part of the THREE namespace! Did you forget to extend? See: https://github.com/pmndrs/react-three-fiber/blob/master/markdown/api.md#using-3rd-party-objects-declaratively`;const t=AU.arr(l);d=IU(t?new e(...l):new e(l),{root:r,memoizedProps:{args:t&&0===l.length?null:l}})}return h.endsWith("Geometry")?u=s({attach:"geometry"},u):h.endsWith("Material")&&(u=s({attach:"material"},u)),t(d,u,{}),d}function o(e,t){let i=!1;t&&(t.attachArray?(AU.arr(e[t.attachArray])||(e[t.attachArray]=[]),e[t.attachArray].push(t)):t.attachObject?(AU.obj(e[t.attachObject[0]])||(e[t.attachObject[0]]={}),e[t.attachObject[0]][t.attachObject[1]]=t):t.attach&&!AU.fun(t.attach)?e[t.attach]=t:t.isObject3D&&(e.add(t),i=!0),i||(e.__r3f.objects.push(t),t.parent=e),r(t),n(t))}function a(e,t,i){let a=!1;if(t){if(t.attachArray){const n=e[t.attachArray];AU.arr(n)||(e[t.attachArray]=[]),n.splice(n.indexOf(i),0,t)}else{if(t.attachObject||t.attach&&!AU.fun(t.attach))return a=!0,o(e,t);if(t.isObject3D){t.parent=e,t.dispatchEvent({type:"added"});const n=e.children.filter((e=>e!==t)),r=n.indexOf(i);e.children=[...n.slice(0,r),t,...n.slice(r)],a=!0}}a||(e.__r3f.objects.push(t),t.parent=e),r(t),n(t)}}function u(e,t,n=!1){e&&[...e].forEach((e=>d(t,e,n)))}function d(e,t,r){if(t){var i;if(e.__r3f.objects){const n=e.__r3f.objects.length;e.__r3f.objects=e.__r3f.objects.filter((e=>e!==t));e.__r3f.objects.length<n&&(t.parent=null)}if(t.attachArray)e[t.attachArray]=e[t.attachArray].filter((e=>e!==t));else if(t.attachObject)delete e[t.attachObject[0]][t.attachObject[1]];else if(t.attach&&!AU.fun(t.attach))e[t.attach]=null;else if(t.isObject3D){var o;e.remove(t),null!=(o=t.__r3f)&&o.root&&function(e,t){const{internal:n}=e.getState();n.interaction=n.interaction.filter((e=>e!==t)),n.initialHits=n.initialHits.filter((e=>e!==t)),n.hovered.forEach(((e,r)=>{e.eventObject!==t&&e.object!==t||n.hovered.delete(r)}))}(t.__r3f.root,t)}const s=null==(i=t.__r3f)?void 0:i.instance,l=void 0===r?null!==t.dispose&&!s:r;var a;if(!s)u(null==(a=t.__r3f)?void 0:a.objects,t,l),u(t.children,t,l);t.__r3f&&(delete t.__r3f.root,delete t.__r3f.objects,delete t.__r3f.handlers,delete t.__r3f.memoizedProps,s||delete t.__r3f),l&&t.dispose&&"Scene"!==t.type&&Q.exports.unstable_runWithPriority(Q.exports.unstable_IdlePriority,(()=>t.dispose())),n(e)}}function h(e,t,n,r){const a=e.parent;if(!a)return;const s=i(t,n,e.__r3f.root);e.children&&(e.children.forEach((e=>o(s,e))),e.children=[]),e.__r3f.objects.forEach((e=>o(s,e))),e.__r3f.objects=[],d(a,e),o(a,s),[r,r.alternate].forEach((e=>{null!==e&&(e.stateNode=s,e.ref&&("function"==typeof e.ref?e.ref(s):e.ref.current=s))}))}return{reconciler:xU({now:Q.exports.unstable_now,createInstance:i,removeChild:d,appendChild:o,appendInitialChild:o,insertBefore:a,warnsIfNotActing:!0,supportsMutation:!0,isPrimaryRenderer:!1,scheduleTimeout:AU.fun(setTimeout)?setTimeout:void 0,cancelTimeout:AU.fun(clearTimeout)?clearTimeout:void 0,setTimeout:AU.fun(setTimeout)?setTimeout:void 0,clearTimeout:AU.fun(clearTimeout)?clearTimeout:void 0,noTimeout:-1,appendChildToContainer:(e,t)=>{const{container:n,root:r}=LU(e,t);n.__r3f.root=r,o(n,t)},removeChildFromContainer:(e,t)=>{const{container:n}=LU(e,t);d(n,t)},insertInContainerBefore:(e,t,n)=>{const{container:r}=LU(e,t);a(r,t,n)},commitUpdate(e,n,r,i,o,a){if(e.__r3f.instance&&o.object&&o.object!==e)h(e,r,o,a);else{const n=o,{args:s=[]}=n,l=c(n,["args"]),u=i,{args:d=[]}=u,f=c(u,["args"]);s.some(((e,t)=>AU.obj(e)?Object.entries(e).some((([e,n])=>n!==d[t][e])):e!==d[t]))?h(e,r,o,a):t(e,l,f,!0)}},hideInstance(e){e.isObject3D&&(e.visible=!1,n(e))},unhideInstance(e,t){(e.isObject3D&&null==t.visible||t.visible)&&(e.visible=!0,n(e))},hideTextInstance(){throw new Error("Text is not allowed in the R3F tree.")},getPublicInstance:e=>e,getRootHostContext:e=>RU,getChildHostContext:e=>RU,createTextInstance(){},finalizeInitialChildren:e=>!!e.__r3f.handlers,commitMount(e){e.raycast&&e.__r3f.handlers&&e.__r3f.root.getState().internal.interaction.push(e)},prepareUpdate:()=>RU,shouldDeprioritizeSubtree:()=>!1,prepareForCommit:()=>null,preparePortalMount(...e){},resetAfterCommit(){},shouldSetTextContent:()=>!1,clearContainer:()=>!1}),applyProps:t}}();function nj({store:e,element:t,onCreated:n,target:r}){return h.exports.useEffect((()=>{const t=e.getState();t.set((e=>({internal:l(s({},e.internal),{active:!0})}))),null==t.events.connect||t.events.connect(r),n&&n(t)}),[]),h.exports.createElement(NU.Provider,{value:e},t)}function rj(e,t){const n=ZU.get(e),r=null==n?void 0:n.fiber;if(r){const i=null==n?void 0:n.store.getState();i&&(i.internal.active=!1),ej.updateContainer(null,r,null,(()=>{i&&setTimeout((()=>{var n,r,o;null==i.events.disconnect||i.events.disconnect(),null==(n=i.gl)||null==(r=n.renderLists)||null==r.dispose||r.dispose(),null==(o=i.gl)||null==o.forceContextLoss||o.forceContextLoss(),function(e){e.dispose&&"Scene"!==e.type&&e.dispose();for(const r in e){var t,n;null==(t=(n=r).dispose)||t.call(n),delete e[r]}}(i),ZU.delete(e),t&&t(e)}),500)}))}}ej.act,ej.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:"17.0.2"});
/*!
* Chart.js v3.3.2
* https://www.chartjs.org
* (c) 2021 Chart.js Contributors
* Released under the MIT License
*/
const ij="undefined"==typeof window?function(e){return e()}:window.requestAnimationFrame;function oj(e,t,n){const r=n||(e=>Array.prototype.slice.call(e));let i=!1,o=[];return function(...n){o=r(n),i||(i=!0,ij.call(window,(()=>{i=!1,e.apply(t,o)})))}}const aj=e=>"start"===e?"left":"end"===e?"right":"center",sj=(e,t,n)=>"start"===e?t:"end"===e?n:(t+n)/2;function lj(){}const cj=function(){let e=0;return function(){return e++}}();function uj(e){return null==e}function dj(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)}function hj(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}const fj=e=>("number"==typeof e||e instanceof Number)&&isFinite(+e);function pj(e,t){return fj(e)?e:t}function mj(e,t){return void 0===e?t:e}const gj=(e,t)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e;function vj(e,t,n){if(e&&"function"==typeof e.call)return e.apply(n,t)}function yj(e,t,n,r){let i,o,a;if(dj(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<o;i++)t.call(n,e[i],i);else if(hj(e))for(a=Object.keys(e),o=a.length,i=0;i<o;i++)t.call(n,e[a[i]],a[i])}function bj(e,t){let n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function xj(e){if(dj(e))return e.map(xj);if(hj(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=xj(e[n[i]]);return t}return e}function _j(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function wj(e,t,n,r){if(!_j(e))return;const i=t[e],o=n[e];hj(i)&&hj(o)?Sj(i,o,r):t[e]=xj(o)}function Sj(e,t,n){const r=dj(t)?t:[t],i=r.length;if(!hj(e))return e;const o=(n=n||{}).merger||wj;for(let a=0;a<i;++a){if(!hj(t=r[a]))continue;const i=Object.keys(t);for(let r=0,a=i.length;r<a;++r)o(i[r],e,t,n)}return e}function Mj(e,t){return Sj(e,t,{merger:Ej})}function Ej(e,t,n){if(!_j(e))return;const r=t[e],i=n[e];hj(r)&&hj(i)?Mj(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=xj(i))}function Tj(e,t){const n=e.indexOf(".",t);return-1===n?e.length:n}function Aj(e,t){if(""===t)return e;let n=0,r=Tj(t,n);for(;e&&r>n;)e=e[t.substr(n,r-n)],n=r+1,r=Tj(t,n);return e}function Cj(e){return e.charAt(0).toUpperCase()+e.slice(1)}const kj=e=>void 0!==e,Pj=e=>"function"==typeof e,Lj=Math.PI,Rj=2*Lj,Oj=Rj+Lj,Dj=Number.POSITIVE_INFINITY,Ij=Lj/180,zj=Lj/2,Nj=Lj/4,Bj=2*Lj/3,Fj=Math.log10,Hj=Math.sign;function Uj(e){const t=Math.pow(10,Math.floor(Fj(e))),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function jj(e){return!isNaN(parseFloat(e))&&isFinite(e)}function Vj(e,t,n){return Math.abs(e-t)<n}function Wj(e,t,n){let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Gj(e){return e*(Lj/180)}function qj(e){return e*(180/Lj)}function Xj(e){if(!fj(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function Yj(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function $j(e,t){return(e-t+Oj)%Rj-Lj}function Zj(e){return(e%Rj+Rj)%Rj}function Jj(e,t,n,r){const i=Zj(e),o=Zj(t),a=Zj(n),s=Zj(o-i),l=Zj(a-i),c=Zj(i-o),u=Zj(i-a);return i===o||i===a||r&&o===a||s>l&&c<u}function Qj(e,t,n){return Math.max(t,Math.min(n,e))}const Kj=e=>0===e||1===e,eV=(e,t,n)=>-Math.pow(2,10*(e-=1))*Math.sin((e-t)*Rj/n),tV=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Rj/n)+1,nV={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*zj),easeOutSine:e=>Math.sin(e*zj),easeInOutSine:e=>-.5*(Math.cos(Lj*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>Kj(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Kj(e)?e:eV(e,.075,.3),easeOutElastic:e=>Kj(e)?e:tV(e,.075,.3),easeInOutElastic(e){const t=.1125;return Kj(e)?e:e<.5?.5*eV(2*e,t,.45):.5+.5*tV(2*e-1,t,.45)},easeInBack(e){const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:e=>1-nV.easeOutBounce(1-e),easeOutBounce(e){const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?.5*nV.easeInBounce(2*e):.5*nV.easeOutBounce(2*e-1)+.5},rV={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},iV="0123456789ABCDEF",oV=e=>iV[15&e],aV=e=>iV[(240&e)>>4]+iV[15&e],sV=e=>(240&e)>>4==(15&e);function lV(e){var t=function(e){return sV(e.r)&&sV(e.g)&&sV(e.b)&&sV(e.a)}(e)?oV:aV;return e?"#"+t(e.r)+t(e.g)+t(e.b)+(e.a<255?t(e.a):""):e}function cV(e){return e+.5|0}const uV=(e,t,n)=>Math.max(Math.min(e,n),t);function dV(e){return uV(cV(2.55*e),0,255)}function hV(e){return uV(cV(255*e),0,255)}function fV(e){return uV(cV(e/2.55)/100,0,1)}function pV(e){return uV(cV(100*e),0,100)}const mV=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const gV=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function vV(e,t,n){const r=t*Math.min(n,1-n),i=(t,i=(t+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function yV(e,t,n){const r=(r,i=(r+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function bV(e,t,n){const r=vV(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function xV(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),o=Math.min(t,n,r),a=(i+o)/2;let s,l,c;return i!==o&&(c=i-o,l=a>.5?c/(2-i-o):c/(i+o),s=i===t?(n-r)/c+(n<r?6:0):i===n?(r-t)/c+2:(t-n)/c+4,s=60*s+.5),[0|s,l||0,a]}function _V(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(hV)}function wV(e,t,n){return _V(vV,e,t,n)}function SV(e){return(e%360+360)%360}function MV(e){const t=gV.exec(e);let n,r=255;if(!t)return;t[5]!==n&&(r=t[6]?dV(+t[5]):hV(+t[5]));const i=SV(+t[2]),o=+t[3]/100,a=+t[4]/100;return n="hwb"===t[1]?function(e,t,n){return _V(bV,e,t,n)}(i,o,a):"hsv"===t[1]?function(e,t,n){return _V(yV,e,t,n)}(i,o,a):wV(i,o,a),{r:n[0],g:n[1],b:n[2],a:r}}const EV={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},TV={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let AV;function CV(e){AV||(AV=function(){const e={},t=Object.keys(TV),n=Object.keys(EV);let r,i,o,a,s;for(r=0;r<t.length;r++){for(a=s=t[r],i=0;i<n.length;i++)o=n[i],s=s.replace(o,EV[o]);o=parseInt(TV[a],16),e[s]=[o>>16&255,o>>8&255,255&o]}return e}(),AV.transparent=[0,0,0,0]);const t=AV[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}function kV(e,t,n){if(e){let r=xV(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,0===t?360:1)),r=wV(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function PV(e,t){return e?Object.assign(t||{},e):e}function LV(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=hV(e[3]))):(t=PV(e,{r:0,g:0,b:0,a:1})).a=hV(t.a),t}function RV(e){return"r"===e.charAt(0)?function(e){const t=mV.exec(e);let n,r,i,o=255;if(t){if(t[7]!==n){const e=+t[7];o=255&(t[8]?dV(e):255*e)}return n=+t[1],r=+t[3],i=+t[5],n=255&(t[2]?dV(n):n),r=255&(t[4]?dV(r):r),i=255&(t[6]?dV(i):i),{r:n,g:r,b:i,a:o}}}(e):MV(e)}class OV{constructor(e){if(e instanceof OV)return e;const t=typeof e;let n;var r,i,o;"object"===t?n=LV(e):"string"===t&&(o=(r=e).length,"#"===r[0]&&(4===o||5===o?i={r:255&17*rV[r[1]],g:255&17*rV[r[2]],b:255&17*rV[r[3]],a:5===o?17*rV[r[4]]:255}:7!==o&&9!==o||(i={r:rV[r[1]]<<4|rV[r[2]],g:rV[r[3]]<<4|rV[r[4]],b:rV[r[5]]<<4|rV[r[6]],a:9===o?rV[r[7]]<<4|rV[r[8]]:255})),n=i||CV(e)||RV(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=PV(this._rgb);return e&&(e.a=fV(e.a)),e}set rgb(e){this._rgb=LV(e)}rgbString(){return this._valid?(e=this._rgb)&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${fV(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`):this._rgb;var e}hexString(){return this._valid?lV(this._rgb):this._rgb}hslString(){return this._valid?function(e){if(!e)return;const t=xV(e),n=t[0],r=pV(t[1]),i=pV(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${fV(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}(this._rgb):this._rgb}mix(e,t){const n=this;if(e){const r=n.rgb,i=e.rgb;let o;const a=t===o?.5:t,s=2*a-1,l=r.a-i.a,c=((s*l==-1?s:(s+l)/(1+s*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=a*r.a+(1-a)*i.a,n.rgb=r}return n}clone(){return new OV(this.rgb)}alpha(e){return this._rgb.a=hV(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=cV(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){return this._rgb.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return kV(this._rgb,2,e),this}darken(e){return kV(this._rgb,2,-e),this}saturate(e){return kV(this._rgb,1,e),this}desaturate(e){return kV(this._rgb,1,-e),this}rotate(e){return function(e,t){var n=xV(e);n[0]=SV(n[0]+t),n=wV(n),e.r=n[0],e.g=n[1],e.b=n[2]}(this._rgb,e),this}}function DV(e){return new OV(e)}const IV=e=>e instanceof CanvasGradient||e instanceof CanvasPattern;function zV(e){return IV(e)?e:DV(e)}function NV(e){return IV(e)?e:DV(e).saturate(.5).darken(.1).hexString()}const BV=Object.create(null),FV=Object.create(null);function HV(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const t=n[r];e=e[t]||(e[t]=Object.create(null))}return e}function UV(e,t,n){return"string"==typeof t?Sj(HV(e,t),n):Sj(HV(e,""),t)}var jV=new class{constructor(e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=e=>e.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>NV(t.backgroundColor),this.hoverBorderColor=(e,t)=>NV(t.borderColor),this.hoverColor=(e,t)=>NV(t.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(e)}set(e,t){return UV(this,e,t)}get(e){return HV(this,e)}describe(e,t){return UV(FV,e,t)}override(e,t){return UV(BV,e,t)}route(e,t,n,r){const i=HV(this,e),o=HV(this,n),a="_"+t;Object.defineProperties(i,{[a]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){const e=this[a],t=o[r];return hj(e)?Object.assign({},t,e):mj(e,t)},set(e){this[a]=e}}})}}({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function VV(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function WV(e,t,n,r){let i=(r=r||{}).data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let a=0;const s=n.length;let l,c,u,d,h;for(l=0;l<s;l++)if(d=n[l],null!=d&&!0!==dj(d))a=VV(e,i,o,a,d);else if(dj(d))for(c=0,u=d.length;c<u;c++)h=d[c],null==h||dj(h)||(a=VV(e,i,o,a,h));e.restore();const f=o.length/2;if(f>n.length){for(l=0;l<f;l++)delete i[o[l]];o.splice(0,f)}return a}function GV(e,t,n){const r=e.currentDevicePixelRatio,i=0!==n?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function qV(e,t){(t=t||e.getContext("2d")).save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function XV(e,t,n,r){let i,o,a,s,l;const c=t.pointStyle,u=t.rotation,d=t.radius;let h=(u||0)*Ij;if(c&&"object"==typeof c&&(i=c.toString(),"[object HTMLImageElement]"===i||"[object HTMLCanvasElement]"===i))return e.save(),e.translate(n,r),e.rotate(h),e.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void e.restore();if(!(isNaN(d)||d<=0)){switch(e.beginPath(),c){default:e.arc(n,r,d,0,Rj),e.closePath();break;case"triangle":e.moveTo(n+Math.sin(h)*d,r-Math.cos(h)*d),h+=Bj,e.lineTo(n+Math.sin(h)*d,r-Math.cos(h)*d),h+=Bj,e.lineTo(n+Math.sin(h)*d,r-Math.cos(h)*d),e.closePath();break;case"rectRounded":l=.516*d,s=d-l,o=Math.cos(h+Nj)*s,a=Math.sin(h+Nj)*s,e.arc(n-o,r-a,l,h-Lj,h-zj),e.arc(n+a,r-o,l,h-zj,h),e.arc(n+o,r+a,l,h,h+zj),e.arc(n-a,r+o,l,h+zj,h+Lj),e.closePath();break;case"rect":if(!u){s=Math.SQRT1_2*d,e.rect(n-s,r-s,2*s,2*s);break}h+=Nj;case"rectRot":o=Math.cos(h)*d,a=Math.sin(h)*d,e.moveTo(n-o,r-a),e.lineTo(n+a,r-o),e.lineTo(n+o,r+a),e.lineTo(n-a,r+o),e.closePath();break;case"crossRot":h+=Nj;case"cross":o=Math.cos(h)*d,a=Math.sin(h)*d,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a),e.moveTo(n+a,r-o),e.lineTo(n-a,r+o);break;case"star":o=Math.cos(h)*d,a=Math.sin(h)*d,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a),e.moveTo(n+a,r-o),e.lineTo(n-a,r+o),h+=Nj,o=Math.cos(h)*d,a=Math.sin(h)*d,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a),e.moveTo(n+a,r-o),e.lineTo(n-a,r+o);break;case"line":o=Math.cos(h)*d,a=Math.sin(h)*d,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(h)*d,r+Math.sin(h)*d)}e.fill(),t.borderWidth>0&&e.stroke()}}function YV(e,t,n){return n=n||.5,e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function $V(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function ZV(e){e.restore()}function JV(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if("middle"===i){const r=(t.x+n.x)/2;e.lineTo(r,t.y),e.lineTo(r,n.y)}else"after"===i!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function QV(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function KV(e,t,n,r,i,o={}){const a=dj(t)?t:[t],s=o.strokeWidth>0&&""!==o.strokeColor;let l,c;for(e.save(),o.translation&&e.translate(o.translation[0],o.translation[1]),uj(o.rotation)||e.rotate(o.rotation),e.font=i.string,o.color&&(e.fillStyle=o.color),o.textAlign&&(e.textAlign=o.textAlign),o.textBaseline&&(e.textBaseline=o.textBaseline),l=0;l<a.length;++l){if(c=a[l],s&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),uj(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,r,o.maxWidth)),e.fillText(c,n,r,o.maxWidth),o.strikethrough||o.underline){const t=e.measureText(c),i=n-t.actualBoundingBoxLeft,a=n+t.actualBoundingBoxRight,s=r-t.actualBoundingBoxAscent,l=r+t.actualBoundingBoxDescent,u=o.strikethrough?(s+l)/2:l;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=o.decorationWidth||2,e.moveTo(i,u),e.lineTo(a,u),e.stroke()}r+=i.lineHeight}e.restore()}function eW(e,t){const{x:n,y:r,w:i,h:o,radius:a}=t;e.arc(n+a.topLeft,r+a.topLeft,a.topLeft,-zj,Lj,!0),e.lineTo(n,r+o-a.bottomLeft),e.arc(n+a.bottomLeft,r+o-a.bottomLeft,a.bottomLeft,Lj,zj,!0),e.lineTo(n+i-a.bottomRight,r+o),e.arc(n+i-a.bottomRight,r+o-a.bottomRight,a.bottomRight,zj,0,!0),e.lineTo(n+i,r+a.topRight),e.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-zj,!0),e.lineTo(n+a.topLeft,r)}const tW=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),nW=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function rW(e,t){const n=(""+e).match(tW);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e}function iW(e,t){const n={},r=hj(t),i=r?Object.keys(t):t,o=hj(e)?r?n=>mj(e[n],e[t[n]]):t=>e[t]:()=>e;for(const a of i)n[a]=+o(a)||0;return n}function oW(e){return iW(e,{top:"y",right:"x",bottom:"y",left:"x"})}function aW(e){return iW(e,["topLeft","topRight","bottomLeft","bottomRight"])}function sW(e){const t=oW(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function lW(e,t){e=e||{},t=t||jV.font;let n=mj(e.size,t.size);"string"==typeof n&&(n=parseInt(n,10));let r=mj(e.style,t.style);r&&!(""+r).match(nW)&&(console.warn('Invalid font style specified: "'+r+'"'),r="");const i={family:mj(e.family,t.family),lineHeight:rW(mj(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:mj(e.weight,t.weight),string:""};return i.string=function(e){return!e||uj(e.size)||uj(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(i),i}function cW(e,t,n,r){let i,o,a,s=!0;for(i=0,o=e.length;i<o;++i)if(a=e[i],void 0!==a&&(void 0!==t&&"function"==typeof a&&(a=a(t),s=!1),void 0!==n&&dj(a)&&(a=a[n%a.length],s=!1),void 0!==a))return r&&!s&&(r.cacheable=!1),a}function uW(e,t,n){n=n||(n=>e[n]<t);let r,i=e.length-1,o=0;for(;i-o>1;)r=o+i>>1,n(r)?o=r:i=r;return{lo:o,hi:i}}const dW=(e,t,n)=>uW(e,n,(r=>e[r][t]<n)),hW=(e,t,n)=>uW(e,n,(r=>e[r][t]>=n));const fW=["push","pop","shift","splice","unshift"];function pW(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);-1!==i&&r.splice(i,1),r.length>0||(fW.forEach((t=>{delete e[t]})),delete e._chartjs)}function mW(e){const t=new Set;let n,r;for(n=0,r=e.length;n<r;++n)t.add(e[n]);if(t.size===r)return e;const i=[];return t.forEach((e=>{i.push(e)})),i}function gW(e,t=[""],n=e,r,i=(()=>e[0])){kj(r)||(r=AW("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:n,_fallback:r,_getTarget:i,override:i=>gW([i,...e],t,n,r)};return new Proxy(o,{deleteProperty:(t,n)=>(delete t[n],delete t._keys,delete e[0][n],!0),get:(n,r)=>_W(n,r,(()=>function(e,t,n,r){let i;for(const o of t)if(i=AW(bW(o,e),n),kj(i))return xW(e,i)?EW(n,r,e,i):i}(r,t,e,n))),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e._scopes[0],t),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(e,t)=>CW(e).includes(t),ownKeys:e=>CW(e),set:(e,t,n)=>((e._storage||(e._storage=i()))[t]=n,delete e[t],delete e._keys,!0)})}function vW(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:yW(e,r),setContext:t=>vW(e,t,n,r),override:i=>vW(e.override(i),t,n,r)};return new Proxy(i,{deleteProperty:(t,n)=>(delete t[n],delete e[n],!0),get:(e,t,n)=>_W(e,t,(()=>function(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];Pj(s)&&a.isScriptable(t)&&(s=function(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+[...s].join("->")+"->"+e);s.add(e),t=t(o,a||r),s.delete(e),hj(t)&&(t=EW(i._scopes,i,e,t));return t}(t,s,e,n));dj(s)&&s.length&&(s=function(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(kj(o.index)&&r(e))t=t[o.index%t.length];else if(hj(t[0])){const n=t,r=i._scopes.filter((e=>e!==n));t=[];for(const l of n){const n=EW(r,i,e,l);t.push(vW(n,o,a&&a[e],s))}}return t}(t,s,e,a.isIndexable));xW(t,s)&&(s=vW(s,i,o&&o[t],a));return s}(e,t,n))),getOwnPropertyDescriptor:(t,n)=>t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,n)=>Reflect.has(e,n),ownKeys:()=>Reflect.ownKeys(e),set:(t,n,r)=>(e[n]=r,delete t[n],!0)})}function yW(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Pj(n)?n:()=>n,isIndexable:Pj(r)?r:()=>r}}const bW=(e,t)=>e?e+Cj(t):t,xW=(e,t)=>hj(t)&&"adapters"!==e;function _W(e,t,n){let r=e[t];return kj(r)||(r=n(),kj(r)&&(e[t]=r)),r}function wW(e,t,n){return Pj(e)?e(t,n):e}const SW=(e,t)=>!0===e?t:"string"==typeof e?Aj(t,e):void 0;function MW(e,t,n,r){for(const i of t){const t=SW(n,i);if(t){e.add(t);const i=wW(t._fallback,n,t);if(kj(i)&&i!==n&&i!==r)return i}else if(!1===t&&kj(r)&&n!==r)return null}return!1}function EW(e,t,n,r){const i=t._rootScopes,o=wW(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=TW(s,a,n,o||n);return null!==l&&((!kj(o)||o===n||(l=TW(s,a,o,l),null!==l))&&gW([...s],[""],i,o,(()=>function(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];if(dj(i)&&hj(n))return n;return i}(t,n,r))))}function TW(e,t,n,r){for(;n;)n=MW(e,t,n,r);return n}function AW(e,t){for(const n of t){if(!n)continue;const t=n[e];if(kj(t))return t}}function CW(e){let t=e._keys;return t||(t=e._keys=function(e){const t=new Set;for(const n of e)for(const e of Object.keys(n).filter((e=>!e.startsWith("_"))))t.add(e);return[...t]}(e._scopes)),t}const kW=Number.EPSILON||1e-14,PW=(e,t)=>t<e.length&&!e[t].skip&&e[t],LW=e=>"x"===e?"y":"x";function RW(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=Yj(o,i),l=Yj(a,o);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,h=r*u;return{previous:{x:o.x-d*(a.x-i.x),y:o.y-d*(a.y-i.y)},next:{x:o.x+h*(a.x-i.x),y:o.y+h*(a.y-i.y)}}}function OW(e,t="x"){const n=LW(t),r=e.length,i=Array(r).fill(0),o=Array(r);let a,s,l,c=PW(e,0);for(a=0;a<r;++a)if(s=l,l=c,c=PW(e,a+1),l){if(c){const e=c[t]-l[t];i[a]=0!==e?(c[n]-l[n])/e:0}o[a]=s?c?Hj(i[a-1])!==Hj(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}!function(e,t,n){const r=e.length;let i,o,a,s,l,c=PW(e,0);for(let u=0;u<r-1;++u)l=c,c=PW(e,u+1),l&&c&&(Vj(t[u],0,kW)?n[u]=n[u+1]=0:(i=n[u]/t[u],o=n[u+1]/t[u],s=Math.pow(i,2)+Math.pow(o,2),s<=9||(a=3/Math.sqrt(s),n[u]=i*a*t[u],n[u+1]=o*a*t[u])))}(e,i,o),function(e,t,n="x"){const r=LW(n),i=e.length;let o,a,s,l=PW(e,0);for(let c=0;c<i;++c){if(a=s,s=l,l=PW(e,c+1),!s)continue;const i=s[n],u=s[r];a&&(o=(i-a[n])/3,s[`cp1${n}`]=i-o,s[`cp1${r}`]=u-o*t[c]),l&&(o=(l[n]-i)/3,s[`cp2${n}`]=i+o,s[`cp2${r}`]=u+o*t[c])}}(e,o,t)}function DW(e,t,n){return Math.max(Math.min(e,n),t)}function IW(e,t,n,r,i){let o,a,s,l;if(t.spanGaps&&(e=e.filter((e=>!e.skip))),"monotone"===t.cubicInterpolationMode)OW(e,i);else{let n=r?e[e.length-1]:e[0];for(o=0,a=e.length;o<a;++o)s=e[o],l=RW(n,s,e[Math.min(o+1,a-(r?0:1))%a],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,n=s}t.capBezierPoints&&function(e,t){let n,r,i,o,a,s=YV(e[0],t);for(n=0,r=e.length;n<r;++n)a=o,o=s,s=n<r-1&&YV(e[n+1],t),o&&(i=e[n],a&&(i.cp1x=DW(i.cp1x,t.left,t.right),i.cp1y=DW(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=DW(i.cp2x,t.left,t.right),i.cp2y=DW(i.cp2y,t.top,t.bottom)))}(e,n)}function zW(e){let t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t}function NW(e,t,n){let r;return"string"==typeof e?(r=parseInt(e,10),-1!==e.indexOf("%")&&(r=r/100*t.parentNode[n])):r=e,r}const BW=e=>window.getComputedStyle(e,null);const FW=["top","right","bottom","left"];function HW(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=FW[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function UW(e,t){const{canvas:n,currentDevicePixelRatio:r}=t,i=BW(n),o="border-box"===i.boxSizing,a=HW(i,"padding"),s=HW(i,"border","width"),{x:l,y:c,box:u}=function(e,t){const n=e.native||e,r=n.touches,i=r&&r.length?r[0]:n,{offsetX:o,offsetY:a}=i;let s,l,c=!1;if(((e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot))(o,a,n.target))s=o,l=a;else{const e=t.getBoundingClientRect();s=i.clientX-e.left,l=i.clientY-e.top,c=!0}return{x:s,y:l,box:c}}(e,n),d=a.left+(u&&s.left),h=a.top+(u&&s.top);let{width:f,height:p}=t;return o&&(f-=a.width+s.width,p-=a.height+s.height),{x:Math.round((l-d)/f*n.width/r),y:Math.round((c-h)/p*n.height/r)}}const jW=e=>Math.round(10*e)/10;function VW(e,t,n,r){const i=BW(e),o=HW(i,"margin"),a=NW(i.maxWidth,e,"clientWidth")||Dj,s=NW(i.maxHeight,e,"clientHeight")||Dj,l=function(e,t,n){let r,i;if(void 0===t||void 0===n){const o=zW(e);if(o){const e=o.getBoundingClientRect(),a=BW(o),s=HW(a,"border","width"),l=HW(a,"padding");t=e.width-l.width-s.width,n=e.height-l.height-s.height,r=NW(a.maxWidth,o,"clientWidth"),i=NW(a.maxHeight,o,"clientHeight")}else t=e.clientWidth,n=e.clientHeight}return{width:t,height:n,maxWidth:r||Dj,maxHeight:i||Dj}}(e,t,n);let{width:c,height:u}=l;if("content-box"===i.boxSizing){const e=HW(i,"border","width"),t=HW(i,"padding");c-=t.width+e.width,u-=t.height+e.height}return c=Math.max(0,c-o.width),u=Math.max(0,r?Math.floor(c/r):u-o.height),c=jW(Math.min(c,a,l.maxWidth)),u=jW(Math.min(u,s,l.maxHeight)),c&&!u&&(u=jW(c/2)),{width:c,height:u}}function WW(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=i/r,e.width=o/r;const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==r||a.height!==i||a.width!==o)&&(e.currentDevicePixelRatio=r,a.height=i,a.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0)}const GW=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}return e}();function qW(e,t){const n=function(e,t){return BW(e).getPropertyValue(t)}(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function XW(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function YW(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:"middle"===r?n<.5?e.y:t.y:"after"===r?n<1?e.y:t.y:n>0?t.y:e.y}}function $W(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=XW(e,i,n),s=XW(i,o,n),l=XW(o,t,n),c=XW(a,s,n),u=XW(s,l,n);return XW(c,u,n)}const ZW=new Map;function JW(e,t,n){return function(e,t){t=t||{};const n=e+JSON.stringify(t);let r=ZW.get(n);return r||(r=new Intl.NumberFormat(e,t),ZW.set(n,r)),r}(t,n).format(e)}function QW(e,t,n){return e?function(e,t){return{x:n=>e+e+t-n,setWidth(e){t=e},textAlign:e=>"center"===e?e:"right"===e?"left":"right",xPlus:(e,t)=>e-t,leftForLtr:(e,t)=>e-t}}(t,n):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,t)=>e+t,leftForLtr:(e,t)=>e}}function KW(e,t){let n,r;"ltr"!==t&&"rtl"!==t||(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function eG(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function tG(e){return"angle"===e?{between:Jj,compare:$j,normalize:Zj}:{between:(e,t,n)=>e>=Math.min(t,n)&&e<=Math.max(n,t),compare:(e,t)=>e-t,normalize:e=>e}}function nG({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n==0,style:i}}function rG(e,t,n){if(!n)return[e];const{property:r,start:i,end:o}=n,a=t.length,{compare:s,between:l,normalize:c}=tG(r),{start:u,end:d,loop:h,style:f}=function(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=tG(r),l=t.length;let c,u,{start:d,end:h,loop:f}=e;if(f){for(d+=l,h+=l,c=0,u=l;c<u&&a(s(t[d%l][r]),i,o);++c)d--,h--;d%=l,h%=l}return h<d&&(h+=l),{start:d,end:h,loop:f,style:e.style}}(e,t,n),p=[];let m,g,v,y=!1,b=null;const x=()=>y||l(i,v,m)&&0!==s(i,v),_=()=>!y||0===s(o,m)||l(o,v,m);for(let w=u,S=u;w<=d;++w)g=t[w%a],g.skip||(m=c(g[r]),m!==v&&(y=l(m,i,o),null===b&&x()&&(b=0===s(m,i)?w:S),null!==b&&_()&&(p.push(nG({start:b,end:w,loop:h,count:a,style:f})),b=null),S=w,v=m));return null!==b&&p.push(nG({start:b,end:d,loop:h,count:a,style:f})),p}function iG(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const o=rG(r[i],e.points,t);o.length&&n.push(...o)}return n}function oG(e,t,n){return n&&n.setContext&&t?function(e,t,n){const r=t.length,i=[];let o=e[0].start,a=o;for(const s of e){let e,l,c=t[o%r];for(a=o+1;a<=s.end;a++){const u=t[a%r];l=aG(n.setContext({type:"segment",p0:c,p1:u})),sG(l,e)&&(i.push({start:o,end:a-1,loop:s.loop,style:e}),e=l,o=a-1),c=u,e=l}o<a-1&&(i.push({start:o,end:a-1,loop:s.loop,style:l}),o=a-1)}return i}(e,t,n):e}function aG(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function sG(e,t){return t&&JSON.stringify(e)!==JSON.stringify(t)}
/*!
* Chart.js v3.3.2
* https://www.chartjs.org
* (c) 2021 Chart.js Contributors
* Released under the MIT License
*/var lG=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){const i=t.listeners[r],o=t.duration;i.forEach((r=>r({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(n-t.start,o)})))}_refresh(){const e=this;e._request||(e._running=!0,e._request=ij.call(window,(()=>{e._update(),e._request=null,e._running&&e._refresh()})))}_update(e=Date.now()){const t=this;let n=0;t._charts.forEach(((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a,s=o.length-1,l=!1;for(;s>=0;--s)a=o[s],a._active?(a._total>r.duration&&(r.duration=a._total),a.tick(e),l=!0):(o[s]=o[o.length-1],o.pop());l&&(i.draw(),t._notify(i,r,e,"progress")),o.length||(r.running=!1,t._notify(i,r,e,"complete"),r.initial=!1),n+=o.length})),t._lastDate=e,0===n&&(t._running=!1)}_getAnims(e){const t=this._charts;let n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce(((e,t)=>Math.max(e,t._duration)),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const n=t.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}};const cG={boolean:(e,t,n)=>n>.5?t:e,color(e,t,n){const r=zV(e||"transparent"),i=r.valid&&zV(t||"transparent");return i&&i.valid?i.mix(r,n).hexString():t},number:(e,t,n)=>e+(t-e)*n};class uG{constructor(e,t,n,r){const i=t[n];r=cW([e.to,r,i,e.from]);const o=cW([e.from,i,r]);this._active=!0,this._fn=e.fn||cG[e.type||typeof o],this._easing=nV[e.easing]||nV.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){const r=this;if(r._active){r._notify(!1);const i=r._target[r._prop],o=n-r._start,a=r._duration-o;r._start=n,r._duration=Math.floor(Math.max(a,e.duration)),r._total+=o,r._loop=!!e.loop,r._to=cW([e.to,t,i,e.from]),r._from=cW([e.from,i,t])}}cancel(){const e=this;e._active&&(e.tick(Date.now()),e._active=!1,e._notify(!1))}tick(e){const t=this,n=e-t._start,r=t._duration,i=t._prop,o=t._from,a=t._loop,s=t._to;let l;if(t._active=o!==s&&(a||n<r),!t._active)return t._target[i]=s,void t._notify(!0);n<0?t._target[i]=o:(l=n/r%2,l=a&&l>1?2-l:l,l=t._easing(Math.min(1,Math.max(0,l))),t._target[i]=t._fn(o,s,l))}wait(){const e=this._promises||(this._promises=[]);return new Promise(((t,n)=>{e.push({res:t,rej:n})}))}_notify(e){const t=e?"res":"rej",n=this._promises||[];for(let r=0;r<n.length;r++)n[r][t]()}}jV.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const dG=Object.keys(jV.animation);jV.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}),jV.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),jV.describe("animations",{_fallback:"animation"}),jV.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>0|e}}}});class hG{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!hj(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach((n=>{const r=e[n];if(!hj(r))return;const i={};for(const e of dG)i[e]=r[e];(dj(r.properties)&&r.properties||[n]).forEach((e=>{e!==n&&t.has(e)||t.set(e,i)}))}))}_animateOptions(e,t){const n=t.options,r=function(e,t){if(!t)return;let n=e.options;if(!n)return void(e.options=t);n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(e,n);if(!r)return[];const i=this._createAnimations(r,n);return n.$shared&&function(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const t=e[r[i]];t&&t.active()&&n.push(t.wait())}return Promise.all(n)}(e.options.$animations,n).then((()=>{e.options=n}),(()=>{})),i}_createAnimations(e,t){const n=this._properties,r=[],i=e.$animations||(e.$animations={}),o=Object.keys(t),a=Date.now();let s;for(s=o.length-1;s>=0;--s){const l=o[s];if("$"===l.charAt(0))continue;if("options"===l){r.push(...this._animateOptions(e,t));continue}const c=t[l];let u=i[l];const d=n.get(l);if(u){if(d&&u.active()){u.update(d,c,a);continue}u.cancel()}d&&d.duration?(i[l]=u=new uG(d,e,l,c),r.push(u)):e[l]=c}return r}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const n=this._createAnimations(e,t);return n.length?(lG.add(this._chart,n),!0):void 0}}function fG(e,t){const n=e&&e.options||{},r=n.reverse,i=void 0===n.min?t:0,o=void 0===n.max?t:0;return{start:r?o:i,end:r?i:o}}function pG(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function mG(e,t,n,r){const i=e.keys,o="single"===r.mode;let a,s,l,c;if(null!==t){for(a=0,s=i.length;a<s;++a){if(l=+i[a],l===n){if(r.all)continue;break}c=e.values[l],fj(c)&&(o||0===t||Hj(t)===Hj(c))&&(t+=c)}return t}}function gG(e,t){const n=e&&e.options.stacked;return n||void 0===n&&void 0!==t.stack}function vG(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function yG(e,t,n){for(const r of t.getMatchingVisibleMetas("bar").reverse()){const t=e[r.index];if(n&&t>0||!n&&t<0)return r.index}return null}function bG(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,u=function(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}(o,a,r),d=t.length;let h;for(let f=0;f<d;++f){const e=t[f],{[l]:n,[c]:r}=e;h=(e._stacks||(e._stacks={}))[c]=vG(i,u,n),h[s]=r,h._top=yG(h,a,!0),h._bottom=yG(h,a,!1)}}function xG(e,t){const n=e.scales;return Object.keys(n).filter((e=>n[e].axis===t)).shift()}function _G(e,t){const n=e.vScale&&e.vScale.axis;if(n){t=t||e._parsed;for(const r of t){const t=r._stacks;if(!t||void 0===t[n]||void 0===t[n][e.index])return;delete t[n][e.index]}}}const wG=e=>"reset"===e||"none"===e,SG=(e,t)=>t?e:Object.assign({},e);class MG{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this,t=e._cachedMeta;e.configure(),e.linkScales(),t._stacked=gG(t.vScale,t),e.addElements()}updateIndex(e){this.index!==e&&_G(this._cachedMeta),this.index=e}linkScales(){const e=this,t=e.chart,n=e._cachedMeta,r=e.getDataset(),i=(e,t,n,r)=>"x"===e?t:"r"===e?r:n,o=n.xAxisID=mj(r.xAxisID,xG(t,"x")),a=n.yAxisID=mj(r.yAxisID,xG(t,"y")),s=n.rAxisID=mj(r.rAxisID,xG(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),u=n.vAxisID=i(l,a,o,s);n.xScale=e.getScaleForId(o),n.yScale=e.getScaleForId(a),n.rScale=e.getScaleForId(s),n.iScale=e.getScaleForId(c),n.vScale=e.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&pW(this._data,this),e._stacked&&_G(e)}_dataCheck(){const e=this,t=e.getDataset(),n=t.data||(t.data=[]),r=e._data;if(hj(n))e._data=function(e){const t=Object.keys(e),n=new Array(t.length);let r,i,o;for(r=0,i=t.length;r<i;++r)o=t[r],n[r]={x:o,y:e[o]};return n}(n);else if(r!==n){if(r){pW(r,e);const t=e._cachedMeta;_G(t),t._parsed=[]}n&&Object.isExtensible(n)&&(o=e,(i=n)._chartjs?i._chartjs.listeners.push(o):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[o]}}),fW.forEach((e=>{const t="_onData"+Cj(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...e){const r=n.apply(this,e);return i._chartjs.listeners.forEach((n=>{"function"==typeof n[t]&&n[t](...e)})),r}})})))),e._syncList=[],e._data=n}var i,o}addElements(){const e=this,t=e._cachedMeta;e._dataCheck(),e.datasetElementType&&(t.dataset=new e.datasetElementType)}buildOrUpdateElements(e){const t=this,n=t._cachedMeta,r=t.getDataset();let i=!1;t._dataCheck();const o=n._stacked;n._stacked=gG(n.vScale,n),n.stack!==r.stack&&(i=!0,_G(n),n.stack=r.stack),t._resyncElements(e),(i||o!==n._stacked)&&bG(t,n._parsed)}configure(){const e=this,t=e.chart.config,n=t.datasetScopeKeys(e._type),r=t.getOptionScopes(e.getDataset(),n,!0);e.options=t.createResolver(r,e.getContext()),e._parsing=e.options.parsing}parse(e,t){const n=this,{_cachedMeta:r,_data:i}=n,{iScale:o,_stacked:a}=r,s=o.axis;let l,c,u,d=0===e&&t===i.length||r._sorted,h=e>0&&r._parsed[e-1];if(!1===n._parsing)r._parsed=i,r._sorted=!0,u=i;else{u=dj(i[e])?n.parseArrayData(r,i,e,t):hj(i[e])?n.parseObjectData(r,i,e,t):n.parsePrimitiveData(r,i,e,t);const o=()=>null===c[s]||h&&c[s]<h[s];for(l=0;l<t;++l)r._parsed[l+e]=c=u[l],d&&(o()&&(d=!1),h=c);r._sorted=d}a&&bG(n,u)}parsePrimitiveData(e,t,n,r){const{iScale:i,vScale:o}=e,a=i.axis,s=o.axis,l=i.getLabels(),c=i===o,u=new Array(r);let d,h,f;for(d=0,h=r;d<h;++d)f=d+n,u[d]={[a]:c||i.parse(l[f],f),[s]:o.parse(t[f],f)};return u}parseArrayData(e,t,n,r){const{xScale:i,yScale:o}=e,a=new Array(r);let s,l,c,u;for(s=0,l=r;s<l;++s)c=s+n,u=t[c],a[s]={x:i.parse(u[0],c),y:o.parse(u[1],c)};return a}parseObjectData(e,t,n,r){const{xScale:i,yScale:o}=e,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,l=new Array(r);let c,u,d,h;for(c=0,u=r;c<u;++c)d=c+n,h=t[d],l[c]={x:i.parse(Aj(h,a),d),y:o.parse(Aj(h,s),d)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,n){const r=this.chart,i=this._cachedMeta,o=t[e.axis];return mG({keys:pG(r,!0),values:t._stacks[e.axis]},o,i.index,{mode:n})}updateRangeFromParsed(e,t,n,r){const i=n[t.axis];let o=null===i?NaN:i;const a=r&&n._stacks[t.axis];r&&a&&(r.values=a,e.min=Math.min(e.min,o),e.max=Math.max(e.max,o),o=mG(r,i,this._cachedMeta.index,{all:!0})),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,t){const n=this,r=n._cachedMeta,i=r._parsed,o=r._sorted&&e===r.iScale,a=i.length,s=n._getOtherScale(e),l=t&&r._stacked&&{keys:pG(n.chart,!0),values:null},c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=function(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}(s);let h,f,p,m;function g(){return p=i[h],f=p[e.axis],m=p[s.axis],!fj(f)||u>m||d<m}for(h=0;h<a&&(g()||(n.updateRangeFromParsed(c,e,p,l),!o));++h);if(o)for(h=a-1;h>=0;--h)if(!g()){n.updateRangeFromParsed(c,e,p,l);break}return c}getAllParsedValues(e){const t=this._cachedMeta._parsed,n=[];let r,i,o;for(r=0,i=t.length;r<i;++r)o=t[r][e.axis],fj(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,n=t.iScale,r=t.vScale,i=this.getParsed(e);return{label:n?""+n.getLabelForValue(i[n.axis]):"",value:r?""+r.getLabelForValue(i[r.axis]):""}}_update(e){const t=this,n=t._cachedMeta;t.configure(),t._cachedDataOpts={},t.update(e||"default"),n._clip=function(e){let t,n,r,i;return hj(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i}}(mj(t.options.clip,function(e,t,n){if(!1===n)return!1;const r=fG(e,n),i=fG(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}(n.xScale,n.yScale,t.getMaxOverflow())))}update(e){}draw(){const e=this,t=e._ctx,n=e.chart,r=e._cachedMeta,i=r.data||[],o=n.chartArea,a=[],s=e._drawStart||0,l=e._drawCount||i.length-s;let c;for(r.dataset&&r.dataset.draw(t,o,s,l),c=s;c<s+l;++c){const e=i[c];e.active?a.push(e):e.draw(t,o)}for(c=0;c<a.length;++c)a[c].draw(t,o)}getStyle(e,t){const n=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,t,n){const r=this,i=r.getDataset();let o;if(e>=0&&e<r._cachedMeta.data.length){const t=r._cachedMeta.data[e];o=t.$context||(t.$context=function(e,t,n){return Object.assign(Object.create(e),{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}(r.getContext(),e,t)),o.parsed=r.getParsed(e),o.raw=i.data[e],o.index=o.dataIndex=e}else o=r.$context||(r.$context=function(e,t){return Object.assign(Object.create(e),{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}(r.chart.getContext(),r.index)),o.dataset=i,o.index=o.datasetIndex=r.index;return o.active=!!t,o.mode=n,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",n){const r=this,i="active"===t,o=r._cachedDataOpts,a=e+"-"+t,s=o[a],l=r.enableOptionSharing&&kj(n);if(s)return SG(s,l);const c=r.chart.config,u=c.datasetElementScopeKeys(r._type,e),d=i?[`${e}Hover`,"hover",e,""]:[e,""],h=c.getOptionScopes(r.getDataset(),u),f=Object.keys(jV.elements[e]),p=c.resolveNamedOptions(h,f,(()=>r.getContext(n,i)),d);return p.$shared&&(p.$shared=l,o[a]=Object.freeze(SG(p,l))),p}_resolveAnimations(e,t,n){const r=this,i=r.chart,o=r._cachedDataOpts,a=`animation-${t}`,s=o[a];if(s)return s;let l;if(!1!==i.options.animation){const i=r.chart.config,o=i.datasetAnimationScopeKeys(r._type,t),a=i.getOptionScopes(r.getDataset(),o);l=i.createResolver(a,r.getContext(e,n,t))}const c=new hG(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||wG(e)||this.chart._animationsDisabled}updateElement(e,t,n,r){wG(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!wG(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;const i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,t,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this,n=t._data,r=t._cachedMeta.data;for(const[s,l,c]of t._syncList)t[s](l,c);t._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&t.parse(0,a),o>i?t._insertElements(i,o-i,e):o<i&&t._removeElements(o,i-o)}_insertElements(e,t,n=!0){const r=this,i=r._cachedMeta,o=i.data,a=e+t;let s;const l=e=>{for(e.length+=t,s=e.length-1;s>=a;s--)e[s]=e[s-t]};for(l(o),s=e;s<a;++s)o[s]=new r.dataElementType;r._parsing&&l(i._parsed),r.parse(e,t),n&&r.updateElements(o,e,t,"reset")}updateElements(e,t,n,r){}_removeElements(e,t){const n=this._cachedMeta;if(this._parsing){const r=n._parsed.splice(e,t);n._stacked&&_G(n,r)}n.data.splice(e,t)}_onDataPush(){const e=arguments.length;this._syncList.push(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._syncList.push(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._syncList.push(["_removeElements",0,1])}_onDataSplice(e,t){this._syncList.push(["_removeElements",e,t]),this._syncList.push(["_insertElements",e,arguments.length-2])}_onDataUnshift(){this._syncList.push(["_insertElements",0,arguments.length])}}function EG(e){const t=function(e){if(!e._cache.$bar){const t=e.getMatchingVisibleMetas("bar");let n=[];for(let r=0,i=t.length;r<i;r++)n=n.concat(t[r].controller.getAllParsedValues(e));e._cache.$bar=mW(n.sort(((e,t)=>e-t)))}return e._cache.$bar}(e);let n,r,i,o,a=e._length;const s=()=>{32767!==i&&-32768!==i&&(kj(o)&&(a=Math.min(a,Math.abs(i-o)||a)),o=i)};for(n=0,r=t.length;n<r;++n)i=e.getPixelForValue(t[n]),s();for(o=void 0,n=0,r=e.ticks.length;n<r;++n)i=e.getPixelForTick(n),s();return a}function TG(e,t,n,r){return dj(e)?function(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),a=Math.min(i,o),s=Math.max(i,o);let l=a,c=s;Math.abs(a)>Math.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:a,max:s}}(e,t,n,r):t[n.axis]=n.parse(e,r),t}function AG(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,u,d,h;for(c=n,u=n+r;c<u;++c)h=t[c],d={},d[i.axis]=s||i.parse(a[c],c),l.push(TG(h,d,o,c));return l}function CG(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}MG.defaults={},MG.prototype.datasetElementType=null,MG.prototype.dataElementType=null;class kG extends MG{parsePrimitiveData(e,t,n,r){return AG(e,t,n,r)}parseArrayData(e,t,n,r){return AG(e,t,n,r)}parseObjectData(e,t,n,r){const{iScale:i,vScale:o}=e,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,l="x"===i.axis?a:s,c="x"===o.axis?a:s,u=[];let d,h,f,p;for(d=n,h=n+r;d<h;++d)p=t[d],f={},f[i.axis]=i.parse(Aj(p,l),d),u.push(TG(Aj(p,c),f,o,d));return u}updateRangeFromParsed(e,t,n,r){super.updateRangeFromParsed(e,t,n,r);const i=n._custom;i&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}getLabelAndValue(e){const t=this._cachedMeta,{iScale:n,vScale:r}=t,i=this.getParsed(e),o=i._custom,a=CG(o)?"["+o.start+", "+o.end+"]":""+r.getLabelForValue(i[r.axis]);return{label:""+n.getLabelForValue(i[n.axis]),value:a}}initialize(){const e=this;e.enableOptionSharing=!0,super.initialize();e._cachedMeta.stack=e.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,n,r){const i=this,o="reset"===r,a=i._cachedMeta.vScale,s=a.getBasePixel(),l=a.isHorizontal(),c=i._getRuler(),u=i.resolveDataElementOptions(t,r),d=i.getSharedOptions(u),h=i.includeOptions(r,d);i.updateSharedOptions(d,r,u);for(let f=t;f<t+n;f++){const t=i.getParsed(f),n=o||uj(t[a.axis])?{base:s,head:s}:i._calculateBarValuePixels(f),u=i._calculateBarIndexPixels(f,c),p=(t._stacks||{})[a.axis],m={horizontal:l,base:n.base,enableBorderRadius:!p||CG(t._custom)||i.index===p._top||i.index===p._bottom,x:l?n.head:u.center,y:l?u.center:n.head,height:l?u.size:void 0,width:l?void 0:u.size};h&&(m.options=d||i.resolveDataElementOptions(f,r)),i.updateElement(e[f],f,m,r)}}_getStacks(e,t){const n=this._cachedMeta.iScale,r=n.getMatchingVisibleMetas(this._type),i=n.options.stacked,o=r.length,a=[];let s,l;for(s=0;s<o;++s){if(l=r[s],void 0!==t){const e=l.controller.getParsed(t)[l.controller._cachedMeta.vScale.axis];if(uj(e)||isNaN(e))continue}if((!1===i||-1===a.indexOf(l.stack)||void 0===i&&void 0===l.stack)&&a.push(l.stack),l.index===e)break}return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,n){const r=this._getStacks(e,n),i=void 0!==t?r.indexOf(t):-1;return-1===i?r.length-1:i}_getRuler(){const e=this,t=e.options,n=e._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o<a;++o)i.push(r.getPixelForValue(e.getParsed(o)[r.axis],o));const s=t.barThickness;return{min:s||EG(r),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:e._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(e){const t=this,{vScale:n,_stacked:r}=t._cachedMeta,{base:i,minBarLength:o}=t.options,a=t.getParsed(e),s=a._custom,l=CG(s);let c,u,d=a[n.axis],h=0,f=r?t.applyStack(n,a,r):d;f!==d&&(h=f-d,f=d),l&&(d=s.barStart,f=s.barEnd-s.barStart,0!==d&&Hj(d)!==Hj(s.barEnd)&&(h=0),h+=d);const p=uj(i)||l?h:i;let m=n.getPixelForValue(p);c=this.chart.getDataVisibility(e)?n.getPixelForValue(h+f):m,u=c-m,void 0!==o&&Math.abs(u)<o&&(u=u<0?-o:o,0===d&&(m-=u/2),c=m+u);const g=i||0;if(m===n.getPixelForValue(g)){const e=n.getLineWidthForValue(g)/2;u>0?(m+=e,u-=e):u<0&&(m-=e,u+=e)}return{size:u,base:m,head:c,center:c+u/2}}_calculateBarIndexPixels(e,t){const n=this,r=t.scale,i=n.options,o=i.skipNull,a=mj(i.maxBarThickness,1/0);let s,l;if(t.grouped){const r=o?n._getStackCount(e):t.stackCount,c="flex"===i.barThickness?function(e,t,n,r){const i=t.pixels,o=i[e];let a=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;null===a&&(a=o-(null===s?t.end-t.start:s-o)),null===s&&(s=o+o-a);const c=o-(o-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/r,ratio:n.barPercentage,start:c}}(e,t,i,r):function(e,t,n,r){const i=n.barThickness;let o,a;return uj(i)?(o=t.min*n.categoryPercentage,a=n.barPercentage):(o=i*r,a=1),{chunk:o/r,ratio:a,start:t.pixels[e]-o/2}}(e,t,i,r),u=n._getStackIndex(n.index,n._cachedMeta.stack,o?e:void 0);s=c.start+c.chunk*u+c.chunk/2,l=Math.min(a,c.chunk*c.ratio)}else s=r.getPixelForValue(n.getParsed(e)[r.axis],e),l=Math.min(a,t.min*t.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const e=this,t=e.chart,n=e._cachedMeta,r=n.vScale,i=n.data,o=i.length;let a=0;for($V(t.ctx,t.chartArea);a<o;++a)null!==e.getParsed(a)[r.axis]&&i[a].draw(e._ctx);ZV(t.ctx)}}kG.id="bar",kG.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},kG.overrides={interaction:{mode:"index"},scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class PG extends MG{initialize(){this.enableOptionSharing=!0,super.initialize()}parseObjectData(e,t,n,r){const{xScale:i,yScale:o}=e,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,l=[];let c,u,d;for(c=n,u=n+r;c<u;++c)d=t[c],l.push({x:i.parse(Aj(d,a),c),y:o.parse(Aj(d,s),c),_custom:d&&d.r&&+d.r});return l}getMaxOverflow(){const{data:e,_parsed:t}=this._cachedMeta;let n=0;for(let r=e.length-1;r>=0;--r)n=Math.max(n,e[r].size()/2,t[r]._custom);return n>0&&n}getLabelAndValue(e){const t=this._cachedMeta,{xScale:n,yScale:r}=t,i=this.getParsed(e),o=n.getLabelForValue(i.x),a=r.getLabelForValue(i.y),s=i._custom;return{label:t.label,value:"("+o+", "+a+(s?", "+s:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,n,r){const i=this,o="reset"===r,{iScale:a,vScale:s}=i._cachedMeta,l=i.resolveDataElementOptions(t,r),c=i.getSharedOptions(l),u=i.includeOptions(r,c),d=a.axis,h=s.axis;for(let f=t;f<t+n;f++){const t=e[f],n=!o&&i.getParsed(f),l={},c=l[d]=o?a.getPixelForDecimal(.5):a.getPixelForValue(n[d]),p=l[h]=o?s.getBasePixel():s.getPixelForValue(n[h]);l.skip=isNaN(c)||isNaN(p),u&&(l.options=i.resolveDataElementOptions(f,r),o&&(l.options.radius=0)),i.updateElement(t,f,l,r)}i.updateSharedOptions(c,r,l)}resolveDataElementOptions(e,t){const n=this.getParsed(e);let r=super.resolveDataElementOptions(e,t);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const i=r.radius;return"active"!==t&&(r.radius=0),r.radius+=mj(n&&n._custom,i),r}}PG.id="bubble",PG.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},PG.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class LG extends MG{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const n=this.getDataset().data,r=this._cachedMeta;let i,o;for(i=e,o=e+t;i<o;++i)r._parsed[i]=+n[i]}_getRotation(){return Gj(this.options.rotation-90)}_getCircumference(){return Gj(this.options.circumference)}_getRotationExtents(){let e=Rj,t=-Rj;const n=this;for(let r=0;r<n.chart.data.datasets.length;++r)if(n.chart.isDatasetVisible(r)){const i=n.chart.getDatasetMeta(r).controller,o=i._getRotation(),a=i._getCircumference();e=Math.min(e,o),t=Math.max(t,o+a)}return{rotation:e,circumference:t-e}}update(e){const t=this,n=t.chart,{chartArea:r}=n,i=t._cachedMeta,o=i.data,a=t.getMaxBorderWidth()+t.getMaxOffset(o),s=Math.max((Math.min(r.width,r.height)-a)/2,0),l=Math.min((c=t.options.cutout,u=s,"string"==typeof c&&c.endsWith("%")?parseFloat(c)/100:c/u),1);var c,u;const d=t._getRingWeight(t.index),{circumference:h,rotation:f}=t._getRotationExtents(),{ratioX:p,ratioY:m,offsetX:g,offsetY:v}=function(e,t,n){let r=1,i=1,o=0,a=0;if(t<Rj){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),h=Math.sin(l),f=(e,t,r)=>Jj(e,s,l,!0)?1:Math.max(t,t*n,r,r*n),p=(e,t,r)=>Jj(e,s,l,!0)?-1:Math.min(t,t*n,r,r*n),m=f(0,c,d),g=f(zj,u,h),v=p(Lj,c,d),y=p(Lj+zj,u,h);r=(m-v)/2,i=(g-y)/2,o=-(m+v)/2,a=-(g+y)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}(f,h,l),y=(r.width-a)/p,b=(r.height-a)/m,x=Math.max(Math.min(y,b)/2,0),_=gj(t.options.radius,x),w=(_-Math.max(_*l,0))/t._getVisibleDatasetWeightTotal();t.offsetX=g*_,t.offsetY=v*_,i.total=t.calculateTotal(),t.outerRadius=_-w*t._getRingWeightOffset(t.index),t.innerRadius=Math.max(t.outerRadius-w*d,0),t.updateElements(o,0,o.length,e)}_circumference(e,t){const n=this,r=n.options,i=n._cachedMeta,o=n._getCircumference();return t&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||null===i._parsed[e]?0:n.calculateCircumference(i._parsed[e]*o/Rj)}updateElements(e,t,n,r){const i=this,o="reset"===r,a=i.chart,s=a.chartArea,l=a.options.animation,c=(s.left+s.right)/2,u=(s.top+s.bottom)/2,d=o&&l.animateScale,h=d?0:i.innerRadius,f=d?0:i.outerRadius,p=i.resolveDataElementOptions(t,r),m=i.getSharedOptions(p),g=i.includeOptions(r,m);let v,y=i._getRotation();for(v=0;v<t;++v)y+=i._circumference(v,o);for(v=t;v<t+n;++v){const t=i._circumference(v,o),n=e[v],a={x:c+i.offsetX,y:u+i.offsetY,startAngle:y,endAngle:y+t,circumference:t,outerRadius:f,innerRadius:h};g&&(a.options=m||i.resolveDataElementOptions(v,r)),y+=t,i.updateElement(n,v,a,r)}i.updateSharedOptions(m,r,p)}calculateTotal(){const e=this._cachedMeta,t=e.data;let n,r=0;for(n=0;n<t.length;n++){const t=e._parsed[n];null!==t&&!isNaN(t)&&this.chart.getDataVisibility(n)&&(r+=Math.abs(t))}return r}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?Rj*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=JW(t._parsed[e],n.options.locale);return{label:r[e]||"",value:i}}getMaxBorderWidth(e){const t=this;let n=0;const r=t.chart;let i,o,a,s,l;if(!e)for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){a=r.getDatasetMeta(i),e=a.data,s=a.controller,s!==t&&s.configure();break}if(!e)return 0;for(i=0,o=e.length;i<o;++i)l=s.resolveDataElementOptions(i),"inner"!==l.borderAlign&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(e){let t=0;for(let n=0,r=e.length;n<r;++n){const e=this.resolveDataElementOptions(n);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t}_getRingWeight(e){return Math.max(mj(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}LG.id="doughnut",LG.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",indexAxis:"r"},LG.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;return t.labels.length&&t.datasets.length?t.labels.map(((t,n)=>{const r=e.getDatasetMeta(0).controller.getStyle(n);return{text:t,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:!e.getDataVisibility(n),index:n}})):[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}},tooltip:{callbacks:{title:()=>"",label(e){let t=e.label;const n=": "+e.formattedValue;return dj(t)?(t=t.slice(),t[0]+=n):t+=n,t}}}}};class RG extends MG{initialize(){this.enableOptionSharing=!0,super.initialize()}update(e){const t=this,n=t._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=t.chart._animationsDisabled;let{start:s,count:l}=function(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:a,_parsed:s}=e,l=a.axis,{min:c,max:u,minDefined:d,maxDefined:h}=a.getUserBounds();d&&(i=Qj(Math.min(dW(s,a.axis,c).lo,n?r:dW(t,l,a.getPixelForValue(c)).lo),0,r-1)),o=h?Qj(Math.max(dW(s,a.axis,u).hi+1,n?0:dW(t,l,a.getPixelForValue(u)).hi+1),i,r)-i:r-i}return{start:i,count:o}}(n,i,a);t._drawStart=s,t._drawCount=l,function(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}(n)&&(s=0,l=i.length),r._decimated=!!o._decimated,r.points=i;const c=t.resolveDatasetElementOptions(e);t.options.showLine||(c.borderWidth=0),c.segment=t.options.segment,t.updateElement(r,void 0,{animated:!a,options:c},e),t.updateElements(i,s,l,e)}updateElements(e,t,n,r){const i=this,o="reset"===r,{iScale:a,vScale:s,_stacked:l}=i._cachedMeta,c=i.resolveDataElementOptions(t,r),u=i.getSharedOptions(c),d=i.includeOptions(r,u),h=a.axis,f=s.axis,p=i.options.spanGaps,m=jj(p)?p:Number.POSITIVE_INFINITY,g=i.chart._animationsDisabled||o||"none"===r;let v=t>0&&i.getParsed(t-1);for(let y=t;y<t+n;++y){const t=e[y],n=i.getParsed(y),c=g?t:{},p=uj(n[f]),b=c[h]=a.getPixelForValue(n[h],y),x=c[f]=o||p?s.getBasePixel():s.getPixelForValue(l?i.applyStack(s,n,l):n[f],y);c.skip=isNaN(b)||isNaN(x)||p,c.stop=y>0&&n[h]-v[h]>m,c.parsed=n,d&&(c.options=u||i.resolveDataElementOptions(y,r)),g||i.updateElement(t,y,c,r),v=n}i.updateSharedOptions(u,r,c)}getMaxOverflow(){const e=this,t=e._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(e.resolveDataElementOptions(0)),a=i[i.length-1].size(e.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}RG.id="line",RG.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},RG.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class OG extends MG{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=JW(t._parsed[e].r,n.options.locale);return{label:r[e]||"",value:i}}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}_updateRadius(){const e=this,t=e.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),a=(o-Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0))/t.getVisibleDatasetCount();e.outerRadius=o-a*e.index,e.innerRadius=e.outerRadius-a}updateElements(e,t,n,r){const i=this,o="reset"===r,a=i.chart,s=i.getDataset(),l=a.options.animation,c=i._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*Lj;let f,p=h;const m=360/i.countVisibleElements();for(f=0;f<t;++f)p+=i._computeAngle(f,r,m);for(f=t;f<t+n;f++){const t=e[f];let n=p,g=p+i._computeAngle(f,r,m),v=a.getDataVisibility(f)?c.getDistanceFromCenterForValue(s.data[f]):0;p=g,o&&(l.animateScale&&(v=0),l.animateRotate&&(n=g=h));const y={x:u,y:d,innerRadius:0,outerRadius:v,startAngle:n,endAngle:g,options:i.resolveDataElementOptions(f,r)};i.updateElement(t,f,y,r)}}countVisibleElements(){const e=this.getDataset(),t=this._cachedMeta;let n=0;return t.data.forEach(((t,r)=>{!isNaN(e.data[r])&&this.chart.getDataVisibility(r)&&n++})),n}_computeAngle(e,t,n){return this.chart.getDataVisibility(e)?Gj(this.resolveDataElementOptions(e,t).angle||n):0}}OG.id="polarArea",OG.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},OG.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;return t.labels.length&&t.datasets.length?t.labels.map(((t,n)=>{const r=e.getDatasetMeta(0).controller.getStyle(n);return{text:t,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:!e.getDataVisibility(n),index:n}})):[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}},tooltip:{callbacks:{title:()=>"",label:e=>e.chart.data.labels[e.dataIndex]+": "+e.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class DG extends LG{}DG.id="pie",DG.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class IG extends MG{getLabelAndValue(e){const t=this._cachedMeta.vScale,n=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(n[t.axis])}}update(e){const t=this,n=t._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,"resize"!==e){const n=t.resolveDatasetElementOptions(e);t.options.showLine||(n.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:n};t.updateElement(r,void 0,a,e)}t.updateElements(i,0,i.length,e)}updateElements(e,t,n,r){const i=this,o=i.getDataset(),a=i._cachedMeta.rScale,s="reset"===r;for(let l=t;l<t+n;l++){const t=e[l],n=i.resolveDataElementOptions(l,r),c=a.getPointPositionForValue(l,o.data[l]),u=s?a.xCenter:c.x,d=s?a.yCenter:c.y,h={x:u,y:d,angle:c.angle,skip:isNaN(u)||isNaN(d),options:n};i.updateElement(t,l,h,r)}}}IG.id="radar",IG.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},IG.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class zG extends RG{}zG.id="scatter",zG.defaults={showLine:!1,fill:!1},zG.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:e=>"("+e.label+", "+e.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var NG=Object.freeze({__proto__:null,BarController:kG,BubbleController:PG,DoughnutController:LG,LineController:RG,PolarAreaController:OG,PieController:DG,RadarController:IG,ScatterController:zG});function BG(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class FG{constructor(e){this.options=e||{}}formats(){return BG()}parse(e,t){return BG()}format(e,t){return BG()}add(e,t,n){return BG()}diff(e,t,n){return BG()}startOf(e,t,n){return BG()}endOf(e,t){return BG()}}FG.override=function(e){Object.assign(FG.prototype,e)};var HG={_date:FG};function UG(e,t){return"native"in e?{x:e.x,y:e.y}:UW(e,t)}function jG(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale;if(s&&t===s.axis&&a&&o.length){const e=s._reversePixels?hW:dW;if(!r)return e(o,t,n);if(i._sharedOptions){const r=o[0],i="function"==typeof r.getRange&&r.getRange(t);if(i){const r=e(o,t,n-i),a=e(o,t,n+i);return{lo:r.lo,hi:a.hi}}}}return{lo:0,hi:o.length-1}}function VG(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s<l;++s){const{index:e,data:n}=o[s],{lo:l,hi:c}=jG(o[s],t,a,i);for(let t=l;t<=c;++t){const i=n[t];i.skip||r(i,e,t)}}}function WG(e,t,n,r){const i=[];if(!YV(t,e.chartArea,e._minPadding))return i;return VG(e,n,t,(function(e,n,o){e.inRange(t.x,t.y,r)&&i.push({element:e,datasetIndex:n,index:o})}),!0),i}function GG(e,t,n,r,i){const o=function(e){const t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,r){const i=t?Math.abs(e.x-r.x):0,o=n?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}(n);let a=Number.POSITIVE_INFINITY,s=[];if(!YV(t,e.chartArea,e._minPadding))return s;return VG(e,n,t,(function(n,l,c){if(r&&!n.inRange(t.x,t.y,i))return;const u=n.getCenterPoint(i);if(!YV(u,e.chartArea,e._minPadding))return;const d=o(t,u);d<a?(s=[{element:n,datasetIndex:l,index:c}],a=d):d===a&&s.push({element:n,datasetIndex:l,index:c})})),s}function qG(e,t,n,r){const i=UG(t,e),o=[],a=n.axis,s="x"===a?"inXRange":"inYRange";let l=!1;return function(e,t){const n=e.getSortedVisibleDatasetMetas();let r,i,o;for(let a=0,s=n.length;a<s;++a){({index:r,data:i}=n[a]);for(let e=0,n=i.length;e<n;++e)o=i[e],o.skip||t(o,r,e)}}(e,((e,t,n)=>{e[s](i[a],r)&&o.push({element:e,datasetIndex:t,index:n}),e.inRange(i.x,i.y,r)&&(l=!0)})),n.intersect&&!l?[]:o}var XG={modes:{index(e,t,n,r){const i=UG(t,e),o=n.axis||"x",a=n.intersect?WG(e,i,o,r):GG(e,i,o,!1,r),s=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach((e=>{const t=a[0].index,n=e.data[t];n&&!n.skip&&s.push({element:n,datasetIndex:e.index,index:t})})),s):[]},dataset(e,t,n,r){const i=UG(t,e),o=n.axis||"xy";let a=n.intersect?WG(e,i,o,r):GG(e,i,o,!1,r);if(a.length>0){const t=a[0].datasetIndex,n=e.getDatasetMeta(t).data;a=[];for(let e=0;e<n.length;++e)a.push({element:n[e],datasetIndex:t,index:e})}return a},point:(e,t,n,r)=>WG(e,UG(t,e),n.axis||"xy",r),nearest:(e,t,n,r)=>GG(e,UG(t,e),n.axis||"xy",n.intersect,r),x:(e,t,n,r)=>(n.axis="x",qG(e,t,n,r)),y:(e,t,n,r)=>(n.axis="y",qG(e,t,n,r))}};const YG=["left","top","right","bottom"];function $G(e,t){return e.filter((e=>e.pos===t))}function ZG(e,t){return e.filter((e=>-1===YG.indexOf(e.pos)&&e.box.axis===t))}function JG(e,t){return e.sort(((e,n)=>{const r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight}))}function QG(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function KG(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function eq(e,t,n){const r=n.box,i=e.maxPadding;hj(n.pos)||(n.size&&(e[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,e[n.pos]+=n.size),r.getPadding&&KG(i,r.getPadding());const o=Math.max(0,t.outerWidth-QG(i,e,"left","right")),a=Math.max(0,t.outerHeight-QG(i,e,"top","bottom")),s=o!==e.w,l=a!==e.h;return e.w=o,e.h=a,n.horizontal?{same:s,other:l}:{same:l,other:s}}function tq(e,t){const n=t.maxPadding;function r(e){const r={left:0,top:0,right:0,bottom:0};return e.forEach((e=>{r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function nq(e,t,n){const r=[];let i,o,a,s,l,c;for(i=0,o=e.length,l=0;i<o;++i){a=e[i],s=a.box,s.update(a.width||t.w,a.height||t.h,tq(a.horizontal,t));const{same:o,other:u}=eq(t,n,a);l|=o&&r.length,c=c||u,s.fullSize||r.push(a)}return l&&nq(r,t,n)||c}function rq(e,t,n){const r=n.padding;let i,o,a,s,l=t.x,c=t.y;for(i=0,o=e.length;i<o;++i)a=e[i],s=a.box,a.horizontal?(s.left=s.fullSize?r.left:t.left,s.right=s.fullSize?n.outerWidth-r.right:t.left+t.w,s.top=c,s.bottom=c+s.height,s.width=s.right-s.left,c=s.bottom):(s.left=l,s.right=l+s.width,s.top=s.fullSize?r.top:t.top,s.bottom=s.fullSize?n.outerHeight-r.right:t.top+t.h,s.height=s.bottom-s.top,l=s.right);t.x=l,t.y=c}jV.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var iq={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=sW(e.options.layout.padding),o=Math.max(t-i.width,0),a=Math.max(n-i.height,0),s=function(e){const t=function(e){const t=[];let n,r,i;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],t.push({index:n,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return t}(e),n=JG(t.filter((e=>e.box.fullSize)),!0),r=JG($G(t,"left"),!0),i=JG($G(t,"right")),o=JG($G(t,"top"),!0),a=JG($G(t,"bottom")),s=ZG(t,"x"),l=ZG(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:$G(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}(e.boxes),l=s.vertical,c=s.horizontal;yj(e.boxes,(e=>{"function"==typeof e.beforeLayout&&e.beforeLayout()}));const u=l.reduce(((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1),0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),h=Object.assign({},i);KG(h,sW(r));const f=Object.assign({maxPadding:h,w:o,h:a,x:i.left,y:i.top},i);!function(e,t){let n,r,i;for(n=0,r=e.length;n<r;++n)i=e[n],i.horizontal?(i.width=i.box.fullSize&&t.availableWidth,i.height=t.hBoxMaxHeight):(i.width=t.vBoxMaxWidth,i.height=i.box.fullSize&&t.availableHeight)}(l.concat(c),d),nq(s.fullSize,f,d),nq(l,f,d),nq(c,f,d)&&nq(l,f,d),function(e){const t=e.maxPadding;function n(n){const r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(f),rq(s.leftAndTop,f,d),f.x+=f.w,f.y+=f.h,rq(s.rightAndBottom,f,d),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},yj(s.chartArea,(t=>{const n=t.box;Object.assign(n,e.chartArea),n.update(f.w,f.h)}))}};class oq{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}}class aq extends oq{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}}const sq={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},lq=e=>null===e||""===e;const cq=!!GW&&{passive:!0};function uq(e,t,n){e.canvas.removeEventListener(t,n,cq)}function dq(e,t,n){const r=e.canvas,i=r&&zW(r)||r,o=new MutationObserver((e=>{const t=zW(i);e.forEach((e=>{for(let r=0;r<e.addedNodes.length;r++){const o=e.addedNodes[r];o!==i&&o!==t||n(e.target)}}))}));return o.observe(document,{childList:!0,subtree:!0}),o}function hq(e,t,n){const r=e.canvas,i=r&&zW(r);if(!i)return;const o=new MutationObserver((e=>{e.forEach((e=>{for(let t=0;t<e.removedNodes.length;t++)if(e.removedNodes[t]===r){n();break}}))}));return o.observe(i,{childList:!0}),o}const fq=new Map;let pq=0;function mq(){const e=window.devicePixelRatio;e!==pq&&(pq=e,fq.forEach(((t,n)=>{n.currentDevicePixelRatio!==e&&t()})))}function gq(e,t,n){const r=e.canvas,i=r&&zW(r);if(!i)return;const o=oj(((e,t)=>{const r=i.clientWidth;n(e,t),r<i.clientWidth&&n()}),window),a=new ResizeObserver((e=>{const t=e[0],n=t.contentRect.width,r=t.contentRect.height;0===n&&0===r||o(n,r)}));return a.observe(i),function(e,t){fq.size||window.addEventListener("resize",mq),fq.set(e,t)}(e,o),a}function vq(e,t,n){n&&n.disconnect(),"resize"===t&&function(e){fq.delete(e),fq.size||window.removeEventListener("resize",mq)}(e)}function yq(e,t,n){const r=e.canvas,i=oj((t=>{null!==e.ctx&&n(function(e,t){const n=sq[e.type]||e.type,{x:r,y:i}=UW(e,t);return{type:n,chart:t,native:e,x:void 0!==r?r:null,y:void 0!==i?i:null}}(t,e))}),e,(e=>{const t=e[0];return[t,t.offsetX,t.offsetY]}));return function(e,t,n){e.addEventListener(t,n,cq)}(r,t,i),i}class bq extends oq{acquireContext(e,t){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(function(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e.$chartjs={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",lq(i)){const t=qW(e,"width");void 0!==t&&(e.width=t)}if(lq(r))if(""===e.style.height)e.height=e.width/(t||2);else{const t=qW(e,"height");void 0!==t&&(e.height=t)}}(e,t),n):null}releaseContext(e){const t=e.canvas;if(!t.$chartjs)return!1;const n=t.$chartjs.initial;["height","width"].forEach((e=>{const r=n[e];uj(r)?t.removeAttribute(e):t.setAttribute(e,r)}));const r=n.style||{};return Object.keys(r).forEach((e=>{t.style[e]=r[e]})),t.width=t.width,delete t.$chartjs,!0}addEventListener(e,t,n){this.removeEventListener(e,t);const r=e.$proxies||(e.$proxies={}),i={attach:dq,detach:hq,resize:gq}[t]||yq;r[t]=i(e,t,n)}removeEventListener(e,t){const n=e.$proxies||(e.$proxies={}),r=n[t];if(!r)return;({attach:vq,detach:vq,resize:vq}[t]||uq)(e,t,r),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return VW(e,t,n,r)}isAttached(e){const t=zW(e);return!(!t||!zW(t))}}class xq{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return jj(this.x)&&jj(this.y)}getProps(e,t){const n=this,r=this.$animations;if(!t||!r)return n;const i={};return e.forEach((e=>{i[e]=r[e]&&r[e].active()?r[e]._to:n[e]})),i}}xq.defaults={},xq.defaultRoutes=void 0;const _q={values:e=>dj(e)?e:""+e,numeric(e,t,n){if(0===e)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>1e15)&&(i="scientific"),o=function(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e));return n}(e,n)}const a=Fj(Math.abs(o)),s=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),JW(e,r,l)},logarithmic(e,t,n){if(0===e)return"0";const r=e/Math.pow(10,Math.floor(Fj(e)));return 1===r||2===r||5===r?_q.numeric.call(this,e,t,n):""}};var wq={formatters:_q};function Sq(e,t){const n=e.options.ticks,r=n.maxTicksLimit||function(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}(e),i=n.major.enabled?function(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}(t):[],o=i.length,a=i[0],s=i[o-1],l=[];if(o>r)return function(e,t,n,r){let i,o=0,a=n[0];for(r=Math.ceil(r),i=0;i<e.length;i++)i===a&&(t.push(e[i]),o++,a=n[o*r])}(t,l,i,o/r),l;const c=function(e,t,n){const r=function(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}(e),i=t.length/n;if(!r)return Math.max(i,1);const o=function(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r==0&&(t.push(r),t.push(e/r));return n===(0|n)&&t.push(n),t.sort(((e,t)=>e-t)).pop(),t}(r);for(let a=0,s=o.length-1;a<s;a++){const e=o[a];if(e>i)return e}return Math.max(i,1)}(i,t,r);if(o>0){let e,n;const r=o>1?Math.round((s-a)/(o-1)):null;for(Mq(t,l,c,uj(r)?0:a-r,a),e=0,n=o-1;e<n;e++)Mq(t,l,c,i[e],i[e+1]);return Mq(t,l,c,s,uj(r)?t.length:s+r),l}return Mq(t,l,c),l}function Mq(e,t,n,r,i){const o=mj(r,0),a=Math.min(mj(i,e.length),e.length);let s,l,c,u=0;for(n=Math.ceil(n),i&&(s=i-r,n=s/Math.floor(s/n)),c=o;c<0;)u++,c=Math.round(o+u*n);for(l=Math.max(o,0);l<a;l++)l===c&&(t.push(e[l]),u++,c=Math.round(o+u*n))}jV.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:wq.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),jV.route("scale.ticks","color","","color"),jV.route("scale.grid","color","","borderColor"),jV.route("scale.grid","borderColor","","borderColor"),jV.route("scale.title","color","","color"),jV.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e,_indexable:e=>"borderDash"!==e&&"tickBorderDash"!==e}),jV.describe("scales",{_fallback:"scale"});const Eq=(e,t,n)=>"top"===t||"left"===t?e[t]+n:e[t]-n;function Tq(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function Aq(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,a=e._endPixel,s=1e-6;let l,c=e.getPixelForTick(i);if(!(n&&(l=1===r?Math.max(c-o,a-c):0===t?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(i-1))/2,c+=i<t?l:-l,c<o-s||c>a+s)))return c}function Cq(e){return e.drawTicks?e.tickLength:0}function kq(e,t){if(!e.display)return 0;const n=lW(e.font,t),r=sW(e.padding);return(dj(e.text)?e.text.length:1)*n.lineHeight+r.height}function Pq(e,t,n){let r=aj(e);return(n&&"right"!==t||!n&&"right"===t)&&(r=(e=>"left"===e?"right":"right"===e?"left":e)(r)),r}class Lq extends xq{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){const t=this;t.options=e.setContext(t.getContext()),t.axis=e.axis,t._userMin=t.parse(e.min),t._userMax=t.parse(e.max),t._suggestedMin=t.parse(e.suggestedMin),t._suggestedMax=t.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=pj(e,Number.POSITIVE_INFINITY),t=pj(t,Number.NEGATIVE_INFINITY),n=pj(n,Number.POSITIVE_INFINITY),r=pj(r,Number.NEGATIVE_INFINITY),{min:pj(e,n),max:pj(t,r),minDefined:fj(e),maxDefined:fj(t)}}getMinMax(e){const t=this;let n,{min:r,max:i,minDefined:o,maxDefined:a}=t.getUserBounds();if(o&&a)return{min:r,max:i};const s=t.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)n=s[l].controller.getMinMax(t,e),o||(r=Math.min(r,n.min)),a||(i=Math.max(i,n.max));return{min:pj(r,pj(i,r)),max:pj(i,pj(r,i))}}getPadding(){const e=this;return{left:e.paddingLeft||0,top:e.paddingTop||0,right:e.paddingRight||0,bottom:e.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){vj(this.options.beforeUpdate,[this])}update(e,t,n){const r=this,i=r.options.ticks,o=i.sampleSize;r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),r.ticks=null,r._labelSizes=null,r._gridLineItems=null,r._labelItems=null,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r._maxLength=r.isHorizontal()?r.width+n.left+n.right:r.height+n.top+n.bottom,r._dataLimitsCached||(r.beforeDataLimits(),r.determineDataLimits(),r.afterDataLimits(),r._range=function(e,t){const{min:n,max:r}=e;return{min:n-Math.abs(gj(t,n)),max:r+gj(t,r)}}(r,r.options.grace),r._dataLimitsCached=!0),r.beforeBuildTicks(),r.ticks=r.buildTicks()||[],r.afterBuildTicks();const a=o<r.ticks.length;r._convertTicksToLabels(a?Tq(r.ticks,o):r.ticks),r.configure(),r.beforeCalculateLabelRotation(),r.calculateLabelRotation(),r.afterCalculateLabelRotation(),i.display&&(i.autoSkip||"auto"===i.source)&&(r.ticks=Sq(r,r.ticks),r._labelSizes=null),a&&r._convertTicksToLabels(r.ticks),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate()}configure(){const e=this;let t,n,r=e.options.reverse;e.isHorizontal()?(t=e.left,n=e.right):(t=e.top,n=e.bottom,r=!r),e._startPixel=t,e._endPixel=n,e._reversePixels=r,e._length=n-t,e._alignToPixels=e.options.alignToPixels}afterUpdate(){vj(this.options.afterUpdate,[this])}beforeSetDimensions(){vj(this.options.beforeSetDimensions,[this])}setDimensions(){const e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0}afterSetDimensions(){vj(this.options.afterSetDimensions,[this])}_callHooks(e){const t=this;t.chart.notifyPlugins(e,t.getContext()),vj(t.options[e],[t])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){vj(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this,n=t.options.ticks;let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r],o.label=vj(n.callback,[o.value,r,e],t);for(r=0;r<i;r++)uj(e[r].label)&&(e.splice(r,1),i--,r--)}afterTickToLabelConversion(){vj(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){vj(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this,t=e.options,n=t.ticks,r=e.ticks.length,i=n.minRotation||0,o=n.maxRotation;let a,s,l,c=i;if(!e._isVisible()||!n.display||i>=o||r<=1||!e.isHorizontal())return void(e.labelRotation=i);const u=e._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=Qj(e.chart.width-d,0,e.maxWidth);a=t.offset?e.maxWidth/r:f/(r-1),d+6>a&&(a=f/(r-(t.offset?.5:1)),s=e.maxHeight-Cq(t.grid)-n.padding-kq(t.title,e.chart.options.font),l=Math.sqrt(d*d+h*h),c=qj(Math.min(Math.asin(Math.min((u.highest.height+6)/a,1)),Math.asin(Math.min(s/l,1))-Math.asin(h/l))),c=Math.max(i,Math.min(o,c))),e.labelRotation=c}afterCalculateLabelRotation(){vj(this.options.afterCalculateLabelRotation,[this])}beforeFit(){vj(this.options.beforeFit,[this])}fit(){const e=this,t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=e,a=e._isVisible(),s=e.isHorizontal();if(a){const a=kq(i,n.options.font);if(s?(t.width=e.maxWidth,t.height=Cq(o)+a):(t.height=e.maxHeight,t.width=Cq(o)+a),r.display&&e.ticks.length){const{first:n,last:i,widest:o,highest:a}=e._getLabelSizes(),l=2*r.padding,c=Gj(e.labelRotation),u=Math.cos(c),d=Math.sin(c);if(s){const n=r.mirror?0:d*o.width+u*a.height;t.height=Math.min(e.maxHeight,t.height+n+l)}else{const n=r.mirror?0:u*o.width+d*a.height;t.width=Math.min(e.maxWidth,t.width+n+l)}e._calculatePadding(n,i,d,u)}}e._handleMargins(),s?(e.width=e._length=n.width-e._margins.left-e._margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e._margins.top-e._margins.bottom)}_calculatePadding(e,t,n,r){const i=this,{ticks:{align:o,padding:a},position:s}=i.options,l=0!==i.labelRotation,c="top"!==s&&"x"===i.axis;if(i.isHorizontal()){const s=i.getPixelForTick(0)-i.left,u=i.right-i.getPixelForTick(i.ticks.length-1);let d=0,h=0;l?c?(d=r*e.width,h=n*t.height):(d=n*e.height,h=r*t.width):"start"===o?h=t.width:"end"===o?d=e.width:(d=e.width/2,h=t.width/2),i.paddingLeft=Math.max((d-s+a)*i.width/(i.width-s),0),i.paddingRight=Math.max((h-u+a)*i.width/(i.width-u),0)}else{let n=t.height/2,r=e.height/2;"start"===o?(n=0,r=e.height):"end"===o&&(n=t.height,r=0),i.paddingTop=n+a,i.paddingBottom=r+a}}_handleMargins(){const e=this;e._margins&&(e._margins.left=Math.max(e.paddingLeft,e._margins.left),e._margins.top=Math.max(e.paddingTop,e._margins.top),e._margins.right=Math.max(e.paddingRight,e._margins.right),e._margins.bottom=Math.max(e.paddingBottom,e._margins.bottom))}afterFit(){vj(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){const t=this;t.beforeTickToLabelConversion(),t.generateTickLabels(e),t.afterTickToLabelConversion()}_getLabelSizes(){const e=this;let t=e._labelSizes;if(!t){const n=e.options.ticks.sampleSize;let r=e.ticks;n<r.length&&(r=Tq(r,n)),e._labelSizes=t=e._computeLabelSizes(r,r.length)}return t}_computeLabelSizes(e,t){const{ctx:n,_longestTextCache:r}=this,i=[],o=[];let a,s,l,c,u,d,h,f,p,m,g,v=0,y=0;for(a=0;a<t;++a){if(c=e[a].label,u=this._resolveTickFontOptions(a),n.font=d=u.string,h=r[d]=r[d]||{data:{},gc:[]},f=u.lineHeight,p=m=0,uj(c)||dj(c)){if(dj(c))for(s=0,l=c.length;s<l;++s)g=c[s],uj(g)||dj(g)||(p=VV(n,h.data,h.gc,p,g),m+=f)}else p=VV(n,h.data,h.gc,p,c),m=f;i.push(p),o.push(m),v=Math.max(p,v),y=Math.max(m,y)}!function(e,t){yj(e,(e=>{const n=e.gc,r=n.length/2;let i;if(r>t){for(i=0;i<r;++i)delete e.data[n[i]];n.splice(0,r)}}))}(r,t);const b=i.indexOf(v),x=o.indexOf(y),_=e=>({width:i[e]||0,height:o[e]||0});return{first:_(0),last:_(t-1),widest:_(b),highest:_(x),widths:i,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){const t=this;t._reversePixels&&(e=1-e);const n=t._startPixel+e*t._length;return Qj(t._alignToPixels?GV(t.chart,n,0):n,-32768,32767)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this,n=t.ticks||[];if(e>=0&&e<n.length){const r=n[e];return r.$context||(r.$context=function(e,t,n){return Object.assign(Object.create(e),{tick:n,index:t,type:"tick"})}(t.getContext(),e,r))}return t.$context||(t.$context=(r=t.chart.getContext(),i=t,Object.assign(Object.create(r),{scale:i,type:"scale"})));var r,i}_tickSize(){const e=this,t=e.options.ticks,n=Gj(e.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=e._getLabelSizes(),a=t.autoSkipPadding||0,s=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return e.isHorizontal()?l*r>s*i?s/r:l/i:l*i<s*r?l/r:s/i}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this,n=t.axis,r=t.chart,i=t.options,{grid:o,position:a}=i,s=o.offset,l=t.isHorizontal(),c=t.ticks.length+(s?1:0),u=Cq(o),d=[],h=o.setContext(t.getContext()),f=h.drawBorder?h.borderWidth:0,p=f/2,m=function(e){return GV(r,e,f)};let g,v,y,b,x,_,w,S,M,E,T,A;if("top"===a)g=m(t.bottom),_=t.bottom-u,S=g-p,E=m(e.top)+p,A=e.bottom;else if("bottom"===a)g=m(t.top),E=e.top,A=m(e.bottom)-p,_=g+p,S=t.top+u;else if("left"===a)g=m(t.right),x=t.right-u,w=g-p,M=m(e.left)+p,T=e.right;else if("right"===a)g=m(t.left),M=e.left,T=m(e.right)-p,x=g+p,w=t.left+u;else if("x"===n){if("center"===a)g=m((e.top+e.bottom)/2+.5);else if(hj(a)){const e=Object.keys(a)[0],n=a[e];g=m(t.chart.scales[e].getPixelForValue(n))}E=e.top,A=e.bottom,_=g+p,S=_+u}else if("y"===n){if("center"===a)g=m((e.left+e.right)/2);else if(hj(a)){const e=Object.keys(a)[0],n=a[e];g=m(t.chart.scales[e].getPixelForValue(n))}x=g-p,w=x-u,M=e.left,T=e.right}for(v=0;v<c;++v){const e=o.setContext(t.getContext(v)),n=e.lineWidth,i=e.color,a=o.borderDash||[],c=e.borderDashOffset,u=e.tickWidth,h=e.tickColor,f=e.tickBorderDash||[],p=e.tickBorderDashOffset;y=Aq(t,v,s),void 0!==y&&(b=GV(r,y,n),l?x=w=M=T=b:_=S=E=A=b,d.push({tx1:x,ty1:_,tx2:w,ty2:S,x1:M,y1:E,x2:T,y2:A,width:n,color:i,borderDash:a,borderDashOffset:c,tickWidth:u,tickColor:h,tickBorderDash:f,tickBorderDashOffset:p}))}return t._ticksLength=c,t._borderValue=g,d}_computeLabelItems(e){const t=this,n=t.axis,r=t.options,{position:i,ticks:o}=r,a=t.isHorizontal(),s=t.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,h=Cq(r.grid),f=h+u,p=d?-u:f,m=-Gj(t.labelRotation),g=[];let v,y,b,x,_,w,S,M,E,T,A,C,k="middle";if("top"===i)w=t.bottom-p,S=t._getXAxisLabelAlignment();else if("bottom"===i)w=t.top+p,S=t._getXAxisLabelAlignment();else if("left"===i){const e=t._getYAxisLabelAlignment(h);S=e.textAlign,_=e.x}else if("right"===i){const e=t._getYAxisLabelAlignment(h);S=e.textAlign,_=e.x}else if("x"===n){if("center"===i)w=(e.top+e.bottom)/2+f;else if(hj(i)){const e=Object.keys(i)[0],n=i[e];w=t.chart.scales[e].getPixelForValue(n)+f}S=t._getXAxisLabelAlignment()}else if("y"===n){if("center"===i)_=(e.left+e.right)/2-f;else if(hj(i)){const e=Object.keys(i)[0],n=i[e];_=t.chart.scales[e].getPixelForValue(n)}S=t._getYAxisLabelAlignment(h).textAlign}"y"===n&&("start"===l?k="top":"end"===l&&(k="bottom"));const P=t._getLabelSizes();for(v=0,y=s.length;v<y;++v){b=s[v],x=b.label;const e=o.setContext(t.getContext(v));M=t.getPixelForTick(v)+o.labelOffset,E=t._resolveTickFontOptions(v),T=E.lineHeight,A=dj(x)?x.length:1;const n=A/2,r=e.color,l=e.textStrokeColor,u=e.textStrokeWidth;let h;if(a?(_=M,C="top"===i?"near"===c||0!==m?-A*T+T/2:"center"===c?-P.highest.height/2-n*T+T:-P.highest.height+T/2:"near"===c||0!==m?T/2:"center"===c?P.highest.height/2-n*T:P.highest.height-A*T,d&&(C*=-1)):(w=M,C=(1-A)*T/2),e.showLabelBackdrop){const t=sW(e.backdropPadding),n=P.heights[v],r=P.widths[v];let i=w+C-t.top,o=_-t.left;switch(k){case"middle":i-=n/2;break;case"bottom":i-=n}switch(S){case"center":o-=r/2;break;case"right":o-=r}h={left:o,top:i,width:r+t.width,height:n+t.height,color:e.backdropColor}}g.push({rotation:m,label:x,font:E,color:r,strokeColor:l,strokeWidth:u,textOffset:C,textAlign:S,textBaseline:k,translation:[_,w],backdrop:h})}return g}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-Gj(this.labelRotation))return"top"===e?"left":"right";let n="center";return"start"===t.align?n="left":"end"===t.align&&(n="right"),n}_getYAxisLabelAlignment(e){const t=this,{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=t.options,a=e+o,s=t._getLabelSizes().widest.width;let l,c;return"left"===n?i?(l="left",c=t.right+o):(c=t.right-a,"near"===r?l="right":"center"===r?(l="center",c-=s/2):(l="left",c=t.left)):"right"===n?i?(l="right",c=t.left+o):(c=t.left+a,"near"===r?l="left":"center"===r?(l="center",c+=s/2):(l="right",c=t.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){const e=this;if(e.options.ticks.mirror)return;const t=e.chart,n=e.options.position;return"left"===n||"right"===n?{top:0,left:e.left,bottom:t.height,right:e.right}:"top"===n||"bottom"===n?{top:e.top,left:0,bottom:e.bottom,right:t.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:n,top:r,width:i,height:o}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,i,o),e.restore())}getLineWidthForValue(e){const t=this,n=t.options.grid;if(!t._isVisible()||!n.display)return 0;const r=t.ticks.findIndex((t=>t.value===e));if(r>=0){return n.setContext(t.getContext(r)).lineWidth}return 0}drawGrid(e){const t=this,n=t.options.grid,r=t.ctx,i=t._gridLineItems||(t._gridLineItems=t._computeGridLineItems(e));let o,a;const s=(e,t,n)=>{n.width&&n.color&&(r.save(),r.lineWidth=n.width,r.strokeStyle=n.color,r.setLineDash(n.borderDash||[]),r.lineDashOffset=n.borderDashOffset,r.beginPath(),r.moveTo(e.x,e.y),r.lineTo(t.x,t.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o<a;++o){const e=i[o];n.drawOnChartArea&&s({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),n.drawTicks&&s({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const e=this,{chart:t,ctx:n,options:{grid:r}}=e,i=r.setContext(e.getContext()),o=r.drawBorder?i.borderWidth:0;if(!o)return;const a=r.setContext(e.getContext(0)).lineWidth,s=e._borderValue;let l,c,u,d;e.isHorizontal()?(l=GV(t,e.left,o)-o/2,c=GV(t,e.right,a)+a/2,u=d=s):(u=GV(t,e.top,o)-o/2,d=GV(t,e.bottom,a)+a/2,l=c=s),n.save(),n.lineWidth=i.borderWidth,n.strokeStyle=i.borderColor,n.beginPath(),n.moveTo(l,u),n.lineTo(c,d),n.stroke(),n.restore()}drawLabels(e){const t=this;if(!t.options.ticks.display)return;const n=t.ctx,r=t._computeLabelArea();r&&$V(n,r);const i=t._labelItems||(t._labelItems=t._computeLabelItems(e));let o,a;for(o=0,a=i.length;o<a;++o){const e=i[o],t=e.font,r=e.label;e.backdrop&&(n.fillStyle=e.backdrop.color,n.fillRect(e.backdrop.left,e.backdrop.top,e.backdrop.width,e.backdrop.height)),KV(n,r,0,e.textOffset,t,e)}r&&ZV(n)}drawTitle(){const{ctx:e,options:{position:t,title:n,reverse:r}}=this;if(!n.display)return;const i=lW(n.font),o=sW(n.padding),a=n.align;let s=i.lineHeight/2;"bottom"===t?(s+=o.bottom,dj(n.text)&&(s+=i.lineHeight*(n.text.length-1))):s+=o.top;const{titleX:l,titleY:c,maxWidth:u,rotation:d}=function(e,t,n,r){const{top:i,left:o,bottom:a,right:s}=e;let l,c,u,d=0;return e.isHorizontal()?(c=sj(r,o,s),u=Eq(e,n,t),l=s-o):(c=Eq(e,n,t),u=sj(r,a,i),d="left"===n?-zj:zj),{titleX:c,titleY:u,maxWidth:l,rotation:d}}(this,s,t,a);KV(e,n.text,0,0,i,{color:n.color,maxWidth:u,rotation:d,textAlign:Pq(a,t,r),textBaseline:"middle",translation:[l,c]})}draw(e){const t=this;t._isVisible()&&(t.drawBackground(),t.drawGrid(e),t.drawBorder(),t.drawTitle(),t.drawLabels(e))}_layers(){const e=this,t=e.options,n=t.ticks&&t.ticks.z||0,r=t.grid&&t.grid.z||0;return e._isVisible()&&e.draw===Lq.prototype.draw?[{z:r,draw(t){e.drawBackground(),e.drawGrid(t),e.drawTitle()}},{z:r+1,draw(){e.drawBorder()}},{z:n,draw(t){e.drawLabels(t)}}]:[{z:n,draw(t){e.draw(t)}}]}getMatchingVisibleMetas(e){const t=this,n=t.chart.getSortedVisibleDatasetMetas(),r=t.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o<a;++o){const a=n[o];a[r]!==t.id||e&&a.type!==e||i.push(a)}return i}_resolveTickFontOptions(e){return lW(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this,t=e._resolveTickFontOptions(0).lineHeight;return(e.isHorizontal()?e.width:e.height)/t}}class Rq{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=this,n=Object.getPrototypeOf(e);let r;(function(e){return"id"in e&&"defaults"in e})(n)&&(r=t.register(n));const i=t.items,o=e.id,a=t.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in i||(i[o]=e,function(e,t,n){const r=Sj(Object.create(null),[n?jV.get(n):{},jV.get(t),e.defaults]);jV.set(t,r),e.defaultRoutes&&function(e,t){Object.keys(t).forEach((n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");jV.route(o,i,l,s)}))}(t,e.defaultRoutes);e.descriptors&&jV.describe(t,e.descriptors)}(e,a,r),t.override&&jV.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in jV[r]&&(delete jV[r][n],this.override&&delete BV[n])}}var Oq=new class{constructor(){this.controllers=new Rq(MG,"datasets",!0),this.elements=new Rq(xq,"elements"),this.plugins=new Rq(Object,"plugins"),this.scales=new Rq(Lq,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,n){const r=this;[...t].forEach((t=>{const i=n||r._getRegistryForType(t);n||i.isForType(t)||i===r.plugins&&t.id?r._exec(e,i,t):yj(t,(t=>{const i=n||r._getRegistryForType(t);r._exec(e,i,t)}))}))}_exec(e,t,n){const r=Cj(e);vj(n["before"+r],[],n),t[e](n),vj(n["after"+r],[],n)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){const r=t.get(e);if(void 0===r)throw new Error('"'+e+'" is not a registered '+n+".");return r}};class Dq{constructor(){this._init=[]}notify(e,t,n,r){const i=this;"beforeInit"===t&&(i._init=i._createDescriptors(e,!0),i._notify(i._init,e,"install"));const o=r?i._descriptors(e).filter(r):i._descriptors(e),a=i._notify(o,e,t,n);return"destroy"===t&&(i._notify(o,e,"stop"),i._notify(i._init,e,"uninstall")),a}_notify(e,t,n,r){r=r||{};for(const i of e){const e=i.plugin;if(!1===vj(e[n],[t,r,i.options],e)&&r.cancelable)return!1}return!0}invalidate(){uj(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const n=e&&e.config,r=mj(n.options&&n.options.plugins,{}),i=function(e){const t=[],n=Object.keys(Oq.plugins.items);for(let i=0;i<n.length;i++)t.push(Oq.getPlugin(n[i]));const r=e.plugins||[];for(let i=0;i<r.length;i++){const e=r[i];-1===t.indexOf(e)&&t.push(e)}return t}(n);return!1!==r||t?function(e,t,n,r){const i=[],o=e.getContext();for(let a=0;a<t.length;a++){const s=t[a],l=Iq(n[s.id],r);null!==l&&i.push({plugin:s,options:zq(e.config,s,l,o)})}return i}(e,i,r,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],n=this._cache,r=(e,t)=>e.filter((e=>!t.some((t=>e.plugin.id===t.plugin.id))));this._notify(r(t,n),e,"stop"),this._notify(r(n,t),e,"start")}}function Iq(e,t){return t||!1!==e?!0===e?{}:e:null}function zq(e,t,n,r){const i=e.pluginScopeKeys(t),o=e.getOptionScopes(n,i);return e.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Nq(e,t){const n=jV.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Bq(e,t){return"x"===e||"y"===e?e:t.axis||("top"===(n=t.position)||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0)||e.charAt(0).toLowerCase();var n}function Fq(e){const t=e.options||(e.options={});t.plugins=mj(t.plugins,{}),t.scales=function(e,t){const n=BV[e.type]||{scales:{}},r=t.scales||{},i=Nq(e.type,t),o=Object.create(null),a=Object.create(null);return Object.keys(r).forEach((e=>{const t=r[e],s=Bq(e,t),l=function(e,t){return e===t?"_index_":"_value_"}(s,i),c=n.scales||{};o[s]=o[s]||e,a[e]=Mj(Object.create(null),[{axis:s},t,c[s],c[l]])})),e.data.datasets.forEach((n=>{const i=n.type||e.type,s=n.indexAxis||Nq(i,t),l=(BV[i]||{}).scales||{};Object.keys(l).forEach((e=>{const t=function(e,t){let n=e;return"_index_"===e?n=t:"_value_"===e&&(n="x"===t?"y":"x"),n}(e,s),i=n[t+"AxisID"]||o[t]||t;a[i]=a[i]||Object.create(null),Mj(a[i],[{axis:t},r[i],l[e]])}))})),Object.keys(a).forEach((e=>{const t=a[e];Mj(t,[jV.scales[t.type],jV.scale])})),a}(e,t)}function Hq(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const Uq=new Map,jq=new Set;function Vq(e,t){let n=Uq.get(e);return n||(n=t(),Uq.set(e,n),jq.add(n)),n}const Wq=(e,t,n)=>{const r=Aj(t,n);void 0!==r&&e.add(r)};class Gq{constructor(e){this._config=function(e){return(e=e||{}).data=Hq(e.data),Fq(e),e}(e),this._scopeCache=new Map,this._resolverCache=new Map}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Hq(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Fq(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Vq(e,(()=>[[`datasets.${e}`,""]]))}datasetAnimationScopeKeys(e,t){return Vq(`${e}.transition.${t}`,(()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]]))}datasetElementScopeKeys(e,t){return Vq(`${e}-${t}`,(()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]]))}pluginScopeKeys(e){const t=e.id;return Vq(`${this.type}-plugin-${t}`,(()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]]))}_cachedScopes(e,t){const n=this._scopeCache;let r=n.get(e);return r&&!t||(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){const{options:r,type:i}=this,o=this._cachedScopes(e,n),a=o.get(t);if(a)return a;const s=new Set;t.forEach((t=>{e&&(s.add(e),t.forEach((t=>Wq(s,e,t)))),t.forEach((e=>Wq(s,r,e))),t.forEach((e=>Wq(s,BV[i]||{},e))),t.forEach((e=>Wq(s,jV,e))),t.forEach((e=>Wq(s,FV,e)))}));const l=[...s];return jq.has(t)&&o.set(t,l),l}chartOptionScopes(){const{options:e,type:t}=this;return[e,BV[t]||{},jV.datasets[t]||{},{type:t},jV,FV]}resolveNamedOptions(e,t,n,r=[""]){const i={$shared:!0},{resolver:o,subPrefixes:a}=qq(this._resolverCache,e,r);let s=o;if(function(e,t){const{isScriptable:n,isIndexable:r}=yW(e);for(const i of t)if(n(i)&&Pj(e[i])||r(i)&&dj(e[i]))return!0;return!1}(o,t)){i.$shared=!1;s=vW(o,n=Pj(n)?n():n,this.createResolver(e,n,a))}for(const l of t)i[l]=s[l];return i}createResolver(e,t,n=[""],r){const{resolver:i}=qq(this._resolverCache,e,n);return hj(t)?vW(i,t,void 0,r):i}}function qq(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);if(!o){o={resolver:gW(t,n),subPrefixes:n.filter((e=>!e.toLowerCase().includes("hover")))},r.set(i,o)}return o}const Xq=["top","bottom","left","right","chartArea"];function Yq(e,t){return"top"===e||"bottom"===e||-1===Xq.indexOf(e)&&"x"===t}function $q(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Zq(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),vj(n&&n.onComplete,[e],t)}function Jq(e){const t=e.chart,n=t.options.animation;vj(n&&n.onProgress,[e],t)}function Qq(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Kq(e){return Qq()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const eX={},tX=e=>{const t=Kq(e);return Object.values(eX).filter((e=>e.canvas===t)).pop()};class nX{constructor(e,t){const n=this;this.config=t=new Gq(t);const r=Kq(e),i=tX(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas can be reused.");const o=t.createResolver(t.chartOptionScopes(),n.getContext());this.platform=n._initializePlatform(r,t);const a=n.platform.acquireContext(r,o.aspectRatio),s=a&&a.canvas,l=s&&s.height,c=s&&s.width;this.id=cj(),this.ctx=a,this.canvas=s,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this.scale=void 0,this._plugins=new Dq,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){let n;return function(){return t?(clearTimeout(n),n=setTimeout(e,t)):e(),t}}((()=>this.update("resize")),o.resizeDelay||0),eX[n.id]=n,a&&s?(lG.listen(n,"complete",Zq),lG.listen(n,"progress",Jq),n._initialize(),n.attached&&n.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return uj(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){const e=this;return e.notifyPlugins("beforeInit"),e.options.responsive?e.resize():WW(e,e.options.devicePixelRatio),e.bindEvents(),e.notifyPlugins("afterInit"),e}_initializePlatform(e,t){return t.platform?new t.platform:!Qq()||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?new aq:new bq}clear(){return qV(this.canvas,this.ctx),this}stop(){return lG.stop(this),this}resize(e,t){lG.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this,r=n.options,i=n.canvas,o=r.maintainAspectRatio&&n.aspectRatio,a=n.platform.getMaximumSize(i,e,t,o),s=r.devicePixelRatio||n.platform.getDevicePixelRatio();n.width=a.width,n.height=a.height,n._aspectRatio=n.aspectRatio,WW(n,s,!0)&&(n.notifyPlugins("resize",{size:a}),vj(r.onResize,[n,a],n),n.attached&&n._doResize()&&n.render())}ensureScalesHaveIDs(){yj(this.options.scales||{},((e,t)=>{e.id=t}))}buildOrUpdateScales(){const e=this,t=e.options,n=t.scales,r=e.scales,i=Object.keys(r).reduce(((e,t)=>(e[t]=!1,e)),{});let o=[];n&&(o=o.concat(Object.keys(n).map((e=>{const t=n[e],r=Bq(e,t),i="r"===r,o="x"===r;return{options:t,dposition:i?"chartArea":o?"bottom":"left",dtype:i?"radialLinear":o?"category":"linear"}})))),yj(o,(n=>{const o=n.options,a=o.id,s=Bq(a,o),l=mj(o.type,n.dtype);void 0!==o.position&&Yq(o.position,s)===Yq(n.dposition)||(o.position=n.dposition),i[a]=!0;let c=null;if(a in r&&r[a].type===l)c=r[a];else{c=new(Oq.getScale(l))({id:a,type:l,ctx:e.ctx,chart:e}),r[c.id]=c}c.init(o,t)})),yj(i,((e,t)=>{e||delete r[t]})),yj(r,(t=>{iq.configure(e,t,t.options),iq.addBox(e,t)}))}_updateMetasets(){const e=this,t=e._metasets,n=e.data.datasets.length,r=t.length;if(t.sort(((e,t)=>e.index-t.index)),r>n){for(let t=n;t<r;++t)e._destroyDatasetMeta(t);t.splice(n,r-n)}e._sortedMetasets=t.slice(0).sort($q("order","index"))}_removeUnreferencedMetasets(){const e=this,{_metasets:t,data:{datasets:n}}=e;t.length>n.length&&delete e._stacks,t.forEach(((t,r)=>{0===n.filter((e=>e===t._dataset)).length&&e._destroyDatasetMeta(r)}))}buildOrUpdateControllers(){const e=this,t=[],n=e.data.datasets;let r,i;for(e._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const i=n[r];let o=e.getDatasetMeta(r);const a=i.type||e.config.type;if(o.type&&o.type!==a&&(e._destroyDatasetMeta(r),o=e.getDatasetMeta(r)),o.type=a,o.indexAxis=i.indexAxis||Nq(a,e.options),o.order=i.order||0,o.index=r,o.label=""+i.label,o.visible=e.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const n=Oq.getController(a),{datasetElementType:i,dataElementType:s}=jV.datasets[a];Object.assign(n.prototype,{dataElementType:Oq.getElement(s),datasetElementType:i&&Oq.getElement(i)}),o.controller=new n(e,r),t.push(o.controller)}}return e._updateMetasets(),t}_resetElements(){const e=this;yj(e.data.datasets,((t,n)=>{e.getDatasetMeta(n).controller.reset()}),e)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this,n=t.config;n.update(),t._options=n.createResolver(n.chartOptionScopes(),t.getContext()),yj(t.scales,(e=>{iq.removeBox(t,e)}));const r=t._animationsDisabled=!t.options.animation;t.ensureScalesHaveIDs(),t.buildOrUpdateScales();if(((e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0})(new Set(Object.keys(t._listeners)),new Set(t.options.events))&&!!this._responsiveListeners===t.options.responsive||(t.unbindEvents(),t.bindEvents()),t._plugins.invalidate(),!1===t.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const i=t.buildOrUpdateControllers();t.notifyPlugins("beforeElementsUpdate");let o=0;for(let a=0,s=t.data.datasets.length;a<s;a++){const{controller:e}=t.getDatasetMeta(a),n=!r&&-1===i.indexOf(e);e.buildOrUpdateElements(n),o=Math.max(+e.getMaxOverflow(),o)}t._minPadding=o,t._updateLayout(o),r||yj(i,(e=>{e.reset()})),t._updateDatasets(e),t.notifyPlugins("afterUpdate",{mode:e}),t._layers.sort($q("z","_idx")),t._lastEvent&&t._eventHandler(t._lastEvent,!0),t.render()}_updateLayout(e){const t=this;if(!1===t.notifyPlugins("beforeLayout",{cancelable:!0}))return;iq.update(t,t.width,t.height,e);const n=t.chartArea,r=n.width<=0||n.height<=0;t._layers=[],yj(t.boxes,(e=>{r&&"chartArea"===e.position||(e.configure&&e.configure(),t._layers.push(...e._layers()))}),t),t._layers.forEach(((e,t)=>{e._idx=t})),t.notifyPlugins("afterLayout")}_updateDatasets(e){const t=this,n="function"==typeof e;if(!1!==t.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let r=0,i=t.data.datasets.length;r<i;++r)t._updateDataset(r,n?e({datasetIndex:r}):e);t.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const n=this,r=n.getDatasetMeta(e),i={meta:r,index:e,mode:t,cancelable:!0};!1!==n.notifyPlugins("beforeDatasetUpdate",i)&&(r.controller._update(t),i.cancelable=!1,n.notifyPlugins("afterDatasetUpdate",i))}render(){const e=this;!1!==e.notifyPlugins("beforeRender",{cancelable:!0})&&(lG.has(e)?e.attached&&!lG.running(e)&&lG.start(e):(e.draw(),Zq({chart:e})))}draw(){const e=this;let t;if(e._resizeBeforeDraw){const{width:t,height:n}=e._resizeBeforeDraw;e._resize(t,n),e._resizeBeforeDraw=null}if(e.clear(),e.width<=0||e.height<=0)return;if(!1===e.notifyPlugins("beforeDraw",{cancelable:!0}))return;const n=e._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(e.chartArea);for(e._drawDatasets();t<n.length;++t)n[t].draw(e.chartArea);e.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,n=[];let r,i;for(r=0,i=t.length;r<i;++r){const i=t[r];e&&!i.visible||n.push(i)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){const e=this;if(!1===e.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=e.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)e._drawDataset(t[n]);e.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this,n=t.ctx,r=e._clip,i=t.chartArea,o={meta:e,index:e.index,cancelable:!0};!1!==t.notifyPlugins("beforeDatasetDraw",o)&&($V(n,{left:!1===r.left?0:i.left-r.left,right:!1===r.right?t.width:i.right+r.right,top:!1===r.top?0:i.top-r.top,bottom:!1===r.bottom?t.height:i.bottom+r.bottom}),e.controller.draw(),ZV(n),o.cancelable=!1,t.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(e,t,n,r){const i=XG.modes[t];return"function"==typeof i?i(this,e,n,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let r=n.filter((e=>e&&e._dataset===t)).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context={chart:this,type:"chart"})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return"boolean"==typeof n.hidden?!n.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateDatasetVisibility(e,t){const n=this,r=t?"show":"hide",i=n.getDatasetMeta(e),o=i.controller._resolveAnimations(void 0,r);n.setDatasetVisibility(e,t),o.update(i,{visible:t}),n.update((t=>t.datasetIndex===e?r:void 0))}hide(e){this._updateDatasetVisibility(e,!1)}show(e){this._updateDatasetVisibility(e,!0)}_destroyDatasetMeta(e){const t=this,n=t._metasets&&t._metasets[e];n&&n.controller&&(n.controller._destroy(),delete t._metasets[e])}destroy(){const e=this,{canvas:t,ctx:n}=e;let r,i;for(e.stop(),lG.remove(e),r=0,i=e.data.datasets.length;r<i;++r)e._destroyDatasetMeta(r);e.config.clearCache(),t&&(e.unbindEvents(),qV(t,n),e.platform.releaseContext(n),e.canvas=null,e.ctx=null),e.notifyPlugins("destroy"),delete eX[e.id]}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this,t=e._listeners,n=e.platform,r=function(t,n,r){t.offsetX=n,t.offsetY=r,e._eventHandler(t)};yj(e.options.events,(i=>((r,i)=>{n.addEventListener(e,r,i),t[r]=i})(i,r)))}bindResponsiveEvents(){const e=this;e._responsiveListeners||(e._responsiveListeners={});const t=e._responsiveListeners,n=e.platform,r=(r,i)=>{n.addEventListener(e,r,i),t[r]=i},i=(r,i)=>{t[r]&&(n.removeEventListener(e,r,i),delete t[r])},o=(t,n)=>{e.canvas&&e.resize(t,n)};let a;const s=()=>{i("attach",s),e.attached=!0,e.resize(),r("resize",o),r("detach",a)};a=()=>{e.attached=!1,i("resize",o),r("attach",s)},n.isAttached(e.canvas)?s():a()}unbindEvents(){const e=this;yj(e._listeners,((t,n)=>{e.platform.removeEventListener(e,n,t)})),e._listeners={},yj(e._responsiveListeners,((t,n)=>{e.platform.removeEventListener(e,n,t)})),e._responsiveListeners=void 0}updateHoverStyle(e,t,n){const r=n?"set":"remove";let i,o,a,s;for("dataset"===t&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),a=0,s=e.length;a<s;++a){o=e[a];const t=o&&this.getDatasetMeta(o.datasetIndex).controller;t&&t[r+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this,n=t._active||[],r=e.map((({datasetIndex:e,index:n})=>{const r=t.getDatasetMeta(e);if(!r)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:r.data[n],index:n}}));!bj(r,n)&&(t._active=r,t._updateHoverStyles(r,n))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}_updateHoverStyles(e,t,n){const r=this,i=r.options.hover,o=(e,t)=>e.filter((e=>!t.some((t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)))),a=o(t,e),s=n?e:o(e,t);a.length&&r.updateHoverStyle(a,i.mode,!1),s.length&&i.mode&&r.updateHoverStyle(s,i.mode,!0)}_eventHandler(e,t){const n=this,r={event:e,replay:t,cancelable:!0},i=t=>(t.options.events||this.options.events).includes(e.type);if(!1===n.notifyPlugins("beforeEvent",r,i))return;const o=n._handleEvent(e,t);return r.cancelable=!1,n.notifyPlugins("afterEvent",r,i),(o||r.changed)&&n.render(),n}_handleEvent(e,t){const n=this,{_active:r=[],options:i}=n,o=i.hover,a=t;let s=[],l=!1,c=null;return"mouseout"!==e.type&&(s=n.getElementsAtEventForMode(e,o.mode,o,a),c="click"===e.type?n._lastEvent:e),n._lastEvent=null,YV(e,n.chartArea,n._minPadding)&&(vj(i.onHover,[e,s,n],n),"mouseup"!==e.type&&"click"!==e.type&&"contextmenu"!==e.type||vj(i.onClick,[e,s,n],n)),l=!bj(s,r),(l||t)&&(n._active=s,n._updateHoverStyles(s,r,t)),n._lastEvent=c,l}}const rX=()=>yj(nX.instances,(e=>e._plugins.invalidate()));function iX(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+zj,r-zj),e.closePath(),e.clip()}function oX(e,t,n,r){const i=iW(e.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(n-t)/2,a=Math.min(o,r*t/2),s=e=>{const t=(n-Math.min(o,e))*r/2;return Qj(e,0,Math.min(o,t))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Qj(i.innerStart,0,a),innerEnd:Qj(i.innerEnd,0,a)}}function aX(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function sX(e,t,n,r){const{x:i,y:o,startAngle:a,pixelMargin:s,innerRadius:l}=t,c=Math.max(t.outerRadius+n-s,0),u=l>0?l+n+s:0,d=r-a,h=(d-Math.max(.001,d*c-n/Lj)/c)/2,f=a+h,p=r-h,{outerStart:m,outerEnd:g,innerStart:v,innerEnd:y}=oX(t,u,c,p-f),b=c-m,x=c-g,_=f+m/b,w=p-g/x,S=u+v,M=u+y,E=f+v/S,T=p-y/M;if(e.beginPath(),e.arc(i,o,c,_,w),g>0){const t=aX(x,w,i,o);e.arc(t.x,t.y,g,w,p+zj)}const A=aX(M,p,i,o);if(e.lineTo(A.x,A.y),y>0){const t=aX(M,T,i,o);e.arc(t.x,t.y,y,p+zj,T+Math.PI)}if(e.arc(i,o,u,p-y/u,f+v/u,!0),v>0){const t=aX(S,E,i,o);e.arc(t.x,t.y,v,E+Math.PI,f-zj)}const C=aX(b,f,i,o);if(e.lineTo(C.x,C.y),m>0){const t=aX(b,_,i,o);e.arc(t.x,t.y,m,f-zj,_)}e.closePath()}function lX(e,t,n,r){const{options:i}=t,o="inner"===i.borderAlign;i.borderWidth&&(o?(e.lineWidth=2*i.borderWidth,e.lineJoin="round"):(e.lineWidth=i.borderWidth,e.lineJoin="bevel"),t.fullCircles&&function(e,t,n){const{x:r,y:i,startAngle:o,pixelMargin:a,fullCircles:s}=t,l=Math.max(t.outerRadius-a,0),c=t.innerRadius+a;let u;for(n&&iX(e,t,o+Rj),e.beginPath(),e.arc(r,i,c,o+Rj,o,!0),u=0;u<s;++u)e.stroke();for(e.beginPath(),e.arc(r,i,l,o,o+Rj),u=0;u<s;++u)e.stroke()}(e,t,o),o&&iX(e,t,r),sX(e,t,n,r),e.stroke())}Object.defineProperties(nX,{defaults:{enumerable:true,value:jV},instances:{enumerable:true,value:eX},overrides:{enumerable:true,value:BV},registry:{enumerable:true,value:Oq},version:{enumerable:true,value:"3.3.2"},getChart:{enumerable:true,value:tX},register:{enumerable:true,value:(...e)=>{Oq.add(...e),rX()}},unregister:{enumerable:true,value:(...e)=>{Oq.remove(...e),rX()}}});class cX extends xq{constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.getProps(["x","y"],n),{angle:i,distance:o}=function(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*Lj&&(o+=Rj),{angle:o,distance:i}}(r,{x:e,y:t}),{startAngle:a,endAngle:s,innerRadius:l,outerRadius:c,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n);return(u>=Rj||Jj(i,a,s))&&(o>=l&&o<=c)}getCenterPoint(e){const{x:t,y:n,startAngle:r,endAngle:i,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),s=(r+i)/2,l=(o+a)/2;return{x:t+Math.cos(s)*l,y:n+Math.sin(s)*l}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const t=this,{options:n,circumference:r}=t,i=(n.offset||0)/2;if(t.pixelMargin="inner"===n.borderAlign?.33:0,t.fullCircles=r>Rj?Math.floor(r/Rj):0,0===r||t.innerRadius<0||t.outerRadius<0)return;e.save();let o=0;if(i){o=i/2;const n=(t.startAngle+t.endAngle)/2;e.translate(Math.cos(n)*o,Math.sin(n)*o),t.circumference>=Lj&&(o=i)}e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor;const a=function(e,t,n){const{fullCircles:r,startAngle:i,circumference:o}=t;let a=t.endAngle;if(r){sX(e,t,n,i+Rj);for(let t=0;t<r;++t)e.fill();isNaN(o)||(a=i+o%Rj,o%Rj==0&&(a+=Rj))}return sX(e,t,n,a),e.fill(),a}(e,t,o);lX(e,t,o,a),e.restore()}}function uX(e,t,n=t){e.lineCap=mj(n.borderCapStyle,t.borderCapStyle),e.setLineDash(mj(n.borderDash,t.borderDash)),e.lineDashOffset=mj(n.borderDashOffset,t.borderDashOffset),e.lineJoin=mj(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=mj(n.borderWidth,t.borderWidth),e.strokeStyle=mj(n.borderColor,t.borderColor)}function dX(e,t,n){e.lineTo(n.x,n.y)}function hX(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),u=i<a&&o<a||i>s&&o>s;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function fX(e,t,n,r){const{points:i,options:o}=t,{count:a,start:s,loop:l,ilen:c}=hX(i,n,r),u=function(e){return e.stepped?JV:e.tension||"monotone"===e.cubicInterpolationMode?QV:dX}(o);let d,h,f,{move:p=!0,reverse:m}=r||{};for(d=0;d<=c;++d)h=i[(s+(m?c-d:d))%a],h.skip||(p?(e.moveTo(h.x,h.y),p=!1):u(e,f,h,m,o.stepped),f=h);return l&&(h=i[(s+(m?c:0))%a],u(e,f,h,m,o.stepped)),!!l}function pX(e,t,n,r){const i=t.points,{count:o,start:a,ilen:s}=hX(i,n,r),{move:l=!0,reverse:c}=r||{};let u,d,h,f,p,m,g=0,v=0;const y=e=>(a+(c?s-e:e))%o,b=()=>{f!==p&&(e.lineTo(g,p),e.lineTo(g,f),e.lineTo(g,m))};for(l&&(d=i[y(0)],e.moveTo(d.x,d.y)),u=0;u<=s;++u){if(d=i[y(u)],d.skip)continue;const t=d.x,n=d.y,r=0|t;r===h?(n<f?f=n:n>p&&(p=n),g=(v*g+t)/++v):(b(),e.lineTo(t,n),h=r,v=0,f=p=n),m=n}b()}function mX(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!(e._decimated||e._loop||t.tension||"monotone"===t.cubicInterpolationMode||t.stepped||n)?pX:fX}cX.id="arc",cX.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,angle:void 0},cX.defaultRoutes={backgroundColor:"backgroundColor"};const gX="function"==typeof Path2D;function vX(e,t,n,r){gX&&1===t.segments.length?function(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),uX(e,t.options),e.stroke(i)}(e,t,n,r):function(e,t,n,r){const{segments:i,options:o}=t,a=mX(t);for(const s of i)uX(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}(e,t,n,r)}class yX extends xq{constructor(e){super(),this.animated=!0,this.options=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,e&&Object.assign(this,e)}updateControlPoints(e,t){const n=this,r=n.options;if((r.tension||"monotone"===r.cubicInterpolationMode)&&!r.stepped&&!n._pointsUpdated){const i=r.spanGaps?n._loop:n._fullLoop;IW(n._points,r,e,i,t),n._pointsUpdated=!0}}set points(e){const t=this;t._points=e,delete t._segments,delete t._path,t._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=function(e,t,n,r){let i=0,o=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}(n,i,o,r);return oG(!0===r?[{start:a,end:s,loop:o}]:function(e,t,n,r){const i=e.length,o=[];let a,s=t,l=e[t];for(a=t+1;a<=n;++a){const n=e[a%i];n.skip||n.stop?l.skip||(r=!1,o.push({start:t%i,end:(a-1)%i,loop:r}),t=s=n.stop?a:null):(s=a,l.skip&&(t=a)),l=n}return null!==s&&o.push({start:t%i,end:s%i,loop:r}),o}(n,a,s<a?s+i:s,!!e._fullLoop&&0===a&&s===i-1),n,t)}(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){const n=this,r=n.options,i=e[t],o=n.points,a=iG(n,{property:t,start:i,end:i});if(!a.length)return;const s=[],l=function(e){return e.stepped?YW:e.tension||"monotone"===e.cubicInterpolationMode?$W:XW}(r);let c,u;for(c=0,u=a.length;c<u;++c){const{start:n,end:u}=a[c],d=o[n],h=o[u];if(d===h){s.push(d);continue}const f=l(d,h,Math.abs((i-d[t])/(h[t]-d[t])),r.stepped);f[t]=e[t],s.push(f)}return 1===s.length?s[0]:s}pathSegment(e,t,n){return mX(this)(e,this,t,n)}path(e,t,n){const r=this,i=r.segments,o=mX(r);let a=r._loop;t=t||0,n=n||r.points.length-t;for(const s of i)a&=o(e,r,s,{start:t,end:t+n-1});return!!a}draw(e,t,n,r){const i=this,o=i.options||{};(i.points||[]).length&&o.borderWidth&&(e.save(),vX(e,i,n,r),e.restore(),i.animated&&(i._pointsUpdated=!1,i._path=void 0))}}function bX(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}yX.id="line",yX.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},yX.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},yX.descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e};class xX extends xq{constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.options,{x:i,y:o}=this.getProps(["x","y"],n);return Math.pow(e-i,2)+Math.pow(t-o,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(e,t){return bX(this,e,"x",t)}inYRange(e,t){return bX(this,e,"y",t)}getCenterPoint(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}size(e){let t=(e=e||this.options||{}).radius||0;t=Math.max(t,t&&e.hoverRadius||0);return 2*(t+(t&&e.borderWidth||0))}draw(e){const t=this,n=t.options;t.skip||n.radius<.1||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,XV(e,n,t.x,t.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function _X(e,t){const{x:n,y:r,base:i,width:o,height:a}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,d;return e.horizontal?(d=a/2,s=Math.min(n,i),l=Math.max(n,i),c=r-d,u=r+d):(d=o/2,s=n-d,l=n+d,c=Math.min(r,i),u=Math.max(r,i)),{left:s,top:c,right:l,bottom:u}}function wX(e){let t=e.options.borderSkipped;const n={};return t?(t=e.horizontal?SX(t,"left","right",e.base>e.x):SX(t,"bottom","top",e.base<e.y),n[t]=!0,n):n}function SX(e,t,n,r){var i,o,a;return r?(a=n,e=MX(e=(i=e)===(o=t)?a:i===a?o:i,n,t)):e=MX(e,t,n),e}function MX(e,t,n){return"start"===e?t:"end"===e?n:e}function EX(e,t,n,r){return e?0:Math.max(Math.min(t,r),n)}function TX(e){const t=_X(e),n=t.right-t.left,r=t.bottom-t.top,i=function(e,t,n){const r=e.options.borderWidth,i=wX(e),o=oW(r);return{t:EX(i.top,o.top,0,n),r:EX(i.right,o.right,0,t),b:EX(i.bottom,o.bottom,0,n),l:EX(i.left,o.left,0,t)}}(e,n/2,r/2),o=function(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=aW(i),a=Math.min(t,n),s=wX(e),l=r||hj(i);return{topLeft:EX(!l||s.top||s.left,o.topLeft,0,a),topRight:EX(!l||s.top||s.right,o.topRight,0,a),bottomLeft:EX(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:EX(!l||s.bottom||s.right,o.bottomRight,0,a)}}(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function AX(e,t,n,r){const i=null===t,o=null===n,a=e&&!(i&&o)&&_X(e,r);return a&&(i||t>=a.left&&t<=a.right)&&(o||n>=a.top&&n<=a.bottom)}function CX(e,t){e.rect(t.x,t.y,t.w,t.h)}xX.id="point",xX.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},xX.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class kX extends xq{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,e&&Object.assign(this,e)}draw(e){const t=this.options,{inner:n,outer:r}=TX(this),i=(o=r.radius).topLeft||o.topRight||o.bottomLeft||o.bottomRight?eW:CX;var o;e.save(),r.w===n.w&&r.h===n.h||(e.beginPath(),i(e,r),e.clip(),i(e,n),e.fillStyle=t.borderColor,e.fill("evenodd")),e.beginPath(),i(e,n),e.fillStyle=t.backgroundColor,e.fill(),e.restore()}inRange(e,t,n){return AX(this,e,t,n)}inXRange(e,t){return AX(this,e,null,t)}inYRange(e,t){return AX(this,null,e,t)}getCenterPoint(e){const{x:t,y:n,base:r,horizontal:i}=this.getProps(["x","y","base","horizontal"],e);return{x:i?(t+r)/2:t,y:i?n:(n+r)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}kX.id="bar",kX.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,enableBorderRadius:!0,pointStyle:void 0},kX.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var PX=Object.freeze({__proto__:null,ArcElement:cX,LineElement:yX,PointElement:xX,BarElement:kX});function LX(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{value:t})}}function RX(e){e.data.datasets.forEach((e=>{LX(e)}))}var OX={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled)return void RX(e);const r=e.width;e.data.datasets.forEach(((t,i)=>{const{_data:o,indexAxis:a}=t,c=e.getDatasetMeta(i),u=o||t.data;if("y"===cW([a,e.options.indexAxis]))return;if("line"!==c.type)return;const d=e.scales[c.xAxisID];if("linear"!==d.type&&"time"!==d.type)return;if(e.options.parsing)return;let h,{start:f,count:p}=function(e,t){const n=t.length;let r,i=0;const{iScale:o}=e,{min:a,max:s,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(i=Qj(dW(t,o.axis,a).lo,0,n-1)),r=c?Qj(dW(t,o.axis,s).hi+1,i,n)-i:n-i,{start:i,count:r}}(c,u);if(p<=4*r)LX(t);else{switch(uj(o)&&(t._data=u,delete t.data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(e){this._data=e}})),n.algorithm){case"lttb":h=function(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const a=[],s=(n-2)/(o-2);let l=0;const c=t+n-1;let u,d,h,f,p,m=t;for(a[l++]=e[m],u=0;u<o-2;u++){let r,i=0,o=0;const c=Math.floor((u+1)*s)+1+t,g=Math.min(Math.floor((u+2)*s)+1,n)+t,v=g-c;for(r=c;r<g;r++)i+=e[r].x,o+=e[r].y;i/=v,o/=v;const y=Math.floor(u*s)+1+t,b=Math.floor((u+1)*s)+1+t,{x:x,y:_}=e[m];for(h=f=-1,r=y;r<b;r++)f=.5*Math.abs((x-i)*(e[r].y-_)-(x-e[r].x)*(o-_)),f>h&&(h=f,d=e[r],p=r);a[l++]=d,m=p}return a[l++]=e[c],a}(u,f,p,r,n);break;case"min-max":h=function(e,t,n,r){let i,o,a,c,u,d,h,f,p,m,g=0,v=0;const y=[],b=t+n-1,x=e[t].x,_=e[b].x-x;for(i=t;i<t+n;++i){o=e[i],a=(o.x-x)/_*r,c=o.y;const t=0|a;if(t===u)c<p?(p=c,d=i):c>m&&(m=c,h=i),g=(v*g+o.x)/++v;else{const n=i-1;if(!uj(d)&&!uj(h)){const t=Math.min(d,h),r=Math.max(d,h);t!==f&&t!==n&&y.push(l(s({},e[t]),{x:g})),r!==f&&r!==n&&y.push(l(s({},e[r]),{x:g}))}i>0&&n!==f&&y.push(e[n]),y.push(o),u=t,v=0,p=m=c,d=h=f=i}}return y}(u,f,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}t._decimated=h}}))},destroy(e){RX(e)}};function DX(e,t,n){const r=function(e){const t=e.options,n=t.fill;let r=mj(n&&n.target,n);return void 0===r&&(r=!!t.backgroundColor),!1!==r&&null!==r&&(!0===r?"origin":r)}(e);if(hj(r))return!isNaN(r.value)&&r;let i=parseFloat(r);return fj(i)&&Math.floor(i)===i?("-"!==r[0]&&"+"!==r[0]||(i=t+i),!(i===t||i<0||i>=n)&&i):["origin","start","end","stack"].indexOf(r)>=0&&r}class IX{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,n){const{x:r,y:i,radius:o}=this;return t=t||{start:0,end:Rj},e.arc(r,i,o,t.end,t.start,!0),!n.bounds}interpolate(e){const{x:t,y:n,radius:r}=this,i=e.angle;return{x:t+Math.cos(i)*r,y:n+Math.sin(i)*r,angle:i}}}function zX(e){return(e.scale||{}).getPointPositionForValue?function(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,o=[],a=r.reverse?t.max:t.min,s=r.reverse?t.min:t.max;let l,c,u;if(u="start"===n?a:"end"===n?s:hj(n)?n.value:t.getBaseValue(),r.grid.circular)return c=t.getPointPositionForValue(0,a),new IX({x:c.x,y:c.y,radius:t.getDistanceFromCenterForValue(u)});for(l=0;l<i;++l)o.push(t.getPointPositionForValue(l,u));return o}(e):function(e){const{scale:t={},fill:n}=e;let r,i=null;return"start"===n?i=t.bottom:"end"===n?i=t.top:hj(n)?i=t.getPixelForValue(n.value):t.getBasePixel&&(i=t.getBasePixel()),fj(i)?(r=t.isHorizontal(),{x:r?i:null,y:r?null:i}):null}(e)}function NX(e){const{chart:t,scale:n,index:r,line:i}=e,o=[],a=i.segments,s=i.points,l=function(e,t){const n=[],r=e.getSortedVisibleDatasetMetas();for(let i=0;i<r.length;i++){const e=r[i];if(e.index===t)break;BX(e)&&n.unshift(e.dataset)}return n}(t,r);l.push(UX({x:null,y:n.bottom},i));for(let c=0;c<a.length;c++){const e=a[c];for(let t=e.start;t<=e.end;t++)FX(o,s[t],l)}return new yX({points:o,options:{}})}const BX=e=>"line"===e.type&&!e.hidden;function FX(e,t,n){const r=[];for(let i=0;i<n.length;i++){const o=n[i],{first:a,last:s,point:l}=HX(o,t,"x");if(!(!l||a&&s))if(a)r.unshift(l);else if(e.push(l),!s)break}e.push(...r)}function HX(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],o=e.segments,a=e.points;let s=!1,l=!1;for(let c=0;c<o.length;c++){const e=o[c],t=a[e.start][n],r=a[e.end][n];if(i>=t&&i<=r){s=i===t,l=i===r;break}}return{first:s,last:l,point:r}}function UX(e,t){let n=[],r=!1;return dj(e)?(r=!0,n=e):n=function(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach((e=>{const t=i[e.start],a=i[e.end];null!==r?(o.push({x:t.x,y:r}),o.push({x:a.x,y:r})):null!==n&&(o.push({x:n,y:t.y}),o.push({x:n,y:a.y}))})),o}(e,t),n.length?new yX({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function jX(e,t,n){let r=e[t].fill;const i=[t];let o;if(!n)return r;for(;!1!==r&&-1===i.indexOf(r);){if(!fj(r))return r;if(o=e[r],!o)return!1;if(o.visible)return r;i.push(r),r=o.fill}return!1}function VX(e,t,n){e.beginPath(),t.path(e),e.lineTo(t.last().x,n),e.lineTo(t.first().x,n),e.closePath(),e.clip()}function WX(e,t,n,r){if(r)return;let i=t[e],o=n[e];return"angle"===e&&(i=Zj(i),o=Zj(o)),{property:e,start:i,end:o}}function GX(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function qX(e,t,n){const{top:r,bottom:i}=t.chart.chartArea,{property:o,start:a,end:s}=n||{};"x"===o&&(e.beginPath(),e.rect(a,r,s-a,i-r),e.clip())}function XX(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}function YX(e,t){const{line:n,target:r,property:i,color:o,scale:a}=t,s=function(e,t,n){const r=e.segments,i=e.points,o=t.points,a=[];for(const s of r){const e=WX(n,i[s.start],i[s.end],s.loop);if(!t.segments){a.push({source:s,target:e,start:i[s.start],end:i[s.end]});continue}const r=iG(t,e);for(const t of r){const r=WX(n,o[t.start],o[t.end],t.loop),l=rG(s,i,r);for(const i of l)a.push({source:i,target:t,start:{[n]:GX(e,r,"start",Math.max)},end:{[n]:GX(e,r,"end",Math.min)}})}}return a}(n,r,i);for(const{source:l,target:c,start:u,end:d}of s){const{style:{backgroundColor:t=o}={}}=l;e.save(),e.fillStyle=t,qX(e,a,WX(i,u,d)),e.beginPath();const s=!!n.pathSegment(e,l);s?e.closePath():XX(e,r,d,i);const h=!!r.pathSegment(e,c,{move:s,reverse:!0}),f=s&&h;f||XX(e,r,u,i),e.closePath(),e.fill(f?"evenodd":"nonzero"),e.restore()}}function $X(e,t,n){const r=function(e){const{chart:t,fill:n,line:r}=e;if(fj(n))return function(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}(t,n);if("stack"===n)return NX(e);const i=zX(e);return i instanceof IX?i:UX(i,r)}(t),{line:i,scale:o,axis:a}=t,s=i.options,l=s.fill,c=s.backgroundColor,{above:u=c,below:d=c}=l||{};r&&i.points.length&&($V(e,n),function(e,t){const{line:n,target:r,above:i,below:o,area:a,scale:s}=t,l=n._loop?"angle":t.axis;e.save(),"x"===l&&o!==i&&(VX(e,r,a.top),YX(e,{line:n,target:r,color:i,scale:s,property:l}),e.restore(),e.save(),VX(e,r,a.bottom)),YX(e,{line:n,target:r,color:o,scale:s,property:l}),e.restore()}(e,{line:i,target:r,above:u,below:d,area:n,scale:o,axis:a}),ZV(e))}var ZX={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let o,a,s,l;for(a=0;a<r;++a)o=e.getDatasetMeta(a),s=o.dataset,l=null,s&&s.options&&s instanceof yX&&(l={visible:e.isDatasetVisible(a),index:a,fill:DX(s,a,r),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:s}),o.$filler=l,i.push(l);for(a=0;a<r;++a)l=i[a],l&&!1!==l.fill&&(l.fill=jX(i,a,n.propagate))},beforeDraw(e,t,n){const r="beforeDraw"===n.drawTime,i=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let a=i.length-1;a>=0;--a){const t=i[a].$filler;t&&(t.line.updateControlPoints(o,t.axis),r&&$X(e.ctx,t,o))}},beforeDatasetsDraw(e,t,n){if("beforeDatasetsDraw"!==n.drawTime)return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const t=r[i].$filler;t&&$X(e.ctx,t,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;r&&!1!==r.fill&&"beforeDatasetDraw"===n.drawTime&&$X(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const JX=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}};class QX extends xq{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){const r=this;r.maxWidth=e,r.maxHeight=t,r._margins=n,r.setDimensions(),r.buildLabels(),r.fit()}setDimensions(){const e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height)}buildLabels(){const e=this,t=e.options.labels||{};let n=vj(t.generateLabels,[e.chart],e)||[];t.filter&&(n=n.filter((n=>t.filter(n,e.chart.data)))),t.sort&&(n=n.sort(((n,r)=>t.sort(n,r,e.chart.data)))),e.options.reverse&&n.reverse(),e.legendItems=n}fit(){const e=this,{options:t,ctx:n}=e;if(!t.display)return void(e.width=e.height=0);const r=t.labels,i=lW(r.font),o=i.size,a=e._computeTitleHeight(),{boxWidth:s,itemHeight:l}=JX(r,o);let c,u;n.font=i.string,e.isHorizontal()?(c=e.maxWidth,u=e._fitRows(a,o,s,l)+10):(u=e.maxHeight,c=e._fitCols(a,o,s,l)+10),e.width=Math.min(c,t.maxWidth||e.maxWidth),e.height=Math.min(u,t.maxHeight||e.maxHeight)}_fitRows(e,t,n,r){const i=this,{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=i,l=i.legendHitBoxes=[],c=i.lineWidths=[0],u=r+s;let d=e;o.textAlign="left",o.textBaseline="middle";let h=-1,f=-u;return i.legendItems.forEach(((e,i)=>{const p=n+t/2+o.measureText(e.text).width;(0===i||c[c.length-1]+p+2*s>a)&&(d+=u,c[c.length-(i>0?0:1)]=0,f+=u,h++),l[i]={left:0,top:f,row:h,width:p,height:r},c[c.length-1]+=p+s})),d}_fitCols(e,t,n,r){const i=this,{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=i,l=i.legendHitBoxes=[],c=i.columnSizes=[],u=a-e;let d=s,h=0,f=0,p=0,m=0,g=0;return i.legendItems.forEach(((e,i)=>{const a=n+t/2+o.measureText(e.text).width;i>0&&f+t+2*s>u&&(d+=h+s,c.push({width:h,height:f}),p+=h+s,g++,m=0,h=f=0),h=Math.max(h,a),f+=t+s,l[i]={left:p,top:m,col:g,width:a,height:r},m+=r+s})),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){const e=this;if(!e.options.display)return;const t=e._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i}}}=e;if(this.isHorizontal()){let o=0,a=sj(r,e.left+i,e.right-e.lineWidths[o]);for(const s of n)o!==s.row&&(o=s.row,a=sj(r,e.left+i,e.right-e.lineWidths[o])),s.top+=e.top+t+i,s.left=a,a+=s.width+i}else{let o=0,a=sj(r,e.top+t+i,e.bottom-e.columnSizes[o].height);for(const s of n)s.col!==o&&(o=s.col,a=sj(r,e.top+t+i,e.bottom-e.columnSizes[o].height)),s.top=a,s.left+=e.left+i,a+=s.height+i}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){const e=this;if(e.options.display){const t=e.ctx;$V(t,e),e._draw(),ZV(t)}}_draw(){const e=this,{options:t,columnSizes:n,lineWidths:r,ctx:i}=e,{align:o,labels:a}=t,s=jV.color,l=QW(t.rtl,e.left,e.width),c=lW(a.font),{color:u,padding:d}=a,h=c.size,f=h/2;let p;e.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:g,itemHeight:v}=JX(a,h),y=e.isHorizontal(),b=this._computeTitleHeight();p=y?{x:sj(o,e.left+d,e.right-r[0]),y:e.top+d+b,line:0}:{x:e.left+d,y:sj(o,e.top+b+d,e.bottom-n[0].height),line:0},KW(e.ctx,t.textDirection);const x=v+d;e.legendItems.forEach(((t,_)=>{i.strokeStyle=t.fontColor||u,i.fillStyle=t.fontColor||u;const w=i.measureText(t.text).width,S=l.textAlign(t.textAlign||(t.textAlign=a.textAlign)),M=m+h/2+w;let E=p.x,T=p.y;l.setWidth(e.width),y?_>0&&E+M+d>e.right&&(T=p.y+=x,p.line++,E=p.x=sj(o,e.left+d,e.right-r[p.line])):_>0&&T+x>e.bottom&&(E=p.x=E+n[p.line].width+d,p.line++,T=p.y=sj(o,e.top+b+d,e.bottom-n[p.line].height));!function(e,t,n){if(isNaN(m)||m<=0||isNaN(g)||g<0)return;i.save();const r=mj(n.lineWidth,1);if(i.fillStyle=mj(n.fillStyle,s),i.lineCap=mj(n.lineCap,"butt"),i.lineDashOffset=mj(n.lineDashOffset,0),i.lineJoin=mj(n.lineJoin,"miter"),i.lineWidth=r,i.strokeStyle=mj(n.strokeStyle,s),i.setLineDash(mj(n.lineDash,[])),a.usePointStyle){const o={radius:m*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:r},a=l.xPlus(e,m/2);XV(i,o,a,t+f)}else{const o=t+Math.max((h-g)/2,0),a=l.leftForLtr(e,m),s=aW(n.borderRadius);i.beginPath(),Object.values(s).some((e=>0!==e))?eW(i,{x:a,y:o,w:m,h:g,radius:s}):i.rect(a,o,m,g),i.fill(),0!==r&&i.stroke()}i.restore()}(l.x(E),T,t),E=((e,t,n)=>"right"===e?n:"center"===e?(t+n)/2:t)(S,E+m+f,e.right),function(e,t,n){KV(i,n.text,e,t+v/2,c,{strikethrough:n.hidden,textAlign:n.textAlign})}(l.x(E),T,t),y?p.x+=M+d:p.y+=x})),eG(e.ctx,t.textDirection)}drawTitle(){const e=this,t=e.options,n=t.title,r=lW(n.font),i=sW(n.padding);if(!n.display)return;const o=QW(t.rtl,e.left,e.width),a=e.ctx,s=n.position,l=r.size/2,c=i.top+l;let u,d=e.left,h=e.width;if(this.isHorizontal())h=Math.max(...e.lineWidths),u=e.top+c,d=sj(t.align,d,e.right-h);else{const n=e.columnSizes.reduce(((e,t)=>Math.max(e,t.height)),0);u=c+sj(t.align,e.top,e.bottom-n-t.labels.padding-e._computeTitleHeight())}const f=sj(s,d,d+h);a.textAlign=o.textAlign(aj(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,KV(a,n.text,f,u,r)}_computeTitleHeight(){const e=this.options.title,t=lW(e.font),n=sW(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){const n=this;let r,i,o;if(e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom)for(o=n.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height)return n.legendItems[r];return null}handleEvent(e){const t=this,n=t.options;if(!function(e,t){if("mousemove"===e&&(t.onHover||t.onLeave))return!0;if(t.onClick&&("click"===e||"mouseup"===e))return!0;return!1}(e.type,n))return;const r=t._getLegendItemAt(e.x,e.y);if("mousemove"===e.type){const i=t._hoveredItem,o=((e,t)=>null!==e&&null!==t&&e.datasetIndex===t.datasetIndex&&e.index===t.index)(i,r);i&&!o&&vj(n.onLeave,[e,i,t],t),t._hoveredItem=r,r&&!o&&vj(n.onHover,[e,r,t],t)}else r&&vj(n.onClick,[e,r,t],t)}}var KX={id:"legend",_element:QX,start(e,t,n){const r=e.legend=new QX({ctx:e.ctx,options:n,chart:e});iq.configure(e,r,n),iq.addBox(e,r)},stop(e){iq.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;iq.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o}}=e.legend.options;return e._getSortedDatasetMetas().map((e=>{const a=e.controller.getStyle(n?0:void 0),s=sW(a.borderWidth);return{text:t[e.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!e.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(s.width+s.height)/4,strokeStyle:a.borderColor,pointStyle:r||a.pointStyle,rotation:a.rotation,textAlign:i||a.textAlign,borderRadius:0,datasetIndex:e.index}}),this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class eY extends xq{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){const n=this,r=n.options;if(n.left=0,n.top=0,!r.display)return void(n.width=n.height=n.right=n.bottom=0);n.width=n.right=e,n.height=n.bottom=t;const i=dj(r.text)?r.text.length:1;n._padding=sW(r.padding);const o=i*lW(r.font).lineHeight+n._padding.height;n.isHorizontal()?n.height=o:n.width=o}isHorizontal(){const e=this.options.position;return"top"===e||"bottom"===e}_drawArgs(e){const{top:t,left:n,bottom:r,right:i,options:o}=this,a=o.align;let s,l,c,u=0;return this.isHorizontal()?(l=sj(a,n,i),c=t+e,s=i-n):("left"===o.position?(l=n+e,c=sj(a,r,t),u=-.5*Lj):(l=i-e,c=sj(a,t,r),u=.5*Lj),s=r-t),{titleX:l,titleY:c,maxWidth:s,rotation:u}}draw(){const e=this,t=e.ctx,n=e.options;if(!n.display)return;const r=lW(n.font),i=r.lineHeight/2+e._padding.top,{titleX:o,titleY:a,maxWidth:s,rotation:l}=e._drawArgs(i);KV(t,n.text,0,0,r,{color:n.color,maxWidth:s,rotation:l,textAlign:aj(n.align),textBaseline:"middle",translation:[o,a]})}}var tY={id:"title",_element:eY,start(e,t,n){!function(e,t){const n=new eY({ctx:e.ctx,options:t,chart:e});iq.configure(e,n,t),iq.addBox(e,n),e.titleBlock=n}(e,n)},stop(e){const t=e.titleBlock;iq.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;iq.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const nY={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;t<n;++t){const n=e[t].element;if(n&&n.hasValue()){const e=n.tooltipPosition();r+=e.x,i+=e.y,++o}}return{x:r/o,y:i/o}},nearest(e,t){if(!e.length)return!1;let n,r,i,o=t.x,a=t.y,s=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){const r=e[n].element;if(r&&r.hasValue()){const e=Yj(t,r.getCenterPoint());e<s&&(s=e,i=r)}}if(i){const e=i.tooltipPosition();o=e.x,a=e.y}return{x:o,y:a}}};function rY(e,t){return t&&(dj(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function iY(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function oY(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function aY(e,t){const n=e._chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=lW(t.bodyFont),c=lW(t.titleFont),u=lW(t.footerFont),d=o.length,h=i.length,f=r.length,p=sW(t.padding);let m=p.height,g=0,v=r.reduce(((e,t)=>e+t.before.length+t.lines.length+t.after.length),0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){m+=f*(t.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(v-f)*l.lineHeight+(v-1)*t.bodySpacing}h&&(m+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let y=0;const b=function(e){g=Math.max(g,n.measureText(e).width+y)};return n.save(),n.font=c.string,yj(e.title,b),n.font=l.string,yj(e.beforeBody.concat(e.afterBody),b),y=t.displayColors?a+2:0,yj(r,(e=>{yj(e.before,b),yj(e.lines,b),yj(e.after,b)})),y=0,n.font=u.string,yj(e.footer,b),n.restore(),g+=p.width,{width:g,height:m}}function sY(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return"center"===r?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),function(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;return"left"===e&&i+o+a>t.width||"right"===e&&i-o-a<0||void 0}(c,e,t,n)&&(c="center"),c}function lY(e,t,n){const r=t.yAlign||function(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}(e,n);return{xAlign:t.xAlign||sY(e,t,n,r),yAlign:r}}function cY(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,u=a+o;let d=function(e,t){let{x:n,width:r}=e;return"right"===t?n-=r:"center"===t&&(n-=r/2),n}(t,s);const h=function(e,t,n){let{y:r,height:i}=e;return"top"===t?r+=n:r-="bottom"===t?i+n:i/2,r}(t,l,c);return"center"===l?"left"===s?d+=c:"right"===s&&(d-=c):"left"===s?d-=u:"right"===s&&(d+=u),{x:Qj(d,0,r.width-t.width),y:Qj(h,0,r.height-t.height)}}function uY(e,t,n){const r=sW(n.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-r.right:e.x+r.left}function dY(e){return rY([],iY(e))}function hY(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}class fY extends xq{constructor(e){super(),this.opacity=0,this._active=[],this._chart=e._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this,t=e._cachedAnimations;if(t)return t;const n=e._chart,r=e.options.setContext(e.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new hG(e._chart,i);return i._cacheable&&(e._cachedAnimations=Object.freeze(o)),o}getContext(){const e=this;return e.$context||(e.$context=(t=e._chart.getContext(),n=e,r=e._tooltipItems,Object.assign(Object.create(t),{tooltip:n,tooltipItems:r,type:"tooltip"})));var t,n,r}getTitle(e,t){const n=this,{callbacks:r}=t,i=r.beforeTitle.apply(n,[e]),o=r.title.apply(n,[e]),a=r.afterTitle.apply(n,[e]);let s=[];return s=rY(s,iY(i)),s=rY(s,iY(o)),s=rY(s,iY(a)),s}getBeforeBody(e,t){return dY(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const n=this,{callbacks:r}=t,i=[];return yj(e,(e=>{const t={before:[],lines:[],after:[]},o=hY(r,e);rY(t.before,iY(o.beforeLabel.call(n,e))),rY(t.lines,o.label.call(n,e)),rY(t.after,iY(o.afterLabel.call(n,e))),i.push(t)})),i}getAfterBody(e,t){return dY(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const n=this,{callbacks:r}=t,i=r.beforeFooter.apply(n,[e]),o=r.footer.apply(n,[e]),a=r.afterFooter.apply(n,[e]);let s=[];return s=rY(s,iY(i)),s=rY(s,iY(o)),s=rY(s,iY(a)),s}_createItems(e){const t=this,n=t._active,r=t._chart.data,i=[],o=[],a=[];let s,l,c=[];for(s=0,l=n.length;s<l;++s)c.push(oY(t._chart,n[s]));return e.filter&&(c=c.filter(((t,n,i)=>e.filter(t,n,i,r)))),e.itemSort&&(c=c.sort(((t,n)=>e.itemSort(t,n,r)))),yj(c,(n=>{const r=hY(e.callbacks,n);i.push(r.labelColor.call(t,n)),o.push(r.labelPointStyle.call(t,n)),a.push(r.labelTextColor.call(t,n))})),t.labelColors=i,t.labelPointStyles=o,t.labelTextColors=a,t.dataPoints=c,c}update(e,t){const n=this,r=n.options.setContext(n.getContext()),i=n._active;let o,a=[];if(i.length){const e=nY[r.position].call(n,i,n._eventPosition);a=n._createItems(r),n.title=n.getTitle(a,r),n.beforeBody=n.getBeforeBody(a,r),n.body=n.getBody(a,r),n.afterBody=n.getAfterBody(a,r),n.footer=n.getFooter(a,r);const t=n._size=aY(n,r),s=Object.assign({},e,t),l=lY(n._chart,r,s),c=cY(r,s,l,n._chart);n.xAlign=l.xAlign,n.yAlign=l.yAlign,o={opacity:1,x:c.x,y:c.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==n.opacity&&(o={opacity:0});n._tooltipItems=a,n.$context=void 0,o&&n._resolveAnimations().update(n,o),e&&r.external&&r.external.call(n,{chart:n._chart,tooltip:n,replay:t})}drawCaret(e,t,n,r){const i=this.getCaretPosition(e,n,r);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(e,t,n){const{xAlign:r,yAlign:i}=this,{cornerRadius:o,caretSize:a}=n,{x:s,y:l}=e,{width:c,height:u}=t;let d,h,f,p,m,g;return"center"===i?(m=l+u/2,"left"===r?(d=s,h=d-a,p=m+a,g=m-a):(d=s+c,h=d+a,p=m-a,g=m+a),f=d):(h="left"===r?s+o+a:"right"===r?s+c-o-a:this.caretX,"top"===i?(p=l,m=p-a,d=h-a,f=h+a):(p=l+u,m=p+a,d=h+a,f=h-a),g=p),{x1:d,x2:h,x3:f,y1:p,y2:m,y3:g}}drawTitle(e,t,n){const r=this,i=r.title,o=i.length;let a,s,l;if(o){const c=QW(n.rtl,r.x,r.width);for(e.x=uY(r,n.titleAlign,n),t.textAlign=c.textAlign(n.titleAlign),t.textBaseline="middle",a=lW(n.titleFont),s=n.titleSpacing,t.fillStyle=n.titleColor,t.font=a.string,l=0;l<o;++l)t.fillText(i[l],c.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+s,l+1===o&&(e.y+=n.titleMarginBottom-s)}}_drawColorBox(e,t,n,r,i){const o=this,a=o.labelColors[n],s=o.labelPointStyles[n],{boxHeight:l,boxWidth:c}=i,u=lW(i.bodyFont),d=uY(o,"left",i),h=r.x(d),f=l<u.lineHeight?(u.lineHeight-l)/2:0,p=t.y+f;if(i.usePointStyle){const t={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},n=r.leftForLtr(h,c)+c/2,o=p+l/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,XV(e,t,n,o),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,XV(e,t,n,o)}else{e.lineWidth=a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const t=r.leftForLtr(h,c),n=r.leftForLtr(r.xPlus(h,1),c-2),o=aW(a.borderRadius);Object.values(o).some((e=>0!==e))?(e.beginPath(),e.fillStyle=i.multiKeyBackground,eW(e,{x:t,y:p,w:c,h:l,radius:o}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),eW(e,{x:n,y:p+1,w:c-2,h:l-2,radius:o}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(t,p,c,l),e.strokeRect(t,p,c,l),e.fillStyle=a.backgroundColor,e.fillRect(n,p+1,c-2,l-2))}e.fillStyle=o.labelTextColors[n]}drawBody(e,t,n){const r=this,{body:i}=r,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c}=n,u=lW(n.bodyFont);let d=u.lineHeight,h=0;const f=QW(n.rtl,r.x,r.width),p=function(n){t.fillText(n,f.x(e.x+h),e.y+d/2),e.y+=d+o},m=f.textAlign(a);let g,v,y,b,x,_,w;for(t.textAlign=a,t.textBaseline="middle",t.font=u.string,e.x=uY(r,m,n),t.fillStyle=n.bodyColor,yj(r.beforeBody,p),h=s&&"right"!==m?"center"===a?c/2+1:c+2:0,b=0,_=i.length;b<_;++b){for(g=i[b],v=r.labelTextColors[b],t.fillStyle=v,yj(g.before,p),y=g.lines,s&&y.length&&(r._drawColorBox(t,e,b,f,n),d=Math.max(u.lineHeight,l)),x=0,w=y.length;x<w;++x)p(y[x]),d=u.lineHeight;yj(g.after,p)}h=0,d=u.lineHeight,yj(r.afterBody,p),e.y-=o}drawFooter(e,t,n){const r=this,i=r.footer,o=i.length;let a,s;if(o){const l=QW(n.rtl,r.x,r.width);for(e.x=uY(r,n.footerAlign,n),e.y+=n.footerMarginTop,t.textAlign=l.textAlign(n.footerAlign),t.textBaseline="middle",a=lW(n.footerFont),t.fillStyle=n.footerColor,t.font=a.string,s=0;s<o;++s)t.fillText(i[s],l.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+n.footerSpacing}}drawBackground(e,t,n,r){const{xAlign:i,yAlign:o}=this,{x:a,y:s}=e,{width:l,height:c}=n,u=r.cornerRadius;t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(a+u,s),"top"===o&&this.drawCaret(e,t,n,r),t.lineTo(a+l-u,s),t.quadraticCurveTo(a+l,s,a+l,s+u),"center"===o&&"right"===i&&this.drawCaret(e,t,n,r),t.lineTo(a+l,s+c-u),t.quadraticCurveTo(a+l,s+c,a+l-u,s+c),"bottom"===o&&this.drawCaret(e,t,n,r),t.lineTo(a+u,s+c),t.quadraticCurveTo(a,s+c,a,s+c-u),"center"===o&&"left"===i&&this.drawCaret(e,t,n,r),t.lineTo(a,s+u),t.quadraticCurveTo(a,s,a+u,s),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this,n=t._chart,r=t.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const r=nY[e.position].call(t,t._active,t._eventPosition);if(!r)return;const a=t._size=aY(t,e),s=Object.assign({},r,t._size),l=lY(n,e,s),c=cY(e,s,l,n);i._to===c.x&&o._to===c.y||(t.xAlign=l.xAlign,t.yAlign=l.yAlign,t.width=a.width,t.height=a.height,t.caretX=r.x,t.caretY=r.y,t._resolveAnimations().update(t,c))}}draw(e){const t=this,n=t.options.setContext(t.getContext());let r=t.opacity;if(!r)return;t._updateAnimationTarget(n);const i={width:t.width,height:t.height},o={x:t.x,y:t.y};r=Math.abs(r)<.001?0:r;const a=sW(n.padding),s=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;n.enabled&&s&&(e.save(),e.globalAlpha=r,t.drawBackground(o,e,i,n),KW(e,n.textDirection),o.y+=a.top,t.drawTitle(o,e,n),t.drawBody(o,e,n),t.drawFooter(o,e,n),eG(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const n=this,r=n._active,i=e.map((({datasetIndex:e,index:t})=>{const r=n._chart.getDatasetMeta(e);if(!r)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:r.data[t],index:t}})),o=!bj(r,i),a=n._positionChanged(i,t);(o||a)&&(n._active=i,n._eventPosition=t,n.update(!0))}handleEvent(e,t){const n=this,r=n.options,i=n._active||[];let o=!1,a=[];"mouseout"!==e.type&&(a=n._chart.getElementsAtEventForMode(e,r.mode,r,t),r.reverse&&a.reverse());const s=n._positionChanged(a,e);return o=t||!bj(a,i)||s,o&&(n._active=a,(r.enabled||r.external)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0,t))),o}_positionChanged(e,t){const{caretX:n,caretY:r,options:i}=this,o=nY[i.position].call(this,e,t);return!1!==o&&(n!==o.x||r!==o.y)}}fY.positioners=nY;var pY={id:"tooltip",_element:fY,positioners:nY,afterInit(e,t,n){n&&(e.tooltip=new fY({_chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip,n={tooltip:t};!1!==e.notifyPlugins("beforeTooltipDraw",n)&&(t&&t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n))},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:lj,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:lj,beforeBody:lj,beforeLabel:lj,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return uj(n)||(t+=n),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:lj,afterBody:lj,beforeFooter:lj,footer:lj,afterFooter:lj}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},mY=Object.freeze({__proto__:null,Decimation:OX,Filler:ZX,Legend:KX,Title:tY,Tooltip:pY});function gY(e,t,n){const r=e.indexOf(t);if(-1===r)return((e,t,n)=>"string"==typeof t?e.push(t)-1:isNaN(t)?null:n)(e,t,n);return r!==e.lastIndexOf(t)?n:r}class vY extends Lq{constructor(e){super(e),this._startValue=void 0,this._valueRange=0}parse(e,t){if(uj(e))return null;const n=this.getLabels();return((e,t)=>null===e?null:Qj(Math.round(e),0,t))(t=isFinite(t)&&n[t]===e?t:gY(n,e,mj(t,e)),n.length-1)}determineDataLimits(){const e=this,{minDefined:t,maxDefined:n}=e.getUserBounds();let{min:r,max:i}=e.getMinMax(!0);"ticks"===e.options.bounds&&(t||(r=0),n||(i=e.getLabels().length-1)),e.min=r,e.max=i}buildTicks(){const e=this,t=e.min,n=e.max,r=e.options.offset,i=[];let o=e.getLabels();o=0===t&&n===o.length-1?o:o.slice(t,n+1),e._valueRange=Math.max(o.length-(r?0:1),1),e._startValue=e.min-(r?.5:0);for(let a=t;a<=n;a++)i.push({value:a});return i}getLabelForValue(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}configure(){const e=this;super.configure(),e.isHorizontal()||(e._reversePixels=!e._reversePixels)}getPixelForValue(e){const t=this;return"number"!=typeof e&&(e=t.parse(e)),null===e?NaN:t.getPixelForDecimal((e-t._startValue)/t._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){const t=this;return Math.round(t._startValue+t.getDecimalForPixel(e)*t._valueRange)}getBasePixel(){return this.bottom}}function yY(e,t){const n=[],{bounds:r,step:i,min:o,max:a,precision:s,count:l,maxTicks:c,maxDigits:u,includeBounds:d}=e,h=i||1,f=c-1,{min:p,max:m}=t,g=!uj(o),v=!uj(a),y=!uj(l),b=(m-p)/(u+1);let x,_,w,S,M=Uj((m-p)/f/h)*h;if(M<1e-14&&!g&&!v)return[{value:p},{value:m}];S=Math.ceil(m/M)-Math.floor(p/M),S>f&&(M=Uj(S*M/f/h)*h),uj(s)||(x=Math.pow(10,s),M=Math.ceil(M*x)/x),"ticks"===r?(_=Math.floor(p/M)*M,w=Math.ceil(m/M)*M):(_=p,w=m),g&&v&&i&&function(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}((a-o)/i,M/1e3)?(S=Math.min((a-o)/M,c),M=(a-o)/S,_=o,w=a):y?(_=g?o:_,w=v?a:w,S=l-1,M=(w-_)/S):(S=(w-_)/M,S=Vj(S,Math.round(S),M/1e3)?Math.round(S):Math.ceil(S));const E=Math.max(Xj(M),Xj(_));x=Math.pow(10,uj(s)?E:s),_=Math.round(_*x)/x,w=Math.round(w*x)/x;let T=0;for(g&&(d&&_!==o?(n.push({value:o}),_<o&&T++,Vj(Math.round((_+T*M)*x)/x,o,bY(o,b,e))&&T++):_<o&&T++);T<S;++T)n.push({value:Math.round((_+T*M)*x)/x});return v&&d&&w!==a?Vj(n[n.length-1].value,a,bY(a,b,e))?n[n.length-1].value=a:n.push({value:a}):v&&w!==a||n.push({value:w}),n}function bY(e,t,{horizontal:n,minRotation:r}){const i=Gj(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}vY.id="category",vY.defaults={ticks:{callback:vY.prototype.getLabelForValue}};class xY extends Lq{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return uj(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const e=this,{beginAtZero:t}=e.options,{minDefined:n,maxDefined:r}=e.getUserBounds();let{min:i,max:o}=e;const a=e=>i=n?i:e,s=e=>o=r?o:e;if(t){const e=Hj(i),t=Hj(o);e<0&&t<0?s(0):e>0&&t>0&&a(0)}i===o&&(s(o+1),t||a(i-1)),e.min=i,e.max=o}getTickLimit(){const e=this,t=e.options.ticks;let n,{maxTicksLimit:r,stepSize:i}=t;return i?n=Math.ceil(e.max/i)-Math.floor(e.min/i)+1:(n=e.computeTickLimit(),r=r||11),r&&(n=Math.min(r,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this,t=e.options,n=t.ticks;let r=e.getTickLimit();r=Math.max(2,r);const i=yY({maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:e._maxDigits(),horizontal:e.isHorizontal(),minRotation:n.minRotation||0,includeBounds:!1!==n.includeBounds},e._range||e);return"ticks"===t.bounds&&Wj(i,e,"value"),t.reverse?(i.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),i}configure(){const e=this,t=e.ticks;let n=e.min,r=e.max;if(super.configure(),e.options.offset&&t.length){const e=(r-n)/Math.max(t.length-1,1)/2;n-=e,r+=e}e._startValue=n,e._endValue=r,e._valueRange=r-n}getLabelForValue(e){return JW(e,this.chart.options.locale)}}class _Y extends xY{determineDataLimits(){const e=this,{min:t,max:n}=e.getMinMax(!0);e.min=fj(t)?t:0,e.max=fj(n)?n:1,e.handleTickRangeOptions()}computeTickLimit(){const e=this,t=e.isHorizontal(),n=t?e.width:e.height,r=Gj(e.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=e._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}function wY(e){return 1===e/Math.pow(10,Math.floor(Fj(e)))}_Y.id="linear",_Y.defaults={ticks:{callback:wq.formatters.numeric}};class SY extends Lq{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const n=xY.prototype.parse.apply(this,[e,t]);if(0!==n)return fj(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const e=this,{min:t,max:n}=e.getMinMax(!0);e.min=fj(t)?Math.max(0,t):null,e.max=fj(n)?Math.max(0,n):null,e.options.beginAtZero&&(e._zero=!0),e.handleTickRangeOptions()}handleTickRangeOptions(){const e=this,{minDefined:t,maxDefined:n}=e.getUserBounds();let r=e.min,i=e.max;const o=e=>r=t?r:e,a=e=>i=n?i:e,s=(e,t)=>Math.pow(10,Math.floor(Fj(e))+t);r===i&&(r<=0?(o(1),a(10)):(o(s(r,-1)),a(s(i,1)))),r<=0&&o(s(i,-1)),i<=0&&a(s(r,1)),e._zero&&e.min!==e._suggestedMin&&r===s(e.min,0)&&o(s(r,-1)),e.min=r,e.max=i}buildTicks(){const e=this,t=e.options,n=function(e,t){const n=Math.floor(Fj(t.max)),r=Math.ceil(t.max/Math.pow(10,n)),i=[];let o=pj(e.min,Math.pow(10,Math.floor(Fj(t.min)))),a=Math.floor(Fj(o)),s=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{i.push({value:o,major:wY(o)}),++s,10===s&&(s=1,++a,l=a>=0?1:l),o=Math.round(s*Math.pow(10,a)*l)/l}while(a<n||a===n&&s<r);const c=pj(e.max,o);return i.push({value:c,major:wY(o)}),i}({min:e._userMin,max:e._userMax},e);return"ticks"===t.bounds&&Wj(n,e,"value"),t.reverse?(n.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),n}getLabelForValue(e){return void 0===e?"0":JW(e,this.chart.options.locale)}configure(){const e=this,t=e.min;super.configure(),e._startValue=Fj(t),e._valueRange=Fj(e.max)-Fj(t)}getPixelForValue(e){const t=this;return void 0!==e&&0!==e||(e=t.min),null===e||isNaN(e)?NaN:t.getPixelForDecimal(e===t.min?0:(Fj(e)-t._startValue)/t._valueRange)}getValueForPixel(e){const t=this,n=t.getDecimalForPixel(e);return Math.pow(10,t._startValue+n*t._valueRange)}}function MY(e){const t=e.ticks;if(t.display&&e.display){const e=sW(t.backdropPadding);return mj(t.font&&t.font.size,jV.font.size)+e.height}return 0}function EY(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function TY(e){return 0===e||180===e?"center":e<180?"left":"right"}function AY(e,t,n){90===e||270===e?n.y-=t.h/2:(e>270||e<90)&&(n.y-=t.h)}function CY(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Rj);else{let n=e.getPointPosition(0,t);i.moveTo(n.x,n.y);for(let o=1;o<r;o++)n=e.getPointPosition(o,t),i.lineTo(n.x,n.y)}}function kY(e){return jj(e)?e:0}SY.id="logarithmic",SY.defaults={ticks:{callback:wq.formatters.logarithmic,major:{enabled:!0}}};class PY extends xY{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=MY(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2}determineDataLimits(){const e=this,{min:t,max:n}=e.getMinMax(!1);e.min=fj(t)&&!isNaN(t)?t:0,e.max=fj(n)&&!isNaN(n)?n:0,e.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/MY(this.options))}generateTickLabels(e){const t=this;xY.prototype.generateTickLabels.call(t,e),t._pointLabels=t.getLabels().map(((e,n)=>{const r=vj(t.options.pointLabels.callback,[e,n],t);return r||0===r?r:""}))}fit(){const e=this,t=e.options;t.display&&t.pointLabels.display?function(e){const t={l:0,r:e.width,t:0,b:e.height-e.paddingTop},n={};let r,i,o;const a=[],s=[],l=e.getLabels().length;for(r=0;r<l;r++){const l=e.options.pointLabels.setContext(e.getContext(r));s[r]=l.padding,o=e.getPointPosition(r,e.drawingArea+s[r]);const h=lW(l.font);e.ctx.font=h.string,c=e.ctx,u=h.lineHeight,i=dj(d=e._pointLabels[r])?{w:WV(c,c.font,d),h:d.length*u}:{w:c.measureText(d).width,h:u},a[r]=i;const f=e.getIndexAngle(r),p=qj(f),m=EY(p,o.x,i.w,0,180),g=EY(p,o.y,i.h,90,270);m.start<t.l&&(t.l=m.start,n.l=f),m.end>t.r&&(t.r=m.end,n.r=f),g.start<t.t&&(t.t=g.start,n.t=f),g.end>t.b&&(t.b=g.end,n.b=f)}var c,u,d;e._setReductions(e.drawingArea,t,n),e._pointLabelItems=[];const h=e.options,f=MY(h),p=e.getDistanceFromCenterForValue(h.ticks.reverse?e.min:e.max);for(r=0;r<l;r++){const t=0===r?f/2:0,n=e.getPointPosition(r,p+t+s[r]),i=qj(e.getIndexAngle(r)),o=a[r];AY(i,o,n);const l=TY(i);let c;c="left"===l?n.x:"center"===l?n.x-o.w/2:n.x-o.w;const u=c+o.w;e._pointLabelItems[r]={x:n.x,y:n.y,textAlign:l,left:c,top:n.y,right:u,bottom:n.y+o.h}}}(e):e.setCenterPoint(0,0,0,0)}_setReductions(e,t,n){const r=this;let i=t.l/Math.sin(n.l),o=Math.max(t.r-r.width,0)/Math.sin(n.r),a=-t.t/Math.cos(n.t),s=-Math.max(t.b-(r.height-r.paddingTop),0)/Math.cos(n.b);i=kY(i),o=kY(o),a=kY(a),s=kY(s),r.drawingArea=Math.max(e/2,Math.min(Math.floor(e-(i+o)/2),Math.floor(e-(a+s)/2))),r.setCenterPoint(i,o,a,s)}setCenterPoint(e,t,n,r){const i=this,o=i.width-t-i.drawingArea,a=e+i.drawingArea,s=n+i.drawingArea,l=i.height-i.paddingTop-r-i.drawingArea;i.xCenter=Math.floor((a+o)/2+i.left),i.yCenter=Math.floor((s+l)/2+i.top+i.paddingTop)}getIndexAngle(e){return Zj(e*(Rj/this.getLabels().length)+Gj(this.options.startAngle||0))}getDistanceFromCenterForValue(e){const t=this;if(uj(e))return NaN;const n=t.drawingArea/(t.max-t.min);return t.options.reverse?(t.max-e)*n:(e-t.min)*n}getValueForDistanceFromCenter(e){if(uj(e))return NaN;const t=this,n=e/(t.drawingArea/(t.max-t.min));return t.options.reverse?t.max-n:t.min+n}getPointPosition(e,t){const n=this,r=n.getIndexAngle(e)-zj;return{x:Math.cos(r)*t+n.xCenter,y:Math.sin(r)*t+n.yCenter,angle:r}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:n,right:r,bottom:i}=this._pointLabelItems[e];return{left:t,top:n,right:r,bottom:i}}drawBackground(){const e=this,{backgroundColor:t,grid:{circular:n}}=e.options;if(t){const r=e.ctx;r.save(),r.beginPath(),CY(e,e.getDistanceFromCenterForValue(e._endValue),n,e.getLabels().length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const e=this,t=e.ctx,n=e.options,{angleLines:r,grid:i}=n,o=e.getLabels().length;let a,s,l;if(n.pointLabels.display&&function(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const t=r.setContext(e.getContext(i)),o=lW(t.font),{x:a,y:s,textAlign:l,left:c,top:u,right:d,bottom:h}=e._pointLabelItems[i],{backdropColor:f}=t;if(!uj(f)){const e=sW(t.backdropPadding);n.fillStyle=f,n.fillRect(c-e.left,u-e.top,d-c+e.width,h-u+e.height)}KV(n,e._pointLabels[i],a,s+o.lineHeight/2,o,{color:t.color,textAlign:l,textBaseline:"middle"})}}(e,o),i.display&&e.ticks.forEach(((t,n)=>{if(0!==n){s=e.getDistanceFromCenterForValue(t.value);const r=i.setContext(e.getContext(n-1));!function(e,t,n,r){const i=e.ctx,o=t.circular,{color:a,lineWidth:s}=t;!o&&!r||!a||!s||n<0||(i.save(),i.strokeStyle=a,i.lineWidth=s,i.setLineDash(t.borderDash),i.lineDashOffset=t.borderDashOffset,i.beginPath(),CY(e,n,o,r),i.closePath(),i.stroke(),i.restore())}(e,r,s,o)}})),r.display){for(t.save(),a=e.getLabels().length-1;a>=0;a--){const i=r.setContext(e.getContext(a)),{color:o,lineWidth:c}=i;c&&o&&(t.lineWidth=c,t.strokeStyle=o,t.setLineDash(i.borderDash),t.lineDashOffset=i.borderDashOffset,s=e.getDistanceFromCenterForValue(n.ticks.reverse?e.min:e.max),l=e.getPointPosition(a,s),t.beginPath(),t.moveTo(e.xCenter,e.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const e=this,t=e.ctx,n=e.options,r=n.ticks;if(!r.display)return;const i=e.getIndexAngle(0);let o,a;t.save(),t.translate(e.xCenter,e.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",e.ticks.forEach(((i,s)=>{if(0===s&&!n.reverse)return;const l=r.setContext(e.getContext(s)),c=lW(l.font);if(o=e.getDistanceFromCenterForValue(e.ticks[s].value),l.showLabelBackdrop){a=t.measureText(i.label).width,t.fillStyle=l.backdropColor;const e=sW(l.backdropPadding);t.fillRect(-a/2-e.left,-o-c.size/2-e.top,a+e.width,c.size+e.height)}KV(t,i.label,0,-o,c,{color:l.color})})),t.restore()}drawTitle(){}}PY.id="radialLinear",PY.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:wq.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:e=>e,padding:5}},PY.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},PY.descriptors={angleLines:{_fallback:"grid"}};const LY={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},RY=Object.keys(LY);function OY(e,t){return e-t}function DY(e,t){if(uj(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return"function"==typeof r&&(a=r(a)),fj(a)||(a="string"==typeof r?n.parse(a,r):n.parse(a)),null===a?null:(i&&(a="week"!==i||!jj(o)&&!0!==o?n.startOf(a,i):n.startOf(a,"isoWeek",o)),+a)}function IY(e,t,n,r){const i=RY.length;for(let o=RY.indexOf(e);o<i-1;++o){const e=LY[RY[o]],i=e.steps?e.steps:Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((n-t)/(i*e.size))<=r)return RY[o]}return RY[i-1]}function zY(e,t,n){if(n){if(n.length){const{lo:r,hi:i}=uW(n,t);e[n[r]>=t?n[r]:n[i]]=!0}}else e[t]=!0}function NY(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a<o;++a)s=t[a],i[s]=a,r.push({value:s,major:!1});return 0!==o&&n?function(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}(e,r,i,n):r}class BY extends Lq{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t){const n=e.time||(e.time={}),r=this._adapter=new HG._date(e.adapters.date);Mj(n.displayFormats,r.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:DY(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this,t=e.options,n=e._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:s}=e.getUserBounds();function l(e){a||isNaN(e.min)||(i=Math.min(i,e.min)),s||isNaN(e.max)||(o=Math.max(o,e.max))}a&&s||(l(e._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||l(e.getMinMax(!1))),i=fj(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=fj(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,e.min=Math.min(i,o-1),e.max=Math.max(i+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],n=e[e.length-1]),{min:t,max:n}}buildTicks(){const e=this,t=e.options,n=t.time,r=t.ticks,i="labels"===r.source?e.getLabelTimestamps():e._generate();"ticks"===t.bounds&&i.length&&(e.min=e._userMin||i[0],e.max=e._userMax||i[i.length-1]);const o=e.min,a=function(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}(i,o,e.max);return e._unit=n.unit||(r.autoSkip?IY(n.minUnit,e.min,e.max,e._getLabelCapacity(o)):function(e,t,n,r,i){for(let o=RY.length-1;o>=RY.indexOf(n);o--){const n=RY[o];if(LY[n].common&&e._adapter.diff(i,r,n)>=t-1)return n}return RY[n?RY.indexOf(n):0]}(e,a.length,n.minUnit,e.min,e.max)),e._majorUnit=r.major.enabled&&"year"!==e._unit?function(e){for(let t=RY.indexOf(e)+1,n=RY.length;t<n;++t)if(LY[RY[t]].common)return RY[t]}(e._unit):void 0,e.initOffsets(i),t.reverse&&a.reverse(),NY(e,a,e._majorUnit)}initOffsets(e){const t=this;let n,r,i=0,o=0;t.options.offset&&e.length&&(n=t.getDecimalForValue(e[0]),i=1===e.length?1-n:(t.getDecimalForValue(e[1])-n)/2,r=t.getDecimalForValue(e[e.length-1]),o=1===e.length?r:(r-t.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;i=Qj(i,0,a),o=Qj(o,0,a),t._offsets={start:i,end:o,factor:1/(i+1+o)}}_generate(){const e=this,t=e._adapter,n=e.min,r=e.max,i=e.options,o=i.time,a=o.unit||IY(o.minUnit,n,r,e._getLabelCapacity(n)),s=mj(o.stepSize,1),l="week"===a&&o.isoWeekday,c=jj(l)||!0===l,u={};let d,h,f=n;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const p="data"===i.ticks.source&&e.getDataTimestamps();for(d=f,h=0;d<r;d=+t.add(d,s,a),h++)zY(u,d,p);return d!==r&&"ticks"!==i.bounds&&1!==h||zY(u,d,p),Object.keys(u).sort(((e,t)=>e-t)).map((e=>+e))}getLabelForValue(e){const t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}_tickFormatFunction(e,t,n,r){const i=this,o=i.options,a=o.time.displayFormats,s=i._unit,l=i._majorUnit,c=s&&a[s],u=l&&a[l],d=n[t],h=l&&u&&d&&d.major,f=i._adapter.format(e,r||(h?u:c)),p=o.ticks.callback;return p?vj(p,[f,t,n],i):f}generateTickLabels(e){let t,n,r;for(t=0,n=e.length;t<n;++t)r=e[t],r.label=this._tickFormatFunction(r.value,t,e)}getDecimalForValue(e){const t=this;return null===e?NaN:(e-t.min)/(t.max-t.min)}getPixelForValue(e){const t=this,n=t._offsets,r=t.getDecimalForValue(e);return t.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){const t=this,n=t._offsets,r=t.getDecimalForPixel(e)/n.factor-n.end;return t.min+r*(t.max-t.min)}_getLabelSize(e){const t=this,n=t.options.ticks,r=t.ctx.measureText(e).width,i=Gj(t.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),a=Math.sin(i),s=t._resolveTickFontOptions(0).size;return{w:r*o+s*a,h:r*a+s*o}}_getLabelCapacity(e){const t=this,n=t.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=t._tickFormatFunction(e,0,NY(t,[e],t._majorUnit),i),a=t._getLabelSize(o),s=Math.floor(t.isHorizontal()?t.width/a.w:t.height/a.h)-1;return s>0?s:1}getDataTimestamps(){const e=this;let t,n,r=e._cache.data||[];if(r.length)return r;const i=e.getMatchingVisibleMetas();if(e._normalized&&i.length)return e._cache.data=i[0].controller.getAllParsedValues(e);for(t=0,n=i.length;t<n;++t)r=r.concat(i[t].controller.getAllParsedValues(e));return e._cache.data=e.normalize(r)}getLabelTimestamps(){const e=this,t=e._cache.labels||[];let n,r;if(t.length)return t;const i=e.getLabels();for(n=0,r=i.length;n<r;++n)t.push(DY(e,i[n]));return e._cache.labels=e._normalized?t:e.normalize(t)}normalize(e){return mW(e.sort(OY))}}function FY(e,t,n){let r,i,o,a;if(n)r=Math.floor(t),i=Math.ceil(t),o=e[r],a=e[i];else{const n=uW(e,t);o=n.lo,a=n.hi,r=e[o],i=e[a]}const s=i-r;return s?o+(a-o)*(t-r)/s:o}BY.id="time",BY.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class HY extends BY{constructor(e){super(e),this._table=[],this._maxIndex=void 0}initOffsets(){const e=this,t=e._getTimestampsForTable();e._table=e.buildLookupTable(t),e._maxIndex=e._table.length-1,super.initOffsets(t)}buildLookupTable(e){const{min:t,max:n}=this;if(!e.length)return[{time:t,pos:0},{time:n,pos:1}];const r=[t];let i,o,a;for(i=0,o=e.length;i<o;++i)a=e[i],a>t&&a<n&&r.push(a);return r.push(n),r}_getTimestampsForTable(){const e=this;let t=e._cache.all||[];if(t.length)return t;const n=e.getDataTimestamps(),r=e.getLabelTimestamps();return t=n.length&&r.length?e.normalize(n.concat(r)):n.length?n:r,t=e._cache.all=t,t}getPixelForValue(e,t){const n=this,r=n._offsets,i=n._normalized&&n._maxIndex>0&&!uj(t)?t/n._maxIndex:n.getDecimalForValue(e);return n.getPixelForDecimal((r.start+i)*r.factor)}getDecimalForValue(e){return FY(this._table,e)/this._maxIndex}getValueForPixel(e){const t=this,n=t._offsets,r=t.getDecimalForPixel(e)/n.factor-n.end;return FY(t._table,r*this._maxIndex,!0)}}HY.id="timeseries",HY.defaults=BY.defaults;const UY=[NG,PX,mY,Object.freeze({__proto__:null,CategoryScale:vY,LinearScale:_Y,LogarithmicScale:SY,RadialLinearScale:PY,TimeScale:BY,TimeSeriesScale:HY})];nX.register(...UY);var jY=function(){this.__data__=[],this.size=0};var VY=function(e,t){return e===t||e!=e&&t!=t},WY=VY;var GY=function(e,t){for(var n=e.length;n--;)if(WY(e[n][0],t))return n;return-1},qY=GY,XY=Array.prototype.splice;var YY=GY;var $Y=GY;var ZY=GY;var JY=jY,QY=function(e){var t=this.__data__,n=qY(t,e);return!(n<0)&&(n==t.length-1?t.pop():XY.call(t,n,1),--this.size,!0)},KY=function(e){var t=this.__data__,n=YY(t,e);return n<0?void 0:t[n][1]},e$=function(e){return $Y(this.__data__,e)>-1},t$=function(e,t){var n=this.__data__,r=ZY(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function n$(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}n$.prototype.clear=JY,n$.prototype.delete=QY,n$.prototype.get=KY,n$.prototype.has=e$,n$.prototype.set=t$;var r$=n$,i$=r$;var o$=function(){this.__data__=new i$,this.size=0};var a$=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var s$=function(e){return this.__data__.get(e)};var l$=function(e){return this.__data__.has(e)},c$="object"==typeof u&&u&&u.Object===Object&&u,u$=c$,d$="object"==typeof self&&self&&self.Object===Object&&self,h$=u$||d$||Function("return this")(),f$=h$.Symbol,p$=f$,m$=Object.prototype,g$=m$.hasOwnProperty,v$=m$.toString,y$=p$?p$.toStringTag:void 0;var b$=function(e){var t=g$.call(e,y$),n=e[y$];try{e[y$]=void 0;var r=!0}catch(o){}var i=v$.call(e);return r&&(t?e[y$]=n:delete e[y$]),i},x$=Object.prototype.toString;var _$=b$,w$=function(e){return x$.call(e)},S$=f$?f$.toStringTag:void 0;var M$=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":S$&&S$ in Object(e)?_$(e):w$(e)};var E$=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},T$=M$,A$=E$;var C$,k$=function(e){if(!A$(e))return!1;var t=T$(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},P$=h$["__core-js_shared__"],L$=(C$=/[^.]+$/.exec(P$&&P$.keys&&P$.keys.IE_PROTO||""))?"Symbol(src)_1."+C$:"";var R$=function(e){return!!L$&&L$ in e},O$=Function.prototype.toString;var D$=function(e){if(null!=e){try{return O$.call(e)}catch(t){}try{return e+""}catch(t){}}return""},I$=k$,z$=R$,N$=E$,B$=D$,F$=/^\[object .+?Constructor\]$/,H$=Function.prototype,U$=Object.prototype,j$=H$.toString,V$=U$.hasOwnProperty,W$=RegExp("^"+j$.call(V$).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var G$=function(e){return!(!N$(e)||z$(e))&&(I$(e)?W$:F$).test(B$(e))},q$=function(e,t){return null==e?void 0:e[t]};var X$=function(e,t){var n=q$(e,t);return G$(n)?n:void 0},Y$=X$(h$,"Map"),$$=X$(Object,"create"),Z$=$$;var J$=function(){this.__data__=Z$?Z$(null):{},this.size=0};var Q$=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},K$=$$,eZ=Object.prototype.hasOwnProperty;var tZ=function(e){var t=this.__data__;if(K$){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return eZ.call(t,e)?t[e]:void 0},nZ=$$,rZ=Object.prototype.hasOwnProperty;var iZ=$$;var oZ=J$,aZ=Q$,sZ=tZ,lZ=function(e){var t=this.__data__;return nZ?void 0!==t[e]:rZ.call(t,e)},cZ=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=iZ&&void 0===t?"__lodash_hash_undefined__":t,this};function uZ(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}uZ.prototype.clear=oZ,uZ.prototype.delete=aZ,uZ.prototype.get=sZ,uZ.prototype.has=lZ,uZ.prototype.set=cZ;var dZ=uZ,hZ=r$,fZ=Y$;var pZ=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var mZ=function(e,t){var n=e.__data__;return pZ(t)?n["string"==typeof t?"string":"hash"]:n.map},gZ=mZ;var vZ=mZ;var yZ=mZ;var bZ=mZ;var xZ=function(){this.size=0,this.__data__={hash:new dZ,map:new(fZ||hZ),string:new dZ}},_Z=function(e){var t=gZ(this,e).delete(e);return this.size-=t?1:0,t},wZ=function(e){return vZ(this,e).get(e)},SZ=function(e){return yZ(this,e).has(e)},MZ=function(e,t){var n=bZ(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function EZ(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}EZ.prototype.clear=xZ,EZ.prototype.delete=_Z,EZ.prototype.get=wZ,EZ.prototype.has=SZ,EZ.prototype.set=MZ;var TZ=EZ,AZ=r$,CZ=Y$,kZ=TZ;var PZ=r$,LZ=o$,RZ=a$,OZ=s$,DZ=l$,IZ=function(e,t){var n=this.__data__;if(n instanceof AZ){var r=n.__data__;if(!CZ||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new kZ(r)}return n.set(e,t),this.size=n.size,this};function zZ(e){var t=this.__data__=new PZ(e);this.size=t.size}zZ.prototype.clear=LZ,zZ.prototype.delete=RZ,zZ.prototype.get=OZ,zZ.prototype.has=DZ,zZ.prototype.set=IZ;var NZ=zZ,BZ=X$,FZ=function(){try{var e=BZ(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),HZ=FZ;var UZ=function(e,t,n){"__proto__"==t&&HZ?HZ(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},jZ=UZ,VZ=VY;var WZ=function(e,t,n){(void 0!==n&&!VZ(e[t],n)||void 0===n&&!(t in e))&&jZ(e,t,n)};var GZ=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}(),qZ={exports:{}};!function(e,t){var n=h$,r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,o=i&&i.exports===r?n.Buffer:void 0,a=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}}(qZ,qZ.exports);var XZ=h$.Uint8Array,YZ=XZ;var $Z=function(e){var t=new e.constructor(e.byteLength);return new YZ(t).set(new YZ(e)),t};var ZZ=function(e,t){var n=t?$Z(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var JZ=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},QZ=E$,KZ=Object.create,eJ=function(){function e(){}return function(t){if(!QZ(t))return{};if(KZ)return KZ(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var tJ=function(e,t){return function(n){return e(t(n))}},nJ=tJ(Object.getPrototypeOf,Object),rJ=Object.prototype;var iJ=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||rJ)},oJ=eJ,aJ=nJ,sJ=iJ;var lJ=function(e){return"function"!=typeof e.constructor||sJ(e)?{}:oJ(aJ(e))};var cJ=function(e){return null!=e&&"object"==typeof e},uJ=M$,dJ=cJ;var hJ=function(e){return dJ(e)&&"[object Arguments]"==uJ(e)},fJ=cJ,pJ=Object.prototype,mJ=pJ.hasOwnProperty,gJ=pJ.propertyIsEnumerable,vJ=hJ(function(){return arguments}())?hJ:function(e){return fJ(e)&&mJ.call(e,"callee")&&!gJ.call(e,"callee")},yJ=Array.isArray;var bJ=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},xJ=k$,_J=bJ;var wJ=function(e){return null!=e&&_J(e.length)&&!xJ(e)},SJ=wJ,MJ=cJ;var EJ=function(e){return MJ(e)&&SJ(e)},TJ={exports:{}};var AJ=function(){return!1};!function(e,t){var n=h$,r=AJ,i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;e.exports=s}(TJ,TJ.exports);var CJ=M$,kJ=nJ,PJ=cJ,LJ=Function.prototype,RJ=Object.prototype,OJ=LJ.toString,DJ=RJ.hasOwnProperty,IJ=OJ.call(Object);var zJ=function(e){if(!PJ(e)||"[object Object]"!=CJ(e))return!1;var t=kJ(e);if(null===t)return!0;var n=DJ.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&OJ.call(n)==IJ},NJ=M$,BJ=bJ,FJ=cJ,HJ={};HJ["[object Float32Array]"]=HJ["[object Float64Array]"]=HJ["[object Int8Array]"]=HJ["[object Int16Array]"]=HJ["[object Int32Array]"]=HJ["[object Uint8Array]"]=HJ["[object Uint8ClampedArray]"]=HJ["[object Uint16Array]"]=HJ["[object Uint32Array]"]=!0,HJ["[object Arguments]"]=HJ["[object Array]"]=HJ["[object ArrayBuffer]"]=HJ["[object Boolean]"]=HJ["[object DataView]"]=HJ["[object Date]"]=HJ["[object Error]"]=HJ["[object Function]"]=HJ["[object Map]"]=HJ["[object Number]"]=HJ["[object Object]"]=HJ["[object RegExp]"]=HJ["[object Set]"]=HJ["[object String]"]=HJ["[object WeakMap]"]=!1;var UJ=function(e){return FJ(e)&&BJ(e.length)&&!!HJ[NJ(e)]};var jJ=function(e){return function(t){return e(t)}},VJ={exports:{}};!function(e,t){var n=c$,r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,o=i&&i.exports===r&&n.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(t){}}();e.exports=a}(VJ,VJ.exports);var WJ=UJ,GJ=jJ,qJ=VJ.exports,XJ=qJ&&qJ.isTypedArray,YJ=XJ?GJ(XJ):WJ;var $J=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},ZJ=UZ,JJ=VY,QJ=Object.prototype.hasOwnProperty;var KJ=function(e,t,n){var r=e[t];QJ.call(e,t)&&JJ(r,n)&&(void 0!==n||t in e)||ZJ(e,t,n)},eQ=KJ,tQ=UZ;var nQ=function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?tQ(n,s,l):eQ(n,s,l)}return n};var rQ=/^(?:0|[1-9]\d*)$/;var iQ=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&rQ.test(e))&&e>-1&&e%1==0&&e<t},oQ=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},aQ=vJ,sQ=yJ,lQ=TJ.exports,cQ=iQ,uQ=YJ,dQ=Object.prototype.hasOwnProperty;var hQ=function(e,t){var n=sQ(e),r=!n&&aQ(e),i=!n&&!r&&lQ(e),o=!n&&!r&&!i&&uQ(e),a=n||r||i||o,s=a?oQ(e.length,String):[],l=s.length;for(var c in e)!t&&!dQ.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||cQ(c,l))||s.push(c);return s};var fQ=E$,pQ=iJ,mQ=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},gQ=Object.prototype.hasOwnProperty;var vQ=hQ,yQ=function(e){if(!fQ(e))return mQ(e);var t=pQ(e),n=[];for(var r in e)("constructor"!=r||!t&&gQ.call(e,r))&&n.push(r);return n},bQ=wJ;var xQ=function(e){return bQ(e)?vQ(e,!0):yQ(e)},_Q=nQ,wQ=xQ;var SQ=WZ,MQ=qZ.exports,EQ=ZZ,TQ=JZ,AQ=lJ,CQ=vJ,kQ=yJ,PQ=EJ,LQ=TJ.exports,RQ=k$,OQ=E$,DQ=zJ,IQ=YJ,zQ=$J,NQ=function(e){return _Q(e,wQ(e))};var BQ=NZ,FQ=WZ,HQ=GZ,UQ=function(e,t,n,r,i,o,a){var s=zQ(e,n),l=zQ(t,n),c=a.get(l);if(c)SQ(e,n,c);else{var u=o?o(s,l,n+"",e,t,a):void 0,d=void 0===u;if(d){var h=kQ(l),f=!h&&LQ(l),p=!h&&!f&&IQ(l);u=l,h||f||p?kQ(s)?u=s:PQ(s)?u=TQ(s):f?(d=!1,u=MQ(l,!0)):p?(d=!1,u=EQ(l,!0)):u=[]:DQ(l)||CQ(l)?(u=s,CQ(s)?u=NQ(s):OQ(s)&&!RQ(s)||(u=AQ(l))):d=!1}d&&(a.set(l,u),i(u,l,r,o,a),a.delete(l)),SQ(e,n,u)}},jQ=E$,VQ=xQ,WQ=$J;var GQ=function e(t,n,r,i,o){t!==n&&HQ(n,(function(a,s){if(o||(o=new BQ),jQ(a))UQ(t,n,s,r,e,i,o);else{var l=i?i(WQ(t,s),a,s+"",t,n,o):void 0;void 0===l&&(l=a),FQ(t,s,l)}}),VQ)};var qQ=function(e){return e};var XQ=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},YQ=Math.max;var $Q=function(e,t,n){return t=YQ(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=YQ(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),XQ(e,this,s)}};var ZQ=function(e){return function(){return e}},JQ=FZ,QQ=JQ?function(e,t){return JQ(e,"toString",{configurable:!0,enumerable:!1,value:ZQ(t),writable:!0})}:qQ,KQ=Date.now;var eK=function(e){var t=0,n=0;return function(){var r=KQ(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(QQ),tK=qQ,nK=$Q,rK=eK;var iK=VY,oK=wJ,aK=iQ,sK=E$;var lK=function(e,t){return rK(nK(e,t,tK),e+"")},cK=function(e,t,n){if(!sK(n))return!1;var r=typeof t;return!!("number"==r?oK(n)&&aK(t,n.length):"string"==r&&t in n)&&iK(n[t],e)};var uK=function(e){return lK((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&cK(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t}))},dK=GQ,hK=uK((function(e,t,n){dK(e,t,n)})),fK=tJ(Object.keys,Object),pK=iJ,mK=fK,gK=Object.prototype.hasOwnProperty;var vK=hQ,yK=function(e){if(!pK(e))return mK(e);var t=[];for(var n in Object(e))gK.call(e,n)&&"constructor"!=n&&t.push(n);return t},bK=wJ;var xK=function(e){return bK(e)?vK(e):yK(e)},_K=KJ,wK=nQ,SK=uK,MK=wJ,EK=iJ,TK=xK,AK=Object.prototype.hasOwnProperty,CK=SK((function(e,t){if(EK(t)||MK(t))wK(t,TK(t),e);else for(var n in t)AK.call(t,n)&&_K(e,n,t[n])}));var kK=TZ,PK=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},LK=function(e){return this.__data__.has(e)};function RK(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new kK;++t<n;)this.add(e[t])}RK.prototype.add=RK.prototype.push=PK,RK.prototype.has=LK;var OK=RK,DK=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},IK=function(e,t){return e.has(t)};var zK=function(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=2&n?new OK:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var p=e[d],m=t[d];if(r)var g=a?r(m,p,d,t,e,o):r(p,m,d,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!DK(t,(function(e,t){if(!IK(f,t)&&(p===e||i(p,e,n,r,o)))return f.push(t)}))){h=!1;break}}else if(p!==m&&!i(p,m,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h};var NK=XZ,BK=VY,FK=zK,HK=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},UK=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},jK=f$?f$.prototype:void 0,VK=jK?jK.valueOf:void 0;var WK=function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new NK(e),new NK(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return BK(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=HK;case"[object Set]":var l=1&r;if(s||(s=UK),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=FK(s(e),s(t),r,i,o,a);return a.delete(e),u;case"[object Symbol]":if(VK)return VK.call(e)==VK.call(t)}return!1};var GK=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},qK=yJ;var XK=function(e,t,n){var r=t(e);return qK(e)?r:GK(r,n(e))};var YK=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o},$K=function(){return[]},ZK=Object.prototype.propertyIsEnumerable,JK=Object.getOwnPropertySymbols,QK=XK,KK=JK?function(e){return null==e?[]:(e=Object(e),YK(JK(e),(function(t){return ZK.call(e,t)})))}:$K,e0=xK;var t0=function(e){return QK(e,e0,KK)},n0=Object.prototype.hasOwnProperty;var r0=function(e,t,n,r,i,o){var a=1&n,s=t0(e),l=s.length;if(l!=t0(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:n0.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=a?r(g,m,u,t,e,o):r(m,g,u,e,t,o);if(!(void 0===v?m===g||i(m,g,n,r,o):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(e),o.delete(t),f},i0=X$(h$,"DataView"),o0=Y$,a0=X$(h$,"Promise"),s0=X$(h$,"Set"),l0=X$(h$,"WeakMap"),c0=M$,u0=D$,d0=u0(i0),h0=u0(o0),f0=u0(a0),p0=u0(s0),m0=u0(l0),g0=c0;(i0&&"[object DataView]"!=g0(new i0(new ArrayBuffer(1)))||o0&&"[object Map]"!=g0(new o0)||a0&&"[object Promise]"!=g0(a0.resolve())||s0&&"[object Set]"!=g0(new s0)||l0&&"[object WeakMap]"!=g0(new l0))&&(g0=function(e){var t=c0(e),n="[object Object]"==t?e.constructor:void 0,r=n?u0(n):"";if(r)switch(r){case d0:return"[object DataView]";case h0:return"[object Map]";case f0:return"[object Promise]";case p0:return"[object Set]";case m0:return"[object WeakMap]"}return t});var v0=NZ,y0=zK,b0=WK,x0=r0,_0=g0,w0=yJ,S0=TJ.exports,M0=YJ,E0="[object Object]",T0=Object.prototype.hasOwnProperty;var A0=function(e,t,n,r,i,o){var a=w0(e),s=w0(t),l=a?"[object Array]":_0(e),c=s?"[object Array]":_0(t),u=(l="[object Arguments]"==l?E0:l)==E0,d=(c="[object Arguments]"==c?E0:c)==E0,h=l==c;if(h&&S0(e)){if(!S0(t))return!1;a=!0,u=!1}if(h&&!u)return o||(o=new v0),a||M0(e)?y0(e,t,n,r,i,o):b0(e,t,l,n,r,i,o);if(!(1&n)){var f=u&&T0.call(e,"__wrapped__"),p=d&&T0.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,g=p?t.value():t;return o||(o=new v0),i(m,g,n,r,o)}}return!!h&&(o||(o=new v0),x0(e,t,n,r,i,o))},C0=cJ;var k0=function e(t,n,r,i,o){return t===n||(null==t||null==n||!C0(t)&&!C0(n)?t!=t&&n!=n:A0(t,n,r,i,e,o))},P0=NZ,L0=k0;var R0=E$;var O0=function(e){return e==e&&!R0(e)},D0=O0,I0=xK;var z0=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},N0=function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new P0;if(r)var h=r(c,u,l,e,t,d);if(!(void 0===h?L0(u,c,3,r,d):h))return!1}}return!0},B0=function(e){for(var t=I0(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,D0(i)]}return t},F0=z0;var H0=function(e){var t=B0(e);return 1==t.length&&t[0][2]?F0(t[0][0],t[0][1]):function(n){return n===e||N0(n,e,t)}},U0=M$,j0=cJ;var V0=function(e){return"symbol"==typeof e||j0(e)&&"[object Symbol]"==U0(e)},W0=yJ,G0=V0,q0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X0=/^\w*$/;var Y0=function(e,t){if(W0(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!G0(e))||(X0.test(e)||!q0.test(e)||null!=t&&e in Object(t))},$0=TZ;function Z0(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Z0.Cache||$0),n}Z0.Cache=$0;var J0=Z0;var Q0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K0=/\\(\\)?/g,e1=function(e){var t=J0(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q0,(function(e,n,r,i){t.push(r?i.replace(K0,"$1"):n||e)})),t}));var t1=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},n1=yJ,r1=V0,i1=f$?f$.prototype:void 0,o1=i1?i1.toString:void 0;var a1=function e(t){if("string"==typeof t)return t;if(n1(t))return t1(t,e)+"";if(r1(t))return o1?o1.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n};var s1=yJ,l1=Y0,c1=e1,u1=function(e){return null==e?"":a1(e)};var d1=function(e,t){return s1(e)?e:l1(e,t)?[e]:c1(u1(e))},h1=V0;var f1=function(e){if("string"==typeof e||h1(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},p1=d1,m1=f1;var g1=function(e,t){for(var n=0,r=(t=p1(t,e)).length;null!=e&&n<r;)e=e[m1(t[n++])];return n&&n==r?e:void 0},v1=g1;var y1=d1,b1=vJ,x1=yJ,_1=iQ,w1=bJ,S1=f1;var M1=function(e,t){return null!=e&&t in Object(e)},E1=function(e,t,n){for(var r=-1,i=(t=y1(t,e)).length,o=!1;++r<i;){var a=S1(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&w1(i)&&_1(a,i)&&(x1(e)||b1(e))};var T1=k0,A1=function(e,t,n){var r=null==e?void 0:v1(e,t);return void 0===r?n:r},C1=function(e,t){return null!=e&&E1(e,t,M1)},k1=Y0,P1=O0,L1=z0,R1=f1;var O1=g1;var D1=function(e){return function(t){return null==t?void 0:t[e]}},I1=function(e){return function(t){return O1(t,e)}},z1=Y0,N1=f1;var B1=H0,F1=function(e,t){return k1(e)&&P1(t)?L1(R1(e),t):function(n){var r=A1(n,e);return void 0===r&&r===t?C1(n,e):T1(t,r,3)}},H1=qQ,U1=yJ,j1=function(e){return z1(e)?D1(N1(e)):I1(e)};var V1=function(e){return"function"==typeof e?e:null==e?H1:"object"==typeof e?U1(e)?F1(e[0],e[1]):B1(e):j1(e)},W1=V1,G1=wJ,q1=xK;var X1=function(e){return function(t,n,r){var i=Object(t);if(!G1(t)){var o=W1(n);t=q1(t),n=function(e){return o(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]:void 0}};var Y1=/\s/;var $1=function(e){for(var t=e.length;t--&&Y1.test(e.charAt(t)););return t},Z1=/^\s+/;var J1=function(e){return e?e.slice(0,$1(e)+1).replace(Z1,""):e},Q1=E$,K1=V0,e2=/^[-+]0x[0-9a-f]+$/i,t2=/^0b[01]+$/i,n2=/^0o[0-7]+$/i,r2=parseInt;var i2=function(e){if("number"==typeof e)return e;if(K1(e))return NaN;if(Q1(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Q1(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=J1(e);var n=t2.test(e);return n||n2.test(e)?r2(e.slice(2),n?2:8):e2.test(e)?NaN:+e};var o2=function(e){return e?Infinity===(e=i2(e))||-Infinity===e?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var a2=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1},s2=V1,l2=function(e){var t=o2(e),n=t%1;return t==t?n?t-n:t:0},c2=Math.max;var u2=X1((function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:l2(n);return i<0&&(i=c2(r+i,0)),a2(e,s2(t),i)}));function d2(){return(d2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h2(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var f2=h.exports.forwardRef((function(e,t){var n=e.id,r=e.className,i=e.height,o=void 0===i?150:i,a=e.width,s=void 0===a?300:a,l=e.redraw,c=void 0!==l&&l,u=e.type,d=e.data,f=e.options,p=void 0===f?{}:f,m=e.plugins,g=void 0===m?[]:m,v=e.getDatasetAtEvent,y=e.getElementAtEvent,b=e.getElementsAtEvent,x=e.fallbackContent,_=h2(e,["id","className","height","width","redraw","type","data","options","plugins","getDatasetAtEvent","getElementAtEvent","getElementsAtEvent","fallbackContent"]),w=h.exports.useRef(null),S=h.exports.useMemo((function(){return"function"==typeof d?w.current?d(w.current):{}:hK({},d)}),[d,w.current]),M=h.exports.useState(),E=M[0],T=M[1];h.exports.useImperativeHandle(t,(function(){return E}),[E]);var A=function(){w.current&&T(new nX(w.current,{type:u,data:S,options:p,plugins:g}))},C=function(){E&&E.destroy()};return h.exports.useEffect((function(){return A(),function(){return C()}}),[]),h.exports.useEffect((function(){c?(C(),setTimeout((function(){A()}),0)):function(){if(E){if(p&&(E.options=d2({},p)),!E.config.data)return E.config.data=S,void E.update();var e=S.datasets,t=void 0===e?[]:e,n=h2(S,["datasets"]),r=E.config.data.datasets,i=void 0===r?[]:r;CK(E.config.data,n),E.config.data.datasets=t.map((function(e){var t=u2(i,(function(t){return t.label===e.label&&t.type===e.type}));return t&&e.data?(t.data?t.data.length=e.data.length:t.data=[],CK(t.data,e.data),d2({},t,e,{data:t.data})):e})),E.update()}}()}),[e,S]),$.createElement("canvas",Object.assign({},_,{height:o,width:s,ref:w,id:n,className:r,onClick:function(e){E&&(v&&v(E.getElementsAtEventForMode(e,"dataset",{intersect:!0},!1),e),y&&y(E.getElementsAtEventForMode(e,"nearest",{intersect:!0},!1),e),b&&b(E.getElementsAtEventForMode(e,"index",{intersect:!0},!1),e))},"data-testid":"canvas",role:"img"}),x)})),p2=h.exports.forwardRef((function(e,t){return $.createElement(f2,Object.assign({},e,{type:"line",ref:t,options:e.options||{}}))}));h.exports.forwardRef((function(e,t){return $.createElement(f2,Object.assign({},e,{type:"bar",ref:t,options:e.options||{}}))})),h.exports.forwardRef((function(e,t){return $.createElement(f2,Object.assign({},e,{type:"radar",ref:t,options:e.options||{}}))})),h.exports.forwardRef((function(e,t){return $.createElement(f2,Object.assign({},e,{type:"doughnut",ref:t,options:e.options||{}}))})),h.exports.forwardRef((function(e,t){return $.createElement(f2,Object.assign({},e,{type:"polarArea",ref:t,options:e.options||{}}))})),h.exports.forwardRef((function(e,t){return $.createElement(f2,Object.assign({},e,{type:"bubble",ref:t,options:e.options||{}}))})),h.exports.forwardRef((function(e,t){return $.createElement(f2,Object.assign({},e,{type:"pie",ref:t,options:e.options||{}}))})),h.exports.forwardRef((function(e,t){return $.createElement(f2,Object.assign({},e,{type:"scatter",ref:t,options:e.options||{}}))}));export{EE as A,nT as B,iT as C,cf as D,cT as E,LT as F,pT as G,ET as H,ZE as I,Ek as J,bP as K,yT as L,WC as M,$U as N,p2 as O,ak as P,xy as Q,$ as R,MT as S,AT as T,aT as U,au as V,PT as W,zE as a,YE as b,tT as c,YC as d,qC as e,$C as f,JC as g,ZC as h,dP as i,vP as j,Dk as k,Rk as l,Lk as m,dk as n,gT as o,LE as p,TE as q,KC as r,DT as s,IT as t,mk as u,BT as v,NT as w,zT as x,FT as y,xT as z};