function C2(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var R0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var h1={exports:{}},hf={},p1={exports:{}},et={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Dc=Symbol.for("react.element"),A2=Symbol.for("react.portal"),R2=Symbol.for("react.fragment"),P2=Symbol.for("react.strict_mode"),D2=Symbol.for("react.profiler"),N2=Symbol.for("react.provider"),L2=Symbol.for("react.context"),I2=Symbol.for("react.forward_ref"),O2=Symbol.for("react.suspense"),U2=Symbol.for("react.memo"),k2=Symbol.for("react.lazy"),Av=Symbol.iterator;function F2(t){return t===null||typeof t!="object"?null:(t=Av&&t[Av]||t["@@iterator"],typeof t=="function"?t:null)}var m1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g1=Object.assign,v1={};function nl(t,e,n){this.props=t,this.context=e,this.refs=v1,this.updater=n||m1}nl.prototype.isReactComponent={};nl.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};nl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function _1(){}_1.prototype=nl.prototype;function P0(t,e,n){this.props=t,this.context=e,this.refs=v1,this.updater=n||m1}var D0=P0.prototype=new _1;D0.constructor=P0;g1(D0,nl.prototype);D0.isPureReactComponent=!0;var Rv=Array.isArray,x1=Object.prototype.hasOwnProperty,N0={current:null},y1={key:!0,ref:!0,__self:!0,__source:!0};function S1(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)x1.call(e,r)&&!y1.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Dc,type:t,key:s,ref:o,props:i,_owner:N0.current}}function z2(t,e){return{$$typeof:Dc,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function L0(t){return typeof t=="object"&&t!==null&&t.$$typeof===Dc}function B2(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Pv=/\/+/g;function oh(t,e){return typeof t=="object"&&t!==null&&t.key!=null?B2(""+t.key):e.toString(36)}function Ku(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Dc:case A2:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+oh(o,0):r,Rv(i)?(n="",t!=null&&(n=t.replace(Pv,"$&/")+"/"),Ku(i,e,n,"",function(c){return c})):i!=null&&(L0(i)&&(i=z2(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Pv,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",Rv(t))for(var a=0;a<t.length;a++){s=t[a];var l=r+oh(s,a);o+=Ku(s,e,n,l,i)}else if(l=F2(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=r+oh(s,a++),o+=Ku(s,e,n,l,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function Zc(t,e,n){if(t==null)return t;var r=[],i=0;return Ku(t,r,"","",function(s){return e.call(n,s,i++)}),r}function V2(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Tn={current:null},Zu={transition:null},H2={ReactCurrentDispatcher:Tn,ReactCurrentBatchConfig:Zu,ReactCurrentOwner:N0};function w1(){throw Error("act(...) is not supported in production builds of React.")}et.Children={map:Zc,forEach:function(t,e,n){Zc(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Zc(t,function(){e++}),e},toArray:function(t){return Zc(t,function(e){return e})||[]},only:function(t){if(!L0(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};et.Component=nl;et.Fragment=R2;et.Profiler=D2;et.PureComponent=P0;et.StrictMode=P2;et.Suspense=O2;et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H2;et.act=w1;et.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=g1({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=N0.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)x1.call(e,l)&&!y1.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Dc,type:t.type,key:i,ref:s,props:r,_owner:o}};et.createContext=function(t){return t={$$typeof:L2,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:N2,_context:t},t.Consumer=t};et.createElement=S1;et.createFactory=function(t){var e=S1.bind(null,t);return e.type=t,e};et.createRef=function(){return{current:null}};et.forwardRef=function(t){return{$$typeof:I2,render:t}};et.isValidElement=L0;et.lazy=function(t){return{$$typeof:k2,_payload:{_status:-1,_result:t},_init:V2}};et.memo=function(t,e){return{$$typeof:U2,type:t,compare:e===void 0?null:e}};et.startTransition=function(t){var e=Zu.transition;Zu.transition={};try{t()}finally{Zu.transition=e}};et.unstable_act=w1;et.useCallback=function(t,e){return Tn.current.useCallback(t,e)};et.useContext=function(t){return Tn.current.useContext(t)};et.useDebugValue=function(){};et.useDeferredValue=function(t){return Tn.current.useDeferredValue(t)};et.useEffect=function(t,e){return Tn.current.useEffect(t,e)};et.useId=function(){return Tn.current.useId()};et.useImperativeHandle=function(t,e,n){return Tn.current.useImperativeHandle(t,e,n)};et.useInsertionEffect=function(t,e){return Tn.current.useInsertionEffect(t,e)};et.useLayoutEffect=function(t,e){return Tn.current.useLayoutEffect(t,e)};et.useMemo=function(t,e){return Tn.current.useMemo(t,e)};et.useReducer=function(t,e,n){return Tn.current.useReducer(t,e,n)};et.useRef=function(t){return Tn.current.useRef(t)};et.useState=function(t){return Tn.current.useState(t)};et.useSyncExternalStore=function(t,e,n){return Tn.current.useSyncExternalStore(t,e,n)};et.useTransition=function(){return Tn.current.useTransition()};et.version="18.3.1";p1.exports=et;var D=p1.exports;const ge=tl(D),G2=C2({__proto__:null,default:ge},[D]);/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var W2=D,$2=Symbol.for("react.element"),j2=Symbol.for("react.fragment"),X2=Object.prototype.hasOwnProperty,Y2=W2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,q2={key:!0,ref:!0,__self:!0,__source:!0};function b1(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)X2.call(e,r)&&!q2.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:$2,type:t,key:s,ref:o,props:i,_owner:Y2.current}}hf.Fragment=j2;hf.jsx=b1;hf.jsxs=b1;h1.exports=hf;var L=h1.exports;if(typeof window<"u"){let t=function(){var e=document.body,n=document.getElementById("__svg__icons__dom__");n||(n=document.createElementNS("http://www.w3.org/2000/svg","svg"),n.style.position="absolute",n.style.width="0",n.style.height="0",n.id="__svg__icons__dom__",n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("xmlns:link","http://www.w3.org/1999/xlink")),n.innerHTML='',e.insertBefore(n,e.lastChild)};var _z=t;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t):t()}var zp={},E1={exports:{}},or={},M1={exports:{}},T1={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(t){function e(A,G){var Y=A.length;A.push(G);e:for(;0>>1,J=A[W];if(0>>1;Wi(Q,Y))lei(he,Q)?(A[W]=he,A[le]=Y,W=le):(A[W]=Q,A[$]=Y,W=$);else if(lei(he,Y))A[W]=he,A[le]=Y,W=le;else break e}}return G}function i(A,G){var Y=A.sortIndex-G.sortIndex;return Y!==0?Y:A.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,h=null,d=3,m=!1,v=!1,p=!1,g=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(A){for(var G=n(c);G!==null;){if(G.callback===null)r(c);else if(G.startTimeG)||A&&!R());){var W=h.callback;if(typeof W=="function"){h.callback=null,d=h.priorityLevel;var J=W(h.expirationTime<=G);G=t.unstable_now(),typeof J=="function"?h.callback=J:h===n(l)&&r(l),_(G)}else r(l);h=n(l)}if(h!==null)var me=!0;else{var $=n(c);$!==null&&F(y,$.startTime-G),me=!1}return me}finally{h=null,d=Y,m=!1}}var M=!1,S=null,b=-1,E=5,w=-1;function R(){return!(t.unstable_now()-w<E)}function z(){if(S!==null){var A=t.unstable_now();w=A;var G=!0;try{G=S(!0,A)}finally{G?H():(M=!1,S=null)}}else M=!1}var H;if(typeof x=="function")H=function(){x(z)};else if(typeof MessageChannelA||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<A?Math.floor(1e3/A):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(A){switch(d){case 1:case 2:case 3:var G=3;break;default:G=d}var Y=d;d=G;try{return A()}finally{d=Y}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(A,G){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var Y=d;d=A;try{return G()}finally{d=Y}},t.unstable_scheduleCallback=function(A,G,Y){var W=t.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0W?(A.sortIndex=Y,e(c,A),n(l)===null&&A===n(c)&&(p?(f(b),b=-1):p=!0,F(y,Y-W))):(A.sortIndex=J,e(l,A),v||m||(v=!0,I(T))),A},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(A){var G=d;return function(){var Y=d;d=G;try{return A.apply(this,arguments)}finally{d=Y}}}})(T1);M1.exports=T1;var K2=M1.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Z2=D,ir=K2;function be(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var C1=new Set,ec={};function Po(t,e){Oa(t,e),Oa(t+"Capture",e)}function Oa(t,e){for(ec[t]=e,t=0;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bp=Object.prototype.hasOwnProperty,J2=/^[: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]*$/,Dv={},Nv={};function Q2(t){return Bp.call(Nv,t)?!0:Bp.call(Dv,t)?!1:J2.test(t)?Nv[t]=!0:(Dv[t]=!0,!1)}function eT(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function tT(t,e,n,r){if(e===null||typeof e>"u"||eT(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Cn(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var on={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){on[t]=new Cn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];on[e]=new Cn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){on[t]=new Cn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){on[t]=new Cn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){on[t]=new Cn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){on[t]=new Cn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){on[t]=new Cn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){on[t]=new Cn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){on[t]=new Cn(t,5,!1,t.toLowerCase(),null,!1,!1)});var I0=/[\-:]([a-z])/g;function O0(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(I0,O0);on[e]=new Cn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(I0,O0);on[e]=new Cn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(I0,O0);on[e]=new Cn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){on[t]=new Cn(t,1,!1,t.toLowerCase(),null,!1,!1)});on.xlinkHref=new Cn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){on[t]=new Cn(t,1,!1,t.toLowerCase(),null,!0,!0)});function U0(t,e,n,r){var i=on.hasOwnProperty(e)?on[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(tT(e,n,i,r)&&(n=null),r||i===null?Q2(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var ki=Z2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Jc=Symbol.for("react.element"),ia=Symbol.for("react.portal"),sa=Symbol.for("react.fragment"),k0=Symbol.for("react.strict_mode"),Vp=Symbol.for("react.profiler"),A1=Symbol.for("react.provider"),R1=Symbol.for("react.context"),F0=Symbol.for("react.forward_ref"),Hp=Symbol.for("react.suspense"),Gp=Symbol.for("react.suspense_list"),z0=Symbol.for("react.memo"),Qi=Symbol.for("react.lazy"),P1=Symbol.for("react.offscreen"),Lv=Symbol.iterator;function hl(t){return t===null||typeof t!="object"?null:(t=Lv&&t[Lv]||t["@@iterator"],typeof t=="function"?t:null)}var Rt=Object.assign,ah;function Dl(t){if(ah===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);ah=e&&e[1]||""}return` `+ah+t}var lh=!1;function ch(t,e){if(!t||lh)return"";lh=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(` `),s=r.stack.split(` `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0a||i[o]!==s[a]){var l=` `+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{lh=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Dl(t):""}function nT(t){switch(t.tag){case 5:return Dl(t.type);case 16:return Dl("Lazy");case 13:return Dl("Suspense");case 19:return Dl("SuspenseList");case 0:case 2:case 15:return t=ch(t.type,!1),t;case 11:return t=ch(t.type.render,!1),t;case 1:return t=ch(t.type,!0),t;default:return""}}function Wp(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case sa:return"Fragment";case ia:return"Portal";case Vp:return"Profiler";case k0:return"StrictMode";case Hp:return"Suspense";case Gp:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case R1:return(t.displayName||"Context")+".Consumer";case A1:return(t._context.displayName||"Context")+".Provider";case F0:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case z0:return e=t.displayName||null,e!==null?e:Wp(t.type)||"Memo";case Qi:e=t._payload,t=t._init;try{return Wp(t(e))}catch{}}return null}function rT(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Wp(e);case 8:return e===k0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Es(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function D1(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function iT(t){var e=D1(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Qc(t){t._valueTracker||(t._valueTracker=iT(t))}function N1(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=D1(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function _d(t){if(t=t||(typeof document"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function $p(t,e){var n=e.checked;return Rt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Iv(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Es(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function L1(t,e){e=e.checked,e!=null&&U0(t,"checked",e,!1)}function jp(t,e){L1(t,e);var n=Es(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Xp(t,e.type,n):e.hasOwnProperty("defaultValue")&&Xp(t,e.type,Es(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Ov(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Xp(t,e,n){(e!=="number"||_d(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Nl=Array.isArray;function ya(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Es(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Yp(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(be(91));return Rt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Uv(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(be(92));if(Nl(n)){if(1<n.length)throw Error(be(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Es(n)}}function I1(t,e){var n=Es(e.value),r=Es(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function kv(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function O1(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function qp(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?O1(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var eu,U1=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(eu=eu||document.createElement("div"),eu.innerHTML=""+e.valueOf().toString()+"",e=eu.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function tc(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var zl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sT=["Webkit","ms","Moz","O"];Object.keys(zl).forEach(function(t){sT.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),zl[e]=zl[t]})});function k1(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||zl.hasOwnProperty(t)&&zl[t]?(""+e).trim():e+"px"}function F1(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=k1(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var oT=Rt({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 Kp(t,e){if(e){if(oT[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(be(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(be(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(be(61))}if(e.style!=null&&typeof e.style!="object")throw Error(be(62))}}function Zp(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jp=null;function B0(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Qp=null,Sa=null,wa=null;function Fv(t){if(t=Ic(t)){if(typeof Qp!="function")throw Error(be(280));var e=t.stateNode;e&&(e=_f(e),Qp(t.stateNode,t.type,e))}}function z1(t){Sa?wa?wa.push(t):wa=[t]:Sa=t}function B1(){if(Sa){var t=Sa,e=wa;if(wa=Sa=null,Fv(t),e)for(t=0;t>>=0,t===0?32:31-(vT(t)/_T|0)|0}var tu=64,nu=4194304;function Ll(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function wd(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Ll(a):(s&=o,s!==0&&(r=Ll(s)))}else o=n&~i,o!==0?r=Ll(o):s!==0&&(r=Ll(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Fr(e),i=1<<n,r|=t[n],e&=~i;return r}function yT(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ST(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Fr(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=yT(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function nm(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function K1(){var t=tu;return tu<n;n++)e.push(t);return e}function Nc(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Fr(e),t[e]=n}function wT(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Fr(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function H0(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Fr(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var lt=0;function Z1(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var J1,G0,Q1,eS,tS,rm=!1,ru=[],ds=null,fs=null,hs=null,rc=new Map,ic=new Map,ts=[],bT="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 Vv(t,e){switch(t){case"focusin":case"focusout":ds=null;break;case"dragenter":case"dragleave":fs=null;break;case"mouseover":case"mouseout":hs=null;break;case"pointerover":case"pointerout":rc.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ic.delete(e.pointerId)}}function ml(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=Ic(e),e!==null&&G0(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function ET(t,e,n,r,i){switch(e){case"focusin":return ds=ml(ds,t,e,n,r,i),!0;case"dragenter":return fs=ml(fs,t,e,n,r,i),!0;case"mouseover":return hs=ml(hs,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return rc.set(s,ml(rc.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,ic.set(s,ml(ic.get(s)||null,t,e,n,r,i)),!0}return!1}function nS(t){var e=to(t.target);if(e!==null){var n=Do(e);if(n!==null){if(e=n.tag,e===13){if(e=W1(n),e!==null){t.blockedOn=e,tS(t.priority,function(){Q1(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ju(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=im(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Jp=r,n.target.dispatchEvent(r),Jp=null}else return e=Ic(n),e!==null&&G0(e),t.blockedOn=n,!1;e.shift()}return!0}function Hv(t,e,n){Ju(t)&&n.delete(e)}function MT(){rm=!1,ds!==null&&Ju(ds)&&(ds=null),fs!==null&&Ju(fs)&&(fs=null),hs!==null&&Ju(hs)&&(hs=null),rc.forEach(Hv),ic.forEach(Hv)}function gl(t,e){t.blockedOn===e&&(t.blockedOn=null,rm||(rm=!0,ir.unstable_scheduleCallback(ir.unstable_NormalPriority,MT)))}function sc(t){function e(i){return gl(i,t)}if(0<ru.length){gl(ru[0],t);for(var n=1;n<ru.length;n++){var r=ru[n];r.blockedOn===t&&(r.blockedOn=null)}}for(ds!==null&&gl(ds,t),fs!==null&&gl(fs,t),hs!==null&&gl(hs,t),rc.forEach(e),ic.forEach(e),n=0;n<ts.length;n++)r=ts[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<ts.length&&(n=ts[0],n.blockedOn===null);)nS(n),n.blockedOn===null&&ts.shift()}var ba=ki.ReactCurrentBatchConfig,bd=!0;function TT(t,e,n,r){var i=lt,s=ba.transition;ba.transition=null;try{lt=1,W0(t,e,n,r)}finally{lt=i,ba.transition=s}}function CT(t,e,n,r){var i=lt,s=ba.transition;ba.transition=null;try{lt=4,W0(t,e,n,r)}finally{lt=i,ba.transition=s}}function W0(t,e,n,r){if(bd){var i=im(t,e,n,r);if(i===null)Sh(t,e,r,Ed,n),Vv(t,r);else if(ET(i,t,e,n,r))r.stopPropagation();else if(Vv(t,r),e&4&&-1<bT.indexOf(t)){for(;i!==null;){var s=Ic(i);if(s!==null&&J1(s),s=im(t,e,n,r),s===null&&Sh(t,e,r,Ed,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Sh(t,e,r,null,n)}}var Ed=null;function im(t,e,n,r){if(Ed=null,t=B0(r),t=to(t),t!==null)if(e=Do(t),e===null)t=null;else if(n=e.tag,n===13){if(t=W1(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Ed=t,null}function rS(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(pT()){case V0:return 1;case Y1:return 4;case Sd:case mT:return 16;case q1:return 536870912;default:return 16}default:return 16}}var is=null,$0=null,Qu=null;function iS(){if(Qu)return Qu;var t,e=$0,n=e.length,r,i="value"in is?is.value:is.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return Qu=i.slice(t,1<r?1-r:void 0)}function ed(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function iu(){return!0}function Gv(){return!1}function ar(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?iu:Gv,this.isPropagationStopped=Gv,this}return Rt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=iu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=iu)},persist:function(){},isPersistent:iu}),e}var rl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},j0=ar(rl),Lc=Rt({},rl,{view:0,detail:0}),AT=ar(Lc),fh,hh,vl,mf=Rt({},Lc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:X0,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==vl&&(vl&&t.type==="mousemove"?(fh=t.screenX-vl.screenX,hh=t.screenY-vl.screenY):hh=fh=0,vl=t),fh)},movementY:function(t){return"movementY"in t?t.movementY:hh}}),Wv=ar(mf),RT=Rt({},mf,{dataTransfer:0}),PT=ar(RT),DT=Rt({},Lc,{relatedTarget:0}),ph=ar(DT),NT=Rt({},rl,{animationName:0,elapsedTime:0,pseudoElement:0}),LT=ar(NT),IT=Rt({},rl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),OT=ar(IT),UT=Rt({},rl,{data:0}),$v=ar(UT),kT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},FT={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"},zT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function BT(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=zT[t])?!!e[t]:!1}function X0(){return BT}var VT=Rt({},Lc,{key:function(t){if(t.key){var e=kT[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=ed(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?FT[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:X0,charCode:function(t){return t.type==="keypress"?ed(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ed(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),HT=ar(VT),GT=Rt({},mf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jv=ar(GT),WT=Rt({},Lc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:X0}),$T=ar(WT),jT=Rt({},rl,{propertyName:0,elapsedTime:0,pseudoElement:0}),XT=ar(jT),YT=Rt({},mf,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),qT=ar(YT),KT=[9,13,27,32],Y0=Ai&&"CompositionEvent"in window,Vl=null;Ai&&"documentMode"in document&&(Vl=document.documentMode);var ZT=Ai&&"TextEvent"in window&&!Vl,sS=Ai&&(!Y0||Vl&&8=Vl),Xv=" ",Yv=!1;function oS(t,e){switch(t){case"keyup":return KT.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aS(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var oa=!1;function JT(t,e){switch(t){case"compositionend":return aS(e);case"keypress":return e.which!==32?null:(Yv=!0,Xv);case"textInput":return t=e.data,t===Xv&&Yv?null:t;default:return null}}function QT(t,e){if(oa)return t==="compositionend"||!Y0&&oS(t,e)?(t=iS(),Qu=$0=is=null,oa=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return sS&&e.locale!=="ko"?null:e.data;default:return null}}var eC={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 qv(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!eC[t.type]:e==="textarea"}function lS(t,e,n,r){z1(r),e=Md(e,"onChange"),0<e.length&&(n=new j0("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Hl=null,oc=null;function tC(t){xS(t,0)}function gf(t){var e=ca(t);if(N1(e))return t}function nC(t,e){if(t==="change")return e}var cS=!1;if(Ai){var mh;if(Ai){var gh="oninput"in document;if(!gh){var Kv=document.createElement("div");Kv.setAttribute("oninput","return;"),gh=typeof Kv.oninput=="function"}mh=gh}else mh=!1;cS=mh&&(!document.documentMode||9<document.documentMode)}function Zv(){Hl&&(Hl.detachEvent("onpropertychange",uS),oc=Hl=null)}function uS(t){if(t.propertyName==="value"&&gf(oc)){var e=[];lS(e,oc,t,B0(t)),G1(tC,e)}}function rC(t,e,n){t==="focusin"?(Zv(),Hl=e,oc=n,Hl.attachEvent("onpropertychange",uS)):t==="focusout"&&Zv()}function iC(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return gf(oc)}function sC(t,e){if(t==="click")return gf(e)}function oC(t,e){if(t==="input"||t==="change")return gf(e)}function aC(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Hr=typeof Object.is=="function"?Object.is:aC;function ac(t,e){if(Hr(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Bp.call(e,i)||!Hr(t[i],e[i]))return!1}return!0}function Jv(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Qv(t,e){var n=Jv(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Jv(n)}}function dS(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?dS(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function fS(){for(var t=window,e=_d();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=_d(t.document)}return e}function q0(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function lC(t){var e=fS(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&dS(n.ownerDocument.documentElement,n)){if(r!==null&&q0(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=Qv(n,s);var o=Qv(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,aa=null,sm=null,Gl=null,om=!1;function e_(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;om||aa==null||aa!==_d(r)||(r=aa,"selectionStart"in r&&q0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gl&&ac(Gl,r)||(Gl=r,r=Md(sm,"onSelect"),0<r.length&&(e=new j0("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=aa)))}function su(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var la={animationend:su("Animation","AnimationEnd"),animationiteration:su("Animation","AnimationIteration"),animationstart:su("Animation","AnimationStart"),transitionend:su("Transition","TransitionEnd")},vh={},hS={};Ai&&(hS=document.createElement("div").style,"AnimationEvent"in window||(delete la.animationend.animation,delete la.animationiteration.animation,delete la.animationstart.animation),"TransitionEvent"in window||delete la.transitionend.transition);function vf(t){if(vh[t])return vh[t];if(!la[t])return t;var e=la[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in hS)return vh[t]=e[n];return t}var pS=vf("animationend"),mS=vf("animationiteration"),gS=vf("animationstart"),vS=vf("transitionend"),_S=new Map,t_="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ps(t,e){_S.set(t,e),Po(e,[t])}for(var _h=0;_h<t_.length;_h++){var xh=t_[_h],uC=xh.toLowerCase(),dC=xh[0].toUpperCase()+xh.slice(1);Ps(uC,"on"+dC)}Ps(pS,"onAnimationEnd");Ps(mS,"onAnimationIteration");Ps(gS,"onAnimationStart");Ps("dblclick","onDoubleClick");Ps("focusin","onFocus");Ps("focusout","onBlur");Ps(vS,"onTransitionEnd");Oa("onMouseEnter",["mouseout","mouseover"]);Oa("onMouseLeave",["mouseout","mouseover"]);Oa("onPointerEnter",["pointerout","pointerover"]);Oa("onPointerLeave",["pointerout","pointerover"]);Po("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Po("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Po("onBeforeInput",["compositionend","keypress","textInput","paste"]);Po("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Po("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Po("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Il="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),fC=new Set("cancel close invalid load scroll toggle".split(" ").concat(Il));function n_(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,uT(r,e,void 0,t),t.currentTarget=null}function xS(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;n_(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;n_(i,a,c),s=l}}}if(yd)throw t=tm,yd=!1,tm=null,t}function _t(t,e){var n=e[dm];n===void 0&&(n=e[dm]=new Set);var r=t+"__bubble";n.has(r)||(yS(e,t,2,!1),n.add(r))}function yh(t,e,n){var r=0;e&&(r|=4),yS(n,t,r,e)}var ou="_reactListening"+Math.random().toString(36).slice(2);function lc(t){if(!t[ou]){t[ou]=!0,C1.forEach(function(n){n!=="selectionchange"&&(fC.has(n)||yh(n,!1,t),yh(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[ou]||(e[ou]=!0,yh("selectionchange",!1,e))}}function yS(t,e,n,r){switch(rS(e)){case 1:var i=TT;break;case 4:i=CT;break;default:i=W0}n=i.bind(null,e,n,t),i=void 0,!em||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function Sh(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=to(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}G1(function(){var c=s,u=B0(n),h=[];e:{var d=_S.get(t);if(d!==void 0){var m=j0,v=t;switch(t){case"keypress":if(ed(n)===0)break e;case"keydown":case"keyup":m=HT;break;case"focusin":v="focus",m=ph;break;case"focusout":v="blur",m=ph;break;case"beforeblur":case"afterblur":m=ph;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Wv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=PT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=$T;break;case pS:case mS:case gS:m=LT;break;case vS:m=XT;break;case"scroll":m=AT;break;case"wheel":m=qT;break;case"copy":case"cut":case"paste":m=OT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=jv}var p=(e&4)!==0,g=!p&&t==="scroll",f=p?d!==null?d+"Capture":null:d;p=[];for(var x=c,_;x!==null;){_=x;var y=_.stateNode;if(_.tag===5&&y!==null&&(_=y,f!==null&&(y=nc(x,f),y!=null&&p.push(cc(x,y,_)))),g)break;x=x.return}0<p.length&&(d=new m(d,v,null,n,u),h.push({event:d,listeners:p}))}}if(!(e&7)){e:{if(d=t==="mouseover"||t==="pointerover",m=t==="mouseout"||t==="pointerout",d&&n!==Jp&&(v=n.relatedTarget||n.fromElement)&&(to(v)||v[Ri]))break e;if((m||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,m?(v=n.relatedTarget||n.toElement,m=c,v=v?to(v):null,v!==null&&(g=Do(v),v!==g||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=c),m!==v)){if(p=Wv,y="onMouseLeave",f="onMouseEnter",x="mouse",(t==="pointerout"||t==="pointerover")&&(p=jv,y="onPointerLeave",f="onPointerEnter",x="pointer"),g=m==null?d:ca(m),_=v==null?d:ca(v),d=new p(y,x+"leave",m,n,u),d.target=g,d.relatedTarget=_,y=null,to(u)===c&&(p=new p(f,x+"enter",v,n,u),p.target=_,p.relatedTarget=g,y=p),g=y,m&&v)t:{for(p=m,f=v,x=0,_=p;_;_=Io(_))x++;for(_=0,y=f;y;y=Io(y))_++;for(;0<x-_;)p=Io(p),x--;for(;0<_-x;)f=Io(f),_--;for(;x--;){if(p===f||f!==null&&p===f.alternate)break t;p=Io(p),f=Io(f)}p=null}else p=null;m!==null&&r_(h,d,m,p,!1),v!==null&&g!==null&&r_(h,g,v,p,!0)}}e:{if(d=c?ca(c):window,m=d.nodeName&&d.nodeName.toLowerCase(),m==="select"||m==="input"&&d.type==="file")var T=nC;else if(qv(d))if(cS)T=oC;else{T=iC;var M=rC}else(m=d.nodeName)&&m.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=sC);if(T&&(T=T(t,c))){lS(h,T,n,u);break e}M&&M(t,d,c),t==="focusout"&&(M=d._wrapperState)&&M.controlled&&d.type==="number"&&Xp(d,"number",d.value)}switch(M=c?ca(c):window,t){case"focusin":(qv(M)||M.contentEditable==="true")&&(aa=M,sm=c,Gl=null);break;case"focusout":Gl=sm=aa=null;break;case"mousedown":om=!0;break;case"contextmenu":case"mouseup":case"dragend":om=!1,e_(h,n,u);break;case"selectionchange":if(cC)break;case"keydown":case"keyup":e_(h,n,u)}var S;if(Y0)e:{switch(t){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else oa?oS(t,n)&&(b="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(b="onCompositionStart");b&&(sS&&n.locale!=="ko"&&(oa||b!=="onCompositionStart"?b==="onCompositionEnd"&&oa&&(S=iS()):(is=u,$0="value"in is?is.value:is.textContent,oa=!0)),M=Md(c,b),0<M.length&&(b=new $v(b,t,null,n,u),h.push({event:b,listeners:M}),S?b.data=S:(S=aS(n),S!==null&&(b.data=S)))),(S=ZT?JT(t,n):QT(t,n))&&(c=Md(c,"onBeforeInput"),0<c.length&&(u=new $v("onBeforeInput","beforeinput",null,n,u),h.push({event:u,listeners:c}),u.data=S))}xS(h,e)})}function cc(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Md(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=nc(t,n),s!=null&&r.unshift(cc(t,s,i)),s=nc(t,e),s!=null&&r.push(cc(t,s,i))),t=t.return}return r}function Io(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function r_(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=nc(n,s),l!=null&&o.unshift(cc(n,l,a))):i||(l=nc(n,s),l!=null&&o.push(cc(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var hC=/\r\n?/g,pC=/\u0000|\uFFFD/g;function i_(t){return(typeof t=="string"?t:""+t).replace(hC,` `).replace(pC,"")}function au(t,e,n){if(e=i_(e),i_(t)!==e&&n)throw Error(be(425))}function Td(){}var am=null,lm=null;function cm(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var um=typeof setTimeout=="function"?setTimeout:void 0,mC=typeof clearTimeout=="function"?clearTimeout:void 0,s_=typeof Promise=="function"?Promise:void 0,gC=typeof queueMicrotask=="function"?queueMicrotask:typeof s_ua||(t.current=fm[ua],fm[ua]=null,ua--)}function pt(t,e){ua++,fm[ua]=t.current,t.current=e}var Ms={},vn=Ds(Ms),Nn=Ds(!1),vo=Ms;function Ua(t,e){var n=t.type.contextTypes;if(!n)return Ms;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Ln(t){return t=t.childContextTypes,t!=null}function Cd(){yt(Nn),yt(vn)}function a_(t,e,n){if(vn.current!==Ms)throw Error(be(168));pt(vn,e),pt(Nn,n)}function SS(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(be(108,rT(t)||"Unknown",i));return Rt({},n,r)}function Ad(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ms,vo=vn.current,pt(vn,t),pt(Nn,Nn.current),!0}function l_(t,e,n){var r=t.stateNode;if(!r)throw Error(be(169));n?(t=SS(t,e,vo),r.__reactInternalMemoizedMergedChildContext=t,yt(Nn),yt(vn),pt(vn,t)):yt(Nn),pt(Nn,n)}var yi=null,xf=!1,bh=!1;function wS(t){yi===null?yi=[t]:yi.push(t)}function yC(t){xf=!0,wS(t)}function Ns(){if(!bh&&yi!==null){bh=!0;var t=0,e=lt;try{var n=yi;for(lt=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}yi=null,xf=!1}catch(i){throw yi!==null&&(yi=yi.slice(t+1)),X1(V0,Ns),i}finally{lt=e,bh=!1}}return null}var da=[],fa=0,Rd=null,Pd=0,fr=[],hr=0,_o=null,Ei=1,Mi="";function Xs(t,e){da[fa++]=Pd,da[fa++]=Rd,Rd=t,Pd=e}function bS(t,e,n){fr[hr++]=Ei,fr[hr++]=Mi,fr[hr++]=_o,_o=t;var r=Ei;t=Mi;var i=32-Fr(r)-1;r&=~(1<<i),n+=1;var s=32-Fr(e)+i;if(30<s){var o=i-i%5;s=(r&(1<>=o,i-=o,Ei=1<<32-Fr(e)+i|n<<i|r,Mi=s+t}else Ei=1<<s|n<<i|r,Mi=t}function K0(t){t.return!==null&&(Xs(t,1),bS(t,1,0))}function Z0(t){for(;t===Rd;)Rd=da[--fa],da[fa]=null,Pd=da[--fa],da[fa]=null;for(;t===_o;)_o=fr[--hr],fr[hr]=null,Mi=fr[--hr],fr[hr]=null,Ei=fr[--hr],fr[hr]=null}var tr=null,Qn=null,St=!1,Nr=null;function ES(t,e){var n=mr(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function c_(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,tr=t,Qn=ps(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,tr=t,Qn=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=_o!==null?{id:Ei,overflow:Mi}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=mr(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,tr=t,Qn=null,!0):!1;default:return!1}}function hm(t){return(t.mode&1)!==0&&(t.flags&128)===0}function pm(t){if(St){var e=Qn;if(e){var n=e;if(!c_(t,e)){if(hm(t))throw Error(be(418));e=ps(n.nextSibling);var r=tr;e&&c_(t,e)?ES(r,n):(t.flags=t.flags&-4097|2,St=!1,tr=t)}}else{if(hm(t))throw Error(be(418));t.flags=t.flags&-4097|2,St=!1,tr=t}}}function u_(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;tr=t}function lu(t){if(t!==tr)return!1;if(!St)return u_(t),St=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!cm(t.type,t.memoizedProps)),e&&(e=Qn)){if(hm(t))throw MS(),Error(be(418));for(;e;)ES(t,e),e=ps(e.nextSibling)}if(u_(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(be(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Qn=ps(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Qn=null}}else Qn=tr?ps(t.stateNode.nextSibling):null;return!0}function MS(){for(var t=Qn;t;)t=ps(t.nextSibling)}function ka(){Qn=tr=null,St=!1}function J0(t){Nr===null?Nr=[t]:Nr.push(t)}var SC=ki.ReactCurrentBatchConfig;function _l(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(be(309));var r=n.stateNode}if(!r)throw Error(be(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(be(284));if(!n._owner)throw Error(be(290,t))}return t}function cu(t,e){throw t=Object.prototype.toString.call(e),Error(be(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function d_(t){var e=t._init;return e(t._payload)}function TS(t){function e(f,x){if(t){var _=f.deletions;_===null?(f.deletions=[x],f.flags|=16):_.push(x)}}function n(f,x){if(!t)return null;for(;x!==null;)e(f,x),x=x.sibling;return null}function r(f,x){for(f=new Map;x!==null;)x.key!==null?f.set(x.key,x):f.set(x.index,x),x=x.sibling;return f}function i(f,x){return f=_s(f,x),f.index=0,f.sibling=null,f}function s(f,x,_){return f.index=_,t?(_=f.alternate,_!==null?(_=_.index,_<x?(f.flags|=2,x):_):(f.flags|=2,x)):(f.flags|=1048576,x)}function o(f){return t&&f.alternate===null&&(f.flags|=2),f}function a(f,x,_,y){return x===null||x.tag!==6?(x=Ph(_,f.mode,y),x.return=f,x):(x=i(x,_),x.return=f,x)}function l(f,x,_,y){var T=_.type;return T===sa?u(f,x,_.props.children,y,_.key):x!==null&&(x.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Qi&&d_(T)===x.type)?(y=i(x,_.props),y.ref=_l(f,x,_),y.return=f,y):(y=ad(_.type,_.key,_.props,null,f.mode,y),y.ref=_l(f,x,_),y.return=f,y)}function c(f,x,_,y){return x===null||x.tag!==4||x.stateNode.containerInfo!==_.containerInfo||x.stateNode.implementation!==_.implementation?(x=Dh(_,f.mode,y),x.return=f,x):(x=i(x,_.children||[]),x.return=f,x)}function u(f,x,_,y,T){return x===null||x.tag!==7?(x=co(_,f.mode,y,T),x.return=f,x):(x=i(x,_),x.return=f,x)}function h(f,x,_){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Ph(""+x,f.mode,_),x.return=f,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Jc:return _=ad(x.type,x.key,x.props,null,f.mode,_),_.ref=_l(f,null,x),_.return=f,_;case ia:return x=Dh(x,f.mode,_),x.return=f,x;case Qi:var y=x._init;return h(f,y(x._payload),_)}if(Nl(x)||hl(x))return x=co(x,f.mode,_,null),x.return=f,x;cu(f,x)}return null}function d(f,x,_,y){var T=x!==null?x.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return T!==null?null:a(f,x,""+_,y);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Jc:return _.key===T?l(f,x,_,y):null;case ia:return _.key===T?c(f,x,_,y):null;case Qi:return T=_._init,d(f,x,T(_._payload),y)}if(Nl(_)||hl(_))return T!==null?null:u(f,x,_,y,null);cu(f,_)}return null}function m(f,x,_,y,T){if(typeof y=="string"&&y!==""||typeof y=="number")return f=f.get(_)||null,a(x,f,""+y,T);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Jc:return f=f.get(y.key===null?_:y.key)||null,l(x,f,y,T);case ia:return f=f.get(y.key===null?_:y.key)||null,c(x,f,y,T);case Qi:var M=y._init;return m(f,x,_,M(y._payload),T)}if(Nl(y)||hl(y))return f=f.get(_)||null,u(x,f,y,T,null);cu(x,y)}return null}function v(f,x,_,y){for(var T=null,M=null,S=x,b=x=0,E=null;S!==null&&bb?(E=S,S=null):E=S.sibling;var w=d(f,S,_[b],y);if(w===null){S===null&&(S=E);break}t&&S&&w.alternate===null&&e(f,S),x=s(w,x,b),M===null?T=w:M.sibling=w,M=w,S=E}if(b===_.length)return n(f,S),St&&Xs(f,b),T;if(S===null){for(;b<_.length;b++)S=h(f,_[b],y),S!==null&&(x=s(S,x,b),M===null?T=S:M.sibling=S,M=S);return St&&Xs(f,b),T}for(S=r(f,S);bb?(E=S,S=null):E=S.sibling;var R=d(f,S,w.value,y);if(R===null){S===null&&(S=E);break}t&&S&&R.alternate===null&&e(f,S),x=s(R,x,b),M===null?T=R:M.sibling=R,M=R,S=E}if(w.done)return n(f,S),St&&Xs(f,b),T;if(S===null){for(;!w.done;b++,w=_.next())w=h(f,w.value,y),w!==null&&(x=s(w,x,b),M===null?T=w:M.sibling=w,M=w);return St&&Xs(f,b),T}for(S=r(f,S);!w.done;b++,w=_.next())w=m(S,f,b,w.value,y),w!==null&&(t&&w.alternate!==null&&S.delete(w.key===null?b:w.key),x=s(w,x,b),M===null?T=w:M.sibling=w,M=w);return t&&S.forEach(function(z){return e(f,z)}),St&&Xs(f,b),T}function g(f,x,_,y){if(typeof _=="object"&&_!==null&&_.type===sa&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Jc:e:{for(var T=_.key,M=x;M!==null;){if(M.key===T){if(T=_.type,T===sa){if(M.tag===7){n(f,M.sibling),x=i(M,_.props.children),x.return=f,f=x;break e}}else if(M.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Qi&&d_(T)===M.type){n(f,M.sibling),x=i(M,_.props),x.ref=_l(f,M,_),x.return=f,f=x;break e}n(f,M);break}else e(f,M);M=M.sibling}_.type===sa?(x=co(_.props.children,f.mode,y,_.key),x.return=f,f=x):(y=ad(_.type,_.key,_.props,null,f.mode,y),y.ref=_l(f,x,_),y.return=f,f=y)}return o(f);case ia:e:{for(M=_.key;x!==null;){if(x.key===M)if(x.tag===4&&x.stateNode.containerInfo===_.containerInfo&&x.stateNode.implementation===_.implementation){n(f,x.sibling),x=i(x,_.children||[]),x.return=f,f=x;break e}else{n(f,x);break}else e(f,x);x=x.sibling}x=Dh(_,f.mode,y),x.return=f,f=x}return o(f);case Qi:return M=_._init,g(f,x,M(_._payload),y)}if(Nl(_))return v(f,x,_,y);if(hl(_))return p(f,x,_,y);cu(f,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,x!==null&&x.tag===6?(n(f,x.sibling),x=i(x,_),x.return=f,f=x):(n(f,x),x=Ph(_,f.mode,y),x.return=f,f=x),o(f)):n(f,x)}return g}var Fa=TS(!0),CS=TS(!1),Dd=Ds(null),Nd=null,ha=null,Q0=null;function eg(){Q0=ha=Nd=null}function tg(t){var e=Dd.current;yt(Dd),t._currentValue=e}function mm(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Ea(t,e){Nd=t,Q0=ha=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Dn=!0),t.firstContext=null)}function wr(t){var e=t._currentValue;if(Q0!==t)if(t={context:t,memoizedValue:e,next:null},ha===null){if(Nd===null)throw Error(be(308));ha=t,Nd.dependencies={lanes:0,firstContext:t}}else ha=ha.next=t;return e}var no=null;function ng(t){no===null?no=[t]:no.push(t)}function AS(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,ng(e)):(n.next=i.next,i.next=n),e.interleaved=n,Pi(t,r)}function Pi(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var es=!1;function rg(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function RS(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ci(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ms(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,rt&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Pi(t,n)}return i=r.interleaved,i===null?(e.next=e,ng(r)):(e.next=i.next,i.next=e),r.interleaved=e,Pi(t,n)}function td(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,H0(t,n)}}function f_(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Ld(t,e,n,r){var i=t.updateQueue;es=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var h=i.baseState;o=0,u=c=l=null,a=s;do{var d=a.lane,m=a.eventTime;if((r&d)===d){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=t,p=a;switch(d=e,m=n,p.tag){case 1:if(v=p.payload,typeof v=="function"){h=v.call(m,h,d);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=p.payload,d=typeof v=="function"?v.call(m,h,d):v,d==null)break e;h=Rt({},h,d);break e;case 2:es=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else m={eventTime:m,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=m,l=h):u=u.next=m,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(u===null&&(l=h),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);yo|=o,t.lanes=o,t.memoizedState=h}}function h_(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(be(191,i));i.call(r)}}}var Oc={},oi=Ds(Oc),dc=Ds(Oc),fc=Ds(Oc);function ro(t){if(t===Oc)throw Error(be(174));return t}function ig(t,e){switch(pt(fc,e),pt(dc,t),pt(oi,Oc),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:qp(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=qp(e,t)}yt(oi),pt(oi,e)}function za(){yt(oi),yt(dc),yt(fc)}function PS(t){ro(fc.current);var e=ro(oi.current),n=qp(e,t.type);e!==n&&(pt(dc,t),pt(oi,n))}function sg(t){dc.current===t&&(yt(oi),yt(dc))}var Et=Ds(0);function Id(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Eh=[];function og(){for(var t=0;t<Eh.length;t++)Eh[t]._workInProgressVersionPrimary=null;Eh.length=0}var nd=ki.ReactCurrentDispatcher,Mh=ki.ReactCurrentBatchConfig,xo=0,At=null,Wt=null,Jt=null,Od=!1,Wl=!1,hc=0,wC=0;function an(){throw Error(be(321))}function ag(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Hr(t[n],e[n]))return!1;return!0}function lg(t,e,n,r,i,s){if(xo=s,At=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,nd.current=t===null||t.memoizedState===null?TC:CC,t=n(r,i),Wl){s=0;do{if(Wl=!1,hc=0,25n?n:4,t(!0);var r=Mh.transition;Mh.transition={};try{t(!1),e()}finally{lt=n,Mh.transition=r}}function jS(){return br().memoizedState}function EC(t,e,n){var r=vs(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},XS(t))YS(e,n);else if(n=AS(t,e,n,r),n!==null){var i=Mn();zr(n,t,r,i),qS(n,e,r)}}function MC(t,e,n){var r=vs(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(XS(t))YS(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Hr(a,o)){var l=e.interleaved;l===null?(i.next=i,ng(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=AS(t,e,i,r),n!==null&&(i=Mn(),zr(n,t,r,i),qS(n,e,r))}}function XS(t){var e=t.alternate;return t===At||e!==null&&e===At}function YS(t,e){Wl=Od=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function qS(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,H0(t,n)}}var Ud={readContext:wr,useCallback:an,useContext:an,useEffect:an,useImperativeHandle:an,useInsertionEffect:an,useLayoutEffect:an,useMemo:an,useReducer:an,useRef:an,useState:an,useDebugValue:an,useDeferredValue:an,useTransition:an,useMutableSource:an,useSyncExternalStore:an,useId:an,unstable_isNewReconciler:!1},TC={readContext:wr,useCallback:function(t,e){return Xr().memoizedState=[t,e===void 0?null:e],t},useContext:wr,useEffect:m_,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,rd(4194308,4,VS.bind(null,e,t),n)},useLayoutEffect:function(t,e){return rd(4194308,4,t,e)},useInsertionEffect:function(t,e){return rd(4,2,t,e)},useMemo:function(t,e){var n=Xr();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Xr();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=EC.bind(null,At,t),[r.memoizedState,t]},useRef:function(t){var e=Xr();return t={current:t},e.memoizedState=t},useState:p_,useDebugValue:dg,useDeferredValue:function(t){return Xr().memoizedState=t},useTransition:function(){var t=p_(!1),e=t[0];return t=bC.bind(null,t[1]),Xr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=At,i=Xr();if(St){if(n===void 0)throw Error(be(407));n=n()}else{if(n=e(),en===null)throw Error(be(349));xo&30||LS(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,m_(OS.bind(null,r,s,t),[t]),r.flags|=2048,mc(9,IS.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=Xr(),e=en.identifierPrefix;if(St){var n=Mi,r=Ei;n=(r&~(1<<32-Fr(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=hc++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=wC++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},CC={readContext:wr,useCallback:GS,useContext:wr,useEffect:ug,useImperativeHandle:HS,useInsertionEffect:zS,useLayoutEffect:BS,useMemo:WS,useReducer:Th,useRef:FS,useState:function(){return Th(pc)},useDebugValue:dg,useDeferredValue:function(t){var e=br();return $S(e,Wt.memoizedState,t)},useTransition:function(){var t=Th(pc)[0],e=br().memoizedState;return[t,e]},useMutableSource:DS,useSyncExternalStore:NS,useId:jS,unstable_isNewReconciler:!1},AC={readContext:wr,useCallback:GS,useContext:wr,useEffect:ug,useImperativeHandle:HS,useInsertionEffect:zS,useLayoutEffect:BS,useMemo:WS,useReducer:Ch,useRef:FS,useState:function(){return Ch(pc)},useDebugValue:dg,useDeferredValue:function(t){var e=br();return Wt===null?e.memoizedState=t:$S(e,Wt.memoizedState,t)},useTransition:function(){var t=Ch(pc)[0],e=br().memoizedState;return[t,e]},useMutableSource:DS,useSyncExternalStore:NS,useId:jS,unstable_isNewReconciler:!1};function Pr(t,e){if(t&&t.defaultProps){e=Rt({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function gm(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:Rt({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Sf={isMounted:function(t){return(t=t._reactInternals)?Do(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Mn(),i=vs(t),s=Ci(r,i);s.payload=e,n!=null&&(s.callback=n),e=ms(t,s,i),e!==null&&(zr(e,t,i,r),td(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Mn(),i=vs(t),s=Ci(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=ms(t,s,i),e!==null&&(zr(e,t,i,r),td(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Mn(),r=vs(t),i=Ci(n,r);i.tag=2,e!=null&&(i.callback=e),e=ms(t,i,r),e!==null&&(zr(e,t,r,n),td(e,t,r))}};function g_(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!ac(n,r)||!ac(i,s):!0}function KS(t,e,n){var r=!1,i=Ms,s=e.contextType;return typeof s=="object"&&s!==null?s=wr(s):(i=Ln(e)?vo:vn.current,r=e.contextTypes,s=(r=r!=null)?Ua(t,i):Ms),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Sf,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function v_(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&Sf.enqueueReplaceState(e,e.state,null)}function vm(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},rg(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=wr(s):(s=Ln(e)?vo:vn.current,i.context=Ua(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(gm(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&Sf.enqueueReplaceState(i,i.state,null),Ld(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function Ba(t,e){try{var n="",r=e;do n+=nT(r),r=r.return;while(r);var i=n}catch(s){i=` Error generating stack: `+s.message+` `+s.stack}return{value:t,source:e,stack:i,digest:null}}function Ah(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function _m(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var RC=typeof WeakMap=="function"?WeakMap:Map;function ZS(t,e,n){n=Ci(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Fd||(Fd=!0,Am=r),_m(t,e)},n}function JS(t,e,n){n=Ci(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){_m(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){_m(t,e),typeof r!="function"&&(gs===null?gs=new Set([this]):gs.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function __(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new RC;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=GC.bind(null,t,e,n),e.then(t,t))}function x_(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function y_(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Ci(-1,1),e.tag=2,ms(n,e,1))),n.lanes|=1),t)}var PC=ki.ReactCurrentOwner,Dn=!1;function Sn(t,e,n,r){e.child=t===null?CS(e,null,n,r):Fa(e,t.child,n,r)}function S_(t,e,n,r,i){n=n.render;var s=e.ref;return Ea(e,i),r=lg(t,e,n,r,s,i),n=cg(),t!==null&&!Dn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Di(t,e,i)):(St&&n&&K0(e),e.flags|=1,Sn(t,e,r,i),e.child)}function w_(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!xg(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,QS(t,e,s,r,i)):(t=ad(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:ac,n(o,r)&&t.ref===e.ref)return Di(t,e,i)}return e.flags|=1,t=_s(s,r),t.ref=e.ref,t.return=e,e.child=t}function QS(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(ac(s,r)&&t.ref===e.ref)if(Dn=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(Dn=!0);else return e.lanes=t.lanes,Di(t,e,i)}return xm(t,e,n,r,i)}function ew(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},pt(ma,qn),qn|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,pt(ma,qn),qn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,pt(ma,qn),qn|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,pt(ma,qn),qn|=r;return Sn(t,e,i,n),e.child}function tw(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function xm(t,e,n,r,i){var s=Ln(n)?vo:vn.current;return s=Ua(e,s),Ea(e,i),n=lg(t,e,n,r,s,i),r=cg(),t!==null&&!Dn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Di(t,e,i)):(St&&r&&K0(e),e.flags|=1,Sn(t,e,n,i),e.child)}function b_(t,e,n,r,i){if(Ln(n)){var s=!0;Ad(e)}else s=!1;if(Ea(e,i),e.stateNode===null)id(t,e),KS(e,n,r),vm(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=wr(c):(c=Ln(n)?vo:vn.current,c=Ua(e,c));var u=n.getDerivedStateFromProps,h=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&v_(e,o,r,c),es=!1;var d=e.memoizedState;o.state=d,Ld(e,r,o,i),l=e.memoizedState,a!==r||d!==l||Nn.current||es?(typeof u=="function"&&(gm(e,n,u,r),l=e.memoizedState),(a=es||g_(e,n,a,r,d,l,c))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,RS(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Pr(e.type,a),o.props=c,h=e.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=wr(l):(l=Ln(n)?vo:vn.current,l=Ua(e,l));var m=n.getDerivedStateFromProps;(u=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||d!==l)&&v_(e,o,r,l),es=!1,d=e.memoizedState,o.state=d,Ld(e,r,o,i);var v=e.memoizedState;a!==h||d!==v||Nn.current||es?(typeof m=="function"&&(gm(e,n,m,r),v=e.memoizedState),(c=es||g_(e,n,c,r,d,v,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=v),o.props=r,o.state=v,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return ym(t,e,n,r,s,i)}function ym(t,e,n,r,i,s){tw(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&l_(e,n,!1),Di(t,e,s);r=e.stateNode,PC.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=Fa(e,t.child,null,s),e.child=Fa(e,null,a,s)):Sn(t,e,a,s),e.memoizedState=r.state,i&&l_(e,n,!0),e.child}function nw(t){var e=t.stateNode;e.pendingContext?a_(t,e.pendingContext,e.pendingContext!==e.context):e.context&&a_(t,e.context,!1),ig(t,e.containerInfo)}function E_(t,e,n,r,i){return ka(),J0(i),e.flags|=256,Sn(t,e,n,r),e.child}var Sm={dehydrated:null,treeContext:null,retryLane:0};function wm(t){return{baseLanes:t,cachePool:null,transitions:null}}function rw(t,e,n){var r=e.pendingProps,i=Et.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),pt(Et,i&1),t===null)return pm(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Ef(o,r,0,null),t=co(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=wm(n),e.memoizedState=Sm,t):fg(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return DC(t,e,o,r,a,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=_s(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=_s(a,s):(s=co(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?wm(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=Sm,r}return s=t.child,t=s.sibling,r=_s(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function fg(t,e){return e=Ef({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function uu(t,e,n,r){return r!==null&&J0(r),Fa(e,t.child,null,n),t=fg(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function DC(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=Ah(Error(be(422))),uu(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=Ef({mode:"visible",children:r.children},i,0,null),s=co(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&Fa(e,t.child,null,o),e.child.memoizedState=wm(o),e.memoizedState=Sm,s);if(!(e.mode&1))return uu(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(be(419)),r=Ah(s,r,void 0),uu(t,e,o,r)}if(a=(o&t.childLanes)!==0,Dn||a){if(r=en,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Pi(t,i),zr(r,t,i,-1))}return _g(),r=Ah(Error(be(421))),uu(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=WC.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,Qn=ps(i.nextSibling),tr=e,St=!0,Nr=null,t!==null&&(fr[hr++]=Ei,fr[hr++]=Mi,fr[hr++]=_o,Ei=t.id,Mi=t.overflow,_o=e),e=fg(e,r.children),e.flags|=4096,e)}function M_(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),mm(t.return,e,n)}function Rh(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function iw(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Sn(t,e,r.children,n),r=Et.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&M_(t,n,e);else if(t.tag===19)M_(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(pt(Et,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&Id(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Rh(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Id(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Rh(e,!0,n,null,s);break;case"together":Rh(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function id(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Di(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),yo|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(be(153));if(e.child!==null){for(t=e.child,n=_s(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=_s(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function NC(t,e,n){switch(e.tag){case 3:nw(e),ka();break;case 5:PS(e);break;case 1:Ln(e.type)&&Ad(e);break;case 4:ig(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;pt(Dd,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(pt(Et,Et.current&1),e.flags|=128,null):n&e.child.childLanes?rw(t,e,n):(pt(Et,Et.current&1),t=Di(t,e,n),t!==null?t.sibling:null);pt(Et,Et.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return iw(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),pt(Et,Et.current),r)break;return null;case 22:case 23:return e.lanes=0,ew(t,e,n)}return Di(t,e,n)}var sw,bm,ow,aw;sw=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};bm=function(){};ow=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,ro(oi.current);var s=null;switch(n){case"input":i=$p(t,i),r=$p(t,r),s=[];break;case"select":i=Rt({},i,{value:void 0}),r=Rt({},r,{value:void 0}),s=[];break;case"textarea":i=Yp(t,i),r=Yp(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Td)}Kp(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ec.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ec.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&_t("scroll",t),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};aw=function(t,e,n,r){n!==r&&(e.flags|=4)};function xl(t,e){if(!St)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function ln(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function LC(t,e,n){var r=e.pendingProps;switch(Z0(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ln(e),null;case 1:return Ln(e.type)&&Cd(),ln(e),null;case 3:return r=e.stateNode,za(),yt(Nn),yt(vn),og(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(lu(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Nr!==null&&(Dm(Nr),Nr=null))),bm(t,e),ln(e),null;case 5:sg(e);var i=ro(fc.current);if(n=e.type,t!==null&&e.stateNode!=null)ow(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(be(166));return ln(e),null}if(t=ro(oi.current),lu(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Zr]=e,r[uc]=s,t=(e.mode&1)!==0,n){case"dialog":_t("cancel",r),_t("close",r);break;case"iframe":case"object":case"embed":_t("load",r);break;case"video":case"audio":for(i=0;i<Il.length;i++)_t(Il[i],r);break;case"source":_t("error",r);break;case"img":case"image":case"link":_t("error",r),_t("load",r);break;case"details":_t("toggle",r);break;case"input":Iv(r,s),_t("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},_t("invalid",r);break;case"textarea":Uv(r,s),_t("invalid",r)}Kp(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&au(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&au(r.textContent,a,t),i=["children",""+a]):ec.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&_t("scroll",r)}switch(n){case"input":Qc(r),Ov(r,s,!0);break;case"textarea":Qc(r),kv(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Td)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=O1(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Zr]=e,t[uc]=r,sw(t,e,!1,!1),e.stateNode=t;e:{switch(o=Zp(n,r),n){case"dialog":_t("cancel",t),_t("close",t),i=r;break;case"iframe":case"object":case"embed":_t("load",t),i=r;break;case"video":case"audio":for(i=0;iVa&&(e.flags|=128,r=!0,xl(s,!1),e.lanes=4194304)}else{if(!r)if(t=Id(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),xl(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!St)return ln(e),null}else 2*kt()-s.renderingStartTime>Va&&n!==1073741824&&(e.flags|=128,r=!0,xl(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=kt(),e.sibling=null,n=Et.current,pt(Et,r?n&1|2:n&1),e):(ln(e),null);case 22:case 23:return vg(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?qn&1073741824&&(ln(e),e.subtreeFlags&6&&(e.flags|=8192)):ln(e),null;case 24:return null;case 25:return null}throw Error(be(156,e.tag))}function IC(t,e){switch(Z0(e),e.tag){case 1:return Ln(e.type)&&Cd(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return za(),yt(Nn),yt(vn),og(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return sg(e),null;case 13:if(yt(Et),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(be(340));ka()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return yt(Et),null;case 4:return za(),null;case 10:return tg(e.type._context),null;case 22:case 23:return vg(),null;case 24:return null;default:return null}}var du=!1,fn=!1,OC=typeof WeakSet=="function"?WeakSet:Set,Oe=null;function pa(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Nt(t,e,r)}else n.current=null}function Em(t,e,n){try{n()}catch(r){Nt(t,e,r)}}var T_=!1;function UC(t,e){if(am=bd,t=fS(),q0(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,h=t,d=null;t:for(;;){for(var m;h!==n||i!==0&&h.nodeType!==3||(a=o+i),h!==s||r!==0&&h.nodeType!==3||(l=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(m=h.firstChild)!==null;)d=h,h=m;for(;;){if(h===t)break t;if(d===n&&++c===i&&(a=o),d===s&&++u===r&&(l=o),(m=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(lm={focusedElem:t,selectionRange:n},bd=!1,Oe=e;Oe!==null;)if(e=Oe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Oe=t;else for(;Oe!==null;){e=Oe;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var p=v.memoizedProps,g=v.memoizedState,f=e.stateNode,x=f.getSnapshotBeforeUpdate(e.elementType===e.type?p:Pr(e.type,p),g);f.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var _=e.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(be(163))}}catch(y){Nt(e,e.return,y)}if(t=e.sibling,t!==null){t.return=e.return,Oe=t;break}Oe=e.return}return v=T_,T_=!1,v}function $l(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Em(e,n,s)}i=i.next}while(i!==r)}}function wf(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Mm(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function lw(t){var e=t.alternate;e!==null&&(t.alternate=null,lw(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Zr],delete e[uc],delete e[dm],delete e[_C],delete e[xC])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function cw(t){return t.tag===5||t.tag===3||t.tag===4}function C_(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||cw(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Tm(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Td));else if(r!==4&&(t=t.child,t!==null))for(Tm(t,e,n),t=t.sibling;t!==null;)Tm(t,e,n),t=t.sibling}function Cm(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Cm(t,e,n),t=t.sibling;t!==null;)Cm(t,e,n),t=t.sibling}var nn=null,Dr=!1;function Hi(t,e,n){for(n=n.child;n!==null;)uw(t,e,n),n=n.sibling}function uw(t,e,n){if(si&&typeof si.onCommitFiberUnmount=="function")try{si.onCommitFiberUnmount(pf,n)}catch{}switch(n.tag){case 5:fn||pa(n,e);case 6:var r=nn,i=Dr;nn=null,Hi(t,e,n),nn=r,Dr=i,nn!==null&&(Dr?(t=nn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):nn.removeChild(n.stateNode));break;case 18:nn!==null&&(Dr?(t=nn,n=n.stateNode,t.nodeType===8?wh(t.parentNode,n):t.nodeType===1&&wh(t,n),sc(t)):wh(nn,n.stateNode));break;case 4:r=nn,i=Dr,nn=n.stateNode.containerInfo,Dr=!0,Hi(t,e,n),nn=r,Dr=i;break;case 0:case 11:case 14:case 15:if(!fn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Em(n,e,o),i=i.next}while(i!==r)}Hi(t,e,n);break;case 1:if(!fn&&(pa(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Nt(n,e,a)}Hi(t,e,n);break;case 21:Hi(t,e,n);break;case 22:n.mode&1?(fn=(r=fn)||n.memoizedState!==null,Hi(t,e,n),fn=r):Hi(t,e,n);break;default:Hi(t,e,n)}}function A_(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new OC),e.forEach(function(r){var i=$C.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Tr(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:nn=a.stateNode,Dr=!1;break e;case 3:nn=a.stateNode.containerInfo,Dr=!0;break e;case 4:nn=a.stateNode.containerInfo,Dr=!0;break e}a=a.return}if(nn===null)throw Error(be(160));uw(s,o,i),nn=null,Dr=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Nt(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)dw(e,t),e=e.sibling}function dw(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Tr(e,t),jr(t),r&4){try{$l(3,t,t.return),wf(3,t)}catch(p){Nt(t,t.return,p)}try{$l(5,t,t.return)}catch(p){Nt(t,t.return,p)}}break;case 1:Tr(e,t),jr(t),r&512&&n!==null&&pa(n,n.return);break;case 5:if(Tr(e,t),jr(t),r&512&&n!==null&&pa(n,n.return),t.flags&32){var i=t.stateNode;try{tc(i,"")}catch(p){Nt(t,t.return,p)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&L1(i,s),Zp(a,o);var c=Zp(a,s);for(o=0;o<l.length;o+=2){var u=l[o],h=l[o+1];u==="style"?F1(i,h):u==="dangerouslySetInnerHTML"?U1(i,h):u==="children"?tc(i,h):U0(i,u,h,c)}switch(a){case"input":jp(i,s);break;case"textarea":I1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?ya(i,!!s.multiple,m,!1):d!==!!s.multiple&&(s.defaultValue!=null?ya(i,!!s.multiple,s.defaultValue,!0):ya(i,!!s.multiple,s.multiple?[]:"",!1))}i[uc]=s}catch(p){Nt(t,t.return,p)}}break;case 6:if(Tr(e,t),jr(t),r&4){if(t.stateNode===null)throw Error(be(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(p){Nt(t,t.return,p)}}break;case 3:if(Tr(e,t),jr(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{sc(e.containerInfo)}catch(p){Nt(t,t.return,p)}break;case 4:Tr(e,t),jr(t);break;case 13:Tr(e,t),jr(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(mg=kt())),r&4&&A_(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(fn=(c=fn)||u,Tr(e,t),fn=c):Tr(e,t),jr(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(Oe=t,u=t.child;u!==null;){for(h=Oe=u;Oe!==null;){switch(d=Oe,m=d.child,d.tag){case 0:case 11:case 14:case 15:$l(4,d,d.return);break;case 1:pa(d,d.return);var v=d.stateNode;if(typeof v.componentWillUnmount=="function"){r=d,n=d.return;try{e=r,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(p){Nt(r,n,p)}}break;case 5:pa(d,d.return);break;case 22:if(d.memoizedState!==null){P_(h);continue}}m!==null?(m.return=d,Oe=m):P_(h)}u=u.sibling}e:for(u=null,h=t;;){if(h.tag===5){if(u===null){u=h;try{i=h.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=k1("display",o))}catch(p){Nt(t,t.return,p)}}}else if(h.tag===6){if(u===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(p){Nt(t,t.return,p)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===t)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;u===h&&(u=null),h=h.return}u===h&&(u=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Tr(e,t),jr(t),r&4&&A_(t);break;case 21:break;default:Tr(e,t),jr(t)}}function jr(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(cw(n)){var r=n;break e}n=n.return}throw Error(be(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(tc(i,""),r.flags&=-33);var s=C_(t);Cm(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=C_(t);Tm(t,a,o);break;default:throw Error(be(161))}}catch(l){Nt(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function kC(t,e,n){Oe=t,fw(t)}function fw(t,e,n){for(var r=(t.mode&1)!==0;Oe!==null;){var i=Oe,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||du;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||fn;a=du;var c=fn;if(du=o,(fn=l)&&!c)for(Oe=i;Oe!==null;)o=Oe,l=o.child,o.tag===22&&o.memoizedState!==null?D_(i):l!==null?(l.return=o,Oe=l):D_(i);for(;s!==null;)Oe=s,fw(s),s=s.sibling;Oe=i,du=a,fn=c}R_(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,Oe=s):R_(t)}}function R_(t){for(;Oe!==null;){var e=Oe;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:fn||wf(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!fn)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Pr(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&h_(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}h_(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var h=u.dehydrated;h!==null&&sc(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(be(163))}fn||e.flags&512&&Mm(e)}catch(d){Nt(e,e.return,d)}}if(e===t){Oe=null;break}if(n=e.sibling,n!==null){n.return=e.return,Oe=n;break}Oe=e.return}}function P_(t){for(;Oe!==null;){var e=Oe;if(e===t){Oe=null;break}var n=e.sibling;if(n!==null){n.return=e.return,Oe=n;break}Oe=e.return}}function D_(t){for(;Oe!==null;){var e=Oe;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{wf(4,e)}catch(l){Nt(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){Nt(e,i,l)}}var s=e.return;try{Mm(e)}catch(l){Nt(e,s,l)}break;case 5:var o=e.return;try{Mm(e)}catch(l){Nt(e,o,l)}}}catch(l){Nt(e,e.return,l)}if(e===t){Oe=null;break}var a=e.sibling;if(a!==null){a.return=e.return,Oe=a;break}Oe=e.return}}var FC=Math.ceil,kd=ki.ReactCurrentDispatcher,hg=ki.ReactCurrentOwner,xr=ki.ReactCurrentBatchConfig,rt=0,en=null,Gt=null,sn=0,qn=0,ma=Ds(0),$t=0,gc=null,yo=0,bf=0,pg=0,jl=null,Rn=null,mg=0,Va=1/0,_i=null,Fd=!1,Am=null,gs=null,fu=!1,ss=null,zd=0,Xl=0,Rm=null,sd=-1,od=0;function Mn(){return rt&6?kt():sd!==-1?sd:sd=kt()}function vs(t){return t.mode&1?rt&2&&sn!==0?sn&-sn:SC.transition!==null?(od===0&&(od=K1()),od):(t=lt,t!==0||(t=window.event,t=t===void 0?16:rS(t.type)),t):1}function zr(t,e,n,r){if(50<Xl)throw Xl=0,Rm=null,Error(be(185));Nc(t,n,r),(!(rt&2)||t!==en)&&(t===en&&(!(rt&2)&&(bf|=n),$t===4&&ns(t,sn)),In(t,r),n===1&&rt===0&&!(e.mode&1)&&(Va=kt()+500,xf&&Ns()))}function In(t,e){var n=t.callbackNode;ST(t,e);var r=wd(t,t===en?sn:0);if(r===0)n!==null&&Bv(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Bv(n),e===1)t.tag===0?yC(N_.bind(null,t)):wS(N_.bind(null,t)),gC(function(){!(rt&6)&&Ns()}),n=null;else{switch(Z1(r)){case 1:n=V0;break;case 4:n=Y1;break;case 16:n=Sd;break;case 536870912:n=q1;break;default:n=Sd}n=yw(n,hw.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function hw(t,e){if(sd=-1,od=0,rt&6)throw Error(be(327));var n=t.callbackNode;if(Ma()&&t.callbackNode!==n)return null;var r=wd(t,t===en?sn:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=Bd(t,r);else{e=r;var i=rt;rt|=2;var s=mw();(en!==t||sn!==e)&&(_i=null,Va=kt()+500,lo(t,e));do try{VC();break}catch(a){pw(t,a)}while(!0);eg(),kd.current=s,rt=i,Gt!==null?e=0:(en=null,sn=0,e=$t)}if(e!==0){if(e===2&&(i=nm(t),i!==0&&(r=i,e=Pm(t,i))),e===1)throw n=gc,lo(t,0),ns(t,r),In(t,kt()),n;if(e===6)ns(t,r);else{if(i=t.current.alternate,!(r&30)&&!zC(i)&&(e=Bd(t,r),e===2&&(s=nm(t),s!==0&&(r=s,e=Pm(t,s))),e===1))throw n=gc,lo(t,0),ns(t,r),In(t,kt()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(be(345));case 2:Ys(t,Rn,_i);break;case 3:if(ns(t,r),(r&130023424)===r&&(e=mg+500-kt(),10<e)){if(wd(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Mn(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=um(Ys.bind(null,t,Rn,_i),e);break}Ys(t,Rn,_i);break;case 4:if(ns(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-Fr(r);s=1<i&&(i=o),r&=~s}if(r=i,r=kt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*FC(r/1960))-r,10<r){t.timeoutHandle=um(Ys.bind(null,t,Rn,_i),r);break}Ys(t,Rn,_i);break;case 5:Ys(t,Rn,_i);break;default:throw Error(be(329))}}}return In(t,kt()),t.callbackNode===n?hw.bind(null,t):null}function Pm(t,e){var n=jl;return t.current.memoizedState.isDehydrated&&(lo(t,e).flags|=256),t=Bd(t,e),t!==2&&(e=Rn,Rn=n,e!==null&&Dm(e)),t}function Dm(t){Rn===null?Rn=t:Rn.push.apply(Rn,t)}function zC(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Hr(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ns(t,e){for(e&=~pg,e&=~bf,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Fr(e),r=1<<n;t[n]=-1,e&=~r}}function N_(t){if(rt&6)throw Error(be(327));Ma();var e=wd(t,0);if(!(e&1))return In(t,kt()),null;var n=Bd(t,e);if(t.tag!==0&&n===2){var r=nm(t);r!==0&&(e=r,n=Pm(t,r))}if(n===1)throw n=gc,lo(t,0),ns(t,e),In(t,kt()),n;if(n===6)throw Error(be(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Ys(t,Rn,_i),In(t,kt()),null}function gg(t,e){var n=rt;rt|=1;try{return t(e)}finally{rt=n,rt===0&&(Va=kt()+500,xf&&Ns())}}function So(t){ss!==null&&ss.tag===0&&!(rt&6)&&Ma();var e=rt;rt|=1;var n=xr.transition,r=lt;try{if(xr.transition=null,lt=1,t)return t()}finally{lt=r,xr.transition=n,rt=e,!(rt&6)&&Ns()}}function vg(){qn=ma.current,yt(ma)}function lo(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,mC(n)),Gt!==null)for(n=Gt.return;n!==null;){var r=n;switch(Z0(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Cd();break;case 3:za(),yt(Nn),yt(vn),og();break;case 5:sg(r);break;case 4:za();break;case 13:yt(Et);break;case 19:yt(Et);break;case 10:tg(r.type._context);break;case 22:case 23:vg()}n=n.return}if(en=t,Gt=t=_s(t.current,null),sn=qn=e,$t=0,gc=null,pg=bf=yo=0,Rn=jl=null,no!==null){for(e=0;e<no.length;e++)if(n=no[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}no=null}return t}function pw(t,e){do{var n=Gt;try{if(eg(),nd.current=Ud,Od){for(var r=At.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Od=!1}if(xo=0,Jt=Wt=At=null,Wl=!1,hc=0,hg.current=null,n===null||n.return===null){$t=1,gc=e,Gt=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=sn,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,h=u.tag;if(!(u.mode&1)&&(h===0||h===11||h===15)){var d=u.alternate;d?(u.updateQueue=d.updateQueue,u.memoizedState=d.memoizedState,u.lanes=d.lanes):(u.updateQueue=null,u.memoizedState=null)}var m=x_(o);if(m!==null){m.flags&=-257,y_(m,o,a,s,e),m.mode&1&&__(s,c,e),e=m,l=c;var v=e.updateQueue;if(v===null){var p=new Set;p.add(l),e.updateQueue=p}else v.add(l);break e}else{if(!(e&1)){__(s,c,e),_g();break e}l=Error(be(426))}}else if(St&&a.mode&1){var g=x_(o);if(g!==null){!(g.flags&65536)&&(g.flags|=256),y_(g,o,a,s,e),J0(Ba(l,a));break e}}s=l=Ba(l,a),$t!==4&&($t=2),jl===null?jl=[s]:jl.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var f=ZS(s,l,e);f_(s,f);break e;case 1:a=l;var x=s.type,_=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(gs===null||!gs.has(_)))){s.flags|=65536,e&=-e,s.lanes|=e;var y=JS(s,a,e);f_(s,y);break e}}s=s.return}while(s!==null)}vw(n)}catch(T){e=T,Gt===n&&n!==null&&(Gt=n=n.return);continue}break}while(!0)}function mw(){var t=kd.current;return kd.current=Ud,t===null?Ud:t}function _g(){($t===0||$t===3||$t===2)&&($t=4),en===null||!(yo&268435455)&&!(bf&268435455)||ns(en,sn)}function Bd(t,e){var n=rt;rt|=2;var r=mw();(en!==t||sn!==e)&&(_i=null,lo(t,e));do try{BC();break}catch(i){pw(t,i)}while(!0);if(eg(),rt=n,kd.current=r,Gt!==null)throw Error(be(261));return en=null,sn=0,$t}function BC(){for(;Gt!==null;)gw(Gt)}function VC(){for(;Gt!==null&&!fT();)gw(Gt)}function gw(t){var e=xw(t.alternate,t,qn);t.memoizedProps=t.pendingProps,e===null?vw(t):Gt=e,hg.current=null}function vw(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=IC(n,e),n!==null){n.flags&=32767,Gt=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{$t=6,Gt=null;return}}else if(n=LC(n,e,qn),n!==null){Gt=n;return}if(e=e.sibling,e!==null){Gt=e;return}Gt=e=t}while(e!==null);$t===0&&($t=5)}function Ys(t,e,n){var r=lt,i=xr.transition;try{xr.transition=null,lt=1,HC(t,e,n,r)}finally{xr.transition=i,lt=r}return null}function HC(t,e,n,r){do Ma();while(ss!==null);if(rt&6)throw Error(be(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(be(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(wT(t,s),t===en&&(Gt=en=null,sn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||fu||(fu=!0,yw(Sd,function(){return Ma(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=xr.transition,xr.transition=null;var o=lt;lt=1;var a=rt;rt|=4,hg.current=null,UC(t,n),dw(n,t),lC(lm),bd=!!am,lm=am=null,t.current=n,kC(n),hT(),rt=a,lt=o,xr.transition=s}else t.current=n;if(fu&&(fu=!1,ss=t,zd=i),s=t.pendingLanes,s===0&&(gs=null),gT(n.stateNode),In(t,kt()),e!==null)for(r=t.onRecoverableError,n=0;nt?16:t,ss===null)var r=!1;else{if(t=ss,ss=null,zd=0,rt&6)throw Error(be(331));var i=rt;for(rt|=4,Oe=t.current;Oe!==null;){var s=Oe,o=s.child;if(Oe.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lkt()-mg?lo(t,0):pg|=n),In(t,e)}function _w(t,e){e===0&&(t.mode&1?(e=nu,nu<<=1,!(nu&130023424)&&(nu=4194304)):e=1);var n=Mn();t=Pi(t,e),t!==null&&(Nc(t,e,n),In(t,n))}function WC(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),_w(t,n)}function $C(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(be(314))}r!==null&&r.delete(e),_w(t,n)}var xw;xw=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Nn.current)Dn=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Dn=!1,NC(t,e,n);Dn=!!(t.flags&131072)}else Dn=!1,St&&e.flags&1048576&&bS(e,Pd,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;id(t,e),t=e.pendingProps;var i=Ua(e,vn.current);Ea(e,n),i=lg(null,e,r,t,i,n);var s=cg();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ln(r)?(s=!0,Ad(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,rg(e),i.updater=Sf,e.stateNode=i,i._reactInternals=e,vm(e,r,t,n),e=ym(null,e,r,!0,s,n)):(e.tag=0,St&&s&&K0(e),Sn(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(id(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=XC(r),t=Pr(r,t),i){case 0:e=xm(null,e,r,t,n);break e;case 1:e=b_(null,e,r,t,n);break e;case 11:e=S_(null,e,r,t,n);break e;case 14:e=w_(null,e,r,Pr(r.type,t),n);break e}throw Error(be(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Pr(r,i),xm(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Pr(r,i),b_(t,e,r,i,n);case 3:e:{if(nw(e),t===null)throw Error(be(387));r=e.pendingProps,s=e.memoizedState,i=s.element,RS(t,e),Ld(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=Ba(Error(be(423)),e),e=E_(t,e,r,n,i);break e}else if(r!==i){i=Ba(Error(be(424)),e),e=E_(t,e,r,n,i);break e}else for(Qn=ps(e.stateNode.containerInfo.firstChild),tr=e,St=!0,Nr=null,n=CS(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ka(),r===i){e=Di(t,e,n);break e}Sn(t,e,r,n)}e=e.child}return e;case 5:return PS(e),t===null&&pm(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,cm(r,i)?o=null:s!==null&&cm(r,s)&&(e.flags|=32),tw(t,e),Sn(t,e,o,n),e.child;case 6:return t===null&&pm(e),null;case 13:return rw(t,e,n);case 4:return ig(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Fa(e,null,r,n):Sn(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Pr(r,i),S_(t,e,r,i,n);case 7:return Sn(t,e,e.pendingProps,n),e.child;case 8:return Sn(t,e,e.pendingProps.children,n),e.child;case 12:return Sn(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,pt(Dd,r._currentValue),r._currentValue=o,s!==null)if(Hr(s.value,o)){if(s.children===i.children&&!Nn.current){e=Di(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Ci(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),mm(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(be(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),mm(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Sn(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Ea(e,n),i=wr(i),r=r(i),e.flags|=1,Sn(t,e,r,n),e.child;case 14:return r=e.type,i=Pr(r,e.pendingProps),i=Pr(r.type,i),w_(t,e,r,i,n);case 15:return QS(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Pr(r,i),id(t,e),e.tag=1,Ln(r)?(t=!0,Ad(e)):t=!1,Ea(e,n),KS(e,r,i),vm(e,r,i,n),ym(null,e,r,!0,t,n);case 19:return iw(t,e,n);case 22:return ew(t,e,n)}throw Error(be(156,e.tag))};function yw(t,e){return X1(t,e)}function jC(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mr(t,e,n,r){return new jC(t,e,n,r)}function xg(t){return t=t.prototype,!(!t||!t.isReactComponent)}function XC(t){if(typeof t=="function")return xg(t)?1:0;if(t!=null){if(t=t.$$typeof,t===F0)return 11;if(t===z0)return 14}return 2}function _s(t,e){var n=t.alternate;return n===null?(n=mr(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function ad(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")xg(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case sa:return co(n.children,i,s,e);case k0:o=8,i|=8;break;case Vp:return t=mr(12,n,e,i|2),t.elementType=Vp,t.lanes=s,t;case Hp:return t=mr(13,n,e,i),t.elementType=Hp,t.lanes=s,t;case Gp:return t=mr(19,n,e,i),t.elementType=Gp,t.lanes=s,t;case P1:return Ef(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case A1:o=10;break e;case R1:o=9;break e;case F0:o=11;break e;case z0:o=14;break e;case Qi:o=16,r=null;break e}throw Error(be(130,t==null?t:typeof t,""))}return e=mr(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function co(t,e,n,r){return t=mr(7,t,r,e),t.lanes=n,t}function Ef(t,e,n,r){return t=mr(22,t,r,e),t.elementType=P1,t.lanes=n,t.stateNode={isHidden:!1},t}function Ph(t,e,n){return t=mr(6,t,null,e),t.lanes=n,t}function Dh(t,e,n){return e=mr(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function YC(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=dh(0),this.expirationTimes=dh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function yg(t,e,n,r,i,s,o,a,l){return t=new YC(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=mr(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rg(s),t}function qC(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ia,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function Sw(t){if(!t)return Ms;t=t._reactInternals;e:{if(Do(t)!==t||t.tag!==1)throw Error(be(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Ln(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(be(171))}if(t.tag===1){var n=t.type;if(Ln(n))return SS(t,n,e)}return e}function ww(t,e,n,r,i,s,o,a,l){return t=yg(n,r,!0,t,i,s,o,a,l),t.context=Sw(null),n=t.current,r=Mn(),i=vs(n),s=Ci(r,i),s.callback=e??null,ms(n,s,i),t.current.lanes=i,Nc(t,i,r),In(t,r),t}function Mf(t,e,n,r){var i=e.current,s=Mn(),o=vs(i);return n=Sw(n),e.context===null?e.context=n:e.pendingContext=n,e=Ci(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=ms(i,e,o),t!==null&&(zr(t,i,o,s),td(t,i,o)),o}function Vd(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function I_(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Sg(t,e){I_(t,e),(t=t.alternate)&&I_(t,e)}function KC(){return null}var bw=typeof reportError=="function"?reportError:function(t){console.error(t)};function wg(t){this._internalRoot=t}Tf.prototype.render=wg.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(be(409));Mf(t,e,null,null)};Tf.prototype.unmount=wg.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;So(function(){Mf(null,t,null,null)}),e[Ri]=null}};function Tf(t){this._internalRoot=t}Tf.prototype.unstable_scheduleHydration=function(t){if(t){var e=eS();t={blockedOn:null,target:t,priority:e};for(var n=0;n<ts.length&&e!==0&&e<ts[n].priority;n++);ts.splice(n,0,t),n===0&&nS(t)}};function bg(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Cf(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function O_(){}function ZC(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Vd(o);s.call(c)}}var o=ww(e,r,t,0,null,!1,!1,"",O_);return t._reactRootContainer=o,t[Ri]=o.current,lc(t.nodeType===8?t.parentNode:t),So(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=Vd(l);a.call(c)}}var l=yg(t,0,!1,null,null,!1,!1,"",O_);return t._reactRootContainer=l,t[Ri]=l.current,lc(t.nodeType===8?t.parentNode:t),So(function(){Mf(e,l,n,r)}),l}function Af(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Vd(o);a.call(l)}}Mf(e,o,t,i)}else o=ZC(n,e,t,i,r);return Vd(o)}J1=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Ll(e.pendingLanes);n!==0&&(H0(e,n|1),In(e,kt()),!(rt&6)&&(Va=kt()+500,Ns()))}break;case 13:So(function(){var r=Pi(t,1);if(r!==null){var i=Mn();zr(r,t,1,i)}}),Sg(t,1)}};G0=function(t){if(t.tag===13){var e=Pi(t,134217728);if(e!==null){var n=Mn();zr(e,t,134217728,n)}Sg(t,134217728)}};Q1=function(t){if(t.tag===13){var e=vs(t),n=Pi(t,e);if(n!==null){var r=Mn();zr(n,t,e,r)}Sg(t,e)}};eS=function(){return lt};tS=function(t,e){var n=lt;try{return lt=t,e()}finally{lt=n}};Qp=function(t,e,n){switch(e){case"input":if(jp(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=_f(r);if(!i)throw Error(be(90));N1(r),jp(r,i)}}}break;case"textarea":I1(t,n);break;case"select":e=n.value,e!=null&&ya(t,!!n.multiple,e,!1)}};V1=gg;H1=So;var JC={usingClientEntryPoint:!1,Events:[Ic,ca,_f,z1,B1,gg]},yl={findFiberByHostInstance:to,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},QC={bundleType:yl.bundleType,version:yl.version,rendererPackageName:yl.rendererPackageName,rendererConfig:yl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ki.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=$1(t),t===null?null:t.stateNode},findFiberByHostInstance:yl.findFiberByHostInstance||KC,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hu.isDisabled&&hu.supportsFiber)try{pf=hu.inject(QC),si=hu}catch{}}or.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=JC;or.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bg(e))throw Error(be(200));return qC(t,e,null,n)};or.createRoot=function(t,e){if(!bg(t))throw Error(be(299));var n=!1,r="",i=bw;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=yg(t,1,!1,null,null,n,!1,r,i),t[Ri]=e.current,lc(t.nodeType===8?t.parentNode:t),new wg(e)};or.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(be(188)):(t=Object.keys(t).join(","),Error(be(268,t)));return t=$1(e),t=t===null?null:t.stateNode,t};or.flushSync=function(t){return So(t)};or.hydrate=function(t,e,n){if(!Cf(e))throw Error(be(200));return Af(null,t,e,!0,n)};or.hydrateRoot=function(t,e,n){if(!bg(t))throw Error(be(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=bw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=ww(e,null,t,1,n??null,i,!1,s,o),t[Ri]=e.current,lc(t),r)for(t=0;t"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ew)}catch(t){console.error(t)}}Ew(),E1.exports=or;var Rf=E1.exports;const ga=tl(Rf);var U_=Rf;zp.createRoot=U_.createRoot,zp.hydrateRoot=U_.hydrateRoot;var Mw={exports:{}},Tw={};/** * @license React * use-sync-external-store-shim.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 Ha=D;function eA(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var tA=typeof Object.is=="function"?Object.is:eA,nA=Ha.useState,rA=Ha.useEffect,iA=Ha.useLayoutEffect,sA=Ha.useDebugValue;function oA(t,e){var n=e(),r=nA({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return iA(function(){i.value=n,i.getSnapshot=e,Nh(i)&&s({inst:i})},[t,n,e]),rA(function(){return Nh(i)&&s({inst:i}),t(function(){Nh(i)&&s({inst:i})})},[t]),sA(n),n}function Nh(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!tA(t,n)}catch{return!0}}function aA(t,e){return e()}var lA=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?aA:oA;Tw.useSyncExternalStore=Ha.useSyncExternalStore!==void 0?Ha.useSyncExternalStore:lA;Mw.exports=Tw;var Eg=Mw.exports;const os=()=>{},Tt=os(),Ta=Object,Ne=t=>t===Tt,wn=t=>typeof t=="function",On=(t,e)=>({...t,...e}),cA=t=>wn(t.then),pu=new WeakMap;let uA=0;const vc=t=>{const e=typeof t,n=t&&t.constructor,r=n==Date;let i,s;if(Ta(t)===t&&!r&&n!=RegExp){if(i=pu.get(t),i)return i;if(i=++uA+"~",pu.set(t,i),n==Array){for(i="@",s=0;sPf&&typeof window.requestAnimationFrame!=Mg,Df=(t,e)=>{const n=Or.get(t);return[()=>!Ne(e)&&t.get(e)||Lh,r=>{if(!Ne(e)){const i=t.get(e);e in mu||(mu[e]=i),n[5](e,On(i,r),i||Lh)}},n[6],()=>!Ne(e)&&e in mu?mu[e]:!Ne(e)&&t.get(e)||Lh]};let Lm=!0;const fA=()=>Lm,[Im,Om]=Pf&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[os,os],hA=()=>{const t=Nm&&document.visibilityState;return Ne(t)||t!=="hidden"},pA=t=>(Nm&&document.addEventListener("visibilitychange",t),Im("focus",t),()=>{Nm&&document.removeEventListener("visibilitychange",t),Om("focus",t)}),mA=t=>{const e=()=>{Lm=!0,t()},n=()=>{Lm=!1};return Im("online",e),Im("offline",n),()=>{Om("online",e),Om("offline",n)}},gA={isOnline:fA,isVisible:hA},vA={initFocus:pA,initReconnect:mA},wo=!ge.useId,Ni=!Pf||"Deno"in window,Tg=t=>dA()?window.requestAnimationFrame(t):setTimeout(t,1),yr=Ni?D.useEffect:D.useLayoutEffect,Ih=typeof navigator{if(wn(t))try{t=t()}catch{t=""}const e=t;return t=typeof t=="string"?t:(Array.isArray(t)?t.length:t)?vc(t):"",[t,e]};let _A=0;const bo=()=>++_A,Cw=0,Aw=1,Rw=2,xA=3;var bn={__proto__:null,ERROR_REVALIDATE_EVENT:xA,FOCUS_EVENT:Cw,MUTATE_EVENT:Rw,RECONNECT_EVENT:Aw};async function Nf(...t){const[e,n,r,i]=t,s=On({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let o=s.populateCache;const a=s.rollbackOnError;let l=s.optimisticData;const c=d=>typeof a=="function"?a(d):a!==!1,u=s.throwOnError;if(wn(n)){const d=n,m=[],v=e.keys();for(const p of v)!/^\$(inf|sub)\$/.test(p)&&d(e.get(p)._k)&&m.push(p);return Promise.all(m.map(h))}return h(n);async function h(d){const[m]=sl(d);if(!m)return;const[v,p]=Df(e,m),[g,f,x,_]=Or.get(e),y=()=>{const H=g[m];return(wn(s.revalidate)?s.revalidate(v().data,d):s.revalidate!==!1)&&(delete x[m],delete _[m],H&&H[0])?H[0](Rw).then(()=>v().data):v().data};if(t.length{M=H}),S!==f[m][0]){if(M)throw M;return T}else M&&b&&c(M)&&(o=!0,p({data:z,_c:Tt}));if(o&&!M)if(wn(o)){const H=o(T,z);p({data:H,error:Tt,_c:Tt})}else p({data:T,error:Tt,_c:Tt});if(f[m][1]=bo(),Promise.resolve(y()).then(()=>{p({_c:Tt})}),M){if(u)throw M;return}return T}}const F_=(t,e)=>{for(const n in t)t[n][0]&&t[n][0](e)},Pw=(t,e)=>{if(!Or.has(t)){const n=On(vA,e),r={},i=Nf.bind(Tt,t);let s=os;const o={},a=(u,h)=>{const d=o[u]||[];return o[u]=d,d.push(h),()=>d.splice(d.indexOf(h),1)},l=(u,h,d)=>{t.set(u,h);const m=o[u];if(m)for(const v of m)v(h,d)},c=()=>{if(!Or.has(t)&&(Or.set(t,[r,{},{},{},i,l,a]),!Ni)){const u=n.initFocus(setTimeout.bind(Tt,F_.bind(Tt,r,Cw))),h=n.initReconnect(setTimeout.bind(Tt,F_.bind(Tt,r,Aw)));s=()=>{u&&u(),h&&h(),Or.delete(t)}}};return c(),[t,i,c,s]}return[t,Or.get(t)[4]]},yA=(t,e,n,r,i)=>{const s=n.errorRetryCount,o=i.retryCount,a=~~((Math.random()+.5)*(1<<(os||setTimeout(r,a,i)},SA=(t,e)=>vc(t)==vc(e),[Cg,wA]=Pw(new Map),Lf=On({onLoadingSlow:os,onSuccess:os,onError:os,onErrorRetry:yA,onDiscarded:os,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:k_?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:k_?5e3:3e3,compare:SA,isPaused:()=>!1,cache:Cg,mutate:wA,fallback:{}},gA),Dw=(t,e)=>{const n=On(t,e);if(e){const{use:r,fallback:i}=t,{use:s,fallback:o}=e;r&&s&&(n.use=r.concat(s)),i&&o&&(n.fallback=On(i,o))}return n},Um=D.createContext({}),Ag=t=>{const{value:e}=t,n=D.useContext(Um),r=wn(e),i=D.useMemo(()=>r?e(n):e,[r,n,e]),s=D.useMemo(()=>r?i:Dw(n,i),[r,n,i]),o=i&&i.provider,a=D.useRef(Tt);o&&!a.current&&(a.current=Pw(o(s.cache||Cg),i));const l=a.current;return l&&(s.cache=l[0],s.mutate=l[1]),yr(()=>{if(l)return l[2]&&l[2](),l[3]},[]),D.createElement(Um.Provider,On(t,{value:s}))},bA="$inf$",Nw=Pf&&window.__SWR_DEVTOOLS_USE__,EA=Nw?window.__SWR_DEVTOOLS_USE__:[],MA=()=>{Nw&&(window.__SWR_DEVTOOLS_REACT__=ge)},Lw=t=>wn(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(t[1]===null?t[2]:t[1])||{}],Iw=()=>On(Lf,D.useContext(Um)),TA=t=>(e,n,r)=>t(e,n&&((...s)=>{const[o]=sl(e),[,,,a]=Or.get(Cg);if(o.startsWith(bA))return n(...s);const l=a[o];return Ne(l)?n(...s):(delete a[o],l)}),r),CA=EA.concat(TA),Rg=t=>function(...n){const r=Iw(),[i,s,o]=Lw(n),a=Dw(r,o);let l=t;const{use:c}=a,u=(c||[]).concat(CA);for(let h=u.length;h--;)l=u[h](l);return l(i,s||a.fetcher||null,a)},Pg=(t,e,n)=>{const r=e[t]||(e[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}},Ow=(t,e)=>(...n)=>{const[r,i,s]=Lw(n),o=(s.use||[]).concat(e);return t(r,i,{...s,use:o})};MA();const z_=ge.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)}),Oh={dedupe:!0},AA=(t,e,n)=>{const{cache:r,compare:i,suspense:s,fallbackData:o,revalidateOnMount:a,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:h,keepPreviousData:d}=n,[m,v,p,g]=Or.get(r),[f,x]=sl(t),_=D.useRef(!1),y=D.useRef(!1),T=D.useRef(f),M=D.useRef(e),S=D.useRef(n),b=()=>S.current,E=()=>b().isVisible()&&b().isOnline(),[w,R,z,H]=Df(r,f),B=D.useRef({}).current,V=Ne(o)?n.fallback[f]:o,I=(U,j)=>{for(const ce in B){const ie=ce;if(ie==="data"){if(!i(U[ie],j[ie])&&(!Ne(U[ie])||!i(Q,j[ie])))return!1}else if(j[ie]!==U[ie])return!1}return!0},F=D.useMemo(()=>{const U=!f||!e?!1:Ne(a)?b().isPaused()||s?!1:Ne(l)?!0:l:a,j=Se=>{const N=On(Se);return delete N._k,U?{isValidating:!0,isLoading:!0,...N}:N},ce=w(),ie=H(),Ee=j(ce),Ae=ce===ie?Ee:j(ie);let pe=Ee;return[()=>{const Se=j(w());return I(Se,pe)?(pe.data=Se.data,pe.isLoading=Se.isLoading,pe.isValidating=Se.isValidating,pe.error=Se.error,pe):(pe=Se,Se)},()=>Ae]},[r,f]),A=Eg.useSyncExternalStore(D.useCallback(U=>z(f,(j,ce)=>{I(ce,j)||U()}),[r,f]),F[0],F[1]),G=!_.current,Y=m[f]&&m[f].length>0,W=A.data,J=Ne(W)?V:W,me=A.error,$=D.useRef(J),Q=d?Ne(W)?$.current:W:J,le=Y&&!Ne(me)?!1:G&&!Ne(a)?a:b().isPaused()?!1:s?Ne(J)?!1:l:Ne(J)||l,he=!!(f&&e&&G&&le),Pe=Ne(A.isValidating)?he:A.isValidating,Le=Ne(A.isLoading)?he:A.isLoading,Me=D.useCallback(async U=>{const j=M.current;if(!f||!j||y.current||b().isPaused())return!1;let ce,ie,Ee=!0;const Ae=U||{},pe=!p[f]||!Ae.dedupe,Se=()=>wo?!y.current&&f===T.current&&_.current:f===T.current,N={isValidating:!1,isLoading:!1},C=()=>{R(N)},Z=()=>{const re=p[f];re&&re[1]===ie&&delete p[f]},ue={isValidating:!0};Ne(w().data)&&(ue.isLoading=!0);try{if(pe&&(R(ue),n.loadingTimeout&&Ne(w().data)&&setTimeout(()=>{Ee&&Se()&&b().onLoadingSlow(f,n)},n.loadingTimeout),p[f]=[j(x),bo()]),[ce,ie]=p[f],ce=await ce,pe&&setTimeout(Z,n.dedupingInterval),!p[f]||p[f][1]!==ie)return pe&&Se()&&b().onDiscarded(f),!1;N.error=Tt;const re=v[f];if(!Ne(re)&&(ie<=re[0]||ie{const de=m[f];de&&de[0]&&de[0](bn.ERROR_REVALIDATE_EVENT,oe)},{retryCount:(Ae.retryCount||0)+1,dedupe:!0})))}return Ee=!1,C(),!0},[f,r]),O=D.useCallback((...U)=>Nf(r,T.current,...U),[]);if(yr(()=>{M.current=e,S.current=n,Ne(W)||($.current=W)}),yr(()=>{if(!f)return;const U=Me.bind(Tt,Oh);let j=0;const ie=Pg(f,m,(Ee,Ae={})=>{if(Ee==bn.FOCUS_EVENT){const pe=Date.now();b().revalidateOnFocus&&pe>j&&E()&&(j=pe+b().focusThrottleInterval,U())}else if(Ee==bn.RECONNECT_EVENT)b().revalidateOnReconnect&&E()&&U();else{if(Ee==bn.MUTATE_EVENT)return Me();if(Ee==bn.ERROR_REVALIDATE_EVENT)return Me(Ae)}});return y.current=!1,T.current=f,_.current=!0,R({_k:x}),le&&(Ne(J)||Ni?U():Tg(U)),()=>{y.current=!0,ie()}},[f]),yr(()=>{let U;function j(){const ie=wn(c)?c(w().data):c;ie&&U!==-1&&(U=setTimeout(ce,ie))}function ce(){!w().error&&(u||b().isVisible())&&(h||b().isOnline())?Me(Oh).then(j):j()}return j(),()=>{U&&(clearTimeout(U),U=-1)}},[c,u,h,f]),D.useDebugValue(Q),s&&Ne(J)&&f){if(!wo&&Ni)throw new Error("Fallback data is required when using suspense in SSR.");M.current=e,S.current=n,y.current=!1;const U=g[f];if(!Ne(U)){const j=O(U);z_(j)}if(Ne(me)){const j=Me(Oh);Ne(Q)||(j.status="fulfilled",j.value=!0),z_(j)}else throw me}return{mutate:O,get data(){return B.data=!0,Q},get error(){return B.error=!0,me},get isValidating(){return B.isValidating=!0,Pe},get isLoading(){return B.isLoading=!0,Le}}},RA=Ta.defineProperty(Ag,"defaultValue",{value:Lf}),Sl=Rg(AA);var PA=t=>{switch(t){case"success":return LA;case"info":return OA;case"warning":return IA;case"error":return UA;default:return null}},DA=Array(12).fill(0),NA=({visible:t})=>ge.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},ge.createElement("div",{className:"sonner-spinner"},DA.map((e,n)=>ge.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),LA=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ge.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),IA=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ge.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),OA=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ge.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),UA=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ge.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),kA=()=>{let[t,e]=ge.useState(document.hidden);return ge.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},km=1,FA=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,i=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:km++,s=this.toasts.find(a=>a.id===i),o=t.dismissible===void 0?!0:t.dismissible;return s?this.toasts=this.toasts.map(a=>a.id===i?(this.publish({...a,...t,id:i,title:n}),{...a,...t,id:i,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),i=n!==void 0;return r.then(async s=>{if(BA(s)&&!s.ok){i=!1;let o=typeof e.error=="function"?await e.error(`HTTP error! status: ${s.status}`):e.error,a=typeof e.description=="function"?await e.description(`HTTP error! status: ${s.status}`):e.description;this.create({id:n,type:"error",message:o,description:a})}else if(e.success!==void 0){i=!1;let o=typeof e.success=="function"?await e.success(s):e.success,a=typeof e.description=="function"?await e.description(s):e.description;this.create({id:n,type:"success",message:o,description:a})}}).catch(async s=>{if(e.error!==void 0){i=!1;let o=typeof e.error=="function"?await e.error(s):e.error,a=typeof e.description=="function"?await e.description(s):e.description;this.create({id:n,type:"error",message:o,description:a})}}).finally(()=>{var s;i&&(this.dismiss(n),n=void 0),(s=e.finally)==null||s.call(e)}),n},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||km++;return this.create({jsx:t(n),id:n,...e}),n},this.subscribers=[],this.toasts=[]}},Yn=new FA,zA=(t,e)=>{let n=(e==null?void 0:e.id)||km++;return Yn.addToast({title:t,...e,id:n}),n},BA=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",VA=zA,HA=()=>Yn.toasts,GA=Object.assign(VA,{success:Yn.success,info:Yn.info,warning:Yn.warning,error:Yn.error,custom:Yn.custom,message:Yn.message,promise:Yn.promise,dismiss:Yn.dismiss,loading:Yn.loading},{getHistory:HA});function WA(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}WA(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} `);function gu(t){return t.label!==void 0}var $A=3,jA="32px",XA=4e3,YA=356,qA=14,KA=20,ZA=200;function JA(...t){return t.filter(Boolean).join(" ")}var QA=t=>{var e,n,r,i,s,o,a,l,c,u;let{invert:h,toast:d,unstyled:m,interacting:v,setHeights:p,visibleToasts:g,heights:f,index:x,toasts:_,expanded:y,removeToast:T,defaultRichColors:M,closeButton:S,style:b,cancelButtonStyle:E,actionButtonStyle:w,className:R="",descriptionClassName:z="",duration:H,position:B,gap:V,loadingIcon:I,expandByDefault:F,classNames:A,icons:G,closeButtonAriaLabel:Y="Close toast",pauseWhenPageIsHidden:W,cn:J}=t,[me,$]=ge.useState(!1),[Q,le]=ge.useState(!1),[he,Pe]=ge.useState(!1),[Le,Me]=ge.useState(!1),[O,U]=ge.useState(0),[j,ce]=ge.useState(0),ie=ge.useRef(null),Ee=ge.useRef(null),Ae=x===0,pe=x+1f.findIndex(k=>k.toastId===d.id)||0,[f,d.id]),re=ge.useMemo(()=>{var k;return(k=d.closeButton)!=null?k:S},[d.closeButton,S]),q=ge.useMemo(()=>d.duration||H||XA,[d.duration,H]),_e=ge.useRef(0),oe=ge.useRef(0),de=ge.useRef(0),ze=ge.useRef(null),[ve,ye]=B.split("-"),Te=ge.useMemo(()=>f.reduce((k,xe,te)=>te>=ue?k:k+xe.height,0),[f,ue]),Fe=kA(),Re=d.invert||h,We=Se==="loading";oe.current=ge.useMemo(()=>ue*V+Te,[ue,Te]),ge.useEffect(()=>{$(!0)},[]),ge.useLayoutEffect(()=>{if(!me)return;let k=Ee.current,xe=k.style.height;k.style.height="auto";let te=k.getBoundingClientRect().height;k.style.height=xe,ce(te),p(fe=>fe.find(we=>we.toastId===d.id)?fe.map(we=>we.toastId===d.id?{...we,height:te}:we):[{toastId:d.id,height:te,position:d.position},...fe])},[me,d.title,d.description,p,d.id]);let $e=ge.useCallback(()=>{le(!0),U(oe.current),p(k=>k.filter(xe=>xe.toastId!==d.id)),setTimeout(()=>{T(d)},ZA)},[d,T,p,oe]);ge.useEffect(()=>{if(d.promise&&Se==="loading"||d.duration===1/0||d.type==="loading")return;let k,xe=q;return y||v||W&&Fe?(()=>{if(de.current{var te;(te=d.onAutoClose)==null||te.call(d,d),$e()},xe)),()=>clearTimeout(k)},[y,v,F,d,q,$e,d.promise,Se,W,Fe]),ge.useEffect(()=>{let k=Ee.current;if(k){let xe=k.getBoundingClientRect().height;return ce(xe),p(te=>[{toastId:d.id,height:xe,position:d.position},...te]),()=>p(te=>te.filter(fe=>fe.toastId!==d.id))}},[p,d.id]),ge.useEffect(()=>{d.delete&&$e()},[$e,d.delete]);function gt(){return G!=null&&G.loading?ge.createElement("div",{className:"sonner-loader","data-visible":Se==="loading"},G.loading):I?ge.createElement("div",{className:"sonner-loader","data-visible":Se==="loading"},I):ge.createElement(NA,{visible:Se==="loading"})}return ge.createElement("li",{"aria-live":d.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Ee,className:J(R,C,A==null?void 0:A.toast,(e=d==null?void 0:d.classNames)==null?void 0:e.toast,A==null?void 0:A.default,A==null?void 0:A[Se],(n=d==null?void 0:d.classNames)==null?void 0:n[Se]),"data-sonner-toast":"","data-rich-colors":(r=d.richColors)!=null?r:M,"data-styled":!(d.jsx||d.unstyled||m),"data-mounted":me,"data-promise":!!d.promise,"data-removed":Q,"data-visible":pe,"data-y-position":ve,"data-x-position":ye,"data-index":x,"data-front":Ae,"data-swiping":he,"data-dismissible":N,"data-type":Se,"data-invert":Re,"data-swipe-out":Le,"data-expanded":!!(y||F&&me),style:{"--index":x,"--toasts-before":x,"--z-index":_.length-x,"--offset":`${Q?O:oe.current}px`,"--initial-height":F?"auto":`${j}px`,...b,...d.style},onPointerDown:k=>{We||!N||(ie.current=new Date,U(oe.current),k.target.setPointerCapture(k.pointerId),k.target.tagName!=="BUTTON"&&(Pe(!0),ze.current={x:k.clientX,y:k.clientY}))},onPointerUp:()=>{var k,xe,te,fe;if(Le||!N)return;ze.current=null;let we=Number(((k=Ee.current)==null?void 0:k.style.getPropertyValue("--swipe-amount").replace("px",""))||0),He=new Date().getTime()-((xe=ie.current)==null?void 0:xe.getTime()),nt=Math.abs(we)/He;if(Math.abs(we)>=KA||nt>.11){U(oe.current),(te=d.onDismiss)==null||te.call(d,d),$e(),Me(!0);return}(fe=Ee.current)==null||fe.style.setProperty("--swipe-amount","0px"),Pe(!1)},onPointerMove:k=>{var xe;if(!ze.current||!N)return;let te=k.clientY-ze.current.y,fe=k.clientX-ze.current.x,we=(ve==="top"?Math.min:Math.max)(0,te),He=k.pointerType==="touch"?10:2;Math.abs(we)>He?(xe=Ee.current)==null||xe.style.setProperty("--swipe-amount",`${te}px`):Math.abs(fe)>He&&(ze.current=null)}},re&&!d.jsx?ge.createElement("button",{"aria-label":Y,"data-disabled":We,"data-close-button":!0,onClick:We||!N?()=>{}:()=>{var k;$e(),(k=d.onDismiss)==null||k.call(d,d)},className:J(A==null?void 0:A.closeButton,(i=d==null?void 0:d.classNames)==null?void 0:i.closeButton)},ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ge.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ge.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,d.jsx||ge.isValidElement(d.title)?d.jsx||d.title:ge.createElement(ge.Fragment,null,Se||d.icon||d.promise?ge.createElement("div",{"data-icon":"",className:J(A==null?void 0:A.icon,(s=d==null?void 0:d.classNames)==null?void 0:s.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||gt():null,d.type!=="loading"?d.icon||(G==null?void 0:G[Se])||PA(Se):null):null,ge.createElement("div",{"data-content":"",className:J(A==null?void 0:A.content,(o=d==null?void 0:d.classNames)==null?void 0:o.content)},ge.createElement("div",{"data-title":"",className:J(A==null?void 0:A.title,(a=d==null?void 0:d.classNames)==null?void 0:a.title)},d.title),d.description?ge.createElement("div",{"data-description":"",className:J(z,Z,A==null?void 0:A.description,(l=d==null?void 0:d.classNames)==null?void 0:l.description)},d.description):null),ge.isValidElement(d.cancel)?d.cancel:d.cancel&&gu(d.cancel)?ge.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||E,onClick:k=>{var xe,te;gu(d.cancel)&&N&&((te=(xe=d.cancel).onClick)==null||te.call(xe,k),$e())},className:J(A==null?void 0:A.cancelButton,(c=d==null?void 0:d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,ge.isValidElement(d.action)?d.action:d.action&&gu(d.action)?ge.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||w,onClick:k=>{var xe,te;gu(d.action)&&(k.defaultPrevented||((te=(xe=d.action).onClick)==null||te.call(xe,k),$e()))},className:J(A==null?void 0:A.actionButton,(u=d==null?void 0:d.classNames)==null?void 0:u.actionButton)},d.action.label):null))};function B_(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var eR=t=>{let{invert:e,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:i,closeButton:s,className:o,offset:a,theme:l="light",richColors:c,duration:u,style:h,visibleToasts:d=$A,toastOptions:m,dir:v=B_(),gap:p=qA,loadingIcon:g,icons:f,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:_,cn:y=JA}=t,[T,M]=ge.useState([]),S=ge.useMemo(()=>Array.from(new Set([n].concat(T.filter(W=>W.position).map(W=>W.position)))),[T,n]),[b,E]=ge.useState([]),[w,R]=ge.useState(!1),[z,H]=ge.useState(!1),[B,V]=ge.useState(l!=="system"?l:typeof window{var J;(J=T.find(me=>me.id===W.id))!=null&&J.delete||Yn.dismiss(W.id),M(me=>me.filter(({id:$})=>$!==W.id))},[T]);return ge.useEffect(()=>Yn.subscribe(W=>{if(W.dismiss){M(J=>J.map(me=>me.id===W.id?{...me,delete:!0}:me));return}setTimeout(()=>{ga.flushSync(()=>{M(J=>{let me=J.findIndex($=>$.id===W.id);return me!==-1?[...J.slice(0,me),{...J[me],...W},...J.slice(me+1)]:[W,...J]})})})}),[]),ge.useEffect(()=>{if(l!=="system"){V(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window{V(W?"dark":"light")})},[l]),ge.useEffect(()=>{T.length{let W=J=>{var me,$;r.every(Q=>J[Q]||J.code===Q)&&(R(!0),(me=I.current)==null||me.focus()),J.code==="Escape"&&(document.activeElement===I.current||($=I.current)!=null&&$.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[r]),ge.useEffect(()=>{if(I.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,G.current=!1)}},[I.current]),T.length?ge.createElement("section",{"aria-label":`${x} ${F}`,tabIndex:-1},S.map((W,J)=>{var me;let[$,Q]=W.split("-");return ge.createElement("ol",{key:W,dir:v==="auto"?B_():v,tabIndex:-1,ref:I,className:o,"data-sonner-toaster":!0,"data-theme":B,"data-y-position":$,"data-x-position":Q,style:{"--front-toast-height":`${((me=b[0])==null?void 0:me.height)||0}px`,"--offset":typeof a=="number"?`${a}px`:a||jA,"--width":`${YA}px`,"--gap":`${p}px`,...h},onBlur:le=>{G.current&&!le.currentTarget.contains(le.relatedTarget)&&(G.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||G.current||(G.current=!0,A.current=le.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{z||R(!1)},onPointerDown:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},T.filter(le=>!le.position&&J===0||le.position===W).map((le,he)=>{var Pe,Le;return ge.createElement(QA,{key:le.id,icons:f,index:he,toast:le,defaultRichColors:c,duration:(Pe=m==null?void 0:m.duration)!=null?Pe:u,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:e,visibleToasts:d,closeButton:(Le=m==null?void 0:m.closeButton)!=null?Le:s,interacting:z,position:W,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:Y,toasts:T.filter(Me=>Me.position==le.position),heights:b.filter(Me=>Me.position==le.position),setHeights:E,expandByDefault:i,gap:p,loadingIcon:g,expanded:w,pauseWhenPageIsHidden:_,cn:y})}))})):null},Uw={exports:{}};(function(t,e){(function(){function n(){var r=window,i=document;if("scrollBehavior"in i.documentElement.style&&r.__forceSmoothScrollPolyfill__!==!0)return;var s=r.HTMLElement||r.Element,o=468,a={scroll:r.scroll||r.scrollTo,scrollBy:r.scrollBy,elementScroll:s.prototype.scroll||h,scrollIntoView:s.prototype.scrollIntoView},l=r.performance&&r.performance.now?r.performance.now.bind(r.performance):Date.now;function c(y){var T=["MSIE ","Trident/","Edge/"];return new RegExp(T.join("|")).test(y)}var u=c(r.navigator.userAgent)?1:0;function h(y,T){this.scrollLeft=y,this.scrollTop=T}function d(y){return .5*(1-Math.cos(Math.PI*y))}function m(y){if(y===null||typeof y!="object"||y.behavior===void 0||y.behavior==="auto"||y.behavior==="instant")return!0;if(typeof y=="object"&&y.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+y.behavior+" is not a valid value for enumeration ScrollBehavior.")}function v(y,T){if(T==="Y")return y.clientHeight+u<y.scrollHeight;if(T==="X")return y.clientWidth+u1?1:E,M=d(E),S=y.startX+(y.x-y.startX)*M,b=y.startY+(y.y-y.startY)*M,y.method.call(y.scrollable,S,b),(S!==y.x||b!==y.y)&&r.requestAnimationFrame(x.bind(r,y))}function _(y,T,M){var S,b,E,w,R=l();y===i.body?(S=r,b=r.scrollX||r.pageXOffset,E=r.scrollY||r.pageYOffset,w=a.scroll):(S=y,b=y.scrollLeft,E=y.scrollTop,w=h),x({scrollable:S,method:w,startTime:R,startX:b,startY:E,x:T,y:M})}r.scroll=r.scrollTo=function(){if(arguments[0]!==void 0){if(m(arguments[0])===!0){a.scroll.call(r,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:r.scrollX||r.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:r.scrollY||r.pageYOffset);return}_.call(r,i.body,arguments[0].left!==void 0?~~arguments[0].left:r.scrollX||r.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:r.scrollY||r.pageYOffset)}},r.scrollBy=function(){if(arguments[0]!==void 0){if(m(arguments[0])){a.scrollBy.call(r,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}_.call(r,i.body,~~arguments[0].left+(r.scrollX||r.pageXOffset),~~arguments[0].top+(r.scrollY||r.pageYOffset))}},s.prototype.scroll=s.prototype.scrollTo=function(){if(arguments[0]!==void 0){if(m(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");a.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}var y=arguments[0].left,T=arguments[0].top;_.call(this,this,typeof y>"u"?this.scrollLeft:~~y,typeof T>"u"?this.scrollTop:~~T)}},s.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(m(arguments[0])===!0){a.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},s.prototype.scrollIntoView=function(){if(m(arguments[0])===!0){a.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}var y=f(this),T=y.getBoundingClientRect(),M=this.getBoundingClientRect();y!==i.body?(_.call(this,y,y.scrollLeft+M.left-T.left,y.scrollTop+M.top-T.top),r.getComputedStyle(y).position!=="fixed"&&r.scrollBy({left:T.left,top:T.top,behavior:"smooth"})):r.scrollBy({left:M.left,top:M.top,behavior:"smooth"})}}t.exports={polyfill:n}})()})(Uw);var tR=Uw.exports;const nR=tl(tR),kw=ge.createContext({}),Fw=!0;function rR({baseColor:t,highlightColor:e,width:n,height:r,borderRadius:i,circle:s,direction:o,duration:a,enableAnimation:l=Fw}){const c={};return o==="rtl"&&(c["--animation-direction"]="reverse"),typeof a=="number"&&(c["--animation-duration"]=`${a}s`),l||(c["--pseudo-element-display"]="none"),(typeof n=="string"||typeof n=="number")&&(c.width=n),(typeof r=="string"||typeof r=="number")&&(c.height=r),(typeof i=="string"||typeof i=="number")&&(c.borderRadius=i),s&&(c.borderRadius="50%"),typeof t<"u"&&(c["--base-color"]=t),typeof e"u"&&delete d[_];const m={...h,...d,circle:s},v={...o,...rR(m)};let p="react-loading-skeleton";n&&(p+=` ${n}`);const g=(l=m.inline)!==null&&l!==void 0?l:!1,f=[],x=Math.ceil(t);for(let _=0;_t&&_===x-1){const M=(c=y.width)!==null&&c!==void 0?c:"100%",S=t%1,b=typeof M=="number"?M*S:`calc(${M} * ${S})`;y={...y,width:b}}const T=ge.createElement("span",{className:p,style:y,key:_},"‌");g?f.push(T):f.push(ge.createElement(ge.Fragment,{key:_},T,ge.createElement("br",null)))}return ge.createElement("span",{className:r,"data-testid":i,"aria-live":"polite","aria-busy":(u=m.enableAnimation)!==null&&u!==void 0?u:Fw},e?f.map((_,y)=>ge.createElement(e,{key:y},_)):f)}function iR({children:t,...e}){return ge.createElement(kw.Provider,{value:e},t)}var zw={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(R0,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",u="week",h="month",d="quarter",m="year",v="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var V=["th","st","nd","rd"],I=B%100;return"["+B+(V[(I-20)%10]||V[I]||V[0])+"]"}},_=function(B,V,I){var F=String(B);return!F||F.length>=V?B:""+Array(V+1-F.length).join(I)+B},y={s:_,z:function(B){var V=-B.utcOffset(),I=Math.abs(V),F=Math.floor(I/60),A=I%60;return(V<=0?"+":"-")+_(F,2,"0")+":"+_(A,2,"0")},m:function B(V,I){if(V.date()<I.date())return-B(I,V);var F=12*(I.year()-V.year())+(I.month()-V.month()),A=V.clone().add(F,h),G=I-A<0,Y=V.clone().add(F+(G?-1:1),h);return+(-(F+(I-A)/(G?A-Y:Y-A))||0)},a:function(B){return B1)return B(Y[0])}else{var W=V.name;M[W]=V,A=W}return!F&&A&&(T=A),A||!F&&T},w=function(B,V){if(b(B))return B.clone();var I=typeof V=="object"?V:{};return I.date=B,I.args=arguments,new z(I)},R=y;R.l=E,R.i=b,R.w=function(B,V){return w(B,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var z=function(){function B(I){this.$L=E(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[S]=!0}var V=B.prototype;return V.parse=function(I){this.$d=function(F){var A=F.date,G=F.utc;if(A===null)return new Date(NaN);if(R.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var Y=A.match(g);if(Y){var W=Y[2]-1||0,J=(Y[7]||"0").substring(0,3);return G?new Date(Date.UTC(Y[1],W,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)):new Date(Y[1],W,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)}}return new Date(A)}(I),this.init()},V.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},V.$utils=function(){return R},V.isValid=function(){return this.$d.toString()!==p},V.isSame=function(I,F){var A=w(I);return this.startOf(F)<=A&&A<=this.endOf(F)},V.isAfter=function(I,F){return w(I)<this.startOf(F)},V.isBefore=function(I,F){return this.endOf(F)<w(I)},V.$g=function(I,F,A){return R.u(I)?this[F]:this.set(A,I)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(I,F){var A=this,G=!!R.u(F)||F,Y=R.p(I),W=function(Le,Me){var O=R.w(A.$u?Date.UTC(A.$y,Me,Le):new Date(A.$y,Me,Le),A);return G?O:O.endOf(c)},J=function(Le,Me){return R.w(A.toDate()[Le].apply(A.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(Me)),A)},me=this.$W,$=this.$M,Q=this.$D,le="set"+(this.$u?"UTC":"");switch(Y){case m:return G?W(1,0):W(31,11);case h:return G?W(1,$):W(0,$+1);case u:var he=this.$locale().weekStart||0,Pe=(me<he?me+7:me)-he;return W(G?Q-Pe:Q+(6-Pe),$);case c:case v:return J(le+"Hours",0);case l:return J(le+"Minutes",1);case a:return J(le+"Seconds",2);case o:return J(le+"Milliseconds",3);default:return this.clone()}},V.endOf=function(I){return this.startOf(I,!1)},V.$set=function(I,F){var A,G=R.p(I),Y="set"+(this.$u?"UTC":""),W=(A={},A[c]=Y+"Date",A[v]=Y+"Date",A[h]=Y+"Month",A[m]=Y+"FullYear",A[l]=Y+"Hours",A[a]=Y+"Minutes",A[o]=Y+"Seconds",A[s]=Y+"Milliseconds",A)[G],J=G===c?this.$D+(F-this.$W):F;if(G===h||G===m){var me=this.clone().set(v,1);me.$d[W](J),me.init(),this.$d=me.set(v,Math.min(this.$D,me.daysInMonth())).$d}else W&&this.$d[W](J);return this.init(),this},V.set=function(I,F){return this.clone().$set(I,F)},V.get=function(I){return this[R.p(I)]()},V.add=function(I,F){var A,G=this;I=Number(I);var Y=R.p(F),W=function($){var Q=w(G);return R.w(Q.date(Q.date()+Math.round($*I)),G)};if(Y===h)return this.set(h,this.$M+I);if(Y===m)return this.set(m,this.$y+I);if(Y===c)return W(1);if(Y===u)return W(7);var J=(A={},A[a]=r,A[l]=i,A[o]=n,A)[Y]||1,me=this.$d.getTime()+I*J;return R.w(me,this)},V.subtract=function(I,F){return this.add(-1*I,F)},V.format=function(I){var F=this,A=this.$locale();if(!this.isValid())return A.invalidDate||p;var G=I||"YYYY-MM-DDTHH:mm:ssZ",Y=R.z(this),W=this.$H,J=this.$m,me=this.$M,$=A.weekdays,Q=A.months,le=A.meridiem,he=function(Me,O,U,j){return Me&&(Me[O]||Me(F,G))||U[O].slice(0,j)},Pe=function(Me){return R.s(W%12||12,Me,"0")},Le=le||function(Me,O,U){var j=Me<12?"AM":"PM";return U?j.toLowerCase():j};return G.replace(f,function(Me,O){return O||function(U){switch(U){case"YY":return String(F.$y).slice(-2);case"YYYY":return R.s(F.$y,4,"0");case"M":return me+1;case"MM":return R.s(me+1,2,"0");case"MMM":return he(A.monthsShort,me,Q,3);case"MMMM":return he(Q,me);case"D":return F.$D;case"DD":return R.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return he(A.weekdaysMin,F.$W,$,2);case"ddd":return he(A.weekdaysShort,F.$W,$,3);case"dddd":return $[F.$W];case"H":return String(W);case"HH":return R.s(W,2,"0");case"h":return Pe(1);case"hh":return Pe(2);case"a":return Le(W,J,!0);case"A":return Le(W,J,!1);case"m":return String(J);case"mm":return R.s(J,2,"0");case"s":return String(F.$s);case"ss":return R.s(F.$s,2,"0");case"SSS":return R.s(F.$ms,3,"0");case"Z":return Y}return null}(Me)||Y.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(I,F,A){var G,Y=this,W=R.p(F),J=w(I),me=(J.utcOffset()-this.utcOffset())*r,$=this-J,Q=function(){return R.m(Y,J)};switch(W){case m:G=Q()/12;break;case h:G=Q();break;case d:G=Q()/3;break;case u:G=($-me)/6048e5;break;case c:G=($-me)/864e5;break;case l:G=$/i;break;case a:G=$/r;break;case o:G=$/n;break;default:G=$}return A?G:R.a(G)},V.daysInMonth=function(){return this.endOf(h).$D},V.$locale=function(){return M[this.$L]},V.locale=function(I,F){if(!I)return this.$L;var A=this.clone(),G=E(I,F,!0);return G&&(A.$L=G),A},V.clone=function(){return R.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},B}(),H=z.prototype;return w.prototype=H,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",c],["$M",h],["$y",m],["$D",v]].forEach(function(B){H[B[1]]=function(V){return this.$g(V,B[0],B[1])}}),w.extend=function(B,V){return B.$i||(B(V,z,w),B.$i=!0),w},w.locale=E,w.isDayjs=b,w.unix=function(B){return w(1e3*B)},w.en=M[T],w.Ls=M,w.p={},w})})(zw);var sR=zw.exports;const Ht=tl(sR);var Bw={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(R0,function(){var n,r,i=1e3,s=6e4,o=36e5,a=864e5,l=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=31536e6,u=2628e6,h=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,d={years:c,months:u,days:a,hours:o,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},m=function(M){return M instanceof y},v=function(M,S,b){return new y(M,b,S.$l)},p=function(M){return r.p(M)+"s"},g=function(M){return M{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)}),Uh={dedupe:!0},lR=(t,e,n)=>{const{cache:r,compare:i,suspense:s,fallbackData:o,revalidateOnMount:a,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:h,keepPreviousData:d}=n,[m,v,p,g]=Or.get(r),[f,x]=sl(t),_=D.useRef(!1),y=D.useRef(!1),T=D.useRef(f),M=D.useRef(e),S=D.useRef(n),b=()=>S.current,E=()=>b().isVisible()&&b().isOnline(),[w,R,z,H]=Df(r,f),B=D.useRef({}).current,V=Ne(o)?n.fallback[f]:o,I=(U,j)=>{for(const ce in B){const ie=ce;if(ie==="data"){if(!i(U[ie],j[ie])&&(!Ne(U[ie])||!i(Q,j[ie])))return!1}else if(j[ie]!==U[ie])return!1}return!0},F=D.useMemo(()=>{const U=!f||!e?!1:Ne(a)?b().isPaused()||s?!1:Ne(l)?!0:l:a,j=Se=>{const N=On(Se);return delete N._k,U?{isValidating:!0,isLoading:!0,...N}:N},ce=w(),ie=H(),Ee=j(ce),Ae=ce===ie?Ee:j(ie);let pe=Ee;return[()=>{const Se=j(w());return I(Se,pe)?(pe.data=Se.data,pe.isLoading=Se.isLoading,pe.isValidating=Se.isValidating,pe.error=Se.error,pe):(pe=Se,Se)},()=>Ae]},[r,f]),A=Eg.useSyncExternalStore(D.useCallback(U=>z(f,(j,ce)=>{I(ce,j)||U()}),[r,f]),F[0],F[1]),G=!_.current,Y=m[f]&&m[f].length>0,W=A.data,J=Ne(W)?V:W,me=A.error,$=D.useRef(J),Q=d?Ne(W)?$.current:W:J,le=Y&&!Ne(me)?!1:G&&!Ne(a)?a:b().isPaused()?!1:s?Ne(J)?!1:l:Ne(J)||l,he=!!(f&&e&&G&&le),Pe=Ne(A.isValidating)?he:A.isValidating,Le=Ne(A.isLoading)?he:A.isLoading,Me=D.useCallback(async U=>{const j=M.current;if(!f||!j||y.current||b().isPaused())return!1;let ce,ie,Ee=!0;const Ae=U||{},pe=!p[f]||!Ae.dedupe,Se=()=>wo?!y.current&&f===T.current&&_.current:f===T.current,N={isValidating:!1,isLoading:!1},C=()=>{R(N)},Z=()=>{const re=p[f];re&&re[1]===ie&&delete p[f]},ue={isValidating:!0};Ne(w().data)&&(ue.isLoading=!0);try{if(pe&&(R(ue),n.loadingTimeout&&Ne(w().data)&&setTimeout(()=>{Ee&&Se()&&b().onLoadingSlow(f,n)},n.loadingTimeout),p[f]=[j(x),bo()]),[ce,ie]=p[f],ce=await ce,pe&&setTimeout(Z,n.dedupingInterval),!p[f]||p[f][1]!==ie)return pe&&Se()&&b().onDiscarded(f),!1;N.error=Tt;const re=v[f];if(!Ne(re)&&(ie<=re[0]||ie{const de=m[f];de&&de[0]&&de[0](bn.ERROR_REVALIDATE_EVENT,oe)},{retryCount:(Ae.retryCount||0)+1,dedupe:!0})))}return Ee=!1,C(),!0},[f,r]),O=D.useCallback((...U)=>Nf(r,T.current,...U),[]);if(yr(()=>{M.current=e,S.current=n,Ne(W)||($.current=W)}),yr(()=>{if(!f)return;const U=Me.bind(Tt,Uh);let j=0;const ie=Pg(f,m,(Ee,Ae={})=>{if(Ee==bn.FOCUS_EVENT){const pe=Date.now();b().revalidateOnFocus&&pe>j&&E()&&(j=pe+b().focusThrottleInterval,U())}else if(Ee==bn.RECONNECT_EVENT)b().revalidateOnReconnect&&E()&&U();else{if(Ee==bn.MUTATE_EVENT)return Me();if(Ee==bn.ERROR_REVALIDATE_EVENT)return Me(Ae)}});return y.current=!1,T.current=f,_.current=!0,R({_k:x}),le&&(Ne(J)||Ni?U():Tg(U)),()=>{y.current=!0,ie()}},[f]),yr(()=>{let U;function j(){const ie=wn(c)?c(w().data):c;ie&&U!==-1&&(U=setTimeout(ce,ie))}function ce(){!w().error&&(u||b().isVisible())&&(h||b().isOnline())?Me(Uh).then(j):j()}return j(),()=>{U&&(clearTimeout(U),U=-1)}},[c,u,h,f]),D.useDebugValue(Q),s&&Ne(J)&&f){if(!wo&&Ni)throw new Error("Fallback data is required when using suspense in SSR.");M.current=e,S.current=n,y.current=!1;const U=g[f];if(!Ne(U)){const j=O(U);V_(j)}if(Ne(me)){const j=Me(Uh);Ne(Q)||(j.status="fulfilled",j.value=!0),V_(j)}else throw me}return{mutate:O,get data(){return B.data=!0,Q},get error(){return B.error=!0,me},get isValidating(){return B.isValidating=!0,Pe},get isLoading(){return B.isLoading=!0,Le}}};Ta.defineProperty(Ag,"defaultValue",{value:Lf});const cR=Rg(lR),H_=wo?t=>{t()}:ge.startTransition,uR=t=>{const[,e]=D.useState({}),n=D.useRef(!1),r=D.useRef(t),i=D.useRef({data:!1,error:!1,isValidating:!1}),s=D.useCallback(o=>{let a=!1;const l=r.current;for(const c in o){const u=c;l[u]!==o[u]&&(l[u]=o[u],i.current[u]&&(a=!0))}a&&!n.current&&e({})},[]);return yr(()=>(n.current=!1,()=>{n.current=!0})),[r,i.current,s]},dR=()=>(t,e,n={})=>{const{mutate:r}=Iw(),i=D.useRef(t),s=D.useRef(e),o=D.useRef(n),a=D.useRef(0),[l,c,u]=uR({data:Tt,error:Tt,isMutating:!1}),h=l.current,d=D.useCallback(async(v,p)=>{const[g,f]=sl(i.current);if(!s.current)throw new Error("Can’t trigger the mutation: missing fetcher.");if(!g)throw new Error("Can’t trigger the mutation: missing key.");const x=On(On({populateCache:!1,throwOnError:!0},o.current),p),_=bo();a.current=_,u({isMutating:!0});try{const y=await r(g,s.current(f,{arg:v}),On(x,{throwOnError:!0}));return a.currentu({data:y,isMutating:!1,error:void 0})),x.onSuccess==null||x.onSuccess.call(x,y,g,x)),y}catch(y){if(a.currentu({error:y,isMutating:!1})),x.onError==null||x.onError.call(x,y,g,x),x.throwOnError))throw y}},[]),m=D.useCallback(()=>{a.current=bo(),u({data:Tt,error:Tt,isMutating:!1})},[]);return yr(()=>{i.current=t,s.current=e,o.current=n}),{trigger:d,reset:m,get data(){return c.data=!0,h.data},get error(){return c.error=!0,h.error},get isMutating(){return c.isMutating=!0,h.isMutating}}},fR=Ow(cR,dR);function zt(){return zt=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(n=>hR(n,e))}function ol(...t){return D.useCallback(Vw(...t),t)}function Hw(t,e=[]){let n=[];function r(s,o){const a=D.createContext(o),l=n.length;n=[...n,o];function c(h){const{scope:d,children:m,...v}=h,p=(d==null?void 0:d[t][l])||a,g=D.useMemo(()=>v,Object.values(v));return D.createElement(p.Provider,{value:g},m)}function u(h,d){const m=(d==null?void 0:d[t][l])||a,v=D.useContext(m);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const i=()=>{const s=n.map(o=>D.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return D.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,pR(i,...e)]}function pR(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const h=l(s)[`__scope${c}`];return{...a,...h}},{});return D.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}const Fm=globalThis!=null&&globalThis.document?D.useLayoutEffect:()=>{},mR=G2.useId||(()=>{});let gR=0;function kh(t){const[e,n]=D.useState(mR());return Fm(()=>{t||n(r=>r??String(gR++))},[t]),t||(e?`radix-${e}`:"")}function Eo(t){const e=D.useRef(t);return D.useEffect(()=>{e.current=t}),D.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function vR({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=_R({defaultProp:e,onChange:n}),s=t!==void 0,o=s?t:r,a=Eo(n),l=D.useCallback(c=>{if(s){const h=typeof c=="function"?c(t):c;h!==t&&a(h)}else i(c)},[s,t,i,a]);return[o,l]}function _R({defaultProp:t,onChange:e}){const n=D.useState(t),[r]=n,i=D.useRef(r),s=Eo(e);return D.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),n}const Dg=D.forwardRef((t,e)=>{const{children:n,...r}=t,i=D.Children.toArray(n),s=i.find(yR);if(s){const o=s.props.children,a=i.map(l=>l===s?D.Children.count(o)>1?D.Children.only(null):D.isValidElement(o)?o.props.children:null:l);return D.createElement(zm,zt({},r,{ref:e}),D.isValidElement(o)?D.cloneElement(o,void 0,a):null)}return D.createElement(zm,zt({},r,{ref:e}),n)});Dg.displayName="Slot";const zm=D.forwardRef((t,e)=>{const{children:n,...r}=t;return D.isValidElement(n)?D.cloneElement(n,{...SR(r,n.props),ref:e?Vw(e,n.ref):n.ref}):D.Children.count(n)>1?D.Children.only(null):null});zm.displayName="SlotClone";const xR=({children:t})=>D.createElement(D.Fragment,null,t);function yR(t){return D.isValidElement(t)&&t.type===xR}function SR(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{s(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}const wR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Fi=wR.reduce((t,e)=>{const n=D.forwardRef((r,i)=>{const{asChild:s,...o}=r,a=s?Dg:e;return D.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),D.createElement(a,zt({},o,{ref:i}))});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function bR(t,e){t&&Rf.flushSync(()=>t.dispatchEvent(e))}function ER(t,e=globalThis==null?void 0:globalThis.document){const n=Eo(t);D.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r),()=>e.removeEventListener("keydown",r)},[n,e])}const Bm="dismissableLayer.update",MR="dismissableLayer.pointerDownOutside",TR="dismissableLayer.focusOutside";let G_;const CR=D.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),AR=D.forwardRef((t,e)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,u=D.useContext(CR),[h,d]=D.useState(null),m=(n=h==null?void 0:h.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,v]=D.useState({}),p=ol(e,b=>d(b)),g=Array.from(u.layers),[f]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(f),_=h?g.indexOf(h):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,T=_>=x,M=RR(b=>{const E=b.target,w=[...u.branches].some(R=>R.contains(E));!T||w||(s==null||s(b),a==null||a(b),b.defaultPrevented||l==null||l())},m),S=PR(b=>{const E=b.target;[...u.branches].some(R=>R.contains(E))||(o==null||o(b),a==null||a(b),b.defaultPrevented||l==null||l())},m);return ER(b=>{_===u.layers.size-1&&(i==null||i(b),!b.defaultPrevented&&l&&(b.preventDefault(),l()))},m),D.useEffect(()=>{if(h)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(G_=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),W_(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=G_)}},[h,m,r,u]),D.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),W_())},[h,u]),D.useEffect(()=>{const b=()=>v({});return document.addEventListener(Bm,b),()=>document.removeEventListener(Bm,b)},[]),D.createElement(Fi.div,zt({},c,{ref:p,style:{pointerEvents:y?T?"auto":"none":void 0,...t.style},onFocusCapture:xs(t.onFocusCapture,S.onFocusCapture),onBlurCapture:xs(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:xs(t.onPointerDownCapture,M.onPointerDownCapture)}))});function RR(t,e=globalThis==null?void 0:globalThis.document){const n=Eo(t),r=D.useRef(!1),i=D.useRef(()=>{});return D.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let u=function(){Gw(MR,n,c,{discrete:!0})};var l=u;const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=u,e.addEventListener("click",i.current,{once:!0})):u()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function PR(t,e=globalThis==null?void 0:globalThis.document){const n=Eo(t),r=D.useRef(!1);return D.useEffect(()=>{const i=s=>{s.target&&!r.current&&Gw(TR,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function W_(){const t=new CustomEvent(Bm);document.dispatchEvent(t)}function Gw(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?bR(i,s):i.dispatchEvent(s)}const Fh="focusScope.autoFocusOnMount",zh="focusScope.autoFocusOnUnmount",$_={bubbles:!1,cancelable:!0},DR=D.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=D.useState(null),c=Eo(i),u=Eo(s),h=D.useRef(null),d=ol(e,p=>l(p)),m=D.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;D.useEffect(()=>{if(r){let x=function(M){if(m.paused||!a)return;const S=M.target;a.contains(S)?h.current=S:Ji(h.current,{select:!0})},_=function(M){if(m.paused||!a)return;const S=M.relatedTarget;S!==null&&(a.contains(S)||Ji(h.current,{select:!0}))},y=function(M){if(document.activeElement===document.body)for(const b of M)b.removedNodes.length>0&&Ji(a)};var p=x,g=_,f=y;document.addEventListener("focusin",x),document.addEventListener("focusout",_);const T=new MutationObserver(y);return a&&T.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",_),T.disconnect()}}},[r,a,m.paused]),D.useEffect(()=>{if(a){X_.add(m);const p=document.activeElement;if(!a.contains(p)){const f=new CustomEvent(Fh,$_);a.addEventListener(Fh,c),a.dispatchEvent(f),f.defaultPrevented||(NR(kR(Ww(a)),{select:!0}),document.activeElement===p&&Ji(a))}return()=>{a.removeEventListener(Fh,c),setTimeout(()=>{const f=new CustomEvent(zh,$_);a.addEventListener(zh,u),a.dispatchEvent(f),f.defaultPrevented||Ji(p??document.body,{select:!0}),a.removeEventListener(zh,u),X_.remove(m)},0)}}},[a,c,u,m]);const v=D.useCallback(p=>{if(!n&&!r||m.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,f=document.activeElement;if(g&&f){const x=p.currentTarget,[_,y]=LR(x);_&&y?!p.shiftKey&&f===y?(p.preventDefault(),n&&Ji(_,{select:!0})):p.shiftKey&&f===_&&(p.preventDefault(),n&&Ji(y,{select:!0})):f===x&&p.preventDefault()}},[n,r,m.paused]);return D.createElement(Fi.div,zt({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function NR(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Ji(r,{select:e}),document.activeElement!==n)return}function LR(t){const e=Ww(t),n=j_(e,t),r=j_(e.reverse(),t);return[n,r]}function Ww(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function j_(t,e){for(const n of t)if(!IR(n,{upTo:e}))return n}function IR(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function OR(t){return t instanceof HTMLInputElement&&"select"in t}function Ji(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&OR(t)&&e&&t.select()}}const X_=UR();function UR(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Y_(t,e),t.unshift(e)},remove(e){var n;t=Y_(t,e),(n=t[0])===null||n===void 0||n.resume()}}}function Y_(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function kR(t){return t.filter(e=>e.tagName!=="A")}const FR=D.forwardRef((t,e)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=t;return r?ga.createPortal(D.createElement(Fi.div,zt({},i,{ref:e})),r):null});function zR(t,e){return D.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const If=t=>{const{present:e,children:n}=t,r=BR(e),i=typeof n=="function"?n({present:r.isPresent}):D.Children.only(n),s=ol(r.ref,i.ref);return typeof n=="function"||r.isPresent?D.cloneElement(i,{ref:s}):null};If.displayName="Presence";function BR(t){const[e,n]=D.useState(),r=D.useRef({}),i=D.useRef(t),s=D.useRef("none"),o=t?"mounted":"unmounted",[a,l]=zR(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D.useEffect(()=>{const c=vu(r.current);s.current=a==="mounted"?c:"none"},[a]),Fm(()=>{const c=r.current,u=i.current;if(u!==t){const d=s.current,m=vu(c);t?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&d!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Fm(()=>{if(e){const c=h=>{const m=vu(r.current).includes(h.animationName);h.target===e&&m&&Rf.flushSync(()=>l("ANIMATION_END"))},u=h=>{h.target===e&&(s.current=vu(r.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:D.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function vu(t){return(t==null?void 0:t.animationName)||"none"}let Bh=0;function VR(){D.useEffect(()=>{var t,e;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=n[0])!==null&&t!==void 0?t:q_()),document.body.insertAdjacentElement("beforeend",(e=n[1])!==null&&e!==void 0?e:q_()),Bh++,()=>{Bh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Bh--}},[])}function q_(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}var Jr=function(){return Jr=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Jr.apply(this,arguments)};function $w(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function HR(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var ld="right-scroll-bar-position",cd="width-before-scroll-bar",GR="with-scroll-bars-hidden",WR="--removed-body-scroll-bar-size";function Vh(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function $R(t,e){var n=D.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var jR=typeof window<"u"?D.useLayoutEffect:D.useEffect,K_=new WeakMap;function XR(t,e){var n=$R(null,function(r){return t.forEach(function(i){return Vh(i,r)})});return jR(function(){var r=K_.get(n);if(r){var i=new Set(r),s=new Set(t),o=n.current;i.forEach(function(a){s.has(a)||Vh(a,null)}),s.forEach(function(a){i.has(a)||Vh(a,o)})}K_.set(n,t)},[t]),n}function YR(t){return t}function qR(t,e){e===void 0&&(e=YR);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var o=e(s,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(s),o=n}var l=function(){var u=o;o=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return i}function KR(t){t===void 0&&(t={});var e=qR(null);return e.options=Jr({async:!0,ssr:!1},t),e}var jw=function(t){var e=t.sideCar,n=$w(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return D.createElement(r,Jr({},n))};jw.isSideCarExport=!0;function ZR(t,e){return t.useMedium(e),jw}var Xw=KR(),Hh=function(){},Of=D.forwardRef(function(t,e){var n=D.useRef(null),r=D.useState({onScrollCapture:Hh,onWheelCapture:Hh,onTouchMoveCapture:Hh}),i=r[0],s=r[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,h=t.shards,d=t.sideCar,m=t.noIsolation,v=t.inert,p=t.allowPinchZoom,g=t.as,f=g===void 0?"div":g,x=$w(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=d,y=XR([n,e]),T=Jr(Jr({},x),i);return D.createElement(D.Fragment,null,u&&D.createElement(_,{sideCar:Xw,removeScrollBar:c,shards:h,noIsolation:m,inert:v,setCallbacks:s,allowPinchZoom:!!p,lockRef:n}),o?D.cloneElement(D.Children.only(a),Jr(Jr({},T),{ref:y})):D.createElement(f,Jr({},T,{className:l,ref:y}),a))});Of.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Of.classNames={fullWidth:cd,zeroRight:ld};var JR=function(){if(typeof __webpack_nonce__"u")return i3;var e=s3(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},a3=Yw(),Ca="data-scroll-locked",l3=function(t,e,n,r){var i=t.left,s=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),` .`.concat(GR,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; } body[`).concat(Ca,`] { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&` padding-left: `.concat(i,`px; padding-top: `).concat(s,`px; padding-right: `).concat(o,`px; margin-left:0; margin-top:0; margin-right: `).concat(a,"px ").concat(r,`; `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` } .`).concat(ld,` { right: `).concat(a,"px ").concat(r,`; } .`).concat(cd,` { margin-right: `).concat(a,"px ").concat(r,`; } .`).concat(ld," .").concat(ld,` { right: 0 `).concat(r,`; } .`).concat(cd," .").concat(cd,` { margin-right: 0 `).concat(r,`; } body[`).concat(Ca,`] { `).concat(WR,": ").concat(a,`px; } `)},Z_=function(){var t=parseInt(document.body.getAttribute(Ca)||"0",10);return isFinite(t)?t:0},c3=function(){D.useEffect(function(){return document.body.setAttribute(Ca,(Z_()+1).toString()),function(){var t=Z_()-1;t<=0?document.body.removeAttribute(Ca):document.body.setAttribute(Ca,t.toString())}},[])},u3=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;c3();var s=D.useMemo(function(){return o3(i)},[i]);return D.createElement(a3,{styles:l3(s,!e,i,n?"":"!important")})},Vm=!1;if(typeof window<"u")try{var _u=Object.defineProperty({},"passive",{get:function(){return Vm=!0,!0}});window.addEventListener("test",_u,_u),window.removeEventListener("test",_u,_u)}catch{Vm=!1}var Oo=Vm?{passive:!1}:!1,d3=function(t){return t.tagName==="TEXTAREA"},qw=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!d3(t)&&n[e]==="visible")},f3=function(t){return qw(t,"overflowY")},h3=function(t){return qw(t,"overflowX")},J_=function(t,e){var n=e;do{typeof ShadowRooto)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},p3=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},m3=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Kw=function(t,e){return t==="v"?f3(e):h3(e)},Zw=function(t,e){return t==="v"?p3(e):m3(e)},g3=function(t,e){return t==="h"&&e==="rtl"?-1:1},v3=function(t,e,n,r,i){var s=g3(t,window.getComputedStyle(e).direction),o=s*r,a=n.target,l=e.contains(a),c=!1,u=o>0,h=0,d=0;do{var m=Zw(t,a),v=m[0],p=m[1],g=m[2],f=p-g-s*v;(v||f)&&Kw(t,a)&&(h+=f,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(h===0||!i)||!u&&(d===0||!i))&&(c=!0),c},xu=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Q_=function(t){return[t.deltaX,t.deltaY]},ex=function(t){return t&&"current"in t?t.current:t},_3=function(t,e){return t[0]===e[0]&&t[1]===e[1]},x3=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} `)},y3=0,Uo=[];function S3(t){var e=D.useRef([]),n=D.useRef([0,0]),r=D.useRef(),i=D.useState(y3++)[0],s=D.useState(function(){return Yw()})[0],o=D.useRef(t);D.useEffect(function(){o.current=t},[t]),D.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var p=HR([t.lockRef.current],(t.shards||[]).map(ex),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=D.useCallback(function(p,g){if("touches"in p&&p.touches.length===2)return!o.current.allowPinchZoom;var f=xu(p),x=n.current,_="deltaX"in p?p.deltaX:x[0]-f[0],y="deltaY"in p?p.deltaY:x[1]-f[1],T,M=p.target,S=Math.abs(_)>Math.abs(y)?"h":"v";if("touches"in p&&S==="h"&&M.type==="range")return!1;var b=J_(S,M);if(!b)return!0;if(b?T=S:(T=S==="v"?"h":"v",b=J_(S,M)),!b)return!1;if(!r.current&&"changedTouches"in p&&(_||y)&&(r.current=T),!T)return!0;var E=r.current||T;return v3(E,g,p,E==="h"?_:y,!0)},[]),l=D.useCallback(function(p){var g=p;if(!(!Uo.length||Uo[Uo.length-1]!==s)){var f="deltaY"in g?Q_(g):xu(g),x=e.current.filter(function(T){return T.name===g.type&&T.target===g.target&&_3(T.delta,f)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var _=(o.current.shards||[]).map(ex).filter(Boolean).filter(function(T){return T.contains(g.target)}),y=_.length>0?a(g,_[0]):!o.current.noIsolation;y&&g.cancelable&&g.preventDefault()}}},[]),c=D.useCallback(function(p,g,f,x){var _={name:p,delta:g,target:f,should:x};e.current.push(_),setTimeout(function(){e.current=e.current.filter(function(y){return y!==_})},1)},[]),u=D.useCallback(function(p){n.current=xu(p),r.current=void 0},[]),h=D.useCallback(function(p){c(p.type,Q_(p),p.target,a(p,t.lockRef.current))},[]),d=D.useCallback(function(p){c(p.type,xu(p),p.target,a(p,t.lockRef.current))},[]);D.useEffect(function(){return Uo.push(s),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:d}),document.addEventListener("wheel",l,Oo),document.addEventListener("touchmove",l,Oo),document.addEventListener("touchstart",u,Oo),function(){Uo=Uo.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,Oo),document.removeEventListener("touchmove",l,Oo),document.removeEventListener("touchstart",u,Oo)}},[]);var m=t.removeScrollBar,v=t.inert;return D.createElement(D.Fragment,null,v?D.createElement(s,{styles:x3(i)}):null,m?D.createElement(u3,{gapMode:"margin"}):null)}const w3=ZR(Xw,S3);var Jw=D.forwardRef(function(t,e){return D.createElement(Of,Jr({},t,{ref:e,sideCar:w3}))});Jw.classNames=Of.classNames;var b3=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ko=new WeakMap,yu=new WeakMap,Su={},Wh=0,Qw=function(t){return t&&(t.host||Qw(t.parentNode))},E3=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Qw(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},M3=function(t,e,n,r){var i=E3(e,Array.isArray(t)?t:[t]);Su[n]||(Su[n]=new WeakMap);var s=Su[n],o=[],a=new Set,l=new Set(i),c=function(h){!h||a.has(h)||(a.add(h),c(h.parentNode))};i.forEach(c);var u=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(d){if(a.has(d))u(d);else try{var m=d.getAttribute(r),v=m!==null&&m!=="false",p=(ko.get(d)||0)+1,g=(s.get(d)||0)+1;ko.set(d,p),s.set(d,g),o.push(d),p===1&&v&&yu.set(d,!0),g===1&&d.setAttribute(n,"true"),v||d.setAttribute(r,"true")}catch(f){console.error("aria-hidden: cannot operate on ",d,f)}})};return u(e),a.clear(),Wh++,function(){o.forEach(function(h){var d=ko.get(h)-1,m=s.get(h)-1;ko.set(h,d),s.set(h,m),d||(yu.has(h)||h.removeAttribute(r),yu.delete(h)),m||h.removeAttribute(n)}),Wh--,Wh||(ko=new WeakMap,ko=new WeakMap,yu=new WeakMap,Su={})}},T3=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=b3(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),M3(r,i,n,"aria-hidden")):function(){return null}};const eb="Dialog",[tb,gz]=Hw(eb),[C3,zi]=tb(eb),A3=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=D.useRef(null),l=D.useRef(null),[c=!1,u]=vR({prop:r,defaultProp:i,onChange:s});return D.createElement(C3,{scope:e,triggerRef:a,contentRef:l,contentId:kh(),titleId:kh(),descriptionId:kh(),open:c,onOpenChange:u,onOpenToggle:D.useCallback(()=>u(h=>!h),[u]),modal:o},n)},R3="DialogTrigger",P3=D.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=zi(R3,n),s=ol(e,i.triggerRef);return D.createElement(Fi.button,zt({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Ng(i.open)},r,{ref:s,onClick:xs(t.onClick,i.onOpenToggle)}))}),nb="DialogPortal",[D3,rb]=tb(nb,{forceMount:void 0}),N3=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,s=zi(nb,e);return D.createElement(D3,{scope:e,forceMount:n},D.Children.map(r,o=>D.createElement(If,{present:n||s.open},D.createElement(FR,{asChild:!0,container:i},o))))},Hm="DialogOverlay",L3=D.forwardRef((t,e)=>{const n=rb(Hm,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=zi(Hm,t.__scopeDialog);return s.modal?D.createElement(If,{present:r||s.open},D.createElement(I3,zt({},i,{ref:e}))):null}),I3=D.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=zi(Hm,n);return D.createElement(Jw,{as:Dg,allowPinchZoom:!0,shards:[i.contentRef]},D.createElement(Fi.div,zt({"data-state":Ng(i.open)},r,{ref:e,style:{pointerEvents:"auto",...r.style}})))}),_c="DialogContent",O3=D.forwardRef((t,e)=>{const n=rb(_c,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=zi(_c,t.__scopeDialog);return D.createElement(If,{present:r||s.open},s.modal?D.createElement(U3,zt({},i,{ref:e})):D.createElement(k3,zt({},i,{ref:e})))}),U3=D.forwardRef((t,e)=>{const n=zi(_c,t.__scopeDialog),r=D.useRef(null),i=ol(e,n.contentRef,r);return D.useEffect(()=>{const s=r.current;if(s)return T3(s)},[]),D.createElement(ib,zt({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xs(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:xs(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:xs(t.onFocusOutside,s=>s.preventDefault())}))}),k3=D.forwardRef((t,e)=>{const n=zi(_c,t.__scopeDialog),r=D.useRef(!1),i=D.useRef(!1);return D.createElement(ib,zt({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,s),!s.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),s.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:s=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),ib=D.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=zi(_c,n),l=D.useRef(null),c=ol(e,l);return VR(),D.createElement(D.Fragment,null,D.createElement(DR,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s},D.createElement(AR,zt({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Ng(a.open)},o,{ref:c,onDismiss:()=>a.onOpenChange(!1)}))),!1)});const F3="DialogClose",z3=D.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=zi(F3,n);return D.createElement(Fi.button,zt({type:"button"},r,{ref:e,onClick:xs(t.onClick,()=>i.onOpenChange(!1))}))});function Ng(t){return t?"open":"closed"}const Uf=A3,sb=P3,kf=N3,Ff=L3,zf=O3,Lg=z3,qe={oldCampaignIds:["UrbanHorror_id-240711","UrbanHorror_id-240712","UrbanHorror_id-240713","UrbanHorror_id-240714","UrbanHorror_id-240715","UrbanHorror_id-240716","UrbanHorror_id-240717","UrbanHorror_id-240718","UrbanHorror_id-240719","UrbanHorror_id-240720","UrbanHorror_id-240721","UrbanHorror_id-240722","UrbanHorror_id-240723","UrbanHorror_id-240724","UrbanHorror_id-240725","UrbanHorror_id-240726","UrbanHorror_id-240727","UrbanHorror_id-240728","UrbanHorror_id-240729","UrbanHorror_id-240730","UrbanHorror_id-240731","UrbanHorror_id-240801","UrbanHorror_id-240802","UrbanHorror_id-240803","UrbanHorror_id-240804","UrbanHorror_id-240805","UrbanHorror_id-240806","UrbanHorror_id-240807","UrbanHorror_id-240808","UrbanHorror_id-240809","UrbanHorror_id-240810","UrbanHorror_id-240811","UrbanHorror_id-240812","UrbanHorror_id-240813","UrbanHorror_id-240814","UrbanHorror_id-240815"],campaignIds:["UrbanHorror_id-240903","UrbanHorror_id-240904","UrbanHorror_id-240905","UrbanHorror_id-240906","UrbanHorror_id-240907","UrbanHorror_id-240908","UrbanHorror_id-240909","UrbanHorror_id-240910","UrbanHorror_id-240911","UrbanHorror_id-240912","UrbanHorror_id-240913","UrbanHorror_id-240914","UrbanHorror_id-240915","UrbanHorror_id-240916","UrbanHorror_id-240917","UrbanHorror_id-240918","UrbanHorror_id-240919","UrbanHorror_id-240920","UrbanHorror_id-240921","UrbanHorror_id-240922","UrbanHorror_id-240923","UrbanHorror_id-240924","UrbanHorror_id-240925","UrbanHorror_id-240926","UrbanHorror_id-240927","UrbanHorror_id-240928","UrbanHorror_id-240929","UrbanHorror_id-240930","UrbanHorror_id-241001","UrbanHorror_id-241002","UrbanHorror_id-241003","UrbanHorror_id-241004","UrbanHorror_id-241005","UrbanHorror_id-241006","UrbanHorror_id-241007","UrbanHorror_id-241008","UrbanHorror_id-241009","UrbanHorror_id-241010","UrbanHorror_id-241011","UrbanHorror_id-241012","UrbanHorror_id-241013","UrbanHorror_id-241014","UrbanHorror_id-241015"],map:{area:[{id:"1",name:"Kejadian Horor Kendaraan Umum",position:{x:.18,y:.13}},{id:"2",name:"Kejadian Horor Perkantoran",position:{x:.48,y:.51}},{id:"3",name:"Kejadian Horor Kehidupan Malam",position:{x:.26,y:.48}},{id:"4",name:"Kejadian Horor Tempat Tinggal",position:{x:.44,y:.11}},{id:"5",name:"Kejadian Horor Pusat Perbelanjaan",position:{x:.75,y:.1}},{id:"6",name:"Kejadian Horor Penginapan",position:{x:.81,y:.34}}],items:[{id:"COC-ID-D0001-01-0001",name:"Halte Taksi",zhName:"計程車招呼站",position:{x:.08,y:.3}},{id:"COC-ID-D0001-01-0002",name:"Barang Hilang",zhName:"失物招領",position:{x:.17,y:.35}},{id:"COC-ID-D0001-01-0003",name:"Bus Jam Terakhir",zhName:"觀光巴士",position:{x:.1,y:.2}},{id:"COC-ID-D0001-01-0004",name:"Bus Wisata Kota",zhName:"觀光巴士",position:{x:.25,y:.25}},{id:"COC-ID-D0001-01-0005",name:"Camilan Tengah Malam",zhName:"宵夜指南",position:{x:.15,y:.65}},{id:"COC-ID-D0001-01-0006",name:"Kelab Malam",zhName:"夜店",position:{x:.325,y:.65}},{id:"COC-ID-D0001-01-0007",name:"Petualangan Besar",zhName:"大冒險",position:{x:.2,y:.775}},{id:"COC-ID-D0001-01-0008",name:"Lari Malam",zhName:"夜跑",position:{x:.25,y:.7}},{id:"COC-ID-D0001-01-0009",name:"Seusai Film",zhName:"電影散場",position:{x:.25,y:.625}},{id:"COC-ID-D0001-01-0010",name:"Pemandangan Malam Sempurna ",zhName:"完美夜景",position:{x:.2,y:.575}},{id:"COC-ID-D0001-01-0011",name:"Membantu Menerima Paket",zhName:"代收包裹",position:{x:.45,y:.35}},{id:"COC-ID-D0001-01-0012",name:"Street View",zhName:"街景圖",position:{x:.475,y:.2}},{id:"COC-ID-D0001-01-0013",name:"Awas Bising",zhName:"注意噪音",position:{x:.4,y:.225}},{id:"COC-ID-D0001-01-0014",name:"Penyusup",zhName:"入侵者",position:{x:.325,y:.4}},{id:"COC-ID-D0001-01-0015",name:"Alat Rumah Tangga Pintar",zhName:"智能家電",position:{x:.35,y:.15}},{id:"COC-ID-D0001-01-0016",name:"Pacar Teman Sekamar",zhName:"室友的男朋友",position:{x:.325,y:.3}},{id:"COC-ID-D0001-01-0017",name:"Konferensi Video",zhName:"視訊會議",position:{x:.45,y:.75}},{id:"COC-ID-D0001-01-0018",name:"Selamat Ulang Tahun",zhName:"生日快樂",position:{x:.475,y:.6}},{id:"COC-ID-D0001-01-0019",name:"Lembur Tengah Malam",zhName:"深夜加班",position:{x:.55,y:.675}},{id:"COC-ID-D0001-01-0020",name:"Supervisor Baru",zhName:"新主管",position:{x:.55,y:.75}},{id:"COC-ID-D0001-01-0021",name:"Romansa Kantor",zhName:"辦公室戀情",position:{x:.5,y:.85}},{id:"COC-ID-D0001-01-0022",name:"Area Merokok",zhName:"吸煙區",position:{x:.575,y:.8}},{id:"COC-ID-D0001-01-0023",name:"Etiket di Bus",zhName:"公車禮儀",position:{x:.65,y:.7}},{id:"COC-ID-D0001-01-0024",name:"Kamar Pas",zhName:"試衣間",position:{x:.55,y:.15}},{id:"COC-ID-D0001-01-0025",name:"Lukisan Potret",zhName:"人像素描",position:{x:.6,y:.3}},{id:"COC-ID-D0001-01-0026",name:"Gacha Horor",zhName:"恐怖扭蛋",position:{x:.7,y:.325}},{id:"COC-ID-D0001-01-0027",name:"Jumlah pengunjung",zhName:"進場人數",position:{x:.625,y:.2}},{id:"COC-ID-D0001-01-0028",name:"Ulasan Bintang 5",zhName:"五星評論",position:{x:.7,y:.15}},{id:"COC-ID-D0001-01-0029",name:"Kamar Hotel Tipe Keluarga",zhName:"家庭套房",position:{x:.75,y:.45}},{id:"COC-ID-D0001-01-0030",name:"Penginapan Remaja",zhName:"青年旅社",position:{x:.85,y:.5}},{id:"COC-ID-D0001-01-0031",name:"Rumah Hewan Peliharaan",zhName:"寵物友善",position:{x:.725,y:.55}},{id:"COC-ID-D0001-01-0032",name:"Petugas Tata Graha",zhName:"客房清潔",position:{x:.8,y:.7}},{id:"COC-ID-D0001-01-0033",name:"Sewa Apartemen Harian",zhName:"日租套房",position:{x:.875,y:.6}},{id:"COC-ID-D0001-01-0034",name:"Check-in",zhName:"Check-in",position:{x:.7,y:.65}}]},items:{"COC-ID-D0001-01-0001":{id:"COC-ID-D0001-01-0001",episodeIndex:1,name:"Halte Taksi",zhName:"計程車招呼站",description:"Sopir taksi di halte terus mengganggu, apa bisa selesai jika memanggil taksi?",shortDescription:"Sopir taksi di halte terus mengganggu, apa bisa selesai jika memanggil taksi?",date:"2024-07-12",cast:"Ann Hsu, David Chu",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/FFRCYMYs5Kb"},"COC-ID-D0001-01-0002":{id:"COC-ID-D0001-01-0002",episodeIndex:2,name:"Barang Hilang",zhName:"失物招領",description:"Penasaran berlebihan bisa membunuh",shortDescription:"Penasaran berlebihan bisa membunuh",date:"2024-07-12",cast:"Peijia Huang, Liao Yunjie",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/ncYUHCkt5Kb"},"COC-ID-D0001-01-0003":{id:"COC-ID-D0001-01-0003",episodeIndex:3,name:"Bus Jam Terakhir",zhName:"末班客運",description:"Ruang misterius di dalam bus",shortDescription:"Ruang misterius di dalam bus",date:"2024-07-12",cast:"Chang Ying Hsieh, Hong Wenkai",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/9kVtSOAt5Kb"},"COC-ID-D0001-01-0004":{id:"COC-ID-D0001-01-0004",episodeIndex:4,name:"Bus Wisata Kota",zhName:"觀光巴士",description:"Ibu gila dengan depresi pasca melahirkan",shortDescription:"Ibu gila dengan depresi pasca melahirkan",date:"2024-07-12",cast:"Vicky Tseng, Huai Yun Zhan, Gao Qianyi",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/grEFnyKt5Kb"},"COC-ID-D0001-01-0005":{id:"COC-ID-D0001-01-0005",episodeIndex:5,name:"Camilan Tengah Malam",zhName:"宵夜指南",description:"Fakta dari makanan pasar malam",shortDescription:"Fakta dari makanan pasar malam",date:"2024-07-13",cast:"Yu An-Shun, Shawn Hu, Crystal Yen",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/bvijlyUt5Kb"},"COC-ID-D0001-01-0006":{id:"COC-ID-D0001-01-0006",episodeIndex:6,name:"Kelab Malam",zhName:"夜店",description:"Jangan percayai pembela kebenaran yang kau temui di kelab malam",shortDescription:"Jangan percayai pembela kebenaran yang kau temui di kelab malam",date:"2024-07-14",cast:"Pets Tseng, Jean Ho, Wu Yanlin",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/rBUOCS2t5Kb"},"COC-ID-D0001-01-0007":{id:"COC-ID-D0001-01-0007",episodeIndex:7,name:"Petualangan Besar",zhName:"大冒險",description:"Permainan petualangan memakan korban",shortDescription:"Permainan petualangan memakan korban",date:"2024-07-15",cast:"Li Ting Xu, Joseph Huang, Hong Qian, Jian Jianan",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/Ff3eUiau5Kb"},"COC-ID-D0001-01-0008":{id:"COC-ID-D0001-01-0008",episodeIndex:8,name:"Lari Malam",zhName:"夜跑",description:"Ada banyak masalah di malam hari, lebih baik pulang ke rumah dengan aman",shortDescription:"Ada banyak masalah di malam hari, lebih baik pulang ke rumah dengan aman",date:"2024-07-16",cast:"Alice Tzeng, Chen Yingru, Shawn Hu, Crystal Yen",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/hWjQ78ju5Kb"},"COC-ID-D0001-01-0009":{id:"COC-ID-D0001-01-0009",episodeIndex:9,name:"Seusai Film",zhName:"電影散場",description:"Ada orang yang sedang dibunuh di pinggir jalan, sungguhan atau akting?",shortDescription:"Ada orang yang sedang dibunuh di pinggir jalan, sungguhan atau akting?",date:"2024-07-17",cast:"Ying-Hsuan Kao, Clara Lee",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/A7QSU1qu5Kb"},"COC-ID-D0001-01-0010":{id:"COC-ID-D0001-01-0010",episodeIndex:10,name:"Pemandangan Malam yang Sempurna",zhName:"完美夜景",description:"Momen sempurna saat seorang pria ramah mengambil fotomu ternyata adalah…",shortDescription:"Momen saat pria ramah mengambil fotomu ternyata adalah…",date:"2024-07-18",cast:"Austin Lin, Pei-Qi Huang",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/tmNWewyu5Kb"},"COC-ID-D0001-01-0011":{id:"COC-ID-D0001-01-0011",episodeIndex:11,name:"Membantu Menerima Paket",zhName:"代收包裹",description:"Jangan sembarangan menerima paket!",shortDescription:"Jangan sembarangan menerima paket!",date:"2024-07-19",cast:"Yu Chen, Jao Cin-Cin, Hakaw Acyang",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/TDhyUfFu5Kb"},"COC-ID-D0001-01-0012":{id:"COC-ID-D0001-01-0012",episodeIndex:12,name:"Street View",zhName:"街景圖",description:"Street view menangkap momen kehidupan",shortDescription:"Street view menangkap momen kehidupan",date:"2024-07-20",cast:"Ivy Shao, Huang Dawang",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/eUAxUGMu5Kb"},"COC-ID-D0001-01-0013":{id:"COC-ID-D0001-01-0013",episodeIndex:13,name:"Awas Bising",zhName:"注意噪音",description:"Kebisingan bisa membunuh",shortDescription:"Kebisingan bisa membunuh",date:"2024-07-21",cast:"Moon Lee, Chih-Ju Lin",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/cvqYHhUu5Kb"},"COC-ID-D0001-01-0014":{id:"COC-ID-D0001-01-0014",episodeIndex:14,name:"Penyusup",zhName:"入侵者",description:"Sebenarnya, ada orang asing yang tanggal di rumahmu",shortDescription:"Sebenarnya, ada orang asing yang tanggal di rumahmu",date:"2024-07-22",cast:"Pai Ching-I, ChillSeph, Yao Chi-hui",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/m4h6aI0u5Kb"},"COC-ID-D0001-01-0015":{id:"COC-ID-D0001-01-0015",episodeIndex:15,name:"Alat Rumah Tangga Pintar",zhName:"智能家電",description:"Alat rumah tangga pintar juga bisa membunuh",shortDescription:"Alat rumah tangga pintar juga bisa membunuh",date:"2024-07-23",cast:"Johnny Yang, Zhang Qin, Gao Shiting",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/XQHtCw7u5Kb"},"COC-ID-D0001-01-0016":{id:"COC-ID-D0001-01-0016",episodeIndex:16,name:"Pacar Teman Sekamar",zhName:"室友的男朋友",description:"Akibat selingkuh dengan pacar teman sekamar",shortDescription:"Akibat selingkuh dengan pacar teman sekamar",date:"2024-07-24",cast:"Sharon Huang, Peter Kuan",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/pUuPV2GC6Kb"},"COC-ID-D0001-01-0017":{id:"COC-ID-D0001-01-0017",episodeIndex:17,name:"Konferensi Video",zhName:"視訊會議",description:"Membawa anak saat bekerja, tetapi kehilangan dia selamanya sepulang kerja",shortDescription:"Membawa anak saat bekerja, tetapi kehilangan dia selamanya sepulang kerja",date:"2024-07-25",cast:"Tracy Chou, Chen Mufan",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/MBC3BvNC6Kb"},"COC-ID-D0001-01-0018":{id:"COC-ID-D0001-01-0018",episodeIndex:18,name:"Selamat Ulang Tahun",zhName:"生日快樂",description:"Kau sungguh mengira rekan kerjamu sedang merayakan ulang tahunmu?",shortDescription:"Kau sungguh mengira rekan kerjamu sedang merayakan ulang tahunmu?",date:"2024-07-26",cast:"Brian Tseng, Wenny Lin",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/8WcXjvZC6Kb"},"COC-ID-D0001-01-0019":{id:"COC-ID-D0001-01-0019",episodeIndex:19,name:"Lembur Tengah Malam",zhName:"深夜加班",description:"Mimpi buruk budak korporat, tidak pernah berakhir",shortDescription:"Mimpi buruk budak korporat, tidak pernah berakhir",date:"2024-07-27",cast:"Tammy Lin",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/714AYC7C6Kb"},"COC-ID-D0001-01-0020":{id:"COC-ID-D0001-01-0020",episodeIndex:20,name:"Supervisor Baru",zhName:"新主管",description:"Tak ada yang mustahil, tergantung mau atau tidak",shortDescription:"Tak ada yang mustahil, tergantung mau atau tidak",date:"2024-07-28",cast:"Meng-Po Fu, Kuan-Chih Huang, Meng-hsuan Chu",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/9fjiZgfD6Kb"},"COC-ID-D0001-01-0021":{id:"COC-ID-D0001-01-0021",episodeIndex:21,name:"Romansa Kantor",zhName:"辦公室戀情",description:"Tindakan rekan kerja yang jatuh cinta, hampir menjijikkan",shortDescription:"Tindakan rekan kerja yang jatuh cinta, hampir menjijikkan",date:"2024-07-29",cast:"Cammy Chiang",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/oqpSRsDN6Kb"},"COC-ID-D0001-01-0022":{id:"COC-ID-D0001-01-0022",episodeIndex:22,name:"Area Merokok",zhName:"吸煙區",description:"Perilaku mengejutkan dari atasan yang ramah",shortDescription:"Perilaku mengejutkan dari atasan yang ramah",date:"2024-07-30",cast:"How Yao, Li Xue, Liu Daiying",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/ic75wNNN6Kb"},"COC-ID-D0001-01-0023":{id:"COC-ID-D0001-01-0023",episodeIndex:23,name:"Etiket di Bus",zhName:"公車禮儀",description:"Terlalu suka menolong justru melakukan kejahatan",shortDescription:"Terlalu suka menolong justru melakukan kejahatan",date:"2024-07-31",cast:"Yu Xuan Wang, Chu Meng Hsuan",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/E1kaIJ3N6Kb"},"COC-ID-D0001-01-0024":{id:"COC-ID-D0001-01-0024",episodeIndex:24,name:"Kamar Pas",zhName:"試衣間",description:"Mencoba baju, selfie, upload, apa di balik cermin benar-benar aman?",shortDescription:"Mencoba baju, selfie, upload, apa di balik cermin benar-benar aman?",date:"2024-08-01",cast:"Pan Jiali, Mimi Shao, Lin Shiya",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/B47y1ugO6Kb"},"COC-ID-D0001-01-0025":{id:"COC-ID-D0001-01-0025",episodeIndex:25,name:"Lukisan Potret",zhName:"人像素描",description:"Ingin merasakan emosi yang paling asli? Pelukis bisa membantumu",shortDescription:"Ingin merasakan emosi yang paling asli? Pelukis bisa membantumu",date:"2024-08-02",cast:"Iain Lu, Yu Pei-Jen",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/P4K8F2pO6Kb"},"COC-ID-D0001-01-0026":{id:"COC-ID-D0001-01-0026",episodeIndex:26,name:"Gacha Horor",zhName:"恐怖扭蛋",description:"Main gacha mengeluarkan intensitas membunuh….",shortDescription:"Main gacha mengeluarkan intensitas membunuh….",date:"2024-08-03",cast:"Da She Wan She Wan, Da She Wan Hu Jiao",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/0gkS8cBO6Kb"},"COC-ID-D0001-01-0027":{id:"COC-ID-D0001-01-0027",episodeIndex:27,name:"Jumlah pengunjung",zhName:"進場人數",description:"Satpam mal menemukan alat pencatat jumlah pengunjung yang tidak bisa dinolkan",shortDescription:"Satpam mal menemukan alat pencatat jumlah pengunjung yang tidak bisa dinolkan",date:"2024-08-04",cast:"Jake Hsu, Lou Yi-an",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/pwn4HnNO6Kb"},"COC-ID-D0001-01-0028":{id:"COC-ID-D0001-01-0028",episodeIndex:28,name:"Ulasan Bintang 5",zhName:"五星評論",description:"Yang tidak memberi Bintang 5 harus mati",shortDescription:"Yang tidak memberi Bintang 5 harus mati",date:"2024-08-05",cast:"Jesse Tang, River Huang",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/oNuYr1ZO6Kb"},"COC-ID-D0001-01-0029":{id:"COC-ID-D0001-01-0029",episodeIndex:29,name:"Kamar Hotel Tipe Keluarga",zhName:"家庭套房",description:"Anak tertawa tengah malam, kasusnya tidak sederhana.",shortDescription:"Anak tertawa tengah malam, kasusnya tidak sederhana.",date:"2024-08-06",cast:"Kenny Yen, Helena Hsu, Xu Boyan",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/bTxAFy9O6Kb"},"COC-ID-D0001-01-0030":{id:"COC-ID-D0001-01-0030",episodeIndex:30,name:"Penginapan Remaja",zhName:"青年旅社",description:"Asosiasi Riset Pria Jantan Taiwan",shortDescription:"Asosiasi Riset Pria Jantan Taiwan",date:"2024-08-07",cast:"Sean Lin, Regina, Sascha Heusermann",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/Oret58lX6Kb"},"COC-ID-D0001-01-0031":{id:"COC-ID-D0001-01-0031",episodeIndex:31,name:"Rumah Hewan Peliharaan",zhName:"寵物友善",description:"Bahkan hewan peliharaanmu pun bisa mengkhianatimu",shortDescription:"Bahkan hewan peliharaanmu pun bisa mengkhianatimu",date:"2024-08-08",cast:"Esther Liu, Zeng Shaozong",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/tllpUpyX6Kb"},"COC-ID-D0001-01-0032":{id:"COC-ID-D0001-01-0032",episodeIndex:32,name:"Petugas Tata Graha",zhName:"客房清潔",description:"Saat membersihkan kamar, menemukan mayat di bawah ranjang",shortDescription:"Saat membersihkan kamar, menemukan mayat di bawah ranjang",date:"2024-08-09",cast:"Nash Zhang, Hsieh Li-Chin, Wang Zhenlin",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/EH938CTX6Kb"},"COC-ID-D0001-01-0033":{id:"COC-ID-D0001-01-0033",episodeIndex:33,name:"Sewa Apartemen Harian",zhName:"日租套房",description:"Apa kau bisa dengan tenang tinggal di rumah orang asing?",shortDescription:"Apa kau bisa dengan tenang tinggal di rumah orang asing?",date:"2024-08-10",cast:"Chloe Xiang, Diane Lin",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/Tij4yl6X6Kb"},"COC-ID-D0001-01-0034":{id:"COC-ID-D0001-01-0034",episodeIndex:34,name:"Check-in",zhName:"Check-in",description:"Mengintip di hotel, topik yang tak pernah gagal",shortDescription:"Mengintip di hotel, topik yang tak pernah gagal",date:"2024-08-10",cast:"Ben Wu, Liao Yunjie, Han Yaxi",url:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",trailerUrl:"https://www.catchplay.com/id/video/55bc242c-4c46-4fb0-9ff4-a66b2ebcaf16",shortUrl:"https://cp.app.link/e/mQx04EsZ6Kb"}},fixedBannerSections:[{title:"Tonton Sepuasnya Selama 3 Bulan",description:"EXTRA 1 Tiket Single Rental Hanya Rp75.000"}]};function ob(t,e){return function(){return t.apply(e,arguments)}}const{toString:B3}=Object.prototype,{getPrototypeOf:Ig}=Object,Bf=(t=>e=>{const n=B3.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gr=t=>(t=t.toLowerCase(),e=>Bf(e)===t),Vf=t=>e=>typeof e===t,{isArray:al}=Array,xc=Vf("undefined");function V3(t){return t!==null&&!xc(t)&&t.constructor!==null&&!xc(t.constructor)&&Sr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ab=Gr("ArrayBuffer");function H3(t){let e;return typeof ArrayBuffert!==null&&typeof t=="object",W3=t=>t===!0||t===!1,ud=t=>{if(Bf(t)!=="object")return!1;const e=Ig(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},$3=Gr("Date"),j3=Gr("File"),X3=Gr("Blob"),Y3=Gr("FileList"),q3=t=>Hf(t)&&Sr(t.pipe),K3=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Sr(t.append)&&((e=Bf(t))==="formdata"||e==="object"&&Sr(t.toString)&&t.toString()==="[object FormData]"))},Z3=Gr("URLSearchParams"),[J3,Q3,eP,tP]=["ReadableStream","Request","Response","Headers"].map(Gr),nP=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Uc(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),al(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let a;for(r=0;r0;)if(i=n[r],e===i.toLowerCase())return i;return null}const ub=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window!xc(t)&&t!==ub;function Gm(){const{caseless:t}=db(this)&&this||{},e={},n=(r,i)=>{const s=t&&cb(e,i)||i;ud(e[s])&&ud(r)?e[s]=Gm(e[s],r):ud(r)?e[s]=Gm({},r):al(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r(Uc(e,(i,s)=>{n&&Sr(i)?t[s]=ob(i,n):t[s]=i},{allOwnKeys:r}),t),iP=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),sP=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},oP=(t,e,n,r)=>{let i,s,o;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&Ig(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},aP=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},lP=t=>{if(!t)return null;if(al(t))return t;let e=t.length;if(!lb(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},cP=(t=>e=>t&&e instanceof t)(typeof Uint8Array{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},dP=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},fP=Gr("HTMLFormElement"),hP=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),tx=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),pP=Gr("RegExp"),fb=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Uc(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},mP=t=>{fb(t,(e,n)=>{if(Sr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Sr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},gP=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return al(t)?r(t):r(String(t).split(e)),n},vP=()=>{},_P=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,$h="abcdefghijklmnopqrstuvwxyz",nx="0123456789",hb={DIGIT:nx,ALPHA:$h,ALPHA_DIGIT:$h+$h.toUpperCase()+nx},xP=(t=16,e=hb.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function yP(t){return!!(t&&Sr(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const SP=t=>{const e=new Array(10),n=(r,i)=>{if(Hf(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const s=al(r)?[]:{};return Uc(r,(o,a)=>{const l=n(o,i+1);!xc(l)&&(s[a]=l)}),e[i]=void 0,s}}return r};return n(t,0)},wP=Gr("AsyncFunction"),bP=t=>t&&(Hf(t)||Sr(t))&&Sr(t.then)&&Sr(t.catch),ae={isArray:al,isArrayBuffer:ab,isBuffer:V3,isFormData:K3,isArrayBufferView:H3,isString:G3,isNumber:lb,isBoolean:W3,isObject:Hf,isPlainObject:ud,isReadableStream:J3,isRequest:Q3,isResponse:eP,isHeaders:tP,isUndefined:xc,isDate:$3,isFile:j3,isBlob:X3,isRegExp:pP,isFunction:Sr,isStream:q3,isURLSearchParams:Z3,isTypedArray:cP,isFileList:Y3,forEach:Uc,merge:Gm,extend:rP,trim:nP,stripBOM:iP,inherits:sP,toFlatObject:oP,kindOf:Bf,kindOfTest:Gr,endsWith:aP,toArray:lP,forEachEntry:uP,matchAll:dP,isHTMLForm:fP,hasOwnProperty:tx,hasOwnProp:tx,reduceDescriptors:fb,freezeMethods:mP,toObjectSet:gP,toCamelCase:hP,noop:vP,toFiniteNumber:_P,findKey:cb,global:ub,isContextDefined:db,ALPHABET:hb,generateString:xP,isSpecCompliantForm:yP,toJSONObject:SP,isAsyncFn:wP,isThenable:bP};function Ke(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}ae.inherits(Ke,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ae.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const pb=Ke.prototype,mb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{mb[t]={value:t}});Object.defineProperties(Ke,mb);Object.defineProperty(pb,"isAxiosError",{value:!0});Ke.from=(t,e,n,r,i,s)=>{const o=Object.create(pb);return ae.toFlatObject(t,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ke.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const EP=null;function Wm(t){return ae.isPlainObject(t)||ae.isArray(t)}function gb(t){return ae.endsWith(t,"[]")?t.slice(0,-2):t}function rx(t,e,n){return t?t.concat(e).map(function(i,s){return i=gb(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function MP(t){return ae.isArray(t)&&!t.some(Wm)}const TP=ae.toFlatObject(ae,{},null,function(e){return/^is[A-Z]/.test(e)});function Gf(t,e,n){if(!ae.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,g){return!ae.isUndefined(g[p])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&ae.isSpecCompliantForm(e);if(!ae.isFunction(i))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(ae.isDate(v))return v.toISOString();if(!l&&ae.isBlob(v))throw new Ke("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(v)||ae.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,p,g){let f=v;if(v&&!g&&typeof v=="object"){if(ae.endsWith(p,"{}"))p=r?p:p.slice(0,-2),v=JSON.stringify(v);else if(ae.isArray(v)&&MP(v)||(ae.isFileList(v)||ae.endsWith(p,"[]"))&&(f=ae.toArray(v)))return p=gb(p),f.forEach(function(_,y){!(ae.isUndefined(_)||_===null)&&e.append(o===!0?rx([p],y,s):o===null?p:p+"[]",c(_))}),!1}return Wm(v)?!0:(e.append(rx(g,p,s),c(v)),!1)}const h=[],d=Object.assign(TP,{defaultVisitor:u,convertValue:c,isVisitable:Wm});function m(v,p){if(!ae.isUndefined(v)){if(h.indexOf(v)!==-1)throw Error("Circular reference detected in "+p.join("."));h.push(v),ae.forEach(v,function(f,x){(!(ae.isUndefined(f)||f===null)&&i.call(e,f,ae.isString(x)?x.trim():x,p,d))===!0&&m(f,p?p.concat(x):[x])}),h.pop()}}if(!ae.isObject(t))throw new TypeError("data must be an object");return m(t),e}function ix(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Og(t,e){this._pairs=[],t&&Gf(t,this,e)}const vb=Og.prototype;vb.append=function(e,n){this._pairs.push([e,n])};vb.toString=function(e){const n=e?function(r){return e.call(this,r,ix)}:ix;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function CP(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _b(t,e,n){if(!e)return t;const r=n&&n.encode||CP,i=n&&n.serialize;let s;if(i?s=i(e,n):s=ae.isURLSearchParams(e)?e.toString():new Og(e,n).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class sx{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ae.forEach(this.handlers,function(r){r!==null&&e(r)})}}const xb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},AP=typeof URLSearchParams<"u"?URLSearchParams:Og,RP=typeof FormData<"u"?FormData:null,PP=typeof Blob<"u"?Blob:null,DP={isBrowser:!0,classes:{URLSearchParams:AP,FormData:RP,Blob:PP},protocols:["http","https","file","blob","url","data"]},Ug=typeof window<"u"&&typeof documentUg&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),LP=typeof WorkerGlobalScopee[0]==="[]"?"":e[1]||e[0])}function FP(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r=n.length;return o=!o&&ae.isArray(i)?i.length:o,l?(ae.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!ae.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],s)&&ae.isArray(i[o])&&(i[o]=FP(i[o])),!a)}if(ae.isFormData(t)&&ae.isFunction(t.entries)){const n={};return ae.forEachEntry(t,(r,i)=>{e(kP(r),i,n,0)}),n}return null}function zP(t,e,n){if(ae.isString(t))try{return(e||JSON.parse)(t),ae.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const kc={transitional:xb,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=ae.isObject(e);if(s&&ae.isHTMLForm(e)&&(e=new FormData(e)),ae.isFormData(e))return i?JSON.stringify(yb(e)):e;if(ae.isArrayBuffer(e)||ae.isBuffer(e)||ae.isStream(e)||ae.isFile(e)||ae.isBlob(e)||ae.isReadableStream(e))return e;if(ae.isArrayBufferView(e))return e.buffer;if(ae.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return UP(e,this.formSerializer).toString();if((a=ae.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Gf(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),zP(e)):e}],transformResponse:[function(e){const n=this.transitional||kc.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ae.isResponse(e)||ae.isReadableStream(e))return e;if(e&&ae.isString(e)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Ke.from(a,Ke.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Br.classes.FormData,Blob:Br.classes.Blob},validateStatus:function(e){return e>=200&&e{kc.headers[t]={}});const BP=ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),VP=t=>{const e={};let n,r,i;return t&&t.split(` `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||e[n]&&BP[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},ox=Symbol("internals");function wl(t){return t&&String(t).trim().toLowerCase()}function dd(t){return t===!1||t==null?t:ae.isArray(t)?t.map(dd):String(t)}function HP(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const GP=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function jh(t,e,n,r,i){if(ae.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!ae.isString(e)){if(ae.isString(r))return e.indexOf(r)!==-1;if(ae.isRegExp(r))return r.test(e)}}function WP(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function $P(t,e){const n=ae.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}class Un{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function s(a,l,c){const u=wl(l);if(!u)throw new Error("header name must be a non-empty string");const h=ae.findKey(i,u);(!h||i[h]===void 0||c===!0||c===void 0&&i[h]!==!1)&&(i[h||l]=dd(a))}const o=(a,l)=>ae.forEach(a,(c,u)=>s(c,u,l));if(ae.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(ae.isString(e)&&(e=e.trim())&&!GP(e))o(VP(e),n);else if(ae.isHeaders(e))for(const[a,l]of e.entries())s(l,a,r);else e!=null&&s(n,e,r);return this}get(e,n){if(e=wl(e),e){const r=ae.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return HP(i);if(ae.isFunction(n))return n.call(this,i,r);if(ae.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=wl(e),e){const r=ae.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||jh(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function s(o){if(o=wl(o),o){const a=ae.findKey(r,o);a&&(!n||jh(r,r[a],a,n))&&(delete r[a],i=!0)}}return ae.isArray(e)?e.forEach(s):s(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!e||jh(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const n=this,r={};return ae.forEach(this,(i,s)=>{const o=ae.findKey(r,s);if(o){n[o]=dd(i),delete n[s];return}const a=e?WP(s):String(s).trim();a!==s&&delete n[s],n[a]=dd(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return ae.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&ae.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[ox]=this[ox]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=wl(o);r[a]||($P(i,o),r[a]=!0)}return ae.isArray(e)?e.forEach(s):s(e),this}}Un.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(Un.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});ae.freezeMethods(Un);function Xh(t,e){const n=this||kc,r=e||n,i=Un.from(r.headers);let s=r.data;return ae.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function Sb(t){return!!(t&&t.__CANCEL__)}function ll(t,e,n){Ke.call(this,t??"canceled",Ke.ERR_CANCELED,e,n),this.name="CanceledError"}ae.inherits(ll,Ke,{__CANCEL__:!0});function wb(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ke("Request failed with status code "+n.status,[Ke.ERR_BAD_REQUEST,Ke.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function jP(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function XP(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let h=s,d=0;for(;h!==i;)d+=n[h++],h=h%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-or)return i&&(clearTimeout(i),i=null),n=a,t.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),t.apply(null,arguments)),r-(a-n)))}}const Hd=(t,e,n=3)=>{let r=0;const i=XP(50,250);return YP(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,c=i(l),u=ot instanceof Un?{...t}:t;function Mo(t,e){e=e||{};const n={};function r(c,u,h){return ae.isPlainObject(c)&&ae.isPlainObject(u)?ae.merge.call({caseless:h},c,u):ae.isPlainObject(u)?ae.merge({},u):ae.isArray(u)?u.slice():u}function i(c,u,h){if(ae.isUndefined(u)){if(!ae.isUndefined(c))return r(void 0,c,h)}else return r(c,u,h)}function s(c,u){if(!ae.isUndefined(u))return r(void 0,u)}function o(c,u){if(ae.isUndefined(u)){if(!ae.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,h){if(h in e)return r(c,u);if(h in t)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u)=>i(ax(c),ax(u),!0)};return ae.forEach(Object.keys(Object.assign({},t,e)),function(u){const h=l[u]||i,d=h(t[u],e[u],u);ae.isUndefined(d)&&h!==a||(n[u]=d)}),n}const Eb=t=>{const e=Mo({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=Un.from(o),e.url=_b(bb(e.baseURL,e.url),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(ae.isFormData(n)){if(Br.hasStandardBrowserEnv||Br.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[c,...u]=l?l.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Br.hasStandardBrowserEnv&&(r&&ae.isFunction(r)&&(r=r(e)),r||r!==!1&&qP(e.url))){const c=i&&s&&KP.read(s);c&&o.set(i,c)}return e},QP=typeof XMLHttpRequest{u&&(r(!m||m.type?new ll(null,t,u):m),u.abort(),u=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const d=jP(i.url);if(d&&Br.protocols.indexOf(d)===-1){r(new Ke("Unsupported protocol "+d+":",Ke.ERR_BAD_REQUEST,t));return}u.send(s||null)})},tD=(t,e)=>{let n=new AbortController,r;const i=function(l){if(!r){r=!0,o();const c=l instanceof Error?l:this.reason;n.abort(c instanceof Ke?c:new ll(c instanceof Error?c.message:c))}};let s=e&&setTimeout(()=>{i(new Ke(`timeout ${e} of ms exceeded`,Ke.ETIMEDOUT))},e);const o=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",i):l.unsubscribe(i))}),t=null)};t.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=o,[a,()=>{s&&clearTimeout(s),s=null}]},nD=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,i;for(;r{const s=rD(t,e,i);let o=0;return new ReadableStream({type:"bytes",async pull(a){const{done:l,value:c}=await s.next();if(l){a.close(),r();return}let u=c.byteLength;n&&n(o+=u),a.enqueue(new Uint8Array(c))},cancel(a){return r(a),s.return()}},{highWaterMark:2})},cx=(t,e)=>{const n=t!=null;return r=>setTimeout(()=>e({lengthComputable:n,total:t,loaded:r}))},Wf=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Mb=Wf&&typeof ReadableStream=="function",$m=Wf&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),iD=Mb&&(()=>{let t=!1;const e=new Request(Br.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})(),ux=64*1024,jm=Mb&&!!(()=>{try{return ae.isReadableStream(new Response("").body)}catch{}})(),Gd={stream:jm&&(t=>t.body)};Wf&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Gd[e]&&(Gd[e]=ae.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Ke(`Response type '${e}' is not supported`,Ke.ERR_NOT_SUPPORT,r)})})})(new Response);const sD=async t=>{if(t==null)return 0;if(ae.isBlob(t))return t.size;if(ae.isSpecCompliantForm(t))return(await new Request(t).arrayBuffer()).byteLength;if(ae.isArrayBufferView(t))return t.byteLength;if(ae.isURLSearchParams(t)&&(t=t+""),ae.isString(t))return(await $m(t)).byteLength},oD=async(t,e)=>{const n=ae.toFiniteNumber(t.getContentLength());return n??sD(e)},aD=Wf&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:h="same-origin",fetchOptions:d}=Eb(t);c=c?(c+"").toLowerCase():"text";let[m,v]=i||s||o?tD([i,s],o):[],p,g;const f=()=>{!p&&setTimeout(()=>{m&&m.unsubscribe()}),p=!0};let x;try{if(l&&iD&&n!=="get"&&n!=="head"&&(x=await oD(u,r))!==0){let M=new Request(e,{method:"POST",body:r,duplex:"half"}),S;ae.isFormData(r)&&(S=M.headers.get("content-type"))&&u.setContentType(S),M.body&&(r=lx(M.body,ux,cx(x,Hd(l)),null,$m))}ae.isString(h)||(h=h?"cors":"omit"),g=new Request(e,{...d,signal:m,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",withCredentials:h});let _=await fetch(g);const y=jm&&(c==="stream"||c==="response");if(jm&&(a||y)){const M={};["status","statusText","headers"].forEach(b=>{M[b]=_[b]});const S=ae.toFiniteNumber(_.headers.get("content-length"));_=new Response(lx(_.body,ux,a&&cx(S,Hd(a,!0)),y&&f,$m),M)}c=c||"text";let T=await Gd[ae.findKey(Gd,c)||"text"](_,t);return!y&&f(),v&&v(),await new Promise((M,S)=>{wb(M,S,{data:T,headers:Un.from(_.headers),status:_.status,statusText:_.statusText,config:t,request:g})})}catch(_){throw f(),_&&_.name==="TypeError"&&/fetch/i.test(_.message)?Object.assign(new Ke("Network Error",Ke.ERR_NETWORK,t,g),{cause:_.cause||_}):Ke.from(_,_&&_.code,t,g)}}),Xm={http:EP,xhr:eD,fetch:aD};ae.forEach(Xm,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const dx=t=>`- ${t}`,lD=t=>ae.isFunction(t)||t===null||t===!1,Tb={getAdapter:t=>{t=ae.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since : `+s.map(dx).join(` `):" "+dx(s[0]):"as no adapter specified";throw new Ke("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:Xm};function Yh(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ll(null,t)}function fx(t){return Yh(t),t.headers=Un.from(t.headers),t.data=Xh.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Tb.getAdapter(t.adapter||kc.adapter)(t).then(function(r){return Yh(t),r.data=Xh.call(t,t.transformResponse,r),r.headers=Un.from(r.headers),r},function(r){return Sb(r)||(Yh(t),r&&r.response&&(r.response.data=Xh.call(t,t.transformResponse,r.response),r.response.headers=Un.from(r.response.headers))),Promise.reject(r)})}const Cb="1.7.2",kg={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{kg[t]=function(r){return typeof r===t||"a"+(e{if(e===!1)throw new Ke(i(o," has been removed"+(n?" in "+n:"")),Ke.ERR_DEPRECATED);return n&&!hx[o]&&(hx[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,a):!0}};function cD(t,e,n){if(typeof t!="object")throw new Ke("options must be an object",Ke.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const a=t[s],l=a===void 0||o(a,s,t);if(l!==!0)throw new Ke("option "+s+" must be "+l,Ke.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ke("Unknown option "+s,Ke.ERR_BAD_OPTION)}}const Ym={assertOptions:cD,validators:kg},Gi=Ym.validators;class uo{constructor(e){this.defaults=e,this.interceptors={request:new sx,response:new sx}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Mo(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Ym.assertOptions(r,{silentJSONParsing:Gi.transitional(Gi.boolean),forcedJSONParsing:Gi.transitional(Gi.boolean),clarifyTimeoutError:Gi.transitional(Gi.boolean)},!1),i!=null&&(ae.isFunction(i)?n.paramsSerializer={serialize:i}:Ym.assertOptions(i,{encode:Gi.function,serialize:Gi.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&ae.merge(s.common,s[n.method]);s&&ae.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),n.headers=Un.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(l=l&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let u,h=0,d;if(!l){const v=[fx.bind(this),void 0];for(v.unshift.apply(v,a),v.push.apply(v,c),d=v.length,u=Promise.resolve(n);h<d;)u=u.then(v[h++],v[h++]);return u}d=a.length;let m=n;for(h=0;h<d;){const v=a[h++],p=a[h++];try{m=v(m)}catch(g){p.call(this,g);break}}try{u=fx.call(this,m)}catch(v){return Promise.reject(v)}for(h=0,d=c.length;h{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(s,o,a){r.reason||(r.reason=new ll(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new Fg(function(i){e=i}),cancel:e}}}function uD(t){return function(n){return t.apply(null,n)}}function dD(t){return ae.isObject(t)&&t.isAxiosError===!0}const qm={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(qm).forEach(([t,e])=>{qm[e]=t});function Ab(t){const e=new uo(t),n=ob(uo.prototype.request,e);return ae.extend(n,uo.prototype,e,{allOwnKeys:!0}),ae.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Ab(Mo(t,i))},n}const It=Ab(kc);It.Axios=uo;It.CanceledError=ll;It.CancelToken=Fg;It.isCancel=Sb;It.VERSION=Cb;It.toFormData=Gf;It.AxiosError=Ke;It.Cancel=It.CanceledError;It.all=function(e){return Promise.all(e)};It.spread=uD;It.isAxiosError=dD;It.mergeConfig=Mo;It.AxiosHeaders=Un;It.formToJSON=t=>yb(ae.isHTMLForm(t)?new FormData(t):t);It.getAdapter=Tb.getAdapter;It.HttpStatusCode=qm;It.default=It;let wu;const Fc=async()=>{wu||(wu=It.get("https://www.catchplay.com/ssr-oauth/getOauth"));const t=await wu;return wu=null,t},wi=It.create({baseURL:"https://sunapi.catchplay.com"});wi.interceptors.request.use(async t=>{const{data:e}=await Fc();return e&&(t.headers.authorization=`Bearer ${e.access_token}`),t},t=>Promise.reject(t));wi.interceptors.response.use(t=>t,async t=>{var e;if(((e=t.response)==null?void 0:e.status)===401)try{const{data:n}=await Fc();n&&(wi.defaults.headers.common={...wi.defaults.headers.common,authorization:`Bearer ${n.access_token}`})}catch(n){console.log(n)}return Promise.reject(t)});const Yl=It.create({baseURL:"https://sunapi.catchplay.com"});Yl.interceptors.request.use(async t=>{const{data:e}=await Fc();return e&&(t.headers.authorization=`Bearer ${e.access_token}`),t},t=>Promise.reject(t));Yl.interceptors.response.use(t=>t,async t=>{var e;if(((e=t.response)==null?void 0:e.status)===401)try{const{data:n}=await Fc();n&&(Yl.defaults.headers.common={...Yl.defaults.headers.common,authorization:`Bearer ${n.access_token}`})}catch(n){console.log(n)}return Promise.reject(t)});function Rb(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Rb(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function fD(){for(var t,e,n=0,r="",i=arguments.length;na(s)))==null?void 0:o.classGroupId}const px=/^\[(.+)\]$/;function pD(t){if(px.test(t)){const e=px.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}}function mD(t){const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return vD(Object.entries(t.classGroups),n).forEach(([s,o])=>{Km(o,r,s,e)}),r}function Km(t,e,n,r){t.forEach(i=>{if(typeof i=="string"){const s=i===""?e:mx(e,i);s.classGroupId=n;return}if(typeof i=="function"){if(gD(i)){Km(i(r),e,n,r);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Km(o,mx(e,s),n,r)})})}function mx(t,e){let n=t;return e.split(zg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function gD(t){return t.isThemeGetter}function vD(t,e){return e?t.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[n,i]}):t}function _D(t){if(t{},set:()=>{}};let e=0,n=new Map,r=new Map;function i(s,o){n.set(s,o),e++,e>t&&(e=0,r=n,n=new Map)}return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}}const Db="!";function xD(t){const e=t.separator,n=e.length===1,r=e[0],i=e.length;return function(o){const a=[];let l=0,c=0,u;for(let p=0;pc?u-c:void 0;return{modifiers:a,hasImportantModifier:d,baseClassName:m,maybePostfixModifierPosition:v}}}function yD(t){if(t.length{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e}function SD(t){return{cache:_D(t.cacheSize),splitModifiers:xD(t),...hD(t)}}const wD=/\s+/;function bD(t,e){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=new Set;return t.trim().split(wD).map(o=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(o);let h=r(u?c.substring(0,u):c),d=!!u;if(!h){if(!u)return{isTailwindClass:!1,originalClassName:o};if(h=r(c),!h)return{isTailwindClass:!1,originalClassName:o};d=!1}const m=yD(a).join(":");return{isTailwindClass:!0,modifierId:l?m+Db:m,classGroupId:h,originalClassName:o,hasPostfixModifier:d}}).reverse().filter(o=>{if(!o.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=o,u=a+l;return s.has(u)?!1:(s.add(u),i(l,c).forEach(h=>s.add(a+h)),!0)}).reverse().map(o=>o.originalClassName).join(" ")}function ED(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=Nb(e))&&(r&&(r+=" "),r+=n);return r}function Nb(t){if(typeof t=="string")return t;let e,n="";for(let r=0;rh(u),t());return n=SD(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=bD(l,n);return i(l,u),u}return function(){return s(ED.apply(null,arguments))}}function vt(t){const e=n=>n[t]||[];return e.isThemeGetter=!0,e}const Lb=/^\[(?:([a-z-]+):)?(.+)\]$/i,TD=/^\d+\/\d+$/,CD=new Set(["px","full","screen"]),AD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,RD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,PD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,DD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ND=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function di(t){return io(t)||CD.has(t)||TD.test(t)}function Wi(t){return cl(t,"length",BD)}function io(t){return!!t&&!Number.isNaN(Number(t))}function bu(t){return cl(t,"number",io)}function bl(t){return!!t&&Number.isInteger(Number(t))}function LD(t){return t.endsWith("%")&&io(t.slice(0,-1))}function Ze(t){return Lb.test(t)}function $i(t){return AD.test(t)}const ID=new Set(["length","size","percentage"]);function OD(t){return cl(t,ID,Ib)}function UD(t){return cl(t,"position",Ib)}const kD=new Set(["image","url"]);function FD(t){return cl(t,kD,HD)}function zD(t){return cl(t,"",VD)}function El(){return!0}function cl(t,e,n){const r=Lb.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1}function BD(t){return RD.test(t)&&!PD.test(t)}function Ib(){return!1}function VD(t){return DD.test(t)}function HD(t){return ND.test(t)}function GD(){const t=vt("colors"),e=vt("spacing"),n=vt("blur"),r=vt("brightness"),i=vt("borderColor"),s=vt("borderRadius"),o=vt("borderSpacing"),a=vt("borderWidth"),l=vt("contrast"),c=vt("grayscale"),u=vt("hueRotate"),h=vt("invert"),d=vt("gap"),m=vt("gradientColorStops"),v=vt("gradientColorStopPositions"),p=vt("inset"),g=vt("margin"),f=vt("opacity"),x=vt("padding"),_=vt("saturate"),y=vt("scale"),T=vt("sepia"),M=vt("skew"),S=vt("space"),b=vt("translate"),E=()=>["auto","contain","none"],w=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",Ze,e],z=()=>[Ze,e],H=()=>["",di,Wi],B=()=>["auto",io,Ze],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],G=()=>["","0",Ze],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[io,bu],J=()=>[io,Ze];return{cacheSize:500,separator:":",theme:{colors:[El],spacing:[di,Wi],blur:["none","",$i,Ze],brightness:W(),borderColor:[t],borderRadius:["none","","full",$i,Ze],borderSpacing:z(),borderWidth:H(),contrast:W(),grayscale:G(),hueRotate:J(),invert:G(),gap:z(),gradientColorStops:[t],gradientColorStopPositions:[LD,Wi],inset:R(),margin:R(),opacity:W(),padding:z(),saturate:W(),scale:W(),sepia:G(),skew:J(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",Ze]}],container:["container"],columns:[{columns:[$i]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...V(),Ze]}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",bl,Ze]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ze]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",bl,Ze]}],"grid-cols":[{"grid-cols":[El]}],"col-start-end":[{col:["auto",{span:["full",bl,Ze]},Ze]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[El]}],"row-start-end":[{row:["auto",{span:[bl,Ze]},Ze]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ze]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ze,e]}],"min-w":[{"min-w":[Ze,e,"min","max","fit"]}],"max-w":[{"max-w":[Ze,e,"none","full","min","max","fit","prose",{screen:[$i]},$i]}],h:[{h:[Ze,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ze,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ze,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ze,e,"auto","min","max","fit"]}],"font-size":[{text:["base",$i,Wi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",bu]}],"font-family":[{font:[El]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ze]}],"line-clamp":[{"line-clamp":["none",io,bu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",di,Ze]}],"list-image":[{"list-image":["none",Ze]}],"list-style-type":[{list:["none","disc","decimal",Ze]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[f]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[f]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",di,Wi]}],"underline-offset":[{"underline-offset":["auto",di,Ze]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[f]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),UD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",OD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},FD]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[f]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[f]}],"divide-style":[{divide:I()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[di,Ze]}],"outline-w":[{outline:[di,Wi]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[f]}],"ring-offset-w":[{"ring-offset":[di,Wi]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",$i,zD]}],"shadow-color":[{shadow:[El]}],opacity:[{opacity:[f]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",$i,Ze]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[_]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[f]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ze]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",Ze]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[bl,Ze]}],"translate-x":[{"translate-x":[b]}],"translate-y":[{"translate-y":[b]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ze]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ze]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ze]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[di,Wi,bu]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const WD=MD(GD);function Zn(...t){return WD(fD(t))}const gx=ge.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)}),qh={dedupe:!0},$D=(t,e,n)=>{const{cache:r,compare:i,suspense:s,fallbackData:o,revalidateOnMount:a,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:h,keepPreviousData:d}=n,[m,v,p,g]=Or.get(r),[f,x]=sl(t),_=D.useRef(!1),y=D.useRef(!1),T=D.useRef(f),M=D.useRef(e),S=D.useRef(n),b=()=>S.current,E=()=>b().isVisible()&&b().isOnline(),[w,R,z,H]=Df(r,f),B=D.useRef({}).current,V=Ne(o)?n.fallback[f]:o,I=(U,j)=>{for(const ce in B){const ie=ce;if(ie==="data"){if(!i(U[ie],j[ie])&&(!Ne(U[ie])||!i(Q,j[ie])))return!1}else if(j[ie]!==U[ie])return!1}return!0},F=D.useMemo(()=>{const U=!f||!e?!1:Ne(a)?b().isPaused()||s?!1:Ne(l)?!0:l:a,j=Se=>{const N=On(Se);return delete N._k,U?{isValidating:!0,isLoading:!0,...N}:N},ce=w(),ie=H(),Ee=j(ce),Ae=ce===ie?Ee:j(ie);let pe=Ee;return[()=>{const Se=j(w());return I(Se,pe)?(pe.data=Se.data,pe.isLoading=Se.isLoading,pe.isValidating=Se.isValidating,pe.error=Se.error,pe):(pe=Se,Se)},()=>Ae]},[r,f]),A=Eg.useSyncExternalStore(D.useCallback(U=>z(f,(j,ce)=>{I(ce,j)||U()}),[r,f]),F[0],F[1]),G=!_.current,Y=m[f]&&m[f].length>0,W=A.data,J=Ne(W)?V:W,me=A.error,$=D.useRef(J),Q=d?Ne(W)?$.current:W:J,le=Y&&!Ne(me)?!1:G&&!Ne(a)?a:b().isPaused()?!1:s?Ne(J)?!1:l:Ne(J)||l,he=!!(f&&e&&G&&le),Pe=Ne(A.isValidating)?he:A.isValidating,Le=Ne(A.isLoading)?he:A.isLoading,Me=D.useCallback(async U=>{const j=M.current;if(!f||!j||y.current||b().isPaused())return!1;let ce,ie,Ee=!0;const Ae=U||{},pe=!p[f]||!Ae.dedupe,Se=()=>wo?!y.current&&f===T.current&&_.current:f===T.current,N={isValidating:!1,isLoading:!1},C=()=>{R(N)},Z=()=>{const re=p[f];re&&re[1]===ie&&delete p[f]},ue={isValidating:!0};Ne(w().data)&&(ue.isLoading=!0);try{if(pe&&(R(ue),n.loadingTimeout&&Ne(w().data)&&setTimeout(()=>{Ee&&Se()&&b().onLoadingSlow(f,n)},n.loadingTimeout),p[f]=[j(x),bo()]),[ce,ie]=p[f],ce=await ce,pe&&setTimeout(Z,n.dedupingInterval),!p[f]||p[f][1]!==ie)return pe&&Se()&&b().onDiscarded(f),!1;N.error=Tt;const re=v[f];if(!Ne(re)&&(ie<=re[0]||ie{const de=m[f];de&&de[0]&&de[0](bn.ERROR_REVALIDATE_EVENT,oe)},{retryCount:(Ae.retryCount||0)+1,dedupe:!0})))}return Ee=!1,C(),!0},[f,r]),O=D.useCallback((...U)=>Nf(r,T.current,...U),[]);if(yr(()=>{M.current=e,S.current=n,Ne(W)||($.current=W)}),yr(()=>{if(!f)return;const U=Me.bind(Tt,qh);let j=0;const ie=Pg(f,m,(Ee,Ae={})=>{if(Ee==bn.FOCUS_EVENT){const pe=Date.now();b().revalidateOnFocus&&pe>j&&E()&&(j=pe+b().focusThrottleInterval,U())}else if(Ee==bn.RECONNECT_EVENT)b().revalidateOnReconnect&&E()&&U();else{if(Ee==bn.MUTATE_EVENT)return Me();if(Ee==bn.ERROR_REVALIDATE_EVENT)return Me(Ae)}});return y.current=!1,T.current=f,_.current=!0,R({_k:x}),le&&(Ne(J)||Ni?U():Tg(U)),()=>{y.current=!0,ie()}},[f]),yr(()=>{let U;function j(){const ie=wn(c)?c(w().data):c;ie&&U!==-1&&(U=setTimeout(ce,ie))}function ce(){!w().error&&(u||b().isVisible())&&(h||b().isOnline())?Me(qh).then(j):j()}return j(),()=>{U&&(clearTimeout(U),U=-1)}},[c,u,h,f]),D.useDebugValue(Q),s&&Ne(J)&&f){if(!wo&&Ni)throw new Error("Fallback data is required when using suspense in SSR.");M.current=e,S.current=n,y.current=!1;const U=g[f];if(!Ne(U)){const j=O(U);gx(j)}if(Ne(me)){const j=Me(qh);Ne(Q)||(j.status="fulfilled",j.value=!0),gx(j)}else throw me}return{mutate:O,get data(){return B.data=!0,Q},get error(){return B.error=!0,me},get isValidating(){return B.isValidating=!0,Pe},get isLoading(){return B.isLoading=!0,Le}}};Ta.defineProperty(Ag,"defaultValue",{value:Lf});const jD=Rg($D),XD=t=>(e,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,t(e,n,r)),YD=Ow(jD,XD),qD={auth:void 0},Ob=D.createContext(qD);function KD({children:t}){const{isLoading:e,data:n}=YD({name:"getAuth"},Fc,{errorRetryCount:0}),r=D.useMemo(()=>({isLoading:e,auth:n==null?void 0:n.data}),[e,n]);return L.jsx(Ob.Provider,{value:r,children:t})}const ZD=()=>{const t=D.useContext(Ob);if(t===void 0)throw new Error("useAuth must be used within a AuthProvider");return t},JD={date:void 0},Ub=D.createContext(JD);function QD({children:t}){const[e,n]=D.useState(Ht(void 0).format("YYYY-MM-DDTHH:mm"));console.log(e);const r=D.useMemo(()=>({date:e}),[e]);return L.jsxs(Ub.Provider,{value:r,children:["",t]})}const Bg=()=>{const t=D.useContext(Ub);if(t===void 0)throw new Error("useConfig must be used within a ConfigProvider");return t};function Ft({name:t,...e}){const n=`#icon-${t}`;return L.jsx("svg",{...e,"aria-hidden":"true",className:Zn("w-[1em] h-[1em] fill-current",e.className),children:L.jsx("use",{xlinkHref:n})})}function xi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kb(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}/*! * GSAP 3.12.5 * https://gsap.com * * @license Copyright 2008-2024, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license or for * Club GSAP members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com */var nr={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Ga={duration:.5,overwrite:!1,delay:0},Vg,pn,wt,gr=1e8,ht=1/gr,Zm=Math.PI*2,e4=Zm/4,t4=0,Fb=Math.sqrt,n4=Math.cos,r4=Math.sin,tn=function(e){return typeof e=="string"},Lt=function(e){return typeof e=="function"},Li=function(e){return typeof e=="number"},Hg=function(e){return typeof e>"u"},ci=function(e){return typeof e=="object"},kn=function(e){return e!==!1},Gg=function(){return typeof window<"u"},Eu=function(e){return Lt(e)||tn(e)},zb=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},mn=Array.isArray,Jm=/(?:-?\.?\d|\.)+/gi,Bb=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,va=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Kh=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Vb=/[+-]=-?[.\d]+/,Hb=/[^,'"\[\]\s]+/gi,i4=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Mt,Yr,Qm,Wg,sr={},Wd={},Gb,Wb=function(e){return(Wd=To(e,sr))&&Gn},$g=function(e,n){return console.warn("Invalid property",e,"set to",n,"Missing plugin? gsap.registerPlugin()")},yc=function(e,n){return!n&&console.warn(e)},$b=function(e,n){return e&&(sr[e]=n)&&Wd&&(Wd[e]=n)||sr},Sc=function(){return 0},s4={suppressEvents:!0,isStart:!0,kill:!1},fd={suppressEvents:!0,kill:!1},o4={suppressEvents:!0},jg={},ys=[],e0={},jb,Kn={},Zh={},vx=30,hd=[],Xg="",Yg=function(e){var n=e[0],r,i;if(ci(n)||Lt(n)||(e=[e]),!(r=(n._gsap||{}).harness)){for(i=hd.length;i--&&!hd[i].targetTest(n););r=hd[i]}for(i=e.length;i--;)e[i]&&(e[i]._gsap||(e[i]._gsap=new gE(e[i],r)))||e.splice(i,1);return e},fo=function(e){return e._gsap||Yg(vr(e))[0]._gsap},Xb=function(e,n,r){return(r=e[n])&&Lt(r)?e[n]():Hg(r)&&e.getAttribute&&e.getAttribute(n)||r},Fn=function(e,n){return(e=e.split(",")).forEach(n)||e},Ut=function(e){return Math.round(e*1e5)/1e5||0},Qt=function(e){return Math.round(e*1e7)/1e7||0},Aa=function(e,n){var r=n.charAt(0),i=parseFloat(n.substr(2));return e=parseFloat(e),r==="+"?e+i:r==="-"?e-i:r==="*"?e*i:e/i},a4=function(e,n){for(var r=n.length,i=0;e.indexOf(n[i])<0&&++i<r;);return i<r},$d=function(){var e=ys.length,n=ys.slice(0),r,i;for(e0={},ys.length=0,r=0;r<e;r++)i=n[r],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},Yb=function(e,n,r,i){ys.length&&!pn&&$d(),e.render(n,r,pn&&n<0&&(e._initted||e._startAt)),ys.length&&!pn&&$d()},qb=function(e){var n=parseFloat(e);return(n||n===0)&&(e+"").match(Hb).length<2?n:tn(e)?e.trim():e},Kb=function(e){return e},Er=function(e,n){for(var r in n)r in e||(e[r]=n[r]);return e},l4=function(e){return function(n,r){for(var i in r)i in n||i==="duration"&&e||i==="ease"||(n[i]=r[i])}},To=function(e,n){for(var r in n)e[r]=n[r];return e},_x=function t(e,n){for(var r in n)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(e[r]=ci(n[r])?t(e[r]||(e[r]={}),n[r]):n[r]);return e},jd=function(e,n){var r={},i;for(i in e)i in n||(r[i]=e[i]);return r},ql=function(e){var n=e.parent||Mt,r=e.keyframes?l4(mn(e.keyframes)):Er;if(kn(e.inherit))for(;n;)r(e,n.vars.defaults),n=n.parent||n._dp;return e},c4=function(e,n){for(var r=e.length,i=r===n.length;i&&r--&&e[r]===n[r];);return ra;)o=o._prev;return o?(n._next=o._next,o._next=n):(n._next=e[r],e[r]=n),n._next?n._next._prev=n:e[i]=n,n._prev=o,n.parent=n._dp=e,n},$f=function(e,n,r,i){r===void 0&&(r="_first"),i===void 0&&(i="_last");var s=n._prev,o=n._next;s?s._next=o:e[r]===n&&(e[r]=o),o?o._prev=s:e[i]===n&&(e[i]=s),n._next=n._prev=n.parent=null},Ts=function(e,n){e.parent&&(!n||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},ho=function(e,n){if(e&&(!n||n._end>e._dur||n._start=0?0:n._dirty?n.totalDuration():n._tDur)},jf=function(e){return e._end=Qt(e._start+(e._tDur/Math.abs(e._ts||e._rts||ht)||0))},Xf=function(e,n){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=Qt(r._time-(e._ts>0?n/e._ts:((e._dirty?e.totalDuration():e._tDur)-n)/-e._ts)),jf(e),r._dirty||ho(r,e)),e},Jb=function(e,n){var r;if((n._time||!n._dur&&n._initted||n._startht)&&n.render(r,!0)),ho(e,n)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-ht}},Qr=function(e,n,r,i){return n.parent&&Ts(n),n._start=Qt((Li(r)?r:r||e!==Mt?dr(e,r,n):e._time)+n._delay),n._end=Qt(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),Zb(e,n,"_first","_last",e._sort?"_start":0),n0(n)||(e._recent=n),i||Jb(e,n),e._ts<0&&Xf(e,e._tTime),e},Qb=function(e,n){return(sr.ScrollTrigger||$g("scrollTrigger",n))&&sr.ScrollTrigger.create(n,e)},eE=function(e,n,r,i,s){if(Kg(e,n,s),!e._initted)return 1;if(!r&&e._pt&&!pn&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&jb!==Jn.frame)return ys.push(e),e._lazy=[s,i],1},f4=function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))},n0=function(e){var n=e.data;return n==="isFromStart"||n==="isStart"},h4=function(e,n,r,i){var s=e.ratio,o=n<0||!n&&(!e._start&&f4(e)&&!(!e._initted&&n0(e))||(e._ts<0||e._dp._ts<0)&&!n0(e))?0:1,a=e._rDelay,l=0,c,u,h;if(a&&e._repeat&&(l=zc(0,e._tDur,n),u=Wa(l,a),e._yoyo&&u&1&&(o=1-o),u!==Wa(e._tTime,a)&&(s=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==s||pn||i||e._zTime===ht||!n&&e._zTime){if(!e._initted&&eE(e,n,i,r,l))return;for(h=e._zTime,e._zTime=n||(r?ht:0),r||(r=n&&!h),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,c=e._pt;c;)c.r(o,c.d),c=c._next;n=e._tDur||nn)for(i=e._first;i&&i._startn)return i;i=i._next}else for(i=e._last;i&&i._start>=r;){if(i.data==="isPause"&&i._start<n)return i;i=i._prev}},$a=function(e,n,r,i){var s=e._repeat,o=Qt(n)||0,a=e._tTime/e._tDur;return a&&!i&&(e._time*=o/e._dur),e._dur=o,e._tDur=s?s0&&!i&&Xf(e,e._tTime=e._tDur*a),e.parent&&jf(e),r||ho(e.parent,e),e},yx=function(e){return e instanceof En?ho(e):$a(e,e._dur)},m4={_start:0,endTime:Sc,totalDuration:Sc},dr=function t(e,n,r){var i=e.labels,s=e._recent||m4,o=e.duration()>=gr?s.endTime(!1):e._dur,a,l,c;return tn(n)&&(isNaN(n)||n in i)?(l=n.charAt(0),c=n.substr(-1)==="%",a=n.indexOf("="),l===""?(a>=0&&(n=n.replace(/=/,"")),(l==="=0))+(parseFloat(n.substr(1))||0)*(c?(a<0?s:r).totalDuration()/100:1)):a1?t(e,n.substr(0,a-1),r)+l:o+l)):n==null?o:+n},Kl=function(e,n,r){var i=Li(n[1]),s=(i?2:1)+(e<2?0:1),o=n[s],a,l;if(i&&(o.duration=n[1]),o.parent=r,e){for(a=o,l=r;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=kn(l.vars.inherit)&&l.parent;o.immediateRender=kn(a.immediateRender),e<2?o.runBackwards=1:o.startAt=n[s-1]}return new Vt(n[0],o,n[s+1])},Ls=function(e,n){return e||e===0?n(e):n},zc=function(e,n,r){return rn?n:r},hn=function(e,n){return!tn(e)||!(n=i4.exec(e))?"":n[1]},g4=function(e,n,r){return Ls(r,function(i){return zc(e,n,i)})},r0=[].slice,tE=function(e,n){return e&&ci(e)&&"length"in e&&(!n&&!e.length||e.length-1 in e&&ci(e[0]))&&!e.nodeType&&e!==Yr},v4=function(e,n,r){return r===void 0&&(r=[]),e.forEach(function(i){var s;return tn(i)&&!n||tE(i,1)?(s=r).push.apply(s,vr(i)):r.push(i)})||r},vr=function(e,n,r){return wt&&!n&&wt.selector?wt.selector(e):tn(e)&&!r&&(Qm||!ja())?r0.call((n||Wg).querySelectorAll(e),0):mn(e)?v4(e,r):tE(e)?r0.call(e,0):e?[e]:[]},i0=function(e){return e=vr(e)[0]||yc("Invalid scope")||{},function(n){var r=e.current||e.nativeElement||e;return vr(n,r.querySelectorAll?r:r===e?yc("Invalid scope")||Wg.createElement("div"):e)}},nE=function(e){return e.sort(function(){return .5-Math.random()})},rE=function(e){if(Lt(e))return e;var n=ci(e)?e:{each:e},r=po(n.ease),i=n.from||0,s=parseFloat(n.base)||0,o={},a=i>0&&i<1,l=isNaN(i)||a,c=n.axis,u=i,h=i;return tn(i)?u=h={center:.5,edges:.5,end:1}[i]||0:!a&&l&&(u=i[0],h=i[1]),function(d,m,v){var p=(v||n).length,g=o[p],f,x,_,y,T,M,S,b,E;if(!g){if(E=n.grid==="auto"?0:(n.grid||[1,gr])[1],!E){for(S=-gr;S<(S=v[E++].getBoundingClientRect().left)&&E<p;);E<p&&E--}for(g=o[p]=[],f=l?Math.min(E,p)*u-.5:i%E,x=E===gr?0:l?p*h/E-.5:i/E|0,S=0,b=gr,M=0;M

S&&(S=T),Tp?p-1:c?c==="y"?p/E:E:Math.max(E,p/E))||0)*(i==="edges"?-1:1),g.b=p<0?s-p:s,g.u=hn(n.amount||n.each)||0,r=r&&p<0?hE(r):r}return p=(g[d]-g.min)/g.max||0,Qt(g.b+(r?r(p):p)*g.v)+g.u}},s0=function(e){var n=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var i=Qt(Math.round(parseFloat(r)/e)*e*n);return(i-i%1)/n+(Li(r)?0:hn(r))}},iE=function(e,n){var r=mn(e),i,s;return!r&&ci(e)&&(i=r=e.radius||gr,e.values?(e=vr(e.values),(s=!Li(e[0]))&&(i*=i)):e=s0(e.increment)),Ls(n,r?Lt(e)?function(o){return s=e(o),Math.abs(s-o)<=i?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),c=gr,u=0,h=e.length,d,m;h--;)s?(d=e[h].x-a,m=e[h].y-l,d=d*d+m*m):d=Math.abs(e[h]-a),d<c&&(c=d,u=h);return u=!i||c<=i?e[u]:o,s||u===o||Li(o)?u:u+hn(o)}:s0(e))},sE=function(e,n,r,i){return Ls(mn(e)?!n:r===!0?!!(r=0):!i,function(){return mn(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(n-e+r*.99))/r)*r*i)/i})},_4=function(){for(var e=arguments.length,n=new Array(e),r=0;ri?s-o:o)})},wc=function(e){for(var n=0,r="",i,s,o,a;~(i=e.indexOf("random(",n));)o=e.indexOf(")",i),a=e.charAt(i+7)==="[",s=e.substr(i+7,o-i-7).match(a?Hb:Jm),r+=e.substr(n,i-n)+sE(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),n=o+1;return r+e.substr(n,e.length-n)},aE=function(e,n,r,i,s){var o=n-e,a=i-r;return Ls(s,function(l){return r+((l-e)/o*a||0)})},b4=function t(e,n,r,i){var s=isNaN(e+n)?0:function(m){return(1-m)*e+m*n};if(!s){var o=tn(e),a={},l,c,u,h,d;if(r===!0&&(i=1)&&(r=null),o)e={p:e},n={p:n};else if(mn(e)&&!mn(n)){for(u=[],h=e.length,d=h-2,c=1;c<h;c++)u.push(t(e[c-1],e[c]));h--,s=function(v){v*=h;var p=Math.min(d,~~v);return u[p](v-p)},r=n}else i||(e=To(mn(e)?[]:{},e));if(!u){for(l in n)qg.call(a,e,l,"get",n[l]);s=function(v){return Qg(v,a)||(o?e.p:e)}}}return Ls(r,s)},Sx=function(e,n,r){var i=e.labels,s=gr,o,a,l;for(o in i)a=i[o]-n,a(a=Math.abs(a))&&(l=o,s=a);return l},er=function(e,n,r){var i=e.vars,s=i[n],o=wt,a=e._ctx,l,c,u;if(s)return l=i[n+"Params"],c=i.callbackScope||e,r&&ys.length&&$d(),a&&(wt=a),u=l?s.apply(c,l):s.call(c),wt=o,u},Ol=function(e){return Ts(e),e.scrollTrigger&&e.scrollTrigger.kill(!!pn),e.progress()<1&&er(e,"onInterrupt"),e},_a,lE=[],cE=function(e){if(e)if(e=!e.name&&e.default||e,Gg()||e.headless){var n=e.name,r=Lt(e),i=n&&!r&&e.init?function(){this._props=[]}:e,s={init:Sc,render:Qg,add:qg,kill:z4,modifier:F4,rawVars:0},o={targetTest:0,get:0,getSetter:Jg,aliases:{},register:0};if(ja(),e!==i){if(Kn[n])return;Er(i,Er(jd(e,s),o)),To(i.prototype,To(s,jd(e,o))),Kn[i.prop=n]=i,e.targetTest&&(hd.push(i),jg[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}$b(n,i),e.register&&e.register(Gn,i,zn)}else lE.push(e)},ft=255,Ul={aqua:[0,ft,ft],lime:[0,ft,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,ft],navy:[0,0,128],white:[ft,ft,ft],olive:[128,128,0],yellow:[ft,ft,0],orange:[ft,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[ft,0,0],pink:[ft,192,203],cyan:[0,ft,ft],transparent:[ft,ft,ft,0]},Jh=function(e,n,r){return e+=e1?-1:0,(e*6<1?n+(r-n)*e*6:e<.5?r:e*3>16,e>>8&ft,e&ft]:0:Ul.black,s,o,a,l,c,u,h,d,m,v;if(!i){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Ul[e])i=Ul[e];else if(e.charAt(0)==="#"){if(e.length>16,i>>8&ft,i&ft,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),i=[e>>16,e>>8&ft,e&ft]}else if(e.substr(0,3)==="hsl"){if(i=v=e.match(Jm),!n)l=+i[0]%360/360,c=+i[1]/100,u=+i[2]/100,o=u3&&(i[3]*=1),i[0]=Jh(l+1/3,s,o),i[1]=Jh(l,s,o),i[2]=Jh(l-1/3,s,o);else if(~e.indexOf("="))return i=e.match(Bb),r&&i.length.5?m/(2-h-d):m/(h+d),l=h===s?(o-a)/m+(o<a?6:0):h===o?(a-s)/m+2:(s-o)/m+4,l*=60),i[0]=~~(l+.5),i[1]=~~(c*100+.5),i[2]=~~(u*100+.5)),r&&i.length<4&&(i[3]=1),i},dE=function(e){var n=[],r=[],i=-1;return e.split(Ss).forEach(function(s){var o=s.match(va)||[];n.push.apply(n,o),r.push(i+=o.length+1)}),n.c=r,n},wx=function(e,n,r){var i="",s=(e+i).match(Ss),o=n?"hsla(":"rgba(",a=0,l,c,u,h;if(!s)return e;if(s=s.map(function(d){return(d=uE(d,n,1))&&o+(n?d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:d.join(","))+")"}),r&&(u=dE(e),l=r.c,l.join(i)!==u.c.join(i)))for(c=e.replace(Ss,"1").split(va),h=c.length-1;a<h;a++)i+=c[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(u.length?u:s.length?s:r).shift());if(!c)for(c=e.split(Ss),h=c.length-1;ae||f0||x)&&(M=++h.frame,d=T-h.time*1e3,h.time=T=T/1e3,o+=_+(_>=s?4:s-_),y=1),x||(l=c(p)),y)for(m=0;m<a.length;m++)a[m](T,d,M,g)};return h={time:0,frame:0,tick:function(){v(!0)},deltaRatio:function(g){return d/(1e3/(g||60))},wake:function(){Gb&&(!Qm&&Gg()&&(Yr=Qm=window,Wg=Yr.document||{},sr.gsap=Gn,(Yr.gsapVersions||(Yr.gsapVersions=[])).push(Gn.version),Wb(Wd||Yr.GreenSockGlobals||!Yr.gsap&&Yr||{}),lE.forEach(cE)),u=typeof requestAnimationFrame=f&&m--},_listeners:a},h}(),ja=function(){return!bc&&Jn.wake()},tt={},M4=/^[\d.\-M][\d.\-,\s]/,T4=/["']/g,C4=function(e){for(var n={},r=e.substr(1,e.length-3).split(":"),i=r[0],s=1,o=r.length,a,l,c;s<o;s++)l=r[s],a=s!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),n[i]=isNaN(c)?c.replace(T4,"").trim():+c,i=l.substr(a+1).trim();return n},A4=function(e){var n=e.indexOf("(")+1,r=e.indexOf(")"),i=e.indexOf("(",n);return e.substring(n,~i&&i1&&r.config?r.config.apply(null,~e.indexOf("{")?[C4(n[1])]:A4(e).split(",").map(qb)):tt._CE&&M4.test(e)?tt._CE("",e):r},hE=function(e){return function(n){return 1-e(1-n)}},pE=function t(e,n){for(var r=e._first,i;r;)r instanceof En?t(r,n):r.vars.yoyoEase&&(!r._yoyo||!r._repeat)&&r._yoyo!==n&&(r.timeline?t(r.timeline,n):(i=r._ease,r._ease=r._yEase,r._yEase=i,r._yoyo=n)),r=r._next},po=function(e,n){return e&&(Lt(e)?e:tt[e]||R4(e))||n},No=function(e,n,r,i){r===void 0&&(r=function(l){return 1-n(1-l)}),i===void 0&&(i=function(l){return l<.5?n(l*2)/2:1-n((1-l)*2)/2});var s={easeIn:n,easeOut:r,easeInOut:i},o;return Fn(e,function(a){tt[a]=sr[a]=s,tt[o=a.toLowerCase()]=r;for(var l in s)tt[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=tt[a+"."+l]=s[l]}),s},mE=function(e){return function(n){return n=1?n:1,s=(r||(e?.3:.45))/(n<1?n:1),o=s/Zm*(Math.asin(1/i)||0),a=function(u){return u===1?1:i*Math.pow(2,-10*u)*r4((u-o)*s)+1},l=e==="out"?a:e==="in"?function(c){return 1-a(1-c)}:mE(a);return s=Zm/s,l.config=function(c,u){return t(e,c,u)},l},ep=function t(e,n){n===void 0&&(n=1.70158);var r=function(o){return o?--o*o*((n+1)*o+n)+1:0},i=e==="out"?r:e==="in"?function(s){return 1-r(1-s)}:mE(r);return i.config=function(s){return t(e,s)},i};Fn("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var n=e<5?e+1:e;No(t+",Power"+(n-1),e?function(r){return Math.pow(r,n)}:function(r){return r},function(r){return 1-Math.pow(1-r,n)},function(r){return r<.5?Math.pow(r*2,n)/2:1-Math.pow((1-r)*2,n)/2})});tt.Linear.easeNone=tt.none=tt.Linear.easeIn;No("Elastic",Qh("in"),Qh("out"),Qh());(function(t,e){var n=1/e,r=2*n,i=2.5*n,s=function(a){return a<n?t*a*a:a<r?t*Math.pow(a-1.5/e,2)+.75:a0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},e.totalDuration=function(r){return arguments.length?(this._dirty=0,$a(this,this._repeat=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts0||!this._tDur&&!r)&&Qr(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===ht||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),Yb(this,r,i)),this},e.time=function(r,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+xx(this))%(this._dur+this._rDelay)||(r?this._dur:0),i):this._time},e.totalProgress=function(r,i){return arguments.length?this.totalTime(this.totalDuration()*r,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(r,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+xx(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(r,i){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*s,i):this._repeat?Wa(this._tTime,s)+1:1},e.timeScale=function(r,i){if(!arguments.length)return this._rts===-ht?0:this._rts;if(this._rts===r)return this;var s=this.parent&&this._ts?Xd(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-ht?0:this._rts,this.totalTime(zc(-Math.abs(this._delay),this._tDur,s),i!==!1),jf(this),u4(this)},e.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(ja(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==ht&&(this._tTime-=ht)))),this):this._ps},e.startTime=function(r){if(arguments.length){this._start=r;var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&Qr(i,this,r-this._delay),this}return this._start},e.endTime=function(r){return this._start+(kn(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(r){var i=this.parent||this._dp;return i?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Xd(i.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=o4);var i=pn;return pn=r,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),pn=i,this},e.globalTime=function(r){for(var i=this,s=arguments.length?r:i.rawTime();i;)s=i._start+s/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(r):s},e.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,yx(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var i=this._time;return this._rDelay=r,yx(this),i?this.time(i):this}return this._rDelay},e.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},e.seek=function(r,i){return this.totalTime(dr(this,r),kn(i))},e.restart=function(r,i){return this.play().totalTime(r?-this._delay:0,kn(i))},e.play=function(r,i){return r!=null&&this.seek(r,i),this.reversed(!1).paused(!1)},e.reverse=function(r,i){return r!=null&&this.seek(r||this.totalDuration(),i),this.reversed(!0).paused(!1)},e.pause=function(r,i){return r!=null&&this.seek(r,i),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-ht:0)),this):this._rts=i&&s1?(i?(o[r]=i,s&&(o[r+"Params"]=s),r==="onUpdate"&&(this._onUpdate=i)):delete o[r],this):o[r]},e.then=function(r){var i=this;return new Promise(function(s){var o=Lt(r)?r:Kb,a=function(){var c=i.then;i.then=null,Lt(o)&&(o=o(i))&&(o.then||o===i)&&(i.then=c),s(o),i.then=c};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?a():i._prom=a})},e.kill=function(){Ol(this)},t}();Er(Ec.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-ht,_prom:0,_ps:!1,_rts:1});var En=function(t){kb(e,t);function e(r,i){var s;return r===void 0&&(r={}),s=t.call(this,r)||this,s.labels={},s.smoothChildTiming=!!r.smoothChildTiming,s.autoRemoveChildren=!!r.autoRemoveChildren,s._sort=kn(r.sortChildren),Mt&&Qr(r.parent||Mt,xi(s),i),r.reversed&&s.reverse(),r.paused&&s.paused(!0),r.scrollTrigger&&Qb(xi(s),r.scrollTrigger),s}var n=e.prototype;return n.to=function(i,s,o){return Kl(0,arguments,this),this},n.from=function(i,s,o){return Kl(1,arguments,this),this},n.fromTo=function(i,s,o,a){return Kl(2,arguments,this),this},n.set=function(i,s,o){return s.duration=0,s.parent=this,ql(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new Vt(i,s,dr(this,o),1),this},n.call=function(i,s,o){return Qr(this,Vt.delayedCall(0,i,s),o)},n.staggerTo=function(i,s,o,a,l,c,u){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=u,o.parent=this,new Vt(i,o,dr(this,l)),this},n.staggerFrom=function(i,s,o,a,l,c,u){return o.runBackwards=1,ql(o).immediateRender=kn(o.immediateRender),this.staggerTo(i,s,o,a,l,c,u)},n.staggerFromTo=function(i,s,o,a,l,c,u,h){return a.startAt=o,ql(a).immediateRender=kn(a.immediateRender),this.staggerTo(i,s,a,l,c,u,h)},n.render=function(i,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,u=i<=0?0:Qt(i),h=this._zTime<0!=il&&i>=0&&(u=l),u!==this._tTime||o||h){if(a!==this._time&&c&&(u+=this._time-a,i+=this._time-a),d=u,y=this._start,_=this._ts,f=!_,h&&(c||(a=this._zTime),(i||!s)&&(this._zTime=i)),this._repeat){if(M=this._yoyo,g=c+this._rDelay,this._repeat<-1&&ic&&(d=c)),T=Wa(this._tTime,g),!a&&this._tTime&&T!==p&&this._tTime-T*g-this._dur<=0&&(T=p),M&&p&1&&(d=c-d,S=1),p!==T&&!this._lock){var b=M&&T&1,E=b===(M&&p&1);if(p<T&&(b=!b),a=b?0:u%c?c:u,this._lock=1,this.render(a||(S?0:Qt(p*g)),s,!c)._lock=0,this._tTime=u,!s&&this.parent&&er(this,"onRepeat"),this.vars.repeatRefresh&&!S&&(this.invalidate()._lock=1),a&&a!==this._time||f!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,E&&(this._lock=2,a=b?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!S&&this.invalidate()),this._lock=0,!this._ts&&!f)return this;pE(this,S)}}if(this._hasPause&&!this._forcing&&this._lock=a&&i>=0)for(m=this._first;m;){if(v=m._next,(m._act||d>=m._start)&&m._ts&&x!==m){if(m.parent!==this)return this.render(i,s,o);if(m.render(m._ts>0?(d-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(d-m._start)*m._ts,s,o),d!==this._time||!this._ts&&!f){x=0,v&&(u+=this._zTime=-ht);break}}m=v}else{m=this._last;for(var w=i<0?i:d;m;){if(v=m._prev,(m._act||w0?(w-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(w-m._start)*m._ts,s,o||pn&&(m._initted||m._startAt)),d!==this._time||!this._ts&&!f){x=0,v&&(u+=this._zTime=w?-ht:ht);break}}m=v}}if(x&&!s&&(this.pause(),x.render(d>=a?0:-ht)._zTime=d>=a?1:-1,this._ts))return this._start=y,jf(this),this.render(i,s,o);this._onUpdate&&!s&&er(this,"onUpdate",!0),(u===l&&this._tTime>=this.totalDuration()||!u&&a)&&(y===this._start||Math.abs(_)!==Math.abs(this._ts))&&(this._lock||((i||!c)&&(u===l&&this._ts>0||!u&&this._ts<0)&&Ts(this,1),!s&&!(i=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u0)&&this._prom())))}return this},n.add=function(i,s){var o=this;if(Li(s)||(s=dr(this,s,i)),!(i instanceof Ec)){if(mn(i))return i.forEach(function(a){return o.add(a,s)}),this;if(tn(i))return this.addLabel(i,s);if(Lt(i))i=Vt.delayedCall(0,i);else return this}return this!==i?Qr(this,i,s):this},n.getChildren=function(i,s,o,a){i===void 0&&(i=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-gr);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof Vt?s&&l.push(c):(o&&l.push(c),i&&l.push.apply(l,c.getChildren(!0,s,o)))),c=c._next;return l},n.getById=function(i){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===i)return s[o]},n.remove=function(i){return tn(i)?this.removeLabel(i):Lt(i)?this.killTweensOf(i):($f(this,i),i===this._recent&&(this._recent=this._last),ho(this))},n.totalTime=function(i,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Qt(Jn.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),t.prototype.totalTime.call(this,i,s),this._forcing=0,this):this._tTime},n.addLabel=function(i,s){return this.labels[i]=dr(this,s),this},n.removeLabel=function(i){return delete this.labels[i],this},n.addPause=function(i,s,o){var a=Vt.delayedCall(0,s||Sc,o);return a.data="isPause",this._hasPause=1,Qr(this,a,dr(this,i))},n.removePause=function(i){var s=this._first;for(i=dr(this,i);s;)s._start===i&&s.data==="isPause"&&Ts(s),s=s._next},n.killTweensOf=function(i,s,o){for(var a=this.getTweensOf(i,o),l=a.length;l--;)as!==a[l]&&a[l].kill(i,s);return this},n.getTweensOf=function(i,s){for(var o=[],a=vr(i),l=this._first,c=Li(s),u;l;)l instanceof Vt?a4(l._targets,a)&&(c?(!as||l._initted&&l._ts)&&l.globalTime(0)s:!s||l.isActive())&&o.push(l):(u=l.getTweensOf(a,s)).length&&o.push.apply(o,u),l=l._next;return o},n.tweenTo=function(i,s){s=s||{};var o=this,a=dr(o,i),l=s,c=l.startAt,u=l.onStart,h=l.onStartParams,d=l.immediateRender,m,v=Vt.to(o,Er({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||ht,onStart:function(){if(o.pause(),!m){var g=s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());v._dur!==g&&$a(v,g,0,1).render(v._time,!0,!0),m=1}u&&u.apply(v,h||[])}},s));return d?v.render(0):v},n.tweenFromTo=function(i,s,o){return this.tweenTo(s,Er({startAt:{time:dr(this,i)}},o))},n.recent=function(){return this._recent},n.nextLabel=function(i){return i===void 0&&(i=this._time),Sx(this,dr(this,i))},n.previousLabel=function(i){return i===void 0&&(i=this._time),Sx(this,dr(this,i),1)},n.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+ht)},n.shiftChildren=function(i,s,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,c;a;)a._start>=o&&(a._start+=i,a._end+=i),a=a._next;if(s)for(c in l)l[c]>=o&&(l[c]+=i);return ho(this)},n.invalidate=function(i){var s=this._first;for(this._lock=0;s;)s.invalidate(i),s=s._next;return t.prototype.invalidate.call(this,i)},n.clear=function(i){i===void 0&&(i=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),ho(this)},n.totalDuration=function(i){var s=0,o=this,a=o._last,l=gr,c,u,h;if(arguments.length)return o.timeScale((o._repeatl&&o._sort&&a._ts&&!o._lock?(o._lock=1,Qr(o,a,u-a._delay,1)._lock=0):l=u,us&&a._ts&&(s=a._end),a=c;$a(o,o===Mt&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(i){if(Mt._ts&&(Yb(Mt,Xd(i,Mt)),jb=Jn.frame),Jn.frame>=vx){vx+=nr.autoSleep||120;var s=Mt._first;if((!s||!s._ts)&&nr.autoSleep&&Jn._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Jn.sleep()}}},e}(Ec);Er(En.prototype,{_lock:0,_hasPause:0,_forcing:0});var P4=function(e,n,r,i,s,o,a){var l=new zn(this._pt,e,n,0,1,wE,null,s),c=0,u=0,h,d,m,v,p,g,f,x;for(l.b=r,l.e=i,r+="",i+="",(f=~i.indexOf("random("))&&(i=wc(i)),o&&(x=[r,i],o(x,e,n),r=x[0],i=x[1]),d=r.match(Kh)||[];h=Kh.exec(i);)v=h[0],p=i.substring(c,h.index),m?m=(m+1)%5:p.substr(-5)==="rgba("&&(m=1),v!==d[u++]&&(g=parseFloat(d[u-1])||0,l._pt={_next:l._pt,p:p||u===1?p:",",s:g,c:v.charAt(1)==="="?Aa(g,v)-g:parseFloat(v)-g,m:m&&m<4?Math.round:0},c=Kh.lastIndex);return l.c=c<i.length?i.substring(c,i.length):"",l.fp=a,(Vb.test(i)||f)&&(l.e=0),this._pt=l,l},qg=function(e,n,r,i,s,o,a,l,c,u){Lt(i)&&(i=i(s||0,e,o));var h=e[n],d=r!=="get"?r:Lt(h)?c?e[n.indexOf("set")||!Lt(e["get"+n.substr(3)])?n:"get"+n.substr(3)](c):e[n]():h,m=Lt(h)?c?O4:yE:Zg,v;if(tn(i)&&(~i.indexOf("random(")&&(i=wc(i)),i.charAt(1)==="="&&(v=Aa(d,i)+(hn(d)||0),(v||v===0)&&(i=v))),!u||d!==i||o0)return!isNaN(d*i)&&i!==""?(v=new zn(this._pt,e,n,+d||0,i-(d||0),typeof h=="boolean"?k4:SE,0,m),c&&(v.fp=c),a&&v.modifier(a,this,e),this._pt=v):(!h&&!(n in e)&&$g(n,i),P4.call(this,e,n,d,i,m,l||nr.stringFilter,c))},D4=function(e,n,r,i,s){if(Lt(e)&&(e=Zl(e,s,n,r,i)),!ci(e)||e.style&&e.nodeType||mn(e)||zb(e))return tn(e)?Zl(e,s,n,r,i):e;var o={},a;for(a in e)o[a]=Zl(e[a],s,n,r,i);return o},vE=function(e,n,r,i,s,o){var a,l,c,u;if(Kn[e]&&(a=new Kn[e]).init(s,a.rawVars?n[e]:D4(n[e],i,s,o,r),r,i,o)!==!1&&(r._pt=l=new zn(r._pt,s,e,0,1,a.render,a,0,a.priority),r!==_a))for(c=r._ptLookup[r._targets.indexOf(s)],u=a._props.length;u--;)c[a._props[u]]=l;return a},as,o0,Kg=function t(e,n,r){var i=e.vars,s=i.ease,o=i.startAt,a=i.immediateRender,l=i.lazy,c=i.onUpdate,u=i.runBackwards,h=i.yoyoEase,d=i.keyframes,m=i.autoRevert,v=e._dur,p=e._startAt,g=e._targets,f=e.parent,x=f&&f.data==="nested"?f.vars.targets:g,_=e._overwrite==="auto"&&!Vg,y=e.timeline,T,M,S,b,E,w,R,z,H,B,V,I,F;if(y&&(!d||!s)&&(s="none"),e._ease=po(s,Ga.ease),e._yEase=h?hE(po(h===!0?s:h,Ga.ease)):0,h&&e._yoyo&&!e._repeat&&(h=e._yEase,e._yEase=e._ease,e._ease=h),e._from=!y&&!!i.runBackwards,!y||d&&!i.stagger){if(z=g[0]?fo(g[0]).harness:0,I=z&&i[z.prop],T=jd(i,jg),p&&(p._zTime<0&&p.progress(1),n<0&&u&&a&&!m?p.render(-1,!0):p.revert(u&&v?fd:s4),p._lazy=0),o){if(Ts(e._startAt=Vt.set(g,Er({data:"isStart",overwrite:!1,parent:f,immediateRender:!0,lazy:!p&&kn(l),startAt:null,delay:0,onUpdate:c&&function(){return er(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,n<0&&(pn||!a&&!m)&&e._startAt.revert(fd),a&&v&&n<=0&&r<=0){n&&(e._zTime=n);return}}else if(u&&v&&!p){if(n&&(a=!1),S=Er({overwrite:!1,data:"isFromStart",lazy:a&&!p&&kn(l),immediateRender:a,stagger:0,parent:f},T),I&&(S[z.prop]=I),Ts(e._startAt=Vt.set(g,S)),e._startAt._dp=0,e._startAt._sat=e,n<0&&(pn?e._startAt.revert(fd):e._startAt.render(-1,!0)),e._zTime=n,!a)t(e._startAt,ht,ht);else if(!n)return}for(e._pt=e._ptCache=0,l=v&&kn(l)||l&&!v,M=0;M<g.length;M++){if(E=g[M],R=E._gsap||Yg(g)[M]._gsap,e._ptLookup[M]=B={},e0[R.id]&&ys.length&&$d(),V=x===g?M:x.indexOf(E),z&&(H=new z).init(E,I||T,e,V,x)!==!1&&(e._pt=b=new zn(e._pt,E,H.name,0,1,H.render,H,0,H.priority),H._props.forEach(function(A){B[A]=b}),H.priority&&(w=1)),!z||I)for(S in T)Kn[S]&&(H=vE(S,T,e,V,E,x))?H.priority&&(w=1):B[S]=b=qg.call(e,E,S,"get",T[S],V,x,0,i.stringFilter);e._op&&e._op[M]&&e.kill(E,e._op[M]),_&&e._pt&&(as=e,Mt.killTweensOf(E,B,e.globalTime(n)),F=!e.parent,as=0),e._pt&&l&&(e0[R.id]=1)}w&&bE(e),e._onInit&&e._onInit(e)}e._onUpdate=c,e._initted=(!e._op||e._pt)&&!F,d&&n<=0&&y.render(gr,!0,!0)},N4=function(e,n,r,i,s,o,a,l){var c=(e._pt&&e._ptCache||(e._ptCache={}))[n],u,h,d,m;if(!c)for(c=e._ptCache[n]=[],d=e._ptLookup,m=e._targets.length;m--;){if(u=d[m][n],u&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==n&&u.fp!==n;)u=u._next;if(!u)return o0=1,e.vars[n]="+=0",Kg(e,a),o0=0,l?yc(n+" not eligible for reset"):1;c.push(u)}for(m=c.length;m--;)h=c[m],u=h._pt||h,u.s=(i||i===0)&&!s?i:u.s+(i||0)+o*u.c,u.c=r-u.s,h.e&&(h.e=Ut(r)+hn(h.e)),h.b&&(h.b=u.s+hn(h.b))},L4=function(e,n){var r=e[0]?fo(e[0]).harness:0,i=r&&r.aliases,s,o,a,l;if(!i)return n;s=To({},n);for(o in i)if(o in s)for(l=i[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},I4=function(e,n,r,i){var s=n.ease||i||"power1.inOut",o,a;if(mn(n))a=r[e]||(r[e]=[]),n.forEach(function(l,c){return a.push({t:c/(n.length-1)*100,v:l,e:s})});else for(o in n)a=r[o]||(r[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:n[o],e:s})},Zl=function(e,n,r,i,s){return Lt(e)?e.call(n,r,i,s):tn(e)&&~e.indexOf("random(")?wc(e):e},_E=Xg+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",xE={};Fn(_E+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return xE[t]=1});var Vt=function(t){kb(e,t);function e(r,i,s,o){var a;typeof i=="number"&&(s.duration=i,i=s,s=null),a=t.call(this,o?i:ql(i))||this;var l=a.vars,c=l.duration,u=l.delay,h=l.immediateRender,d=l.stagger,m=l.overwrite,v=l.keyframes,p=l.defaults,g=l.scrollTrigger,f=l.yoyoEase,x=i.parent||Mt,_=(mn(r)||zb(r)?Li(r[0]):"length"in i)?[r]:vr(r),y,T,M,S,b,E,w,R;if(a._targets=_.length?Yg(_):yc("GSAP target "+r+" not found. https://gsap.com",!nr.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=m,v||d||Eu(c)||Eu(u)){if(i=a.vars,y=a.timeline=new En({data:"nested",defaults:p||{},targets:x&&x.data==="nested"?x.vars.targets:_}),y.kill(),y.parent=y._dp=xi(a),y._start=0,d||Eu(c)||Eu(u)){if(S=_.length,w=d&&rE(d),ci(d))for(b in d)~_E.indexOf(b)&&(R||(R={}),R[b]=d[b]);for(T=0;T")}),y.duration();else{M={};for(b in v)b==="ease"||b==="easeEach"||I4(b,v[b],M,v.easeEach);for(b in M)for(H=M[b].sort(function(I,F){return I.t-F.t}),z=0,T=0;T<H.length;T++)B=H[T],V={ease:B.e,duration:(B.t-(T?H[T-1].t:0))/100*c},V[b]=B.v,y.to(_,V,z),z+=V.duration;y.duration()<c&&y.to({},{duration:c-y.duration()})}}c||a.duration(c=y.duration())}else a.timeline=0;return m===!0&&!Vg&&(as=xi(a),Mt.killTweensOf(_),as=0),Qr(x,xi(a),s),i.reversed&&a.reverse(),i.paused&&a.paused(!0),(h||!c&&!v&&a._start===Qt(x._time)&&kn(h)&&d4(xi(a))&&x.data!=="nested")&&(a._tTime=-ht,a.render(Math.max(0,-u)||0)),g&&Qb(xi(a),g),a}var n=e.prototype;return n.render=function(i,s,o){var a=this._time,l=this._tDur,c=this._dur,u=il-ht&&!u?l:i<ht?0:i,d,m,v,p,g,f,x,_,y;if(!c)h4(this,i,s,o);else if(h!==this._tTime||!i||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==u){if(d=h,_=this.timeline,this._repeat){if(p=c+this._rDelay,this._repeatc&&(d=c)),f=this._yoyo&&v&1,f&&(y=this._yEase,d=c-d),g=Wa(this._tTime,p),d===a&&!o&&this._initted&&v===g)return this._tTime=h,this;v!==g&&(_&&this._yEase&&pE(_,f),this.vars.repeatRefresh&&!f&&!this._lock&&this._time!==p&&this._initted&&(this._lock=o=1,this.render(Qt(p*v),!0).invalidate()._lock=0))}if(!this._initted){if(eE(this,u?i:d,o,s,h))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&v!==g))return this;if(c!==this._dur)return this.render(i,s,o)}if(this._tTime=h,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=x=(y||this._ease)(d/c),this._from&&(this.ratio=x=1-x),d&&!a&&!s&&!v&&(er(this,"onStart"),this._tTime!==h))return this;for(m=this._pt;m;)m.r(x,m.d),m=m._next;_&&_.render(i0||!h&&this._ts<0)&&Ts(this,1),!s&&!(u&&!a)&&(h||a||f)&&(er(this,h===l?"onComplete":"onReverseComplete",!0),this._prom&&!(h0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),t.prototype.invalidate.call(this,i)},n.resetTo=function(i,s,o,a,l){bc||Jn.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||Kg(this,c),u=this._ease(c/this._dur),N4(this,i,s,o,a,u,c,l)?this.resetTo(i,s,o,a,1):(Xf(this,0),this.parent||Zb(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(i,s){if(s===void 0&&(s="all"),!i&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?Ol(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(i,s,as&&as.vars.overwrite!==!0)._first||Ol(this),this.parent&&o!==this.timeline.totalDuration()&&$a(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=i?vr(i):a,c=this._ptLookup,u=this._pt,h,d,m,v,p,g,f;if((!s||s==="all")&&c4(a,l))return s==="all"&&(this._pt=0),Ol(this);for(h=this._op=this._op||[],s!=="all"&&(tn(s)&&(p={},Fn(s,function(x){return p[x]=1}),s=p),s=L4(a,s)),f=a.length;f--;)if(~l.indexOf(a[f])){d=c[f],s==="all"?(h[f]=s,v=d,m={}):(m=h[f]=h[f]||{},v=s);for(p in v)g=d&&d[p],g&&((!("kill"in g.d)||g.d.kill(p)===!0)&&$f(this,g,"_pt"),delete d[p]),m!=="all"&&(m[p]=1)}return this._initted&&!this._pt&&u&&Ol(this),this},e.to=function(i,s){return new e(i,s,arguments[2])},e.from=function(i,s){return Kl(1,arguments)},e.delayedCall=function(i,s,o,a){return new e(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(i,s,o){return Kl(2,arguments)},e.set=function(i,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new e(i,s)},e.killTweensOf=function(i,s,o){return Mt.killTweensOf(i,s,o)},e}(Ec);Er(Vt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Fn("staggerTo,staggerFrom,staggerFromTo",function(t){Vt[t]=function(){var e=new En,n=r0.call(arguments,0);return n.splice(t==="staggerFromTo"?5:4,0,0),e[t].apply(e,n)}});var Zg=function(e,n,r){return e[n]=r},yE=function(e,n,r){return e[n](r)},O4=function(e,n,r,i){return e[n](i.fp,r)},U4=function(e,n,r){return e.setAttribute(n,r)},Jg=function(e,n){return Lt(e[n])?yE:Hg(e[n])&&e.setAttribute?U4:Zg},SE=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e6)/1e6,n)},k4=function(e,n){return n.set(n.t,n.p,!!(n.s+n.c*e),n)},wE=function(e,n){var r=n._pt,i="";if(!e&&n.b)i=n.b;else if(e===1&&n.e)i=n.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*e):Math.round((r.s+r.c*e)*1e4)/1e4)+i,r=r._next;i+=n.c}n.set(n.t,n.p,i,n)},Qg=function(e,n){for(var r=n._pt;r;)r.r(e,r.d),r=r._next},F4=function(e,n,r,i){for(var s=this._pt,o;s;)o=s._next,s.p===i&&s.modifier(e,n,r),s=o},z4=function(e){for(var n=this._pt,r,i;n;)i=n._next,n.p===e&&!n.op||n.op===e?$f(this,n,"_pt"):n.dep||(r=1),n=i;return!r},B4=function(e,n,r,i){i.mSet(e,n,i.m.call(i.tween,r,i.mt),i)},bE=function(e){for(var n=e._pt,r,i,s,o;n;){for(r=n._next,i=s;i&&i.pr>n.pr;)i=i._next;(n._prev=i?i._prev:o)?n._prev._next=n:s=n,(n._next=i)?i._prev=n:o=n,n=r}e._pt=s},zn=function(){function t(n,r,i,s,o,a,l,c,u){this.t=r,this.s=s,this.c=o,this.p=i,this.r=a||SE,this.d=l||this,this.set=c||Zg,this.pr=u||0,this._next=n,n&&(n._prev=this)}var e=t.prototype;return e.modifier=function(r,i,s){this.mSet=this.mSet||this.set,this.set=B4,this.m=r,this.mt=s,this.tween=i},t}();Fn(Xg+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(t){return jg[t]=1});sr.TweenMax=sr.TweenLite=Vt;sr.TimelineLite=sr.TimelineMax=En;Mt=new En({sortChildren:!1,defaults:Ga,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});nr.stringFilter=fE;var mo=[],pd={},V4=[],bx=0,H4=0,tp=function(e){return(pd[e]||V4).map(function(n){return n()})},a0=function(){var e=Date.now(),n=[];e-bx>2&&(tp("matchMediaInit"),mo.forEach(function(r){var i=r.queries,s=r.conditions,o,a,l,c;for(a in i)o=Yr.matchMedia(i[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,c=1);c&&(r.revert(),l&&n.push(r))}),tp("matchMediaRevert"),n.forEach(function(r){return r.onMatch(r,function(i){return r.add(null,i)})}),bx=e,tp("matchMedia"))},EE=function(){function t(n,r){this.selector=r&&i0(r),this.data=[],this._r=[],this.isReverted=!1,this.id=H4++,n&&this.add(n)}var e=t.prototype;return e.add=function(r,i,s){Lt(r)&&(s=i,i=r,r=Lt);var o=this,a=function(){var c=wt,u=o.selector,h;return c&&c!==o&&c.data.push(o),s&&(o.selector=i0(s)),wt=o,h=i.apply(o,arguments),Lt(h)&&o._r.push(h),wt=c,o.selector=u,o.isReverted=!1,h};return o.last=a,r===Lt?a(o,function(l){return o.add(null,l)}):r?o[r]=a:a},e.ignore=function(r){var i=wt;wt=null,r(this),wt=i},e.getTweens=function(){var r=[];return this.data.forEach(function(i){return i instanceof t?r.push.apply(r,i.getTweens()):i instanceof Vt&&!(i.parent&&i.parent.data==="nested")&&r.push(i)}),r},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(r,i){var s=this;if(r?function(){for(var a=s.getTweens(),l=s.data.length,c;l--;)c=s.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(u){return a.splice(a.indexOf(u),1)}));for(a.map(function(u){return{g:u._dur||u._delay||u._sat&&!u._sat.vars.immediateRender?u.globalTime(0):-1/0,t:u}}).sort(function(u,h){return h.g-u.g||-1/0}).forEach(function(u){return u.t.revert(r)}),l=s.data.length;l--;)c=s.data[l],c instanceof En?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof Vt)&&c.revert&&c.revert(r);s._r.forEach(function(u){return u(r,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),i)for(var o=mo.length;o--;)mo[o].id===this.id&&mo.splice(o,1)},e.revert=function(r){this.kill(r||{})},t}(),G4=function(){function t(n){this.contexts=[],this.scope=n,wt&&wt.data.push(this)}var e=t.prototype;return e.add=function(r,i,s){ci(r)||(r={matches:r});var o=new EE(0,s||this.scope),a=o.conditions={},l,c,u;wt&&!o.selector&&(o.selector=wt.selector),this.contexts.push(o),i=o.add("onMatch",i),o.queries=r;for(c in r)c==="all"?u=1:(l=Yr.matchMedia(r[c]),l&&(mo.indexOf(o)<0&&mo.push(o),(a[c]=l.matches)&&(u=1),l.addListener?l.addListener(a0):l.addEventListener("change",a0)));return u&&i(o,function(h){return o.add(null,h)}),this},e.revert=function(r){this.kill(r||{})},e.kill=function(r){this.contexts.forEach(function(i){return i.kill(r,!0)})},t}(),Yd={registerPlugin:function(){for(var e=arguments.length,n=new Array(e),r=0;r1){var i=e.map(function(u){return Gn.quickSetter(u,n,r)}),s=i.length;return function(u){for(var h=s;h--;)i[h](u)}}e=e[0]||{};var o=Kn[n],a=fo(e),l=a.harness&&(a.harness.aliases||{})[n]||n,c=o?function(u){var h=new o;_a._pt=0,h.init(e,r?u+r:u,_a,0,[e]),h.render(1,h),_a._pt&&Qg(1,_a)}:a.set(e,l);return o?c:function(u){return c(e,l,r?u+r:u,a,1)}},quickTo:function(e,n,r){var i,s=Gn.to(e,To((i={},i[n]="+=0.1",i.paused=!0,i),r||{})),o=function(l,c,u){return s.resetTo(n,l,c,u)};return o.tween=s,o},isTweening:function(e){return Mt.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=po(e.ease,Ga.ease)),_x(Ga,e||{})},config:function(e){return _x(nr,e||{})},registerEffect:function(e){var n=e.name,r=e.effect,i=e.plugins,s=e.defaults,o=e.extendTimeline;(i||"").split(",").forEach(function(a){return a&&!Kn[a]&&!sr[a]&&yc(n+" effect requires "+a+" plugin.")}),Zh[n]=function(a,l,c){return r(vr(a),Er(l||{},s),c)},o&&(En.prototype[n]=function(a,l,c){return this.add(Zh[n](a,ci(l)?l:(c=l)&&{},this),c)})},registerEase:function(e,n){tt[e]=po(n)},parseEase:function(e,n){return arguments.length?po(e,n):tt},getById:function(e){return Mt.getById(e)},exportRoot:function(e,n){e===void 0&&(e={});var r=new En(e),i,s;for(r.smoothChildTiming=kn(e.smoothChildTiming),Mt.remove(r),r._dp=0,r._time=r._tTime=Mt._time,i=Mt._first;i;)s=i._next,(n||!(!i._dur&&i instanceof Vt&&i.vars.onComplete===i._targets[0]))&&Qr(r,i,i._start-i._delay),i=s;return Qr(Mt,r,0),r},context:function(e,n){return e?new EE(e,n):wt},matchMedia:function(e){return new G4(e)},matchMediaRefresh:function(){return mo.forEach(function(e){var n=e.conditions,r,i;for(i in n)n[i]&&(n[i]=!1,r=1);r&&e.revert()})||a0()},addEventListener:function(e,n){var r=pd[e]||(pd[e]=[]);~r.indexOf(n)||r.push(n)},removeEventListener:function(e,n){var r=pd[e],i=r&&r.indexOf(n);i>=0&&r.splice(i,1)},utils:{wrap:S4,wrapYoyo:w4,distribute:rE,random:sE,snap:iE,normalize:y4,getUnit:hn,clamp:g4,splitColor:uE,toArray:vr,selector:i0,mapRange:aE,pipe:_4,unitize:x4,interpolate:b4,shuffle:nE},install:Wb,effects:Zh,ticker:Jn,updateRoot:En.updateRoot,plugins:Kn,globalTimeline:Mt,core:{PropTween:zn,globals:$b,Tween:Vt,Timeline:En,Animation:Ec,getCache:fo,_removeLinkedListItem:$f,reverting:function(){return pn},context:function(e){return e&&wt&&(wt.data.push(e),e._ctx=wt),wt},suppressOverwrites:function(e){return Vg=e}}};Fn("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Yd[t]=Vt[t]});Jn.add(En.updateRoot);_a=Yd.to({},{duration:0});var W4=function(e,n){for(var r=e._pt;r&&r.p!==n&&r.op!==n&&r.fp!==n;)r=r._next;return r},$4=function(e,n){var r=e._targets,i,s,o;for(i in n)for(s=r.length;s--;)o=e._ptLookup[s][i],o&&(o=o.d)&&(o._pt&&(o=W4(o,i)),o&&o.modifier&&o.modifier(n[i],e,r[s],i))},np=function(e,n){return{name:e,rawVars:1,init:function(i,s,o){o._onInit=function(a){var l,c;if(tn(s)&&(l={},Fn(s,function(u){return l[u]=1}),s=l),n){l={};for(c in s)l[c]=n(s[c]);s=l}$4(a,s)}}}},Gn=Yd.registerPlugin({name:"attr",init:function(e,n,r,i,s){var o,a,l;this.tween=r;for(o in n)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",n[o],i,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,n){for(var r=n._pt;r;)pn?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",init:function(e,n){for(var r=n.length;r--;)this.add(e,r,e[r]||0,n[r],0,0,0,0,0,1)}},np("roundProps",s0),np("modifiers"),np("snap",iE))||Yd;Vt.version=En.version=Gn.version="3.12.5";Gb=1;Gg()&&ja();tt.Power0;tt.Power1;tt.Power2;tt.Power3;tt.Power4;tt.Linear;tt.Quad;tt.Cubic;tt.Quart;tt.Quint;tt.Strong;tt.Elastic;tt.Back;tt.SteppedEase;tt.Bounce;tt.Sine;tt.Expo;tt.Circ;/*! * CSSPlugin 3.12.5 * https://gsap.com * * Copyright 2008-2024, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license or for * Club GSAP members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com */var Ex,ls,Ra,ev,so,Mx,tv,j4=function(){return typeof window<"u"},Ii={},qs=180/Math.PI,Pa=Math.PI/180,Fo=Math.atan2,Tx=1e8,nv=/([A-Z])/g,X4=/(left|right|width|margin|padding|x)/i,Y4=/[\s,\(]\S/,ri={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},l0=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},q4=function(e,n){return n.set(n.t,n.p,e===1?n.e:Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},K4=function(e,n){return n.set(n.t,n.p,e?Math.round((n.s+n.c*e)*1e4)/1e4+n.u:n.b,n)},Z4=function(e,n){var r=n.s+n.c*e;n.set(n.t,n.p,~~(r+(r=0)return;o.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Bn,n,"")),e=Ct}(s||n)&&this.props.push(e,n,s[e])},CE=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},sN=function(){var e=this.props,n=this.target,r=n.style,i=n._gsap,s,o;for(s=0;s<e.length;s+=3)e[s+1]?n[e[s]]=e[s+2]:e[s+2]?r[e[s]]=e[s+2]:r.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(nv,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)i[o]=this.tfm[o];i.svg&&(i.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),s=tv(),(!s||!s.isStart)&&!r[Ct]&&(CE(r),i.zOrigin&&r[Bn]&&(r[Bn]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},AE=function(e,n){var r={target:e,props:[],revert:sN,save:iN};return e._gsap||Gn.core.getCache(e),n&&n.split(",").forEach(function(i){return r.save(i)}),r},RE,c0=function(e,n){var r=ls.createElementNS?ls.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):ls.createElement(e);return r&&r.style?r:ls.createElement(e)},ai=function t(e,n,r){var i=getComputedStyle(e);return i[n]||i.getPropertyValue(n.replace(nv,"-$1").toLowerCase())||i.getPropertyValue(n)||!r&&t(e,Xa(n)||n,1)||""},Cx="O,Moz,ms,Ms,Webkit".split(","),Xa=function(e,n,r){var i=n||so,s=i.style,o=5;if(e in s&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(Cx[o]+e in s););return o=0?Cx[o]:"")+e},u0=function(){j4()&&window.document&&(Ex=window,ls=Ex.document,Ra=ls.documentElement,so=c0("div")||{style:{}},c0("div"),Ct=Xa(Ct),Bn=Ct+"Origin",so.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",RE=!!Xa("perspective"),tv=Gn.core.reverting,ev=1)},rp=function t(e){var n=c0("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,i=this.nextSibling,s=this.style.cssText,o;if(Ra.appendChild(n),n.appendChild(this),this.style.display="block",e)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch{}else this._gsapBBox&&(o=this._gsapBBox());return r&&(i?r.insertBefore(this,i):r.appendChild(this)),Ra.removeChild(n),this.style.cssText=s,o},Ax=function(e,n){for(var r=n.length;r--;)if(e.hasAttribute(n[r]))return e.getAttribute(n[r])},PE=function(e){var n;try{n=e.getBBox()}catch{n=rp.call(e,!0)}return n&&(n.width||n.height)||e.getBBox===rp||(n=rp.call(e,!0)),n&&!n.width&&!n.x&&!n.y?{x:+Ax(e,["x","cx","x1"])||0,y:+Ax(e,["y","cy","y1"])||0,width:0,height:0}:n},DE=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&PE(e))},Co=function(e,n){if(n){var r=e.style,i;n in Ii&&n!==Bn&&(n=Ct),r.removeProperty?(i=n.substr(0,2),(i==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),r.removeProperty(i==="--"?n:n.replace(nv,"-$1").toLowerCase())):r.removeAttribute(n)}},cs=function(e,n,r,i,s,o){var a=new zn(e._pt,n,r,0,1,o?TE:ME);return e._pt=a,a.b=i,a.e=s,e._props.push(r),a},Rx={deg:1,rad:1,turn:1},oN={grid:1,flex:1},Cs=function t(e,n,r,i){var s=parseFloat(r)||0,o=(r+"").trim().substr((s+"").length)||"px",a=so.style,l=X4.test(n),c=e.tagName.toLowerCase()==="svg",u=(c?"client":"offset")+(l?"Width":"Height"),h=100,d=i==="px",m=i==="%",v,p,g,f;if(i===o||!s||Rx[i]||Rx[o])return s;if(o!=="px"&&!d&&(s=t(e,n,r,"px")),f=e.getCTM&&DE(e),(m||o==="%")&&(Ii[n]||~n.indexOf("adius")))return v=f?e.getBBox()[l?"width":"height"]:e[u],Ut(m?s/v*h:s/100*v);if(a[l?"width":"height"]=h+(d?o:i),p=~n.indexOf("adius")||i==="em"&&e.appendChild&&!c?e:e.parentNode,f&&(p=(e.ownerSVGElement||{}).parentNode),(!p||p===ls||!p.appendChild)&&(p=ls.body),g=p._gsap,g&&m&&g.width&&l&&g.time===Jn.time&&!g.uncache)return Ut(s/g.width*h);if(m&&(n==="height"||n==="width")){var x=e.style[n];e.style[n]=h+i,v=e[u],x?e.style[n]=x:Co(e,n)}else(m||o==="%")&&!oN[ai(p,"display")]&&(a.position=ai(e,"position")),p===e&&(a.position="static"),p.appendChild(so),v=so[u],p.removeChild(so),a.position="absolute";return l&&m&&(g=fo(p),g.time=Jn.time,g.width=p[u]),Ut(d?v*s/h:v&&s?h/v*s:0)},Si=function(e,n,r,i){var s;return ev||u0(),n in ri&&n!=="transform"&&(n=ri[n],~n.indexOf(",")&&(n=n.split(",")[0])),Ii[n]&&n!=="transform"?(s=Tc(e,i),s=n!=="transformOrigin"?s[n]:s.svg?s.origin:Kd(ai(e,Bn))+" "+s.zOrigin+"px"):(s=e.style[n],(!s||s==="auto"||i||~(s+"").indexOf("calc("))&&(s=qd[n]&&qd[n](e,n,r)||ai(e,n)||Xb(e,n)||(n==="opacity"?1:0))),r&&!~(s+"").trim().indexOf(" ")?Cs(e,n,s,r)+r:s},aN=function(e,n,r,i){if(!r||r==="none"){var s=Xa(n,e,1),o=s&&ai(e,s,1);o&&o!==r?(n=s,r=o):n==="borderColor"&&(r=ai(e,"borderTopColor"))}var a=new zn(this._pt,e.style,n,0,1,wE),l=0,c=0,u,h,d,m,v,p,g,f,x,_,y,T;if(a.b=r,a.e=i,r+="",i+="",i==="auto"&&(p=e.style[n],e.style[n]=i,i=ai(e,n)||i,p?e.style[n]=p:Co(e,n)),u=[r,i],fE(u),r=u[0],i=u[1],d=r.match(va)||[],T=i.match(va)||[],T.length){for(;h=va.exec(i);)g=h[0],x=i.substring(l,h.index),v?v=(v+1)%5:(x.substr(-5)==="rgba("||x.substr(-5)==="hsla(")&&(v=1),g!==(p=d[c++]||"")&&(m=parseFloat(p)||0,y=p.substr((m+"").length),g.charAt(1)==="="&&(g=Aa(m,g)+y),f=parseFloat(g),_=g.substr((f+"").length),l=va.lastIndex-_.length,_||(_=_||nr.units[n]||y,l===i.length&&(i+=_,a.e+=_)),y!==_&&(m=Cs(e,n,p,_)||0),a._pt={_next:a._pt,p:x||c===1?x:",",s:m,c:f-m,m:v&&v<4||n==="zIndex"?Math.round:0});a.c=l-1;)a=s[c],Ii[a]&&(l=1,a=a==="transformOrigin"?Bn:Ct),Co(r,a);l&&(Co(r,Ct),o&&(o.svg&&r.removeAttribute("transform"),Tc(r,1),o.uncache=1,CE(i)))}},qd={clearProps:function(e,n,r,i,s){if(s.data!=="isFromStart"){var o=e._pt=new zn(e._pt,n,r,0,0,cN);return o.u=i,o.pr=-10,o.tween=s,e._props.push(r),1}}},Mc=[1,0,0,1,0,0],NE={},LE=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Dx=function(e){var n=ai(e,Ct);return LE(n)?Mc:n.substr(7).match(Bb).map(Ut)},rv=function(e,n){var r=e._gsap||fo(e),i=e.style,s=Dx(e),o,a,l,c;return r.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?Mc:s):(s===Mc&&!e.offsetParent&&e!==Ra&&!r.svg&&(l=i.display,i.display="block",o=e.parentNode,(!o||!e.offsetParent)&&(c=1,a=e.nextElementSibling,Ra.appendChild(e)),s=Dx(e),l?i.display=l:Co(e,"display"),c&&(a?o.insertBefore(e,a):o?o.appendChild(e):Ra.removeChild(e))),n&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},d0=function(e,n,r,i,s,o){var a=e._gsap,l=s||rv(e,!0),c=a.xOrigin||0,u=a.yOrigin||0,h=a.xOffset||0,d=a.yOffset||0,m=l[0],v=l[1],p=l[2],g=l[3],f=l[4],x=l[5],_=n.split(" "),y=parseFloat(_[0])||0,T=parseFloat(_[1])||0,M,S,b,E;r?l!==Mc&&(S=m*g-v*p)&&(b=y*(g/S)+T*(-p/S)+(p*x-g*f)/S,E=y*(-v/S)+T*(m/S)-(m*x-v*f)/S,y=b,T=E):(M=PE(e),y=M.x+(~_[0].indexOf("%")?y/100*M.width:y),T=M.y+(~(_[1]||_[0]).indexOf("%")?T/100*M.height:T)),i||i!==!1&&a.smooth?(f=y-c,x=T-u,a.xOffset=h+(f*m+x*p)-f,a.yOffset=d+(f*v+x*g)-x):a.xOffset=a.yOffset=0,a.xOrigin=y,a.yOrigin=T,a.smooth=!!i,a.origin=n,a.originIsAbsolute=!!r,e.style[Bn]="0px 0px",o&&(cs(o,a,"xOrigin",c,y),cs(o,a,"yOrigin",u,T),cs(o,a,"xOffset",h,a.xOffset),cs(o,a,"yOffset",d,a.yOffset)),e.setAttribute("data-svg-origin",y+" "+T)},Tc=function(e,n){var r=e._gsap||new gE(e);if("x"in r&&!n&&!r.uncache)return r;var i=e.style,s=r.scaleX359.9&&(g=p=0,f=180-f),m=Ut(Math.sqrt(R*R+z*z+H*H)),v=Ut(Math.sqrt(I*I+Q*Q)),b=Fo(V,I),x=Math.abs(b)>2e-4?b*qs:0,y=$?1/($90&&Math.abs(x)<270&&(s?(m*=-1,x+=p<=0?180:-180,p+=p<=0?180:-180):(v*=-1,x+=x<=0?180:-180)),n=n||r.uncache,r.x=u-((r.xPercent=u&&(!n&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+o,r.y=h-((r.yPercent=h&&(!n&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+o,r.z=d+o,r.scaleX=Ut(m),r.scaleY=Ut(v),r.rotation=Ut(p)+a,r.rotationX=Ut(g)+a,r.rotationY=Ut(f)+a,r.skewX=x+a,r.skewY=_+a,r.transformPerspective=y+o,(r.zOrigin=parseFloat(c.split(" ")[2])||!n&&r.zOrigin||0)&&(i[Bn]=Kd(c)),r.xOffset=r.yOffset=0,r.force3D=nr.force3D,r.renderTransform=r.svg?dN:RE?IE:uN,r.uncache=0,r},Kd=function(e){return(e=e.split(" "))[0]+" "+e[1]},ip=function(e,n,r){var i=hn(n);return Ut(parseFloat(n)+parseFloat(Cs(e,"x",r+"px",i)))+i},uN=function(e,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,IE(e,n)},zs="0deg",Ml="0px",Bs=") ",IE=function(e,n){var r=n||this,i=r.xPercent,s=r.yPercent,o=r.x,a=r.y,l=r.z,c=r.rotation,u=r.rotationY,h=r.rotationX,d=r.skewX,m=r.skewY,v=r.scaleX,p=r.scaleY,g=r.transformPerspective,f=r.force3D,x=r.target,_=r.zOrigin,y="",T=f==="auto"&&e&&e!==1||f===!0;if(_&&(h!==zs||u!==zs)){var M=parseFloat(u)*Pa,S=Math.sin(M),b=Math.cos(M),E;M=parseFloat(h)*Pa,E=Math.cos(M),o=ip(x,o,S*E*-_),a=ip(x,a,-Math.sin(M)*-_),l=ip(x,l,b*E*-_+_)}g!==Ml&&(y+="perspective("+g+Bs),(i||s)&&(y+="translate("+i+"%, "+s+"%) "),(T||o!==Ml||a!==Ml||l!==Ml)&&(y+=l!==Ml||T?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+Bs),c!==zs&&(y+="rotate("+c+Bs),u!==zs&&(y+="rotateY("+u+Bs),h!==zs&&(y+="rotateX("+h+Bs),(d!==zs||m!==zs)&&(y+="skew("+d+", "+m+Bs),(v!==1||p!==1)&&(y+="scale("+v+", "+p+Bs),x.style[Ct]=y||"translate(0, 0)"},dN=function(e,n){var r=n||this,i=r.xPercent,s=r.yPercent,o=r.x,a=r.y,l=r.rotation,c=r.skewX,u=r.skewY,h=r.scaleX,d=r.scaleY,m=r.target,v=r.xOrigin,p=r.yOrigin,g=r.xOffset,f=r.yOffset,x=r.forceCSS,_=parseFloat(o),y=parseFloat(a),T,M,S,b,E;l=parseFloat(l),c=parseFloat(c),u=parseFloat(u),u&&(u=parseFloat(u),c+=u,l+=u),l||c?(l*=Pa,c*=Pa,T=Math.cos(l)*h,M=Math.sin(l)*h,S=Math.sin(l-c)*-d,b=Math.cos(l-c)*d,c&&(u*=Pa,E=Math.tan(c-u),E=Math.sqrt(1+E*E),S*=E,b*=E,u&&(E=Math.tan(u),E=Math.sqrt(1+E*E),T*=E,M*=E)),T=Ut(T),M=Ut(M),S=Ut(S),b=Ut(b)):(T=h,b=d,M=S=0),(_&&!~(o+"").indexOf("px")||y&&!~(a+"").indexOf("px"))&&(_=Cs(m,"x",o,"px"),y=Cs(m,"y",a,"px")),(v||p||g||f)&&(_=Ut(_+v-(v*T+p*S)+g),y=Ut(y+p-(v*M+p*b)+f)),(i||s)&&(E=m.getBBox(),_=Ut(_+i/100*E.width),y=Ut(y+s/100*E.height)),E="matrix("+T+","+M+","+S+","+b+","+_+","+y+")",m.setAttribute("transform",E),x&&(m.style[Ct]=E)},fN=function(e,n,r,i,s){var o=360,a=tn(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?qs:1),c=l-i,u=i+c+"deg",h,d;return a&&(h=s.split("_")[1],h==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),h==="cw"&&c0&&(c=(c-o*Tx)%o-~~(c/o)*o)),e._pt=d=new zn(e._pt,n,r,i,c,q4),d.e=u,d.u="deg",e._props.push(r),d},Nx=function(e,n){for(var r in n)e[r]=n[r];return e},hN=function(e,n,r){var i=Nx({},r._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=r.style,a,l,c,u,h,d,m,v;i.svg?(c=r.getAttribute("transform"),r.setAttribute("transform",""),o[Ct]=n,a=Tc(r,1),Co(r,Ct),r.setAttribute("transform",c)):(c=getComputedStyle(r)[Ct],o[Ct]=n,a=Tc(r,1),o[Ct]=c);for(l in Ii)c=i[l],u=a[l],c!==u&&s.indexOf(l)<0&&(m=hn(c),v=hn(u),h=m!==v?Cs(r,l,c,v):parseFloat(c),d=parseFloat(u),e._pt=new zn(e._pt,a,l,h,d-h,l0),e._pt.u=v||0,e._props.push(l));Nx(a,i)};Fn("padding,margin,Width,Radius",function(t,e){var n="Top",r="Right",i="Bottom",s="Left",o=(e<3?[n,r,i,s]:[n+s,n+r,i+r,i+s]).map(function(a){return e1?"border"+t:t]=function(a,l,c,u,h){var d,m;if(arguments.length<4)return d=o.map(function(v){return Si(a,v,c)}),m=d.join(" "),m.split(d[0]).length===5?d[0]:m;d=(u+"").split(" "),m={},o.forEach(function(v,p){return m[v]=d[p]=d[p]||d[(p-1)/2|0]}),a.init(l,m,h)}});var OE={name:"css",register:u0,targetTest:function(e){return e.style&&e.nodeType},init:function(e,n,r,i,s){var o=this._props,a=e.style,l=r.vars.startAt,c,u,h,d,m,v,p,g,f,x,_,y,T,M,S,b;ev||u0(),this.styles=this.styles||AE(e),b=this.styles.props,this.tween=r;for(p in n)if(p!=="autoRound"&&(u=n[p],!(Kn[p]&&vE(p,n,r,i,e,s)))){if(m=typeof u,v=qd[p],m==="function"&&(u=u.call(r,i,e,s),m=typeof u),m==="string"&&~u.indexOf("random(")&&(u=wc(u)),v)v(this,e,p,u,r)&&(S=1);else if(p.substr(0,2)==="--")c=(getComputedStyle(e).getPropertyValue(p)+"").trim(),u+="",Ss.lastIndex=0,Ss.test(c)||(g=hn(c),f=hn(u)),f?g!==f&&(c=Cs(e,p,c,f)+f):g&&(u+=g),this.add(a,"setProperty",c,u,i,s,0,0,p),o.push(p),b.push(p,0,a[p]);else if(m!=="undefined"){if(l&&p in l?(c=typeof l[p]=="function"?l[p].call(r,i,e,s):l[p],tn(c)&&~c.indexOf("random(")&&(c=wc(c)),hn(c+"")||c==="auto"||(c+=nr.units[p]||hn(Si(e,p))||""),(c+"").charAt(1)==="="&&(c=Si(e,p))):c=Si(e,p),d=parseFloat(c),x=m==="string"&&u.charAt(1)==="="&&u.substr(0,2),x&&(u=u.substr(2)),h=parseFloat(u),p in ri&&(p==="autoAlpha"&&(d===1&&Si(e,"visibility")==="hidden"&&h&&(d=0),b.push("visibility",0,a.visibility),cs(this,a,"visibility",d?"inherit":"hidden",h?"inherit":"hidden",!h)),p!=="scale"&&p!=="transform"&&(p=ri[p],~p.indexOf(",")&&(p=p.split(",")[0]))),_=p in Ii,_){if(this.styles.save(p),y||(T=e._gsap,T.renderTransform&&!n.parseTransform||Tc(e,n.parseTransform),M=n.smoothOrigin!==!1&&T.smooth,y=this._pt=new zn(this._pt,a,Ct,0,1,T.renderTransform,T,0,-1),y.dep=1),p==="scale")this._pt=new zn(this._pt,T,"scaleY",T.scaleY,(x?Aa(T.scaleY,x+h):h)-T.scaleY||0,l0),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){b.push(Bn,0,a[Bn]),u=lN(u),T.svg?d0(e,u,0,M,0,this):(f=parseFloat(u.split(" ")[2])||0,f!==T.zOrigin&&cs(this,T,"zOrigin",T.zOrigin,f),cs(this,a,p,Kd(c),Kd(u)));continue}else if(p==="svgOrigin"){d0(e,u,1,M,0,this);continue}else if(p in NE){fN(this,T,p,d,x?Aa(d,x+u):u);continue}else if(p==="smoothOrigin"){cs(this,T,"smooth",T.smooth,u);continue}else if(p==="force3D"){T[p]=u;continue}else if(p==="transform"){hN(this,u,e);continue}}else p in a||(p=Xa(p)||p);if(_||(h||h===0)&&(d||d===0)&&!Y4.test(u)&&p in a)g=(c+"").substr((d+"").length),h||(h=0),f=hn(u)||(p in nr.units?nr.units[p]:g),g!==f&&(d=Cs(e,p,c,f)),this._pt=new zn(this._pt,_?T:a,p,d,(x?Aa(d,x+h):h)-d,!_&&(f==="px"||p==="zIndex")&&n.autoRound!==!1?Z4:l0),this._pt.u=f||0,g!==f&&f!=="%"&&(this._pt.b=c,this._pt.r=K4);else if(p in a)aN.call(this,e,p,c,x?x+u:u);else if(p in e)this.add(e,p,c||e[p],x?x+u:u,i,s);else if(p!=="parseTransform"){$g(p,u);continue}_||(p in a?b.push(p,0,a[p]):b.push(p,1,c||e[p])),o.push(p)}}S&&bE(this)},render:function(e,n){if(n.tween._time||!tv())for(var r=n._pt;r;)r.r(e,r.d),r=r._next;else n.styles.revert()},get:Si,aliases:ri,getSetter:function(e,n,r){var i=ri[n];return i&&i.indexOf(","){const{__scopeProgress:n,value:r,max:i,getValueLabel:s=xN,...o}=t,a=f0(i)?i:qf,l=zE(r,a)?r:null,c=Zd(l)?s(l,a):void 0;return D.createElement(mN,{scope:n,value:l,max:a},D.createElement(Fi.div,zt({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Zd(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":FE(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});kE.propTypes={max(t,e,n){const r=t[e],i=String(r);return r&&!f0(r)?new Error(yN(i,n)):null},value(t,e,n){const r=t[e],i=String(r),s=f0(t.max)?t.max:qf;return r!=null&&!zE(r,s)?new Error(SN(i,n)):null}};const vN="ProgressIndicator",_N=D.forwardRef((t,e)=>{var n;const{__scopeProgress:r,...i}=t,s=gN(vN,r);return D.createElement(Fi.div,zt({"data-state":FE(s.value,s.max),"data-value":(n=s.value)!==null&&n!==void 0?n:void 0,"data-max":s.max},i,{ref:e}))});function xN(t,e){return`${Math.round(t/e*100)}%`}function FE(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Zd(t){return typeof t=="number"}function f0(t){return Zd(t)&&!isNaN(t)&&t>0}function zE(t,e){return Zd(t)&&!isNaN(t)&&t=0}function yN(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${qf}\`.`}function SN(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or ${qf} if no \`max\` prop is set) - \`null\` if the progress is indeterminate. Defaulting to \`null\`.`}const BE=kE,VE=_N;function wN(){var t=D.useRef(!1),e=D.useCallback(function(){return t.current},[]);return D.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e}var bN=function(t){t===void 0&&(t={});var e=D.useState(t),n=e[0],r=e[1],i=D.useCallback(function(s){r(function(o){return Object.assign({},o,s instanceof Function?s(o):s)})},[]);return[n,i]},EN=typeof window<"u",MN=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=Lx[e.format]||Lx.default;window.clipboardData.setData(h,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),o.addRange(s);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(h){n&&console.error("unable to copy using clipboardData: ",h),n&&console.error("falling back to prompt"),r=AN("message"in e?e.message:CN),window.prompt(r,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),a&&document.body.removeChild(a),i()}return l}var PN=RN;const DN=tl(PN);var NN=function(){var t=wN(),e=bN({value:void 0,error:void 0,noUserInteraction:!0}),n=e[0],r=e[1],i=D.useCallback(function(s){if(t()){var o,a;try{if(typeof s!="string"&&typeof s!="number"){var l=new Error("Cannot copy typeof "+typeof s+" to clipboard, must be a string");r({value:s,error:l,noUserInteraction:!0});return}else if(s===""){var l=new Error("Cannot copy empty string to clipboard.");r({value:s,error:l,noUserInteraction:!0});return}a=s.toString(),o=DN(a),r({value:a,error:void 0,noUserInteraction:o})}catch(c){r({value:a,error:c,noUserInteraction:o})}}},[]);return[n,i]},LN=function(t,e){return EN?window.matchMedia(t).matches:!1},Jd=function(t,e){var n=D.useState(LN(t)),r=n[0],i=n[1];return D.useEffect(function(){var s=!0,o=window.matchMedia(t),a=function(){s&&i(!!o.matches)};return o.addEventListener("change",a),i(o.matches),function(){s=!1,o.removeEventListener("change",a)}},[t]),r},Ue={},h0={exports:{}};(function(t,e){(function(n,r){var i="1.0.38",s="",o="?",a="function",l="undefined",c="object",u="string",h="major",d="model",m="name",v="type",p="vendor",g="version",f="architecture",x="console",_="mobile",y="tablet",T="smarttv",M="wearable",S="embedded",b=500,E="Amazon",w="Apple",R="ASUS",z="BlackBerry",H="Browser",B="Chrome",V="Edge",I="Firefox",F="Google",A="Huawei",G="LG",Y="Microsoft",W="Motorola",J="Opera",me="Samsung",$="Sharp",Q="Sony",le="Xiaomi",he="Zebra",Pe="Facebook",Le="Chromium OS",Me="Mac OS",O=function(q,_e){var oe={};for(var de in q)_e[de]&&_e[de].length%2===0?oe[de]=_e[de].concat(q[de]):oe[de]=q[de];return oe},U=function(q){for(var _e={},oe=0;oe<q.length;oe++)_e[q[oe].toUpperCase()]=q[oe];return _e},j=function(q,_e){return typeof q===u?ce(_e).indexOf(ce(q))!==-1:!1},ce=function(q){return q.toLowerCase()},ie=function(q){return typeof q===u?q.replace(/[^\d\.]/g,s).split(".")[0]:r},Ee=function(q,_e){if(typeof q===u)return q=q.replace(/^\s\s*/,s),typeof _e===l?q:q.substring(0,b)},Ae=function(q,_e){for(var oe=0,de,ze,ve,ye,Te,Fe;oe<_e.length&&!Te;){var Re=_e[oe],We=_e[oe+1];for(de=ze=0;de<Re.length&&!Te&&Re[de];)if(Te=Re[de++].exec(q),Te)for(ve=0;ve0?ye.length===2?typeof ye[1]==a?this[ye[0]]=ye[1].call(this,Fe):this[ye[0]]=ye[1]:ye.length===3?typeof ye[1]===a&&!(ye[1].exec&&ye[1].test)?this[ye[0]]=Fe?ye[1].call(this,Fe,ye[2]):r:this[ye[0]]=Fe?Fe.replace(ye[1],ye[2]):r:ye.length===4&&(this[ye[0]]=Fe?ye[3].call(this,Fe.replace(ye[1],ye[2])):r):this[ye]=Fe||r;oe+=2}},pe=function(q,_e){for(var oe in _e)if(typeof _e[oe]===c&&_e[oe].length>0){for(var de=0;de2&&(Te[d]="iPad",Te[v]=y),Te},this.getEngine=function(){var Te={};return Te[m]=r,Te[g]=r,Ae.call(Te,de,ve.engine),Te},this.getOS=function(){var Te={};return Te[m]=r,Te[g]=r,Ae.call(Te,de,ve.os),ye&&!Te[m]&&ze&&ze.platform&&ze.platform!="Unknown"&&(Te[m]=ze.platform.replace(/chrome os/i,Le).replace(/macos/i,Me)),Te},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return de},this.setUA=function(Te){return de=typeof Te===u&&Te.length>b?Ee(Te,b):Te,this},this.setUA(de),this};Z.VERSION=i,Z.BROWSER=U([m,g,h]),Z.CPU=U([f]),Z.DEVICE=U([d,p,v,x,_,T,y,M,S]),Z.ENGINE=Z.OS=U([m,g]),t.exports&&(e=t.exports=Z),e.UAParser=Z;var ue=typeof n!==l&&(n.jQuery||n.Zepto);if(ue&&!ue.ua){var re=new Z;ue.ua=re.getResult(),ue.ua.get=function(){return re.getUA()},ue.ua.set=function(q){re.setUA(q);var _e=re.getResult();for(var oe in _e)ue.ua[oe]=_e[oe]}}})(typeof window=="object"?window:R0)})(h0,h0.exports);var IN=h0.exports;Object.defineProperty(Ue,"__esModule",{value:!0});function ON(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var gn=D,mt=ON(gn),HE=IN,Is=new HE,_n=Is.getBrowser(),UN=Is.getCPU(),lr=Is.getDevice(),iv=Is.getEngine(),Os=Is.getOS(),Bc=Is.getUA(),GE=function(e){return Is.setUA(e)},Vc=function(e){if(!e){console.error("No userAgent string was provided");return}var n=new HE(e);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(i){return n.setUA(i)}}},WE=Object.freeze({ClientUAInstance:Is,browser:_n,cpu:UN,device:lr,engine:iv,os:Os,ua:Bc,setUa:GE,parseUserAgent:Vc});function Ix(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function kN(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ix(Object(n),!0).forEach(function(r){VN(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ix(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Jl(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Jl=function(e){return typeof e}:Jl=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jl(t)}function FN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zN(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function BN(t,e,n){return e&&zN(t.prototype,e),t}function VN(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p0(){return p0=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},p0.apply(this,arguments)}function HN(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g0(t,e)}function m0(t){return m0=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},m0(t)}function g0(t,e){return g0=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},g0(t,e)}function GN(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s=0)&&(n[i]=t[i]);return n}function Mr(t,e){if(t==null)return{};var n=GN(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function md(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function WN(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return md(t)}function $N(t,e){return jN(t)||XN(t,e)||YN(t,e)||qN()}function jN(t){if(Array.isArray(t))return t}function XN(t,e){var n=t==null?null:typeof Symbolt.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&arguments[1]!==void 0?arguments[1]:"none";return e||n},sv=function(){return typeof window1&&!window.MSStream)},QN=function(e,n,r,i,s){return{isBrowser:e,browserMajorVersion:Ye(n.major),browserFullVersion:Ye(n.version),browserName:Ye(n.name),engineName:Ye(r.name),engineVersion:Ye(r.version),osName:Ye(i.name),osVersion:Ye(i.version),userAgent:Ye(s)}},Ux=function(e,n,r,i){return kN({},e,{vendor:Ye(n.vendor),model:Ye(n.model),os:Ye(r.name),osVersion:Ye(r.version),ua:Ye(i)})},eL=function(e,n,r,i){return{isSmartTV:e,engineName:Ye(n.name),engineVersion:Ye(n.version),osName:Ye(r.name),osVersion:Ye(r.version),userAgent:Ye(i)}},tL=function(e,n,r,i){return{isConsole:e,engineName:Ye(n.name),engineVersion:Ye(n.version),osName:Ye(r.name),osVersion:Ye(r.version),userAgent:Ye(i)}},nL=function(e,n,r,i){return{isWearable:e,engineName:Ye(n.name),engineVersion:Ye(n.version),osName:Ye(r.name),osVersion:Ye(r.version),userAgent:Ye(i)}},rL=function(e,n,r,i,s){return{isEmbedded:e,vendor:Ye(n.vendor),model:Ye(n.model),engineName:Ye(r.name),engineVersion:Ye(r.version),osName:Ye(i.name),osVersion:Ye(i.version),userAgent:Ye(s)}};function iL(t){var e=t?Vc(t):WE,n=e.device,r=e.browser,i=e.engine,s=e.os,o=e.ua,a=ZN(n.type),l=a.isBrowser,c=a.isMobile,u=a.isTablet,h=a.isSmartTV,d=a.isConsole,m=a.isWearable,v=a.isEmbedded;if(l)return QN(l,r,i,s,o);if(h)return eL(h,i,s,o);if(d)return tL(d,i,s,o);if(c||u)return Ux(a,n,s,o);if(m)return nL(m,i,s,o);if(v)return rL(v,n,i,s,o)}var $E=function(e){var n=e.type;return n===dn.Mobile},jE=function(e){var n=e.type;return n===dn.Tablet},XE=function(e){var n=e.type;return n===dn.Mobile||n===dn.Tablet},YE=function(e){var n=e.type;return n===dn.SmartTv},Qd=function(e){var n=e.type;return n===dn.Browser},qE=function(e){var n=e.type;return n===dn.Wearable},KE=function(e){var n=e.type;return n===dn.Console},ZE=function(e){var n=e.type;return n===dn.Embedded},JE=function(e){var n=e.vendor;return Ye(n)},QE=function(e){var n=e.model;return Ye(n)},eM=function(e){var n=e.type;return Ye(n,"browser")},tM=function(e){var n=e.name;return n===ul.Android},nM=function(e){var n=e.name;return n===ul.Windows},rM=function(e){var n=e.name;return n===ul.MAC_OS},iM=function(e){var n=e.name;return n===ul.WindowsPhone},sM=function(e){var n=e.name;return n===ul.IOS},oM=function(e){var n=e.version;return Ye(n)},aM=function(e){var n=e.name;return Ye(n)},lM=function(e){var n=e.name;return n===Wn.Chrome},cM=function(e){var n=e.name;return n===Wn.Firefox},uM=function(e){var n=e.name;return n===Wn.Chromium},ef=function(e){var n=e.name;return n===Wn.Edge},dM=function(e){var n=e.name;return n===Wn.Yandex},fM=function(e){var n=e.name;return n===Wn.Safari||n===Wn.MobileSafari},hM=function(e){var n=e.name;return n===Wn.MobileSafari},pM=function(e){var n=e.name;return n===Wn.Opera},mM=function(e){var n=e.name;return n===Wn.InternetExplorer||n===Wn.Ie},gM=function(e){var n=e.name;return n===Wn.MIUI},vM=function(e){var n=e.name;return n===Wn.SamsungBrowser},_M=function(e){var n=e.version;return Ye(n)},xM=function(e){var n=e.major;return Ye(n)},yM=function(e){var n=e.name;return Ye(n)},SM=function(e){var n=e.name;return Ye(n)},wM=function(e){var n=e.version;return Ye(n)},bM=function(){var e=sv(),n=e&&e.userAgent&&e.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},Da=function(e){return typeof e=="string"&&e.indexOf("Edg/")!==-1},EM=function(){var e=sv();return e&&(/iPad|iPhone|iPod/.test(e.platform)||e.platform==="MacIntel"&&e.maxTouchPoints>1)&&!window.MSStream},ei=function(){return ov("iPad")},MM=function(){return ov("iPhone")},TM=function(){return ov("iPod")},CM=function(e){return Ye(e)};function AM(t){var e=t||WE,n=e.device,r=e.browser,i=e.os,s=e.engine,o=e.ua;return{isSmartTV:YE(n),isConsole:KE(n),isWearable:qE(n),isEmbedded:ZE(n),isMobileSafari:hM(r)||ei(),isChromium:uM(r),isMobile:XE(n)||ei(),isMobileOnly:$E(n),isTablet:jE(n)||ei(),isBrowser:Qd(n),isDesktop:Qd(n),isAndroid:tM(i),isWinPhone:iM(i),isIOS:sM(i)||ei(),isChrome:lM(r),isFirefox:cM(r),isSafari:fM(r),isOpera:pM(r),isIE:mM(r),osVersion:oM(i),osName:aM(i),fullBrowserVersion:_M(r),browserVersion:xM(r),browserName:yM(r),mobileVendor:JE(n),mobileModel:QE(n),engineName:SM(s),engineVersion:wM(s),getUA:CM(o),isEdge:ef(r)||Da(o),isYandex:dM(r),deviceType:eM(n),isIOS13:EM(),isIPad13:ei(),isIPhone13:MM(),isIPod13:TM(),isElectron:bM(),isEdgeChromium:Da(o),isLegacyEdge:ef(r)&&!Da(o),isWindows:nM(i),isMacOs:rM(i),isMIUI:gM(r),isSamsungBrowser:vM(r)}}var RM=YE(lr),PM=KE(lr),DM=qE(lr),sL=ZE(lr),oL=hM(_n)||ei(),aL=uM(_n),Kf=XE(lr)||ei(),NM=$E(lr),LM=jE(lr)||ei(),IM=Qd(lr),lL=Qd(lr),OM=tM(Os),UM=iM(Os),kM=sM(Os)||ei(),cL=lM(_n),uL=cM(_n),dL=fM(_n),fL=pM(_n),FM=mM(_n),hL=oM(Os),pL=aM(Os),mL=_M(_n),gL=xM(_n),vL=yM(_n),_L=JE(lr),xL=QE(lr),yL=SM(iv),SL=wM(iv),wL=CM(Bc),bL=ef(_n)||Da(Bc),EL=dM(_n),ML=eM(lr),TL=EM(),CL=ei(),AL=MM(),RL=TM(),PL=bM(),DL=Da(Bc),NL=ef(_n)&&!Da(Bc),LL=nM(Os),IL=rM(Os),OL=gM(_n),UL=vM(_n),kL=function(e){if(!e||typeof e!="string"){console.error("No valid user agent string was provided");return}var n=Vc(e),r=n.device,i=n.browser,s=n.os,o=n.engine,a=n.ua;return AM({device:r,browser:i,os:s,engine:o,ua:a})},FL=function(e){var n=e.renderWithFragment,r=e.children,i=Mr(e,["renderWithFragment","children"]);return OM?n?mt.createElement(gn.Fragment,null,r):mt.createElement("div",i,r):null},zL=function(e){var n=e.renderWithFragment,r=e.children,i=Mr(e,["renderWithFragment","children"]);return IM?n?mt.createElement(gn.Fragment,null,r):mt.createElement("div",i,r):null},BL=function(e){var n=e.renderWithFragment,r=e.children,i=Mr(e,["renderWithFragment","children"]);return FM?n?mt.createElement(gn.Fragment,null,r):mt.createElement("div",i,r):null},VL=function(e){var n=e.renderWithFragment,r=e.children,i=Mr(e,["renderWithFragment","children"]);return kM?n?mt.createElement(gn.Fragment,null,r):mt.createElement("div",i,r):null},HL=function(e){var n=e.renderWithFragment,r=e.children,i=Mr(e,["renderWithFragment","children"]);return Kf?n?mt.createElement(gn.Fragment,null,r):mt.createElement("div",i,r):null},GL=function(e){var n=e.renderWithFragment,r=e.children,i=Mr(e,["renderWithFragment","children"]);return LM?n?mt.createElement(gn.Fragment,null,r):mt.createElement("div",i,r):null},WL=function(e){var n=e.renderWithFragment,r=e.children,i=Mr(e,["renderWithFragment","children"]);return UM?n?mt.createElement(gn.Fragment,null,r):mt.createElement("div",i,r):null},$L=function(e){var n=e.renderWithFragment,r=e.children;e.viewClassName,e.style;var i=Mr(e,["renderWithFragment","children","viewClassName","style"]);return NM?n?mt.createElement(gn.Fragment,null,r):mt.createElement("div",i,r):null},jL=function(e){var n=e.renderWithFragment,r=e.children,i=Mr(e,["renderWithFragment","children"]);return RM?n?mt.createElement(gn.Fragment,null,r):mt.createElement("div",i,r):null},XL=function(e){var n=e.renderWithFragment,r=e.children,i=Mr(e,["renderWithFragment","children"]);return PM?n?mt.createElement(gn.Fragment,null,r):mt.createElement("div",i,r):null},YL=function(e){var n=e.renderWithFragment,r=e.children,i=Mr(e,["renderWithFragment","children"]);return DM?n?mt.createElement(gn.Fragment,null,r):mt.createElement("div",i,r):null},qL=function(e){var n=e.renderWithFragment,r=e.children;e.viewClassName,e.style;var i=e.condition,s=Mr(e,["renderWithFragment","children","viewClassName","style","condition"]);return i?n?mt.createElement(gn.Fragment,null,r):mt.createElement("div",s,r):null};function KL(t){return function(e){HN(n,e);function n(r){var i;return FN(this,n),i=WN(this,m0(n).call(this,r)),i.isEventListenerAdded=!1,i.handleOrientationChange=i.handleOrientationChange.bind(md(i)),i.onOrientationChange=i.onOrientationChange.bind(md(i)),i.onPageLoad=i.onPageLoad.bind(md(i)),i.state={isLandscape:!1,isPortrait:!1},i}return BN(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var i=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:i===0,isLandscape:i===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":Jl(window))!==void 0&&Kf&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return mt.createElement(t,p0({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(mt.Component)}function ZL(){var t=gn.useState(function(){var s=window.innerWidth>window.innerHeight?90:0;return{isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"}}),e=$N(t,2),n=e[0],r=e[1],i=gn.useCallback(function(){var s=window.innerWidth>window.innerHeight?90:0,o={isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"};n.orientation!==o.orientation&&r(o)},[n.orientation]);return gn.useEffect(function(){return(typeof window>"u"?"undefined":Jl(window))!==void 0&&Kf&&(i(),window.addEventListener("load",i,!1),window.addEventListener("resize",i,!1)),function(){window.removeEventListener("resize",i,!1),window.removeEventListener("load",i,!1)}},[i]),n}function zM(t){var e=t||window.navigator.userAgent;return Vc(e)}function JL(t){var e=t||window.navigator.userAgent,n=zM(e),r=AM(n);return[r,n]}Ue.AndroidView=FL;Ue.BrowserTypes=Wn;Ue.BrowserView=zL;Ue.ConsoleView=XL;Ue.CustomView=qL;Ue.IEView=BL;Ue.IOSView=VL;Ue.MobileOnlyView=$L;Ue.MobileView=HL;Ue.OsTypes=ul;Ue.SmartTVView=jL;Ue.TabletView=GL;Ue.WearableView=YL;Ue.WinPhoneView=WL;Ue.browserName=vL;Ue.browserVersion=gL;Ue.deviceDetect=iL;Ue.deviceType=ML;Ue.engineName=yL;Ue.engineVersion=SL;Ue.fullBrowserVersion=mL;Ue.getSelectorsByUserAgent=kL;Ue.getUA=wL;Ue.isAndroid=OM;Ue.isBrowser=IM;Ue.isChrome=cL;Ue.isChromium=aL;Ue.isConsole=PM;var v0=Ue.isDesktop=lL;Ue.isEdge=bL;Ue.isEdgeChromium=DL;Ue.isElectron=PL;Ue.isEmbedded=sL;Ue.isFirefox=uL;Ue.isIE=FM;Ue.isIOS=kM;Ue.isIOS13=TL;Ue.isIPad13=CL;Ue.isIPhone13=AL;Ue.isIPod13=RL;Ue.isLegacyEdge=NL;Ue.isMIUI=OL;Ue.isMacOs=IL;Ue.isMobile=Kf;Ue.isMobileOnly=NM;Ue.isMobileSafari=oL;Ue.isOpera=fL;Ue.isSafari=dL;Ue.isSamsungBrowser=UL;Ue.isSmartTV=RM;Ue.isTablet=LM;Ue.isWearable=DM;Ue.isWinPhone=UM;Ue.isWindows=LL;Ue.isYandex=EL;Ue.mobileModel=xL;Ue.mobileVendor=_L;Ue.osName=pL;Ue.osVersion=hL;Ue.parseUserAgent=Vc;Ue.setUserAgent=JN;Ue.useDeviceData=zM;Ue.useDeviceSelectors=JL;Ue.useMobileOrientation=ZL;Ue.withOrientationChange=KL;function av({url:t,children:e}){const n=D.useRef(document.querySelector("#root")),[r,i]=NN();return!navigator.share||v0?L.jsxs(Uf,{children:[L.jsx(sb,{asChild:!0,children:e}),L.jsxs(kf,{container:n.current,children:[L.jsx(Ff,{className:"bg-black/70 fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),L.jsxs(zf,{className:"fixed top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] z-50 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",children:[L.jsxs("div",{className:"bg-[#1C1C1C] rounded-xl overflow-hidden p-3 pb-6 w-[340px]",children:[L.jsx("p",{className:"text-white font-bold text-xl mb-3",children:"Share"}),L.jsxs("div",{className:"flex justify-center items-center gap-8 text-2xl text-white font-medium",children:[L.jsxs("a",{href:`https://www.facebook.com/sharer/sharer.php?u=${t}`,target:"_blank",className:"flex flex-col items-center gap-1",children:[L.jsx(Ft,{name:"facebook"}),L.jsx("p",{className:"text-xs",children:"Facebook"})]}),L.jsxs("a",{href:`https://api.whatsapp.com/send?text=${t}`,target:"_blank",className:"flex flex-col items-center gap-1",children:[L.jsx(Ft,{name:"whatsapp"}),L.jsx("p",{className:"text-xs",children:"Whatsapp"})]}),L.jsxs("button",{className:"flex flex-col items-center gap-1",onClick:()=>{i(t),GA.success("Berhasil disalin")},children:[L.jsx(Ft,{name:"copy"}),L.jsx("p",{className:"text-xs",children:"Copy Link"})]})]})]}),L.jsx(Lg,{asChild:!0,children:L.jsx("button",{className:"text-[#d3d3d3] absolute top-3 right-3","aria-label":"Close",children:L.jsx(Ft,{name:"close"})})})]})]})]}):L.jsx("button",{onClick:()=>{navigator.share({url:t})},children:e})}const tf=t=>{const n=Math.log(101);return Math.log(t+1)/n*100};function kx({isLoading:t,isEntryView:e,id:n,campaignId:r,rank:i,progress:s}){var l,c,u,h;const[o,a]=D.useState(0);return D.useEffect(()=>{if(e){const d={num:s};Yf.from(d,{num:0,duration:1,ease:"power1.in",onUpdate(){a(Math.round(d.num))}})}},[e,s]),t?L.jsxs("div",{className:"relative w-full h-full rounded-2xl overflow-hidden",children:[L.jsx("span",{className:"absolute inset-0 pointer-events-none bg-gradient-to-b from-black to-[transparent]"}),L.jsxs("div",{className:"h-full flex flex-col border border-solid border-[#d9d9d9]/50 rounded-2xl px-2 py-3 pt-5 lg:px-3 lg:py-5 lg:pt-7",children:[L.jsxs("div",{className:"relative aspect-[1.82758621]",children:[L.jsx(Lr,{className:"absolute top-0 left-0 w-full h-full"}),L.jsx("span",{className:"absolute inset-0 pointer-events-none bg-gradient-to-b from-black via-[transparent] to-black"})]}),L.jsxs("div",{className:"flex-1 flex flex-col relative -mt-10",children:[L.jsxs("div",{className:"mb-2 text-[#d9d9d9]",children:[L.jsx("p",{className:"text-lg sm:text-sm lg:text-lg font-bold",children:L.jsx(Lr,{})}),L.jsx("p",{className:"text-xs lg:text-base font-medium break-keep break-words",children:L.jsx(Lr,{})})]}),L.jsx("div",{className:"relative flex items-center justify-between gap-2 mt-auto mb-1 w-full sm:mb-0 lg:mb-2 ",children:L.jsx("p",{className:"font-bold text-xl sm:text-base lg:text-3xl",children:L.jsx(Lr,{})})}),L.jsx("div",{className:"relative w-[120px] inline-flex items-center font-medium py-1.5 px-2 gap-2 rounded sm:w-[84px] lg:w-[144px] sm:py-1 sm:px-1 sm:gap-1 sm:text-xs lg:py-2 lg:px-2.5 lg:rounded-md lg:text-xl",children:L.jsx(Lr,{className:"absolute top-0 left-0 w-full h-full"})})]})]})]}):L.jsxs("div",{className:"relative w-full h-full rounded-2xl overflow-hidden cursor-pointer",children:[L.jsx("span",{className:"absolute inset-0 pointer-events-none bg-gradient-to-b from-black to-[transparent]"}),L.jsxs("div",{className:"h-full flex flex-col border border-solid border-cp rounded-2xl px-2 py-3 pt-5 lg:px-3 lg:py-5 lg:pt-7",children:[L.jsxs("div",{className:"relative aspect-[1.82758621]",children:[L.jsxs("div",{className:"absolute top-0 left-0 -translate-y-1/2 text-white bg-cp rounded-full text-base italic font-extrabold z-10 pl-7 pr-2 flex items-center sm:text-xs sm:pr-2 sm:pl-6 lg:text-xl lg:pr-2 lg:pl-9",children:[L.jsx("img",{className:"absolute bottom-0 left-1 w-[25px] sm:w-[20px] lg:w-[30px]",src:"https://www.catchplay.com/campaigns/wp-content/uploads/2024/06/rank.png"}),"TOP ",i]}),L.jsx("img",{className:"w-full h-full object-cover",src:`https://www.catchplay.com/campaigns/wp-content/uploads/2024/06/l-${(l=qe.items[n])==null?void 0:l.zhName}.png`}),L.jsx("span",{className:"absolute inset-0 pointer-events-none bg-gradient-to-b from-black via-[transparent] to-black"})]}),L.jsxs("div",{className:"flex-1 flex flex-col relative -mt-10",children:[L.jsxs("div",{className:"mb-2 text-[#d9d9d9]",children:[L.jsx("p",{className:"text-lg sm:text-sm lg:text-lg font-bold",children:(c=qe.items[n])==null?void 0:c.name}),L.jsxs("p",{className:"text-xs lg:text-base font-medium break-keep break-words",children:["Cast: ",(u=qe.items[n])==null?void 0:u.cast]})]}),L.jsxs("div",{className:"relative flex items-center justify-between gap-2 mt-auto mb-1 w-full sm:mb-0 lg:mb-2",children:[L.jsx(BE,{className:"relative overflow-hidden rounded-full w-[60%] h-[10px] sm:h-[6px] lg:h-[10px]",style:{transform:"translateZ(0)"},value:tf(o),children:L.jsx(VE,{className:"bg-[red] w-full h-full transition-transform duration-[660ms] ease-[cubic-bezier(0.65, 0, 0.35, 1)]",style:{transform:`translateX(-${100-tf(o)}%)`}})}),L.jsxs("p",{className:"text-[red] font-bold text-xl sm:text-base lg:text-3xl",children:[o,"%"]})]}),L.jsx("div",{onClick:d=>d.stopPropagation(),children:L.jsx(av,{url:(h=qe.items[n])==null?void 0:h.shortUrl,children:L.jsxs("button",{"data-gtm-id":"share-vote",className:"inline-flex items-center font-medium text-white bg-btn-red hover:bg-[red] transition-all duration-300 py-1.5 px-2 gap-2 rounded sm:py-1 sm:px-1 sm:gap-1 sm:text-xs lg:py-2 lg:px-2.5 lg:rounded-md lg:text-xl",children:[L.jsx(Ft,{name:"share"}),"Share"]})})})]})]})]})}function Fx({isLoading:t,isEntryView:e,id:n,campaignId:r,rank:i,progress:s}){var l,c,u,h;const[o,a]=D.useState(0);return D.useEffect(()=>{if(e){const d={num:s};Yf.from(d,{num:0,duration:1,ease:"power1.in",onUpdate(){a(Math.round(d.num))}})}},[e,s]),t?L.jsxs("div",{className:"flex flex-col w-full h-full border-b border-solid border-[#d9d9d9]/50 pb-2 cursor-pointer",children:[L.jsxs("div",{className:"mb-2 sm:flex sm:flex-col sm:mb-1 lg:block lg:mb-2",children:[L.jsx("div",{className:"float-right relative aspect-[1.82758621] w-[75px] rounded overflow-hidden sm:float-none sm:order-2 sm:mb-2 lg:float-right lg:w-[105px] lg:mb-0",children:L.jsx(Lr,{className:"absolute top-0 left-0 w-full h-full"})}),L.jsx("p",{className:"text-xs font-bold sm:mb-1 sm:order-1 lg:mb-0",children:L.jsx(Lr,{className:"w-1/4"})}),L.jsx("p",{className:"whitespace-nowrap text-lg font-medium sm:order-3 sm:text-sm lg:text-lg",children:L.jsx(Lr,{className:"w-1/3"})}),L.jsx("p",{className:"min-w-[240px] text-xs font-medium break-keep break-words sm:order-4 sm:text-xs sm:min-w-fit lg:text-base",children:L.jsx(Lr,{className:"opacity-0"})})]}),L.jsx("div",{className:"relative flex items-center justify-between gap-2 mb-1 w-full sm:mb-2 lg:mb-1",children:L.jsx("p",{className:"font-bold text-xl sm:text-base lg:text-3xl",children:L.jsx(Lr,{})})}),L.jsx("div",{className:"relative mt-auto w-[84px] inline-flex items-center font-medium rounded-sm text-xs py-1 px-1 gap-1 sm:w-[88px] lg:w-[104px] sm:px-1.5 sm:rounded lg:text-sm lg:py-1.5 lg:px-2",children:L.jsx(Lr,{className:"absolute top-0 left-0 w-full h-full"})})]}):L.jsxs("div",{className:"flex flex-col w-full h-full border-b border-solid border-[#d9d9d9]/50 pb-2 cursor-pointer",children:[L.jsxs("div",{className:"mb-2 text-[#d9d9d9] sm:flex sm:flex-col sm:mb-1 lg:block lg:mb-2",children:[L.jsx("div",{className:"float-right relative aspect-[1.82758621] w-[75px] rounded overflow-hidden sm:float-none sm:order-2 sm:mb-2 lg:float-right lg:w-[105px] lg:mb-0",children:L.jsx("img",{className:"w-full h-full object-cover",src:`https://www.catchplay.com/campaigns/wp-content/uploads/2024/06/l-${(l=qe.items[n])==null?void 0:l.zhName}.png`})}),L.jsxs("p",{className:"text-xs font-bold sm:mb-1 sm:order-1 lg:mb-0",children:["Rank ",i]}),L.jsx("p",{className:"text-lg font-medium sm:order-3 sm:text-sm lg:text-lg",children:(c=qe.items[n])==null?void 0:c.name}),L.jsxs("p",{className:"min-w-[240px] text-xs font-medium break-keep break-words sm:order-4 sm:text-xs sm:min-w-fit lg:text-base",children:["Cast: ",(u=qe.items[n])==null?void 0:u.cast]})]}),L.jsxs("div",{className:"relative flex items-center justify-between gap-2 mb-1 w-full sm:mb-2 lg:mb-1",children:[L.jsx(BE,{className:"relative overflow-hidden rounded-full w-[60%] h-[10px] sm:h-[6px] lg:h-[10px]",style:{transform:"translateZ(0)"},value:tf(o),children:L.jsx(VE,{className:"bg-[red] w-full h-full transition-transform duration-[660ms] ease-[cubic-bezier(0.65, 0, 0.35, 1)]",style:{transform:`translateX(-${100-tf(o)}%)`}})}),L.jsxs("p",{className:"text-[red] font-bold text-xl sm:text-base lg:text-3xl",children:[o,"%"]})]}),L.jsx("div",{className:"mt-auto",onClick:d=>d.stopPropagation(),children:L.jsx(av,{url:(h=qe.items[n])==null?void 0:h.shortUrl,children:L.jsxs("button",{"data-gtm-id":"share-vote",className:"inline-flex items-center font-medium text-white bg-btn-red hover:bg-[red] transition-all duration-300 rounded-sm text-xs py-1 px-1 gap-1 sm:px-1.5 sm:rounded lg:text-sm lg:py-1.5 lg:px-2",children:[L.jsx(Ft,{name:"share"}),"Share"]})})})]})}function QL({id:t,campaignId:e,eligible:n,checked:r,onSelect:i}){var s,o,a,l,c;return L.jsxs("div",{className:"w-[90vw] max-w-[725px] bg-black rounded-2xl overflow-hidden",children:[L.jsx("div",{className:"flex justify-between items-center text-[#d3d3d3] py-2 px-4",children:L.jsx("p",{className:"text-xl font-medium",children:"Isi konten"})}),L.jsxs("div",{className:"relative aspect-[1.77]",children:[L.jsx("img",{className:"w-full h-full object-cover",src:`https://www.catchplay.com/campaigns/wp-content/uploads/2024/06/l-${(s=qe.items[t])==null?void 0:s.zhName}.png`}),L.jsx("span",{className:"absolute left-0 bottom-0 pointer-events-none bg-gradient-to-t from-black to-[transparent] w-full h-1/2"})]}),L.jsxs("div",{className:"px-11 pb-8",children:[L.jsxs("div",{className:"relative text-center mb-4 -mt-8",children:[L.jsx("p",{className:"text-lg font-bold text-[red] sm:text-2xl",children:(o=qe.items[t])==null?void 0:o.name}),L.jsxs("p",{className:"text-xs font-medium text-[red] mb-1 sm:mb-4 sm:text-base ",children:["Cast: ",(a=qe.items[t])==null?void 0:a.cast]}),L.jsx("p",{className:"text-xs text font-medium text-[#d3d3d3] sm:text-base",children:(l=qe.items[t])==null?void 0:l.description})]}),L.jsxs("div",{className:"flex flex-col items-center justify-center gap-2.5",children:[e&&L.jsx("button",{disabled:!n,className:Zn("flex items-center justify-center gap-1 font-medium bg-[red] text-white rounded-lg p-1 w-[200px] hover:bg-white hover:text-[red] transition-all duration-300 text-lg sm:p-1.5 sm:text-xl",{"bg-white text-[red]":r,"bg-[#1E1E1E] text-[#A6A6A6] pointer-events-none":!n}),onClick:u=>{n&&(i==null||i(!r))},children:r?L.jsxs(L.Fragment,{children:[L.jsx(Ft,{name:"check"}),"Sudah dipilih"]}):n?"Pilih":"Voting Berhasil"}),L.jsx(av,{url:(c=qe.items[t])==null?void 0:c.shortUrl,children:L.jsxs("button",{"data-gtm-id":"share-vote",className:"flex justify-center items-center gap-1 font-medium text-white bg-btn-red hover:bg-[red] transition-all duration-300 rounded-lg p-1 w-[200px] text-lg sm:p-1.5 sm:text-xl",children:[L.jsx(Ft,{name:"share"}),"Share"]})}),e&&!n&&L.jsx("p",{className:"text-xs text-[#d3d3d3] font-medium",children:"Sudah voting hari ini, besok bisa voting kembali"})]})]})]})}function BM(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function _0(t,e){return _0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},_0(t,e)}function lv(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,_0(t,e)}function eI(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function tI(t,e){t.classList?t.classList.add(e):eI(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function zx(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function nI(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=zx(t.className,e):t.setAttribute("class",zx(t.className&&t.className.baseVal||"",e))}const Bx={disabled:!1},cv=ge.createContext(null);var VM=function(e){return e.scrollTop},kl="unmounted",Ks="exited",pr="entering",ti="entered",Cc="exiting",Bi=function(t){lv(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=i,a=o&&!o.isMounting?r.enter:r.appear,l;return s.appearStatus=null,r.in?a?(l=Ks,s.appearStatus=pr):l=ti:r.unmountOnExit||r.mountOnEnter?l=kl:l=Ks,s.state={status:l},s.nextCallback=null,s}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===kl?{status:Ks}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==pr&&o!==ti&&(s=pr):(o===pr||o===ti)&&(s=Cc)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,a;return s=o=a=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,a=i.appear!==void 0?i.appear:o),{exit:s,enter:o,appear:a}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===pr){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:ga.findDOMNode(this);o&&VM(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ks&&this.setState({status:kl})},n.performEnter=function(i){var s=this,o=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[ga.findDOMNode(this),a],c=l[0],u=l[1],h=this.getTimeouts(),d=a?h.appear:h.enter;if(!i&&!o||Bx.disabled){this.safeSetState({status:ti},function(){s.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:pr},function(){s.props.onEntering(c,u),s.onTransitionEnd(d,function(){s.safeSetState({status:ti},function(){s.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),a=this.props.nodeRef?void 0:ga.findDOMNode(this);if(!s||Bx.disabled){this.safeSetState({status:Ks},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Cc},function(){i.props.onExiting(a),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:Ks},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(a){o&&(o=!1,s.nextCallback=null,i(a))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:ga.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!o||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===kl)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var a=BM(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ge.createElement(cv.Provider,{value:null},typeof o=="function"?o(i,a):ge.cloneElement(ge.Children.only(o),a))},e}(ge.Component);Bi.contextType=cv;Bi.propTypes={};function zo(){}Bi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:zo,onEntering:zo,onEntered:zo,onExit:zo,onExiting:zo,onExited:zo};Bi.UNMOUNTED=kl;Bi.EXITED=Ks;Bi.ENTERING=pr;Bi.ENTERED=ti;Bi.EXITING=Cc;var rI=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return tI(e,r)})},sp=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return nI(e,r)})},uv=function(t){lv(e,t);function e(){for(var r,i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return r=t.call.apply(t,[this].concat(s))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var c=r.resolveArguments(a,l),u=c[0],h=c[1];r.removeClasses(u,"exit"),r.addClass(u,h?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var c=r.resolveArguments(a,l),u=c[0],h=c[1],d=h?"appear":"enter";r.addClass(u,d,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var c=r.resolveArguments(a,l),u=c[0],h=c[1],d=h?"appear":"enter";r.removeClasses(u,d),r.addClass(u,d,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a),c=l[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a),c=l[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a),c=l[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,c=typeof l=="string",u=c&&l?l+"-":"",h=c?""+u+a:l[a],d=c?h+"-active":l[a+"Active"],m=c?h+"-done":l[a+"Done"];return{baseClassName:h,activeClassName:d,doneClassName:m}},r}var n=e.prototype;return n.addClass=function(i,s,o){var a=this.getClassNames(s)[o+"ClassName"],l=this.getClassNames("enter"),c=l.doneClassName;s==="appear"&&o==="done"&&c&&(a+=" "+c),o==="active"&&i&&VM(i),a&&(this.appliedClasses[s][o]=a,rI(i,a))},n.removeClasses=function(i,s){var o=this.appliedClasses[s],a=o.base,l=o.active,c=o.done;this.appliedClasses[s]={},a&&sp(i,a),l&&sp(i,l),c&&sp(i,c)},n.render=function(){var i=this.props;i.classNames;var s=BM(i,["classNames"]);return ge.createElement(Bi,zt({},s,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(ge.Component);uv.defaultProps={classNames:""};uv.propTypes={};var Mu,Tu;function iI(t,e){return!(t===e||ge.isValidElement(t)&&ge.isValidElement(e)&&t.key!=null&&t.key===e.key)}var Ya={out:"out-in",in:"in-out"},nf=function(e,n,r){return function(){var i;e.props[n]&&(i=e.props)[n].apply(i,arguments),r()}},sI=(Mu={},Mu[Ya.out]=function(t){var e=t.current,n=t.changeState;return ge.cloneElement(e,{in:!1,onExited:nf(e,"onExited",function(){n(pr,null)})})},Mu[Ya.in]=function(t){var e=t.current,n=t.changeState,r=t.children;return[e,ge.cloneElement(r,{in:!0,onEntered:nf(r,"onEntered",function(){n(pr)})})]},Mu),oI=(Tu={},Tu[Ya.out]=function(t){var e=t.children,n=t.changeState;return ge.cloneElement(e,{in:!0,onEntered:nf(e,"onEntered",function(){n(ti,ge.cloneElement(e,{in:!0}))})})},Tu[Ya.in]=function(t){var e=t.current,n=t.children,r=t.changeState;return[ge.cloneElement(e,{in:!1,onExited:nf(e,"onExited",function(){r(ti,ge.cloneElement(n,{in:!0}))})}),ge.cloneElement(n,{in:!0})]},Tu),dv=function(t){lv(e,t);function e(){for(var r,i=arguments.length,s=new Array(i),o=0;oy.addEventListener("transitionend",T,!1),classNames:"fade",children:L.jsxs("div",{className:"flex lg:block",children:[L.jsxs("div",{className:"shrink-0 relative aspect-[0.75] w-[130px] lg:aspect-[1.77] lg:w-full",children:[L.jsx("img",{className:"w-full h-full object-cover",src:n?`https://www.catchplay.com/campaigns/wp-content/uploads/2024/06/l-${(s=qe.items[e])==null?void 0:s.zhName}.png`:`https://www.catchplay.com/campaigns/wp-content/uploads/2024/06/m-${(o=qe.items[e])==null?void 0:o.zhName}.png`}),L.jsx("span",{className:"hidden lg:block absolute left-0 bottom-0 pointer-events-none bg-gradient-to-t from-black to-[transparent] w-full h-1/3"})]}),L.jsxs("div",{className:"relative py-6 px-2.5 sm:pl-8 sm:pr-5 sm:flex sm:items-center sm:gap-6 lg:flex-col lg:pt-0 lg:px-14 lg:pb-8 lg:text-center lg:gap-5",children:[L.jsxs("div",{className:"absolute top-2 right-2",children:[Ht(i).isBefore((a=qe.items[e])==null?void 0:a.date,"day")&&L.jsx(Ft,{className:"text-[red] text-lg",name:"lock"}),Ht(i).isSame((l=qe.items[e])==null?void 0:l.date,"day")&&L.jsxs("div",{className:"text-[#D3D3D3] text-xs flex items-center gap-1",children:["Update hari ini ",L.jsx(Ft,{className:"text-[red] text-lg",name:"location"})]}),Ht(i).isAfter((c=qe.items[e])==null?void 0:c.date,"day")&&L.jsx("div",{className:"text-[#D3D3D3] text-xs ",children:"Trending"})]}),L.jsxs("div",{className:"pt-8",children:[L.jsx("p",{className:"text-[red] font-bold sm:text-xl lg:text-2xl",children:(u=qe.items[e])==null?void 0:u.name}),L.jsxs("p",{className:"text-[red] font-medium text-sm mb-1 sm:text-base lg:text-sm lg:mb-2",children:["Cast: ",(h=qe.items[e])==null?void 0:h.cast]}),L.jsx("p",{className:"text-xs text-[#d3d3d3] line-clamp-2 font-medium mb-4 sm:mb-0 sm:text-sm sm:line-clamp-none lg:text-base",children:r?(d=qe.items[e])==null?void 0:d.description:(m=qe.items[e])==null?void 0:m.shortDescription})]}),L.jsxs("div",{className:"flex justify-between items-end sm:shrink-0 sm:flex-col sm:items-center sm:gap-2 sm:mt-auto lg:gap-3",children:[t&&L.jsx("a",{href:Ht(i).isBefore((v=qe.items[e])==null?void 0:v.date,"day")?(p=qe.items[e])==null?void 0:p.trailerUrl:(g=qe.items[e])==null?void 0:g.url,target:"_blank",className:"py-2 px-5 bg-[red] text-white font-medium rounded-lg hover:bg-white hover:text-[red] transition-all duration-300",children:Ht(i).isBefore((f=qe.items[e])==null?void 0:f.date,"day")?"Lihat lebih banyak":"Tonton Sekarang"}),Ht(i).isBefore((x=qe.items[e])==null?void 0:x.date,"day")&&L.jsxs("p",{className:"text-xs text-[red]",children:["Tayang ",Ht((_=qe.items[e])==null?void 0:_.date).format("MM/DD")]})]})]})]})},e)})}function lI(t){return Object.prototype.toString.call(t)==="[object Object]"}function Vx(t){return lI(t)||Array.isArray(t)}function cI(){return!!(typeof window{const a=t[o],l=e[o];return typeof a=="function"?`${a}`==`${l}`:!Vx(a)||!Vx(l)?a===l:fv(a,l)})}function Hx(t){return t.concat().sort((e,n)=>e.name>n.name?1:-1).map(e=>e.options)}function uI(t,e){if(t.length!==e.length)return!1;const n=Hx(t),r=Hx(e);return n.every((i,s)=>{const o=r[s];return fv(i,o)})}function hv(t){return typeof t=="number"}function x0(t){return typeof t=="string"}function pv(t){return typeof t=="boolean"}function Gx(t){return Object.prototype.toString.call(t)==="[object Object]"}function bt(t){return Math.abs(t)}function mv(t){return Math.sign(t)}function Ql(t,e){return bt(t-e)}function dI(t,e){if(t===0||e===0||bt(t)e+r)}function Rc(t){return Object.keys(t)}function HM(t,e){return[t,e].reduce((n,r)=>(Rc(r).forEach(i=>{const s=n[i],o=r[i],a=Gx(s)&&Gx(o);n[i]=a?HM(s,o):o}),n),{})}function y0(t,e){return typeof e.MouseEventi.removeEventListener(s,o,a);else{const c=i;c.addListener(o),l=()=>c.removeListener(o)}return t.push(l),r}function n(){t=t.filter(i=>i())}const r={add:e,clear:n};return r}function hI(t,e,n,r){const i=Pc(),s=1e3/60;let o=null,a=0,l=0;function c(){i.add(t,"visibilitychange",()=>{t.hidden&&v()})}function u(){m(),i.clear()}function h(g){if(!l)return;o||(o=g);const f=g-o;for(o=g,a+=f;a>=s;)n(),a-=s;const x=bt(a/s);r(x),l&&e.requestAnimationFrame(h)}function d(){l||(l=e.requestAnimationFrame(h))}function m(){e.cancelAnimationFrame(l),o=null,a=0,l=0}function v(){o=null,a=0}return{init:c,destroy:u,start:d,stop:m,update:n,render:r}}function pI(t,e){const n=e==="rtl",r=t==="y",i=r?"y":"x",s=r?"x":"y",o=!r&&n?-1:1,a=u(),l=h();function c(v){const{height:p,width:g}=v;return r?p:g}function u(){return r?"top":n?"right":"left"}function h(){return r?"bottom":n?"left":"right"}function d(v){return v*o}return{scroll:i,cross:s,startEdge:a,endEdge:l,measureSize:c,direction:d}}function Ao(t=0,e=0){const n=bt(t-e);function r(c){return ce}function s(c){return r(c)||i(c)}function o(c){return s(c)?r(c)?t:e:c}function a(c){return n?c-n*Math.ceil((c-e)/n):c}return{length:n,max:e,min:t,constrain:o,reachedAny:s,reachedMax:i,reachedMin:r,removeOffset:a}}function GM(t,e,n){const{constrain:r}=Ao(0,t),i=t+1;let s=o(e);function o(d){return n?bt((i+d)%i):r(d)}function a(){return s}function l(d){return s=o(d),h}function c(d){return u().set(a()+d)}function u(){return GM(t,a(),n)}const h={get:a,set:l,add:c,clone:u};return h}function mI(t,e,n,r,i,s,o,a,l,c,u,h,d,m,v,p,g,f,x){const{cross:_,direction:y}=t,T=["INPUT","SELECT","TEXTAREA"],M={passive:!1},S=Pc(),b=Pc(),E=Ao(50,225).constrain(m.measure(20)),w={mouse:300,touch:400},R={mouse:500,touch:600},z=v?43:25;let H=!1,B=0,V=0,I=!1,F=!1,A=!1,G=!1;function Y(U){if(!x)return;function j(ie){(pv(x)||x(U,ie))&&le(ie)}const ce=e;S.add(ce,"dragstart",ie=>ie.preventDefault(),M).add(ce,"touchmove",()=>{},M).add(ce,"touchend",()=>{}).add(ce,"touchstart",j).add(ce,"mousedown",j).add(ce,"touchcancel",Pe).add(ce,"contextmenu",Pe).add(ce,"click",Le,!0)}function W(){S.clear(),b.clear()}function J(){const U=G?n:e;b.add(U,"touchmove",he,M).add(U,"touchend",Pe).add(U,"mousemove",he,M).add(U,"mouseup",Pe)}function me(U){const j=U.nodeName||"";return T.includes(j)}function $(){return(v?R:w)[G?"mouse":"touch"]}function Q(U,j){const ce=h.add(mv(U)*-1),ie=u.byDistance(U,!v).distance;return v||bt(U)=2,!(j&&U.button!==0)&&(me(U.target)||(I=!0,s.pointerDown(U),c.useFriction(0).useDuration(0),i.set(o),J(),B=s.readPoint(U),V=s.readPoint(U,_),d.emit("pointerDown")))}function he(U){if(!y0(U,r)&&U.touches.length>=2)return Pe(U);const ce=s.readPoint(U),ie=s.readPoint(U,_),Ee=Ql(ce,B),Ae=Ql(ie,V);if(!F&&!G&&(!U.cancelable||(F=Ee>Ae,!F)))return Pe(U);const pe=s.pointerMove(U);Ee>p&&(A=!0),c.useFriction(.3).useDuration(.75),a.start(),i.add(y(pe)),U.preventDefault()}function Pe(U){const ce=u.byDistance(0,!1).index!==h.get(),ie=s.pointerUp(U)*$(),Ee=Q(y(ie),ce),Ae=dI(ie,Ee),pe=z-10*Ae,Se=f+Ae/50;F=!1,I=!1,b.clear(),c.useDuration(pe).useFriction(Se),l.distance(Ee,!v),G=!1,d.emit("pointerUp")}function Le(U){A&&(U.stopPropagation(),U.preventDefault(),A=!1)}function Me(){return I}return{init:Y,destroy:W,pointerDown:Me}}function gI(t,e){let r,i;function s(h){return h.timeStamp}function o(h,d){const v=`client${(d||t.scroll)==="x"?"X":"Y"}`;return(y0(h,e)?h:h.touches[0])[v]}function a(h){return r=h,i=h,o(h)}function l(h){const d=o(h)-o(i),m=s(h)-s(r)>170;return i=h,m&&(r=h),d}function c(h){if(!r||!i)return 0;const d=o(i)-o(r),m=s(h)-s(r),v=s(h)-s(i)>170,p=d/m;return m&&!v&&bt(p)>.1?p:0}return{pointerDown:a,pointerMove:l,pointerUp:c,readPoint:o}}function vI(){function t(n){const{offsetTop:r,offsetLeft:i,offsetWidth:s,offsetHeight:o}=n;return{top:r,right:i+s,bottom:r+o,left:i,width:s,height:o}}return{measure:t}}function _I(t){function e(r){return t*(r/100)}return{measure:e}}function xI(t,e,n,r,i,s,o){let a,l,c=[],u=!1;function h(p){return i.measureSize(o.measure(p))}function d(p){if(!s)return;l=h(t),c=r.map(h);function g(x){for(const _ of x){const y=_.target===t,T=r.indexOf(_.target),M=y?l:c[T],S=h(y?t:r[T]);if(bt(S-M)>=.5){n.requestAnimationFrame(()=>{p.reInit(),e.emit("resize")});break}}}a=new ResizeObserver(x=>{u||(pv(s)||s(p,x))&&g(x)}),[t].concat(r).forEach(x=>a.observe(x))}function m(){a&&a.disconnect(),u=!0}return{init:d,destroy:m}}function yI(t,e,n,r,i){let s=0,o=0,a=r,l=i,c=t.get(),u=0;function h(){const T=n.get()-t.get(),M=!a;let S=0;return M?(s=0,t.set(n),S=T):(s+=T/a,s*=l,c+=s,t.add(s),S=c-u),o=mv(S),u=c,y}function d(){const T=n.get()-e.get();return bt(T)<.001}function m(){return a}function v(){return o}function p(){return s}function g(){return x(r)}function f(){return _(i)}function x(T){return a=T,y}function _(T){return l=T,y}const y={direction:v,duration:m,velocity:p,seek:h,settled:d,useBaseFriction:f,useBaseDuration:g,useFriction:_,useDuration:x};return y}function SI(t,e,n,r,i){const s=i.measure(10),o=i.measure(50),a=Ao(.1,.99);let l=!1;function c(){return!(l||!t.reachedAny(n.get())||!t.reachedAny(e.get()))}function u(m){if(!c())return;const v=t.reachedMin(e.get())?"min":"max",p=bt(t[v]-e.get()),g=n.get()-e.get(),f=a.constrain(p/o);n.subtract(g*f),!m&&bt(g)<s&&(n.set(t.constrain(n.get())),r.useDuration(25).useBaseFriction())}function h(m){l=!m}return{constrain:u,toggleActive:h}}function wI(t,e,n,r,i){const s=Ao(-e+t,0),o=h(),a=u(),l=d();function c(v,p){return Ql(v,p){const{min:g,max:f}=s,x=s.constrain(v),_=!p,y=gv(n,p);return _?f:y||c(g,x)?g:c(f,x)?f:x}).map(v=>parseFloat(v.toFixed(3)))}function d(){if(ev.add(m))}return{loop:u}}function MI(t){const{max:e,length:n}=t;function r(s){const o=s-e;return n?o/-n:0}return{get:r}}function TI(t,e,n,r,i){const{startEdge:s,endEdge:o}=t,{groupSlides:a}=i,l=h().map(e.measure),c=d(),u=m();function h(){return a(r).map(p=>Vr(p)[o]-p[0][s]).map(bt)}function d(){return r.map(p=>n[s]-p[s]).map(p=>-bt(p))}function m(){return a(c).map(p=>p[0]).map((p,g)=>p+l[g])}return{snaps:c,snapsAligned:u}}function CI(t,e,n,r,i,s){const{groupSlides:o}=i,{min:a,max:l}=r,c=u();function u(){const d=o(s),m=!t||e==="keepSnaps";return n.length===1?[s]:m?d:d.slice(a,l).map((v,p,g)=>{const f=!p,x=gv(g,p);if(f){const _=Vr(g[0])+1;return Wx(_)}if(x){const _=Hc(s)-Vr(g)[0]+1;return Wx(_,Vr(g)[0])}return v})}return{slideRegistry:c}}function AI(t,e,n,r,i){const{reachedAny:s,removeOffset:o,constrain:a}=r;function l(v){return v.concat().sort((p,g)=>bt(p)-bt(g))[0]}function c(v){const p=t?o(v):a(v),g=e.map((x,_)=>({diff:u(x-p,0),index:_})).sort((x,_)=>bt(x.diff)-bt(_.diff)),{index:f}=g[0];return{index:f,distance:p}}function u(v,p){const g=[v,v+n,v-n];if(!t)return v;if(!p)return l(g);const f=g.filter(x=>mv(x)===p);return f.length?l(f):Vr(g)-n}function h(v,p){const g=e[v]-i.get(),f=u(g,p);return{index:v,distance:f}}function d(v,p){const g=i.get()+v,{index:f,distance:x}=c(g),_=!t&&s(g);if(!p||_)return{index:f,distance:v};const y=e[f]-x,T=v+u(y,0);return{index:f,distance:T}}return{byDistance:d,byIndex:h,shortcut:u}}function RI(t,e,n,r,i,s,o){function a(h){const d=h.distance,m=h.index!==e.get();s.add(d),d&&(r.duration()?t.start():(t.update(),t.render(1),t.update())),m&&(n.set(e.get()),e.set(h.index),o.emit("select"))}function l(h,d){const m=i.byDistance(h,d);a(m)}function c(h,d){const m=e.clone().set(h),v=i.byIndex(m.get(),d);a(v)}return{distance:l,index:c}}function PI(t,e,n,r,i,s,o){let a=0;function l(){s.add(document,"keydown",c,!1),e.forEach(u)}function c(d){d.code==="Tab"&&(a=new Date().getTime())}function u(d){const m=()=>{if(new Date().getTime()-a>10)return;t.scrollLeft=0;const g=e.indexOf(d),f=n.findIndex(x=>x.includes(g));hv(f)&&(i.useDuration(0),r.index(f,0),o.emit("slideFocus"))};s.add(d,"focus",m,{passive:!0,capture:!0})}return{init:l}}function gd(t){let e=t;function n(){return e}function r(l){e=o(l)}function i(l){e+=o(l)}function s(l){e-=o(l)}function o(l){return hv(l)?l:l.get()}return{get:n,set:r,add:i,subtract:s}}function WM(t,e){const n=t.scroll==="x"?s:o,r=e.style;let i=!1;function s(h){return`translate3d(${h}px,0px,0px)`}function o(h){return`translate3d(0px,${h}px,0px)`}function a(h){i||(r.transform=n(t.direction(h)))}function l(h){i=!h}function c(){i||(r.transform="",e.getAttribute("style")||e.removeAttribute("style"))}return{clear:c,to:a,toggleActive:l}}function DI(t,e,n,r,i,s,o,a,l){const u=Ac(i),h=Ac(i).reverse(),d=f().concat(x());function m(S,b){return S.reduce((E,w)=>E-i[w],b)}function v(S,b){return S.reduce((E,w)=>m(E,b)>0?E.concat([w]):E,[])}function p(S){return s.map((b,E)=>({start:b-r[E]+.5+S,end:b+e-.5+S}))}function g(S,b,E){const w=p(b);return S.map(R=>{const z=E?0:-n,H=E?n:0,B=E?"end":"start",V=w[R][B];return{index:R,loopPoint:V,slideLocation:gd(-1),translate:WM(t,l[R]),target:()=>a.get()>V?z:H}})}function f(){const S=o[0],b=v(h,S);return g(b,n,!1)}function x(){const S=e-o[0]-1,b=v(u,S);return g(b,-n,!0)}function _(){return d.every(({index:S})=>{const b=u.filter(E=>E!==S);return m(b,e){const{target:b,translate:E,slideLocation:w}=S,R=b();R!==w.get()&&(E.to(R),w.set(R))})}function T(){d.forEach(S=>S.translate.clear())}return{canLoop:_,clear:T,loop:y,loopPoints:d}}function NI(t,e,n){let r,i=!1;function s(l){if(!n)return;function c(u){for(const h of u)if(h.type==="childList"){l.reInit(),e.emit("slidesChanged");break}}r=new MutationObserver(u=>{i||(pv(n)||n(l,u))&&c(u)}),r.observe(t,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:s,destroy:o}}function LI(t,e,n,r){const i={};let s=null,o=null,a,l=!1;function c(){a=new IntersectionObserver(v=>{l||(v.forEach(p=>{const g=e.indexOf(p.target);i[g]=p}),s=null,o=null,n.emit("slidesInView"))},{root:t.parentElement,threshold:r}),e.forEach(v=>a.observe(v))}function u(){a&&a.disconnect(),l=!0}function h(v){return Rc(i).reduce((p,g)=>{const f=parseInt(g),{isIntersecting:x}=i[f];return(v&&x||!v&&!x)&&p.push(f),p},[])}function d(v=!0){if(v&&s)return s;if(!v&&o)return o;const p=h(v);return v&&(s=p),v||(o=p),p}return{init:c,destroy:u,get:d}}function II(t,e,n,r,i,s){const{measureSize:o,startEdge:a,endEdge:l}=t,c=n[0]&&i,u=v(),h=p(),d=n.map(o),m=g();function v(){if(!c)return 0;const x=n[0];return bt(e[a]-x[a])}function p(){if(!c)return 0;const x=s.getComputedStyle(Vr(r));return parseFloat(x.getPropertyValue(`margin-${l}`))}function g(){return n.map((x,_,y)=>{const T=!_,M=gv(y,_);return T?d[_]+u:M?d[_]+h:y[_+1][a]-x[a]}).map(bt)}return{slideSizes:d,slideSizesWithGaps:m,startGap:u,endGap:h}}function OI(t,e,n,r,i,s,o,a,l){const{startEdge:c,endEdge:u,direction:h}=t,d=hv(n);function m(f,x){return Ac(f).filter(_=>_%x===0).map(_=>f.slice(_,_+x))}function v(f){return f.length?Ac(f).reduce((x,_,y)=>{const T=Vr(x)||0,M=T===0,S=_===Hc(f),b=i[c]-s[T][c],E=i[c]-s[_][u],w=!r&&M?h(o):0,R=!r&&S?h(a):0,z=bt(E-R-(b+w));return y&&z>e+l&&x.push(_),S&&x.push(f.length),x},[]).map((x,_,y)=>{const T=Math.max(y[_-1]||0);return f.slice(T,x)}):[]}function p(f){return d?m(f,n):v(f)}return{groupSlides:p}}function UI(t,e,n,r,i,s,o){const{align:a,axis:l,direction:c,startIndex:u,loop:h,duration:d,dragFree:m,dragThreshold:v,inViewThreshold:p,slidesToScroll:g,skipSnaps:f,containScroll:x,watchResize:_,watchSlides:y,watchDrag:T}=s,M=2,S=vI(),b=S.measure(e),E=n.map(S.measure),w=pI(l,c),R=w.measureSize(b),z=_I(R),H=fI(a,R),B=!h&&!!x,V=h||!!x,{slideSizes:I,slideSizesWithGaps:F,startGap:A,endGap:G}=II(w,b,E,n,V,i),Y=OI(w,R,g,h,b,E,A,G,M),{snaps:W,snapsAligned:J}=TI(w,H,b,E,Y),me=-Vr(W)+Vr(F),{snapsContained:$,scrollContainLimit:Q}=wI(R,me,J,x,M),le=B?$:J,{limit:he}=bI(me,le,h),Pe=GM(Hc(le),u,h),Le=Pe.clone(),Me=Ac(n),O=({dragHandler:de,scrollBody:ze,scrollBounds:ve,options:{loop:ye}})=>{ye||ve.constrain(de.pointerDown()),ze.seek()},U=({scrollBody:de,translate:ze,location:ve,offsetLocation:ye,scrollLooper:Te,slideLooper:Fe,dragHandler:Re,animation:We,eventHandler:$e,options:{loop:gt}},k)=>{const xe=de.velocity(),te=de.settled();te&&!Re.pointerDown()&&(We.stop(),$e.emit("settle")),te||$e.emit("scroll"),ye.set(ve.get()-xe+xe*k),gt&&(Te.loop(de.direction()),Fe.loop()),ze.to(ye.get())},j=hI(r,i,()=>O(oe),de=>U(oe,de)),ce=.68,ie=le[Pe.get()],Ee=gd(ie),Ae=gd(ie),pe=gd(ie),Se=yI(Ee,Ae,pe,d,ce),N=AI(h,le,me,he,pe),C=RI(j,Pe,Le,Se,N,pe,o),Z=MI(he),ue=Pc(),re=LI(e,n,o,p),{slideRegistry:q}=CI(B,x,le,Q,Y,Me),_e=PI(t,n,q,C,Se,ue,o),oe={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:b,slideRects:E,animation:j,axis:w,dragHandler:mI(w,t,r,i,pe,gI(w,i),Ee,j,C,Se,N,Pe,o,z,m,v,f,ce,T),eventStore:ue,percentOfView:z,index:Pe,indexPrevious:Le,limit:he,location:Ee,offsetLocation:Ae,options:s,resizeHandler:xI(e,o,i,n,w,_,S),scrollBody:Se,scrollBounds:SI(he,Ae,pe,Se,z),scrollLooper:EI(me,he,Ae,[Ee,Ae,pe]),scrollProgress:Z,scrollSnapList:le.map(Z.get),scrollSnaps:le,scrollTarget:N,scrollTo:C,slideLooper:DI(w,R,me,I,F,W,le,Ae,n),slideFocus:_e,slidesHandler:NI(e,o,y),slidesInView:re,slideIndexes:Me,slideRegistry:q,slidesToScroll:Y,target:pe,translate:WM(w,e)};return oe}function kI(){let t={},e;function n(c){e=c}function r(c){return t[c]||[]}function i(c){return r(c).forEach(u=>u(e,c)),l}function s(c,u){return t[c]=r(c).concat([u]),l}function o(c,u){return t[c]=r(c).filter(h=>h!==u),l}function a(){t={}}const l={init:n,emit:i,off:o,on:s,clear:a};return l}const FI={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function zI(t){function e(s,o){return HM(s,o||{})}function n(s){const o=s.breakpoints||{},a=Rc(o).filter(l=>t.matchMedia(l).matches).map(l=>o[l]).reduce((l,c)=>e(l,c),{});return e(s,a)}function r(s){return s.map(o=>Rc(o.breakpoints||{})).reduce((o,a)=>o.concat(a),[]).map(t.matchMedia)}return{mergeOptions:e,optionsAtMedia:n,optionsMediaQueries:r}}function BI(t){let e=[];function n(s,o){return e=o.filter(({options:a})=>t.optionsAtMedia(a).active!==!1),e.forEach(a=>a.init(s,t)),o.reduce((a,l)=>Object.assign(a,{[l.name]:l}),{})}function r(){e=e.filter(s=>s.destroy())}return{init:n,destroy:r}}function rf(t,e,n){const r=t.ownerDocument,i=r.defaultView,s=zI(i),o=BI(s),a=Pc(),l=kI(),{mergeOptions:c,optionsAtMedia:u,optionsMediaQueries:h}=s,{on:d,off:m,emit:v}=l,p=R;let g=!1,f,x=c(FI,rf.globalOptions),_=c(x),y=[],T,M,S;function b(){const{container:O,slides:U}=_;M=(x0(O)?t.querySelector(O):O)||t.children[0];const ce=x0(U)?M.querySelectorAll(U):U;S=[].slice.call(ce||M.children)}function E(O){const U=UI(t,M,S,r,i,O,l);if(O.loop&&!U.slideLooper.canLoop()){const j=Object.assign({},O,{loop:!1});return E(j)}return U}function w(O,U){g||(x=c(x,O),_=u(x),y=U||y,b(),f=E(_),h([x,...y.map(({options:j})=>j)]).forEach(j=>a.add(j,"change",R)),_.active&&(f.translate.to(f.location.get()),f.animation.init(),f.slidesInView.init(),f.slideFocus.init(),f.eventHandler.init(Me),f.resizeHandler.init(Me),f.slidesHandler.init(Me),f.options.loop&&f.slideLooper.loop(),M.offsetParent&&S.length&&f.dragHandler.init(Me),T=o.init(Me,y)))}function R(O,U){const j=W();z(),w(c({startIndex:j},O),U),l.emit("reInit")}function z(){f.dragHandler.destroy(),f.eventStore.clear(),f.translate.clear(),f.slideLooper.clear(),f.resizeHandler.destroy(),f.slidesHandler.destroy(),f.slidesInView.destroy(),f.animation.destroy(),o.destroy(),a.clear()}function H(){g||(g=!0,a.clear(),z(),l.emit("destroy"),l.clear())}function B(O,U,j){!_.active||g||(f.scrollBody.useBaseFriction().useDuration(U===!0?0:_.duration),f.scrollTo.index(O,j||0))}function V(O){const U=f.index.add(1).get();B(U,O,-1)}function I(O){const U=f.index.add(-1).get();B(U,O,1)}function F(){return f.index.add(1).get()!==W()}function A(){return f.index.add(-1).get()!==W()}function G(){return f.scrollSnapList}function Y(){return f.scrollProgress.get(f.location.get())}function W(){return f.index.get()}function J(){return f.indexPrevious.get()}function me(){return f.slidesInView.get()}function $(){return f.slidesInView.get(!1)}function Q(){return T}function le(){return f}function he(){return t}function Pe(){return M}function Le(){return S}const Me={canScrollNext:F,canScrollPrev:A,containerNode:Pe,internalEngine:le,destroy:H,off:m,on:d,emit:v,plugins:Q,previousScrollSnap:J,reInit:p,rootNode:he,scrollNext:V,scrollPrev:I,scrollProgress:Y,scrollSnapList:G,scrollTo:B,selectedScrollSnap:W,slideNodes:Le,slidesInView:me,slidesNotInView:$};return w(e,n),setTimeout(()=>l.emit("init"),0),Me}rf.globalOptions=void 0;function vv(t={},e=[]){const n=D.useRef(t),r=D.useRef(e),[i,s]=D.useState(),[o,a]=D.useState(),l=D.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return D.useEffect(()=>{if(cI()&&o){rf.globalOptions=vv.globalOptions;const c=rf(o,n.current,r.current);return s(c),()=>c.destroy()}else s(void 0)},[o,s]),D.useEffect(()=>{fv(n.current,t)||(n.current=t,l())},[t,l]),D.useEffect(()=>{uI(r.current,e)||(r.current=e,l())},[e,l]),[a,i]}vv.globalOptions=void 0;const VI=Object.values(qe.items);function HI({pastIds:t,currentIds:e,focusId:n,onSelect:r}){const[i,s]=vv({dragFree:!0}),o=()=>{s&&s.scrollPrev()},a=()=>{s&&s.scrollNext()};return D.useEffect(()=>{const l=VI.findIndex(c=>e.includes(c.id));s&&l!==-1&&s.scrollTo(l)},[e,s]),L.jsxs("div",{className:"embla relative overflow-hidden p-2.5",ref:i,children:[L.jsx("div",{className:"embla__container flex gap-2.5 mx-[80px]",children:qe.map.items.map(l=>{var c;return L.jsxs("button",{className:Zn("embla__slide shrink-0 grow-0 min-w-0 px-2.5 py-2 leading-none font-medium text-[#D9D9D9] bg-gray-600 rounded-md flex gap-1 items-center shadow-md cursor-pointer select-none",{"bg-[red]":e.includes(l.id),"bg-transparent border-2 border-solid border-[red]":t.includes(l.id)}),onClick:()=>{r==null||r(l.id)},children:[!e.includes(l.id)&&!t.includes(l.id)&&L.jsx("span",{children:Ht((c=qe.items[l.id])==null?void 0:c.date).format("MM/DD")}),e.includes(l.id)&&L.jsx(Ft,{name:"location"}),l.name]},l.id)})}),L.jsx("button",{className:"absolute top-0 left-0 text-white w-[90px] h-full p-2 bg-gradient-to-l from-[transparent] to-black pl-6",onClick:o,children:L.jsx(Ft,{name:"right",className:"scale-x-[-1]"})}),L.jsx("button",{className:"absolute top-0 right-0 text-white w-[90px] h-full p-2 bg-gradient-to-r from-[transparent] to-black pr-6",onClick:a,children:L.jsx(Ft,{name:"right",className:"ml-auto"})})]})}const GI=D.forwardRef((t,e)=>{const{ratio:n=1,style:r,...i}=t;return D.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":""},D.createElement(Fi.div,zt({},i,{ref:e,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})))}),WI=GI;/** * @license * Copyright 2010-2024 Three.js Authors * SPDX-License-Identifier: MIT */const _v="165",$I=0,$x=1,jI=2,$M=1,XI=2,vi=3,As=0,Vn=1,bi=2,ws=0,Na=1,jx=2,Xx=3,Yx=4,YI=5,Qs=100,qI=101,KI=102,ZI=103,JI=104,QI=200,eO=201,tO=202,nO=203,S0=204,w0=205,rO=206,iO=207,sO=208,oO=209,aO=210,lO=211,cO=212,uO=213,dO=214,fO=0,hO=1,pO=2,sf=3,mO=4,gO=5,vO=6,_O=7,jM=0,xO=1,yO=2,bs=0,SO=1,wO=2,bO=3,EO=4,MO=5,TO=6,CO=7,XM=300,qa=301,Ka=302,b0=303,E0=304,Zf=306,M0=1e3,oo=1001,T0=1002,_r=1003,AO=1004,Cu=1005,Ur=1006,op=1007,ao=1008,Rs=1009,RO=1010,PO=1011,of=1012,YM=1013,Za=1014,us=1015,Jf=1016,qM=1017,KM=1018,Ja=1020,DO=35902,NO=1021,LO=1022,ii=1023,IO=1024,OO=1025,La=1026,Qa=1027,UO=1028,ZM=1029,kO=1030,JM=1031,QM=1033,ap=33776,lp=33777,cp=33778,up=33779,qx=35840,Kx=35841,Zx=35842,Jx=35843,Qx=36196,ey=37492,ty=37496,ny=37808,ry=37809,iy=37810,sy=37811,oy=37812,ay=37813,ly=37814,cy=37815,uy=37816,dy=37817,fy=37818,hy=37819,py=37820,my=37821,dp=36492,gy=36494,vy=36495,FO=36283,_y=36284,xy=36285,yy=36286,zO=3200,BO=3201,VO=0,HO=1,rs="",qr="srgb",Us="srgb-linear",xv="display-p3",Qf="display-p3-linear",af="linear",xt="srgb",lf="rec709",cf="p3",Bo=7680,Sy=519,GO=512,WO=513,$O=514,e2=515,jO=516,XO=517,YO=518,qO=519,wy=35044,by="300 es",Ti=2e3,uf=2001;class dl{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const r=this._listeners[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let s=0,o=i.length;s>8&255]+cn[t>>16&255]+cn[t>>24&255]+"-"+cn[e&255]+cn[e>>8&255]+"-"+cn[e>>16&15|64]+cn[e>>24&255]+"-"+cn[n&63|128]+cn[n>>8&255]+"-"+cn[n>>16&255]+cn[n>>24&255]+cn[r&255]+cn[r>>8&255]+cn[r>>16&255]+cn[r>>24&255]).toLowerCase()}function Pn(t,e,n){return Math.max(e,Math.min(n,t))}function KO(t,e){return(t%e+e)%e}function hp(t,e,n){return(1-n)*t+n*e}function Tl(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function An(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}class it{constructor(e=0,n=0){it.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Pn(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),s=this.x-e.x,o=this.y-e.y;return this.x=s*r-o*i+e.x,this.y=s*i+o*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Qe{constructor(e,n,r,i,s,o,a,l,c){Qe.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,s,o,a,l,c)}set(e,n,r,i,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=s,u[5]=l,u[6]=r,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,s=this.elements,o=r[0],a=r[3],l=r[6],c=r[1],u=r[4],h=r[7],d=r[2],m=r[5],v=r[8],p=i[0],g=i[3],f=i[6],x=i[1],_=i[4],y=i[7],T=i[2],M=i[5],S=i[8];return s[0]=o*p+a*x+l*T,s[3]=o*g+a*_+l*M,s[6]=o*f+a*y+l*S,s[1]=c*p+u*x+h*T,s[4]=c*g+u*_+h*M,s[7]=c*f+u*y+h*S,s[2]=d*p+m*x+v*T,s[5]=d*g+m*_+v*M,s[8]=d*f+m*y+v*S,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*o*u-n*a*c-r*s*u+r*a*l+i*s*c-i*o*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=u*o-a*c,d=a*l-u*s,m=c*s-o*l,v=n*h+r*d+i*m;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const p=1/v;return e[0]=h*p,e[1]=(i*c-u*r)*p,e[2]=(a*r-i*o)*p,e[3]=d*p,e[4]=(u*n-i*l)*p,e[5]=(i*s-a*n)*p,e[6]=m*p,e[7]=(r*l-c*n)*p,e[8]=(o*n-r*s)*p,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(r*l,r*c,-r*(l*o+c*a)+o+e,-i*c,i*l,-i*(-c*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(pp.makeScale(e,n)),this}rotate(e){return this.premultiply(pp.makeRotation(-e)),this}translate(e,n){return this.premultiply(pp.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r=0;--e)if(t[e]>=65535)return!0;return!1}function df(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function ZO(){const t=df("canvas");return t.style.display="block",t}const Ey={};function n2(t){t in Ey||(Ey[t]=!0,console.warn(t))}function JO(t,e,n){return new Promise(function(r,i){function s(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(s,n);break;default:r()}}setTimeout(s,n)})}const My=new Qe().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Ty=new Qe().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Au={[Us]:{transfer:af,primaries:lf,toReference:t=>t,fromReference:t=>t},[qr]:{transfer:xt,primaries:lf,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[Qf]:{transfer:af,primaries:cf,toReference:t=>t.applyMatrix3(Ty),fromReference:t=>t.applyMatrix3(My)},[xv]:{transfer:xt,primaries:cf,toReference:t=>t.convertSRGBToLinear().applyMatrix3(Ty),fromReference:t=>t.applyMatrix3(My).convertLinearToSRGB()}},QO=new Set([Us,Qf]),at={enabled:!0,_workingColorSpace:Us,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!QO.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=Au[e].toReference,i=Au[n].fromReference;return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return Au[t].primaries},getTransfer:function(t){return t===rs?af:Au[t].transfer}};function Ia(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function mp(t){return t"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Vo===void 0&&(Vo=df("canvas")),Vo.width=e.width,Vo.height=e.height;const r=Vo.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Vo}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=df("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),s=i.data;for(let o=0;o<s.length;o++)s[o]=Ia(s[o]/255)*255;return r.putImageData(i,0,0),n}else if(e.data){const n=e.data.slice(0);for(let r=0;r<n.length;r++)n instanceof Uint8Array||n instanceof Uint8ClampedArray?n[r]=Math.floor(Ia(n[r]/255)*255):n[r]=Ia(n[r]);return{data:n,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let tU=0;class r2{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:tU++}),this.uuid=Gc(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const n=e===void 0||typeof e=="string";if(!n&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const r={uuid:this.uuid,url:""},i=this.data;if(i!==null){let s;if(Array.isArray(i)){s=[];for(let o=0,a=i.length;o<a;o++)i[o].isDataTexture?s.push(gp(i[o].image)):s.push(gp(i[o]))}else s=gp(i);r.url=s}return n||(e.images[this.uuid]=r),r}}function gp(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==XM)return e;if(e.applyMatrix3(this.matrix),e.x1)switch(this.wrapS){case M0:e.x=e.x-Math.floor(e.x);break;case oo:e.x=e.x<0?0:1;break;case T0:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y1)switch(this.wrapT){case M0:e.y=e.y-Math.floor(e.y);break;case oo:e.y=e.y<0?0:1;break;case T0:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Hn.DEFAULT_IMAGE=null;Hn.DEFAULT_MAPPING=XM;Hn.DEFAULT_ANISOTROPY=1;class rn{constructor(e=0,n=0,r=0,i=1){rn.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,r,i){return this.x=e,this.y=n,this.z=r,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,s=this.w,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i+o[12]*s,this.y=o[1]*n+o[5]*r+o[9]*i+o[13]*s,this.z=o[2]*n+o[6]*r+o[10]*i+o[14]*s,this.w=o[3]*n+o[7]*r+o[11]*i+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,s;const l=e.elements,c=l[0],u=l[4],h=l[8],d=l[1],m=l[5],v=l[9],p=l[2],g=l[6],f=l[10];if(Math.abs(u-d)<.01&&Math.abs(h-p)<.01&&Math.abs(v-g)<.01){if(Math.abs(u+d)<.1&&Math.abs(h+p)<.1&&Math.abs(v+g)<.1&&Math.abs(c+m+f-3)y&&_>T?_T?y<.01?(r=.707106781,i=0,s=.707106781):(i=Math.sqrt(y),r=M/i,s=b/i):T<.01?(r=.707106781,i=.707106781,s=0):(s=Math.sqrt(T),r=S/s,i=b/s),this.set(r,i,s,n),this}let x=Math.sqrt((g-v)*(g-v)+(h-p)*(h-p)+(d-u)*(d-u));return Math.abs(x)<.001&&(x=1),this.x=(g-v)/x,this.y=(h-p)/x,this.z=(d-u)/x,this.w=Math.acos((c+m+f-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class rU extends dl{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new rn(0,0,e,n),this.scissorTest=!1,this.viewport=new rn(0,0,e,n);const i={width:e,height:n,depth:1};r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Ur,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},r);const s=new Hn(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace);s.flipY=!1,s.generateMipmaps=r.generateMipmaps,s.internalFormat=r.internalFormat,this.textures=[];const o=r.count;for(let a=0;a<o;a++)this.textures[a]=s.clone(),this.textures[a].isRenderTargetTexture=!0;this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,this.resolveDepthBuffer=r.resolveDepthBuffer,this.resolveStencilBuffer=r.resolveStencilBuffer,this.depthTexture=r.depthTexture,this.samples=r.samples}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}setSize(e,n,r=1){if(this.width!==e||this.height!==n||this.depth!==r){this.width=e,this.height=n,this.depth=r;for(let i=0,s=this.textures.length;i<s;i++)this.textures[i].image.width=e,this.textures[i].image.height=n,this.textures[i].image.depth=r;this.dispose()}this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let r=0,i=e.textures.length;r=0?1:-1,_=1-f*f;if(_>Number.EPSILON){const T=Math.sqrt(_),M=Math.atan2(T,f*x);g=Math.sin(g*M)/T,a=Math.sin(a*M)/T}const y=a*x;if(l=l*g+d*y,c=c*g+m*y,u=u*g+v*y,h=h*g+p*y,g===1-a){const T=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=T,c*=T,u*=T,h*=T}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=h}static multiplyQuaternionsFlat(e,n,r,i,s,o){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],h=s[o],d=s[o+1],m=s[o+2],v=s[o+3];return e[n]=a*v+u*h+l*m-c*d,e[n+1]=l*v+u*d+c*h-a*m,e[n+2]=c*v+u*m+a*d-l*h,e[n+3]=u*v-a*h-l*d-c*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,r,i){return this._x=e,this._y=n,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){const r=e._x,i=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),h=a(s/2),d=l(r/2),m=l(i/2),v=l(s/2);switch(o){case"XYZ":this._x=d*u*h+c*m*v,this._y=c*m*h-d*u*v,this._z=c*u*v+d*m*h,this._w=c*u*h-d*m*v;break;case"YXZ":this._x=d*u*h+c*m*v,this._y=c*m*h-d*u*v,this._z=c*u*v-d*m*h,this._w=c*u*h+d*m*v;break;case"ZXY":this._x=d*u*h-c*m*v,this._y=c*m*h+d*u*v,this._z=c*u*v+d*m*h,this._w=c*u*h-d*m*v;break;case"ZYX":this._x=d*u*h-c*m*v,this._y=c*m*h+d*u*v,this._z=c*u*v-d*m*h,this._w=c*u*h+d*m*v;break;case"YZX":this._x=d*u*h+c*m*v,this._y=c*m*h+d*u*v,this._z=c*u*v-d*m*h,this._w=c*u*h-d*m*v;break;case"XZY":this._x=d*u*h-c*m*v,this._y=c*m*h-d*u*v,this._z=c*u*v+d*m*h,this._w=c*u*h+d*m*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],s=n[8],o=n[1],a=n[5],l=n[9],c=n[2],u=n[6],h=n[10],d=r+a+h;if(d>0){const m=.5/Math.sqrt(d+1);this._w=.25/m,this._x=(u-l)*m,this._y=(s-c)*m,this._z=(o-i)*m}else if(r>a&&r>h){const m=2*Math.sqrt(1+r-a-h);this._w=(u-l)/m,this._x=.25*m,this._y=(i+o)/m,this._z=(s+c)/m}else if(a>h){const m=2*Math.sqrt(1+a-r-h);this._w=(s-c)/m,this._x=(i+o)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+h-r-a);this._w=(o-i)/m,this._x=(s+c)/m,this._y=(l+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Pn(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const r=e._x,i=e._y,s=e._z,o=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+o*a+i*c-s*l,this._y=i*u+o*l+s*a-r*c,this._z=s*u+o*c+r*l-i*a,this._w=o*u-r*a-i*l-s*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,s=this._z,o=this._w;let a=o*e._w+r*e._x+i*e._y+s*e._z;if(a=1)return this._w=o,this._x=r,this._y=i,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const m=1-n;return this._w=m*o+n*this._w,this._x=m*r+n*this._x,this._y=m*i+n*this._y,this._z=m*s+n*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),h=Math.sin((1-n)*u)/c,d=Math.sin(n*u)/c;return this._w=o*h+this._w*d,this._x=r*h+this._x*d,this._y=i*h+this._y*d,this._z=s*h+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),r=Math.random(),i=Math.sqrt(1-r),s=Math.sqrt(r);return this.set(i*Math.sin(e),i*Math.cos(e),s*Math.sin(n),s*Math.cos(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class se{constructor(e=0,n=0,r=0){se.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(Cy.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(Cy.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,s=e.elements;return this.x=s[0]*n+s[3]*r+s[6]*i,this.y=s[1]*n+s[4]*r+s[7]*i,this.z=s[2]*n+s[5]*r+s[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,s=e.elements,o=1/(s[3]*n+s[7]*r+s[11]*i+s[15]);return this.x=(s[0]*n+s[4]*r+s[8]*i+s[12])*o,this.y=(s[1]*n+s[5]*r+s[9]*i+s[13])*o,this.z=(s[2]*n+s[6]*r+s[10]*i+s[14])*o,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*i-a*r),u=2*(a*n-s*i),h=2*(s*r-o*n);return this.x=n+l*c+o*h-a*u,this.y=r+l*u+a*c-s*h,this.z=i+l*h+s*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i,this.y=s[1]*n+s[5]*r+s[9]*i,this.z=s[2]*n+s[6]*r+s[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,s=e.z,o=n.x,a=n.y,l=n.z;return this.x=i*l-s*a,this.y=s*o-r*l,this.z=r*a-i*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return vp.copy(this).projectOnVector(e),this.sub(vp)}reflect(e){return this.sub(vp.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Pn(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,n=Math.random()*2-1,r=Math.sqrt(1-n*n);return this.x=r*Math.cos(e),this.y=n,this.z=r*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const vp=new se,Cy=new Wc;class $c{constructor(e=new se(1/0,1/0,1/0),n=new se(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;n<r;n+=3)this.expandByPoint(Cr.fromArray(e,n));return this}setFromBufferAttribute(e){this.makeEmpty();for(let n=0,r=e.count;n<r;n++)this.expandByPoint(Cr.fromBufferAttribute(e,n));return this}setFromPoints(e){this.makeEmpty();for(let n=0,r=e.length;n<r;n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const r=Cr.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}setFromObject(e,n=!1){return this.makeEmpty(),this.expandByObject(e,n)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,n=!1){e.updateWorldMatrix(!1,!1);const r=e.geometry;if(r!==void 0){const s=r.getAttribute("position");if(n===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,Cr):Cr.fromBufferAttribute(s,o),Cr.applyMatrix4(e.matrixWorld),this.expandByPoint(Cr);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Ru.copy(e.boundingBox)):(r.boundingBox===null&&r.computeBoundingBox(),Ru.copy(r.boundingBox)),Ru.applyMatrix4(e.matrixWorld),this.union(Ru)}const i=e.children;for(let s=0,o=i.length;s<o;s++)this.expandByObject(i[s],n);return this}containsPoint(e){return!(e.xthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Cr),Cr.distanceToSquared(e.center)0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Cl),Pu.subVectors(this.max,Cl),Ho.subVectors(e.a,Cl),Go.subVectors(e.b,Cl),Wo.subVectors(e.c,Cl),ji.subVectors(Go,Ho),Xi.subVectors(Wo,Go),Vs.subVectors(Ho,Wo);let n=[0,-ji.z,ji.y,0,-Xi.z,Xi.y,0,-Vs.z,Vs.y,ji.z,0,-ji.x,Xi.z,0,-Xi.x,Vs.z,0,-Vs.x,-ji.y,ji.x,0,-Xi.y,Xi.x,0,-Vs.y,Vs.x,0];return!_p(n,Ho,Go,Wo,Pu)||(n=[1,0,0,0,1,0,0,0,1],!_p(n,Ho,Go,Wo,Pu))?!1:(Du.crossVectors(ji,Xi),n=[Du.x,Du.y,Du.z],_p(n,Ho,Go,Wo,Pu))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Cr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Cr).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(fi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fi),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const fi=[new se,new se,new se,new se,new se,new se,new se,new se],Cr=new se,Ru=new $c,Ho=new se,Go=new se,Wo=new se,ji=new se,Xi=new se,Vs=new se,Cl=new se,Pu=new se,Du=new se,Hs=new se;function _p(t,e,n,r,i){for(let s=0,o=t.length-3;sa)return!1}return!0}const sU=new $c,Al=new se,xp=new se;class yv{constructor(e=new se,n=-1){this.isSphere=!0,this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):sU.setFromPoints(e).getCenter(r);let i=0;for(let s=0,o=e.length;s<o;s++)i=Math.max(i,r.distanceToSquared(e[s]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const n=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=n*n}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))this.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Al.subVectors(e,this.center);const n=Al.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(Al,i/r),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(xp.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Al.copy(e.center).add(xp)),this.expandByPoint(Al.copy(e.center).sub(xp))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const hi=new se,yp=new se,Nu=new se,Yi=new se,Sp=new se,Lu=new se,wp=new se;class oU{constructor(e=new se,n=new se(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,hi)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=hi.subVectors(e,this.origin).dot(this.direction);return n0)if(h=o*l-a,d=o*a-l,v=s*u,h>=0)if(d>=-v)if(d<=v){const p=1/u;h*=p,d*=p,m=h*(h+o*d+2*a)+d*(o*h+d+2*l)+c}else d=s,h=Math.max(0,-(o*d+a)),m=-h*h+d*(d+2*l)+c;else d=-s,h=Math.max(0,-(o*d+a)),m=-h*h+d*(d+2*l)+c;else d0?-s:Math.min(Math.max(-s,-l),s),m=-h*h+d*(d+2*l)+c):d0?s:Math.min(Math.max(-s,-l),s),m=-h*h+d*(d+2*l)+c);else d=o>0?-s:s,h=Math.max(0,-(o*d+a)),m=-h*h+d*(d+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,h),i&&i.copy(yp).addScaledVector(Nu,d),m}intersectSphere(e,n){hi.subVectors(e.center,this.origin);const r=hi.dot(this.direction),i=hi.dot(hi)-r*r,s=e.radius*e.radius;if(i>s)return null;const o=Math.sqrt(s-i),a=r-o,l=r+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n=0?(r=(e.min.x-d.x)*c,i=(e.max.x-d.x)*c):(r=(e.max.x-d.x)*c,i=(e.min.x-d.x)*c),u>=0?(s=(e.min.y-d.y)*u,o=(e.max.y-d.y)*u):(s=(e.max.y-d.y)*u,o=(e.min.y-d.y)*u),r>o||s>i||((s>r||isNaN(r))&&(r=s),(o=0?(a=(e.min.z-d.z)*h,l=(e.max.z-d.z)*h):(a=(e.max.z-d.z)*h,l=(e.min.z-d.z)*h),r>l||a>i)||((a>r||r!==r)&&(r=a),(l<i||i!==i)&&(i=l),i=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,hi)!==null}intersectTriangle(e,n,r,i,s){Sp.subVectors(n,e),Lu.subVectors(r,e),wp.crossVectors(Sp,Lu);let o=this.direction.dot(wp),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Yi.subVectors(this.origin,e);const l=a*this.direction.dot(Lu.crossVectors(Yi,Lu));if(l<0)return null;const c=a*this.direction.dot(Sp.cross(Yi));if(co)return null;const u=-a*Yi.dot(wp);return u<0?null:this.at(u/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class jt{constructor(e,n,r,i,s,o,a,l,c,u,h,d,m,v,p,g){jt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,r,i,s,o,a,l,c,u,h,d,m,v,p,g)}set(e,n,r,i,s,o,a,l,c,u,h,d,m,v,p,g){const f=this.elements;return f[0]=e,f[4]=n,f[8]=r,f[12]=i,f[1]=s,f[5]=o,f[9]=a,f[13]=l,f[2]=c,f[6]=u,f[10]=h,f[14]=d,f[3]=m,f[7]=v,f[11]=p,f[15]=g,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 jt().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/$o.setFromMatrixColumn(e,0).length(),s=1/$o.setFromMatrixColumn(e,1).length(),o=1/$o.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*s,n[5]=r[5]*s,n[6]=r[6]*s,n[7]=0,n[8]=r[8]*o,n[9]=r[9]*o,n[10]=r[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,s=e.z,o=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(s),h=Math.sin(s);if(e.order==="XYZ"){const d=o*u,m=o*h,v=a*u,p=a*h;n[0]=l*u,n[4]=-l*h,n[8]=c,n[1]=m+v*c,n[5]=d-p*c,n[9]=-a*l,n[2]=p-d*c,n[6]=v+m*c,n[10]=o*l}else if(e.order==="YXZ"){const d=l*u,m=l*h,v=c*u,p=c*h;n[0]=d+p*a,n[4]=v*a-m,n[8]=o*c,n[1]=o*h,n[5]=o*u,n[9]=-a,n[2]=m*a-v,n[6]=p+d*a,n[10]=o*l}else if(e.order==="ZXY"){const d=l*u,m=l*h,v=c*u,p=c*h;n[0]=d-p*a,n[4]=-o*h,n[8]=v+m*a,n[1]=m+v*a,n[5]=o*u,n[9]=p-d*a,n[2]=-o*c,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const d=o*u,m=o*h,v=a*u,p=a*h;n[0]=l*u,n[4]=v*c-m,n[8]=d*c+p,n[1]=l*h,n[5]=p*c+d,n[9]=m*c-v,n[2]=-c,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const d=o*l,m=o*c,v=a*l,p=a*c;n[0]=l*u,n[4]=p-d*h,n[8]=v*h+m,n[1]=h,n[5]=o*u,n[9]=-a*u,n[2]=-c*u,n[6]=m*h+v,n[10]=d-p*h}else if(e.order==="XZY"){const d=o*l,m=o*c,v=a*l,p=a*c;n[0]=l*u,n[4]=-h,n[8]=c*u,n[1]=d*h+p,n[5]=o*u,n[9]=m*h-v,n[2]=v*h-m,n[6]=a*u,n[10]=p*h+d}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(aU,e,lU)}lookAt(e,n,r){const i=this.elements;return jn.subVectors(e,n),jn.lengthSq()===0&&(jn.z=1),jn.normalize(),qi.crossVectors(r,jn),qi.lengthSq()===0&&(Math.abs(r.z)===1?jn.x+=1e-4:jn.z+=1e-4,jn.normalize(),qi.crossVectors(r,jn)),qi.normalize(),Iu.crossVectors(jn,qi),i[0]=qi.x,i[4]=Iu.x,i[8]=jn.x,i[1]=qi.y,i[5]=Iu.y,i[9]=jn.y,i[2]=qi.z,i[6]=Iu.z,i[10]=jn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,s=this.elements,o=r[0],a=r[4],l=r[8],c=r[12],u=r[1],h=r[5],d=r[9],m=r[13],v=r[2],p=r[6],g=r[10],f=r[14],x=r[3],_=r[7],y=r[11],T=r[15],M=i[0],S=i[4],b=i[8],E=i[12],w=i[1],R=i[5],z=i[9],H=i[13],B=i[2],V=i[6],I=i[10],F=i[14],A=i[3],G=i[7],Y=i[11],W=i[15];return s[0]=o*M+a*w+l*B+c*A,s[4]=o*S+a*R+l*V+c*G,s[8]=o*b+a*z+l*I+c*Y,s[12]=o*E+a*H+l*F+c*W,s[1]=u*M+h*w+d*B+m*A,s[5]=u*S+h*R+d*V+m*G,s[9]=u*b+h*z+d*I+m*Y,s[13]=u*E+h*H+d*F+m*W,s[2]=v*M+p*w+g*B+f*A,s[6]=v*S+p*R+g*V+f*G,s[10]=v*b+p*z+g*I+f*Y,s[14]=v*E+p*H+g*F+f*W,s[3]=x*M+_*w+y*B+T*A,s[7]=x*S+_*R+y*V+T*G,s[11]=x*b+_*z+y*I+T*Y,s[15]=x*E+_*H+y*F+T*W,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],h=e[6],d=e[10],m=e[14],v=e[3],p=e[7],g=e[11],f=e[15];return v*(+s*l*h-i*c*h-s*a*d+r*c*d+i*a*m-r*l*m)+p*(+n*l*m-n*c*d+s*o*d-i*o*m+i*c*u-s*l*u)+g*(+n*c*h-n*a*m-s*o*h+r*o*m+s*a*u-r*c*u)+f*(-i*a*u-n*l*h+n*a*d+i*o*h-r*o*d+r*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],m=e[11],v=e[12],p=e[13],g=e[14],f=e[15],x=h*g*c-p*d*c+p*l*m-a*g*m-h*l*f+a*d*f,_=v*d*c-u*g*c-v*l*m+o*g*m+u*l*f-o*d*f,y=u*p*c-v*h*c+v*a*m-o*p*m-u*a*f+o*h*f,T=v*h*l-u*p*l-v*a*d+o*p*d+u*a*g-o*h*g,M=n*x+r*_+i*y+s*T;if(M===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const S=1/M;return e[0]=x*S,e[1]=(p*d*s-h*g*s-p*i*m+r*g*m+h*i*f-r*d*f)*S,e[2]=(a*g*s-p*l*s+p*i*c-r*g*c-a*i*f+r*l*f)*S,e[3]=(h*l*s-a*d*s-h*i*c+r*d*c+a*i*m-r*l*m)*S,e[4]=_*S,e[5]=(u*g*s-v*d*s+v*i*m-n*g*m-u*i*f+n*d*f)*S,e[6]=(v*l*s-o*g*s-v*i*c+n*g*c+o*i*f-n*l*f)*S,e[7]=(o*d*s-u*l*s+u*i*c-n*d*c-o*i*m+n*l*m)*S,e[8]=y*S,e[9]=(v*h*s-u*p*s-v*r*m+n*p*m+u*r*f-n*h*f)*S,e[10]=(o*p*s-v*a*s+v*r*c-n*p*c-o*r*f+n*a*f)*S,e[11]=(u*a*s-o*h*s-u*r*c+n*h*c+o*r*m-n*a*m)*S,e[12]=T*S,e[13]=(u*p*i-v*h*i+v*r*d-n*p*d-u*r*g+n*h*g)*S,e[14]=(v*a*i-o*p*i-v*r*l+n*p*l+o*r*g-n*a*g)*S,e[15]=(o*h*i-u*a*i+u*r*l-n*h*l-o*r*d+n*a*d)*S,this}scale(e){const n=this.elements,r=e.x,i=e.y,s=e.z;return n[0]*=r,n[4]*=i,n[8]*=s,n[1]*=r,n[5]*=i,n[9]*=s,n[2]*=r,n[6]*=i,n[10]*=s,n[3]*=r,n[7]*=i,n[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,r,i))}makeTranslation(e,n,r){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),s=1-r,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*o,0,c*l-i*a,u*l+i*o,s*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,s,o){return this.set(1,r,s,0,e,1,o,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,s=n._x,o=n._y,a=n._z,l=n._w,c=s+s,u=o+o,h=a+a,d=s*c,m=s*u,v=s*h,p=o*u,g=o*h,f=a*h,x=l*c,_=l*u,y=l*h,T=r.x,M=r.y,S=r.z;return i[0]=(1-(p+f))*T,i[1]=(m+y)*T,i[2]=(v-_)*T,i[3]=0,i[4]=(m-y)*M,i[5]=(1-(d+f))*M,i[6]=(g+x)*M,i[7]=0,i[8]=(v+_)*S,i[9]=(g-x)*S,i[10]=(1-(d+p))*S,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let s=$o.set(i[0],i[1],i[2]).length();const o=$o.set(i[4],i[5],i[6]).length(),a=$o.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),e.x=i[12],e.y=i[13],e.z=i[14],Ar.copy(this);const c=1/s,u=1/o,h=1/a;return Ar.elements[0]*=c,Ar.elements[1]*=c,Ar.elements[2]*=c,Ar.elements[4]*=u,Ar.elements[5]*=u,Ar.elements[6]*=u,Ar.elements[8]*=h,Ar.elements[9]*=h,Ar.elements[10]*=h,n.setFromRotationMatrix(Ar),r.x=s,r.y=o,r.z=a,this}makePerspective(e,n,r,i,s,o,a=Ti){const l=this.elements,c=2*s/(n-e),u=2*s/(r-i),h=(n+e)/(n-e),d=(r+i)/(r-i);let m,v;if(a===Ti)m=-(o+s)/(o-s),v=-2*o*s/(o-s);else if(a===uf)m=-o/(o-s),v=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=u,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=v,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,s,o,a=Ti){const l=this.elements,c=1/(n-e),u=1/(r-i),h=1/(o-s),d=(n+e)*c,m=(r+i)*u;let v,p;if(a===Ti)v=(o+s)*h,p=-2*h;else if(a===uf)v=s*h,p=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-d,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=p,l[14]=-v,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const $o=new se,Ar=new jt,aU=new se(0,0,0),lU=new se(1,1,1),qi=new se,Iu=new se,jn=new se,Ay=new jt,Ry=new Wc;class Oi{constructor(e=0,n=0,r=0,i=Oi.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,r=!0){const i=e.elements,s=i[0],o=i[4],a=i[8],l=i[1],c=i[5],u=i[9],h=i[2],d=i[6],m=i[10];switch(n){case"XYZ":this._y=Math.asin(Pn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Pn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,s),this._z=0);break;case"ZXY":this._x=Math.asin(Pn(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-h,m),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Pn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(d,m),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Pn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Pn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return Ay.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Ay,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return Ry.setFromEuler(this),this.setFromQuaternion(Ry,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Oi.DEFAULT_ORDER="XYZ";class s2{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<1){for(let n=0;n1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}const n=this.children.indexOf(e);return n!==-1&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(fU),bp.child=e,this.dispatchEvent(bp),bp.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),pi.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),pi.multiply(e.parent.matrixWorld)),e.applyMatrix4(pi),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(Iy),Xo.child=e,this.dispatchEvent(Xo),Xo.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,n){if(this[e]===n)return this;for(let r=0,i=this.children.length;r<i;r++){const o=this.children[r].getObjectByProperty(e,n);if(o!==void 0)return o}}getObjectsByProperty(e,n,r=[]){this[e]===n&&r.push(this);const i=this.children;for(let s=0,o=i.length;s<o;s++)i[s].getObjectsByProperty(e,n,r);return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Rl,e,uU),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Rl,dU,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);const n=this.children;for(let r=0,i=n.length;r<i;r++)n[r].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const n=this.children;for(let r=0,i=n.length;r<i;r++)n[r].traverseVisible(e)}traverseAncestors(e){const n=this.parent;n!==null&&(e(n),n.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const n=this.children;for(let r=0,i=n.length;r<i;r++){const s=n[r];(s.matrixWorldAutoUpdate===!0||e===!0)&&s.updateMatrixWorld(e)}}updateWorldMatrix(e,n){const r=this.parent;if(e===!0&&r!==null&&r.matrixWorldAutoUpdate===!0&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),n===!0){const i=this.children;for(let s=0,o=i.length;s0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c<u;c++){const h=l[c];s(e.shapes,h)}else s(e.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,c=this.material.length;l0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),h.length>0&&(r.shapes=h),d.length>0&&(r.skeletons=d),m.length>0&&(r.animations=m),v.length>0&&(r.nodes=v)}return r.object=i,r;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(e,n,r,i,s){Rr.subVectors(i,n),mi.subVectors(r,n),Ep.subVectors(e,n);const o=Rr.dot(Rr),a=Rr.dot(mi),l=Rr.dot(Ep),c=mi.dot(mi),u=mi.dot(Ep),h=o*c-a*a;if(h===0)return s.set(0,0,0),null;const d=1/h,m=(c*l-a*u)*d,v=(o*u-a*l)*d;return s.set(1-m-v,v,m)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,gi)===null?!1:gi.x>=0&&gi.y>=0&&gi.x+gi.y<=1}static getInterpolation(e,n,r,i,s,o,a,l){return this.getBarycoord(e,n,r,i,gi)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,gi.x),l.addScaledVector(o,gi.y),l.addScaledVector(a,gi.z),l)}static isFrontFacing(e,n,r,i){return Rr.subVectors(r,n),mi.subVectors(e,n),Rr.cross(mi).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Rr.subVectors(this.c,this.b),mi.subVectors(this.a,this.b),Rr.cross(mi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ni.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return ni.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,r,i,s){return ni.getInterpolation(e,this.a,this.b,this.c,n,r,i,s)}containsPoint(e){return ni.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ni.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,s=this.c;let o,a;Yo.subVectors(i,r),qo.subVectors(s,r),Mp.subVectors(e,r);const l=Yo.dot(Mp),c=qo.dot(Mp);if(l<=0&&c=0&&h<=u)return n.copy(i);const d=l*h-u*c;if(d=0&&u=0&&m<=v)return n.copy(s);const p=m*c-l*v;if(p=0&&v<=0)return a=c/(c-v),n.copy(r).addScaledVector(qo,a);const g=u*v-m*h;if(g=0&&m-v>=0)return Oy.subVectors(s,i),a=(h-u)/(h-u+(m-v)),n.copy(i).addScaledVector(Oy,a);const f=1/(g+p+d);return o=p*f,a=d*f,n.copy(r).addScaledVector(Yo,o).addScaledVector(qo,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const o2={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},Ki={h:0,s:0,l:0},Uu={h:0,s:0,l:0};function Ap(t,e,n){return n1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,at.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=at.workingColorSpace){return this.r=e,this.g=n,this.b=r,at.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=at.workingColorSpace){if(e=KO(e,1),n=Pn(n,0,1),r=Pn(r,0,1),n===0)this.r=this.g=this.b=r;else{const s=r<=.5?r*(1+n):r+n-r*n,o=2*r-s;this.r=Ap(o,s,e+1/3),this.g=Ap(o,s,e),this.b=Ap(o,s,e-1/3)}return at.toWorkingColorSpace(this,i),this}setStyle(e,n=qr){function r(s){s!==void 0&&parseFloat(s)0)return this.setColorName(e,n);return this}setColorName(e,n=qr){const r=o2[e.toLowerCase()];return r!==void 0?this.setHex(r,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Ia(e.r),this.g=Ia(e.g),this.b=Ia(e.b),this}copyLinearToSRGB(e){return this.r=mp(e.r),this.g=mp(e.g),this.b=mp(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=qr){return at.fromWorkingColorSpace(un.copy(this),e),Math.round(Pn(un.r*255,0,255))*65536+Math.round(Pn(un.g*255,0,255))*256+Math.round(Pn(un.b*255,0,255))}getHexString(e=qr){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=at.workingColorSpace){at.fromWorkingColorSpace(un.copy(this),n);const r=un.r,i=un.g,s=un.b,o=Math.max(r,i,s),a=Math.min(r,i,s);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=u<=.5?h/(o+a):h/(2-o-a),o){case r:l=(i-s)/h+(i0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(r.dispersion=this.dispersion),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapRotation!==void 0&&(r.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==Na&&(r.blending=this.blending),this.side!==As&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(n){const s=i(e.textures),o=i(e.images);s.length>0&&(r.textures=s),o.length>0&&(r.images=o)}return r}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let s=0;s!==i;++s)r[s]=n[s].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class a2 extends eh{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new dt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Oi,this.combine=jM,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Bt=new se,ku=new it;class li{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=wy,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=us,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return n2("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,s=this.itemSize;i<s;i++)this.array[e+i]=n.array[r+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let n=0,r=this.count;n<r;n++)ku.fromBufferAttribute(this,n),ku.applyMatrix3(e),this.setXY(n,ku.x,ku.y);else if(this.itemSize===3)for(let n=0,r=this.count;n<r;n++)Bt.fromBufferAttribute(this,n),Bt.applyMatrix3(e),this.setXYZ(n,Bt.x,Bt.y,Bt.z);return this}applyMatrix4(e){for(let n=0,r=this.count;n<r;n++)Bt.fromBufferAttribute(this,n),Bt.applyMatrix4(e),this.setXYZ(n,Bt.x,Bt.y,Bt.z);return this}applyNormalMatrix(e){for(let n=0,r=this.count;n<r;n++)Bt.fromBufferAttribute(this,n),Bt.applyNormalMatrix(e),this.setXYZ(n,Bt.x,Bt.y,Bt.z);return this}transformDirection(e){for(let n=0,r=this.count;n<r;n++)Bt.fromBufferAttribute(this,n),Bt.transformDirection(e),this.setXYZ(n,Bt.x,Bt.y,Bt.z);return this}set(e,n=0){return this.array.set(e,n),this}getComponent(e,n){let r=this.array[e*this.itemSize+n];return this.normalized&&(r=Tl(r,this.array)),r}setComponent(e,n,r){return this.normalized&&(r=An(r,this.array)),this.array[e*this.itemSize+n]=r,this}getX(e){let n=this.array[e*this.itemSize];return this.normalized&&(n=Tl(n,this.array)),n}setX(e,n){return this.normalized&&(n=An(n,this.array)),this.array[e*this.itemSize]=n,this}getY(e){let n=this.array[e*this.itemSize+1];return this.normalized&&(n=Tl(n,this.array)),n}setY(e,n){return this.normalized&&(n=An(n,this.array)),this.array[e*this.itemSize+1]=n,this}getZ(e){let n=this.array[e*this.itemSize+2];return this.normalized&&(n=Tl(n,this.array)),n}setZ(e,n){return this.normalized&&(n=An(n,this.array)),this.array[e*this.itemSize+2]=n,this}getW(e){let n=this.array[e*this.itemSize+3];return this.normalized&&(n=Tl(n,this.array)),n}setW(e,n){return this.normalized&&(n=An(n,this.array)),this.array[e*this.itemSize+3]=n,this}setXY(e,n,r){return e*=this.itemSize,this.normalized&&(n=An(n,this.array),r=An(r,this.array)),this.array[e+0]=n,this.array[e+1]=r,this}setXYZ(e,n,r,i){return e*=this.itemSize,this.normalized&&(n=An(n,this.array),r=An(r,this.array),i=An(i,this.array)),this.array[e+0]=n,this.array[e+1]=r,this.array[e+2]=i,this}setXYZW(e,n,r,i,s){return e*=this.itemSize,this.normalized&&(n=An(n,this.array),r=An(r,this.array),i=An(i,this.array),s=An(s,this.array)),this.array[e+0]=n,this.array[e+1]=r,this.array[e+2]=i,this.array[e+3]=s,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==wy&&(e.usage=this.usage),e}}class l2 extends li{constructor(e,n,r){super(new Uint16Array(e),n,r)}}class c2 extends li{constructor(e,n,r){super(new Uint32Array(e),n,r)}}class go extends li{constructor(e,n,r){super(new Float32Array(e),n,r)}}let pU=0;const ur=new jt,Rp=new rr,Ko=new se,Xn=new $c,Pl=new $c,Zt=new se;class Lo extends dl{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:pU++}),this.uuid=Gc(),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(t2(e)?c2:l2)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,n){return this.attributes[e]=n,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,n,r=0){this.groups.push({start:e,count:n,materialIndex:r})}clearGroups(){this.groups=[]}setDrawRange(e,n){this.drawRange.start=e,this.drawRange.count=n}applyMatrix4(e){const n=this.attributes.position;n!==void 0&&(n.applyMatrix4(e),n.needsUpdate=!0);const r=this.attributes.normal;if(r!==void 0){const s=new Qe().getNormalMatrix(e);r.applyNormalMatrix(s),r.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return ur.makeRotationFromQuaternion(e),this.applyMatrix4(ur),this}rotateX(e){return ur.makeRotationX(e),this.applyMatrix4(ur),this}rotateY(e){return ur.makeRotationY(e),this.applyMatrix4(ur),this}rotateZ(e){return ur.makeRotationZ(e),this.applyMatrix4(ur),this}translate(e,n,r){return ur.makeTranslation(e,n,r),this.applyMatrix4(ur),this}scale(e,n,r){return ur.makeScale(e,n,r),this.applyMatrix4(ur),this}lookAt(e){return Rp.lookAt(e),Rp.updateMatrix(),this.applyMatrix4(Rp.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ko).negate(),this.translate(Ko.x,Ko.y,Ko.z),this}setFromPoints(e){const n=[];for(let r=0,i=e.length;r<i;r++){const s=e[r];n.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new go(n,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new $c);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new se(-1/0,-1/0,-1/0),new se(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let r=0,i=n.length;r<i;r++){const s=n[r];Xn.setFromBufferAttribute(s),this.morphTargetsRelative?(Zt.addVectors(this.boundingBox.min,Xn.min),this.boundingBox.expandByPoint(Zt),Zt.addVectors(this.boundingBox.max,Xn.max),this.boundingBox.expandByPoint(Zt)):(this.boundingBox.expandByPoint(Xn.min),this.boundingBox.expandByPoint(Xn.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new yv);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new se,1/0);return}if(e){const r=this.boundingSphere.center;if(Xn.setFromBufferAttribute(e),n)for(let s=0,o=n.length;s<o;s++){const a=n[s];Pl.setFromBufferAttribute(a),this.morphTargetsRelative?(Zt.addVectors(Xn.min,Pl.min),Xn.expandByPoint(Zt),Zt.addVectors(Xn.max,Pl.max),Xn.expandByPoint(Zt)):(Xn.expandByPoint(Pl.min),Xn.expandByPoint(Pl.max))}Xn.getCenter(r);let i=0;for(let s=0,o=e.count;s<o;s++)Zt.fromBufferAttribute(e,s),i=Math.max(i,r.distanceToSquared(Zt));if(n)for(let s=0,o=n.length;s<o;s++){const a=n[s],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)Zt.fromBufferAttribute(a,c),l&&(Ko.fromBufferAttribute(e,c),Zt.add(Ko)),i=Math.max(i,r.distanceToSquared(Zt))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,n=this.attributes;if(e===null||n.position===void 0||n.normal===void 0||n.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const r=n.position,i=n.normal,s=n.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new li(new Float32Array(4*r.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let b=0;b<r.count;b++)a[b]=new se,l[b]=new se;const c=new se,u=new se,h=new se,d=new it,m=new it,v=new it,p=new se,g=new se;function f(b,E,w){c.fromBufferAttribute(r,b),u.fromBufferAttribute(r,E),h.fromBufferAttribute(r,w),d.fromBufferAttribute(s,b),m.fromBufferAttribute(s,E),v.fromBufferAttribute(s,w),u.sub(c),h.sub(c),m.sub(d),v.sub(d);const R=1/(m.x*v.y-v.x*m.y);isFinite(R)&&(p.copy(u).multiplyScalar(v.y).addScaledVector(h,-m.y).multiplyScalar(R),g.copy(h).multiplyScalar(m.x).addScaledVector(u,-v.x).multiplyScalar(R),a[b].add(p),a[E].add(p),a[w].add(p),l[b].add(g),l[E].add(g),l[w].add(g))}let x=this.groups;x.length===0&&(x=[{start:0,count:e.count}]);for(let b=0,E=x.length;b<E;++b){const w=x[b],R=w.start,z=w.count;for(let H=R,B=R+z;H<B;H+=3)f(e.getX(H+0),e.getX(H+1),e.getX(H+2))}const _=new se,y=new se,T=new se,M=new se;function S(b){T.fromBufferAttribute(i,b),M.copy(T);const E=a[b];_.copy(E),_.sub(T.multiplyScalar(T.dot(E))).normalize(),y.crossVectors(M,E);const R=y.dot(l[b])<0?-1:1;o.setXYZW(b,_.x,_.y,_.z,R)}for(let b=0,E=x.length;b<E;++b){const w=x[b],R=w.start,z=w.count;for(let H=R,B=R+z;H<B;H+=3)S(e.getX(H+0)),S(e.getX(H+1)),S(e.getX(H+2))}}computeVertexNormals(){const e=this.index,n=this.getAttribute("position");if(n!==void 0){let r=this.getAttribute("normal");if(r===void 0)r=new li(new Float32Array(n.count*3),3),this.setAttribute("normal",r);else for(let d=0,m=r.count;d<m;d++)r.setXYZ(d,0,0,0);const i=new se,s=new se,o=new se,a=new se,l=new se,c=new se,u=new se,h=new se;if(e)for(let d=0,m=e.count;d<m;d+=3){const v=e.getX(d+0),p=e.getX(d+1),g=e.getX(d+2);i.fromBufferAttribute(n,v),s.fromBufferAttribute(n,p),o.fromBufferAttribute(n,g),u.subVectors(o,s),h.subVectors(i,s),u.cross(h),a.fromBufferAttribute(r,v),l.fromBufferAttribute(r,p),c.fromBufferAttribute(r,g),a.add(u),l.add(u),c.add(u),r.setXYZ(v,a.x,a.y,a.z),r.setXYZ(p,l.x,l.y,l.z),r.setXYZ(g,c.x,c.y,c.z)}else for(let d=0,m=n.count;d<m;d+=3)i.fromBufferAttribute(n,d+0),s.fromBufferAttribute(n,d+1),o.fromBufferAttribute(n,d+2),u.subVectors(o,s),h.subVectors(i,s),u.cross(h),r.setXYZ(d+0,u.x,u.y,u.z),r.setXYZ(d+1,u.x,u.y,u.z),r.setXYZ(d+2,u.x,u.y,u.z);this.normalizeNormals(),r.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let n=0,r=e.count;n<r;n++)Zt.fromBufferAttribute(e,n),Zt.normalize(),e.setXYZ(n,Zt.x,Zt.y,Zt.z)}toNonIndexed(){function e(a,l){const c=a.array,u=a.itemSize,h=a.normalized,d=new c.constructor(l.length*u);let m=0,v=0;for(let p=0,g=l.length;p<g;p++){a.isInterleavedBufferAttribute?m=l[p]*a.data.stride+a.offset:m=l[p]*u;for(let f=0;f<u;f++)d[v++]=c[m++]}return new li(d,u,h)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const n=new Lo,r=this.index.array,i=this.attributes;for(const a in i){const l=i[a],c=e(l,r);n.setAttribute(a,c)}const s=this.morphAttributes;for(const a in s){const l=[],c=s[a];for(let u=0,h=c.length;u<h;u++){const d=c[u],m=e(d,r);l.push(m)}n.morphAttributes[a]=l}n.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let h=0,d=c.length;h0&&(i[l]=u,s=!0)}s&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(n))}const s=e.morphAttributes;for(const c in s){const u=[],h=s[c];for(let d=0,m=h.length;d<m;d++)u.push(h[d].clone(n));this.morphAttributes[c]=u}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,u=o.length;c0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s<o;s++){const a=i[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}getVertexPosition(e,n){const r=this.geometry,i=r.attributes.position,s=r.morphAttributes.position,o=r.morphTargetsRelative;n.fromBufferAttribute(i,e);const a=this.morphTargetInfluences;if(s&&a){zu.set(0,0,0);for(let l=0,c=s.length;l(e.far-e.near)**2))&&(Uy.copy(s).invert(),Gs.copy(e.ray).applyMatrix4(Uy),!(r.boundingBox!==null&&Gs.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,Gs)))}_computeIntersections(e,n,r){let i;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,h=s.attributes.normal,d=s.groups,m=s.drawRange;if(a!==null)if(Array.isArray(o))for(let v=0,p=d.length;v<p;v++){const g=d[v],f=o[g.materialIndex],x=Math.max(g.start,m.start),_=Math.min(a.count,Math.min(g.start+g.count,m.start+m.count));for(let y=x,T=_;y<T;y+=3){const M=a.getX(y),S=a.getX(y+1),b=a.getX(y+2);i=$u(this,f,e,r,c,u,h,M,S,b),i&&(i.faceIndex=Math.floor(y/3),i.face.materialIndex=g.materialIndex,n.push(i))}}else{const v=Math.max(0,m.start),p=Math.min(a.count,m.start+m.count);for(let g=v,f=p;g<f;g+=3){const x=a.getX(g),_=a.getX(g+1),y=a.getX(g+2);i=$u(this,o,e,r,c,u,h,x,_,y),i&&(i.faceIndex=Math.floor(g/3),n.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let v=0,p=d.length;v<p;v++){const g=d[v],f=o[g.materialIndex],x=Math.max(g.start,m.start),_=Math.min(l.count,Math.min(g.start+g.count,m.start+m.count));for(let y=x,T=_;y<T;y+=3){const M=y,S=y+1,b=y+2;i=$u(this,f,e,r,c,u,h,M,S,b),i&&(i.faceIndex=Math.floor(y/3),i.face.materialIndex=g.materialIndex,n.push(i))}}else{const v=Math.max(0,m.start),p=Math.min(l.count,m.start+m.count);for(let g=v,f=p;g<f;g+=3){const x=g,_=g+1,y=g+2;i=$u(this,o,e,r,c,u,h,x,_,y),i&&(i.faceIndex=Math.floor(g/3),n.push(i))}}}}function mU(t,e,n,r,i,s,o,a){let l;if(e.side===Vn?l=r.intersectTriangle(o,s,i,!0,a):l=r.intersectTriangle(i,s,o,e.side===As,a),l===null)return null;Wu.copy(a),Wu.applyMatrix4(t.matrixWorld);const c=n.ray.origin.distanceTo(Wu);return cn.far?null:{distance:c,point:Wu.clone(),object:t}}function $u(t,e,n,r,i,s,o,a,l,c){t.getVertexPosition(a,Zo),t.getVertexPosition(l,Jo),t.getVertexPosition(c,Qo);const u=mU(t,e,n,r,Zo,Jo,Qo,Gu);if(u){i&&(Bu.fromBufferAttribute(i,a),Vu.fromBufferAttribute(i,l),Hu.fromBufferAttribute(i,c),u.uv=ni.getInterpolation(Gu,Zo,Jo,Qo,Bu,Vu,Hu,new it)),s&&(Bu.fromBufferAttribute(s,a),Vu.fromBufferAttribute(s,l),Hu.fromBufferAttribute(s,c),u.uv1=ni.getInterpolation(Gu,Zo,Jo,Qo,Bu,Vu,Hu,new it)),o&&(Fy.fromBufferAttribute(o,a),zy.fromBufferAttribute(o,l),By.fromBufferAttribute(o,c),u.normal=ni.getInterpolation(Gu,Zo,Jo,Qo,Fy,zy,By,new se),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new se,materialIndex:0};ni.getNormal(Zo,Jo,Qo,h.normal),u.face=h}return u}class jc extends Lo{constructor(e=1,n=1,r=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:s,depthSegments:o};const a=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],h=[];let d=0,m=0;v("z","y","x",-1,-1,r,n,e,o,s,0),v("z","y","x",1,-1,r,n,-e,o,s,1),v("x","z","y",1,1,e,r,n,i,o,2),v("x","z","y",1,-1,e,r,-n,i,o,3),v("x","y","z",1,-1,e,n,r,i,s,4),v("x","y","z",-1,-1,e,n,-r,i,s,5),this.setIndex(l),this.setAttribute("position",new go(c,3)),this.setAttribute("normal",new go(u,3)),this.setAttribute("uv",new go(h,2));function v(p,g,f,x,_,y,T,M,S,b,E){const w=y/S,R=T/b,z=y/2,H=T/2,B=M/2,V=S+1,I=b+1;let F=0,A=0;const G=new se;for(let Y=0;Y<I;Y++){const W=Y*R-H;for(let J=0;J0?1:-1,u.push(G.x,G.y,G.z),h.push(J/S),h.push(1-Y/b),F+=1}}for(let Y=0;Y<b;Y++)for(let W=0;W<S;W++){const J=d+W+V*Y,me=d+W+V*(Y+1),$=d+(W+1)+V*(Y+1),Q=d+(W+1)+V*Y;l.push(J,me,Q),l.push(me,$,Q),A+=6}a.addGroup(m,A,E),m+=A,d+=F}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new jc(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function el(t){const e={};for(const n in t){e[n]={};for(const r in t[n]){const i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[n][r]=null):e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}}return e}function yn(t){const e={};for(let n=0;n<t.length;n++){const r=el(t[n]);for(const i in r)e[i]=r[i]}return e}function gU(t){const e=[];for(let n=0;n0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class d2 extends rr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new jt,this.projectionMatrix=new jt,this.projectionMatrixInverse=new jt,this.coordinateSystem=Ti}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Zi=new se,Vy=new it,Hy=new it;class Ir extends d2{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=C0*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(fp*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return C0*2*Math.atan(Math.tan(fp*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,n,r){Zi.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Zi.x,Zi.y).multiplyScalar(-e/Zi.z),Zi.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(Zi.x,Zi.y).multiplyScalar(-e/Zi.z)}getViewSize(e,n){return this.getViewBounds(e,Vy,Hy),n.subVectors(Hy,Vy)}setViewOffset(e,n,r,i,s,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(fp*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,s=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*i/l,n-=o.offsetY*r/c,i*=o.width/l,r*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const ea=-90,ta=1;class yU extends rr{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Ir(ea,ta,e,n);i.layers=this.layers,this.add(i);const s=new Ir(ea,ta,e,n);s.layers=this.layers,this.add(s);const o=new Ir(ea,ta,e,n);o.layers=this.layers,this.add(o);const a=new Ir(ea,ta,e,n);a.layers=this.layers,this.add(a);const l=new Ir(ea,ta,e,n);l.layers=this.layers,this.add(l);const c=new Ir(ea,ta,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,s,o,a,l]=n;for(const c of n)this.remove(c);if(e===Ti)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===uf)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,u]=this.children,h=e.getRenderTarget(),d=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const p=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,s),e.setRenderTarget(r,1,i),e.render(n,o),e.setRenderTarget(r,2,i),e.render(n,a),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,c),r.texture.generateMipmaps=p,e.setRenderTarget(r,5,i),e.render(n,u),e.setRenderTarget(h,d,m),e.xr.enabled=v,r.texture.needsPMREMUpdate=!0}}class f2 extends Hn{constructor(e,n,r,i,s,o,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:qa,super(e,n,r,i,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class SU extends Ro{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];this.texture=new f2(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Ur}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; vec3 transformDirection( in vec3 dir, in mat4 matrix ) { return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); } void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include } `,fragmentShader:` uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { vec3 direction = normalize( vWorldDirection ); vec2 sampleUV = equirectUv( direction ); gl_FragColor = texture2D( tEquirect, sampleUV ); } `},i=new jc(5,5,5),s=new Ui({name:"CubemapFromEquirect",uniforms:el(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:Vn,blending:ws});s.uniforms.tEquirect.value=n;const o=new kr(i,s),a=n.minFilter;return n.minFilter===ao&&(n.minFilter=Ur),new yU(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n,r,i){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,r,i);e.setRenderTarget(s)}}const Dp=new se,wU=new se,bU=new Qe;class Zs{constructor(e=new se(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,r,i){return this.normal.set(e,n,r),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,r){const i=Dp.subVectors(r,n).cross(wU.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const r=e.delta(Dp),i=this.normal.dot(r);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/i;return s1?null:n.copy(e.start).addScaledVector(r,s)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n0||r0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const r=n||bU.getNormalMatrix(e),i=this.coplanarPoint(Dp).applyMatrix4(e),s=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Ws=new yv,ju=new se;class h2{constructor(e=new Zs,n=new Zs,r=new Zs,i=new Zs,s=new Zs,o=new Zs){this.planes=[e,n,r,i,s,o]}set(e,n,r,i,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(s),a[5].copy(o),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,n=Ti){const r=this.planes,i=e.elements,s=i[0],o=i[1],a=i[2],l=i[3],c=i[4],u=i[5],h=i[6],d=i[7],m=i[8],v=i[9],p=i[10],g=i[11],f=i[12],x=i[13],_=i[14],y=i[15];if(r[0].setComponents(l-s,d-c,g-m,y-f).normalize(),r[1].setComponents(l+s,d+c,g+m,y+f).normalize(),r[2].setComponents(l+o,d+u,g+v,y+x).normalize(),r[3].setComponents(l-o,d-u,g-v,y-x).normalize(),r[4].setComponents(l-a,d-h,g-p,y-_).normalize(),n===Ti)r[5].setComponents(l+a,d+h,g+p,y+_).normalize();else if(n===uf)r[5].setComponents(a,h,p,_).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Ws.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Ws.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ws)}intersectsSprite(e){return Ws.center.set(0,0,0),Ws.radius=.7071067811865476,Ws.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ws)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let s=0;s<6;s++)if(n[s].distanceToPoint(r)<i)return!1;return!0}intersectsBox(e){const n=this.planes;for(let r=0;r0?e.max.x:e.min.x,ju.y=i.normal.y>0?e.max.y:e.min.y,ju.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(ju)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function p2(){let t=null,e=!1,n=null,r=null;function i(s,o){n(s,o),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(s){n=s},setContext:function(s){t=s}}}function EU(t){const e=new WeakMap;function n(a,l){const c=a.array,u=a.usage,h=c.byteLength,d=t.createBuffer();t.bindBuffer(l,d),t.bufferData(l,c,u),a.onUploadCallback();let m;if(c instanceof Float32Array)m=t.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?m=t.HALF_FLOAT:m=t.UNSIGNED_SHORT;else if(c instanceof Int16Array)m=t.SHORT;else if(c instanceof Uint32Array)m=t.UNSIGNED_INT;else if(c instanceof Int32Array)m=t.INT;else if(c instanceof Int8Array)m=t.BYTE;else if(c instanceof Uint8Array)m=t.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)m=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:d,type:m,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:h}}function r(a,l,c){const u=l.array,h=l._updateRange,d=l.updateRanges;if(t.bindBuffer(c,a),h.count===-1&&d.length===0&&t.bufferSubData(c,0,u),d.length!==0){for(let m=0,v=d.length;m<v;m++){const p=d[m];t.bufferSubData(c,p.start*u.BYTES_PER_ELEMENT,u,p.start,p.count)}l.clearUpdateRanges()}h.count!==-1&&(t.bufferSubData(c,h.offset*u.BYTES_PER_ELEMENT,u,h.offset,h.count),h.count=-1),l.onUploadCallback()}function i(a){return a.isInterleavedBufferAttribute&&(a=a.data),e.get(a)}function s(a){a.isInterleavedBufferAttribute&&(a=a.data);const l=e.get(a);l&&(t.deleteBuffer(l.buffer),e.delete(a))}function o(a,l){if(a.isGLBufferAttribute){const u=e.get(a);(!u||u.version<a.version)&&e.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version});return}a.isInterleavedBufferAttribute&&(a=a.data);const c=e.get(a);if(c===void 0)e.set(a,n(a,l));else if(c.version<a.version){if(c.size!==a.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");r(c.buffer,a,l),c.version=a.version}}return{get:i,remove:s,update:o}}class Xc extends Lo{constructor(e=1,n=1,r=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:n,widthSegments:r,heightSegments:i};const s=e/2,o=n/2,a=Math.floor(r),l=Math.floor(i),c=a+1,u=l+1,h=e/a,d=n/l,m=[],v=[],p=[],g=[];for(let f=0;f<u;f++){const x=f*d-o;for(let _=0;_<c;_++){const y=_*h-s;v.push(y,-x,0),p.push(0,0,1),g.push(_/a),g.push(1-f/l)}}for(let f=0;f<l;f++)for(let x=0;x<a;x++){const _=x+c*f,y=x+c*(f+1),T=x+1+c*(f+1),M=x+1+c*f;m.push(_,y,M),m.push(y,T,M)}this.setIndex(m),this.setAttribute("position",new go(v,3)),this.setAttribute("normal",new go(p,3)),this.setAttribute("uv",new go(g,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Xc(e.width,e.height,e.widthSegments,e.heightSegments)}}var MU=`#ifdef USE_ALPHAHASH if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; #endif`,TU=`#ifdef USE_ALPHAHASH const float ALPHA_HASH_SCALE = 0.05; float hash2D( vec2 value ) { return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); } float hash3D( vec3 value ) { return hash2D( vec2( hash2D( value.xy ), value.z ) ); } float getAlphaHashThreshold( vec3 position ) { float maxDeriv = max( length( dFdx( position.xyz ) ), length( dFdy( position.xyz ) ) ); float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); vec2 pixScales = vec2( exp2( floor( log2( pixScale ) ) ), exp2( ceil( log2( pixScale ) ) ) ); vec2 alpha = vec2( hash3D( floor( pixScales.x * position.xyz ) ), hash3D( floor( pixScales.y * position.xyz ) ) ); float lerpFactor = fract( log2( pixScale ) ); float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; float a = min( lerpFactor, 1.0 - lerpFactor ); vec3 cases = vec3( x * x / ( 2.0 * a * ( 1.0 - a ) ), ( x - 0.5 * a ) / ( 1.0 - a ), 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) ); float threshold = ( x < ( 1.0 - a ) ) ? ( ( x < a ) ? cases.x : cases.y ) : cases.z; return clamp( threshold , 1.0e-6, 1.0 ); } #endif`,CU=`#ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; #endif`,AU=`#ifdef USE_ALPHAMAP uniform sampler2D alphaMap; #endif`,RU=`#ifdef USE_ALPHATEST #ifdef ALPHA_TO_COVERAGE diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); if ( diffuseColor.a == 0.0 ) discard; #else if ( diffuseColor.a < alphaTest ) discard; #endif #endif`,PU=`#ifdef USE_ALPHATEST uniform float alphaTest; #endif`,DU=`#ifdef USE_AOMAP float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; reflectedLight.indirectDiffuse *= ambientOcclusion; #if defined( USE_CLEARCOAT ) clearcoatSpecularIndirect *= ambientOcclusion; #endif #if defined( USE_SHEEN ) sheenSpecularIndirect *= ambientOcclusion; #endif #if defined( USE_ENVMAP ) && defined( STANDARD ) float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); #endif #endif`,NU=`#ifdef USE_AOMAP uniform sampler2D aoMap; uniform float aoMapIntensity; #endif`,LU=`#ifdef USE_BATCHING attribute float batchId; uniform highp sampler2D batchingTexture; mat4 getBatchingMatrix( const in float i ) { int size = textureSize( batchingTexture, 0 ).x; int j = int( i ) * 4; int x = j % size; int y = j / size; vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } #endif #ifdef USE_BATCHING_COLOR uniform sampler2D batchingColorTexture; vec3 getBatchingColor( const in float i ) { int size = textureSize( batchingColorTexture, 0 ).x; int j = int( i ); int x = j % size; int y = j / size; return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb; } #endif`,IU=`#ifdef USE_BATCHING mat4 batchingMatrix = getBatchingMatrix( batchId ); #endif`,OU=`vec3 transformed = vec3( position ); #ifdef USE_ALPHAHASH vPosition = vec3( position ); #endif`,UU=`vec3 objectNormal = vec3( normal ); #ifdef USE_TANGENT vec3 objectTangent = vec3( tangent.xyz ); #endif`,kU=`float G_BlinnPhong_Implicit( ) { return 0.25; } float D_BlinnPhong( const in float shininess, const in float dotNH ) { return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); } vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { vec3 halfDir = normalize( lightDir + viewDir ); float dotNH = saturate( dot( normal, halfDir ) ); float dotVH = saturate( dot( viewDir, halfDir ) ); vec3 F = F_Schlick( specularColor, 1.0, dotVH ); float G = G_BlinnPhong_Implicit( ); float D = D_BlinnPhong( shininess, dotNH ); return F * ( G * D ); } // validated`,FU=`#ifdef USE_IRIDESCENCE const mat3 XYZ_TO_REC709 = mat3( 3.2404542, -0.9692660, 0.0556434, -1.5371385, 1.8760108, -0.2040259, -0.4985314, 0.0415560, 1.0572252 ); vec3 Fresnel0ToIor( vec3 fresnel0 ) { vec3 sqrtF0 = sqrt( fresnel0 ); return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); } vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); } float IorToFresnel0( float transmittedIor, float incidentIor ) { return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); } vec3 evalSensitivity( float OPD, vec3 shift ) { float phase = 2.0 * PI * OPD * 1.0e-9; vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) ); xyz /= 1.0685e-7; vec3 rgb = XYZ_TO_REC709 * xyz; return rgb; } vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { vec3 I; float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); float cosTheta2Sq = 1.0 - sinTheta2Sq; if ( cosTheta2Sq < 0.0 ) { return vec3( 1.0 ); } float cosTheta2 = sqrt( cosTheta2Sq ); float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); float R12 = F_Schlick( R0, 1.0, cosTheta1 ); float T121 = 1.0 - R12; float phi12 = 0.0; if ( iridescenceIOR < outsideIOR ) phi12 = PI; float phi21 = PI - phi12; vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); vec3 phi23 = vec3( 0.0 ); if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; vec3 phi = vec3( phi21 ) + phi23; vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); vec3 r123 = sqrt( R123 ); vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); vec3 C0 = R12 + Rs; I = C0; vec3 Cm = Rs - T121; for ( int m = 1; m 0 vec4 plane; #ifdef ALPHA_TO_COVERAGE float distanceToPlane, distanceGradient; float clipOpacity = 1.0; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; distanceGradient = fwidth( distanceToPlane ) / 2.0; clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); if ( clipOpacity == 0.0 ) discard; } #pragma unroll_loop_end #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES float unionClipOpacity = 1.0; #pragma unroll_loop_start for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; distanceGradient = fwidth( distanceToPlane ) / 2.0; unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); } #pragma unroll_loop_end clipOpacity *= 1.0 - unionClipOpacity; #endif diffuseColor.a *= clipOpacity; if ( diffuseColor.a == 0.0 ) discard; #else #pragma unroll_loop_start for ( int i = 0; i plane.w ) discard; } #pragma unroll_loop_end #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES bool clipped = true; #pragma unroll_loop_start for ( int i = UNION_CLIPPING_PLANES; i plane.w ) && clipped; } #pragma unroll_loop_end if ( clipped ) discard; #endif #endif #endif`,VU=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif`,HU=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; #endif`,GU=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; #endif`,WU=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; #endif`,$U=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; #endif`,jU=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) varying vec3 vColor; #endif`,XU=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) vColor = vec3( 1.0 ); #endif #ifdef USE_COLOR vColor *= color; #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; #endif #ifdef USE_BATCHING_COLOR vec3 batchingColor = getBatchingColor( batchId ); vColor.xyz *= batchingColor.xyz; #endif`,YU=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 #define RECIPROCAL_PI2 0.15915494309189535 #define EPSILON 1e-6 #ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif #define whiteComplement( a ) ( 1.0 - saturate( a ) ) float pow2( const in float x ) { return x*x; } vec3 pow2( const in vec3 x ) { return x*x; } float pow3( const in float x ) { return x*x*x; } float pow4( const in float x ) { float x2 = x*x; return x2*x2; } float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } highp float rand( const in vec2 uv ) { const highp float a = 12.9898, b = 78.233, c = 43758.5453; highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); return fract( sin( sn ) * c ); } #ifdef HIGH_PRECISION float precisionSafeLength( vec3 v ) { return length( v ); } #else float precisionSafeLength( vec3 v ) { float maxComponent = max3( abs( v ) ); return length( v / maxComponent ) * maxComponent; } #endif struct IncidentLight { vec3 color; vec3 direction; bool visible; }; struct ReflectedLight { vec3 directDiffuse; vec3 directSpecular; vec3 indirectDiffuse; vec3 indirectSpecular; }; #ifdef USE_ALPHAHASH varying vec3 vPosition; #endif vec3 transformDirection( in vec3 dir, in mat4 matrix ) { return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); } vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); } mat3 transposeMat3( const in mat3 m ) { mat3 tmp; tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); return tmp; } float luminance( const in vec3 rgb ) { const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); return dot( weights, rgb ); } bool isPerspectiveMatrix( mat4 m ) { return m[ 2 ][ 3 ] == - 1.0; } vec2 equirectUv( in vec3 dir ) { float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; return vec2( u, v ); } vec3 BRDF_Lambert( const in vec3 diffuseColor ) { return RECIPROCAL_PI * diffuseColor; } vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); } float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); } // validated`,qU=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { vec3 absDirection = abs( direction ); float face = - 1.0; if ( absDirection.x > absDirection.z ) { if ( absDirection.x > absDirection.y ) face = direction.x > 0.0 ? 0.0 : 3.0; else face = direction.y > 0.0 ? 1.0 : 4.0; } else { if ( absDirection.z > absDirection.y ) face = direction.z > 0.0 ? 2.0 : 5.0; else face = direction.y > 0.0 ? 1.0 : 4.0; } return face; } vec2 getUV( vec3 direction, float face ) { vec2 uv; if ( face == 0.0 ) { uv = vec2( direction.z, direction.y ) / abs( direction.x ); } else if ( face == 1.0 ) { uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); } else if ( face == 2.0 ) { uv = vec2( - direction.x, direction.y ) / abs( direction.z ); } else if ( face == 3.0 ) { uv = vec2( - direction.z, direction.y ) / abs( direction.x ); } else if ( face == 4.0 ) { uv = vec2( - direction.x, direction.z ) / abs( direction.y ); } else { uv = vec2( direction.x, direction.y ) / abs( direction.z ); } return 0.5 * ( uv + 1.0 ); } vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { float face = getFace( direction ); float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); mipInt = max( mipInt, cubeUV_minMipLevel ); float faceSize = exp2( mipInt ); highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; if ( face > 2.0 ) { uv.y += faceSize; face -= 3.0; } uv.x += face * faceSize; uv.x += filterInt * 3.0 * cubeUV_minTileSize; uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); uv.x *= CUBEUV_TEXEL_WIDTH; uv.y *= CUBEUV_TEXEL_HEIGHT; #ifdef texture2DGradEXT return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; #else return texture2D( envMap, uv ).rgb; #endif } #define cubeUV_r0 1.0 #define cubeUV_m0 - 2.0 #define cubeUV_r1 0.8 #define cubeUV_m1 - 1.0 #define cubeUV_r4 0.4 #define cubeUV_m4 2.0 #define cubeUV_r5 0.305 #define cubeUV_m5 3.0 #define cubeUV_r6 0.21 #define cubeUV_m6 4.0 float roughnessToMip( float roughness ) { float mip = 0.0; if ( roughness >= cubeUV_r1 ) { mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; } else if ( roughness >= cubeUV_r4 ) { mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; } else if ( roughness >= cubeUV_r5 ) { mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; } else if ( roughness >= cubeUV_r6 ) { mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; } else { mip = - 2.0 * log2( 1.16 * roughness ); } return mip; } vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); float mipF = fract( mip ); float mipInt = floor( mip ); vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); if ( mipF == 0.0 ) { return vec4( color0, 1.0 ); } else { vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); return vec4( mix( color0, color1, mipF ), 1.0 ); } } #endif`,KU=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif #ifdef USE_BATCHING mat3 bm = mat3( batchingMatrix ); transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); transformedNormal = bm * transformedNormal; #ifdef USE_TANGENT transformedTangent = bm * transformedTangent; #endif #endif #ifdef USE_INSTANCING mat3 im = mat3( instanceMatrix ); transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); transformedNormal = im * transformedNormal; #ifdef USE_TANGENT transformedTangent = im * transformedTangent; #endif #endif transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedNormal = - transformedNormal; #endif #ifdef USE_TANGENT transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif #endif`,ZU=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; #endif`,JU=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); #endif`,QU=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; #endif`,ek=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; #endif`,tk="gl_FragColor = linearToOutputTexel( gl_FragColor );",nk=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), vec3( 0.0170827, 0.0723974, 0.9105199 ) ); const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( vec3( 1.2249401, - 0.2249404, 0.0 ), vec3( - 0.0420569, 1.0420571, 0.0 ), vec3( - 0.0196376, - 0.0786361, 1.0982735 ) ); vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); } vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); } vec4 LinearTransferOETF( in vec4 value ) { return value; } vec4 sRGBTransferOETF( in vec4 value ) { return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); } vec4 LinearToLinear( in vec4 value ) { return value; } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); }`,rk=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); } else { cameraToFrag = normalize( vWorldPosition - cameraPosition ); } vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); #ifdef ENVMAP_MODE_REFLECTION vec3 reflectVec = reflect( cameraToFrag, worldNormal ); #else vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); #endif #else vec3 reflectVec = vReflect; #endif #ifdef ENVMAP_TYPE_CUBE vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); #else vec4 envColor = vec4( 0.0 ); #endif #ifdef ENVMAP_BLENDING_MULTIPLY outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); #elif defined( ENVMAP_BLENDING_MIX ) outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif #endif`,ik=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; uniform mat3 envMapRotation; #ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #else uniform sampler2D envMap; #endif #endif`,sk=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif #ifdef ENV_WORLDPOS varying vec3 vWorldPosition; uniform float refractionRatio; #else varying vec3 vReflect; #endif #endif`,ok=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif #ifdef ENV_WORLDPOS varying vec3 vWorldPosition; #else varying vec3 vReflect; uniform float refractionRatio; #endif #endif`,ak=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else vec3 cameraToVertex; if ( isOrthographic ) { cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); } else { cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); } vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); #ifdef ENVMAP_MODE_REFLECTION vReflect = reflect( cameraToVertex, worldNormal ); #else vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif #endif`,lk=`#ifdef USE_FOG vFogDepth = - mvPosition.z; #endif`,ck=`#ifdef USE_FOG varying float vFogDepth; #endif`,uk=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); #endif`,dk=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 uniform float fogDensity; #else uniform float fogNear; uniform float fogFar; #endif #endif`,fk=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { float dotNL = dot( normal, lightDirection ); vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); #ifdef USE_GRADIENTMAP return vec3( texture2D( gradientMap, coord ).r ); #else vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif }`,hk=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; #endif`,pk=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularStrength = specularStrength;`,mk=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; }; void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert #define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,gk=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; #endif vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { float x = normal.x, y = normal.y, z = normal.z; vec3 result = shCoefficients[ 0 ] * 0.886227; result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); return result; } vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); return irradiance; } vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { vec3 irradiance = ambientLightColor; return irradiance; } float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); if ( cutoffDistance > 0.0 ) { distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); } return distanceFalloff; } float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { return smoothstep( coneCosine, penumbraCosine, angleCosine ); } #if NUM_DIR_LIGHTS > 0 struct DirectionalLight { vec3 direction; vec3 color; }; uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { light.color = directionalLight.color; light.direction = directionalLight.direction; light.visible = true; } #endif #if NUM_POINT_LIGHTS > 0 struct PointLight { vec3 position; vec3 color; float distance; float decay; }; uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { vec3 lVector = pointLight.position - geometryPosition; light.direction = normalize( lVector ); float lightDistance = length( lVector ); light.color = pointLight.color; light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); light.visible = ( light.color != vec3( 0.0 ) ); } #endif #if NUM_SPOT_LIGHTS > 0 struct SpotLight { vec3 position; vec3 direction; vec3 color; float distance; float decay; float coneCos; float penumbraCos; }; uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { vec3 lVector = spotLight.position - geometryPosition; light.direction = normalize( lVector ); float angleCos = dot( light.direction, spotLight.direction ); float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); if ( spotAttenuation > 0.0 ) { float lightDistance = length( lVector ); light.color = spotLight.color * spotAttenuation; light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); light.visible = ( light.color != vec3( 0.0 ) ); } else { light.color = vec3( 0.0 ); light.visible = false; } } #endif #if NUM_RECT_AREA_LIGHTS > 0 struct RectAreaLight { vec3 color; vec3 position; vec3 halfWidth; vec3 halfHeight; }; uniform sampler2D ltc_1; uniform sampler2D ltc_2; uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; #endif #if NUM_HEMI_LIGHTS > 0 struct HemisphereLight { vec3 direction; vec3 skyColor; vec3 groundColor; }; uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { float dotNL = dot( normal, hemiLight.direction ); float hemiDiffuseWeight = 0.5 * dotNL + 0.5; vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } #endif`,vk=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); return PI * envMapColor.rgb * envMapIntensity; #else return vec3( 0.0 ); #endif } vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 reflectVec = reflect( - viewDir, normal ); reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); return envMapColor.rgb * envMapIntensity; #else return vec3( 0.0 ); #endif } #ifdef USE_ANISOTROPY vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 bentNormal = cross( bitangent, viewDir ); bentNormal = normalize( cross( bentNormal, bitangent ) ); bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); return getIBLRadiance( viewDir, bentNormal, roughness ); #else return vec3( 0.0 ); #endif } #endif #endif`,_k=`ToonMaterial material; material.diffuseColor = diffuseColor.rgb;`,xk=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon #define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,yk=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; material.specularStrength = specularStrength;`,Sk=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; float specularShininess; float specularStrength; }; void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; } void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong #define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,wk=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; material.roughness = min( material.roughness, 1.0 ); #ifdef IOR material.ior = ior; #ifdef USE_SPECULAR float specularIntensityFactor = specularIntensity; vec3 specularColorFactor = specularColor; #ifdef USE_SPECULAR_COLORMAP specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; #endif #ifdef USE_SPECULAR_INTENSITYMAP specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; #endif material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); #else float specularIntensityFactor = 1.0; vec3 specularColorFactor = vec3( 1.0 ); material.specularF90 = 1.0; #endif material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); #else material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); material.specularF90 = 1.0; #endif #ifdef USE_CLEARCOAT material.clearcoat = clearcoat; material.clearcoatRoughness = clearcoatRoughness; material.clearcoatF0 = vec3( 0.04 ); material.clearcoatF90 = 1.0; #ifdef USE_CLEARCOATMAP material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; #endif material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); material.clearcoatRoughness += geometryRoughness; material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); #endif #ifdef USE_DISPERSION material.dispersion = dispersion; #endif #ifdef USE_IRIDESCENCE material.iridescence = iridescence; material.iridescenceIOR = iridescenceIOR; #ifdef USE_IRIDESCENCEMAP material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; #else material.iridescenceThickness = iridescenceThicknessMaximum; #endif #endif #ifdef USE_SHEEN material.sheenColor = sheenColor; #ifdef USE_SHEEN_COLORMAP material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; #endif material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); #ifdef USE_SHEEN_ROUGHNESSMAP material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; #endif #endif #ifdef USE_ANISOTROPY #ifdef USE_ANISOTROPYMAP mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; #else vec2 anisotropyV = anisotropyVector; #endif material.anisotropy = length( anisotropyV ); if( material.anisotropy == 0.0 ) { anisotropyV = vec2( 1.0, 0.0 ); } else { anisotropyV /= material.anisotropy; material.anisotropy = saturate( material.anisotropy ); } material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; #endif`,bk=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; float specularF90; float dispersion; #ifdef USE_CLEARCOAT float clearcoat; float clearcoatRoughness; vec3 clearcoatF0; float clearcoatF90; #endif #ifdef USE_IRIDESCENCE float iridescence; float iridescenceIOR; float iridescenceThickness; vec3 iridescenceFresnel; vec3 iridescenceF0; #endif #ifdef USE_SHEEN vec3 sheenColor; float sheenRoughness; #endif #ifdef IOR float ior; #endif #ifdef USE_TRANSMISSION float transmission; float transmissionAlpha; float thickness; float attenuationDistance; vec3 attenuationColor; #endif #ifdef USE_ANISOTROPY float anisotropy; float alphaT; vec3 anisotropyT; vec3 anisotropyB; #endif }; vec3 clearcoatSpecularDirect = vec3( 0.0 ); vec3 clearcoatSpecularIndirect = vec3( 0.0 ); vec3 sheenSpecularDirect = vec3( 0.0 ); vec3 sheenSpecularIndirect = vec3(0.0 ); vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); float x2 = x * x; float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); } float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { float a2 = pow2( alpha ); float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); return 0.5 / max( gv + gl, EPSILON ); } float D_GGX( const in float alpha, const in float dotNH ) { float a2 = pow2( alpha ); float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; return RECIPROCAL_PI * a2 / pow2( denom ); } #ifdef USE_ANISOTROPY float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); float v = 0.5 / ( gv + gl ); return saturate(v); } float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { float a2 = alphaT * alphaB; highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); highp float v2 = dot( v, v ); float w2 = a2 / v2; return RECIPROCAL_PI * a2 * pow2 ( w2 ); } #endif #ifdef USE_CLEARCOAT vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { vec3 f0 = material.clearcoatF0; float f90 = material.clearcoatF90; float roughness = material.clearcoatRoughness; float alpha = pow2( roughness ); vec3 halfDir = normalize( lightDir + viewDir ); float dotNL = saturate( dot( normal, lightDir ) ); float dotNV = saturate( dot( normal, viewDir ) ); float dotNH = saturate( dot( normal, halfDir ) ); float dotVH = saturate( dot( viewDir, halfDir ) ); vec3 F = F_Schlick( f0, f90, dotVH ); float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); float D = D_GGX( alpha, dotNH ); return F * ( V * D ); } #endif vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { vec3 f0 = material.specularColor; float f90 = material.specularF90; float roughness = material.roughness; float alpha = pow2( roughness ); vec3 halfDir = normalize( lightDir + viewDir ); float dotNL = saturate( dot( normal, lightDir ) ); float dotNV = saturate( dot( normal, viewDir ) ); float dotNH = saturate( dot( normal, halfDir ) ); float dotVH = saturate( dot( viewDir, halfDir ) ); vec3 F = F_Schlick( f0, f90, dotVH ); #ifdef USE_IRIDESCENCE F = mix( F, material.iridescenceFresnel, material.iridescence ); #endif #ifdef USE_ANISOTROPY float dotTL = dot( material.anisotropyT, lightDir ); float dotTV = dot( material.anisotropyT, viewDir ); float dotTH = dot( material.anisotropyT, halfDir ); float dotBL = dot( material.anisotropyB, lightDir ); float dotBV = dot( material.anisotropyB, viewDir ); float dotBH = dot( material.anisotropyB, halfDir ); float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); #else float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); float D = D_GGX( alpha, dotNH ); #endif return F * ( V * D ); } vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { const float LUT_SIZE = 64.0; const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; const float LUT_BIAS = 0.5 / LUT_SIZE; float dotNV = saturate( dot( N, V ) ); vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); uv = uv * LUT_SCALE + LUT_BIAS; return uv; } float LTC_ClippedSphereFormFactor( const in vec3 f ) { float l = length( f ); return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); } vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { float x = dot( v1, v2 ); float y = abs( x ); float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; float b = 3.4175940 + ( 4.1616724 + y ) * y; float v = a / b; float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; return cross( v1, v2 ) * theta_sintheta; } vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; vec3 lightNormal = cross( v1, v2 ); if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); vec3 T1, T2; T1 = normalize( V - N * dot( V, N ) ); T2 = - cross( N, T1 ); mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); vec3 coords[ 4 ]; coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); coords[ 0 ] = normalize( coords[ 0 ] ); coords[ 1 ] = normalize( coords[ 1 ] ); coords[ 2 ] = normalize( coords[ 2 ] ); coords[ 3 ] = normalize( coords[ 3 ] ); vec3 vectorFormFactor = vec3( 0.0 ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); return vec3( result ); } #if defined( USE_SHEEN ) float D_Charlie( float roughness, float dotNH ) { float alpha = pow2( roughness ); float invAlpha = 1.0 / alpha; float cos2h = dotNH * dotNH; float sin2h = max( 1.0 - cos2h, 0.0078125 ); return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); } float V_Neubelt( float dotNV, float dotNL ) { return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); } vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { vec3 halfDir = normalize( lightDir + viewDir ); float dotNL = saturate( dot( normal, lightDir ) ); float dotNV = saturate( dot( normal, viewDir ) ); float dotNH = saturate( dot( normal, halfDir ) ); float D = D_Charlie( sheenRoughness, dotNH ); float V = V_Neubelt( dotNV, dotNL ); return sheenColor * ( D * V ); } #endif float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { float dotNV = saturate( dot( normal, viewDir ) ); float r2 = roughness * roughness; float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; float DG = exp( a * dotNV + b ) + ( roughness 0 void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { vec3 normal = geometryNormal; vec3 viewDir = geometryViewDir; vec3 position = geometryPosition; vec3 lightPos = rectAreaLight.position; vec3 halfWidth = rectAreaLight.halfWidth; vec3 halfHeight = rectAreaLight.halfHeight; vec3 lightColor = rectAreaLight.color; float roughness = material.roughness; vec3 rectCoords[ 4 ]; rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; vec2 uv = LTC_Uv( normal, viewDir, roughness ); vec4 t1 = texture2D( ltc_1, uv ); vec4 t2 = texture2D( ltc_2, uv ); mat3 mInv = mat3( vec3( t1.x, 0, t1.y ), vec3( 0, 1, 0 ), vec3( t1.z, 0, t1.w ) ); vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); } #endif void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; #ifdef USE_CLEARCOAT float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); vec3 ccIrradiance = dotNLcc * directLight.color; clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); #endif #ifdef USE_SHEEN sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); #endif reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { #ifdef USE_CLEARCOAT clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); #endif #ifdef USE_SHEEN sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); #endif vec3 singleScattering = vec3( 0.0 ); vec3 multiScattering = vec3( 0.0 ); vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; #ifdef USE_IRIDESCENCE computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); #else computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); #endif vec3 totalScattering = singleScattering + multiScattering; vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); reflectedLight.indirectSpecular += radiance * singleScattering; reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; } #define RE_Direct RE_Direct_Physical #define RE_Direct_RectArea RE_Direct_RectArea_Physical #define RE_IndirectDiffuse RE_IndirectDiffuse_Physical #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); }`,Ek=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); vec3 geometryClearcoatNormal = vec3( 0.0 ); #ifdef USE_CLEARCOAT geometryClearcoatNormal = clearcoatNormal; #endif #ifdef USE_IRIDESCENCE float dotNVi = saturate( dot( normal, geometryViewDir ) ); if ( material.iridescenceThickness == 0.0 ) { material.iridescence = 0.0; } else { material.iridescence = saturate( material.iridescence ); } if ( material.iridescence > 0.0 ) { material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); } #endif IncidentLight directLight; #if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) PointLight pointLight; #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 PointLightShadow pointLightShadow; #endif #pragma unroll_loop_start for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { pointLight = pointLights[ i ]; getPointLightInfo( pointLight, geometryPosition, directLight ); #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX 0 ) && defined( RE_Direct ) SpotLight spotLight; vec4 spotColor; vec3 spotLightCoord; bool inSpotLightMap; #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 SpotLightShadow spotLightShadow; #endif #pragma unroll_loop_start for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { spotLight = spotLights[ i ]; getSpotLightInfo( spotLight, geometryPosition, directLight ); #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS #else #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) #endif #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; #endif #undef SPOT_LIGHT_MAP_INDEX #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX 0 ) && defined( RE_Direct ) DirectionalLight directionalLight; #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 DirectionalLightShadow directionalLightShadow; #endif #pragma unroll_loop_start for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { directionalLight = directionalLights[ i ]; getDirectionalLightInfo( directionalLight, directLight ); #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX 0 ) && defined( RE_Direct_RectArea ) RectAreaLight rectAreaLight; #pragma unroll_loop_start for ( int i = 0; i 0 ) #pragma unroll_loop_start for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); } #pragma unroll_loop_end #endif #endif #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); #endif`,Mk=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; irradiance += lightMapIrradiance; #endif #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) iblIrradiance += getIBLIrradiance( geometryNormal ); #endif #endif #if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) #ifdef USE_ANISOTROPY radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); #else radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); #endif #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif #endif`,Tk=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif`,Ck=`#if defined( USE_LOGDEPTHBUF ) gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; #endif`,Ak=`#if defined( USE_LOGDEPTHBUF ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; #endif`,Rk=`#ifdef USE_LOGDEPTHBUF varying float vFragDepth; varying float vIsPerspective; #endif`,Pk=`#ifdef USE_LOGDEPTHBUF vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); #endif`,Dk=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; #endif`,Nk=`#ifdef USE_MAP uniform sampler2D map; #endif`,Lk=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; #endif #endif #ifdef USE_MAP diffuseColor *= texture2D( map, uv ); #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; #endif`,Ik=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) uniform mat3 uvTransform; #endif #endif #ifdef USE_MAP uniform sampler2D map; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; #endif`,Ok=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; #endif`,Uk=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; #endif`,kk=`#ifdef USE_INSTANCING_MORPH float morphTargetInfluences[ MORPHTARGETS_COUNT ]; float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; } #endif`,Fk=`#if defined( USE_MORPHCOLORS ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; #elif defined( USE_COLOR ) if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } #endif`,zk=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; } #endif`,Bk=`#ifdef USE_MORPHTARGETS #ifndef USE_INSTANCING_MORPH uniform float morphTargetBaseInfluence; uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; #endif uniform sampler2DArray morphTargetsTexture; uniform ivec2 morphTargetsTextureSize; vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; int y = texelIndex / morphTargetsTextureSize.x; int x = texelIndex - y * morphTargetsTextureSize.x; ivec3 morphUV = ivec3( x, y, morphTargetIndex ); return texelFetch( morphTargetsTexture, morphUV, 0 ); } #endif`,Vk=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; for ( int i = 0; i 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; #endif #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; struct DirectionalLightShadow { float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; }; uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; struct SpotLightShadow { float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; }; uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; #endif #if NUM_POINT_LIGHT_SHADOWS > 0 uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; struct PointLightShadow { float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; float shadowCameraNear; float shadowCameraFar; }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); } vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { return unpackRGBATo2Half( texture2D( shadow, uv ) ); } float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ float occlusion = 1.0; vec2 distribution = texture2DDistribution( shadow, uv ); float hard_shadow = step( compare , distribution.x ); if (hard_shadow != 1.0 ) { float distance = compare - distribution.x ; float variance = max( 0.00000, distribution.y * distribution.y ); float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); } return occlusion; } float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { float shadow = 1.0; shadowCoord.xyz /= shadowCoord.w; shadowCoord.z += shadowBias; bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x = 0.0 && shadowCoord.y <= 1.0; bool frustumTest = inFrustum && shadowCoord.z = almostOne ) { if ( v.z > 0.0 ) planar.x = 4.0 - v.x; } else if ( absV.x >= almostOne ) { float signX = sign( v.x ); planar.x = v.z * signX + 2.0 * signX; } else if ( absV.y >= almostOne ) { float signY = sign( v.y ); planar.x = v.x + 2.0 * signY + 2.0; planar.y = v.z * signY - 2.0; } return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); } float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { float shadow = 1.0; vec3 lightToPosition = shadowCoord.xyz; float lightToPositionLength = length( lightToPosition ); if ( lightToPositionLength - shadowCameraFar = 0.0 ) { float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; vec3 bd3D = normalize( lightToPosition ); vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; shadow = ( texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) ) * ( 1.0 / 9.0 ); #else shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } return shadow; } #endif`,a5=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; struct DirectionalLightShadow { float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; }; uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 struct SpotLightShadow { float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; }; uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; #endif #if NUM_POINT_LIGHT_SHADOWS > 0 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; struct PointLightShadow { float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; float shadowCameraNear; float shadowCameraFar; }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif #endif`,l5=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif #if defined( USE_SHADOWMAP ) #if NUM_DIR_LIGHT_SHADOWS > 0 #pragma unroll_loop_start for ( int i = 0; i 0 #pragma unroll_loop_start for ( int i = 0; i 0 #pragma unroll_loop_start for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { shadowWorldPosition = worldPosition; #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX 0 DirectionalLightShadow directionalLight; #pragma unroll_loop_start for ( int i = 0; i 0 SpotLightShadow spotLight; #pragma unroll_loop_start for ( int i = 0; i 0 PointLightShadow pointLight; #pragma unroll_loop_start for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { pointLight = pointLightShadows[ i ]; shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; } #pragma unroll_loop_end #endif #endif return shadow; }`,u5=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); #endif`,d5=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; mat4 getBoneMatrix( const in float i ) { int size = textureSize( boneTexture, 0 ).x; int j = int( i ) * 4; int x = j % size; int y = j / size; vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } #endif`,f5=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; skinned += boneMatY * skinVertex * skinWeight.y; skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; #endif`,h5=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; skinMatrix += skinWeight.z * boneMatZ; skinMatrix += skinWeight.w * boneMatW; skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif #endif`,p5=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; #endif`,m5=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; #endif`,g5=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); #endif`,v5=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; vec3 LinearToneMapping( vec3 color ) { return saturate( toneMappingExposure * color ); } vec3 ReinhardToneMapping( vec3 color ) { color *= toneMappingExposure; return saturate( color / ( vec3( 1.0 ) + color ) ); } vec3 OptimizedCineonToneMapping( vec3 color ) { color *= toneMappingExposure; color = max( vec3( 0.0 ), color - 0.004 ); return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); } vec3 RRTAndODTFit( vec3 v ) { vec3 a = v * ( v + 0.0245786 ) - 0.000090537; vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; return a / b; } vec3 ACESFilmicToneMapping( vec3 color ) { const mat3 ACESInputMat = mat3( vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), vec3( 0.04823, 0.01566, 0.83777 ) ); const mat3 ACESOutputMat = mat3( vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), vec3( -0.07367, -0.00605, 1.07602 ) ); color *= toneMappingExposure / 0.6; color = ACESInputMat * color; color = RRTAndODTFit( color ); color = ACESOutputMat * color; return saturate( color ); } const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( vec3( 1.6605, - 0.1246, - 0.0182 ), vec3( - 0.5876, 1.1329, - 0.1006 ), vec3( - 0.0728, - 0.0083, 1.1187 ) ); const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( vec3( 0.6274, 0.0691, 0.0164 ), vec3( 0.3293, 0.9195, 0.0880 ), vec3( 0.0433, 0.0113, 0.8956 ) ); vec3 agxDefaultContrastApprox( vec3 x ) { vec3 x2 = x * x; vec3 x4 = x2 * x2; return + 15.5 * x4 * x2 - 40.14 * x4 * x + 31.96 * x4 - 6.868 * x2 * x + 0.4298 * x2 + 0.1191 * x - 0.00232; } vec3 AgXToneMapping( vec3 color ) { const mat3 AgXInsetMatrix = mat3( vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) ); const mat3 AgXOutsetMatrix = mat3( vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) ); const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; color *= toneMappingExposure; color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; color = AgXInsetMatrix * color; color = max( color, 1e-10 ); color = log2( color ); color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); color = clamp( color, 0.0, 1.0 ); color = agxDefaultContrastApprox( color ); color = AgXOutsetMatrix * color; color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); color = LINEAR_REC2020_TO_LINEAR_SRGB * color; color = clamp( color, 0.0, 1.0 ); return color; } vec3 NeutralToneMapping( vec3 color ) { const float StartCompression = 0.8 - 0.04; const float Desaturation = 0.15; color *= toneMappingExposure; float x = min( color.r, min( color.g, color.b ) ); float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; color -= offset; float peak = max( color.r, max( color.g, color.b ) ); if ( peak < StartCompression ) return color; float d = 1. - StartCompression; float newPeak = 1. - d * d / ( peak + d - StartCompression ); color *= newPeak / peak; float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); return mix( color, vec3( newPeak ), g ); } vec3 CustomToneMapping( vec3 color ) { return color; }`,_5=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; material.attenuationDistance = attenuationDistance; material.attenuationColor = attenuationColor; #ifdef USE_TRANSMISSIONMAP material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; #endif #ifdef USE_THICKNESSMAP material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; #endif vec3 pos = vWorldPosition; vec3 v = normalize( cameraPosition - pos ); vec3 n = inverseTransformDirection( normal, viewMatrix ); vec4 transmitted = getIBLVolumeRefraction( n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); #endif`,x5=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; uniform vec3 attenuationColor; #ifdef USE_TRANSMISSIONMAP uniform sampler2D transmissionMap; #endif #ifdef USE_THICKNESSMAP uniform sampler2D thicknessMap; #endif uniform vec2 transmissionSamplerSize; uniform sampler2D transmissionSamplerMap; uniform mat4 modelMatrix; uniform mat4 projectionMatrix; varying vec3 vWorldPosition; float w0( float a ) { return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); } float w1( float a ) { return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); } float w2( float a ){ return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); } float w3( float a ) { return ( 1.0 / 6.0 ) * ( a * a * a ); } float g0( float a ) { return w0( a ) + w1( a ); } float g1( float a ) { return w2( a ) + w3( a ); } float h0( float a ) { return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); } float h1( float a ) { return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); } vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { uv = uv * texelSize.zw + 0.5; vec2 iuv = floor( uv ); vec2 fuv = fract( uv ); float g0x = g0( fuv.x ); float g1x = g1( fuv.x ); float h0x = h0( fuv.x ); float h1x = h1( fuv.x ); float h0y = h0( fuv.y ); float h1y = h1( fuv.y ); vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); } vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); vec2 fLodSizeInv = 1.0 / fLodSize; vec2 cLodSizeInv = 1.0 / cLodSize; vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); return mix( fSample, cSample, fract( lod ) ); } vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); vec3 modelScale; modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); return normalize( refractionVector ) * thickness * modelScale; } float applyIorToRoughness( const in float roughness, const in float ior ) { return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); } vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); } vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { if ( isinf( attenuationDistance ) ) { return vec3( 1.0 ); } else { vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; } } vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, const in vec3 attenuationColor, const in float attenuationDistance ) { vec4 transmittedLight; vec3 transmittance; #ifdef USE_DISPERSION float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); for ( int i = 0; i 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; #endif #ifdef USE_INSTANCING worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; #endif`;const E5=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); }`,M5=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { vec4 texColor = texture2D( t2D, vUv ); #ifdef DECODE_VIDEO_TEXTURE texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); #endif texColor.rgb *= backgroundIntensity; gl_FragColor = texColor; #include #include }`,T5=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; }`,C5=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; #endif uniform float flipEnvMap; uniform float backgroundBlurriness; uniform float backgroundIntensity; uniform mat3 backgroundRotation; varying vec3 vWorldDirection; #include void main() { #ifdef ENVMAP_TYPE_CUBE vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); #elif defined( ENVMAP_TYPE_CUBE_UV ) vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); #else vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); #endif texColor.rgb *= backgroundIntensity; gl_FragColor = texColor; #include #include }`,A5=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; }`,R5=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; void main() { vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); gl_FragColor = texColor; gl_FragColor.a *= opacity; #include #include }`,P5=`#include #include #include #include #include #include #include #include varying vec2 vHighPrecisionZW; void main() { #include #include #include #include #ifdef USE_DISPLACEMENTMAP #include #include #include #endif #include #include #include #include #include #include #include vHighPrecisionZW = gl_Position.zw; }`,D5=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include #include #include #include #include #include #include #include #include varying vec2 vHighPrecisionZW; void main() { vec4 diffuseColor = vec4( 1.0 ); #include #if DEPTH_PACKING == 3200 diffuseColor.a = opacity; #endif #include #include #include #include #include float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; #if DEPTH_PACKING == 3200 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif }`,N5=`#define DISTANCE varying vec3 vWorldPosition; #include #include #include #include #include #include #include void main() { #include #include #include #include #ifdef USE_DISPLACEMENTMAP #include #include #include #endif #include #include #include #include #include #include #include vWorldPosition = worldPosition.xyz; }`,L5=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; varying vec3 vWorldPosition; #include #include #include #include #include #include #include #include void main () { vec4 diffuseColor = vec4( 1.0 ); #include #include #include #include #include float dist = length( vWorldPosition - referencePosition ); dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); }`,I5=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include }`,O5=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { vec3 direction = normalize( vWorldDirection ); vec2 sampleUV = equirectUv( direction ); gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include }`,U5=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include #include #include #include #include #include #include void main() { vLineDistance = scale * lineDistance; #include #include #include #include #include #include #include #include #include #include }`,k5=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; varying float vLineDistance; #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include if ( mod( vLineDistance, totalSize ) > dashSize ) { discard; } vec3 outgoingLight = vec3( 0.0 ); #include #include #include outgoingLight = diffuseColor.rgb; #include #include #include #include #include }`,F5=`#include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) #include #include #include #include #include #endif #include #include #include #include #include #include #include #include #include }`,z5=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include #include #include #include #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; #else reflectedLight.indirectDiffuse += vec3( 1.0 ); #endif #include reflectedLight.indirectDiffuse *= diffuseColor.rgb; vec3 outgoingLight = reflectedLight.indirectDiffuse; #include #include #include #include #include #include #include }`,B5=`#define LAMBERT varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include #include }`,V5=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; #include #include #include #include #include #include #include }`,H5=`#define MATCAP varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; }`,G5=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include #include #include #include #include #include vec3 viewDir = normalize( vViewPosition ); vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); vec3 y = cross( viewDir, x ); vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; #ifdef USE_MATCAP vec4 matcapColor = texture2D( matcap, uv ); #else vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); #endif vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; #include #include #include #include #include #include }`,W5=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif }`,$5=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); #include #include #include #include gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); #ifdef OPAQUE gl_FragColor.a = 1.0; #endif }`,j5=`#define PHONG varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include #include }`,X5=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; uniform float shininess; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; #include #include #include #include #include #include #include }`,Y5=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; #endif #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif }`,q5=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR #endif uniform vec3 diffuse; uniform vec3 emissive; uniform float roughness; uniform float metalness; uniform float opacity; #ifdef IOR uniform float ior; #endif #ifdef USE_SPECULAR uniform float specularIntensity; uniform vec3 specularColor; #ifdef USE_SPECULAR_COLORMAP uniform sampler2D specularColorMap; #endif #ifdef USE_SPECULAR_INTENSITYMAP uniform sampler2D specularIntensityMap; #endif #endif #ifdef USE_CLEARCOAT uniform float clearcoat; uniform float clearcoatRoughness; #endif #ifdef USE_DISPERSION uniform float dispersion; #endif #ifdef USE_IRIDESCENCE uniform float iridescence; uniform float iridescenceIOR; uniform float iridescenceThicknessMinimum; uniform float iridescenceThicknessMaximum; #endif #ifdef USE_SHEEN uniform vec3 sheenColor; uniform float sheenRoughness; #ifdef USE_SHEEN_COLORMAP uniform sampler2D sheenColorMap; #endif #ifdef USE_SHEEN_ROUGHNESSMAP uniform sampler2D sheenRoughnessMap; #endif #endif #ifdef USE_ANISOTROPY uniform vec2 anisotropyVector; #ifdef USE_ANISOTROPYMAP uniform sampler2D anisotropyMap; #endif #endif varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; #include vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; #ifdef USE_SHEEN float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; #endif #ifdef USE_CLEARCOAT float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; #endif #include #include #include #include #include #include }`,K5=`#define TOON varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include }`,Z5=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; #include #include #include #include #include #include }`,J5=`uniform float size; uniform float scale; #include #include #include #include #include #include #ifdef USE_POINTS_UV varying vec2 vUv; uniform mat3 uvTransform; #endif void main() { #ifdef USE_POINTS_UV vUv = ( uvTransform * vec3( uv, 1 ) ).xy; #endif #include #include #include #include #include #include gl_PointSize = size; #ifdef USE_SIZEATTENUATION bool isPerspective = isPerspectiveMatrix( projectionMatrix ); if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); #endif #include #include #include #include }`,Q5=`uniform vec3 diffuse; uniform float opacity; #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include vec3 outgoingLight = vec3( 0.0 ); #include #include #include #include #include outgoingLight = diffuseColor.rgb; #include #include #include #include #include }`,eF=`#include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include }`,tF=`uniform vec3 color; uniform float opacity; #include #include #include #include #include #include #include #include void main() { #include gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); #include #include #include }`,nF=`uniform float rotation; uniform vec2 center; #include #include #include #include #include void main() { #include vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); vec2 scale; scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); #ifndef USE_SIZEATTENUATION bool isPerspective = isPerspectiveMatrix( projectionMatrix ); if ( isPerspective ) scale *= - mvPosition.z; #endif vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; vec2 rotatedPosition; rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; mvPosition.xy += rotatedPosition; gl_Position = projectionMatrix * mvPosition; #include #include #include }`,rF=`uniform vec3 diffuse; uniform float opacity; #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include vec3 outgoingLight = vec3( 0.0 ); #include #include #include #include #include outgoingLight = diffuseColor.rgb; #include #include #include #include }`,Je={alphahash_fragment:MU,alphahash_pars_fragment:TU,alphamap_fragment:CU,alphamap_pars_fragment:AU,alphatest_fragment:RU,alphatest_pars_fragment:PU,aomap_fragment:DU,aomap_pars_fragment:NU,batching_pars_vertex:LU,batching_vertex:IU,begin_vertex:OU,beginnormal_vertex:UU,bsdfs:kU,iridescence_fragment:FU,bumpmap_pars_fragment:zU,clipping_planes_fragment:BU,clipping_planes_pars_fragment:VU,clipping_planes_pars_vertex:HU,clipping_planes_vertex:GU,color_fragment:WU,color_pars_fragment:$U,color_pars_vertex:jU,color_vertex:XU,common:YU,cube_uv_reflection_fragment:qU,defaultnormal_vertex:KU,displacementmap_pars_vertex:ZU,displacementmap_vertex:JU,emissivemap_fragment:QU,emissivemap_pars_fragment:ek,colorspace_fragment:tk,colorspace_pars_fragment:nk,envmap_fragment:rk,envmap_common_pars_fragment:ik,envmap_pars_fragment:sk,envmap_pars_vertex:ok,envmap_physical_pars_fragment:vk,envmap_vertex:ak,fog_vertex:lk,fog_pars_vertex:ck,fog_fragment:uk,fog_pars_fragment:dk,gradientmap_pars_fragment:fk,lightmap_pars_fragment:hk,lights_lambert_fragment:pk,lights_lambert_pars_fragment:mk,lights_pars_begin:gk,lights_toon_fragment:_k,lights_toon_pars_fragment:xk,lights_phong_fragment:yk,lights_phong_pars_fragment:Sk,lights_physical_fragment:wk,lights_physical_pars_fragment:bk,lights_fragment_begin:Ek,lights_fragment_maps:Mk,lights_fragment_end:Tk,logdepthbuf_fragment:Ck,logdepthbuf_pars_fragment:Ak,logdepthbuf_pars_vertex:Rk,logdepthbuf_vertex:Pk,map_fragment:Dk,map_pars_fragment:Nk,map_particle_fragment:Lk,map_particle_pars_fragment:Ik,metalnessmap_fragment:Ok,metalnessmap_pars_fragment:Uk,morphinstance_vertex:kk,morphcolor_vertex:Fk,morphnormal_vertex:zk,morphtarget_pars_vertex:Bk,morphtarget_vertex:Vk,normal_fragment_begin:Hk,normal_fragment_maps:Gk,normal_pars_fragment:Wk,normal_pars_vertex:$k,normal_vertex:jk,normalmap_pars_fragment:Xk,clearcoat_normal_fragment_begin:Yk,clearcoat_normal_fragment_maps:qk,clearcoat_pars_fragment:Kk,iridescence_pars_fragment:Zk,opaque_fragment:Jk,packing:Qk,premultiplied_alpha_fragment:e5,project_vertex:t5,dithering_fragment:n5,dithering_pars_fragment:r5,roughnessmap_fragment:i5,roughnessmap_pars_fragment:s5,shadowmap_pars_fragment:o5,shadowmap_pars_vertex:a5,shadowmap_vertex:l5,shadowmask_pars_fragment:c5,skinbase_vertex:u5,skinning_pars_vertex:d5,skinning_vertex:f5,skinnormal_vertex:h5,specularmap_fragment:p5,specularmap_pars_fragment:m5,tonemapping_fragment:g5,tonemapping_pars_fragment:v5,transmission_fragment:_5,transmission_pars_fragment:x5,uv_pars_fragment:y5,uv_pars_vertex:S5,uv_vertex:w5,worldpos_vertex:b5,background_vert:E5,background_frag:M5,backgroundCube_vert:T5,backgroundCube_frag:C5,cube_vert:A5,cube_frag:R5,depth_vert:P5,depth_frag:D5,distanceRGBA_vert:N5,distanceRGBA_frag:L5,equirect_vert:I5,equirect_frag:O5,linedashed_vert:U5,linedashed_frag:k5,meshbasic_vert:F5,meshbasic_frag:z5,meshlambert_vert:B5,meshlambert_frag:V5,meshmatcap_vert:H5,meshmatcap_frag:G5,meshnormal_vert:W5,meshnormal_frag:$5,meshphong_vert:j5,meshphong_frag:X5,meshphysical_vert:Y5,meshphysical_frag:q5,meshtoon_vert:K5,meshtoon_frag:Z5,points_vert:J5,points_frag:Q5,shadow_vert:eF,shadow_frag:tF,sprite_vert:nF,sprite_frag:rF},De={common:{diffuse:{value:new dt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Qe},alphaMap:{value:null},alphaMapTransform:{value:new Qe},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Qe}},envmap:{envMap:{value:null},envMapRotation:{value:new Qe},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Qe}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Qe}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Qe},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Qe},normalScale:{value:new it(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Qe},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Qe}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Qe}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Qe}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new dt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new dt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Qe},alphaTest:{value:0},uvTransform:{value:new Qe}},sprite:{diffuse:{value:new dt(16777215)},opacity:{value:1},center:{value:new it(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Qe},alphaMap:{value:null},alphaMapTransform:{value:new Qe},alphaTest:{value:0}}},Kr={basic:{uniforms:yn([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.fog]),vertexShader:Je.meshbasic_vert,fragmentShader:Je.meshbasic_frag},lambert:{uniforms:yn([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.fog,De.lights,{emissive:{value:new dt(0)}}]),vertexShader:Je.meshlambert_vert,fragmentShader:Je.meshlambert_frag},phong:{uniforms:yn([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.fog,De.lights,{emissive:{value:new dt(0)},specular:{value:new dt(1118481)},shininess:{value:30}}]),vertexShader:Je.meshphong_vert,fragmentShader:Je.meshphong_frag},standard:{uniforms:yn([De.common,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.roughnessmap,De.metalnessmap,De.fog,De.lights,{emissive:{value:new dt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Je.meshphysical_vert,fragmentShader:Je.meshphysical_frag},toon:{uniforms:yn([De.common,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.gradientmap,De.fog,De.lights,{emissive:{value:new dt(0)}}]),vertexShader:Je.meshtoon_vert,fragmentShader:Je.meshtoon_frag},matcap:{uniforms:yn([De.common,De.bumpmap,De.normalmap,De.displacementmap,De.fog,{matcap:{value:null}}]),vertexShader:Je.meshmatcap_vert,fragmentShader:Je.meshmatcap_frag},points:{uniforms:yn([De.points,De.fog]),vertexShader:Je.points_vert,fragmentShader:Je.points_frag},dashed:{uniforms:yn([De.common,De.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Je.linedashed_vert,fragmentShader:Je.linedashed_frag},depth:{uniforms:yn([De.common,De.displacementmap]),vertexShader:Je.depth_vert,fragmentShader:Je.depth_frag},normal:{uniforms:yn([De.common,De.bumpmap,De.normalmap,De.displacementmap,{opacity:{value:1}}]),vertexShader:Je.meshnormal_vert,fragmentShader:Je.meshnormal_frag},sprite:{uniforms:yn([De.sprite,De.fog]),vertexShader:Je.sprite_vert,fragmentShader:Je.sprite_frag},background:{uniforms:{uvTransform:{value:new Qe},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Je.background_vert,fragmentShader:Je.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Qe}},vertexShader:Je.backgroundCube_vert,fragmentShader:Je.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Je.cube_vert,fragmentShader:Je.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Je.equirect_vert,fragmentShader:Je.equirect_frag},distanceRGBA:{uniforms:yn([De.common,De.displacementmap,{referencePosition:{value:new se},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Je.distanceRGBA_vert,fragmentShader:Je.distanceRGBA_frag},shadow:{uniforms:yn([De.lights,De.fog,{color:{value:new dt(0)},opacity:{value:1}}]),vertexShader:Je.shadow_vert,fragmentShader:Je.shadow_frag}};Kr.physical={uniforms:yn([Kr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Qe},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Qe},clearcoatNormalScale:{value:new it(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Qe},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Qe},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Qe},sheen:{value:0},sheenColor:{value:new dt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Qe},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Qe},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Qe},transmissionSamplerSize:{value:new it},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Qe},attenuationDistance:{value:0},attenuationColor:{value:new dt(0)},specularColor:{value:new dt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Qe},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Qe},anisotropyVector:{value:new it},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Qe}}]),vertexShader:Je.meshphysical_vert,fragmentShader:Je.meshphysical_frag};const Xu={r:0,b:0,g:0},$s=new Oi,iF=new jt;function sF(t,e,n,r,i,s,o){const a=new dt(0);let l=s===!0?0:1,c,u,h=null,d=0,m=null;function v(x){let _=x.isScene===!0?x.background:null;return _&&_.isTexture&&(_=(x.backgroundBlurriness>0?n:e).get(_)),_}function p(x){let _=!1;const y=v(x);y===null?f(a,l):y&&y.isColor&&(f(y,1),_=!0);const T=t.xr.getEnvironmentBlendMode();T==="additive"?r.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,o),(t.autoClear||_)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function g(x,_){const y=v(_);y&&(y.isCubeTexture||y.mapping===Zf)?(u===void 0&&(u=new kr(new jc(1,1,1),new Ui({name:"BackgroundCubeMaterial",uniforms:el(Kr.backgroundCube.uniforms),vertexShader:Kr.backgroundCube.vertexShader,fragmentShader:Kr.backgroundCube.fragmentShader,side:Vn,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(T,M,S){this.matrixWorld.copyPosition(S.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),$s.copy(_.backgroundRotation),$s.x*=-1,$s.y*=-1,$s.z*=-1,y.isCubeTexture&&y.isRenderTargetTexture===!1&&($s.y*=-1,$s.z*=-1),u.material.uniforms.envMap.value=y,u.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=_.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(iF.makeRotationFromEuler($s)),u.material.toneMapped=at.getTransfer(y.colorSpace)!==xt,(h!==y||d!==y.version||m!==t.toneMapping)&&(u.material.needsUpdate=!0,h=y,d=y.version,m=t.toneMapping),u.layers.enableAll(),x.unshift(u,u.geometry,u.material,0,0,null)):y&&y.isTexture&&(c===void 0&&(c=new kr(new Xc(2,2),new Ui({name:"BackgroundMaterial",uniforms:el(Kr.background.uniforms),vertexShader:Kr.background.vertexShader,fragmentShader:Kr.background.fragmentShader,side:As,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=y,c.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,c.material.toneMapped=at.getTransfer(y.colorSpace)!==xt,y.matrixAutoUpdate===!0&&y.updateMatrix(),c.material.uniforms.uvTransform.value.copy(y.matrix),(h!==y||d!==y.version||m!==t.toneMapping)&&(c.material.needsUpdate=!0,h=y,d=y.version,m=t.toneMapping),c.layers.enableAll(),x.unshift(c,c.geometry,c.material,0,0,null))}function f(x,_){x.getRGB(Xu,u2(t)),r.buffers.color.setClear(Xu.r,Xu.g,Xu.b,_,o)}return{getClearColor:function(){return a},setClearColor:function(x,_=1){a.set(x),l=_,f(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,f(a,l)},render:p,addToRenderList:g}}function oF(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),r={},i=d(null);let s=i,o=!1;function a(w,R,z,H,B){let V=!1;const I=h(H,z,R);s!==I&&(s=I,c(s.object)),V=m(w,H,z,B),V&&v(w,H,z,B),B!==null&&e.update(B,t.ELEMENT_ARRAY_BUFFER),(V||o)&&(o=!1,y(w,R,z,H),B!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(B).buffer))}function l(){return t.createVertexArray()}function c(w){return t.bindVertexArray(w)}function u(w){return t.deleteVertexArray(w)}function h(w,R,z){const H=z.wireframe===!0;let B=r[w.id];B===void 0&&(B={},r[w.id]=B);let V=B[R.id];V===void 0&&(V={},B[R.id]=V);let I=V[H];return I===void 0&&(I=d(l()),V[H]=I),I}function d(w){const R=[],z=[],H=[];for(let B=0;B=0){const Y=B[A];let W=V[A];if(W===void 0&&(A==="instanceMatrix"&&w.instanceMatrix&&(W=w.instanceMatrix),A==="instanceColor"&&w.instanceColor&&(W=w.instanceColor)),Y===void 0||Y.attribute!==W||W&&Y.data!==W.data)return!0;I++}return s.attributesNum!==I||s.index!==H}function v(w,R,z,H){const B={},V=R.attributes;let I=0;const F=z.getAttributes();for(const A in F)if(F[A].location>=0){let Y=V[A];Y===void 0&&(A==="instanceMatrix"&&w.instanceMatrix&&(Y=w.instanceMatrix),A==="instanceColor"&&w.instanceColor&&(Y=w.instanceColor));const W={};W.attribute=Y,Y&&Y.data&&(W.data=Y.data),B[A]=W,I++}s.attributes=B,s.attributesNum=I,s.index=H}function p(){const w=s.newAttributes;for(let R=0,z=w.length;R<z;R++)w[R]=0}function g(w){f(w,0)}function f(w,R){const z=s.newAttributes,H=s.enabledAttributes,B=s.attributeDivisors;z[w]=1,H[w]===0&&(t.enableVertexAttribArray(w),H[w]=1),B[w]!==R&&(t.vertexAttribDivisor(w,R),B[w]=R)}function x(){const w=s.newAttributes,R=s.enabledAttributes;for(let z=0,H=R.length;z=0){let G=B[F];if(G===void 0&&(F==="instanceMatrix"&&w.instanceMatrix&&(G=w.instanceMatrix),F==="instanceColor"&&w.instanceColor&&(G=w.instanceColor)),G!==void 0){const Y=G.normalized,W=G.itemSize,J=e.get(G);if(J===void 0)continue;const me=J.buffer,$=J.type,Q=J.bytesPerElement,le=$===t.INT||$===t.UNSIGNED_INT||G.gpuType===YM;if(G.isInterleavedBufferAttribute){const he=G.data,Pe=he.stride,Le=G.offset;if(he.isInstancedInterleavedBuffer){for(let Me=0;Me<A.locationSize;Me++)f(A.location+Me,he.meshPerAttribute);w.isInstancedMesh!==!0&&H._maxInstanceCount===void 0&&(H._maxInstanceCount=he.meshPerAttribute*he.count)}else for(let Me=0;Me<A.locationSize;Me++)g(A.location+Me);t.bindBuffer(t.ARRAY_BUFFER,me);for(let Me=0;Me<A.locationSize;Me++)_(A.location+Me,W/A.locationSize,$,Y,Pe*Q,(Le+W/A.locationSize*Me)*Q,le)}else{if(G.isInstancedBufferAttribute){for(let he=0;he<A.locationSize;he++)f(A.location+he,G.meshPerAttribute);w.isInstancedMesh!==!0&&H._maxInstanceCount===void 0&&(H._maxInstanceCount=G.meshPerAttribute*G.count)}else for(let he=0;he<A.locationSize;he++)g(A.location+he);t.bindBuffer(t.ARRAY_BUFFER,me);for(let he=0;he<A.locationSize;he++)_(A.location+he,W/A.locationSize,$,Y,W*Q,W/A.locationSize*he*Q,le)}}else if(I!==void 0){const Y=I[F];if(Y!==void 0)switch(Y.length){case 2:t.vertexAttrib2fv(A.location,Y);break;case 3:t.vertexAttrib3fv(A.location,Y);break;case 4:t.vertexAttrib4fv(A.location,Y);break;default:t.vertexAttrib1fv(A.location,Y)}}}}x()}function T(){b();for(const w in r){const R=r[w];for(const z in R){const H=R[z];for(const B in H)u(H[B].object),delete H[B];delete R[z]}delete r[w]}}function M(w){if(r[w.id]===void 0)return;const R=r[w.id];for(const z in R){const H=R[z];for(const B in H)u(H[B].object),delete H[B];delete R[z]}delete r[w.id]}function S(w){for(const R in r){const z=r[R];if(z[w.id]===void 0)continue;const H=z[w.id];for(const B in H)u(H[B].object),delete H[B];delete z[w.id]}}function b(){E(),o=!0,s!==i&&(s=i,c(s.object))}function E(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:a,reset:b,resetDefaultState:E,dispose:T,releaseStatesOfGeometry:M,releaseStatesOfProgram:S,initAttributes:p,enableAttribute:g,disableUnusedAttributes:x}}function aF(t,e,n){let r;function i(c){r=c}function s(c,u){t.drawArrays(r,c,u),n.update(u,r,1)}function o(c,u,h){h!==0&&(t.drawArraysInstanced(r,c,u,h),n.update(u,r,h))}function a(c,u,h){if(h===0)return;const d=e.get("WEBGL_multi_draw");if(d===null)for(let m=0;m<h;m++)this.render(c[m],u[m]);else{d.multiDrawArraysWEBGL(r,c,0,u,0,h);let m=0;for(let v=0;v<h;v++)m+=u[v];n.update(m,r,1)}}function l(c,u,h,d){if(h===0)return;const m=e.get("WEBGL_multi_draw");if(m===null)for(let v=0;v<c.length;v++)o(c[v],u[v],d[v]);else{m.multiDrawArraysInstancedWEBGL(r,c,0,u,0,d,0,h);let v=0;for(let p=0;p<h;p++)v+=u[p];for(let p=0;p0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";M="mediump"}return M==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=n.precision!==void 0?n.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const h=n.logarithmicDepthBuffer===!0,d=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),m=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),v=t.getParameter(t.MAX_TEXTURE_SIZE),p=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),g=t.getParameter(t.MAX_VERTEX_ATTRIBS),f=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),x=t.getParameter(t.MAX_VARYING_VECTORS),_=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),y=m>0,T=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:h,maxTextures:d,maxVertexTextures:m,maxTextureSize:v,maxCubemapSize:p,maxAttributes:g,maxVertexUniforms:f,maxVaryings:x,maxFragmentUniforms:_,vertexTextures:y,maxSamples:T}}function cF(t){const e=this;let n=null,r=0,i=!1,s=!1;const o=new Zs,a=new Qe,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(h,d){const m=h.length!==0||d||r!==0||i;return i=d,r=h.length,m},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(h,d){n=u(h,d,0)},this.setState=function(h,d,m){const v=h.clippingPlanes,p=h.clipIntersection,g=h.clipShadows,f=t.get(h);if(!i||v===null||v.length===0||s&&!g)s?u(null):c();else{const x=s?0:r,_=x*4;let y=f.clippingState||null;l.value=y,y=u(v,d,_,m);for(let T=0;T!==_;++T)y[T]=n[T];f.clippingState=y,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=x}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(h,d,m,v){const p=h!==null?h.length:0;let g=null;if(p!==0){if(g=l.value,v!==!0||g===null){const f=m+p*4,x=d.matrixWorldInverse;a.getNormalMatrix(x),(g===null||g.length0){const c=new SU(l.height);return c.fromEquirectangularTexture(t,o),e.set(o,c),o.addEventListener("dispose",i),n(c.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:r,dispose:s}}class m2 extends d2{constructor(e=-1,n=1,r=1,i=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,r,i,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let s=r-e,o=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const xa=4,Gy=[.125,.215,.35,.446,.526,.582],eo=20,Np=new m2,Wy=new dt;let Lp=null,Ip=0,Op=0,Up=!1;const Js=(1+Math.sqrt(5))/2,na=1/Js,$y=[new se(-Js,na,0),new se(Js,na,0),new se(-na,0,Js),new se(na,0,Js),new se(0,Js,-na),new se(0,Js,na),new se(-1,1,-1),new se(1,1,-1),new se(-1,1,1),new se(1,1,1)];class jy{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,r=.1,i=100){Lp=this._renderer.getRenderTarget(),Ip=this._renderer.getActiveCubeFace(),Op=this._renderer.getActiveMipmapLevel(),Up=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,r,i,s),n>0&&this._blur(s,0,0,n),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=qy(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Yy(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(Lp,Ip,Op),this._renderer.xr.enabled=Up,e.scissorTest=!1,Yu(e,0,0,e.width,e.height)}_fromTexture(e,n){e.mapping===qa||e.mapping===Ka?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Lp=this._renderer.getRenderTarget(),Ip=this._renderer.getActiveCubeFace(),Op=this._renderer.getActiveMipmapLevel(),Up=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const r=n||this._allocateTargets();return this._textureToCubeUV(e,r),this._applyPMREM(r),this._cleanup(r),r}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),n=4*this._cubeSize,r={magFilter:Ur,minFilter:Ur,generateMipmaps:!1,type:Jf,format:ii,colorSpace:Us,depthBuffer:!1},i=Xy(e,n,r);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==n){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=Xy(e,n,r);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=dF(s)),this._blurMaterial=fF(s,e,n)}return i}_compileMaterial(e){const n=new kr(this._lodPlanes[0],e);this._renderer.compile(n,Np)}_sceneToCubeUV(e,n,r,i){const a=new Ir(90,1,n,r),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],u=this._renderer,h=u.autoClear,d=u.toneMapping;u.getClearColor(Wy),u.toneMapping=bs,u.autoClear=!1;const m=new a2({name:"PMREM.Background",side:Vn,depthWrite:!1,depthTest:!1}),v=new kr(new jc,m);let p=!1;const g=e.background;g?g.isColor&&(m.color.copy(g),e.background=null,p=!0):(m.color.copy(Wy),p=!0);for(let f=0;f2?_:0,_,_),u.setRenderTarget(i),p&&u.render(v,a),u.render(e,a)}v.geometry.dispose(),v.material.dispose(),u.toneMapping=d,u.autoClear=h,e.background=g}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===qa||e.mapping===Ka;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=qy()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Yy());const s=i?this._cubemapMaterial:this._equirectMaterial,o=new kr(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;Yu(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(o,Np)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;const i=this._lodPlanes.length;for(let s=1;seo&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${g} samples when the maximum is set to ${eo}`);const f=[];let x=0;for(let S=0;S<eo;++S){const b=S/p,E=Math.exp(-b*b/2);f.push(E),S===0?x+=E:S<g&&(x+=2*E)}for(let S=0;S_-xa?i-_+xa:0),M=4*(this._cubeSize-y);Yu(n,T,M,3*y,2*y),l.setRenderTarget(n),l.render(h,Np)}}function dF(t){const e=[],n=[],r=[];let i=t;const s=t-xa+1+Gy.length;for(let o=0;ot-xa?l=Gy[o-t+xa-1]:o===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,h=1+c,d=[u,u,h,u,h,h,u,u,h,h,u,h],m=6,v=6,p=3,g=2,f=1,x=new Float32Array(p*v*m),_=new Float32Array(g*v*m),y=new Float32Array(f*v*m);for(let M=0;M2?0:-1,E=[S,b,0,S+2/3,b,0,S+2/3,b+1,0,S,b,0,S+2/3,b+1,0,S,b+1,0];x.set(E,p*v*M),_.set(d,g*v*M);const w=[M,M,M,M,M,M];y.set(w,f*v*M)}const T=new Lo;T.setAttribute("position",new li(x,p)),T.setAttribute("uv",new li(_,g)),T.setAttribute("faceIndex",new li(y,f)),e.push(T),i>xa&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function Xy(t,e,n){const r=new Ro(t,e,n);return r.texture.mapping=Zf,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Yu(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function fF(t,e,n){const r=new Float32Array(eo),i=new se(0,1,0);return new Ui({name:"SphericalGaussianBlur",defines:{n:eo,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:Sv(),fragmentShader:` precision mediump float; precision mediump int; varying vec3 vOutputDirection; uniform sampler2D envMap; uniform int samples; uniform float weights[ n ]; uniform bool latitudinal; uniform float dTheta; uniform float mipInt; uniform vec3 poleAxis; #define ENVMAP_TYPE_CUBE_UV #include vec3 getSample( float theta, vec3 axis ) { float cosTheta = cos( theta ); // Rodrigues' axis-angle rotation vec3 sampleDirection = vOutputDirection * cosTheta + cross( axis, vOutputDirection ) * sin( theta ) + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); return bilinearCubeUV( envMap, sampleDirection, mipInt ); } void main() { vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); if ( all( equal( axis, vec3( 0.0 ) ) ) ) { axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); } axis = normalize( axis ); gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); for ( int i = 1; i = samples ) { break; } float theta = dTheta * float( i ); gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); } } `,blending:ws,depthTest:!1,depthWrite:!1})}function Yy(){return new Ui({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Sv(),fragmentShader:` precision mediump float; precision mediump int; varying vec3 vOutputDirection; uniform sampler2D envMap; #include void main() { vec3 outputDirection = normalize( vOutputDirection ); vec2 uv = equirectUv( outputDirection ); gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } `,blending:ws,depthTest:!1,depthWrite:!1})}function qy(){return new Ui({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Sv(),fragmentShader:` precision mediump float; precision mediump int; uniform float flipEnvMap; varying vec3 vOutputDirection; uniform samplerCube envMap; void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } `,blending:ws,depthTest:!1,depthWrite:!1})}function Sv(){return` precision mediump float; precision mediump int; attribute float faceIndex; varying vec3 vOutputDirection; // RH coordinate system; PMREM face-indexing convention vec3 getDirection( vec2 uv, float face ) { uv = 2.0 * uv - 1.0; vec3 direction = vec3( uv, 1.0 ); if ( face == 0.0 ) { direction = direction.zyx; // ( 1, v, u ) pos x } else if ( face == 1.0 ) { direction = direction.xzy; direction.xz *= -1.0; // ( -u, 1, -v ) pos y } else if ( face == 2.0 ) { direction.x *= -1.0; // ( -u, v, 1 ) pos z } else if ( face == 3.0 ) { direction = direction.zyx; direction.xz *= -1.0; // ( -1, v, -u ) neg x } else if ( face == 4.0 ) { direction = direction.xzy; direction.xy *= -1.0; // ( -u, -1, v ) neg y } else if ( face == 5.0 ) { direction.z *= -1.0; // ( u, v, -1 ) neg z } return direction; } void main() { vOutputDirection = getDirection( uv, faceIndex ); gl_Position = vec4( position, 1.0 ); } `}function hF(t){let e=new WeakMap,n=null;function r(a){if(a&&a.isTexture){const l=a.mapping,c=l===b0||l===E0,u=l===qa||l===Ka;if(c||u){let h=e.get(a);const d=h!==void 0?h.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==d)return n===null&&(n=new jy(t)),h=c?n.fromEquirectangular(a,h):n.fromCubemap(a,h),h.texture.pmremVersion=a.pmremVersion,e.set(a,h),h.texture;if(h!==void 0)return h.texture;{const m=a.image;return c&&m&&m.height>0||u&&m&&i(m)?(n===null&&(n=new jy(t)),h=c?n.fromEquirectangular(a):n.fromCubemap(a),h.texture.pmremVersion=a.pmremVersion,e.set(a,h),a.addEventListener("dispose",s),h.texture):null}}}return a}function i(a){let l=0;const c=6;for(let u=0;u<c;u++)a[u]!==void 0&&l++;return l===c}function s(a){const l=a.target;l.removeEventListener("dispose",s);const c=e.get(l);c!==void 0&&(e.delete(l),c.dispose())}function o(){e=new WeakMap,n!==null&&(n.dispose(),n=null)}return{get:r,dispose:o}}function pF(t){const e={};function n(r){if(e[r]!==void 0)return e[r];let i;switch(r){case"WEBGL_depth_texture":i=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=t.getExtension(r)}return e[r]=i,i}return{has:function(r){return n(r)!==null},init:function(){n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance"),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture"),n("WEBGL_render_shared_exponent")},get:function(r){const i=n(r);return i===null&&n2("THREE.WebGLRenderer: "+r+" extension not supported."),i}}}function mF(t,e,n,r){const i={},s=new WeakMap;function o(h){const d=h.target;d.index!==null&&e.remove(d.index);for(const v in d.attributes)e.remove(d.attributes[v]);for(const v in d.morphAttributes){const p=d.morphAttributes[v];for(let g=0,f=p.length;g<f;g++)e.remove(p[g])}d.removeEventListener("dispose",o),delete i[d.id];const m=s.get(d);m&&(e.remove(m),s.delete(d)),r.releaseStatesOfGeometry(d),d.isInstancedBufferGeometry===!0&&delete d._maxInstanceCount,n.memory.geometries--}function a(h,d){return i[d.id]===!0||(d.addEventListener("dispose",o),i[d.id]=!0,n.memory.geometries++),d}function l(h){const d=h.attributes;for(const v in d)e.update(d[v],t.ARRAY_BUFFER);const m=h.morphAttributes;for(const v in m){const p=m[v];for(let g=0,f=p.length;g<f;g++)e.update(p[g],t.ARRAY_BUFFER)}}function c(h){const d=[],m=h.index,v=h.attributes.position;let p=0;if(m!==null){const x=m.array;p=m.version;for(let _=0,y=x.length;_<y;_+=3){const T=x[_+0],M=x[_+1],S=x[_+2];d.push(T,M,M,S,S,T)}}else if(v!==void 0){const x=v.array;p=v.version;for(let _=0,y=x.length/3-1;_<y;_+=3){const T=_+0,M=_+1,S=_+2;d.push(T,M,M,S,S,T)}}else return;const g=new(t2(d)?c2:l2)(d,1);g.version=p;const f=s.get(h);f&&e.remove(f),s.set(h,g)}function u(h){const d=s.get(h);if(d){const m=h.index;m!==null&&d.version<m.version&&c(h)}else c(h);return s.get(h)}return{get:a,update:l,getWireframeAttribute:u}}function gF(t,e,n){let r;function i(d){r=d}let s,o;function a(d){s=d.type,o=d.bytesPerElement}function l(d,m){t.drawElements(r,m,s,d*o),n.update(m,r,1)}function c(d,m,v){v!==0&&(t.drawElementsInstanced(r,m,s,d*o,v),n.update(m,r,v))}function u(d,m,v){if(v===0)return;const p=e.get("WEBGL_multi_draw");if(p===null)for(let g=0;g<v;g++)this.render(d[g]/o,m[g]);else{p.multiDrawElementsWEBGL(r,m,0,s,d,0,v);let g=0;for(let f=0;f<v;f++)g+=m[f];n.update(g,r,1)}}function h(d,m,v,p){if(v===0)return;const g=e.get("WEBGL_multi_draw");if(g===null)for(let f=0;f<d.length;f++)c(d[f]/o,m[f],p[f]);else{g.multiDrawElementsInstancedWEBGL(r,m,0,s,d,0,p,0,v);let f=0;for(let x=0;x<v;x++)f+=m[x];for(let x=0;x

e.maxTextureSize&&(M=Math.ceil(T/e.maxTextureSize),T=e.maxTextureSize);const S=new Float32Array(T*M*4*h),b=new i2(S,T,M,h);b.type=us,b.needsUpdate=!0;const E=y*4;for(let R=0;R<h;R++){const z=f[R],H=x[R],B=_[R],V=T*M*4*R;for(let I=0;I<z.count;I++){const F=I*E;v===!0&&(i.fromBufferAttribute(z,I),S[V+F+0]=i.x,S[V+F+1]=i.y,S[V+F+2]=i.z,S[V+F+3]=0),p===!0&&(i.fromBufferAttribute(H,I),S[V+F+4]=i.x,S[V+F+5]=i.y,S[V+F+6]=i.z,S[V+F+7]=0),g===!0&&(i.fromBufferAttribute(B,I),S[V+F+8]=i.x,S[V+F+9]=i.y,S[V+F+10]=i.z,S[V+F+11]=B.itemSize===4?i.w:1)}}d={count:h,texture:b,size:new it(T,M)},r.set(a,d),a.addEventListener("dispose",w)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(t,"morphTexture",o.morphTexture,n);else{let v=0;for(let g=0;g<c.length;g++)v+=c[g];const p=a.morphTargetsRelative?1:1-v;l.getUniforms().setValue(t,"morphTargetBaseInfluence",p),l.getUniforms().setValue(t,"morphTargetInfluences",c)}l.getUniforms().setValue(t,"morphTargetsTexture",d.texture,n),l.getUniforms().setValue(t,"morphTargetsTextureSize",d.size)}return{update:s}}function xF(t,e,n,r){let i=new WeakMap;function s(l){const c=r.render.frame,u=l.geometry,h=e.get(l,u);if(i.get(h)!==c&&(e.update(h),i.set(h,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),i.get(l)!==c&&(n.update(l.instanceMatrix,t.ARRAY_BUFFER),l.instanceColor!==null&&n.update(l.instanceColor,t.ARRAY_BUFFER),i.set(l,c))),l.isSkinnedMesh){const d=l.skeleton;i.get(d)!==c&&(d.update(),i.set(d,c))}return h}function o(){i=new WeakMap}function a(l){const c=l.target;c.removeEventListener("dispose",a),n.remove(c.instanceMatrix),c.instanceColor!==null&&n.remove(c.instanceColor)}return{update:s,dispose:o}}class g2 extends Hn{constructor(e,n,r,i,s,o,a,l,c,u=La){if(u!==La&&u!==Qa)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");r===void 0&&u===La&&(r=Za),r===void 0&&u===Qa&&(r=Ja),super(null,i,s,o,a,l,u,r,c),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=a!==void 0?a:_r,this.minFilter=l!==void 0?l:_r,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}const v2=new Hn,_2=new g2(1,1);_2.compareFunction=e2;const x2=new i2,y2=new iU,S2=new f2,Ky=[],Zy=[],Jy=new Float32Array(16),Qy=new Float32Array(9),e1=new Float32Array(4);function fl(t,e,n){const r=t[0];if(r0)return t;const i=e*n;let s=Ky[i];if(s===void 0&&(s=new Float32Array(i),Ky[i]=s),e!==0){r.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(s,a)}return s}function Xt(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}function Yt(t,e){for(let n=0,r=e.length;n<r;n++)t[n]=e[n]}function th(t,e){let n=Zy[e];n===void 0&&(n=new Int32Array(e),Zy[e]=n);for(let r=0;r!==e;++r)n[r]=t.allocateTextureUnit();return n}function yF(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function SF(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Xt(n,e))return;t.uniform2fv(this.addr,e),Yt(n,e)}}function wF(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(e.r!==void 0)(n[0]!==e.r||n[1]!==e.g||n[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(Xt(n,e))return;t.uniform3fv(this.addr,e),Yt(n,e)}}function bF(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Xt(n,e))return;t.uniform4fv(this.addr,e),Yt(n,e)}}function EF(t,e){const n=this.cache,r=e.elements;if(r===void 0){if(Xt(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),Yt(n,e)}else{if(Xt(n,r))return;e1.set(r),t.uniformMatrix2fv(this.addr,!1,e1),Yt(n,r)}}function MF(t,e){const n=this.cache,r=e.elements;if(r===void 0){if(Xt(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),Yt(n,e)}else{if(Xt(n,r))return;Qy.set(r),t.uniformMatrix3fv(this.addr,!1,Qy),Yt(n,r)}}function TF(t,e){const n=this.cache,r=e.elements;if(r===void 0){if(Xt(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),Yt(n,e)}else{if(Xt(n,r))return;Jy.set(r),t.uniformMatrix4fv(this.addr,!1,Jy),Yt(n,r)}}function CF(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function AF(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2i(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Xt(n,e))return;t.uniform2iv(this.addr,e),Yt(n,e)}}function RF(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3i(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(Xt(n,e))return;t.uniform3iv(this.addr,e),Yt(n,e)}}function PF(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4i(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Xt(n,e))return;t.uniform4iv(this.addr,e),Yt(n,e)}}function DF(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function NF(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2ui(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Xt(n,e))return;t.uniform2uiv(this.addr,e),Yt(n,e)}}function LF(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3ui(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(Xt(n,e))return;t.uniform3uiv(this.addr,e),Yt(n,e)}}function IF(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4ui(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Xt(n,e))return;t.uniform4uiv(this.addr,e),Yt(n,e)}}function OF(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i);const s=this.type===t.SAMPLER_2D_SHADOW?_2:v2;n.setTexture2D(e||s,i)}function UF(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(e||y2,i)}function kF(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(e||S2,i)}function FF(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(e||x2,i)}function zF(t){switch(t){case 5126:return yF;case 35664:return SF;case 35665:return wF;case 35666:return bF;case 35674:return EF;case 35675:return MF;case 35676:return TF;case 5124:case 35670:return CF;case 35667:case 35671:return AF;case 35668:case 35672:return RF;case 35669:case 35673:return PF;case 5125:return DF;case 36294:return NF;case 36295:return LF;case 36296:return IF;case 35678:case 36198:case 36298:case 36306:case 35682:return OF;case 35679:case 36299:case 36307:return UF;case 35680:case 36300:case 36308:case 36293:return kF;case 36289:case 36303:case 36311:case 36292:return FF}}function BF(t,e){t.uniform1fv(this.addr,e)}function VF(t,e){const n=fl(e,this.size,2);t.uniform2fv(this.addr,n)}function HF(t,e){const n=fl(e,this.size,3);t.uniform3fv(this.addr,n)}function GF(t,e){const n=fl(e,this.size,4);t.uniform4fv(this.addr,n)}function WF(t,e){const n=fl(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function $F(t,e){const n=fl(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function jF(t,e){const n=fl(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function XF(t,e){t.uniform1iv(this.addr,e)}function YF(t,e){t.uniform2iv(this.addr,e)}function qF(t,e){t.uniform3iv(this.addr,e)}function KF(t,e){t.uniform4iv(this.addr,e)}function ZF(t,e){t.uniform1uiv(this.addr,e)}function JF(t,e){t.uniform2uiv(this.addr,e)}function QF(t,e){t.uniform3uiv(this.addr,e)}function e6(t,e){t.uniform4uiv(this.addr,e)}function t6(t,e,n){const r=this.cache,i=e.length,s=th(n,i);Xt(r,s)||(t.uniform1iv(this.addr,s),Yt(r,s));for(let o=0;o!==i;++o)n.setTexture2D(e[o]||v2,s[o])}function n6(t,e,n){const r=this.cache,i=e.length,s=th(n,i);Xt(r,s)||(t.uniform1iv(this.addr,s),Yt(r,s));for(let o=0;o!==i;++o)n.setTexture3D(e[o]||y2,s[o])}function r6(t,e,n){const r=this.cache,i=e.length,s=th(n,i);Xt(r,s)||(t.uniform1iv(this.addr,s),Yt(r,s));for(let o=0;o!==i;++o)n.setTextureCube(e[o]||S2,s[o])}function i6(t,e,n){const r=this.cache,i=e.length,s=th(n,i);Xt(r,s)||(t.uniform1iv(this.addr,s),Yt(r,s));for(let o=0;o!==i;++o)n.setTexture2DArray(e[o]||x2,s[o])}function s6(t){switch(t){case 5126:return BF;case 35664:return VF;case 35665:return HF;case 35666:return GF;case 35674:return WF;case 35675:return $F;case 35676:return jF;case 5124:case 35670:return XF;case 35667:case 35671:return YF;case 35668:case 35672:return qF;case 35669:case 35673:return KF;case 5125:return ZF;case 36294:return JF;case 36295:return QF;case 36296:return e6;case 35678:case 36198:case 36298:case 36306:case 35682:return t6;case 35679:case 36299:case 36307:return n6;case 35680:case 36300:case 36308:case 36293:return r6;case 36289:case 36303:case 36311:case 36292:return i6}}class o6{constructor(e,n,r){this.id=e,this.addr=r,this.cache=[],this.type=n.type,this.setValue=zF(n.type)}}class a6{constructor(e,n,r){this.id=e,this.addr=r,this.cache=[],this.type=n.type,this.size=n.size,this.setValue=s6(n.type)}}class l6{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,n,r){const i=this.seq;for(let s=0,o=i.length;s!==o;++s){const a=i[s];a.setValue(e,n[a.id],r)}}}const kp=/(\w+)(\])?(\[|\.)?/g;function t1(t,e){t.seq.push(e),t.map[e.id]=e}function c6(t,e,n){const r=t.name,i=r.length;for(kp.lastIndex=0;;){const s=kp.exec(r),o=kp.lastIndex;let a=s[1];const l=s[2]==="]",c=s[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===i){t1(n,c===void 0?new o6(a,t,e):new a6(a,t,e));break}else{let h=n.map[a];h===void 0&&(h=new l6(a),t1(n,h)),n=h}}}class vd{constructor(e,n){this.seq=[],this.map={};const r=e.getProgramParameter(n,e.ACTIVE_UNIFORMS);for(let i=0;i<r;++i){const s=e.getActiveUniform(n,i),o=e.getUniformLocation(n,s.name);c6(s,o,this)}}setValue(e,n,r,i){const s=this.map[n];s!==void 0&&s.setValue(e,r,i)}setOptional(e,n,r){const i=n[r];i!==void 0&&this.setValue(e,r,i)}static upload(e,n,r,i){for(let s=0,o=n.length;s!==o;++s){const a=n[s],l=r[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,i)}}static seqWithValue(e,n){const r=[];for(let i=0,s=e.length;i!==s;++i){const o=e[i];o.id in n&&r.push(o)}return r}}function n1(t,e,n){const r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),r}const u6=37297;let d6=0;function f6(t,e){const n=t.split(` `),r=[],i=Math.max(e-6,0),s=Math.min(e+6,n.length);for(let o=i;o":" "} ${a}: ${n[o]}`)}return r.join(` `)}function h6(t){const e=at.getPrimaries(at.workingColorSpace),n=at.getPrimaries(t);let r;switch(e===n?r="":e===cf&&n===lf?r="LinearDisplayP3ToLinearSRGB":e===lf&&n===cf&&(r="LinearSRGBToLinearDisplayP3"),t){case Us:case Qf:return[r,"LinearTransferOETF"];case qr:case xv:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[r,"LinearTransferOETF"]}}function r1(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const s=/ERROR: 0:(\d+)/.exec(i);if(s){const o=parseInt(s[1]);return n.toUpperCase()+` `+i+` `+f6(t.getShaderSource(e),o)}else return i}function p6(t,e){const n=h6(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function m6(t,e){let n;switch(e){case SO:n="Linear";break;case wO:n="Reinhard";break;case bO:n="OptimizedCineon";break;case EO:n="ACESFilmic";break;case TO:n="AgX";break;case CO:n="Neutral";break;case MO:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function g6(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Fl).join(` `)}function v6(t){const e=[];for(const n in t){const r=t[n];r!==!1&&e.push("#define "+n+" "+r)}return e.join(` `)}function _6(t,e){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i<r;i++){const s=t.getActiveAttrib(e,i),o=s.name;let a=1;s.type===t.FLOAT_MAT2&&(a=2),s.type===t.FLOAT_MAT3&&(a=3),s.type===t.FLOAT_MAT4&&(a=4),n[o]={type:s.type,location:t.getAttribLocation(e,o),locationSize:a}}return n}function Fl(t){return t!==""}function i1(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function s1(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const x6=/^[ \t]*#include +/gm;function A0(t){return t.replace(x6,S6)}const y6=new Map;function S6(t,e){let n=Je[e];if(n===void 0){const r=y6.get(e);if(r!==void 0)n=Je[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include ")}return A0(n)}const w6=/#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 o1(t){return t.replace(w6,b6)}function b6(t,e,n,r){let i="";for(let s=parseInt(e);s0&&(g+=` `),f=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(Fl).join(` `),f.length>0&&(f+=` `)):(g=[a1(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(Fl).join(` `),f=[a1(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+h:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==bs?"#define TONE_MAPPING":"",n.toneMapping!==bs?Je.tonemapping_pars_fragment:"",n.toneMapping!==bs?m6("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Je.colorspace_pars_fragment,p6("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` `].filter(Fl).join(` `)),o=A0(o),o=i1(o,n),o=s1(o,n),a=A0(a),a=i1(a,n),a=s1(a,n),o=o1(o),a=o1(a),n.isRawShaderMaterial!==!0&&(x=`#version 300 es `,g=[m,"#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` `+g,f=["#define varying in",n.glslVersion===by?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===by?"":"#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(` `)+` `+f);const _=x+g+o,y=x+f+a,T=n1(i,i.VERTEX_SHADER,_),M=n1(i,i.FRAGMENT_SHADER,y);i.attachShader(p,T),i.attachShader(p,M),n.index0AttributeName!==void 0?i.bindAttribLocation(p,0,n.index0AttributeName):n.morphTargets===!0&&i.bindAttribLocation(p,0,"position"),i.linkProgram(p);function S(R){if(t.debug.checkShaderErrors){const z=i.getProgramInfoLog(p).trim(),H=i.getShaderInfoLog(T).trim(),B=i.getShaderInfoLog(M).trim();let V=!0,I=!0;if(i.getProgramParameter(p,i.LINK_STATUS)===!1)if(V=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(i,p,T,M);else{const F=r1(i,T,"vertex"),A=r1(i,M,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(p,i.VALIDATE_STATUS)+` Material Name: `+R.name+` Material Type: `+R.type+` Program Info Log: `+z+` `+F+` `+A)}else z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",z):(H===""||B==="")&&(I=!1);I&&(R.diagnostics={runnable:V,programLog:z,vertexShader:{log:H,prefix:g},fragmentShader:{log:B,prefix:f}})}i.deleteShader(T),i.deleteShader(M),b=new vd(i,p),E=_6(i,p)}let b;this.getUniforms=function(){return b===void 0&&S(this),b};let E;this.getAttributes=function(){return E===void 0&&S(this),E};let w=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return w===!1&&(w=i.getProgramParameter(p,u6)),w},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(p),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=d6++,this.cacheKey=e,this.usedTimes=1,this.program=p,this.vertexShader=T,this.fragmentShader=M,this}let P6=0;class D6{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),s=this._getShaderStage(r),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new N6(e),n.set(e,r)),r}}class N6{constructor(e){this.id=P6++,this.code=e,this.usedTimes=0}}function L6(t,e,n,r,i,s,o){const a=new s2,l=new D6,c=new Set,u=[],h=i.logarithmicDepthBuffer,d=i.vertexTextures;let m=i.precision;const v={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function p(E){return c.add(E),E===0?"uv":`uv${E}`}function g(E,w,R,z,H){const B=z.fog,V=H.geometry,I=E.isMeshStandardMaterial?z.environment:null,F=(E.isMeshStandardMaterial?n:e).get(E.envMap||I),A=F&&F.mapping===Zf?F.image.height:null,G=v[E.type];E.precision!==null&&(m=i.getMaxPrecision(E.precision),m!==E.precision&&console.warn("THREE.WebGLProgram.getParameters:",E.precision,"not supported, using",m,"instead."));const Y=V.morphAttributes.position||V.morphAttributes.normal||V.morphAttributes.color,W=Y!==void 0?Y.length:0;let J=0;V.morphAttributes.position!==void 0&&(J=1),V.morphAttributes.normal!==void 0&&(J=2),V.morphAttributes.color!==void 0&&(J=3);let me,$,Q,le;if(G){const ct=Kr[G];me=ct.vertexShader,$=ct.fragmentShader}else me=E.vertexShader,$=E.fragmentShader,l.update(E),Q=l.getVertexShaderID(E),le=l.getFragmentShaderID(E);const he=t.getRenderTarget(),Pe=H.isInstancedMesh===!0,Le=H.isBatchedMesh===!0,Me=!!E.map,O=!!E.matcap,U=!!F,j=!!E.aoMap,ce=!!E.lightMap,ie=!!E.bumpMap,Ee=!!E.normalMap,Ae=!!E.displacementMap,pe=!!E.emissiveMap,Se=!!E.metalnessMap,N=!!E.roughnessMap,C=E.anisotropy>0,Z=E.clearcoat>0,ue=E.dispersion>0,re=E.iridescence>0,q=E.sheen>0,_e=E.transmission>0,oe=C&&!!E.anisotropyMap,de=Z&&!!E.clearcoatMap,ze=Z&&!!E.clearcoatNormalMap,ve=Z&&!!E.clearcoatRoughnessMap,ye=re&&!!E.iridescenceMap,Te=re&&!!E.iridescenceThicknessMap,Fe=q&&!!E.sheenColorMap,Re=q&&!!E.sheenRoughnessMap,We=!!E.specularMap,$e=!!E.specularColorMap,gt=!!E.specularIntensityMap,k=_e&&!!E.transmissionMap,xe=_e&&!!E.thicknessMap,te=!!E.gradientMap,fe=!!E.alphaMap,we=E.alphaTest>0,He=!!E.alphaHash,nt=!!E.extensions;let Ot=bs;E.toneMapped&&(he===null||he.isXRRenderTarget===!0)&&(Ot=t.toneMapping);const qt={shaderID:G,shaderType:E.type,shaderName:E.name,vertexShader:me,fragmentShader:$,defines:E.defines,customVertexShaderID:Q,customFragmentShaderID:le,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:m,batching:Le,batchingColor:Le&&H._colorsTexture!==null,instancing:Pe,instancingColor:Pe&&H.instanceColor!==null,instancingMorph:Pe&&H.morphTexture!==null,supportsVertexTextures:d,outputColorSpace:he===null?t.outputColorSpace:he.isXRRenderTarget===!0?he.texture.colorSpace:Us,alphaToCoverage:!!E.alphaToCoverage,map:Me,matcap:O,envMap:U,envMapMode:U&&F.mapping,envMapCubeUVHeight:A,aoMap:j,lightMap:ce,bumpMap:ie,normalMap:Ee,displacementMap:d&&Ae,emissiveMap:pe,normalMapObjectSpace:Ee&&E.normalMapType===HO,normalMapTangentSpace:Ee&&E.normalMapType===VO,metalnessMap:Se,roughnessMap:N,anisotropy:C,anisotropyMap:oe,clearcoat:Z,clearcoatMap:de,clearcoatNormalMap:ze,clearcoatRoughnessMap:ve,dispersion:ue,iridescence:re,iridescenceMap:ye,iridescenceThicknessMap:Te,sheen:q,sheenColorMap:Fe,sheenRoughnessMap:Re,specularMap:We,specularColorMap:$e,specularIntensityMap:gt,transmission:_e,transmissionMap:k,thicknessMap:xe,gradientMap:te,opaque:E.transparent===!1&&E.blending===Na&&E.alphaToCoverage===!1,alphaMap:fe,alphaTest:we,alphaHash:He,combine:E.combine,mapUv:Me&&p(E.map.channel),aoMapUv:j&&p(E.aoMap.channel),lightMapUv:ce&&p(E.lightMap.channel),bumpMapUv:ie&&p(E.bumpMap.channel),normalMapUv:Ee&&p(E.normalMap.channel),displacementMapUv:Ae&&p(E.displacementMap.channel),emissiveMapUv:pe&&p(E.emissiveMap.channel),metalnessMapUv:Se&&p(E.metalnessMap.channel),roughnessMapUv:N&&p(E.roughnessMap.channel),anisotropyMapUv:oe&&p(E.anisotropyMap.channel),clearcoatMapUv:de&&p(E.clearcoatMap.channel),clearcoatNormalMapUv:ze&&p(E.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ve&&p(E.clearcoatRoughnessMap.channel),iridescenceMapUv:ye&&p(E.iridescenceMap.channel),iridescenceThicknessMapUv:Te&&p(E.iridescenceThicknessMap.channel),sheenColorMapUv:Fe&&p(E.sheenColorMap.channel),sheenRoughnessMapUv:Re&&p(E.sheenRoughnessMap.channel),specularMapUv:We&&p(E.specularMap.channel),specularColorMapUv:$e&&p(E.specularColorMap.channel),specularIntensityMapUv:gt&&p(E.specularIntensityMap.channel),transmissionMapUv:k&&p(E.transmissionMap.channel),thicknessMapUv:xe&&p(E.thicknessMap.channel),alphaMapUv:fe&&p(E.alphaMap.channel),vertexTangents:!!V.attributes.tangent&&(Ee||C),vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!V.attributes.color&&V.attributes.color.itemSize===4,pointsUvs:H.isPoints===!0&&!!V.attributes.uv&&(Me||fe),fog:!!B,useFog:E.fog===!0,fogExp2:!!B&&B.isFogExp2,flatShading:E.flatShading===!0,sizeAttenuation:E.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:H.isSkinnedMesh===!0,morphTargets:V.morphAttributes.position!==void 0,morphNormals:V.morphAttributes.normal!==void 0,morphColors:V.morphAttributes.color!==void 0,morphTargetsCount:W,morphTextureStride:J,numDirLights:w.directional.length,numPointLights:w.point.length,numSpotLights:w.spot.length,numSpotLightMaps:w.spotLightMap.length,numRectAreaLights:w.rectArea.length,numHemiLights:w.hemi.length,numDirLightShadows:w.directionalShadowMap.length,numPointLightShadows:w.pointShadowMap.length,numSpotLightShadows:w.spotShadowMap.length,numSpotLightShadowsWithMaps:w.numSpotLightShadowsWithMaps,numLightProbes:w.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:E.dithering,shadowMapEnabled:t.shadowMap.enabled&&R.length>0,shadowMapType:t.shadowMap.type,toneMapping:Ot,decodeVideoTexture:Me&&E.map.isVideoTexture===!0&&at.getTransfer(E.map.colorSpace)===xt,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===bi,flipSided:E.side===Vn,useDepthPacking:E.depthPacking>=0,depthPacking:E.depthPacking||0,index0AttributeName:E.index0AttributeName,extensionClipCullDistance:nt&&E.extensions.clipCullDistance===!0&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:nt&&E.extensions.multiDraw===!0&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:E.customProgramCacheKey()};return qt.vertexUv1s=c.has(1),qt.vertexUv2s=c.has(2),qt.vertexUv3s=c.has(3),c.clear(),qt}function f(E){const w=[];if(E.shaderID?w.push(E.shaderID):(w.push(E.customVertexShaderID),w.push(E.customFragmentShaderID)),E.defines!==void 0)for(const R in E.defines)w.push(R),w.push(E.defines[R]);return E.isRawShaderMaterial===!1&&(x(w,E),_(w,E),w.push(t.outputColorSpace)),w.push(E.customProgramCacheKey),w.join()}function x(E,w){E.push(w.precision),E.push(w.outputColorSpace),E.push(w.envMapMode),E.push(w.envMapCubeUVHeight),E.push(w.mapUv),E.push(w.alphaMapUv),E.push(w.lightMapUv),E.push(w.aoMapUv),E.push(w.bumpMapUv),E.push(w.normalMapUv),E.push(w.displacementMapUv),E.push(w.emissiveMapUv),E.push(w.metalnessMapUv),E.push(w.roughnessMapUv),E.push(w.anisotropyMapUv),E.push(w.clearcoatMapUv),E.push(w.clearcoatNormalMapUv),E.push(w.clearcoatRoughnessMapUv),E.push(w.iridescenceMapUv),E.push(w.iridescenceThicknessMapUv),E.push(w.sheenColorMapUv),E.push(w.sheenRoughnessMapUv),E.push(w.specularMapUv),E.push(w.specularColorMapUv),E.push(w.specularIntensityMapUv),E.push(w.transmissionMapUv),E.push(w.thicknessMapUv),E.push(w.combine),E.push(w.fogExp2),E.push(w.sizeAttenuation),E.push(w.morphTargetsCount),E.push(w.morphAttributeCount),E.push(w.numDirLights),E.push(w.numPointLights),E.push(w.numSpotLights),E.push(w.numSpotLightMaps),E.push(w.numHemiLights),E.push(w.numRectAreaLights),E.push(w.numDirLightShadows),E.push(w.numPointLightShadows),E.push(w.numSpotLightShadows),E.push(w.numSpotLightShadowsWithMaps),E.push(w.numLightProbes),E.push(w.shadowMapType),E.push(w.toneMapping),E.push(w.numClippingPlanes),E.push(w.numClipIntersection),E.push(w.depthPacking)}function _(E,w){a.disableAll(),w.supportsVertexTextures&&a.enable(0),w.instancing&&a.enable(1),w.instancingColor&&a.enable(2),w.instancingMorph&&a.enable(3),w.matcap&&a.enable(4),w.envMap&&a.enable(5),w.normalMapObjectSpace&&a.enable(6),w.normalMapTangentSpace&&a.enable(7),w.clearcoat&&a.enable(8),w.iridescence&&a.enable(9),w.alphaTest&&a.enable(10),w.vertexColors&&a.enable(11),w.vertexAlphas&&a.enable(12),w.vertexUv1s&&a.enable(13),w.vertexUv2s&&a.enable(14),w.vertexUv3s&&a.enable(15),w.vertexTangents&&a.enable(16),w.anisotropy&&a.enable(17),w.alphaHash&&a.enable(18),w.batching&&a.enable(19),w.dispersion&&a.enable(20),w.batchingColor&&a.enable(21),E.push(a.mask),a.disableAll(),w.fog&&a.enable(0),w.useFog&&a.enable(1),w.flatShading&&a.enable(2),w.logarithmicDepthBuffer&&a.enable(3),w.skinning&&a.enable(4),w.morphTargets&&a.enable(5),w.morphNormals&&a.enable(6),w.morphColors&&a.enable(7),w.premultipliedAlpha&&a.enable(8),w.shadowMapEnabled&&a.enable(9),w.doubleSided&&a.enable(10),w.flipSided&&a.enable(11),w.useDepthPacking&&a.enable(12),w.dithering&&a.enable(13),w.transmission&&a.enable(14),w.sheen&&a.enable(15),w.opaque&&a.enable(16),w.pointsUvs&&a.enable(17),w.decodeVideoTexture&&a.enable(18),w.alphaToCoverage&&a.enable(19),E.push(a.mask)}function y(E){const w=v[E.type];let R;if(w){const z=Kr[w];R=vU.clone(z.uniforms)}else R=E.uniforms;return R}function T(E,w){let R;for(let z=0,H=u.length;z0?r.push(f):m.transparent===!0?i.push(f):n.push(f)}function l(h,d,m,v,p,g){const f=o(h,d,m,v,p,g);m.transmission>0?r.unshift(f):m.transparent===!0?i.unshift(f):n.unshift(f)}function c(h,d){n.length>1&&n.sort(h||O6),r.length>1&&r.sort(d||l1),i.length>1&&i.sort(d||l1)}function u(){for(let h=e,d=t.length;h=s.length?(o=new c1,s.push(o)):o=s[i],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function k6(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new se,color:new dt};break;case"SpotLight":n={position:new se,direction:new se,color:new dt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new se,color:new dt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new se,skyColor:new dt,groundColor:new dt};break;case"RectAreaLight":n={color:new dt,position:new se,halfWidth:new se,halfHeight:new se};break}return t[e.id]=n,n}}}function F6(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new it};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new it};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new it,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let z6=0;function B6(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function V6(t){const e=new k6,n=F6(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)r.probe.push(new se);const i=new se,s=new jt,o=new jt;function a(c){let u=0,h=0,d=0;for(let E=0;E<9;E++)r.probe[E].set(0,0,0);let m=0,v=0,p=0,g=0,f=0,x=0,_=0,y=0,T=0,M=0,S=0;c.sort(B6);for(let E=0,w=c.length;E<w;E++){const R=c[E],z=R.color,H=R.intensity,B=R.distance,V=R.shadow&&R.shadow.map?R.shadow.map.texture:null;if(R.isAmbientLight)u+=z.r*H,h+=z.g*H,d+=z.b*H;else if(R.isLightProbe){for(let I=0;I0&&(t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=De.LTC_FLOAT_1,r.rectAreaLTC2=De.LTC_FLOAT_2):(r.rectAreaLTC1=De.LTC_HALF_1,r.rectAreaLTC2=De.LTC_HALF_2)),r.ambient[0]=u,r.ambient[1]=h,r.ambient[2]=d;const b=r.hash;(b.directionalLength!==m||b.pointLength!==v||b.spotLength!==p||b.rectAreaLength!==g||b.hemiLength!==f||b.numDirectionalShadows!==x||b.numPointShadows!==_||b.numSpotShadows!==y||b.numSpotMaps!==T||b.numLightProbes!==S)&&(r.directional.length=m,r.spot.length=p,r.rectArea.length=g,r.point.length=v,r.hemi.length=f,r.directionalShadow.length=x,r.directionalShadowMap.length=x,r.pointShadow.length=_,r.pointShadowMap.length=_,r.spotShadow.length=y,r.spotShadowMap.length=y,r.directionalShadowMatrix.length=x,r.pointShadowMatrix.length=_,r.spotLightMatrix.length=y+T-M,r.spotLightMap.length=T,r.numSpotLightShadowsWithMaps=M,r.numLightProbes=S,b.directionalLength=m,b.pointLength=v,b.spotLength=p,b.rectAreaLength=g,b.hemiLength=f,b.numDirectionalShadows=x,b.numPointShadows=_,b.numSpotShadows=y,b.numSpotMaps=T,b.numLightProbes=S,r.version=z6++)}function l(c,u){let h=0,d=0,m=0,v=0,p=0;const g=u.matrixWorldInverse;for(let f=0,x=c.length;f=o.length?(a=new u1(t),o.push(a)):a=o[s],a}function r(){e=new WeakMap}return{get:n,dispose:r}}class G6 extends eh{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=zO,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class W6 extends eh{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const $6=`void main() { gl_Position = vec4( position, 1.0 ); }`,j6=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include void main() { const float samples = float( VSM_SAMPLES ); float mean = 0.0; float squared_mean = 0.0; float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); float uvStart = samples <= 1.0 ? 0.0 : - 1.0; for ( float i = 0.0; i < samples; i ++ ) { float uvOffset = uvStart + i * uvStride; #ifdef HORIZONTAL_PASS vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); mean += distribution.x; squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; #else float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); mean += depth; squared_mean += depth * depth; #endif } mean = mean / samples; squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); }`;function X6(t,e,n){let r=new h2;const i=new it,s=new it,o=new rn,a=new G6({depthPacking:BO}),l=new W6,c={},u=n.maxTextureSize,h={[As]:Vn,[Vn]:As,[bi]:bi},d=new Ui({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new it},radius:{value:4}},vertexShader:$6,fragmentShader:j6}),m=d.clone();m.defines.HORIZONTAL_PASS=1;const v=new Lo;v.setAttribute("position",new li(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const p=new kr(v,d),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=$M;let f=this.type;this.render=function(M,S,b){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||M.length===0)return;const E=t.getRenderTarget(),w=t.getActiveCubeFace(),R=t.getActiveMipmapLevel(),z=t.state;z.setBlending(ws),z.buffers.color.setClear(1,1,1,1),z.buffers.depth.setTest(!0),z.setScissorTest(!1);const H=f!==vi&&this.type===vi,B=f===vi&&this.type!==vi;for(let V=0,I=M.length;Vu||i.y>u)&&(i.x>u&&(s.x=Math.floor(u/G.x),i.x=s.x*G.x,A.mapSize.x=s.x),i.y>u&&(s.y=Math.floor(u/G.y),i.y=s.y*G.y,A.mapSize.y=s.y)),A.map===null||H===!0||B===!0){const W=this.type!==vi?{minFilter:_r,magFilter:_r}:{};A.map!==null&&A.map.dispose(),A.map=new Ro(i.x,i.y,W),A.map.texture.name=F.name+".shadowMap",A.camera.updateProjectionMatrix()}t.setRenderTarget(A.map),t.clear();const Y=A.getViewportCount();for(let W=0;W0||S.map&&S.alphaTest>0){const z=w.uuid,H=S.uuid;let B=c[z];B===void 0&&(B={},c[z]=B);let V=B[H];V===void 0&&(V=w.clone(),B[H]=V,S.addEventListener("dispose",T)),w=V}if(w.visible=S.visible,w.wireframe=S.wireframe,E===vi?w.side=S.shadowSide!==null?S.shadowSide:S.side:w.side=S.shadowSide!==null?S.shadowSide:h[S.side],w.alphaMap=S.alphaMap,w.alphaTest=S.alphaTest,w.map=S.map,w.clipShadows=S.clipShadows,w.clippingPlanes=S.clippingPlanes,w.clipIntersection=S.clipIntersection,w.displacementMap=S.displacementMap,w.displacementScale=S.displacementScale,w.displacementBias=S.displacementBias,w.wireframeLinewidth=S.wireframeLinewidth,w.linewidth=S.linewidth,b.isPointLight===!0&&w.isMeshDistanceMaterial===!0){const z=t.properties.get(w);z.light=b}return w}function y(M,S,b,E,w){if(M.visible===!1)return;if(M.layers.test(S.layers)&&(M.isMesh||M.isLine||M.isPoints)&&(M.castShadow||M.receiveShadow&&w===vi)&&(!M.frustumCulled||r.intersectsObject(M))){M.modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,M.matrixWorld);const H=e.update(M),B=M.material;if(Array.isArray(B)){const V=H.groups;for(let I=0,F=V.length;I<F;I++){const A=V[I],G=B[A.materialIndex];if(G&&G.visible){const Y=_(M,G,E,w);M.onBeforeShadow(t,M,S,b,H,Y,A),t.renderBufferDirect(b,null,H,Y,M,A),M.onAfterShadow(t,M,S,b,H,Y,A)}}}else if(B.visible){const V=_(M,B,E,w);M.onBeforeShadow(t,M,S,b,H,V,null),t.renderBufferDirect(b,null,H,V,M,null),M.onAfterShadow(t,M,S,b,H,V,null)}}const z=M.children;for(let H=0,B=z.length;H=1):F.indexOf("OpenGL ES")!==-1&&(I=parseFloat(/^OpenGL ES (\d)/.exec(F)[1]),V=I>=2);let A=null,G={};const Y=t.getParameter(t.SCISSOR_BOX),W=t.getParameter(t.VIEWPORT),J=new rn().fromArray(Y),me=new rn().fromArray(W);function $(k,xe,te,fe){const we=new Uint8Array(4),He=t.createTexture();t.bindTexture(k,He),t.texParameteri(k,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(k,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let nt=0;nt<te;nt++)k===t.TEXTURE_3D||k===t.TEXTURE_2D_ARRAY?t.texImage3D(xe,0,t.RGBA,1,1,fe,0,t.RGBA,t.UNSIGNED_BYTE,we):t.texImage2D(xe+nt,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,we);return He}const Q={};Q[t.TEXTURE_2D]=$(t.TEXTURE_2D,t.TEXTURE_2D,1),Q[t.TEXTURE_CUBE_MAP]=$(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),Q[t.TEXTURE_2D_ARRAY]=$(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),Q[t.TEXTURE_3D]=$(t.TEXTURE_3D,t.TEXTURE_3D,1,1),i.setClear(0,0,0,1),s.setClear(1),o.setClear(0),le(t.DEPTH_TEST),s.setFunc(sf),ie(!1),Ee($x),le(t.CULL_FACE),j(ws);function le(k){c[k]!==!0&&(t.enable(k),c[k]=!0)}function he(k){c[k]!==!1&&(t.disable(k),c[k]=!1)}function Pe(k,xe){return u[k]!==xe?(t.bindFramebuffer(k,xe),u[k]=xe,k===t.DRAW_FRAMEBUFFER&&(u[t.FRAMEBUFFER]=xe),k===t.FRAMEBUFFER&&(u[t.DRAW_FRAMEBUFFER]=xe),!0):!1}function Le(k,xe){let te=d,fe=!1;if(k){te=h.get(xe),te===void 0&&(te=[],h.set(xe,te));const we=k.textures;if(te.length!==we.length||te[0]!==t.COLOR_ATTACHMENT0){for(let He=0,nt=we.length;He"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new it,u=new WeakMap;let h;const d=new WeakMap;let m=!1;try{m=typeof OffscreenCanvasZ||re.height>Z)&&(ue=Z/Math.max(re.width,re.height)),ue<1)if(typeof HTMLImageElement<"u"&&N instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&N instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&N instanceof ImageBitmap||typeof VideoFrame0?N.mipmaps.length:N.isCompressedTexture&&Array.isArray(N.image)?C.mipmaps.length:1}function T(N){const C=N.target;C.removeEventListener("dispose",T),S(C),C.isVideoTexture&&u.delete(C)}function M(N){const C=N.target;C.removeEventListener("dispose",M),E(C)}function S(N){const C=r.get(N);if(C.__webglInit===void 0)return;const Z=N.source,ue=d.get(Z);if(ue){const re=ue[C.__cacheKey];re.usedTimes--,re.usedTimes===0&&b(N),Object.keys(ue).length===0&&d.delete(Z)}r.remove(N)}function b(N){const C=r.get(N);t.deleteTexture(C.__webglTexture);const Z=N.source,ue=d.get(Z);delete ue[C.__cacheKey],o.memory.textures--}function E(N){const C=r.get(N);if(N.depthTexture&&N.depthTexture.dispose(),N.isWebGLCubeRenderTarget)for(let ue=0;ue<6;ue++){if(Array.isArray(C.__webglFramebuffer[ue]))for(let re=0;re<C.__webglFramebuffer[ue].length;re++)t.deleteFramebuffer(C.__webglFramebuffer[ue][re]);else t.deleteFramebuffer(C.__webglFramebuffer[ue]);C.__webglDepthbuffer&&t.deleteRenderbuffer(C.__webglDepthbuffer[ue])}else{if(Array.isArray(C.__webglFramebuffer))for(let ue=0;ue<C.__webglFramebuffer.length;ue++)t.deleteFramebuffer(C.__webglFramebuffer[ue]);else t.deleteFramebuffer(C.__webglFramebuffer);if(C.__webglDepthbuffer&&t.deleteRenderbuffer(C.__webglDepthbuffer),C.__webglMultisampledFramebuffer&&t.deleteFramebuffer(C.__webglMultisampledFramebuffer),C.__webglColorRenderbuffer)for(let ue=0;ue<C.__webglColorRenderbuffer.length;ue++)C.__webglColorRenderbuffer[ue]&&t.deleteRenderbuffer(C.__webglColorRenderbuffer[ue]);C.__webglDepthRenderbuffer&&t.deleteRenderbuffer(C.__webglDepthRenderbuffer)}const Z=N.textures;for(let ue=0,re=Z.length;ue=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+N+" texture units while this GPU supports only "+i.maxTextures),w+=1,N}function H(N){const C=[];return C.push(N.wrapS),C.push(N.wrapT),C.push(N.wrapR||0),C.push(N.magFilter),C.push(N.minFilter),C.push(N.anisotropy),C.push(N.internalFormat),C.push(N.format),C.push(N.type),C.push(N.generateMipmaps),C.push(N.premultiplyAlpha),C.push(N.flipY),C.push(N.unpackAlignment),C.push(N.colorSpace),C.join()}function B(N,C){const Z=r.get(N);if(N.isVideoTexture&&Ae(N),N.isRenderTargetTexture===!1&&N.version>0&&Z.__version!==N.version){const ue=N.image;if(ue===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ue.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{me(Z,N,C);return}}n.bindTexture(t.TEXTURE_2D,Z.__webglTexture,t.TEXTURE0+C)}function V(N,C){const Z=r.get(N);if(N.version>0&&Z.__version!==N.version){me(Z,N,C);return}n.bindTexture(t.TEXTURE_2D_ARRAY,Z.__webglTexture,t.TEXTURE0+C)}function I(N,C){const Z=r.get(N);if(N.version>0&&Z.__version!==N.version){me(Z,N,C);return}n.bindTexture(t.TEXTURE_3D,Z.__webglTexture,t.TEXTURE0+C)}function F(N,C){const Z=r.get(N);if(N.version>0&&Z.__version!==N.version){$(Z,N,C);return}n.bindTexture(t.TEXTURE_CUBE_MAP,Z.__webglTexture,t.TEXTURE0+C)}const A={[M0]:t.REPEAT,[oo]:t.CLAMP_TO_EDGE,[T0]:t.MIRRORED_REPEAT},G={[_r]:t.NEAREST,[AO]:t.NEAREST_MIPMAP_NEAREST,[Cu]:t.NEAREST_MIPMAP_LINEAR,[Ur]:t.LINEAR,[op]:t.LINEAR_MIPMAP_NEAREST,[ao]:t.LINEAR_MIPMAP_LINEAR},Y={[GO]:t.NEVER,[qO]:t.ALWAYS,[WO]:t.LESS,[e2]:t.LEQUAL,[$O]:t.EQUAL,[YO]:t.GEQUAL,[jO]:t.GREATER,[XO]:t.NOTEQUAL};function W(N,C){if(C.type===us&&e.has("OES_texture_float_linear")===!1&&(C.magFilter===Ur||C.magFilter===op||C.magFilter===Cu||C.magFilter===ao||C.minFilter===Ur||C.minFilter===op||C.minFilter===Cu||C.minFilter===ao)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(N,t.TEXTURE_WRAP_S,A[C.wrapS]),t.texParameteri(N,t.TEXTURE_WRAP_T,A[C.wrapT]),(N===t.TEXTURE_3D||N===t.TEXTURE_2D_ARRAY)&&t.texParameteri(N,t.TEXTURE_WRAP_R,A[C.wrapR]),t.texParameteri(N,t.TEXTURE_MAG_FILTER,G[C.magFilter]),t.texParameteri(N,t.TEXTURE_MIN_FILTER,G[C.minFilter]),C.compareFunction&&(t.texParameteri(N,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(N,t.TEXTURE_COMPARE_FUNC,Y[C.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(C.magFilter===_r||C.minFilter!==Cu&&C.minFilter!==ao||C.type===us&&e.has("OES_texture_float_linear")===!1)return;if(C.anisotropy>1||r.get(C).__currentAnisotropy){const Z=e.get("EXT_texture_filter_anisotropic");t.texParameterf(N,Z.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(C.anisotropy,i.getMaxAnisotropy())),r.get(C).__currentAnisotropy=C.anisotropy}}}function J(N,C){let Z=!1;N.__webglInit===void 0&&(N.__webglInit=!0,C.addEventListener("dispose",T));const ue=C.source;let re=d.get(ue);re===void 0&&(re={},d.set(ue,re));const q=H(C);if(q!==N.__cacheKey){re[q]===void 0&&(re[q]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,Z=!0),re[q].usedTimes++;const _e=re[N.__cacheKey];_e!==void 0&&(re[N.__cacheKey].usedTimes--,_e.usedTimes===0&&b(C)),N.__cacheKey=q,N.__webglTexture=re[q].texture}return Z}function me(N,C,Z){let ue=t.TEXTURE_2D;(C.isDataArrayTexture||C.isCompressedArrayTexture)&&(ue=t.TEXTURE_2D_ARRAY),C.isData3DTexture&&(ue=t.TEXTURE_3D);const re=J(N,C),q=C.source;n.bindTexture(ue,N.__webglTexture,t.TEXTURE0+Z);const _e=r.get(q);if(q.version!==_e.__version||re===!0){n.activeTexture(t.TEXTURE0+Z);const oe=at.getPrimaries(at.workingColorSpace),de=C.colorSpace===rs?null:at.getPrimaries(C.colorSpace),ze=C.colorSpace===rs||oe===de?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,C.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,C.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,C.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,ze);let ve=p(C.image,!1,i.maxTextureSize);ve=pe(C,ve);const ye=s.convert(C.format,C.colorSpace),Te=s.convert(C.type);let Fe=x(C.internalFormat,ye,Te,C.colorSpace,C.isVideoTexture);W(ue,C);let Re;const We=C.mipmaps,$e=C.isVideoTexture!==!0,gt=_e.__version===void 0||re===!0,k=q.dataReady,xe=y(C,ve);if(C.isDepthTexture)Fe=_(C.format===Qa,C.type),gt&&($e?n.texStorage2D(t.TEXTURE_2D,1,Fe,ve.width,ve.height):n.texImage2D(t.TEXTURE_2D,0,Fe,ve.width,ve.height,0,ye,Te,null));else if(C.isDataTexture)if(We.length>0){$e&&gt&&n.texStorage2D(t.TEXTURE_2D,xe,Fe,We[0].width,We[0].height);for(let te=0,fe=We.length;te<fe;te++)Re=We[te],$e?k&&n.texSubImage2D(t.TEXTURE_2D,te,0,0,Re.width,Re.height,ye,Te,Re.data):n.texImage2D(t.TEXTURE_2D,te,Fe,Re.width,Re.height,0,ye,Te,Re.data);C.generateMipmaps=!1}else $e?(gt&&n.texStorage2D(t.TEXTURE_2D,xe,Fe,ve.width,ve.height),k&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,ve.width,ve.height,ye,Te,ve.data)):n.texImage2D(t.TEXTURE_2D,0,Fe,ve.width,ve.height,0,ye,Te,ve.data);else if(C.isCompressedTexture)if(C.isCompressedArrayTexture){$e&&gt&&n.texStorage3D(t.TEXTURE_2D_ARRAY,xe,Fe,We[0].width,We[0].height,ve.depth);for(let te=0,fe=We.length;te0){for(const we of C.layerUpdates){const He=Re.width*Re.height;n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,te,0,0,we,Re.width,Re.height,1,ye,Re.data.slice(He*we,He*(we+1)),0,0)}C.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,te,0,0,0,Re.width,Re.height,ve.depth,ye,Re.data,0,0)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,te,Fe,Re.width,Re.height,ve.depth,0,Re.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else $e?k&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,te,0,0,0,Re.width,Re.height,ve.depth,ye,Te,Re.data):n.texImage3D(t.TEXTURE_2D_ARRAY,te,Fe,Re.width,Re.height,ve.depth,0,ye,Te,Re.data)}else{$e&&gt&&n.texStorage2D(t.TEXTURE_2D,xe,Fe,We[0].width,We[0].height);for(let te=0,fe=We.length;te0){let te;switch(Te){case t.UNSIGNED_BYTE:switch(ye){case t.ALPHA:te=1;break;case t.LUMINANCE:te=1;break;case t.LUMINANCE_ALPHA:te=2;break;case t.RGB:te=3;break;case t.RGBA:te=4;break;default:throw new Error(`Unknown texel size for format ${ye}.`)}break;case t.UNSIGNED_SHORT_4_4_4_4:case t.UNSIGNED_SHORT_5_5_5_1:case t.UNSIGNED_SHORT_5_6_5:te=1;break;default:throw new Error(`Unknown texel size for type ${Te}.`)}const fe=ve.width*ve.height*te;for(const we of C.layerUpdates)n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,we,ve.width,ve.height,1,ye,Te,ve.data.slice(fe*we,fe*(we+1)));C.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,ve.width,ve.height,ve.depth,ye,Te,ve.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,Fe,ve.width,ve.height,ve.depth,0,ye,Te,ve.data);else if(C.isData3DTexture)$e?(gt&&n.texStorage3D(t.TEXTURE_3D,xe,Fe,ve.width,ve.height,ve.depth),k&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,ve.width,ve.height,ve.depth,ye,Te,ve.data)):n.texImage3D(t.TEXTURE_3D,0,Fe,ve.width,ve.height,ve.depth,0,ye,Te,ve.data);else if(C.isFramebufferTexture){if(gt)if($e)n.texStorage2D(t.TEXTURE_2D,xe,Fe,ve.width,ve.height);else{let te=ve.width,fe=ve.height;for(let we=0;we>=1,fe>>=1}}else if(We.length>0){if($e&&gt){const te=Se(We[0]);n.texStorage2D(t.TEXTURE_2D,xe,Fe,te.width,te.height)}for(let te=0,fe=We.length;te<fe;te++)Re=We[te],$e?k&&n.texSubImage2D(t.TEXTURE_2D,te,0,0,ye,Te,Re):n.texImage2D(t.TEXTURE_2D,te,Fe,ye,Te,Re);C.generateMipmaps=!1}else if($e){if(gt){const te=Se(ve);n.texStorage2D(t.TEXTURE_2D,xe,Fe,te.width,te.height)}k&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,ye,Te,ve)}else n.texImage2D(t.TEXTURE_2D,0,Fe,ye,Te,ve);g(C)&&f(ue),_e.__version=q.version,C.onUpdate&&C.onUpdate(C)}N.__version=C.version}function $(N,C,Z){if(C.image.length!==6)return;const ue=J(N,C),re=C.source;n.bindTexture(t.TEXTURE_CUBE_MAP,N.__webglTexture,t.TEXTURE0+Z);const q=r.get(re);if(re.version!==q.__version||ue===!0){n.activeTexture(t.TEXTURE0+Z);const _e=at.getPrimaries(at.workingColorSpace),oe=C.colorSpace===rs?null:at.getPrimaries(C.colorSpace),de=C.colorSpace===rs||_e===oe?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,C.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,C.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,C.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,de);const ze=C.isCompressedTexture||C.image[0].isCompressedTexture,ve=C.image[0]&&C.image[0].isDataTexture,ye=[];for(let fe=0;fe<6;fe++)!ze&&!ve?ye[fe]=p(C.image[fe],!0,i.maxCubemapSize):ye[fe]=ve?C.image[fe].image:C.image[fe],ye[fe]=pe(C,ye[fe]);const Te=ye[0],Fe=s.convert(C.format,C.colorSpace),Re=s.convert(C.type),We=x(C.internalFormat,Fe,Re,C.colorSpace),$e=C.isVideoTexture!==!0,gt=q.__version===void 0||ue===!0,k=re.dataReady;let xe=y(C,Te);W(t.TEXTURE_CUBE_MAP,C);let te;if(ze){$e&&gt&&n.texStorage2D(t.TEXTURE_CUBE_MAP,xe,We,Te.width,Te.height);for(let fe=0;fe<6;fe++){te=ye[fe].mipmaps;for(let we=0;we0&&xe++;const fe=Se(ye[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,xe,We,fe.width,fe.height)}for(let fe=0;fe<6;fe++)if(ve){$e?k&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+fe,0,0,0,ye[fe].width,ye[fe].height,Fe,Re,ye[fe].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+fe,0,We,ye[fe].width,ye[fe].height,0,Fe,Re,ye[fe].data);for(let we=0;we<te.length;we++){const nt=te[we].image[fe].image;$e?k&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+fe,we+1,0,0,nt.width,nt.height,Fe,Re,nt.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+fe,we+1,We,nt.width,nt.height,0,Fe,Re,nt.data)}}else{$e?k&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+fe,0,0,0,Fe,Re,ye[fe]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+fe,0,We,Fe,Re,ye[fe]);for(let we=0;we>q),ye=Math.max(1,C.height>>q);re===t.TEXTURE_3D||re===t.TEXTURE_2D_ARRAY?n.texImage3D(re,q,de,ve,ye,C.depth,0,_e,oe,null):n.texImage2D(re,q,de,ve,ye,0,_e,oe,null)}n.bindFramebuffer(t.FRAMEBUFFER,N),Ee(C)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,ue,re,r.get(Z).__webglTexture,0,ie(C)):(re===t.TEXTURE_2D||re>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&re<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,ue,re,r.get(Z).__webglTexture,q),n.bindFramebuffer(t.FRAMEBUFFER,null)}function le(N,C,Z){if(t.bindRenderbuffer(t.RENDERBUFFER,N),C.depthBuffer){const ue=C.depthTexture,re=ue&&ue.isDepthTexture?ue.type:null,q=_(C.stencilBuffer,re),_e=C.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,oe=ie(C);Ee(C)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,oe,q,C.width,C.height):Z?t.renderbufferStorageMultisample(t.RENDERBUFFER,oe,q,C.width,C.height):t.renderbufferStorage(t.RENDERBUFFER,q,C.width,C.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,_e,t.RENDERBUFFER,N)}else{const ue=C.textures;for(let re=0;re<ue.length;re++){const q=ue[re],_e=s.convert(q.format,q.colorSpace),oe=s.convert(q.type),de=x(q.internalFormat,_e,oe,q.colorSpace),ze=ie(C);Z&&Ee(C)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,ze,de,C.width,C.height):Ee(C)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ze,de,C.width,C.height):t.renderbufferStorage(t.RENDERBUFFER,de,C.width,C.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function he(N,C){if(C&&C.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(t.FRAMEBUFFER,N),!(C.depthTexture&&C.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!r.get(C.depthTexture).__webglTexture||C.depthTexture.image.width!==C.width||C.depthTexture.image.height!==C.height)&&(C.depthTexture.image.width=C.width,C.depthTexture.image.height=C.height,C.depthTexture.needsUpdate=!0),B(C.depthTexture,0);const ue=r.get(C.depthTexture).__webglTexture,re=ie(C);if(C.depthTexture.format===La)Ee(C)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,ue,0,re):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,ue,0);else if(C.depthTexture.format===Qa)Ee(C)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,ue,0,re):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,ue,0);else throw new Error("Unknown depthTexture format")}function Pe(N){const C=r.get(N),Z=N.isWebGLCubeRenderTarget===!0;if(N.depthTexture&&!C.__autoAllocateDepthBuffer){if(Z)throw new Error("target.depthTexture not supported in Cube render targets");he(C.__webglFramebuffer,N)}else if(Z){C.__webglDepthbuffer=[];for(let ue=0;ue1;if(_e||(ue.__webglTexture===void 0&&(ue.__webglTexture=t.createTexture()),ue.__version=C.version,o.memory.textures++),q){Z.__webglFramebuffer=[];for(let oe=0;oe0){Z.__webglFramebuffer[oe]=[];for(let de=0;de0){Z.__webglFramebuffer=[];for(let oe=0;oe<C.mipmaps.length;oe++)Z.__webglFramebuffer[oe]=t.createFramebuffer()}else Z.__webglFramebuffer=t.createFramebuffer();if(_e)for(let oe=0,de=re.length;oe0&&Ee(N)===!1){Z.__webglMultisampledFramebuffer=t.createFramebuffer(),Z.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,Z.__webglMultisampledFramebuffer);for(let oe=0;oe<re.length;oe++){const de=re[oe];Z.__webglColorRenderbuffer[oe]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,Z.__webglColorRenderbuffer[oe]);const ze=s.convert(de.format,de.colorSpace),ve=s.convert(de.type),ye=x(de.internalFormat,ze,ve,de.colorSpace,N.isXRRenderTarget===!0),Te=ie(N);t.renderbufferStorageMultisample(t.RENDERBUFFER,Te,ye,N.width,N.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+oe,t.RENDERBUFFER,Z.__webglColorRenderbuffer[oe])}t.bindRenderbuffer(t.RENDERBUFFER,null),N.depthBuffer&&(Z.__webglDepthRenderbuffer=t.createRenderbuffer(),le(Z.__webglDepthRenderbuffer,N,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(q){n.bindTexture(t.TEXTURE_CUBE_MAP,ue.__webglTexture),W(t.TEXTURE_CUBE_MAP,C);for(let oe=0;oe0)for(let de=0;de<C.mipmaps.length;de++)Q(Z.__webglFramebuffer[oe][de],N,C,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+oe,de);else Q(Z.__webglFramebuffer[oe],N,C,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+oe,0);g(C)&&f(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(_e){for(let oe=0,de=re.length;oe0)for(let de=0;de<C.mipmaps.length;de++)Q(Z.__webglFramebuffer[de],N,C,t.COLOR_ATTACHMENT0,oe,de);else Q(Z.__webglFramebuffer,N,C,t.COLOR_ATTACHMENT0,oe,0);g(C)&&f(oe),n.unbindTexture()}N.depthBuffer&&Pe(N)}function O(N){const C=N.textures;for(let Z=0,ue=C.length;Z0){if(Ee(N)===!1){const C=N.textures,Z=N.width,ue=N.height;let re=t.COLOR_BUFFER_BIT;const q=N.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,_e=r.get(N),oe=C.length>1;if(oe)for(let de=0;de<C.length;de++)n.bindFramebuffer(t.FRAMEBUFFER,_e.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+de,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,_e.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+de,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,_e.__webglMultisampledFramebuffer),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,_e.__webglFramebuffer);for(let de=0;de<C.length;de++){if(N.resolveDepthBuffer&&(N.depthBuffer&&(re|=t.DEPTH_BUFFER_BIT),N.stencilBuffer&&N.resolveStencilBuffer&&(re|=t.STENCIL_BUFFER_BIT)),oe){t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,_e.__webglColorRenderbuffer[de]);const ze=r.get(C[de]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,ze,0)}t.blitFramebuffer(0,0,Z,ue,0,0,Z,ue,re,t.NEAREST),l===!0&&(U.length=0,j.length=0,U.push(t.COLOR_ATTACHMENT0+de),N.depthBuffer&&N.resolveDepthBuffer===!1&&(U.push(q),j.push(q),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,j)),t.invalidateFramebuffer(t.READ_FRAMEBUFFER,U))}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),oe)for(let de=0;de0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&C.__useRenderToTexture!==!1}function Ae(N){const C=o.render.frame;u.get(N)!==C&&(u.set(N,C),N.update())}function pe(N,C){const Z=N.colorSpace,ue=N.format,re=N.type;return N.isCompressedTexture===!0||N.isVideoTexture===!0||Z!==Us&&Z!==rs&&(at.getTransfer(Z)===xt?(ue!==ii||re!==Rs)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Z)),C}function Se(N){return typeof HTMLImageElement<"u"&&N instanceof HTMLImageElement?(c.width=N.naturalWidth||N.width,c.height=N.naturalHeight||N.height):typeof VideoFramem+v?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&d= 1.0 ) { gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; } else { gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; } }`;class tz{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n,r){if(this.texture===null){const i=new Hn,s=e.properties.get(i);s.__webglTexture=n.texture,(n.depthNear!=r.depthNear||n.depthFar!=r.depthFar)&&(this.depthNear=n.depthNear,this.depthFar=n.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const n=e.cameras[0].viewport,r=new Ui({vertexShader:Q6,fragmentShader:ez,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new kr(new Xc(20,20),r)}return this.mesh}reset(){this.texture=null,this.mesh=null}}class nz extends dl{constructor(e,n){super();const r=this;let i=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,h=null,d=null,m=null,v=null;const p=new tz,g=n.getContextAttributes();let f=null,x=null;const _=[],y=[],T=new it;let M=null;const S=new Ir;S.layers.enable(1),S.viewport=new rn;const b=new Ir;b.layers.enable(2),b.viewport=new rn;const E=[S,b],w=new Z6;w.layers.enable(1),w.layers.enable(2);let R=null,z=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function($){let Q=_[$];return Q===void 0&&(Q=new Fp,_[$]=Q),Q.getTargetRaySpace()},this.getControllerGrip=function($){let Q=_[$];return Q===void 0&&(Q=new Fp,_[$]=Q),Q.getGripSpace()},this.getHand=function($){let Q=_[$];return Q===void 0&&(Q=new Fp,_[$]=Q),Q.getHandSpace()};function H($){const Q=y.indexOf($.inputSource);if(Q===-1)return;const le=_[Q];le!==void 0&&(le.update($.inputSource,$.frame,c||o),le.dispatchEvent({type:$.type,data:$.inputSource}))}function B(){i.removeEventListener("select",H),i.removeEventListener("selectstart",H),i.removeEventListener("selectend",H),i.removeEventListener("squeeze",H),i.removeEventListener("squeezestart",H),i.removeEventListener("squeezeend",H),i.removeEventListener("end",B),i.removeEventListener("inputsourceschange",V);for(let $=0;$<_.length;$++){const Q=y[$];Q!==null&&(y[$]=null,_[$].disconnect(Q))}R=null,z=null,p.reset(),e.setRenderTarget(f),m=null,d=null,h=null,i=null,x=null,me.stop(),r.isPresenting=!1,e.setPixelRatio(M),e.setSize(T.width,T.height,!1),r.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function($){s=$,r.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function($){a=$,r.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function($){c=$},this.getBaseLayer=function(){return d!==null?d:m},this.getBinding=function(){return h},this.getFrame=function(){return v},this.getSession=function(){return i},this.setSession=async function($){if(i=$,i!==null){if(f=e.getRenderTarget(),i.addEventListener("select",H),i.addEventListener("selectstart",H),i.addEventListener("selectend",H),i.addEventListener("squeeze",H),i.addEventListener("squeezestart",H),i.addEventListener("squeezeend",H),i.addEventListener("end",B),i.addEventListener("inputsourceschange",V),g.xrCompatible!==!0&&await n.makeXRCompatible(),M=e.getPixelRatio(),e.getSize(T),i.renderState.layers===void 0){const Q={antialias:g.antialias,alpha:!0,depth:g.depth,stencil:g.stencil,framebufferScaleFactor:s};m=new XRWebGLLayer(i,n,Q),i.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),x=new Ro(m.framebufferWidth,m.framebufferHeight,{format:ii,type:Rs,colorSpace:e.outputColorSpace,stencilBuffer:g.stencil})}else{let Q=null,le=null,he=null;g.depth&&(he=g.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,Q=g.stencil?Qa:La,le=g.stencil?Ja:Za);const Pe={colorFormat:n.RGBA8,depthFormat:he,scaleFactor:s};h=new XRWebGLBinding(i,n),d=h.createProjectionLayer(Pe),i.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),x=new Ro(d.textureWidth,d.textureHeight,{format:ii,type:Rs,depthTexture:new g2(d.textureWidth,d.textureHeight,le,void 0,void 0,void 0,void 0,void 0,void 0,Q),stencilBuffer:g.stencil,colorSpace:e.outputColorSpace,samples:g.antialias?4:0,resolveDepthBuffer:d.ignoreDepthValues===!1})}x.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),me.setContext(i),me.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function V($){for(let Q=0;Q=0&&(y[he]=null,_[he].disconnect(le))}for(let Q=0;Q<$.added.length;Q++){const le=$.added[Q];let he=y.indexOf(le);if(he===-1){for(let Le=0;Le=y.length){y.push(le),he=Le;break}else if(y[Le]===null){y[Le]=le,he=Le;break}if(he===-1)break}const Pe=_[he];Pe&&Pe.connect(le)}}const I=new se,F=new se;function A($,Q,le){I.setFromMatrixPosition(Q.matrixWorld),F.setFromMatrixPosition(le.matrixWorld);const he=I.distanceTo(F),Pe=Q.projectionMatrix.elements,Le=le.projectionMatrix.elements,Me=Pe[14]/(Pe[10]-1),O=Pe[14]/(Pe[10]+1),U=(Pe[9]+1)/Pe[5],j=(Pe[9]-1)/Pe[5],ce=(Pe[8]-1)/Pe[0],ie=(Le[8]+1)/Le[0],Ee=Me*ce,Ae=Me*ie,pe=he/(-ce+ie),Se=pe*-ce;Q.matrixWorld.decompose($.position,$.quaternion,$.scale),$.translateX(Se),$.translateZ(pe),$.matrixWorld.compose($.position,$.quaternion,$.scale),$.matrixWorldInverse.copy($.matrixWorld).invert();const N=Me+pe,C=O+pe,Z=Ee-Se,ue=Ae+(he-Se),re=U*O/C*N,q=j*O/C*N;$.projectionMatrix.makePerspective(Z,ue,re,q,N,C),$.projectionMatrixInverse.copy($.projectionMatrix).invert()}function G($,Q){Q===null?$.matrixWorld.copy($.matrix):$.matrixWorld.multiplyMatrices(Q.matrixWorld,$.matrix),$.matrixWorldInverse.copy($.matrixWorld).invert()}this.updateCamera=function($){if(i===null)return;p.texture!==null&&($.near=p.depthNear,$.far=p.depthFar),w.near=b.near=S.near=$.near,w.far=b.far=S.far=$.far,(R!==w.near||z!==w.far)&&(i.updateRenderState({depthNear:w.near,depthFar:w.far}),R=w.near,z=w.far,S.near=R,S.far=z,b.near=R,b.far=z,S.updateProjectionMatrix(),b.updateProjectionMatrix(),$.updateProjectionMatrix());const Q=$.parent,le=w.cameras;G(w,Q);for(let he=0;he<le.length;he++)G(le[he],Q);le.length===2?A(w,S,b):w.projectionMatrix.copy(S.projectionMatrix),Y($,w,Q)};function Y($,Q,le){le===null?$.matrix.copy(Q.matrixWorld):($.matrix.copy(le.matrixWorld),$.matrix.invert(),$.matrix.multiply(Q.matrixWorld)),$.matrix.decompose($.position,$.quaternion,$.scale),$.updateMatrixWorld(!0),$.projectionMatrix.copy(Q.projectionMatrix),$.projectionMatrixInverse.copy(Q.projectionMatrixInverse),$.isPerspectiveCamera&&($.fov=C0*2*Math.atan(1/$.projectionMatrix.elements[5]),$.zoom=1)}this.getCamera=function(){return w},this.getFoveation=function(){if(!(d===null&&m===null))return l},this.setFoveation=function($){l=$,d!==null&&(d.fixedFoveation=$),m!==null&&m.fixedFoveation!==void 0&&(m.fixedFoveation=$)},this.hasDepthSensing=function(){return p.texture!==null},this.getDepthSensingMesh=function(){return p.getMesh(w)};let W=null;function J($,Q){if(u=Q.getViewerPose(c||o),v=Q,u!==null){const le=u.views;m!==null&&(e.setRenderTargetFramebuffer(x,m.framebuffer),e.setRenderTarget(x));let he=!1;le.length!==w.cameras.length&&(w.cameras.length=0,he=!0);for(let Le=0;Le<le.length;Le++){const Me=le[Le];let O=null;if(m!==null)O=m.getViewport(Me);else{const j=h.getViewSubImage(d,Me);O=j.viewport,Le===0&&(e.setRenderTargetTextures(x,j.colorTexture,d.ignoreDepthValues?void 0:j.depthStencilTexture),e.setRenderTarget(x))}let U=E[Le];U===void 0&&(U=new Ir,U.layers.enable(Le),U.viewport=new rn,E[Le]=U),U.matrix.fromArray(Me.transform.matrix),U.matrix.decompose(U.position,U.quaternion,U.scale),U.projectionMatrix.fromArray(Me.projectionMatrix),U.projectionMatrixInverse.copy(U.projectionMatrix).invert(),U.viewport.set(O.x,O.y,O.width,O.height),Le===0&&(w.matrix.copy(U.matrix),w.matrix.decompose(w.position,w.quaternion,w.scale)),he===!0&&w.cameras.push(U)}const Pe=i.enabledFeatures;if(Pe&&Pe.includes("depth-sensing")){const Le=h.getDepthInformation(le[0]);Le&&Le.isValid&&Le.texture&&p.init(e,Le,i.renderState)}}for(let le=0;le0&&(g.alphaTest.value=f.alphaTest);const x=e.get(f),_=x.envMap,y=x.envMapRotation;_&&(g.envMap.value=_,js.copy(y),js.x*=-1,js.y*=-1,js.z*=-1,_.isCubeTexture&&_.isRenderTargetTexture===!1&&(js.y*=-1,js.z*=-1),g.envMapRotation.value.setFromMatrix4(rz.makeRotationFromEuler(js)),g.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,g.reflectivity.value=f.reflectivity,g.ior.value=f.ior,g.refractionRatio.value=f.refractionRatio),f.lightMap&&(g.lightMap.value=f.lightMap,g.lightMapIntensity.value=f.lightMapIntensity,n(f.lightMap,g.lightMapTransform)),f.aoMap&&(g.aoMap.value=f.aoMap,g.aoMapIntensity.value=f.aoMapIntensity,n(f.aoMap,g.aoMapTransform))}function o(g,f){g.diffuse.value.copy(f.color),g.opacity.value=f.opacity,f.map&&(g.map.value=f.map,n(f.map,g.mapTransform))}function a(g,f){g.dashSize.value=f.dashSize,g.totalSize.value=f.dashSize+f.gapSize,g.scale.value=f.scale}function l(g,f,x,_){g.diffuse.value.copy(f.color),g.opacity.value=f.opacity,g.size.value=f.size*x,g.scale.value=_*.5,f.map&&(g.map.value=f.map,n(f.map,g.uvTransform)),f.alphaMap&&(g.alphaMap.value=f.alphaMap,n(f.alphaMap,g.alphaMapTransform)),f.alphaTest>0&&(g.alphaTest.value=f.alphaTest)}function c(g,f){g.diffuse.value.copy(f.color),g.opacity.value=f.opacity,g.rotation.value=f.rotation,f.map&&(g.map.value=f.map,n(f.map,g.mapTransform)),f.alphaMap&&(g.alphaMap.value=f.alphaMap,n(f.alphaMap,g.alphaMapTransform)),f.alphaTest>0&&(g.alphaTest.value=f.alphaTest)}function u(g,f){g.specular.value.copy(f.specular),g.shininess.value=Math.max(f.shininess,1e-4)}function h(g,f){f.gradientMap&&(g.gradientMap.value=f.gradientMap)}function d(g,f){g.metalness.value=f.metalness,f.metalnessMap&&(g.metalnessMap.value=f.metalnessMap,n(f.metalnessMap,g.metalnessMapTransform)),g.roughness.value=f.roughness,f.roughnessMap&&(g.roughnessMap.value=f.roughnessMap,n(f.roughnessMap,g.roughnessMapTransform)),f.envMap&&(g.envMapIntensity.value=f.envMapIntensity)}function m(g,f,x){g.ior.value=f.ior,f.sheen>0&&(g.sheenColor.value.copy(f.sheenColor).multiplyScalar(f.sheen),g.sheenRoughness.value=f.sheenRoughness,f.sheenColorMap&&(g.sheenColorMap.value=f.sheenColorMap,n(f.sheenColorMap,g.sheenColorMapTransform)),f.sheenRoughnessMap&&(g.sheenRoughnessMap.value=f.sheenRoughnessMap,n(f.sheenRoughnessMap,g.sheenRoughnessMapTransform))),f.clearcoat>0&&(g.clearcoat.value=f.clearcoat,g.clearcoatRoughness.value=f.clearcoatRoughness,f.clearcoatMap&&(g.clearcoatMap.value=f.clearcoatMap,n(f.clearcoatMap,g.clearcoatMapTransform)),f.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=f.clearcoatRoughnessMap,n(f.clearcoatRoughnessMap,g.clearcoatRoughnessMapTransform)),f.clearcoatNormalMap&&(g.clearcoatNormalMap.value=f.clearcoatNormalMap,n(f.clearcoatNormalMap,g.clearcoatNormalMapTransform),g.clearcoatNormalScale.value.copy(f.clearcoatNormalScale),f.side===Vn&&g.clearcoatNormalScale.value.negate())),f.dispersion>0&&(g.dispersion.value=f.dispersion),f.iridescence>0&&(g.iridescence.value=f.iridescence,g.iridescenceIOR.value=f.iridescenceIOR,g.iridescenceThicknessMinimum.value=f.iridescenceThicknessRange[0],g.iridescenceThicknessMaximum.value=f.iridescenceThicknessRange[1],f.iridescenceMap&&(g.iridescenceMap.value=f.iridescenceMap,n(f.iridescenceMap,g.iridescenceMapTransform)),f.iridescenceThicknessMap&&(g.iridescenceThicknessMap.value=f.iridescenceThicknessMap,n(f.iridescenceThicknessMap,g.iridescenceThicknessMapTransform))),f.transmission>0&&(g.transmission.value=f.transmission,g.transmissionSamplerMap.value=x.texture,g.transmissionSamplerSize.value.set(x.width,x.height),f.transmissionMap&&(g.transmissionMap.value=f.transmissionMap,n(f.transmissionMap,g.transmissionMapTransform)),g.thickness.value=f.thickness,f.thicknessMap&&(g.thicknessMap.value=f.thicknessMap,n(f.thicknessMap,g.thicknessMapTransform)),g.attenuationDistance.value=f.attenuationDistance,g.attenuationColor.value.copy(f.attenuationColor)),f.anisotropy>0&&(g.anisotropyVector.value.set(f.anisotropy*Math.cos(f.anisotropyRotation),f.anisotropy*Math.sin(f.anisotropyRotation)),f.anisotropyMap&&(g.anisotropyMap.value=f.anisotropyMap,n(f.anisotropyMap,g.anisotropyMapTransform))),g.specularIntensity.value=f.specularIntensity,g.specularColor.value.copy(f.specularColor),f.specularColorMap&&(g.specularColorMap.value=f.specularColorMap,n(f.specularColorMap,g.specularColorMapTransform)),f.specularIntensityMap&&(g.specularIntensityMap.value=f.specularIntensityMap,n(f.specularIntensityMap,g.specularIntensityMapTransform))}function v(g,f){f.matcap&&(g.matcap.value=f.matcap)}function p(g,f){const x=e.get(f).light;g.referencePosition.value.setFromMatrixPosition(x.matrixWorld),g.nearDistance.value=x.shadow.camera.near,g.farDistance.value=x.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function sz(t,e,n,r){let i={},s={},o=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(x,_){const y=_.program;r.uniformBlockBinding(x,y)}function c(x,_){let y=i[x.id];y===void 0&&(v(x),y=u(x),i[x.id]=y,x.addEventListener("dispose",g));const T=_.program;r.updateUBOMapping(x,T);const M=e.render.frame;s[x.id]!==M&&(d(x),s[x.id]=M)}function u(x){const _=h();x.__bindingPointIndex=_;const y=t.createBuffer(),T=x.__size,M=x.usage;return t.bindBuffer(t.UNIFORM_BUFFER,y),t.bufferData(t.UNIFORM_BUFFER,T,M),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,_,y),y}function h(){for(let x=0;x<a;x++)if(o.indexOf(x)===-1)return o.push(x),x;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function d(x){const _=i[x.id],y=x.uniforms,T=x.__cache;t.bindBuffer(t.UNIFORM_BUFFER,_);for(let M=0,S=y.length;M<S;M++){const b=Array.isArray(y[M])?y[M]:[y[M]];for(let E=0,w=b.length;E<w;E++){const R=b[E];if(m(R,M,E,T)===!0){const z=R.__offset,H=Array.isArray(R.value)?R.value:[R.value];let B=0;for(let V=0;V<H.length;V++){const I=H[V],F=p(I);typeof I=="number"||typeof I=="boolean"?(R.__data[0]=I,t.bufferSubData(t.UNIFORM_BUFFER,z+B,R.__data)):I.isMatrix3?(R.__data[0]=I.elements[0],R.__data[1]=I.elements[1],R.__data[2]=I.elements[2],R.__data[3]=0,R.__data[4]=I.elements[3],R.__data[5]=I.elements[4],R.__data[6]=I.elements[5],R.__data[7]=0,R.__data[8]=I.elements[6],R.__data[9]=I.elements[7],R.__data[10]=I.elements[8],R.__data[11]=0):(I.toArray(R.__data,B),B+=F.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,z,R.__data)}}}t.bindBuffer(t.UNIFORM_BUFFER,null)}function m(x,_,y,T){const M=x.value,S=_+"_"+y;if(T[S]===void 0)return typeof M=="number"||typeof M=="boolean"?T[S]=M:T[S]=M.clone(),!0;{const b=T[S];if(typeof M=="number"||typeof M=="boolean"){if(b!==M)return T[S]=M,!0}else if(b.equals(M)===!1)return b.copy(M),!0}return!1}function v(x){const _=x.uniforms;let y=0;const T=16;for(let S=0,b=_.length;S<b;S++){const E=Array.isArray(_[S])?_[S]:[_[S]];for(let w=0,R=E.length;w<R;w++){const z=E[w],H=Array.isArray(z.value)?z.value:[z.value];for(let B=0,V=H.length;B<V;B++){const I=H[B],F=p(I),A=y%T;A!==0&&T-A0&&(y+=T-M),x.__size=y,x.__cache={},this}function p(x){const _={boundary:0,storage:0};return typeof x=="number"||typeof x=="boolean"?(_.boundary=4,_.storage=4):x.isVector2?(_.boundary=8,_.storage=8):x.isVector3||x.isColor?(_.boundary=16,_.storage=12):x.isVector4?(_.boundary=16,_.storage=16):x.isMatrix3?(_.boundary=48,_.storage=48):x.isMatrix4?(_.boundary=64,_.storage=64):x.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",x),_}function g(x){const _=x.target;_.removeEventListener("dispose",g);const y=o.indexOf(_.__bindingPointIndex);o.splice(y,1),t.deleteBuffer(i[_.id]),delete i[_.id],delete s[_.id]}function f(){for(const x in i)t.deleteBuffer(i[x]);o=[],i={},s={}}return{bind:l,update:c,dispose:f}}class oz{constructor(e={}){const{canvas:n=ZO(),context:r=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:h=!1}=e;this.isWebGLRenderer=!0;let d;if(r!==null){if(typeof WebGLRenderingContext<"u"&&r instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");d=r.getContextAttributes().alpha}else d=o;const m=new Uint32Array(4),v=new Int32Array(4);let p=null,g=null;const f=[],x=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=qr,this.toneMapping=bs,this.toneMappingExposure=1;const _=this;let y=!1,T=0,M=0,S=null,b=-1,E=null;const w=new rn,R=new rn;let z=null;const H=new dt(0);let B=0,V=n.width,I=n.height,F=1,A=null,G=null;const Y=new rn(0,0,V,I),W=new rn(0,0,V,I);let J=!1;const me=new h2;let $=!1,Q=!1;const le=new jt,he=new se,Pe={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Le=!1;function Me(){return S===null?F:1}let O=r;function U(P,X){return n.getContext(P,X)}try{const P={alpha:!0,depth:i,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:h};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${_v}`),n.addEventListener("webglcontextlost",xe,!1),n.addEventListener("webglcontextrestored",te,!1),n.addEventListener("webglcontextcreationerror",fe,!1),O===null){const X="webgl2";if(O=U(X,P),O===null)throw U(X)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(P){throw console.error("THREE.WebGLRenderer: "+P.message),P}let j,ce,ie,Ee,Ae,pe,Se,N,C,Z,ue,re,q,_e,oe,de,ze,ve,ye,Te,Fe,Re,We,$e;function gt(){j=new pF(O),j.init(),Re=new K6(O,j),ce=new lF(O,j,e,Re),ie=new Y6(O),Ee=new vF(O),Ae=new I6,pe=new q6(O,j,ie,Ae,ce,Re,Ee),Se=new uF(_),N=new hF(_),C=new EU(O),We=new oF(O,C),Z=new mF(O,C,Ee,We),ue=new xF(O,Z,C,Ee),ye=new _F(O,ce,pe),de=new cF(Ae),re=new L6(_,Se,N,j,ce,We,de),q=new iz(_,Ae),_e=new U6,oe=new H6(j),ve=new sF(_,Se,N,ie,ue,d,l),ze=new X6(_,ue,ce),$e=new sz(O,Ee,ce,ie),Te=new aF(O,j,Ee),Fe=new gF(O,j,Ee),Ee.programs=re.programs,_.capabilities=ce,_.extensions=j,_.properties=Ae,_.renderLists=_e,_.shadowMap=ze,_.state=ie,_.info=Ee}gt();const k=new nz(_,O);this.xr=k,this.getContext=function(){return O},this.getContextAttributes=function(){return O.getContextAttributes()},this.forceContextLoss=function(){const P=j.get("WEBGL_lose_context");P&&P.loseContext()},this.forceContextRestore=function(){const P=j.get("WEBGL_lose_context");P&&P.restoreContext()},this.getPixelRatio=function(){return F},this.setPixelRatio=function(P){P!==void 0&&(F=P,this.setSize(V,I,!1))},this.getSize=function(P){return P.set(V,I)},this.setSize=function(P,X,ee=!0){if(k.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}V=P,I=X,n.width=Math.floor(P*F),n.height=Math.floor(X*F),ee===!0&&(n.style.width=P+"px",n.style.height=X+"px"),this.setViewport(0,0,P,X)},this.getDrawingBufferSize=function(P){return P.set(V*F,I*F).floor()},this.setDrawingBufferSize=function(P,X,ee){V=P,I=X,F=ee,n.width=Math.floor(P*ee),n.height=Math.floor(X*ee),this.setViewport(0,0,P,X)},this.getCurrentViewport=function(P){return P.copy(w)},this.getViewport=function(P){return P.copy(Y)},this.setViewport=function(P,X,ee,ne){P.isVector4?Y.set(P.x,P.y,P.z,P.w):Y.set(P,X,ee,ne),ie.viewport(w.copy(Y).multiplyScalar(F).round())},this.getScissor=function(P){return P.copy(W)},this.setScissor=function(P,X,ee,ne){P.isVector4?W.set(P.x,P.y,P.z,P.w):W.set(P,X,ee,ne),ie.scissor(R.copy(W).multiplyScalar(F).round())},this.getScissorTest=function(){return J},this.setScissorTest=function(P){ie.setScissorTest(J=P)},this.setOpaqueSort=function(P){A=P},this.setTransparentSort=function(P){G=P},this.getClearColor=function(P){return P.copy(ve.getClearColor())},this.setClearColor=function(){ve.setClearColor.apply(ve,arguments)},this.getClearAlpha=function(){return ve.getClearAlpha()},this.setClearAlpha=function(){ve.setClearAlpha.apply(ve,arguments)},this.clear=function(P=!0,X=!0,ee=!0){let ne=0;if(P){let K=!1;if(S!==null){const Ce=S.texture.format;K=Ce===QM||Ce===JM||Ce===ZM}if(K){const Ce=S.texture.type,Ie=Ce===Rs||Ce===Za||Ce===of||Ce===Ja||Ce===qM||Ce===KM,ke=ve.getClearColor(),Be=ve.getClearAlpha(),je=ke.r,Xe=ke.g,Ge=ke.b;Ie?(m[0]=je,m[1]=Xe,m[2]=Ge,m[3]=Be,O.clearBufferuiv(O.COLOR,0,m)):(v[0]=je,v[1]=Xe,v[2]=Ge,v[3]=Be,O.clearBufferiv(O.COLOR,0,v))}else ne|=O.COLOR_BUFFER_BIT}X&&(ne|=O.DEPTH_BUFFER_BIT),ee&&(ne|=O.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),O.clear(ne)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){n.removeEventListener("webglcontextlost",xe,!1),n.removeEventListener("webglcontextrestored",te,!1),n.removeEventListener("webglcontextcreationerror",fe,!1),_e.dispose(),oe.dispose(),Ae.dispose(),Se.dispose(),N.dispose(),ue.dispose(),We.dispose(),$e.dispose(),re.dispose(),k.dispose(),k.removeEventListener("sessionstart",Wr),k.removeEventListener("sessionend",$r),ks.stop()};function xe(P){P.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),y=!0}function te(){console.log("THREE.WebGLRenderer: Context Restored."),y=!1;const P=Ee.autoReset,X=ze.enabled,ee=ze.autoUpdate,ne=ze.needsUpdate,K=ze.type;gt(),Ee.autoReset=P,ze.enabled=X,ze.autoUpdate=ee,ze.needsUpdate=ne,ze.type=K}function fe(P){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",P.statusMessage)}function we(P){const X=P.target;X.removeEventListener("dispose",we),He(X)}function He(P){nt(P),Ae.remove(P)}function nt(P){const X=Ae.get(P).programs;X!==void 0&&(X.forEach(function(ee){re.releaseProgram(ee)}),P.isShaderMaterial&&re.releaseShaderCache(P))}this.renderBufferDirect=function(P,X,ee,ne,K,Ce){X===null&&(X=Pe);const Ie=K.isMesh&&K.matrixWorld.determinant()<0,ke=b2(P,X,ee,ne,K);ie.setMaterial(ne,Ie);let Be=ee.index,je=1;if(ne.wireframe===!0){if(Be=Z.getWireframeAttribute(ee),Be===void 0)return;je=2}const Xe=ee.drawRange,Ge=ee.attributes.position;let st=Xe.start*je,Pt=(Xe.start+Xe.count)*je;Ce!==null&&(st=Math.max(st,Ce.start*je),Pt=Math.min(Pt,(Ce.start+Ce.count)*je)),Be!==null?(st=Math.max(st,0),Pt=Math.min(Pt,Be.count)):Ge!=null&&(st=Math.max(st,0),Pt=Math.min(Pt,Ge.count));const Dt=Pt-st;if(Dt<0||Dt===1/0)return;We.setup(K,ne,ke,ee,Be);let $n,ot=Te;if(Be!==null&&($n=C.get(Be),ot=Fe,ot.setIndex($n)),K.isMesh)ne.wireframe===!0?(ie.setLineWidth(ne.wireframeLinewidth*Me()),ot.setMode(O.LINES)):ot.setMode(O.TRIANGLES);else if(K.isLine){let Ve=ne.linewidth;Ve===void 0&&(Ve=1),ie.setLineWidth(Ve*Me()),K.isLineSegments?ot.setMode(O.LINES):K.isLineLoop?ot.setMode(O.LINE_LOOP):ot.setMode(O.LINE_STRIP)}else K.isPoints?ot.setMode(O.POINTS):K.isSprite&&ot.setMode(O.TRIANGLES);if(K.isBatchedMesh)K._multiDrawInstances!==null?ot.renderMultiDrawInstances(K._multiDrawStarts,K._multiDrawCounts,K._multiDrawCount,K._multiDrawInstances):ot.renderMultiDraw(K._multiDrawStarts,K._multiDrawCounts,K._multiDrawCount);else if(K.isInstancedMesh)ot.renderInstances(st,Dt,K.count);else if(ee.isInstancedBufferGeometry){const Ve=ee._maxInstanceCount!==void 0?ee._maxInstanceCount:1/0,xn=Math.min(ee.instanceCount,Ve);ot.renderInstances(st,Dt,xn)}else ot.render(st,Dt)};function Ot(P,X,ee){P.transparent===!0&&P.side===bi&&P.forceSinglePass===!1?(P.side=Vn,P.needsUpdate=!0,qc(P,X,ee),P.side=As,P.needsUpdate=!0,qc(P,X,ee),P.side=bi):qc(P,X,ee)}this.compile=function(P,X,ee=null){ee===null&&(ee=P),g=oe.get(ee),g.init(X),x.push(g),ee.traverseVisible(function(K){K.isLight&&K.layers.test(X.layers)&&(g.pushLight(K),K.castShadow&&g.pushShadow(K))}),P!==ee&&P.traverseVisible(function(K){K.isLight&&K.layers.test(X.layers)&&(g.pushLight(K),K.castShadow&&g.pushShadow(K))}),g.setupLights();const ne=new Set;return P.traverse(function(K){const Ce=K.material;if(Ce)if(Array.isArray(Ce))for(let Ie=0;Ie{function Ce(){if(ne.forEach(function(Ie){Ae.get(Ie).currentProgram.isReady()&&ne.delete(Ie)}),ne.size===0){K(P);return}setTimeout(Ce,10)}j.get("KHR_parallel_shader_compile")!==null?Ce():setTimeout(Ce,10)})};let qt=null;function ct(P){qt&&qt(P)}function Wr(){ks.stop()}function $r(){ks.start()}const ks=new p2;ks.setAnimationLoop(ct),typeof self0)for(let Ie=0,ke=Ce.length;Ie<ke;Ie++){const Be=Ce[Ie];bv(ne,K,P,Be)}Le&&ve.render(P);for(let Ie=0,ke=Ce.length;Ie0&&bv(ne,K,P,X),Le&&ve.render(P),wv(p,P,X);S!==null&&(pe.updateMultisampleRenderTarget(S),pe.updateRenderTargetMipmap(S)),P.isScene===!0&&P.onAfterRender(_,P,X),We.resetDefaultState(),b=-1,E=null,x.pop(),x.length>0?(g=x[x.length-1],$===!0&&de.setGlobalState(_.clippingPlanes,g.state.camera)):g=null,f.pop(),f.length>0?p=f[f.length-1]:p=null};function nh(P,X,ee,ne){if(P.visible===!1)return;if(P.layers.test(X.layers)){if(P.isGroup)ee=P.renderOrder;else if(P.isLOD)P.autoUpdate===!0&&P.update(X);else if(P.isLight)g.pushLight(P),P.castShadow&&g.pushShadow(P);else if(P.isSprite){if(!P.frustumCulled||me.intersectsSprite(P)){ne&&he.setFromMatrixPosition(P.matrixWorld).applyMatrix4(le);const Ie=ue.update(P),ke=P.material;ke.visible&&p.push(P,Ie,ke,ee,he.z,null)}}else if((P.isMesh||P.isLine||P.isPoints)&&(!P.frustumCulled||me.intersectsObject(P))){const Ie=ue.update(P),ke=P.material;if(ne&&(P.boundingSphere!==void 0?(P.boundingSphere===null&&P.computeBoundingSphere(),he.copy(P.boundingSphere.center)):(Ie.boundingSphere===null&&Ie.computeBoundingSphere(),he.copy(Ie.boundingSphere.center)),he.applyMatrix4(P.matrixWorld).applyMatrix4(le)),Array.isArray(ke)){const Be=Ie.groups;for(let je=0,Xe=Be.length;je<Xe;je++){const Ge=Be[je],st=ke[Ge.materialIndex];st&&st.visible&&p.push(P,Ie,st,ee,he.z,Ge)}}else ke.visible&&p.push(P,Ie,ke,ee,he.z,null)}}const Ce=P.children;for(let Ie=0,ke=Ce.length;Ie0&&Yc(K,X,ee),Ce.length>0&&Yc(Ce,X,ee),Ie.length>0&&Yc(Ie,X,ee),ie.buffers.depth.setTest(!0),ie.buffers.depth.setMask(!0),ie.buffers.color.setMask(!0),ie.setPolygonOffset(!1)}function bv(P,X,ee,ne){if((ee.isScene===!0?ee.overrideMaterial:null)!==null)return;g.state.transmissionRenderTarget[ne.id]===void 0&&(g.state.transmissionRenderTarget[ne.id]=new Ro(1,1,{generateMipmaps:!0,type:j.has("EXT_color_buffer_half_float")||j.has("EXT_color_buffer_float")?Jf:Rs,minFilter:ao,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:at.workingColorSpace}));const Ce=g.state.transmissionRenderTarget[ne.id],Ie=ne.viewport||w;Ce.setSize(Ie.z,Ie.w);const ke=_.getRenderTarget();_.setRenderTarget(Ce),_.getClearColor(H),B=_.getClearAlpha(),B<1&&_.setClearColor(16777215,.5),Le?ve.render(ee):_.clear();const Be=_.toneMapping;_.toneMapping=bs;const je=ne.viewport;if(ne.viewport!==void 0&&(ne.viewport=void 0),g.setupLightsView(ne),$===!0&&de.setGlobalState(_.clippingPlanes,ne),Yc(P,ee,ne),pe.updateMultisampleRenderTarget(Ce),pe.updateRenderTargetMipmap(Ce),j.has("WEBGL_multisampled_render_to_texture")===!1){let Xe=!1;for(let Ge=0,st=X.length;Ge<st;Ge++){const Pt=X[Ge],Dt=Pt.object,$n=Pt.geometry,ot=Pt.material,Ve=Pt.group;if(ot.side===bi&&Dt.layers.test(ne.layers)){const xn=ot.side;ot.side=Vn,ot.needsUpdate=!0,Ev(Dt,ee,ne,$n,ot,Ve),ot.side=xn,ot.needsUpdate=!0,Xe=!0}}Xe===!0&&(pe.updateMultisampleRenderTarget(Ce),pe.updateRenderTargetMipmap(Ce))}_.setRenderTarget(ke),_.setClearColor(H,B),je!==void 0&&(ne.viewport=je),_.toneMapping=Be}function Yc(P,X,ee){const ne=X.isScene===!0?X.overrideMaterial:null;for(let K=0,Ce=P.length;K0),Ge=!!ee.morphAttributes.position,st=!!ee.morphAttributes.normal,Pt=!!ee.morphAttributes.color;let Dt=bs;ne.toneMapped&&(S===null||S.isXRRenderTarget===!0)&&(Dt=_.toneMapping);const $n=ee.morphAttributes.position||ee.morphAttributes.normal||ee.morphAttributes.color,ot=$n!==void 0?$n.length:0,Ve=Ae.get(ne),xn=g.state.lights;if($===!0&&(Q===!0||P!==E)){const cr=P===E&&ne.id===b;de.setState(ne,P,cr)}let ut=!1;ne.version===Ve.__version?(Ve.needsLights&&Ve.lightsStateVersion!==xn.state.version||Ve.outputColorSpace!==ke||K.isBatchedMesh&&Ve.batching===!1||!K.isBatchedMesh&&Ve.batching===!0||K.isBatchedMesh&&Ve.batchingColor===!0&&K.colorTexture===null||K.isBatchedMesh&&Ve.batchingColor===!1&&K.colorTexture!==null||K.isInstancedMesh&&Ve.instancing===!1||!K.isInstancedMesh&&Ve.instancing===!0||K.isSkinnedMesh&&Ve.skinning===!1||!K.isSkinnedMesh&&Ve.skinning===!0||K.isInstancedMesh&&Ve.instancingColor===!0&&K.instanceColor===null||K.isInstancedMesh&&Ve.instancingColor===!1&&K.instanceColor!==null||K.isInstancedMesh&&Ve.instancingMorph===!0&&K.morphTexture===null||K.isInstancedMesh&&Ve.instancingMorph===!1&&K.morphTexture!==null||Ve.envMap!==Be||ne.fog===!0&&Ve.fog!==Ce||Ve.numClippingPlanes!==void 0&&(Ve.numClippingPlanes!==de.numPlanes||Ve.numIntersection!==de.numIntersection)||Ve.vertexAlphas!==je||Ve.vertexTangents!==Xe||Ve.morphTargets!==Ge||Ve.morphNormals!==st||Ve.morphColors!==Pt||Ve.toneMapping!==Dt||Ve.morphTargetsCount!==ot)&&(ut=!0):(ut=!0,Ve.__version=ne.version);let ui=Ve.currentProgram;ut===!0&&(ui=qc(ne,X,K));let Kc=!1,Fs=!1,rh=!1;const Kt=ui.getUniforms(),Vi=Ve.uniforms;if(ie.useProgram(ui.program)&&(Kc=!0,Fs=!0,rh=!0),ne.id!==b&&(b=ne.id,Fs=!0),Kc||E!==P){Kt.setValue(O,"projectionMatrix",P.projectionMatrix),Kt.setValue(O,"viewMatrix",P.matrixWorldInverse);const cr=Kt.map.cameraPosition;cr!==void 0&&cr.setValue(O,he.setFromMatrixPosition(P.matrixWorld)),ce.logarithmicDepthBuffer&&Kt.setValue(O,"logDepthBufFC",2/(Math.log(P.far+1)/Math.LN2)),(ne.isMeshPhongMaterial||ne.isMeshToonMaterial||ne.isMeshLambertMaterial||ne.isMeshBasicMaterial||ne.isMeshStandardMaterial||ne.isShaderMaterial)&&Kt.setValue(O,"isOrthographic",P.isOrthographicCamera===!0),E!==P&&(E=P,Fs=!0,rh=!0)}if(K.isSkinnedMesh){Kt.setOptional(O,K,"bindMatrix"),Kt.setOptional(O,K,"bindMatrixInverse");const cr=K.skeleton;cr&&(cr.boneTexture===null&&cr.computeBoneTexture(),Kt.setValue(O,"boneTexture",cr.boneTexture,pe))}K.isBatchedMesh&&(Kt.setOptional(O,K,"batchingTexture"),Kt.setValue(O,"batchingTexture",K._matricesTexture,pe),Kt.setOptional(O,K,"batchingColorTexture"),K._colorsTexture!==null&&Kt.setValue(O,"batchingColorTexture",K._colorsTexture,pe));const ih=ee.morphAttributes;if((ih.position!==void 0||ih.normal!==void 0||ih.color!==void 0)&&ye.update(K,ee,ui),(Fs||Ve.receiveShadow!==K.receiveShadow)&&(Ve.receiveShadow=K.receiveShadow,Kt.setValue(O,"receiveShadow",K.receiveShadow)),ne.isMeshGouraudMaterial&&ne.envMap!==null&&(Vi.envMap.value=Be,Vi.flipEnvMap.value=Be.isCubeTexture&&Be.isRenderTargetTexture===!1?-1:1),ne.isMeshStandardMaterial&&ne.envMap===null&&X.environment!==null&&(Vi.envMapIntensity.value=X.environmentIntensity),Fs&&(Kt.setValue(O,"toneMappingExposure",_.toneMappingExposure),Ve.needsLights&&E2(Vi,rh),Ce&&ne.fog===!0&&q.refreshFogUniforms(Vi,Ce),q.refreshMaterialUniforms(Vi,ne,F,I,g.state.transmissionRenderTarget[P.id]),vd.upload(O,Mv(Ve),Vi,pe)),ne.isShaderMaterial&&ne.uniformsNeedUpdate===!0&&(vd.upload(O,Mv(Ve),Vi,pe),ne.uniformsNeedUpdate=!1),ne.isSpriteMaterial&&Kt.setValue(O,"center",K.center),Kt.setValue(O,"modelViewMatrix",K.modelViewMatrix),Kt.setValue(O,"normalMatrix",K.normalMatrix),Kt.setValue(O,"modelMatrix",K.matrixWorld),ne.isShaderMaterial||ne.isRawShaderMaterial){const cr=ne.uniformsGroups;for(let sh=0,T2=cr.length;sh0&&pe.useMultisampledRTT(P)===!1?K=Ae.get(P).__webglMultisampledFramebuffer:Array.isArray(Xe)?K=Xe[ee]:K=Xe,w.copy(P.viewport),R.copy(P.scissor),z=P.scissorTest}else w.copy(Y).multiplyScalar(F).floor(),R.copy(W).multiplyScalar(F).floor(),z=J;if(ie.bindFramebuffer(O.FRAMEBUFFER,K)&&ne&&ie.drawBuffers(P,K),ie.viewport(w),ie.scissor(R),ie.setScissorTest(z),Ce){const Be=Ae.get(P.texture);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_CUBE_MAP_POSITIVE_X+X,Be.__webglTexture,ee)}else if(Ie){const Be=Ae.get(P.texture),je=X||0;O.framebufferTextureLayer(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,Be.__webglTexture,ee||0,je)}b=-1},this.readRenderTargetPixels=function(P,X,ee,ne,K,Ce,Ie){if(!(P&&P.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ke=Ae.get(P).__webglFramebuffer;if(P.isWebGLCubeRenderTarget&&Ie!==void 0&&(ke=ke[Ie]),ke){ie.bindFramebuffer(O.FRAMEBUFFER,ke);try{const Be=P.texture,je=Be.format,Xe=Be.type;if(!ce.textureFormatReadable(je)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!ce.textureTypeReadable(Xe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}X>=0&&X=0&&ee=0&&X=0&&ee<=P.height-K){const Ge=O.createBuffer();O.bindBuffer(O.PIXEL_PACK_BUFFER,Ge),O.bufferData(O.PIXEL_PACK_BUFFER,Ce.byteLength,O.STREAM_READ),O.readPixels(X,ee,ne,K,Re.convert(je),Re.convert(Xe),0),O.flush();const st=O.fenceSync(O.SYNC_GPU_COMMANDS_COMPLETE,0);await JO(O,st,4);try{O.bindBuffer(O.PIXEL_PACK_BUFFER,Ge),O.getBufferSubData(O.PIXEL_PACK_BUFFER,0,Ce)}finally{O.deleteBuffer(Ge),O.deleteSync(st)}return Ce}}finally{const Be=S!==null?Ae.get(S).__webglFramebuffer:null;ie.bindFramebuffer(O.FRAMEBUFFER,Be)}}},this.copyFramebufferToTexture=function(P,X=null,ee=0){P.isTexture!==!0&&(console.warn("WebGLRenderer: copyFramebufferToTexture function signature has changed."),X=arguments[0]||null,P=arguments[1]);const ne=Math.pow(2,-ee),K=Math.floor(P.image.width*ne),Ce=Math.floor(P.image.height*ne),Ie=X!==null?X.x:0,ke=X!==null?X.y:0;pe.setTexture2D(P,0),O.copyTexSubImage2D(O.TEXTURE_2D,ee,0,0,Ie,ke,K,Ce),ie.unbindTexture()},this.copyTextureToTexture=function(P,X,ee=null,ne=null,K=0){P.isTexture!==!0&&(console.warn("WebGLRenderer: copyTextureToTexture function signature has changed."),ne=arguments[0]||null,P=arguments[1],X=arguments[2],K=arguments[3]||0,ee=null);let Ce,Ie,ke,Be,je,Xe;ee!==null?(Ce=ee.max.x-ee.min.x,Ie=ee.max.y-ee.min.y,ke=ee.min.x,Be=ee.min.y):(Ce=P.image.width,Ie=P.image.height,ke=0,Be=0),ne!==null?(je=ne.x,Xe=ne.y):(je=0,Xe=0);const Ge=Re.convert(X.format),st=Re.convert(X.type);pe.setTexture2D(X,0),O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL,X.flipY),O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL,X.premultiplyAlpha),O.pixelStorei(O.UNPACK_ALIGNMENT,X.unpackAlignment);const Pt=O.getParameter(O.UNPACK_ROW_LENGTH),Dt=O.getParameter(O.UNPACK_IMAGE_HEIGHT),$n=O.getParameter(O.UNPACK_SKIP_PIXELS),ot=O.getParameter(O.UNPACK_SKIP_ROWS),Ve=O.getParameter(O.UNPACK_SKIP_IMAGES),xn=P.isCompressedTexture?P.mipmaps[K]:P.image;O.pixelStorei(O.UNPACK_ROW_LENGTH,xn.width),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,xn.height),O.pixelStorei(O.UNPACK_SKIP_PIXELS,ke),O.pixelStorei(O.UNPACK_SKIP_ROWS,Be),P.isDataTexture?O.texSubImage2D(O.TEXTURE_2D,K,je,Xe,Ce,Ie,Ge,st,xn.data):P.isCompressedTexture?O.compressedTexSubImage2D(O.TEXTURE_2D,K,je,Xe,xn.width,xn.height,Ge,xn.data):O.texSubImage2D(O.TEXTURE_2D,K,je,Xe,Ge,st,xn),O.pixelStorei(O.UNPACK_ROW_LENGTH,Pt),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,Dt),O.pixelStorei(O.UNPACK_SKIP_PIXELS,$n),O.pixelStorei(O.UNPACK_SKIP_ROWS,ot),O.pixelStorei(O.UNPACK_SKIP_IMAGES,Ve),K===0&&X.generateMipmaps&&O.generateMipmap(O.TEXTURE_2D),ie.unbindTexture()},this.copyTextureToTexture3D=function(P,X,ee=null,ne=null,K=0){P.isTexture!==!0&&(console.warn("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ee=arguments[0]||null,ne=arguments[1]||null,P=arguments[2],X=arguments[3],K=arguments[4]||0);let Ce,Ie,ke,Be,je,Xe,Ge,st,Pt;const Dt=P.isCompressedTexture?P.mipmaps[K]:P.image;ee!==null?(Ce=ee.max.x-ee.min.x,Ie=ee.max.y-ee.min.y,ke=ee.max.z-ee.min.z,Be=ee.min.x,je=ee.min.y,Xe=ee.min.z):(Ce=Dt.width,Ie=Dt.height,ke=Dt.depth,Be=0,je=0,Xe=0),ne!==null?(Ge=ne.x,st=ne.y,Pt=ne.z):(Ge=0,st=0,Pt=0);const $n=Re.convert(X.format),ot=Re.convert(X.type);let Ve;if(X.isData3DTexture)pe.setTexture3D(X,0),Ve=O.TEXTURE_3D;else if(X.isDataArrayTexture||X.isCompressedArrayTexture)pe.setTexture2DArray(X,0),Ve=O.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL,X.flipY),O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL,X.premultiplyAlpha),O.pixelStorei(O.UNPACK_ALIGNMENT,X.unpackAlignment);const xn=O.getParameter(O.UNPACK_ROW_LENGTH),ut=O.getParameter(O.UNPACK_IMAGE_HEIGHT),ui=O.getParameter(O.UNPACK_SKIP_PIXELS),Kc=O.getParameter(O.UNPACK_SKIP_ROWS),Fs=O.getParameter(O.UNPACK_SKIP_IMAGES);O.pixelStorei(O.UNPACK_ROW_LENGTH,Dt.width),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,Dt.height),O.pixelStorei(O.UNPACK_SKIP_PIXELS,Be),O.pixelStorei(O.UNPACK_SKIP_ROWS,je),O.pixelStorei(O.UNPACK_SKIP_IMAGES,Xe),P.isDataTexture||P.isData3DTexture?O.texSubImage3D(Ve,K,Ge,st,Pt,Ce,Ie,ke,$n,ot,Dt.data):X.isCompressedArrayTexture?O.compressedTexSubImage3D(Ve,K,Ge,st,Pt,Ce,Ie,ke,$n,Dt.data):O.texSubImage3D(Ve,K,Ge,st,Pt,Ce,Ie,ke,$n,ot,Dt),O.pixelStorei(O.UNPACK_ROW_LENGTH,xn),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,ut),O.pixelStorei(O.UNPACK_SKIP_PIXELS,ui),O.pixelStorei(O.UNPACK_SKIP_ROWS,Kc),O.pixelStorei(O.UNPACK_SKIP_IMAGES,Fs),K===0&&X.generateMipmaps&&O.generateMipmap(Ve),ie.unbindTexture()},this.initRenderTarget=function(P){Ae.get(P).__webglFramebuffer===void 0&&pe.setupRenderTarget(P)},this.initTexture=function(P){P.isCubeTexture?pe.setTextureCube(P,0):P.isData3DTexture?pe.setTexture3D(P,0):P.isDataArrayTexture||P.isCompressedArrayTexture?pe.setTexture2DArray(P,0):pe.setTexture2D(P,0),ie.unbindTexture()},this.resetState=function(){T=0,M=0,S=null,ie.reset(),We.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ti}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===xv?"display-p3":"srgb",n.unpackColorSpace=at.workingColorSpace===Qf?"display-p3":"srgb"}}class az extends rr{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Oi,this.environmentIntensity=1,this.environmentRotation=new Oi,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}class ff{constructor(e){this.value=e}clone(){return new ff(this.value.clone===void 0?this.value:this.value.clone())}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:_v}}));typeof window{for(;t.children.length;){const e=t.children.pop();e&&(w2(e),t.remove(e))}t instanceof kr&&(t.geometry&&t.geometry.dispose(),t.material&&(Object.values(t.material).forEach(e=>{e&&typeof e.dispose=="function"&&e.dispose()}),t.material.dispose()))};function lz(){const t=D.useRef();return D.useEffect(()=>{const e=t.current;let n,r,i,s;if(e){const o=e.clientWidth,a=e.clientHeight,l=o/a;n=new az,r=new m2(a*l/-2,a*l/2,a/2,a/-2,1,1e3),r.position.z=1,i=new oz({powerPreference:"high-performance",antialias:!1}),i.setSize(o,a),i.setPixelRatio(1),e.appendChild(i.domElement);const c=new Xc(1,1),u={uResolution:new ff(new it(o,a)),uTime:new ff(0)},h=new Ui({uniforms:u,vertexShader:` varying vec2 vUv; void main(){ vec3 pos = position.xyz; vec4 modelPosition = modelMatrix * vec4(pos, 1.); vec4 modelViewPosition = viewMatrix * modelPosition; vec4 projectionPosition = projectionMatrix * modelViewPosition; gl_Position = projectionPosition; gl_PointSize = (10.0 / - modelViewPosition.z); vUv = uv; } `,fragmentShader:` #define PI 3.1415926 uniform float uTime; uniform vec2 uResolution; varying vec2 vUv; vec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } vec4 mod289(vec4 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } vec4 permute(vec4 x) { return mod289(((x*34.0)+10.0)*x); } vec4 taylorInvSqrt(vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; } float snoise(vec3 v) { const vec2 C = vec2(1.0/6.0, 1.0/3.0) ; const vec4 D = vec4(0.0, 0.5, 1.0, 2.0); // First corner vec3 i = floor(v + dot(v, C.yyy) ); vec3 x0 = v - i + dot(i, C.xxx) ; // Other corners vec3 g = step(x0.yzx, x0.xyz); vec3 l = 1.0 - g; vec3 i1 = min( g.xyz, l.zxy ); vec3 i2 = max( g.xyz, l.zxy ); // x0 = x0 - 0.0 + 0.0 * C.xxx; // x1 = x0 - i1 + 1.0 * C.xxx; // x2 = x0 - i2 + 2.0 * C.xxx; // x3 = x0 - 1.0 + 3.0 * C.xxx; vec3 x1 = x0 - i1 + C.xxx; vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y // Permutations i = mod289(i); vec4 p = permute( permute( permute( i.z + vec4(0.0, i1.z, i2.z, 1.0 )) + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) + i.x + vec4(0.0, i1.x, i2.x, 1.0 )); // Gradients: 7x7 points over a square, mapped onto an octahedron. // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) float n_ = 0.142857142857; // 1.0/7.0 vec3 ns = n_ * D.wyz - D.xzx; vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7) vec4 x_ = floor(j * ns.z); vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N) vec4 x = x_ *ns.x + ns.yyyy; vec4 y = y_ *ns.x + ns.yyyy; vec4 h = 1.0 - abs(x) - abs(y); vec4 b0 = vec4( x.xy, y.xy ); vec4 b1 = vec4( x.zw, y.zw ); //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0; //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0; vec4 s0 = floor(b0)*2.0 + 1.0; vec4 s1 = floor(b1)*2.0 + 1.0; vec4 sh = -step(h, vec4(0.0)); vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ; vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ; vec3 p0 = vec3(a0.xy,h.x); vec3 p1 = vec3(a0.zw,h.y); vec3 p2 = vec3(a1.xy,h.z); vec3 p3 = vec3(a1.zw,h.w); //Normalise gradients vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3))); p0 *= norm.x; p1 *= norm.y; p2 *= norm.z; p3 *= norm.w; // Mix final noise value vec4 m = max(0.5 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0); m = m * m; return 105.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), dot(p2,x2), dot(p3,x3) ) ); } float color(vec2 xy, float a){ return a * snoise(vec3(xy, 0.1 * uTime)); } void main(){ vec2 uv = vUv; // Adjust uv based on aspect ratio to keep the circle round float aspectRatio = uResolution.x / uResolution.y; vec2 adjustedUv = uv; if (aspectRatio > 1.0) { adjustedUv.x = uv.x * aspectRatio + (1.0 - aspectRatio) * 0.5; } else { adjustedUv.y = uv.y / aspectRatio + (1.0 - 1.0 / aspectRatio) * 0.5; } // fbm vec3 xyz = vec3(adjustedUv, 0); vec2 step = vec2(1.3, 1.7); float n = color(xyz.xy, 0.7); n += 0.5 * color(xyz.xy * 2.0 - step, 0.7); n += 0.25 * color(xyz.xy * 4.0 - 2.0 * step, 0.7); n += 0.125 * color(xyz.xy * 8.0 - 3.0 * step, 0.7); // n += 0.0625 * color(xyz.xy * 16.0 - 4.0 * step, 0.7); // n += 0.03125 * color(xyz.xy * 32.0 - 5.0 * step, 0.7); vec4 noise = vec4(0.5 + 0.5 * n); float n2 = color(xyz.xy, 0.7); n2 += 1. * color(xyz.xy * 1.0 - step, 0.3); n2 += 1.5 * color(xyz.xy * 3.0 - 2.0 * step, 0.3); n2 += 1.25 * color(xyz.xy * 6.0 - 3.0 * step, 0.3); // n2 += 0.625 * color(xyz.xy * 16.0 - 4.0 * step, 0.7); // n2 += 0.3125 * color(xyz.xy * 32.0 - 5.0 * step, 0.7); vec4 noise2 = vec4(0.5 + 0.5 * n2); // circle mask float mask = 1.- smoothstep(0., 0.9, length(adjustedUv - vec2(0.5))); // mix noise and mask vec4 fog = mix(noise, vec4(-0.5), mask); vec4 fog2 = mix(noise2, vec4(-0.5), mask); // color vec4 fogColor = mix(fog * vec4(0., 0., 0., 1.), fog * vec4(1., 0., 0., 1.), 0.); fogColor.a *= 2.; vec4 fog2Color = mix(fog * vec4(0., 0., 0., 1.), fog * vec4(0., 0., 0., 1.), 1.); fog2Color.a *= 2.; vec4 final = mix(fogColor, fog2Color, 0.3); gl_FragColor = final; } `}),d=new kr(c,h);d.scale.set(o,a,1),n.add(d),i.setAnimationLoop(m=>{u.uTime.value=m*.001,i.render(n,r)}),s=new ResizeObserver(m=>{for(const v of m){const p=v.target.clientWidth,g=v.target.clientHeight,f=p/g;r.left=g*f/-2,r.right=g*f/2,r.top=g/2,r.bottom=g/-2,r.updateProjectionMatrix(),i.setSize(p,g),d.scale.set(p,g,1),u.uResolution.value.set(p,g)}}),s.observe(e)}return()=>{e&&(w2(n),i.dispose(),e.removeChild(e.childNodes[0]),s.disconnect())}},[]),L.jsx("div",{ref:t,className:"w-full h-full"})}function cz({pastIds:t,currentIds:e,focusId:n,onSelect:r}){const i=Jd("(min-width: 1024px)"),s=Jd("(min-width: 640px)"),o=D.useRef(null),a=D.useRef([]),l=D.useRef(!1),c=D.useRef({x:0,y:0}),u=D.useRef({x:0,y:0}),h=p=>{l.current=!1,o.current&&(o.current.querySelector(":scope > *").style.pointerEvents="auto"),window.removeEventListener("pointermove",d),window.removeEventListener("pointerup",h)},d=p=>{l.current&&(p.preventDefault(),o.current&&(o.current.scrollLeft=u.current.x+(c.current.x-p.clientX),o.current.scrollTop=u.current.y+(c.current.y-p.clientY),o.current.querySelector(":scope > *").style.pointerEvents="none"))},m=p=>{v0&&(l.current=!0,c.current={x:p.clientX,y:p.clientY},o.current&&(u.current={x:o.current.scrollLeft,y:o.current.scrollTop}),window.addEventListener("pointermove",d),window.addEventListener("pointerup",h))},v=(p,g)=>{o.current&&o.current.scrollTo({left:o.current.scrollWidth*p-o.current.clientWidth/2,top:o.current.scrollHeight*g-o.current.clientHeight/2,behavior:"smooth"})};return D.useEffect(()=>{o.current&&(o.current.scrollTop=(o.current.scrollHeight-o.current.clientHeight)/2,o.current.scrollLeft=(o.current.scrollWidth-o.current.clientWidth)/2)},[]),D.useEffect(()=>{if(n){const p=qe.map.items.find(g=>g.id===n);p&&v(p.position.x,p.position.y)}},[n]),D.useEffect(()=>{let p=new IntersectionObserver(g=>{g.forEach(f=>{f.intersectionRatio===1&&f.isIntersecting&&Yf.to(f.target,{opacity:1,duration:2})})},{threshold:[0,1]});return document.querySelectorAll(".location").forEach(g=>{p.observe(g)}),()=>{p.disconnect()}},[]),L.jsxs("div",{ref:o,className:Zn("scroll-wrapper w-full h-full overflow-hidden select-none",{"no-scrollbar overscroll-none overflow-auto":!v0}),onMouseDown:m,children:[L.jsx(WI,{ratio:i?1180/475:s?700/560:335/393,children:L.jsxs("div",{className:"absolute top-0 left-0 w-[2500px] h-[1255px] lg:w-[3500px] lg:h-[1757px]",children:[L.jsx("img",{src:"https://www.catchplay.com/campaigns/wp-content/uploads/2024/06/map-empty.webp",className:"absolute top-0 left-0 w-full h-full pointer-events-none"}),qe.map.items.map(p=>L.jsx("div",{ref:g=>a.current[p.id]=g,className:"location absolute -translate-x-1/2 -translate-y-1/2 text-white opacity-0",style:{left:`${p.position.x*100}%`,top:`${p.position.y*100}%`},onClick:()=>{v(p.position.x,p.position.y),r==null||r(p.id)},children:L.jsxs("button",{className:"flex items-center drop-shadow-lg",children:[L.jsx("div",{className:Zn("relative w-[70px] h-[70px] rounded-full overflow-hidden bg-black",{"border-2 border-solid border-[red]":e.includes(p.id)||t.includes(p.id)}),children:L.jsx("img",{className:"w-full h-full object-cover pointer-events-none",src:`https://www.catchplay.com/campaigns/wp-content/uploads/2024/06/${p.zhName}.png`})}),L.jsxs("p",{className:Zn("flex items-center justify-center gap-1 text-lg font-medium py-1 pl-8 pr-3 rounded-full bg-black leading-none -ml-6",{"bg-[red]":e.includes(p.id),"bg-transparent border-2 border-solid border-[red]":t.includes(p.id)}),children:[e.includes(p.id)&&L.jsx(Ft,{name:"location"}),p.name]})]})},p.id)),qe.map.area.map(p=>L.jsx("div",{className:`glitch glitch-style-${p.id} absolute -translate-x-1/2 -translate-y-1/2 w-[200px] h-[200px] lg:w-[250px] lg:h-[250px]`,style:{left:`${p.position.x*100}%`,top:`${p.position.y*100}%`},children:Array.from({length:5}).map((g,f)=>L.jsx("div",{className:"absolute top-0 left-0",style:{backgroundImage:`url(https://www.catchplay.com/campaigns/wp-content/uploads/2024/07/${p.name.replaceAll(" ","-")}.png)`}},f))},p.id))]})}),L.jsx("div",{className:"absolute top-0 left-0 w-full h-full pointer-events-none",children:L.jsx(lz,{})}),L.jsxs("div",{className:"absolute bottom-2 right-2 flex items-center gap-2 text-white text-xs font-medium pointer-events-none lg:right-6",children:["Geser untuk melihat lebih banyak",L.jsx(Ft,{className:"text-3xl",name:"cross"})]})]})}const ra=Object.values(qe.items);function uz({campaignId:t}){const{date:e}=Bg(),[n,r]=D.useState(ra.filter(l=>Ht(e).isAfter(l.date,"day")).map(l=>l.id)),[i,s]=D.useState(ra.filter(l=>Ht(e).isSame(l.date,"day")).map(l=>l.id)),[o,a]=D.useState((i==null?void 0:i[0])||ra[0].id);return D.useEffect(()=>{r(ra.filter(c=>Ht(e).isAfter(c.date,"day")).map(c=>c.id));const l=ra.filter(c=>Ht(e).isSame(c.date,"day")).map(c=>c.id);s(l),a((l==null?void 0:l[0])||ra[0].id)},[e]),L.jsx("div",{className:"map",children:L.jsx("div",{children:L.jsxs("div",{className:"border-2 border-solid border-[red] rounded-lg overflow-hidden lg:flex lg:flex-row-reverse lg:border-none",children:[L.jsxs("div",{className:"relative flex-1 flex items-end lg:w-2/3 lg:flex-col lg:items-stretch",children:[L.jsx("div",{className:"absolute top-0 left-0 w-full z-10 lg:relative lg:bg-black",children:L.jsx(HI,{pastIds:n,currentIds:i,focusId:o,onSelect:l=>{a(l)}})}),L.jsx("div",{className:"flex-1",children:L.jsx(cz,{pastIds:n,currentIds:i,focusId:o,onSelect:l=>{a(l)}})})]}),L.jsx("div",{className:"lg:shrink-0 lg:w-1/3",children:L.jsx(aI,{campaignId:t,focusId:o})})]})})})}function dz(){var t,e,n,r;return L.jsx("div",{className:"fixed bottom-0 left-0 w-full p-2 bg-black z-50 lg:p-4",children:L.jsxs("div",{className:"container flex justify-center items-center gap-2 lg:gap-14",children:[L.jsxs("div",{className:"gap-2 sm:flex sm:items-center lg:gap-14",children:[L.jsx("p",{className:"text-[red] font-bold text-sm sm:text-lg lg:text-xl",children:(e=(t=qe.fixedBannerSections)==null?void 0:t[0])==null?void 0:e.title}),L.jsx("p",{className:"text-xs text-white lg:text-sm",children:(r=(n=qe.fixedBannerSections)==null?void 0:n[0])==null?void 0:r.description})]}),L.jsx("a",{href:"https://www.catchplay.com/id/my-account/promocode-redeem?pc=PROMO75&autoRedeem=1&redirectUrl=www.catchplay.com",target:"_blank",className:"shrink-0 py-1.5 px-5 bg-cp text-white rounded-md text-xl font-bold hover:bg-white hover:text-cp transition-all duration-300",children:"Dapatkan Promo"})]})})}function fz(){const t=D.useRef(document.querySelector("#root")),[e,n]=D.useState(!1);return D.useEffect(()=>{const r=()=>{n(!0)};return document.querySelectorAll(".event-button").forEach(i=>{i.addEventListener("click",r)}),()=>{document.querySelectorAll(".event-button").forEach(i=>{i.removeEventListener("click",r)})}},[]),L.jsx(Uf,{open:e,onOpenChange:n,children:L.jsxs(kf,{container:t.current,children:[L.jsx(Ff,{className:"bg-black/70 fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),L.jsxs(zf,{className:"fixed top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] z-50 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",children:[L.jsx("div",{className:"w-[90vw] max-h-[70vh] max-w-[725px] overflow-auto bg-black py-10 px-4 rounded-xl border-2 border-solid border-[red] text-[#D9D9D9]",children:L.jsxs("div",{className:"flex flex-col items-start gap-7",children:[L.jsx("p",{className:"text-sm w-full whitespace-pre-wrap",children:`Periode : 3 Sept - 15 Oktober 2024 Cara Bermain: •⁠ ⁠Wajib memiliki akun CATCHPLAY+ di TV First Media-mu (silakan sign-up di akun First media milikmu jika belum terdaftar ya) •⁠ Buka IG kamu, dan ⁠Follow @firstmediaworld, @catchplayplus_id, dan like + repost postingan ini (pastikan IG kamu tidak private ya) •⁠ ⁠Vote episode favoritmu disini •⁠ ⁠Ajak dan tag 3 teman kamu untuk ikutan •⁠ ⁠Komen IG @firstmediaworld di posting-an ini episode pilihanmu beserta hashtag #KenaTerorUrbanHorror dan nomor ID First Media kamu. Contoh komen jawaban: [ID First Media] [Episode] #KenaTerorUrbanHorror [@3 Teman] Hadiah: a. Voucher TVOD CATCHPLAY+ 1 single rental untuk 10 pemenang `}),L.jsx("div",{className:"w-full flex flex-col gap-5 sm:flex-row sm:gap-2.5",children:L.jsxs("div",{className:"relative sm:w-1/2",children:[L.jsx("img",{className:"w-full",src:"https://www.catchplay.com/campaigns/wp-content/uploads/2024/07/id-prize-1.jpg"}),L.jsx("p",{className:"absolute bottom-2 left-2 font-bold text-sm text-[#d9d9d9]",children:"Voucher TVOD CATCHPLAY+ 1 single rental"})]})}),L.jsx("div",{children:L.jsx("p",{className:"text-xs whitespace-pre-wrap",children:`Syarat dan Ketentuan : 1. Pengumuman pemenang tanggal 30 Oktober 2024 melalui email dan story CATCHPLAY+ 2. Bila email tidak valid, maka peserta akan didiskualifikasi. Anda bisa mengganti email di dalam profil CATCHPLAY+ sebelum periode campaign berakhir 3. Semua hadiah yang diberikan pihak CATCHPLAY+ tidak bisa ditukar atau diuangkan 4. Pemenang pilihan CATCHPLAY+ adalah mutlak dan tidak dapat diubah 5. Penyelenggara campaign berhak untuk merubah campaign sewaktu-waktu. Campaign yang berlangsung sesuai dengan yang tercatat di halaman Campaign ini. `})})]})}),L.jsx(Lg,{asChild:!0,children:L.jsx("button",{className:"text-[#d3d3d3] absolute top-3 right-6","aria-label":"Close",children:L.jsx(Ft,{name:"close"})})})]})]})})}function hz({open:t}){const e=D.useRef(document.querySelector("#root")),[n,r]=D.useState(t);return D.useEffect(()=>{r(t)},[t]),L.jsx(Uf,{open:n,onOpenChange:r,children:L.jsxs(kf,{container:e.current,children:[L.jsx(Ff,{className:"bg-black/70 fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),L.jsx(zf,{className:"fixed top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] z-50 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] w-[90vw] sm:w-auto",children:L.jsx("div",{className:"py-[55px] px-3 bg-[#1c1c1c] text-xl text-white rounded-xl text-center sm:px-20 sm:py-7",children:"Untuk keperluan informasi pemenang, mohon untuk mendaftar akun CATCHPLAY+ terlebih dahulu"})})]})})}Ht.extend(aR);const d1=Ht("2024-09-03T00:00"),pz=Ht("2024-10-15T23:59"),f1=({className:t,id:e,campaignId:n,eligible:r,checked:i,onSelect:s,children:o})=>{const a=D.useRef(document.querySelector("#root")),[l,c]=D.useState(()=>{const u=new URLSearchParams(window.location.search).get("open");return u==="1"&&document.querySelector(".fixed-banner-section-2").scrollIntoView(),u===e});return L.jsxs(Uf,{open:l,onOpenChange:c,children:[L.jsx(sb,{asChild:!0,children:L.jsx("div",{className:Zn("w-full h-full",t),children:o})}),L.jsxs(kf,{container:a.current,children:[L.jsx(Ff,{className:"bg-black/70 fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),L.jsxs(zf,{className:"fixed top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] z-50 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",children:[L.jsx(QL,{id:e,campaignId:n,eligible:r,checked:i,onSelect:s}),L.jsx(Lg,{asChild:!0,children:L.jsx("button",{className:"text-[#d3d3d3] absolute top-3 right-3","aria-label":"Close",children:L.jsx(Ft,{name:"close"})})})]})]})]})};function mz(){var W,J,me,$,Q,le,he,Pe,Le,Me,O;const{date:t}=Bg(),e=D.useMemo(()=>!Ht(t).isBefore(d1),[t]),n=D.useMemo(()=>Ht(t).isAfter(pz),[t]),r=D.useMemo(()=>Ht(t).diff(Ht(d1).format("YYYY-MM-DD"),"day"),[t]),i=qe.campaignIds[r],s=D.useRef(),[o,a]=D.useState(new URLSearchParams(window.location.search).getAll("id")??[]),[l,c]=D.useState(!1),[u,h]=D.useState(!1),[d,m]=D.useState(!1),{isLoading:v,auth:p}=ZD(),{isLoading:g,data:f}=Sl(p!=null&&p.user?{url:"/membership/v3/graphql"}:null,({url:U})=>Yl.post(U,{query:`query getGroupMembers($input: GetGroupMembersInput!) { getGroupMembers(input: $input) { userStatus } } `,variables:{input:{type:""}}}),{revalidateOnFocus:!1}),{data:x,mutate:_,error:y}=Sl(i?{url:`/me/campaigns/${i}/eligibility`}:null,({url:U})=>wi.get(U),{revalidateOnFocus:!1}),T=(J=(W=x==null?void 0:x.data)==null?void 0:W.data)==null?void 0:J.eligible,{data:M}=Sl(i&&x&&!T?{url:`/me/campaigns/${i}/record`}:null,({url:U})=>wi.get(U),{revalidateOnFocus:!1}),{isLoading:S,data:b,error:E}=Sl(i?{url:`/campaigns/${i}/quizContents`}:e?{url:`/campaigns/${($=qe.campaignIds)==null?void 0:$[((me=qe.campaignIds)==null?void 0:me.length)-1]}/quizContents`}:null,({url:U})=>wi.get(U),{revalidateOnFocus:!1}),{isLoading:w,data:R,mutate:z,error:H}=Sl(e?{url:"/campaigns/sumQuizCounts"}:null,({url:U})=>wi.post(U,r>-1?qe.campaignIds.slice(0,r+1).concat(qe.oldCampaignIds):qe.campaignIds.concat(qe.oldCampaignIds))),{trigger:B}=fR(`/me/campaigns/${i}/quizResults`,(U,{arg:j})=>wi.post(U,{quizAnswers:[j]})),V=S||w,I=!!(y||E||H),[F]=((Q=R==null?void 0:R.data)==null?void 0:Q.data)??[],A=D.useMemo(()=>{var U,j,ce,ie,Ee,Ae;return b?(Ae=(Ee=(ie=(ce=(j=(U=b==null?void 0:b.data)==null?void 0:U.data)==null?void 0:j.quizzes)==null?void 0:ce[0])==null?void 0:ie.quizOptions)==null?void 0:Ee.sort)==null?void 0:Ae.call(Ee,(pe,Se)=>((F==null?void 0:F[Se])??0)-((F==null?void 0:F[pe])??0)):[]},[b,F]),G=D.useMemo(()=>F?Object.values(F).reduce((U,j)=>U+j,0):0,[F]),Y=(U,j)=>{a(U?[...o,j]:o.filter(ce=>ce!==j))};return D.useEffect(()=>{let U=new IntersectionObserver(j=>{j.forEach(ce=>{ce.isIntersecting&&c(!0)})});return U.observe(s.current),()=>{U.disconnect()}},[]),D.useEffect(()=>{var U,j,ce;M&&a((ce=(j=(U=M==null?void 0:M.data)==null?void 0:U.data)==null?void 0:j.quizAnswers)==null?void 0:ce[0])},[M]),D.useEffect(()=>{z(),a(new URLSearchParams(window.location.search).getAll("id")??[])},[t]),D.useEffect(()=>{n&&(alert("Campaign sudah berakhir"),window.location.href="https://www.catchplay.com/id/home")},[n]),L.jsxs("div",{ref:s,children:[(v||p!==void 0)&&!I&&L.jsx("div",{className:"fixed-banner-section-2 container mb-[65px] sm:mb-[95px]",children:e?L.jsxs(L.Fragment,{children:[L.jsxs("div",{className:"w-full flex gap-4 overflow-auto mb-14 sm:overflow-visible sm:flex-col lg:gap-6",children:[L.jsx("div",{className:"shrink-0 w-[70%] flex flex-col gap-4 sm:w-full sm:flex-row lg:gap-x-[60px]",children:V?Array.from({length:3}).map((U,j)=>L.jsxs("div",{className:"flex items-center gap-4 sm:w-[calc((100%-16px/2)/3)]",children:[i&&L.jsx("label",{children:L.jsx("div",{className:Zn("relative w-[20px] h-[20px] flex items-center justify-center rounded bg-[#d9d9d9] lg:w-[25px] lg:h-[25px] opacity-50")})}),L.jsx(kx,{isLoading:!0})]},j)):A.slice(0,3).map((U,j)=>L.jsxs("div",{className:"flex items-center gap-4 sm:w-[calc((100%-16px/2)/3)]",children:[i&&L.jsxs("label",{children:[L.jsx("div",{className:Zn("relative w-[20px] h-[20px] flex items-center justify-center rounded bg-[#d9d9d9] lg:w-[25px] lg:h-[25px]",{"bg-cp text-white":o.includes(U),"opacity-50":!T}),children:o.includes(U)&&L.jsx(Ft,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",name:"check"})}),L.jsx("input",{hidden:!0,type:"checkbox",value:U,disabled:!T,checked:o.includes(U),onChange:ce=>{Y(ce.target.checked,U)}})]}),L.jsx(f1,{className:"flex-1 w-0",id:U,campaignId:i,eligible:T,checked:o.includes(U),onSelect:ce=>{Y(ce,U)},children:L.jsx(kx,{id:U,campaignId:i,isEntryView:l,rank:j+1,progress:F!=null&&F[U]?Math.round(F[U]/G*100):0})})]},U))}),L.jsx("div",{className:"shrink-0 grid grid-rows-5 grid-flow-col gap-7 sm:grid-cols-3 sm:grid-rows-none sm:grid-flow-row sm:gap-4 lg:gap-x-[60px]",children:V?Array.from({length:31}).map((U,j)=>L.jsxs("div",{className:"flex items-center gap-4",children:[i&&L.jsx("label",{children:L.jsx("div",{className:Zn("relative w-[20px] h-[20px] flex items-center justify-center rounded bg-[#d9d9d9] lg:w-[25px] lg:h-[25px] opacity-50")})}),L.jsx(Fx,{isLoading:!0})]},j)):A.slice(3).map((U,j)=>L.jsxs("div",{className:"flex items-center gap-4",children:[i&&L.jsxs("label",{children:[L.jsx("div",{className:Zn("relative w-[20px] h-[20px] flex items-center justify-center rounded bg-[#d9d9d9] lg:w-[25px] lg:h-[25px]",{"bg-cp text-white":o.includes(U),"opacity-50":!T}),children:o.includes(U)&&L.jsx(Ft,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",name:"check"})}),L.jsx("input",{hidden:!0,type:"checkbox",value:U,disabled:!T,checked:o.includes(U),onChange:ce=>{Y(ce.target.checked,U)}})]}),L.jsx(f1,{id:U,campaignId:i,eligible:T,checked:o.includes(U),onSelect:ce=>{Y(ce,U)},children:L.jsx(Fx,{id:U,campaignId:i,isEntryView:l,rank:j+1+3,progress:F!=null&&F[U]?Math.round(F[U]/G*100):0})})]},U))})]}),i&&L.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center lg:gap-5",children:[L.jsx("div",{className:Zn("flex items-center gap-2 text-white font-medium",{"text-[#A6A6A6]":!T}),children:T?L.jsxs(L.Fragment,{children:["Sudah memilih ",L.jsx("span",{className:"text-[red]",children:o.length})," ","episode"]}):"Sudah voting hari ini, besok bisa voting kembali"}),L.jsx("button",{disabled:!T||u||(p==null?void 0:p.user)&&!o.length,className:Zn("w-full flex items-center justify-center gap-2 max-w-[300px] bg-[red] text-white font-bold text-2xl p-2 rounded-xl sm:max-w-[675px]",{"bg-transparent text-[#A6A6A6] pointer-events-none":!T,"bg-[#A6A6A6]":(p==null?void 0:p.user)&&!o.length}),onClick:async()=>{if(p!=null&&p.user){T&&o.length&&!u&&(h(!0),await B(o),await Promise.all([_(),z()]),h(!1),a([]),document.querySelector(".fixed-banner-section-2").scrollIntoView());return}m(!0);const U=new URLSearchParams,j=new URLSearchParams;o.forEach(ce=>{j.append("id",ce)}),j.set("open","1"),U.set("redirectUrl",`https://www.catchplay.com/campaigns/urban_horror_ID/?${j.toString()}`),window.setTimeout(()=>{window.location.href=`https://www.catchplay.com/login?${U.toString()}`},2e3)},children:T?L.jsxs(L.Fragment,{children:[u&&L.jsx(Ft,{className:"animate-spin",name:"loading"}),"Vote sekarang"]}):L.jsxs(L.Fragment,{children:[L.jsx(Ft,{name:"check"}),"Voting Berhasil"]})})]})]}):L.jsxs("div",{className:"w-full flex flex-col items-center p-7 lg:p-4",children:[L.jsx("img",{className:"w-[120px] mb-7 sm:w-[150px] sm:mb-2",src:"https://www.catchplay.com/campaigns/wp-content/uploads/2024/06/lock.png"}),L.jsxs("p",{className:"flex items-center gap-1 font-bold text-[red] text-2xl sm:text-xl lg:text-4xl",children:[L.jsx("span",{className:"font-medium rounded-full bg-[red] text-white px-2.5",children:"7/5"}),"金懼排行榜解鎖"]})]})}),L.jsxs("div",{className:"fixed-banner-section-3 container",children:[L.jsx("div",{className:"m-auto mb-8 w-[300px] sm:w-[480px] sm:mb-5 lg:w-[690px] lg:mb-12",children:L.jsx("img",{className:"w-full pointer-events-none",src:"https://www.catchplay.com/campaigns/wp-content/uploads/2024/07/id-map-title.png"})}),L.jsx(uz,{campaignId:i})]}),(!v&&!(p!=null&&p.user)||!g&&(((Pe=(he=(le=f==null?void 0:f.data)==null?void 0:le.data)==null?void 0:he.getGroupMembers)==null?void 0:Pe.userStatus)==="GUEST"||((O=(Me=(Le=f==null?void 0:f.data)==null?void 0:Le.data)==null?void 0:Me.getGroupMembers)==null?void 0:O.userStatus)==="BASIC"))&&L.jsx(dz,{}),L.jsx(fz,{}),L.jsx(hz,{open:d})]})}nR.polyfill();zp.createRoot(document.getElementById("root")).render(L.jsx(ge.StrictMode,{children:L.jsx(RA,{value:{errorRetryCount:1},children:L.jsxs(KD,{children:[L.jsx(QD,{children:L.jsx(iR,{baseColor:"#202020",highlightColor:"#444",children:L.jsx(mz,{})})}),L.jsx(eR,{position:"bottom-center",toastOptions:{style:{padding:"16px",background:"#1C1C1C",color:"white"}}})]})})}));

“Urban Horror” episode baru setiap hari selama sebulan penuh! Hanya daftar dan voting, kamu bisa memenangkan voucher langganan dan e-Money jutaan rupiah dari CATCHPLAY+ !
Setiap hari bisa voting ulang lho!

Cara Bermain

“Urban Horror” episode baru setiap hari selama sebulan penuh! Hanya daftar dan voting, kamu bisa memenangkan voucher langganan dan e-Money jutaan rupiah dari CATCHPLAY+ !
Setiap hari bisa voting ulang lho!

Cara Bermain

“Urban Horror” episode baru setiap hari selama sebulan penuh! Hanya daftar dan voting, kamu bisa memenangkan voucher langganan dan e-Money jutaan rupiah dari CATCHPLAY+ !
Setiap hari bisa voting ulang lho!

 

Cara Bermain