vendor: 8,302 bytes, lines 1-9
1var f3=n=>{throw TypeError(n)};var Nb=(n,e,t)=>e.has(n)||f3("Cannot "+t);var Se=(n,e,t)=>(Nb(n,e,"read from private field"),t?t.call(n):e.get(n)),Sn=(n,e,t)=>e.has(n)?f3("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),qt=(n,e,t,r)=>(Nb(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),_i=(n,e,t)=>(Nb(n,e,"access private method"),t);var y0=(n,e,t,r)=>({set _(i){qt(n,e,i,t)},get _(){return Se(n,e,r)}});function W$(n,e){for(var t=0;t<e.length;t++){const r=e[t];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in n)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(n,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 t(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=t(i);fetch(i.href,s)}})();function GC(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var rU={exports:{}},Y1={},iU={exports:{}},ln={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Vy=Symbol.for("react.element"),$$=Symbol.for("react.portal"),q$=Symbol.for("react.fragment"),X$=Symbol.for("react.strict_mode"),K$=Symbol.for("react.profiler"),Y$=Symbol.for("react.provider"),Q$=Symbol.for("react.context"),J$=Symbol.for("react.forward_ref"),Z$=Symbol.for("react.suspense"),eq=Symbol.for("react.memo"),tq=Symbol.for("react.lazy"),p3=Symbol.iterator;function nq(n){return n===null||typeof n!="object"?null:(n=p3&&n[p3]||n["@@iterator"],typeof n=="function"?n:null)}var sU={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oU=Object.assign,aU={};function xp(n,e,t){this.props=n,this.context=e,this.refs=aU,this.updater=t||sU}xp.prototype.isReactComponent={};xp.prototype.setState=function(n,e){if(typeof n!="object"&&typeof n!="function"&&n!=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,n,e,"setState")};xp.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function lU(){}lU.prototype=xp.prototype;function WC(n,e,t){this.props=n,this.context=e,this.refs=aU,this.updater=t||sU}var $C=WC.prototype=new lU;$C.constructor=WC;oU($C,xp.prototype);$C.isPureReactComponent=!0;var m3=Array.isArray,cU=Object.prototype.hasOwnProperty,qC={current:null},uU={key:!0,ref:!0,__self:!0,__source:!0};function dU(n,e,t){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)cU.call(e,r)&&!uU.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=t;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(n&&n.defaultProps)for(r in a=n.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Vy,type:n,key:s,ref:o,props:i,_owner:qC.current}}function rq(n,e){return{$$typeof:Vy,type:n.type,key:e,ref:n.ref,props:n.props,_owner:n._owner}}function XC(n){return typeof n=="object"&&n!==null&&n.$$typeof===Vy}function iq(n){var e={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(t){return e[t]})}var g3=/\/+/g;function Ib(n,e){return typeof n=="object"&&n!==null&&n.key!=null?iq(""+n.key):e.toString(36)}function Xx(n,e,t,r,i){var s=typeof n;(s==="undefined"||s==="boolean")&&(n=null);var o=!1;if(n===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(n.$$typeof){case Vy:case $$:o=!0}}if(o)return o=n,i=i(o),n=r===""?"."+Ib(o,0):r,m3(i)?(t="",n!=null&&(t=n.replace(g3,"$&/")+"/"),Xx(i,e,t,"",function(c){return c})):i!=null&&(XC(i)&&(i=rq(i,t+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(g3,"$&/")+"/")+n)),e.push(i)),1;if(o=0,r=r===""?".":r+":",m3(n))for(var a=0;a<n.length;a++){s=n[a];var l=r+Ib(s,a);o+=Xx(s,e,t,l,i)}else if(l=nq(n),typeof l=="function")for(n=l.call(n),a=0;!(s=n.next()).done;)s=s.value,l=r+Ib(s,a++),o+=Xx(s,e,t,l,i);else if(s==="object")throw e=String(n),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function v0(n,e,t){if(n==null)return n;var r=[],i=0;return Xx(n,r,"","",function(s){return e.call(t,s,i++)}),r}function sq(n){if(n._status===-1){var e=n._result;e=e(),e.then(function(t){(n._status===0||n._status===-1)&&(n._status=1,n._result=t)},function(t){(n._status===0||n._status===-1)&&(n._status=2,n._result=t)}),n._status===-1&&(n._status=0,n._result=e)}if(n._status===1)return n._result.default;throw n._result}var ts={current:null},Kx={transition:null},oq={ReactCurrentDispatcher:ts,ReactCurrentBatchConfig:Kx,ReactCurrentOwner:qC};function hU(){throw Error("act(...) is not supported in production builds of React.")}ln.Children={map:v0,forEach:function(n,e,t){v0(n,function(){e.apply(this,arguments)},t)},count:function(n){var e=0;return v0(n,function(){e++}),e},toArray:function(n){return v0(n,function(e){return e})||[]},only:function(n){if(!XC(n))throw Error("React.Children.only expected to receive a single React element child.");return n}};ln.Component=xp;ln.Fragment=q$;ln.Profiler=K$;ln.PureComponent=WC;ln.StrictMode=X$;ln.Suspense=Z$;ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oq;ln.act=hU;ln.cloneElement=function(n,e,t){if(n==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+n+".");var r=oU({},n.props),i=n.key,s=n.ref,o=n._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=qC.current),e.key!==void 0&&(i=""+e.key),n.type&&n.type.defaultProps)var a=n.type.defaultProps;for(l in e)cU.call(e,l)&&!uU.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=t;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Vy,type:n.type,key:i,ref:s,props:r,_owner:o}};ln.createContext=function(n){return n={$$typeof:Q$,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},n.Provider={$$typeof:Y$,_context:n},n.Consumer=n};ln.createElement=dU;ln.createFactory=function(n){var e=dU.bind(null,n);return e.type=n,e};ln.createRef=function(){return{current:null}};ln.forwardRef=function(n){return{$$typeof:J$,render:n}};ln.isValidElement=XC;ln.lazy=function(n){return{$$typeof:tq,_payload:{_status:-1,_result:n},_init:sq}};ln.memo=function(n,e){return{$$typeof:eq,type:n,compare:e===void 0?null:e}};ln.startTransition=function(n){var e=Kx.transition;Kx.transition={};try{n()}finally{Kx.transition=e}};ln.unstable_act=hU;ln.useCallback=function(n,e){return ts.current.useCallback(n,e)};ln.useContext=function(n){return ts.current.useContext(n)};ln.useDebugValue=function(){};ln.useDeferredValue=function(n){return ts.current.useDeferredValue(n)};ln.useEffect=function(n,e){return ts.current.useEffect(n,e)};ln.useId=function(){return ts.current.useId()};ln.useImperativeHandle=function(n,e,t){return ts.current.useImperativeHandle(n,e,t)};ln.useInsertionEffect=function(n,e){return ts.current.useInsertionEffect(n,e)};ln.useLayoutEffect=function(n,e){return ts.current.useLayoutEffect(n,e)};ln.useMemo=function(n,e){return ts.current.useMemo(n,e)};ln.useReducer=function(n,e,t){return ts.current.useReducer(n,e,t)};ln.useRef=function(n){return ts.current.useRef(n)};ln.useState=function(n){return ts.current.useState(n)};
vendor: 5,875 bytes, lines 9-33
9ln.useSyncExternalStore=function(n,e,t){return ts.current.useSyncExternalStore(n,e,t)};ln.useTransition=function(){return ts.current.useTransition()};ln.version="18.3.1";iU.exports=ln;var M=iU.exports;const We=GC(M),KC=W$({__proto__:null,default:We},[M]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var aq=M,lq=Symbol.for("react.element"),cq=Symbol.for("react.fragment"),uq=Object.prototype.hasOwnProperty,dq=aq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hq={key:!0,ref:!0,__self:!0,__source:!0};function fU(n,e,t){var r,i={},s=null,o=null;t!==void 0&&(s=""+t),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)uq.call(e,r)&&!hq.hasOwnProperty(r)&&(i[r]=e[r]);if(n&&n.defaultProps)for(r in e=n.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:lq,type:n,key:s,ref:o,props:i,_owner:dq.current}}Y1.Fragment=cq;Y1.jsx=fU;Y1.jsxs=fU;rU.exports=Y1;var f=rU.exports,pU={exports:{}},$s={},mU={exports:{}},gU={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(n){function e(j,z){var q=j.length;j.push(z);e:for(;0<q;){var Z=q-1>>>1,re=j[Z];if(0<i(re,z))j[Z]=z,j[q]=re,q=Z;else break e}}function t(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var z=j[0],q=j.pop();if(q!==z){j[0]=q;e:for(var Z=0,re=j.length,te=re>>>1;Z<te;){var ae=2*(Z+1)-1,we=j[ae],Re=ae+1,de=j[Re];if(0>i(we,q))Re<re&&0>i(de,we)?(j[Z]=de,j[Re]=q,Z=Re):(j[Z]=we,j[ae]=q,Z=ae);else if(Re<re&&0>i(de,q))j[Z]=de,j[Re]=q,Z=Re;else break e}}return z}function i(j,z){var q=j.sortIndex-z.sortIndex;return q!==0?q:j.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,m=3,g=!1,v=!1,_=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(j){for(var z=t(c);z!==null;){if(z.callback===null)r(c);else if(z.startTime<=j)r(c),z.sortIndex=z.expirationTime,e(l,z);else break;z=t(c)}}function A(j){if(_=!1,b(j),!v)if(t(l)!==null)v=!0,J(k);else{var z=t(c);z!==null&&ie(A,z.startTime-j)}}function k(j,z){v=!1,_&&(_=!1,y(P),P=-1),g=!0;var q=m;try{for(b(z),d=t(l);d!==null&&(!(d.expirationTime>z)||j&&!O());){var Z=d.callback;if(typeof Z=="function"){d.callback=null,m=d.priorityLevel;var re=Z(d.expirationTime<=z);z=n.unstable_now(),typeof re=="function"?d.callback=re:d===t(l)&&r(l),b(z)}else r(l);d=t(l)}if(d!==null)var te=!0;else{var ae=t(c);ae!==null&&ie(A,ae.startTime-z),te=!1}return te}finally{d=null,m=q,g=!1}}var L=!1,C=null,P=-1,R=5,N=-1;function O(){return!(n.unstable_now()-N<R)}function V(){if(C!==null){var j=n.unstable_now();N=j;var z=!0;try{z=C(!0,j)}finally{z?B():(L=!1,C=null)}}else L=!1}var B;if(typeof S=="function")B=function(){S(V)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,ee=W.port2;W.port1.onmessage=V,B=function(){ee.postMessage(null)}}else B=function(){x(V,0)};function J(j){C=j,L||(L=!0,B())}function ie(j,z){P=x(function(){j(n.unstable_now())},z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(j){j.callback=null},n.unstable_continueExecution=function(){v||g||(v=!0,J(k))},n.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<j?Math.floor(1e3/j):5},n.unstable_getCurrentPriorityLevel=function(){return m},n.unstable_getFirstCallbackNode=function(){return t(l)},n.unstable_next=function(j){switch(m){case 1:case 2:case 3:var z=3;break;default:z=m}var q=m;m=z;try{return j()}finally{m=q}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(j,z){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var q=m;m=j;try{return z()}finally{m=q}},n.unstable_scheduleCallback=function(j,z,q){var Z=n.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?Z+q:Z):q=Z,j){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=q+re,j={id:u++,callback:z,priorityLevel:j,startTime:q,expirationTime:re,sortIndex:-1},q>Z?(j.sortIndex=q,e(c,j),t(l)===null&&j===t(c)&&(_?(y(P),P=-1):_=!0,ie(A,q-Z))):(j.sortIndex=re,e(l,j),v||g||(v=!0,J(k))),j},n.unstable_shouldYield=O,n.unstable_wrapCallback=function(j){var z=m;return function(){var q=m;m=z;try{return j.apply(this,arguments)}finally{m=q}}}})(gU);mU.exports=gU;var fq=mU.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var pq=M,Ws=fq;function Fe(n){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+n,t=1;t<arguments.length;t++)e+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+n+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var yU=new Set,Pg={};
vendor: 4,996 bytes, line 33
33function Dd(n,e){Xf(n,e),Xf(n+"Capture",e)}function Xf(n,e){for(Pg[n]=e,n=0;n<e.length;n++)yU.add(e[n])}var hl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),GT=Object.prototype.hasOwnProperty,mq=/^[: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]*$/,y3={},v3={};function gq(n){return GT.call(v3,n)?!0:GT.call(y3,n)?!1:mq.test(n)?v3[n]=!0:(y3[n]=!0,!1)}function yq(n,e,t,r){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function vq(n,e,t,r){if(e===null||typeof e>"u"||yq(n,e,t,r))return!0;if(r)return!1;if(t!==null)switch(t.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 ns(n,e,t,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=t,this.propertyName=n,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var li={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){li[n]=new ns(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];li[e]=new ns(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){li[n]=new ns(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){li[n]=new ns(n,2,!1,n,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(n){li[n]=new ns(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){li[n]=new ns(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){li[n]=new ns(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){li[n]=new ns(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){li[n]=new ns(n,5,!1,n.toLowerCase(),null,!1,!1)});var YC=/[\-:]([a-z])/g;function QC(n){return n[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(n){var e=n.replace(YC,QC);li[e]=new ns(e,1,!1,n,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var e=n.replace(YC,QC);li[e]=new ns(e,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(n){var e=n.replace(YC,QC);li[e]=new ns(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){li[n]=new ns(n,1,!1,n.toLowerCase(),null,!1,!1)});li.xlinkHref=new ns("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){li[n]=new ns(n,1,!1,n.toLowerCase(),null,!0,!0)});function JC(n,e,t,r){var i=li.hasOwnProperty(e)?li[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(vq(e,t,i,r)&&(t=null),r||i===null?gq(e)&&(t===null?n.removeAttribute(e):n.setAttribute(e,""+t)):i.mustUseProperty?n[i.propertyName]=t===null?i.type===3?!1:"":t:(e=i.attributeName,r=i.attributeNamespace,t===null?n.removeAttribute(e):(i=i.type,t=i===3||i===4&&t===!0?"":""+t,r?n.setAttributeNS(r,e,t):n.setAttribute(e,t))))}
vendor: 9,685 bytes, lines 33-37
33var Cl=pq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x0=Symbol.for("react.element"),Jh=Symbol.for("react.portal"),Zh=Symbol.for("react.fragment"),ZC=Symbol.for("react.strict_mode"),WT=Symbol.for("react.profiler"),vU=Symbol.for("react.provider"),xU=Symbol.for("react.context"),e2=Symbol.for("react.forward_ref"),$T=Symbol.for("react.suspense"),qT=Symbol.for("react.suspense_list"),t2=Symbol.for("react.memo"),Yl=Symbol.for("react.lazy"),_U=Symbol.for("react.offscreen"),x3=Symbol.iterator;function mm(n){return n===null||typeof n!="object"?null:(n=x3&&n[x3]||n["@@iterator"],typeof n=="function"?n:null)}var sr=Object.assign,Lb;function Hm(n){if(Lb===void 0)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);Lb=e&&e[1]||""}return` 34`+Lb+n}var Db=!1;function kb(n,e){if(!n||Db)return"";Db=!0;var t=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(n,[],e)}else{try{e.call()}catch(c){r=c}n.call(e.prototype)}else{try{throw Error()}catch(c){r=c}n()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(` 35`),s=r.stack.split(` 36`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=` 37`+i[o].replace(" at new "," at ");return n.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",n.displayName)),l}while(1<=o&&0<=a);break}}}finally{Db=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?Hm(n):""}function xq(n){switch(n.tag){case 5:return Hm(n.type);case 16:return Hm("Lazy");case 13:return Hm("Suspense");case 19:return Hm("SuspenseList");case 0:case 2:case 15:return n=kb(n.type,!1),n;case 11:return n=kb(n.type.render,!1),n;case 1:return n=kb(n.type,!0),n;default:return""}}function XT(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case Zh:return"Fragment";case Jh:return"Portal";case WT:return"Profiler";case ZC:return"StrictMode";case $T:return"Suspense";case qT:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case xU:return(n.displayName||"Context")+".Consumer";case vU:return(n._context.displayName||"Context")+".Provider";case e2:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case t2:return e=n.displayName||null,e!==null?e:XT(n.type)||"Memo";case Yl:e=n._payload,n=n._init;try{return XT(n(e))}catch{}}return null}function _q(n){var e=n.type;switch(n.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 n=e.render,n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return XT(e);case 8:return e===ZC?"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 Dc(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function wU(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function wq(n){var e=wU(n)?"checked":"value",t=Object.getOwnPropertyDescriptor(n.constructor.prototype,e),r=""+n[e];if(!n.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var i=t.get,s=t.set;return Object.defineProperty(n,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(n,e,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){n._valueTracker=null,delete n[e]}}}}function _0(n){n._valueTracker||(n._valueTracker=wq(n))}function SU(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),r="";return n&&(r=wU(n)?n.checked?"true":"false":n.value),n=r,n!==t?(e.setValue(n),!0):!1}function k_(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function KT(n,e){var t=e.checked;return sr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function _3(n,e){var t=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;t=Dc(e.value!=null?e.value:t),n._wrapperState={initialChecked:r,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function bU(n,e){e=e.checked,e!=null&&JC(n,"checked",e,!1)}function YT(n,e){bU(n,e);var t=Dc(e.value),r=e.type;if(t!=null)r==="number"?(t===0&&n.value===""||n.value!=t)&&(n.value=""+t):n.value!==""+t&&(n.value=""+t);else if(r==="submit"||r==="reset"){n.removeAttribute("value");return}e.hasOwnProperty("value")?QT(n,e.type,t):e.hasOwnProperty("defaultValue")&&QT(n,e.type,Dc(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function w3(n,e,t){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=""+n._wrapperState.initialValue,t||e===n.value||(n.value=e),n.defaultValue=e}t=n.name,t!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,t!==""&&(n.name=t)}function QT(n,e,t){(e!=="number"||k_(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var Gm=Array.isArray;function wf(n,e,t,r){if(n=n.options,e){e={};for(var i=0;i<t.length;i++)e["$"+t[i]]=!0;for(t=0;t<n.length;t++)i=e.hasOwnProperty("$"+n[t].value),n[t].selected!==i&&(n[t].selected=i),i&&r&&(n[t].defaultSelected=!0)}else{for(t=""+Dc(t),e=null,i=0;i<n.length;i++){if(n[i].value===t){n[i].selected=!0,r&&(n[i].defaultSelected=!0);return}e!==null||n[i].disabled||(e=n[i])}e!==null&&(e.selected=!0)}}function JT(n,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Fe(91));return sr({},e,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function S3(n,e){var t=e.value;if(t==null){if(t=e.children,e=e.defaultValue,t!=null){if(e!=null)throw Error(Fe(92));if(Gm(t)){if(1<t.length)throw Error(Fe(93));t=t[0]}e=t}e==null&&(e=""),t=e}n._wrapperState={initialValue:Dc(t)}}function EU(n,e){var t=Dc(e.value),r=Dc(e.defaultValue);t!=null&&(t=""+t,t!==n.value&&(n.value=t),e.defaultValue==null&&n.defaultValue!==t&&(n.defaultValue=t)),r!=null&&(n.defaultValue=""+r)}function b3(n){var e=n.textContent;e===n._wrapperState.initialValue&&e!==""&&e!==null&&(n.value=e)}function TU(n){switch(n){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 ZT(n,e){return n==null||n==="http://www.w3.org/1999/xhtml"?TU(e):n==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var w0,MU=function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,t,r,i){MSApp.execUnsafeLocalFunction(function(){return n(e,t,r,i)})}:n}(function(n,e){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=e;else{for(w0=w0||document.createElement("div"),w0.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=w0.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function Ng(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var sg={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},Sq=["Webkit","ms","Moz","O"];Object.keys(sg).forEach(function(n){Sq.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),sg[e]=sg[n]})});function AU(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||sg.hasOwnProperty(n)&&sg[n]?(""+e).trim():e+"px"}function CU(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var r=t.indexOf("--")===0,i=AU(t,e[t],r);t==="float"&&(t="cssFloat"),r?n.setProperty(t,i):n[t]=i}}var bq=sr({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 eM(n,e){if(e){if(bq[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Fe(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Fe(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Fe(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Fe(62))}}function tM(n,e){if(n.indexOf("-")===-1)return typeof e.is=="str
37ing";switch(n){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 nM=null;function n2(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var rM=null,Sf=null,bf=null;function E3(n){if(n=zy(n)){if(typeof rM!="function")throw Error(Fe(280));var e=n.stateNode;e&&(e=tw(e),rM(n.stateNode,n.type,e))}}function RU(n){Sf?bf?bf.push(n):bf=[n]:Sf=n}function PU(){if(Sf){var n=Sf,e=bf;if(bf=Sf=null,E3(n),e)for(n=0;n<e.length;n++)E3(e[n])}}function NU(n,e){return n(e)}function IU(){}var Ob=!1;function LU(n,e,t){if(Ob)return n(e,t);Ob=!0;try{return NU(n,e,t)}finally{Ob=!1,(Sf!==null||bf!==null)&&(IU(),PU())}}function Ig(n,e){var t=n.stateNode;if(t===null)return null;var r=tw(t);if(r===null)return null;t=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(n=n.type,r=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!r;break e;default:n=!1}if(n)return null;if(t&&typeof t!="function")throw Error(Fe(231,e,typeof t));return t}var iM=!1;if(hl)try{var gm={};Object.defineProperty(gm,"passive",{get:function(){iM=!0}}),window.addEventListener("test",gm,gm),window.removeEventListener("test",gm,gm)}catch{iM=!1}function Eq(n,e,t,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(t,c)}catch(u){this.onError(u)}}var og=!1,O_=null,F_=!1,sM=null,Tq={onError:function(n){og=!0,O_=n}};function Mq(n,e,t,r,i,s,o,a,l){og=!1,O_=null,Eq.apply(Tq,arguments)}function Aq(n,e,t,r,i,s,o,a,l){if(Mq.apply(this,arguments),og){if(og){var c=O_;og=!1,O_=null}else throw Error(Fe(198));F_||(F_=!0,sM=c)}}function kd(n){var e=n,t=n;if(n.alternate)for(;e.return;)e=e.return;else{n=e;do e=n,e.flags&4098&&(t=e.return),n=e.return;while(n)}return e.tag===3?t:null}function DU(n){if(n.tag===13){var e=n.memoizedState;if(e===null&&(n=n.alternate,n!==null&&(e=n.memoizedState)),e!==null)return e.dehydrated}return null}function T3(n){if(kd(n)!==n)throw Error(Fe(188))}function Cq(n){var e=n.alternate;if(!e){if(e=kd(n),e===null)throw Error(Fe(188));return e!==n?null:n}for(var t=n,r=e;;){var i=t.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){t=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===t)return T3(i),n;if(s===r)return T3(i),e;s=s.sibling}throw Error(Fe(188))}if(t.return!==r.return)t=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===t){o=!0,t=i,r=s;break}if(a===r){o=!0,r=i,t=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===t){o=!0,t=s,r=i;break}if(a===r){o=!0,r=s,t=i;break}a=a.sibling}if(!o)throw Error(Fe(189))}}if(t.alternate!==r)throw Error(Fe(190))}if(t.tag!==3)throw Error(Fe(188));return t.stateNode.current===t?n:e}function kU(n){return n=Cq(n),n!==null?OU(n):null}function OU(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var e=OU(n);if(e!==null)return e;n=n.sibling}return null}var FU=Ws.unstable_scheduleCallback,M3=Ws.unstable_cancelCallback,Rq=Ws.unstable_shouldYield,Pq=Ws.unstable_requestPaint,_r=Ws.unstable_now,Nq=Ws.unstable_getCurrentPriorityLevel,r2=Ws.unstable_ImmediatePriority,UU=Ws.unstable_UserBlockingPriority,U_=Ws.unstable_NormalPriority,Iq=Ws.unstable_LowPriority,VU=Ws.unstable_IdlePriority,Q1=null,_a=null;function Lq(n){if(_a&&typeof _a.onCommitFiberRoot=="function")try{_a.onCommitFiberRoot(Q1,n,void 0,(n.current.flags&128)===128)}catch{}}var Xo=Math.clz32?Math.clz32:Oq,Dq=Math.log,kq=Math.LN2;function Oq(n){return n>>>=0,n===0?32:31-(Dq(n)/kq|0)|0}var S0=64,b0=4194304;function Wm(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function V_(n,e){var t=n.pendingLanes;if(t===0)return 0;var r=0,i=n.suspendedLanes,s=n.pingedLanes,o=t&268435455;if(o!==0){var a=o&~i;a!==0?r=Wm(a):(s&=o,s!==0&&(r=Wm(s)))}else o=t&~i,o!==0?r=Wm(o):s!==0&&(r=Wm(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|=t&16),e=n.entangledLanes,e!==0)for(n=n.entanglements,e&=r;0<e;)t=31-Xo(e),i=1<<t,r|=n[t],e&=~i;return r}function Fq(n,e){switch(n){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 Uq(n,e){for(var t=n.suspendedLanes,r=n.pingedLanes,i=n.expirationTimes,s=n.pendingLanes;0<s;){var o=31-Xo(s),a=1<<o,l=i[o];l===-1?(!(a&t)||a&r)&&(i[o]=Fq(a,e)):l<=e&&(n.expiredLanes|=a),s&=~a}}function oM(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function jU(){var n=S0;return S0<<=1,!(S0&4194240)&&(S0=64),n}function Fb(n){for(var e=[],t=0;31>t;t++)e.push(n);return e}function jy(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-Xo(e),n[e]=t}function Vq(n,e){var t=n.pendingLanes&~e;
vendor: 4,148 bytes, line 37
37n.pendingLanes=e,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=e,n.mutableReadLanes&=e,n.entangledLanes&=e,e=n.entanglements;var r=n.eventTimes;for(n=n.expirationTimes;0<t;){var i=31-Xo(t),s=1<<i;e[i]=0,r[i]=-1,n[i]=-1,t&=~s}}function i2(n,e){var t=n.entangledLanes|=e;for(n=n.entanglements;t;){var r=31-Xo(t),i=1<<r;i&e|n[r]&e&&(n[r]|=e),t&=~i}}var In=0;function BU(n){return n&=-n,1<n?4<n?n&268435455?16:536870912:4:1}var zU,s2,HU,GU,WU,aM=!1,E0=[],mc=null,gc=null,yc=null,Lg=new Map,Dg=new Map,nc=[],jq="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 A3(n,e){switch(n){case"focusin":case"focusout":mc=null;break;case"dragenter":case"dragleave":gc=null;break;case"mouseover":case"mouseout":yc=null;break;case"pointerover":case"pointerout":Lg.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dg.delete(e.pointerId)}}function ym(n,e,t,r,i,s){return n===null||n.nativeEvent!==s?(n={blockedOn:e,domEventName:t,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=zy(e),e!==null&&s2(e)),n):(n.eventSystemFlags|=r,e=n.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),n)}function Bq(n,e,t,r,i){switch(e){case"focusin":return mc=ym(mc,n,e,t,r,i),!0;case"dragenter":return gc=ym(gc,n,e,t,r,i),!0;case"mouseover":return yc=ym(yc,n,e,t,r,i),!0;case"pointerover":var s=i.pointerId;return Lg.set(s,ym(Lg.get(s)||null,n,e,t,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Dg.set(s,ym(Dg.get(s)||null,n,e,t,r,i)),!0}return!1}function $U(n){var e=$u(n.target);if(e!==null){var t=kd(e);if(t!==null){if(e=t.tag,e===13){if(e=DU(t),e!==null){n.blockedOn=e,WU(n.priority,function(){HU(t)});return}}else if(e===3&&t.stateNode.current.memoizedState.isDehydrated){n.blockedOn=t.tag===3?t.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Yx(n){if(n.blockedOn!==null)return!1;for(var e=n.targetContainers;0<e.length;){var t=lM(n.domEventName,n.eventSystemFlags,e[0],n.nativeEvent);if(t===null){t=n.nativeEvent;var r=new t.constructor(t.type,t);nM=r,t.target.dispatchEvent(r),nM=null}else return e=zy(t),e!==null&&s2(e),n.blockedOn=t,!1;e.shift()}return!0}function C3(n,e,t){Yx(n)&&t.delete(e)}function zq(){aM=!1,mc!==null&&Yx(mc)&&(mc=null),gc!==null&&Yx(gc)&&(gc=null),yc!==null&&Yx(yc)&&(yc=null),Lg.forEach(C3),Dg.forEach(C3)}function vm(n,e){n.blockedOn===e&&(n.blockedOn=null,aM||(aM=!0,Ws.unstable_scheduleCallback(Ws.unstable_NormalPriority,zq)))}function kg(n){function e(i){return vm(i,n)}if(0<E0.length){vm(E0[0],n);for(var t=1;t<E0.length;t++){var r=E0[t];r.blockedOn===n&&(r.blockedOn=null)}}for(mc!==null&&vm(mc,n),gc!==null&&vm(gc,n),yc!==null&&vm(yc,n),Lg.forEach(e),Dg.forEach(e),t=0;t<nc.length;t++)r=nc[t],r.blockedOn===n&&(r.blockedOn=null);for(;0<nc.length&&(t=nc[0],t.blockedOn===null);)$U(t),t.blockedOn===null&&nc.shift()}var Ef=Cl.ReactCurrentBatchConfig,j_=!0;function Hq(n,e,t,r){var i=In,s=Ef.transition;Ef.transition=null;try{In=1,o2(n,e,t,r)}finally{In=i,Ef.transition=s}}function Gq(n,e,t,r){var i=In,s=Ef.transition;Ef.transition=null;try{In=4,o2(n,e,t,r)}finally{In=i,Ef.transition=s}}function o2(n,e,t,r){if(j_){var i=lM(n,e,t,r);if(i===null)qb(n,e,r,B_,t),A3(n,r);else if(Bq(i,n,e,t,r))r.stopPropagation();else if(A3(n,r),e&4&&-1<jq.indexOf(n)){for(;i!==null;){var s=zy(i);if(s!==null&&zU(s),s=lM(n,e,t,r),s===null&&qb(n,e,r,B_,t),s===i)break;i=s}i!==null&&r.stopPropagation()}else qb(n,e,r,null,t)}}var B_=null;function lM(n,e,t,r){if(B_=null,n=n2(r),n=$u(n),n!==null)if(e=kd(n),e===null)n=null;else if(t=e.tag,t===13){if(n=DU(e),n!==null)return n;n=null}else if(t===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;n=null}else e!==n&&(n=null);return B_=n,null}function qU(n){switch(n){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"invali
37d":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(Nq()){case r2:return 1;case UU:return 4;case U_:case Iq:return 16;case VU:return 536870912;default:return 16}default:return 16}}var uc=null,a2=null,Qx=null;function XU(){if(Qx)return Qx;var n,e=a2,t=e.length,r,i="value"in uc?uc.value:uc.textContent,s=i.length;for(n=0;n<t&&e[n]===i[n];n++);var o=t-n;for(r=1;r<=o&&e[t-r]===i[s-r];r++);return Qx=i.slice(n,1<r?1-r:void 0)}function Jx(n){var e=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&e===13&&(n=13)):n=e,n===10&&(n=13),32<=n||n===13?n:0}function T0(){return!0}function R3(){return!1}function qs(n){function e(t,r,i,s,o){this._reactName=t,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in n)n.hasOwnProperty(a)&&(t=n[a],this[a]=t?t(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?T0:R3,this.isPropagationStopped=R3,this}return sr(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():typeof t.returnValue!="unknown"&&(t.returnValue=!1),this.isDefaultPrevented=T0)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():typeof t.cancelBubble!="unknown"&&(t.cancelBubble=!0),this.isPropagationStopped=T0)},persist:function(){},isPersistent:T0}),e}var _p={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},l2=qs(_p),By=sr({},_p,{view:0,detail:0}),Wq=qs(By),Ub,Vb,xm,J1=sr({},By,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:c2,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==xm&&(xm&&n.type==="mousemove"?(Ub=n.screenX-xm.screenX,Vb=n.screenY-xm.screenY):Vb=Ub=0,xm=n),Ub)},movementY:function(n){return"movementY"in n?n.movementY:Vb}}),P3=qs(J1),$q=sr({},J1,{dataTransfer:0}),qq=qs($q),Xq=sr({},By,{relatedTarget:0}),jb=qs(Xq),Kq=sr({},_p,{animationName:0,elapsedTime:0,pseudoElement:0}),Yq=qs(Kq),Qq=sr({},_p,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Jq=qs(Qq),Zq=sr({},_p,{data:0}),N3=qs(Zq),eX={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tX={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"},nX={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rX(n){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(n):(n=nX[n])?!!e[n]:!1}function c2(){return rX}var iX=sr({},By,{key:function(n){if(n.key){var e=eX[n.key]||n.key;if(e!=="Unidentified")return e}
vendor: 6,028 bytes, line 37
37return n.type==="keypress"?(n=Jx(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?tX[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:c2,charCode:function(n){return n.type==="keypress"?Jx(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Jx(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),sX=qs(iX),oX=sr({},J1,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),I3=qs(oX),aX=sr({},By,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:c2}),lX=qs(aX),cX=sr({},_p,{propertyName:0,elapsedTime:0,pseudoElement:0}),uX=qs(cX),dX=sr({},J1,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),hX=qs(dX),fX=[9,13,27,32],u2=hl&&"CompositionEvent"in window,ag=null;hl&&"documentMode"in document&&(ag=document.documentMode);var pX=hl&&"TextEvent"in window&&!ag,KU=hl&&(!u2||ag&&8<ag&&11>=ag),L3=" ",D3=!1;function YU(n,e){switch(n){case"keyup":return fX.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function QU(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ef=!1;function mX(n,e){switch(n){case"compositionend":return QU(e);case"keypress":return e.which!==32?null:(D3=!0,L3);case"textInput":return n=e.data,n===L3&&D3?null:n;default:return null}}function gX(n,e){if(ef)return n==="compositionend"||!u2&&YU(n,e)?(n=XU(),Qx=a2=uc=null,ef=!1,n):null;switch(n){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 KU&&e.locale!=="ko"?null:e.data;default:return null}}var yX={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 k3(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e==="input"?!!yX[n.type]:e==="textarea"}function JU(n,e,t,r){RU(r),e=z_(e,"onChange"),0<e.length&&(t=new l2("onChange","change",null,t,r),n.push({event:t,listeners:e}))}var lg=null,Og=null;function vX(n){c5(n,0)}function Z1(n){var e=rf(n);if(SU(e))return n}function xX(n,e){if(n==="change")return e}var ZU=!1;if(hl){var Bb;if(hl){var zb="oninput"in document;if(!zb){var O3=document.createElement("div");O3.setAttribute("oninput","return;"),zb=typeof O3.oninput=="function"}Bb=zb}else Bb=!1;ZU=Bb&&(!document.documentMode||9<document.documentMode)}function F3(){lg&&(lg.detachEvent("onpropertychange",e5),Og=lg=null)}function e5(n){if(n.propertyName==="value"&&Z1(Og)){var e=[];JU(e,Og,n,n2(n)),LU(vX,e)}}function _X(n,e,t){n==="focusin"?(F3(),lg=e,Og=t,lg.attachEvent("onpropertychange",e5)):n==="focusout"&&F3()}function wX(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Z1(Og)}function SX(n,e){if(n==="click")return Z1(e)}function bX(n,e){if(n==="input"||n==="change")return Z1(e)}function EX(n,e){return n===e&&(n!==0||1/n===1/e)||n!==n&&e!==e}var Jo=typeof Object.is=="function"?Object.is:EX;function Fg(n,e){if(Jo(n,e))return!0;if(typeof n!="object"||n===null||typeof e!="object"||e===null)return!1;var t=Object.keys(n),r=Object.keys(e);if(t.length!==r.length)return!1;for(r=0;r<t.length;r++){var i=t[r];if(!GT.call(e,i)||!Jo(n[i],e[i]))return!1}return!0}function U3(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function V3(n,e){var t=U3(n);n=0;for(var r;t;){if(t.nodeType===3){if(r=n+t.textContent.length,n<=e&&r>=e)return{node:t,offset:e-n};n=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=U3(t)}}function t5(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?t5(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function n5(){for(var n=window,e=k_();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=k_(n.document)}return e}function d2(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e&&(e==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||e==="textarea"||n.contentEditable==="true")}function TX(n){var e=n5(),t=n.focusedElem,r=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&t5(t.ownerDocument.documentElement,t)){if(r!==null&&d2(t)){if(e=r.start,n=r.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var i=t.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!n.extend&&s>r&&(i=r,r=s,s=i),i=V3(t,s);var o=V3(t,r);i&&o&&(n.rangeCount!==1||n.anchorNode!==i.node||n.anchorOffset!==i.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),n.removeAllRanges(),s>r?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t<e.length;t++)n=e[t],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var MX=hl&&"documentMode"in document&&11>=document.documentMode,tf=null,cM=null,cg=null,uM=!1;function j3(n,e,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;uM||tf==null||tf!==k_(r)||(r=tf,"selectionStart"in r&&d2(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),cg&&Fg(cg,r)||(cg=r,r=z_(cM,"onSelect"),0<r.length&&(e=new l2("onSelect","select",null,e,t),n.push({event:e,listeners:r}),e.target=tf)))}function M0(n,e){var t={};return t[n.toLowerCase()]=e.toLowerCase(),t["Webkit"+n]="webkit"+e,t["Moz"+n]="moz"+e,t}var nf={animationend:M0("Animation","AnimationEnd"),animationiteration:M0("Animation","AnimationIteration"),animationstart:M0("Animation","AnimationStart"),transitionend:M0("Transition","TransitionEnd")},Hb={},r5={};hl&&(r5=document.createElement("div").style,"AnimationEvent"in window||(delete nf.animationend.animation,delete nf.animationiteration.animation,delete nf.animationstart.animation),"TransitionEvent"in window||delete nf.transitionend.transition);function ew(n){if(Hb[n])return Hb[n];if(!nf[n])return n;var e=nf[n],t;for(t in e)if(e.hasOwnProperty(t)&&t in r5)return Hb[n]=e[t];return n}var i5=ew("animationend"),s5=ew("animationiteration"),o5=ew("animationstart"),a5=ew("transitionend"),l5=new Map,B3="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 Yc(n,e){l5.set(n,e),Dd(e,[n])}for(var Gb=0;Gb<B3.length;Gb++){var Wb=B3[Gb],AX=Wb.toLowerCase(),CX=Wb[0].toUpperCase()+Wb.slice(1);Yc(AX,"on"+CX)}Yc(i5,"onAnimationEnd");Yc(s5,"onAnimationIteration");Yc(o5,"onAnimationStart");Yc("dblclick","onDoubleClick");Yc("focusin","onFocus");Yc("focusout","onBlur");Yc(a5,"onTransitionEnd");Xf("onMouseEnter",["mouseout","mouseover"]);Xf("onMouseLeave",["mouseout","mouseover"]);Xf("onPointerEnter",["pointerout","pointerover"]);Xf("onPointerLeave",["pointerout","pointerover"]);Dd("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dd("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dd("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dd("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dd("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dd("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $m="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(" "),RX=new Set("cancel close invalid load scroll toggle".split(" ").concat($m));function z3(n,e,t){var r=n.type||"unknown-event";n.currentTarget=t,Aq(r,e,void 0,n),n.currentTarget=null}function c5(n,e){e=(e&4)!==0;for(var t=0;t<n.length;t++){var r=n[t],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;z3(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;z3(i,a,c),s=l}}}if(F_)throw n=sM,F_=!1,sM=null,n}function jn(n,e){var t=e[mM];t===void 0&&(t=e[mM]=new Set);var r=n+"__bubble";t.has(r)||(u5(e,n,2,!1),t.add(r))}function $b(n,e,t){var r=0;e&&(r|=4),u5(t,n,r,e)}var A0="_reactListening"+Math.random().toString(36).slice(2);function Ug(n){if(!n[A0]){n[A0]=!0,yU.forEach(function(t){t!=="selectionchange"&&(RX.has(t)||$b(t,!1,n),$b(t,!0,n))});var e=n.nodeType===9?n:n.ownerDocument;e===null||e[A0]||(e[A0]=!0,$b("selectionchange",!1,e))}}function u5(n,e,t,r){switch(qU(e)){case 1:var i=Hq;break;case 4:i=Gq;break;default:i=o2}t=i.bind(null,e,t,n),i=void 0,!iM||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?n.addEventListener(e,t,{capture:!0,passive:i}):n.addEventListener(e,t,!0):i!==void 0?n.addEventListener(e,t,{passive:i}):n.addEventListener(e,t,!1)}function qb(n,e,t,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;
vendor: 2,818 bytes, line 37
37if(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=$u(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}LU(function(){var c=s,u=n2(t),d=[];e:{var m=l5.get(n);if(m!==void 0){var g=l2,v=n;switch(n){case"keypress":if(Jx(t)===0)break e;case"keydown":case"keyup":g=sX;break;case"focusin":v="focus",g=jb;break;case"focusout":v="blur",g=jb;break;case"beforeblur":case"afterblur":g=jb;break;case"click":if(t.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=P3;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=qq;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=lX;break;case i5:case s5:case o5:g=Yq;break;case a5:g=uX;break;case"scroll":g=Wq;break;case"wheel":g=hX;break;case"copy":case"cut":case"paste":g=Jq;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=I3}var _=(e&4)!==0,x=!_&&n==="scroll",y=_?m!==null?m+"Capture":null:m;_=[];for(var S=c,b;S!==null;){b=S;var A=b.stateNode;if(b.tag===5&&A!==null&&(b=A,y!==null&&(A=Ig(S,y),A!=null&&_.push(Vg(S,A,b)))),x)break;S=S.return}0<_.length&&(m=new g(m,v,null,t,u),d.push({event:m,listeners:_}))}}if(!(e&7)){e:{if(m=n==="mouseover"||n==="pointerover",g=n==="mouseout"||n==="pointerout",m&&t!==nM&&(v=t.relatedTarget||t.fromElement)&&($u(v)||v[fl]))break e;if((g||m)&&(m=u.window===u?u:(m=u.ownerDocument)?m.defaultView||m.parentWindow:window,g?(v=t.relatedTarget||t.toElement,g=c,v=v?$u(v):null,v!==null&&(x=kd(v),v!==x||v.tag!==5&&v.tag!==6)&&(v=null)):(g=null,v=c),g!==v)){if(_=P3,A="onMouseLeave",y="onMouseEnter",S="mouse",(n==="pointerout"||n==="pointerover")&&(_=I3,A="onPointerLeave",y="onPointerEnter",S="pointer"),x=g==null?m:rf(g),b=v==null?m:rf(v),m=new _(A,S+"leave",g,t,u),m.target=x,m.relatedTarget=b,A=null,$u(u)===c&&(_=new _(y,S+"enter",v,t,u),_.target=b,_.relatedTarget=x,A=_),x=A,g&&v)t:{for(_=g,y=v,S=0,b=_;b;b=vh(b))S++;for(b=0,A=y;A;A=vh(A))b++;for(;0<S-b;)_=vh(_),S--;for(;0<b-S;)y=vh(y),b--;for(;S--;){if(_===y||y!==null&&_===y.alternate)break t;_=vh(_),y=vh(y)}_=null}else _=null;g!==null&&H3(d,m,g,_,!1),v!==null&&x!==null&&H3(d,x,v,_,!0)}}e:{if(m=c?rf(c):window,g=m.nodeName&&m.nodeName.toLowerCase(),g==="select"||g==="input"&&m.type==="file")var k=xX;else if(k3(m))if(ZU)k=bX;else{k=wX;var L=_X}else(g=m.nodeName)&&g.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(k=SX);if(k&&(k=k(n,c))){JU(d,k,t,u);break e}
vendor: 5,055 bytes, lines 37-38
37L&&L(n,m,c),n==="focusout"&&(L=m._wrapperState)&&L.controlled&&m.type==="number"&&QT(m,"number",m.value)}switch(L=c?rf(c):window,n){case"focusin":(k3(L)||L.contentEditable==="true")&&(tf=L,cM=c,cg=null);break;case"focusout":cg=cM=tf=null;break;case"mousedown":uM=!0;break;case"contextmenu":case"mouseup":case"dragend":uM=!1,j3(d,t,u);break;case"selectionchange":if(MX)break;case"keydown":case"keyup":j3(d,t,u)}var C;if(u2)e:{switch(n){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else ef?YU(n,t)&&(P="onCompositionEnd"):n==="keydown"&&t.keyCode===229&&(P="onCompositionStart");P&&(KU&&t.locale!=="ko"&&(ef||P!=="onCompositionStart"?P==="onCompositionEnd"&&ef&&(C=XU()):(uc=u,a2="value"in uc?uc.value:uc.textContent,ef=!0)),L=z_(c,P),0<L.length&&(P=new N3(P,n,null,t,u),d.push({event:P,listeners:L}),C?P.data=C:(C=QU(t),C!==null&&(P.data=C)))),(C=pX?mX(n,t):gX(n,t))&&(c=z_(c,"onBeforeInput"),0<c.length&&(u=new N3("onBeforeInput","beforeinput",null,t,u),d.push({event:u,listeners:c}),u.data=C))}c5(d,e)})}function Vg(n,e,t){return{instance:n,listener:e,currentTarget:t}}function z_(n,e){for(var t=e+"Capture",r=[];n!==null;){var i=n,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ig(n,t),s!=null&&r.unshift(Vg(n,s,i)),s=Ig(n,e),s!=null&&r.push(Vg(n,s,i))),n=n.return}return r}function vh(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function H3(n,e,t,r,i){for(var s=e._reactName,o=[];t!==null&&t!==r;){var a=t,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=Ig(t,s),l!=null&&o.unshift(Vg(t,l,a))):i||(l=Ig(t,s),l!=null&&o.push(Vg(t,l,a)))),t=t.return}o.length!==0&&n.push({event:e,listeners:o})}var PX=/\r\n?/g,NX=/\u0000|\uFFFD/g;function G3(n){return(typeof n=="string"?n:""+n).replace(PX,` 38`).replace(NX,"")}function C0(n,e,t){if(e=G3(e),G3(n)!==e&&t)throw Error(Fe(425))}function H_(){}var dM=null,hM=null;function fM(n,e){return n==="textarea"||n==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var pM=typeof setTimeout=="function"?setTimeout:void 0,IX=typeof clearTimeout=="function"?clearTimeout:void 0,W3=typeof Promise=="function"?Promise:void 0,LX=typeof queueMicrotask=="function"?queueMicrotask:typeof W3<"u"?function(n){return W3.resolve(null).then(n).catch(DX)}:pM;function DX(n){setTimeout(function(){throw n})}function Xb(n,e){var t=e,r=0;do{var i=t.nextSibling;if(n.removeChild(t),i&&i.nodeType===8)if(t=i.data,t==="/$"){if(r===0){n.removeChild(i),kg(e);return}r--}else t!=="$"&&t!=="$?"&&t!=="$!"||r++;t=i}while(t);kg(e)}function vc(n){for(;n!=null;n=n.nextSibling){var e=n.nodeType;if(e===1||e===3)break;if(e===8){if(e=n.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return n}function $3(n){n=n.previousSibling;for(var e=0;n;){if(n.nodeType===8){var t=n.data;if(t==="$"||t==="$!"||t==="$?"){if(e===0)return n;e--}else t==="/$"&&e++}n=n.previousSibling}return null}var wp=Math.random().toString(36).slice(2),ya="__reactFiber$"+wp,jg="__reactProps$"+wp,fl="__reactContainer$"+wp,mM="__reactEvents$"+wp,kX="__reactListeners$"+wp,OX="__reactHandles$"+wp;function $u(n){var e=n[ya];if(e)return e;for(var t=n.parentNode;t;){if(e=t[fl]||t[ya]){if(t=e.alternate,e.child!==null||t!==null&&t.child!==null)for(n=$3(n);n!==null;){if(t=n[ya])return t;n=$3(n)}return e}n=t,t=n.parentNode}return null}function zy(n){return n=n[ya]||n[fl],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function rf(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(Fe(33))}function tw(n){return n[jg]||null}var gM=[],sf=-1;function Qc(n){return{current:n}}function zn(n){0>sf||(n.current=gM[sf],gM[sf]=null,sf--)}function Un(n,e){sf++,gM[sf]=n.current,n.current=e}var kc={},ki=Qc(kc),vs=Qc(!1),yd=kc;function Kf(n,e){var t=n.type.contextTypes;if(!t)return kc;var r=n.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in t)i[s]=e[s];return r&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=e,n.__reactInternalMemoizedMaskedChildContext=i),i}function xs(n){return n=n.childContextTypes,n!=null}function G_(){zn(vs),zn(ki)}function q3(n,e,t){if(ki.current!==kc)throw Error(Fe(168));Un(ki,e),Un(vs,t)}function d5(n,e,t){var r=n.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(Fe(108,_q(n)||"Unknown",i));return sr({},t,r)}function W_(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||kc,yd=ki.current,Un(ki,n),Un(vs,vs.current),!0}function X3(n,e,t){var r=n.stateNode;if(!r)throw Error(Fe(169));t?(n=d5(n,e,yd),r.__reactInternalMemoizedMergedChildContext=n,zn(vs),zn(ki),Un(ki,n)):zn(vs),Un(vs,t)}var nl=null,nw=!1,Kb=!1;function h5(n){nl===null?nl=[n]:nl.push(n)}function FX(n){nw=!0,h5(n)}
vendor: 13,972 bytes, line 38
38function Jc(){if(!Kb&&nl!==null){Kb=!0;var n=0,e=In;try{var t=nl;for(In=1;n<t.length;n++){var r=t[n];do r=r(!0);while(r!==null)}nl=null,nw=!1}catch(i){throw nl!==null&&(nl=nl.slice(n+1)),FU(r2,Jc),i}finally{In=e,Kb=!1}}return null}var of=[],af=0,$_=null,q_=0,uo=[],ho=0,vd=null,ol=1,al="";function Vu(n,e){of[af++]=q_,of[af++]=$_,$_=n,q_=e}function f5(n,e,t){uo[ho++]=ol,uo[ho++]=al,uo[ho++]=vd,vd=n;var r=ol;n=al;var i=32-Xo(r)-1;r&=~(1<<i),t+=1;var s=32-Xo(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ol=1<<32-Xo(e)+i|t<<i|r,al=s+n}else ol=1<<s|t<<i|r,al=n}function h2(n){n.return!==null&&(Vu(n,1),f5(n,1,0))}function f2(n){for(;n===$_;)$_=of[--af],of[af]=null,q_=of[--af],of[af]=null;for(;n===vd;)vd=uo[--ho],uo[ho]=null,al=uo[--ho],uo[ho]=null,ol=uo[--ho],uo[ho]=null}var zs=null,js=null,Xn=!1,Ho=null;function p5(n,e){var t=go(5,null,null,0);t.elementType="DELETED",t.stateNode=e,t.return=n,e=n.deletions,e===null?(n.deletions=[t],n.flags|=16):e.push(t)}function K3(n,e){switch(n.tag){case 5:var t=n.type;return e=e.nodeType!==1||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(n.stateNode=e,zs=n,js=vc(e.firstChild),!0):!1;case 6:return e=n.pendingProps===""||e.nodeType!==3?null:e,e!==null?(n.stateNode=e,zs=n,js=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(t=vd!==null?{id:ol,overflow:al}:null,n.memoizedState={dehydrated:e,treeContext:t,retryLane:1073741824},t=go(18,null,null,0),t.stateNode=e,t.return=n,n.child=t,zs=n,js=null,!0):!1;default:return!1}}function yM(n){return(n.mode&1)!==0&&(n.flags&128)===0}function vM(n){if(Xn){var e=js;if(e){var t=e;if(!K3(n,e)){if(yM(n))throw Error(Fe(418));e=vc(t.nextSibling);var r=zs;e&&K3(n,e)?p5(r,t):(n.flags=n.flags&-4097|2,Xn=!1,zs=n)}}else{if(yM(n))throw Error(Fe(418));n.flags=n.flags&-4097|2,Xn=!1,zs=n}}}function Y3(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;zs=n}function R0(n){if(n!==zs)return!1;if(!Xn)return Y3(n),Xn=!0,!1;var e;if((e=n.tag!==3)&&!(e=n.tag!==5)&&(e=n.type,e=e!=="head"&&e!=="body"&&!fM(n.type,n.memoizedProps)),e&&(e=js)){if(yM(n))throw m5(),Error(Fe(418));for(;e;)p5(n,e),e=vc(e.nextSibling)}if(Y3(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(Fe(317));e:{for(n=n.nextSibling,e=0;n;){if(n.nodeType===8){var t=n.data;if(t==="/$"){if(e===0){js=vc(n.nextSibling);break e}e--}else t!=="$"&&t!=="$!"&&t!=="$?"||e++}n=n.nextSibling}js=null}}else js=zs?vc(n.stateNode.nextSibling):null;return!0}function m5(){for(var n=js;n;)n=vc(n.nextSibling)}function Yf(){js=zs=null,Xn=!1}function p2(n){Ho===null?Ho=[n]:Ho.push(n)}var UX=Cl.ReactCurrentBatchConfig;function _m(n,e,t){if(n=t.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(t._owner){if(t=t._owner,t){if(t.tag!==1)throw Error(Fe(309));var r=t.stateNode}if(!r)throw Error(Fe(147,n));var i=r,s=""+n;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 n!="string")throw Error(Fe(284));if(!t._owner)throw Error(Fe(290,n))}return n}function P0(n,e){throw n=Object.prototype.toString.call(e),Error(Fe(31,n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n))}function Q3(n){var e=n._init;return e(n._payload)}function g5(n){function e(y,S){if(n){var b=y.deletions;b===null?(y.deletions=[S],y.flags|=16):b.push(S)}}function t(y,S){if(!n)return null;for(;S!==null;)e(y,S),S=S.sibling;return null}function r(y,S){for(y=new Map;S!==null;)S.key!==null?y.set(S.key,S):y.set(S.index,S),S=S.sibling;return y}function i(y,S){return y=Sc(y,S),y.index=0,y.sibling=null,y}function s(y,S,b){return y.index=b,n?(b=y.alternate,b!==null?(b=b.index,b<S?(y.flags|=2,S):b):(y.flags|=2,S)):(y.flags|=1048576,S)}function o(y){return n&&y.alternate===null&&(y.flags|=2),y}function a(y,S,b,A){return S===null||S.tag!==6?(S=nE(b,y.mode,A),S.return=y,S):(S=i(S,b),S.return=y,S)}function l(y,S,b,A){var k=b.type;return k===Zh?u(y,S,b.props.children,A,b.key):S!==null&&(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Yl&&Q3(k)===S.type)?(A=i(S,b.props),A.ref=_m(y,S,b),A.return=y,A):(A=s_(b.type,b.key,b.props,null,y.mode,A),A.ref=_m(y,S,b),A.return=y,A)}function c(y,S,b,A){return S===null||S.tag!==4||S.stateNode.containerInfo!==b.containerInfo||S.stateNode.implementation!==b.implementation?(S=rE(b,y.mode,A),S.return=y,S):(S=i(S,b.children||[]),S.return=y,S)}function u(y,S,b,A,k){return S===null||S.tag!==7?(S=cd(b,y.mode,A,k),S.return=y,S):(S=i(S,b),S.return=y,S)}function d(y,S,b){if(typeof S=="string"&&S!==""||typeof S=="number")return S=nE(""+S,y.mode,b),S.return=y,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case x0:return b=s_(S.type,S.key,S.props,null,y.mode,b),b.ref=_m(y,null,S),b.return=y,b;case Jh:return S=rE(S,y.mode,b),S.return=y,S;case Yl:var A=S._init;return d(y,A(S._payload),b)}if(Gm(S)||mm(S))return S=cd(S,y.mode,b,null),S.return=y,S;P0(y,S)}return null}function m(y,S,b,A){var k=S!==null?S.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return k!==null?null:a(y,S,""+b,A);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case x0:return b.key===k?l(y,S,b,A):null;case Jh:return b.key===k?c(y,S,b,A):null;case Yl:return k=b._init,m(y,S,k(b._payload),A)}if(Gm(b)||mm(b))return k!==null?null:u(y,S,b,A,null);P0(y,b)}return null}function g(y,S,b,A,k){if(typeof A=="string"&&A!==""||typeof A=="number")return y=y.get(b)||null,a(S,y,""+A,k);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case x0:return y=y.get(A.key===null?b:A.key)||null,l(S,y,A,k);case Jh:return y=y.get(A.key===null?b:A.key)||null,c(S,y,A,k);case Yl:var L=A._init;return g(y,S,b,L(A._payload),k)}if(Gm(A)||mm(A))return y=y.get(b)||null,u(S,y,A,k,null);P0(S,A)}return null}function v(y,S,b,A){for(var k=null,L=null,C=S,P=S=0,R=null;C!==null&&P<b.length;P++){C.index>P?(R=C,C=null):R=C.sibling;var N=m(y,C,b[P],A);if(N===null){C===null&&(C=R);break}n&&C&&N.alternate===null&&e(y,C),S=s(N,S,P),L===null?k=N:L.sibling=N,L=N,C=R}if(P===b.length)return t(y,C),Xn&&Vu(y,P),k;if(C===null){for(;P<b.length;P++)C=d(y,b[P],A),C!==null&&(S=s(C,S,P),L===null?k=C:L.sibling=C,L=C);return Xn&&Vu(y,P),k}for(C=r(y,C);P<b.length;P++)R=g(C,y,P,b[P],A),R!==null&&(n&&R.alternate!==null&&C.delete(R.key===null?P:R.key),S=s(R,S,P),L===null?k=R:L.sibling=R,L=R);return n&&C.forEach(function(O){return e(y,O)}),Xn&&Vu(y,P),k}function _(y,S,b,A){var k=mm(b);if(typeof k!="function")throw Error(Fe(150));if(b=k.call(b),b==null)throw Error(Fe(151));for(var L=k=null,C=S,P=S=0,R=null,N=b.next();C!==null&&!N.done;P++,N=b.next()){C.index>P?(R=C,C=null):R=C.sibling;var O=m(y,C,N.value,A);if(O===null){C===null&&(C=R);break}n&&C&&O.alternate===null&&e(y,C),S=s(O,S,P),L===null?k=O:L.sibling=O,L=O,C=R}if(N.done)return t(y,C),Xn&&Vu(y,P),k;if(C===null){for(;!N.done;P++,N=b.next())N=d(y,N.value,A),N!==null&&(S=s(N,S,P),L===null?k=N:L.sibling=N,L=N);return Xn&&Vu(y,P),k}for(C=r(y,C);!N.done;P++,N=b.next())N=g(C,y,P,N.value,A),N!==null&&(n&&N.alternate!==null&&C.delete(N.key===null?P:N.key),S=s(N,S,P),L===null?k=N:L.sibling=N,L=N);return n&&C.forEach(function(V){return e(y,V)}),Xn&&Vu(y,P),k}function x(y,S,b,A){if(typeof b=="object"&&b!==null&&b.type===Zh&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case x0:e:{for(var k=b.key,L=S;L!==null;){if(L.key===k){if(k=b.type,k===Zh){if(L.tag===7){t(y,L.sibling),S=i(L,b.props.children),S.return=y,y=S;break e}}else if(L.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Yl&&Q3(k)===L.type){t(y,L.sibling),S=i(L,b.props),S.ref=_m(y,L,b),S.return=y,y=S;break e}t(y,L);break}else e(y,L);L=L.sibling}b.type===Zh?(S=cd(b.props.children,y.mode,A,b.key),S.return=y,y=S):(A=s_(b.type,b.key,b.props,null,y.mode,A),A.ref=_m(y,S,b),A.return=y,y=A)}return o(y);case Jh:e:{for(L=b.key;S!==null;){if(S.key===L)if(S.tag===4&&S.stateNode.containerInfo===b.containerInfo&&S.stateNode.implementation===b.implementation){t(y,S.sibling),S=i(S,b.children||[]),S.return=y,y=S;break e}else{t(y,S);break}else e(y,S);S=S.sibling}S=rE(b,y.mode,A),S.return=y,y=S}return o(y);case Yl:return L=b._init,x(y,S,L(b._payload),A)}if(Gm(b))return v(y,S,b,A);if(mm(b))return _(y,S,b,A);P0(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,S!==null&&S.tag===6?(t(y,S.sibling),S=i(S,b),S.return=y,y=S):(t(y,S),S=nE(b,y.mode,A),S.return=y,y=S),o(y)):t(y,S)}return x}var Qf=g5(!0),y5=g5(!1),X_=Qc(null),K_=null,lf=null,m2=null;function g2(){m2=lf=K_=null}function y2(n){var e=X_.current;zn(X_),n._currentValue=e}function xM(n,e,t){for(;n!==null;){var r=n.alternate;if((n.childLanes&e)!==e?(n.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),n===t)break;n=n.return}}function Tf(n,e){K_=n,m2=lf=null,n=n.dependencies,n!==null&&n.firstContext!==null&&(n.lanes&e&&(ys=!0),n.firstContext=null)}function wo(n){var e=n._currentValue;if(m2!==n)if(n={context:n,memoizedValue:e,next:null},lf===null){if(K_===null)throw Error(Fe(308));lf=n,K_.dependencies={lanes:0,firstContext:n}}else lf=lf.next=n;return e}var qu=null;function v2(n){qu===null?qu=[n]:qu.push(n)}function v5(n,e,t,r){var i=e.interleaved;return i===null?(t.next=t,v2(e)):(t.next=i.next,i.next=t),e.interleaved=t,pl(n,r)}function pl(n,e){n.lanes|=e;var t=n.alternate;for(t!==null&&(t.lanes|=e),t=n,n=n.return;n!==null;)n.childLanes|=e,t=n.alternate,t!==null&&(t.childLanes|=e),t=n,n=n.return;return t.tag===3?t.stateNode:null}var Ql=!1;function x2(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function x5(n,e){n=n.updateQueue,e.updateQueue===n&&(e.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function ul(n,e){return{eventTime:n,lane:e,tag:0,payload:null,callback:null,next:null}}function xc(n,e,t){var r=n.updateQueue;if(r===null)return null;if(r=r.shared,gn&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,pl(n,t)}return i=r.interleaved,i===null?(e.next=e,v2(r)):(e.next=i.next,i.next=e),r.interleaved=e,pl(n,t)}function Zx(n,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194240)!==0)){var r=e.lanes;r&=n.pendingLanes,t|=r,e.lanes=t,i2(n,t)}}function J3(n,e){var t=n.updateQueue,r=n.alternate;if(r!==null&&(r=r.updateQueue,t===r)){var i=null,s=null;if(t=t.firstBaseUpdate,t!==null){do{var o={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};s===null?i=s=o:s=s.next=o,t=t.next}while(t!==null);s===null?i=s=e:s=s.next=e}else i=s=e;t={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},n.updateQueue=t;return}n=t.lastBaseUpdate,n===null?t.firstBaseUpdate=e:n.next=e,t.lastBaseUpdate=e}function Y_(n,e,t,r){var i=n.updateQueue;Ql=!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=n.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,u=c=l=null,a=s;do{var m=a.lane,g=a.eventTime;if((r&m)===m){u!==null&&(u=u.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=n,_=a;switch(m=e,g=t,_.tag){case 1:if(v=_.payload,typeof v=="function"){d=v.call(g,d,m);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=_.payload,m=typeof v=="function"?v.call(g,d,m):v,m==null)break e;d=sr({},d,m);break e;case 2:Ql=!0}}a.callback!==null&&a.lane!==0&&(n.flags|=64,m=i.effects,m===null?i.effects=[a]:m.push(a))}else g={eventTime:g,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=g,l=d):u=u.next=g,o|=m;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;m=a,a=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);if(u===null&&(l=d),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);_d|=o,n.lanes=o,n.memoizedState=d}}function Z3(n,e,t){if(n=e.effects,e.effects=null,n!==null)for(e=0;e<n.length;e++){var r=n[e],i=r.callback;if(i!==null){if(r.callback=null,r=t,typeof i!="function")throw Error(Fe(191,i));i.call(r)}}}var Hy={},wa=Qc(Hy),Bg=Qc(Hy),zg=Qc(Hy);function Xu(n){if(n===Hy)throw Error(Fe(174));return n}function _2(n,e){switch(Un(zg,e),Un(Bg,n),Un(wa,Hy),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:ZT(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=ZT(e,n)}zn(wa),Un(wa,e)}function Jf(){zn(wa),zn(Bg),zn(zg)}function _5(n){Xu(zg.current);var e=Xu(wa.current),t=ZT(e,n.type);e!==t&&(Un(Bg,n),Un(wa,t))}function w2(n){Bg.current===n&&(zn(wa),zn(Bg))}var tr=Qc(0);function Q_(n){for(var e=n;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.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===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Yb=[];function S2(){for(var n=0;n<Yb.length;n++)Yb[n]._workInProgressVersionPrimary=null;Yb.length=0}var e_=Cl.ReactCurrentDispatcher,Qb=Cl.ReactCurrentBatchConfig,xd=0,ir=null,kr=null,Yr=null,J_=!1,ug=!1,Hg=0,VX=0;function wi(){throw Error(Fe(321))}function b2(n,e){if(e===null)return!1;for(var t=0;t<e.length&&t<n.length;t++)if(!Jo(n[t],e[t]))return!1;return!0}function E2(n,e,t,r,i,s){if(xd=s,ir=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,e_.current=n===null||n.memoizedState===null?HX:GX,n=t(r,i),ug){s=0;do{if(ug=!1,Hg=0,25<=s)throw Error(Fe(301));s+=1,Yr=kr=null,e.updateQueue=null,e_.current=WX,n=t(r,i)}while(ug)}
vendor: 5,025 bytes, line 38
38if(e_.current=Z_,e=kr!==null&&kr.next!==null,xd=0,Yr=kr=ir=null,J_=!1,e)throw Error(Fe(300));return n}function T2(){var n=Hg!==0;return Hg=0,n}function ha(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yr===null?ir.memoizedState=Yr=n:Yr=Yr.next=n,Yr}function So(){if(kr===null){var n=ir.alternate;n=n!==null?n.memoizedState:null}else n=kr.next;var e=Yr===null?ir.memoizedState:Yr.next;if(e!==null)Yr=e,kr=n;else{if(n===null)throw Error(Fe(310));kr=n,n={memoizedState:kr.memoizedState,baseState:kr.baseState,baseQueue:kr.baseQueue,queue:kr.queue,next:null},Yr===null?ir.memoizedState=Yr=n:Yr=Yr.next=n}return Yr}function Gg(n,e){return typeof e=="function"?e(n):e}function Jb(n){var e=So(),t=e.queue;if(t===null)throw Error(Fe(311));t.lastRenderedReducer=n;var r=kr,i=r.baseQueue,s=t.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,t.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var u=c.lane;if((xd&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:n(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,ir.lanes|=u,_d|=u}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,Jo(r,e.memoizedState)||(ys=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,t.lastRenderedState=r}if(n=t.interleaved,n!==null){i=n;do s=i.lane,ir.lanes|=s,_d|=s,i=i.next;while(i!==n)}else i===null&&(t.lanes=0);return[e.memoizedState,t.dispatch]}function Zb(n){var e=So(),t=e.queue;if(t===null)throw Error(Fe(311));t.lastRenderedReducer=n;var r=t.dispatch,i=t.pending,s=e.memoizedState;if(i!==null){t.pending=null;var o=i=i.next;do s=n(s,o.action),o=o.next;while(o!==i);Jo(s,e.memoizedState)||(ys=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),t.lastRenderedState=s}return[s,r]}function w5(){}function S5(n,e){var t=ir,r=So(),i=e(),s=!Jo(r.memoizedState,i);if(s&&(r.memoizedState=i,ys=!0),r=r.queue,M2(T5.bind(null,t,r,n),[n]),r.getSnapshot!==e||s||Yr!==null&&Yr.memoizedState.tag&1){if(t.flags|=2048,Wg(9,E5.bind(null,t,r,i,e),void 0,null),Jr===null)throw Error(Fe(349));xd&30||b5(t,e,i)}return i}function b5(n,e,t){n.flags|=16384,n={getSnapshot:e,value:t},e=ir.updateQueue,e===null?(e={lastEffect:null,stores:null},ir.updateQueue=e,e.stores=[n]):(t=e.stores,t===null?e.stores=[n]:t.push(n))}function E5(n,e,t,r){e.value=t,e.getSnapshot=r,M5(e)&&A5(n)}function T5(n,e,t){return t(function(){M5(e)&&A5(n)})}function M5(n){var e=n.getSnapshot;n=n.value;try{var t=e();return!Jo(n,t)}catch{return!0}}function A5(n){var e=pl(n,1);e!==null&&Ko(e,n,1,-1)}function eL(n){var e=ha();return typeof n=="function"&&(n=n()),e.memoizedState=e.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gg,lastRenderedState:n},e.queue=n,n=n.dispatch=zX.bind(null,ir,n),[e.memoizedState,n]}function Wg(n,e,t,r){return n={tag:n,create:e,destroy:t,deps:r,next:null},e=ir.updateQueue,e===null?(e={lastEffect:null,stores:null},ir.updateQueue=e,e.lastEffect=n.next=n):(t=e.lastEffect,t===null?e.lastEffect=n.next=n:(r=t.next,t.next=n,n.next=r,e.lastEffect=n)),n}function C5(){return So().memoizedState}function t_(n,e,t,r){var i=ha();ir.flags|=n,i.memoizedState=Wg(1|e,t,void 0,r===void 0?null:r)}function rw(n,e,t,r){var i=So();r=r===void 0?null:r;var s=void 0;if(kr!==null){var o=kr.memoizedState;if(s=o.destroy,r!==null&&b2(r,o.deps)){i.memoizedState=Wg(e,t,s,r);return}}ir.flags|=n,i.memoizedState=Wg(1|e,t,s,r)}function tL(n,e){return t_(8390656,8,n,e)}function M2(n,e){return rw(2048,8,n,e)}function R5(n,e){return rw(4,2,n,e)}function P5(n,e){return rw(4,4,n,e)}function N5(n,e){if(typeof e=="function")return n=n(),e(n),function(){e(null)};if(e!=null)return n=n(),e.current=n,function(){e.current=null}}function I5(n,e,t){return t=t!=null?t.concat([n]):null,rw(4,4,N5.bind(null,e,n),t)}function A2(){}function L5(n,e){var t=So();e=e===void 0?null:e;var r=t.memoizedState;return r!==null&&e!==null&&b2(e,r[1])?r[0]:(t.memoizedState=[n,e],n)}function D5(n,e){var t=So();e=e===void 0?null:e;var r=t.memoizedState;return r!==null&&e!==null&&b2(e,r[1])?r[0]:(n=n(),t.memoizedState=[n,e],n)}function k5(n,e,t){return xd&21?(Jo(t,e)||(t=jU(),ir.lanes|=t,_d|=t,n.baseState=!0),e):(n.baseState&&(n.baseState=!1,ys=!0),n.memoizedState=t)}function jX(n,e){var t=In;In=t!==0&&4>t?t:4,n(!0);var r=Qb.transition;Qb.transition={};try{n(!1),e()}finally{In=t,Qb.transition=r}}function O5(){return So().memoizedState}function BX(n,e,t){var r=wc(n);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},F5(n))U5(e,t);else if(t=v5(n,e,t,r),t!==null){var i=Zi();Ko(t,n,r,i),V5(t,e,r)}}function zX(n,e,t){var r=wc(n),i={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(F5(n))U5(e,i);else{var s=n.alternate;if(n.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,t);
vendor: 8,894 bytes, lines 38-40
38if(i.hasEagerState=!0,i.eagerState=a,Jo(a,o)){var l=e.interleaved;l===null?(i.next=i,v2(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}t=v5(n,e,i,r),t!==null&&(i=Zi(),Ko(t,n,r,i),V5(t,e,r))}}function F5(n){var e=n.alternate;return n===ir||e!==null&&e===ir}function U5(n,e){ug=J_=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function V5(n,e,t){if(t&4194240){var r=e.lanes;r&=n.pendingLanes,t|=r,e.lanes=t,i2(n,t)}}var Z_={readContext:wo,useCallback:wi,useContext:wi,useEffect:wi,useImperativeHandle:wi,useInsertionEffect:wi,useLayoutEffect:wi,useMemo:wi,useReducer:wi,useRef:wi,useState:wi,useDebugValue:wi,useDeferredValue:wi,useTransition:wi,useMutableSource:wi,useSyncExternalStore:wi,useId:wi,unstable_isNewReconciler:!1},HX={readContext:wo,useCallback:function(n,e){return ha().memoizedState=[n,e===void 0?null:e],n},useContext:wo,useEffect:tL,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,t_(4194308,4,N5.bind(null,e,n),t)},useLayoutEffect:function(n,e){return t_(4194308,4,n,e)},useInsertionEffect:function(n,e){return t_(4,2,n,e)},useMemo:function(n,e){var t=ha();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var r=ha();return e=t!==void 0?t(e):e,r.memoizedState=r.baseState=e,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:e},r.queue=n,n=n.dispatch=BX.bind(null,ir,n),[r.memoizedState,n]},useRef:function(n){var e=ha();return n={current:n},e.memoizedState=n},useState:eL,useDebugValue:A2,useDeferredValue:function(n){return ha().memoizedState=n},useTransition:function(){var n=eL(!1),e=n[0];return n=jX.bind(null,n[1]),ha().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var r=ir,i=ha();if(Xn){if(t===void 0)throw Error(Fe(407));t=t()}else{if(t=e(),Jr===null)throw Error(Fe(349));xd&30||b5(r,e,t)}i.memoizedState=t;var s={value:t,getSnapshot:e};return i.queue=s,tL(T5.bind(null,r,s,n),[n]),r.flags|=2048,Wg(9,E5.bind(null,r,s,t,e),void 0,null),t},useId:function(){var n=ha(),e=Jr.identifierPrefix;if(Xn){var t=al,r=ol;t=(r&~(1<<32-Xo(r)-1)).toString(32)+t,e=":"+e+"R"+t,t=Hg++,0<t&&(e+="H"+t.toString(32)),e+=":"}else t=VX++,e=":"+e+"r"+t.toString(32)+":";return n.memoizedState=e},unstable_isNewReconciler:!1},GX={readContext:wo,useCallback:L5,useContext:wo,useEffect:M2,useImperativeHandle:I5,useInsertionEffect:R5,useLayoutEffect:P5,useMemo:D5,useReducer:Jb,useRef:C5,useState:function(){return Jb(Gg)},useDebugValue:A2,useDeferredValue:function(n){var e=So();return k5(e,kr.memoizedState,n)},useTransition:function(){var n=Jb(Gg)[0],e=So().memoizedState;return[n,e]},useMutableSource:w5,useSyncExternalStore:S5,useId:O5,unstable_isNewReconciler:!1},WX={readContext:wo,useCallback:L5,useContext:wo,useEffect:M2,useImperativeHandle:I5,useInsertionEffect:R5,useLayoutEffect:P5,useMemo:D5,useReducer:Zb,useRef:C5,useState:function(){return Zb(Gg)},useDebugValue:A2,useDeferredValue:function(n){var e=So();return kr===null?e.memoizedState=n:k5(e,kr.memoizedState,n)},useTransition:function(){var n=Zb(Gg)[0],e=So().memoizedState;return[n,e]},useMutableSource:w5,useSyncExternalStore:S5,useId:O5,unstable_isNewReconciler:!1};function Fo(n,e){if(n&&n.defaultProps){e=sr({},e),n=n.defaultProps;for(var t in n)e[t]===void 0&&(e[t]=n[t]);return e}return e}function _M(n,e,t,r){e=n.memoizedState,t=t(r,e),t=t==null?e:sr({},e,t),n.memoizedState=t,n.lanes===0&&(n.updateQueue.baseState=t)}var iw={isMounted:function(n){return(n=n._reactInternals)?kd(n)===n:!1},enqueueSetState:function(n,e,t){n=n._reactInternals;var r=Zi(),i=wc(n),s=ul(r,i);s.payload=e,t!=null&&(s.callback=t),e=xc(n,s,i),e!==null&&(Ko(e,n,i,r),Zx(e,n,i))},enqueueReplaceState:function(n,e,t){n=n._reactInternals;var r=Zi(),i=wc(n),s=ul(r,i);s.tag=1,s.payload=e,t!=null&&(s.callback=t),e=xc(n,s,i),e!==null&&(Ko(e,n,i,r),Zx(e,n,i))},enqueueForceUpdate:function(n,e){n=n._reactInternals;var t=Zi(),r=wc(n),i=ul(t,r);i.tag=2,e!=null&&(i.callback=e),e=xc(n,i,r),e!==null&&(Ko(e,n,r,t),Zx(e,n,r))}};function nL(n,e,t,r,i,s,o){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!Fg(t,r)||!Fg(i,s):!0}function j5(n,e,t){var r=!1,i=kc,s=e.contextType;return typeof s=="object"&&s!==null?s=wo(s):(i=xs(e)?yd:ki.current,r=e.contextTypes,s=(r=r!=null)?Kf(n,i):kc),e=new e(t,s),n.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=iw,n.stateNode=e,e._reactInternals=n,r&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=i,n.__reactInternalMemoizedMaskedChildContext=s),e}function rL(n,e,t,r){n=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(t,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(t,r),e.state!==n&&iw.enqueueReplaceState(e,e.state,null)}function wM(n,e,t,r){var i=n.stateNode;i.props=t,i.state=n.memoizedState,i.refs={},x2(n);var s=e.contextType;typeof s=="object"&&s!==null?i.context=wo(s):(s=xs(e)?yd:ki.current,i.context=Kf(n,s)),i.state=n.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(_M(n,e,s,t),i.state=n.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&&iw.enqueueReplaceState(i,i.state,null),Y_(n,t,i,r),i.state=n.memoizedState),typeof i.componentDidMount=="function"&&(n.flags|=4194308)}function Zf(n,e){try{var t="",r=e;do t+=xq(r),r=r.return;while(r);var i=t}catch(s){i=` 39Error generating stack: `+s.message+` 40`+s.stack}return{value:n,source:e,stack:i,digest:null}}function eE(n,e,t){return{value:n,source:null,stack:t??null,digest:e??null}}function SM(n,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var $X=typeof WeakMap=="function"?WeakMap:Map;function B5(n,e,t){t=ul(-1,t),t.tag=3,t.payload={element:null};var r=e.value;return t.callback=function(){t1||(t1=!0,IM=r),SM(n,e)},t}function z5(n,e,t){t=ul(-1,t),t.tag=3;var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;t.payload=function(){return r(i)},t.callback=function(){SM(n,e)}}var s=n.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(t.callback=function(){SM(n,e),typeof r!="function"&&(_c===null?_c=new Set([this]):_c.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),t}function iL(n,e,t){var r=n.pingCache;if(r===null){r=n.pingCache=new $X;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(t)||(i.add(t),n=oK.bind(null,n,e,t),e.then(n,n))}function sL(n){do{var e;if((e=n.tag===13)&&(e=n.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return n;n=n.return}while(n!==null);return null}function oL(n,e,t,r,i){return n.mode&1?(n.flags|=65536,n.lanes=i,n):(n===e?n.flags|=65536:(n.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(e=ul(-1,1),e.tag=2,xc(t,e,1))),t.lanes|=1),n)}var qX=Cl.ReactCurrentOwner,ys=!1;function $i(n,e,t,r){e.child=n===null?y5(e,null,t,r):Qf(e,n.child,t,r)}function aL(n,e,t,r,i){t=t.render;var s=e.ref;return Tf(e,i),r=E2(n,e,t,r,s,i),t=T2(),n!==null&&!ys?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~i,ml(n,e,i)):(Xn&&t&&h2(e),e.flags|=1,$i(n,e,r,i),e.child)}function lL(n,e,t,r,i){if(n===null){var s=t.type;return typeof s=="function"&&!k2(s)&&s.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(e.tag=15,e.type=s,H5(n,e,s,r,i)):(n=s_(t.type,null,r,e,e.mode,i),n.ref=e.ref,n.return=e,e.child=n)}if(s=n.child,!(n.lanes&i)){var o=s.memoizedProps;if(t=t.compare,t=t!==null?t:Fg,t(o,r)&&n.ref===e.ref)return ml(n,e,i)}return e.flags|=1,n=Sc(s,r),n.ref=e.ref,n.return=e,e.child=n}function H5(n,e,t,r,i){if(n!==null){var s=n.memoizedProps;if(Fg(s,r)&&n.ref===e.ref)if(ys=!1,e.pendingProps=r=s,(n.lanes&i)!==0)n.flags&131072&&(ys=!0);else return e.lanes=n.lanes,ml(n,e,i)}return bM(n,e,t,r,i)}function G5(n,e,t){var r=e.pendingProps,i=r.children,s=n!==null?n.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Un(uf,Os),Os|=t;else{if(!(t&1073741824))return n=s!==null?s.baseLanes|t:t,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:n,cachePool:null,transitions:null},e.updateQueue=null,Un(uf,Os),Os|=n,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:t,Un(uf,Os),Os|=r}else s!==null?(r=s.baseLanes|t,e.memoizedState=null):r=t,Un(uf,Os),Os|=r;return $i(n,e,i,t),e.child}function W5(n,e){var t=e.ref;(n===null&&t!==null||n!==null&&n.ref!==t)&&(e.flags|=512,e.flags|=2097152)}
vendor: 8,515 bytes, line 40
40function bM(n,e,t,r,i){var s=xs(t)?yd:ki.current;return s=Kf(e,s),Tf(e,i),t=E2(n,e,t,r,s,i),r=T2(),n!==null&&!ys?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~i,ml(n,e,i)):(Xn&&r&&h2(e),e.flags|=1,$i(n,e,t,i),e.child)}function cL(n,e,t,r,i){if(xs(t)){var s=!0;W_(e)}else s=!1;if(Tf(e,i),e.stateNode===null)n_(n,e),j5(e,t,r),wM(e,t,r,i),r=!0;else if(n===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=t.contextType;typeof c=="object"&&c!==null?c=wo(c):(c=xs(t)?yd:ki.current,c=Kf(e,c));var u=t.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&rL(e,o,r,c),Ql=!1;var m=e.memoizedState;o.state=m,Y_(e,r,o,i),l=e.memoizedState,a!==r||m!==l||vs.current||Ql?(typeof u=="function"&&(_M(e,t,u,r),l=e.memoizedState),(a=Ql||nL(e,t,a,r,m,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=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,x5(n,e),a=e.memoizedProps,c=e.type===e.elementType?a:Fo(e.type,a),o.props=c,d=e.pendingProps,m=o.context,l=t.contextType,typeof l=="object"&&l!==null?l=wo(l):(l=xs(t)?yd:ki.current,l=Kf(e,l));var g=t.getDerivedStateFromProps;(u=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||m!==l)&&rL(e,o,r,l),Ql=!1,m=e.memoizedState,o.state=m,Y_(e,r,o,i);var v=e.memoizedState;a!==d||m!==v||vs.current||Ql?(typeof g=="function"&&(_M(e,t,g,r),v=e.memoizedState),(c=Ql||nL(e,t,c,r,m,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===n.memoizedProps&&m===n.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===n.memoizedProps&&m===n.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===n.memoizedProps&&m===n.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===n.memoizedProps&&m===n.memoizedState||(e.flags|=1024),r=!1)}return EM(n,e,t,r,s,i)}function EM(n,e,t,r,i,s){W5(n,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&X3(e,t,!1),ml(n,e,s);r=e.stateNode,qX.current=e;var a=o&&typeof t.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,n!==null&&o?(e.child=Qf(e,n.child,null,s),e.child=Qf(e,null,a,s)):$i(n,e,a,s),e.memoizedState=r.state,i&&X3(e,t,!0),e.child}function $5(n){var e=n.stateNode;e.pendingContext?q3(n,e.pendingContext,e.pendingContext!==e.context):e.context&&q3(n,e.context,!1),_2(n,e.containerInfo)}function uL(n,e,t,r,i){return Yf(),p2(i),e.flags|=256,$i(n,e,t,r),e.child}var TM={dehydrated:null,treeContext:null,retryLane:0};function MM(n){return{baseLanes:n,cachePool:null,transitions:null}}function q5(n,e,t){var r=e.pendingProps,i=tr.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=n!==null&&n.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(n===null||n.memoizedState!==null)&&(i|=1),Un(tr,i&1),n===null)return vM(e),n=e.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?(e.mode&1?n.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,n=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=aw(o,r,0,null),n=cd(n,r,t,null),s.return=e,n.return=e,s.sibling=n,e.child=s,e.child.memoizedState=MM(t),e.memoizedState=TM,n):C2(e,o));if(i=n.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return XX(n,e,o,r,a,i,t);if(s){s=r.fallback,o=e.mode,i=n.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=Sc(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Sc(a,s):(s=cd(s,o,t,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=n.child.memoizedState,o=o===null?MM(t):{baseLanes:o.baseLanes|t,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=n.childLanes&~t,e.memoizedState=TM,r}return s=n.child,n=s.sibling,r=Sc(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=t),r.return=e,r.sibling=null,n!==null&&(t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)),e.child=r,e.memoizedState=null,r}function C2(n,e){return e=aw({mode:"visible",children:e},n.mode,0,null),e.return=n,n.child=e}function N0(n,e,t,r){return r!==null&&p2(r),Qf(e,n.child,null,t),n=C2(e,e.pendingProps.children),n.flags|=2,e.memoizedState=null,n}function XX(n,e,t,r,i,s,o){if(t)return e.flags&256?(e.flags&=-257,r=eE(Error(Fe(422))),N0(n,e,o,r)):e.memoizedState!==null?(e.child=n.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=aw({mode:"visible",children:r.children},i,0,null),s=cd(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&Qf(e,n.child,null,o),e.child.memoizedState=MM(o),e.memoizedState=TM,s);if(!(e.mode&1))return N0(n,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(Fe(419)),r=eE(s,r,void 0),N0(n,e,o,r)}if(a=(o&n.childLanes)!==0,ys||a){if(r=Jr,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,pl(n,i),Ko(r,n,i,-1))}return D2(),r=eE(Error(Fe(421))),N0(n,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=n.child,e=aK.bind(null,n),i._reactRetry=e,null):(n=s.treeContext,js=vc(i.nextSibling),zs=e,Xn=!0,Ho=null,n!==null&&(uo[ho++]=ol,uo[ho++]=al,uo[ho++]=vd,ol=n.id,al=n.overflow,vd=e),e=C2(e,r.children),e.flags|=4096,e)}function dL(n,e,t){n.lanes|=e;var r=n.alternate;r!==null&&(r.lanes|=e),xM(n.return,e,t)}function tE(n,e,t,r,i){var s=n.memoizedState;s===null?n.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:t,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=t,s.tailMode=i)}function X5(n,e,t){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if($i(n,e,r.children,t),r=tr.current,r&2)r=r&1|2,e.flags|=128;else{if(n!==null&&n.flags&128)e:for(n=e.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&dL(n,t,e);else if(n.tag===19)dL(n,t,e);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}r&=1}if(Un(tr,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(t=e.child,i=null;t!==null;)n=t.alternate,n!==null&&Q_(n)===null&&(i=t),t=t.sibling;t=i,t===null?(i=e.child,e.child=null):(i=t.sibling,t.sibling=null),tE(e,!1,i,t,s);break;case"backwards":for(t=null,i=e.child,e.child=null;i!==null;){if(n=i.alternate,n!==null&&Q_(n)===null){e.child=i;break}n=i.sibling,i.sibling=t,t=i,i=n}tE(e,!0,t,null,s);break;case"together":tE(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function n_(n,e){!(e.mode&1)&&n!==null&&(n.alternate=null,e.alternate=null,e.flags|=2)}function ml(n,e,t){if(n!==null&&(e.dependencies=n.dependencies),_d|=e.lanes,!(t&e.childLanes))return null;if(n!==null&&e.child!==n.child)throw Error(Fe(153));if(e.child!==null){for(n=e.child,t=Sc(n,n.pendingProps),e.child=t,t.return=e;n.sibling!==null;)n=n.sibling,t=t.sibling=Sc(n,n.pendingProps),t.return=e;t.sibling=null}return e.child}function KX(n,e,t){switch(e.tag){case 3:$5(e),Yf();break;case 5:_5(e);break;case 1:xs(e.type)&&W_(e);break;case 4:_2(e,e.stateNode.containerInfo);break;
vendor: 4,414 bytes, line 40
40case 10:var r=e.type._context,i=e.memoizedProps.value;Un(X_,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Un(tr,tr.current&1),e.flags|=128,null):t&e.child.childLanes?q5(n,e,t):(Un(tr,tr.current&1),n=ml(n,e,t),n!==null?n.sibling:null);Un(tr,tr.current&1);break;case 19:if(r=(t&e.childLanes)!==0,n.flags&128){if(r)return X5(n,e,t);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Un(tr,tr.current),r)break;return null;case 22:case 23:return e.lanes=0,G5(n,e,t)}return ml(n,e,t)}var K5,AM,Y5,Q5;K5=function(n,e){for(var t=e.child;t!==null;){if(t.tag===5||t.tag===6)n.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};AM=function(){};Y5=function(n,e,t,r){var i=n.memoizedProps;if(i!==r){n=e.stateNode,Xu(wa.current);var s=null;switch(t){case"input":i=KT(n,i),r=KT(n,r),s=[];break;case"select":i=sr({},i,{value:void 0}),r=sr({},r,{value:void 0}),s=[];break;case"textarea":i=JT(n,i),r=JT(n,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(n.onclick=H_)}eM(t,r);var o;t=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)&&(t||(t={}),t[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Pg.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)||(t||(t={}),t[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(t||(t={}),t[o]=l[o])}else t||(s||(s=[]),s.push(c,t)),t=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"&&(Pg.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&jn("scroll",n),s||a===l||(s=[])):(s=s||[]).push(c,l))}t&&(s=s||[]).push("style",t);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};Q5=function(n,e,t,r){t!==r&&(e.flags|=4)};function wm(n,e){if(!Xn)switch(n.tailMode){case"hidden":e=n.tail;for(var t=null;e!==null;)e.alternate!==null&&(t=e),e=e.sibling;t===null?n.tail=null:t.sibling=null;break;case"collapsed":t=n.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e||n.tail===null?n.tail=null:n.tail.sibling=null:r.sibling=null}}function Si(n){var e=n.alternate!==null&&n.alternate.child===n.child,t=0,r=0;if(e)for(var i=n.child;i!==null;)t|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=n,i=i.sibling;else for(i=n.child;i!==null;)t|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=n,i=i.sibling;return n.subtreeFlags|=r,n.childLanes=t,e}function YX(n,e,t){var r=e.pendingProps;switch(f2(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Si(e),null;case 1:return xs(e.type)&&G_(),Si(e),null;case 3:return r=e.stateNode,Jf(),zn(vs),zn(ki),S2(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(n===null||n.child===null)&&(R0(e)?e.flags|=4:n===null||n.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ho!==null&&(kM(Ho),Ho=null))),AM(n,e),Si(e),null;case 5:w2(e);var i=Xu(zg.current);if(t=e.type,n!==null&&e.stateNode!=null)Y5(n,e,t,r,i),n.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(Fe(166));return Si(e),null}if(n=Xu(wa.current),R0(e)){r=e.stateNode,t=e.type;var s=e.memoizedProps;switch(r[ya]=e,r[jg]=s,n=(e.mode&1)!==0,t){case"dialog":jn("cancel",r),jn("close",r);break;case"iframe":case"object":case"embed":jn("load",r);break;case"video":case"audio":for(i=0;i<$m.length;i++)jn($m[i],r);break;case"source":jn("error",r);break;case"img":case"image":case"link":jn("error",r),jn("load",r);break;case"details":jn("toggle",r);break;case"input":_3(r,s),jn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},jn("invalid",r);break;case"textarea":S3(r,s),jn("invalid",r)}eM(t,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];
vendor: 30,215 bytes, line 40
40o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&C0(r.textContent,a,n),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&C0(r.textContent,a,n),i=["children",""+a]):Pg.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&jn("scroll",r)}switch(t){case"input":_0(r),w3(r,s,!0);break;case"textarea":_0(r),b3(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=H_)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=TU(t)),n==="http://www.w3.org/1999/xhtml"?t==="script"?(n=o.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof r.is=="string"?n=o.createElement(t,{is:r.is}):(n=o.createElement(t),t==="select"&&(o=n,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):n=o.createElementNS(n,t),n[ya]=e,n[jg]=r,K5(n,e,!1,!1),e.stateNode=n;e:{switch(o=tM(t,r),t){case"dialog":jn("cancel",n),jn("close",n),i=r;break;case"iframe":case"object":case"embed":jn("load",n),i=r;break;case"video":case"audio":for(i=0;i<$m.length;i++)jn($m[i],n);i=r;break;case"source":jn("error",n),i=r;break;case"img":case"image":case"link":jn("error",n),jn("load",n),i=r;break;case"details":jn("toggle",n),i=r;break;case"input":_3(n,r),i=KT(n,r),jn("invalid",n);break;case"option":i=r;break;case"select":n._wrapperState={wasMultiple:!!r.multiple},i=sr({},r,{value:void 0}),jn("invalid",n);break;case"textarea":S3(n,r),i=JT(n,r),jn("invalid",n);break;default:i=r}eM(t,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?CU(n,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&MU(n,l)):s==="children"?typeof l=="string"?(t!=="textarea"||l!=="")&&Ng(n,l):typeof l=="number"&&Ng(n,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Pg.hasOwnProperty(s)?l!=null&&s==="onScroll"&&jn("scroll",n):l!=null&&JC(n,s,l,o))}switch(t){case"input":_0(n),w3(n,r,!1);break;case"textarea":_0(n),b3(n);break;case"option":r.value!=null&&n.setAttribute("value",""+Dc(r.value));break;case"select":n.multiple=!!r.multiple,s=r.value,s!=null?wf(n,!!r.multiple,s,!1):r.defaultValue!=null&&wf(n,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(n.onclick=H_)}switch(t){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Si(e),null;case 6:if(n&&e.stateNode!=null)Q5(n,e,n.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(Fe(166));if(t=Xu(zg.current),Xu(wa.current),R0(e)){if(r=e.stateNode,t=e.memoizedProps,r[ya]=e,(s=r.nodeValue!==t)&&(n=zs,n!==null))switch(n.tag){case 3:C0(r.nodeValue,t,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&C0(r.nodeValue,t,(n.mode&1)!==0)}s&&(e.flags|=4)}else r=(t.nodeType===9?t:t.ownerDocument).createTextNode(r),r[ya]=e,e.stateNode=r}return Si(e),null;case 13:if(zn(tr),r=e.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Xn&&js!==null&&e.mode&1&&!(e.flags&128))m5(),Yf(),e.flags|=98560,s=!1;else if(s=R0(e),r!==null&&r.dehydrated!==null){if(n===null){if(!s)throw Error(Fe(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Fe(317));s[ya]=e}else Yf(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Si(e),s=!1}else Ho!==null&&(kM(Ho),Ho=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=t,e):(r=r!==null,r!==(n!==null&&n.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(n===null||tr.current&1?Fr===0&&(Fr=3):D2())),e.updateQueue!==null&&(e.flags|=4),Si(e),null);case 4:return Jf(),AM(n,e),n===null&&Ug(e.stateNode.containerInfo),Si(e),null;case 10:return y2(e.type._context),Si(e),null;case 17:return xs(e.type)&&G_(),Si(e),null;case 19:if(zn(tr),s=e.memoizedState,s===null)return Si(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)wm(s,!1);else{if(Fr!==0||n!==null&&n.flags&128)for(n=e.child;n!==null;){if(o=Q_(n),o!==null){for(e.flags|=128,wm(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=t,t=e.child;t!==null;)s=t,n=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=n,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,n=o.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t=t.sibling;return Un(tr,tr.current&1|2),e.child}n=n.sibling}s.tail!==null&&_r()>ep&&(e.flags|=128,r=!0,wm(s,!1),e.lanes=4194304)}else{if(!r)if(n=Q_(o),n!==null){if(e.flags|=128,r=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),wm(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Xn)return Si(e),null}else 2*_r()-s.renderingStartTime>ep&&t!==1073741824&&(e.flags|=128,r=!0,wm(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(t=s.last,t!==null?t.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=_r(),e.sibling=null,t=tr.current,Un(tr,r?t&1|2:t&1),e):(Si(e),null);case 22:case 23:return L2(),r=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Os&1073741824&&(Si(e),e.subtreeFlags&6&&(e.flags|=8192)):Si(e),null;case 24:return null;case 25:return null}throw Error(Fe(156,e.tag))}function QX(n,e){switch(f2(e),e.tag){case 1:return xs(e.type)&&G_(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return Jf(),zn(vs),zn(ki),S2(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return w2(e),null;case 13:if(zn(tr),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(Fe(340));Yf()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return zn(tr),null;case 4:return Jf(),null;case 10:return y2(e.type._context),null;case 22:case 23:return L2(),null;case 24:return null;default:return null}}var I0=!1,Pi=!1,JX=typeof WeakSet=="function"?WeakSet:Set,ct=null;function cf(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){dr(n,e,r)}else t.current=null}function CM(n,e,t){try{t()}catch(r){dr(n,e,r)}}var hL=!1;function ZX(n,e){if(dM=j_,n=n5(),d2(n)){if("selectionStart"in n)var t={start:n.selectionStart,end:n.selectionEnd};else e:{t=(t=n.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{t.nodeType,s.nodeType}catch{t=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=n,m=null;t:for(;;){for(var g;d!==t||i!==0&&d.nodeType!==3||(a=o+i),d!==s||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(g=d.firstChild)!==null;)m=d,d=g;for(;;){if(d===n)break t;if(m===t&&++c===i&&(a=o),m===s&&++u===r&&(l=o),(g=d.nextSibling)!==null)break;d=m,m=d.parentNode}d=g}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(hM={focusedElem:n,selectionRange:t},j_=!1,ct=e;ct!==null;)if(e=ct,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,ct=n;else for(;ct!==null;){e=ct;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var _=v.memoizedProps,x=v.memoizedState,y=e.stateNode,S=y.getSnapshotBeforeUpdate(e.elementType===e.type?_:Fo(e.type,_),x);y.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Fe(163))}}catch(A){dr(e,e.return,A)}if(n=e.sibling,n!==null){n.return=e.return,ct=n;break}ct=e.return}return v=hL,hL=!1,v}function dg(n,e,t){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&n)===n){var s=i.destroy;i.destroy=void 0,s!==void 0&&CM(e,t,s)}i=i.next}while(i!==r)}}function sw(n,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&n)===n){var r=t.create;t.destroy=r()}t=t.next}while(t!==e)}}function RM(n){var e=n.ref;if(e!==null){var t=n.stateNode;switch(n.tag){case 5:n=t;break;default:n=t}typeof e=="function"?e(n):e.current=n}}function J5(n){var e=n.alternate;e!==null&&(n.alternate=null,J5(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[ya],delete e[jg],delete e[mM],delete e[kX],delete e[OX])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Z5(n){return n.tag===5||n.tag===3||n.tag===4}function fL(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Z5(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function PM(n,e,t){var r=n.tag;if(r===5||r===6)n=n.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(n,e):t.insertBefore(n,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(n,t)):(e=t,e.appendChild(n)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=H_));else if(r!==4&&(n=n.child,n!==null))for(PM(n,e,t),n=n.sibling;n!==null;)PM(n,e,t),n=n.sibling}function NM(n,e,t){var r=n.tag;if(r===5||r===6)n=n.stateNode,e?t.insertBefore(n,e):t.appendChild(n);else if(r!==4&&(n=n.child,n!==null))for(NM(n,e,t),n=n.sibling;n!==null;)NM(n,e,t),n=n.sibling}var ri=null,zo=!1;function Fl(n,e,t){for(t=t.child;t!==null;)eV(n,e,t),t=t.sibling}function eV(n,e,t){if(_a&&typeof _a.onCommitFiberUnmount=="function")try{_a.onCommitFiberUnmount(Q1,t)}catch{}switch(t.tag){case 5:Pi||cf(t,e);case 6:var r=ri,i=zo;ri=null,Fl(n,e,t),ri=r,zo=i,ri!==null&&(zo?(n=ri,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):ri.removeChild(t.stateNode));break;case 18:ri!==null&&(zo?(n=ri,t=t.stateNode,n.nodeType===8?Xb(n.parentNode,t):n.nodeType===1&&Xb(n,t),kg(n)):Xb(ri,t.stateNode));break;case 4:r=ri,i=zo,ri=t.stateNode.containerInfo,zo=!0,Fl(n,e,t),ri=r,zo=i;break;case 0:case 11:case 14:case 15:if(!Pi&&(r=t.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)&&CM(t,e,o),i=i.next}while(i!==r)}Fl(n,e,t);break;case 1:if(!Pi&&(cf(t,e),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(a){dr(t,e,a)}Fl(n,e,t);break;case 21:Fl(n,e,t);break;case 22:t.mode&1?(Pi=(r=Pi)||t.memoizedState!==null,Fl(n,e,t),Pi=r):Fl(n,e,t);break;default:Fl(n,e,t)}}function pL(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new JX),e.forEach(function(r){var i=lK.bind(null,n,r);t.has(r)||(t.add(r),r.then(i,i))})}}function Ro(n,e){var t=e.deletions;if(t!==null)for(var r=0;r<t.length;r++){var i=t[r];try{var s=n,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:ri=a.stateNode,zo=!1;break e;case 3:ri=a.stateNode.containerInfo,zo=!0;break e;case 4:ri=a.stateNode.containerInfo,zo=!0;break e}a=a.return}if(ri===null)throw Error(Fe(160));eV(s,o,i),ri=null,zo=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){dr(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)tV(e,n),e=e.sibling}function tV(n,e){var t=n.alternate,r=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(Ro(e,n),da(n),r&4){try{dg(3,n,n.return),sw(3,n)}catch(_){dr(n,n.return,_)}try{dg(5,n,n.return)}catch(_){dr(n,n.return,_)}}break;case 1:Ro(e,n),da(n),r&512&&t!==null&&cf(t,t.return);break;case 5:if(Ro(e,n),da(n),r&512&&t!==null&&cf(t,t.return),n.flags&32){var i=n.stateNode;try{Ng(i,"")}catch(_){dr(n,n.return,_)}}if(r&4&&(i=n.stateNode,i!=null)){var s=n.memoizedProps,o=t!==null?t.memoizedProps:s,a=n.type,l=n.updateQueue;if(n.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&bU(i,s),tM(a,o);var c=tM(a,s);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?CU(i,d):u==="dangerouslySetInnerHTML"?MU(i,d):u==="children"?Ng(i,d):JC(i,u,d,c)}switch(a){case"input":YT(i,s);break;case"textarea":EU(i,s);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var g=s.value;g!=null?wf(i,!!s.multiple,g,!1):m!==!!s.multiple&&(s.defaultValue!=null?wf(i,!!s.multiple,s.defaultValue,!0):wf(i,!!s.multiple,s.multiple?[]:"",!1))}i[jg]=s}catch(_){dr(n,n.return,_)}}break;case 6:if(Ro(e,n),da(n),r&4){if(n.stateNode===null)throw Error(Fe(162));i=n.stateNode,s=n.memoizedProps;try{i.nodeValue=s}catch(_){dr(n,n.return,_)}}break;case 3:if(Ro(e,n),da(n),r&4&&t!==null&&t.memoizedState.isDehydrated)try{kg(e.containerInfo)}catch(_){dr(n,n.return,_)}break;case 4:Ro(e,n),da(n);break;case 13:Ro(e,n),da(n),i=n.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(N2=_r())),r&4&&pL(n);break;case 22:if(u=t!==null&&t.memoizedState!==null,n.mode&1?(Pi=(c=Pi)||u,Ro(e,n),Pi=c):Ro(e,n),da(n),r&8192){if(c=n.memoizedState!==null,(n.stateNode.isHidden=c)&&!u&&n.mode&1)for(ct=n,u=n.child;u!==null;){for(d=ct=u;ct!==null;){switch(m=ct,g=m.child,m.tag){case 0:case 11:case 14:case 15:dg(4,m,m.return);break;case 1:cf(m,m.return);var v=m.stateNode;if(typeof v.componentWillUnmount=="function"){r=m,t=m.return;try{e=r,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(_){dr(r,t,_)}}break;case 5:cf(m,m.return);break;case 22:if(m.memoizedState!==null){gL(d);continue}}g!==null?(g.return=m,ct=g):gL(d)}u=u.sibling}e:for(u=null,d=n;;){if(d.tag===5){if(u===null){u=d;try{i=d.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=AU("display",o))}catch(_){dr(n,n.return,_)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(_){dr(n,n.return,_)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===n)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===n)break e;for(;d.sibling===null;){if(d.return===null||d.return===n)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ro(e,n),da(n),r&4&&pL(n);break;case 21:break;default:Ro(e,n),da(n)}}function da(n){var e=n.flags;if(e&2){try{e:{for(var t=n.return;t!==null;){if(Z5(t)){var r=t;break e}t=t.return}throw Error(Fe(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ng(i,""),r.flags&=-33);var s=fL(n);NM(n,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=fL(n);PM(n,a,o);break;default:throw Error(Fe(161))}}catch(l){dr(n,n.return,l)}n.flags&=-3}e&4096&&(n.flags&=-4097)}function eK(n,e,t){ct=n,nV(n)}function nV(n,e,t){for(var r=(n.mode&1)!==0;ct!==null;){var i=ct,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||I0;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Pi;a=I0;var c=Pi;if(I0=o,(Pi=l)&&!c)for(ct=i;ct!==null;)o=ct,l=o.child,o.tag===22&&o.memoizedState!==null?yL(i):l!==null?(l.return=o,ct=l):yL(i);for(;s!==null;)ct=s,nV(s),s=s.sibling;ct=i,I0=a,Pi=c}mL(n)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ct=s):mL(n)}}function mL(n){for(;ct!==null;){var e=ct;if(e.flags&8772){var t=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Pi||sw(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Pi)if(t===null)r.componentDidMount();else{var i=e.elementType===e.type?t.memoizedProps:Fo(e.type,t.memoizedProps);r.componentDidUpdate(i,t.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&Z3(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(t=null,e.child!==null)switch(e.child.tag){case 5:t=e.child.stateNode;break;case 1:t=e.child.stateNode}Z3(e,o,t)}break;case 5:var a=e.stateNode;if(t===null&&e.flags&4){t=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&t.focus();break;case"img":l.src&&(t.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&kg(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Fe(163))}Pi||e.flags&512&&RM(e)}catch(m){dr(e,e.return,m)}}if(e===n){ct=null;break}if(t=e.sibling,t!==null){t.return=e.return,ct=t;break}ct=e.return}}function gL(n){for(;ct!==null;){var e=ct;if(e===n){ct=null;break}var t=e.sibling;if(t!==null){t.return=e.return,ct=t;break}ct=e.return}}function yL(n){for(;ct!==null;){var e=ct;try{switch(e.tag){case 0:case 11:case 15:var t=e.return;try{sw(4,e)}catch(l){dr(e,t,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){dr(e,i,l)}}var s=e.return;try{RM(e)}catch(l){dr(e,s,l)}break;case 5:var o=e.return;try{RM(e)}catch(l){dr(e,o,l)}}}catch(l){dr(e,e.return,l)}if(e===n){ct=null;break}var a=e.sibling;if(a!==null){a.return=e.return,ct=a;break}ct=e.return}}var tK=Math.ceil,e1=Cl.ReactCurrentDispatcher,R2=Cl.ReactCurrentOwner,vo=Cl.ReactCurrentBatchConfig,gn=0,Jr=null,Rr=null,ai=0,Os=0,uf=Qc(0),Fr=0,$g=null,_d=0,ow=0,P2=0,hg=null,fs=null,N2=0,ep=1/0,tl=null,t1=!1,IM=null,_c=null,L0=!1,dc=null,n1=0,fg=0,LM=null,r_=-1,i_=0;function Zi(){return gn&6?_r():r_!==-1?r_:r_=_r()}function wc(n){return n.mode&1?gn&2&&ai!==0?ai&-ai:UX.transition!==null?(i_===0&&(i_=jU()),i_):(n=In,n!==0||(n=window.event,n=n===void 0?16:qU(n.type)),n):1}function Ko(n,e,t,r){if(50<fg)throw fg=0,LM=null,Error(Fe(185));jy(n,t,r),(!(gn&2)||n!==Jr)&&(n===Jr&&(!(gn&2)&&(ow|=t),Fr===4&&rc(n,ai)),_s(n,r),t===1&&gn===0&&!(e.mode&1)&&(ep=_r()+500,nw&&Jc()))}function _s(n,e){var t=n.callbackNode;Uq(n,e);var r=V_(n,n===Jr?ai:0);if(r===0)t!==null&&M3(t),n.callbackNode=null,n.callbackPriority=0;else if(e=r&-r,n.callbackPriority!==e){if(t!=null&&M3(t),e===1)n.tag===0?FX(vL.bind(null,n)):h5(vL.bind(null,n)),LX(function(){!(gn&6)&&Jc()}),t=null;else{switch(BU(r)){case 1:t=r2;break;case 4:t=UU;break;case 16:t=U_;break;case 536870912:t=VU;break;default:t=U_}t=uV(t,rV.bind(null,n))}n.callbackPriority=e,n.callbackNode=t}}function rV(n,e){if(r_=-1,i_=0,gn&6)throw Error(Fe(327));var t=n.callbackNode;if(Mf()&&n.callbackNode!==t)return null;var r=V_(n,n===Jr?ai:0);if(r===0)return null;if(r&30||r&n.expiredLanes||e)e=r1(n,r);else{e=r;var i=gn;gn|=2;var s=sV();(Jr!==n||ai!==e)&&(tl=null,ep=_r()+500,ld(n,e));do try{iK();break}catch(a){iV(n,a)}while(!0);g2(),e1.current=s,gn=i,Rr!==null?e=0:(Jr=null,ai=0,e=Fr)}if(e!==0){if(e===2&&(i=oM(n),i!==0&&(r=i,e=DM(n,i))),e===1)throw t=$g,ld(n,0),rc(n,r),_s(n,_r()),t;if(e===6)rc(n,r);else{if(i=n.current.alternate,!(r&30)&&!nK(i)&&(e=r1(n,r),e===2&&(s=oM(n),s!==0&&(r=s,e=DM(n,s))),e===1))throw t=$g,ld(n,0),rc(n,r),_s(n,_r()),t;switch(n.finishedWork=i,n.finishedLanes=r,e){case 0:case 1:throw Error(Fe(345));case 2:ju(n,fs,tl);break;case 3:if(rc(n,r),(r&130023424)===r&&(e=N2+500-_r(),10<e)){if(V_(n,0)!==0)break;if(i=n.suspendedLanes,(i&r)!==r){Zi(),n.pingedLanes|=n.suspendedLanes&i;break}n.timeoutHandle=pM(ju.bind(null,n,fs,tl),e);break}ju(n,fs,tl);break;case 4:if(rc(n,r),(r&4194240)===r)break;for(e=n.eventTimes,i=-1;0<r;){var o=31-Xo(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=_r()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*tK(r/1960))-r,10<r){n.timeoutHandle=pM(ju.bind(null,n,fs,tl),r);break}ju(n,fs,tl);break;case 5:ju(n,fs,tl);break;default:throw Error(Fe(329))}}}return _s(n,_r()),n.callbackNode===t?rV.bind(null,n):null}function DM(n,e){var t=hg;return n.current.memoizedState.isDehydrated&&(ld(n,e).flags|=256),n=r1(n,e),n!==2&&(e=fs,fs=t,e!==null&&kM(e)),n}function kM(n){fs===null?fs=n:fs.push.apply(fs,n)}function nK(n){for(var e=n;;){if(e.flags&16384){var t=e.updateQueue;if(t!==null&&(t=t.stores,t!==null))for(var r=0;r<t.length;r++){var i=t[r],s=i.getSnapshot;i=i.value;try{if(!Jo(s(),i))return!1}catch{return!1}}}if(t=e.child,e.subtreeFlags&16384&&t!==null)t.return=e,e=t;else{if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function rc(n,e){for(e&=~P2,e&=~ow,n.suspendedLanes|=e,n.pingedLanes&=~e,n=n.expirationTimes;0<e;){var t=31-Xo(e),r=1<<t;n[t]=-1,e&=~r}}function vL(n){if(gn&6)throw Error(Fe(327));Mf();var e=V_(n,0);if(!(e&1))return _s(n,_r()),null;var t=r1(n,e);if(n.tag!==0&&t===2){var r=oM(n);r!==0&&(e=r,t=DM(n,r))}if(t===1)throw t=$g,ld(n,0),rc(n,e),_s(n,_r()),t;if(t===6)throw Error(Fe(345));return n.finishedWork=n.current.alternate,n.finishedLanes=e,ju(n,fs,tl),_s(n,_r()),null}function I2(n,e){var t=gn;gn|=1;try{return n(e)}finally{gn=t,gn===0&&(ep=_r()+500,nw&&Jc())}}function wd(n){dc!==null&&dc.tag===0&&!(gn&6)&&Mf();var e=gn;gn|=1;var t=vo.transition,r=In;try{if(vo.transition=null,In=1,n)return n()}finally{In=r,vo.transition=t,gn=e,!(gn&6)&&Jc()}}function L2(){Os=uf.current,zn(uf)}function ld(n,e){n.finishedWork=null,n.finishedLanes=0;var t=n.timeoutHandle;if(t!==-1&&(n.timeoutHandle=-1,IX(t)),Rr!==null)for(t=Rr.return;t!==null;){var r=t;switch(f2(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&G_();break;case 3:Jf(),zn(vs),zn(ki),S2();break;case 5:w2(r);break;case 4:Jf();break;case 13:zn(tr);break;case 19:zn(tr);break;case 10:y2(r.type._context);break;case 22:case 23:L2()}t=t.return}if(Jr=n,Rr=n=Sc(n.current,null),ai=Os=e,Fr=0,$g=null,P2=ow=_d=0,fs=hg=null,qu!==null){for(e=0;e<qu.length;e++)if(t=qu[e],r=t.interleaved,r!==null){t.interleaved=null;var i=r.next,s=t.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}t.pending=r}qu=null}return n}function iV(n,e){do{var t=Rr;try{if(g2(),e_.current=Z_,J_){for(var r=ir.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}J_=!1}if(xd=0,Yr=kr=ir=null,ug=!1,Hg=0,R2.current=null,t===null||t.return===null){Fr=1,$g=e,Rr=null;break}e:{var s=n,o=t.return,a=t,l=e;if(e=ai,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var m=u.alternate;m?(u.updateQueue=m.updateQueue,u.memoizedState=m.memoizedState,u.lanes=m.lanes):(u.updateQueue=null,u.memoizedState=null)}var g=sL(o);if(g!==null){g.flags&=-257,oL(g,o,a,s,e),g.mode&1&&iL(s,c,e),e=g,l=c;var v=e.updateQueue;if(v===null){var _=new Set;_.add(l),e.updateQueue=_}else v.add(l);break e}else{if(!(e&1)){iL(s,c,e),D2();break e}l=Error(Fe(426))}}else if(Xn&&a.mode&1){var x=sL(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),oL(x,o,a,s,e),p2(Zf(l,a));break e}}s=l=Zf(l,a),Fr!==4&&(Fr=2),hg===null?hg=[s]:hg.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var y=B5(s,l,e);J3(s,y);break e;case 1:a=l;var S=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof S.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(_c===null||!_c.has(b)))){s.flags|=65536,e&=-e,s.lanes|=e;var A=z5(s,a,e);J3(s,A);break e}}s=s.return}while(s!==null)}aV(t)}catch(k){e=k,Rr===t&&t!==null&&(Rr=t=t.return);continue}break}while(!0)}function sV(){var n=e1.current;return e1.current=Z_,n===null?Z_:n}function D2(){(Fr===0||Fr===3||Fr===2)&&(Fr=4),Jr===null||!(_d&268435455)&&!(ow&268435455)||rc(Jr,ai)}function r1(n,e){var t=gn;gn|=2;var r=sV();(Jr!==n||ai!==e)&&(tl=null,ld(n,e));do try{rK();break}catch(i){iV(n,i)}while(!0);if(g2(),gn=t,e1.current=r,Rr!==null)throw Error(Fe(261));return Jr=null,ai=0,Fr}function rK(){for(;Rr!==null;)oV(Rr)}function iK(){for(;Rr!==null&&!Rq();)oV(Rr)}function oV(n){var e=cV(n.alternate,n,Os);n.memoizedProps=n.pendingProps,e===null?aV(n):Rr=e,R2.current=null}function aV(n){var e=n;do{var t=e.alternate;if(n=e.return,e.flags&32768){if(t=QX(t,e),t!==null){t.flags&=32767,Rr=t;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{Fr=6,Rr=null;return}}else if(t=YX(t,e,Os),t!==null){Rr=t;return}if(e=e.sibling,e!==null){Rr=e;return}Rr=e=n}while(e!==null);Fr===0&&(Fr=5)}function ju(n,e,t){var r=In,i=vo.transition;try{vo.transition=null,In=1,sK(n,e,t,r)}finally{vo.transition=i,In=r}return null}function sK(n,e,t,r){do Mf();while(dc!==null);if(gn&6)throw Error(Fe(327));t=n.finishedWork;var i=n.finishedLanes;if(t===null)return null;if(n.finishedWork=null,n.finishedLanes=0,t===n.current)throw Error(Fe(177));n.callbackNode=null,n.callbackPriority=0;var s=t.lanes|t.childLanes;if(Vq(n,s),n===Jr&&(Rr=Jr=null,ai=0),!(t.subtreeFlags&2064)&&!(t.flags&2064)||L0||(L0=!0,uV(U_,function(){return Mf(),null})),s=(t.flags&15990)!==0,t.subtreeFlags&15990||s){s=vo.transition,vo.transition=null;var o=In;In=1;var a=gn;gn|=4,R2.current=null,ZX(n,t),tV(t,n),TX(hM),j_=!!dM,hM=dM=null,n.current=t,eK(t),Pq(),gn=a,In=o,vo.transition=s}else n.current=t;if(L0&&(L0=!1,dc=n,n1=i),s=n.pendingLanes,s===0&&(_c=null),Lq(t.stateNode),_s(n,_r()),e!==null)for(r=n.onRecoverableError,t=0;t<e.length;t++)i=e[t],r(i.value,{componentStack:i.stack,digest:i.digest});if(t1)throw t1=!1,n=IM,IM=null,n;return n1&1&&n.tag!==0&&Mf(),s=n.pendingLanes,s&1?n===LM?fg++:(fg=0,LM=n):fg=0,Jc(),null}function Mf(){if(dc!==null){var n=BU(n1),e=vo.transition,t=In;try{if(vo.transition=null,In=16>n?16:n,dc===null)var r=!1;else{if(n=dc,dc=null,n1=0,gn&6)throw Error(Fe(331));var i=gn;for(gn|=4,ct=n.current;ct!==null;){var s=ct,o=s.child;if(ct.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(ct=c;ct!==null;){var u=ct;switch(u.tag){case 0:case 11:case 15:dg(8,u,s)}var d=u.child;if(d!==null)d.return=u,ct=d;else for(;ct!==null;){u=ct;var m=u.sibling,g=u.return;if(J5(u),u===c){ct=null;break}if(m!==null){m.return=g,ct=m;break}ct=g}}}var v=s.alternate;if(v!==null){var _=v.child;if(_!==null){v.child=null;do{var x=_.sibling;_.sibling=null,_=x}while(_!==null)}}ct=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,ct=o;else e:for(;ct!==null;){if(s=ct,s.flags&2048)switch(s.tag){case 0:case 11:case 15:dg(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,ct=y;break e}ct=s.return}}var S=n.current;for(ct=S;ct!==null;){o=ct;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,ct=b;else e:for(o=S;ct!==null;){if(a=ct,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:sw(9,a)}}catch(k){dr(a,a.return,k)}if(a===o){ct=null;break e}var A=a.sibling;if(A!==null){A.return=a.return,ct=A;break e}ct=a.return}}if(gn=i,Jc(),_a&&typeof _a.onPostCommitFiberRoot=="function")try{_a.onPostCommitFiberRoot(Q1,n)}catch{}r=!0}return r}finally{In=t,vo.transition=e}}return!1}function xL(n,e,t){e=Zf(t,e),e=B5(n,e,1),n=xc(n,e,1),e=Zi(),n!==null&&(jy(n,1,e),_s(n,e))}function dr(n,e,t){if(n.tag===3)xL(n,n,t);else for(;e!==null;){if(e.tag===3){xL(e,n,t);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(_c===null||!_c.has(r))){n=Zf(t,n),n=z5(e,n,1),e=xc(e,n,1),n=Zi(),e!==null&&(jy(e,1,n),_s(e,n));break}}e=e.return}}function oK(n,e,t){var r=n.pingCache;r!==null&&r.delete(e),e=Zi(),n.pingedLanes|=n.suspendedLanes&t,Jr===n&&(ai&t)===t&&(Fr===4||Fr===3&&(ai&130023424)===ai&&500>_r()-N2?ld(n,0):P2|=t),_s(n,e)}function lV(n,e){e===0&&(n.mode&1?(e=b0,b0<<=1,!(b0&130023424)&&(b0=4194304)):e=1);var t=Zi();n=pl(n,e),n!==null&&(jy(n,e,t),_s(n,t))}function aK(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),lV(n,t)}function lK(n,e){var t=0;switch(n.tag){case 13:var r=n.stateNode,i=n.memoizedState;i!==null&&(t=i.retryLane);break;case 19:r=n.stateNode;break;default:throw Error(Fe(314))}r!==null&&r.delete(e),lV(n,t)}var cV;cV=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||vs.current)ys=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return ys=!1,KX(n,e,t);ys=!!(n.flags&131072)}else ys=!1,Xn&&e.flags&1048576&&f5(e,q_,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;n_(n,e),n=e.pendingProps;var i=Kf(e,ki.current);Tf(e,t),i=E2(null,e,r,n,i,t);var s=T2();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,xs(r)?(s=!0,W_(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,x2(e),i.updater=iw,e.stateNode=i,i._reactInternals=e,wM(e,r,n,t),e=EM(null,e,r,!0,s,t)):(e.tag=0,Xn&&s&&h2(e),$i(null,e,i,t),e=e.child),e;case 16:r=e.elementType;e:{switch(n_(n,e),n=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=uK(r),n=Fo(r,n),i){case 0:e=bM(null,e,r,n,t);break e;case 1:e=cL(null,e,r,n,t);break e;case 11:e=aL(null,e,r,n,t);break e;case 14:e=lL(null,e,r,Fo(r.type,n),t);break e}throw Error(Fe(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Fo(r,i),bM(n,e,r,i,t);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Fo(r,i),cL(n,e,r,i,t);case 3:e:{if($5(e),n===null)throw Error(Fe(387));r=e.pendingProps,s=e.memoizedState,i=s.element,x5(n,e),Y_(e,r,null,t);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=Zf(Error(Fe(423)),e),e=uL(n,e,r,t,i);break e}else if(r!==i){i=Zf(Error(Fe(424)),e),e=uL(n,e,r,t,i);break e}else for(js=vc(e.stateNode.containerInfo.firstChild),zs=e,Xn=!0,Ho=null,t=y5(e,null,r,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Yf(),r===i){e=ml(n,e,t);break e}$i(n,e,r,t)}e=e.child}return e;case 5:return _5(e),n===null&&vM(e),r=e.type,i=e.pendingProps,s=n!==null?n.memoizedProps:null,o=i.children,fM(r,i)?o=null:s!==null&&fM(r,s)&&(e.flags|=32),W5(n,e),$i(n,e,o,t),e.child;case 6:return n===null&&vM(e),null;case 13:return q5(n,e,t);case 4:return _2(e,e.stateNode.containerInfo),r=e.pendingProps,n===null?e.child=Qf(e,null,r,t):$i(n,e,r,t),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Fo(r,i),aL(n,e,r,i,t);case 7:return $i(n,e,e.pendingProps,t),e.child;case 8:return $i(n,e,e.pendingProps.children,t),e.child;case 12:return $i(n,e,e.pendingProps.children,t),e.child;
vendor: 5,674 bytes, line 40
40case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Un(X_,r._currentValue),r._currentValue=o,s!==null)if(Jo(s.value,o)){if(s.children===i.children&&!vs.current){e=ml(n,e,t);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=ul(-1,t&-t),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|=t,l=s.alternate,l!==null&&(l.lanes|=t),xM(s.return,t,e),a.lanes|=t;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(Fe(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),xM(o,t,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}$i(n,e,i.children,t),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Tf(e,t),i=wo(i),r=r(i),e.flags|=1,$i(n,e,r,t),e.child;case 14:return r=e.type,i=Fo(r,e.pendingProps),i=Fo(r.type,i),lL(n,e,r,i,t);case 15:return H5(n,e,e.type,e.pendingProps,t);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Fo(r,i),n_(n,e),e.tag=1,xs(r)?(n=!0,W_(e)):n=!1,Tf(e,t),j5(e,r,i),wM(e,r,i,t),EM(null,e,r,!0,n,t);case 19:return X5(n,e,t);case 22:return G5(n,e,t)}throw Error(Fe(156,e.tag))};function uV(n,e){return FU(n,e)}function cK(n,e,t,r){this.tag=n,this.key=t,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 go(n,e,t,r){return new cK(n,e,t,r)}function k2(n){return n=n.prototype,!(!n||!n.isReactComponent)}function uK(n){if(typeof n=="function")return k2(n)?1:0;if(n!=null){if(n=n.$$typeof,n===e2)return 11;if(n===t2)return 14}return 2}function Sc(n,e){var t=n.alternate;return t===null?(t=go(n.tag,e,n.key,n.mode),t.elementType=n.elementType,t.type=n.type,t.stateNode=n.stateNode,t.alternate=n,n.alternate=t):(t.pendingProps=e,t.type=n.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=n.flags&14680064,t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=n.sibling,t.index=n.index,t.ref=n.ref,t}function s_(n,e,t,r,i,s){var o=2;if(r=n,typeof n=="function")k2(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case Zh:return cd(t.children,i,s,e);case ZC:o=8,i|=8;break;case WT:return n=go(12,t,e,i|2),n.elementType=WT,n.lanes=s,n;case $T:return n=go(13,t,e,i),n.elementType=$T,n.lanes=s,n;case qT:return n=go(19,t,e,i),n.elementType=qT,n.lanes=s,n;case _U:return aw(t,i,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case vU:o=10;break e;case xU:o=9;break e;case e2:o=11;break e;case t2:o=14;break e;case Yl:o=16,r=null;break e}throw Error(Fe(130,n==null?n:typeof n,""))}return e=go(o,t,e,i),e.elementType=n,e.type=r,e.lanes=s,e}function cd(n,e,t,r){return n=go(7,n,r,e),n.lanes=t,n}function aw(n,e,t,r){return n=go(22,n,r,e),n.elementType=_U,n.lanes=t,n.stateNode={isHidden:!1},n}function nE(n,e,t){return n=go(6,n,null,e),n.lanes=t,n}function rE(n,e,t){return e=go(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function dK(n,e,t,r,i){this.tag=e,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fb(0),this.expirationTimes=Fb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function O2(n,e,t,r,i,s,o,a,l){return n=new dK(n,e,t,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=go(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},x2(s),n}function hK(n,e,t){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Jh,key:r==null?null:""+r,children:n,containerInfo:e,implementation:t}}function dV(n){if(!n)return kc;n=n._reactInternals;e:{if(kd(n)!==n||n.tag!==1)throw Error(Fe(170));var e=n;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(xs(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Fe(171))}if(n.tag===1){var t=n.type;if(xs(t))return d5(n,t,e)}return e}function hV(n,e,t,r,i,s,o,a,l){return n=O2(t,r,!0,n,i,s,o,a,l),n.context=dV(null),t=n.current,r=Zi(),i=wc(t),s=ul(r,i),s.callback=e??null,xc(t,s,i),n.current.lanes=i,jy(n,i,r),_s(n,r),n}function lw(n,e,t,r){var i=e.current,s=Zi(),o=wc(i);return t=dV(t),e.context===null?e.context=t:e.pendingContext=t,e=ul(s,o),e.payload={element:n},r=r===void 0?null:r,r!==null&&(e.callback=r),n=xc(i,e,o),n!==null&&(Ko(n,i,o,s),Zx(n,i,o)),o}function i1(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function _L(n,e){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var t=n.retryLane;n.retryLane=t!==0&&t<e?t:e}}
40function F2(n,e){_L(n,e),(n=n.alternate)&&_L(n,e)}function fK(){return null}var fV=typeof reportError=="function"?reportError:function(n){console.error(n)};function U2(n){this._internalRoot=n}cw.prototype.render=U2.prototype.render=function(n){var e=this._internalRoot;if(e===null)throw Error(Fe(409));lw(n,e,null,null)};cw.prototype.unmount=U2.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var e=n.containerInfo;wd(function(){lw(null,n,null,null)}),e[fl]=null}};function cw(n){this._internalRoot=n}cw.prototype.unstable_scheduleHydration=function(n){if(n){var e=GU();n={blockedOn:null,target:n,priority:e};for(var t=0;t<nc.length&&e!==0&&e<nc[t].priority;t++);nc.splice(t,0,n),t===0&&$U(n)}};function V2(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function uw(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function wL(){}function pK(n,e,t,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=i1(o);s.call(c)}}var o=hV(e,r,n,0,null,!1,!1,"",wL);return n._reactRootContainer=o,n[fl]=o.current,Ug(n.nodeType===8?n.parentNode:n),wd(),o}for(;i=n.lastChild;)n.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=i1(l);a.call(c)}}var l=O2(n,0,!1,null,null,!1,!1,"",wL);return n._reactRootContainer=l,n[fl]=l.current,Ug(n.nodeType===8?n.parentNode:n),wd(function(){lw(e,l,t,r)}),l}function dw(n,e,t,r,i){var s=t._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=i1(o);a.call(l)}}lw(e,o,n,i)}else o=pK(t,e,n,i,r);return i1(o)}zU=function(n){switch(n.tag){case 3:var e=n.stateNode;if(e.current.memoizedState.isDehydrated){var t=Wm(e.pendingLanes);t!==0&&(i2(e,t|1),_s(e,_r()),!(gn&6)&&(ep=_r()+500,Jc()))}break;case 13:wd(function(){var r=pl(n,1);if(r!==null){var i=Zi();Ko(r,n,1,i)}}),F2(n,1)}};s2=function(n){if(n.tag===13){var e=pl(n,134217728);if(e!==null){var t=Zi();Ko(e,n,134217728,t)}F2(n,134217728)}};HU=function(n){if(n.tag===13){var e=wc(n),t=pl(n,e);if(t!==null){var r=Zi();Ko(t,n,e,r)}F2(n,e)}};GU=function(){return In};WU=function(n,e){var t=In;try{return In=n,e()}finally{In=t}};rM=function(n,e,t){switch(e){case"input":if(YT(n,t),e=t.name,t.type==="radio"&&e!=null){for(t=n;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<t.length;e++){var r=t[e];if(r!==n&&r.form===n.form){var i=tw(r);if(!i)throw Error(Fe(90));SU(r),YT(r,i)}}}break;case"textarea":EU(n,t);break;case"select":e=t.value,e!=null&&wf(n,!!t.multiple,e,!1)}};NU=I2;IU=wd;var mK={usingClientEntryPoint:!1,Events:[zy,rf,tw,RU,PU,I2]},Sm={findFiberByHostInstance:$u,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gK={bundleType:Sm.bundleType,version:Sm.version,rendererPackageName:Sm.rendererPackageName,rendererConfig:Sm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Cl.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=kU(n),n===null?null:n.stateNode},findFiberByHostInstance:Sm.findFiberByHostInstance||fK,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 D0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!D0.isDisabled&&D0.supportsFiber)try{Q1=D0.inject(gK),_a=D0}catch{}}$s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mK;$s.createPortal=function(n,e){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!V2(e))throw Error(Fe(200));return hK(n,e,null,t)};$s.createRoot=function(n,e){if(!V2(n))throw Error(Fe(299));var t=!1,r="",i=fV;return e!=null&&(e.unstable_strictMode===!0&&(t=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=O2(n,1,!1,null,null,t,!1,r,i),n[fl]=e.current,Ug(n.nodeType===8?n.parentNode:n),new U2(e)};$s.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var e=n._reactInternals;if(e===void 0)throw typeof n.render=="function"?Error(Fe(188)):(n=Object.keys(n).join(","),Error(Fe(268,n)));return n=kU(e),n=n===null?null:n.stateNode,n};$s.flushSync=function(n){return wd(n)};$s.hydrate=function(n,e,t){if(!uw(e))throw Error(Fe(200));return dw(null,n,e,!0,t)};$s.hydrateRoot=function(n,e,t){if(!V2(n))throw Error(Fe(405));var r=t!=null&&t.hydratedSources||null,i=!1,s="",o=fV;if(t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),e=hV(e,null,n,1,t??null,i,!1,s,o),n[fl]=e.current,Ug(n),r)for(n=0;n<r.length;n++)t=r[n],i=t._getVersion,i=i(t._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,i]:e.mutableSourceEagerHydrationData.push(t,i);return new cw(e)};$s.render=function(n,e,t){if(!uw(e))throw Error(Fe(200));return dw(null,n,e,!1,t)};$s.unmountComponentAtNode=function(n){if(!uw(n))throw Error(Fe(40));return n._reactRootContainer?(wd(function(){dw(null,null,n,!1,function(){n._reactRootContainer=null,n[fl]=null})}),!0):!1};$s.unstable_batchedUpdates=I2;$s.unstable_renderSubtreeIntoContainer=function(n,e,t,r){if(!uw(t))throw Error(Fe(200));if(n==null||n._reactInternals===void 0)throw Error(Fe(38));return dw(n,e,t,!1,r)};$s.version="18.3.1-next-f1338f8080-20240426";function pV(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(pV)}catch(n){console.error(n)}}pV(),pU.exports=$s;var Od=pU.exports;const mV=GC(Od);var gV,SL=Od;gV=SL.createRoot,SL.hydrateRoot;var s1=["light","dark"],j2="(prefers-color-scheme: dark)",yK=typeof window>"u",B2=M.createContext(void 0),vK={setTheme:n=>{},themes:[]},z2=()=>{var n;return(n=M.useContext(B2))!=null?n:vK},xK=n=>M.useContext(B2)?n.children:M.createElement(wK,{...n}),_K=["light","dark"],wK=({forcedTheme:n,disableTransitionOnChange:e=!1,enableSystem:t=!0,enableColorScheme:r=!0,storageKey:i="theme",themes:s=_K,defaultTheme:o=t?"system":"light",attribute:a="data-theme",value:l,children:c,nonce:u})=>{let[d,m]=M.useState(()=>bL(i,o)),[g,v]=M.useState(()=>bL(i)),_=l?Object.values(l):s,x=M.useCallback(A=>{let k=A;if(!k)return;A==="system"&&t&&(k=EL());let L=l?l[k]:k,C=e?bK():null,P=document.documentElement;if(a==="class"?(P.classList.remove(..._),L&&P.classList.add(L)):L?P.setAttribute(a,L):P.removeAttribute(a),r){let R=s1.includes(o)?o:null,N=s1.includes(k)?k:R;P.style.colorScheme=N}C==null||C()},[]),y=M.useCallback(A=>{let k=typeof A=="function"?A(A):A;m(k);try{localStorage.setItem(i,k)}catch{}},[n]),S=M.useCallback(A=>{let k=EL(A);v(k),d==="system"&&t&&!n&&x("system")},[d,n]);M.useEffect(()=>{let A=window.matchMedia(j2);return A.addListener(S),S(A),()=>A.removeListener(S)},[S]),M.useEffect(()=>{let A=k=>{if(k.key!==i)return;let L=k.newValue||o;y(L)};return window.addEventListener("storage",A),()=>window.removeEventListener("storage",A)},[y]),M.useEffect(()=>{x(n??d)},[n,d]);let b=M.useMemo(()=>({theme:d,setTheme:y,forcedTheme:n,resolvedTheme:d==="system"?g:d,themes:t?[...s,"system"]:s,systemTheme:t?g:void 0}),[d,y,n,g,t,s]);return M.createElement(B2.Provider,{value:b},M.createElement(SK,{forcedTheme:n,disableTransitionOnChange:e,enableSystem:t,enableColorScheme:r,storageKey:i,themes:s,defaultTheme:o,attribute:a,value:l,children:c,attrs:_,nonce:u}),c)},SK=M.memo(({forcedTheme:n,storageKey:e,attribute:t,enableSystem:r,enableColorScheme:i,defaultTheme:s,value:o,attrs:a,nonce:l})=>{let c=s==="system",u=t==="class"?`var d=document.documentElement,c=d.classList;
40${`c.remove(${a.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${t}',s='setAttribute';`,d=i?s1.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(v,_=!1,x=!0)=>{let y=o?o[v]:v,S=_?v+"|| ''":`'${y}'`,b="";return i&&x&&!_&&s1.includes(v)&&(b+=`d.style.colorScheme = '${v}';`),t==="class"?_||y?b+=`c.add(${S})`:b+="null":y&&(b+=`d[s](n,${S})`),b},g=n?`!function(){${u}${m(n)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${j2}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${m(o?"x[e]":"e",!0)}}${c?"":"else{"+m(s,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${m(o?"x[e]":"e",!0)}}else{${m(s,!1,!1)};}${d}}catch(t){}}();`;return M.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:g}})}),bL=(n,e)=>{if(yK)return;let t;try{t=localStorage.getItem(n)||void 0}catch{}return t||e},bK=()=>{let n=document.createElement("style");return n.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(n)},1)}},EL=n=>(n||(n=window.matchMedia(j2)),n.matches?"dark":"light");const EK=1,TK=1e6;let iE=0;function MK(){return iE=(iE+1)%Number.MAX_SAFE_INTEGER,iE.toString()}const sE=new Map,TL=n=>{if(sE.has(n))return;const e=setTimeout(()=>{sE.delete(n),pg({type:"REMOVE_TOAST",toastId:n})},TK);sE.set(n,e)},AK=(n,e)=>{switch(e.type){case"ADD_TOAST":return{...n,toasts:[e.toast,...n.toasts].slice(0,EK)};case"UPDATE_TOAST":return{...n,toasts:n.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case"DISMISS_TOAST":{const{toastId:t}=e;return t?TL(t):n.toasts.forEach(r=>{TL(r.id)}),{...n,toasts:n.toasts.map(r=>r.id===t||t===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(t=>t.id!==e.toastId)}}},o_=[];let a_={toasts:[]};function pg(n){a_=AK(a_,n),o_.forEach(e=>{e(a_)})}function hr({...n}){const e=MK(),t=i=>pg({type:"UPDATE_TOAST",toast:{...i,id:e}}),r=()=>pg({type:"DISMISS_TOAST",toastId:e});return pg({type:"ADD_TOAST",toast:{...n,id:e,open:!0,onOpenChange:i=>{i||r()}}}),{id:e,dismiss:r,update:t}}function CK(){const[n,e]=M.useState(a_);return M.useEffect(()=>(o_.push(e),()=>{const t=o_.indexOf(e);t>-1&&o_.splice(t,1)}),[n]),{...n,toast:hr,dismiss:t=>pg({type:"DISMISS_TOAST",toastId:t})}}function Xe(n,e,{checkForDefaultPrevented:t=!0}={}){return function(i){if(n==null||n(i),t===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function ML(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}function hw(...n){return e=>{let t=!1;const r=n.map(i=>{const s=ML(i,e);return!t&&typeof s=="function"&&(t=!0),s});if(t)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():ML(n[i],null)}}}}function sn(...n){return M.useCallback(hw(...n),n)}function RK(n,e){const t=M.createContext(e),r=s=>{const{children:o,...a}=s,l=M.useMemo(()=>a,Object.values(a));return f.jsx(t.Provider,{value:l,children:o})};r.displayName=n+"Provider";function i(s){const o=M.useContext(t);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${n}\``)}return[r,i]}function bs(n,e=[]){let t=[];function r(s,o){const a=M.createContext(o),l=t.length;t=[...t,o];const c=d=>{var y;const{scope:m,children:g,...v}=d,_=((y=m==null?void 0:m[n])==null?void 0:y[l])||a,x=M.useMemo(()=>v,Object.values(v));return f.jsx(_.Provider,{value:x,children:g})};c.displayName=s+"Provider";function u(d,m){var _;const g=((_=m==null?void 0:m[n])==null?void 0:_[l])||a,v=M.useContext(g);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=t.map(o=>M.createContext(o));return function(a){const l=(a==null?void 0:a[n])||s;return M.useMemo(()=>({[`__scope${n}`]:{...a,[n]:l}}),[a,l])}};return i.scopeName=n,[r,PK(i,...e)]}function PK(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:c}
vendor: 8,302 bytes, line 40
40)=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return M.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}function Sd(n){const e=IK(n),t=M.forwardRef((r,i)=>{const{children:s,...o}=r,a=M.Children.toArray(s),l=a.find(DK);if(l){const c=l.props.children,u=a.map(d=>d===l?M.Children.count(c)>1?M.Children.only(null):M.isValidElement(c)?c.props.children:null:d);return f.jsx(e,{...o,ref:i,children:M.isValidElement(c)?M.cloneElement(c,void 0,u):null})}return f.jsx(e,{...o,ref:i,children:s})});return t.displayName=`${n}.Slot`,t}var NK=Sd("Slot");function IK(n){const e=M.forwardRef((t,r)=>{const{children:i,...s}=t;if(M.isValidElement(i)){const o=OK(i),a=kK(s,i.props);return i.type!==M.Fragment&&(a.ref=r?hw(r,o):o),M.cloneElement(i,a)}return M.Children.count(i)>1?M.Children.only(null):null});return e.displayName=`${n}.SlotClone`,e}var yV=Symbol("radix.slottable");function LK(n){const e=({children:t})=>f.jsx(f.Fragment,{children:t});return e.displayName=`${n}.Slottable`,e.__radixId=yV,e}function DK(n){return M.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===yV}function kK(n,e){const t={...e};for(const r in e){const i=n[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?t[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(t[r]=i):r==="style"?t[r]={...i,...s}:r==="className"&&(t[r]=[i,s].filter(Boolean).join(" "))}return{...n,...t}}function OK(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}function fw(n){const e=n+"CollectionProvider",[t,r]=bs(e),[i,s]=t(e,{collectionRef:{current:null},itemMap:new Map}),o=_=>{const{scope:x,children:y}=_,S=We.useRef(null),b=We.useRef(new Map).current;return f.jsx(i,{scope:x,itemMap:b,collectionRef:S,children:y})};o.displayName=e;const a=n+"CollectionSlot",l=Sd(a),c=We.forwardRef((_,x)=>{const{scope:y,children:S}=_,b=s(a,y),A=sn(x,b.collectionRef);return f.jsx(l,{ref:A,children:S})});c.displayName=a;const u=n+"CollectionItemSlot",d="data-radix-collection-item",m=Sd(u),g=We.forwardRef((_,x)=>{const{scope:y,children:S,...b}=_,A=We.useRef(null),k=sn(x,A),L=s(u,y);return We.useEffect(()=>(L.itemMap.set(A,{ref:A,...b}),()=>void L.itemMap.delete(A))),f.jsx(m,{[d]:"",ref:k,children:S})});g.displayName=u;function v(_){const x=s(n+"CollectionConsumer",_);return We.useCallback(()=>{const S=x.collectionRef.current;if(!S)return[];const b=Array.from(S.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((L,C)=>b.indexOf(L.ref.current)-b.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:c,ItemSlot:g},v,r]}var FK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Et=FK.reduce((n,e)=>{const t=Sd(`Primitive.${e}`),r=M.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...n,[e]:r}},{});function H2(n,e){n&&Od.flushSync(()=>n.dispatchEvent(e))}function Ss(n){const e=M.useRef(n);return M.useEffect(()=>{e.current=n}),M.useMemo(()=>(...t)=>{var r;return(r=e.current)==null?void 0:r.call(e,...t)},[])}function UK(n,e=globalThis==null?void 0:globalThis.document){const t=Ss(n);M.useEffect(()=>{const r=i=>{i.key==="Escape"&&t(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[t,e])}var VK="DismissableLayer",OM="dismissableLayer.update",jK="dismissableLayer.pointerDownOutside",BK="dismissableLayer.focusOutside",AL,vV=M.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sp=M.forwardRef((n,e)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=n,c=M.useContext(vV),[u,d]=M.useState(null),m=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=M.useState({}),v=sn(e,C=>d(C)),_=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=_.indexOf(x),S=u?_.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,A=S>=y,k=HK(C=>{const P=C.target,R=[...c.branches].some(N=>N.contains(P));!A||R||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},m),L=GK(C=>{const P=C.target;[...c.branches].some(N=>N.contains(P))||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},m);return UK(C=>{S===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},m),M.useEffect(()=>{if(u)return t&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(AL=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),CL(),()=>{t&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=AL)}},[u,m,t,c]),M.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),CL())},[u,c]),M.useEffect(()=>{const C=()=>g({});return document.addEventListener(OM,C),()=>document.removeEventListener(OM,C)},[]),f.jsx(Et.div,{...l,ref:v,style:{pointerEvents:b?A?"auto":"none":void 0,...n.style},onFocusCapture:Xe(n.onFocusCapture,L.onFocusCapture),onBlurCapture:Xe(n.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Xe(n.onPointerDownCapture,k.onPointerDownCapture)})});Sp.displayName=VK;var zK="DismissableLayerBranch",xV=M.forwardRef((n,e)=>{const t=M.useContext(vV),r=M.useRef(null),i=sn(e,r);return M.useEffect(()=>{const s=r.current;if(s)return t.branches.add(s),()=>{t.branches.delete(s)}},[t.branches]),f.jsx(Et.div,{...n,ref:i})});xV.displayName=zK;function HK(n,e=globalThis==null?void 0:globalThis.document){const t=Ss(n),r=M.useRef(!1),i=M.useRef(()=>{});return M.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){_V(jK,t,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}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,t]),{onPointerDownCapture:()=>r.current=!0}}function GK(n,e=globalThis==null?void 0:globalThis.document){const t=Ss(n),r=M.useRef(!1);return M.useEffect(()=>{const i=s=>{s.target&&!r.current&&_V(BK,t,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,t]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function CL(){const n=new CustomEvent(OM);document.dispatchEvent(n)}function _V(n,e,t,{discrete:r}){const i=t.originalEvent.target,s=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&i.addEventListener(n,e,{once:!0}),r?H2(i,s):i.dispatchEvent(s)}var WK=Sp,$K=xV,ci=globalThis!=null&&globalThis.document?M.useLayoutEffect:()=>{},qK="Portal",Gy=M.forwardRef((n,e)=>{var a;const{container:t,...r}=n,[i,s]=M.useState(!1);ci(()=>s(!0),[]);const o=t||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?mV.createPortal(f.jsx(Et.div,{...r,ref:e}),o):null});Gy.displayName=qK;function XK(n,e){return M.useReducer((t,r)=>e[t][r]??t,n)}var Xs=n=>{const{present:e,children:t}=n,r=KK(e),i=typeof t=="function"?t({present:r.isPresent}):M.Children.only(t),s=sn(r.ref,YK(i));return typeof t=="function"||r.isPresent?M.cloneElement(i,{ref:s}):null};Xs.displayName="Presence";function KK(n){const[e,t]=M.useState(),r=M.useRef(null),i=M.useRef(n),s=M.useRef("none"),o=n?"mounted":"unmounted",[a,l]=XK(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return M.useEffect(()=>{const c=k0(r.current);s.current=a==="mounted"?c:"none"},[a]),ci(()=>{const c=r.current,u=i.current;if(u!==n){const m=s.current,g=k0(c);n?l("MOUNT"):g==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=n}},[n,l]),ci(()=>
40{if(e){let c;const u=e.ownerDocument.defaultView??window,d=g=>{const _=k0(r.current).includes(g.animationName);if(g.target===e&&_&&(l("ANIMATION_END"),!i.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},m=g=>{g.target===e&&(s.current=k0(r.current))};return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:M.useCallback(c=>{r.current=c?getComputedStyle(c):null,t(c)},[])}}function k0(n){return(n==null?void 0:n.animationName)||"none"}function YK(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}var QK=KC[" useInsertionEffect ".trim().toString()]||ci;function La({prop:n,defaultProp:e,onChange:t=()=>{},caller:r}){const[i,s,o]=JK({defaultProp:e,onChange:t}),a=n!==void 0,l=a?n:i;{const u=M.useRef(n!==void 0);M.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=M.useCallback(u=>{var d;if(a){const m=ZK(u)?u(n):u;m!==n&&((d=o.current)==null||d.call(o,m))}else s(u)},[a,n,s,o]);return[l,c]}function JK({defaultProp:n,onChange:e}){const[t,r]=M.useState(n),i=M.useRef(t),s=M.useRef(e);return QK(()=>{s.current=e},[e]),M.useEffect(()=>{var o;i.current!==t&&((o=s.current)==null||o.call(s,t),i.current=t)},[t,i]),[t,r,s]}function ZK(n){return typeof n=="function"}var wV=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),eY="VisuallyHidden",pw=M.forwardRef((n,e)=>f.jsx(Et.span,{...n,ref:e,style:{...wV,...n.style}}));pw.displayName=eY;var tY=pw,G2="ToastProvider",[W2,nY,rY]=fw("Toast"),[SV,ybe]=bs("Toast",[rY]),[iY,mw]=SV(G2),bV=n=>{const{__scopeToast:e,label:t="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=n,[a,l]=M.useState(null),[c,u]=M.useState(0),d=M.useRef(!1),m=M.useRef(!1);return t.trim()||console.error(`Invalid prop \`label\` supplied to \`${G2}\`. Expected non-empty \`string\`.`),f.jsx(W2.Provider,{scope:e,children:f.jsx(iY,{scope:e,label:t,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:M.useCallback(()=>u(g=>g+1),[]),onToastRemove:M.useCallback(()=>u(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:m,children:o})})};bV.displayName=G2;var EV="ToastViewport",sY=["F8"],FM="toast.viewportPause",UM="toast.viewportResume",TV=M.forwardRef((n,e)=>{const{__scopeToast:t,hotkey:r=sY,label:i="Notifications ({hotkey})",...s}=n,o=mw(EV,t),a=nY(t),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),d=M.useRef(null),m=sn(e,d,o.onViewportChange),g=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=o.toastCount>0;M.useEffect(()=>{const x=y=>{var b;r.length!==0&&r.every(A=>y[A]||y.code===A)&&((b=d.current)==null||b.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),M.useEffect(()=>{const x=l.current,y=d.current;if(v&&x&&y){const S=()=>{if(!o.isClosePausedRef.current){const L=new CustomEvent(FM);y.dispatchEvent(L),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const L=new CustomEvent(UM);y.dispatchEvent(L),o.isClosePausedRef.current=!1}},A=L=>{!x.contains(L.relatedTarget)&&b()},k=()=>{x.contains(document.activeElement)||b()};return x.addEventListener("focusin",S),x.addEventListener("focusout",A),x.addEventListener("pointermove",S),x.addEventListener("pointerleave",k),window.addEventListener("blur",S),window.addEventListener("focus",b),()=>{x.removeEventListener("focusin",S),x.removeEventListener("focusout",A),x.removeEventListener("pointermove",S),x.removeEventListener("pointerleave",k),window.removeEventListener("blur",S),window.removeEventListener("focus",b)}}},[v,o.isClosePausedRef]);const _=M.useCallback(({tabbingDirection:x})=>{const S=a().map(b=>{const A=b.ref.current,k=[A,...vY(A)];return x==="forwards"?k:k.reverse()});return(x==="forwards"?S.reverse():S).flat()},[a]);return M.useEffect(()=>{const x=d.current;if(x){const y=S=>{var k,L,C;const b=S.altKey||S.ctrlKey||S.metaKey;if(S.key==="Tab"&&!b){const P=document.activeElement,R=S.shiftKey;if(S.target===x&&R){(k=c.current)==null||k.focus();return}const V=_({tabbingDirection:R?"backwards":"forwards"}),B=V.findIndex(W=>W===P);oE(V.slice(B+1))?S.preventDefault():R?(L=c.current)==null||L.focus():(C=u.current)==null||C.focus()}};return x.addEventListener("keydown",y),()=>x.removeEventListener("keydown",y)}},[a,_]),f.jsxs($K,{ref:l,role:"region","aria-label":i.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&f.jsx(VM,{ref:c,onFocusFromOutsideViewport:()=>{const x=_({tabbingDirection:"forwards"});oE(x)}}),f.jsx(W2.Slot,{scope:t,children:f.jsx(Et.ol,{tabIndex:-1,...s,ref:m})}),v&&f.jsx(VM,{ref:u,onFocusFromOutsideViewport:()=>{const x=_({tabbingDirection:"backwards"});oE(x)}})]})});TV.displayName=EV;var MV="ToastFocusProxy",VM=M.forwardRef((n,e)=>
vendor: 6,029 bytes, line 40
40{const{__scopeToast:t,onFocusFromOutsideViewport:r,...i}=n,s=mw(MV,t);return f.jsx(pw,{"aria-hidden":!0,tabIndex:0,...i,ref:e,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});VM.displayName=MV;var Wy="Toast",oY="toast.swipeStart",aY="toast.swipeMove",lY="toast.swipeCancel",cY="toast.swipeEnd",AV=M.forwardRef((n,e)=>{const{forceMount:t,open:r,defaultOpen:i,onOpenChange:s,...o}=n,[a,l]=La({prop:r,defaultProp:i??!0,onChange:s,caller:Wy});return f.jsx(Xs,{present:t||a,children:f.jsx(hY,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:Ss(n.onPause),onResume:Ss(n.onResume),onSwipeStart:Xe(n.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Xe(n.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Xe(n.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Xe(n.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});AV.displayName=Wy;var[uY,dY]=SV(Wy,{onClose(){}}),hY=M.forwardRef((n,e)=>{const{__scopeToast:t,type:r="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:m,onSwipeEnd:g,...v}=n,_=mw(Wy,t),[x,y]=M.useState(null),S=sn(e,W=>y(W)),b=M.useRef(null),A=M.useRef(null),k=i||_.duration,L=M.useRef(0),C=M.useRef(k),P=M.useRef(0),{onToastAdd:R,onToastRemove:N}=_,O=Ss(()=>{var ee;(x==null?void 0:x.contains(document.activeElement))&&((ee=_.viewport)==null||ee.focus()),o()}),V=M.useCallback(W=>{!W||W===1/0||(window.clearTimeout(P.current),L.current=new Date().getTime(),P.current=window.setTimeout(O,W))},[O]);M.useEffect(()=>{const W=_.viewport;if(W){const ee=()=>{V(C.current),c==null||c()},J=()=>{const ie=new Date().getTime()-L.current;C.current=C.current-ie,window.clearTimeout(P.current),l==null||l()};return W.addEventListener(FM,J),W.addEventListener(UM,ee),()=>{W.removeEventListener(FM,J),W.removeEventListener(UM,ee)}}},[_.viewport,k,l,c,V]),M.useEffect(()=>{s&&!_.isClosePausedRef.current&&V(k)},[s,k,_.isClosePausedRef,V]),M.useEffect(()=>(R(),()=>N()),[R,N]);const B=M.useMemo(()=>x?DV(x):null,[x]);return _.viewport?f.jsxs(f.Fragment,{children:[B&&f.jsx(fY,{__scopeToast:t,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:B}),f.jsx(uY,{scope:t,onClose:O,children:Od.createPortal(f.jsx(W2.ItemSlot,{scope:t,children:f.jsx(WK,{asChild:!0,onEscapeKeyDown:Xe(a,()=>{_.isFocusedToastEscapeKeyDownRef.current||O(),_.isFocusedToastEscapeKeyDownRef.current=!1}),children:f.jsx(Et.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":_.swipeDirection,...v,ref:S,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:Xe(n.onKeyDown,W=>{W.key==="Escape"&&(a==null||a(W.nativeEvent),W.nativeEvent.defaultPrevented||(_.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:Xe(n.onPointerDown,W=>{W.button===0&&(b.current={x:W.clientX,y:W.clientY})}),onPointerMove:Xe(n.onPointerMove,W=>{if(!b.current)return;const ee=W.clientX-b.current.x,J=W.clientY-b.current.y,ie=!!A.current,j=["left","right"].includes(_.swipeDirection),z=["left","up"].includes(_.swipeDirection)?Math.min:Math.max,q=j?z(0,ee):0,Z=j?0:z(0,J),re=W.pointerType==="touch"?10:2,te={x:q,y:Z},ae={originalEvent:W,delta:te};ie?(A.current=te,O0(aY,d,ae,{discrete:!1})):RL(te,_.swipeDirection,re)?(A.current=te,O0(oY,u,ae,{discrete:!1}),W.target.setPointerCapture(W.pointerId)):(Math.abs(ee)>re||Math.abs(J)>re)&&(b.current=null)}),onPointerUp:Xe(n.onPointerUp,W=>{const ee=A.current,J=W.target;if(J.hasPointerCapture(W.pointerId)&&J.releasePointerCapture(W.pointerId),A.current=null,b.current=null,ee){const ie=W.currentTarget,j={originalEvent:W,delta:ee};RL(ee,_.swipeDirection,_.swipeThreshold)?O0(cY,g,j,{discrete:!0}):O0(lY,m,j,{discrete:!0}),ie.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),_.viewport)})]}):null}),fY=n=>{const{__scopeToast:e,children:t,...r}=n,i=mw(Wy,e),[s,o]=M.useState(!1),[a,l]=M.useState(!1);return gY(()=>o(!0)),M.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:f.jsx(Gy,{asChild:!0,children:f.jsx(pw,{...r,children:s&&f.jsxs(f.Fragment,{children:[i.label," ",t]})})})},pY="ToastTitle",CV=M.forwardRef((n,e)=>{const{__scopeToast:t,...r}=n;return f.jsx(Et.div,{...r,ref:e})});CV.displayName=pY;var mY="ToastDescription",RV=M.forwardRef((n,e)=>{const{__scopeToast:t,...r}=n;return f.jsx(Et.div,{...r,ref:e})});RV.displayName=mY;var PV="ToastAction",NV=M.forwardRef((n,e)=>{const{altText:t,...r}=n;return t.trim()?f.jsx(LV,{altText:t,asChild:!0,children:f.jsx($2,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${PV}\`. Expected non-empty \`string\`.`),null)});NV.displayName=PV;var IV="ToastClose",$2=M.forwardRef((n,e)=>{const{__scopeToast:t,...r}=n,i=dY(IV,t);return f.jsx(LV,{asChild:!0,children:f.jsx(Et.button,{type:"button",...r,ref:e,onClick:Xe(n.onClick,i.onClose)})})});$2.displayName=IV;var LV=M.forwardRef((n,e)=>{const{__scopeToast:t,altText:r,...i}=n;return f.jsx(Et.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:e})});function DV(n){const e=[];
vendor: 7,528 bytes, lines 40-105
40return Array.from(n.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),yY(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...DV(r))}}),e}function O0(n,e,t,{discrete:r}){const i=t.originalEvent.currentTarget,s=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:t});e&&i.addEventListener(n,e,{once:!0}),r?H2(i,s):i.dispatchEvent(s)}var RL=(n,e,t=0)=>{const r=Math.abs(n.x),i=Math.abs(n.y),s=r>i;return e==="left"||e==="right"?s&&r>t:!s&&i>t};function gY(n=()=>{}){const e=Ss(n);ci(()=>{let t=0,r=0;return t=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(t),window.cancelAnimationFrame(r)}},[e])}function yY(n){return n.nodeType===n.ELEMENT_NODE}function vY(n){const e=[],t=document.createTreeWalker(n,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(;t.nextNode();)e.push(t.currentNode);return e}function oE(n){const e=document.activeElement;return n.some(t=>t===e?!0:(t.focus(),document.activeElement!==e))}var xY=bV,kV=TV,OV=AV,FV=CV,UV=RV,VV=NV,jV=$2;function BV(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e<i;e++)n[e]&&(t=BV(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function zV(){for(var n,e,t=0,r="",i=arguments.length;t<i;t++)(n=arguments[t])&&(e=BV(n))&&(r&&(r+=" "),r+=e);return r}const PL=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,NL=zV,q2=(n,e)=>t=>{var r;if((e==null?void 0:e.variants)==null)return NL(n,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:i,defaultVariants:s}=e,o=Object.keys(i).map(c=>{const u=t==null?void 0:t[c],d=s==null?void 0:s[c];if(u===null)return null;const m=PL(u)||PL(d);return i[c][m]}),a=t&&Object.entries(t).reduce((c,u)=>{let[d,m]=u;return m===void 0||(c[d]=m),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:m,...g}=u;return Object.entries(g).every(v=>{let[_,x]=v;return Array.isArray(x)?x.includes({...s,...a}[_]):{...s,...a}[_]===x})?[...c,d,m]:c},[]);return NL(n,o,l,t==null?void 0:t.class,t==null?void 0:t.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const _Y=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),HV=(...n)=>n.filter((e,t,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===t).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var wY={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const SY=M.forwardRef(({color:n="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>M.createElement("svg",{ref:l,...wY,width:e,height:e,stroke:n,strokeWidth:r?Number(t)*24/Number(e):t,className:HV("lucide",i),...a},[...o.map(([c,u])=>M.createElement(c,u)),...Array.isArray(s)?s:[s]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const Ke=(n,e)=>{const t=M.forwardRef(({className:r,...i},s)=>M.createElement(SY,{ref:s,iconNode:e,className:HV(`lucide-${_Y(n)}`,r),...i}));return t.displayName=`${n}`,t};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const bY=Ke("ArrowDownRight",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const l_=Ke("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const Oc=Ke("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const c_=Ke("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const GV=Ke("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const qm=Ke("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const Jl=Ke("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const jM=Ke("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const $y=Ke("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
105],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const EY=Ke("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const gw=Ke("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const WV=Ke("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const $V=Ke("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const TY=Ke("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const MY=Ke("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const X2=Ke("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const AY=Ke("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const qV=Ke("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const bm=Ke("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/** 156 * @license lucide-react v0.462.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const CY=Ke("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 161 * @license lucide-react v0.462.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const RY=Ke("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** 166 * @license lucide-react v0.462.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const BM=Ke("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const qy=Ke("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const ud=Ke("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const XV=Ke("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const PY=Ke("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const Zl=Ke("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const NY=Ke("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const K2=Ke("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const IY=Ke("Gamepad2",[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]]);/** 211 * @license lucide-react v0.462.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const LY=Ke("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 216 * @license lucide-react v0.462.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const DY=Ke("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/** 221 * @license lucide-react v0.462.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const Af=Ke("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 226 * @license lucide-react v0.462.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const Cf=Ke("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** 231 * @license lucide-react v0.462.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const kY=Ke("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/** 236 * @license lucide-react v0.462.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const OY=Ke("Handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]]);/** 241 * @license lucide-react v0.462.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const KV=Ke("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/** 246 * @license lucide-react v0.462.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const FY=Ke("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** 251 * @license lucide-react v0.462.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const IL=Ke("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/** 256 * @license lucide-react v0.462.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree.
260 */const UY=Ke("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 261 * @license lucide-react v0.462.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const VY=Ke("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 266 * @license lucide-react v0.462.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const jY=Ke("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** 271 * @license lucide-react v0.462.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const zM=Ke("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 276 * @license lucide-react v0.462.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const BY=Ke("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 281 * @license lucide-react v0.462.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const Y2=Ke("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 286 * @license lucide-react v0.462.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const YV=Ke("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 291 * @license lucide-react v0.462.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const QV=Ke("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 296 * @license lucide-react v0.462.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const zY=Ke("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 301 * @license lucide-react v0.462.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const o1=Ke("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 306 * @license lucide-react v0.462.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const LL=Ke("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** 311 * @license lucide-react v0.462.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const HY=Ke("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** 316 * @license lucide-react v0.462.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const GY=Ke("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/** 321 * @license lucide-react v0.462.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const Q2=Ke("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** 326 * @license lucide-react v0.462.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const WY=Ke("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/** 331 * @license lucide-react v0.462.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const $Y=Ke("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** 336 * @license lucide-react v0.462.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const JV=Ke("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 341 * @license lucide-react v0.462.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const qg=Ke("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 346 * @license lucide-react v0.462.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const qY=Ke("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/** 351 * @license lucide-react v0.462.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const XY=Ke("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 356 * @license lucide-react v0.462.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const HM=Ke("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 361 * @license lucide-react v0.462.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const Fd=Ke("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 366 * @license lucide-react v0.462.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const KY=Ke("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 371 * @license lucide-react v0.462.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const YY=Ke("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** 376 * @license lucide-react v0.462.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const ZV=Ke("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
380y:"oel41y"}]]);/** 381 * @license lucide-react v0.462.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const J2=Ke("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 386 * @license lucide-react v0.462.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const tp=Ke("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 391 * @license lucide-react v0.462.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const yw=Ke("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** 396 * @license lucide-react v0.462.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const ej=Ke("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 401 * @license lucide-react v0.462.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const DL=Ke("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** 406 * @license lucide-react v0.462.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const tj=Ke("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 411 * @license lucide-react v0.462.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const gl=Ke("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 416 * @license lucide-react v0.462.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const a1=Ke("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 421 * @license lucide-react v0.462.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const QY=Ke("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/** 426 * @license lucide-react v0.462.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const JY=Ke("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/** 431 * @license lucide-react v0.462.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const kL=Ke("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 436 * @license lucide-react v0.462.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const nj=Ke("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 441 * @license lucide-react v0.462.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const fo=Ke("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 446 * @license lucide-react v0.462.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const Xm=Ke("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/** 451 * @license lucide-react v0.462.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const ZY=Ke("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/** 456 * @license lucide-react v0.462.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const Xy=Ke("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 8,568 bytes, lines 460-465
460],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 461 * @license lucide-react v0.462.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const Rf=Ke("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Z2="-",eQ=n=>{const e=nQ(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:o=>{const a=o.split(Z2);return a[0]===""&&a.length!==1&&a.shift(),rj(a,e)||tQ(o)},getConflictingClassGroupIds:(o,a)=>{const l=t[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},rj=(n,e)=>{var o;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),i=r?rj(n.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=n.join(Z2);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},OL=/^\[(.+)\]$/,tQ=n=>{if(OL.test(n)){const e=OL.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},nQ=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return iQ(Object.entries(n.classGroups),t).forEach(([s,o])=>{GM(o,r,s,e)}),r},GM=(n,e,t,r)=>{n.forEach(i=>{if(typeof i=="string"){const s=i===""?e:FL(e,i);s.classGroupId=t;return}if(typeof i=="function"){if(rQ(i)){GM(i(r),e,t,r);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([s,o])=>{GM(o,FL(e,s),t,r)})})},FL=(n,e)=>{let t=n;return e.split(Z2).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},rQ=n=>n.isThemeGetter,iQ=(n,e)=>e?n.map(([t,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[t,i]}):n,sQ=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const i=(s,o)=>{t.set(s,o),e++,e>n&&(e=0,r=t,t=new Map)};return{get(s){let o=t.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){t.has(s)?t.set(s,o):i(s,o)}}},ij="!",oQ=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,i=e[0],s=e.length,o=a=>{const l=[];let c=0,u=0,d;for(let x=0;x<a.length;x++){let y=a[x];if(c===0){if(y===i&&(r||a.slice(x,x+s)===e)){l.push(a.slice(u,x)),u=x+s;continue}if(y==="/"){d=x;continue}}y==="["?c++:y==="]"&&c--}const m=l.length===0?a:a.substring(u),g=m.startsWith(ij),v=g?m.substring(1):m,_=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:_}};return t?a=>t({className:a,parseClassName:o}):o},aQ=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},lQ=n=>({cache:sQ(n.cacheSize),parseClassName:oQ(n),...eQ(n)}),cQ=/\s+/,uQ=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],o=n.trim().split(cQ);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:m,maybePostfixModifierPosition:g}=t(c);let v=!!g,_=r(v?m.substring(0,g):m);if(!_){if(!v){a=c+(a.length>0?" "+a:a);continue}if(_=r(m),!_){a=c+(a.length>0?" "+a:a);continue}v=!1}const x=aQ(u).join(":"),y=d?x+ij:x,S=y+_;if(s.includes(S))continue;s.push(S);const b=i(_,v);for(let A=0;A<b.length;++A){const k=b[A];s.push(y+k)}a=c+(a.length>0?" "+a:a)}return a};function dQ(){let n=0,e,t,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=sj(e))&&(r&&(r+=" "),r+=t);return r}const sj=n=>{if(typeof n=="string")return n;let e,t="";for(let r=0;r<n.length;r++)n[r]&&(e=sj(n[r]))&&(t&&(t+=" "),t+=e);return t};function hQ(n,...e){let t,r,i,s=o;function o(l){const c=e.reduce((u,d)=>d(u),n());return t=lQ(c),r=t.cache.get,i=t.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=uQ(l,t);return i(l,u),u}return function(){return s(dQ.apply(null,arguments))}}const Vn=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},oj=/^\[(?:([a-z-]+):)?(.+)\]$/i,fQ=/^\d+\/\d+$/,pQ=new Set(["px","full","screen"]),mQ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gQ=/\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$/,yQ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,vQ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xQ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qa=n=>Pf(n)||pQ.has(n)||fQ.test(n),Ul=n=>bp(n,"length",AQ),Pf=n=>!!n&&!Number.isNaN(Number(n)),aE=n=>bp(n,"number",Pf),Em=n=>!!n&&Number.isInteger(Number(n)),_Q=n=>n.endsWith("%")&&Pf(n.slice(0,-1)),Kt=n=>oj.test(n),Vl=n=>mQ.test(n),wQ=new Set(["length","size","percentage"]),SQ=n=>bp(n,wQ,aj),bQ=n=>bp(n,"position",aj),EQ=new Set(["image","url"]),TQ=n=>bp(n,EQ,RQ),MQ=n=>bp(n,"",CQ),Tm=()=>!0,bp=(n,e,t)=>{const r=oj.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},AQ=n=>gQ.test(n)&&!yQ.test(n),aj=()=>!1,CQ=n=>vQ.test(n),RQ=n=>xQ.test(n),PQ=()=>{const n=Vn("colors"),e=Vn("spacing"),t=Vn("blur"),r=Vn("brightness"),i=Vn("borderColor"),s=Vn("borderRadius"),o=Vn("borderSpacing"),a=Vn("borderWidth"),l=Vn("contrast"),c=Vn("grayscale"),u=Vn("hueRotate"),d=Vn("invert"),m=Vn("gap"),g=Vn("gradientColorStops"),v=Vn("gradientColorStopPositions"),_=Vn("inset"),x=Vn("margin"),y=Vn("opacity"),S=Vn("padding"),b=Vn("saturate"),A=Vn("scale"),k=Vn("sepia"),L=Vn("skew"),C=Vn("space"),P=Vn("translate"),R=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",Kt,e],V=()=>[Kt,e],B=()=>["",qa,Ul],W=()=>["auto",Pf,Kt],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",Kt],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[Pf,Kt];return{cacheSize:500,separator:":",theme:{colors:[Tm],spacing:[qa,Ul],blur:["none","",Vl,Kt],brightness:Z(),borderColor:[n],borderRadius:["none","","full",Vl,Kt],borderSpacing:V(),borderWidth:B(),contrast:Z(),grayscale:z(),hueRotate:Z(),invert:z(),gap:V(),gradientColorStops:[n],gradientColorStopPositions:[_Q,Ul],inset:O(),margin:O(),opacity:Z(),padding:V(),saturate:Z(),scale:Z(),sepia:z(),skew:Z(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Kt]}],container:["container"],columns:[{columns:[Vl]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"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:[...ee(),Kt]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Em,Kt]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Kt]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",Em,Kt]}],"grid-cols":[{"grid-cols":[Tm]}],"col-start-end":[{col:["auto",{span:["full",Em,Kt]},Kt]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Tm]}],"row-start-end":[{row:["auto",{span:[Em,Kt]},Kt]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}
vendor: 9,251 bytes, line 465
465],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Kt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Kt]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Kt,e]}],"min-w":[{"min-w":[Kt,e,"min","max","fit"]}],"max-w":[{"max-w":[Kt,e,"none","full","min","max","fit","prose",{screen:[Vl]},Vl]}],h:[{h:[Kt,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Kt,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Kt,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Kt,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Vl,Ul]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",aE]}],"font-family":[{font:[Tm]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Kt]}],"line-clamp":[{"line-clamp":["none",Pf,aE]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qa,Kt]}],"list-image":[{"list-image":["none",Kt]}],"list-style-type":[{list:["none","disc","decimal",Kt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qa,Ul]}],"underline-offset":[{"underline-offset":["auto",qa,Kt]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Kt]}],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",Kt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ee(),bQ]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",SQ]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},TQ]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],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":[y]}],"border-style":[{border:[...J(),"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":[y]}],"divide-style":[{divide:J()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[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:["",...J()]}],"outline-offset":[{"outline-offset":[qa,Kt]}],"outline-w":[{outline:[qa,Ul]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[qa,Ul]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",Vl,MQ]}],"shadow-color":[{shadow:[Tm]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Vl,Kt]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"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":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"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",Kt]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",Kt]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",Kt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Em,Kt]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Kt]}],accent:[{accent:["auto",n]}],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",Kt]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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"]}
vendor: 4,647 bytes, line 465
465],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",Kt]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[qa,Ul,aE]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},NQ=hQ(PQ);function Ot(...n){return NQ(zV(n))}const IQ=xY,lj=M.forwardRef(({className:n,...e},t)=>f.jsx(kV,{ref:t,className:Ot("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",n),...e}));lj.displayName=kV.displayName;const LQ=q2("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),cj=M.forwardRef(({className:n,variant:e,...t},r)=>f.jsx(OV,{ref:r,className:Ot(LQ({variant:e}),n),...t}));cj.displayName=OV.displayName;const DQ=M.forwardRef(({className:n,...e},t)=>f.jsx(VV,{ref:t,className:Ot("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",n),...e}));DQ.displayName=VV.displayName;const uj=M.forwardRef(({className:n,...e},t)=>f.jsx(jV,{ref:t,className:Ot("absolute right-2 top-2 rounded-md p-1 text-foreground
465/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",n),"toast-close":"",...e,children:f.jsx(Xy,{className:"h-4 w-4"})}));uj.displayName=jV.displayName;const dj=M.forwardRef(({className:n,...e},t)=>f.jsx(FV,{ref:t,className:Ot("text-sm font-semibold",n),...e}));dj.displayName=FV.displayName;const hj=M.forwardRef(({className:n,...e},t)=>f.jsx(UV,{ref:t,className:Ot("text-sm opacity-90",n),...e}));hj.displayName=UV.displayName;function kQ(){const{toasts:n}=CK();return f.jsxs(IQ,{children:[n.map(function({id:e,title:t,description:r,action:i,...s}){return f.jsxs(cj,{...s,children:[f.jsxs("div",{className:"grid gap-1",children:[t&&f.jsx(dj,{children:t}),r&&f.jsx(hj,{children:r})]}),i,f.jsx(uj,{})]},e)}),f.jsx(lj,{})]})}var OQ=n=>{switch(n){case"success":return VQ;case"info":return BQ;case"warning":return jQ;case"error":return zQ;default:return null}},FQ=Array(12).fill(0),UQ=({visible:n,className:e})=>We.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":n},We.createElement("div",{className:"sonner-spinner"},FQ.map((t,r)=>We.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),VQ=We.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},We.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"})),jQ=We.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},We.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"})),BQ=We.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},We.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"})),zQ=We.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},We.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"})),HQ=We.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"},We.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),We.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),GQ=()=>{let[n,e]=We.useState(document.hidden);return We.useEffect(()=>{let t=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),n},WM=1,WQ=class{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{let e=this.subscribers.indexOf(n);this.subscribers.splice(e,1)}),this.publish=n=>{this.subscribers.forEach(e=>e(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var e;let{message:t,...r}=n,i=typeof(n==null?void 0:n.id)=="number"||((e=n.id)==null?void 0:e.length)>0?n.id:WM++,s=this.toasts.find(a=>a.id===i),o=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(a=>a.id===i?(this.publish({...a,...n,id:i,title:t}),{...a,...n,id:i,dismissible:o,title:t}):a):this.addToast({title:t,...r,dismissible:o,id:i}),i},this.dismiss=n=>
465(this.dismissedToasts.add(n),n||this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:n,dismiss:!0})),n),this.message=(n,e)=>this.create({...e,message:n}),this.error=(n,e)=>this.create({...e,message:n,type:"error"}),this.success=(n,e)=>this.create({...e,type:"success",message:n}),this.info=(n,e)=>this.create({...e,type:"info",message:n}),this.warning=(n,e)=>this.create({...e,type:"warning",message:n}),this.loading=(n,e)=>this.create({...e,type:"loading",message:n}),this.promise=(n,e)=>{if(!e)return;let t;e.loading!==void 0&&(t=this.create({...e,promise:n,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=n instanceof Promise?n:n(),i=t!==void 0,s,o=r.then(async l=>{if(s=["resolve",l],We.isValidElement(l))i=!1,this.create({id:t,type:"default",message:l});else if(qQ(l)&&!l.ok){i=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:t,type:"error",message:c,description:u})}else if(e.success!==void 0){i=!1;let c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:t,type:"success",message:c,description:u})}}).catch(async l=>{if(s=["reject",l],e.error!==void 0){i=!1;let c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:t,type:"error",message:c,description:u})}}).finally(()=>{var l;i&&(this.dismiss(t),t=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,c)=>o.then(()=>s[0]==="reject"?c(s[1]):l(s[1])).catch(c));return typeof t!="string"&&typeof t!="number"?{unwrap:a}:Object.assign(t,{unwrap:a})},this.custom=(n,e)=>{let t=(e==null?void 0:e.id)||WM++;return this.create({jsx:n(t),id:t,...e}),t},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ds=new WQ,$Q=(n,e)=>{let t=(e==null?void 0:e.id)||WM++;return ds.addToast({title:n,...e,id:t}),t},qQ=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",XQ=$Q,KQ=()=>ds.toasts,YQ=()=>ds.getActiveToasts();Object.assign(XQ,{success:ds.success,info:ds.info,warning:ds.warning,error:ds.error,custom:ds.custom,message:ds.message,promise:ds.promise,dismiss:ds.dismiss,loading:ds.loading},{getHistory:KQ,getToasts:YQ});function QQ(n,{insertAt:e}={}){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}QQ(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
465left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
465:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
465--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 466`);function F0(n){return n.label!==void 0}var JQ=3,ZQ="32px",eJ="16px",UL=4e3,tJ=356,nJ=14,rJ=20,iJ=200;function Po(...n){return n.filter(Boolean).join(" ")}function sJ(n){let[e,t]=n.split("-"),r=[];return e&&r.push(e),t&&r.push(t),r}var oJ=n=>{var e,t,r,i,s,o,a,l,c,u,d;let{invert:m,toast:g,unstyled:v,interacting:_,setHeights:x,visibleToasts:y,heights:S,index:b,toasts:A,expanded:k,removeToast:L,defaultRichColors:C,closeButton:P,style:R,cancelButtonStyle:N,actionButtonStyle:O,className:V="",descriptionClassName:B="",duration:W,position:ee,gap:J,loadingIcon:ie,expandByDefault:j,classNames:z,icons:q,closeButtonAriaLabel:Z="Close toast",pauseWhenPageIsHidden:re}=n,[te,ae]=We.useState(null),[we,Re]=We.useState(null),[de,Ge]=We.useState(!1),[$e,De]=We.useState(!1),[Ue,Q]=We.useState(!1),[be,ve]=We.useState(!1),[Le,xe]=We.useState(!1),[it,Ye]=We.useState(0),[G,H]=We.useState(0),le=We.useRef(g.duration||W||UL),Ne=We.useRef(null),Ae=We.useRef(null),Ce=b===0,st=b+1<=y,Ve=g.type,Qe=g.dismissible!==!1,xt=g.className||"",Ft=g.descriptionClassName||"",Pe=We.useMemo(()=>S.findIndex(Ie=>Ie.toastId===g.id)||0,[S,g.id]),rn=We.useMemo(()=>{var Ie;return(Ie=g.closeButton)!=null?Ie:P},[g.closeButton,P]),zt=We.useMemo(()=>g.duration||W||UL,[g.duration,W]),Tt=We.useRef(0),dt=We.useRef(0),nt=We.useRef(0),_t=We.useRef(null),[on,bn]=ee.split("-"),Bt=We.useMemo(()=>S.reduce((Ie,gt,bt)=>bt>=Pe?Ie:Ie+gt.height,0),[S,Pe]),je=GQ(),ne=g.invert||m,ke=Ve==="loading";dt.current=We.useMemo(()=>Pe*J+Bt,[Pe,Bt]),We.useEffect(()=>{le.current=zt},[zt]),We.useEffect(()=>{Ge(!0)},[]),We.useEffect(()=>{let Ie=Ae.current;if(Ie){let gt=Ie.getBoundingClientRect().height;return H(gt),x(bt=>[{toastId:g.id,height:gt,position:g.position},...bt]),()=>x(bt=>bt.filter(Jt=>Jt.toastId!==g.id))}},[x,g.id]),We.useLayoutEffect(()=>{if(!de)return;let Ie=Ae.current,gt=Ie.style.height;Ie.style.height="auto";let bt=Ie.getBoundingClientRect().height;Ie.style.height=gt,H(bt),x(Jt=>Jt.find(vn=>vn.toastId===g.id)?Jt.map(vn=>vn.toastId===g.id?{...vn,height:bt}:vn):[{toastId:g.id,height:bt,position:g.position},...Jt])},[de,g.title,g.description,x,g.id]);let He=We.useCallback(()=>{De(!0),Ye(dt.current),x(Ie=>Ie.filter(gt=>gt.toastId!==g.id)),setTimeout(()=>{L(g)},iJ)},[g,L,x,dt]);We.useEffect(()=>{if(g.promise&&Ve==="loading"||g.duration===1/0||g.type==="loading")return;let Ie;return k||_||re&&je?(()=>{if(nt.current<Tt.current){let gt=new Date().getTime()-Tt.current;le.current=le.current-gt}
466nt.current=new Date().getTime()})():le.current!==1/0&&(Tt.current=new Date().getTime(),Ie=setTimeout(()=>{var gt;(gt=g.onAutoClose)==null||gt.call(g,g),He()},le.current)),()=>clearTimeout(Ie)},[k,_,g,Ve,re,je,He]),We.useEffect(()=>{g.delete&&He()},[He,g.delete]);function wt(){var Ie,gt,bt;return q!=null&&q.loading?We.createElement("div",{className:Po(z==null?void 0:z.loader,(Ie=g==null?void 0:g.classNames)==null?void 0:Ie.loader,"sonner-loader"),"data-visible":Ve==="loading"},q.loading):ie?We.createElement("div",{className:Po(z==null?void 0:z.loader,(gt=g==null?void 0:g.classNames)==null?void 0:gt.loader,"sonner-loader"),"data-visible":Ve==="loading"},ie):We.createElement(UQ,{className:Po(z==null?void 0:z.loader,(bt=g==null?void 0:g.classNames)==null?void 0:bt.loader),visible:Ve==="loading"})}return We.createElement("li",{tabIndex:0,ref:Ae,className:Po(V,xt,z==null?void 0:z.toast,(e=g==null?void 0:g.classNames)==null?void 0:e.toast,z==null?void 0:z.default,z==null?void 0:z[Ve],(t=g==null?void 0:g.classNames)==null?void 0:t[Ve]),"data-sonner-toast":"","data-rich-colors":(r=g.richColors)!=null?r:C,"data-styled":!(g.jsx||g.unstyled||v),"data-mounted":de,"data-promise":!!g.promise,"data-swiped":Le,"data-removed":$e,"data-visible":st,"data-y-position":on,"data-x-position":bn,"data-index":b,"data-front":Ce,"data-swiping":Ue,"data-dismissible":Qe,"data-type":Ve,"data-invert":ne,"data-swipe-out":be,"data-swipe-direction":we,"data-expanded":!!(k||j&&de),style:{"--index":b,"--toasts-before":b,"--z-index":A.length-b,"--offset":`${$e?it:dt.current}px`,"--initial-height":j?"auto":`${G}px`,...R,...g.style},onDragEnd:()=>{Q(!1),ae(null),_t.current=null},onPointerDown:Ie=>{ke||!Qe||(Ne.current=new Date,Ye(dt.current),Ie.target.setPointerCapture(Ie.pointerId),Ie.target.tagName!=="BUTTON"&&(Q(!0),_t.current={x:Ie.clientX,y:Ie.clientY}))},onPointerUp:()=>{var Ie,gt,bt,Jt;if(be||!Qe)return;_t.current=null;let vn=Number(((Ie=Ae.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),tn=Number(((gt=Ae.current)==null?void 0:gt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Mn=new Date().getTime()-((bt=Ne.current)==null?void 0:bt.getTime()),Ln=te==="x"?vn:tn,ei=Math.abs(Ln)/Mn;if(Math.abs(Ln)>=rJ||ei>.11){Ye(dt.current),(Jt=g.onDismiss)==null||Jt.call(g,g),Re(te==="x"?vn>0?"right":"left":tn>0?"down":"up"),He(),ve(!0),xe(!1);return}Q(!1),ae(null)},onPointerMove:Ie=>{var gt,bt,Jt,vn;if(!_t.current||!Qe||((gt=window.getSelection())==null?void 0:gt.toString().length)>0)return;let tn=Ie.clientY-_t.current.y,Mn=Ie.clientX-_t.current.x,Ln=(bt=n.swipeDirections)!=null?bt:sJ(ee);!te&&(Math.abs(Mn)>1||Math.abs(tn)>1)&&ae(Math.abs(Mn)>Math.abs(tn)?"x":"y");let ei={x:0,y:0};te==="y"?(Ln.includes("top")||Ln.includes("bottom"))&&(Ln.includes("top")&&tn<0||Ln.includes("bottom")&&tn>0)&&(ei.y=tn):te==="x"&&(Ln.includes("left")||Ln.includes("right"))&&(Ln.includes("left")&&Mn<0||Ln.includes("right")&&Mn>0)&&(ei.x=Mn),(Math.abs(ei.x)>0||Math.abs(ei.y)>0)&&xe(!0),(Jt=Ae.current)==null||Jt.style.setProperty("--swipe-amount-x",`${ei.x}px`),(vn=Ae.current)==null||vn.style.setProperty("--swipe-amount-y",`${ei.y}px`)}},rn&&!g.jsx?We.createElement("button",{"aria-label":Z,"data-disabled":ke,"data-close-button":!0,onClick:ke||!Qe?()=>{}:()=>{var Ie;He(),(Ie=g.onDismiss)==null||Ie.call(g,g)},className:Po(z==null?void 0:z.closeButton,(i=g==null?void 0:g.classNames)==null?void 0:i.closeButton)},(s=q==null?void 0:q.close)!=null?s:HQ):null,g.jsx||M.isValidElement(g.title)?g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title:We.createElement(We.Fragment,null,Ve||g.icon||g.promise?We.createElement("div",{"data-icon":"",className:Po(z==null?void 0:z.icon,(o=g==null?void 0:g.classNames)==null?void 0:o.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||wt():null,g.type!=="loading"?g.icon||(q==null?void 0:q[Ve])||OQ(Ve):null):null,We.createElement("div",{"data-content":"",className:Po(z==null?void 0:z.content,(a=g==null?void 0:g.classNames)==null?void 0:a.content)},We.createElement("div",{"data-title":"",className:Po(z==null?void 0:z.title,(l=g==null?void 0:g.classNames)==null?void 0:l.title)},typeof g.title=="function"?g.title():g.title),g.description?We.createElement("div",{"data-description":"",className:Po(B,Ft,z==null?void 0:z.description,(c=g==null?void 0:g.classNames)==null?void 0:c.description)},typeof g.description=="function"?g.description():g.description):null),M.isValidElement(g.cancel)?g.cancel:g.cancel&&F0(g.cancel)?We.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||N,onClick:Ie=>{var gt,bt;F0(g.cancel)&&Qe&&((bt=(gt=g.cancel).onClick)==null||bt.call(gt,Ie),He()
vendor: 4,796 bytes, line 466
466)},className:Po(z==null?void 0:z.cancelButton,(u=g==null?void 0:g.classNames)==null?void 0:u.cancelButton)},g.cancel.label):null,M.isValidElement(g.action)?g.action:g.action&&F0(g.action)?We.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||O,onClick:Ie=>{var gt,bt;F0(g.action)&&((bt=(gt=g.action).onClick)==null||bt.call(gt,Ie),!Ie.defaultPrevented&&He())},className:Po(z==null?void 0:z.actionButton,(d=g==null?void 0:g.classNames)==null?void 0:d.actionButton)},g.action.label):null))};function VL(){if(typeof window>"u"||typeof document>"u")return"ltr";let n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function aJ(n,e){let t={};return[n,e].forEach((r,i)=>{let s=i===1,o=s?"--mobile-offset":"--offset",a=s?eJ:ZQ;function l(c){["top","right","bottom","left"].forEach(u=>{t[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?t[`${o}-${c}`]=a:t[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),t}var lJ=M.forwardRef(function(n,e){let{invert:t,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:m,style:g,visibleToasts:v=JQ,toastOptions:_,dir:x=VL(),gap:y=nJ,loadingIcon:S,icons:b,containerAriaLabel:A="Notifications",pauseWhenPageIsHidden:k}=n,[L,C]=We.useState([]),P=We.useMemo(()=>Array.from(new Set([r].concat(L.filter(re=>re.position).map(re=>re.position)))),[L,r]),[R,N]=We.useState([]),[O,V]=We.useState(!1),[B,W]=We.useState(!1),[ee,J]=We.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ie=We.useRef(null),j=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=We.useRef(null),q=We.useRef(!1),Z=We.useCallback(re=>{C(te=>{var ae;return(ae=te.find(we=>we.id===re.id))!=null&&ae.delete||ds.dismiss(re.id),te.filter(({id:we})=>we!==re.id)})},[]);return We.useEffect(()=>ds.subscribe(re=>{if(re.dismiss){C(te=>te.map(ae=>ae.id===re.id?{...ae,delete:!0}:ae));return}setTimeout(()=>{mV.flushSync(()=>{C(te=>{let ae=te.findIndex(we=>we.id===re.id);return ae!==-1?[...te.slice(0,ae),{...te[ae],...re},...te.slice(ae+1)]:[re,...te]})})})}),[]),We.useEffect(()=>{if(u!=="system"){J(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;let re=window.matchMedia("(prefers-color-scheme: dark)");try{re.addEventListener("change",({matches:te})=>{J(te?"dark":"light")})}catch{re.addListener(({matches:ae})=>{try{J(ae?"dark":"light")}catch(we){console.error(we)}})}},[u]),We.useEffect(()=>{L.length<=1&&V(!1)},[L]),We.useEffect(()=>{let re=te=>{var ae,we;i.every(Re=>te[Re]||te.code===Re)&&(V(!0),(ae=ie.current)==null||ae.focus()),te.code==="Escape"&&(document.activeElement===ie.current||(we=ie.current)!=null&&we.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[i]),We.useEffect(()=>{if(ie.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,q.current=!1)}},[ie.current]),We.createElement("section",{ref:e,"aria-label":`${A} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((re,te)=>{var ae;let[we,Re]=re.split("-");return L.length?We.createElement("ol",{key:re,dir:x==="auto"?VL():x,tabIndex:-1,ref:ie,className:a,"data-sonner-toaster":!0,"data-theme":ee,"data-y-position":we,"data-lifted":O&&L.length>1&&!s,"data-x-position":Re,style:{"--front-toast-height":`${((ae=R[0])==null?void 0:ae.height)||0}px`,"--width":`${tJ}px`,"--gap":`${y}px`,...g,...aJ(l,c)},onBlur:de=>{q.current&&!de.currentTarget.contains(de.relatedTarget)&&(q.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||q.current||(q.current=!0,z.current=de.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{B||V(!1)},onDragEnd:()=>V(!1),onPointerDown:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},L.filter(de=>!de.position&&te===0||de.position===re).map((de,Ge)=>{var $e,De;return We.createElement(oJ,{key:de.id,icons:b,index:Ge,toast:de,defaultRichColors:d,duration:($e=_==null?void 0:_.duration)!=null?$e:m,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:t,visibleToasts:v,closeButton:(De=_==null?void 0:_.closeButton)!=null?De:o,interacting:
vendor: 4,178 bytes, line 466
466B,position:re,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,removeToast:Z,toasts:L.filter(Ue=>Ue.position==de.position),heights:R.filter(Ue=>Ue.position==de.position),setHeights:N,expandByDefault:s,gap:y,loadingIcon:S,expanded:O,pauseWhenPageIsHidden:k,swipeDirections:n.swipeDirections})})):null}))});const cJ=({...n})=>{const{theme:e="system"}=z2();return f.jsx(lJ,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...n})};var uJ=KC[" useId ".trim().toString()]||(()=>{}),dJ=0;function Sa(n){const[e,t]=M.useState(uJ());return ci(()=>{t(r=>r??String(dJ++))},[n]),e?`radix-${e}`:""}const hJ=["top","right","bottom","left"],Fc=Math.min,Fs=Math.max,l1=Math.round,U0=Math.floor,ba=n=>({x:n,y:n}),fJ={left:"right",right:"left",bottom:"top",top:"bottom"},pJ={start:"end",end:"start"};function $M(n,e,t){return Fs(n,Fc(e,t))}function yl(n,e){return typeof n=="function"?n(e):n}function vl(n){return n.split("-")[0]}function Ep(n){return n.split("-")[1]}function eR(n){return n==="x"?"y":"x"}function tR(n){return n==="y"?"height":"width"}const mJ=new Set(["top","bottom"]);function xa(n){return mJ.has(vl(n))?"y":"x"}function nR(n){return eR(xa(n))}function gJ(n,e,t){t===void 0&&(t=!1);const r=Ep(n),i=nR(n),s=tR(i);let o=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=c1(o)),[o,c1(o)]}function yJ(n){const e=c1(n);return[qM(n),e,qM(e)]}function qM(n){return n.replace(/start|end/g,e=>pJ[e])}const jL=["left","right"],BL=["right","left"],vJ=["top","bottom"],xJ=["bottom","top"];function _J(n,e,t){switch(n){case"top":case"bottom":return t?e?BL:jL:e?jL:BL;case"left":case"right":return e?vJ:xJ;default:return[]}}function wJ(n,e,t,r){const i=Ep(n);let s=_J(vl(n),t==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(qM)))),s}function c1(n){return n.replace(/left|right|bottom|top/g,e=>fJ[e])}function SJ(n){return{top:0,right:0,bottom:0,left:0,...n}}function fj(n){return typeof n!="number"?SJ(n):{top:n,right:n,bottom:n,left:n}}function u1(n){const{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function zL(n,e,t){let{reference:r,floating:i}=n;const s=xa(e),o=nR(e),a=tR(o),l=vl(e),c=s==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,m=r[a]/2-i[a]/2;let g;switch(l){case"top":g={x:u,y:r.y-i.height};break;case"bottom":g={x:u,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:d};break;case"left":g={x:r.x-i.width,y:d};break;default:g={x:r.x,y:r.y}}switch(Ep(e)){case"start":g[o]-=m*(t&&c?-1:1);break;case"end":g[o]+=m*(t&&c?-1:1);break}return g}const bJ=async(n,e,t)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=t,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:n,floating:e,strategy:i}),{x:u,y:d}=zL(c,r,l),m=r,g={},v=0;for(let _=0;_<a.length;_++){const{name:x,fn:y}=a[_],{x:S,y:b,data:A,reset:k}=await y({x:u,y:d,initialPlacement:r,placement:m,strategy:i,middlewareData:g,rects:c,platform:o,elements:{reference:n,floating:e}});u=S??u,d=b??d,g={...g,[x]:{...g[x],...A}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(c=k.rects===!0?await o.getElementRects({reference:n,floating:e,strategy:i}):k.rects),{x:u,y:d}=zL(c,m,l)),_=-1)}return{x:u,y:d,placement:m,strategy:i,middlewareData:g}};async function Xg(n,e){var t;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:g=0}=yl(e,n),v=fj(g),x=a[m?d==="floating"?"reference":"floating":d],y=u1(await s.getClippingRect
vendor: 16,375 bytes, line 466
466({element:(t=await(s.isElement==null?void 0:s.isElement(x)))==null||t?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),S=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),A=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},k=u1(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:b,strategy:l}):S);return{top:(y.top-k.top+v.top)/A.y,bottom:(k.bottom-y.bottom+v.bottom)/A.y,left:(y.left-k.left+v.left)/A.x,right:(k.right-y.right+v.right)/A.x}}const EJ=n=>({name:"arrow",options:n,async fn(e){const{x:t,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=yl(n,e)||{};if(c==null)return{};const d=fj(u),m={x:t,y:r},g=nR(i),v=tR(g),_=await o.getDimensions(c),x=g==="y",y=x?"top":"left",S=x?"bottom":"right",b=x?"clientHeight":"clientWidth",A=s.reference[v]+s.reference[g]-m[g]-s.floating[v],k=m[g]-s.reference[g],L=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=L?L[b]:0;(!C||!await(o.isElement==null?void 0:o.isElement(L)))&&(C=a.floating[b]||s.floating[v]);const P=A/2-k/2,R=C/2-_[v]/2-1,N=Fc(d[y],R),O=Fc(d[S],R),V=N,B=C-_[v]-O,W=C/2-_[v]/2+P,ee=$M(V,W,B),J=!l.arrow&&Ep(i)!=null&&W!==ee&&s.reference[v]/2-(W<V?N:O)-_[v]/2<0,ie=J?W<V?W-V:W-B:0;return{[g]:m[g]+ie,data:{[g]:ee,centerOffset:W-ee-ie,...J&&{alignmentOffset:ie}},reset:J}}}),TJ=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:_=!0,...x}=yl(n,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const y=vl(i),S=xa(a),b=vl(a)===a,A=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=m||(b||!_?[c1(a)]:yJ(a)),L=v!=="none";!m&&L&&k.push(...wJ(a,_,v,A));const C=[a,...k],P=await Xg(e,x),R=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&R.push(P[y]),d){const W=gJ(i,o,A);R.push(P[W[0]],P[W[1]])}if(N=[...N,{placement:i,overflows:R}],!R.every(W=>W<=0)){var O,V;const W=(((O=s.flip)==null?void 0:O.index)||0)+1,ee=C[W];if(ee&&(!(d==="alignment"?S!==xa(ee):!1)||N.every(j=>j.overflows[0]>0&&xa(j.placement)===S)))return{data:{index:W,overflows:N},reset:{placement:ee}};let J=(V=N.filter(ie=>ie.overflows[0]<=0).sort((ie,j)=>ie.overflows[1]-j.overflows[1])[0])==null?void 0:V.placement;if(!J)switch(g){case"bestFit":{var B;const ie=(B=N.filter(j=>{if(L){const z=xa(j.placement);return z===S||z==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(z=>z>0).reduce((z,q)=>z+q,0)]).sort((j,z)=>j[1]-z[1])[0])==null?void 0:B[0];ie&&(J=ie);break}case"initialPlacement":J=a;break}if(i!==J)return{reset:{placement:J}}}return{}}}};function HL(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function GL(n){return hJ.some(e=>n[e]>=0)}const MJ=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:r="referenceHidden",...i}=yl(n,e);switch(r){case"referenceHidden":{const s=await Xg(e,{...i,elementContext:"reference"}),o=HL(s,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:GL(o)}}}case"escaped":{const s=await Xg(e,{...i,altBoundary:!0}),o=HL(s,t.floating);return{data:{escapedOffsets:o,escaped:GL(o)}}}default:return{}}}}},pj=new Set(["left","top"]);async function AJ(n,e){const{placement:t,platform:r,elements:i}=n,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=vl(t),a=Ep(t),l=xa(t)==="y",c=pj.has(o)?-1:1,u=s&&l?-1:1,d=yl(e,n);let{mainAxis:m,crossAxis:g,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(g=a==="end"?v*-1:v),l?{x:g*u,y:m*c}:{x:m*c,y:g*u}}const CJ=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,r;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await AJ(e,n);return o===((t=a.offset)==null?void 0:t.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},RJ=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:y,y:S}=x;return{x:y,y:S}}},...l}=yl(n,e),c={x:t,y:r},u=await Xg(e,l),d=xa(vl(i)),m=eR(d);let g=c[m],v=c[d];if(s){const x=m==="y"?"top":"left",y=m==="y"?"bottom":"right",S=g+u[x],b=g-u[y];g=$M(S,g,b)}if(o){const x=d==="y"?"top":"left",y=d==="y"?"bottom":"right",S=v+u[x],b=v-u[y];v=$M(S,v,b)}const _=a.fn({...e,[m]:g,[d]:v});return{..._,data:{x:_.x-t,y:_.y-r,enabled:{[m]:s,[d]:o}}}}}},PJ=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=yl(n,e),u={x:t,y:r},d=xa(i),m=eR(d);let g=u[m],v=u[d];const _=yl(a,e),x=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(l){const b=m==="y"?"height":"width",A=s.reference[m]-s.floating[b]+x.mainAxis,k=s.reference[m]+s.reference[b]-x.mainAxis;g<A?g=A:g>k&&(g=k)}if(c){var y,S;const b=m==="y"?"width":"height",A=pj.has(vl(i)),k=s.reference[d]-s.floating[b]+(A&&((y=o.offset)==null?void 0:y[d])||0)+(A?0:x.crossAxis),L=s.reference[d]+s.reference[b]+(A?0:((S=o.offset)==null?void 0:S[d])||0)-(A?x.crossAxis:0);v<k?v=k:v>L&&(v=L)}return{[m]:g,[d]:v}}}},NJ=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,r;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=yl(n,e),u=await Xg(e,c),d=vl(i),m=Ep(i),g=xa(i)==="y",{width:v,height:_}=s.floating;let x,y;d==="top"||d==="bottom"?(x=d,y=m===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,x=m==="end"?"top":"bottom");const S=_-u.top-u.bottom,b=v-u.left-u.right,A=Fc(_-u[x],S),k=Fc(v-u[y],b),L=!e.middlewareData.shift;let C=A,P=k;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(P=b),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(C=S),L&&!m){const N=Fs(u.left,0),O=Fs(u.right,0),V=Fs(u.top,0),B=Fs(u.bottom,0);g?P=v-2*(N!==0||O!==0?N+O:Fs(u.left,u.right)):C=_-2*(V!==0||B!==0?V+B:Fs(u.top,u.bottom))}await l({...e,availableWidth:P,availableHeight:C});const R=await o.getDimensions(a.floating);return v!==R.width||_!==R.height?{reset:{rects:!0}}:{}}}};function vw(){return typeof window<"u"}function Tp(n){return mj(n)?(n.nodeName||"").toLowerCase():"#document"}function Hs(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function Ua(n){var e;return(e=(mj(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function mj(n){return vw()?n instanceof Node||n instanceof Hs(n).Node:!1}function Zo(n){return vw()?n instanceof Element||n instanceof Hs(n).Element:!1}function Da(n){return vw()?n instanceof HTMLElement||n instanceof Hs(n).HTMLElement:!1}function WL(n){return!vw()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Hs(n).ShadowRoot}const IJ=new Set(["inline","contents"]);function Ky(n){const{overflow:e,overflowX:t,overflowY:r,display:i}=ea(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!IJ.has(i)}const LJ=new Set(["table","td","th"]);function DJ(n){return LJ.has(Tp(n))}const kJ=[":popover-open",":modal"];function xw(n){return kJ.some(e=>{try{return n.matches(e)}catch{return!1}})}const OJ=["transform","translate","scale","rotate","perspective"],FJ=["transform","translate","scale","rotate","perspective","filter"],UJ=["paint","layout","strict","content"];function rR(n){const e=iR(),t=Zo(n)?ea(n):n;return OJ.some(r=>t[r]?t[r]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||FJ.some(r=>(t.willChange||"").includes(r))||UJ.some(r=>(t.contain||"").includes(r))}function VJ(n){let e=Uc(n);for(;Da(e)&&!np(e);){if(rR(e))return e;if(xw(e))return null;e=Uc(e)}return null}function iR(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const jJ=new Set(["html","body","#document"]);function np(n){return jJ.has(Tp(n))}function ea(n){return Hs(n).getComputedStyle(n)}function _w(n){return Zo(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Uc(n){if(Tp(n)==="html")return n;const e=n.assignedSlot||n.parentNode||WL(n)&&n.host||Ua(n);return WL(e)?e.host:e}function gj(n){const e=Uc(n);return np(e)?n.ownerDocument?n.ownerDocument.body:n.body:Da(e)&&Ky(e)?e:gj(e)}function Kg(n,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const i=gj(n),s=i===((r=n.ownerDocument)==null?void 0:r.body),o=Hs(i);if(s){const a=XM(o);return e.concat(o,o.visualViewport||[],Ky(i)?i:[],a&&t?Kg(a):[])}return e.concat(i,Kg(i,[],t))}function XM(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function yj(n){const e=ea(n);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Da(n),s=i?n.offsetWidth:t,o=i?n.offsetHeight:r,a=l1(t)!==s||l1(r)!==o;return a&&(t=s,r=o),{width:t,height:r,$:a}}function sR(n){return Zo(n)?n:n.contextElement}function Nf(n){const e=sR(n);if(!Da(e))return ba(1);const t=e.getBoundingClientRect(),{width:r,height:i,$:s}=yj(e);let o=(s?l1(t.width):t.width)/r,a=(s?l1(t.height):t.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const BJ=ba(0);function vj(n){const e=Hs(n);return!iR()||!e.visualViewport?BJ:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function zJ(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Hs(n)?!1:e}function bd(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=n.getBoundingClientRect(),s=sR(n);let o=ba(1);e&&(r?Zo(r)&&(o=Nf(r)):o=Nf(n));const a=zJ(s,t,r)?vj(s):ba(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const m=Hs(s),g=r&&Zo(r)?Hs(r):r;let v=m,_=XM(v);for(;_&&r&&g!==v;){const x=Nf(_),y=_.getBoundingClientRect(),S=ea(_),b=y.left+(_.clientLeft+parseFloat(S.paddingLeft))*x.x,A=y.top+(_.clientTop+parseFloat(S.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=b,c+=A,v=Hs(_),_=XM(v)}}return u1({width:u,height:d,x:l,y:c})}function oR(n,e){const t=_w(n).scrollLeft;return e?e.left+t:bd(Ua(n)).left+t}function xj(n,e,t){t===void 0&&(t=!1);const r=n.getBoundingClientRect(),i=r.left+e.scrollLeft-(t?0:oR(n,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function HJ(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n;const s=i==="fixed",o=Ua(r),a=e?xw(e.floating):!1;if(r===o||a&&s)return t;let l={scrollLeft:0,scrollTop:0},c=ba(1);const u=ba(0),d=Da(r);if((d||!d&&!s)&&((Tp(r)!=="body"||Ky(o))&&(l=_w(r)),Da(r))){const g=bd(r);c=Nf(r),u.x=g.x+r.clientLeft,u.y=g.y+r.clientTop}const m=o&&!d&&!s?xj(o,l,!0):ba(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-l.scrollLeft*c.x+u.x+m.x,y:t.y*c.y-l.scrollTop*c.y+u.y+m.y}}function GJ(n){return Array.from(n.getClientRects())}function WJ(n){const e=Ua(n),t=_w(n),r=n.ownerDocument.body,i=Fs(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Fs(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-t.scrollLeft+oR(n);const a=-t.scrollTop;return ea(r).direction==="rtl"&&(o+=Fs(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function $J(n,e){const t=Hs(n),r=Ua(n),i=t.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=iR();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}const qJ=new Set(["absolute","fixed"]);function XJ(n,e){const t=bd(n,!0,e==="fixed"),r=t.top+n.clientTop,i=t.left+n.clientLeft,s=Da(n)?Nf(n):ba(1),o=n.clientWidth*s.x,a=n.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function $L(n,e,t){let r;if(e==="viewport")r=$J(n,t);else if(e==="document")r=WJ(Ua(n));else if(Zo(e))r=XJ(e,t);else{const i=vj(n);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return u1(r)}function _j(n,e){const t=Uc(n);return t===e||!Zo(t)||np(t)?!1:ea(t).position==="fixed"||_j(t,e)}function KJ(n,e){const t=e.get(n);if(t)return t;let r=Kg(n,[],!1).filter(a=>Zo(a)&&Tp(a)!=="body"),i=null;const s=ea(n).position==="fixed";let o=s?Uc(n):n;for(;Zo(o)&&!np(o);){const a=ea(o),l=rR(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&qJ.has(i.position)||Ky(o)&&!l&&_j(n,o))?r=r.filter(u=>u!==o):i=a,o=Uc(o)}return e.set(n,r),r}function YJ(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n;const o=[...t==="clippingAncestors"?xw(e)?[]:KJ(e,this._c):[].concat(t),r],a=o[0],l=o.reduce((c,u)=>{const d=$L(e,u,i);return c.top=Fs(d.top,c.top),c.right=Fc(d.right,c.right),c.bottom=Fc(d.bottom,c.bottom),c.left=Fs(d.left,c.left),c},$L(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function QJ(n){const{width:e,height:t}=yj(n);return{width:e,height:t}}function JJ(n,e,t){const r=Da(e),i=Ua(e),s=t==="fixed",o=bd(n,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=ba(0);function c(){l.x=oR(i)}if(r||!r&&!s)if((Tp(e)!=="body"||Ky(i))&&(a=_w(e)),r){const g=bd(e,!0,s,e);l.x=g.x+e.clientLeft,l.y=g.y+e.clientTop}else i&&c();s&&!r&&i&&c();const u=i&&!r&&!s?xj(i,a):ba(0),d=o.left+a.scrollLeft-l.x-u.x,m=o.top+a.scrollTop-l.y-u.y;return{x:d,y:m,width:o.width,height:o.height}}function lE(n){return ea(n).position==="static"}function qL(n,e){if(!Da(n)||ea(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return Ua(n)===t&&(t=t.ownerDocument.body),t}function wj(n,e){const t=Hs(n);if(xw(n))return t;if(!Da(n)){let i=Uc(n);for(;i&&!np(i);){if(Zo(i)&&!lE(i))return i;i=Uc(i)}return t}let r=qL(n,e);for(;r&&DJ(r)&&lE(r);)r=qL(r,e);return r&&np(r)&&lE(r)&&!rR(r)?t:r||VJ(n)||t}const ZJ=async function(n){const e=this.getOffsetParent||wj,t=this.getDimensions,r=await t(n.floating);return{reference:JJ(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function eZ(n){return ea(n).direction==="rtl"}const tZ={convertOffsetParentRelativeRectToViewportRelativeRect:HJ,getDocumentElement:Ua,getClippingRect:YJ,getOffsetParent:wj,getElementRects:ZJ,getClientRects:GJ,getDimensions:QJ,getScale:Nf,isElement:Zo,isRTL:eZ};function Sj(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function nZ(n,e){let t=null,r;const i=Ua(n);function s(){var a;clearTimeout(r),(a=t)==null||a.disconnect(),t=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=n.getBoundingClientRect(),{left:u,top:d,width:m,height:g}=c;if(a||e(),!m||!g)return;const v=U0(d),_=U0(i.clientWidth-(u+m)),x=U0(i.clientHeight-(d+g)),y=U0(u),b={rootMargin:-v+"px "+-_+"px "+-x+"px "+-y+"px",threshold:Fs(0,Fc(1,l))||1};let A=!0;function k(L){const C=L[0].intersectionRatio;if(C!==l){if(!A)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!Sj(c,n.getBoundingClientRect())&&o(),A=!1}try{t=new IntersectionObserver(k,{...b,root:i.ownerDocument})}catch{t=new IntersectionObserver(k,b)}t.observe(n)}return o(!0),s}function rZ(n,e,t,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=sR(n),u=i||s?[...c?Kg(c):[],...Kg(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",t,{passive:!0}),s&&y.addEventListener("resize",t)});const d=c&&a?nZ(c,t):null;let m=-1,g=null;o&&(g=new ResizeObserver(y=>{let[S]=y;S&&S.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=g)==null||b.observe(e)})),t()}),c&&!l&&g.observe(c),g.observe(e));let v,_=l?bd(n):null;l&&x();function x(){const y=bd(n);_&&!Sj(_,y)&&t(),_=y,v=requestAnimationFrame(x)}return t(),()=>{var y;u.forEach(S=>{i&&S.removeEventListener("scroll",t),s&&S.removeEventListener("resize",t)}),d==null||d(),(y=g)==null||y.disconnect(),g=null,l&&cancelAnimationFrame(v)}}const iZ=CJ,sZ=RJ,oZ=TJ,aZ=NJ,lZ=MJ,XL=EJ,cZ=PJ,uZ=(n,e,t)=>{const r=new Map,i={platform:tZ,...t},s={...i.platform,_c:r};return bJ(n,e,{...i,platform:s})};var dZ=typeof document<"u",hZ=function(){},u_=dZ?M.useLayoutEffect:hZ;function d1(n,e){if(n===e)return!0;
vendor: 4,291 bytes, line 466
466if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,r,i;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(r=t;r--!==0;)if(!d1(n[r],e[r]))return!1;return!0}if(i=Object.keys(n),t=i.length,t!==Object.keys(e).length)return!1;for(r=t;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=t;r--!==0;){const s=i[r];if(!(s==="_owner"&&n.$$typeof)&&!d1(n[s],e[s]))return!1}return!0}return n!==n&&e!==e}function bj(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function KL(n,e){const t=bj(n);return Math.round(e*t)/t}function cE(n){const e=M.useRef(n);return u_(()=>{e.current=n}),e}function fZ(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=n,[u,d]=M.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[m,g]=M.useState(r);d1(m,r)||g(r);const[v,_]=M.useState(null),[x,y]=M.useState(null),S=M.useCallback(j=>{j!==L.current&&(L.current=j,_(j))},[]),b=M.useCallback(j=>{j!==C.current&&(C.current=j,y(j))},[]),A=s||v,k=o||x,L=M.useRef(null),C=M.useRef(null),P=M.useRef(u),R=l!=null,N=cE(l),O=cE(i),V=cE(c),B=M.useCallback(()=>{if(!L.current||!C.current)return;const j={placement:e,strategy:t,middleware:m};O.current&&(j.platform=O.current),uZ(L.current,C.current,j).then(z=>{const q={...z,isPositioned:V.current!==!1};W.current&&!d1(P.current,q)&&(P.current=q,Od.flushSync(()=>{d(q)}))})},[m,e,t,O,V]);u_(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[c]);const W=M.useRef(!1);u_(()=>(W.current=!0,()=>{W.current=!1}),[]),u_(()=>{if(A&&(L.current=A),k&&(C.current=k),A&&k){if(N.current)return N.current(A,k,B);B()}},[A,k,B,N,R]);const ee=M.useMemo(()=>({reference:L,floating:C,setReference:S,setFloating:b}),[S,b]),J=M.useMemo(()=>({reference:A,floating:k}),[A,k]),ie=M.useMemo(()=>{const j={position:t,left:0,top:0};if(!J.floating)return j;const z=KL(J.floating,u.x),q=KL(J.floating,u.y);return a?{...j,transform:"translate("+z+"px, "+q+"px)",...bj(J.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:z,top:q}},[t,a,J.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:B,refs:ee,elements:J,floatingStyles:ie}),[u,B,ee,J,ie])}const pZ=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:r,padding:i}=typeof n=="function"?n(t):n;return r&&e(r)?r.current!=null?XL({element:r.current,padding:i}).fn(t):{}:r?XL({element:r,padding:i}).fn(t):{}}}},mZ=(n,e)=>({...iZ(n),options:[n,e]}),gZ=(n,e)=>({...sZ(n),options:[n,e]}),yZ=(n,e)=>({...cZ(n),options:[n,e]}),vZ=(n,e)=>({...oZ(n),options:[n,e]}),xZ=(n,e)=>({...aZ(n),options:[n,e]}),_Z=(n,e)=>({...lZ(n),options:[n,e]}),wZ=(n,e)=>({...pZ(n),options:[n,e]});var SZ="Arrow",Ej=M.forwardRef((n,e)=>{const{children:t,width:r=10,height:i=5,...s}=n;return f.jsx(Et.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?t:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ej.displayName=SZ;var bZ=Ej;function ww(n){const[e,t]=M.useState(void 0);return ci(()=>{if(n){t({width:n.offsetWidth,height:n.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=n.offsetWidth,a=n.offsetHeight;t({width:o,height:a})});return r.observe(n,{box:"border-box"}),()=>r.unobserve(n)}else t(void 0)},[n]),e}var aR="Popper",[Tj,Mp]=bs(aR),[EZ,Mj]=Tj(aR),Aj=n=>{const{__scopePopper:e,children:t}=n,[r,i]=M.useState(null);return f.jsx(EZ,{scope:e,anchor:r,onAnchorChange:i,children:t})};Aj.displayName=aR;var Cj="PopperAnchor",Rj=M.forwardRef((n,e)=>{const{__scopePopper:t,virtualRef:r,...i}=n,s=Mj(Cj,t),o=M.useRef(null),a=sn(e,o);return M.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:f.jsx(Et.div,{...i,ref:a})});Rj.displayName=Cj;var lR="PopperContent",[TZ,MZ]=Tj(lR),Pj=M.forwardRef((n,e)=>{var de,Ge,$e,De,Ue,Q;const{__scopePopper:t,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l
vendor: 1,109 bytes, line 466
466=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:v,..._}=n,x=Mj(lR,t),[y,S]=M.useState(null),b=sn(e,be=>S(be)),[A,k]=M.useState(null),L=ww(A),C=(L==null?void 0:L.width)??0,P=(L==null?void 0:L.height)??0,R=r+(s!=="center"?"-"+s:""),N=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(c)?c:[c],V=O.length>0,B={padding:N,boundary:O.filter(CZ),altBoundary:V},{refs:W,floatingStyles:ee,placement:J,isPositioned:ie,middlewareData:j}=fZ({strategy:"fixed",placement:R,whileElementsMounted:(...be)=>rZ(...be,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[mZ({mainAxis:i+P,alignmentAxis:o}),l&&gZ({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?yZ():void 0,...B}),l&&vZ({...B}),xZ({...B,apply:({elements:be,rects:ve,availableWidth:Le,availableHeight:xe})=>{const{width:it,height:Ye}=ve.reference,G=be.floating.style;G.setProperty("--radix-popper-available-width",`${Le}px`),G.setProperty("--radix-popper-available-height",`${xe}px`),G.setProperty("--radix-popper-anchor-width",`${it}
466px`),G.setProperty("--radix-popper-anchor-height",`${Ye}px`)}}),A&&wZ({element:A,padding:a}),RZ({arrowWidth:C,arrowHeight:P}),m&&_Z({strategy:"referenceHidden",...B})]}),[z,q]=Lj(J),Z=Ss(v);ci(()=>{ie&&(Z==null||Z())},[ie,Z]);const re=(de=j.arrow)==null?void 0:de.x,te=(Ge=j.arrow)==null?void 0:Ge.y,ae=(($e=j.arrow)==null?void 0:$e.centerOffset)!==0,[we,Re]=M.useState();return ci(()=>{y&&Re(window.getComputedStyle(y).zIndex)},[y]),f.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:ie?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:we,"--radix-popper-transform-origin":[(De=j.transformOrigin)==null?void 0:De.x,(Ue=j.transformOrigin)==null?void 0:Ue.y].join(" "),...((Q=j.hide)==null?void 0:Q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:f.jsx(TZ,{scope:t,placedSide:z,onArrowChange:k,arrowX:re,arrowY:te,shouldHideArrow:ae,children:f.jsx(Et.div,{"data-side":z,"data-align":q,..._,ref:b,style:{..._.style,animation:ie?void 0:"none"}})})})});Pj.displayName=lR;var Nj="PopperArrow",AZ={top:"bottom",right:"left",bottom:"top",left:"right"},Ij=M.forwardRef(function(e,t){const{__scopePopper:r,...i}=e,s=MZ(Nj,r),o=AZ[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx(bZ,{...i,ref:t,style:{...i.style,display:"block"}})})});Ij.displayName=Nj;function CZ(n){return n!==null}var RZ=n=>({name:"transformOrigin",options:n,fn(e){var x,y,S;const{placement:t,rects:r,middlewareData:i}=e,o=((x=i.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:n.arrowWidth,l=o?0:n.arrowHeight,[c,u]=Lj(t),d={start:"0%",center:"50%",end:"100%"}[u],m=(((y=i.arrow)==null?void 0:y.x)??0)+a/2,g=(((S=i.arrow)==null?void 0:S.y)??0)+l/2;let v="",_="";return c==="bottom"?(v=o?d:`${m}px`,_=`${-l}px`):c==="top"?(v=o?d:`${m}px`,_=`${r.floating.height+l}px`):c==="right"?(v=`${-l}px`,_=o?d:`${g}px`):c==="left"&&(v=`${r.floating.width+l}px`,_=o?d:`${g}px`),{data:{x:v,y:_}}}});function Lj(n){const[e,t="center"]=n.split("-");return[e,t]}var Dj=Aj,cR=Rj,uR=Pj,dR=Ij,[Sw,vbe]=bs("Tooltip",[Mp]),hR=Mp(),kj="TooltipProvider",PZ=700,YL="tooltip.open",[NZ,Oj]=Sw(kj),Fj=n=>{const{__scopeTooltip:e,delayDuration:t=PZ,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=n,o=M.useRef(!0),a=M.useRef(!1),l=M.useRef(0);return M.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),f.jsx(NZ,{scope:e,isOpenDelayedRef:o,delayDuration:t,onOpen:M.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:M.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:M.useCallback(c=>{a.current=c},[]),disableHoverableContent:i,children:s})};Fj.displayName=kj;var Uj="Tooltip",[xbe,bw]=Sw(Uj),KM="TooltipTrigger",IZ=M.forwardRef((n,e)=>{const{__scopeTooltip:t,...r}=n,i=bw(KM,t),s=Oj(KM,t),o=hR(t),a=M.useRef(null),l=sn(e,a,i.onTriggerChange),c=M.useRef(!1),u=M.useRef(!1),d=M.useCallback(()=>c.current=!1,[]);return M.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),f.jsx(cR,{asChild:!0,...o,children:f.jsx(Et.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:Xe(n.onPointerMove,m=>{m.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:Xe(n.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:Xe(n.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Xe(n.onFocus,()=>{c.current||i.onOpen()}),onBlur:Xe(n.onBlur,i.onClose),onClick:Xe(n.onClick,i.onClose)})})});IZ.displayName=KM;var LZ="TooltipPortal",[_be,DZ]=Sw(LZ,{forceMount:void 0}),rp="TooltipContent",Vj=M.forwardRef((n,e)=>{const t=DZ(rp,n.__scopeTooltip),{forceMount:r=t.forceMount,side:i="top",...s}=n,o=bw(rp,n.__scopeTooltip);return f.jsx(Xs,{present:r||o.open,children:o.disableHoverableContent?f.jsx(jj,{side:i,...s,ref:e}):f.jsx(kZ,{side:i,...s,ref:e})})}),kZ=M.forwardRef((n,e)=>{const t=bw(rp,n.__scopeTooltip),r=Oj(rp,n.__scopeTooltip),i=M.useRef(null),s=sn(e,i),[o,a]=M.useState(null),{trigger:l,onClose:c}=t,u=i.current,{onPointerInTransitChange:d}=r,m=M.useCallback(()=>{a(null),d(!1)},[d]),g=M.useCallback((v,_)=>{const x=v.currentTarget,y={x:v.clientX,y:v.clientY},S=jZ(y,x.getBoundingClientRect()),b=BZ(y,S),A=zZ(_.getBoundingClientRect()),k=GZ([...b,...A]);a(k),d(!0)},[d]);return M.useEffect(()=>()=>m(),[m]),M.useEffect(()=>
vendor: 4,710 bytes, line 466
466{if(l&&u){const v=x=>g(x,u),_=x=>g(x,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",_),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",_)}}},[l,u,g,m]),M.useEffect(()=>{if(o){const v=_=>{const x=_.target,y={x:_.clientX,y:_.clientY},S=(l==null?void 0:l.contains(x))||(u==null?void 0:u.contains(x)),b=!HZ(y,o);S?m():b&&(m(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,o,c,m]),f.jsx(jj,{...n,ref:s})}),[OZ,FZ]=Sw(Uj,{isInside:!1}),UZ=LK("TooltipContent"),jj=M.forwardRef((n,e)=>{const{__scopeTooltip:t,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=n,l=bw(rp,t),c=hR(t),{onClose:u}=l;return M.useEffect(()=>(document.addEventListener(YL,u),()=>document.removeEventListener(YL,u)),[u]),M.useEffect(()=>{if(l.trigger){const d=m=>{const g=m.target;g!=null&&g.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),f.jsx(Sp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:f.jsxs(uR,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(UZ,{children:r}),f.jsx(OZ,{scope:t,isInside:!0,children:f.jsx(tY,{id:l.contentId,role:"tooltip",children:i||r})})]})})});Vj.displayName=rp;var Bj="TooltipArrow",VZ=M.forwardRef((n,e)=>{const{__scopeTooltip:t,...r}=n,i=hR(t);return FZ(Bj,t).isInside?null:f.jsx(dR,{...i,...r,ref:e})});VZ.displayName=Bj;function jZ(n,e){const t=Math.abs(e.top-n.y),r=Math.abs(e.bottom-n.y),i=Math.abs(e.right-n.x),s=Math.abs(e.left-n.x);switch(Math.min(t,r,i,s)){case s:return"left";case i:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function BZ(n,e,t=5){const r=[];switch(e){case"top":r.push({x:n.x-t,y:n.y+t},{x:n.x+t,y:n.y+t});break;case"bottom":r.push({x:n.x-t,y:n.y-t},{x:n.x+t,y:n.y-t});break;case"left":r.push({x:n.x+t,y:n.y-t},{x:n.x+t,y:n.y+t});break;case"right":r.push({x:n.x-t,y:n.y-t},{x:n.x-t,y:n.y+t});break}return r}function zZ(n){const{top:e,right:t,bottom:r,left:i}=n;return[{x:i,y:e},{x:t,y:e},{x:t,y:r},{x:i,y:r}]}function HZ(n,e){const{x:t,y:r}=n;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s],l=e[o],c=a.x,u=a.y,d=l.x,m=l.y;u>r!=m>r&&t<(d-c)*(r-u)/(m-u)+c&&(i=!i)}return i}function GZ(n){const e=n.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),WZ(e)}function WZ(n){if(n.length<=1)return n.slice();const e=[];for(let r=0;r<n.length;r++){const i=n[r];for(;e.length>=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const t=[];for(let r=n.length-1;r>=0;r--){const i=n[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var $Z=Fj,zj=Vj;const qZ=$Z,XZ=M.forwardRef(({className:n,sideOffset:e=4,...t},r)=>f.jsx(zj,{ref:r,sideOffset:e,className:Ot("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...t}));XZ.displayName=zj.displayName;var Ew=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Tw=typeof window>"u"||"Deno"in globalThis;function Uo(){}function KZ(n,e){return typeof n=="function"?n(e):n}function YZ(n){return typeof n=="number"&&n>=0&&n!==1/0}function QZ(n,e){return Math.max(n+(e||0)-Date.now(),0)}function YM(n,e){return typeof n=="function"?n(e):n}function JZ(n,e){return typeof n=="function"?n(e):n}function QL(n,e){const{type:t="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=n;
vendor: 22,814 bytes, line 466
466if(o){if(r){if(e.queryHash!==fR(o,e.options))return!1}else if(!Qg(e.queryKey,o))return!1}if(t!=="all"){const l=e.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||s&&!s(e))}function JL(n,e){const{exact:t,status:r,predicate:i,mutationKey:s}=n;if(s){if(!e.options.mutationKey)return!1;if(t){if(Yg(e.options.mutationKey)!==Yg(s))return!1}else if(!Qg(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function fR(n,e){return((e==null?void 0:e.queryKeyHashFn)||Yg)(n)}function Yg(n){return JSON.stringify(n,(e,t)=>QM(t)?Object.keys(t).sort().reduce((r,i)=>(r[i]=t[i],r),{}):t)}function Qg(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?Object.keys(e).every(t=>Qg(n[t],e[t])):!1}function Hj(n,e){if(n===e)return n;const t=ZL(n)&&ZL(e);if(t||QM(n)&&QM(e)){const r=t?n:Object.keys(n),i=r.length,s=t?e:Object.keys(e),o=s.length,a=t?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=t?u:s[u];(!t&&l.has(d)||t)&&n[d]===void 0&&e[d]===void 0?(a[d]=void 0,c++):(a[d]=Hj(n[d],e[d]),a[d]===n[d]&&n[d]!==void 0&&c++)}return i===o&&c===i?n:a}return e}function ZL(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function QM(n){if(!eD(n))return!1;const e=n.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!eD(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function eD(n){return Object.prototype.toString.call(n)==="[object Object]"}function ZZ(n){return new Promise(e=>{setTimeout(e,n)})}function eee(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?Hj(n,e):e}function tee(n,e,t=0){const r=[...n,e];return t&&r.length>t?r.slice(1):r}function nee(n,e,t=0){const r=[e,...n];return t&&r.length>t?r.slice(0,-1):r}var pR=Symbol();function Gj(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===pR?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}var nd,sc,jf,KF,ree=(KF=class extends Ew{constructor(){super();Sn(this,nd);Sn(this,sc);Sn(this,jf);qt(this,jf,e=>{if(!Tw&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){Se(this,sc)||this.setEventListener(Se(this,jf))}onUnsubscribe(){var e;this.hasListeners()||((e=Se(this,sc))==null||e.call(this),qt(this,sc,void 0))}setEventListener(e){var t;qt(this,jf,e),(t=Se(this,sc))==null||t.call(this),qt(this,sc,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){Se(this,nd)!==e&&(qt(this,nd,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof Se(this,nd)=="boolean"?Se(this,nd):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},nd=new WeakMap,sc=new WeakMap,jf=new WeakMap,KF),Wj=new ree,Bf,oc,zf,YF,iee=(YF=class extends Ew{constructor(){super();Sn(this,Bf,!0);Sn(this,oc);Sn(this,zf);qt(this,zf,e=>{if(!Tw&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){Se(this,oc)||this.setEventListener(Se(this,zf))}onUnsubscribe(){var e;this.hasListeners()||((e=Se(this,oc))==null||e.call(this),qt(this,oc,void 0))}setEventListener(e){var t;qt(this,zf,e),(t=Se(this,oc))==null||t.call(this),qt(this,oc,e(this.setOnline.bind(this)))}setOnline(e){Se(this,Bf)!==e&&(qt(this,Bf,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return Se(this,Bf)}},Bf=new WeakMap,oc=new WeakMap,zf=new WeakMap,YF),h1=new iee;function see(){let n,e;const t=new Promise((i,s)=>{n=i,e=s});t.status="pending",t.catch(()=>{});function r(i){Object.assign(t,i),delete t.resolve,delete t.reject}return t.resolve=i=>{r({status:"fulfilled",value:i}),n(i)},t.reject=i=>{r({status:"rejected",reason:i}),e(i)},t}function oee(n){return Math.min(1e3*2**n,3e4)}function $j(n){return(n??"online")==="online"?h1.isOnline():!0}var qj=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function uE(n){return n instanceof qj}function Xj(n){let e=!1,t=0,r=!1,i;const s=see(),o=_=>{var x;r||(m(new qj(_)),(x=n.abort)==null||x.call(n))},a=()=>{e=!0},l=()=>{e=!1},c=()=>Wj.isFocused()&&(n.networkMode==="always"||h1.isOnline())&&n.canRun(),u=()=>$j(n.networkMode)&&n.canRun(),d=_=>{var x;r||(r=!0,(x=n.onSuccess)==null||x.call(n,_),i==null||i(),s.resolve(_))},m=_=>{var x;r||(r=!0,(x=n.onError)==null||x.call(n,_),i==null||i(),s.reject(_))},g=()=>new Promise(_=>{var x;i=y=>{(r||c())&&_(y)},(x=n.onPause)==null||x.call(n)}).then(()=>{var _;i=void 0,r||(_=n.onContinue)==null||_.call(n)}),v=()=>{if(r)return;let _;const x=t===0?n.initialPromise:void 0;try{_=x??n.fn()}catch(y){_=Promise.reject(y)}Promise.resolve(_).then(d).catch(y=>{var L;if(r)return;const S=n.retry??(Tw?0:3),b=n.retryDelay??oee,A=typeof b=="function"?b(t,y):b,k=S===!0||typeof S=="number"&&t<S||typeof S=="function"&&S(t,y);if(e||!k){m(y);return}t++,(L=n.onFail)==null||L.call(n,t,y),ZZ(A).then(()=>c()?void 0:g()).then(()=>{e?m(y):v()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?v():g().then(v),s)}}var aee=n=>setTimeout(n,0);function lee(){let n=[],e=0,t=a=>{a()},r=a=>{a()},i=aee;const s=a=>{e?n.push(a):i(()=>{t(a)})},o=()=>{const a=n;n=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{t(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{t=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var qi=lee(),rd,QF,Kj=(QF=class{constructor(){Sn(this,rd)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),YZ(this.gcTime)&&qt(this,rd,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Tw?1/0:5*60*1e3))}clearGcTimeout(){Se(this,rd)&&(clearTimeout(Se(this,rd)),qt(this,rd,void 0))}},rd=new WeakMap,QF),Hf,id,co,sd,Ci,Fy,od,jo,el,JF,cee=(JF=class extends Kj{constructor(t){super();Sn(this,jo);Sn(this,Hf);Sn(this,id);Sn(this,co);Sn(this,sd);Sn(this,Ci);Sn(this,Fy);Sn(this,od);qt(this,od,!1),qt(this,Fy,t.defaultOptions),this.setOptions(t.options),this.observers=[],qt(this,sd,t.client),qt(this,co,Se(this,sd).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,qt(this,Hf,dee(this.options)),this.state=t.state??Se(this,Hf),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Se(this,Ci))==null?void 0:t.promise}setOptions(t){this.options={...Se(this,Fy),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Se(this,co).remove(this)}setData(t,r){const i=eee(this.state.data,t,this.options);return _i(this,jo,el).call(this,{data:i,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),i}setState(t,r){_i(this,jo,el).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var i,s;const r=(i=Se(this,Ci))==null?void 0:i.promise;return(s=Se(this,Ci))==null||s.cancel(t),r?r.then(Uo).catch(Uo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Se(this,Hf))}isActive(){return this.observers.some(t=>JZ(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pR||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>YM(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!QZ(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=Se(this,Ci))==null||r.continue()}onOnline(){var r;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=Se(this,Ci))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Se(this,co).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(Se(this,Ci)&&(Se(this,od)?Se(this,Ci).cancel({revert:!0}):Se(this,Ci).cancelRetry()),this.scheduleGc()),Se(this,co).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||_i(this,jo,el).call(this,{type:"invalidate"})}fetch(t,r){var u,d,m;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(Se(this,Ci))return Se(this,Ci).continueRetry(),Se(this,Ci).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(v=>v.options.queryFn);g&&this.setOptions(g.options)}const i=new AbortController,s=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(qt(this,od,!0),i.signal)})},o=()=>{const g=Gj(this.options,r),_=(()=>{const x={client:Se(this,sd),queryKey:this.queryKey,meta:this.meta};return s(x),x})();return qt(this,od,!1),this.options.persister?this.options.persister(g,_,this):g(_)},l=(()=>{const g={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:Se(this,sd),state:this.state,fetchFn:o};return s(g),g})();(u=this.options.behavior)==null||u.onFetch(l,this),qt(this,id,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&_i(this,jo,el).call(this,{type:"fetch",meta:(m=l.fetchOptions)==null?void 0:m.meta});const c=g=>{var v,_,x,y;uE(g)&&g.silent||_i(this,jo,el).call(this,{type:"error",error:g}),uE(g)||((_=(v=Se(this,co).config).onError)==null||_.call(v,g,this),(y=(x=Se(this,co).config).onSettled)==null||y.call(x,this.state.data,g,this)),this.scheduleGc()};return qt(this,Ci,Xj({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,abort:i.abort.bind(i),onSuccess:g=>{var v,_,x,y;if(g===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(g)}catch(S){c(S);return}(_=(v=Se(this,co).config).onSuccess)==null||_.call(v,g,this),(y=(x=Se(this,co).config).onSettled)==null||y.call(x,g,this.state.error,this),this.scheduleGc()},onError:c,onFail:(g,v)=>{_i(this,jo,el).call(this,{type:"failed",failureCount:g,error:v})},onPause:()=>{_i(this,jo,el).call(this,{type:"pause"})},onContinue:()=>{_i(this,jo,el).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),Se(this,Ci).start()}},Hf=new WeakMap,id=new WeakMap,co=new WeakMap,sd=new WeakMap,Ci=new WeakMap,Fy=new WeakMap,od=new WeakMap,jo=new WeakSet,el=function(t){const r=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...uee(i.data,this.options),fetchMeta:t.meta??null};case"success":return qt(this,id,void 0),{...i,data:t.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return uE(s)&&s.revert&&Se(this,id)?{...Se(this,id),fetchStatus:"idle"}:{...i,error:s,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=r(this.state),qi.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),Se(this,co).notify({query:this,type:"updated",action:t})})},JF);function uee(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$j(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function dee(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,r=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var pa,ZF,hee=(ZF=class extends Ew{constructor(e={}){super();Sn(this,pa);this.config=e,qt(this,pa,new Map)}build(e,t,r){const i=t.queryKey,s=t.queryHash??fR(i,t);let o=this.get(s);return o||(o=new cee({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){Se(this,pa).has(e.queryHash)||(Se(this,pa).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=Se(this,pa).get(e.queryHash);t&&(e.destroy(),t===e&&Se(this,pa).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){qi.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Se(this,pa).get(e)}getAll(){return[...Se(this,pa).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>QL(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>QL(e,r)):t}notify(e){qi.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){qi.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){qi.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},pa=new WeakMap,ZF),ma,Wi,ad,ga,ql,eU,fee=(eU=class extends Kj{constructor(t){super();Sn(this,ga);Sn(this,ma);Sn(this,Wi);Sn(this,ad);this.mutationId=t.mutationId,qt(this,Wi,t.mutationCache),qt(this,ma,[]),this.state=t.state||pee(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Se(this,ma).includes(t)||(Se(this,ma).push(t),this.clearGcTimeout(),Se(this,Wi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){qt(this,ma,Se(this,ma).filter(r=>r!==t)),this.scheduleGc(),Se(this,Wi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Se(this,ma).length||(this.state.status==="pending"?this.scheduleGc():Se(this,Wi).remove(this))}continue(){var t;return((t=Se(this,ad))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,a,l,c,u,d,m,g,v,_,x,y,S,b,A,k,L,C,P,R;const r=()=>{_i(this,ga,ql).call(this,{type:"continue"})};qt(this,ad,Xj({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(N,O)=>{_i(this,ga,ql).call(this,{type:"failed",failureCount:N,error:O})},onPause:()=>{_i(this,ga,ql).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Se(this,Wi).canRun(this)}));const i=this.state.status==="pending",s=!Se(this,ad).canStart();try{if(i)r();else{_i(this,ga,ql).call(this,{type:"pending",variables:t,isPaused:s}),await((a=(o=Se(this,Wi).config).onMutate)==null?void 0:a.call(o,t,this));const O=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));O!==this.state.context&&_i(this,ga,ql).call(this,{type:"pending",context:O,variables:t,isPaused:s})}const N=await Se(this,ad).start();return await((d=(u=Se(this,Wi).config).onSuccess)==null?void 0:d.call(u,N,t,this.state.context,this)),await((g=(m=this.options).onSuccess)==null?void 0:g.call(m,N,t,this.state.context)),await((_=(v=Se(this,Wi).config).onSettled)==null?void 0:_.call(v,N,null,this.state.variables,this.state.context,this)),await((y=(x=this.options).onSettled)==null?void 0:y.call(x,N,null,t,this.state.context)),_i(this,ga,ql).call(this,{type:"success",data:N}),N}catch(N){try{throw await((b=(S=Se(this,Wi).config).onError)==null?void 0:b.call(S,N,t,this.state.context,this)),await((k=(A=this.options).onError)==null?void 0:k.call(A,N,t,this.state.context)),await((C=(L=Se(this,Wi).config).onSettled)==null?void 0:C.call(L,void 0,N,this.state.variables,this.state.context,this)),await((R=(P=this.options).onSettled)==null?void 0:R.call(P,void 0,N,t,this.state.context)),N}finally{_i(this,ga,ql).call(this,{type:"error",error:N})}}finally{Se(this,Wi).runNext(this)}}},ma=new WeakMap,Wi=new WeakMap,ad=new WeakMap,ga=new WeakSet,ql=function(t){const r=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),qi.batch(()=>{Se(this,ma).forEach(i=>{i.onMutationUpdate(t)}),Se(this,Wi).notify({mutation:this,type:"updated",action:t})})},eU);function pee(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var rl,Bo,Uy,tU,mee=(tU=class extends Ew{constructor(e={}){super();Sn(this,rl);Sn(this,Bo);Sn(this,Uy);this.config=e,qt(this,rl,new Set),qt(this,Bo,new Map),qt(this,Uy,0)}build(e,t,r){const i=new fee({mutationCache:this,mutationId:++y0(this,Uy)._,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){Se(this,rl).add(e);const t=V0(e);if(typeof t=="string"){const r=Se(this,Bo).get(t);r?r.push(e):Se(this,Bo).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(Se(this,rl).delete(e)){const t=V0(e);if(typeof t=="string"){const r=Se(this,Bo).get(t);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&Se(this,Bo).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=V0(e);if(typeof t=="string"){const r=Se(this,Bo).get(t),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const t=V0(e);if(typeof t=="string"){const i=(r=Se(this,Bo).get(t))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){qi.batch(()=>{Se(this,rl).forEach(e=>{this.notify({type:"removed",mutation:e})}),Se(this,rl).clear(),Se(this,Bo).clear()})}getAll(){return Array.from(Se(this,rl))}find(e){const t={exact:!0,...e};return this.getAll().find(r=>JL(t,r))}findAll(e={}){return this.getAll().filter(t=>JL(e,t))}notify(e){qi.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return qi.batch(()=>Promise.all(e.map(t=>t.continue().catch(Uo))))}},rl=new WeakMap,Bo=new WeakMap,Uy=new WeakMap,tU);function V0(n){var e;return(e=n.options.scope)==null?void 0:e.id}function tD(n){return{onFetch:(e,t)=>{var u,d,m,g,v;const r=e.options,i=(m=(d=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:m.direction,s=((g=e.state.data)==null?void 0:g.pages)||[],o=((v=e.state.data)==null?void 0:v.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let _=!1;const x=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(e.signal.aborted?_=!0:e.signal.addEventListener("abort",()=>{_=!0}),e.signal)})},y=Gj(e.options,e.fetchOptions),S=async(b,A,k)=>{if(_)return Promise.reject();if(A==null&&b.pages.length)return Promise.resolve(b);const C=(()=>{const O={client:e.client,queryKey:e.queryKey,pageParam:A,direction:k?"backward":"forward",meta:e.options.meta};return x(O),O})(),P=await y(C),{maxPages:R}=e.options,N=k?nee:tee;return{pages:N(b.pages,P,R),pageParams:N(b.pageParams,A,R)}};if(i&&s.length){const b=i==="backward",A=b?gee:nD,k={pages:s,pageParams:o},L=A(r,k);a=await S(k,L,b)}else{const b=n??s.length;do{const A=l===0?o[0]??r.initialPageParam:nD(r,a);if(l>0&&A==null)break;a=await S(a,A),l++}while(l<b)}return a};e.options.persister?e.fetchFn=()=>{var _,x;return(x=(_=e.options).persister)==null?void 0:x.call(_,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=c}}}function nD(n,{pages:e,pageParams:t}){const r=e.length-1;return e.length>0?n.getNextPageParam(e[r],e,t[r],t):void 0}function gee(n,{pages:e,pageParams:t}){var r;return e.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,e[0],e,t[0],t):void 0}var ur,ac,lc,Gf,Wf,cc,$f,qf,nU,yee=(nU=class{constructor(n={}){Sn(this,ur);Sn(this,ac);Sn(this,lc);Sn(this,Gf);Sn(this,Wf);Sn(this,cc);Sn(this,$f);Sn(this,qf);qt(this,ur,n.queryCache||new hee),qt(this,ac,n.mutationCache||new mee),qt(this,lc,n.defaultOptions||{}),qt(this,Gf,new Map),qt(this,Wf,new Map),qt(this,cc,0)}mount(){y0(this,cc)._++,Se(this,cc)===1&&(qt(this,$f,Wj.subscribe(async n=>{n&&(await this.resumePausedMutations(),Se(this,ur).onFocus())})),qt(this,qf,h1.subscribe(async n=>{n&&(await this.resumePausedMutations(),Se(this,ur).onOnline())})))}unmount(){var n,e;y0(this,cc)._--,Se(this,cc)===0&&((n=Se(this,$f))==null||n.call(this),qt(this,$f,void 0),(e=Se(this,qf))==null||e.call(this),qt(this,qf,void 0))}isFetching(n){return Se(this,ur).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return Se(this,ac).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=Se(this,ur).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.defaultQueryOptions(n),t=Se(this,ur).build(this,e),r=t.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&t.isStaleByTime(YM(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(n){return Se(this,ur).findAll(n).map(({queryKey:e,state:t})=>{const r=t.data;return[e,r]})}setQueryData(n,e,t){const r=this.defaultQueryOptions({queryKey:n}),i=Se(this,ur).get(r.queryHash),s=i==null?void 0:i.state.data,o=KZ(e,s);if(o!==void 0)return Se(this,ur).build(this,r).setData(o,{...t,manual:!0})}setQueriesData(n,e,t){return qi.batch(()=>Se(this,ur).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=Se(this,ur).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=Se(this,ur);qi.batch(()=>
466{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=Se(this,ur);return qi.batch(()=>(t.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},e)))}cancelQueries(n,e={}){const t={revert:!0,...e},r=qi.batch(()=>Se(this,ur).findAll(n).map(i=>i.cancel(t)));return Promise.all(r).then(Uo).catch(Uo)}invalidateQueries(n,e={}){return qi.batch(()=>(Se(this,ur).findAll(n).forEach(t=>{t.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},e)))}refetchQueries(n,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},r=qi.batch(()=>Se(this,ur).findAll(n).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,t);return t.throwOnError||(s=s.catch(Uo)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Uo)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=Se(this,ur).build(this,e);return t.isStaleByTime(YM(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Uo).catch(Uo)}fetchInfiniteQuery(n){return n.behavior=tD(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Uo).catch(Uo)}ensureInfiniteQueryData(n){return n.behavior=tD(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return h1.isOnline()?Se(this,ac).resumePausedMutations():Promise.resolve()}getQueryCache(){return Se(this,ur)}getMutationCache(){return Se(this,ac)}getDefaultOptions(){return Se(this,lc)}setDefaultOptions(n){qt(this,lc,n)}setQueryDefaults(n,e){Se(this,Gf).set(Yg(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...Se(this,Gf).values()],t={};return e.forEach(r=>{Qg(n,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(n,e){Se(this,Wf).set(Yg(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...Se(this,Wf).values()],t={};return e.forEach(r=>{Qg(n,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...Se(this,lc).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=fR(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===pR&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...Se(this,lc).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){Se(this,ur).clear(),Se(this,ac).clear()}},ur=new WeakMap,ac=new WeakMap,lc=new WeakMap,Gf=new WeakMap,Wf=new WeakMap,cc=new WeakMap,$f=new WeakMap,qf=new WeakMap,nU),vee=M.createContext(void 0),xee=({client:n,children:e})=>(M.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(vee.Provider,{value:n,children:e}));/** 467 * @remix-run/router v1.23.0 468 * 469 * Copyright (c) Remix Software Inc. 470 * 471 * This source code is licensed under the MIT license found in the 472 * LICENSE.md file in the root directory of this source tree. 473 * 474 * @license MIT 475 */function Jg(){return Jg=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Jg.apply(this,arguments)}var hc;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(hc||(hc={}));const rD="popstate";function _ee(n){n===void 0&&(n={});function e(r,i){let{pathname:s,search:o,hash:a}=r.location;return JM("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function t(r,i){return typeof i=="string"?i:f1(i)}return See(e,t,null,n)}function Ir(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function Yj(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function wee(){return Math.random().toString(36).substr(2,8)}function iD(n,e){return{usr:n.state,key:n.key,idx:e}}function JM(n,e,t,r){return t===void 0&&(t=null),Jg({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof e=="string"?Ap(e):e,{state:t,key:e&&e.key||r||wee()})}function f1(n){let{pathname:e="/",search:t="",hash:r=""}=n;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ap(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substr(t),n=n.substr(0,t));let r=n.indexOf("?");r>=0&&(e.search=n.substr(r),n=n.substr(0,r)),n&&(e.pathname=n)}return e}function See(n,e,t,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=hc.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Jg({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=hc.Pop;let x=u(),y=x==null?null:x-c;c=x,l&&l({action:a,location:_.location,delta:y})}function m(x,y){a=hc.Push;let S=JM(_.location,x,y);c=u()+1;let b=iD(S,c),A=_.createHref(S);try{o.pushState(b,"",A)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(A)}s&&l&&l({action:a,location:_.location,delta:1})}function g(x,y){a=hc.Replace;let S=JM(_.location,x,y);c=u();let b=iD(S,c),A=_.createHref(S);o.replaceState(b,"",A),s&&l&&l({action:a,location:_.location,delta:0})}function v(x){let y=i.location.origin!=="null"?i.location.origin:i.location.href,S=typeof x=="str
475ing"?x:f1(x);return S=S.replace(/ $/,"%20"),Ir(y,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,y)}let _={get action(){return a},get location(){return n(i,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(rD,d),l=x,()=>{i.removeEventListener(rD,d),l=null}},createHref(x){return e(i,x)},createURL:v,encodeLocation(x){let y=v(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:m,replace:g,go(x){return o.go(x)}};return _}var sD;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(sD||(sD={}));function bee(n,e,t){return t===void 0&&(t="/"),Eee(n,e,t,!1)}function Eee(n,e,t,r){let i=typeof e=="string"?Ap(e):e,s=mR(i.pathname||"/",t);if(s==null)return null;let o=Qj(n);Tee(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=Oee(s);a=Dee(o[l],c,r)}return a}function Qj(n,e,t,r){e===void 0&&(e=[]),t===void 0&&(t=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Ir(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=bc([r,l.relativePath]),u=t.concat(l);s.children&&s.children.length>0&&(Ir(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Qj(s.children,e,u,c)),!(s.path==null&&!s.index)&&e.push({path:c,score:Iee(c,s.index),routesMeta:u})};return n.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of Jj(s.path))i(s,o,l)}),e}function Jj(n){let e=n.split("/");if(e.length===0)return[];let[t,...r]=e,i=t.endsWith("?"),s=t.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=Jj(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>n.startsWith("/")&&l===""?"/":l)}function Tee(n){n.sort((e,t)=>e.score!==t.score?t.score-e.score:Lee(e.routesMeta.map(r=>r.childrenIndex),t.routesMeta.map(r=>r.childrenIndex)))}const Mee=/^:[\w-]+$/,Aee=3,Cee=2,Ree=1,Pee=10,Nee=-2,oD=n=>n==="*";function Iee(n,e){let t=n.split("/"),r=t.length;return t.some(oD)&&(r+=Nee),e&&(r+=Cee),t.filter(i=>!oD(i)).reduce((i,s)=>i+(Mee.test(s)?Aee:s===""?Ree:Pee),r)}function Lee(n,e){return n.length===e.length&&n.slice(0,-1).every((r,i)=>r===e[i])?n[n.length-1]-e[e.length-1]:0}function Dee(n,e,t){let{routesMeta:r}=n,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=s==="/"?e:e.slice(s.length)||"/",d=aD({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),m=l.route;if(!d&&c&&t&&!r[r.length-1].route.index&&(d=aD({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 6,949 bytes, lines 475-484
475Object.assign(i,d.params),o.push({params:i,pathname:bc([s,d.pathname]),pathnameBase:jee(bc([s,d.pathnameBase])),route:m}),d.pathnameBase!=="/"&&(s=bc([s,d.pathnameBase]))}return o}function aD(n,e){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[t,r]=kee(n.path,n.caseSensitive,n.end),i=e.match(t);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:m,isOptional:g}=u;if(m==="*"){let _=a[d]||"";o=s.slice(0,s.length-_.length).replace(/(.)\/+$/,"$1")}const v=a[d];return g&&!v?c[m]=void 0:c[m]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:n}}function kee(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),Yj(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let r=[],i="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(r.push({paramName:"*"}),i+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?i+="\\/*$":n!==""&&n!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function Oee(n){try{return n.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Yj(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),n}}function mR(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,r=n.charAt(t);return r&&r!=="/"?null:n.slice(t)||"/"}function Fee(n,e){e===void 0&&(e="/");let{pathname:t,search:r="",hash:i=""}=typeof n=="string"?Ap(n):n;return{pathname:t?t.startsWith("/")?t:Uee(t,e):e,search:Bee(r),hash:zee(i)}}function Uee(n,e){let t=e.replace(/\/+$/,"").split("/");return n.split("/").forEach(i=>{i===".."?t.length>1&&t.pop():i!=="."&&t.push(i)}),t.length>1?t.join("/"):"/"}function dE(n,e,t,r){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Vee(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Zj(n,e){let t=Vee(n);return e?t.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase):t.map(r=>r.pathnameBase)}function eB(n,e,t,r){r===void 0&&(r=!1);let i;typeof n=="string"?i=Ap(n):(i=Jg({},n),Ir(!i.pathname||!i.pathname.includes("?"),dE("?","pathname","search",i)),Ir(!i.pathname||!i.pathname.includes("#"),dE("#","pathname","hash",i)),Ir(!i.search||!i.search.includes("#"),dE("#","search","hash",i)));let s=n===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=t;else{let d=e.length-1;if(!r&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),d-=1;i.pathname=m.join("/")}a=d>=0?e[d]:"/"}let l=Fee(i,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const bc=n=>n.join("/").replace(/\/\/+/g,"/"),jee=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Bee=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,zee=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Hee(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const tB=["post","put","patch","delete"];new Set(tB);const Gee=["get",...tB];new Set(Gee);/** 476 * React Router v6.30.1 477 * 478 * Copyright (c) Remix Software Inc. 479 * 480 * This source code is licensed under the MIT license found in the 481 * LICENSE.md file in the root directory of this source tree. 482 * 483 * @license MIT 484 */function Zg(){return Zg=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Zg.apply(this,arguments)}const gR=M.createContext(null),Wee=M.createContext(null),Ud=M.createContext(null),Mw=M.createContext(null),Zc=M.createContext({outlet:null,matches:[],isDataRoute:!1}),nB=M.createContext(null);function $ee(n,e){let{relative:t}=e===void 0?{}:e;Yy()||Ir(!1);let{basename:r,navigator:i}=M.useContext(Ud),{hash:s,pathname:o,search:a}=sB(n,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:bc([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Yy(){return M.useContext(Mw)!=null}function eu(){return Yy()||Ir(!1),M.useContext(Mw).location}function rB(n){M.useContext(Ud).static||M.useLayoutEffect(n)}function qee(){let{isDataRoute:n}=M.useContext(Zc);return n?ote():Xee()}function Xee(){Yy()||Ir(!1);let n=M.useContext(gR),{basename:e,future:t,navigator:r}=M.useContext(Ud),{matches:i}=M.useContext(Zc),{pathname:s}=eu(),o=JSON.stringify(Zj(i,t.v7_relativeSplatPath)),a=M.useRef(!1);return rB(()=>{a.current=!0}),M.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=eB(c,JSON.parse(o),s,u.relative==="path");n==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:bc([e,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[e,r,o,s,n])}function iB(){let{matches:n}=M.useContext(Zc),e=n[n.length-1];return e?e.params:{}}function sB(n,e){let{relative:t}=e===void 0?{}:e,{future:r}=M.useContext(Ud),{matches:i}=M.useContext(Zc),{pathname:s}=eu(),o=JSON.stringify(Zj(i,r.v7_relativeSplatPath));return M.useMemo(()=>eB(n,JSON.parse(o),s,t==="path"),[n,o,s,t])}function Kee(n,e){return Yee(n,e)}function Yee(n,e,t,r){Yy()||Ir(!1);let{navigator:i}=M.useContext(Ud),{matches:s}=M.useContext(Zc),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=eu(),u;if(e){var d;let x=typeof e=="string"?Ap(e):e;l==="/"||(d=x.pathname)!=null&&d.startsWith(l)||Ir(!1),u=x}else u=c;let m=u.pathname||"/",g=m;if(l!=="/"){let x=l.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(x.length).join("/")}let v=bee(n,{pathname:g}),_=tte(v&&v.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:bc([l,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:bc([l,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,t,r);return e&&_?M.createElement(Mw.Provider,{value:{location:Zg({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:hc.Pop}},_):_}function Qee(){let n=ste(),e=Hee(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application
484Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},e),t?M.createElement("pre",{style:i},t):null,null)}const Jee=M.createElement(Qee,null);class Zee extends M.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?M.createElement(Zc.Provider,{value:this.props.routeContext},M.createElement(nB.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ete(n){let{routeContext:e,match:t,children:r}=n,i=M.useContext(gR);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),M.createElement(Zc.Provider,{value:e},r)}function tte(n,e,t,r){var i;if(e===void 0&&(e=[]),t===void 0&&(t=null),r===void 0&&(r=null),n==null){var s;if(!t)return null;if(t.errors)n=t.matches;else if((s=r)!=null&&s.v7_partialHydration&&e.length===0&&!t.initialized&&t.matches.length>0)n=t.matches;else return null}let o=n,a=(i=t)==null?void 0:i.errors;if(a!=null){let u=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||Ir(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(t&&r&&r.v7_partialHydration)for(let u=0;u<o.length;u++){let d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:m,errors:g}=t,v=d.route.loader&&m[d.route.id]===void 0&&(!g||g[d.route.id]===void 0);if(d.route.lazy||v){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,d,m)=>{let g,v=!1,_=null,x=null;t&&(g=a&&d.route.id?a[d.route.id]:void 0,_=d.route.errorElement||Jee,l&&(c<0&&m===0?(v=!0,x=null):c===m&&(v=!0,x=d.route.hydrateFallbackElement||null)));let y=e.concat(o.slice(0,m+1)),S=()=>{let b;return g?b=_:v?b=x:d.route.Component?b=M.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=u,M.createElement(ete,{match:d,routeContext:{outlet:u,matches:y,isDataRoute:t!=null},children:b})};return t&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?M.createElement(Zee,{location:t.location,revalidation:t.revalidation,component:_,error:g,children:S(),routeC
vendor: 4,466 bytes, lines 484-493
484ontext:{outlet:null,matches:y,isDataRoute:!0}}):S()},null)}var oB=function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n}(oB||{}),p1=function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n}(p1||{});function nte(n){let e=M.useContext(gR);return e||Ir(!1),e}function rte(n){let e=M.useContext(Wee);return e||Ir(!1),e}function ite(n){let e=M.useContext(Zc);return e||Ir(!1),e}function aB(n){let e=ite(),t=e.matches[e.matches.length-1];return t.route.id||Ir(!1),t.route.id}function ste(){var n;let e=M.useContext(nB),t=rte(p1.UseRouteError),r=aB(p1.UseRouteError);return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function ote(){let{router:n}=nte(oB.UseNavigateStable),e=aB(p1.UseNavigateStable),t=M.useRef(!1);return rB(()=>{t.current=!0}),M.useCallback(function(i,s){s===void 0&&(s={}),t.current&&(typeof i=="number"?n.navigate(i):n.navigate(i,Zg({fromRouteId:e},s)))},[n,e])}function ate(n,e){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function ni(n){Ir(!1)}function lte(n){let{basename:e="/",children:t=null,location:r,navigationType:i=hc.Pop,navigator:s,static:o=!1,future:a}=n;Yy()&&Ir(!1);let l=e.replace(/^\/*/,"/"),c=M.useMemo(()=>({basename:l,navigator:s,static:o,future:Zg({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Ap(r));let{pathname:u="/",search:d="",hash:m="",state:g=null,key:v="default"}=r,_=M.useMemo(()=>{let x=mR(u,l);return x==null?null:{location:{pathname:x,search:d,hash:m,state:g,key:v},navigationType:i}},[l,u,d,m,g,v,i]);return _==null?null:M.createElement(Ud.Provider,{value:c},M.createElement(Mw.Provider,{children:t,value:_}))}function cte(n){let{children:e,location:t}=n;return Kee(ZM(e),t)}new Promise(()=>{});function ZM(n,e){e===void 0&&(e=[]);let t=[];return M.Children.forEach(n,(r,i)=>{if(!M.isValidElement(r))return;let s=[...e,i];if(r.type===M.Fragment){t.push.apply(t,ZM(r.props.children,s));return}r.type!==ni&&Ir(!1),!r.props.index||!r.props.children||Ir(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=ZM(r.props.children,s)),t.push(o)}),t}/** 485 * React Router DOM v6.30.1 486 * 487 * Copyright (c) Remix Software Inc. 488 * 489 * This source code is licensed under the MIT license found in the 490 * LICENSE.md file in the root directory of this source tree. 491 * 492 * @license MIT 493 */function eA(){return eA=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},eA.apply(this,arguments)}function ute(n,e){if(n==null)return{};var t={},r=Object.keys(n),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(t[i]=n[i]);return t}function dte(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function hte(n,e){return n.button===0&&(!e||e==="_self")&&!dte(n)}const fte=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],pte="6";try{window.__reactRouterVersion=pte}catch{}const mte="startTransition",lD=KC[mte];function gte(n){let{basename:e,children:t,future:r,window:i}=n,s=M.useRef();s.current==null&&(s.current=_ee({window:i,v5Compat:!0}));let o=s.current,[a,l]=M.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=M.useCallback(d=>{c&&lD?lD(()=>l(d)):l(d)},[l,c]);return M.useLayoutEffect(()=>o.listen(u),[o,u]),M.useEffect(()=>ate(r),[r]),M.createElement(lte,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:o,future:r})}const yte=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vte=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wr=M.forwardRef(function(e,t){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}
493=e,m=ute(e,fte),{basename:g}=M.useContext(Ud),v,_=!1;if(typeof c=="string"&&vte.test(c)&&(v=c,yte))try{let b=new URL(window.location.href),A=c.startsWith("//")?new URL(b.protocol+c):new URL(c),k=mR(A.pathname,g);A.origin===b.origin&&k!=null?c=k+A.search+A.hash:_=!0}catch{}let x=$ee(c,{relative:i}),y=xte(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:d});function S(b){r&&r(b),b.defaultPrevented||y(b)}return M.createElement("a",eA({},m,{href:v||x,onClick:_||s?r:S,ref:t,target:l}))});var cD;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(cD||(cD={}));var uD;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(uD||(uD={}));function xte(n,e){let{target:t,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=e===void 0?{}:e,l=qee(),c=eu(),u=sB(n,{relative:o});return M.useCallback(d=>{if(hte(d,t)){d.preventDefault();let m=r!==void 0?r:f1(c)===f1(u);l(n,{replace:m,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[c,l,u,r,i,t,n,s,o,a])}const yR=M.createContext({});function vR(n){const e=M.useRef(null);return e.current===null&&(e.current=n()),e.current}const lB=typeof window<"u",cB=lB?M.useLayoutEffect:M.useEffect,Aw=M.createContext(null);function xR(n,e){n.indexOf(e)===-1&&n.push(e)}function _R(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}const ka=(n,e,t)=>t>e?e:t<n?n:t;let Cw=()=>{},ip=()=>{};const xl={},uB=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function dB(n){return typeof n=="object"&&n!==null}const hB=n=>/^0[^.\s]+$/u.test(n);function wR(n){let e;return()=>(e===void 0&&(e=n()),e)}const xo=n=>n,_te=(n,e)=>t=>e(n(t)),Qy=(...n)=>n.reduce(_te),ey=(n,e,t)=>{const r=e-n;return r===0?1:(t-n)/r};class SR{constructor(){this.subscriptions=[]}add(e){return xR(this.subscriptions,e),()=>_R(this.subscriptions,e)}notify(e,t,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,t,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(e,t,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ea=n=>n*1e3,yo=n=>n/1e3;function fB(n,e){return e?n*(1e3/e):0}const pB=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,wte=1e-7,Ste=12;function bte(n,e,t,r,i){let s,o,a=0;do o=e+(t-e)/2,s=pB(o,r,i)-n,s>0?t=o:e=o;while(Math.abs(s)>wte&&++a<Ste);return o}function Jy(n,e,t,r){if(n===e&&t===r)return xo;const i=s=>bte(s,0,1,n,t);return s=>s===0||s===1?s:pB(i(s),e,r)}const mB=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,gB=n=>e=>1-n(1-e),yB=Jy(.33,1.53,.69,.99),bR=gB(yB),vB=mB(bR),xB=n=>(n*=2)<1?.5*bR(n):.5*(2-Math.pow(2,-10*(n-1))),ER=n=>1-Math.sin(Math.acos(n)),_B=gB(ER),wB=mB(ER),Ete=Jy(.42,0,1,1),Tte=Jy(0,0,.58,1),SB=Jy(.42,0,.58,1),Mte=n=>Array.isArray(n)&&typeof n[0]!="number",bB=n=>Array.isArray(n)&&typeof n[0]=="number",dD={linear:xo,easeIn:Ete,easeInOut:SB,easeOut:Tte,circIn:ER,circInOut:wB,circOut:_B,backIn:bR,backInOut:vB,backOut:yB,anticipate:xB},Ate=n=>typeof n=="string",hD=n=>{if(bB(n)){ip(n.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,t,r,i]=n;return Jy(e,t,r,i)}else if(Ate(n))return ip(dD[n]!==void 0,`Invalid easing type '${n}'`,"invalid-easing-type"),dD[n];return n},j0=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],fD={value:null,addProjectionMetrics:null};function Cte(n,e){let t=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){o.has(d)&&(u.schedule(d),n()),l++,d(a)}const u={schedule:(d,m=!1,g=!1)=>{const _=g&&i?t:r;return m&&o.add(d),_.has(d)||_.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(a=d,i){s=!0;return}i=!0,[t,r]=[r,t],t.forEach(c),e&&fD.value&&fD.value.frameloop[e].push(l),l=0,t.clear(),i=!1,s&&(s=!1,u.process(d))}};return u}const Rte=40;function EB(n,e){let t=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>t=!0,o=j0.reduce((b,A)=>(b[A]=Cte(s,e?A:void 0),b),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:m,render:g,postRender:v}=o,_=()=>{const b=xl.useManualTiming?i.timestamp:performance.now();t=!1,xl.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(b-i.timestamp,Rte),1)),i.timestamp=b,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),m.process(i),g.process(i),v.process(i),i.isProcessing=!1,t&&e&&(r=!1,n(_))},x=()=>{t=!0,r=!0,i.isProcessing||n(_)};return{schedule:j0.reduce((b,A)=>{const k=o[A];return b[A]=(L,C=!1,P=!1)=>(t||x(),k.schedule(L,C,P)),b},{}),cancel:b=>{for(let A=0;A<j0.length;
vendor: 14,768 bytes, line 493
493A++)o[j0[A]].cancel(b)},state:i,steps:o}}const{schedule:Hn,cancel:Vc,state:ii,steps:hE}=EB(typeof requestAnimationFrame<"u"?requestAnimationFrame:xo,!0);let d_;function Pte(){d_=void 0}const Qi={now:()=>(d_===void 0&&Qi.set(ii.isProcessing||xl.useManualTiming?ii.timestamp:performance.now()),d_),set:n=>{d_=n,queueMicrotask(Pte)}},TB=n=>e=>typeof e=="string"&&e.startsWith(n),MB=TB("--"),Nte=TB("var(--"),TR=n=>Nte(n)?Ite.test(n.split("/*")[0].trim()):!1,Ite=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function pD(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Cp={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},ty={...Cp,transform:n=>ka(0,1,n)},B0={...Cp,default:1},mg=n=>Math.round(n*1e5)/1e5,MR=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Lte(n){return n==null}const Dte=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,AR=(n,e)=>t=>!!(typeof t=="string"&&Dte.test(t)&&t.startsWith(n)||e&&!Lte(t)&&Object.prototype.hasOwnProperty.call(t,e)),AB=(n,e,t)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(MR);return{[n]:parseFloat(i),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},kte=n=>ka(0,255,n),fE={...Cp,transform:n=>Math.round(kte(n))},Ku={test:AR("rgb","red"),parse:AB("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:r=1})=>"rgba("+fE.transform(n)+", "+fE.transform(e)+", "+fE.transform(t)+", "+mg(ty.transform(r))+")"};function Ote(n){let e="",t="",r="",i="";return n.length>5?(e=n.substring(1,3),t=n.substring(3,5),r=n.substring(5,7),i=n.substring(7,9)):(e=n.substring(1,2),t=n.substring(2,3),r=n.substring(3,4),i=n.substring(4,5),e+=e,t+=t,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const tA={test:AR("#"),parse:Ote,transform:Ku.transform},Zy=n=>({test:e=>typeof e=="string"&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),Xl=Zy("deg"),Ta=Zy("%"),lt=Zy("px"),Fte=Zy("vh"),Ute=Zy("vw"),mD={...Ta,parse:n=>Ta.parse(n)/100,transform:n=>Ta.transform(n*100)},df={test:AR("hsl","hue"),parse:AB("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:r=1})=>"hsla("+Math.round(n)+", "+Ta.transform(mg(e))+", "+Ta.transform(mg(t))+", "+mg(ty.transform(r))+")"},Cr={test:n=>Ku.test(n)||tA.test(n)||df.test(n),parse:n=>Ku.test(n)?Ku.parse(n):df.test(n)?df.parse(n):tA.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Ku.transform(n):df.transform(n),getAnimatableNone:n=>{const e=Cr.parse(n);return e.alpha=0,Cr.transform(e)}},Vte=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function jte(n){var e,t;return isNaN(n)&&typeof n=="string"&&(((e=n.match(MR))==null?void 0:e.length)||0)+(((t=n.match(Vte))==null?void 0:t.length)||0)>0}const CB="number",RB="color",Bte="var",zte="var(",gD="${}",Hte=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ny(n){const e=n.toString(),t=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=e.replace(Hte,l=>(Cr.test(l)?(r.color.push(s),i.push(RB),t.push(Cr.parse(l))):l.startsWith(zte)?(r.var.push(s),i.push(Bte),t.push(l)):(r.number.push(s),i.push(CB),t.push(parseFloat(l))),++s,gD)).split(gD);return{values:t,split:a,indexes:r,types:i}}function PB(n){return ny(n).values}function NB(n){const{split:e,types:t}=ny(n),r=e.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=e[o],i[o]!==void 0){const a=t[o];a===CB?s+=mg(i[o]):a===RB?s+=Cr.transform(i[o]):s+=i[o]}return s}}const Gte=n=>typeof n=="number"?0:Cr.test(n)?Cr.getAnimatableNone(n):n;function Wte(n){const e=PB(n);return NB(n)(e.map(Gte))}const jc={test:jte,parse:PB,createTransformer:NB,getAnimatableNone:Wte};function pE(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function $te({hue:n,saturation:e,lightness:t,alpha:r}){n/=360,e/=100,t/=100;let i=0,s=0,o=0;if(!e)i=s=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;i=pE(l,a,n+1/3),s=pE(l,a,n),o=pE(l,a,n-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function m1(n,e){return t=>t>0?e:n}const nr=(n,e,t)=>n+(e-n)*t,mE=(n,e,t)=>{const r=n*n,i=t*(e*e-r)+r;return i<0?0:Math.sqrt(i)},qte=[tA,Ku,df],Xte=n=>qte.find(e=>e.test(n));function yD(n){const e=Xte(n);if(Cw(!!e,`'${n}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let t=e.parse(n);return e===df&&(t=$te(t)),t}const vD=(n,e)=>{const t=yD(n),r=yD(e);if(!t||!r)return m1(n,e);const i={...t};return s=>(i.red=mE(t.red,r.red,s),i.green=mE(t.green,r.green,s),i.blue=mE(t.blue,r.blue,s),i.alpha=nr(t.alpha,r.alpha,s),Ku.transform(i))},nA=new Set(["none","hidden"]);function Kte(n,e){return nA.has(n)?t=>t<=0?n:e:t=>t>=1?e:n}function Yte(n,e){return t=>nr(n,e,t)}function CR(n){return typeof n=="number"?Yte:typeof n=="string"?TR(n)?m1:Cr.test(n)?vD:Zte:Array.isArray(n)?IB:typeof n=="object"?Cr.test(n)?vD:Qte:m1}function IB(n,e){const t=[...n],r=t.length,i=n.map((s,o)=>CR(s)(s,e[o]));return s=>{for(let o=0;o<r;o++)t[o]=i[o](s);return t}}function Qte(n,e){const t={...n,...e},r={};for(const i in t)n[i]!==void 0&&e[i]!==void 0&&(r[i]=CR(n[i])(n[i],e[i]));return i=>{for(const s in r)t[s]=r[s](i);return t}}function Jte(n,e){const t=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],o=n.indexes[s][r[s]],a=n.values[o]??0;t[i]=a,r[s]++}return t}const Zte=(n,e)=>{const t=jc.createTransformer(e),r=ny(n),i=ny(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?nA.has(n)&&!i.values.length||nA.has(e)&&!r.values.length?Kte(n,e):Qy(IB(Jte(r,i),i.values),t):(Cw(!0,`Complex values '${n}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),m1(n,e))};function LB(n,e,t){return typeof n=="number"&&typeof e=="number"&&typeof t=="number"?nr(n,e,t):CR(n)(n,e)}const ene=n=>{const e=({timestamp:t})=>n(t);return{start:(t=!0)=>Hn.update(e,t),stop:()=>Vc(e),now:()=>ii.isProcessing?ii.timestamp:Qi.now()}},DB=(n,e,t=10)=>{let r="";const i=Math.max(Math.round(e/t),2);for(let s=0;s<i;s++)r+=Math.round(n(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},g1=2e4;function RR(n){let e=0;const t=50;let r=n.next(e);for(;!r.done&&e<g1;)e+=t,r=n.next(e);return e>=g1?1/0:e}function tne(n,e=100,t){const r=t({...n,keyframes:[0,e]}),i=Math.min(RR(r),g1);return{type:"keyframes",ease:s=>r.next(i*s).value/e,duration:yo(i)}}const nne=5;function kB(n,e,t){const r=Math.max(e-nne,0);return fB(t-n(r),e-r)}const er={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},gE=.001;function rne({duration:n=er.duration,bounce:e=er.bounce,velocity:t=er.velocity,mass:r=er.mass}){let i,s;Cw(n<=Ea(er.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=ka(er.minDamping,er.maxDamping,o),n=ka(er.minDuration,er.maxDuration,yo(n)),o<1?(i=c=>{const u=c*o,d=u*n,m=u-t,g=rA(c,o),v=Math.exp(-d);return gE-m/g*v},s=c=>{const d=c*o*n,m=d*t+t,g=Math.pow(o,2)*Math.pow(c,2)*n,v=Math.exp(-d),_=rA(Math.pow(c,2),o);return(-i(c)+gE>0?-1:1)*((m-g)*v)/_}):(i=c=>{const u=Math.exp(-c*n),d=(c-t)*n+1;return-gE+u*d},s=c=>{const u=Math.exp(-c*n),d=(t-c)*(n*n);return u*d});const a=5/n,l=sne(i,s,a);if(n=Ea(n),isNaN(l))return{stiffness:er.stiffness,damping:er.damping,duration:n};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:n}}}const ine=12;function sne(n,e,t){let r=t;for(let i=1;i<ine;i++)r=r-n(r)/e(r);return r}function rA(n,e){return n*Math.sqrt(1-e*e)}const one=["duration","bounce"],ane=["stiffness","damping","mass"];function xD(n,e){return e.some(t=>n[t]!==void 0)}function lne(n){let e={velocity:er.velocity,stiffness:er.stiffness,damping:er.damping,mass:er.mass,isResolvedFromDuration:!1,...n};if(!xD(n,ane)&&xD(n,one))if(n.visualDuration){const t=n.visualDuration,r=2*Math.PI/(t*1.2),i=r*r,s=2*ka(.05,1,1-(n.bounce||0))*Math.sqrt(i);e={...e,mass:er.mass,stiffness:i,damping:s}}else{const t=rne(n);e={...e,...t,mass:er.mass},e.isResolvedFromDuration=!0}return e}function y1(n=er.visualDuration,e=er.bounce){const t=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:e}:n;let{restSpeed:r,restDelta:i}=t;const s=t.keyframes[0],o=t.keyframes[t.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:m,isResolvedFromDuration:g}=lne({...t,velocity:-yo(t.velocity||0)}),v=m||0,_=c/(2*Math.sqrt(l*u)),x=o-s,y=yo(Math.sqrt(l/u)),S=Math.abs(x)<5;r||(r=S?er.restSpeed.granular:er.restSpeed.default),i||(i=S?er.restDelta.granular:er.restDelta.default);let b;if(_<1){const k=rA(y,_);b=L=>{const C=Math.exp(-_*y*L);return o-C*((v+_*y*x)/k*Math.sin(k*L)+x*Math.cos(k*L))}}else if(_===1)b=k=>o-Math.exp(-y*k)*(x+(v+y*x)*k);else{const k=y*Math.sqrt(_*_-1);b=L=>{const C=Math.exp(-_*y*L),P=Math.min(k*L,300);return o-C*((v+_*y*x)*Math.sinh(P)+k*x*Math.cosh(P))/k}}const A={calculatedDuration:g&&d||null,next:k=>{const L=b(k);if(g)a.done=k>=d;else{let C=k===0?v:0;_<1&&(C=k===0?Ea(v):kB(b,k,L));const P=Math.abs(C)<=r,R=Math.abs(o-L)<=i;a.done=P&&R}return a.value=a.done?o:L,a},toString:()=>{const k=Math.min(RR(A),g1),L=DB(C=>A.next(k*C).value,k,30);return k+"ms "+L},toTransition:()=>{}};return A}y1.applyToOptions=n=>{const e=tne(n,100,y1);return n.ease=e.ease,n.duration=Ea(e.duration),n.type="keyframes",n};function iA({keyframes:n,velocity:e=0,power:t=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=n[0],m={done:!1,value:d},g=P=>a!==void 0&&P<a||l!==void 0&&P>l,v=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let _=t*e;const x=d+_,y=o===void 0?x:o(x);y!==x&&(_=y-d);const S=P=>-_*Math.exp(-P/r),b=P=>y+S(P),A=P=>{const R=S(P),N=b(P);m.done=Math.abs(R)<=c,m.value=m.done?y:N};let k,L;const C=P=>{g(m.value)&&(k=P,L=y1({keyframes:[m.value,v(m.value)],velocity:kB(b,P,m.value),damping:i,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:P=>{let R=!1;return!L&&k===void 0&&(R=!0,A(P),C(P)),k!==void 0&&P>=k?L.next(P-k):(!R&&A(P),m)}}}function cne(n,e,t){const r=[],i=t||xl.mix||LB,s=n.length-1;for(let o=0;o<s;o++){let a=i(n[o],n[o+1]);if(e){const l=Array.isArray(e)?e[o]||xo:e;a=Qy(l,a)}r.push(a)}return r}function une(n,e,{clamp:t=!0,ease:r,mixer:i}={}){const s=n.length;if(ip(s===e.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const o=n[0]===n[1];n[0]>n[s-1]&&(n=[...n].reverse(),e=[...e].reverse());const a=cne(e,r,i),l=a.length,c=u=>{if(o&&u<n[0])return e[0];let d=0;if(l>1)for(;d<n.length-2&&!(u<n[d+1]);d++);const m=ey(n[d],n[d+1],u);return a[d](m)};return t?u=>c(ka(n[0],n[s-1],u)):c}function dne(n,e){const t=n[n.length-1];for(let r=1;r<=e;r++){const i=ey(0,e,r);n.push(nr(t,1,i))}}function hne(n){const e=[0];return dne(e,n.length-1),e}function fne(n,e){return n.map(t=>t*e)}function pne(n,e){return n.map(()=>e||SB).splice(0,n.length-1)}function gg({duration:n=300,keyframes:e,times:t,ease:r="easeInOut"}){const i=Mte(r)?r.map(hD):hD(r),s={done:!1,value:e[0]},o=fne(t&&t.length===e.length?t:hne(e),n),a=une(o,e,{ease:Array.isArray(i)?i:pne(e,i)});return{calculatedDuration:n,next:l=>(s.value=a(l),s.done=l>=n,s)}}const mne=n=>n!==null;function PR(n,{repeat:e,repeatType:t="loop"},r,i=1){const s=n.filter(mne),a=i<0||e&&t!=="loop"&&e%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const gne={decay:iA,inertia:iA,tween:gg,keyframes:gg,spring:y1};function OB(n){typeof n.type=="string"&&(n.type=gne[n.type])}class NR{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const yne=n=>n/100;class IR extends NR{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:t}=this.options;t&&t.updatedAt!==Qi.now()&&this.tick(Qi.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;OB(e);const{type:t=gg,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=e;let{keyframes:a}=e;const l=t||gg;l!==gg&&typeof a[0]!="number"&&(this.mixKeyframes=Qy(yne,LB(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=RR(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=c}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:m,repeatDelay:g,type:v,onUpdate:_,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let b=this.currentTime,A=r;if(d){const P=Math.min(this.currentTime,i)/a;let R=Math.floor(P),N=P%1;!N&&P>=1&&(N=1),N===1&&R--,R=Math.min(R,d+1),!!(R%2)&&(m==="reverse"?(N=1-N,g&&(N-=g/a)):m==="mirror"&&(A=o)),b=ka(0,1,N)*a}const k=S?{done:!1,value:u[0]}:A.next(b);s&&(k.value=s(k.value));let{done:L}=k;!S&&l!==null&&(L=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return C&&v!==iA&&(k.value=PR(u,this.options,x,this.speed)),_&&_(k.value),C&&this.finish(),
493k}then(e,t){return this.finished.then(e,t)}get duration(){return yo(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+yo(e)}get time(){return yo(this.currentTime)}set time(e){var t;e=Ea(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(t=this.driver)==null||t.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Qi.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=yo(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:e=ene,startTime:t}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=t??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Qi.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",(t=(e=this.options).onComplete)==null||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(t=(e=this.options).onCancel)==null||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(t=this.driver)==null||t.stop(),e.observe(this)}}function vne(n){for(let e=1;e<n.length;e++)n[e]??(n[e]=n[e-1])}const Yu=n=>n*180/Math.PI,sA=n=>{const e=Yu(Math.atan2(n[1],n[0]));return oA(e)},xne={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:sA,rotateZ:sA,skewX:n=>Yu(Math.atan(n[1])),skewY:n=>Yu(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},oA=n=>(n=n%360,n<0&&(n+=360),n),_D=sA,wD=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),SD=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),_ne={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:wD,scaleY:SD,scale:n=>(wD(n)+SD(n))/2,rotateX:n=>oA(Yu(Math.atan2(n[6],n[5]))),rotateY:n=>oA(Yu(Math.atan2(-n[2],n[0]))),rotateZ:_D,rotate:_D,skewX:n=>Yu(Math.atan(n[4])),skewY:n=>Yu(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function aA(n){return n.includes("scale")?1:0}function lA(n,e){if(!n||n==="none")return aA(e);const t=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(t)r=_ne,i=t;else{const a=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=xne,i=a}if(!i)return aA(e);const s=r[e],o=i[1].split(",").map(Sne);return typeof s=="function"?s(o):o[s]}const wne=(n,e)=>{const{transform:t="none"}=getComputedStyle(n);return lA(t,e)};function Sne(n){return parseFloat(n.trim())}const Rp=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pp=new Set(Rp),bD=n=>n===Cp||n===lt,bne=new Set(["x","y","z"]),Ene=Rp.filter(n=>!bne.has(n));function Tne(n){const e=[];return Ene.forEach(t=>{const r=n.getValue(t);r!==void 0&&(e.push([t,r.get()]),r.set(t.startsWith("scale")?1:0))}),e}const fc={width:({x:n},{paddingLeft:e="0",paddingRight:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),height:({y:n},{paddingTop:e="0",paddingBottom:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),top:(n,{top:e})=>parseFloat(e),left:(n,{left:e})=>parseFloat(e),bottom:({y:n},{top:e})=>parseFloat(e)+(n.max-n.min),right:({x:n},{left:e})=>parseFloat(e)+(n.max-n.min),x:(n,{transform:e})=>lA(e,"x"),y:(n,{transform:e})=>lA(e,"y")};fc.translateX=fc.x;fc.translateY=fc.y;const dd=new Set;let cA=!1,uA=!1,dA=!1;function FB(){if(uA){const n=Array.from(dd).filter(r=>r.needsMeasurement),e=new Set(n.map(r=>r.element)),t=new Map;e.forEach(r=>{const i=Tne(r);i.length&&(t.set(r,i),r.render())}
vendor: 6,360 bytes, line 493
493),n.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=t.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),n.forEach(r=>r.measureEndState()),n.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}uA=!1,cA=!1,dd.forEach(n=>n.complete(dA)),dd.clear()}function UB(){dd.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(uA=!0)})}function Mne(){dA=!0,UB(),FB(),dA=!1}class LR{constructor(e,t,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(dd.add(this),cA||(cA=!0,Hn.read(UB),Hn.resolveKeyframes(FB))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:r,motionValue:i}=this;if(e[0]===null){const s=i==null?void 0:i.get(),o=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&t){const a=r.readValue(t,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&s===void 0&&i.set(e[0])}vne(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),dd.delete(this)}cancel(){this.state==="scheduled"&&(dd.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ane=n=>n.startsWith("--");function Cne(n,e,t){Ane(e)?n.style.setProperty(e,t):n.style[e]=t}const Rne=wR(()=>window.ScrollTimeline!==void 0),Pne={};function Nne(n,e){const t=wR(n);return()=>Pne[e]??t()}const VB=Nne(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Km=([n,e,t,r])=>`cubic-bezier(${n}, ${e}, ${t}, ${r})`,ED={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Km([0,.65,.55,1]),circOut:Km([.55,0,1,.45]),backIn:Km([.31,.01,.66,-.59]),backOut:Km([.33,1.53,.69,.99])};function jB(n,e){if(n)return typeof n=="function"?VB()?DB(n,e):"ease-out":bB(n)?Km(n):Array.isArray(n)?n.map(t=>jB(t,e)||ED.easeOut):ED[n]}function Ine(n,e,t,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:t};l&&(u.offset=l);const d=jB(a,i);Array.isArray(d)&&(u.easing=d);const m={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return c&&(m.pseudoElement=c),n.animate(u,m)}function BB(n){return typeof n=="function"&&"applyToOptions"in n}function Lne({type:n,...e}){return BB(n)&&VB()?n.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Dne extends NR{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=e,ip(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Lne(e);this.animation=Ine(t,r,i,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=PR(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Cne(t,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;(t=(e=this.animation).finish)==null||t.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t;this.isPseudoElement||(t=(e=this.animation).commitStyles)==null||t.call(e)}get duration(){var t,r;const e=((r=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:r.call(t).duration)||0;return yo(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+yo(e)}get time(){return yo(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ea(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Rne()?(this.animation.timeline=e,xo):t(this)}}const zB={anticipate:xB,backInOut:vB,circInOut:wB};function kne(n){return n in zB}function One(n){typeof n.ease=="string"&&kne(n.ease)&&(n.ease=zB[n.ease])}const yE=10;class Fne extends Dne{constructor(e){One(e),OB(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}const a=new IR({...o,autoplay:!1}),l=Math.max(yE,Qi.now()-this.startTime),c=ka(0,yE,l-yE);t.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const TD=(n,e)=>e==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(jc.test(n)||n==="0")&&!n.startsWith("url("));function Une(n){const e=n[0];if(n.length===1)return!0;for(let t=0;t<n.length;t++)if(n[t]!==e)return!0}function Vne(n,e,t,r){const i=n[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const s=n[n.length-1],o=TD(i,e),a=TD(s,e);return Cw(o===a,`You are trying to animate ${e} from "${i}" to "${s}". "${o?s:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Une(n)||(t==="spring"||BB(t))&&r}function hA(n){n.duration=0,n.type="keyframes"}const jne=new Set(["opacity","clipPath","filter","transform"]),Bne=wR(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function zne(n){var u;const{motionValue:e,name:t,repeatDelay:r,repeatType:i,damping:s,type:o}=n;
493if(!(((u=e==null?void 0:e.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Bne()&&t&&jne.has(t)&&(t!=="transform"||!c)&&!l&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const Hne=40;class Gne extends NR{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var v;super(),this.stop=()=>{var _,x;this._animation&&(this._animation.stop(),(_=this.stopTimeline)==null||_.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Qi.now();const m={autoplay:e,delay:t,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:c,element:u,...d},g=(u==null?void 0:u.KeyframeResolver)||LR;this.keyframeResolver=new g(a,(_,x,y)=>this.onKeyframesResolved(_,x,m,!y),l,c,u),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,t,r,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Qi.now(),Vne(e,s,o,a)||((xl.instantAnimations||!l)&&(u==null||u(PR(e,r,t))),e[0]=e[e.length-1],hA(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Hne?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},g=!c&&zne(m)?new Fne({...m,element:m.motionValue.owner.current}):new IR(m);g.finished.then(()=>this.notifyFinished()).catch(xo),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Mne()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const Wne=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $ne(n){const e=Wne.exec(n);if(!e)return[,];const[,t,r,i]=e;return[`--${t??r}`,i]}const qne=4;function HB(n,e,t=1){ip(t<=qne,`Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=$ne(n);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);if(s){const o=s.trim();return uB(o)?parseFloat(o):o}return TR(i)?HB(i,e,t+1):i}function DR(n,e){return(n==null?void 0:n[e])??(n==null?void 0:n.default)??n}const Xne={type:"spring",stiffness:500,damping:25,restSpeed:10},Kne=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),Yne={type:"keyframes",duration:.8},Qne={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jne=(n,{keyframes:e})=>e.length>2?Yne:Pp.has(n)?n.startsWith("scale")?Kne(e[1]):Xne:Qne;function Zne({when:n,delay:e,delayChildren:t,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const ere=n=>n!==null;function tre(n,{repeat:e,repeatType:t="loop"},r){const i=n.filter(ere),s=e&&t!=="loop"&&e%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}function GB(n,e,t,r=0,i=1){const s=Array.from(n).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),o=n.size,a=(o-1)*r;return typeof t=="function"?t(s,o):i===1?s*r:a-s*r}const kR=(n,e,t,r={},i,s)=>o=>{const a=DR(r,n)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Ea(l);const u={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:m=>{e.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:n,motionValue:e,element:s?void 0:i};Zne(a)||Object.assign(u,Jne(n,u)),u.duration&&(u.duration=Ea(u.duration)),u.repeatDelay&&(u.repeatDelay=Ea(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(hA(u),u.delay===0&&(
vendor: 22,876 bytes, line 493
493d=!0)),(xl.instantAnimations||xl.skipAnimations)&&(d=!0,hA(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!s&&e.get()!==void 0){const m=tre(u.keyframes,a);if(m!==void 0){Hn.update(()=>{u.onUpdate(m),u.onComplete()});return}}return a.isSync?new IR(u):new Gne(u)},WB=new Set(["width","height","top","left","right","bottom",...Rp]),MD=30,nre=n=>!isNaN(parseFloat(n));class rre{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=Qi.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Qi.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=nre(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new SR);const r=this.events[e].add(t);return e==="change"?()=>{r(),Hn.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Qi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>MD)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,MD);return fB(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,t;(e=this.dependents)==null||e.clear(),(t=this.events.destroy)==null||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function sp(n,e){return new rre(n,e)}function AD(n){const e=[{},{}];return n==null||n.values.forEach((t,r)=>{e[0][r]=t.get(),e[1][r]=t.getVelocity()}),e}function OR(n,e,t,r){if(typeof e=="function"){const[i,s]=AD(r);e=e(t!==void 0?t:n.custom,i,s)}if(typeof e=="string"&&(e=n.variants&&n.variants[e]),typeof e=="function"){const[i,s]=AD(r);e=e(t!==void 0?t:n.custom,i,s)}return e}function If(n,e,t){const r=n.getProps();return OR(r,e,t!==void 0?t:r.custom,n)}const fA=n=>Array.isArray(n);function ire(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,sp(t))}function sre(n){return fA(n)?n[n.length-1]||0:n}function ore(n,e){const t=If(n,e);let{transitionEnd:r={},transition:i={},...s}=t||{};s={...s,...r};for(const o in s){const a=sre(s[o]);ire(n,o,a)}}const Li=n=>!!(n&&n.getVelocity);function are(n){return!!(Li(n)&&n.add)}function pA(n,e){const t=n.getValue("willChange");if(are(t))return t.add(e);if(!t&&xl.WillChange){const r=new xl.WillChange("auto");n.addValue("willChange",r),r.add(e)}}function FR(n){return n.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const lre="framerAppearId",$B="data-"+FR(lre);function qB(n){return n.props[$B]}function cre({protectedKeys:n,needsAnimating:e},t){const r=n.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,r}function XB(n,e,{delay:t=0,transitionOverride:r,type:i}={}){let{transition:s=n.getDefaultTransition(),transitionEnd:o,...a}=e;r&&(s=r);const l=[],c=i&&n.animationState&&n.animationState.getState()[i];for(const u in a){const d=n.getValue(u,n.latestValues[u]??null),m=a[u];if(m===void 0||c&&cre(c,u))continue;const g={delay:t,...DR(s||{},u)},v=d.get();if(v!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===v&&!g.velocity)continue;let _=!1;if(window.MotionHandoffAnimation){const y=qB(n);if(y){const S=window.MotionHandoffAnimation(y,u,Hn);S!==null&&(g.startTime=S,_=!0)}}pA(n,u),d.start(kR(u,d,m,n.shouldReduceMotion&&WB.has(u)?{type:!1}:g,n,_));const x=d.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{Hn.update(()=>{o&&ore(n,o)})}),l}function mA(n,e,t={}){var l;const r=If(n,e,t.type==="exit"?(l=n.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=n.getDefaultTransition()||{}}=r||{};t.transitionOverride&&(i=t.transitionOverride);const s=r?()=>Promise.all(XB(n,r,t)):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:m}=i;return ure(n,e,c,u,d,m,t)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>u())}else return Promise.all([s(),o(t.delay)])}function ure(n,e,t=0,r=0,i=0,s=1,o){const a=[];for(const l of n.variantChildren)l.notify("AnimationStart",e),a.push(mA(l,e,{...o,delay:t+(typeof r=="function"?0:r)+GB(n.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function dre(n,e,t={}){n.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(s=>mA(n,s,t));r=Promise.all(i)}else if(typeof e=="string")r=mA(n,e,t);else{const i=typeof e=="function"?If(n,e,t.custom):e;r=Promise.all(XB(n,i,t))}return r.then(()=>{n.notify("AnimationComplete",e)})}const hre={test:n=>n==="auto",parse:n=>n},KB=n=>e=>e.test(n),YB=[Cp,lt,Ta,Xl,Ute,Fte,hre],CD=n=>YB.find(KB(n));function fre(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||hB(n):!0}const pre=new Set(["brightness","contrast","saturate","opacity"]);function mre(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[r]=t.match(MR)||[];if(!r)return n;const i=t.replace(r,"");let s=pre.has(e)?1:0;return r!==t&&(s*=100),e+"("+s+i+")"}const gre=/\b([a-z-]*)\(.*?\)/gu,gA={...jc,getAnimatableNone:n=>{const e=n.match(gre);return e?e.map(mre).join(" "):n}},RD={...Cp,transform:Math.round},yre={rotate:Xl,rotateX:Xl,rotateY:Xl,rotateZ:Xl,scale:B0,scaleX:B0,scaleY:B0,scaleZ:B0,skew:Xl,skewX:Xl,skewY:Xl,distance:lt,translateX:lt,translateY:lt,translateZ:lt,x:lt,y:lt,z:lt,perspective:lt,transformPerspective:lt,opacity:ty,originX:mD,originY:mD,originZ:lt},UR={borderWidth:lt,borderTopWidth:lt,borderRightWidth:lt,borderBottomWidth:lt,borderLeftWidth:lt,borderRadius:lt,radius:lt,borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomRightRadius:lt,borderBottomLeftRadius:lt,width:lt,maxWidth:lt,height:lt,maxHeight:lt,top:lt,right:lt,bottom:lt,left:lt,inset:lt,insetBlock:lt,insetBlockStart:lt,insetBlockEnd:lt,insetInline:lt,insetInlineStart:lt,insetInlineEnd:lt,padding:lt,paddingTop:lt,paddingRight:lt,paddingBottom:lt,paddingLeft:lt,paddingBlock:lt,paddingBlockStart:lt,paddingBlockEnd:lt,paddingInline:lt,paddingInlineStart:lt,paddingInlineEnd:lt,margin:lt,marginTop:lt,marginRight:lt,marginBottom:lt,marginLeft:lt,marginBlock:lt,marginBlockStart:lt,marginBlockEnd:lt,marginInline:lt,marginInlineStart:lt,marginInlineEnd:lt,backgroundPositionX:lt,backgroundPositionY:lt,...yre,zIndex:RD,fillOpacity:ty,strokeOpacity:ty,numOctaves:RD},vre={...UR,color:Cr,backgroundColor:Cr,outlineColor:Cr,fill:Cr,stroke:Cr,borderColor:Cr,borderTopColor:Cr,borderRightColor:Cr,borderBottomColor:Cr,borderLeftColor:Cr,filter:gA,WebkitFilter:gA},QB=n=>vre[n];function JB(n,e){let t=QB(n);return t!==gA&&(t=jc),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const xre=new Set(["auto","none","0"]);function _re(n,e,t){let r=0,i;for(;r<n.length&&!i;){const s=n[r];typeof s=="string"&&!xre.has(s)&&ny(s).values.length&&(i=n[r]),r++}if(i&&t)for(const s of e)n[s]=JB(t,i)}class wre extends LR{constructor(e,t,r,i,s){super(e,t,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let d=e[u];if(typeof d=="string"&&(d=d.trim(),TR(d))){const m=HB(d,t.current);m!==void 0&&(e[u]=m),u===e.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!WB.has(r)||e.length!==2)return;const[i,s]=e,o=CD(i),a=CD(s),l=pD(i),c=pD(s);if(l!==c&&fc[r]){this.needsMeasurement=!0;return}if(o!==a)if(bD(o)&&bD(a))for(let u=0;u<e.length;u++){const d=e[u];typeof d=="string"&&(e[u]=parseFloat(d))}else fc[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||fre(e[i]))&&r.push(i);r.length&&_re(e,r,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fc[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const i=t[t.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:t,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=fc[t](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Sre(n,e,t){if(n instanceof EventTarget)return[n];if(typeof n=="string"){const i=document.querySelectorAll(n);return i?Array.from(i):[]}return Array.from(n)}const ZB=(n,e)=>e&&typeof n=="number"?e.transform(n):n;function ez(n){return dB(n)&&"offsetHeight"in n}const{schedule:VR,cancel:bbe}=EB(queueMicrotask,!1),ko={x:!1,y:!1};function tz(){return ko.x||ko.y}function bre(n){return n==="x"||n==="y"?ko[n]?null:(ko[n]=!0,()=>{ko[n]=!1}):ko.x||ko.y?null:(ko.x=ko.y=!0,()=>{ko.x=ko.y=!1})}function nz(n,e){const t=Sre(n),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[t,i,()=>r.abort()]}function PD(n){return!(n.pointerType==="touch"||tz())}function Ere(n,e,t={}){const[r,i,s]=nz(n,t),o=a=>{if(!PD(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=d=>{PD(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const rz=(n,e)=>e?n===e?!0:rz(n,e.parentElement):!1,jR=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,Tre=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function iz(n){return Tre.has(n.tagName)||n.isContentEditable===!0}const h_=new WeakSet;function ND(n){return e=>{e.key==="Enter"&&n(e)}}function vE(n,e){n.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Mre=(n,e)=>{const t=n.currentTarget;if(!t)return;const r=ND(()=>{if(h_.has(t))return;vE(t,"down");const i=ND(()=>{vE(t,"up")}),s=()=>vE(t,"cancel");t.addEventListener("keyup",i,e),t.addEventListener("blur",s,e)});t.addEventListener("keydown",r,e),t.addEventListener("blur",()=>t.removeEventListener("keydown",r),e)};function ID(n){return jR(n)&&!tz()}function Are(n,e,t={}){const[r,i,s]=nz(n,t),o=a=>{const l=a.currentTarget;if(!ID(a))return;h_.add(l);const c=e(l,a),u=(g,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",m),h_.has(l)&&h_.delete(l),ID(g)&&typeof c=="function"&&c(g,{success:v})},d=g=>{u(g,l===window||l===document||t.useGlobalTarget||rz(l,g.target))},m=g=>{u(g,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",m,i)};return r.forEach(a=>{(t.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),ez(a)&&(a.addEventListener("focus",c=>Mre(c,i)),!iz(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function sz(n){return dB(n)&&"ownerSVGElement"in n}function Cre(n){return sz(n)&&n.tagName==="svg"}const Rre=[...YB,Cr,jc],Pre=n=>Rre.find(KB(n)),LD=()=>({translate:0,scale:1,origin:0,originPoint:0}),hf=()=>({x:LD(),y:LD()}),DD=()=>({min:0,max:0}),Dr=()=>({x:DD(),y:DD()}),yA={current:null},oz={current:!1},Nre=typeof window<"u";function Ire(){if(oz.current=!0,!!Nre)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>yA.current=n.matches;n.addEventListener("change",e),e()}else yA.current=!1}const Lre=new WeakMap;function Rw(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function ry(n){return typeof n=="string"||Array.isArray(n)}const BR=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zR=["initial",...BR];function Pw(n){return Rw(n.animate)||zR.some(e=>ry(n[e]))}function az(n){return!!(Pw(n)||n.variants)}function Dre(n,e,t){for(const r in e){const i=e[r],s=t[r];if(Li(i))n.addValue(r,i);else if(Li(s))n.addValue(r,sp(i,{owner:n}));else if(s!==i)if(n.hasValue(r)){const o=n.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=n.getStaticValue(r);n.addValue(r,sp(o!==void 0?o:i,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const kD=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let v1={};function lz(n){v1=n}function kre(){return v1}class Ore{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=LR,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Qi.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Hn.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Pw(t),this.isVariantNode=az(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const m in d){const g=d[m];l[m]!==void 0&&Li(g)&&g.set(l[m])}}mount(e){var t;this.current=e,Lre.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(oz.current||Ire(),this.shouldReduceMotion=yA.current),(t=this.parent)==null||t.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Vc(this.notifyUpdate),Vc(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Pp.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Hn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),s&&s(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in v1){const t=v1[e];if(!t)continue;const{isEnabled:r,Feature:i}=t;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Dr()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let r=0;r<kD.length;r++){const i=kD[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=e[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Dre(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&t!==void 0&&(r=sp(t===null?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(uB(r)||hB(r))?r=parseFloat(r):!Pre(r)&&jc.test(t)&&(r=JB(e,t)),this.setBaseTarget(e,Li(r)?r.get():r)),Li(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var s;const{initial:t}=this.props;let r;if(typeof t=="string"||typeof t=="object"){const o=OR(this.props,t,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[e])}if(t&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Li(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new SR),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){VR.render(this.render)}}class tu{constructor(e){this.isMounted=!1,this.node=e}update(){}}class cz extends Ore{constructor(){super(...arguments),this.KeyframeResolver=wre}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){const r=e.style;return r?r[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Li(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function uz({top:n,left:e,right:t,bottom:r}){return{x:{min:e,max:t},y:{min:n,max:r}}}function Fre({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function Ure(n,e){if(!e)return n;const t=e({x:n.left,y:n.top}),r=e({x:n.right,y:n.bottom});return{top:t.y,left:t.x,bottom:r.y,right:r.x}}function xE(n){return n===void 0||n===1}function vA({scale:n,scaleX:e,scaleY:t}){return!xE(n)||!xE(e)||!xE(t)}function Bu(n){return vA(n)||dz(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function dz(n){return OD(n.x)||OD(n.y)}function OD(n){return n&&n!=="0%"}function x1(n,e,t){const r=n-t,i=e*r;return t+i}function FD(n,e,t,r,i){return i!==void 0&&(n=x1(n,i,r)),x1(n,t,r)+e}function xA(n,e=0,t=1,r,i){n.min=FD(n.min,e,t,r,i),n.max=FD(n.max,e,t,r,i)}function hz(n,{x:e,y:t}){xA(n.x,e.translate,e.scale,e.originPoint),xA(n.y,t.translate,t.scale,t.originPoint)}const UD=.999999999999,VD=1.0000000000001;function Vre(n,e,t,r=!1){const i=t.length;if(!i)return;e.x=e.y=1;let s,o;for(let a=0;a<i;a++){s=t[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&pf(n,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,hz(n,o)),r&&Bu(s.latestValues)&&pf(n,s.latestValues))}e.x<VD&&e.x>UD&&(e.x=1),e.y<VD&&e.y>UD&&(e.y=1)}function ff(n,e){n.min=n.min+e,n.max=n.max+e}function jD(n,e,t,r,i=.5){const s=nr(n.min,n.max,i);xA(n,e,t,s,r)}function pf(n,e){jD(n.x,e.x,e.scaleX,e.scale,e.originX),jD(n.y,e.y,e.scaleY,e.scale,e.originY)}function fz(n,e){return uz(Ure(n.getBoundingClientRect(),e))}function jre(n,e,t){const r=fz(n,t),{scroll:i}=e;return i&&(ff(r.x,i.offset.x),ff(r.y,i.offset.y)),r}const Bre={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zre=Rp.length;function Hre(n,e,t){let r="",i=!0;for(let s=0;s<zre;s++){const o=Rp[s],a=n[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||t){const c=ZB(a,UR[o]);if(!l){i=!1;const u=Bre[o]||o;r+=`${u}(${c}) `}t&&(e[o]=c)}}return r=r.trim(),t?r=t(e,i?"":r):i&&(r="none"),r}function HR(n,e,t){const{style:r,vars:i,transformOrigin:s}=n;let o=!1,a=!1;for(const l in e){const c=e[l];
vendor: 4,203 bytes, line 493
493if(Pp.has(l)){o=!0;continue}else if(MB(l)){i[l]=c;continue}else{const u=ZB(c,UR[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(e.transform||(o||t?r.transform=Hre(e,n.transform,t):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}function pz(n,{style:e,vars:t},r,i){const s=n.style;let o;for(o in e)s[o]=e[o];i==null||i.applyProjectionStyles(s,r);for(o in t)s.setProperty(o,t[o])}function BD(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const Mm={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(lt.test(n))n=parseFloat(n);else return n;const t=BD(n,e.target.x),r=BD(n,e.target.y);return`${t}% ${r}%`}},Gre={correct:(n,{treeScale:e,projectionDelta:t})=>{const r=n,i=jc.parse(n);if(i.length>5)return r;const s=jc.createTransformer(n),o=typeof i[0]!="number"?1:0,a=t.x.scale*e.x,l=t.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=nr(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}},_A={borderRadius:{...Mm,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Mm,borderTopRightRadius:Mm,borderBottomLeftRadius:Mm,borderBottomRightRadius:Mm,boxShadow:Gre};function mz(n,{layout:e,layoutId:t}){return Pp.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!_A[n]||n==="opacity")}function GR(n,e,t){var o;const r=n.style,i=e==null?void 0:e.style,s={};if(!r)return s;for(const a in r)(Li(r[a])||i&&Li(i[a])||mz(a,n)||((o=t==null?void 0:t.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function Wre(n){return window.getComputedStyle(n)}class $re extends cz{constructor(){super(...arguments),this.type="html",this.renderInstance=pz}readValueFromInstance(e,t){var r;if(Pp.has(t))return(r=this.projection)!=null&&r.isProjecting?aA(t):wne(e,t);{const i=Wre(e),s=(MB(t)?i.getPropertyValue(t):i[t])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:t}){return fz(e,t)}build(e,t,r){HR(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return GR(e,t,r)}}const qre={offset:"stroke-dashoffset",array:"stroke-dasharray"},Xre={offset:"strokeDashoffset",array:"strokeDasharray"};function Kre(n,e,t=1,r=0,i=!0){n.pathLength=1;const s=i?qre:Xre;n[s.offset]=lt.transform(-r);const o=lt.transform(e),a=lt.transform(t);n[s.array]=`${o} ${a}`}const Yre=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function gz(n,{attrX:e,attrY:t,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,c,u){if(HR(n,a,c),l){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:d,style:m}=n;d.transform&&(m.transform=d.transform,delete d.transform),(m.transform||d.transformOrigin)&&(m.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),m.transform&&(m.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox);for(const g of Yre)d[g]!==void 0&&(m[g]=d[g],delete d[g]);e!==void 0&&(d.x=e),t!==void 0&&(d.y=t),r!==void 0&&(d.scale=r),i!==void 0&&Kre(d,i,s,o,!1)}const yz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),vz=n=>typeof n=="string"&&n.toLowerCase()==="svg";function Qre(n,e,t,r){pz(n,e,void 0,r);for(const i in e.attrs)n.setAttribute(yz.has(i)?i:FR(i),e.attrs[i])}function xz(n,e,t){const r=GR(n,e,t);for(const i in n)if(Li(n[i])||Li(e[i])){const s=Rp.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=n[i]}return r}class Jre extends cz{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Dr}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Pp.has(t)){const r=QB(t);return r&&r.default||0}return t=yz.has(t)?t:FR(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return xz(e,t,r)}build(e,t,r){gz(e,t,this.isSVGTag,r.transformTemplate,r.style)}
vendor: 5,149 bytes, line 493
493renderInstance(e,t,r,i){Qre(e,t,r,i)}mount(e){this.isSVGTag=vz(e.tagName),super.mount(e)}}const Zre=zR.length;function _z(n){if(!n)return;if(!n.isControllingVariants){const t=n.parent?_z(n.parent)||{}:{};return n.props.initial!==void 0&&(t.initial=n.props.initial),t}const e={};for(let t=0;t<Zre;t++){const r=zR[t],i=n.props[r];(ry(i)||i===!1)&&(e[r]=i)}return e}function wz(n,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==n.length)return!1;for(let r=0;r<t;r++)if(e[r]!==n[r])return!1;return!0}const eie=[...BR].reverse(),tie=BR.length;function nie(n){return e=>Promise.all(e.map(({animation:t,options:r})=>dre(n,t,r)))}function rie(n){let e=nie(n),t=zD(),r=!0;const i=l=>(c,u)=>{var m;const d=If(n,u,l==="exit"?(m=n.presenceContext)==null?void 0:m.custom:void 0);if(d){const{transition:g,transitionEnd:v,..._}=d;c={...c,..._,...v}}return c};function s(l){e=l(n)}function o(l){const{props:c}=n,u=_z(n.parent)||{},d=[],m=new Set;let g={},v=1/0;for(let x=0;x<tie;x++){const y=eie[x],S=t[y],b=c[y]!==void 0?c[y]:u[y],A=ry(b),k=y===l?S.isActive:null;k===!1&&(v=x);let L=b===u[y]&&b!==c[y]&&A;if(L&&r&&n.manuallyAnimateOnMount&&(L=!1),S.protectedKeys={...g},!S.isActive&&k===null||!b&&!S.prevProp||Rw(b)||typeof b=="boolean")continue;const C=iie(S.prevProp,b);let P=C||y===l&&S.isActive&&!L&&A||x>v&&A,R=!1;const N=Array.isArray(b)?b:[b];let O=N.reduce(i(y),{});k===!1&&(O={});const{prevResolvedValues:V={}}=S,B={...V,...O},W=ie=>{P=!0,m.has(ie)&&(R=!0,m.delete(ie)),S.needsAnimating[ie]=!0;const j=n.getValue(ie);j&&(j.liveStyle=!1)};for(const ie in B){const j=O[ie],z=V[ie];if(g.hasOwnProperty(ie))continue;let q=!1;fA(j)&&fA(z)?q=!wz(j,z):q=j!==z,q?j!=null?W(ie):m.add(ie):j!==void 0&&m.has(ie)?W(ie):S.protectedKeys[ie]=!0}S.prevProp=b,S.prevResolvedValues=O,S.isActive&&(g={...g,...O}),r&&n.blockInitialAnimation&&(P=!1);const ee=L&&C;P&&(!ee||R)&&d.push(...N.map(ie=>{const j={type:y};if(typeof ie=="string"&&r&&!ee&&n.manuallyAnimateOnMount&&n.parent){const{parent:z}=n,q=If(z,ie);if(z.enteringChildren&&q){const{delayChildren:Z}=q.transition||{};j.delay=GB(z.enteringChildren,n,Z)}}return{animation:ie,options:j}}))}if(m.size){const x={};if(typeof c.initial!="boolean"){const y=If(n,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(x.transition=y.transition)}m.forEach(y=>{const S=n.getBaseTarget(y),b=n.getValue(y);b&&(b.liveStyle=!0),x[y]=S??null}),d.push({animation:x})}let _=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!n.manuallyAnimateOnMount&&(_=!1),r=!1,_?e(d):Promise.resolve()}function a(l,c){var d;if(t[l].isActive===c)return Promise.resolve();(d=n.variantChildren)==null||d.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(l,c)}),t[l].isActive=c;const u=o(l);for(const m in t)t[m].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>t,reset:()=>{t=zD()}}}function iie(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!wz(e,n):!1}function Cu(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zD(){return{animate:Cu(!0),whileInView:Cu(),whileHover:Cu(),whileTap:Cu(),whileDrag:Cu(),whileFocus:Cu(),exit:Cu()}}const Sz=1e-4,sie=1-Sz,oie=1+Sz,bz=.01,aie=0-bz,lie=0+bz;function Ji(n){return n.max-n.min}function cie(n,e,t){return Math.abs(n-e)<=t}function HD(n,e,t,r=.5){n.origin=r,n.originPoint=nr(e.min,e.max,n.origin),n.scale=Ji(t)/Ji(e),n.translate=nr(t.min,t.max,n.origin)-n.originPoint,(n.scale>=sie&&n.scale<=oie||isNaN(n.scale))&&(n.scale=1),(n.translate>=aie&&n.translate<=lie||isNaN(n.translate))&&(n.translate=0)}function yg(n,e,t,r){HD(n.x,e.x,t.x,r?r.originX:void 0),HD(n.y,e.y,t.y,r?r.originY:void 0)}function GD(n,e,t){n.min=t.min+e.min,n.max=n.min+Ji(e)}function uie(n,e,t){GD(n.x,e.x,t.x),GD(n.y,e.y,t.y)}function WD(n,e,t){n.min=e.min-t.min,n.max=n.min+Ji(e)}function _1(n,e,t){WD(n.x,e.x,t.x),WD(n.y,e.y,t.y)}function $D(n,e,t,r,i){return n-=e,n=x1(n,1/t,r),i!==void 0&&(n=x1(n,1/i,r)),n}function die(n,e=0,t=1,r=.5,i,s=n,o=n){if(Ta.test(e)&&(e=parseFloat(e),e=nr(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=nr(s.min,s.max,r);n===s&&(a-=e),n.min=$D(n.min,e,t,a,i),n.max=$D(n.max,e,t,a,i)}function qD(n,e,[t,r,i],s,o){die(n,e[t],e[r],e[i],e.scale,s,o)}const hie=["x","scaleX","originX"],fie=["y","scaleY","originY"];function XD(n,e,t,r){qD(n.x,e,hie,t?t.x:void 0,r?r.x:void 0),qD(n.y,e,fie,t?t.y:void 0,r?r.y:void 0)}function KD(n,e){n.min=e.min,n.max=e.max}function No(n,e){KD(n.x,e.x),KD(n.y,e.y)}function YD(n,e){n.translate=e.translate,n.scale=e.scale,n.originPoint=e.originPoint,n.origin=e.origin}function QD(n){return n.translate===0&&n.scale===1}function Ez(n){return QD(n.x)&&QD(n.y)}function JD(n,e){return n.min===e.min&&n.max===e.max}function pie(n,e){return JD(n.x,e.x)&&JD(n.y,e.y)}function ZD(n,e){return Math.round(n.min)===Math.round(e.min)&&Math.round(n.max)===Math.round(e.max)}function Tz(n,e){return ZD(n.x,e.x)&&ZD(n.y,e.y)}function ek(n){return Ji(n.x)/Ji(n.y)}function tk(n,e){return n.translate===e.translate&&n.scale===e.scale&&n.originPoint===e.originPoint}function lo(n){return[n("x"),n("y")]}function mie(n,e,t){let r="";
vendor: 4,459 bytes, line 493
493const i=n.x.translate/e.x,s=n.y.translate/e.y,o=(t==null?void 0:t.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),t){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:m,skewX:g,skewY:v}=t;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=n.x.scale*e.x,l=n.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Mz=["TopLeft","TopRight","BottomLeft","BottomRight"],gie=Mz.length,nk=n=>typeof n=="string"?parseFloat(n):n,rk=n=>typeof n=="number"||lt.test(n);function yie(n,e,t,r,i,s){i?(n.opacity=nr(0,t.opacity??1,vie(r)),n.opacityExit=nr(e.opacity??1,0,xie(r))):s&&(n.opacity=nr(e.opacity??1,t.opacity??1,r));for(let o=0;o<gie;o++){const a=`border${Mz[o]}Radius`;let l=ik(e,a),c=ik(t,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||rk(l)===rk(c)?(n[a]=Math.max(nr(nk(l),nk(c),r),0),(Ta.test(c)||Ta.test(l))&&(n[a]+="%")):n[a]=c}(e.rotate||t.rotate)&&(n.rotate=nr(e.rotate||0,t.rotate||0,r))}function ik(n,e){return n[e]!==void 0?n[e]:n.borderRadius}const vie=Az(0,.5,_B),xie=Az(.5,.95,xo);function Az(n,e,t){return r=>r<n?0:r>e?1:t(ey(n,e,r))}function _ie(n,e){const t=Qi.now(),r=({timestamp:i})=>{const s=i-t;s>=e&&(Vc(r),n(s-e))};return Hn.setup(r,!0),()=>Vc(r)}function iy(n,e,t,r={passive:!0}){return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t)}function f_(n){return Li(n)?n.get():n}function wie(n,e,t){const r=Li(n)?n:sp(n);return r.start(kR("",r,e,t)),r.animation}const Sie=(n,e)=>n.depth-e.depth;class bie{constructor(){this.children=[],this.isDirty=!1}add(e){xR(this.children,e),this.isDirty=!0}remove(e){_R(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Sie),this.isDirty=!1,this.children.forEach(e)}}class Eie{constructor(){this.members=[]}add(e){xR(this.members,e),e.scheduleRender()}remove(e){if(_R(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){const t=this.members.findIndex(i=>e===i);if(t===0)return!1;let r;for(let i=t;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(e,t){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:r}=e;t.onExitComplete&&t.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const p_={hasAnimatedSinceResize:!0,hasEverUpdated:!1},_E=["","X","Y","Z"],Tie=1e3;let Mie=0;function wE(n,e,t,r){const{latestValues:i}=e;i[n]&&(t[n]=i[n],e.setStaticValue(n,0),r&&(r[n]=0))}function Cz(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:e}=n.options;if(!e)return;const t=qB(e);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:i,layoutId:s}=n.options;window.MotionCancelOptimisedAnimation(t,"transform",Hn,!(i||s))}const{parent:r}=n;r&&!r.hasCheckedOptimisedAppear&&Cz(r)}function Rz({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Mie++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>
vendor: 10,579 bytes, line 493
493{this.projectionUpdateScheduled=!1,this.nodes.forEach(Rie),this.nodes.forEach(Lie),this.nodes.forEach(Die),this.nodes.forEach(Pie)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new bie)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new SR),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=sz(o)&&!Cre(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),n){let u,d=0;const m=()=>this.root.updateBlockedByResize=!1;Hn.read(()=>{d=window.innerWidth}),n(o,()=>{const g=window.innerWidth;g!==d&&(d=g,this.root.updateBlockedByResize=!0,u&&u(),u=_ie(m,250),p_.hasAnimatedSinceResize&&(p_.hasAnimatedSinceResize=!1,this.nodes.forEach(ak)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||Vie,{onLayoutAnimationStart:_,onLayoutAnimationComplete:x}=c.getProps(),y=!this.targetLayout||!Tz(this.targetLayout,g),S=!d&&m;if(this.options.layoutRoot||this.resumeFrom||S||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...DR(v,"layout"),onPlay:_,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(u,S)}else d||ak(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Vc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(kie),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Cz(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(sk);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ok);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Iie),this.nodes.forEach(Aie),this.nodes.forEach(Cie)):this.nodes.forEach(ok),this.clearAllSnapshots();const a=Qi.now();ii.delta=ka(0,1e3/60,a-ii.timestamp),ii.timestamp=a,ii.isProcessing=!0,hE.update.process(ii),hE.preRender.process(ii),hE.render.process(ii),ii.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,VR.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Nie),this.sharedNodes.forEach(Oie)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Hn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Hn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ji(this.snapshot.measuredBox.x)&&!Ji(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Dr(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ez(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||Bu(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),jie(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Dr();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(Bie))){const{scroll:u}=this.root;u&&(ff(a.x,u.offset.x),ff(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Dr();if(No(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:m}=u;u!==this.root&&d&&m.layoutScroll&&(d.wasRoot&&No(a,o),ff(a.x,d.offset.x),ff(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=Dr();No(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&pf(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Bu(u.latestValues)&&pf(l,u.latestValues)}return Bu(this.latestValues)&&pf(l,this.latestValues),l}removeTransform(o){const a=Dr();No(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Bu(c.latestValues))continue;vA(c.latestValues)&&c.updateSnapshot();const u=Dr(),d=c.measurePageBox();No(u,d),XD(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Bu(this.latestValues)&&XD(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ii.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var g;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=ii.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Dr(),this.targetWithTransforms=Dr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),uie(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):No(this.target,this.layout.layoutBox),hz(this.target,this.targetDelta)):No(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||vA(this.parent.latestValues)||dz(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Dr(),this.relativeTargetOrigin=Dr(),_1(this.relativeTargetOrigin,a,l),No(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var v;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&
vendor: 5,279 bytes, line 493
493(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===ii.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;No(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,m=this.treeScale.y;Vre(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Dr());const{target:g}=o;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(YD(this.prevProjectionDelta.x,this.projectionDelta.x),YD(this.prevProjectionDelta.y,this.projectionDelta.y)),yg(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==m||!tk(this.projectionDelta.x,this.prevProjectionDelta.x)||!tk(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hf(),this.projectionDelta=hf(),this.projectionDeltaWithTransform=hf()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=hf();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=Dr(),g=l?l.source:void 0,v=this.layout?this.layout.source:void 0,_=g!==v,x=this.getStack(),y=!x||x.members.length<=1,S=!!(_&&!y&&this.options.crossfade===!0&&!this.path.some(Uie));this.animationProgress=0;let b;this.mixTargetDelta=A=>{const k=A/1e3;lk(d.x,o.x,k),lk(d.y,o.y,k),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(_1(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Fie(this.relativeTarget,this.relativeTargetOrigin,m,k),b&&pie(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Dr()),No(b,this.relativeTarget)),_&&(this.animationValues=u,yie(u,c,this.latestValues,k,S,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Vc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Hn.update(()=>{p_.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=sp(0)),this.currentAnimation=wie(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Tie),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&Pz(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Dr();const d=Ji(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const m=Ji(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+m}No(a,l),pf(a,u),yg(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Eie),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}
vendor: 34,783 bytes, lines 493-501
493resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&wE("z",o,c,this.animationValues);for(let u=0;u<_E.length;u++)wE(`rotate${_E[u]}`,o,c,this.animationValues),wE(`skew${_E[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=f_(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=f_(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Bu(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=mie(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),o.transform=d;const{x:m,y:g}=this.projectionDelta;o.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in _A){if(u[v]===void 0)continue;const{correct:_,applyTo:x,isCSSVariable:y}=_A[v],S=d==="none"?u[v]:_(u[v],c);if(x){const b=x.length;for(let A=0;A<b;A++)o[x[A]]=S}else y?this.options.visualElement.renderState.vars[v]=S:o[v]=S}this.options.layoutId&&(o.pointerEvents=c===this?f_(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(sk),this.root.sharedNodes.clear()}}}function Aie(n){n.updateLayout()}function Cie(n){var t;const e=((t=n.resumeFrom)==null?void 0:t.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&e&&n.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=n.layout,{animationType:s}=n.options,o=e.source!==n.layout.source;s==="size"?lo(d=>{const m=o?e.measuredBox[d]:e.layoutBox[d],g=Ji(m);m.min=r[d].min,m.max=m.min+g}):Pz(s,e.layoutBox,r)&&lo(d=>{const m=o?e.measuredBox[d]:e.layoutBox[d],g=Ji(r[d]);m.max=m.min+g,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[d].max=n.relativeTarget[d].min+g)});const a=hf();yg(a,r,e.layoutBox);const l=hf();o?yg(l,n.applyTransform(i,!0),e.measuredBox):yg(l,r,e.layoutBox);const c=!Ez(a);let u=!1;if(!n.resumeFrom){const d=n.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:m,layout:g}=d;if(m&&g){const v=Dr();_1(v,e.layoutBox,m.layoutBox);const _=Dr();_1(_,r,g.layoutBox),Tz(v,_)||(u=!0),d.options.layoutRoot&&(n.relativeTarget=_,n.relativeTargetOrigin=v,n.relativeParent=d)}}}n.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(n.isLead()){const{onExitComplete:r}=n.options;r&&r()}n.options.transition=void 0}function Rie(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function Pie(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function Nie(n){n.clearSnapshot()}function sk(n){n.clearMeasurements()}function ok(n){n.isLayoutDirty=!1}function Iie(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function ak(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function Lie(n){n.resolveTargetDelta()}function Die(n){n.calcProjection()}function kie(n){n.resetSkewAndRotation()}function Oie(n){n.removeLeadSnapshot()}function lk(n,e,t){n.translate=nr(e.translate,0,t),n.scale=nr(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function ck(n,e,t,r){n.min=nr(e.min,t.min,r),n.max=nr(e.max,t.max,r)}function Fie(n,e,t,r){ck(n.x,e.x,t.x,r),ck(n.y,e.y,t.y,r)}function Uie(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const Vie={duration:.45,ease:[.4,0,.1,1]},uk=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),dk=uk("applewebkit/")&&!uk("chrome/")?Math.round:xo;function hk(n){n.min=dk(n.min),n.max=dk(n.max)}function jie(n){hk(n.x),hk(n.y)}function Pz(n,e,t){return n==="position"||n==="preserve-aspect"&&!cie(ek(e),ek(t),.2)}function Bie(n){var e;return n!==n.root&&((e=n.scroll)==null?void 0:e.wasRoot)}const zie=Rz({attachResizeListener:(n,e)=>iy(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),SE={current:void 0},Nz=Rz({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!SE.current){const n=new zie({});n.mount(window),n.setOptions({layoutScroll:!0}),SE.current=n}return SE.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),WR=M.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function fk(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}function Hie(...n){return e=>{let t=!1;const r=n.map(i=>{const s=fk(i,e);return!t&&typeof s=="function"&&(t=!0),s});if(t)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():fk(n[i],null)}}}}function Gie(...n){return M.useCallback(Hie(...n),n)}class Wie extends M.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const r=t.offsetParent,i=ez(r)&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=t.offsetHeight||0,s.width=t.offsetWidth||0,s.top=t.offsetTop,s.left=t.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function $ie({children:n,isPresent:e,anchorX:t,root:r}){var u;const i=M.useId(),s=M.useRef(null),o=M.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=M.useContext(WR),l=((u=n.props)==null?void 0:u.ref)??(n==null?void 0:n.ref),c=Gie(s,l);return M.useInsertionEffect(()=>{const{width:d,height:m,top:g,left:v,right:_}=o.current;if(e||!s.current||!d||!m)return;const x=t==="left"?`left: ${v}`:`right: ${_}`;s.current.dataset.motionPopId=i;const y=document.createElement("style");a&&(y.nonce=a);const S=r??document.head;return S.appendChild(y),y.sheet&&y.sheet.insertRule(` 494 [data-motion-pop-id="${i}"] { 495 position: absolute !important; 496 width: ${d}px !important; 497 height: ${m}px !important; 498 ${x}px !important; 499 top: ${g}px !important; 500 } 501 `),()=>{S.contains(y)&&S.removeChild(y)}},[e]),f.jsx(Wie,{isPresent:e,childRef:s,sizeRef:o,children:M.cloneElement(n,{ref:c})})}const qie=({children:n,initial:e,isPresent:t,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,root:l})=>{const c=vR(Xie),u=M.useId();let d=!0,m=M.useMemo(()=>(d=!1,{id:u,initial:e,isPresent:t,custom:i,onExitComplete:g=>{c.set(g,!0);for(const v of c.values())if(!v)return;r&&r()},register:g=>(c.set(g,!1),()=>c.delete(g))}),[t,c,r]);return s&&d&&(m={...m}),M.useMemo(()=>{c.forEach((g,v)=>c.set(v,!1))},[t]),M.useEffect(()=>{!t&&!c.size&&r&&r()},[t]),o==="popLayout"&&(n=f.jsx($ie,{isPresent:t,anchorX:a,root:l,children:n})),f.jsx(Aw.Provider,{value:m,children:n})};function Xie(){return new Map}function Iz(n=!0){const e=M.useContext(Aw);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:r,register:i}=e,s=M.useId();M.useEffect(()=>{if(n)return i(s)},[n]);const o=M.useCallback(()=>n&&r&&r(s),[s,r,n]);return!t&&r?[!1,o]:[!0]}const z0=n=>n.key||"";function pk(n){const e=[];return M.Children.forEach(n,t=>{M.isValidElement(t)&&e.push(t)}),e}const $R=({children:n,custom:e,initial:t=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",root:l})=>{const[c,u]=Iz(o),d=M.useMemo(()=>pk(n),[n]),m=o&&!c?[]:d.map(z0),g=M.useRef(!0),v=M.useRef(d),_=vR(()=>new Map),x=M.useRef(new Set),[y,S]=M.useState(d),[b,A]=M.useState(d);cB(()=>{g.current=!1,v.current=d;for(let C=0;C<b.length;C++){const P=z0(b[C]);m.includes(P)?(_.delete(P),x.current.delete(P)):_.get(P)!==!0&&_.set(P,!1)}},[b,m.length,m.join("-")]);const k=[];if(d!==y){let C=[...d];for(let P=0;P<b.length;P++){const R=b[P],N=z0(R);m.includes(N)||(C.splice(P,0,R),k.push(R))}return s==="wait"&&k.length&&(C=k),A(pk(C)),S(d),null}const{forceRender:L}=M.useContext(yR);return f.jsx(f.Fragment,{children:b.map(C=>{const P=z0(C),R=o&&!c?!1:d===b||m.includes(P),N=()=>{if(x.current.has(P))return;if(x.current.add(P),_.has(P))_.set(P,!0);else return;let O=!0;_.forEach(V=>{V||(O=!1)}),O&&(L==null||L(),A(v.current),o&&(u==null||u()),r&&r())};return f.jsx(qie,{isPresent:R,initial:!g.current||t?void 0:!1,custom:e,presenceAffectsLayout:i,mode:s,root:l,onExitComplete:R?void 0:N,anchorX:a,children:C},P)})})},Lz=M.createContext({strict:!1}),mk={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let gk=!1;function Kie(){if(gk)return;const n={};for(const e in mk)n[e]={isEnabled:t=>mk[e].some(r=>!!t[r])};lz(n),gk=!0}function Dz(){return Kie(),kre()}function Yie(n){const e=Dz();for(const t in n)e[t]={...e[t],...n[t]};lz(e)}const Qie=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function w1(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||Qie.has(n)}let kz=n=>!w1(n);function Jie(n){typeof n=="function"&&(kz=e=>e.startsWith("on")?!w1(e):n(e))}try{Jie(require("@emotion/is-prop-valid").default)}catch{}function Zie(n,e,t){const r={};for(const i in n)i==="values"&&typeof n.values=="object"||(kz(i)||t===!0&&w1(i)||!e&&!w1(i)||n.draggable&&i.startsWith("onDrag"))&&(r[i]=n[i]);return r}const Nw=M.createContext({});function ese(n,e){if(Pw(n)){const{initial:t,animate:r}=n;return{initial:t===!1||ry(t)?t:void 0,animate:ry(r)?r:void 0}}return n.inherit!==!1?e:{}}function tse(n){const{initial:e,animate:t}=ese(n,M.useContext(Nw));return M.useMemo(()=>({initial:e,animate:t}),[yk(e),yk(t)])}function yk(n){return Array.isArray(n)?n.join(" "):n}const qR=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Oz(n,e,t){for(const r in e)!Li(e[r])&&!mz(r,t)&&(n[r]=e[r])}function nse({transformTemplate:n},e){return M.useMemo(()=>{const t=qR();return HR(t,e,n),Object.assign({},t.vars,t.style)},[e])}function rse(n,e){const t=n.style||{},r={};return Oz(r,t,n),Object.assign(r,nse(n,e)),r}function ise(n,e){const t={},r=rse(n,e);return n.drag&&n.dragListener!==!1&&(t.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(t.tabIndex=0),t.style=r,t}const Fz=()=>({...qR(),attrs:{}});function sse(n,e,t,r){const i=M.useMemo(()=>{const s=Fz();return gz(s,e,vz(r),n.transformTemplate,n.style),{...s.attrs,style:{...s.style}}},[e]);if(n.style){const s={};Oz(s,n.style,n),i.style={...s,...i.style}}return i}const ose=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function XR(n){return typeof n!="string"||n.includes("-")?!1:!!(ose.indexOf(n)>-1||/[A-Z]/u.test(n))}function ase(n,e,t,{latestValues:r},i,s=!1,o){const l=(o??XR(n)?sse:ise)(e,r,i,n),c=Zie(e,typeof n=="string",s),u=n!==M.Fragment?{...c,...l,ref:t}:{},{children:d}=e,m=M.useMemo(()=>Li(d)?d.get():d,[d]);return M.createElement(n,{...u,children:m})}function lse({scrapeMotionValuesFromProps:n,createRenderState:e},t,r,i){return{latestValues:cse(t,r,i,n),renderState:e()}}function cse(n,e,t,r){const i={},s=r(n,{});for(const m in s)i[m]=f_(s[m]);let{initial:o,animate:a}=n;const l=Pw(n),c=az(n);e&&c&&!l&&n.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=t?t.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Rw(d)){const m=Array.isArray(d)?d:[d];for(let g=0;g<m.length;g++){const v=OR(n,m[g]);if(v){const{transitionEnd:_,transition:x,...y}=v;for(const S in y){let b=y[S];if(Array.isArray(b)){const A=u?b.length-1:0;b=b[A]}b!==null&&(i[S]=b)}for(const S in _)i[S]=_[S]}}}return i}const Uz=n=>(e,t)=>{const r=M.useContext(Nw),i=M.useContext(Aw),s=()=>lse(n,e,r,i);return t?s():vR(s)},use=Uz({scrapeMotionValuesFromProps:GR,createRenderState:qR}),dse=Uz({scrapeMotionValuesFromProps:xz,createRenderState:Fz}),hse=Symbol.for("motionComponentSymbol");function fse(n,e,t){const r=M.useRef(t);M.useInsertionEffect(()=>{r.current=t});const i=M.useRef(null);return M.useCallback(s=>{var a;s&&((a=n.onMount)==null||a.call(n,s)),e&&(s?e.mount(s):e.unmount());const o=r.current;if(typeof o=="function")if(s){const l=o(s);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(s);else o&&(o.current=s)},[e])}const Vz=M.createContext({});function Ym(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function pse(n,e,t,r,i,s){var x,y;const{visualElement:o}=M.useContext(Nw),a=M.useContext(Lz),l=M.useContext(Aw),c=M.useContext(WR).reducedMotion,u=M.useRef(null);r=r||a.renderer,!u.current&&r&&(u.current=r(n,{visualState:e,parent:o,props:t,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:s}));const d=u.current,m=M.useContext(Vz);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&mse(u.current,t,i,m);const g=M.useRef(!1);M.useInsertionEffect(()=>{d&&g.current&&d.update(t,l)});const v=t[$B],_=M.useRef(!!v&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,v))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,v)));return cB(()=>{d&&(g.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),_.current&&d.animationState&&d.animationState.animateChanges())}),M.useEffect(()=>{d&&(!_.current&&d.animationState&&d.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,v)}),_.current=!1),d.enteringChildren=void 0)}),d}function mse(n,e,t,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;n.projection=new t(n.latestValues,e["data-framer-portal-id"]?void 0:jz(n.parent)),n.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Ym(a),visualElement:n,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function jz(n){if(n)return n.options.allowProjection!==!1?n.projection:jz(n.parent)}function bE(n,{forwardMotionProps:e=!1,type:t}={},r,i){r&&Yie(r);const s=t?t==="svg":XR(n),o=s?dse:use;function a(c,u){let d;const m={...M.useContext(WR),...c,layoutId:gse(c)},{isStatic:g}=m,v=tse(c),_=o(c,g);if(!g&&lB){yse();const x=vse(m);d=x.MeasureLayout,v.visualElement=pse(n,_,m,i,x.ProjectionNode,s)}return f.jsxs(Nw.Provider,{value:v,children:[d&&v.visualElement?f.jsx(d,{visualElement:v.visualElement,...m}):null,ase(n,c,fse(_,v.visualElement,u),_,g,e,s)]})}a.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const l=M.forwardRef(a);return l[hse]=n,l}function gse({layoutId:n}){const e=M.useContext(yR).id;return e&&n!==void 0?e+"-"+n:n}function yse(n,e){M.useContext(Lz).strict}function vse(n){const e=Dz(),{drag:t,layout:r}=e;if(!t&&!r)return{};const i={...t,...r};return{MeasureLayout:t!=null&&t.isEnabled(n)||r!=null&&r.isEnabled(n)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function xse(n,e){if(typeof Proxy>"u")return bE;const t=new Map,r=(s,o)=>bE(s,o,n,e),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(t.has(o)||t.set(o,bE(o,void 0,n,e)),t.get(o))})}const _se=(n,e)=>e.isSVG??XR(n)?new Jre(e):new $re(e,{allowProjection:n!==M.Fragment});class wse extends tu{constructor(e){super(e),e.animationState||(e.animationState=rie(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Rw(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let Sse=0;class bse extends tu{constructor(){super(...arguments),this.id=Sse++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Ese={animation:{Feature:wse},exit:{Feature:bse}};function ev(n){return{point:{x:n.pageX,y:n.pageY}}}const Tse=n=>e=>jR(e)&&n(e,ev(e));function vg(n,e,t,r){return iy(n,e,Tse(t),r)}const Bz=({current:n})=>n?n.ownerDocument.defaultView:null,vk=(n,e)=>Math.abs(n-e);function Mse(n,e){const t=vk(n.x,e.x),r=vk(n.y,e.y);return Math.sqrt(t**2+r**2)}const xk=new Set(["auto","scroll"]);class zz{constructor(e,t,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=g=>{this.handleScroll(g.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=TE(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,_=Mse(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!_)return;const{point:x}=g,{timestamp:y}=ii;this.history.push({...x,timestamp:y});const{onStart:S,onMove:b}=this.handlers;v||(S&&S(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,g)},this.handlePointerMove=(g,v)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=EE(v,this.transformPagePoint),Hn.update(this.updatePoint,!0)},this.handlePointerUp=(g,v)=>{this.end();const{onEnd:_,onSessionEnd:x,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=TE(g.type==="pointercancel"?this.lastMoveEventInfo:EE(v,this.transformPagePoint),this.history);this.startEvent&&_&&_(g,S),x&&x(g,S)},!jR(e))return;this.dragSnapToOrigin=s,this.handlers=t,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=ev(e),c=EE(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=ii;this.history=[{...u,timestamp:d}];const{onSessionStart:m}=t;m&&m(e,TE(c,this.history)),this.removeListeners=Qy(vg(this.contextWindow,"pointermove",this.handlePointerMove),vg(this.contextWindow,"pointerup",this.handlePointerUp),vg(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){const r=getComputedStyle(t);(xk.has(r.overflowX)||xk.has(r.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const r=e===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:i.x-t.x,y:i.y-t.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(e,i),Hn.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Vc(this.updatePoint)}}function EE(n,e){return e?{point:e(n.point)}:n}function _k(n,e){return{x:n.x-e.x,y:n.y-e.y}}function TE({point:n},e){return{point:n,delta:_k(n,Hz(e)),offset:_k(n,Ase(e)),velocity:Cse(e,.1)}}function Ase(n){return n[0]}function Hz(n){return n[n.length-1]}function Cse(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,r=null;const i=Hz(n);for(;t>=0&&(r=n[t],!(i.timestamp-r.timestamp>Ea(e)));)t--;if(!r)return{x:0,y:0};const s=yo(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Rse(n,{min:e,max:t},r){return e!==void 0&&n<e?n=r?nr(e,n,r.min):Math.max(n,e):t!==void 0&&n>t&&(n=r?nr(t,n,r.max):Math.min(n,t)),n}function wk(n,e,t){return{min:e!==void 0?n.min+e:void 0,max:t!==void 0?n.max+t-(n.max-n.min):void 0}}function Pse(n,{top:e,left:t,bottom:r,right:i}){return{x:wk(n.x,t,i),y:wk(n.y,e,r)}}function Sk(n,e){let t=e.min-n.min,r=e.max-n.max;return e.max-e.min<n.max-n.min&&([t,r]=[r,t]),{min:t,max:r}}function Nse(n,e){return{x:Sk(n.x,e.x),y:Sk(n.y,e.y)}}function Ise(n,e){let t=.5;const r=Ji(n),i=Ji(e);return i>r?t=ey(e.min,e.max-r,n.min):r>i&&(t=ey(n.min,n.max-i,e.min)),ka(0,1,t)}function Lse(n,e){const t={};return e.min!==void 0&&(t.min=e.min-n.min),e.max!==void 0&&(t.max=e.max-n.min),t}const wA=.35;function Dse(n=wA){return n===!1?n=0:n===!0&&(n=wA),{x:bk(n,"left","right"),y:bk(n,"top","bottom")}}function bk(n,e,t){return{min:Ek(n,e),max:Ek(n,t)}}function Ek(n,e){return typeof n=="number"?n:n[e]||0}const kse=new WeakMap;class Ose{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Dr(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{t?(this.stopAnimation(),this.snapToCursor(ev(d).point)):this.pauseAnimation()},o=(d,m)=>{this.stopAnimation();const{drag:g,dragPropagation:v,onDragStart:_}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bre(g),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),lo(y=>{let S=this.getAxisMotionValue(y).get()||0;if(Ta.test(S)){const{projection:b}=this.visualElement;if(b&&b.layout){const A=b.layout.layoutBox[y];A&&(S=Ji(A)*(parseFloat(S)/100))}}this.originPoint[y]=S}),_&&Hn.postRender(()=>_(d,m)),pA(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,m)=>{this.latestPointerEvent=d,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:_,onDrag:x}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:y}=m;if(v&&this.currentDirection===null){this.currentDirection=Fse(y),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",m.point,y),this.updateAxis("y",m.point,y),this.visualElement.render(),x&&x(d,m)},l=(d,m)=>{this.latestPointerEvent=d,this.latestPanInfo=m,this.stop(d,m),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>lo(d=>{var m;return this.getAnimationState(d)==="paused"&&((m=this.getAxisMotionValue(d).animation)==null?void 0:m.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new zz(e,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Bz(this.visualElement),element:this.visualElement.current})}stop(e,t){const r=e||this.latestPointerEvent,i=t||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&Hn.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,r){const{drag:i}=this.getProps();if(!r||!H0(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=Rse(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:e,dragElastic:t}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;e&&Ym(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=Pse(r.layoutBox,e):this.constraints=!1,this.elastic=Dse(t),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&lo(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Lse(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ym(e))return!1;const r=e.current;ip(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=jre(r,i.root,this.visualElement.getTransformPagePoint());let o=Nse(i.layout.layoutBox,s);if(t){const a=t(Fre(o));this.hasMutatedConstraints=!!a,a&&(o=uz(a))}return o}startAnimation(e){const{drag:t,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=lo(u=>{if(!H0(u,t,this.currentDirection))return;let d=l&&l[u]||{};o&&(d={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,v={type:"inertia",velocity:r?e[u]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,t){const r=this.getAxisMotionValue(e);return pA(this.visualElement,e),r.start(kR(e,r,0,t,this.visualElement,!1))}stopAnimation(){lo(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){lo(e=>{var t;return(t=this.getAxisMotionValue(e).animation)==null?void 0:t.pause()})}getAnimationState(e){var t;return(t=this.getAxisMotionValue(e).animation)==null?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[t];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){lo(t=>{const{drag:r}=this.getProps();if(!H0(t,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(t);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[t],l=s.get()||0;s.set(e[t]-nr(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!Ym(t)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};lo(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Ise({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),lo(o=>{if(!H0(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(nr(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;kse.set(this.visualElement,this);const e=this.visualElement.current,t=vg(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&!iz(l.target)&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ym(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Hn.read(r);const o=iy(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(lo(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),t(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=wA,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function H0(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function Fse(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class Use extends tu{constructor(e){super(e),this.removeGroupControls=xo,this.removeListeners=xo,this.controls=new Ose(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xo}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const Tk=n=>(e,t)=>{n&&Hn.postRender(()=>n(e,t))};class Vse extends tu{constructor(){super(...arguments),this.removePointerDownListener=xo}onPointerDown(e){this.session=new zz(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bz(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Tk(e),onStart:Tk(t),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Hn.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=vg(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ME=!1;class jse extends M.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=e;s&&(t.group&&t.group.add(s),r&&r.register&&i&&r.register(s),ME&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),p_.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,ME=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==s?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||Hn.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),VR.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:i}=e;ME=!0,i&&(i.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Gz(n){const[e,t]=Iz(),r=M.useContext(yR);return f.jsx(jse,{...n,layoutGroup:r,switchLayoutGroup:M.useContext(Vz),isPresent:e,safeToRemove:t})}const Bse={pan:{Feature:Vse},drag:{Feature:Use,ProjectionNode:Nz,MeasureLayout:Gz}};function Mk(n,e,t){const{props:r}=n;n.animationState&&r.whileHover&&n.animationState.setActive("whileHover",t==="Start");const i="onHover"+t,s=r[i];s&&Hn.postRender(()=>s(e,ev(e)))}class zse extends tu{mount(){const{current:e}=this.node;e&&(this.unmount=Ere(e,(t,r)=>(Mk(this.node,r,"Start"),i=>Mk(this.node,i,"End"))))}unmount(){}}class Hse extends tu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Qy(iy(this.node.current,"focus",()=>this.onFocus()),iy(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ak(n,e,t){const{props:r}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&r.whileTap&&n.animationState.setActive("whileTap",t==="Start");const i="onTap"+(t==="End"?"":t),s=r[i];s&&Hn.postRender(()=>s(e,ev(e)))}class Gse extends tu{mount(){const{current:e}=this.node;e&&(this.unmount=Are(e,(t,r)=>(Ak(this.node,r,"Start"),(i,{success:s})=>Ak(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const SA=new WeakMap,AE=new WeakMap,Wse=n=>{const e=SA.get(n.target);e&&e(n)},$se=n=>
501{n.forEach(Wse)};function qse({root:n,...e}){const t=n||document;AE.has(t)||AE.set(t,{});const r=AE.get(t),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver($se,{root:n,...e})),r[i]}function Xse(n,e,t){const r=qse(e);return SA.set(n,t),r.observe(n),()=>{SA.delete(n),r.unobserve(n)}}const Kse={some:0,all:1};class Yse extends tu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:r,amount:i="some",once:s}=e,o={root:t?t.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Kse[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),m=c?u:d;m&&m(l)};return Xse(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(Qse(e,t))&&this.startObserver()}unmount(){}}function Qse({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const Jse={inView:{Feature:Yse},tap:{Feature:Gse},focus:{Feature:Hse},hover:{Feature:zse}},Zse={layout:{ProjectionNode:Nz,MeasureLayout:Gz}},eoe={...Ese,...Jse,...Bse,...Zse},Oe=xse(eoe,_se),toe=q2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),mt=M.forwardRef(({className:n,variant:e,size:t,asChild:r=!1,...i},s)=>{const o=r?NK:"button";return f.jsx(o,{className:Ot(toe({variant:e,size:t,className:n})),ref:s,...i})});mt.displayName="Button";const Ck=[{name:"Home",path:"/"},{name:"Products",path:"/products"},{name:"Tools",path:"/tools"},{name:"About",path:"/about"},{name:"Success Stories",path:"/success-stories"}],noe=()=>{const[n,e]=M.useState(!1),[t,r]=M.useState(!1),i=eu(),{theme:s,setTheme:o,resolvedTheme:a}=z2();M.useEffect(()=>{r(!0)},[]);const l=()=>{o(a==="dark"?"light":"dark")};return f.jsxs(Oe.nav,{initial:{y:-100},animate:{y:0},transition:{duration:.6,ease:"easeOut"},className:"fixed top-0 left-0 right-0 z-50 glass-nav",children:[f.jsx("div",{className:"container mx-auto px-6",children:f.jsxs("div",{className:"flex items-center justify-between h-20",children:[f.jsxs(wr,{to:"/",className:"flex items-center gap-3 group",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center group-hover:shadow-lg group-hover:shadow-primary/30 transition-shadow duration-300 overflow-hidden",children:f.jsx("img",{src:"/RecforgeLogo.png",alt:"Recforge Logo",className:"w-full h-full object-contain"})}),f.jsxs("span",{className:"font-display font-semibold text-xl text-foreground",children:["Recforge International",f.jsx("span",{className:"text-primary"})]})]}),f.jsx("div",{className:"hidden md:flex items-center gap-8",children:Ck.map(c=>f.jsxs(wr,{to:c.path,className:`relative text-sm font-medium transition-colors duration-300 ${i.pathname===c.path?"text-primary":"text-muted-foreground hover:text-foreground"}`,children:[c.name,i.pathname===c.path&&f.jsx(Oe.div,{layoutId:"activeNav",className:"absolute -bottom-1 left-0 right-0 h-0.5 bg-gradient-to-r from-primary to-secondary rounded-full"})]},c.path))}),f.jsx("div",{className:"hidden md:flex items-center gap-4",children:t&&f.jsx(mt,{variant:"ghost",size:"icon",onClick:l,className:"text-muted-foreground hover:text-foreground","aria-label":"Toggle theme",children:a==="dark"?f.jsx(DL,{size:20}):f.jsx(LL,{size:20})})}),f.jsx("button",{onClick:()=>e(!n),className:"md:hidden p-2 text-foreground",children:n?f.jsx(Xy,{size:24}):f.jsx(QV,{size:24})})]})}),f.jsx($R,{children:n&&f.jsx(Oe.div,{initial:{opacity:0,height:0}
501,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"md:hidden glass-card border-t border-white/5",children:f.jsxs("div",{className:"container mx-auto px-6 py-6 flex flex-col gap-4",children:[Ck.map((c,u)=>f.jsx(Oe.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:u*.1},children:f.jsx(wr,{to:c.path,onClick:()=>e(!1),className:`block py-2 text-lg font-medium ${i.pathname===c.path?"text-primary":"text-muted-foreground"}`,children:c.name})},c.path)),f.jsx(Oe.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.4},className:"pt-4 flex flex-col gap-3",children:t&&f.jsx(mt,{variant:"outline",onClick:l,className:"w-full border-border justify-start gap-2",children:a==="dark"?f.jsxs(f.Fragment,{children:[f.jsx(DL,{size:18}),"Switch to Light Mode"]}):f.jsxs(f.Fragment,{children:[f.jsx(LL,{size:18}),"Switch to Dark Mode"]})})})]})})})]})},CE={products:[{name:"LMS Platform",href:"/products/lms"},{name:"Virtual Classroom",href:"/products/virtual-classroom"},{name:"Assessment Tools",href:"/products/assessment"},{name:"Analytics Dashboard",href:"/products/analytics"}],company:[{name:"About Us",href:"/about"},{name:"Success Stories",href:"/success-stories"},{name:"Projects",href:"/projects"},{name:"Careers",href:"/careers"},{name:"Contact",href:"/contact"}],resources:[{name:"Documentation",href:"/docs"},{name:"Blog",href:"/blog"},{name:"Case Studies",href:"/case-studies"},{name:"Support",href:"/support"}]},roe=[{icon:DY,href:"#",label:"GitHub"},{icon:JY,href:"#",label:"Twitter"},{icon:VY,href:"#",label:"LinkedIn"},{icon:Y2,href:"#",label:"Email"}],ioe=()=>f.jsxs("footer",{className:"relative border-t border-white/5 bg-background",children:[f.jsx("div",{className:"absolute inset-0 gradient-mesh opacity-30 pointer-events-none"}),f.jsxs("div",{className:"container mx-auto px-6 py-16 relative",children:[f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-12",children:[f.jsxs("div",{className:"lg:col-span-2",children:[f.jsxs(wr,{to:"/",className:"flex items-center gap-3 mb-6",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-primary to-secondary flex items-center justify-center",children:f.jsx("span",{className:"text-primary-foreground font-display font-bold text-lg",children:"R"})}),f.jsxs("span",{className:"font-display font-semibold text-xl text-foreground",children:["Recforge International",f.jsx("span",{className:"text-primary",children:"."})]})]}),f.jsx("p",{className:"text-muted-foreground max-w-sm mb-6",children:"Transforming education through innovative technology solutions. Building the future of learning, one platform at a time."}),f.jsx("div",{className:"flex items-center gap-4",children:roe.map(n=>f.jsx(Oe.a,{href:n.href,whileHover:{scale:1.1},whileTap:{scale:.95},className:"w-10 h-10 rounded-lg glass-card flex items-center justify-center text-muted-foreground hover:text-primary transition-colors","aria-label":n.label,children:f.jsx(n.icon,{size:18})},n.label))})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"font-display font-semibold text-foreground mb-4",children:"Products"}),f.jsx("ul",{className:"space-y-3",children:CE.products.map(n=>f.jsx("li",{children:f.jsxs(wr,{to:n.href,className:"text-muted-foreground hover:text-primary transition-colors text-sm flex items-center gap-1 group",children:[n.name,f.jsx(c_,{size:12,className:"opacity-0 group-hover:opacity-100 transition-opacity"})]})},n.name))})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"font-display font-semibold text-foreground mb-4",children:"Company"}),f.jsx("ul",{className:"space-y-3",children:CE.company.map(n=>f.jsx("li",{children:f.jsxs(wr,{to:n.href,className:"text-muted-foreground hover:text-primary transition-colors text-sm flex items-center gap-1 group",children:[n.name,f.jsx(c_,{size:12,className:"opacity-0 group-hover:opacity-100 transition-opacity"})]})},n.name))})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"font-display font-semibold text-foreground mb-4",children:"Resources"}),f.jsx("ul",{className:"space-y-3",children:CE.resources.map(n=>f.jsx("li",{children:f.jsxs(wr,{to:n.href,className:"text-muted-foreground hover:text-primary transition-colors text-sm flex items-center gap-1 group",children:[n.name,f.jsx(c_,{size:12,className:"opacity-0 group-hover:opacity-100 transition-opacity"})]})},n.name))})]})]}),f.jsxs("div",{className:"mt-16 pt-8 border-t border-white/5 flex flex-col md:flex-row items-center justify-between gap-4",children:[f.jsxs("p",{className:"text-muted-foreground text-sm",children:["© ",new Date().getFullYear()," Recforge International. All rights reserved."]}),f.jsxs("div",{className:"flex items-center gap-6",children:[f.jsx(wr,{to:"/privacy",className:"text-muted-foreground hover:text-foreground text-sm transition-colors",children:"Privacy Policy"}),f.jsx(wr,{to:"/terms",className:"text-muted-foreground hover:text-foreground text-sm transition-colors",children:"Terms of Service"})]})]})]})]}),soe=()=>{const{pathname:n}=eu();M.useEffect(()=>{window.scrollTo(0,0)},[n])},Ma=({children:n,showFooter:e=!0})=>(soe(),f.jsxs("div",{className:"min-h-screen bg-background",children:[f.jsx(noe,{}),f.jsx("main",{className:"pt-20",children:n}),e&&f.jsx(ioe,{})]}));/** 502 * @license 503 * Copyright 2010-2023 Three.js Authors 504 * SPDX-License-Identifier: MIT 505 */const Np="160",ooe={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},aoe={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Wz=0,bA=1,$z=2,loe=3,qz=0,Iw=1,xg=2,Vo=3,_l=0,Zr=1,Us=2,coe=2,dl=0,hd=1,S1=2,EA=3,TA=4,Xz=5,ic=100,Kz=101,Yz=102,MA=103,AA=104,Qz=200,Jz=201,Zz=202,e6=203,b1=204,E1=205,t6=206,n6=207,r6=208,i6=209,s6=210,o6=211,a6=212,l6=213,c6=214,u6=0,d6=1,h6=2,sy=3,f6=4,p6=5,m6=6,g6=7,tv=0,y6=1,v6=2,Aa=0,x6=1,_6=2,w6=3,KR=4,S6=5,b6=6,CA="attached",E6="detached",Lw=300,wl=301,Bc=302,oy=303,ay=304,Ip=306,ly=1e3,Ii=1001,cy=1002,xr=1003,T1=1004,uoe=1004,_g=1005,doe=1005,Sr=1006,YR=1007,hoe=1007,zc=1008,foe=1008,Ca=1009,T6=1010,M6=1011,Dw=1012,QR=1013,ll=1014,$o=1015,op=1016,JR=1017,ZR=1018,Ec=1020,A6=1021,Xi=1023,C6=1024,R6=1025,Tc=1026,Ed=1027,P6=1028,eP=1029,N6=1030,tP=1031,nP=1033,m_=33776,g_=33777,y_=33778,v_=33779,RA=35840,PA=35841,NA=35842,IA=35843,rP=36196,LA=37492,DA=37496,kA=37808,OA=37809,FA=37810,UA=37811,VA=37812,jA=37813,BA=37814,zA=37815,HA=37816,GA=37817,WA=37818,$A=37819,qA=37820,XA=37821,x_=36492,KA=36494,YA=36495,I6=36283,QA=36284,JA=36285,ZA=36286,L6=2200,D6=2201,k6=2202,uy=2300,dy=2301,__=2302,Qu
vendor: 6,367 bytes, line 505
505=2400,Ju=2401,hy=2402,kw=2500,iP=2501,poe=0,moe=1,goe=2,sP=3e3,Mc=3001,O6=3200,F6=3201,nu=0,U6=1,Vs="",Or="srgb",Oa="srgb-linear",Ow="display-p3",nv="display-p3-linear",fy="linear",On="srgb",py="rec709",my="p3",yoe=0,zu=7680,voe=7681,xoe=7682,_oe=7683,woe=34055,Soe=34056,boe=5386,Eoe=512,Toe=513,Moe=514,Aoe=515,Coe=516,Roe=517,Poe=518,eC=519,V6=512,j6=513,B6=514,oP=515,z6=516,H6=517,G6=518,W6=519,gy=35044,Noe=35048,Ioe=35040,Loe=35045,Doe=35049,koe=35041,Ooe=35046,Foe=35050,Uoe=35042,Voe="100",tC="300 es",M1=1035,qo=2e3,ap=2001;class Rl{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(t)===-1&&r[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const s=i.indexOf(t);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<o;s++)i[s].call(this,e);e.target=null}}}const bi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let Rk=1234567;const fd=Math.PI/180,lp=180/Math.PI;function Gs(){const n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,r=Math.random()*4294967295|0;return(bi[n&255]+bi[n>>8&255]+bi[n>>16&255]+bi[n>>24&255]+"-"+bi[e&255]+bi[e>>8&255]+"-"+bi[e>>16&15|64]+bi[e>>24&255]+"-"+bi[t&63|128]+bi[t>>8&255]+"-"+bi[t>>16&255]+bi[t>>24&255]+bi[r&255]+bi[r>>8&255]+bi[r>>16&255]+bi[r>>24&255]).toLowerCase()}function fr(n,e,t){return Math.max(e,Math.min(t,n))}function aP(n,e){return(n%e+e)%e}function joe(n,e,t,r,i){return r+(n-e)*(i-r)/(t-e)}function Boe(n,e,t){return n!==e?(t-n)/(e-n):0}function wg(n,e,t){return(1-t)*n+t*e}function zoe(n,e,t,r){return wg(n,e,1-Math.exp(-t*r))}function Hoe(n,e=1){return e-Math.abs(aP(n,e*2)-e)}function Goe(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function Woe(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function $oe(n,e){return n+Math.floor(Math.random()*(e-n+1))}function qoe(n,e){return n+Math.random()*(e-n)}function Xoe(n){return n*(.5-Math.random())}function Koe(n){n!==void 0&&(Rk=n);let e=Rk+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function Yoe(n){return n*fd}function Qoe(n){return n*lp}function nC(n){return(n&n-1)===0&&n!==0}function Joe(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function A1(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function Zoe(n,e,t,r,i){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),c=s((e+r)/2),u=o((e+r)/2),d=s((e-r)/2),m=o((e-r)/2),g=s((r-e)/2),v=o((r-e)/2);switch(i){case"XYX":n.set(a*u,l*d,l*m,a*c);break;case"YZY":n.set(l*m,a*u,l*d,a*c);break;case"ZXZ":n.set(l*d,l*m,a*u,a*c);break;case"XZX":n.set(a*u,l*v,l*g,a*c);break;case"YXY":n.set(l*g,a*u,l*v,a*c);break;case"ZYZ":n.set(l*v,l*g,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function ms(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Qt(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const $6={DEG2RAD:fd,RAD2DEG:lp,generateUUID:Gs,clamp:fr,euclideanModulo:aP,mapLinear:joe,inverseLerp:Boe,lerp:wg,damp:zoe,pingpong:Hoe,smoothstep:Goe,smootherstep:Woe,randInt:$oe,randFloat:qoe,randFloatSpread:Xoe,seededRandom:Koe,degToRad:Yoe,radToDeg:Qoe,isPowerOfTwo:nC,ceilPowerOfTwo:Joe,floorPowerOfTwo:A1,setQuaternionFromProperEuler:Zoe,normalize:Qt,denormalize:ms};class Te{constructor(e=0,t=0){Te.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}
vendor: 23,591 bytes, line 505
505sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,r=this.y,i=e.elements;return this.x=i[0]*t+i[3]*r+i[6],this.y=i[1]*t+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,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,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 t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const r=this.dot(e)/t;return Math.acos(fr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,r=this.y-e.y;return t*t+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,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const r=Math.cos(t),i=Math.sin(t),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 en{constructor(e,t,r,i,s,o,a,l,c){en.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,r,i,s,o,a,l,c)}set(e,t,r,i,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=t,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 t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],this}extractBasis(e,t,r){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const r=e.elements,i=t.elements,s=this.elements,o=r[0],a=r[3],l=r[6],c=r[1],u=r[4],d=r[7],m=r[2],g=r[5],v=r[8],_=i[0],x=i[3],y=i[6],S=i[1],b=i[4],A=i[7],k=i[2],L=i[5],C=i[8];return s[0]=o*_+a*S+l*k,s[3]=o*x+a*b+l*L,s[6]=o*y+a*A+l*C,s[1]=c*_+u*S+d*k,s[4]=c*x+u*b+d*L,s[7]=c*y+u*A+d*C,s[2]=m*_+g*S+v*k,s[5]=m*x+g*b+v*L,s[8]=m*y+g*A+v*C,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],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 t*o*u-t*a*c-r*s*u+r*a*l+i*s*c-i*o*l}invert(){const e=this.elements,t=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],d=u*o-a*c,m=a*l-u*s,g=c*s-o*l,v=t*d+r*m+i*g;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/v;return e[0]=d*_,e[1]=(i*c-u*r)*_,e[2]=(a*r-i*o)*_,e[3]=m*_,e[4]=(u*t-i*l)*_,e[5]=(i*s-a*t)*_,e[6]=g*_,e[7]=(r*l-c*t)*_,e[8]=(o*t-r*s)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,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+t,0,0,1),this}scale(e,t){return this.premultiply(RE.makeScale(e,t)),this}rotate(e){return this.premultiply(RE.makeRotation(-e)),this}translate(e,t){return this.premultiply(RE.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,r,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,r=e.elements;for(let i=0;i<9;i++)if(t[i]!==r[i])return!1;return!0}fromArray(e,t=0){for(let r=0;r<9;r++)this.elements[r]=e[r+t];return this}toArray(e=[],t=0){const r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const RE=new en;function q6(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const eae={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function mf(n,e){return new eae[n](e)}function yy(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function X6(){const n=yy("canvas");return n.style.display="block",n}const Pk={};function Sg(n){n in Pk||(Pk[n]=!0,console.warn(n))}const Nk=new en().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Ik=new en().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),G0={[Oa]:{transfer:fy,primaries:py,toReference:n=>n,fromReference:n=>n},[Or]:{transfer:On,primaries:py,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[nv]:{transfer:fy,primaries:my,toReference:n=>n.applyMatrix3(Ik),fromReference:n=>n.applyMatrix3(Nk)},[Ow]:{transfer:On,primaries:my,toReference:n=>n.convertSRGBToLinear().applyMatrix3(Ik),fromReference:n=>n.applyMatrix3(Nk).convertLinearToSRGB()}},tae=new Set([Oa,nv]),Pn={enabled:!0,_workingColorSpace:Oa,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!tae.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const r=G0[e].toReference,i=G0[t].fromReference;return i(r(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return G0[n].primaries},getTransfer:function(n){return n===Vs?fy:G0[n].transfer}};function Lf(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function PE(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let xh;class lP{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{xh===void 0&&(xh=yy("canvas")),xh.width=e.width,xh.height=e.height;const r=xh.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),t=xh}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=yy("canvas");t.width=e.width,t.height=e.height;const r=t.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]=Lf(s[o]/255)*255;return r.putImageData(i,0,0),t}else if(e.data){const t=e.data.slice(0);for(let r=0;r<t.length;r++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[r]=Math.floor(Lf(t[r]/255)*255):t[r]=Lf(t[r]);return{data:t,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let nae=0;class Zu{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:nae++}),this.uuid=Gs(),this.data=e,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&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(NE(i[o].image)):s.push(NE(i[o]))}else s=NE(i);r.url=s}return t||(e.images[this.uuid]=r),r}}function NE(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?lP.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let rae=0;class br extends Rl{constructor(e=br.DEFAULT_IMAGE,t=br.DEFAULT_MAPPING,r=Ii,i=Ii,s=Sr,o=zc,a=Xi,l=Ca,c=br.DEFAULT_ANISOTROPY,u=Vs){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:rae++}),this.uuid=Gs(),this.name="",this.source=new Zu(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=r,this.wrapT=i,this.magFilter=s,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new Te(0,0),this.repeat=new Te(1,1),this.center=new Te(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new en,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,typeof u=="string"?this.colorSpace=u:(Sg("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=u===Mc?Or:Vs),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const r={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),t||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Lw)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case ly:e.x=e.x-Math.floor(e.x);break;case Ii:e.x=e.x<0?0:1;break;case cy:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case ly:e.y=e.y-Math.floor(e.y);break;case Ii:e.y=e.y<0?0:1;break;case cy: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)}get encoding(){return Sg("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Or?Mc:sP}set encoding(e){Sg("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Mc?Or:Vs}}br.DEFAULT_IMAGE=null;br.DEFAULT_MAPPING=Lw;br.DEFAULT_ANISOTROPY=1;class Nn{constructor(e=0,t=0,r=0,i=1){Nn.prototype.isVector4=!0,this.x=e,this.y=t,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,t,r,i){return this.x=e,this.y=t,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,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=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,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){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,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,r=this.y,i=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*r+o[8]*i+o[12]*s,this.y=o[1]*t+o[5]*r+o[9]*i+o[13]*s,this.z=o[2]*t+o[6]*r+o[10]*i+o[14]*s,this.w=o[3]*t+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 t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,r,i,s;const l=e.elements,c=l[0],u=l[4],d=l[8],m=l[1],g=l[5],v=l[9],_=l[2],x=l[6],y=l[10];if(Math.abs(u-m)<.01&&Math.abs(d-_)<.01&&Math.abs(v-x)<.01){if(Math.abs(u+m)<.1&&Math.abs(d+_)<.1&&Math.abs(v+x)<.1&&Math.abs(c+g+y-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(c+1)/2,A=(g+1)/2,k=(y+1)/2,L=(u+m)/4,C=(d+_)/4,P=(v+x)/4;return b>A&&b>k?b<.01?(r=0,i=.707106781,s=.707106781):(r=Math.sqrt(b),i=L/r,s=C/r):A>k?A<.01?(r=.707106781,i=0,s=.707106781):(i=Math.sqrt(A),r=L/i,s=P/i):k<.01?(r=.707106781,i=.707106781,s=0):(s=Math.sqrt(k),r=C/s,i=P/s),this.set(r,i,s,t),this}let S=Math.sqrt((x-v)*(x-v)+(d-_)*(d-_)+(m-u)*(m-u));return Math.abs(S)<.001&&(S=1),this.x=(x-v)/S,this.y=(d-_)/S,this.z=(m-u)/S,this.w=Math.acos((c+g+y-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,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,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this.w=e.w+(t.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,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class K6 extends Rl{constructor(e=1,t=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Nn(0,0,e,t),this.scissorTest=!1,this.viewport=new Nn(0,0,e,t);const i={width:e,height:t,depth:1};r.encoding!==void 0&&(Sg("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),r.colorSpace=r.encoding===Mc?Or:Vs),r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Sr,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},r),this.texture=new br(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=r.generateMipmaps,this.texture.internalFormat=r.internalFormat,this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,this.depthTexture=r.depthTexture,this.samples=r.samples}setSize(e,t,r=1){(this.width!==e||this.height!==t||this.depth!==r)&&(this.width=e,this.height=t,this.depth=r,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=r,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){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.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Zu(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class ta extends K6{constructor(e=1,t=1,r={}){super(e,t,r),this.isWebGLRenderTarget=!0}}class Fw extends br{constructor(e=null,t=1,r=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:r,depth:i},this.magFilter=xr,this.minFilter=xr,this.wrapR=Ii,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class iae extends ta{constructor(e=1,t=1,r=1,i={}){super(e,t,i),this.isWebGLArrayRenderTarget=!0,this.depth=r,this.texture=new Fw(null,e,t,r),this.texture.isRenderTargetTexture=!0}}class cP extends br{constructor(e=null,t=1,r=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:r,depth:i},this.magFilter=xr,this.minFilter=xr,this.wrapR=Ii,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class sae extends ta{constructor(e=1,t=1,r=1,i={}){super(e,t,i),this.isWebGL3DRenderTarget=!0,this.depth=r,this.texture=new cP(null,e,t,r),this.texture.isRenderTargetTexture=!0}}class oae extends ta{constructor(e=1,t=1,r=1,i={}){super(e,t,i),this.isWebGLMultipleRenderTargets=!0;const s=this.texture;this.texture=[];for(let o=0;o<r;o++)this.texture[o]=s.clone(),this.texture[o].isRenderTargetTexture=!0}setSize(e,t,r=1){if(this.width!==e||this.height!==t||this.depth!==r){this.width=e,this.height=t,this.depth=r;for(let i=0,s=this.texture.length;i<s;i++)this.texture[i].image.width=e,this.texture[i].image.height=t,this.texture[i].image.depth=r;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}copy(e){this.dispose(),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.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.texture.length=0;for(let t=0,r=e.texture.length;t<r;t++)this.texture[t]=e.texture[t].clone(),this.texture[t].isRenderTargetTexture=!0;return this}}class ws{constructor(e=0,t=0,r=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=r,this._w=i}static slerpFlat(e,t,r,i,s,o,a){let l=r[i+0],c=r[i+1],u=r[i+2],d=r[i+3];const m=s[o+0],g=s[o+1],v=s[o+2],_=s[o+3];if(a===0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=d;return}if(a===1){e[t+0]=m,e[t+1]=g,e[t+2]=v,e[t+3]=_;return}if(d!==_||l!==m||c!==g||u!==v){let x=1-a;const y=l*m+c*g+u*v+d*_,S=y>=0?1:-1,b=1-y*y;if(b>Number.EPSILON){const k=Math.sqrt(b),L=Math.atan2(k,y*S);x=Math.sin(x*L)/k,a=Math.sin(a*L)/k}const A=a*S;if(l=l*x+m*A,c=c*x+g*A,u=u*x+v*A,d=d*x+_*A,x===1-a){const k=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=k,c*=k,u*=k,d*=k}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=d}static multiplyQuaternionsFlat(e,t,r,i,s,o){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],d=s[o],m=s[o+1],g=s[o+2],v=s[o+3];return e[t]=a*v+u*d+l*g-c*m,e[t+1]=l*v+u*m+c*d-a*g,e[t+2]=c*v+u*g+a*m-l*d,e[t+3]=u*v-a*d-l*m-c*g,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}
vendor: 4,538 bytes, line 505
505set(e,t,r,i){return this._x=e,this._y=t,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,t=!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),d=a(s/2),m=l(r/2),g=l(i/2),v=l(s/2);switch(o){case"XYZ":this._x=m*u*d+c*g*v,this._y=c*g*d-m*u*v,this._z=c*u*v+m*g*d,this._w=c*u*d-m*g*v;break;case"YXZ":this._x=m*u*d+c*g*v,this._y=c*g*d-m*u*v,this._z=c*u*v-m*g*d,this._w=c*u*d+m*g*v;break;case"ZXY":this._x=m*u*d-c*g*v,this._y=c*g*d+m*u*v,this._z=c*u*v+m*g*d,this._w=c*u*d-m*g*v;break;case"ZYX":this._x=m*u*d-c*g*v,this._y=c*g*d+m*u*v,this._z=c*u*v-m*g*d,this._w=c*u*d+m*g*v;break;case"YZX":this._x=m*u*d+c*g*v,this._y=c*g*d+m*u*v,this._z=c*u*v-m*g*d,this._w=c*u*d-m*g*v;break;case"XZY":this._x=m*u*d-c*g*v,this._y=c*g*d-m*u*v,this._z=c*u*v+m*g*d,this._w=c*u*d+m*g*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const r=t/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 t=e.elements,r=t[0],i=t[4],s=t[8],o=t[1],a=t[5],l=t[9],c=t[2],u=t[6],d=t[10],m=r+a+d;if(m>0){const g=.5/Math.sqrt(m+1);this._w=.25/g,this._x=(u-l)*g,this._y=(s-c)*g,this._z=(o-i)*g}else if(r>a&&r>d){const g=2*Math.sqrt(1+r-a-d);this._w=(u-l)/g,this._x=.25*g,this._y=(i+o)/g,this._z=(s+c)/g}else if(a>d){const g=2*Math.sqrt(1+a-r-d);this._w=(s-c)/g,this._x=(i+o)/g,this._y=.25*g,this._z=(l+u)/g}else{const g=2*Math.sqrt(1+d-r-a);this._w=(o-i)/g,this._x=(s+c)/g,this._y=(l+u)/g,this._z=.25*g}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let r=e.dot(t)+1;return r<Number.EPSILON?(r=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(fr(this.dot(e),-1,1)))}rotateTowards(e,t){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,t/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,t){const r=e._x,i=e._y,s=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._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,t){if(t===0)return this;if(t===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<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=r,this._y=i,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const g=1-t;return this._w=g*o+t*this._w,this._x=g*r+t*this._x,this._y=g*i+t*this._y,this._z=g*s+t*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),d=Math.sin((1-t)*u)/c,m=Math.sin(t*u)/c;return this._w=o*d+this._w*m,this._x=r*d+this._x*m,this._y=i*d+this._y*m,this._z=s*d+this._z*m,this._onChangeCallback(),this}slerpQuaternions(e,t,r){return this.copy(e).slerp(t,r)}random(){const e=Math.random(),t=Math.sqrt(1-e),r=Math.sqrt(e),i=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(t*Math.cos(i),r*Math.sin(s),r*Math.cos(s),t*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}
vendor: 12,970 bytes, line 505
505_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class K{constructor(e=0,t=0,r=0){K.prototype.isVector3=!0,this.x=e,this.y=t,this.z=r}set(e,t,r){return r===void 0&&(r=this.z),this.x=e,this.y=t,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,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){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,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){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,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.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,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Lk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Lk.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,r=this.y,i=this.z,s=e.elements;return this.x=s[0]*t+s[3]*r+s[6]*i,this.y=s[1]*t+s[4]*r+s[7]*i,this.z=s[2]*t+s[5]*r+s[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,r=this.y,i=this.z,s=e.elements,o=1/(s[3]*t+s[7]*r+s[11]*i+s[15]);return this.x=(s[0]*t+s[4]*r+s[8]*i+s[12])*o,this.y=(s[1]*t+s[5]*r+s[9]*i+s[13])*o,this.z=(s[2]*t+s[6]*r+s[10]*i+s[14])*o,this}applyQuaternion(e){const t=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*t-s*i),d=2*(s*r-o*t);return this.x=t+l*c+o*d-a*u,this.y=r+l*u+a*c-s*d,this.z=i+l*d+s*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,r=this.y,i=this.z,s=e.elements;return this.x=s[0]*t+s[4]*r+s[8]*i,this.y=s[1]*t+s[5]*r+s[9]*i,this.z=s[2]*t+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,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,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,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const r=e.x,i=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=i*l-s*a,this.y=s*o-r*l,this.z=r*a-i*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const r=e.dot(this)/t;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return IE.copy(this).projectOnVector(e),this.sub(IE)}reflect(e){return this.sub(IE.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const r=this.dot(e)/t;return Math.acos(fr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return t*t+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,t,r){const i=Math.sin(t)*e;return this.x=i*Math.sin(r),this.y=Math.cos(t)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,r){return this.x=e*Math.sin(t),this.y=r,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=r,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*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,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,r=Math.sqrt(1-e**2);return this.x=r*Math.cos(t),this.y=r*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const IE=new K,Lk=new ws;class es{constructor(e=new K(1/0,1/0,1/0),t=new K(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,r=e.length;t<r;t+=3)this.expandByPoint(Io.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,r=e.count;t<r;t++)this.expandByPoint(Io.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,r=e.length;t<r;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const r=Io.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}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,t=!1){e.updateWorldMatrix(!1,!1);const r=e.geometry;if(r!==void 0){const s=r.getAttribute("position");if(t===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,Io):Io.fromBufferAttribute(s,o),Io.applyMatrix4(e.matrixWorld),this.expandByPoint(Io);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),W0.copy(e.boundingBox)):(r.boundingBox===null&&r.computeBoundingBox(),W0.copy(r.boundingBox)),W0.applyMatrix4(e.matrixWorld),this.union(W0)}const i=e.children;for(let s=0,o=i.length;s<o;s++)this.expandByObject(i[s],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Io),Io.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,r;return e.normal.x>0?(t=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),t<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Am),$0.subVectors(this.max,Am),_h.subVectors(e.a,Am),wh.subVectors(e.b,Am),Sh.subVectors(e.c,Am),jl.subVectors(wh,_h),Bl.subVectors(Sh,wh),Ru.subVectors(_h,Sh);let t=[0,-jl.z,jl.y,0,-Bl.z,Bl.y,0,-Ru.z,Ru.y,jl.z,0,-jl.x,Bl.z,0,-Bl.x,Ru.z,0,-Ru.x,-jl.y,jl.x,0,-Bl.y,Bl.x,0,-Ru.y,Ru.x,0];return!LE(t,_h,wh,Sh,$0)||(t=[1,0,0,0,1,0,0,0,1],!LE(t,_h,wh,Sh,$0))?!1:(q0.crossVectors(jl,Bl),t=[q0.x,q0.y,q0.z],LE(t,_h,wh,Sh,$0))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Io).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Io).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:(Xa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Xa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Xa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Xa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Xa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Xa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Xa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Xa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Xa),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 Xa=[new K,new K,new K,new K,new K,new K,new K,new K],Io=new K,W0=new es,_h=new K,wh=new K,Sh=new K,jl=new K,Bl=new K,Ru=new K,Am=new K,$0=new K,q0=new K,Pu=new K;function LE(n,e,t,r,i){for(let s=0,o=n.length-3;s<=o;s+=3){Pu.fromArray(n,s);const a=i.x*Math.abs(Pu.x)+i.y*Math.abs(Pu.y)+i.z*Math.abs(Pu.z),l=e.dot(Pu),c=t.dot(Pu),u=r.dot(Pu);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const aae=new es,Cm=new K,DE=new K;let Di=class{constructor(e=new K,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const r=this.center;t!==void 0?r.copy(t):aae.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 t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const r=this.center.distanceToSquared(e);return t.copy(e),r>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}
vendor: 4,737 bytes, line 505
505applyMatrix4(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;Cm.subVectors(e,this.center);const t=Cm.lengthSq();if(t>this.radius*this.radius){const r=Math.sqrt(t),i=(r-this.radius)*.5;this.center.addScaledVector(Cm,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):(DE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Cm.copy(e.center).add(DE)),this.expandByPoint(Cm.copy(e.center).sub(DE))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}};const Ka=new K,kE=new K,X0=new K,zl=new K,OE=new K,K0=new K,FE=new K;class Lp{constructor(e=new K,t=new K(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.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,Ka)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const r=t.dot(this.direction);return r<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Ka.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Ka.copy(this.origin).addScaledVector(this.direction,t),Ka.distanceToSquared(e))}distanceSqToSegment(e,t,r,i){kE.copy(e).add(t).multiplyScalar(.5),X0.copy(t).sub(e).normalize(),zl.copy(this.origin).sub(kE);const s=e.distanceTo(t)*.5,o=-this.direction.dot(X0),a=zl.dot(this.direction),l=-zl.dot(X0),c=zl.lengthSq(),u=Math.abs(1-o*o);let d,m,g,v;if(u>0)if(d=o*l-a,m=o*a-l,v=s*u,d>=0)if(m>=-v)if(m<=v){const _=1/u;d*=_,m*=_,g=d*(d+o*m+2*a)+m*(o*d+m+2*l)+c}else m=s,d=Math.max(0,-(o*m+a)),g=-d*d+m*(m+2*l)+c;else m=-s,d=Math.max(0,-(o*m+a)),g=-d*d+m*(m+2*l)+c;else m<=-v?(d=Math.max(0,-(-o*s+a)),m=d>0?-s:Math.min(Math.max(-s,-l),s),g=-d*d+m*(m+2*l)+c):m<=v?(d=0,m=Math.min(Math.max(-s,-l),s),g=m*(m+2*l)+c):(d=Math.max(0,-(o*s+a)),m=d>0?s:Math.min(Math.max(-s,-l),s),g=-d*d+m*(m+2*l)+c);else m=o>0?-s:s,d=Math.max(0,-(o*m+a)),g=-d*d+m*(m+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,d),i&&i.copy(kE).addScaledVector(X0,m),g}intersectSphere(e,t){Ka.subVectors(e.center,this.origin);const r=Ka.dot(this.direction),i=Ka.dot(Ka)-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,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/t;return r>=0?r:null}intersectPlane(e,t){const r=this.distanceToPlane(e);return r===null?null:this.at(r,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let r,i,s,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,m=this.origin;return c>=0?(r=(e.min.x-m.x)*c,i=(e.max.x-m.x)*c):(r=(e.max.x-m.x)*c,i=(e.min.x-m.x)*c),u>=0?(s=(e.min.y-m.y)*u,o=(e.max.y-m.y)*u):(s=(e.max.y-m.y)*u,o=(e.min.y-m.y)*u),r>o||s>i||((s>r||isNaN(r))&&(r=s),(o<i||isNaN(i))&&(i=o),d>=0?(a=(e.min.z-m.z)*d,l=(e.max.z-m.z)*d):(a=(e.max.z-m.z)*d,l=(e.min.z-m.z)*d),r>l||a>i)||((a>r||r!==r)&&(r=a),(l<i||i!==i)&&(i=l),i<0)?null:this.at(r>=0?r:i,t)}intersectsBox(e){return this.intersectBox(e,Ka)!==null}intersectTriangle(e,t,r,i,s){OE.subVectors(t,e),K0.subVectors(r,e),FE.crossVectors(OE,K0);let o=this.direction.dot(FE),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;zl.subVectors(this.origin,e);const l=a*this.direction.dot(K0.crossVectors(zl,K0));if(l<0)return null;const c=a*this.direction.dot(OE.cross(zl));if(c<0||l+c>o)return null;const u=-a*zl.dot(FE);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 kt{constructor(e,t,r,i,s,o,a,l,c,u,d,m,g,v,_,x){kt.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,t,r,i,s,o,a,l,c,u,d,m,g,v,_,x)}set(e,t,r,i,s,o,a,l,c,u,d,m,g,v,_,x){const y=this.elements;
vendor: 31,075 bytes, line 505
505return y[0]=e,y[4]=t,y[8]=r,y[12]=i,y[1]=s,y[5]=o,y[9]=a,y[13]=l,y[2]=c,y[6]=u,y[10]=d,y[14]=m,y[3]=g,y[7]=v,y[11]=_,y[15]=x,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 kt().fromArray(this.elements)}copy(e){const t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],this}copyPosition(e){const t=this.elements,r=e.elements;return t[12]=r[12],t[13]=r[13],t[14]=r[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,r){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,t,r){return this.set(e.x,t.x,r.x,0,e.y,t.y,r.y,0,e.z,t.z,r.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,r=e.elements,i=1/bh.setFromMatrixColumn(e,0).length(),s=1/bh.setFromMatrixColumn(e,1).length(),o=1/bh.setFromMatrixColumn(e,2).length();return t[0]=r[0]*i,t[1]=r[1]*i,t[2]=r[2]*i,t[3]=0,t[4]=r[4]*s,t[5]=r[5]*s,t[6]=r[6]*s,t[7]=0,t[8]=r[8]*o,t[9]=r[9]*o,t[10]=r[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=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),d=Math.sin(s);if(e.order==="XYZ"){const m=o*u,g=o*d,v=a*u,_=a*d;t[0]=l*u,t[4]=-l*d,t[8]=c,t[1]=g+v*c,t[5]=m-_*c,t[9]=-a*l,t[2]=_-m*c,t[6]=v+g*c,t[10]=o*l}else if(e.order==="YXZ"){const m=l*u,g=l*d,v=c*u,_=c*d;t[0]=m+_*a,t[4]=v*a-g,t[8]=o*c,t[1]=o*d,t[5]=o*u,t[9]=-a,t[2]=g*a-v,t[6]=_+m*a,t[10]=o*l}else if(e.order==="ZXY"){const m=l*u,g=l*d,v=c*u,_=c*d;t[0]=m-_*a,t[4]=-o*d,t[8]=v+g*a,t[1]=g+v*a,t[5]=o*u,t[9]=_-m*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const m=o*u,g=o*d,v=a*u,_=a*d;t[0]=l*u,t[4]=v*c-g,t[8]=m*c+_,t[1]=l*d,t[5]=_*c+m,t[9]=g*c-v,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const m=o*l,g=o*c,v=a*l,_=a*c;t[0]=l*u,t[4]=_-m*d,t[8]=v*d+g,t[1]=d,t[5]=o*u,t[9]=-a*u,t[2]=-c*u,t[6]=g*d+v,t[10]=m-_*d}else if(e.order==="XZY"){const m=o*l,g=o*c,v=a*l,_=a*c;t[0]=l*u,t[4]=-d,t[8]=c*u,t[1]=m*d+_,t[5]=o*u,t[9]=g*d-v,t[2]=v*d-g,t[6]=a*u,t[10]=_*d+m}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(lae,e,cae)}lookAt(e,t,r){const i=this.elements;return Ds.subVectors(e,t),Ds.lengthSq()===0&&(Ds.z=1),Ds.normalize(),Hl.crossVectors(r,Ds),Hl.lengthSq()===0&&(Math.abs(r.z)===1?Ds.x+=1e-4:Ds.z+=1e-4,Ds.normalize(),Hl.crossVectors(r,Ds)),Hl.normalize(),Y0.crossVectors(Ds,Hl),i[0]=Hl.x,i[4]=Y0.x,i[8]=Ds.x,i[1]=Hl.y,i[5]=Y0.y,i[9]=Ds.y,i[2]=Hl.z,i[6]=Y0.z,i[10]=Ds.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const r=e.elements,i=t.elements,s=this.elements,o=r[0],a=r[4],l=r[8],c=r[12],u=r[1],d=r[5],m=r[9],g=r[13],v=r[2],_=r[6],x=r[10],y=r[14],S=r[3],b=r[7],A=r[11],k=r[15],L=i[0],C=i[4],P=i[8],R=i[12],N=i[1],O=i[5],V=i[9],B=i[13],W=i[2],ee=i[6],J=i[10],ie=i[14],j=i[3],z=i[7],q=i[11],Z=i[15];return s[0]=o*L+a*N+l*W+c*j,s[4]=o*C+a*O+l*ee+c*z,s[8]=o*P+a*V+l*J+c*q,s[12]=o*R+a*B+l*ie+c*Z,s[1]=u*L+d*N+m*W+g*j,s[5]=u*C+d*O+m*ee+g*z,s[9]=u*P+d*V+m*J+g*q,s[13]=u*R+d*B+m*ie+g*Z,s[2]=v*L+_*N+x*W+y*j,s[6]=v*C+_*O+x*ee+y*z,s[10]=v*P+_*V+x*J+y*q,s[14]=v*R+_*B+x*ie+y*Z,s[3]=S*L+b*N+A*W+k*j,s[7]=S*C+b*O+A*ee+k*z,s[11]=S*P+b*V+A*J+k*q,s[15]=S*R+b*B+A*ie+k*Z,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],r=e[4],i=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],d=e[6],m=e[10],g=e[14],v=e[3],_=e[7],x=e[11],y=e[15];return v*(+s*l*d-i*c*d-s*a*m+r*c*m+i*a*g-r*l*g)+_*(+t*l*g-t*c*m+s*o*m-i*o*g+i*c*u-s*l*u)+x*(+t*c*d-t*a*g-s*o*d+r*o*g+s*a*u-r*c*u)+y*(-i*a*u-t*l*d+t*a*m+i*o*d-r*o*m+r*l*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,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]=t,i[14]=r),this}invert(){const e=this.elements,t=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],d=e[9],m=e[10],g=e[11],v=e[12],_=e[13],x=e[14],y=e[15],S=d*x*c-_*m*c+_*l*g-a*x*g-d*l*y+a*m*y,b=v*m*c-u*x*c-v*l*g+o*x*g+u*l*y-o*m*y,A=u*_*c-v*d*c+v*a*g-o*_*g-u*a*y+o*d*y,k=v*d*l-u*_*l-v*a*m+o*_*m+u*a*x-o*d*x,L=t*S+r*b+i*A+s*k;if(L===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const C=1/L;return e[0]=S*C,e[1]=(_*m*s-d*x*s-_*i*g+r*x*g+d*i*y-r*m*y)*C,e[2]=(a*x*s-_*l*s+_*i*c-r*x*c-a*i*y+r*l*y)*C,e[3]=(d*l*s-a*m*s-d*i*c+r*m*c+a*i*g-r*l*g)*C,e[4]=b*C,e[5]=(u*x*s-v*m*s+v*i*g-t*x*g-u*i*y+t*m*y)*C,e[6]=(v*l*s-o*x*s-v*i*c+t*x*c+o*i*y-t*l*y)*C,e[7]=(o*m*s-u*l*s+u*i*c-t*m*c-o*i*g+t*l*g)*C,e[8]=A*C,e[9]=(v*d*s-u*_*s-v*r*g+t*_*g+u*r*y-t*d*y)*C,e[10]=(o*_*s-v*a*s+v*r*c-t*_*c-o*r*y+t*a*y)*C,e[11]=(u*a*s-o*d*s-u*r*c+t*d*c+o*r*g-t*a*g)*C,e[12]=k*C,e[13]=(u*_*i-v*d*i+v*r*m-t*_*m-u*r*x+t*d*x)*C,e[14]=(v*a*i-o*_*i-v*r*l+t*_*l+o*r*x-t*a*x)*C,e[15]=(o*d*i-u*a*i+u*r*l-t*d*l-o*r*m+t*a*m)*C,this}scale(e){const t=this.elements,r=e.x,i=e.y,s=e.z;return t[0]*=r,t[4]*=i,t[8]*=s,t[1]*=r,t[5]*=i,t[9]*=s,t[2]*=r,t[6]*=i,t[10]*=s,t[3]*=r,t[7]*=i,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=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(t,r,i))}makeTranslation(e,t,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,t,0,0,1,r,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,t,-r,0,0,r,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,0,r,0,0,1,0,0,-r,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,0,r,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const r=Math.cos(t),i=Math.sin(t),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,t,r){return this.set(e,0,0,0,0,t,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,t,r,i,s,o){return this.set(1,r,s,0,e,1,o,0,t,i,1,0,0,0,0,1),this}compose(e,t,r){const i=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,c=s+s,u=o+o,d=a+a,m=s*c,g=s*u,v=s*d,_=o*u,x=o*d,y=a*d,S=l*c,b=l*u,A=l*d,k=r.x,L=r.y,C=r.z;return i[0]=(1-(_+y))*k,i[1]=(g+A)*k,i[2]=(v-b)*k,i[3]=0,i[4]=(g-A)*L,i[5]=(1-(m+y))*L,i[6]=(x+S)*L,i[7]=0,i[8]=(v+b)*C,i[9]=(x-S)*C,i[10]=(1-(m+_))*C,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,r){const i=this.elements;let s=bh.set(i[0],i[1],i[2]).length();const o=bh.set(i[4],i[5],i[6]).length(),a=bh.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],Lo.copy(this);const c=1/s,u=1/o,d=1/a;return Lo.elements[0]*=c,Lo.elements[1]*=c,Lo.elements[2]*=c,Lo.elements[4]*=u,Lo.elements[5]*=u,Lo.elements[6]*=u,Lo.elements[8]*=d,Lo.elements[9]*=d,Lo.elements[10]*=d,t.setFromRotationMatrix(Lo),r.x=s,r.y=o,r.z=a,this}makePerspective(e,t,r,i,s,o,a=qo){const l=this.elements,c=2*s/(t-e),u=2*s/(r-i),d=(t+e)/(t-e),m=(r+i)/(r-i);let g,v;if(a===qo)g=-(o+s)/(o-s),v=-2*o*s/(o-s);else if(a===ap)g=-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]=d,l[12]=0,l[1]=0,l[5]=u,l[9]=m,l[13]=0,l[2]=0,l[6]=0,l[10]=g,l[14]=v,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,r,i,s,o,a=qo){const l=this.elements,c=1/(t-e),u=1/(r-i),d=1/(o-s),m=(t+e)*c,g=(r+i)*u;let v,_;if(a===qo)v=(o+s)*d,_=-2*d;else if(a===ap)v=s*d,_=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-m,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-g,l[2]=0,l[6]=0,l[10]=_,l[14]=-v,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,r=e.elements;for(let i=0;i<16;i++)if(t[i]!==r[i])return!1;return!0}fromArray(e,t=0){for(let r=0;r<16;r++)this.elements[r]=e[r+t];return this}toArray(e=[],t=0){const r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e[t+9]=r[9],e[t+10]=r[10],e[t+11]=r[11],e[t+12]=r[12],e[t+13]=r[13],e[t+14]=r[14],e[t+15]=r[15],e}}const bh=new K,Lo=new kt,lae=new K(0,0,0),cae=new K(1,1,1),Hl=new K,Y0=new K,Ds=new K,Dk=new kt,kk=new ws;class rv{constructor(e=0,t=0,r=0,i=rv.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,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,t,r,i=this._order){return this._x=e,this._y=t,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,t=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],d=i[2],m=i[6],g=i[10];switch(t){case"XYZ":this._y=Math.asin(fr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,g),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(m,c),this._z=0);break;case"YXZ":this._x=Math.asin(-fr(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,g),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(fr(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-d,g),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-fr(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(m,g),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(fr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,g));break;case"XZY":this._z=Math.asin(-fr(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(m,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,g),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,r){return Dk.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Dk,t,r)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return kk.setFromEuler(this),this.setFromQuaternion(kk,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=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+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}}rv.DEFAULT_ORDER="XYZ";class pd{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let uae=0;const Ok=new K,Eh=new ws,Ya=new kt,Q0=new K,Rm=new K,dae=new K,hae=new ws,Fk=new K(1,0,0),Uk=new K(0,1,0),Vk=new K(0,0,1),fae={type:"added"},pae={type:"removed"};class yn extends Rl{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:uae++}),this.uuid=Gs(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=yn.DEFAULT_UP.clone();const e=new K,t=new rv,r=new ws,i=new K(1,1,1);function s(){r.setFromEuler(t,!1)}function o(){t.setFromQuaternion(r,void 0,!1)}t._onChange(s),r._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new kt},normalMatrix:{value:new en}}),this.matrix=new kt,this.matrixWorld=new kt,this.matrixAutoUpdate=yn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=yn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new pd,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Eh.setFromAxisAngle(e,t),this.quaternion.multiply(Eh),this}rotateOnWorldAxis(e,t){return Eh.setFromAxisAngle(e,t),this.quaternion.premultiply(Eh),this}rotateX(e){return this.rotateOnAxis(Fk,e)}rotateY(e){return this.rotateOnAxis(Uk,e)}rotateZ(e){return this.rotateOnAxis(Vk,e)}translateOnAxis(e,t){return Ok.copy(e).applyQuaternion(this.quaternion),this.position.add(Ok.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Fk,e)}translateY(e){return this.translateOnAxis(Uk,e)}translateZ(e){return this.translateOnAxis(Vk,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Ya.copy(this.matrixWorld).invert())}lookAt(e,t,r){e.isVector3?Q0.copy(e):Q0.set(e,t,r);const i=this.parent;this.updateWorldMatrix(!0,!1),Rm.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ya.lookAt(Rm,Q0,this.up):Ya.lookAt(Q0,Rm,this.up),this.quaternion.setFromRotationMatrix(Ya),i&&(Ya.extractRotation(i.matrixWorld),Eh.setFromRotationMatrix(Ya),this.quaternion.premultiply(Eh.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.parent!==null&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(fae)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(pae)),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),Ya.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Ya.multiply(e.parent.matrixWorld)),e.applyMatrix4(Ya),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let r=0,i=this.children.length;r<i;r++){const o=this.children[r].getObjectByProperty(e,t);if(o!==void 0)return o}}getObjectsByProperty(e,t,r=[]){this[e]===t&&r.push(this);const i=this.children;for(let s=0,o=i.length;s<o;s++)i[s].getObjectsByProperty(e,t,r);return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Rm,e,dae),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Rm,hae,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let r=0,i=t.length;r<i;r++)t[r].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let r=0,i=t.length;r<i;r++)t[r].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let r=0,i=t.length;r<i;r++){const s=t[r];(s.matrixWorldAutoUpdate===!0||e===!0)&&s.updateMatrixWorld(e)}}updateWorldMatrix(e,t){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),t===!0){const i=this.children;for(let s=0,o=i.length;s<o;s++){const a=i[s];a.matrixWorldAutoUpdate===!0&&a.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=e===void 0||typeof e=="string",r={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.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.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 d=l[c];s(e.shapes,d)}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;l<c;l++)a.push(s(e.materials,this.material[l]));i.material=a}else i.material=s(e.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];i.animations.push(s(e.animations,l))}}if(t){const a=o(e.geometries),l=o(e.materials),c=o(e.textures),u=o(e.images),d=o(e.shapes),m=o(e.skeletons),g=o(e.animations),v=o(e.nodes);a.length>0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),d.length>0&&(r.shapes=d),m.length>0&&(r.skeletons=m),g.length>0&&(r.animations=g),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,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.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)),t===!0)for(let r=0;r<e.children.length;r++){const i=e.children[r];this.add(i.clone())}return this}}yn.DEFAULT_UP=new K(0,1,0);yn.DEFAULT_MATRIX_AUTO_UPDATE=!0;yn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Do=new K,Qa=new K,UE=new K,Ja=new K,Th=new K,Mh=new K,jk=new K,VE=new K,jE=new K,BE=new K;let J0=!1;class ps{constructor(e=new K,t=new K,r=new K){this.a=e,this.b=t,this.c=r}static getNormal(e,t,r,i){i.subVectors(r,t),Do.subVectors(e,t),i.cross(Do);const s=i.lengthSq();return s>0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(e,t,r,i,s){Do.subVectors(i,t),Qa.subVectors(r,t),UE.subVectors(e,t);const o=Do.dot(Do),a=Do.dot(Qa),l=Do.dot(UE),c=Qa.dot(Qa),u=Qa.dot(UE),d=o*c-a*a;if(d===0)return s.set(0,0,0),null;const m=1/d,g=(c*l-a*u)*m,v=(o*u-a*l)*m;return s.set(1-g-v,v,g)}static containsPoint(e,t,r,i){return this.getBarycoord(e,t,r,i,Ja)===null?!1:Ja.x>=0&&Ja.y>=0&&Ja.x+Ja.y<=1}static getUV(e,t,r,i,s,o,a,l){return J0===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),J0=!0),this.getInterpolation(e,t,r,i,s,o,a,l)}static getInterpolation(e,t,r,i,s,o,a,l){return this.getBarycoord(e,t,r,i,Ja)===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,Ja.x),l.addScaledVector(o,Ja.y),l.addScaledVector(a,Ja.z),l)}static isFrontFacing(e,t,r,i){return Do.subVectors(r,t),Qa.subVectors(e,t),Do.cross(Qa).dot(i)<0}set(e,t,r){return this.a.copy(e),this.b.copy(t),this.c.copy(r),this}setFromPointsAndIndices(e,t,r,i){return this.a.copy(e[t]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,r,i){return this.a.fromBufferAttribute(e,t),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 Do.subVectors(this.c,this.b),Qa.subVectors(this.a,this.b),Do.cross(Qa).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ps.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ps.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,r,i,s){return J0===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),J0=!0),ps.getInterpolation(e,this.a,this.b,this.c,t,r,i,s)}getInterpolation(e,t,r,i,s){return ps.getInterpolation(e,this.a,this.b,this.c,t,r,i,s)}containsPoint(e){return ps.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ps.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const r=this.a,i=this.b,s=this.c;let o,a;Th.subVectors(i,r),Mh.subVectors(s,r),VE.subVectors(e,r);const l=Th.dot(VE),c=Mh.dot(VE);if(l<=0&&c<=0)return t.copy(r);jE.subVectors(e,i);const u=Th.dot(jE),d=Mh.dot(jE);if(u>=0&&d<=u)return t.copy(i);const m=l*d-u*c;if(m<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(r).addScaledVector(Th,o);BE.subVectors(e,s);const g=Th.dot(BE),v=Mh.dot(BE);if(v>=0&&g<=v)return t.copy(s);const _=g*c-l*v;if(_<=0&&c>=0&&v<=0)return a=c/(c-v),t.copy(r).addScaledVector(Mh,a);const x=u*v-g*d;if(x<=0&&d-u>=0&&g-v>=0)return jk.subVectors(s,i),a=(d-u)/(d-u+(g-v)),t.copy(i).addScaledVector(jk,a);const y=1/(x+_+m);return o=_*y,a=m*y,t.copy(r).addScaledVector(Th,o).addScaledVector(Mh,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const Y6={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},Gl={h:0,s:0,l:0},Z0={h:0,s:0,l:0};function zE(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class tt{constructor(e,t,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,r)}set(e,t,r){if(t===void 0&&r===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Or){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Pn.toWorkingColorSpace(this,t),this}setRGB(e,t,r,i=Pn.workingColorSpace){return this.r=e,this.g=t,this.b=r,Pn.toWorkingColorSpace(this,i),this}setHSL(e,t,r,i=Pn.workingColorSpace){if(e=aP(e,1),t=fr(t,0,1),r=fr(r,0,1),t===0)this.r=this.g=this.b=r;else{const s=r<=.5?r*(1+t):r+t-r*t,o=2*r-s;this.r=zE(o,s,e+1/3),this.g=zE(o,s,e),this.b=zE(o,s,e-1/3)}return Pn.toWorkingColorSpace(this,i),this}setStyle(e,t=Or){function r(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=i[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Or){const r=Y6[e.toLowerCase()];return r!==void 0?this.setHex(r,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Lf(e.r),this.g=Lf(e.g),this.b=Lf(e.b),this}copyLinearToSRGB(e){return this.r=PE(e.r),this.g=PE(e.g),this.b=PE(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Or){return Pn.fromWorkingColorSpace(Ei.copy(this),e),Math.round(fr(Ei.r*255,0,255))*65536+Math.round(fr(Ei.g*255,0,255))*256+Math.round(fr(Ei.b*255,0,255))}getHexString(e=Or){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Pn.workingColorSpace){Pn.fromWorkingColorSpace(Ei.copy(this),t);
vendor: 12,522 bytes, line 505
505const r=Ei.r,i=Ei.g,s=Ei.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 d=o-a;switch(c=u<=.5?d/(o+a):d/(2-o-a),o){case r:l=(i-s)/d+(i<s?6:0);break;case i:l=(s-r)/d+2;break;case s:l=(r-i)/d+4;break}l/=6}return e.h=l,e.s=c,e.l=u,e}getRGB(e,t=Pn.workingColorSpace){return Pn.fromWorkingColorSpace(Ei.copy(this),t),e.r=Ei.r,e.g=Ei.g,e.b=Ei.b,e}getStyle(e=Or){Pn.fromWorkingColorSpace(Ei.copy(this),e);const t=Ei.r,r=Ei.g,i=Ei.b;return e!==Or?`color(${e} ${t.toFixed(3)} ${r.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(r*255)},${Math.round(i*255)})`}offsetHSL(e,t,r){return this.getHSL(Gl),this.setHSL(Gl.h+e,Gl.s+t,Gl.l+r)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,r){return this.r=e.r+(t.r-e.r)*r,this.g=e.g+(t.g-e.g)*r,this.b=e.b+(t.b-e.b)*r,this}lerpHSL(e,t){this.getHSL(Gl),e.getHSL(Z0);const r=wg(Gl.h,Z0.h,t),i=wg(Gl.s,Z0.s,t),s=wg(Gl.l,Z0.l,t);return this.setHSL(r,i,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,r=this.g,i=this.b,s=e.elements;return this.r=s[0]*t+s[3]*r+s[6]*i,this.g=s[1]*t+s[4]*r+s[7]*i,this.b=s[2]*t+s[5]*r+s[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Ei=new tt;tt.NAMES=Y6;let mae=0;class Oi extends Rl{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:mae++}),this.uuid=Gs(),this.name="",this.type="Material",this.blending=hd,this.side=_l,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=b1,this.blendDst=E1,this.blendEquation=ic,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new tt(0,0,0),this.blendAlpha=0,this.depthFunc=sy,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=eC,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=zu,this.stencilZFail=zu,this.stencilZPass=zu,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const r=e[t];if(r===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){console.warn(`THREE.Material: '${t}' 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[t]=r}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(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&&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.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.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!==hd&&(r.blending=this.blending),this.side!==_l&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==b1&&(r.blendSrc=this.blendSrc),this.blendDst!==E1&&(r.blendDst=this.blendDst),this.blendEquation!==ic&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==sy&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==eC&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==zu&&(r.stencilFail=this.stencilFail),this.stencilZFail!==zu&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==zu&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(t){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 t=e.clippingPlanes;let r=null;if(t!==null){const i=t.length;r=new Array(i);for(let s=0;s!==i;++s)r[s]=t[s].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipSh
vendor: 12,342 bytes, line 505
505adows,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 ru extends Oi{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=tv,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.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 il=gae();function gae(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(r[l]=0,r[l|256]=32768,i[l]=24,i[l|256]=24):c<-14?(r[l]=1024>>-c-14,r[l|256]=1024>>-c-14|32768,i[l]=-c-1,i[l|256]=-c-1):c<=15?(r[l]=c+15<<10,r[l|256]=c+15<<10|32768,i[l]=13,i[l|256]=13):c<128?(r[l]=31744,r[l|256]=64512,i[l]=24,i[l|256]=24):(r[l]=31744,r[l|256]=64512,i[l]=13,i[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;!(c&8388608);)c<<=1,u-=8388608;c&=-8388609,u+=947912704,s[l]=c|u}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:r,shiftTable:i,mantissaTable:s,exponentTable:o,offsetTable:a}}function us(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=fr(n,-65504,65504),il.floatView[0]=n;const e=il.uint32View[0],t=e>>23&511;return il.baseTable[t]+((e&8388607)>>il.shiftTable[t])}function Qm(n){const e=n>>10;return il.uint32View[0]=il.mantissaTable[il.offsetTable[e]+(n&1023)]+il.exponentTable[e],il.floatView[0]}const yae={toHalfFloat:us,fromHalfFloat:Qm},Mr=new K,ex=new Te;class an{constructor(e,t,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=t,this.count=e!==void 0?e.length/t:0,this.normalized=r,this.usage=gy,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=$o,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn("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,t){this.updateRanges.push({start:e,count:t})}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,t,r){e*=this.itemSize,r*=t.itemSize;for(let i=0,s=this.itemSize;i<s;i++)this.array[e+i]=t.array[r+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,r=this.count;t<r;t++)ex.fromBufferAttribute(this,t),ex.applyMatrix3(e),this.setXY(t,ex.x,ex.y);else if(this.itemSize===3)for(let t=0,r=this.count;t<r;t++)Mr.fromBufferAttribute(this,t),Mr.applyMatrix3(e),this.setXYZ(t,Mr.x,Mr.y,Mr.z);return this}applyMatrix4(e){for(let t=0,r=this.count;t<r;t++)Mr.fromBufferAttribute(this,t),Mr.applyMatrix4(e),this.setXYZ(t,Mr.x,Mr.y,Mr.z);return this}applyNormalMatrix(e){for(let t=0,r=this.count;t<r;t++)Mr.fromBufferAttribute(this,t),Mr.applyNormalMatrix(e),this.setXYZ(t,Mr.x,Mr.y,Mr.z);return this}transformDirection(e){for(let t=0,r=this.count;t<r;t++)Mr.fromBufferAttribute(this,t),Mr.transformDirection(e),this.setXYZ(t,Mr.x,Mr.y,Mr.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let r=this.array[e*this.itemSize+t];return this.normalized&&(r=ms(r,this.array)),r}setComponent(e,t,r){return this.normalized&&(r=Qt(r,this.array)),this.array[e*this.itemSize+t]=r,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=ms(t,this.array)),t}setX(e,t){return this.normalized&&(t=Qt(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=ms(t,this.array)),t}setY(e,t){return this.normalized&&(t=Qt(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=ms(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Qt(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=ms(t,this.array)),t}setW(e,t){return this.normalized&&(t=Qt(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,r){return e*=this.itemSize,this.normalized&&(t=Qt(t,this.array),r=Qt(r,this.array)),this.array[e+0]=t,this.array[e+1]=r,this}setXYZ(e,t,r,i){return e*=this.itemSize,this.normalized&&(t=Qt(t,this.array),r=Qt(r,this.array),i=Qt(i,this.array)),this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=i,this}setXYZW(e,t,r,i,s){return e*=this.itemSize,this.normalized&&(t=Qt(t,this.array),r=Qt(r,this.array),i=Qt(i,this.array),s=Qt(s,this.array)),this.array[e+0]=t,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!==gy&&(e.usage=this.usage),e}}class vae extends an{constructor(e,t,r){super(new Int8Array(e),t,r)}}class xae extends an{constructor(e,t,r){super(new Uint8Array(e),t,r)}}class _ae extends an{constructor(e,t,r){super(new Uint8ClampedArray(e),t,r)}}class wae extends an{constructor(e,t,r){super(new Int16Array(e),t,r)}}class uP extends an{constructor(e,t,r){super(new Uint16Array(e),t,r)}}class Sae extends an{constructor(e,t,r){super(new Int32Array(e),t,r)}}class dP extends an{constructor(e,t,r){super(new Uint32Array(e),t,r)}}class bae extends an{constructor(e,t,r){super(new Uint16Array(e),t,r),this.isFloat16BufferAttribute=!0}getX(e){let t=Qm(this.array[e*this.itemSize]);return this.normalized&&(t=ms(t,this.array)),t}setX(e,t){return this.normalized&&(t=Qt(t,this.array)),this.array[e*this.itemSize]=us(t),this}getY(e){let t=Qm(this.array[e*this.itemSize+1]);return this.normalized&&(t=ms(t,this.array)),t}setY(e,t){return this.normalized&&(t=Qt(t,this.array)),this.array[e*this.itemSize+1]=us(t),this}getZ(e){let t=Qm(this.array[e*this.itemSize+2]);return this.normalized&&(t=ms(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Qt(t,this.array)),this.array[e*this.itemSize+2]=us(t),this}getW(e){let t=Qm(this.array[e*this.itemSize+3]);return this.normalized&&(t=ms(t,this.array)),t}setW(e,t){return this.normalized&&(t=Qt(t,this.array)),this.array[e*this.itemSize+3]=us(t),this}setXY(e,t,r){return e*=this.itemSize,this.normalized&&(t=Qt(t,this.array),r=Qt(r,this.array)),this.array[e+0]=us(t),this.array[e+1]=us(r),this}setXYZ(e,t,r,i){return e*=this.itemSize,this.normalized&&(t=Qt(t,this.array),r=Qt(r,this.array),i=Qt(i,this.array)),this.array[e+0]=us(t),this.array[e+1]=us(r),this.array[e+2]=us(i),this}setXYZW(e,t,r,i,s){return e*=this.itemSize,this.normalized&&(t=Qt(t,this.array),r=Qt(r,this.array),i=Qt(i,this.array),s=Qt(s,this.array)),this.array[e+0]=us(t),this.array[e+1]=us(r),this.array[e+2]=us(i),this.array[e+3]=us(s),this}}class pt extends an{constructor(e,t,r){super(new Float32Array(e),t,r)}}class Eae extends an{constructor(e,t,r){super(new Float64Array(e),t,r)}}let Tae=0;const ao=new kt,HE=new yn,Ah=new K,ks=new es,Pm=new es,Xr=new K;class Xt extends Rl{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Tae++}),this.uuid=Gs(),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(q6(e)?dP:uP)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,r=0){this.groups.push({start:e,count:t,materialIndex:r})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const r=this.attributes.normal;if(r!==void 0){const s=new en().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 ao.makeRotationFromQuaternion(e),this.applyMatrix4(ao),this}rotateX(e){return ao.makeRotationX(e),this.applyMatrix4(ao),this}rotateY(e){return ao.makeRotationY(e),this.applyMatrix4(ao),this}rotateZ(e){return ao.makeRotationZ(e),this.applyMatrix4(ao),this}translate(e,t,r){return ao.makeTranslation(e,t,r),this.applyMatrix4(ao),this}scale(e,t,r){return ao.makeScale(e,t,r),this.applyMatrix4(ao),this}lookAt(e){return HE.lookAt(e),HE.updateMatrix(),this.applyMatrix4(HE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ah).negate(),this.translate(Ah.x,Ah.y,Ah.z),this}setFromPoints(e){const t=[];for(let r=0,i=e.length;r<i;r++){const s=e[r];t.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new pt(t,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new es);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingBox.set(new K(-1/0,-1/0,-1/0),new K(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let r=0,i=t.length;r<i;r++){const s=t[r];ks.setFromBufferAttribute(s),this.morphTargetsRelative?(Xr.addVectors(this.boundingBox.min,ks.min),this.boundingBox.expandByPoint(Xr),Xr.addVectors(this.boundingBox.max,ks.max),this.boundingBox.expandByPoint(Xr)):(this.boundingBox.expandByPoint(ks.min),this.boundingBox.expandByPoint(ks.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 Di);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "fal
505se".',this),this.boundingSphere.set(new K,1/0);return}if(e){const r=this.boundingSphere.center;if(ks.setFromBufferAttribute(e),t)for(let s=0,o=t.length;s<o;s++){const a=t[s];Pm.setFromBufferAttribute(a),this.morphTargetsRelative?(Xr.addVectors(ks.min,Pm.min),ks.expandByPoint(Xr),Xr.addVectors(ks.max,Pm.max),ks.expandByPoint(Xr)):(ks.expandByPoint(Pm.min),ks.expandByPoint(Pm.max))}ks.getCenter(r);let i=0;for(let s=0,o=e.count;s<o;s++)Xr.fromBufferAttribute(e,s),i=Math.max(i,r.distanceToSquared(Xr));if(t)for(let s=0,o=t.length;s<o;s++){const a=t[s],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)Xr.fromBufferAttribute(a,c),l&&(Ah.fromBufferAttribute(e,c),Xr.add(Ah)),i=Math.max(i,r.distanceToSquared(Xr))}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,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const r=e.array,i=t.position.array,s=t.normal.array,o=t.uv.array,a=i.length/3;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new an(new Float32Array(4*a),4));const l=this.getAttribute("tangent").array,c=[],u=[];for(let N=0;N<a;N++)c[N]=new K,u[N]=new K;const d=new K,m=new K,g=new K,v=new Te,_=new Te,x=new Te,y=new K,S=new K;function b(N,O,V){d.fromArray(i,N*3),m.fromArray(i,O*3),g.fromArray(i,V*3),v.fromArray(o,N*2),_.fromArray(o,O*2),x.fromArray(o,V*2),m.sub(d),g.sub(d),_.sub(v),x.sub(v);const B=1/(_.x*x.y-x.x*_.y);isFinite(B)&&(y.copy(m).multiplyScalar(x.y).addScaledVector(g,-_.y).multiplyScalar(B),S.copy(g).multiplyScalar(_.x).addScaledVector(m,-x.x).multiplyScalar(B),c[N].add(y),c[O].add(y),c[V].add(y),u[N].add(S),u[O].add(S),u[V].add(S))}let A=this.groups;A.length===0&&(A=[{start:0,count:r.length}]);for(let N=0,O=A.length;N<O;++N){const V=A[N],B=V.start,W=V.count;for(let ee=B,J=B+W;ee<J;ee+=3)b(r[ee+0],r[ee+1],r[ee+2])}const k=new K,L=new K,C=new K,P=new K;function R(N){C.fromArray(s,N*3),P.copy(C);const O=c[N];k.copy(O),k.sub(C.multiplyScalar(C.dot(O))).normalize(),L.crossVectors(P,O);const B=L.dot(u[N])<0?-1:1;l[N*4]=k.x,l[N*4+1]=k.y,l[N*4+2]=k.z,l[N*4+3]=B}for(let N=0,O=A.length;N<O;++N){const V=A[N],B=V.start,W=V.count;for(let ee=B,J=B+W;ee<J;ee+=3)R(r[ee+0]),R(r[ee+1]),R(r[ee+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let r=this.getAttribute("normal");if(r===void 0)r=new an(new Float32Array(t.count*3),3),this.setAttribute("normal",r);else for(let m=0,g=r.count;m<g;m++)r.setXYZ(m,0,0,0);const i=new K,s=new K,o=new K,a=new K,l=new K,c=new K,u=new K,d=new K;if(e)for(let m=0,g=e.count;m<g;m+=3){const v=e.getX(m+0),_=e.getX(m+1),x=e.getX(m+2);i.fromBufferAttribute(t,v),s.fromBufferAttribute(t,_),o.fromBufferAttribute(t,x),u.subVectors(o,s),d.subVectors(i,s),u.cross(d),a.fromBufferAttribute(r,v),l.fromBufferAttribute(r,_),c.fromBufferAttribute(r,x),a.add(u),l.add(u),c.add(u),r.setXYZ(v,a.x,a.y,a.z),r.setXYZ(_,l.x,l.y,l.z),r.setXYZ(x,c.x,c.y,c.z)}else for(let m=0,g=t.count;m<g;m+=3)i.fromBufferAttribute(t,m+0),s.fromBufferAttribute(t,m+1),o.fromBufferAttribute(t,m+2),u.subVectors(o,s),d.subVectors(i,s),u.cross(d),r.setXYZ(m+0,u.x,u.y,u.z),r.setXYZ(m+1,u.x,u.y,u.z),r.setXYZ(m+2,u.x,u.y,u.z);this.normalizeNormals(),r.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,r=e.count;t<r;t++)Xr.fromBufferAttribute(e,t),Xr.normalize(),e.setXYZ(t,Xr.x,Xr.y,Xr.z)}toNonIndexed(){function e(a,l){const c=a.array,u=a.itemSize,d=a.normalized,m=new c.constructor(l.length*u);let g=0,v=0;for(let _=0,x=l.length;_<x;_++){a.isInterleavedBufferAttribute?g=l[_]*a.data.stride+a.offset:g=l[_]*u;for(let y=0;y<u;y++)m[v++]=c[g++]}return new an(m,u,d)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Xt,r=this.index.array,i=this.attributes;for(const a in i){const l=i[a],c=e(l,r);t.setAttribute(a,c)}const s=this.morphAttributes;for(const a in s){const l=[],c=s[a];for(let u=0,d=c.length;u<d;u++){const m=c[u],g=e(m,r);l.push(g)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 15,889 bytes, lines 505-509
505if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.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 d=0,m=c.length;d<m;d++){const g=c[d];u.push(g.toJSON(e.data))}u.length>0&&(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 t={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(t));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(t))}const s=e.morphAttributes;for(const c in s){const u=[],d=s[c];for(let m=0,g=d.length;m<g;m++)u.push(d[m].clone(t));this.morphAttributes[c]=u}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,u=o.length;c<u;c++){const d=o[c];this.addGroup(d.start,d.count,d.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const Bk=new kt,Nu=new Lp,tx=new Di,zk=new K,Ch=new K,Rh=new K,Ph=new K,GE=new K,nx=new K,rx=new Te,ix=new Te,sx=new Te,Hk=new K,Gk=new K,Wk=new K,ox=new K,ax=new K;class Ur extends yn{constructor(e=new Xt,t=new ru){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,r=Object.keys(t);if(r.length>0){const i=t[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,t){const r=this.geometry,i=r.attributes.position,s=r.morphAttributes.position,o=r.morphTargetsRelative;t.fromBufferAttribute(i,e);const a=this.morphTargetInfluences;if(s&&a){nx.set(0,0,0);for(let l=0,c=s.length;l<c;l++){const u=a[l],d=s[l];u!==0&&(GE.fromBufferAttribute(d,e),o?nx.addScaledVector(GE,u):nx.addScaledVector(GE.sub(t),u))}t.add(nx)}return t}raycast(e,t){const r=this.geometry,i=this.material,s=this.matrixWorld;i!==void 0&&(r.boundingSphere===null&&r.computeBoundingSphere(),tx.copy(r.boundingSphere),tx.applyMatrix4(s),Nu.copy(e.ray).recast(e.near),!(tx.containsPoint(Nu.origin)===!1&&(Nu.intersectSphere(tx,zk)===null||Nu.origin.distanceToSquared(zk)>(e.far-e.near)**2))&&(Bk.copy(s).invert(),Nu.copy(e.ray).applyMatrix4(Bk),!(r.boundingBox!==null&&Nu.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,t,Nu)))}_computeIntersections(e,t,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,d=s.attributes.normal,m=s.groups,g=s.drawRange;if(a!==null)if(Array.isArray(o))for(let v=0,_=m.length;v<_;v++){const x=m[v],y=o[x.materialIndex],S=Math.max(x.start,g.start),b=Math.min(a.count,Math.min(x.start+x.count,g.start+g.count));for(let A=S,k=b;A<k;A+=3){const L=a.getX(A),C=a.getX(A+1),P=a.getX(A+2);i=lx(this,y,e,r,c,u,d,L,C,P),i&&(i.faceIndex=Math.floor(A/3),i.face.materialIndex=x.materialIndex,t.push(i))}}else{const v=Math.max(0,g.start),_=Math.min(a.count,g.start+g.count);for(let x=v,y=_;x<y;x+=3){const S=a.getX(x),b=a.getX(x+1),A=a.getX(x+2);i=lx(this,o,e,r,c,u,d,S,b,A),i&&(i.faceIndex=Math.floor(x/3),t.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let v=0,_=m.length;v<_;v++){const x=m[v],y=o[x.materialIndex],S=Math.max(x.start,g.start),b=Math.min(l.count,Math.min(x.start+x.count,g.start+g.count));for(let A=S,k=b;A<k;A+=3){const L=A,C=A+1,P=A+2;i=lx(this,y,e,r,c,u,d,L,C,P),i&&(i.faceIndex=Math.floor(A/3),i.face.materialIndex=x.materialIndex,t.push(i))}}else{const v=Math.max(0,g.start),_=Math.min(l.count,g.start+g.count);for(let x=v,y=_;x<y;x+=3){const S=x,b=x+1,A=x+2;i=lx(this,o,e,r,c,u,d,S,b,A),i&&(i.faceIndex=Math.floor(x/3),t.push(i))}}}}function Mae(n,e,t,r,i,s,o,a){let l;if(e.side===Zr?l=r.intersectTriangle(o,s,i,!0,a):l=r.intersectTriangle(i,s,o,e.side===_l,a),l===null)return null;ax.copy(a),ax.applyMatrix4(n.matrixWorld);const c=t.ray.origin.distanceTo(ax);return c<t.near||c>t.far?null:{distance:c,point:ax.clone(),object:n}}function lx(n,e,t,r,i,s,o,a,l,c){n.getVertexPosition(a,Ch),n.getVertexPosition(l,Rh),n.getVertexPosition(c,Ph);const u=Mae(n,e,t,r,Ch,Rh,Ph,ox);if(u){i&&(rx.fromBufferAttribute(i,a),ix.fromBufferAttribute(i,l),sx.fromBufferAttribute(i,c),u.uv=ps.getInterpolation(ox,Ch,Rh,Ph,rx,ix,sx,new Te)),s&&(rx.fromBufferAttribute(s,a),ix.fromBufferAttribute(s,l),sx.fromBufferAttribute(s,c),u.uv1=ps.getInterpolation(ox,Ch,Rh,Ph,rx,ix,sx,new Te),u.uv2=u.uv1),o&&(Hk.fromBufferAttribute(o,a),Gk.fromBufferAttribute(o,l),Wk.fromBufferAttribute(o,c),u.normal=ps.getInterpolation(ox,Ch,Rh,Ph,Hk,Gk,Wk,new K),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const d={a,b:l,c,normal:new K,materialIndex:0};ps.getNormal(Ch,Rh,Ph,d.normal),u.face=d}return u}class Vd extends Xt{constructor(e=1,t=1,r=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,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=[],d=[];let m=0,g=0;v("z","y","x",-1,-1,r,t,e,o,s,0),v("z","y","x",1,-1,r,t,-e,o,s,1),v("x","z","y",1,1,e,r,t,i,o,2),v("x","z","y",1,-1,e,r,-t,i,o,3),v("x","y","z",1,-1,e,t,r,i,s,4),v("x","y","z",-1,-1,e,t,-r,i,s,5),this.setIndex(l),this.setAttribute("position",new pt(c,3)),this.setAttribute("normal",new pt(u,3)),this.setAttribute("uv",new pt(d,2));function v(_,x,y,S,b,A,k,L,C,P,R){const N=A/C,O=k/P,V=A/2,B=k/2,W=L/2,ee=C+1,J=P+1;let ie=0,j=0;const z=new K;for(let q=0;q<J;q++){const Z=q*O-B;for(let re=0;re<ee;re++){const te=re*N-V;z[_]=te*S,z[x]=Z*b,z[y]=W,c.push(z.x,z.y,z.z),z[_]=0,z[x]=0,z[y]=L>0?1:-1,u.push(z.x,z.y,z.z),d.push(re/C),d.push(1-q/P),ie+=1}}for(let q=0;q<P;q++)for(let Z=0;Z<C;Z++){const re=m+Z+ee*q,te=m+Z+ee*(q+1),ae=m+(Z+1)+ee*(q+1),we=m+(Z+1)+ee*q;l.push(re,te,we),l.push(te,ae,we),j+=6}a.addGroup(g,j,R),g+=j,m+=ie}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Vd(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function cp(n){const e={};for(const t in n){e[t]={};for(const r in n[t]){const i=n[t][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[t][r]=null):e[t][r]=i.clone():Array.isArray(i)?e[t][r]=i.slice():e[t][r]=i}}return e}function Gi(n){const e={};for(let t=0;t<n.length;t++){const r=cp(n[t]);for(const i in r)e[i]=r[i]}return e}function Aae(n){const e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}function Q6(n){return n.getRenderTarget()===null?n.outputColorSpace:Pn.workingColorSpace}const J6={clone:cp,merge:Gi};var Cae=`void main() { 506 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 507}`,Rae=`void main() { 508 gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); 509}`;class bo extends Oi{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=Cae,this.fragmentShader=Rae,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1,clipCullDistance:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=cp(e.uniforms),this.uniformsGroups=Aae(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const i in this.uniforms){const o=this.uniforms[i].value;o&&o.isTexture?t.uniforms[i]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[i]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[i]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[i]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[i]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[i]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[i]={type:"m4",value:o.toArray()}:t.uniforms[i]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(t.extensions=r),t}}class iv extends yn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new kt,this.projectionMatrix=new kt,this.projectionMatrixInverse=new kt,this.coordinateSystem=qo}copy(e,t){return super.copy(e,t),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,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Qr extends iv{constructor(e=50,t=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=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=lp*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(fd*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return lp*2*Math.atan(Math.tan(fd*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,r,i,s,o){this.aspect=e/t,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=t,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 t=e*Math.tan(fd*.5*this.fov)/this.zoom,r=2*t,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,t-=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,t,t-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Nh=-90,Ih=1;class Z6 extends yn{constructor(e,t,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Qr(Nh,Ih,e,t);i.layers=this.layers,this.add(i);const s=new Qr(Nh,Ih,e,t);s.layers=this.layers,this.add(s);const o=new Qr(Nh,Ih,e,t);o.layers=this.layers,this.add(o);const a=new Qr(Nh,Ih,e,t);a.layers=this.layers,this.add(a);const l=new Qr(Nh,Ih,e,t);l.layers=this.layers,this.add(l);const c=new Qr(Nh,Ih,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[r,i,s,o,a,l]=t;for(const c of t)this.remove(c);if(e===qo)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===ap)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 t)this.add(c),c.updateMatrixWorld()}update(e,t){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,d=e.getRenderTarget(),m=e.getActiveCubeFace(),g=e.getActiveMipmapLevel(),v=e.xr.enabled;e.xr.enabled=!1;const _=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(t,s),e.setRenderTarget(r,1,i),e.render(t,o),e.setRenderTarget(r,2,i),e.render(t,a),e.setRenderTarget(r,3,i),e.render(t,l),e.setRenderTarget(r,4,i),e.render(t,c),r.texture.generateMipmaps=_,e.setRenderTarget(r,5,i),e.render(t,u),e.setRenderTarget(d,m,g),e.xr.enabled=v,r.texture.needsPMREMUpdate=!0}}class sv extends br{constructor(e,t,r,i,s,o,a,l,c,u){e=e!==void 0?e:[],t=t!==void 0?t:wl,super(e,t,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 e8 extends ta{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];t.encoding!==void 0&&(Sg("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===Mc?Or:Vs),this.texture=new sv(i,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:Sr}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace
509=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` 510 511 varying vec3 vWorldDirection; 512 513 vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 514 515 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 516 517 } 518 519 void main() { 520 521 vWorldDirection = transformDirection( position, modelMatrix ); 522 523 #include <begin_vertex> 524 #include <project_vertex> 525 526 } 527 `,fragmentShader:` 528 529 uniform sampler2D tEquirect; 530 531 varying vec3 vWorldDirection; 532 533 #include <common> 534 535 void main() { 536 537 vec3 direction = normalize( vWorldDirection ); 538 539 vec2 sampleUV = equirectUv( direction ); 540 541 gl_FragColor = texture2D( tEquirect, sampleUV ); 542 543 } 544 `},i=new Vd(5,5,5),s=new bo({name:"CubemapFromEquirect",uniforms:cp(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:Zr,blending:dl});s.uniforms.tEquirect.value=t;const o=new Ur(i,s),a=t.minFilter;return t.minFilter===zc&&(t.minFilter=Sr),new Z6(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}
vendor: 9,169 bytes, lines 544-598
544clear(e,t,r,i){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,r,i);e.setRenderTarget(s)}}const WE=new K,Pae=new K,Nae=new en;class ec{constructor(e=new K(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,r,i){return this.normal.set(e,t,r),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,r){const i=WE.subVectors(r,t).cross(Pae.subVectors(e,t)).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,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const r=e.delta(WE),i=this.normal.dot(r);if(i===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/i;return s<0||s>1?null:t.copy(e.start).addScaledVector(r,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return t<0&&r>0||r<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const r=t||Nae.getNormalMatrix(e),i=this.coplanarPoint(WE).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 Iu=new Di,cx=new K;class ov{constructor(e=new ec,t=new ec,r=new ec,i=new ec,s=new ec,o=new ec){this.planes=[e,t,r,i,s,o]}set(e,t,r,i,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(r),a[3].copy(i),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let r=0;r<6;r++)t[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,t=qo){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],d=i[6],m=i[7],g=i[8],v=i[9],_=i[10],x=i[11],y=i[12],S=i[13],b=i[14],A=i[15];if(r[0].setComponents(l-s,m-c,x-g,A-y).normalize(),r[1].setComponents(l+s,m+c,x+g,A+y).normalize(),r[2].setComponents(l+o,m+u,x+v,A+S).normalize(),r[3].setComponents(l-o,m-u,x-v,A-S).normalize(),r[4].setComponents(l-a,m-d,x-_,A-b).normalize(),t===qo)r[5].setComponents(l+a,m+d,x+_,A+b).normalize();else if(t===ap)r[5].setComponents(a,d,_,b).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Iu.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Iu.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Iu)}intersectsSprite(e){return Iu.center.set(0,0,0),Iu.radius=.7071067811865476,Iu.applyMatrix4(e.matrixWorld),this.intersectsSphere(Iu)}intersectsSphere(e){const t=this.planes,r=e.center,i=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(r)<i)return!1;return!0}intersectsBox(e){const t=this.planes;for(let r=0;r<6;r++){const i=t[r];if(cx.x=i.normal.x>0?e.max.x:e.min.x,cx.y=i.normal.y>0?e.max.y:e.min.y,cx.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(cx)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let r=0;r<6;r++)if(t[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function t8(){let n=null,e=!1,t=null,r=null;function i(s,o){t(s,o),r=n.requestAnimationFrame(i)}return{start:function(){e!==!0&&t!==null&&(r=n.requestAnimationFrame(i),e=!0)},stop:function(){n.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function Iae(n,e){const t=e.isWebGL2,r=new WeakMap;function i(c,u){const d=c.array,m=c.usage,g=d.byteLength,v=n.createBuffer();n.bindBuffer(u,v),n.bufferData(u,d,m),c.onUploadCallback();let _;if(d instanceof Float32Array)_=n.FLOAT;else if(d instanceof Uint16Array)if(c.isFloat16BufferAttribute)if(t)_=n.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else _=n.UNSIGNED_SHORT;else if(d instanceof Int16Array)_=n.SHORT;else if(d instanceof Uint32Array)_=n.UNSIGNED_INT;else if(d instanceof Int32Array)_=n.INT;else if(d instanceof Int8Array)_=n.BYTE;else if(d instanceof Uint8Array)_=n.UNSIGNED_BYTE;else if(d instanceof Uint8ClampedArray)_=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:v,type:_,bytesPerElement:d.BYTES_PER_ELEMENT,version:c.version,size:g}}function s(c,u,d){const m=u.array,g=u._updateRange,v=u.updateRanges;if(n.bindBuffer(d,c),g.count===-1&&v.length===0&&n.bufferSubData(d,0,m),v.length!==0){for(let _=0,x=v.length;_<x;_++){const y=v[_];t?n.bufferSubData(d,y.start*m.BYTES_PER_ELEMENT,m,y.start,y.count):n.bufferSubData(d,y.start*m.BYTES_PER_ELEMENT,m.subarray(y.start,y.start+y.count))}u.clearUpdateRanges()}g.count!==-1&&(t?n.bufferSubData(d,g.offset*m.BYTES_PER_ELEMENT,m,g.offset,g.count):n.bufferSubData(d,g.offset*m.BYTES_PER_ELEMENT,m.subarray(g.offset,g.offset+g.count)),g.count=-1),u.onUploadCallback()}function o(c){return c.isInterleavedBufferAttribute&&(c=c.data),r.get(c)}function a(c){c.isInterleavedBufferAttribute&&(c=c.data);const u=r.get(c);u&&(n.deleteBuffer(u.buffer),r.delete(c))}function l(c,u){if(c.isGLBufferAttribute){const m=r.get(c);(!m||m.version<c.version)&&r.set(c,{buffer:c.buffer,type:c.type,bytesPerElement:c.elementSize,version:c.version});return}c.isInterleavedBufferAttribute&&(c=c.data);const d=r.get(c);if(d===void 0)r.set(c,i(c,u));else if(d.version<c.version){if(d.size!==c.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.");s(d.buffer,c,u),d.version=c.version}}return{get:o,remove:a,update:l}}class av extends Xt{constructor(e=1,t=1,r=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:r,heightSegments:i};const s=e/2,o=t/2,a=Math.floor(r),l=Math.floor(i),c=a+1,u=l+1,d=e/a,m=t/l,g=[],v=[],_=[],x=[];for(let y=0;y<u;y++){const S=y*m-o;for(let b=0;b<c;b++){const A=b*d-s;v.push(A,-S,0),_.push(0,0,1),x.push(b/a),x.push(1-y/l)}}for(let y=0;y<l;y++)for(let S=0;S<a;S++){const b=S+c*y,A=S+c*(y+1),k=S+1+c*(y+1),L=S+1+c*y;g.push(b,A,L),g.push(A,k,L)}this.setIndex(g),this.setAttribute("position",new pt(v,3)),this.setAttribute("normal",new pt(_,3)),this.setAttribute("uv",new pt(x,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new av(e.width,e.height,e.widthSegments,e.heightSegments)}}var Lae=`#ifdef USE_ALPHAHASH 545 if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; 546#endif`,Dae=`#ifdef USE_ALPHAHASH 547 const float ALPHA_HASH_SCALE = 0.05; 548 float hash2D( vec2 value ) { 549 return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); 550 } 551 float hash3D( vec3 value ) { 552 return hash2D( vec2( hash2D( value.xy ), value.z ) ); 553 } 554 float getAlphaHashThreshold( vec3 position ) { 555 float maxDeriv = max( 556 length( dFdx( position.xyz ) ), 557 length( dFdy( position.xyz ) ) 558 ); 559 float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); 560 vec2 pixScales = vec2( 561 exp2( floor( log2( pixScale ) ) ), 562 exp2( ceil( log2( pixScale ) ) ) 563 ); 564 vec2 alpha = vec2( 565 hash3D( floor( pixScales.x * position.xyz ) ), 566 hash3D( floor( pixScales.y * position.xyz ) ) 567 ); 568 float lerpFactor = fract( log2( pixScale ) ); 569 float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; 570 float a = min( lerpFactor, 1.0 - lerpFactor ); 571 vec3 cases = vec3( 572 x * x / ( 2.0 * a * ( 1.0 - a ) ), 573 ( x - 0.5 * a ) / ( 1.0 - a ), 574 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) 575 ); 576 float threshold = ( x < ( 1.0 - a ) ) 577 ? ( ( x < a ) ? cases.x : cases.y ) 578 : cases.z; 579 return clamp( threshold , 1.0e-6, 1.0 ); 580 } 581#endif`,kae=`#ifdef USE_ALPHAMAP 582 diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; 583#endif`,Oae=`#ifdef USE_ALPHAMAP 584 uniform sampler2D alphaMap; 585#endif`,Fae=`#ifdef USE_ALPHATEST 586 if ( diffuseColor.a < alphaTest ) discard; 587#endif`,Uae=`#ifdef USE_ALPHATEST 588 uniform float alphaTest; 589#endif`,Vae=`#ifdef USE_AOMAP 590 float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; 591 reflectedLight.indirectDiffuse *= ambientOcclusion; 592 #if defined( USE_CLEARCOAT ) 593 clearcoatSpecularIndirect *= ambientOcclusion; 594 #endif 595 #if defined( USE_SHEEN ) 596 sheenSpecularIndirect *= ambientOcclusion; 597 #endif 598 #if defined( USE_ENVMAP ) && defined( STANDARD )
599 float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); 600 reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); 601 #endif 602#endif`,jae=`#ifdef USE_AOMAP 603 uniform sampler2D aoMap; 604 uniform float aoMapIntensity; 605#endif`,Bae=`#ifdef USE_BATCHING 606 attribute float batchId; 607 uniform highp sampler2D batchingTexture; 608 mat4 getBatchingMatrix( const in float i ) { 609 int size = textureSize( batchingTexture, 0 ).x; 610 int j = int( i ) * 4; 611 int x = j % size; 612 int y = j / size; 613 vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); 614 vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); 615 vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); 616 vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); 617 return mat4( v1, v2, v3, v4 ); 618 } 619#endif`,zae=`#ifdef USE_BATCHING 620 mat4 batchingMatrix = getBatchingMatrix( batchId ); 621#endif`,Hae=`vec3 transformed = vec3( position ); 622#ifdef USE_ALPHAHASH 623 vPosition = vec3( position ); 624#endif`,Gae=`vec3 objectNormal = vec3( normal ); 625#ifdef USE_TANGENT 626 vec3 objectTangent = vec3( tangent.xyz ); 627#endif`,Wae=`float G_BlinnPhong_Implicit( ) { 628 return 0.25; 629} 630float D_BlinnPhong( const in float shininess, const in float dotNH ) { 631 return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); 632} 633vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { 634 vec3 halfDir = normalize( lightDir + viewDir ); 635 float dotNH = saturate( dot( normal, halfDir ) ); 636 float dotVH = saturate( dot( viewDir, halfDir ) ); 637 vec3 F = F_Schlick( specularColor, 1.0, dotVH ); 638 float G = G_BlinnPhong_Implicit( ); 639 float D = D_BlinnPhong( shininess, dotNH ); 640 return F * ( G * D ); 641} // validated`,$ae=`#ifdef USE_IRIDESCENCE 642 const mat3 XYZ_TO_REC709 = mat3( 643 3.2404542, -0.9692660, 0.0556434, 644 -1.5371385, 1.8760108, -0.2040259, 645 -0.4985314, 0.0415560, 1.0572252 646 ); 647 vec3 Fresnel0ToIor( vec3 fresnel0 ) { 648 vec3 sqrtF0 = sqrt( fresnel0 ); 649 return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); 650 } 651 vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { 652 return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); 653 } 654 float IorToFresnel0( float transmittedIor, float incidentIor ) { 655 return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); 656 } 657 vec3 evalSensitivity( float OPD, vec3 shift ) { 658 float phase = 2.0 * PI * OPD * 1.0e-9; 659 vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); 660 vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); 661 vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); 662 vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); 663 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 ) ); 664 xyz /= 1.0685e-7; 665 vec3 rgb = XYZ_TO_REC709 * xyz; 666 return rgb; 667 } 668 vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { 669 vec3 I; 670 float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); 671 float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); 672 float cosTheta2Sq = 1.0 - sinTheta2Sq; 673 if ( cosTheta2Sq < 0.0 ) { 674 return vec3( 1.0 ); 675 } 676 float cosTheta2 = sqrt( cosTheta2Sq ); 677 float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); 678 float R12 = F_Schlick( R0, 1.0, cosTheta1 );
679 float T121 = 1.0 - R12; 680 float phi12 = 0.0; 681 if ( iridescenceIOR < outsideIOR ) phi12 = PI; 682 float phi21 = PI - phi12; 683 vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); 684 vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); 685 vec3 phi23 = vec3( 0.0 ); 686 if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; 687 if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; 688 if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; 689 float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; 690 vec3 phi = vec3( phi21 ) + phi23; 691 vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); 692 vec3 r123 = sqrt( R123 ); 693 vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); 694 vec3 C0 = R12 + Rs; 695 I = C0; 696 vec3 Cm = Rs - T121; 697 for ( int m = 1; m <= 2; ++ m ) { 698 Cm *= r123; 699 vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); 700 I += Cm * Sm; 701 } 702 return max( I, vec3( 0.0 ) ); 703 } 704#endif`,qae=`#ifdef USE_BUMPMAP 705 uniform sampler2D bumpMap; 706 uniform float bumpScale; 707 vec2 dHdxy_fwd() { 708 vec2 dSTdx = dFdx( vBumpMapUv ); 709 vec2 dSTdy = dFdy( vBumpMapUv ); 710 float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; 711 float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; 712 float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; 713 return vec2( dBx, dBy ); 714 } 715 vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { 716 vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); 717 vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); 718 vec3 vN = surf_norm; 719 vec3 R1 = cross( vSigmaY, vN ); 720 vec3 R2 = cross( vN, vSigmaX ); 721 float fDet = dot( vSigmaX, R1 ) * faceDirection; 722 vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); 723 return normalize( abs( fDet ) * surf_norm - vGrad ); 724 } 725#endif`,Xae=`#if NUM_CLIPPING_PLANES > 0 726 vec4 plane; 727 #pragma unroll_loop_start 728 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 729 plane = clippingPlanes[ i ]; 730 if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; 731 } 732 #pragma unroll_loop_end 733 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 734 bool clipped = true; 735 #pragma unroll_loop_start 736 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 737 plane = clippingPlanes[ i ]; 738 clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; 739 } 740 #pragma unroll_loop_end 741 if ( clipped ) discard; 742 #endif 743#endif`,Kae=`#if NUM_CLIPPING_PLANES > 0 744 varying vec3 vClipPosition; 745 uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; 746#endif`,Yae=`#if NUM_CLIPPING_PLANES > 0 747 varying vec3 vClipPosition; 748#endif`,Qae=`#if NUM_CLIPPING_PLANES > 0 749 vClipPosition = - mvPosition.xyz; 750#endif`,Jae=`#if defined( USE_COLOR_ALPHA ) 751 diffuseColor *= vColor; 752#elif defined( USE_COLOR ) 753 diffuseColor.rgb *= vColor; 754#endif`,Zae=`#if defined( USE_COLOR_ALPHA ) 755 varying vec4 vColor; 756#elif defined( USE_COLOR ) 757 varying vec3 vColor; 758#endif`,ele=`#if defined( USE_COLOR_ALPHA ) 759 varying vec4 vColor; 760#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) 761 varying vec3 vColor; 762#endif`,tle=`#if defined( USE_COLOR_ALPHA ) 763 vColor = vec4( 1.0 ); 764#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) 765 vColor = vec3( 1.0 ); 766#endif 767#ifdef USE_COLOR 768 vColor *= color; 769#endif 770#ifdef USE_INSTANCING_COLOR 771 vColor.xyz *= instanceColor.xyz; 772#endif`,nle=`#define PI 3.141592653589793 773#define PI2 6.283185307179586 774#define PI_HALF 1.5707963267948966 775#define RECIPROCAL_PI 0.3183098861837907 776#define RECIPROCAL_PI2 0.15915494309189535 777#define EPSILON 1e-6 778#ifndef saturate 779#define saturate( a ) clamp( a, 0.0, 1.0 ) 780#endif 781#define whiteComplement( a ) ( 1.0 - saturate( a ) ) 782float pow2( const in float x ) { return x*x; } 783vec3 pow2( const in vec3 x ) { return x*x; } 784float pow3( const in float x ) { return x*x*x; } 785float pow4( const in float x ) { float x2 = x*x; return x2*x2; } 786float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } 787float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } 788highp float rand( const in vec2 uv ) { 789 const highp float a = 12.9898, b = 78.233, c = 43758.5453; 790 highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); 791 return fract( sin( sn ) * c ); 792} 793#ifdef HIGH_PRECISION 794 float precisionSafeLength( vec3 v ) { return length( v ); } 795#else 796 float precisionSafeLength( vec3 v ) { 797 float maxComponent = max3( abs( v ) ); 798 return length( v / maxComponent ) * maxComponent; 799 } 800#endif 801struct IncidentLight { 802 vec3 color; 803 vec3 direction; 804 bool visible; 805}; 806struct ReflectedLight { 807 vec3 directDiffuse; 808 vec3 directSpecular; 809 vec3 indirectDiffuse; 810 vec3 indirectSpecular; 811}; 812#ifdef USE_ALPHAHASH 813 varying vec3 vPosition; 814#endif 815vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 816 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 817} 818vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { 819 return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); 820} 821mat3 transposeMat3( const in mat3 m ) { 822 mat3 tmp; 823 tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); 824 tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); 825 tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); 826 return tmp; 827} 828float luminance( const in vec3 rgb ) { 829 const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); 830 return dot( weights, rgb ); 831} 832bool isPerspectiveMatrix( mat4 m ) { 833 return m[ 2 ][ 3 ] == - 1.0; 834} 835vec2 equirectUv( in vec3 dir ) { 836 float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; 837 float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; 838 return vec2( u, v ); 839}
840vec3 BRDF_Lambert( const in vec3 diffuseColor ) { 841 return RECIPROCAL_PI * diffuseColor; 842} 843vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 844 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 845 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 846} 847float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { 848 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 849 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 850} // validated`,rle=`#ifdef ENVMAP_TYPE_CUBE_UV 851 #define cubeUV_minMipLevel 4.0 852 #define cubeUV_minTileSize 16.0 853 float getFace( vec3 direction ) { 854 vec3 absDirection = abs( direction ); 855 float face = - 1.0; 856 if ( absDirection.x > absDirection.z ) { 857 if ( absDirection.x > absDirection.y ) 858 face = direction.x > 0.0 ? 0.0 : 3.0; 859 else 860 face = direction.y > 0.0 ? 1.0 : 4.0; 861 } else { 862 if ( absDirection.z > absDirection.y ) 863 face = direction.z > 0.0 ? 2.0 : 5.0; 864 else 865 face = direction.y > 0.0 ? 1.0 : 4.0; 866 } 867 return face; 868 } 869 vec2 getUV( vec3 direction, float face ) { 870 vec2 uv; 871 if ( face == 0.0 ) { 872 uv = vec2( direction.z, direction.y ) / abs( direction.x ); 873 } else if ( face == 1.0 ) { 874 uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); 875 } else if ( face == 2.0 ) { 876 uv = vec2( - direction.x, direction.y ) / abs( direction.z ); 877 } else if ( face == 3.0 ) { 878 uv = vec2( - direction.z, direction.y ) / abs( direction.x ); 879 } else if ( face == 4.0 ) { 880 uv = vec2( - direction.x, direction.z ) / abs( direction.y ); 881 } else { 882 uv = vec2( direction.x, direction.y ) / abs( direction.z ); 883 } 884 return 0.5 * ( uv + 1.0 ); 885 } 886 vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { 887 float face = getFace( direction ); 888 float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); 889 mipInt = max( mipInt, cubeUV_minMipLevel ); 890 float faceSize = exp2( mipInt ); 891 highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; 892 if ( face > 2.0 ) { 893 uv.y += faceSize; 894 face -= 3.0; 895 } 896 uv.x += face * faceSize; 897 uv.x += filterInt * 3.0 * cubeUV_minTileSize; 898 uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); 899 uv.x *= CUBEUV_TEXEL_WIDTH; 900 uv.y *= CUBEUV_TEXEL_HEIGHT; 901 #ifdef texture2DGradEXT 902 return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; 903 #else 904 return texture2D( envMap, uv ).rgb; 905 #endif 906 } 907 #define cubeUV_r0 1.0 908 #define cubeUV_m0 - 2.0 909 #define cubeUV_r1 0.8 910 #define cubeUV_m1 - 1.0 911 #define cubeUV_r4 0.4 912 #define cubeUV_m4 2.0 913 #define cubeUV_r5 0.305 914 #define cubeUV_m5 3.0 915 #define cubeUV_r6 0.21 916 #define cubeUV_m6 4.0 917 float roughnessToMip( float roughness ) { 918 float mip = 0.0; 919 if ( roughness >= cubeUV_r1 ) { 920 mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; 921 } else if ( roughness >= cubeUV_r4 ) { 922 mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; 923 } else if ( roughness >= cubeUV_r5 ) { 924 mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; 925 } else if ( roughness >= cubeUV_r6 ) { 926 mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; 927 } else { 928 mip = - 2.0 * log2( 1.16 * roughness ); } 929 return mip; 930 } 931 vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { 932 float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); 933 float mipF = fract( mip ); 934 float mipInt = floor( mip ); 935 vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); 936 if ( mipF == 0.0 ) { 937 return vec4( color0, 1.0 ); 938 } else { 939 vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); 940 return vec4( mix( color0, color1, mipF ), 1.0 ); 941 } 942 } 943#endif`,ile=`vec3 transformedNormal = objectNormal; 944#ifdef USE_TANGENT 945 vec3 transformedTangent = objectTangent; 946#endif 947#ifdef USE_BATCHING 948 mat3 bm = mat3( batchingMatrix ); 949 transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); 950 transformedNormal = bm * transformedNormal; 951 #ifdef USE_TANGENT 952 transformedTangent = bm * transformedTangent; 953 #endif 954#endif 955#ifdef USE_INSTANCING 956 mat3 im = mat3( instanceMatrix ); 957 transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); 958 transformedNormal = im * transformedNormal; 959 #ifdef USE_TANGENT 960 transformedTangent = im * transformedTangent; 961 #endif 962#endif 963transformedNormal = normalMatrix * transformedNormal; 964#ifdef FLIP_SIDED 965 transformedNormal = - transformedNormal; 966#endif 967#ifdef USE_TANGENT 968 transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; 969 #ifdef FLIP_SIDED 970 transformedTangent = - transformedTangent; 971 #endif 972#endif`,sle=`#ifdef USE_DISPLACEMENTMAP 973 uniform sampler2D displacementMap; 974 uniform float displacementScale; 975 uniform float displacementBias; 976#endif`,ole=`#ifdef USE_DISPLACEMENTMAP 977 transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
977placementBias ); 978#endif`,ale=`#ifdef USE_EMISSIVEMAP 979 vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); 980 totalEmissiveRadiance *= emissiveColor.rgb; 981#endif`,lle=`#ifdef USE_EMISSIVEMAP 982 uniform sampler2D emissiveMap; 983#endif`,cle="gl_FragColor = linearToOutputTexel( gl_FragColor );",ule=` 984const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( 985 vec3( 0.8224621, 0.177538, 0.0 ), 986 vec3( 0.0331941, 0.9668058, 0.0 ), 987 vec3( 0.0170827, 0.0723974, 0.9105199 ) 988); 989const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( 990 vec3( 1.2249401, - 0.2249404, 0.0 ), 991 vec3( - 0.0420569, 1.0420571, 0.0 ), 992 vec3( - 0.0196376, - 0.0786361, 1.0982735 ) 993); 994vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { 995 return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); 996} 997vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { 998 return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); 999} 1000vec4 LinearTransferOETF( in vec4 value ) { 1001 return value; 1002} 1003vec4 sRGBTransferOETF( in vec4 value ) { 1004 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 ); 1005} 1006vec4 LinearToLinear( in vec4 value ) { 1007 return value; 1008} 1009vec4 LinearTosRGB( in vec4 value ) { 1010 return sRGBTransferOETF( value ); 1011}`,dle=`#ifdef USE_ENVMAP 1012 #ifdef ENV_WORLDPOS 1013 vec3 cameraToFrag; 1014 if ( isOrthographic ) { 1015 cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 1016 } else { 1017 cameraToFrag = normalize( vWorldPosition - cameraPosition ); 1018 } 1019 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 1020 #ifdef ENVMAP_MODE_REFLECTION 1021 vec3 reflectVec = reflect( cameraToFrag, worldNormal ); 1022 #else 1023 vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); 1024 #endif 1025 #else 1026 vec3 reflectVec = vReflect; 1027 #endif 1028 #ifdef ENVMAP_TYPE_CUBE 1029 vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); 1030 #else 1031 vec4 envColor = vec4( 0.0 ); 1032 #endif 1033 #ifdef ENVMAP_BLENDING_MULTIPLY 1034 outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); 1035 #elif defined( ENVMAP_BLENDING_MIX ) 1036 outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); 1037 #elif defined( ENVMAP_BLENDING_ADD ) 1038 outgoingLight += envColor.xyz * specularStrength * reflectivity; 1039 #endif 1040#endif`,hle=`#ifdef USE_ENVMAP 1041 uniform float envMapIntensity; 1042 uniform float flipEnvMap; 1043 #ifdef ENVMAP_TYPE_CUBE 1044 uniform samplerCube envMap; 1045 #else 1046 uniform sampler2D envMap; 1047 #endif 1048 1049#endif`,fle=`#ifdef USE_ENVMAP 1050 uniform float reflectivity; 1051 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 1052 #define ENV_WORLDPOS 1053 #endif 1054 #ifdef ENV_WORLDPOS 1055 varying vec3 vWorldPosition; 1056 uniform float refractionRatio; 1057 #else 1058 varying vec3 vReflect; 1059 #endif 1060#endif`,ple=`#ifdef USE_ENVMAP 1061 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 1062 #define ENV_WORLDPOS 1063 #endif 1064 #ifdef ENV_WORLDPOS 1065 1066 varying vec3 vWorldPosition; 1067 #else 1068 varying vec3 vReflect; 1069 uniform float refractionRatio; 1070 #endif 1071#endif`,mle=`#ifdef USE_ENVMAP 1072 #ifdef ENV_WORLDPOS 1073 vWorldPosition = worldPosition.xyz; 1074 #else 1075 vec3 cameraToVertex; 1076 if ( isOrthographic ) { 1077 cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 1078 } else {
1079 cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); 1080 } 1081 vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 1082 #ifdef ENVMAP_MODE_REFLECTION 1083 vReflect = reflect( cameraToVertex, worldNormal ); 1084 #else 1085 vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); 1086 #endif 1087 #endif 1088#endif`,gle=`#ifdef USE_FOG 1089 vFogDepth = - mvPosition.z; 1090#endif`,yle=`#ifdef USE_FOG 1091 varying float vFogDepth; 1092#endif`,vle=`#ifdef USE_FOG 1093 #ifdef FOG_EXP2 1094 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); 1095 #else 1096 float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); 1097 #endif 1098 gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); 1099#endif`,xle=`#ifdef USE_FOG 1100 uniform vec3 fogColor; 1101 varying float vFogDepth; 1102 #ifdef FOG_EXP2 1103 uniform float fogDensity; 1104 #else 1105 uniform float fogNear; 1106 uniform float fogFar; 1107 #endif 1108#endif`,_le=`#ifdef USE_GRADIENTMAP 1109 uniform sampler2D gradientMap; 1110#endif 1111vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 1112 float dotNL = dot( normal, lightDirection ); 1113 vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); 1114 #ifdef USE_GRADIENTMAP 1115 return vec3( texture2D( gradientMap, coord ).r ); 1116 #else 1117 vec2 fw = fwidth( coord ) * 0.5; 1118 return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); 1119 #endif 1120}`,wle=`#ifdef USE_LIGHTMAP 1121 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 1122 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 1123 reflectedLight.indirectDiffuse += lightMapIrradiance; 1124#endif`,Sle=`#ifdef USE_LIGHTMAP 1125 uniform sampler2D lightMap; 1126 uniform float lightMapIntensity; 1127#endif`,ble=`LambertMaterial material; 1128material.diffuseColor = diffuseColor.rgb; 1129material.specularStrength = specularStrength;`,Ele=`varying vec3 vViewPosition; 1130struct LambertMaterial { 1131 vec3 diffuseColor; 1132 float specularStrength; 1133}; 1134void 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 ) { 1135 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1136 vec3 irradiance = dotNL * directLight.color; 1137 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1138} 1139void 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 ) { 1140 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1141} 1142#define RE_Direct RE_Direct_Lambert 1143#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Tle=`uniform bool receiveShadow; 1144uniform vec3 ambientLightColor; 1145#if defined( USE_LIGHT_PROBES ) 1146 uniform vec3 lightProbe[ 9 ]; 1147#endif 1148vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { 1149 float x = normal.x, y = normal.y, z = normal.z; 1150 vec3 result = shCoefficients[ 0 ] * 0.886227; 1151 result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; 1152 result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; 1153 result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; 1154 result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; 1155 result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; 1156 result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); 1157 result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; 1158 result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); 1159 return result; 1160} 1161vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { 1162 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 1163 vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); 1164 return irradiance; 1165} 1166vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { 1167 vec3 irradiance = ambientLightColor; 1168 return irradiance; 1169} 1170float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { 1171 #if defined ( LEGACY_LIGHTS ) 1172 if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { 1173 return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); 1174 } 1175 return 1.0; 1176 #else 1177 float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); 1178 if ( cutoffDistance > 0.0 ) { 1179 distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); 1180 } 1181 return distanceFalloff; 1182 #endif 1183} 1184float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { 1185 return smoothstep( coneCosine, penumbraCosine, angleCosine ); 1186} 1187#if NUM_DIR_LIGHTS > 0 1188 struct DirectionalLight { 1189 vec3 direction; 1190 vec3 color; 1191 }; 1192 uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; 1193 void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { 1194 light.color = directionalLight.color; 1195 light.direction = directionalLight.direction; 1196 light.visible = true; 1197 } 1198#endif 1199#if NUM_POINT_LIGHTS > 0 1200 struct PointLight { 1201 vec3 position; 1202 vec3 color; 1203 float distance; 1204 float decay; 1205 }; 1206 uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; 1207 void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { 1208 vec3 lVector = pointLight.position - geometryPosition; 1209 light.direction = normalize( lVector ); 1210 float lightDistance = length( lVector ); 1211 light.color = pointLight.color; 1212 light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); 1213 light.visible = ( light.color != vec3( 0.0 ) ); 1214 } 1215#endif
1216#if NUM_SPOT_LIGHTS > 0 1217 struct SpotLight { 1218 vec3 position; 1219 vec3 direction; 1220 vec3 color; 1221 float distance; 1222 float decay; 1223 float coneCos; 1224 float penumbraCos; 1225 }; 1226 uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; 1227 void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { 1228 vec3 lVector = spotLight.position - geometryPosition; 1229 light.direction = normalize( lVector ); 1230 float angleCos = dot( light.direction, spotLight.direction ); 1231 float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); 1232 if ( spotAttenuation > 0.0 ) { 1233 float lightDistance = length( lVector ); 1234 light.color = spotLight.color * spotAttenuation; 1235 light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); 1236 light.visible = ( light.color != vec3( 0.0 ) ); 1237 } else { 1238 light.color = vec3( 0.0 ); 1239 light.visible = false; 1240 } 1241 } 1242#endif 1243#if NUM_RECT_AREA_LIGHTS > 0 1244 struct RectAreaLight { 1245 vec3 color; 1246 vec3 position; 1247 vec3 halfWidth; 1248 vec3 halfHeight; 1249 }; 1250 uniform sampler2D ltc_1; uniform sampler2D ltc_2; 1251 uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; 1252#endif 1253#if NUM_HEMI_LIGHTS > 0 1254 struct HemisphereLight { 1255 vec3 direction; 1256 vec3 skyColor; 1257 vec3 groundColor; 1258 }; 1259 uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; 1260 vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { 1261 float dotNL = dot( normal, hemiLight.direction ); 1262 float hemiDiffuseWeight = 0.5 * dotNL + 0.5; 1263 vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); 1264 return irradiance; 1265 } 1266#endif`,Mle=`#ifdef USE_ENVMAP 1267 vec3 getIBLIrradiance( const in vec3 normal ) { 1268 #ifdef ENVMAP_TYPE_CUBE_UV 1269 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 1270 vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); 1271 return PI * envMapColor.rgb * envMapIntensity; 1272 #else 1273 return vec3( 0.0 ); 1274 #endif 1275 } 1276 vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { 1277 #ifdef ENVMAP_TYPE_CUBE_UV 1278 vec3 reflectVec = reflect( - viewDir, normal ); 1279 reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); 1280 reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); 1281 vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); 1282 return envMapColor.rgb * envMapIntensity; 1283 #else 1284 return vec3( 0.0 ); 1285 #endif 1286 } 1287 #ifdef USE_ANISOTROPY 1288 vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { 1289 #ifdef ENVMAP_TYPE_CUBE_UV 1290 vec3 bentNormal = cross( bitangent, viewDir ); 1291 bentNormal = normalize( cross( bentNormal, bitangent ) ); 1292 bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); 1293 return getIBLRadiance( viewDir, bentNormal, roughness ); 1294 #else 1295 return vec3( 0.0 ); 1296 #endif 1297 } 1298 #endif 1299#endif`,Ale=`ToonMaterial material; 1300material.diffuseColor = diffuseColor.rgb;`,Cle=`varying vec3 vViewPosition; 1301struct ToonMaterial { 1302 vec3 diffuseColor; 1303}; 1304void 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 ) { 1305 vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; 1306 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1307} 1308void 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 ) { 1309 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1310} 1311#define RE_Direct RE_Direct_Toon 1312#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Rle=`BlinnPhongMaterial material; 1313material.diffuseColor = diffuseColor.rgb; 1314material.specularColor = specular; 1315material.specularShininess = shininess; 1316material.specularStrength = specularStrength;`,Ple=`varying vec3 vViewPosition; 1317struct BlinnPhongMaterial { 1318 vec3 diffuseColor; 1319 vec3 specularColor; 1320 float specularShininess; 1321 float specularStrength; 1322}; 1323void 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 ) {
1324 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1325 vec3 irradiance = dotNL * directLight.color; 1326 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1327 reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; 1328} 1329void 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 ) { 1330 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1331} 1332#define RE_Direct RE_Direct_BlinnPhong 1333#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Nle=`PhysicalMaterial material; 1334material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); 1335vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); 1336float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); 1337material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; 1338material.roughness = min( material.roughness, 1.0 ); 1339#ifdef IOR 1340 material.ior = ior; 1341 #ifdef USE_SPECULAR 1342 float specularIntensityFactor = specularIntensity; 1343 vec3 specularColorFactor = specularColor; 1344 #ifdef USE_SPECULAR_COLORMAP 1345 specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; 1346 #endif 1347 #ifdef USE_SPECULAR_INTENSITYMAP 1348 specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; 1349 #endif 1350 material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); 1351 #else 1352 float specularIntensityFactor = 1.0; 1353 vec3 specularColorFactor = vec3( 1.0 ); 1354 material.specularF90 = 1.0; 1355 #endif 1356 material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); 1357#else 1358 material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); 1359 material.specularF90 = 1.0; 1360#endif 1361#ifdef USE_CLEARCOAT 1362 material.clearcoat = clearcoat; 1363 material.clearcoatRoughness = clearcoatRoughness; 1364 material.clearcoatF0 = vec3( 0.04 ); 1365 material.clearcoatF90 = 1.0; 1366 #ifdef USE_CLEARCOATMAP 1367 material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; 1368 #endif 1369 #ifdef USE_CLEARCOAT_ROUGHNESSMAP 1370 material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; 1371 #endif 1372 material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); 1373 material.clearcoatRoughness += geometryRoughness; 1374 material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); 1375#endif 1376#ifdef USE_IRIDESCENCE 1377 material.iridescence = iridescence; 1378 material.iridescenceIOR = iridescenceIOR; 1379 #ifdef USE_IRIDESCENCEMAP 1380 material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; 1381 #endif 1382 #ifdef USE_IRIDESCENCE_THICKNESSMAP 1383 material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; 1384 #else 1385 material.iridescenceThickness = iridescenceThicknessMaximum; 1386 #endif 1387#endif 1388#ifdef USE_SHEEN 1389 material.sheenColor = sheenColor; 1390 #ifdef USE_SHEEN_COLORMAP 1391 material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; 1392 #endif 1393 material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); 1394 #ifdef USE_SHEEN_ROUGHNESSMAP 1395 material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; 1396 #endif 1397#endif 1398#ifdef USE_ANISOTROPY 1399 #ifdef USE_ANISOTROPYMAP 1400 mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); 1401 vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; 1402 vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; 1403 #else 1404 vec2 anisotropyV = anisotropyVector; 1405 #endif 1406 material.anisotropy = length( anisotropyV ); 1407 if( material.anisotropy == 0.0 ) { 1408 anisotropyV = vec2( 1.0, 0.0 ); 1409 } else { 1410 anisotropyV /= material.anisotropy; 1411 material.anisotropy = saturate( material.anisotropy ); 1412 } 1413 material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
1414 material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; 1415 material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; 1416#endif`,Ile=`struct PhysicalMaterial { 1417 vec3 diffuseColor; 1418 float roughness; 1419 vec3 specularColor; 1420 float specularF90
vendor: 14,563 bytes, lines 1420-1716
1420; 1421 #ifdef USE_CLEARCOAT 1422 float clearcoat; 1423 float clearcoatRoughness; 1424 vec3 clearcoatF0; 1425 float clearcoatF90; 1426 #endif 1427 #ifdef USE_IRIDESCENCE 1428 float iridescence; 1429 float iridescenceIOR; 1430 float iridescenceThickness; 1431 vec3 iridescenceFresnel; 1432 vec3 iridescenceF0; 1433 #endif 1434 #ifdef USE_SHEEN 1435 vec3 sheenColor; 1436 float sheenRoughness; 1437 #endif 1438 #ifdef IOR 1439 float ior; 1440 #endif 1441 #ifdef USE_TRANSMISSION 1442 float transmission; 1443 float transmissionAlpha; 1444 float thickness; 1445 float attenuationDistance; 1446 vec3 attenuationColor; 1447 #endif 1448 #ifdef USE_ANISOTROPY 1449 float anisotropy; 1450 float alphaT; 1451 vec3 anisotropyT; 1452 vec3 anisotropyB; 1453 #endif 1454}; 1455vec3 clearcoatSpecularDirect = vec3( 0.0 ); 1456vec3 clearcoatSpecularIndirect = vec3( 0.0 ); 1457vec3 sheenSpecularDirect = vec3( 0.0 ); 1458vec3 sheenSpecularIndirect = vec3(0.0 ); 1459vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { 1460 float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); 1461 float x2 = x * x; 1462 float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); 1463 return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); 1464} 1465float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { 1466 float a2 = pow2( alpha ); 1467 float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); 1468 float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); 1469 return 0.5 / max( gv + gl, EPSILON ); 1470} 1471float D_GGX( const in float alpha, const in float dotNH ) { 1472 float a2 = pow2( alpha ); 1473 float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; 1474 return RECIPROCAL_PI * a2 / pow2( denom ); 1475} 1476#ifdef USE_ANISOTROPY 1477 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 ) { 1478 float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); 1479 float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); 1480 float v = 0.5 / ( gv + gl ); 1481 return saturate(v); 1482 } 1483 float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { 1484 float a2 = alphaT * alphaB; 1485 highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); 1486 highp float v2 = dot( v, v ); 1487 float w2 = a2 / v2; 1488 return RECIPROCAL_PI * a2 * pow2 ( w2 ); 1489 } 1490#endif 1491#ifdef USE_CLEARCOAT 1492 vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { 1493 vec3 f0 = material.clearcoatF0; 1494 float f90 = material.clearcoatF90; 1495 float roughness = material.clearcoatRoughness; 1496 float alpha = pow2( roughness ); 1497 vec3 halfDir = normalize( lightDir + viewDir ); 1498 float dotNL = saturate( dot( normal, lightDir ) ); 1499 float dotNV = saturate( dot( normal, viewDir ) ); 1500 float dotNH = saturate( dot( normal, halfDir ) ); 1501 float dotVH = saturate( dot( viewDir, halfDir ) ); 1502 vec3 F = F_Schlick( f0, f90, dotVH ); 1503 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1504 float D = D_GGX( alpha, dotNH ); 1505 return F * ( V * D ); 1506 } 1507#endif 1508vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1509 vec3 f0 = material.specularColor; 1510 float f90 = material.specularF90; 1511 float roughness = material.roughness; 1512 float alpha = pow2( roughness ); 1513 vec3 halfDir = normalize( lightDir + viewDir ); 1514 float dotNL = saturate( dot( normal, lightDir ) ); 1515 float dotNV = saturate( dot( normal, viewDir ) ); 1516 float dotNH = saturate( dot( normal, halfDir ) ); 1517 float dotVH = saturate( dot( viewDir, halfDir ) ); 1518 vec3 F = F_Schlick( f0, f90, dotVH ); 1519 #ifdef USE_IRIDESCENCE 1520 F = mix( F, material.iridescenceFresnel, material.iridescence ); 1521 #endif 1522 #ifdef USE_ANISOTROPY 1523 float dotTL = dot( material.anisotropyT, lightDir ); 1524 float dotTV = dot( material.anisotropyT, viewDir ); 1525 float dotTH = dot( material.anisotropyT, halfDir ); 1526 float dotBL = dot( material.anisotropyB, lightDir ); 1527 float dotBV = dot( material.anisotropyB, viewDir ); 1528 float dotBH = dot( material.anisotropyB, halfDir ); 1529 float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); 1530 float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); 1531 #else 1532 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1533 float D = D_GGX( alpha, dotNH ); 1534 #endif 1535 return F * ( V * D ); 1536} 1537vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { 1538 const float LUT_SIZE = 64.0; 1539 const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; 1540 const float LUT_BIAS = 0.5 / LUT_SIZE; 1541 float dotNV = saturate( dot( N, V ) ); 1542 vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); 1543 uv = uv * LUT_SCALE + LUT_BIAS; 1544 return uv; 1545} 1546float LTC_ClippedSphereFormFactor( const in vec3 f ) { 1547 float l = length( f ); 1548 return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); 1549} 1550vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { 1551 float x = dot( v1, v2 ); 1552 float y = abs( x ); 1553 float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; 1554 float b = 3.4175940 + ( 4.1616724 + y ) * y; 1555 float v = a / b; 1556 float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; 1557 return cross( v1, v2 ) * theta_sintheta; 1558} 1559vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { 1560 vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; 1561 vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; 1562 vec3 lightNormal = cross( v1, v2 ); 1563 if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); 1564 vec3 T1, T2; 1565 T1 = normalize( V - N * dot( V, N ) ); 1566 T2 = - cross( N, T1 ); 1567 mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); 1568 vec3 coords[ 4 ]; 1569 coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); 1570 coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); 1571 coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); 1572 coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); 1573 coords[ 0 ] = normalize( coords[ 0 ] ); 1574 coords[ 1 ] = normalize( coords[ 1 ] ); 1575 coords[ 2 ] = normalize( coords[ 2 ] ); 1576 coords[ 3 ] = normalize( coords[ 3 ] ); 1577 vec3 vectorFormFactor = vec3( 0.0 ); 1578 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); 1579 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); 1580 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); 1581 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); 1582 float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); 1583 return vec3( result ); 1584} 1585#if defined( USE_SHEEN ) 1586float D_Charlie( float roughness, float dotNH ) { 1587 float alpha = pow2( roughness ); 1588 float invAlpha = 1.0 / alpha; 1589 float cos2h = dotNH * dotNH; 1590 float sin2h = max( 1.0 - cos2h, 0.0078125 ); 1591 return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); 1592} 1593float V_Neubelt( float dotNV, float dotNL ) { 1594 return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); 1595} 1596vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { 1597 vec3 halfDir = normalize( lightDir + viewDir ); 1598 float dotNL = saturate( dot( normal, lightDir ) ); 1599 float dotNV = saturate( dot( normal, viewDir ) ); 1600 float dotNH = saturate( dot( normal, halfDir ) ); 1601 float D = D_Charlie( sheenRoughness, dotNH ); 1602 float V = V_Neubelt( dotNV, dotNL ); 1603 return sheenColor * ( D * V ); 1604} 1605#endif 1606float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1607 float dotNV = saturate( dot( normal, viewDir ) ); 1608 float r2 = roughness * roughness; 1609 float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; 1610 float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; 1611 float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); 1612 return saturate( DG * RECIPROCAL_PI ); 1613} 1614vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1615 float dotNV = saturate( dot( normal, viewDir ) ); 1616 const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); 1617 const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); 1618 vec4 r = roughness * c0 + c1; 1619 float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; 1620 vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; 1621 return fab; 1622} 1623vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { 1624 vec2 fab = DFGApprox( normal, viewDir, roughness ); 1625 return specularColor * fab.x + specularF90 * fab.y; 1626} 1627#ifdef USE_IRIDESCENCE 1628void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { 1629#else 1630void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { 1631#endif 1632 vec2 fab = DFGApprox( normal, viewDir, roughness ); 1633 #ifdef USE_IRIDESCENCE 1634 vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); 1635 #else 1636 vec3 Fr = specularColor; 1637 #endif 1638 vec3 FssEss = Fr * fab.x + specularF90 * fab.y; 1639 float Ess = fab.x + fab.y; 1640 float Ems = 1.0 - Ess; 1641 vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); 1642 singleScatter += FssEss; 1643 multiScatter += Fms * Ems; 1644} 1645#if NUM_RECT_AREA_LIGHTS > 0 1646 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 ) { 1647 vec3 normal = geometryNormal; 1648 vec3 viewDir = geometryViewDir; 1649 vec3 position = geometryPosition; 1650 vec3 lightPos = rectAreaLight.position; 1651 vec3 halfWidth = rectAreaLight.halfWidth; 1652 vec3 halfHeight = rectAreaLight.halfHeight; 1653 vec3 lightColor = rectAreaLight.color; 1654 float roughness = material.roughness; 1655 vec3 rectCoords[ 4 ]; 1656 rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; 1657 rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; 1658 rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; 1659 vec2 uv = LTC_Uv( normal, viewDir, roughness ); 1660 vec4 t1 = texture2D( ltc_1, uv ); 1661 vec4 t2 = texture2D( ltc_2, uv ); 1662 mat3 mInv = mat3( 1663 vec3( t1.x, 0, t1.y ), 1664 vec3( 0, 1, 0 ), 1665 vec3( t1.z, 0, t1.w ) 1666 ); 1667 vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); 1668 reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); 1669 reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); 1670 } 1671#endif 1672void 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 ) { 1673 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1674 vec3 irradiance = dotNL * directLight.color; 1675 #ifdef USE_CLEARCOAT 1676 float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); 1677 vec3 ccIrradiance = dotNLcc * directLight.color; 1678 clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); 1679 #endif 1680 #ifdef USE_SHEEN 1681 sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); 1682 #endif 1683 reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); 1684 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1685} 1686void 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 ) { 1687 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1688} 1689void 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) { 1690 #ifdef USE_CLEARCOAT 1691 clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); 1692 #endif 1693 #ifdef USE_SHEEN 1694 sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1695 #endif 1696 vec3 singleScattering = vec3( 0.0 ); 1697 vec3 multiScattering = vec3( 0.0 ); 1698 vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; 1699 #ifdef USE_IRIDESCENCE 1700 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); 1701 #else 1702 computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); 1703 #endif 1704 vec3 totalScattering = singleScattering + multiScattering; 1705 vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); 1706 reflectedLight.indirectSpecular += radiance * singleScattering; 1707 reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; 1708 reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; 1709} 1710#define RE_Direct RE_Direct_Physical 1711#define RE_Direct_RectArea RE_Direct_RectArea_Physical 1712#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical 1713#define RE_IndirectSpecular RE_IndirectSpecular_Physical 1714float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { 1715 return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); 1716}`,
1716Lle=` 1717vec3 geometryPosition = - vViewPosition; 1718vec3 geometryNormal = normal; 1719vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); 1720vec3 geometryClearcoatNormal = vec3( 0.0 ); 1721#ifdef USE_CLEARCOAT 1722 geometryClearcoatNormal = clearcoatNormal; 1723#endif 1724#ifdef USE_IRIDESCENCE 1725 float dotNVi = saturate( dot( normal, geometryViewDir ) ); 1726 if ( material.iridescenceThickness == 0.0 ) { 1727 material.iridescence = 0.0; 1728 } else { 1729 material.iridescence = saturate( material.iridescence ); 1730 } 1731 if ( material.iridescence > 0.0 ) { 1732 material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); 1733 material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); 1734 } 1735#endif 1736IncidentLight directLight; 1737#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) 1738 PointLight pointLight; 1739 #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 1740 PointLightShadow pointLightShadow; 1741 #endif 1742 #pragma unroll_loop_start 1743 for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { 1744 pointLight = pointLights[ i ]; 1745 getPointLightInfo( pointLight, geometryPosition, directLight ); 1746 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) 1747 pointLightShadow = pointLightShadows[ i ]; 1748 directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; 1749 #endif 1750 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1751 } 1752 #pragma unroll_loop_end 1753#endif 1754#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) 1755 SpotLight spotLight; 1756 vec4 spotColor; 1757 vec3 spotLightCoord; 1758 bool inSpotLightMap; 1759 #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 1760 SpotLightShadow spotLightShadow; 1761 #endif 1762 #pragma unroll_loop_start 1763 for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { 1764 spotLight = spotLights[ i ]; 1765 getSpotLightInfo( spotLight, geometryPosition, directLight ); 1766 #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1767 #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX 1768 #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1769 #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS 1770 #else 1771 #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1772 #endif 1773 #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) 1774 spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; 1775 inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); 1776 spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); 1777 directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; 1778 #endif 1779 #undef SPOT_LIGHT_MAP_INDEX 1780 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1781 spotLightShadow = spotLightShadows[ i ]; 1782 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1783 #endif 1784 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1785 } 1786 #pragma unroll_loop_end 1787#endif 1788#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) 1789 DirectionalLight directionalLight; 1790 #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 1791 DirectionalLightShadow directionalLightShadow; 1792 #endif 1793 #pragma unroll_loop_start 1794 for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { 1795 directionalLight = directionalLights[ i ]; 1796 getDirectionalLightInfo( directionalLight, directLight ); 1797 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) 1798 directionalLightShadow = directionalLightShadows[ i ]; 1799 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1800 #endif 1801 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1802 } 1803 #pragma unroll_loop_end 1804#endif 1805#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) 1806 RectAreaLight rectAreaLight; 1807 #pragma unroll_loop_start 1808 for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { 1809 rectAreaLight = rectAreaLights[ i ]; 1810 RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1811 } 1812 #pragma unroll_loop_end 1813#endif 1814#if defined( RE_IndirectDiffuse ) 1815 vec3 iblIrradiance = vec3( 0.0 ); 1816 vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); 1817 #if defined( USE_LIGHT_PROBES ) 1818 irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); 1819 #endif 1820 #if ( NUM_HEMI_LIGHTS > 0 ) 1821 #pragma unroll_loop_start 1822 for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { 1823 irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); 1824 } 1825 #pragma unroll_loop_end 1826 #endif 1827#endif 1828#if defined( RE_IndirectSpecular ) 1829 vec3 radiance = vec3( 0.0 ); 1830 vec3 clearcoatRadiance = vec3( 0.0 ); 1831#endif`,Dle=`#if defined( RE_IndirectDiffuse ) 1832 #ifdef USE_LIGHTMAP 1833 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 1834 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 1835 irradiance += lightMapIrradiance; 1836 #endif 1837 #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) 1838 iblIrradiance += getIBLIrradiance( geometryNormal ); 1839 #endif 1840#endif 1841#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) 1842 #ifdef USE_ANISOTROPY 1843 radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); 1844 #else 1845 radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); 1846 #endif 1847 #ifdef USE_CLEARCOAT 1848 clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); 1849 #endif 1850#endif`,kle=`#if defined( RE_IndirectDiffuse ) 1851 RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1852#endif 1853#if defined( RE_IndirectSpecular ) 1854 RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1855#endif`,Ole=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) 1856 gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; 1857#endif`,Fle=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) 1858 uniform float logDepthBufFC; 1859 varying float vFragDepth; 1860 varying float vIsPerspective; 1861#endif`,Ule=`#ifdef USE_LOGDEPTHBUF 1862 #ifdef USE_LOGDEPTHBUF_EXT 1863 varying float vFragDepth; 1864 varying float vIsPerspective; 1865 #else 1866 uniform float logDepthBufFC; 1867 #endif 1868#endif`,Vle=`#ifdef USE_LOGDEPTHBUF 1869 #ifdef USE_LOGDEPTHBUF_EXT 1870 vFragDepth = 1.0 + gl_Position.w; 1871 vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); 1872 #else 1873 if ( isPerspectiveMatrix( projectionMatrix ) ) { 1874 gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; 1875 gl_Position.z *= gl_Position.w; 1876 } 1877 #endif 1878#endif`,jle=`#ifdef USE_MAP 1879 vec4 sampledDiffuseColor = texture2D( map, vMapUv ); 1880 #ifdef DECODE_VIDEO_TEXTURE 1881 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 ); 1882 1883 #endif 1884 diffuseColor *= sampledDiffuseColor; 1885#endif`,Ble=`#ifdef USE_MAP 1886 uniform sampler2D map; 1887#endif`,zle=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1888 #if defined( USE_POINTS_UV ) 1889 vec2 uv = vUv; 1890 #else 1891 vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; 1892 #endif 1893#endif 1894#ifdef USE_MAP 1895 diffuseColor *= texture2D( map, uv ); 1896#endif 1897#ifdef USE_ALPHAMAP 1898 diffuseColor.a *= texture2D( alphaMap, uv ).g; 1899#endif`,Hle=`#if defined( USE_POINTS_UV ) 1900 varying vec2 vUv; 1901#else 1902 #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1903 uniform mat3 uvTransform; 1904 #endif 1905#endif 1906#ifdef USE_MAP 1907 uniform sampler2D map; 1908#endif 1909#ifdef USE_ALPHAMAP 1910 uniform sampler2D alphaMap; 1911#endif`,Gle=`float metalnessFactor = metalness; 1912#ifdef USE_METALNESSMAP 1913 vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); 1914 metalnessFactor *= texelMetalness.b; 1915#endif`,Wle=`#ifdef USE_METALNESSMAP 1916 uniform sampler2D metalnessMap; 1917#endif`,$le=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) 1918 vColor *= morphTargetBaseInfluence; 1919 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1920 #if defined( USE_COLOR_ALPHA ) 1921 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; 1922 #elif defined( USE_COLOR ) 1923 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; 1924 #endif 1925 } 1926#endif`,qle=`#ifdef USE_MORPHNORMALS 1927 objectNormal *= morphTargetBaseInfluence; 1928 #ifdef MORPHTARGETS_TEXTURE 1929 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1930 if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; 1931 } 1932 #else 1933 objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; 1934 objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; 1935 objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; 1936 objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; 1937 #endif 1938#endif`,Xle=`#ifdef USE_MORPHTARGETS 1939 uniform float morphTargetBaseInfluence; 1940 #ifdef MORPHTARGETS_TEXTURE 1941 uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1942 uniform sampler2DArray morphTargetsTexture; 1943 uniform ivec2 morphTargetsTextureSize; 1944 vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { 1945 int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; 1946 int y = texelIndex / morphTargetsTextureSize.x; 1947 int x = texelIndex - y * morphTargetsTextureSize.x; 1948 ivec3 morphUV = ivec3( x, y, morphTargetIndex ); 1949 return texelFetch( morphTargetsTexture, morphUV, 0 ); 1950 } 1951 #else 1952 #ifndef USE_MORPHNORMALS 1953 uniform float morphTargetInfluences[ 8 ]; 1954 #else 1955 uniform float morphTargetInfluences[ 4 ]; 1956 #endif 1957 #endif 1958#endif`,Kle=`#ifdef USE_MORPHTARGETS 1959 transformed *= morphTargetBaseInfluence; 1960 #ifdef MORPHTARGETS_TEXTURE 1961 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1962 if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; 1963 } 1964 #else 1965 transformed += morphTarget0 * morphTargetInfluences[ 0 ]; 1966 transformed += morphTarget1 * morphTargetInfluences[ 1 ]; 1967 transformed += morphTarget2 * morphTargetInfluences[ 2 ]; 1968 transformed += morphTarget3 * morphTargetInfluences[ 3 ]; 1969 #ifndef USE_MORPHNORMALS 1970 transformed += morphTarget4 * morphTargetInfluences[ 4 ]; 1971 transformed += morphTarget5 * morphTargetInfluences[ 5 ]; 1972 transformed += morphTarget6 * morphTargetInfluences[ 6 ]; 1973 transformed += morphTarget7 * morphTargetInfluences[ 7 ]; 1974 #endif 1975 #endif 1976#endif`,Yle=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; 1977#ifdef FLAT_SHADED 1978 vec3 fdx = dFdx( vViewPosition ); 1979 vec3 fdy = dFdy( vViewPosition ); 1980 vec3 normal = normalize( cross( fdx, fdy ) ); 1981#else 1982 vec3 normal = normalize( vNormal ); 1983 #ifdef DOUBLE_SIDED 1984 normal *= faceDirection; 1985 #endif 1986#endif 1987#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) 1988 #ifdef USE_TANGENT 1989 mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1990 #else 1991 mat3 tbn = getTangentFrame( - vViewPosition, normal, 1992 #if defined( USE_NORMALMAP ) 1993 vNormalMapUv 1994 #elif defined( USE_CLEARCOAT_NORMALMAP ) 1995 vClearcoatNormalMapUv 1996 #else 1997 vUv 1998 #endif 1999 ); 2000 #endif 2001 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 2002 tbn[0] *= faceDirection; 2003 tbn[1] *= faceDirection; 2004 #endif 2005#endif 2006#ifdef USE_CLEARCOAT_NORMALMAP 2007 #ifdef USE_TANGENT 2008 mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 2009 #else 2010 mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); 2011 #endif 2012 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 2013 tbn2[0] *= faceDirection; 2014 tbn2[1] *= faceDirection; 2015 #endif 2016#endif 2017vec3 nonPerturbedNormal = normal;`,Qle=`#ifdef USE_NORMALMAP_OBJECTSPACE 2018 normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 2019 #ifdef FLIP_SIDED 2020 normal = - normal; 2021 #endif 2022 #ifdef DOUBLE_SIDED 2023 normal = normal * faceDirection; 2024 #endif 2025 normal = normalize( normalMatrix * normal ); 2026#elif defined( USE_NORMALMAP_TANGENTSPACE ) 2027 vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 2028 mapN.xy *= normalScale; 2029 normal = normalize( tbn * mapN ); 2030#elif defined( USE_BUMPMAP )
2031 normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); 2032#endif`,Jle=`#ifndef FLAT_SHADED 2033 varying vec3 vNormal; 2034 #ifdef USE_TANGENT 2035 varying vec3 vTangent; 2036 varying vec3 vBitangent; 2037 #endif 2038#endif`,Zle=`#ifndef FLAT_SHADED 2039 varying vec3 vNormal; 2040 #ifdef USE_TANGENT 2041 varying vec3 vTangent; 2042 varying vec3 vBitangent; 2043 #endif 2044#endif`,ece=`#ifndef FLAT_SHADED 2045 vNormal = normalize( transformedNormal ); 2046 #ifdef USE_TANGENT 2047 vTangent = normalize( transformedTangent ); 2048 vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); 2049 #endif 2050#endif`,tce=`#ifdef USE_NORMALMAP 2051 uniform sampler2D normalMap; 2052 uniform vec2 normalScale; 2053#endif 2054#ifdef USE_NORMALMAP_OBJECTSPACE 2055 uniform mat3 normalMatrix; 2056#endif 2057#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) 2058 mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { 2059 vec3 q0 = dFdx( eye_pos.xyz ); 2060 vec3 q1 = dFdy( eye_pos.xyz ); 2061 vec2 st0 = dFdx( uv.st ); 2062 vec2 st1 = dFdy( uv.st ); 2063 vec3 N = surf_norm; 2064 vec3 q1perp = cross( q1, N ); 2065 vec3 q0perp = cross( N, q0 ); 2066 vec3 T = q1perp * st0.x + q0perp * st1.x; 2067 vec3 B = q1perp * st0.y + q0perp * st1.y; 2068 float det = max( dot( T, T ), dot( B, B ) ); 2069 float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); 2070 return mat3( T * scale, B * scale, N ); 2071 } 2072#endif`,nce=`#ifdef USE_CLEARCOAT 2073 vec3 clearcoatNormal = nonPerturbedNormal; 2074#endif`,rce=`#ifdef USE_CLEARCOAT_NORMALMAP 2075 vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; 2076 clearcoatMapN.xy *= clearcoatNormalScale; 2077 clearcoatNormal = normalize( tbn2 * clearcoatMapN ); 2078#endif`,ice=`#ifdef USE_CLEARCOATMAP 2079 uniform sampler2D clearcoatMap; 2080#endif 2081#ifdef USE_CLEARCOAT_NORMALMAP 2082 uniform sampler2D clearcoatNormalMap; 2083 uniform vec2 clearcoatNormalScale; 2084#endif 2085#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2086 uniform sampler2D clearcoatRoughnessMap; 2087#endif`,sce=`#ifdef USE_IRIDESCENCEMAP 2088 uniform sampler2D iridescenceMap; 2089#endif 2090#ifdef USE_IRIDESCENCE_THICKNESSMAP 2091 uniform sampler2D iridescenceThicknessMap; 2092#endif`,oce=`#ifdef OPAQUE 2093diffuseColor.a = 1.0; 2094#endif 2095#ifdef USE_TRANSMISSION 2096diffuseColor.a *= material.transmissionAlpha; 2097#endif 2098gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,ace=`vec3 packNormalToRGB( const in vec3 normal ) { 2099 return normalize( normal ) * 0.5 + 0.5; 2100} 2101vec3 unpackRGBToNormal( const in vec3 rgb ) { 2102 return 2.0 * rgb.xyz - 1.0; 2103} 2104const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; 2105const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); 2106const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); 2107const float ShiftRight8 = 1. / 256.; 2108vec4 packDepthToRGBA( const in float v ) { 2109 vec4 r = vec4( fract( v * PackFactors ), v ); 2110 r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; 2111} 2112float unpackRGBAToDepth( const in vec4 v ) { 2113 return dot( v, UnpackFactors ); 2114} 2115vec2 packDepthToRG( in highp float v ) { 2116 return packDepthToRGBA( v ).yx; 2117} 2118float unpackRGToDepth( const in highp vec2 v ) { 2119 return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); 2120} 2121vec4 pack2HalfToRGBA( vec2 v ) { 2122 vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); 2123 return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); 2124} 2125vec2 unpackRGBATo2Half( vec4 v ) { 2126 return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); 2127} 2128float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { 2129 return ( viewZ + near ) / ( near - far ); 2130} 2131float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { 2132 return depth * ( near - far ) - near; 2133} 2134float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { 2135 return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); 2136} 2137float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { 2138 return ( near * far ) / ( ( far - near ) * depth - far ); 2139}`,lce=`#ifdef PREMULTIPLIED_ALPHA 2140 gl_FragColor.rgb *= gl_FragColor.a; 2141#endif`,cce=`vec4 mvPosition = vec4( transformed, 1.0 ); 2142#ifdef USE_BATCHING 2143 mvPosition = batchingMatrix * mvPosition; 2144#endif 2145#ifdef USE_INSTANCING 2146 mvPosition = instanceMatrix * mvPosition; 2147#endif 2148mvPosition = modelViewMatrix * mvPosition; 2149gl_Position = projectionMatrix * mvPosition;`,uce=`#ifdef DITHERING 2150 gl_FragColor.rgb = dithering( gl_FragColor.rgb ); 2151#endif`,dce=`#ifdef DITHERING 2152 vec3 dithering( vec3 color ) { 2153 float grid_position = rand( gl_FragCoord.xy ); 2154 vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); 2155 dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); 2156 return color + dither_shift_RGB; 2157 } 2158#endif`,hce=`float roughnessFactor = roughness; 2159#ifdef USE_ROUGHNESSMAP 2160 vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); 2161 roughnessFactor *= texelRoughness.g; 2162#endif`,fce=`#ifdef USE_ROUGHNESSMAP 2163 uniform sampler2D roughnessMap;
2164#endif`,pce=`#if NUM_SPOT_LIGHT_COORDS > 0 2165 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 2166#endif 2167#if NUM_SPOT_LIGHT_MAPS > 0 2168 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; 2169#endif 2170#ifdef USE_SHADOWMAP 2171 #if NUM_DIR_LIGHT_SHADOWS > 0 2172 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 2173 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 2174 struct DirectionalLightShadow { 2175 float shadowBias; 2176 float shadowNormalBias; 2177 float shadowRadius; 2178 vec2 shadowMapSize; 2179 }; 2180 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 2181 #endif 2182 #if NUM_SPOT_LIGHT_SHADOWS > 0 2183 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 2184 struct SpotLightShadow { 2185 float shadowBias; 2186 float shadowNormalBias; 2187 float shadowRadius; 2188 vec2 shadowMapSize; 2189 }; 2190 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 2191 #endif 2192 #if NUM_POINT_LIGHT_SHADOWS > 0 2193 uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 2194 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 2195 struct PointLightShadow { 2196 float shadowBias; 2197 float shadowNormalBias; 2198 float shadowRadius; 2199 vec2 shadowMapSize; 2200 float shadowCameraNear; 2201 float shadowCameraFar; 2202 }; 2203 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 2204 #endif 2205 float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { 2206 return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); 2207 } 2208 vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { 2209 return unpackRGBATo2Half( texture2D( shadow, uv ) ); 2210 } 2211 float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ 2212 float occlusion = 1.0; 2213 vec2 distribution = texture2DDistribution( shadow, uv ); 2214 float hard_shadow = step( compare , distribution.x ); 2215 if (hard_shadow != 1.0 ) { 2216 float distance = compare - distribution.x ; 2217 float variance = max( 0.00000, distribution.y * distribution.y ); 2218 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 ); 2219 } 2220 return occlusion; 2221 } 2222 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 2223 float shadow = 1.0; 2224 shadowCoord.xyz /= shadowCoord.w; 2225 shadowCoord.z += shadowBias; 2226 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 2227 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 2228 if ( frustumTest ) { 2229 #if defined( SHADOWMAP_TYPE_PCF ) 2230 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 2231 float dx0 = - texelSize.x * shadowRadius; 2232 float dy0 = - texelSize.y * shadowRadius; 2233 float dx1 = + texelSize.x * shadowRadius; 2234 float dy1 = + texelSize.y * shadowRadius; 2235 float dx2 = dx0 / 2.0; 2236 float dy2 = dy0 / 2.0; 2237 float dx3 = dx1 / 2.0; 2238 float dy3 = dy1 / 2.0; 2239 shadow = ( 2240 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + 2241 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + 2242 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + 2243 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + 2244 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + 2245 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + 2246 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + 2247 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + 2248 texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + 2249 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + 2250 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + 2251 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + 2252 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + 2253 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + 2254 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + 2255 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + 2256 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) 2257 ) * ( 1.0 / 17.0 ); 2258 #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) 2259 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 2260 float dx = texelSize.x; 2261 float dy = texelSize.y; 2262 vec2 uv = shadowCoord.xy;
2263 vec2 f = fract( uv * shadowMapSize + 0.5 ); 2264 uv -= f * texelSize; 2265 shadow = ( 2266 texture2DCompare( shadowMap, uv, shadowCoord.z ) + 2267 texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + 2268 texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + 2269 texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + 2270 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), 2271 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), 2272 f.x ) + 2273 mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), 2274 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), 2275 f.x ) + 2276 mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), 2277 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), 2278 f.y ) + 2279 mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), 2280 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), 2281 f.y ) + 2282 mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), 2283 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), 2284 f.x ), 2285 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), 2286 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), 2287 f.x ), 2288 f.y ) 2289 ) * ( 1.0 / 9.0 ); 2290 #elif defined( SHADOWMAP_TYPE_VSM ) 2291 shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); 2292 #else 2293 shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); 2294 #endif 2295 } 2296 return shadow; 2297 } 2298 vec2 cubeToUV( vec3 v, float texelSizeY ) { 2299 vec3 absV = abs( v ); 2300 float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); 2301 absV *= scaleToCube; 2302 v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); 2303 vec2 planar = v.xy; 2304 float almostATexel = 1.5 * texelSizeY; 2305 float almostOne = 1.0 - almostATexel; 2306 if ( absV.z >= almostOne ) { 2307 if ( v.z > 0.0 ) 2308 planar.x = 4.0 - v.x; 2309 } else if ( absV.x >= almostOne ) { 2310 float signX = sign( v.x ); 2311 planar.x = v.z * signX + 2.0 * signX; 2312 } else if ( absV.y >= almostOne ) { 2313 float signY = sign( v.y ); 2314 planar.x = v.x + 2.0 * signY + 2.0; 2315 planar.y = v.z * signY - 2.0; 2316 } 2317 return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); 2318 } 2319 float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 2320 vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); 2321 vec3 lightToPosition = shadowCoord.xyz; 2322 float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; 2323 vec3 bd3D = normalize( lightToPosition ); 2324 #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) 2325 vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; 2326 return ( 2327 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + 2328 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + 2329 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + 2330 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + 2331 texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + 2332 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + 2333 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + 2334 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + 2335 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) 2336 ) * ( 1.0 / 9.0 ); 2337 #else 2338 return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); 2339 #endif 2340 } 2341#endif`,mce=`#if NUM_SPOT_LIGHT_COORDS > 0 2342 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; 2343 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 2344#endif 2345#ifdef USE_SHADOWMAP 2346 #if NUM_DIR_LIGHT_SHADOWS > 0 2347 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; 2348 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 2349 struct DirectionalLightShadow { 2350 float shadowBias; 2351 float shadowNormalBias; 2352 float shadowRadius; 2353 vec2 shadowMapSize; 2354 }; 2355 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 2356 #endif
2357 #if NUM_SPOT_LIGHT_SHADOWS > 0 2358 struct SpotLightShadow { 2359 float shadowBias; 2360 float shadowNormalBias; 2361 float shadowRadius; 2362 vec2 shadowMapSize; 2363 }; 2364 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 2365 #endif 2366 #if NUM_POINT_LIGHT_SHADOWS > 0 2367 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; 2368 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 2369 struct PointLightShadow { 2370 float shadowBias; 2371 float shadowNormalBias; 2372 float shadowRadius; 2373 vec2 shadowMapSize; 2374 float shadowCameraNear; 2375 float shadowCameraFar; 2376 }; 2377 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 2378 #endif 2379#endif`,gce=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) 2380 vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 2381 vec4 shadowWorldPosition; 2382#endif 2383#if defined( USE_SHADOWMAP ) 2384 #if NUM_DIR_LIGHT_SHADOWS > 0 2385 #pragma unroll_loop_start 2386 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2387 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); 2388 vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; 2389 } 2390 #pragma unroll_loop_end 2391 #endif 2392 #if NUM_POINT_LIGHT_SHADOWS > 0 2393 #pragma unroll_loop_start 2394 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2395 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); 2396 vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; 2397 } 2398 #pragma unroll_loop_end 2399 #endif 2400#endif 2401#if NUM_SPOT_LIGHT_COORDS > 0 2402 #pragma unroll_loop_start 2403 for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { 2404 shadowWorldPosition = worldPosition; 2405 #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 2406 shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; 2407 #endif 2408 vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; 2409 } 2410 #pragma unroll_loop_end 2411#endif`,yce=`float getShadowMask() { 2412 float shadow = 1.0; 2413 #ifdef USE_SHADOWMAP 2414 #if NUM_DIR_LIGHT_SHADOWS > 0 2415 DirectionalLightShadow directionalLight; 2416 #pragma unroll_loop_start 2417 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2418 directionalLight = directionalLightShadows[ i ]; 2419 shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 2420 } 2421 #pragma unroll_loop_end 2422 #endif 2423 #if NUM_SPOT_LIGHT_SHADOWS > 0 2424 SpotLightShadow spotLight; 2425 #pragma unroll_loop_start 2426 for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { 2427 spotLight = spotLightShadows[ i ]; 2428 shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 2429 } 2430 #pragma unroll_loop_end 2431 #endif 2432 #if NUM_POINT_LIGHT_SHADOWS > 0 2433 PointLightShadow pointLight; 2434 #pragma unroll_loop_start 2435 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2436 pointLight = pointLightShadows[ i ]; 2437 shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; 2438 } 2439 #pragma unroll_loop_end 2440 #endif 2441 #endif 2442 return shadow; 2443}`,vce=`#ifdef USE_SKINNING 2444 mat4 boneMatX = getBoneMatrix( skinIndex.x ); 2445 mat4 boneMatY = getBoneMatrix( skinIndex.y ); 2446 mat4 boneMatZ = getBoneMatrix( skinIndex.z ); 2447 mat4 boneMatW = getBoneMatrix( skinIndex.w ); 2448#endif`,xce=`#ifdef USE_SKINNING 2449 uniform mat4 bindMatrix; 2450 uniform mat4 bindMatrixInverse; 2451 uniform highp sampler2D boneTexture; 2452 mat4 getBoneMatrix( const in float i ) { 2453 int size = textureSize( boneTexture, 0 ).x; 2454 int j = int( i ) * 4; 2455 int x = j % size; 2456 int y = j / size; 2457 vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); 2458 vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); 2459 vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); 2460 vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); 2461 return mat4( v1, v2, v3, v4 ); 2462 } 2463#endif`,_ce=`#ifdef USE_SKINNING 2464 vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); 2465 vec4 skinned = vec4( 0.0 ); 2466 skinned += boneMatX * skinVertex * skinWeight.x; 2467 skinned += boneMatY * skinVertex * skinWeight.y; 2468 skinned += boneMatZ * skinVertex * skinWeight.z; 2469 skinned += boneMatW * skinVertex * skinWeight.w; 2470 transformed = ( bindMatrixInverse * skinned ).xyz; 2471#endif`,wce=`#ifdef USE_SKINNING 2472 mat4 skinMatrix = mat4( 0.0 ); 2473 skinMatrix += skinWeight.x * boneMatX; 2474 skinMatrix += skinWeight.y * boneMatY; 2475 skinMatrix += skinWeight.z * boneMatZ; 2476 skinMatrix += skinWeight.w * boneMatW; 2477 skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; 2478 objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; 2479 #ifdef USE_TANGENT 2480 objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; 2481 #endif 2482#endif`,Sce=`float specularStrength; 2483#ifdef USE_SPECULARMAP 2484 vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); 2485 specularStrength = texelSpecular.r; 2486#else 2487 specularStrength = 1.0; 2488#endif`,bce=`#ifdef USE_SPECULARMAP 2489 uniform sampler2D specularMap; 2490#endif`,Ece=`#if defined( TONE_MAPPING ) 2491 gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); 2492#endif`,Tce=`#ifndef saturate 2493#define saturate( a ) clamp( a, 0.0, 1.0 ) 2494#endif 2495uniform float toneMappingExposure; 2496vec3 LinearToneMapping( vec3 color ) { 2497 return saturate( toneMappingExposure * color ); 2498} 2499vec3 ReinhardToneMapping( vec3 color ) { 2500 color *= toneMappingExposure; 2501 return saturate( color / ( vec3( 1.0 ) + color ) ); 2502} 2503vec3 OptimizedCineonToneMapping( vec3 color ) { 2504 color *= toneMappingExposure; 2505 color = max( vec3( 0.0 ), color - 0.004 ); 2506 return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); 2507} 2508vec3 RRTAndODTFit( vec3 v ) { 2509 vec3 a = v * ( v + 0.0245786 ) - 0.000090537; 2510 vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; 2511 return a / b; 2512} 2513vec3 ACESFilmicToneMapping( vec3 color ) { 2514 const mat3 ACESInputMat = mat3( 2515 vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), 2516 vec3( 0.04823, 0.01566, 0.83777 ) 2517 ); 2518 const mat3 ACESOutputMat = mat3( 2519 vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), 2520 vec3( -0.07367, -0.00605, 1.07602 ) 2521 ); 2522 color *= toneMappingExposure / 0.6; 2523 color = ACESInputMat * color; 2524 color = RRTAndODTFit( color ); 2525 color = ACESOutputMat * color; 2526 return saturate( color ); 2527} 2528const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( 2529 vec3( 1.6605, - 0.1246, - 0.0182 ), 2530 vec3( - 0.5876, 1.1329, - 0.1006 ), 2531 vec3( - 0.0728, - 0.0083, 1.1187 ) 2532); 2533const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( 2534 vec3( 0.6274, 0.0691, 0.0164 ), 2535 vec3( 0.3293, 0.9195, 0.0880 ), 2536 vec3( 0.0433, 0.0113, 0.8956 ) 2537); 2538vec3 agxDefaultContrastApprox( vec3 x ) { 2539 vec3 x2 = x * x; 2540 vec3 x4 = x2 * x2; 2541 return + 15.5 * x4 * x2 2542 - 40.14 * x4 * x 2543 + 31.96 * x4 2544 - 6.868 * x2 * x 2545 + 0.4298 * x2 2546 + 0.1191 * x 2547 - 0.00232; 2548} 2549vec3 AgXToneMapping( vec3 color ) { 2550 const mat3 AgXInsetMatrix = mat3( 2551 vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), 2552 vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), 2553 vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) 2554 );
2555 const mat3 AgXOutsetMatrix = mat3( 2556 vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), 2557 vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), 2558 vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) 2559 ); 2560 const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; 2561 color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; 2562 color *= toneMappingExposure; 2563 color = AgXInsetMatrix * color; 2564 color = max( color, 1e-10 ); color = log2( color ); 2565 color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); 2566 color = clamp( color, 0.0, 1.0 ); 2567 color = agxDefaultContrastApprox( color ); 2568 color = AgXOutsetMatrix * color; 2569 color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); 2570 color = LINEAR_REC2020_TO_LINEAR_SRGB * color; 2571 return color; 2572} 2573vec3 CustomToneMapping( vec3 color ) { return color; }`,Mce=`#ifdef USE_TRANSMISSION 2574 material.transmission = transmission; 2575 material.transmissionAlpha = 1.0; 2576 material.thickness = thickness; 2577 material.attenuationDistance = attenuationDistance; 2578 material.attenuationColor = attenuationColor; 2579 #ifdef USE_TRANSMISSIONMAP 2580 material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; 2581 #endif 2582 #ifdef USE_THICKNESSMAP 2583 material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; 2584 #endif 2585 vec3 pos = vWorldPosition; 2586 vec3 v = normalize( cameraPosition - pos ); 2587 vec3 n = inverseTransformDirection( normal, viewMatrix ); 2588 vec4 transmitted = getIBLVolumeRefraction( 2589 n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, 2590 pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, 2591 material.attenuationColor, material.attenuationDistance ); 2592 material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); 2593 totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); 2594#endif`,Ace=`#ifdef USE_TRANSMISSION 2595 uniform float transmission; 2596 uniform float thickness; 2597 uniform float attenuationDistance; 2598 uniform vec3 attenuationColor; 2599 #ifdef USE_TRANSMISSIONMAP 2600 uniform sampler2D transmissionMap; 2601 #endif 2602 #ifdef USE_THICKNESSMAP 2603 uniform sampler2D thicknessMap; 2604 #endif 2605 uniform vec2 transmissionSamplerSize; 2606 uniform sampler2D transmissionSamplerMap; 2607 uniform mat4 modelMatrix; 2608 uniform mat4 projectionMatrix; 2609 varying vec3 vWorldPosition; 2610 float w0( float a ) { 2611 return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); 2612 } 2613 float w1( float a ) { 2614 return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); 2615 } 2616 float w2( float a ){ 2617 return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); 2618 } 2619 float w3( float a ) { 2620 return ( 1.0 / 6.0 ) * ( a * a * a ); 2621 } 2622 float g0( float a ) { 2623 return w0( a ) + w1( a ); 2624 } 2625 float g1( float a ) { 2626 return w2( a ) + w3( a ); 2627 } 2628 float h0( float a ) { 2629 return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); 2630 } 2631 float h1( float a ) { 2632 return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); 2633 } 2634 vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { 2635 uv = uv * texelSize.zw + 0.5; 2636 vec2 iuv = floor( uv ); 2637 vec2 fuv = fract( uv ); 2638 float g0x = g0( fuv.x ); 2639 float g1x = g1( fuv.x ); 2640 float h0x = h0( fuv.x ); 2641 float h1x = h1( fuv.x ); 2642 float h0y = h0( fuv.y ); 2643 float h1y = h1( fuv.y ); 2644 vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2645 vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2646 vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2647 vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2648 return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + 2649 g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); 2650 } 2651 vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { 2652 vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); 2653 vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); 2654 vec2 fLodSizeInv = 1.0 / fLodSize; 2655 vec2 cLodSizeInv = 1.0 / cLodSize; 2656 vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); 2657 vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); 2658 return mix( fSample, cSample, fract( lod ) ); 2659 } 2660 vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { 2661 vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); 2662 vec3 modelScale; 2663 modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); 2664 modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); 2665 modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); 2666 return normalize( refractionVector ) * thickness * modelScale; 2667 } 2668 float applyIorToRoughness( const in float roughness, const in float ior ) { 2669 return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); 2670 } 2671 vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { 2672 float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); 2673 return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); 2674 } 2675 vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { 2676 if ( isinf( attenuationDistance ) ) { 2677 return vec3( 1.0 ); 2678 } else { 2679 vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; 2680 vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; 2681 } 2682 } 2683 vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, 2684 const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, 2685 const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, 2686 const in vec3 attenuationColor, const in float attenuationDistance ) { 2687 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); 2688 vec3 refractedRayExit = position + transmissionRay; 2689 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2690 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2691 refractionCoords += 1.0; 2692 refractionCoords /= 2.0; 2693 vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); 2694 vec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); 2695 vec3 attenuatedColor = transmittance * transmittedLight.rgb; 2696 vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); 2697 float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; 2698 return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); 2699 } 2700#endif`,Cce=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2701 varying vec2 vUv; 2702#endif 2703#ifdef USE_MAP 2704 varying vec2 vMapUv; 2705#endif 2706#ifdef USE_ALPHAMAP
2707 varying vec2 vAlphaMapUv; 2708#endif 2709#ifdef USE_LIGHTMAP 2710 varying vec2 vLightMapUv; 2711#endif 2712#ifdef USE_AOMAP 2713 varying vec2 vAoMapUv; 2714#endif 2715#ifdef USE_BUMPMAP 2716 varying vec2 vBumpMapUv; 2717#endif 2718#ifdef USE_NORMALMAP 2719 varying vec2 vNormalMapUv; 2720#endif 2721#ifdef USE_EMISSIVEMAP 2722 varying vec2 vEmissiveMapUv; 2723#endif 2724#ifdef USE_METALNESSMAP 2725 varying vec2 vMetalnessMapUv; 2726#endif 2727#ifdef USE_ROUGHNESSMAP 2728 varying vec2 vRoughnessMapUv; 2729#endif 2730#ifdef USE_ANISOTROPYMAP 2731 varying vec2 vAnisotropyMapUv; 2732#endif 2733#ifdef USE_CLEARCOATMAP 2734 varying vec2 vClearcoatMapUv; 2735#endif 2736#ifdef USE_CLEARCOAT_NORMALMAP 2737 varying vec2 vClearcoatNormalMapUv; 2738#endif 2739#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2740 varying vec2 vClearcoatRoughnessMapUv; 2741#endif 2742#ifdef USE_IRIDESCENCEMAP 2743 varying vec2 vIridescenceMapUv; 2744#endif 2745#ifdef USE_IRIDESCENCE_THICKNESSMAP 2746 varying vec2 vIridescenceThicknessMapUv; 2747#endif 2748#ifdef USE_SHEEN_COLORMAP 2749 varying vec2 vSheenColorMapUv; 2750#endif 2751#ifdef USE_SHEEN_ROUGHNESSMAP 2752 varying vec2 vSheenRoughnessMapUv; 2753#endif 2754#ifdef USE_SPECULARMAP 2755 varying vec2 vSpecularMapUv; 2756#endif 2757#ifdef USE_SPECULAR_COLORMAP 2758 varying vec2 vSpecularColorMapUv; 2759#endif 2760#ifdef USE_SPECULAR_INTENSITYMAP 2761 varying vec2 vSpecularIntensityMapUv; 2762#endif 2763#ifdef USE_TRANSMISSIONMAP 2764 uniform mat3 transmissionMapTransform; 2765 varying vec2 vTransmissionMapUv; 2766#endif 2767#ifdef USE_THICKNESSMAP 2768 uniform mat3 thicknessMapTransform; 2769 varying vec2 vThicknessMapUv; 2770#endif`,Rce=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2771 varying vec2 vUv; 2772#endif 2773#ifdef USE_MAP 2774 uniform mat3 mapTransform; 2775 varying vec2 vMapUv; 2776#endif 2777#ifdef USE_ALPHAMAP 2778 uniform mat3 alphaMapTransform; 2779 varying vec2 vAlphaMapUv; 2780#endif 2781#ifdef USE_LIGHTMAP 2782 uniform mat3 lightMapTransform; 2783 varying vec2 vLightMapUv; 2784#endif 2785#ifdef USE_AOMAP 2786 uniform mat3 aoMapTransform; 2787 varying vec2 vAoMapUv; 2788#endif 2789#ifdef USE_BUMPMAP 2790 uniform mat3 bumpMapTransform; 2791 varying vec2 vBumpMapUv; 2792#endif 2793#ifdef USE_NORMALMAP 2794 uniform mat3 normalMapTransform; 2795 varying vec2 vNormalMapUv; 2796#endif 2797#ifdef USE_DISPLACEMENTMAP 2798 uniform mat3 displacementMapTransform; 2799 varying vec2 vDisplacementMapUv; 2800#endif 2801#ifdef USE_EMISSIVEMAP 2802 uniform mat3 emissiveMapTransform; 2803 varying vec2 vEmissiveMapUv; 2804#endif 2805#ifdef USE_METALNESSMAP 2806 uniform mat3 metalnessMapTransform; 2807 varying vec2 vMetalnessMapUv; 2808#endif 2809#ifdef USE_ROUGHNESSMAP 2810 uniform mat3 roughnessMapTransform; 2811 varying vec2 vRoughnessMapUv; 2812#endif 2813#ifdef USE_ANISOTROPYMAP 2814 uniform mat3 anisotropyMapTransform; 2815 varying vec2 vAnisotropyMapUv; 2816#endif 2817#ifdef USE_CLEARCOATMAP 2818 uniform mat3 clearcoatMapTransform; 2819 varying vec2 vClearcoatMapUv; 2820#endif 2821#ifdef USE_CLEARCOAT_NORMALMAP 2822 uniform mat3 clearcoatNormalMapTransform; 2823 varying vec2 vClearcoatNormalMapUv; 2824#endif 2825#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2826 uniform mat3 clearcoatRoughnessMapTransform; 2827 varying vec2 vClearcoatRoughnessMapUv; 2828#endif 2829#ifdef USE_SHEEN_COLORMAP 2830 uniform mat3 sheenColorMapTransform; 2831 varying vec2 vSheenColorMapUv; 2832#endif 2833#ifdef USE_SHEEN_ROUGHNESSMAP 2834 uniform mat3 sheenRoughnessMapTransform; 2835 varying vec2 vSheenRoughnessMapUv; 2836#endif 2837#ifdef USE_IRIDESCENCEMAP 2838 uniform mat3 iridescenceMapTransform; 2839 varying vec2 vIridescenceMapUv; 2840#endif 2841#ifdef USE_IRIDESCENCE_THICKNESSMAP 2842 uniform mat3 iridescenceThicknessMapTransform; 2843 varying vec2 vIridescenceThicknessMapUv; 2844#endif 2845#ifdef USE_SPECULARMAP 2846 uniform mat3 specularMapTransform; 2847 varying vec2 vSpecularMapUv; 2848#endif 2849#ifdef USE_SPECULAR_COLORMAP 2850 uniform mat3 specularColorMapTransform; 2851 varying vec2 vSpecularColorMapUv; 2852#endif 2853#ifdef USE_SPECULAR_INTENSITYMAP 2854 uniform mat3 specularIntensityMapTransform; 2855 varying vec2 vSpecularIntensityMapUv; 2856#endif 2857#ifdef USE_TRANSMISSIONMAP 2858 uniform mat3 transmissionMapTransform; 2859 varying vec2 vTransmissionMapUv; 2860#endif 2861#ifdef USE_THICKNESSMAP 2862 uniform mat3 thicknessMapTransform; 2863 varying vec2 vThicknessMapUv; 2864#endif`,Pce=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2865 vUv = vec3( uv, 1 ).xy; 2866#endif 2867#ifdef USE_MAP 2868 vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; 2869#endif 2870#ifdef USE_ALPHAMAP 2871 vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; 2872#endif 2873#ifdef USE_LIGHTMAP 2874 vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; 2875#endif 2876#ifdef USE_AOMAP 2877 vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; 2878#endif 2879#ifdef USE_BUMPMAP 2880 vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; 2881#endif 2882#ifdef USE_NORMALMAP 2883 vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; 2884#endif 2885#ifdef USE_DISPLACEMENTMAP 2886 vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; 2887#endif 2888#ifdef USE_EMISSIVEMAP 2889 vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; 2890#endif 2891#ifdef USE_METALNESSMAP 2892 vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; 2893#endif 2894#ifdef USE_ROUGHNESSMAP 2895 vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; 2896#endif 2897#ifdef USE_ANISOTROPYMAP 2898 vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; 2899#endif 2900#ifdef USE_CLEARCOATMAP 2901 vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; 2902#endif 2903#ifdef USE_CLEARCOAT_NORMALMAP 2904 vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; 2905#endif 2906#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2907 vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; 2908#endif
2909#ifdef USE_IRIDESCENCEMAP 2910 vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; 2911#endif 2912#ifdef USE_IRIDESCENCE_THICKNESSMAP 2913 vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; 2914#endif 2915#ifdef USE_SHEEN_COLORMAP 2916 vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; 2917#endif 2918#ifdef USE_SHEEN_ROUGHNESSMAP 2919 vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; 2920#endif 2921#ifdef USE_SPECULARMAP 2922 vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; 2923#endif 2924#ifdef USE_SPECULAR_COLORMAP 2925 vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; 2926#endif 2927#ifdef USE_SPECULAR_INTENSITYMAP 2928 vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; 2929#endif 2930#ifdef USE_TRANSMISSIONMAP 2931 vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; 2932#endif 2933#ifdef USE_THICKNESSMAP 2934 vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; 2935#endif`,Nce=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 2936 vec4 worldPosition = vec4( transformed, 1.0 ); 2937 #ifdef USE_BATCHING 2938 worldPosition = batchingMatrix * worldPosition; 2939 #endif 2940 #ifdef USE_INSTANCING 2941 worldPosition = instanceMatrix * worldPosition; 2942 #endif 2943 worldPosition = modelMatrix * worldPosition; 2944#endif`;const Ice=`varying vec2 vUv; 2945uniform mat3 uvTransform; 2946void main() { 2947 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 2948 gl_Position = vec4( position.xy, 1.0, 1.0 ); 2949}`,Lce=`uniform sampler2D t2D; 2950uniform float backgroundIntensity; 2951varying vec2 vUv; 2952void main() { 2953 vec4 texColor = texture2D( t2D, vUv ); 2954 #ifdef DECODE_VIDEO_TEXTURE 2955 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 ); 2956 #endif 2957 texColor.rgb *= backgroundIntensity; 2958 gl_FragColor = texColor; 2959 #include <tonemapping_fragment> 2960 #include <colorspace_fragment> 2961}`,Dce=`varying vec3 vWorldDirection; 2962#include <common> 2963void main() { 2964 vWorldDirection = transformDirection( position, modelMatrix ); 2965 #include <begin_vertex> 2966 #include <project_vertex> 2967 gl_Position.z = gl_Position.w; 2968}`,kce=`#ifdef ENVMAP_TYPE_CUBE 2969 uniform samplerCube envMap; 2970#elif defined( ENVMAP_TYPE_CUBE_UV ) 2971 uniform sampler2D envMap; 2972#endif 2973uniform float flipEnvMap; 2974uniform float backgroundBlurriness; 2975uniform float backgroundIntensity; 2976varying vec3 vWorldDirection; 2977#include <cube_uv_reflection_fragment> 2978void main() { 2979 #ifdef ENVMAP_TYPE_CUBE 2980 vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); 2981 #elif defined( ENVMAP_TYPE_CUBE_UV ) 2982 vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness ); 2983 #else 2984 vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 2985 #endif 2986 texColor.rgb *= backgroundIntensity; 2987 gl_FragColor = texColor; 2988 #include <tonemapping_fragment> 2989 #include <colorspace_fragment> 2990}`,Oce=`varying vec3 vWorldDirection; 2991#include <common> 2992void main() { 2993 vWorldDirection = transformDirection( position, modelMatrix ); 2994 #include <begin_vertex> 2995 #include <project_vertex> 2996 gl_Position.z = gl_Position.w; 2997}`,Fce=`uniform samplerCube tCube; 2998uniform float tFlip; 2999uniform float opacity; 3000varying vec3 vWorldDirection; 3001void main() { 3002 vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); 3003 gl_FragColor = texColor; 3004 gl_FragColor.a *= opacity; 3005 #include <tonemapping_fragment> 3006 #include <colorspace_fragment> 3007}`,Uce=`#include <common> 3008#include <batching_pars_vertex> 3009#include <uv_pars_vertex> 3010#include <displacementmap_pars_vertex> 3011#include <morphtarget_pars_vertex> 3012#include <skinning_pars_vertex> 3013#include <logdepthbuf_pars_vertex> 3014#include <clipping_planes_pars_vertex> 3015varying vec2 vHighPrecisionZW; 3016void main() { 3017 #include <uv_vertex> 3018 #include <batching_vertex> 3019 #include <skinbase_vertex> 3020 #ifdef USE_DISPLACEMENTMAP 3021 #include <beginnormal_vertex> 3022 #include <morphnormal_vertex> 3023 #include <skinnormal_vertex> 3024 #endif 3025 #include <begin_vertex> 3026 #include <morphtarget_vertex> 3027 #include <skinning_vertex> 3028 #include <displacementmap_vertex> 3029 #include <project_vertex> 3030 #include <logdepthbuf_vertex> 3031 #include <clipping_planes_vertex> 3032 vHighPrecisionZW = gl_Position.zw; 3033}`,Vce=`#if DEPTH_PACKING == 3200 3034 uniform float opacity; 3035#endif 3036#include <common> 3037#include <packing> 3038#include <uv_pars_fragment> 3039#include <map_pars_fragment> 3040#include <alphamap_pars_fragment> 3041#include <alphatest_pars_fragment> 3042#include <alphahash_pars_fragment> 3043#include <logdepthbuf_pars_fragment> 3044#include <clipping_planes_pars_fragment> 3045varying vec2 vHighPrecisionZW; 3046void main() { 3047 #include <clipping_planes_fragment> 3048 vec4 diffuseColor = vec4( 1.0 ); 3049 #if DEPTH_PACKING == 3200 3050 diffuseColor.a = opacity; 3051 #endif 3052 #include <map_fragment> 3053 #include <alphamap_fragment> 3054 #include <alphatest_fragment> 3055 #include <alphahash_fragment> 3056 #include <logdepthbuf_fragment> 3057 float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; 3058 #if DEPTH_PACKING == 3200 3059 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); 3060 #elif DEPTH_PACKING == 3201 3061 gl_FragColor = packDepthToRGBA( fragCoordZ ); 3062 #endif 3063}`,jce=`#define DISTANCE 3064varying vec3 vWorldPosition; 3065#include <common> 3066#include <batching_pars_vertex> 3067#include <uv_pars_vertex> 3068#include <displacementmap_pars_vertex> 3069#include <morphtarget_pars_vertex> 3070#include <skinning_pars_vertex> 3071#include <clipping_planes_pars_vertex> 3072void main() { 3073 #include <uv_vertex> 3074 #include <batching_vertex> 3075 #include <skinbase_vertex> 3076 #ifdef USE_DISPLACEMENTMAP 3077 #include <beginnormal_vertex> 3078 #include <morphnormal_vertex> 3079 #include <skinnormal_vertex> 3080 #endif 3081 #include <begin_vertex> 3082 #include <morphtarget_vertex> 3083 #include <skinning_vertex> 3084 #include <displacementmap_vertex> 3085 #include <project_vertex> 3086 #include <worldpos_vertex> 3087 #include <clipping_planes_vertex> 3088 vWorldPosition = worldPosition.xyz; 3089}`,Bce=`#define DISTANCE 3090uniform vec3 referencePosition; 3091uniform float nearDistance; 3092uniform float farDistance; 3093varying vec3 vWorldPosition; 3094#include <common> 3095#include <packing> 3096#include <uv_pars_fragment> 3097#include <map_pars_fragment> 3098#include <alphamap_pars_fragment> 3099#include <alphatest_pars_fragment> 3100#include <alphahash_pars_fragment> 3101#include <clipping_planes_pars_fragment> 3102void main () { 3103 #include <clipping_planes_fragment> 3104 vec4 diffuseColor = vec4( 1.0 ); 3105 #include <map_fragment> 3106 #include <alphamap_fragment> 3107 #include <alphatest_fragment> 3108 #include <alphahash_fragment> 3109 float dist = length( vWorldPosition - referencePosition ); 3110 dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); 3111 dist = saturate( dist ); 3112 gl_FragColor = packDepthToRGBA( dist ); 3113}`,zce=`varying vec3 vWorldDirection; 3114#include <common> 3115void main() { 3116 vWorldDirection = transformDirection( position, modelMatrix ); 3117 #include <begin_vertex> 3118 #include <project_vertex> 3119}`,Hce=`uniform sampler2D tEquirect; 3120varying vec3 vWorldDirection; 3121#include <common> 3122void main() { 3123 vec3 direction = normalize( vWorldDirection ); 3124 vec2 sampleUV = equirectUv( direction ); 3125 gl_FragColor = texture2D( tEquirect, sampleUV ); 3126 #include <tonemapping_fragment> 3127 #include <colorspace_fragment> 3128}`,Gce=`uniform float scale; 3129attribute float lineDistance; 3130varying float vLineDistance; 3131#include <common> 3132#include <uv_pars_vertex> 3133#include <color_pars_vertex> 3134#include <fog_pars_vertex> 3135#include <morphtarget_pars_vertex> 3136#include <logdepthbuf_pars_vertex> 3137#include <clipping_planes_pars_vertex> 3138void main() { 3139 vLineDistance = scale * lineDistance; 3140 #include <uv_vertex> 3141 #include <color_vertex> 3142 #include <morphcolor_vertex> 3143 #include <begin_vertex> 3144 #include <morphtarget_vertex> 3145 #include <project_vertex> 3146 #include <logdepthbuf_vertex> 3147 #include <clipping_planes_vertex> 3148 #include <fog_vertex> 3149}`,Wce=`uniform vec3 diffuse; 3150uniform float opacity; 3151uniform float dashSize; 3152uniform float totalSize; 3153varying float vLineDistance; 3154#include <common> 3155#include <color_pars_fragment> 3156#include <uv_pars_fragment> 3157#include <map_pars_fragment> 3158#include <fog_pars_fragment> 3159#include <logdepthbuf_pars_fragment> 3160#include <clipping_planes_pars_fragment> 3161void main() { 3162 #include <clipping_planes_fragment> 3163 if ( mod( vLineDistance, totalSize ) > dashSize ) { 3164 discard; 3165 } 3166 vec3 outgoingLight = vec3( 0.0 ); 3167 vec4 diffuseColor = vec4( diffuse, opacity ); 3168 #include <logdepthbuf_fragment> 3169 #include <map_fragment> 3170 #include <color_fragment> 3171 outgoingLight = diffuseColor.rgb; 3172 #include <opaque_fragment> 3173 #include <tonemapping_fragment> 3174 #include <colorspace_fragment> 3175 #include <fog_fragment> 3176 #include <premultiplied_alpha_fragment> 3177}`,$ce=`#include <common> 3178#include <batching_pars_vertex> 3179#include <uv_pars_vertex> 3180#include <envmap_pars_vertex> 3181#include <color_pars_vertex> 3182#include <fog_pars_vertex> 3183#include <morphtarget_pars_vertex> 3184#include <skinning_pars_vertex> 3185#include <logdepthbuf_pars_vertex> 3186#include <clipping_planes_pars_vertex> 3187void main() { 3188 #include <uv_vertex> 3189 #include <color_vertex> 3190 #include <morphcolor_vertex> 3191 #include <batching_vertex> 3192 #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) 3193 #include <beginnormal_vertex> 3194 #include <morphnormal_vertex> 3195 #include <skinbase_vertex> 3196 #include <skinnormal_vertex> 3197 #include <defaultnormal_vertex> 3198 #endif 3199 #include <begin_vertex> 3200 #include <morphtarget_vertex> 3201 #include <skinning_vertex> 3202 #include <project_vertex> 3203 #include <logdepthbuf_vertex> 3204 #include <clipping_planes_vertex> 3205 #include <worldpos_vertex> 3206 #include <envmap_vertex> 3207 #include <fog_vertex> 3208}`,qce=`uniform vec3 diffuse; 3209uniform float opacity; 3210#ifndef FLAT_SHADED 3211 varying vec3 vNormal; 3212#endif 3213#include <common> 3214#include <dithering_pars_fragment> 3215#include <color_pars_fragment> 3216#include <uv_pars_fragment> 3217#include <map_pars_fragment> 3218#include <alphamap_pars_fragment> 3219#include <alphatest_pars_fragment> 3220#include <alphahash_pars_fragment> 3221#include <aomap_pars_fragment> 3222#include <lightmap_pars_fragment> 3223#include <envmap_common_pars_fragment> 3224#include <envmap_pars_fragment> 3225#include <fog_pars_fragment> 3226#include <specularmap_pars_fragment> 3227#include <logdepthbuf_pars_fragment> 3228#include <clipping_planes_pars_fragment> 3229void main() { 3230 #include <clipping_planes_fragment> 3231 vec4 diffuseColor = vec4( diffuse, opacity ); 3232 #include <logdepthbuf_fragment> 3233 #include <map_fragment> 3234 #include <color_fragment> 3235 #include <alphamap_fragment> 3236 #include <alphatest_fragment> 3237 #include <alphahash_fragment> 3238 #include <specularmap_fragment> 3239 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3240 #ifdef USE_LIGHTMAP 3241 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 3242 reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; 3243 #else 3244 reflectedLight.indirectDiffuse += vec3( 1.0 ); 3245 #endif 3246 #include <aomap_fragment> 3247 reflectedLight.indirectDiffuse *= diffuseColor.rgb; 3248 vec3 outgoingLight = reflectedLight.indirectDiffuse; 3249 #include <envmap_fragment> 3250 #include <opaque_fragment> 3251 #include <tonemapping_fragment> 3252 #include <colorspace_fragment> 3253 #include <fog_fragment> 3254 #include <premultiplied_alpha_fragment> 3255 #include <dithering_fragment> 3256}`,Xce=`#define LAMBERT 3257varying vec3 vViewPosition; 3258#include <common> 3259#include <batching_pars_vertex> 3260#include <uv_pars_vertex> 3261#include <displacementmap_pars_vertex> 3262#include <envmap_pars_vertex> 3263#include <color_pars_vertex> 3264#include <fog_pars_vertex> 3265#include <normal_pars_vertex> 3266#include <morphtarget_pars_vertex> 3267#include <skinning_pars_vertex> 3268#include <shadowmap_pars_vertex> 3269#include <logdepthbuf_pars_vertex> 3270#include <clipping_planes_pars_vertex> 3271void main() { 3272 #include <uv_vertex> 3273 #include <color_vertex> 3274 #include <morphcolor_vertex> 3275 #include <batching_vertex> 3276 #include <beginnormal_vertex> 3277 #include <morphnormal_vertex> 3278 #include <skinbase_vertex> 3279 #include <skinnormal_vertex> 3280 #include <defaultnormal_vertex> 3281 #include <normal_vertex> 3282 #include <begin_vertex> 3283 #include <morphtarget_vertex> 3284 #include <skinning_vertex> 3285 #include <displacementmap_vertex> 3286 #include <project_vertex> 3287 #include <logdepthbuf_vertex> 3288 #include <clipping_planes_vertex> 3289 vViewPosition = - mvPosition.xyz; 3290 #include <worldpos_vertex> 3291 #include <envmap_vertex> 3292 #include <shadowmap_vertex> 3293 #include <fog_vertex> 3294}`,Kce=`#define LAMBERT 3295uniform vec3 diffuse; 3296uniform vec3 emissive; 3297uniform float opacity; 3298#include <common> 3299#include <packing> 3300#include <dithering_pars_fragment> 3301#include <color_pars_fragment> 3302#include <uv_pars_fragment> 3303#include <map_pars_fragment> 3304#include <alphamap_pars_fragment> 3305#include <alphatest_pars_fragment> 3306#include <alphahash_pars_fragment> 3307#include <aomap_pars_fragment> 3308#include <lightmap_pars_fragment> 3309#include <emissivemap_pars_fragment> 3310#include <envmap_common_pars_fragment> 3311#include <envmap_pars_fragment> 3312#include <fog_pars_fragment> 3313#include <bsdfs> 3314#include <lights_pars_begin> 3315#include <normal_pars_fragment> 3316#include <lights_lambert_pars_fragment> 3317#include <shadowmap_pars_fragment> 3318#include <bumpmap_pars_fragment> 3319#include <normalmap_pars_fragment> 3320#include <specularmap_pars_fragment> 3321#include <logdepthbuf_pars_fragment> 3322#include <clipping_planes_pars_fragment> 3323void main() { 3324 #include <clipping_planes_fragment> 3325 vec4 diffuseColor = vec4( diffuse, opacity ); 3326 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3327 vec3 totalEmissiveRadiance = emissive; 3328 #include <logdepthbuf_fragment> 3329 #include <map_fragment> 3330 #include <color_fragment> 3331 #include <alphamap_fragment> 3332 #include <alphatest_fragment> 3333 #include <alphahash_fragment> 3334 #include <specularmap_fragment> 3335 #include <normal_fragment_begin> 3336 #include <normal_fragment_maps> 3337 #include <emissivemap_fragment> 3338 #include <lights_lambert_fragment> 3339 #include <lights_fragment_begin> 3340 #include <lights_fragment_maps> 3341 #include <lights_fragment_end> 3342 #include <aomap_fragment> 3343 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3344 #include <envmap_fragment> 3345 #include <opaque_fragment> 3346 #include <tonemapping_fragment> 3347 #include <colorspace_fragment> 3348 #include <fog_fragment> 3349 #include <premultiplied_alpha_fragment> 3350 #include <dithering_fragment> 3351}`,Yce=`#define MATCAP 3352varying vec3 vViewPosition; 3353#include <common> 3354#include <batching_pars_vertex> 3355#include <uv_pars_vertex> 3356#include <color_pars_vertex> 3357#include <displacementmap_pars_vertex> 3358#include <fog_pars_vertex> 3359#include <normal_pars_vertex> 3360#include <morphtarget_pars_vertex> 3361#include <skinning_pars_vertex> 3362#include <logdepthbuf_pars_vertex> 3363#include <clipping_planes_pars_vertex> 3364void main() { 3365 #include <uv_vertex> 3366 #include <color_vertex> 3367 #include <morphcolor_vertex> 3368 #include <batching_vertex> 3369 #include <beginnormal_vertex> 3370 #include <morphnormal_vertex> 3371 #include <skinbase_vertex> 3372 #include <skinnormal_vertex> 3373 #include <defaultnormal_vertex> 3374 #include <normal_vertex> 3375 #include <begin_vertex> 3376 #include <morphtarget_vertex> 3377 #include <skinning_vertex> 3378 #include <displacementmap_vertex> 3379 #include <project_vertex> 3380 #include <logdepthbuf_vertex> 3381 #include <clipping_planes_vertex> 3382 #include <fog_vertex> 3383 vViewPosition = - mvPosition.xyz; 3384}`,Qce=`#define MATCAP 3385uniform vec3 diffuse; 3386uniform float opacity; 3387uniform sampler2D matcap; 3388varying vec3 vViewPosition; 3389#include <common> 3390#include <dithering_pars_fragment> 3391#include <color_pars_fragment> 3392#include <uv_pars_fragment> 3393#include <map_pars_fragment> 3394#include <alphamap_pars_fragment> 3395#include <alphatest_pars_fragment> 3396#include <alphahash_pars_fragment> 3397#include <fog_pars_fragment> 3398#include <normal_pars_fragment> 3399#include <bumpmap_pars_fragment> 3400#include <normalmap_pars_fragment> 3401#include <logdepthbuf_pars_fragment> 3402#include <clipping_planes_pars_fragment> 3403void main() { 3404 #include <clipping_planes_fragment> 3405 vec4 diffuseColor = vec4( diffuse, opacity ); 3406 #include <logdepthbuf_fragment> 3407 #include <map_fragment> 3408 #include <color_fragment> 3409 #include <alphamap_fragment> 3410 #include <alphatest_fragment> 3411 #include <alphahash_fragment> 3412 #include <normal_fragment_begin> 3413 #include <normal_fragment_maps> 3414 vec3 viewDir = normalize( vViewPosition ); 3415 vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); 3416 vec3
3416 y = cross( viewDir, x ); 3417 vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; 3418 #ifdef USE_MATCAP 3419 vec4 matcapColor = texture2D( matcap, uv ); 3420 #else 3421 vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); 3422 #endif 3423 vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; 3424 #include <opaque_fragment> 3425 #include <tonemapping_fragment> 3426 #include <colorspace_fragment> 3427 #include <fog_fragment> 3428 #include <premultiplied_alpha_fragment> 3429 #include <dithering_fragment> 3430}`,Jce=`#define NORMAL 3431#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3432 varying vec3 vViewPosition; 3433#endif 3434#include <common> 3435#include <batching_pars_vertex> 3436#include <uv_pars_vertex> 3437#include <displacementmap_pars_vertex> 3438#include <normal_pars_vertex> 3439#include <morphtarget_pars_vertex> 3440#include <skinning_pars_vertex> 3441#include <logdepthbuf_pars_vertex> 3442#include <clipping_planes_pars_vertex> 3443void main() { 3444 #include <uv_vertex> 3445 #include <batching_vertex> 3446 #include <beginnormal_vertex> 3447 #include <morphnormal_vertex> 3448 #include <skinbase_vertex> 3449 #include <skinnormal_vertex> 3450 #include <defaultnormal_vertex> 3451 #include <normal_vertex> 3452 #include <begin_vertex> 3453 #include <morphtarget_vertex> 3454 #include <skinning_vertex> 3455 #include <displacementmap_vertex> 3456 #include <project_vertex> 3457 #include <logdepthbuf_vertex> 3458 #include <clipping_planes_vertex> 3459#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3460 vViewPosition = - mvPosition.xyz; 3461#endif 3462}`,Zce=`#define NORMAL 3463uniform float opacity; 3464#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3465 varying vec3 vViewPosition; 3466#endif 3467#include <packing> 3468#include <uv_pars_fragment> 3469#include <normal_pars_fragment> 3470#include <bumpmap_pars_fragment> 3471#include <normalmap_pars_fragment> 3472#include <logdepthbuf_pars_fragment> 3473#include <clipping_planes_pars_fragment> 3474void main() { 3475 #include <clipping_planes_fragment> 3476 #include <logdepthbuf_fragment> 3477 #include <normal_fragment_begin> 3478 #include <normal_fragment_maps> 3479 gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); 3480 #ifdef OPAQUE 3481 gl_FragColor.a = 1.0; 3482 #endif 3483}`,eue=`#define PHONG 3484varying vec3 vViewPosition; 3485#include <common> 3486#include <batching_pars_vertex> 3487#include <uv_pars_vertex> 3488#include <displacementmap_pars_vertex> 3489#include <envmap_pars_vertex> 3490#include <color_pars_vertex> 3491#include <fog_pars_vertex> 3492#include <normal_pars_vertex> 3493#include <morphtarget_pars_vertex> 3494#include <skinning_pars_vertex> 3495#include <shadowmap_pars_vertex> 3496#include <logdepthbuf_pars_vertex> 3497#include <clipping_planes_pars_vertex> 3498void main() { 3499 #include <uv_vertex> 3500 #include <color_vertex> 3501 #include <morphcolor_vertex> 3502 #include <batching_vertex> 3503 #include <beginnormal_vertex> 3504 #include <morphnormal_vertex> 3505 #include <skinbase_vertex> 3506 #include <skinnormal_vertex> 3507 #include <defaultnormal_vertex> 3508 #include <normal_vertex> 3509 #include <begin_vertex> 3510 #include <morphtarget_vertex> 3511 #include <skinning_vertex> 3512 #include <displacementmap_vertex> 3513 #include <project_vertex> 3514 #include <logdepthbuf_vertex> 3515 #include <clipping_planes_vertex> 3516 vViewPosition = - mvPosition.xyz; 3517 #include <worldpos_vertex> 3518 #include <envmap_vertex> 3519 #include <shadowmap_vertex> 3520 #include <fog_vertex> 3521}`,tue=`#define PHONG 3522uniform vec3 diffuse; 3523uniform vec3 emissive; 3524uniform vec3 specular; 3525uniform float shininess; 3526uniform float opacity; 3527#include <common> 3528#include <packing> 3529#include <dithering_pars_fragment> 3530#include <color_pars_fragment> 3531#include <uv_pars_fragment> 3532#include <map_pars_fragment> 3533#include <alphamap_pars_fragment> 3534#include <alphatest_pars_fragment> 3535#include <alphahash_pars_fragment> 3536#include <aomap_pars_fragment> 3537#include <lightmap_pars_fragment> 3538#include <emissivemap_pars_fragment> 3539#include <envmap_common_pars_fragment> 3540#include <envmap_pars_fragment> 3541#include <fog_pars_fragment> 3542#include <bsdfs> 3543#include <lights_pars_begin> 3544#include <normal_pars_fragment> 3545#include <lights_phong_pars_fragment> 3546#include <shadowmap_pars_fragment> 3547#include <bumpmap_pars_fragment> 3548#include <normalmap_pars_fragment> 3549#include <specularmap_pars_fragment> 3550#include <logdepthbuf_pars_fragment> 3551#include <clipping_planes_pars_fragment> 3552void main() { 3553 #include <clipping_planes_fragment> 3554 vec4 diffuseColor = vec4( diffuse, opacity ); 3555 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3556 vec3 totalEmissiveRadiance = emissive; 3557 #include <logdepthbuf_fragment> 3558 #include <map_fragment> 3559 #include <color_fragment> 3560 #include <alphamap_fragment> 3561 #include <alphatest_fragment> 3562 #include <alphahash_fragment> 3563 #include <specularmap_fragment> 3564 #include <normal_fragment_begin> 3565 #include <normal_fragment_maps> 3566 #include <emissivemap_fragment> 3567 #include <lights_phong_fragment> 3568 #include <lights_fragment_begin> 3569 #include <lights_fragment_maps> 3570 #include <lights_fragment_end> 3571 #include <aomap_fragment> 3572 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; 3573 #include <envmap_fragment> 3574 #include <opaque_fragment> 3575 #include <tonemapping_fragment> 3576 #include <colorspace_fragment> 3577 #include <fog_fragment> 3578 #include <premultiplied_alpha_fragment> 3579 #include <dithering_fragment> 3580}`,nue=`#define STANDARD 3581varying vec3 vViewPosition; 3582#ifdef USE_TRANSMISSION 3583 varying vec3 vWorldPosition; 3584#endif 3585#include <common> 3586#include <batching_pars_vertex> 3587#include <uv_pars_vertex> 3588#include <displacementmap_pars_vertex> 3589#include <color_pars_vertex> 3590#include <fog_pars_vertex> 3591#include <normal_pars_vertex> 3592#include <morphtarget_pars_vertex> 3593#include <skinning_pars_vertex> 3594#include <shadowmap_pars_vertex> 3595#include <logdepthbuf_pars_vertex> 3596#include <clipping_planes_pars_vertex> 3597void main() { 3598 #include <uv_vertex> 3599 #include <color_vertex> 3600 #include <morphcolor_vertex> 3601 #include <batching_vertex> 3602 #include <beginnormal_vertex> 3603 #include <morphnormal_vertex> 3604 #include <skinbase_vertex> 3605 #include <skinnormal_vertex> 3606 #include <defaultnormal_vertex> 3607 #include <normal_vertex> 3608 #include <begin_vertex> 3609 #include <morphtarget_vertex> 3610 #include <skinning_vertex> 3611 #include <displacementmap_vertex> 3612 #include <project_vertex> 3613 #include <logdepthbuf_vertex> 3614 #include <clipping_planes_vertex> 3615 vViewPosition = - mvPosition.xyz; 3616 #include <worldpos_vertex> 3617 #include <shadowmap_vertex> 3618 #include <fog_vertex> 3619#ifdef USE_TRANSMISSION 3620 vWorldPosition = worldPosition.xyz; 3621#endif 3622}`,rue=`#define STANDARD 3623#ifdef PHYSICAL 3624 #define IOR 3625 #define USE_SPECULAR 3626#endif 3627uniform vec3 diffuse; 3628uniform vec3 emissive; 3629uniform float roughness; 3630uniform float metalness; 3631uniform float opacity; 3632#ifdef IOR 3633 uniform float ior; 3634#endif 3635#ifdef USE_SPECULAR 3636 uniform float specularIntensity; 3637 uniform vec3 specularColor; 3638 #ifdef USE_SPECULAR_COLORMAP 3639 uniform sampler2D specularColorMap; 3640 #endif 3641 #ifdef USE_SPECULAR_INTENSITYMAP 3642 uniform sampler2D specularIntensityMap; 3643 #endif 3644#endif 3645#ifdef USE_CLEARCOAT 3646 uniform float clearcoat; 3647 uniform float clearcoatRoughness; 3648#endif
3649#ifdef USE_IRIDESCENCE 3650 uniform float iridescence; 3651 uniform float iridescenceIOR; 3652 uniform float iridescenceThicknessMinimum; 3653 uniform float iridescenceThicknessMaximum; 3654#endif 3655#ifdef USE_SHEEN 3656 uniform vec3 sheenColor; 3657 uniform float sheenRoughness; 3658 #ifdef USE_SHEEN_COLORMAP 3659 uniform sampler2D sheenColorMap; 3660 #endif 3661 #ifdef USE_SHEEN_ROUGHNESSMAP 3662 uniform sampler2D sheenRoughnessMap; 3663 #endif 3664#endif 3665#ifdef USE_ANISOTROPY 3666 uniform vec2 anisotropyVector; 3667 #ifdef USE_ANISOTROPYMAP 3668 uniform sampler2D anisotropyMap; 3669 #endif 3670#endif 3671varying vec3 vViewPosition; 3672#include <common> 3673#include <packing> 3674#include <dithering_pars_fragment> 3675#include <color_pars_fragment> 3676#include <uv_pars_fragment> 3677#include <map_pars_fragment> 3678#include <alphamap_pars_fragment> 3679#include <alphatest_pars_fragment> 3680#include <alphahash_pars_fragment> 3681#include <aomap_pars_fragment> 3682#include <lightmap_pars_fragment> 3683#include <emissivemap_pars_fragment> 3684#include <iridescence_fragment> 3685#include <cube_uv_reflection_fragment> 3686#include <envmap_common_pars_fragment> 3687#include <envmap_physical_pars_fragment> 3688#include <fog_pars_fragment> 3689#include <lights_pars_begin> 3690#include <normal_pars_fragment> 3691#include <lights_physical_pars_fragment> 3692#include <transmission_pars_fragment> 3693#include <shadowmap_pars_fragment> 3694#include <bumpmap_pars_fragment> 3695#include <normalmap_pars_fragment> 3696#include <clearcoat_pars_fragment> 3697#include <iridescence_pars_fragment> 3698#include <roughnessmap_pars_fragment> 3699#include <metalnessmap_pars_fragment> 3700#include <logdepthbuf_pars_fragment> 3701#include <clipping_planes_pars_fragment> 3702void main() { 3703 #include <clipping_planes_fragment> 3704 vec4 diffuseColor = vec4( diffuse, opacity ); 3705 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3706 vec3 totalEmissiveRadiance = emissive; 3707 #include <logdepthbuf_fragment> 3708 #include <map_fragment> 3709 #include <color_fragment> 3710 #include <alphamap_fragment> 3711 #include <alphatest_fragment> 3712 #include <alphahash_fragment> 3713 #include <roughnessmap_fragment> 3714 #include <metalnessmap_fragment> 3715 #include <normal_fragment_begin> 3716 #include <normal_fragment_maps> 3717 #include <clearcoat_normal_fragment_begin> 3718 #include <clearcoat_normal_fragment_maps> 3719 #include <emissivemap_fragment> 3720 #include <lights_physical_fragment> 3721 #include <lights_fragment_begin> 3722 #include <lights_fragment_maps> 3723 #include <lights_fragment_end> 3724 #include <aomap_fragment> 3725 vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; 3726 vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; 3727 #include <transmission_fragment> 3728 vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; 3729 #ifdef USE_SHEEN 3730 float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); 3731 outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; 3732 #endif 3733 #ifdef USE_CLEARCOAT 3734 float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); 3735 vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); 3736 outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; 3737 #endif 3738 #include <opaque_fragment> 3739 #include <tonemapping_fragment> 3740 #include <colorspace_fragment> 3741 #include <fog_fragment> 3742 #include <premultiplied_alpha_fragment> 3743 #include <dithering_fragment> 3744}`,iue=`#define TOON 3745varying vec3 vViewPosition; 3746#include <common> 3747#include <batching_pars_vertex> 3748#include <uv_pars_vertex> 3749#include <displacementmap_pars_vertex> 3750#include <color_pars_vertex> 3751#include <fog_pars_vertex> 3752#include <normal_pars_vertex> 3753#include <morphtarget_pars_vertex> 3754#include <skinning_pars_vertex> 3755#include <shadowmap_pars_vertex> 3756#include <logdepthbuf_pars_vertex> 3757#include <clipping_planes_pars_vertex> 3758void main() { 3759 #include <uv_vertex> 3760 #include <color_vertex> 3761 #include <morphcolor_vertex> 3762 #include <batching_vertex> 3763 #include <beginnormal_vertex> 3764 #include <morphnormal_vertex> 3765 #include <skinbase_vertex> 3766 #include <skinnormal_vertex> 3767 #include <defaultnormal_vertex> 3768 #include <normal_vertex> 3769 #include <begin_vertex> 3770 #include <morphtarget_vertex> 3771 #include <skinning_vertex> 3772 #include <displacementmap_vertex> 3773 #include <project_vertex> 3774 #include <logdepthbuf_vertex> 3775 #include <clipping_planes_vertex> 3776 vViewPosition = - mvPosition.xyz; 3777 #include <worldpos_vertex> 3778 #include <shadowmap_vertex> 3779 #include <fog_vertex> 3780}`,sue=`#define TOON 3781uniform vec3 diffuse; 3782uniform vec3 emissive; 3783uniform float opacity; 3784#include <common> 3785#include <packing> 3786#include <dithering_pars_fragment> 3787#include <color_pars_fragment> 3788#include <uv_pars_fragment> 3789#include <map_pars_fragment> 3790#include <alphamap_pars_fragment> 3791#include <alphatest_pars_fragment> 3792#include <alphahash_pars_fragment> 3793#include <aomap_pars_fragment> 3794#include <lightmap_pars_fragment> 3795#include <emissivemap_pars_fragment> 3796#include <gradientmap_pars_fragment> 3797#include <fog_pars_fragment> 3798#include <bsdfs> 3799#include <lights_pars_begin> 3800#include <normal_pars_fragment> 3801#include <lights_toon_pars_fragment> 3802#include <shadowmap_pars_fragment> 3803#include <bumpmap_pars_fragment> 3804#include <normalmap_pars_fragment> 3805#include <logdepthbuf_pars_fragment> 3806#include <clipping_planes_pars_fragment> 3807void main() { 3808 #include <clipping_planes_fragment> 3809 vec4 diffuseColor = vec4( diffuse, opacity ); 3810 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3811 vec3 totalEmissiveRadiance = emissive; 3812 #include <logdepthbuf_fragment> 3813 #include <map_fragment> 3814 #include <color_fragment> 3815 #include <alphamap_fragment> 3816 #include <alphatest_fragment> 3817 #include <alphahash_fragment> 3818 #include <normal_fragment_begin> 3819 #include <normal_fragment_maps> 3820 #include <emissivemap_fragment> 3821 #include <lights_toon_fragment> 3822 #include <lights_fragment_begin> 3823 #include <lights_fragment_maps> 3824 #include <lights_fragment_end> 3825 #include <aomap_fragment> 3826 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3827 #include <opaque_fragment> 3828 #include <tonemapping_fragment> 3829 #include <colorspace_fragment> 3830 #include <fog_fragment> 3831 #include <premultiplied_alpha_fragment> 3832 #include <dithering_fragment> 3833}`,oue=`uniform float size; 3834uniform float scale; 3835#include <common> 3836#include <color_pars_vertex> 3837#include <fog_pars_vertex> 3838#include <morphtarget_pars_vertex> 3839#include <logdepthbuf_pars_vertex> 3840#include <clipping_planes_pars_vertex> 3841#ifdef USE_POINTS_UV 3842 varying vec2 vUv; 3843 uniform mat3 uvTransform; 3844#endif 3845void main() { 3846 #ifdef USE_POINTS_UV 3847 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 3848 #endif 3849 #include <color_vertex> 3850 #include <morphcolor_vertex> 3851 #include <begin_vertex> 3852 #include <morphtarget_vertex> 3853 #include <project_vertex> 3854 gl_PointSize = size; 3855 #ifdef USE_SIZEATTENUATION 3856 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3857 if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); 3858 #endif 3859 #include <logdepthbuf_vertex> 3860 #include <clipping_planes_vertex> 3861 #include <worldpos_vertex> 3862 #include <fog_vertex> 3863}`,aue=`uniform vec3 diffuse; 3864uniform float opacity; 3865#include <common> 3866#include <color_pars_fragment> 3867#include <map_particle_pars_fragment> 3868#include <alphatest_pars_fragment> 3869#include <alphahash_pars_fragment> 3870#include <fog_pars_fragment> 3871#include <logdepthbuf_pars_fragment> 3872#include <clipping_planes_pars_fragment> 3873void main() { 3874 #include <clipping_planes_fragment> 3875 vec3 outgoingLight = vec3( 0.0 ); 3876 vec4 diffuseColor = vec4( diffuse, opacity ); 3877 #include <logdepthbuf_fragment> 3878 #include <map_particle_fragment> 3879 #include <color_fragment> 3880 #include <alphatest_fragment> 3881 #include <alphahash_fragment> 3882 outgoingLight = diffuseColor.rgb; 3883 #include <opaque_fragment> 3884 #include <tonemapping_fragment> 3885 #include <colorspace_fragment> 3886 #include <fog_fragment> 3887 #include <premultiplied_alpha_fragment> 3888}`,lue=`#include <common> 3889#include <batching_pars_vertex> 3890#include <fog_pars_vertex> 3891#include <morphtarget_pars_vertex> 3892#include <skinning_pars_vertex> 3893#include <logdepthbuf_pars_vertex> 3894#include <shadowmap_pars_vertex> 3895void main() { 3896 #include <batching_vertex> 3897 #include <beginnormal_vertex> 3898 #include <morphnormal_vertex> 3899 #include <skinbase_vertex> 3900 #include <skinnormal_vertex> 3901 #include <defaultnormal_vertex> 3902 #include <begin_vertex> 3903 #include <morphtarget_vertex> 3904 #include <skinning_vertex> 3905 #include <project_vertex> 3906 #include <logdepthbuf_vertex> 3907 #include <worldpos_vertex> 3908 #include <shadowmap_vertex> 3909 #include <fog_vertex> 3910}`,cue=`uniform vec3 color; 3911uniform float opacity; 3912#include <common> 3913#include <packing> 3914#include <fog_pars_fragment> 3915#include <bsdfs> 3916#include <lights_pars_begin> 3917#include <logdepthbuf_pars_fragment> 3918#include <shadowmap_pars_fragment> 3919#include <shadowmask_pars_fragment> 3920void main() { 3921 #include <logdepthbuf_fragment> 3922 gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); 3923 #include <tonemapping_fragment> 3924 #include <colorspace_fragment> 3925 #include <fog_fragment> 3926}`,uue=`uniform float rotation; 3927uniform vec2 center; 3928#include <common> 3929#include <uv_pars_vertex> 3930#include <fog_pars_vertex> 3931#include <logdepthbuf_pars_vertex> 3932#include <clipping_planes_pars_vertex> 3933void main() { 3934 #include <uv_vertex> 3935 vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); 3936 vec2 scale; 3937 scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); 3938 scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); 3939 #ifndef USE_SIZEATTENUATION 3940 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3941 if ( isPerspective ) scale *= - mvPosition.z; 3942 #endif 3943 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; 3944 vec2 rotatedPosition; 3945 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 3946 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 3947 mvPosition.xy += rotatedPosition; 3948 gl_Position = projectionMatrix * mvPosition; 3949 #include <logdepthbuf_vertex> 3950 #include <clipping_planes_vertex> 3951 #include <fog_vertex> 3952}`,due=`uniform vec3 diffuse; 3953uniform float opacity; 3954#include <common> 3955#include <uv_pars_fragment> 3956#include <map_pars_fragment> 3957#include <alphamap_pars_fragment> 3958#include <alphatest_pars_fragment> 3959#include <alphahash_pars_fragment> 3960#include <fog_pars_fragment> 3961#include <logdepthbuf_pars_fragment> 3962#include <clipping_planes_pars_fragment> 3963void main() { 3964 #include <clipping_planes_fragment> 3965 vec3 outgoingLight = vec3( 0.0 ); 3966 vec4 diffuseColor = vec4( diffuse, opacity ); 3967 #include <logdepthbuf_fragment> 3968 #include <map_fragment> 3969 #include <alphamap_fragment> 3970 #include <alphatest_fragment> 3971 #include <alphahash_fragment> 3972 outgoingLight = diffuseColor.rgb; 3973 #include <opaque_fragment> 3974 #include <tonemapping_fragment> 3975 #include <colorspace_fragment> 3976 #include <fog_fragment> 3977}`,Yt={alphahash_fragment:Lae,alphahash_pars_fragment:Dae,alphamap_fragment:kae,alphamap_pars_fragment:Oae,alphatest_fragment:Fae,alphatest_pars_fragment:Uae,aomap_fragment:Vae,aomap_pars_fragment:jae,batching_pars_vertex:Bae,batching_vertex:zae,begin_vertex:Hae,beginnormal_vertex:Gae,bsdfs:Wae,iridescence_fragment:$ae,bumpmap_pars_fragment:qae,clipping_planes_fragment:Xae,clipping_planes_pars_fragment:Kae,clipping_planes_pars_vertex:Yae,clipping_planes_vertex:Qae,color_fragment:Jae,color_pars_fragment:Zae,color_pars_vertex:ele,color_vertex:tle,common:nle,cube_uv_reflection_fragment:rle,defaultnormal_vertex:ile,displacementmap_pars_vertex:sle,displacementmap_vertex:ole,emissivemap_fragment:ale,emissivemap_pars_fragment:lle,colorspace_fragment:cle,colorspace_pars_fragment:ule,envmap_fragment:dle,envmap_common_pars_fragment:hle,envmap_pars_fragment:fle,envmap_pars_vertex:ple,envmap_physical_pars_fragment:Mle,envmap_vertex:mle,fog_vertex:gle,fog_pars_vertex:yle,fog_fragment:vle,fog_pars_fragment:xle,gradientmap_pars_fragment:_le,lightmap_fragment:wle,lightmap_pars_fragment:Sle,lights_lambert_fragment:ble,lights_lambert_pars_fragment:Ele,lights_pars_begin:Tle,lights_toon_fragment:Ale,lights_toon_pars_fragment:Cle,lights_phong_fragment:Rle,lights_phong_pars_fragment:Ple,lights_physical_fragment:Nle,lights_physical_pars_fragment:Ile,lights_fragment_begin:Lle,lights_fragment_maps:Dle,lights_fragment_end:kle,logdepthbuf_fragment:Ole,logdepthbuf_pars_fragment:Fle,logdepthbuf_pars_vertex:Ule,logdepthbuf_vertex:Vle,map_fragment:jle,map_pars_fragment:Ble,map_particle_fragment:zle,map_particle_pars_fragment:Hle,metalnessmap_fragment:Gle,metalnessmap_pars_fragment:Wle,morphcolor_vertex:$le,morphnormal_vertex:qle,morphtarget_pars_vertex:Xle,morphtarget_vertex:Kle,normal_fragment_begin:Yle,normal_fragment_maps:Qle,normal_pars_fragment:Jle,normal_pars_vertex:Zle,normal_vertex:ece,normalmap_pars_fragment:tce,clearcoat_normal_fragment_begin:nce,clearcoat_normal_fragment_maps:rce,clearcoat_pars_fragment:ice,iridescence_pars_fragment:sce,opaque_fragment:oce,packing:ace,premultiplied_alpha_fragment:lce,project_vertex:cce,dithering_fragment:uce,dithering_pars_fragment:dce,roughnessmap_fragment:hce,roughnessmap_pars_fragment:fce,shadowmap_pars_fragment:pce,shadowmap_pars_vertex:mce,shadowmap_vertex:gce,shadowmask_pars_fragment:yce,skinbase_vertex:vce,skinning_pars_vertex:xce,skinning_vertex:_ce,skinnormal_vertex:wce,specularmap_fragment:Sce,specularmap_pars_fragment:bce,tonemapping_fragment:Ece,tonemapping_pars_fragment:Tce,transmission_fragment:Mce,transmission_pars_fragment:Ace,uv_pars_fragment:Cce,uv_pars_vertex:Rce,uv_vertex:Pce,worldpos_vertex:Nce,background_vert:Ice,background_frag:Lce,backgroundCube_vert:Dce,backgroundCube_frag:kce,cube_vert:Oce,cube_frag:Fce,depth_vert:Uce,depth_frag:Vce,distanceRGBA_vert:jce,distanceRGBA_frag:Bce,equirect_vert:zce,equirect_frag:Hce,linedashed_vert:Gce,linedashed_frag:Wce,meshbasic_vert:$ce,meshbasic_frag:qce,meshlambert_vert:Xce,meshlambert_frag:Kce,meshmatcap_vert:Yce,meshmatcap_frag:Qce,meshnormal_vert:Jce,meshnormal_frag:Zce,meshphong_vert:eue,meshphong_frag:tue,meshphysical_vert:nue,meshphysical_frag:rue,meshtoon_vert:iue,meshtoon_frag:sue,points_vert:oue,points_frag:aue,shadow_vert:lue,shadow_frag:cue,sprite_vert:uue,sprite_frag:due},qe={common:{diffuse:{value:new tt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new en},alphaMap:{value:null},alphaMapTransform:{value:new en},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new en}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new en}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new en}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new en},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new en},normalScale:{value:new Te(1,1)}}
vendor: 6,936 bytes, line 3977
3977,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new en},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new en}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new en}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new en}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new tt(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 tt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new en},alphaTest:{value:0},uvTransform:{value:new en}},sprite:{diffuse:{value:new tt(16777215)},opacity:{value:1},center:{value:new Te(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new en},alphaMap:{value:null},alphaMapTransform:{value:new en},alphaTest:{value:0}}},Go={basic:{uniforms:Gi([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.fog]),vertexShader:Yt.meshbasic_vert,fragmentShader:Yt.meshbasic_frag},lambert:{uniforms:Gi([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.fog,qe.lights,{emissive:{value:new tt(0)}}]),vertexShader:Yt.meshlambert_vert,fragmentShader:Yt.meshlambert_frag},phong:{uniforms:Gi([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.fog,qe.lights,{emissive:{value:new tt(0)},specular:{value:new tt(1118481)},shininess:{value:30}}]),vertexShader:Yt.meshphong_vert,fragmentShader:Yt.meshphong_frag},standard:{uniforms:Gi([qe.common,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.roughnessmap,qe.metalnessmap,qe.fog,qe.lights,{emissive:{value:new tt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Yt.meshphysical_vert,fragmentShader:Yt.meshphysical_frag},toon:{uniforms:Gi([qe.common,qe.aomap,qe.lightmap,qe.emissivemap,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.gradientmap,qe.fog,qe.lights,{emissive:{value:new tt(0)}}]),vertexShader:Yt.meshtoon_vert,fragmentShader:Yt.meshtoon_frag},matcap:{uniforms:Gi([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.fog,{matcap:{value:null}}]),vertexShader:Yt.meshmatcap_vert,fragmentShader:Yt.meshmatcap_frag},points:{uniforms:Gi([qe.points,qe.fog]),vertexShader:Yt.points_vert,fragmentShader:Yt.points_frag},dashed:{uniforms:Gi([qe.common,qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Yt.linedashed_vert,fragmentShader:Yt.linedashed_frag},depth:{uniforms:Gi([qe.common,qe.displacementmap]),vertexShader:Yt.depth_vert,fragmentShader:Yt.depth_frag},normal:{uniforms:Gi([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,{opacity:{value:1}}]),vertexShader:Yt.meshnormal_vert,fragmentShader:Yt.meshnormal_frag},sprite:{uniforms:Gi([qe.sprite,qe.fog]),vertexShader:Yt.sprite_vert,fragmentShader:Yt.sprite_frag},background:{uniforms:{uvTransform:{value:new en},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Yt.background_vert,fragmentShader:Yt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Yt.backgroundCube_vert,fragmentShader:Yt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Yt.cube_vert,fragmentShader:Yt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Yt.equirect_vert,fragmentShader:Yt.equirect_frag},distanceRGBA:{uniforms:Gi([qe.common,qe.displacementmap,{referencePosition:{value:new K},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Yt.distanceRGBA_vert,fragmentShader:Yt.distanceRGBA_frag},shadow:{uniforms:Gi([qe.lights,qe.fog,{color:{value:new tt(0)},opacity:{value:1}}]),vertexShader:Yt.shadow_vert,fragmentShader:Yt.shadow_frag}};Go.physical={uniforms:Gi([Go.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new en},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new en},clearcoatNormalScale:{value:new Te(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new en},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new en},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new en},sheen:{value:0},sheenColor:{value:new tt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new en},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new en},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new en},transmissionSamplerSize:{value:new Te},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new en},attenuationDistance:{value:0},attenuationColor:{value:new tt(0)},specularColor:{value:new tt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new en},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new en},anisotropyVector:{value:new Te},anisotropyMap:{value:null},anisotropyMapTransform:{value:new en}}]),vertexShader:Yt.meshphysical_vert,fragmentShader:Yt.meshphysical_frag};const ux={r:0,b:0,g:0};function hue(n,e,t,r,i,s,o){const a=new tt(0);let l=s===!0?0:1,c,u,d=null,m=0,g=null;function v(x,y){let S=!1,b=y.isScene===!0?y.background:null;b&&b.isTexture&&(b=(y.backgroundBlurriness>0?t:e).get(b)),b===null?_(a,l):b&&b.isColor&&(_(b,1),S=!0);const A=n.xr.getEnvironmentBlendMode();
vendor: 5,383 bytes, line 3977
3977A==="additive"?r.buffers.color.setClear(0,0,0,1,o):A==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,o),(n.autoClear||S)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),b&&(b.isCubeTexture||b.mapping===Ip)?(u===void 0&&(u=new Ur(new Vd(1,1,1),new bo({name:"BackgroundCubeMaterial",uniforms:cp(Go.backgroundCube.uniforms),vertexShader:Go.backgroundCube.vertexShader,fragmentShader:Go.backgroundCube.fragmentShader,side:Zr,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(k,L,C){this.matrixWorld.copyPosition(C.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),u.material.uniforms.envMap.value=b,u.material.uniforms.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,u.material.toneMapped=Pn.getTransfer(b.colorSpace)!==On,(d!==b||m!==b.version||g!==n.toneMapping)&&(u.material.needsUpdate=!0,d=b,m=b.version,g=n.toneMapping),u.layers.enableAll(),x.unshift(u,u.geometry,u.material,0,0,null)):b&&b.isTexture&&(c===void 0&&(c=new Ur(new av(2,2),new bo({name:"BackgroundMaterial",uniforms:cp(Go.background.uniforms),vertexShader:Go.background.vertexShader,fragmentShader:Go.background.fragmentShader,side:_l,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=b,c.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,c.material.toneMapped=Pn.getTransfer(b.colorSpace)!==On,b.matrixAutoUpdate===!0&&b.updateMatrix(),c.material.uniforms.uvTransform.value.copy(b.matrix),(d!==b||m!==b.version||g!==n.toneMapping)&&(c.material.needsUpdate=!0,d=b,m=b.version,g=n.toneMapping),c.layers.enableAll(),x.unshift(c,c.geometry,c.material,0,0,null))}function _(x,y){x.getRGB(ux,Q6(n)),r.buffers.color.setClear(ux.r,ux.g,ux.b,y,o)}return{getClearColor:function(){return a},setClearColor:function(x,y=1){a.set(x),l=y,_(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,_(a,l)},render:v}}function fue(n,e,t,r){const i=n.getParameter(n.MAX_VERTEX_ATTRIBS),s=r.isWebGL2?null:e.get("OES_vertex_array_object"),o=r.isWebGL2||s!==null,a={},l=x(null);let c=l,u=!1;function d(W,ee,J,ie,j){let z=!1;if(o){const q=_(ie,J,ee);c!==q&&(c=q,g(c.object)),z=y(W,ie,J,j),z&&S(W,ie,J,j)}else{const q=ee.wireframe===!0;(c.geometry!==ie.id||c.program!==J.id||c.wireframe!==q)&&(c.geometry=ie.id,c.program=J.id,c.wireframe=q,z=!0)}j!==null&&t.update(j,n.ELEMENT_ARRAY_BUFFER),(z||u)&&(u=!1,P(W,ee,J,ie),j!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(j).buffer))}function m(){return r.isWebGL2?n.createVertexArray():s.createVertexArrayOES()}function g(W){return r.isWebGL2?n.bindVertexArray(W):s.bindVertexArrayOES(W)}function v(W){return r.isWebGL2?n.deleteVertexArray(W):s.deleteVertexArrayOES(W)}function _(W,ee,J){const ie=J.wireframe===!0;let j=a[W.id];j===void 0&&(j={},a[W.id]=j);let z=j[ee.id];z===void 0&&(z={},j[ee.id]=z);let q=z[ie];return q===void 0&&(q=x(m()),z[ie]=q),q}function x(W){const ee=[],J=[],ie=[];for(let j=0;j<i;j++)ee[j]=0,J[j]=0,ie[j]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:ee,enabledAttributes:J,attributeDivisors:ie,object:W,attributes:{},index:null}}function y(W,ee,J,ie){const j=c.attributes,z=ee.attributes;let q=0;const Z=J.getAttributes();for(const re in Z)if(Z[re].location>=0){const ae=j[re];let we=z[re];if(we===void 0&&(re==="instanceMatrix"&&W.instanceMatrix&&(we=W.instanceMatrix),re==="instanceColor"&&W.instanceColor&&(we=W.instanceColor)),ae===void 0||ae.attribute!==we||we&&ae.data!==we.data)return!0;q++}return c.attributesNum!==q||c.index!==ie}function S(W,ee,J,ie){const j={},z=ee.attributes;let q=0;const Z=J.getAttributes();for(const re in Z)if(Z[re].location>=0){let ae=z[re];ae===void 0&&(re==="instanceMatrix"&&W.instanceMatrix&&(ae=W.instanceMatrix),re==="instanceColor"&&W.instanceColor&&(ae=W.instanceColor));const we={};we.attribute=ae,ae&&ae.data&&(we.data=ae.data),j[re]=we,q++}c.attributes=j,c.attributesNum=q,c.index=ie}function b(){const W=c.newAttributes;for(let ee=0,J=W.length;ee<J;ee++)W[ee]=0}function A(W){k(W,0)}function k(W,ee){const J=c.newAttributes,ie=c.enabledAttributes,j=c.attributeDivisors;J[W]=1,ie[W]===0&&(n.enableVertexAttribArray(W),ie[W]=1),j[W]!==ee&&((r.isWebGL2?n:e.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](W,ee),j[W]=ee)}function L(){const W=c.newAttributes,ee=c.enabledAttributes;for(let J=0,ie=ee.length;J<ie;J++)ee[J]!==W[J]&&(n.disableVertexAttribArray(J),ee[J]=0)}function C(W,ee,J,ie,j,z,q){q===!0?n.vertexAttribIPointer(W,ee,J,j,z):n.vertexAttribPointer(W,ee,J,ie,j,z)}function P(W,ee,J,ie){if(r.isWebGL2===!1&&(W.isInstancedMesh||ie.isInstancedBufferGeometry)&&e.get("ANGLE_instanced_arrays")===null)return;b();const j=ie.attributes,z=J.getAttributes(),q=ee.defaultAttributeValues;for(const Z in z){const re=z[Z];if(re.location>=0){let te=j[Z];if(te===void 0&&(Z==="instanceMatrix"&&W.instanceMatrix&&(te=W.instanceMatrix),Z==="instanceColor"&&W.instanceColor&&(te=W.instanceColor)),te!==void 0){const ae=te.normalized,we=te.itemSize,Re
vendor: 16,427 bytes, lines 3977-4052
3977=t.get(te);if(Re===void 0)continue;const de=Re.buffer,Ge=Re.type,$e=Re.bytesPerElement,De=r.isWebGL2===!0&&(Ge===n.INT||Ge===n.UNSIGNED_INT||te.gpuType===QR);if(te.isInterleavedBufferAttribute){const Ue=te.data,Q=Ue.stride,be=te.offset;if(Ue.isInstancedInterleavedBuffer){for(let ve=0;ve<re.locationSize;ve++)k(re.location+ve,Ue.meshPerAttribute);W.isInstancedMesh!==!0&&ie._maxInstanceCount===void 0&&(ie._maxInstanceCount=Ue.meshPerAttribute*Ue.count)}else for(let ve=0;ve<re.locationSize;ve++)A(re.location+ve);n.bindBuffer(n.ARRAY_BUFFER,de);for(let ve=0;ve<re.locationSize;ve++)C(re.location+ve,we/re.locationSize,Ge,ae,Q*$e,(be+we/re.locationSize*ve)*$e,De)}else{if(te.isInstancedBufferAttribute){for(let Ue=0;Ue<re.locationSize;Ue++)k(re.location+Ue,te.meshPerAttribute);W.isInstancedMesh!==!0&&ie._maxInstanceCount===void 0&&(ie._maxInstanceCount=te.meshPerAttribute*te.count)}else for(let Ue=0;Ue<re.locationSize;Ue++)A(re.location+Ue);n.bindBuffer(n.ARRAY_BUFFER,de);for(let Ue=0;Ue<re.locationSize;Ue++)C(re.location+Ue,we/re.locationSize,Ge,ae,we*$e,we/re.locationSize*Ue*$e,De)}}else if(q!==void 0){const ae=q[Z];if(ae!==void 0)switch(ae.length){case 2:n.vertexAttrib2fv(re.location,ae);break;case 3:n.vertexAttrib3fv(re.location,ae);break;case 4:n.vertexAttrib4fv(re.location,ae);break;default:n.vertexAttrib1fv(re.location,ae)}}}}L()}function R(){V();for(const W in a){const ee=a[W];for(const J in ee){const ie=ee[J];for(const j in ie)v(ie[j].object),delete ie[j];delete ee[J]}delete a[W]}}function N(W){if(a[W.id]===void 0)return;const ee=a[W.id];for(const J in ee){const ie=ee[J];for(const j in ie)v(ie[j].object),delete ie[j];delete ee[J]}delete a[W.id]}function O(W){for(const ee in a){const J=a[ee];if(J[W.id]===void 0)continue;const ie=J[W.id];for(const j in ie)v(ie[j].object),delete ie[j];delete J[W.id]}}function V(){B(),u=!0,c!==l&&(c=l,g(c.object))}function B(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:d,reset:V,resetDefaultState:B,dispose:R,releaseStatesOfGeometry:N,releaseStatesOfProgram:O,initAttributes:b,enableAttribute:A,disableUnusedAttributes:L}}function pue(n,e,t,r){const i=r.isWebGL2;let s;function o(u){s=u}function a(u,d){n.drawArrays(s,u,d),t.update(d,s,1)}function l(u,d,m){if(m===0)return;let g,v;if(i)g=n,v="drawArraysInstanced";else if(g=e.get("ANGLE_instanced_arrays"),v="drawArraysInstancedANGLE",g===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}g[v](s,u,d,m),t.update(d,s,m)}function c(u,d,m){if(m===0)return;const g=e.get("WEBGL_multi_draw");if(g===null)for(let v=0;v<m;v++)this.render(u[v],d[v]);else{g.multiDrawArraysWEBGL(s,u,0,d,0,m);let v=0;for(let _=0;_<m;_++)v+=d[_];t.update(v,s,1)}}this.setMode=o,this.render=a,this.renderInstances=l,this.renderMultiDraw=c}function mue(n,e,t){let r;function i(){if(r!==void 0)return r;if(e.has("EXT_texture_filter_anisotropic")===!0){const C=e.get("EXT_texture_filter_anisotropic");r=n.getParameter(C.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r}function s(C){if(C==="highp"){if(n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";C="mediump"}return C==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n.constructor.name==="WebGL2RenderingContext";let a=t.precision!==void 0?t.precision:"highp";const l=s(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const c=o||e.has("WEBGL_draw_buffers"),u=t.logarithmicDepthBuffer===!0,d=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),m=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),g=n.getParameter(n.MAX_TEXTURE_SIZE),v=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),_=n.getParameter(n.MAX_VERTEX_ATTRIBS),x=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),y=n.getParameter(n.MAX_VARYING_VECTORS),S=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),b=m>0,A=o||e.has("OES_texture_float"),k=b&&A,L=o?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:c,getMaxAnisotropy:i,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:u,maxTextures:d,maxVertexTextures:m,maxTextureSize:g,maxCubemapSize:v,maxAttributes:_,maxVertexUniforms:x,maxVaryings:y,maxFragmentUniforms:S,vertexTextures:b,floatFragmentTextures:A,floatVertexTextures:k,maxSamples:L}}function gue(n){const e=this;let t=null,r=0,i=!1,s=!1;const o=new ec,a=new en,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,m){const g=d.length!==0||m||r!==0||i;return i=m,r=d.length,g},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,m){t=u(d,m,0)},this.setState=function(d,m,g){const v=d.clippingPlanes,_=d.clipIntersection,x=d.clipShadows,y=n.get(d);if(!i||v===null||v.length===0||s&&!x)s?u(null):c();else{const S=s?0:r,b=S*4;let A=y.clippingState||null;l.value=A,A=u(v,m,b,g);for(let k=0;k!==b;++k)A[k]=t[k];y.clippingState=A,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=S}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(d,m,g,v){const _=d!==null?d.length:0;let x=null;if(_!==0){if(x=l.value,v!==!0||x===null){const y=g+_*4,S=m.matrixWorldInverse;a.getNormalMatrix(S),(x===null||x.length<y)&&(x=new Float32Array(y));for(let b=0,A=g;b!==_;++b,A+=4)o.copy(d[b]).applyMatrix4(S,a),o.normal.toArray(x,A),x[A+3]=o.constant}l.value=x,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,x}}function yue(n){let e=new WeakMap;function t(o,a){return a===oy?o.mapping=wl:a===ay&&(o.mapping=Bc),o}function r(o){if(o&&o.isTexture){const a=o.mapping;if(a===oy||a===ay)if(e.has(o)){const l=e.get(o).texture;return t(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const c=new e8(l.height/2);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",i),t(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 lv extends iv{constructor(e=-1,t=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=t,this.top=r,this.bottom=i,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,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=t,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),t=(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+t,l=i-t;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 t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const gf=4,$k=[.125,.215,.35,.446,.526,.582],Wu=20,$E=new lv,qk=new tt;let qE=null,XE=0,KE=0;const Hu=(1+Math.sqrt(5))/2,Lh=1/Hu,Xk=[new K(1,1,1),new K(-1,1,1),new K(1,1,-1),new K(-1,1,-1),new K(0,Hu,Lh),new K(0,Hu,-Lh),new K(Lh,0,Hu),new K(-Lh,0,Hu),new K(Hu,Lh,0),new K(-Hu,Lh,0)];class rC{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,t=0,r=.1,i=100){qE=this._renderer.getRenderTarget(),XE=this._renderer.getActiveCubeFace(),KE=this._renderer.getActiveMipmapLevel(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,r,i,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Qk(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Yk(),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(qE,XE,KE),e.scissorTest=!1,dx(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===wl||e.mapping===Bc?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),qE=this._renderer.getRenderTarget(),XE=this._renderer.getActiveCubeFace(),KE=this._renderer.getActiveMipmapLevel();const r=t||this._allocateTargets();return this._textureToCubeUV(e,r),this._applyPMREM(r),this._cleanup(r),r}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,r={magFilter:Sr,minFilter:Sr,generateMipmaps:!1,type:op,format:Xi,colorSpace:Oa,depthBuffer:!1},i=Kk(e,t,r);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=Kk(e,t,r);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=vue(s)),this._blurMaterial=xue(s,e,t)}return i}_compileMaterial(e){const t=new Ur(this._lodPlanes[0],e);this._renderer.compile(t,$E)}_sceneToCubeUV(e,t,r,i){const a=new Qr(90,1,t,r),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],u=this._renderer,d=u.autoClear,m=u.toneMapping;u.getClearColor(qk),u.toneMapping=Aa,u.autoClear=!1;const g=new ru({name:"PMREM.Background",side:Zr,depthWrite:!1,depthTest:!1}),v=new Ur(new Vd,g);let _=!1;const x=e.background;x?x.isColor&&(g.color.copy(x),e.background=null,_=!0):(g.color.copy(qk),_=!0);for(let y=0;y<6;y++){const S=y%3;S===0?(a.up.set(0,l[y],0),a.lookAt(c[y],0,0)):S===1?(a.up.set(0,0,l[y]),a.lookAt(0,c[y],0)):(a.up.set(0,l[y],0),a.lookAt(0,0,c[y]));const b=this._cubeSize;dx(i,S*b,y>2?b:0,b,b),u.setRenderTarget(i),_&&u.render(v,a),u.render(e,a)}v.geometry.dispose(),v.material.dispose(),u.toneMapping=m,u.autoClear=d,e.background=x}_textureToCubeUV(e,t){const r=this._renderer,i=e.mapping===wl||e.mapping===Bc;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Qk()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Yk());const s=i?this._cubemapMaterial:this._equirectMaterial,o=new Ur(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;dx(t,0,0,3*l,2*l),r.setRenderTarget(t),r.render(o,$E)}_applyPMREM(e){const t=this._renderer,r=t.autoClear;t.autoClear=!1;for(let i=1;i<this._lodPlanes.length;i++){const s=Math.sqrt(this._sigmas[i]*this._sigmas[i]-this._sigmas[i-1]*this._sigmas[i-1]),o=Xk[(i-1)%Xk.length];this._blur(e,i-1,i,s,o)}t.autoClear=r}_blur(e,t,r,i,s){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,r,i,"latitudinal",s),this._halfBlur(o,e,r,r,i,"longitudinal",s)}_halfBlur(e,t,r,i,s,o,a){const l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const u=3,d=new Ur(this._lodPlanes[i],c),m=c.uniforms,g=this._sizeLods[r]-1,v=isFinite(s)?Math.PI/(2*g):2*Math.PI/(2*Wu-1),_=s/v,x=isFinite(s)?1+Math.floor(u*_):Wu;x>Wu&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${Wu}`);const y=[];let S=0;for(let C=0;C<Wu;++C){const P=C/_,R=Math.exp(-P*P/2);y.push(R),C===0?S+=R:C<x&&(S+=2*R)}for(let C=0;C<y.length;C++)y[C]=y[C]/S;m.envMap.value=e.texture,m.samples.value=x,m.weights.value=y,m.latitudinal.value=o==="latitudinal",a&&(m.poleAxis.value=a);const{_lodMax:b}=this;m.dTheta.value=v,m.mipInt.value=b-r;const A=this._sizeLods[i],k=3*A*(i>b-gf?i-b+gf:0),L=4*(this._cubeSize-A);dx(t,k,L,3*A,2*A),l.setRenderTarget(t),l.render(d,$E)}}function vue(n){const e=[],t=[],r=[];let i=n;const s=n-gf+1+$k.length;for(let o=0;o<s;o++){const a=Math.pow(2,i);t.push(a);let l=1/a;o>n-gf?l=$k[o-n+gf-1]:o===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,d=1+c,m=[u,u,d,u,d,d,u,u,d,d,u,d],g=6,v=6,_=3,x=2,y=1,S=new Float32Array(_*v*g),b=new Float32Array(x*v*g),A=new Float32Array(y*v*g);for(let L=0;L<g;L++){const C=L%3*2/3-1,P=L>2?0:-1,R=[C,P,0,C+2/3,P,0,C+2/3,P+1,0,C,P,0,C+2/3,P+1,0,C,P+1,0];S.set(R,_*v*L),b.set(m,x*v*L);const N=[L,L,L,L,L,L];A.set(N,y*v*L)}const k=new Xt;k.setAttribute("position",new an(S,_)),k.setAttribute("uv",new an(b,x)),k.setAttribute("faceIndex",new an(A,y)),e.push(k),i>gf&&i--}return{lodPlanes:e,sizeLods:t,sigmas:r}}function Kk(n,e,t){const r=new ta(n,e,t);return r.texture.mapping=Ip,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function dx(n,e,t,r,i){n.viewport.set(e,t,r,i),n.scissor.set(e,t,r,i)}function xue(n,e,t){const r=new Float32Array(Wu),i=new K(0,1,0);return new bo({name:"SphericalGaussianBlur",defines:{n:Wu,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:hP(),fragmentShader:` 3978 3979 precision mediump float; 3980 precision mediump int; 3981 3982 varying vec3 vOutputDirection; 3983 3984 uniform sampler2D envMap; 3985 uniform int samples; 3986 uniform float weights[ n ]; 3987 uniform bool latitudinal; 3988 uniform float dTheta; 3989 uniform float mipInt; 3990 uniform vec3 poleAxis; 3991 3992 #define ENVMAP_TYPE_CUBE_UV 3993 #include <cube_uv_reflection_fragment> 3994 3995 vec3 getSample( float theta, vec3 axis ) { 3996 3997 float cosTheta = cos( theta ); 3998 // Rodrigues' axis-angle rotation 3999 vec3 sampleDirection = vOutputDirection * cosTheta 4000 + cross( axis, vOutputDirection ) * sin( theta ) 4001 + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); 4002 4003 return bilinearCubeUV( envMap, sampleDirection, mipInt ); 4004 4005 } 4006 4007 void main() { 4008 4009 vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); 4010 4011 if ( all( equal( axis, vec3( 0.0 ) ) ) ) { 4012 4013 axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); 4014 4015 } 4016 4017 axis = normalize( axis ); 4018 4019 gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 4020 gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); 4021 4022 for ( int i = 1; i < n; i++ ) { 4023 4024 if ( i >= samples ) { 4025 4026 break; 4027 4028 } 4029 4030 float theta = dTheta * float( i ); 4031 gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); 4032 gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); 4033 4034 } 4035 4036 } 4037 `,blending:dl,depthTest:!1,depthWrite:!1})}function Yk(){return new bo({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:hP(),fragmentShader:` 4038 4039 precision mediump float; 4040 precision mediump int; 4041 4042 varying vec3 vOutputDirection; 4043 4044 uniform sampler2D envMap; 4045 4046 #include <common> 4047 4048 void main() { 4049 4050 vec3 outputDirection = normalize( vOutputDirection ); 4051 vec2 uv = equirectUv( outputDirection ); 4052
4053 gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); 4054 4055 } 4056 `,blending:dl,depthTest:!1,depthWrite:!1})}function Qk(){return new bo({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:hP(),fragmentShader:` 4057 4058 precision mediump float; 4059 precision mediump int; 4060 4061 uniform float flipEnvMap; 4062 4063 varying vec3 vOutputDirection; 4064 4065 uniform samplerCube envMap; 4066 4067 void main() { 4068 4069 gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); 4070 4071 } 4072 `,blending:dl,depthTest:!1,depthWrite:!1})}function hP(){return` 4073 4074 precision mediump float; 4075 precision mediump int; 4076 4077 attribute float faceIndex; 4078 4079 varying vec3 vOutputDirection; 4080 4081 // RH coordinate system; PMREM face-indexing convention 4082 vec3 getDirection( vec2 uv, float face ) { 4083 4084 uv = 2.0 * uv - 1.0; 4085 4086 vec3 direction = vec3( uv, 1.0 ); 4087 4088 if ( face == 0.0 ) { 4089 4090 direction = direction.zyx; // ( 1, v, u ) pos x 4091 4092 } else if ( face == 1.0 ) { 4093 4094 direction = direction.xzy; 4095 direction.xz *= -1.0; // ( -u, 1, -v ) pos y 4096 4097 } else if ( face == 2.0 ) { 4098 4099 direction.x *= -1.0; // ( -u, v, 1 ) pos z 4100 4101 } else if ( face == 3.0 ) { 4102 4103 direction = direction.zyx; 4104 direction.xz *= -1.0; // ( -1, v, -u ) neg x 4105 4106 } else if ( face == 4.0 ) { 4107 4108 direction = direction.xzy; 4109 direction.xy *= -1.0; // ( -u, -1, v ) neg y 4110 4111 } else if ( face == 5.0 ) { 4112 4113 direction.z *= -1.0; // ( u, v, -1 ) neg z 4114 4115 } 4116 4117 return direction; 4118 4119 } 4120 4121 void main() { 4122 4123 vOutputDirection = getDirection( uv, faceIndex ); 4124 gl_Position = vec4( position, 1.0 ); 4125 4126 } 4127 `}function _ue(n){let e=new WeakMap,t=null;function r(a){if(a&&a.isTexture){const l=a.mapping,c=l===oy||l===ay,u=l===wl||l===Bc;if(c||u)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let d=e.get(a);return t===null&&(t=new rC(n)),d=c?t.fromEquirectangular(a,d):t.fromCubemap(a,d),e.set(a,d),d.texture}else{if(e.has(a))return e.get(a).texture;{const d=a.image;if(c&&d&&d.height>0||u&&d&&i(d)){t===null&&(t=new rC(n));const m=c?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,m),a.addEventListener("dispose",s),m.texture}else return 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,t!==null&&(t.dispose(),t=null)}return{get:r,dispose:o}}function wue(n){const e={};function t(r){if(e[r]!==void 0)return e[r];let i;switch(r){case"WEBGL_depth_texture":i=n.getExtension("WEBGL_depth_texture")||n.getExtension("MOZ_WEBGL_depth_texture")||n.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=n.getExtension("WEBGL_compressed_texture_s3tc")||n.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=n.getExtension("WEBGL_compressed_texture_pvrtc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=n.getExtension(r)}return e[r]=i,i}return{has:function(r){return t(r)!==null},init:function(r){r.isWebGL2?(t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance")):(t("WEBGL_depth_texture"),t("OES_texture_float"),t("OES_texture_half_float"),t("OES_texture_half_float_linear"),t("OES_standard_derivatives"),t("OES_element_index_uint"),t("OES_vertex_array_object"),t("ANGLE_instanced_arrays")),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture")},get:function(r){const i=t(r);return i===null&&console.warn("THREE.WebGLRenderer: "+r+" extension not supported."),i}}}function Sue(n,e,t,r){const i={},s=new WeakMap;function o(d){const m=d.target;m.index!==null&&e.remove(m.index);for(const v in m.attributes)e.remove(m.attributes[v]);for(const v in m.morphAttributes){const _=m.morphAttributes[v];for(let x=0,y=_.length;x<y;x++)e.remove(_[x])}m.removeEventListener("dispose",o),delete i[m.id];const g=s.get(m);g&&(e.remove(g),s.delete(m)),r.releaseStatesOfGeometry(m),m.isInstancedBufferGeometry===!0&&delete m._maxInstanceCount,t.memory.geometries--}function a(d,m){return i[m.id]===!0||(m.addEventListener("dispose",o),i[m.id]=!0,t.memory.geometries++),m}function l(d){const m=d.attributes;for(const v in m)e.update(m[v],n.ARRAY_BUFFER);const g=d.morphAttributes;for(const v in g){const _=g[v];for(let x=0,y=_.length;x<y;x++)e.update(_[x],n.ARRAY_BUFFER)}}function c(d){const m=[],g=d.index,v=d.attributes.position;let _=0;if(g!==null){const S=g.array;_=g.version;for(let b=0,A=S.length;b<A;b+=3){const k=S[b+0],L=S[b+1],C=S[b+2];m.push(k,L,L,C,C,k)}}else if(v!==void 0){const S=v.array;_=v.version;for(let b=0,A=S.length/3-1;b<A;b+=3){const k=b+0,L=b+1,C=b+2;m.push(k,L,L,C,C,k)}}else return;const x=new(q6(m)?dP:uP)(m,1);x.version=_;const y=s.get(d);y&&e.remove(y),s.set(d,x)}function u(d){const m=s.get(d);if(m){const g=d.index;g!==null&&m.version<g.version&&c(d)}else c(d);return s.get(d)}return{get:a,update:l,getWireframeAttribute:u}}function bue(n,e,t,r){const i=r.isWebGL2;let s;function o(g){s=g}let a,l;function c(g){a=g.type,l=g.bytesPerElement}function u(g,v){n.drawElements(s,v,a,g*l),t.update(v,s,1)}function d(g,v,_){if(_===0)return;let x,y;if(i)x=n,y="drawElementsInstanced";else if(x=e.get("ANGLE_instanced_arrays"),y="drawElementsInstancedANGLE",x===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_
4127instanced_arrays.");return}x[y](s,v,a,g*l,_),t.update(v,s,_)}function m(g,v,_){if(_===0)return;const x=e.get("WEBGL_multi_draw");if(x===null)for(let y=0;y<_;y++)this.render(g[y]/l,v[y]);else{x.multiDrawElementsWEBGL(s,v,0,a,g,0,_);let y=0;for(let S=0;S<_;S++)y+=v[S];t.update(y,s,1)}}this.setMode=o,this.setIndex=c,this.render=u,this.renderInstances=d,this.renderMultiDraw=m}function Eue(n){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function r(s,o,a){switch(t.calls++,o){case n.TRIANGLES:t.triangles+=a*(s/3);break;case n.LINES:t.lines+=a*(s/2);break;case n.LINE_STRIP:t.lines+=a*(s-1);break;case n.LINE_LOOP:t.lines+=a*s;break;case n.POINTS:t.points+=a*s;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function i(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:i,update:r}}function Tue(n,e){return n[0]-e[0]}function Mue(n,e){return Math.abs(e[1])-Math.abs(n[1])}function Aue(n,e,t){const r={},i=new Float32Array(8),s=new WeakMap,o=new Nn,a=[];for(let c=0;c<8;c++)a[c]=[c,0];function l(c,u,d){const m=c.morphTargetInfluences;if(e.isWebGL2===!0){const v=u.morphAttributes.position||u.morphAttributes.normal||u.morphAttributes.color,_=v!==void 0?v.length:0;let x=s.get(u);if(x===void 0||x.count!==_){let ee=function(){B.dispose(),s.delete(u),u.removeEventListener("dispose",ee)};var g=ee;x!==void 0&&x.texture.dispose();const b=u.morphAttributes.position!==void 0,A=u.morphAttributes.normal!==void 0,k=u.morphAttributes.color!==void 0,L=u.morphAttributes.position||[],C=u.morphAttributes.normal||[],P=u.morphAttributes.color||[];let R=0;b===!0&&(R=1),A===!0&&(R=2),k===!0&&(R=3);let N=u.attributes.position.count*R,O=1;N>e.maxTextureSize&&(O=Math.ceil(N/e.maxTextureSize),N=e.maxTextureSize);const V=new Float32Array(N*O*4*_),B=new Fw(V,N,O,_);B.type=$o,B.needsUpdate=!0;const W=R*4;for(let J=0;J<_;J++){const ie=L[J],j=C[J],z=P[J],q=N*O*4*J;for(let Z=0;Z<ie.count;Z++){const re=Z*W;b===!0&&(o.fromBufferAttribute(ie,Z),V[q+re+0]=o.x,V[q+re+1]=o.y,V[q+re+2]=o.z,V[q+re+3]=0),A===!0&&(o.fromBufferAttribute(j,Z),V[q+re+4]=o.x,V[q+re+5]=o.y,V[q+re+6]=o.z,V[q+re+7]=0),k===!0&&(o.fromBufferAttribute(z,Z),V[q+re+8]=o.x,V[q+re+9]=o.y,V[q+re+10]=o.z,V[q+re+11]=z.itemSize===4?o.w:1)}}x={count:_,texture:B,size:new Te(N,O)},s.set(u,x),u.addEventListener("dispose",ee)}let y=0;for(let b=0;b<m.length;b++)y+=m[b];const S=u.morphTargetsRelative?1:1-y;d.getUniforms().setValue(n,"morphTargetBaseInfluence",S),d.getUniforms().setValue(n,"morphTargetInfluences",m),d.getUniforms().setValue(n,"morphTargetsTexture",x.texture,t),d.getUniforms().setValue(n,"morphTargetsTextureSize",x.size)}else{const v=m===void 0?0:m.length;let _=r[u.id];if(_===void 0||_.length!==v){_=[];for(let A=0;A<v;A++)_[A]=[A,0];r[u.id]=_}for(let A=0;A<v;A++){const k=_[A];k[0]=A,k[1]=m[A]}_.sort(Mue);for(let A=0;A<8;A++)A<v&&_[A][1]?(a[A][0]=_[A][0],a[A][1]=_[A][1]):(a[A][0]=Number.MAX_SAFE_INTEGER,a[A][1]=0);a.sort(Tue);const x=u.morphAttributes.position,y=u.morphAttributes.normal;let S=0;for(let A=0;A<8;A++){const k=a[A],L=k[0],C=k[1];L!==Number.MAX_SAFE_INTEGER&&C?(x&&u.getAttribute("morphTarget"+A)!==x[L]&&u.setAttribute("morphTarget"+A,x[L]),y&&u.getAttribute("morphNormal"+A)!==y[L]&&u.setAttribute("morphNormal"+A,y[L]),i[A]=C,S+=C):(x&&u.hasAttribute("morphTarget"+A)===!0&&u.deleteAttribute("morphTarget"+A),y&&u.hasAttribute("morphNormal"+A)===!0&&u.deleteAttribute("morphNormal"+A),i[A]=0)}const b=u.morphTargetsRelative?1:1-S;d.getUniforms().setValue(n,"morphTargetBaseInfluence",b),d.getUniforms().setValue(n,"morphTargetInfluences",i)}}return{update:l}}function Cue(n,e,t,r){let i=new WeakMap;function s(l){const c=r.render.frame,u=l.geometry,d=e.get(l,u);if(i.get(d)!==c&&(e.update(d),i.set(d,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),i.get(l)!==c&&(t.update(l.instanceMatrix,n.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,n.ARRAY_BUFFER),i.set(l,c))),l.isSkinnedMesh){const m=l.skeleton;i.get(m)!==c&&(m.update(),i.set(m,c))}return d}function o(){i=new WeakMap}function a(l){const c=l.target;c.removeEventListener("dispose",a),t.remove(c.instanceMatrix),c.instanceColor!==null&&t.remove(c.instanceColor)}return{update:s,dispose:o}}class fP extends br{constructor(e,t,r,i,s,o,a,l,c,u){if(u=u!==void 0?u:Tc,u!==Tc&&u!==Ed)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");r===void 0&&u===Tc&&(r=ll),r===void 0&&u===Ed&&(r=Ec),super(null,i,s,o,a,l,u,r,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:xr,this.minFilter=l!==void 0?l:xr,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}const n8=new br,r8=new fP(1,1);r8.compareFunction=oP;const i8=new Fw,s8=new cP,o8=new sv,Jk=[],Zk=[],e4=new Float32Array(16),t4=new Float32Array(9),n4=new Float32Array(4);function Dp(n,e,t){const r=n[0];if(r<=0||r>0)return n;const i=e*t;let s=Jk[i];if(s===void 0&&(s=new Float32Array(i),Jk[i]=s),e!==0){r.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function Br(n,e){if(n.length!==e.length)return!1;for(let t=0,r=n.length;t<r;t++)if(n[t]!==e[t])return!1;return!0}function zr(n,e){for(let t=0,r=e.length;t<r;t++)n[t]=e[t]}function Uw(n,e){let t=Zk[e];t===void 0&&(t=new Int32Array(e),Zk[e]=t);for(let r=0;r!==e;++r)t[r]=n.allocateTextureUnit();return t}function Rue(n,e){const t=this.cache;t[0]!==e&&(n.uniform1f(this.addr,e),t[0]=e)}function Pue(n,e){const t=this.cache;
vendor: 4,478 bytes, line 4127
4127if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(Br(t,e))return;n.uniform2fv(this.addr,e),zr(t,e)}}function Nue(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(n.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(Br(t,e))return;n.uniform3fv(this.addr,e),zr(t,e)}}function Iue(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(n.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(Br(t,e))return;n.uniform4fv(this.addr,e),zr(t,e)}}function Lue(n,e){const t=this.cache,r=e.elements;if(r===void 0){if(Br(t,e))return;n.uniformMatrix2fv(this.addr,!1,e),zr(t,e)}else{if(Br(t,r))return;n4.set(r),n.uniformMatrix2fv(this.addr,!1,n4),zr(t,r)}}function Due(n,e){const t=this.cache,r=e.elements;if(r===void 0){if(Br(t,e))return;n.uniformMatrix3fv(this.addr,!1,e),zr(t,e)}else{if(Br(t,r))return;t4.set(r),n.uniformMatrix3fv(this.addr,!1,t4),zr(t,r)}}function kue(n,e){const t=this.cache,r=e.elements;if(r===void 0){if(Br(t,e))return;n.uniformMatrix4fv(this.addr,!1,e),zr(t,e)}else{if(Br(t,r))return;e4.set(r),n.uniformMatrix4fv(this.addr,!1,e4),zr(t,r)}}function Oue(n,e){const t=this.cache;t[0]!==e&&(n.uniform1i(this.addr,e),t[0]=e)}function Fue(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(Br(t,e))return;n.uniform2iv(this.addr,e),zr(t,e)}}function Uue(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(Br(t,e))return;n.uniform3iv(this.addr,e),zr(t,e)}}function Vue(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(n.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(Br(t,e))return;n.uniform4iv(this.addr,e),zr(t,e)}}function jue(n,e){const t=this.cache;t[0]!==e&&(n.uniform1ui(this.addr,e),t[0]=e)}function Bue(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(Br(t,e))return;n.uniform2uiv(this.addr,e),zr(t,e)}}function zue(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(Br(t,e))return;n.uniform3uiv(this.addr,e),zr(t,e)}}function Hue(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(n.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(Br(t,e))return;n.uniform4uiv(this.addr,e),zr(t,e)}}function Gue(n,e,t){const r=this.cache,i=t.allocateTextureUnit();r[0]!==i&&(n.uniform1i(this.addr,i),r[0]=i);const s=this.type===n.SAMPLER_2D_SHADOW?r8:n8;t.setTexture2D(e||s,i)}function Wue(n,e,t){const r=this.cache,i=t.allocateTextureUnit();r[0]!==i&&(n.uniform1i(this.addr,i),r[0]=i),t.setTexture3D(e||s8,i)}function $ue(n,e,t){const r=this.cache,i=t.allocateTextureUnit();r[0]!==i&&(n.uniform1i(this.addr,i),r[0]=i),t.setTextureCube(e||o8,i)}function que(n,e,t){const r=this.cache,i=t.allocateTextureUnit();r[0]!==i&&(n.uniform1i(this.addr,i),r[0]=i),t.setTexture2DArray(e||i8,i)}function Xue(n){switch(n){case 5126:return Rue;case 35664:return Pue;case 35665:return Nue;case 35666:return Iue;case 35674:return Lue;case 35675:return Due;case 35676:return kue;case 5124:case 35670:return Oue;case 35667:case 35671:return Fue;case 35668:case 35672:return Uue;case 35669:case 35673:return Vue;case 5125:return jue;case 36294:return Bue;case 36295:return zue;case 36296:return Hue;case 35678:case 36198:case 36298:case 36306:case 35682:return Gue;case 35679:case 36299:case 36307:return Wue;case 35680:case 36300:case 36308:case 36293:return $ue;case 36289:case 36303:case 36311:case 36292:return que}}function Kue(n,e){n.uniform1fv(this.addr,e)}function Yue(n,e){const t=Dp(e,this.size,2);n.uniform2fv(this.addr,t)}function Que(n,e){const t=Dp(e,this.size,3);n.uniform3fv(this.addr,t)}function Jue(n,e){const t=Dp(e,this.size,4);n.uniform4fv(this.addr,t)}function Zue(n,e){const t=Dp(e,this.size,4);n.uniformMatrix2fv(this.addr,!1,t)}function ede(n,e){const t=Dp(e,this.size,9);n.uniformMatrix3fv(this.addr,!1,t)}function tde(n,e){const t=Dp(e,this.size,16);n.uniformMatrix4fv(this.addr,!1,t)}
4127function nde(n,e){n.uniform1iv(this.addr,e)}function rde(n,e){n.uniform2iv(this.addr,e)}function ide(n,e){n.uniform3iv(this.addr,e)}function sde(n,e){n.uniform4iv(this.addr,e)}function ode(n,e){n.uniform1uiv(this.addr,e)}function ade(n,e){n.uniform2uiv(this.addr,e)}function lde(n,e){n.uniform3uiv(this.addr,e)}function cde(n,e){n.uniform4uiv(this.addr,e)}function ude(n,e,t){const r=this.cache,i=e.length,s=Uw(t,i);Br(r,s)||(n.uniform1iv(this.addr,s),zr(r,s));for(let o=0;o!==i;++o)t.setTexture2D(e[o]||n8,s[o])}function dde(n,e,t){const r=this.cache,i=e.length,s=Uw(t,i);Br(r,s)||(n.uniform1iv(this.addr,s),zr(r,s));for(let o=0;o!==i;++o)t.setTexture3D(e[o]||s8,s[o])}function hde(n,e,t){const r=this.cache,i=e.length,s=Uw(t,i);Br(r,s)||(n.uniform1iv(this.addr,s),zr(r,s));for(let o=0;o!==i;++o)t.setTextureCube(e[o]||o8,s[o])}function fde(n,e,t){const r=this.cache,i=e.length,s=Uw(t,i);Br(r,s)||(n.uniform1iv(this.addr,s),zr(r,s));for(let o=0;o!==i;++o)t.setTexture2DArray(e[o]||i8,s[o])}function pde(n){switch(n){case 5126:return Kue;case 35664:return Yue;
vendor: 8,904 bytes, lines 4127-4145
4127case 35665:return Que;case 35666:return Jue;case 35674:return Zue;case 35675:return ede;case 35676:return tde;case 5124:case 35670:return nde;case 35667:case 35671:return rde;case 35668:case 35672:return ide;case 35669:case 35673:return sde;case 5125:return ode;case 36294:return ade;case 36295:return lde;case 36296:return cde;case 35678:case 36198:case 36298:case 36306:case 35682:return ude;case 35679:case 36299:case 36307:return dde;case 35680:case 36300:case 36308:case 36293:return hde;case 36289:case 36303:case 36311:case 36292:return fde}}class mde{constructor(e,t,r){this.id=e,this.addr=r,this.cache=[],this.type=t.type,this.setValue=Xue(t.type)}}class gde{constructor(e,t,r){this.id=e,this.addr=r,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=pde(t.type)}}class yde{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,r){const i=this.seq;for(let s=0,o=i.length;s!==o;++s){const a=i[s];a.setValue(e,t[a.id],r)}}}const YE=/(\w+)(\])?(\[|\.)?/g;function r4(n,e){n.seq.push(e),n.map[e.id]=e}function vde(n,e,t){const r=n.name,i=r.length;for(YE.lastIndex=0;;){const s=YE.exec(r),o=YE.lastIndex;let a=s[1];const l=s[2]==="]",c=s[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===i){r4(t,c===void 0?new mde(a,n,e):new gde(a,n,e));break}else{let d=t.map[a];d===void 0&&(d=new yde(a),r4(t,d)),t=d}}}class w_{constructor(e,t){this.seq=[],this.map={};const r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<r;++i){const s=e.getActiveUniform(t,i),o=e.getUniformLocation(t,s.name);vde(s,o,this)}}setValue(e,t,r,i){const s=this.map[t];s!==void 0&&s.setValue(e,r,i)}setOptional(e,t,r){const i=t[r];i!==void 0&&this.setValue(e,r,i)}static upload(e,t,r,i){for(let s=0,o=t.length;s!==o;++s){const a=t[s],l=r[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,i)}}static seqWithValue(e,t){const r=[];for(let i=0,s=e.length;i!==s;++i){const o=e[i];o.id in t&&r.push(o)}return r}}function i4(n,e,t){const r=n.createShader(e);return n.shaderSource(r,t),n.compileShader(r),r}const xde=37297;let _de=0;function wde(n,e){const t=n.split(` 4128`),r=[],i=Math.max(e-6,0),s=Math.min(e+6,t.length);for(let o=i;o<s;o++){const a=o+1;r.push(`${a===e?">":" "} ${a}: ${t[o]}`)}return r.join(` 4129`)}function Sde(n){const e=Pn.getPrimaries(Pn.workingColorSpace),t=Pn.getPrimaries(n);let r;switch(e===t?r="":e===my&&t===py?r="LinearDisplayP3ToLinearSRGB":e===py&&t===my&&(r="LinearSRGBToLinearDisplayP3"),n){case Oa:case nv:return[r,"LinearTransferOETF"];case Or:case Ow:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[r,"LinearTransferOETF"]}}function s4(n,e,t){const r=n.getShaderParameter(e,n.COMPILE_STATUS),i=n.getShaderInfoLog(e).trim();if(r&&i==="")return"";const s=/ERROR: 0:(\d+)/.exec(i);if(s){const o=parseInt(s[1]);return t.toUpperCase()+` 4130 4131`+i+` 4132 4133`+wde(n.getShaderSource(e),o)}else return i}function bde(n,e){const t=Sde(e);return`vec4 ${n}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function Ede(n,e){let t;switch(e){case x6:t="Linear";break;case _6:t="Reinhard";break;case w6:t="OptimizedCineon";break;case KR:t="ACESFilmic";break;case b6:t="AgX";break;case S6:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function Tde(n){return[n.extensionDerivatives||n.envMapCubeUVHeight||n.bumpMap||n.normalMapTangentSpace||n.clearcoatNormalMap||n.flatShading||n.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(n.extensionFragDepth||n.logarithmicDepthBuffer)&&n.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",n.extensionDrawBuffers&&n.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(n.extensionShaderTextureLOD||n.envMap||n.transmission)&&n.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(yf).join(` 4134`)}function Mde(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":""].filter(yf).join(` 4135`)}function Ade(n){const e=[];for(const t in n){const r=n[t];r!==!1&&e.push("#define "+t+" "+r)}return e.join(` 4136`)}function Cde(n,e){const t={},r=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let i=0;i<r;i++){const s=n.getActiveAttrib(e,i),o=s.name;let a=1;s.type===n.FLOAT_MAT2&&(a=2),s.type===n.FLOAT_MAT3&&(a=3),s.type===n.FLOAT_MAT4&&(a=4),t[o]={type:s.type,location:n.getAttribLocation(e,o),locationSize:a}}return t}function yf(n){return n!==""}function o4(n,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return n.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,t).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 a4(n,e){return n.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Rde=/^[ \t]*#include +<([\w\d./]+)>/gm;function iC(n){return n.replace(Rde,Nde)}const Pde=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function Nde(n,e){let t=Yt[e];if(t===void 0){const r=Pde.get(e);if(r!==void 0)t=Yt[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return iC(t)}const Ide=/#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 l4(n){return n.replace(Ide,Lde)}function Lde(n,e,t,r){let i="";for(let s=parseInt(e);s<parseInt(t);s++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+s+" ]").replace(/UNROLLED_LOOP_INDEX/g,s);return i}function c4(n){let e="precision "+n.precision+` float; 4137precision `+n.precision+" int;";return n.precision==="highp"?e+=` 4138#define HIGH_PRECISION`:n.precision==="mediump"?e+=` 4139#define MEDIUM_PRECISION`:n.precision==="lowp"&&(e+=` 4140#define LOW_PRECISION`),e}function Dde(n){let e="SHADOWMAP_TYPE_BASIC";return n.shadowMapType===Iw?e="SHADOWMAP_TYPE_PCF":n.shadowMapType===xg?e="SHADOWMAP_TYPE_PCF_SOFT":n.shadowMapType===Vo&&(e="SHADOWMAP_TYPE_VSM"),e}function kde(n){let e="ENVMAP_TYPE_CUBE";if(n.envMap)switch(n.envMapMode){case wl:case Bc:e="ENVMAP_TYPE_CUBE";break;case Ip:e="ENVMAP_TYPE_CUBE_UV";break}return e}function Ode(n){let e="ENVMAP_MODE_REFLECTION";if(n.envMap)switch(n.envMapMode){case Bc:e="ENVMAP_MODE_REFRACTION";break}return e}function Fde(n){let e="ENVMAP_BLENDING_NONE";if(n.envMap)switch(n.combine){case tv:e="ENVMAP_BLENDING_MULTIPLY";break;case y6:e="ENVMAP_BLENDING_MIX";break;case v6:e="ENVMAP_BLENDING_ADD";break}return e}function Ude(n){const e=n.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,r=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:r,maxMip:t}}function Vde(n,e,t,r){const i=n.getContext(),s=t.defines;let o=t.vertexShader,a=t.fragmentShader;const l=Dde(t),c=kde(t),u=Ode(t),d=Fde(t),m=Ude(t),g=t.isWebGL2?"":Tde(t),v=Mde(t),_=Ade(s),x=i.createProgram();let y,S,b=t.glslVersion?"#version "+t.glslVersion+` 4141`:"";t.isRawShaderMaterial?(y=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_].filter(yf).join(` 4142`),y.length>0&&(y+=` 4143`),S=[g,"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_].filter(yf).join(` 4144`),S.length>0&&(S+=` 4145`)):(y=[c4(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IR
4145IDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#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","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` 4146`].filter(yf).join(` 4147`),S=[g,c4(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+u:"",t.envMap?"#define "+d:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IR
4147IDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Aa?"#define TONE_MAPPING":"",t.toneMapping!==Aa?Yt.tonemapping_pars_fragment:"",t.toneMapping!==Aa?Ede("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Yt.colorspace_pars_fragment,bde("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` 4148`].filter(yf).join(` 4149`)),o=iC(o),o=o4(o,t),o=a4(o,t),a=iC(a),a=o4(a,t),a=a4(a,t),o=l4(o),a=l4(a),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(b=`#version 300 es 4150`,y=[v,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` 4151`)+` 4152`+y,S=["precision mediump sampler2DArray;","#define varying in",t.glslVersion===tC?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===tC?"":"#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(` 4153`)+` 4154`+S);const A=b+y+o,k=b+S+a,L=i4(i,i.VERTEX_SHADER,A),C=i4(i,i.FRAGMENT_SHADER,k);i.attachShader(x,L),i.attachShader(x,C),t.index0AttributeName!==void 0?i.bindAttribLocation(x,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(x,0,"position"),i.linkProgram(x);function P(V){if(n.debug.checkShaderErrors){const B=i.getProgramInfoLog(x).trim(),W=i.getShaderInfoLog(L).trim(),ee=i.getShaderInfoLog(C).trim();let J=!0,ie=!0;if(i.getProgramParameter(x,i.LINK_STATUS)===!1)if(J=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(i,x,L,C);else{const j=s4(i,L,"vertex"),z=s4(i,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(x,i.VALIDATE_STATUS)+` 4155 4156Program Info Log: `+B+` 4157`+j+` 4158`+z)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(W===""||ee==="")&&(ie=!1);ie&&(V.diagnostics={runnable:J,programLog:B,vertexShader:{log:W,prefix:y},fragmentShader:{log:ee,prefix:S}})}i.deleteShader(L),i.deleteShader(C),R=new w_(i,x),N=Cde(i,x)}let R;this.getUniforms=function(){return R===void 0&&P(this),R};let N;this.getAttributes=function(){return N===void 0&&P(this),N};let O=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return O===!1&&(O=i.getProgramParameter(x,xde)),O},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(x),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=_de++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=L,this.fragmentShader=C,this}let jde=0;class Bde{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(t),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 t=this.materialCache.get(e);for(const r of t)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 t=this.materialCache;let r=t.get(e);return r===void 0&&(r=new Set,t.set(e,r)),r}_getShaderStage(e){const t=this.shaderCache;let r=t.get(e);return r===void 0&&(r=new zde(e),t.set(e,r)),r}}class zde{constructor(e){this.id=jde++,this.code=e,this.usedTimes=0}}function Hde(n,e,t,r,i,s,o){const a=new pd,l=new Bde,c=[],u=i.isWebG
vendor: 19,981 bytes, lines 4158-4164
4158L2,d=i.logarithmicDepthBuffer,m=i.vertexTextures;let g=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 _(R){return R===0?"uv":`uv${R}`}function x(R,N,O,V,B){const W=V.fog,ee=B.geometry,J=R.isMeshStandardMaterial?V.environment:null,ie=(R.isMeshStandardMaterial?t:e).get(R.envMap||J),j=ie&&ie.mapping===Ip?ie.image.height:null,z=v[R.type];R.precision!==null&&(g=i.getMaxPrecision(R.precision),g!==R.precision&&console.warn("THREE.WebGLProgram.getParameters:",R.precision,"not supported, using",g,"instead."));const q=ee.morphAttributes.position||ee.morphAttributes.normal||ee.morphAttributes.color,Z=q!==void 0?q.length:0;let re=0;ee.morphAttributes.position!==void 0&&(re=1),ee.morphAttributes.normal!==void 0&&(re=2),ee.morphAttributes.color!==void 0&&(re=3);let te,ae,we,Re;if(z){const vn=Go[z];te=vn.vertexShader,ae=vn.fragmentShader}else te=R.vertexShader,ae=R.fragmentShader,l.update(R),we=l.getVertexShaderID(R),Re=l.getFragmentShaderID(R);const de=n.getRenderTarget(),Ge=B.isInstancedMesh===!0,$e=B.isBatchedMesh===!0,De=!!R.map,Ue=!!R.matcap,Q=!!ie,be=!!R.aoMap,ve=!!R.lightMap,Le=!!R.bumpMap,xe=!!R.normalMap,it=!!R.displacementMap,Ye=!!R.emissiveMap,G=!!R.metalnessMap,H=!!R.roughnessMap,le=R.anisotropy>0,Ne=R.clearcoat>0,Ae=R.iridescence>0,Ce=R.sheen>0,st=R.transmission>0,Ve=le&&!!R.anisotropyMap,Qe=Ne&&!!R.clearcoatMap,xt=Ne&&!!R.clearcoatNormalMap,Ft=Ne&&!!R.clearcoatRoughnessMap,Pe=Ae&&!!R.iridescenceMap,rn=Ae&&!!R.iridescenceThicknessMap,zt=Ce&&!!R.sheenColorMap,Tt=Ce&&!!R.sheenRoughnessMap,dt=!!R.specularMap,nt=!!R.specularColorMap,_t=!!R.specularIntensityMap,on=st&&!!R.transmissionMap,bn=st&&!!R.thicknessMap,Bt=!!R.gradientMap,je=!!R.alphaMap,ne=R.alphaTest>0,ke=!!R.alphaHash,He=!!R.extensions,wt=!!ee.attributes.uv1,Ie=!!ee.attributes.uv2,gt=!!ee.attributes.uv3;let bt=Aa;return R.toneMapped&&(de===null||de.isXRRenderTarget===!0)&&(bt=n.toneMapping),{isWebGL2:u,shaderID:z,shaderType:R.type,shaderName:R.name,vertexShader:te,fragmentShader:ae,defines:R.defines,customVertexShaderID:we,customFragmentShaderID:Re,isRawShaderMaterial:R.isRawShaderMaterial===!0,glslVersion:R.glslVersion,precision:g,batching:$e,instancing:Ge,instancingColor:Ge&&B.instanceColor!==null,supportsVertexTextures:m,outputColorSpace:de===null?n.outputColorSpace:de.isXRRenderTarget===!0?de.texture.colorSpace:Oa,map:De,matcap:Ue,envMap:Q,envMapMode:Q&&ie.mapping,envMapCubeUVHeight:j,aoMap:be,lightMap:ve,bumpMap:Le,normalMap:xe,displacementMap:m&&it,emissiveMap:Ye,normalMapObjectSpace:xe&&R.normalMapType===U6,normalMapTangentSpace:xe&&R.normalMapType===nu,metalnessMap:G,roughnessMap:H,anisotropy:le,anisotropyMap:Ve,clearcoat:Ne,clearcoatMap:Qe,clearcoatNormalMap:xt,clearcoatRoughnessMap:Ft,iridescence:Ae,iridescenceMap:Pe,iridescenceThicknessMap:rn,sheen:Ce,sheenColorMap:zt,sheenRoughnessMap:Tt,specularMap:dt,specularColorMap:nt,specularIntensityMap:_t,transmission:st,transmissionMap:on,thicknessMap:bn,gradientMap:Bt,opaque:R.transparent===!1&&R.blending===hd,alphaMap:je,alphaTest:ne,alphaHash:ke,combine:R.combine,mapUv:De&&_(R.map.channel),aoMapUv:be&&_(R.aoMap.channel),lightMapUv:ve&&_(R.lightMap.channel),bumpMapUv:Le&&_(R.bumpMap.channel),normalMapUv:xe&&_(R.normalMap.channel),displacementMapUv:it&&_(R.displacementMap.channel),emissiveMapUv:Ye&&_(R.emissiveMap.channel),metalnessMapUv:G&&_(R.metalnessMap.channel),roughnessMapUv:H&&_(R.roughnessMap.channel),anisotropyMapUv:Ve&&_(R.anisotropyMap.channel),clearcoatMapUv:Qe&&_(R.clearcoatMap.channel),clearcoatNormalMapUv:xt&&_(R.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ft&&_(R.clearcoatRoughnessMap.channel),iridescenceMapUv:Pe&&_(R.iridescenceMap.channel),iridescenceThicknessMapUv:rn&&_(R.iridescenceThicknessMap.channel),sheenColorMapUv:zt&&_(R.sheenColorMap.channel),sheenRoughnessMapUv:Tt&&_(R.sheenRoughnessMap.channel),specularMapUv:dt&&_(R.specularMap.channel),specularColorMapUv:nt&&_(R.specularColorMap.channel),specularIntensityMapUv:_t&&_(R.specularIntensityMap.channel),transmissionMapUv:on&&_(R.transmissionMap.channel),thicknessMapUv:bn&&_(R.thicknessMap.channel),alphaMapUv:je&&_(R.alphaMap.channel),vertexTangents:!!ee.attributes.tangent&&(xe||le),vertexColors:R.vertexColors,vertexAlphas:R.vertexColors===!0&&!!ee.attributes.color&&ee.attributes.color.itemSize===4,vertexUv1s:wt,vertexUv2s:Ie,vertexUv3s:gt,pointsUvs:B.isPoints===!0&&!!ee.attributes.uv&&(De||je),fog:!!W,useFog:R.fog===!0,fogExp2:W&&W.isFogExp2,flatShading:R.flatShading===!0,sizeAttenuation:R.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:B.isSkinnedMesh===!0,morphTargets:ee.morphAttributes.position!==void 0,morphNormals:ee.morphAttributes.normal!==void 0,morphColors:ee.morphAttributes.color!==void 0,morphTargetsCount:Z,morphTextureStride:re,numDirLights:N.directional.length,numPointLights:N.point.length,numSpotLights:N.spot.length,numSpotLightMaps:N.spotLightMap.length,numRectAreaLights:N.rectArea.length,numHemiLights:N.hemi.length,numDirLightShadows:N.directionalShadowMap.length,numPointLightShadows:N.pointShadowMap.length,numSpotLightShadows:N.spotShadowMap.length,numSpotLightShadowsWithMaps:N.numSpotLightShadowsWithMaps,numLightProbes:N.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:R.dithering,shadowMapEnabled:n.shadowMap.enabled&&O.length>0,shadowMapType:n.shadowMap.type,toneMapping:bt,useLegacyLights:n._useLegacyLights,decodeVideoTexture:De&&R.map.isVideoTexture===!0&&Pn.getTransfer(R.map.colorSpace)===On,premultipliedAlpha:R.premultipliedAlpha,doubleSided:R.side===Us,flipSided:R.side===Zr,useDepthPacking:R.depthPacking>=0,depthPacking:R.depthPacking||0,index0AttributeName:R.index0AttributeName,extensionDerivatives:He&&R.extensions.derivatives===!0,extensionFragDepth:He&&R.extensions.fragDepth===!0,extensionDrawBuffers:He&&R.extensions.drawBuffers===!0,extensionShaderTextureLOD:He&&R.extensions.shaderTextureLOD===!0,extensionClipCullDistance:He&&R.extensions.clipCullDistance&&r.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:R.customProgramCacheKey()}}function y(R){const N=[];if(R.shaderID?N.push(R.shaderID):(N.push(R.customVertexShaderID),N.push(R.customFragmentShaderID)),R.defines!==void 0)for(const O in R.defines)N.push(O),N.push(R.defines[O]);return R.isRawShaderMaterial===!1&&(S(N,R),b(N,R),N.push(n.outputColorSpace)),N.push(R.customProgramCacheKey),N.join()}function S(R,N){R.push(N.precision),R.push(N.outputColorSpace),R.push(N.envMapMode),R.push(N.envMapCubeUVHeight),R.push(N.mapUv),R.push(N.alphaMapUv),R.push(N.lightMapUv),R.push(N.aoMapUv),R.push(N.bumpMapUv),R.push(N.normalMapUv),R.push(N.displacementMapUv),R.push(N.emissiveMapUv),R.push(N.metalnessMapUv),R.push(N.roughnessMapUv),R.push(N.anisotropyMapUv),R.push(N.clearcoatMapUv),R.push(N.clearcoatNormalMapUv),R.push(N.clearcoatRoughnessMapUv),R.push(N.iridescenceMapUv),R.push(N.iridescenceThicknessMapUv),R.push(N.sheenColorMapUv),R.push(N.sheenRoughnessMapUv),R.push(N.specularMapUv),R.push(N.specularColorMapUv),R.push(N.specularIntensityMapUv),R.push(N.transmissionMapUv),R.push(N.thicknessMapUv),R.push(N.combine),R.push(N.fogExp2),R.push(N.sizeAttenuation),R.push(N.morphTargetsCount),R.push(N.morphAttributeCount),R.push(N.numDirLights),R.push(N.numPointLights),R.push(N.numSpotLights),R.push(N.numSpotLightMaps),R.push(N.numHemiLights),R.push(N.numRectAreaLights),R.push(N.numDirLightShadows),R.push(N.numPointLightShadows),R.push(N.numSpotLightShadows),R.push(N.numSpotLightShadowsWithMaps),R.push(N.numLightProbes),R.push(N.shadowMapType),R.push(N.toneMapping),R.push(N.numClippingPlanes),R.push(N.numClipIntersection),R.push(N.depthPacking)}function b(R,N){a.disableAll(),N.isWebGL2&&a.enable(0),N.supportsVertexTextures&&a.enable(1),N.instancing&&a.enable(2),N.instancingColor&&a.enable(3),N.matcap&&a.enable(4),N.envMap&&a.enable(5),N.normalMapObjectSpace&&a.enable(6),N.normalMapTangentSpace&&a.enable(7),N.clearcoat&&a.enable(8),N.iridescence&&a.enable(9),N.alphaTest&&a.enable(10),N.vertexColors&&a.enable(11),N.vertexAlphas&&a.enable(12),N.vertexUv1s&&a.enable(13),N.vertexUv2s&&a.enable(14),N.vertexUv3s&&a.enable(15),N.vertexTangents&&a.enable(16),N.anisotropy&&a.enable(17),N.alphaHash&&a.enable(18),N.batching&&a.enable(19),R.push(a.mask),a.disableAll(),N.fog&&a.enable(0),N.useFog&&a.enable(1),N.flatShading&&a.enable(2),N.logarithmicDepthBuffer&&a.enable(3),N.skinning&&a.enable(4),N.morphTargets&&a.enable(5),N.morphNormals&&a.enable(6),N.morphColors&&a.enable(7),N.premultipliedAlpha&&a.enable(8),N.shadowMapEnabled&&a.enable(9),N.useLegacyLights&&a.enable(10),N.doubleSided&&a.enable(11),N.flipSided&&a.enable(12),N.useDepthPacking&&a.enable(13),N.dithering&&a.enable(14),N.transmission&&a.enable(15),N.sheen&&a.enable(16),N.opaque&&a.enable(17),N.pointsUvs&&a.enable(18),N.decodeVideoTexture&&a.enable(19),R.push(a.mask)}function A(R){const N=v[R.type];let O;if(N){const V=Go[N];O=J6.clone(V.uniforms)}else O=R.uniforms;return O}function k(R,N){let O;for(let V=0,B=c.length;V<B;V++){const W=c[V];if(W.cacheKey===N){O=W,++O.usedTimes;break}}return O===void 0&&(O=new Vde(n,N,R,s),c.push(O)),O}function L(R){if(--R.usedTimes===0){const N=c.indexOf(R);c[N]=c[c.length-1],c.pop(),R.destroy()}}function C(R){l.remove(R)}function P(){l.dispose()}return{getParameters:x,getProgramCacheKey:y,getUniforms:A,acquireProgram:k,releaseProgram:L,releaseShaderCache:C,programs:c,dispose:P}}function Gde(){let n=new WeakMap;function e(s){let o=n.get(s);return o===void 0&&(o={},n.set(s,o)),o}function t(s){n.delete(s)}function r(s,o,a){n.get(s)[o]=a}function i(){n=new WeakMap}return{get:e,remove:t,update:r,dispose:i}}function Wde(n,e){return n.groupOrder!==e.groupOrder?n.groupOrder-e.groupOrder:n.renderOrder!==e.renderOrder?n.renderOrder-e.renderOrder:n.material.id!==e.material.id?n.material.id-e.material.id:n.z!==e.z?n.z-e.z:n.id-e.id}function u4(n,e){return n.groupOrder!==e.groupOrder?n.groupOrder-e.groupOrder:n.renderOrder!==e.renderOrder?n.renderOrder-e.renderOrder:n.z!==e.z?e.z-n.z:n.id-e.id}function d4(){const n=[];let e=0;const t=[],r=[],i=[];function s(){e=0,t.length=0,r.length=0,i.length=0}function o(d,m,g,v,_,x){let y=n[e];return y===void 0?(y={id:d.id,object:d,geometry:m,material:g,groupOrder:v,renderOrder:d.renderOrder,z:_,group:x},n[e]=y):(y.id=d.id,y.object=d,y.geometry=m,y.material=g,y.groupOrder=v,y.renderOrder=d.renderOrder,y.z=_,y.group=x),e++,y}function a(d,m,g,v,_,x){const y=o(d,m,g,v,_,x);g.transmission>0?r.push(y):g.transparent===!0?i.push(y):t.push(y)}function l(d,m,g,v,_,x){const y=o(d,m,g,v,_,x);g.transmission>0?r.unshift(y):g.transparent===!0?i.unshift(y):t.unshift(y)}function c(d,m){t.length>1&&t.sort(d||Wde),r.length>1&&r.sort(m||u4),i.length>1&&i.sort(m||u4)}function u(){for(let d=e,m=n.length;d<m;d++){const g=n[d];if(g.id===null)break;g.id=null,g.object=null,g.geometry=null,g.material=null,g.group=null}}return{opaque:t,transmissive:r,transparent:i,init:s,push:a,unshift:l,finish:u,sort:c}}function $de(){let n=new WeakMap;function e(r,i){const s=n.get(r);let o;return s===void 0?(o=new d4,n.set(r,[o])):i>=s.length?(o=new d4,s.push(o)):o=s[i],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function qde(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new K,color:new tt};break;case"SpotLight":t={position:new K,direction:new K,color:new tt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new K,color:new tt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new K,skyColor:new tt,groundColor:new tt};break;case"RectAreaLight":t={color:new tt,position:new K,halfWidth:new K,halfHeight:new K};break}return n[e.id]=t,t}}}function Xde(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Te};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Te};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Te,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let Kde=0;function Yde(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function Qde(n,e){const t=new qde,r=Xde(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let u=0;u<9;u++)i.probe.push(new K);const s=new K,o=new kt,a=new kt;function l(u,d){let m=0,g=0,v=0;for(let V=0;V<9;V++)i.probe[V].set(0,0,0);let _=0,x=0,y=0,S=0,b=0,A=0,k=0,L=0,C=0,P=0,R=0;u.sort(Yde);const N=d===!0?Math.PI:1;for(let V=0,B=u.length;V<B;V++){const W=u[V],ee=W.color,J=W.intensity,ie=W.distance,j=W.shadow&&W.shadow.map?W.shadow.map.texture:null;if(W.isAmbientLight)m+=ee.r*J*N,g+=ee.g*J*N,v+=ee.b*J*N;else if(W.isLightProbe){for(let z=0;z<9;z++)i.probe[z].addScaledVector(W.sh.coefficients[z],J);R++}else if(W.isDirectionalLight){const z=t.get(W);if(z.color.copy(W.color).multiplyScalar(W.intensity*N),W.castShadow){const q=W.shadow,Z=r.get(W);Z.shadowBias=q.bias,Z.shadowNormalBias=q.normalBias,Z.shadowRadius=q.radius,Z.shadowMapSize=q.mapSize,i.directionalShadow[_]=Z,i.directionalShadowMap[_]=j,i.directionalShadowMatrix[_]=W.shadow.matrix,A++}i.directional[_]=z,_++}else if(W.isSpotLight){const z=t.get(W);z.position.setFromMatrixPosition(W.matrixWorld),z.color.copy(ee).multiplyScalar(J*N),z.distance=ie,z.coneCos=Math.cos(W.angle),z.penumbraCos=Math.cos(W.angle*(1-W.penumbra)),z.decay=W.decay,i.spot[y]=z;const q=W.shadow;if(W.map&&(i.spotLightMap[C]=W.map,C++,q.updateMatrices(W),W.castShadow&&P++),i.spotLightMatrix[y]=q.matrix,W.castShadow){const Z=r.get(W);Z.shadowBias=q.bias,Z.shadowNormalBias=q.normalBias,Z.shadowRadius=q.radius,Z.shadowMapSize=q.mapSize,i.spotShadow[y]=Z,i.spotShadowMap[y]=j,L++}y++}else if(W.isRectAreaLight){const z=t.get(W);z.color.copy(ee).multiplyScalar(J),z.halfWidth.set(W.width*.5,0,0),z.halfHeight.set(0,W.height*.5,0),i.rectArea[S]=z,S++}else if(W.isPointLight){const z=t.get(W);if(z.color.copy(W.color).multiplyScalar(W.intensity*N),z.distance=W.distance,z.decay=W.decay,W.castShadow){const q=W.shadow,Z=r.get(W);Z.shadowBias=q.bias,Z.shadowNormalBias=q.normalBias,Z.shadowRadius=q.radius,Z.shadowMapSize=q.mapSize,Z.shadowCameraNear=q.camera.near,Z.shadowCameraFar=q.camera.far,i.pointShadow[x]=Z,i.pointShadowMap[x]=j,i.pointShadowMatrix[x]=W.shadow.matrix,k++}i.point[x]=z,x++}else if(W.isHemisphereLight){const z=t.get(W);z.skyColor.copy(W.color).multiplyScalar(J*N),z.groundColor.copy(W.groundColor).multiplyScalar(J*N),i.hemi[b]=z,b++}}S>0&&(e.isWebGL2?n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=qe.LTC_FLOAT_1,i.rectAreaLTC2=qe.LTC_FLOAT_2):(i.rectAreaLTC1=qe.LTC_HALF_1,i.rectAreaLTC2=qe.LTC_HALF_2):n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=qe.LTC_FLOAT_1,i.rectAreaLTC2=qe.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=qe.LTC_HALF_1,i.rectAreaLTC2=qe.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=m,i.ambient[1]=g,i.ambient[2]=v;const O=i.hash;(O.directionalLength!==_||O.pointLength!==x||O.spotLength!==y||O.rectAreaLength!==S||O.hemiLength!==b||O.numDirectionalShadows!==A||O.numPointShadows!==k||O.numSpotShadows!==L||O.numSpotMaps!==C||O.numLightProbes!==R)&&(i.directional.length=_,i.spot.length=y,i.rectArea.length=S,i.point.length=x,i.hemi.length=b,i.directionalShadow.length=A,i.directionalShadowMap.length=A,i.pointShadow.length=k,i.pointShadowMap.length=k,i.spotShadow.length=L,i.spotShadowMap.length=L,i.directionalShadowMatrix.length=A,i.pointShadowMatrix.length=k,i.spotLightMatrix.length=L+C-P,i.spotLightMap.length=C,i.numSpotLightShadowsWithMaps=P,i.numLightProbes=R,O.directionalLength=_,O.pointLength=x,O.spotLength=y,O.rectAreaLength=S,O.hemiLength=b,O.numDirectionalShadows=A,O.numPointShadows=k,O.numSpotShadows=L,O.numSpotMaps=C,O.numLightProbes=R,i.version=Kde++)}function c(u,d){let m=0,g=0,v=0,_=0,x=0;const y=d.matrixWorldInverse;for(let S=0,b=u.length;S<b;S++){const A=u[S];if(A.isDirectionalLight){const k=i.directional[m];k.direction.setFromMatrixPosition(A.matrixWorld),s.setFromMatrixPosition(A.target.matrixWorld),k.direction.sub(s),k.direction.transformDirection(y),m++}else if(A.isSpotLight){const k=i.spot[v];k.position.setFromMatrixPosition(A.matrixWorld),k.position.applyMatrix4(y),k.direction.setFromMatrixPosition(A.matrixWorld),s.setFromMatrixPosition(A.target.matrixWorld),k.direction.sub(s),k.direction.transformDirection(y),v++}else if(A.isRectAreaLight){const k=i.rectArea[_];k.position.setFromMatrixPosition(A.matrixWorld),k.position.applyMatrix4(y),a.identity(),o.copy(A.matrixWorld),o.premultiply(y),a.extractRotation(o),k.halfWidth.set(A.width*.5,0,0),k.halfHeight.set(0,A.height*.5,0),k.halfWidth.applyMatrix4(a),k.halfHeight.applyMatrix4(a),_++}else if(A.isPointLight){const k=i.point[g];k.position.setFromMatrixPosition(A.matrixWorld),k.position.applyMatrix4(y),g++}else if(A.isHemisphereLight){const k=i.hemi[x];k.direction.setFromMatrixPosition(A.matrixWorld),k.direction.transformDirection(y),x++}}}return{setup:l,setupView:c,state:i}}function h4(n,e){const t=new Qde(n,e),r=[],i=[];function s(){r.length=0,i.length=0}function o(d){r.push(d)}function a(d){i.push(d)}function l(d){t.setup(r,d)}function c(d){t.setupView(r,d)}return{init:s,state:{lightsArray:r,shadowsArray:i,lights:t},setupLights:l,setupLightsView:c,pushLight:o,pushShadow:a}}function Jde(n,e){let t=new WeakMap;function r(s,o=0){const a=t.get(s);let l;return a===void 0?(l=new h4(n,e),t.set(s,[l])):o>=a.length?(l=new h4(n,e),a.push(l)):l=a[o],l}function i(){t=new WeakMap}return{get:r,dispose:i}}class pP extends Oi{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=O6,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 mP extends Oi{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 Zde=`void main() { 4159 gl_Position = vec4( position, 1.0 ); 4160}`,ehe=`uniform sampler2D shadow_pass; 4161uniform vec2 resolution; 4162uniform float radius; 4163#include <packing> 4164void main() {
4165 const float samples = float( VSM_SAMPLES ); 4166 float mean = 0.0; 4167 float squared_mean = 0.0; 4168 float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); 4169 float uvStart = samples <= 1.0 ? 0.0 : - 1.0; 4170 for ( float i = 0.0; i < samples; i ++ ) { 4171 float uvOffset = uvStart + i * uvStride; 4172 #ifdef HORIZONTAL_PASS 4173 vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); 4174 mean += distribution.x; 4175 squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; 4176 #else 4177 float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); 4178 mean += depth; 4179 squared_mean += depth * depth; 4180 #endif 4181 } 4182 mean = mean / samples; 4183 squared_mean = squared_mean / samples; 4184 float std_dev = sqrt( squared_mean - mean * mean ); 4185 gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); 4186}`;function the(n,e,t){let r=new ov;const i=new Te,s=new Te,o=new Nn,a=new pP({depthPacking:F6}),l=new mP,c={},u=t.maxTextureSize,d={[_l]:Zr,[Zr]:_l,[Us]:Us},m=new bo({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Te},radius:{value:4}},vertexShader:Zde,fragmentShader:ehe}),g=m.clone();g.defines.HORIZONTAL_PASS=1;const v=new Xt;v.setAttribute("position",new an(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new Ur(v,m),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Iw;let y=this.type;this.render=function(L,C,P){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||L.length===0)return;const R=n.getRenderTarget(),N=n.getActiveCubeFace(),O=n.getActiveMipmapLevel(),V=n.state;V.setBlending(dl),V.buffers.color.setClear(1,1,1,1),V.buffers.depth.setTest(!0),V.setScissorTest(!1);const B=y!==Vo&&this.type===Vo,W=y===Vo&&this.type!==Vo;for(let ee=0,J=L.length;ee<J;ee++){const ie=L[ee],j=ie.shadow;if(j===void 0){console.warn("THREE.WebGLShadowMap:",ie,"has no shadow.");continue}if(j.autoUpdate===!1&&j.needsUpdate===!1)continue;i.copy(j.mapSize);const z=j.getFrameExtents();if(i.multiply(z),s.copy(j.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(s.x=Math.floor(u/z.x),i.x=s.x*z.x,j.mapSize.x=s.x),i.y>u&&(s.y=Math.floor(u/z.y),i.y=s.y*z.y,j.mapSize.y=s.y)),j.map===null||B===!0||W===!0){const Z=this.type!==Vo?{minFilter:xr,magFilter:xr}:{};j.map!==null&&j.map.dispose(),j.map=new ta(i.x,i.y,Z),j.map.texture.name=ie.name+".shadowMap",j.camera.updateProjectionMatrix()}n.setRenderTarget(j.map),n.clear();const q=j.getViewportCount();for(let Z=0;Z<q;Z++){const re=j.getViewport(Z);o.set(s.x*re.x,s.y*re.y,s.x*re.z,s.y*re.w),V.viewport(o),j.updateMatrices(ie,Z),r=j.getFrustum(),A(C,P,j.camera,ie,this.type)}j.isPointLightShadow!==!0&&this.type===Vo&&S(j,P),j.needsUpdate=!1}y=this.type,x.needsUpdate=!1,n.setRenderTarget(R,N,O)};function S(L,C){const P=e.update(_);m.defines.VSM_SAMPLES!==L.blurSamples&&(m.defines.VSM_SAMPLES=L.blurSamples,g.defines.VSM_SAMPLES=L.blurSamples,m.needsUpdate=!0,g.needsUpdate=!0),L.mapPass===null&&(L.mapPass=new ta(i.x,i.y)),m.uniforms.shadow_pass.value=L.map.texture,m.uniforms.resolution.value=L.mapSize,m.uniforms.radius.value=L.radius,n.setRenderTarget(L.mapPass),n.clear(),n.renderBufferDirect(C,null,P,m,_,null),g.uniforms.shadow_pass.value=L.mapPass.texture,g.uniforms.resolution.value=L.mapSize,g.uniforms.radius.value=L.radius,n.setRenderTarget(L.map),n.clear(),n.renderBufferDirect(C,null,P,g,_,null)}function b(L,C,P,R){let N=null;const O=P.isPointLight===!0?L.customDistanceMaterial:L.customDepthMaterial;if(O!==void 0)N=O;else if(N=P.isPointLight===!0?l:a,n.localClippingEnabled&&C.clipShadows===!0&&Array.isArray(C.clippingPlanes)&&C.clippingPlanes.length!==0||C.displacementMap&&C.displacementScale!==0||C.alphaMap&&C.alphaTest>0||C.map&&C.alphaTest>0){const V=N.uuid,B=C.uuid;let W=c[V];W===void 0&&(W={},c[V]=W);let ee=W[B];ee===void 0&&(ee=N.clone(),W[B]=ee,C.addEventListener("dispose",k)),N=ee}if(N.visible=C.visible,N.wireframe=C.wireframe,R===Vo?N.side=C.shadowSide!==null?C.shadowSide:C.side:N.side=C.shadowSide!==null?C.shadowSide:d[C.side],N.alphaMap=C.alphaMap,N.alphaTest=C.alphaTest,N.map=C.map,N.clipShadows=C.clipShadows,N.clippingPlanes=C.clippingPlanes,N.clipIntersection=C.clipIntersection,N.displacementMap=C.displacementMap,N.displacementScale=C.displacementScale,N.displacementBias=C.displacementBias,N.wireframeLinewidth=C.wireframeLinewidth,N.linewidth=C.linewidth,P.isPointLight===!0&&N.isMeshDistanceMaterial===!0){const V=n.properties.get(N);V.light=P}return N}function A(L,C,P,R,N){if(L.visible===!1)return;if(L.layers.test(C.layers)&&(L.isMesh||L.isLine||L.isPoints)&&(L.castShadow||L.receiveShadow&&N===Vo)&&(!L.frustumCulled||r.intersectsObject(L))){L.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,L.matrixWorld);const B=e.update(L),W=L.material;if(Array.isArray(W)){const ee=B.groups;for(let J=0,ie=ee.length;J<ie;J++){const j=ee[J],z=W[j.materialIndex];if(z&&z.visible){const q=b(L,z,R,N);L.onBeforeShadow(n,L,C,P,B,q,j),n.renderBufferDirect(P,null,B,q,L,j),L.onAfterShadow(n,L,C,P,B,q,j)}}}else if(W.visible){const ee=b(L,W,R,N);L.onBeforeShadow(n,L,C,P,B,ee,null),n.renderBufferDirect(P,null,B,ee,L,null),L.onAfterShadow(n,L,C,P,B,ee,null)}}const V=L.children;for(let B=0,W=V.length;B<W;B++)A(V[B],C,P,R,N)}function k(L){L.target.removeEventListener("dispose",k);for(const P in c){const R=c[P],N=L.target.uuid;N in R&&(R[N].dispose(),delete R[N])}}}function nhe(n,e,t){const r=t.isWebGL2;function i(){let ne=!1;const ke=new Nn;let He=null;const wt=new Nn(0,0,0,0);return{setMask:function(Ie){He!==Ie&&!ne&&(n.colorMask(Ie,Ie,Ie,Ie),He=Ie)},setLocked:function(Ie){ne=Ie},setClear:function(Ie,gt,bt,Jt,vn){vn===!0&&(Ie*=Jt,gt*=Jt,bt*=Jt),ke.set(Ie,gt,bt,Jt),wt.equals(ke)===!1&&(n.clearColor(Ie,gt,bt,Jt),wt.copy(ke))},reset:function(){ne=!1,He=null,wt.set(-1,0,0,0)}}}function s(){let ne=!1,ke=null,He=null,wt=null;return{setTest:function(Ie){Ie?$e(n.DEPTH_TEST):De(n.DEPTH_TEST)},setMask:function(Ie){ke!==Ie&&!ne&&(n.depthMask(Ie),ke=Ie)},setFunc:function(Ie){if(He!==Ie){switch(Ie){case u6:n.depthFunc(n.NEVER);break;case d6:n.depthFunc(n.ALWAYS);break;case h6:n.depthFunc(n.LESS);break;case sy:n.depthFunc(n.LEQUAL);break;case f6:n.depthFunc(n.EQUAL);break;case p6:n.depthFunc(n.GEQUAL);break;case m6:n.depthFunc(n.GREATER);break;case g6:n.depthFunc(n.NOTEQUAL);break;default:n.depthFunc(n.LEQUAL)}He=Ie}},setLocked:function(Ie){ne=Ie},setClear:function(Ie){wt!==Ie&&(n.clearDepth(Ie),wt=Ie)},reset:function(){ne=!1,ke=null,He=null,wt=null}}}function o(){let ne=!1,ke=null,He=null,wt=null,Ie=null,gt=null,bt=null,Jt=null,vn=null;return{setTest:function(tn){ne||(tn?$e(n.STENCIL_TEST):De(n.STENCIL_TEST))},setMask:function(tn){ke!==tn&&!ne&&(n.stencilMask(tn),ke=tn)},setFunc:function(tn,Mn,Ln){(He!==tn||wt!==Mn||Ie!==Ln)&&(n.stencilFunc(tn,Mn,Ln),He=tn,wt=Mn,Ie=Ln)},setOp:function(tn,Mn,Ln){(gt!==tn||bt!==Mn||Jt!==Ln)&&(n.stencilOp(tn,Mn,Ln),gt=tn,bt=Mn,Jt=Ln)},setLocked:function(tn){ne=tn},setClear:function(tn){vn!==tn&&(n.clearStencil(tn),vn=tn)},reset:function(){ne=!1,ke=null,He=null,wt=null,Ie=null,gt=null,bt=null,Jt=null,vn=null}}}const a=new i,l=new s,c=new o,u=new WeakMap,d=new WeakMap;let m={},g={},v=new WeakMap,_=[],x=null,y=!1,S=null,b=null,A=null,k=null,L=null,C=null,P=null,R=new tt(0,0,0),N=0,O=!1,V=null,B=null,W=null,ee=null,J=null;const ie=n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let j=!1,z=0;const q=n.getParameter(n.VERSION);q.indexOf("WebGL")!==-1?(z=parseFloat(/^WebGL (\d)/.exec(q)[1]),j=z>=1):q.indexOf("OpenGL ES")!==-1&&(z=parseFloat(/^OpenGL ES (\d)/.exec(q)[1]),j=z>=2);let Z=null,re={};const te=n.getParameter(n.SCISSOR_BOX),ae=n.getParameter(n.VIEWPORT),we=new Nn().fromArray(te),Re=new Nn().fromArray(ae);function de(ne,ke,He,wt){const Ie=new Uint8Array(4),gt=n.createTexture();n.bindTexture(ne,gt),n.texParameteri(ne,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(ne,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let bt=0;bt<He;bt++)r&&(ne===n.TEXTURE_3D||ne===n.TEXTURE_2D_ARRAY)?n.texImage3D(ke,0,n.RGBA,1,1,wt,0,n.RGBA,n.UNSIGNED_BYTE,Ie):n.texImage2D(ke+bt,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,Ie);return gt}const Ge={};Ge[n.TEXTURE_2D]=de(n.TEXTURE_2D,n.TEXTURE_2D,1),Ge[n.TEXTURE_CUBE_MAP]=de(n.TEXTURE_CUBE_MAP,n.TEXTURE_CUBE_MAP_POSITIVE_X,6),r&&(Ge[n.TEXTURE_2D_ARRAY]=de(n.TEXTURE_2D_ARRAY,n.TEXTURE_2D_ARRAY,1,1),Ge[n.TEXTURE_3D]=de(n.TEXTURE_3D,n.TEXTURE_3D,1,1)),a.setClear(0,0,0,1),l.setClear(1),c.setClear(0),$e(n.DEPTH_TEST),l.setFu
vendor: 4,603 bytes, line 4186
4186nc(sy),Ye(!1),G(bA),$e(n.CULL_FACE),xe(dl);function $e(ne){m[ne]!==!0&&(n.enable(ne),m[ne]=!0)}function De(ne){m[ne]!==!1&&(n.disable(ne),m[ne]=!1)}function Ue(ne,ke){return g[ne]!==ke?(n.bindFramebuffer(ne,ke),g[ne]=ke,r&&(ne===n.DRAW_FRAMEBUFFER&&(g[n.FRAMEBUFFER]=ke),ne===n.FRAMEBUFFER&&(g[n.DRAW_FRAMEBUFFER]=ke)),!0):!1}function Q(ne,ke){let He=_,wt=!1;if(ne)if(He=v.get(ke),He===void 0&&(He=[],v.set(ke,He)),ne.isWebGLMultipleRenderTargets){const Ie=ne.texture;if(He.length!==Ie.length||He[0]!==n.COLOR_ATTACHMENT0){for(let gt=0,bt=Ie.length;gt<bt;gt++)He[gt]=n.COLOR_ATTACHMENT0+gt;He.length=Ie.length,wt=!0}}else He[0]!==n.COLOR_ATTACHMENT0&&(He[0]=n.COLOR_ATTACHMENT0,wt=!0);else He[0]!==n.BACK&&(He[0]=n.BACK,wt=!0);wt&&(t.isWebGL2?n.drawBuffers(He):e.get("WEBGL_draw_buffers").drawBuffersWEBGL(He))}function be(ne){return x!==ne?(n.useProgram(ne),x=ne,!0):!1}const ve={[ic]:n.FUNC_ADD,[Kz]:n.FUNC_SUBTRACT,[Yz]:n.FUNC_REVERSE_SUBTRACT};if(r)ve[MA]=n.MIN,ve[AA]=n.MAX;else{const ne=e.get("EXT_blend_minmax");ne!==null&&(ve[MA]=ne.MIN_EXT,ve[AA]=ne.MAX_EXT)}const Le={[Qz]:n.ZERO,[Jz]:n.ONE,[Zz]:n.SRC_COLOR,[b1]:n.SRC_ALPHA,[s6]:n.SRC_ALPHA_SATURATE,[r6]:n.DST_COLOR,[t6]:n.DST_ALPHA,[e6]:n.ONE_MINUS_SRC_COLOR,[E1]:n.ONE_MINUS_SRC_ALPHA,[i6]:n.ONE_MINUS_DST_COLOR,[n6]:n.ONE_MINUS_DST_ALPHA,[o6]:n.CONSTANT_COLOR,[a6]:n.ONE_MINUS_CONSTANT_COLOR,[l6]:n.CONSTANT_ALPHA,[c6]:n.ONE_MINUS_CONSTANT_ALPHA};function xe(ne,ke,He,wt,Ie,gt,bt,Jt,vn,tn){if(ne===dl){y===!0&&(De(n.BLEND),y=!1);return}if(y===!1&&($e(n.BLEND),y=!0),ne!==Xz){if(ne!==S||tn!==O){if((b!==ic||L!==ic)&&(n.blendEquation(n.FUNC_ADD),b=ic,L=ic),tn)switch(ne){case hd:n.blendFuncSeparate(n.ONE,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case S1:n.blendFunc(n.ONE,n.ONE);break;case EA:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case TA:n.blendFuncSeparate(n.ZERO,n.SRC_COLOR,n.ZERO,n.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",ne);break}else switch(ne){case hd:n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case S1:n.blendFunc(n.SRC_ALPHA,n.ONE);break;case EA:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case TA:n.blendFunc(n.ZERO,n.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",ne);break}A=null,k=null,C=null,P=null,R.set(0,0,0),N=0,S=ne,O=tn}return}Ie=Ie||ke,gt=gt||He,bt=bt||wt,(ke!==b||Ie!==L)&&(n.blendEquationSeparate(ve[ke],ve[Ie]),b=ke,L=Ie),(He!==A||wt!==k||gt!==C||bt!==P)&&(n.blendFuncSeparate(Le[He],Le[wt],Le[gt],Le[bt]),A=He,k=wt,C=gt,P=bt),(Jt.equals(R)===!1||vn!==N)&&(n.blendColor(Jt.r,Jt.g,Jt.b,vn),R.copy(Jt),N=vn),S=ne,O=!1}function it(ne,ke){ne.side===Us?De(n.CULL_FACE):$e(n.CULL_FACE);let He=ne.side===Zr;ke&&(He=!He),Ye(He),ne.blending===hd&&ne.transparent===!1?xe(dl):xe(ne.blending,ne.blendEquation,ne.blendSrc,ne.blendDst,ne.blendEquationAlpha,ne.blendSrcAlpha,ne.blendDstAlpha,ne.blendColor,ne.blendAlpha,ne.premultipliedAlpha),l.setFunc(ne.depthFunc),l.setTest(ne.depthTest),l.setMask(ne.depthWrite),a.setMask(ne.colorWrite);const wt=ne.stencilWrite;c.setTest(wt),wt&&(c.setMask(ne.stencilWriteMask),c.setFunc(ne.stencilFunc,ne.stencilRef,ne.stencilFuncMask),c.setOp(ne.stencilFail,ne.stencilZFail,ne.stencilZPass)),le(ne.polygonOffset,ne.polygonOffsetFactor,ne.polygonOffsetUnits),ne.alphaToCoverage===!0?$e(n.SAMPLE_ALPHA_TO_COVERAGE):De(n.SAMPLE_ALPHA_TO_COVERAGE)}function Ye(ne){V!==ne&&(ne?n.frontFace(n.CW):n.frontFace(n.CCW),V=ne)}function G(ne){ne!==Wz?($e(n.CULL_FACE),ne!==B&&(ne===bA?n.cullFace(n.BACK):ne===$z?n.cullFace(n.FRONT):n.cullFace(n.FRONT_AND_BACK))):De(n.CULL_FACE),B=ne}function H(ne){ne!==W&&(j&&n.lineWidth(ne),W=ne)}function le(ne,ke,He){ne?($e(n.POLYGON_OFFSET_FILL),(ee!==ke||J!==He)&&(n.polygonOffset(ke,He),ee=ke,J=He)):De(n.POLYGON_OFFSET_FILL)}function Ne(ne){ne?$e(n.SCISSOR_TEST):De(n.SCISSOR_TEST)}function Ae(ne){ne===void 0&&(ne=n.TEXTURE0+ie-1),Z!==ne&&(n.activeTexture(ne),Z=ne)}function Ce(ne,ke,He){He===void 0&&(Z===null?He=n.TEXTURE0+ie-1:He=Z);let wt=re[He];wt===void 0&&(wt={type:void 0,texture:void 0},re[He]=wt),(wt.type!==ne||wt.texture!==ke)&&(Z!==He&&(n.activeTexture(He),Z=He),n.bindTexture(ne,ke||Ge[ne]),wt.type=ne,wt.texture=ke)}function st(){const ne=re[Z];ne!==void 0&&ne.type!==void 0&&(n.bindTexture(ne.type,null),ne.type=void 0,ne.texture=void 0)}function Ve(){try{n.compressedTexImage2D.apply(n,arguments)}catch(ne){console.error("THREE.WebGLState:",ne)}}function Qe(){try{n.compressedTexImage3D.apply(n,arguments)}catch(ne){console.error("THREE.WebGLState:",ne)}}
vendor: 1,600 bytes, line 4186
4186function xt(){try{n.texSubImage2D.apply(n,arguments)}catch(ne){console.error("THREE.WebGLState:",ne)}}function Ft(){try{n.texSubImage3D.apply(n,arguments)}catch(ne){console.error("THREE.WebGLState:",ne)}}function Pe(){try{n.compressedTexSubImage2D.apply(n,arguments)}catch(ne){console.error("THREE.WebGLState:",ne)}}function rn(){try{n.compressedTexSubImage3D.apply(n,arguments)}catch(ne){console.error("THREE.WebGLState:",ne)}}function zt(){try{n.texStorage2D.apply(n,arguments)}catch(ne){console.error("THREE.WebGLState:",ne)}}function Tt(){try{n.texStorage3D.apply(n,arguments)}catch(ne){console.error("THREE.WebGLState:",ne)}}function dt(){try{n.texImage2D.apply(n,arguments)}catch(ne){console.error("THREE.WebGLState:",ne)}}function nt(){try{n.texImage3D.apply(n,arguments)}catch(ne){console.error("THREE.WebGLState:",ne)}}function _t(ne){we.equals(ne)===!1&&(n.scissor(ne.x,ne.y,ne.z,ne.w),we.copy(ne))}function on(ne){Re.equals(ne)===!1&&(n.viewport(ne.x,ne.y,ne.z,ne.w),Re.copy(ne))}function bn(ne,ke){let He=d.get(ke);He===void 0&&(He=new WeakMap,d.set(ke,He));let wt=He.get(ne);wt===void 0&&(wt=n.getUniformBlockIndex(ke,ne.name),He.set(ne,wt))}function Bt(ne,ke){const wt=d.get(ke).get(ne);u.get(ke)!==wt&&(n.uniformBlockBinding(ke,wt,ne.__bindingPointIndex),u.set(ke,wt))}function je(){n.disable(n.BLEND),n.disable(n.CULL_FACE),n.disable(n.DEPTH_TEST),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SCISSOR_TEST),n.disable(n.STENCIL_TEST),n.disable(n.SAMPLE_ALPHA_TO_COVERAGE),n.blendEquation(n.FUNC_ADD),n.blendFunc(n.ONE,n.ZERO),n.blendFuncSeparate(n.ONE,n.ZERO,n.ONE,n.ZERO),n.blendColor
4186(0,0,0,0),n.colorMask(!0,!0,!0,!0),n.clearColor(0,0,0,0),n.depthMask(!0),n.depthFunc(n.LESS),n.clearDepth(1),n.stencilMask(4294967295),n.stencilFunc(n.ALWAYS,0,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),n.clearStencil(0),n.cullFace(n.BACK),n.frontFace(n.CCW),n.polygonOffset(0,0),n.activeTexture(n.TEXTURE0),n.bindFramebuffer(n.FRAMEBUFFER,null),r===!0&&(n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),n.bindFramebuffer(n.READ_FRAMEBUFFER,null)),n.useProgram(null),n.lineWidth(1),n.scissor(0,0,n.canvas.width,n.canvas.height),n.viewport(0,0,n.canvas.width,n.canvas.height),m={},Z=null,re={},g={},v=new WeakMap,_=[],x=null,y=!1,S=null,b=null,A=null,k=null,L=null,C=null,P=null,R=new tt(0,0,0),N=0,O=!1,V=null,B=null,W=null,ee=null,J=null,we.set(0,0,n.canvas.width,n.canvas.height),Re.set(0,0,n.canvas.width,n.canvas.height),a.reset(),l.reset(),c.reset()}return{buffers:{color:a,depth:l,stencil:c},enable:$e,disable:De,bindFramebuffer:Ue,drawBuffers:Q,useProgram:be,setBlending:xe,setMaterial:it,setFlipSided:Ye,setCullFace:G,setLineWidth:H,setPolygonOffset:le,setScissorTest:Ne,activeTexture:Ae,bindTexture:Ce,unbindTexture:st,compressedTexImage2D:Ve,compressedTexImage3D:Qe,texImage2D:dt,texImage3D:nt,updateUBOMapping:bn,uniformBlockBinding:Bt,texStorage2D:zt,texStorage3D:Tt,texSubImage2D:xt,texSubImage3D:Ft,compressedTexSubImage2D:Pe,compressedTexSubImage3D:rn,scissor:_t,viewport:on,reset:je}}function rhe(n,e,t,r,i,s,o){const a=i.isWebGL2,l=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,c=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),u=new WeakMap;let d;const m=new WeakMap;let g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(G,H){return g?new OffscreenCanvas(G,H):yy("canvas")}function _(G,H,le,Ne){let Ae=1;if((G.width>Ne||G.height>Ne)&&(Ae=Ne/Math.max(G.width,G.height)),Ae<1||H===!0)if(typeof HTMLImageElement<"u"&&G instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&G instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&G instanceof ImageBitmap){const Ce=H?A1:Math.floor,st=Ce(Ae*G.width),Ve=Ce(Ae*G.height);d===void 0&&(d=v(st,Ve));const Qe=le?v(st,Ve):d;return Qe.width=st,Qe.height=Ve,Qe.getContext("2d").drawImage(G,0,0,st,Ve),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+G.width+"x"+G.height+") to ("+st+"x"+Ve+")."),Qe}else return"data"in G&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+G.width+"x"+G.height+")."),G;return G}function x(G){return nC(G.width)&&nC(G.height)}function y(G){return a?!1:G.wrapS!==Ii||G.wrapT!==Ii||G.minFilter!==xr&&G.minFilter!==Sr}function S(G,H){return G.generateMipmaps&&H&&G.minFilter!==xr&&G.minFilter!==Sr}function b(G){n.generateMipmap(G)}function A(G,H,le,Ne,Ae=!1){if(a===!1)return H;if(G!==null){if(n[G]!==void 0)return n[G];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+G+"'")}let Ce=H;if(H===n.RED&&(le===n.FLOAT&&(Ce=n.R32F),le===n.HALF_FLOAT&&(Ce=n.R16F),le===n.UNSIGNED_BYTE&&(Ce=n.R8)),H===n.RED_INTEGER&&(le===n.UNSIGNED_BYTE&&(Ce=n.R8UI),le===n.UNSIGNED_SHORT&&(Ce=n.R16UI),le===n.UNSIGNED_INT&&(Ce=n.R32UI),le===n.BYTE&&(Ce=n.R8I),le===n.SHORT&&(Ce=n.R16I),le===n.INT&&(Ce=n.R32I)),H===n.RG&&(le===n.FLOAT&&(Ce=n.RG32F),le===n.HALF_FLOAT&&(Ce=n.RG16F),le===n.UNSIGNED_BYTE&&(Ce=n.RG8)),H===n.RGBA){const st=Ae?fy:Pn.getTransfer(Ne);le===n.FLOAT&&(Ce=n.RGBA32F),le===n.HALF_FLOAT&&(Ce=n.RGBA16F),le===n.UNSIGNED_BYTE&&(Ce=st===On?n.SRGB8_ALPHA8:n.RGBA8),le===n.UNSIGNED_SHORT_4_4_4_4&&(Ce=n.RGBA4),le===n.UNSIGNED_SHORT_5_5_5_1&&(Ce=n.RGB5_A1)}return(Ce===n.R16F||Ce===n.R32F||Ce===n.RG16F||Ce===n.RG32F||Ce===n.RGBA16F||Ce===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Ce}function k(G,H,le){return S(G,le)===!0||G.isFramebufferTexture&&G.minFilter!==xr&&G.minFilter!==Sr?Math.log2(Math.max(H.width,H.height))+1:G.mipmaps!==void 0&&G.mipmaps.length>0?G.mipmaps.length:G.isCompressedTexture&&Array.isArray(G.image)?H.mipmaps.length:1}function L(G){return G===xr||G===T1||G===_g?n.NEAREST:n.LINEAR}function C(G){const H=G.target;H.removeEventListener("dispose",C),R(H),H.isVideoTexture&&u.delete(H)}function P(G){const H=G.target;H.removeEventListener("dispose",P),O(H)}function R(G){const H=r.get(G);if(H.__webglInit===void 0)return;const le=G.source,Ne=m.get(le);if(Ne){const Ae=Ne[H.__cacheKey];Ae.usedTimes--,Ae.usedTimes===0&&N(G),Object.keys(Ne).length===0&&m.delete(le)}r.remove(G)}function N(G){const H=r.get(G);n.deleteTexture(H.__webglTexture);const le=G.source,Ne=m.get(le);delete Ne[H.__cacheKey],o.memory.textures--}function O(G){const H=G.texture,le=r.get(G),Ne=r.get(H);if(Ne.__webglTexture!==void 0&&(n.deleteTexture(Ne.__webglTexture),o.memory.textures--),G.depthTexture&&G.depthTexture.dispose(),G.isWebGLCubeRen
vendor: 5,277 bytes, line 4186
4186derTarget)for(let Ae=0;Ae<6;Ae++){if(Array.isArray(le.__webglFramebuffer[Ae]))for(let Ce=0;Ce<le.__webglFramebuffer[Ae].length;Ce++)n.deleteFramebuffer(le.__webglFramebuffer[Ae][Ce]);else n.deleteFramebuffer(le.__webglFramebuffer[Ae]);le.__webglDepthbuffer&&n.deleteRenderbuffer(le.__webglDepthbuffer[Ae])}else{if(Array.isArray(le.__webglFramebuffer))for(let Ae=0;Ae<le.__webglFramebuffer.length;Ae++)n.deleteFramebuffer(le.__webglFramebuffer[Ae]);else n.deleteFramebuffer(le.__webglFramebuffer);if(le.__webglDepthbuffer&&n.deleteRenderbuffer(le.__webglDepthbuffer),le.__webglMultisampledFramebuffer&&n.deleteFramebuffer(le.__webglMultisampledFramebuffer),le.__webglColorRenderbuffer)for(let Ae=0;Ae<le.__webglColorRenderbuffer.length;Ae++)le.__webglColorRenderbuffer[Ae]&&n.deleteRenderbuffer(le.__webglColorRenderbuffer[Ae]);le.__webglDepthRenderbuffer&&n.deleteRenderbuffer(le.__webglDepthRenderbuffer)}if(G.isWebGLMultipleRenderTargets)for(let Ae=0,Ce=H.length;Ae<Ce;Ae++){const st=r.get(H[Ae]);st.__webglTexture&&(n.deleteTexture(st.__webglTexture),o.memory.textures--),r.remove(H[Ae])}r.remove(H),r.remove(G)}let V=0;function B(){V=0}function W(){const G=V;return G>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+G+" texture units while this GPU supports only "+i.maxTextures),V+=1,G}function ee(G){const H=[];return H.push(G.wrapS),H.push(G.wrapT),H.push(G.wrapR||0),H.push(G.magFilter),H.push(G.minFilter),H.push(G.anisotropy),H.push(G.internalFormat),H.push(G.format),H.push(G.type),H.push(G.generateMipmaps),H.push(G.premultiplyAlpha),H.push(G.flipY),H.push(G.unpackAlignment),H.push(G.colorSpace),H.join()}function J(G,H){const le=r.get(G);if(G.isVideoTexture&&it(G),G.isRenderTargetTexture===!1&&G.version>0&&le.__version!==G.version){const Ne=G.image;if(Ne===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Ne.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{we(le,G,H);return}}t.bindTexture(n.TEXTURE_2D,le.__webglTexture,n.TEXTURE0+H)}function ie(G,H){const le=r.get(G);if(G.version>0&&le.__version!==G.version){we(le,G,H);return}t.bindTexture(n.TEXTURE_2D_ARRAY,le.__webglTexture,n.TEXTURE0+H)}function j(G,H){const le=r.get(G);if(G.version>0&&le.__version!==G.version){we(le,G,H);return}t.bindTexture(n.TEXTURE_3D,le.__webglTexture,n.TEXTURE0+H)}function z(G,H){const le=r.get(G);if(G.version>0&&le.__version!==G.version){Re(le,G,H);return}t.bindTexture(n.TEXTURE_CUBE_MAP,le.__webglTexture,n.TEXTURE0+H)}const q={[ly]:n.REPEAT,[Ii]:n.CLAMP_TO_EDGE,[cy]:n.MIRRORED_REPEAT},Z={[xr]:n.NEAREST,[T1]:n.NEAREST_MIPMAP_NEAREST,[_g]:n.NEAREST_MIPMAP_LINEAR,[Sr]:n.LINEAR,[YR]:n.LINEAR_MIPMAP_NEAREST,[zc]:n.LINEAR_MIPMAP_LINEAR},re={[V6]:n.NEVER,[W6]:n.ALWAYS,[j6]:n.LESS,[oP]:n.LEQUAL,[B6]:n.EQUAL,[G6]:n.GEQUAL,[z6]:n.GREATER,[H6]:n.NOTEQUAL};function te(G,H,le){if(le?(n.texParameteri(G,n.TEXTURE_WRAP_S,q[H.wrapS]),n.texParameteri(G,n.TEXTURE_WRAP_T,q[H.wrapT]),(G===n.TEXTURE_3D||G===n.TEXTURE_2D_ARRAY)&&n.texParameteri(G,n.TEXTURE_WRAP_R,q[H.wrapR]),n.texParameteri(G,n.TEXTURE_MAG_FILTER,Z[H.magFilter]),n.texParameteri(G,n.TEXTURE_MIN_FILTER,Z[H.minFilter])):(n.texParameteri(G,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(G,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(G===n.TEXTURE_3D||G===n.TEXTURE_2D_ARRAY)&&n.texParameteri(G,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(H.wrapS!==Ii||H.wrapT!==Ii)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(G,n.TEXTURE_MAG_FILTER,L(H.magFilter)),n.texParameteri(G,n.TEXTURE_MIN_FILTER,L(H.minFilter)),H.minFilter!==xr&&H.minFilter!==Sr&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),H.compareFunction&&(n.texParameteri(G,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(G,n.TEXTURE_COMPARE_FUNC,re[H.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const Ne=e.get("EXT_texture_filter_anisotropic");if(H.magFilter===xr||H.minFilter!==_g&&H.minFilter!==zc||H.type===$o&&e.has("OES_texture_float_linear")===!1||a===!1&&H.type===op&&e.has("OES_texture_half_float_linear")===!1)return;(H.anisotropy>1||r.get(H).__currentAnisotropy)&&(n.texParameterf(G,Ne.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(H.anisotropy,i.getMaxAnisotropy())),r.get(H).__currentAnisotropy=H.anisotropy)}}function ae(G,H){let le=!1;G.__webglInit===void 0&&(G.__webglInit=!0,H.addEventListener("dispose",C));const Ne=H.source;let Ae=m.get(Ne);Ae===void 0&&(Ae={},m.set(Ne,Ae));const Ce=ee(H);if(Ce!==G.__cacheKey){Ae[Ce]===void 0&&(Ae[Ce]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,le=!0),Ae[Ce].usedTimes++;const st=Ae[G.__cacheKey];st!==void 0&&(Ae[G.__cacheKey].usedTimes--,st.usedTimes===0&&N(H)),G.__cacheKey=Ce,G.__webglTexture=Ae[Ce].texture}return le}function we(G,H,le){let Ne=n.TEXTURE_2D;(H.isDataArrayTexture||H.isCompressedArrayTexture)&&(Ne=n.TEXTURE_2D_ARRAY),H.isData3DTexture&&(Ne=n.TEXTURE_3D);const Ae=ae(G,H),Ce=H.source;t.bindTexture(Ne,G.__webglTexture,n.TEXTURE0+le);const st=r.get(Ce);if(Ce.version!==st.__version||Ae===!0){t.activeTexture(n.TEXTURE0+le);
4186const Ve=Pn.getPrimaries(Pn.workingColorSpace),Qe=H.colorSpace===Vs?null:Pn.getPrimaries(H.colorSpace),xt=H.colorSpace===Vs||Ve===Qe?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,H.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,H.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,H.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,xt);const Ft=y(H)&&x(H.image)===!1;let Pe=_(H.image,Ft,!1,i.maxTextureSize);Pe=Ye(H,Pe);const rn=x(Pe)||a,zt=s.convert(H.format,H.colorSpace);let Tt=s.convert(H.type),dt=A(H.internalFormat,zt,Tt,H.colorSpace,H.isVideoTexture);te(Ne,H,rn);let nt;const _t=H.mipmaps,on=a&&H.isVideoTexture!==!0&&dt!==rP,bn=st.__version===void 0||Ae===!0,Bt=k(H,Pe,rn);if(H.isDepthTexture)dt=n.DEPTH_COMPONENT,a?H.type===$o?dt=n.DEPTH_COMPONENT32F:H.type===ll?dt=n.DEPTH_COMPONENT24:H.type===Ec?dt=n.DEPTH24_STENCIL8:dt=n.DEPTH_COMPONENT16:H.type===$o&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),H.format===Tc&&dt===n.DEPTH_COMPONENT&&H.type!==Dw&&H.type!==ll&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),H.type=ll,Tt=s.convert(H.type)),H.format===Ed&&dt===n.DEPTH_COMPONENT&&(dt=n.DEPTH_STENCIL,H.type!==Ec&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),H.type=Ec,Tt=s.convert(H.type))),bn&&(on?t.texStorage2D(n.TEXTURE_2D,1,dt,Pe.width,Pe.height):t.texImage2D(n.TEXTURE_2D,0,dt,Pe.width,Pe.height,0,zt,Tt,null));else if(H.isDataTexture)if(_t.length>0&&rn){on&&bn&&t.texStorage2D(n.TEXTURE_2D,Bt,dt,_t[0].width,_t[0].height);for(let je=0,ne=_t.length;je<ne;je++)nt=_t[je],on?t.texSubImage2D(n.TEXTURE_2D,je,0,0,nt.width,nt.height,zt,Tt,nt.data):t.texImage2D(n.TEXTURE_2D,je,dt,nt.width,nt.height,0,zt,Tt,nt.data);H.generateMipmaps=!1}else on?(bn&&t.texStorage2D(n.TEXTURE_2D,Bt,dt,Pe.width,Pe.height),t.texSubImage2D(n.TEXTURE_2D,0,0,0,Pe.width,Pe.height,zt,Tt,Pe.data)):t.texImage2D(n.TEXTURE_2D,0,dt,Pe.width,Pe.height,0,zt,Tt,Pe.data);else if(H.isCompressedTexture)if(H.isCompressedArrayTexture){on&&bn&&t.texStorage3D(n.TEXTURE_2D_ARRAY,Bt,dt,_t[0].width,_t[0].height,Pe.depth);for(let je=0,ne=_t.length;je<ne;je++)nt=_t[je],H.format!==Xi?zt!==null?on?t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,je,0,0,0,nt.width,nt.height,Pe.depth,zt,nt.data,0,0):t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,je,dt,nt.width,nt.height,Pe.depth,0,nt.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):on?t.texSubImage3D(n.TEXTURE_2D_ARRAY,je,0,0,0,nt.width,nt.height,Pe.depth,zt,Tt,nt.data):t.texImage3D(n.TEXTURE_2D_ARRAY,je,dt,nt.width,nt.height,Pe.depth,0,zt,Tt,nt.data)}else{on&&bn&&t.texStorage2D(n.TEXTURE_2D,Bt,dt,_t[0].width,_t[0].height);for(let je=0,ne=_t.length;je<ne;je++)nt=_t[je],H.format!==Xi?zt!==null?on?t.compressedTexSubImage2D(n.TEXTURE_2D,je,0,0,nt.width,nt.height,zt,nt.data):t.compressedTexImage2D(n.TEXTURE_2D,je,dt,nt.width,nt.height,0,nt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):on?t.texSubImage2D(n.TEXTURE_2D,je,0,0,nt.width,nt.height,zt,Tt,nt.data):t.texImage2D(n.TEXTURE_2D,je,dt,nt.width,nt.height,0,zt,Tt,nt.data)}else if(H.isDataArrayTexture)on?(bn&&t.texStorage3D(n.TEXTURE_2D_ARRAY,Bt,dt,Pe.width,Pe.height,Pe.depth),t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,Pe.width,Pe.height,Pe.depth,zt,Tt,Pe.data)):t.texImage3D(n.TEXTURE_2D_ARRAY,0,dt,Pe.width,Pe.height,Pe.depth,0,zt,Tt,Pe.data);else if(H.isData3DTexture)on?(bn&&t.texStorage3D(n.TEXTURE_3D,Bt,dt,Pe.width,Pe.height,Pe.depth),t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,Pe.width,Pe.height,Pe.depth,zt,Tt,Pe.data)):t.texImage3D(n.TEXTURE_3D,0,dt,Pe.width,Pe.height,Pe.depth,0,zt,Tt,Pe.data);else if(H.isFramebufferTexture){if(bn)if(on)t.texStorage2D(n.TEXTURE_2D,Bt,dt,Pe.width,Pe.height);else{let je=Pe.width,ne=Pe.height;for(let ke=0;ke<Bt;ke++)t.texImage2D(n.TEXTURE_2D,ke,dt,je,ne,0,zt,Tt,null),je>>=1,ne>>=1}}else if(_t.length>0&&rn){on&&bn&&t.texStorage2D(n.TEXTURE_2D,Bt,dt,_t[0].width,_t[0].height);for(let je=0,ne=_t.length;je<ne;je++)nt=_t[je],on?t.texSubImage2D(n.TEXTURE_2D,je,0,0,zt,Tt,nt):t.texImage2D(n.TEXTURE_2D,je,dt,zt,Tt,nt);H.generateMipmaps=!1}else on?(bn&&t.texStorage2D(n.TEXTURE_2D,Bt,dt,Pe.width,Pe.height),t.texSubImage2D(n.TEXTURE_2D,0,0,0,zt,Tt,Pe)):t.texImage2D(n.TEXTURE_2D,0,dt,zt,Tt,Pe);S(H,rn)&&b(Ne),st.__version=Ce.version,H.onUpdate&&H.onUpdate(H)}G.__version=H.version}function Re(G,H,le){if(H.image.length!==6)return;const Ne=ae(G,H),Ae=H.source;t.bindTexture(n.TEXTURE_CUBE_MAP,G.__webglTexture,n.TEXTURE0+le);const Ce=r.get(Ae);if(Ae.version!==Ce.__version||Ne===!0){t.activeTexture(n.TEXTURE0+le);
4186const st=Pn.getPrimaries(Pn.workingColorSpace),Ve=H.colorSpace===Vs?null:Pn.getPrimaries(H.colorSpace),Qe=H.colorSpace===Vs||st===Ve?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,H.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,H.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,H.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Qe);const xt=H.isCompressedTexture||H.image[0].isCompressedTexture,Ft=H.image[0]&&H.image[0].isDataTexture,Pe=[];for(let je=0;je<6;je++)!xt&&!Ft?Pe[je]=_(H.image[je],!1,!0,i.maxCubemapSize):Pe[je]=Ft?H.image[je].image:H.image[je],Pe[je]=Ye(H,Pe[je]);const rn=Pe[0],zt=x(rn)||a,Tt=s.convert(H.format,H.colorSpace),dt=s.convert(H.type),nt=A(H.internalFormat,Tt,dt,H.colorSpace),_t=a&&H.isVideoTexture!==!0,on=Ce.__version===void 0||Ne===!0;let bn=k(H,rn,zt);te(n.TEXTURE_CUBE_MAP,H,zt);let Bt;if(xt){_t&&on&&t.texStorage2D(n.TEXTURE_CUBE_MAP,bn,nt,rn.width,rn.height);for(let je=0;je<6;je++){Bt=Pe[je].mipmaps;for(let ne=0;ne<Bt.length;ne++){const ke=Bt[ne];H.format!==Xi?Tt!==null?_t?t.compressedTexSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+je,ne,0,0,ke.width,ke.height,Tt,ke.data):t.compressedTexImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+je,ne,nt,ke.width,ke.height,0,ke.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):_t?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+je,ne,0,0,ke.width,ke.height,Tt,dt,ke.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+je,ne,nt,ke.width,ke.height,0,Tt,dt,ke.data)}}}else{Bt=H.mipmaps,_t&&on&&(Bt.length>0&&bn++,t.texStorage2D(n.TEXTURE_CUBE_MAP,bn,nt,Pe[0].width,Pe[0].height));for(let je=0;je<6;je++)if(Ft){_t?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+je,0,0,0,Pe[je].width,Pe[je].height,Tt,dt,Pe[je].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+je,0,nt,Pe[je].width,Pe[je].height,0,Tt,dt,Pe[je].data);for(let ne=0;ne<Bt.length;ne++){const He=Bt[ne].image[je].image;_t?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+je,ne+1,0,0,He.width,He.height,Tt,dt,He.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+je,ne+1,nt,He.width,He.height,0,Tt,dt,He.data)}}else{_t?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+je,0,0,0,Tt,dt,Pe[je]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+je,0,nt,Tt,dt,Pe[je]);for(let ne=0;ne<Bt.length;ne++){const ke=Bt[ne];_t?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+je,ne+1,0,0,Tt,dt,ke.image[je]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+je,ne+1,nt,Tt,dt,ke.image[je])}}}S(H,zt)&&b(n.TEXTURE_CUBE_MAP),Ce.__version=Ae.version,H.onUpdate&&H.onUpdate(H)}G.__version=H.version}function de(G,H,le,Ne,Ae,Ce){const st=s.convert(le.format,le.colorSpace),Ve=s.convert(le.type),Qe=A(le.internalFormat,st,Ve,le.colorSpace);if(!r.get(H).__hasExternalTextures){const Ft=Math.max(1,H.width>>Ce),Pe=Math.max(1,H.height>>Ce);Ae===n.TEXTURE_3D||Ae===n.TEXTURE_2D_ARRAY?t.texImage3D(Ae,Ce,Qe,Ft,Pe,H.depth,0,st,Ve,null):t.texImage2D(Ae,Ce,Qe,Ft,Pe,0,st,Ve,null)}t.bindFramebuffer(n.FRAMEBUFFER,G),xe(H)?l.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Ne,Ae,r.get(le).__webglTexture,0,Le(H)):(Ae===n.TEXTURE_2D||Ae>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&Ae<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,Ne,Ae,r.get(le).__webglTexture,Ce),t.bindFramebuffer(n.FRAMEBUFFER,null)}function Ge(G,H,le){if(n.bindRenderbuffer(n.RENDERBUFFER,G),H.depthBuffer&&!H.stencilBuffer){let Ne=a===!0?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT16;if(le||xe(H)){const Ae=H.depthTexture;Ae&&Ae.isDepthTexture&&(Ae.type===$o?Ne=n.DEPTH_COMPONENT32F:Ae.type===ll&&(Ne=n.DEPTH_COMPONENT24));const Ce=Le(H);xe(H)?l.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Ce,Ne,H.width,H.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,Ce,Ne,H.width,H.height)}else n.renderbufferStorage(n.RENDERBUFFER,Ne,H.width,H.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,G)}else if(H.depthBuffer&&H.stencilBuffer){const Ne=Le(H);le&&xe(H)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,Ne,n.DEPTH24_STENCIL8,H.width,H.height):xe(H)?l.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Ne,n.DEPTH24_STENCIL8,H.width,H.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,H.width,H.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,G)}else{const Ne=H.isWebGLMultipleRenderTargets===!0?H.texture:[H.texture];for(let Ae=0;Ae<Ne.length;Ae++){const Ce=Ne[Ae],st=s.convert(Ce.format,Ce.colorSpace),Ve=s.convert(Ce.type),Qe=A(Ce.internalFormat,st,Ve,Ce.colorSpace),xt=Le(H);le&&xe(H)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,xt,Qe,H.width,H.height):xe(H)?l.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,xt,Qe,H.width,H.height):n.renderbufferStorage(n.RENDERBUFFER,Qe,H.width,H.height)}}n.bindRenderbuffer(n.RENDERBUFFER,null)}
vendor: 4,327 bytes, line 4186
4186function $e(G,H){if(H&&H.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(n.FRAMEBUFFER,G),!(H.depthTexture&&H.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!r.get(H.depthTexture).__webglTexture||H.depthTexture.image.width!==H.width||H.depthTexture.image.height!==H.height)&&(H.depthTexture.image.width=H.width,H.depthTexture.image.height=H.height,H.depthTexture.needsUpdate=!0),J(H.depthTexture,0);const Ne=r.get(H.depthTexture).__webglTexture,Ae=Le(H);if(H.depthTexture.format===Tc)xe(H)?l.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,Ne,0,Ae):n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,Ne,0);else if(H.depthTexture.format===Ed)xe(H)?l.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,Ne,0,Ae):n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,Ne,0);else throw new Error("Unknown depthTexture format")}function De(G){const H=r.get(G),le=G.isWebGLCubeRenderTarget===!0;if(G.depthTexture&&!H.__autoAllocateDepthBuffer){if(le)throw new Error("target.depthTexture not supported in Cube render targets");$e(H.__webglFramebuffer,G)}else if(le){H.__webglDepthbuffer=[];for(let Ne=0;Ne<6;Ne++)t.bindFramebuffer(n.FRAMEBUFFER,H.__webglFramebuffer[Ne]),H.__webglDepthbuffer[Ne]=n.createRenderbuffer(),Ge(H.__webglDepthbuffer[Ne],G,!1)}else t.bindFramebuffer(n.FRAMEBUFFER,H.__webglFramebuffer),H.__webglDepthbuffer=n.createRenderbuffer(),Ge(H.__webglDepthbuffer,G,!1);t.bindFramebuffer(n.FRAMEBUFFER,null)}function Ue(G,H,le){const Ne=r.get(G);H!==void 0&&de(Ne.__webglFramebuffer,G,G.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),le!==void 0&&De(G)}function Q(G){const H=G.texture,le=r.get(G),Ne=r.get(H);G.addEventListener("dispose",P),G.isWebGLMultipleRenderTargets!==!0&&(Ne.__webglTexture===void 0&&(Ne.__webglTexture=n.createTexture()),Ne.__version=H.version,o.memory.textures++);const Ae=G.isWebGLCubeRenderTarget===!0,Ce=G.isWebGLMultipleRenderTargets===!0,st=x(G)||a;if(Ae){le.__webglFramebuffer=[];for(let Ve=0;Ve<6;Ve++)if(a&&H.mipmaps&&H.mipmaps.length>0){le.__webglFramebuffer[Ve]=[];for(let Qe=0;Qe<H.mipmaps.length;Qe++)le.__webglFramebuffer[Ve][Qe]=n.createFramebuffer()}else le.__webglFramebuffer[Ve]=n.createFramebuffer()}else{if(a&&H.mipmaps&&H.mipmaps.length>0){le.__webglFramebuffer=[];for(let Ve=0;Ve<H.mipmaps.length;Ve++)le.__webglFramebuffer[Ve]=n.createFramebuffer()}else le.__webglFramebuffer=n.createFramebuffer();if(Ce)if(i.drawBuffers){const Ve=G.texture;for(let Qe=0,xt=Ve.length;Qe<xt;Qe++){const Ft=r.get(Ve[Qe]);Ft.__webglTexture===void 0&&(Ft.__webglTexture=n.createTexture(),o.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(a&&G.samples>0&&xe(G)===!1){const Ve=Ce?H:[H];le.__webglMultisampledFramebuffer=n.createFramebuffer(),le.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,le.__webglMultisampledFramebuffer);for(let Qe=0;Qe<Ve.length;Qe++){const xt=Ve[Qe];le.__webglColorRenderbuffer[Qe]=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,le.__webglColorRenderbuffer[Qe]);const Ft=s.convert(xt.format,xt.colorSpace),Pe=s.convert(xt.type),rn=A(xt.internalFormat,Ft,Pe,xt.colorSpace,G.isXRRenderTarget===!0),zt=Le(G);n.renderbufferStorageMultisample(n.RENDERBUFFER,zt,rn,G.width,G.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+Qe,n.RENDERBUFFER,le.__webglColorRenderbuffer[Qe])}n.bindRenderbuffer(n.RENDERBUFFER,null),G.depthBuffer&&(le.__webglDepthRenderbuffer=n.createRenderbuffer(),Ge(le.__webglDepthRenderbuffer,G,!0)),t.bindFramebuffer(n.FRAMEBUFFER,null)}}if(Ae){t.bindTexture(n.TEXTURE_CUBE_MAP,Ne.__webglTexture),te(n.TEXTURE_CUBE_MAP,H,st);for(let Ve=0;Ve<6;Ve++)if(a&&H.mipmaps&&H.mipmaps.length>0)for(let Qe=0;Qe<H.mipmaps.length;Qe++)de(le.__webglFramebuffer[Ve][Qe],G,H,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+Ve,Qe);else de(le.__webglFramebuffer[Ve],G,H,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+Ve,0);S(H,st)&&b(n.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Ce){const Ve=G.texture;for(let Qe=0,xt=Ve.length;Qe<xt;Qe++){const Ft=Ve[Qe],Pe=r.get(Ft);
4186t.bindTexture(n.TEXTURE_2D,Pe.__webglTexture),te(n.TEXTURE_2D,Ft,st),de(le.__webglFramebuffer,G,Ft,n.COLOR_ATTACHMENT0+Qe,n.TEXTURE_2D,0),S(Ft,st)&&b(n.TEXTURE_2D)}t.unbindTexture()}else{let Ve=n.TEXTURE_2D;if((G.isWebGL3DRenderTarget||G.isWebGLArrayRenderTarget)&&(a?Ve=G.isWebGL3DRenderTarget?n.TEXTURE_3D:n.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),t.bindTexture(Ve,Ne.__webglTexture),te(Ve,H,st),a&&H.mipmaps&&H.mipmaps.length>0)for(let Qe=0;Qe<H.mipmaps.length;Qe++)de(le.__webglFramebuffer[Qe],G,H,n.COLOR_ATTACHMENT0,Ve,Qe);else de(le.__webglFramebuffer,G,H,n.COLOR_ATTACHMENT0,Ve,0);S(H,st)&&b(Ve),t.unbindTexture()}G.depthBuffer&&De(G)}function be(G){const H=x(G)||a,le=G.isWebGLMultipleRenderTargets===!0?G.texture:[G.texture];for(let Ne=0,Ae=le.length;Ne<Ae;Ne++){const Ce=le[Ne];if(S(Ce,H)){const st=G.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:n.TEXTURE_2D,Ve=r.get(Ce).__webglTexture;t.bindTexture(st,Ve),b(st),t.unbindTexture()}}}function ve(G){if(a&&G.samples>0&&xe(G)===!1){const H=G.isWebGLMultipleRenderTargets?G.texture:[G.texture],le=G.width,Ne=G.height;let Ae=n.COLOR_BUFFER_BIT;const Ce=[],st=G.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Ve=r.get(G),Qe=G.isWebGLMultipleRenderTargets===!0;if(Qe)for(let xt=0;xt<H.length;xt++)t.bindFramebuffer(n.FRAMEBUFFER,Ve.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+xt,n.RENDERBUFFER,null),t.bindFramebuffer(n.FRAMEBUFFER,Ve.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+xt,n.TEXTURE_2D,null,0);t.bindFramebuffer(n.READ_FRAMEBUFFER,Ve.__webglMultisampledFramebuffer),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Ve.__webglFramebuffer);for(let xt=0;xt<H.length;xt++){Ce.push(n.COLOR_ATTACHMENT0+xt),G.depthBuffer&&Ce.push(st);const Ft=Ve.__ignoreDepthValues!==void 0?Ve.__ignoreDepthValues:!1;if(Ft===!1&&(G.depthBuffer&&(Ae|=n.DEPTH_BUFFER_BIT),G.stencilBuffer&&(Ae|=n.STENCIL_BUFFER_BIT)),Qe&&n.framebufferRenderbuffer(n.READ_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,Ve.__webglColorRenderbuffer[xt]),Ft===!0&&(n.invalidateFramebuffer(n.READ_FRAMEBUFFER,[st]),n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,[st])),Qe){const Pe=r.get(H[xt]).__webglTexture;n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,Pe,0)}n.blitFramebuffer(0,0,le,Ne,0,0,le,Ne,Ae,n.NEAREST),c&&n.invalidateFramebuffer(n.READ_FRAMEBUFFER,Ce)}if(t.bindFramebuffer(n.READ_FRAMEBUFFER,null),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),Qe)for(let xt=0;xt<H.length;xt++){t.bindFramebuffer(n.FRAMEBUFFER,Ve.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+xt,n.RENDERBUFFER,Ve.__webglColorRenderbuffer[xt]);const Ft=r.get(H[xt]).__webglTexture;t.bindFramebuffer(n.FRAMEBUFFER,Ve.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+xt,n.TEXTURE_2D,Ft,0)}t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Ve.__webglMultisampledFramebuffer)}}function Le(G){return Math.min(i.maxSamples,G.samples)}function xe(G){const H=r.get(G);return a&&G.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&H.__useRenderToTexture!==!1}function it(G){const H=o.render.frame;u.get(G)!==H&&(u.set(G,H),G.update())}function Ye(G,H){const le=G.colorSpace,Ne=G.format,Ae=G.type;return G.isCompressedTexture===!0||G.isVideoTexture===!0||G.format===M1||le!==Oa&&le!==Vs&&(Pn.getTransfer(le)===On?a===!1?e.has("EXT_sRGB")===!0&&Ne===Xi?(G.format=M1,G.minFilter=Sr,G.generateMipmaps=!1):H=lP.sRGBToLinear(H):(Ne!==Xi||Ae!==Ca)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",le)),H}this.allocateTextureUnit=W,this.resetTextureUnits=B,this.setTexture2D=J,this.setTexture2DArray=ie,this.setTexture3D=j,this.setTextureCube=z,this.rebindTextures=Ue,this.setupRenderTarget=Q,this.updateRenderTargetMipmap=be,this.updateMultisampleRenderTarget=ve,this.setupDepthRenderbuffer=De,this.setupFrameBufferTexture=de,this.useMultisampledRTT=xe}function a8(n,e,t){const r=t.isWebGL2;function i(s,o=Vs){let a;const l=Pn.getTransfer(o);if(s===Ca)return n.UNSIGNED_BYTE;if(s===JR)return n.UNSIGNED_SHORT_4_4_4_4;if(s===ZR)return n.UNSIGNED_SHORT_5_5_5_1;if(s===T6)return n.BYTE;if(s===M6)return n.SHORT;if(s===Dw)return n.UNSIGNED_SHORT;if(s===QR)return n.INT;if(s===ll)return n.UNSIGNED_INT;if(s===$o)return n.FLOAT;if(s===op)return r?n.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===A6)return n.ALPHA;if(s===Xi)return n.RGBA;if(s===C6)return n.LUMINANCE;if(s===R6)return n.LUMINANCE_ALPHA;if(s===Tc)return n.DEPTH_COMPONENT;if(s===Ed)return n.DEPTH_STENCIL;if(s===M1)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===P6)return n.RED;if(s===eP)return n.RED_INTEGER;if(s===N6)return n.RG;if(s===tP)return n.RG_INTEGER;if(s===nP)return n.RGBA_INTEGER;if(s===m_||s===g_||s===y_||s===v_)if(l===On)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===m_)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===g_)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===y_)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===v_)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===m_)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===g_)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===y_)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===v_)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===RA||s===PA||s===NA||s===IA)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===RA)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===PA)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===NA)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===IA)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===rP)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===LA||s===DA)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===LA)return l===On?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===DA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===kA||s===OA||s===FA||s===UA||s===VA||s===jA||s===BA||s===zA||s===HA||s===GA||s===WA||s===$A||s===qA||s===XA)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===kA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===OA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===FA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===UA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===VA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===jA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===BA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===zA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===HA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===GA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===WA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===$A)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===qA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===XA)return l===On?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===x_||s===KA||s===YA)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===x_)return l===On?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(s===KA)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(s===YA)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(s===I6||s===QA||s===JA||s===ZA)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===x_)return a.COMPRESSED_RED_RGT
vendor: 20,163 bytes, line 4186
4186C1_EXT;if(s===QA)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===JA)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===ZA)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===Ec?r?n.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[s]!==void 0?n[s]:null}return{convert:i}}class l8 extends Qr{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}let vf=class extends yn{constructor(){super(),this.isGroup=!0,this.type="Group"}};const ihe={type:"move"};class QE{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new vf,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new vf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new K,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new K),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new vf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new K,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new K),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const r of e.hand.values())this._getHandJoint(t,r)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,r){let i=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const x=t.getJointPose(_,r),y=this._getHandJoint(c,_);x!==null&&(y.matrix.fromArray(x.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,y.jointRadius=x.radius),y.visible=x!==null}const u=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],m=u.position.distanceTo(d.position),g=.02,v=.005;c.inputState.pinching&&m>g+v?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&m<=g-v&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,r),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=t.getPose(e.targetRaySpace,r),i===null&&s!==null&&(i=s),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(ihe)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const r=new vf;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[t.jointName]=r,e.add(r)}return e.joints[t.jointName]}}class she extends Rl{constructor(e,t){super();const r=this;let i=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,d=null,m=null,g=null,v=null;const _=t.getContextAttributes();let x=null,y=null;const S=[],b=[],A=new Te;let k=null;const L=new Qr;L.layers.enable(1),L.viewport=new Nn;const C=new Qr;C.layers.enable(2),C.viewport=new Nn;const P=[L,C],R=new l8;R.layers.enable(1),R.layers.enable(2);let N=null,O=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(te){let ae=S[te];return ae===void 0&&(ae=new QE,S[te]=ae),ae.getTargetRaySpace()},this.getControllerGrip=function(te){let ae=S[te];return ae===void 0&&(ae=new QE,S[te]=ae),ae.getGripSpace()},this.getHand=function(te){let ae=S[te];return ae===void 0&&(ae=new QE,S[te]=ae),ae.getHandSpace()};function V(te){const ae=b.indexOf(te.inputSource);if(ae===-1)return;const we=S[ae];we!==void 0&&(we.update(te.inputSource,te.frame,c||o),we.dispatchEvent({type:te.type,data:te.inputSource}))}function B(){i.removeEventListener("select",V),i.removeEventListener("selectstart",V),i.removeEventListener("selectend",V),i.removeEventListener("squeeze",V),i.removeEventListener("squeezestart",V),i.removeEventListener("squeezeend",V),i.removeEventListener("end",B),i.removeEventListener("inputsourceschange",W);for(let te=0;te<S.length;te++){const ae=b[te];ae!==null&&(b[te]=null,S[te].disconnect(ae))}N=null,O=null,e.setRenderTarget(x),g=null,m=null,d=null,i=null,y=null,re.stop(),r.isPresenting=!1,e.setPixelRatio(k),e.setSize(A.width,A.height,!1),r.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(te){s=te,r.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(te){a=te,r.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(te){c=te},this.getBaseLayer=function(){return m!==null?m:g},this.getBinding=function(){return d},this.getFrame=function(){return v},this.getSession=function(){return i},this.setSession=async function(te){if(i=te,i!==null){if(x=e.getRenderTarget(),i.addEventListener("select",V),i.addEventListener("selectstart",V),i.addEventListener("selectend",V),i.addEventListener("squeeze",V),i.addEventListener("squeezestart",V),i.addEventListener("squeezeend",V),i.addEventListener("end",B),i.addEventListener("inputsourceschange",W),_.xrCompatible!==!0&&await t.makeXRCompatible(),k=e.getPixelRatio(),e.getSize(A),i.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const ae={antialias:i.renderState.layers===void 0?_.antialias:!0,alpha:!0,depth:_.depth,stencil:_.stencil,framebufferScaleFactor:s};g=new XRWebGLLayer(i,t,ae),i.updateRenderState({baseLayer:g}),e.setPixelRatio(1),e.setSize(g.framebufferWidth,g.framebufferHeight,!1),y=new ta(g.framebufferWidth,g.framebufferHeight,{format:Xi,type:Ca,colorSpace:e.outputColorSpace,stencilBuffer:_.stencil})}else{let ae=null,we=null,Re=null;_.depth&&(Re=_.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ae=_.stencil?Ed:Tc,we=_.stencil?Ec:ll);const de={colorFormat:t.RGBA8,depthFormat:Re,scaleFactor:s};d=new XRWebGLBinding(i,t),m=d.createProjectionLayer(de),i.updateRenderState({layers:[m]}),e.setPixelRatio(1),e.setSize(m.textureWidth,m.textureHeight,!1),y=new ta(m.textureWidth,m.textureHeight,{format:Xi,type:Ca,depthTexture:new fP(m.textureWidth,m.textureHeight,we,void 0,void 0,void 0,void 0,void 0,void 0,ae),stencilBuffer:_.stencil,colorSpace:e.outputColorSpace,samples:_.antialias?4:0});const Ge=e.properties.get(y);Ge.__ignoreDepthValues=m.ignoreDepthValues}y.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),re.setContext(i),re.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function W(te){for(let ae=0;ae<te.removed.length;ae++){const we=te.removed[ae],Re=b.indexOf(we);Re>=0&&(b[Re]=null,S[Re].disconnect(we))}for(let ae=0;ae<te.added.length;ae++){const we=te.added[ae];let Re=b.indexOf(we);if(Re===-1){for(let Ge=0;Ge<S.length;Ge++)if(Ge>=b.length){b.push(we),Re=Ge;break}else if(b[Ge]===null){b[Ge]=we,Re=Ge;break}if(Re===-1)break}const de=S[Re];de&&de.connect(we)}}const ee=new K,J=new K;function ie(te,ae,we){ee.setFromMatrixPosition(ae.matrixWorld),J.setFromMatrixPosition(we.matrixWorld);const Re=ee.distanceTo(J),de=ae.projectionMatrix.elements,Ge=we.projectionMatrix.elements,$e=de[14]/(de[10]-1),De=de[14]/(de[10]+1),Ue=(de[9]+1)/de[5],Q=(de[9]-1)/de[5],be=(de[8]-1)/de[0],ve=(Ge[8]+1)/Ge[0],Le=$e*be,xe=$e*ve,it=Re/(-be+ve),Ye=it*-be;ae.matrixWorld.decompose(te.position,te.quaternion,te.scale),te.translateX(Ye),te.translateZ(it),te.matrixWorld.compose(te.position,te.quaternion,te.scale),te.matrixWorldInverse.copy(te.matrixWorld).invert();const G=$e+it,H=De+it,le=Le-Ye,Ne=xe+(Re-Ye),Ae=Ue*De/H*G,Ce=Q*De/H*G;te.projectionMatrix.makePerspective(le,Ne,Ae,Ce,G,H),te.projectionMatrixInverse.copy(te.projectionMatrix).invert()}function j(te,ae){ae===null?te.matrixWorld.copy(te.matrix):te.matrixWorld.multiplyMatrices(ae.matrixWorld,te.matrix),te.matrixWorldInverse.copy(te.matrixWorld).invert()}this.updateCamera=function(te){if(i===null)return;R.near=C.near=L.near=te.near,R.far=C.far=L.far=te.far,(N!==R.near||O!==R.far)&&(i.updateRenderState({depthNear:R.near,depthFar:R.far}),N=R.near,O=R.far);const ae=te.parent,we=R.cameras;j(R,ae);for(let Re=0;Re<we.length;Re++)j(we[Re],ae);we.length===2?ie(R,L,C):R.projectionMatrix.copy(L.projectionMatrix),z(te,R,ae)};function z(te,ae,we){we===null?te.matrix.copy(ae.matrixWorld):(te.matrix.copy(we.matrixWorld),te.matrix.invert(),te.matrix.multiply(ae.matrixWorld)),te.matrix.decompose(te.position,te.quaternion,te.scale),te.updateMatrixWorld(!0),te.projectionMatrix.copy(ae.projectionMatrix),te.projectionMatrixInverse.copy(ae.projectionMatrixInverse),te.isPerspectiveCamera&&(te.fov=lp*2*Math.atan(1/te.projectionMatrix.elements[5]),te.zoom=1)}this.getCamera=function(){return R},this.getFoveation=function(){if(!(m===null&&g===null))return l},this.setFoveation=function(te){l=te,m!==null&&(m.fixedFoveation=te),g!==null&&g.fixedFoveation!==void 0&&(g.fixedFoveation=te)};let q=null;function Z(te,ae){if(u=ae.getViewerPose(c||o),v=ae,u!==null){const we=u.views;g!==null&&(e.setRenderTargetFramebuffer(y,g.framebuffer),e.setRenderTarget(y));let Re=!1;we.length!==R.cameras.length&&(R.cameras.length=0,Re=!0);for(let de=0;de<we.length;de++){const Ge=we[de];let $e=null;if(g!==null)$e=g.getViewport(Ge);else{const Ue=d.getViewSubImage(m,Ge);$e=Ue.viewport,de===0&&(e.setRenderTargetTextures(y,Ue.colorTexture,m.ignoreDepthValues?void 0:Ue.depthStencilTexture),e.setRenderTarget(y))}let De=P[de];De===void 0&&(De=new Qr,De.layers.enable(de),De.viewport=new Nn,P[de]=De),De.matrix.fromArray(Ge.transform.matrix),De.matrix.decompose(De.position,De.quaternion,De.scale),De.projectionMatrix.fromArray(Ge.projectionMatrix),De.projectionMatrixInverse.copy(De.projectionMatrix).invert(),De.viewport.set($e.x,$e.y,$e.width,$e.height),de===0&&(R.matrix.copy(De.matrix),R.matrix.decompose(R.position,R.quaternion,R.scale)),Re===!0&&R.cameras.push(De)}}for(let we=0;we<S.length;we++){const Re=b[we],de=S[we];Re!==null&&de!==void 0&&de.update(Re,ae,c||o)}q&&q(te,ae),ae.detectedPlanes&&r.dispatchEvent({type:"planesdetected",data:ae}),v=null}const re=new t8;re.setAnimationLoop(Z),this.setAnimationLoop=function(te){q=te},this.dispose=function(){}}}function ohe(n,e){function t(x,y){x.matrixAutoUpdate===!0&&x.updateMatrix(),y.value.copy(x.matrix)}function r(x,y){y.color.getRGB(x.fogColor.value,Q6(n)),y.isFog?(x.fogNear.value=y.near,x.fogFar.value=y.far):y.isFogExp2&&(x.fogDensity.value=y.density)}function i(x,y,S,b,A){y.isMeshBasicMaterial||y.isMeshLambertMaterial?s(x,y):y.isMeshToonMaterial?(s(x,y),d(x,y)):y.isMeshPhongMaterial?(s(x,y),u(x,y)):y.isMeshStandardMaterial?(s(x,y),m(x,y),y.isMeshPhysicalMaterial&&g(x,y,A)):y.isMeshMatcapMaterial?(s(x,y),v(x,y)):y.isMeshDepthMaterial?s(x,y):y.isMeshDistanceMaterial?(s(x,y),_(x,y)):y.isMeshNormalMaterial?s(x,y):y.isLineBasicMaterial?(o(x,y),y.isLineDashedMaterial&&a(x,y)):y.isPointsMaterial?l(x,y,S,b):y.isSpriteMaterial?c(x,y):y.isShadowMaterial?(x.color.value.copy(y.color),x.opacity.value=y.opacity):y.isShaderMaterial&&(y.uniformsNeedUpdate=!1)}function s(x,y){x.opacity.value=y.opacity,y.color&&x.diffuse.value.copy(y.color),y.emissive&&x.emissive.value.copy(y.emissive).multiplyScalar(y.emissiveIntensity),y.map&&(x.map.value=y.map,t(y.map,x.mapTransform)),y.alphaMap&&(x.alphaMap.value=y.alphaMap,t(y.alphaMap,x.alphaMapTransform)),y.bumpMap&&(x.bumpMap.value=y.bumpMap,t(y.bumpMap,x.bumpMapTransform),x.bumpScale.value=y.bumpScale,y.side===Zr&&(x.bumpScale.value*=-1)),y.normalMap&&(x.normalMap.value=y.normalMap,t(y.normalMap,x.normalMapTransform),x.normalScale.value.copy(y.normalScale),y.side===Zr&&x.normalScale.value.negate()),y.displacementMap&&(x.displacementMap.value=y.displacementMap,t(y.displacementMap,x.displacementMapTransform),x.displacementScale.value=y.displacementScale,x.displacementBias.value=y.displacementBias),y.emissiveMap&&(x.emissiveMap.value=y.emissiveMap,t(y.emissiveMap,x.emissiveMapTransform)),y.specularMap&&(x.specularMap.value=y.specularMap,t(y.specularMap,x.specularMapTransform)),y.alphaTest>0&&(x.alphaTest.value=y.alphaTest);const S=e.get(y).envMap;if(S&&(x.envMap.value=S,x.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,x.reflectivity.value=y.reflectivity,x.ior.value=y.ior,x.refractionRatio.value=y.refractionRatio),y.lightMap){x.lightMap.value=y.lightMap;const b=n._useLegacyLights===!0?Math.PI:1;x.lightMapIntensity.value=y.lightMapIntensity*b,t(y.lightMap,x.lightMapTransform)}y.aoMap&&(x.aoMap.value=y.aoMap,x.aoMapIntensity.value=y.aoMapIntensity,t(y.aoMap,x.aoMapTransform))}function o(x,y){x.diffuse.value.copy(y.color),x.opacity.value=y.opacity,y.map&&(x.map.value=y.map,t(y.map,x.mapTransform))}function a(x,y){x.dashSize.value=y.dashSize,x.totalSize.value=y.dashSize+y.gapSize,x.scale.value=y.scale}function l(x,y,S,b){x.diffuse.value.copy(y.color),x.opacity.value=y.opacity,x.size.value=y.size*S,x.scale.value=b*.5,y.map&&(x.map.value=y.map,t(y.map,x.uvTransform)),y.alphaMap&&(x.alphaMap.value=y.alphaMap,t(y.alphaMap,x.alphaMapTransform)),y.alphaTest>0&&(x.alphaTest.value=y.alphaTest)}function c(x,y){x.diffuse.value.copy(y.color),x.opacity.value=y.opacity,x.rotation.value=y.rotation,y.map&&(x.map.value=y.map,t(y.map,x.mapTransform)),y.alphaMap&&(x.alphaMap.value=y.alphaMap,t(y.alphaMap,x.alphaMapTransform)),y.alphaTest>0&&(x.alphaTest.value=y.alphaTest)}function u(x,y){x.specular.value.copy(y.specular),x.shininess.value=Math.max(y.shininess,1e-4)}function d(x,y){y.gradientMap&&(x.gradientMap.value=y.gradientMap)}function m(x,y){x.metalness.value=y.metalness,y.metalnessMap&&(x.metalnessMap.value=y.metalnessMap,t(y.metalnessMap,x.metalnessMapTransform)),x.roughness.value=y.roughness,y.roughnessMap&&(x.roughnessMap.value=y.roughnessMap,t(y.roughnessMap,x.roughnessMapTransform)),e.get(y).envMap&&(x.envMapIntensity.value=y.envMapIntensity)}function g(x,y,S){x.ior.value=y.ior,y.sheen>0&&(x.sheenColor.value.copy(y.sheenColor).multiplyScalar(y.sheen),x.sheenRoughness.value=y.sheenRoughness,y.sheenColorMap&&(x.sheenColorMap.value=y.sheenColorMap,t(y.sheenColorMap,x.sheenColorMapTransform)),y.sheenRoughnessMap&&(x.sheenRoughnessMap.value=y.sheenRoughnessMap,t(y.sheenRoughnessMap,x.sheenRoughnessMapTransform))),y.clearcoat>0&&(x.clearcoat.value=y.clearcoat,x.clearcoatRoughness.value=y.clearcoatRoughness,y.clearcoatMap&&(x.clearcoatMap.value=y.clearcoatMap,t(y.clearcoatMap,x.clearcoatMapTransform)),y.clearcoatRoughnessMap&&(x.clearcoatRoughnessMap.value=y.clearcoatRoughnessMap,t(y.clearcoatRoughnessMap,x.clearcoatRoughnessMapTransform)),y.clearcoatNormalMap&&(x.clearcoatNormalMap.value=y.clearcoatNormalMap,t(y.clearcoatNormalMap,x.clearcoatNormalMapTransform),x.clearcoatNormalScale.value.copy(y.clearcoatNormalScale),y.side===Zr&&x.clearcoatNormalScale.value.negate())),y.iridescence>0&&(x.iridescence.value=y.iridescence,x.iridescenceIOR.value=y.iridescenceIOR,x.iridescenceThicknessMinimum.value=y.iridescenceThicknessRange[0],x.iridescenceThicknessMaximum.value=y.iridescenceThicknessRange[1],y.iridescenceMap&&(x.iridescenceMap.value=y.iridescenceMap,t(y.iridescenceMap,x.iridescenceMapTransform)),y.iridescenceThicknessMap&&(x.iridescenceThicknessMap.value=y.iridescenceThicknessMap,t(y.iridescenceThicknessMap,x.iridescenceThicknessMapTransform))),y.transmission>0&&(x.transmission.value=y.transmission,x.transmissionSamplerMap.value=S.texture,x.transmissionSamplerSize.value.set(S.width,S.height),y.transmissionMap&&(x.transmissionMap.value=y.transmissionMap,t(y.transmissionMap,x.transmissionMapTransform)),x.thickness.value=y.thickness,y.thicknessMap&&(x.thicknessMap.value=y.thicknessMap,t(y.thicknessMap,x.thicknessMapTransform)),x.attenuationDistance.value=y.attenuationDistance,x.attenuationColor.value.copy(y.attenuationColor)),y.anisotropy>0&&(x.anisotropyVector.value.set(y.anisotropy*Math.cos(y.anisotropyRotation),y.anisotropy*Math.sin(y.anisotropyRotation)),y.anisotropyMap&&(x.anisotropyMap.value=y.anisotropyMap,t(y.anisotropyMap,x.anisotropyMapTransform))),x.specularIntensity.value=y.specularIntensity,x.specularColor.value.copy(y.specularColor),y.specularColorMap&&(x.specularColorMap.value=y.specularColorMap,t(y.specularColorMap,x.specularColorMapTransform)),y.specularIntensityMap&&(x.specularIntensityMap.value=y.specularIntensityMap,t(y.specularIntensityMap,x.specularIntensityMapTransform))}function v(x,y){y.matcap&&(x.matcap.value=y.matcap)}function _(x,y){const S=e.get(y).light;x.referencePosition.value.setFromMatrixPosition(S.matrixWorld),x.nearDistance.value=S.shadow.camera.near,x.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function ahe(n,e,t,r){let i={},s={},o=[];const a=t.isWebGL2?n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(S,b){const A=b.program;r.uniformBlockBinding(S,A)}function c(S,b){let A=i[S.id];A===void 0&&(v(S),A=u(S),i[S.id]=A,S.addEventListener("dispose",x));const k=b.program;r.updateUBOMapping(S,k);const L=e.render.frame;s[S.id]!==L&&(m(S),s[S.id]=L)}function u(S){const b=d();S.__bindingPointIndex=b;const A=n.createBuffer(),k=S.__size,L=S.usage;return n.bindBuffer(n.UNIFORM_BUFFER,A),n.bufferData(n.UNIFORM_BUFFER,k,L),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,b,A),A}function d(){for(let S=0;S<a;S++)if(o.indexOf(S)===-1)return o.push(S),S;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function m(S){const b=i[S.id],A=S.uniforms,k=S.__cache;n.bindBuffer(n.UNIFORM_BUFFER,b);for(let L=0,C=A.length;L<C;L++){const P=Array.isArray(A[L])?A[L]:[A[L]];for(let R=0,N=P.length;R<N;R++){const O=P[R];if(g(O,L,R,k)===!0){const V=O.__offset,B=Array.isArray(O.value)?O.value:[O.value];let W=0;for(let ee=0;ee<B.length;ee++){const J=B[ee],ie=_(J);typeof J=="number"||typeof J=="boolean"?(O.__data[0]=J,n.bufferSubData(n.UNIFORM_BUFFER,V+W,O.__data)):J.isMatrix3?(O.__data[0]=J.elements[0],O.__data[1]=J.elements[1],O.__data[2]=J.elements[2],O.__data[3]=0,O.__data[4]=J.elements[3],O.__data[5]=J.elements[4],O.__data[6]=J.elements[5],O.__data[7]=0,O.__data[8]=J.elements[6],O.__data[9]=J.elements[7],O.__data[10]=J.elements[8],O.__data[11]=0):(J.toArray(O.__data,W),W+=ie.storage/Float32Array.BYTES_PER_ELEMENT)}n.bufferSubData(n.UNIFORM_BUFFER,V,O.__data)}}}n.bindBuffer(n.UNIFORM_BUFFER,null)}function g(S,b,A,k){const L=S.value,C=b+"_"+A;if(k[C]===void 0)return typeof L=="number"||typeof L=="boolean"?k[C]=L:k[C]=L.clone(),!0;{const P=k[C];if(typeof L=="number"||typeof L=="boolean"){if(P!==L)return k[C]=L,!0}else if(P.equals(L)===!1)return P.copy(L),!0}return!1}function v(S){const b=S.uniforms;let A=0;const k=16;for(let C=0,P=b.length;C<P;C++){const R=Array.isArray(b[C])?b[C]:[b[C]];for(let N=0,O=R.length;N<O;N++){const V=R[N],B=Array.isArray(V.value)?V.value:[V.value];for(let W=0,ee=B.length;W<ee;W++){const J=B[W],ie=_(J),j=A%k;j!==0&&k-j<ie.boundary&&(A+=k-j),V.__data=new Float32Array(ie.storage/Float32Array.BYTES_PER_ELEMENT),V.__offset=A,A+=ie.storage}}}const L=A%k;return L>
41860&&(A+=k-L),S.__size=A,S.__cache={},this}function _(S){const b={boundary:0,storage:0};return typeof S=="number"||typeof S=="boolean"?(b.boundary=4,b.storage=4):S.isVector2?(b.boundary=8,b.storage=8):S.isVector3||S.isColor?(b.boundary=16,b.storage=12):S.isVector4?(b.boundary=16,b.storage=16):S.isMatrix3?(b.boundary=48,b.storage=48):S.isMatrix4?(b.boundary=64,b.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),b}function x(S){const b=S.target;b.removeEventListener("dispose",x);const A=o.indexOf(b.__bindingPointIndex);o.splice(A,1),n.deleteBuffer(i[b.id]),delete i[b.id],delete s[b.id]}function y(){for(const S in i)n.deleteBuffer(i[S]);o=[],i={},s={}}return{bind:l,update:c,dispose:y}}class gP{constructor(e={}){const{canvas:t=X6(),context:r=null,depth:i=!0,stencil:s=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let m;r!==null?m=r.getContextAttributes().alpha:m=o;const g=new Uint32Array(4),v=new Int32Array(4);let _=null,x=null;const y=[],S=[];this.domElement=t,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=Or,this._useLegacyLights=!1,this.toneMapping=Aa,this.toneMappingExposure=1;const b=this;let A=!1,k=0,L=0,C=null,P=-1,R=null;const N=new Nn,O=new Nn;let V=null;const B=new tt(0);let W=0,ee=t.width,J=t.height,ie=1,j=null,z=null;const q=new Nn(0,0,ee,J),Z=new Nn(0,0,ee,J);let re=!1;const te=new ov;let ae=!1,we=!1,Re=null;const de=new kt,Ge=new Te,$e=new K,De={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Ue(){return C===null?ie:1}let Q=r;function be(X,ce){for(let me=0;me<X.length;me++){const ge=X[me],fe=t.getContext(ge,ce);if(fe!==null)return fe}return null}try{const X={alpha:!0,depth:i,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:d};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Np}`),t.addEventListener("webglcontextlost",je,!1),t.addEventListener("webglcontextrestored",ne,!1),t.addEventListener("webglcontextcreationerror",ke,!1),Q===null){const ce=["webgl2","webgl","experimental-webgl"];if(b.isWebGL1Renderer===!0&&ce.shift(),Q=be(ce,X),Q===null)throw be(ce)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}typeof WebGLRenderingContext<"u"&&Q instanceof WebGLRenderingContext&&console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."),Q.getShaderPrecisionFormat===void 0&&(Q.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(X){throw console.error("THREE.WebGLRenderer: "+X.message),X}let ve,Le,xe,it,Ye,G,H,le,Ne,Ae,Ce,st,Ve,Qe,xt,Ft,Pe,rn,zt,Tt,dt,nt,_t,on;function bn(){ve=new wue(Q),Le=new mue(Q,ve,e),ve.init(Le),nt=new a8(Q,ve,Le),xe=new nhe(Q,ve,Le),it=new Eue(Q),Ye=new Gde,G=new rhe(Q,ve,xe,Ye,Le,nt,it),H=new yue(b),le=new _ue(b),Ne=new Iae(Q,Le),_t=new fue(Q,ve,Ne,Le),Ae=new Sue(Q,Ne,it,_t),Ce=new Cue(Q,Ae,Ne,it),zt=new Aue(Q,Le,G),Ft=new gue(Ye),st=new Hde(b,H,le,ve,Le,_t,Ft),Ve=new ohe(b,Ye),Qe=new $de,xt=new Jde(ve,Le),rn=new hue(b,H,le,xe,Ce,m,l),Pe=new the(b,Ce,Le),on=new ahe(Q,it,Le,xe),Tt=new pue(Q,ve,it,Le),dt=new bue(Q,ve,it,Le),it.programs=st.programs,b.capabilities=Le,b.extensions=ve,b.properties=Ye,b.renderLists=Qe,b.shadowMap=Pe,b.state=xe,b.info=it}bn();const Bt=new she(b,Q);this.xr=Bt,this.getContext=function(){return Q},this.getContextAttributes=function(){return Q.getContextAttributes()},this.forceContextLoss=function(){const X=ve.get("WEBGL_lose_context");X&&X.loseContext()},this.forceContextRestore=function(){const X=ve.get("WEBGL_lose_context");X&&X.restoreContext()},this.getPixelRatio=function(){return ie},this.setPixelRatio=function(X){X!==void 0&&(ie=X,this.setSize(ee,J,!1))}
vendor: 4,996 bytes, line 4186
4186,this.getSize=function(X){return X.set(ee,J)},this.setSize=function(X,ce,me=!0){if(Bt.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}ee=X,J=ce,t.width=Math.floor(X*ie),t.height=Math.floor(ce*ie),me===!0&&(t.style.width=X+"px",t.style.height=ce+"px"),this.setViewport(0,0,X,ce)},this.getDrawingBufferSize=function(X){return X.set(ee*ie,J*ie).floor()},this.setDrawingBufferSize=function(X,ce,me){ee=X,J=ce,ie=me,t.width=Math.floor(X*me),t.height=Math.floor(ce*me),this.setViewport(0,0,X,ce)},this.getCurrentViewport=function(X){return X.copy(N)},this.getViewport=function(X){return X.copy(q)},this.setViewport=function(X,ce,me,ge){X.isVector4?q.set(X.x,X.y,X.z,X.w):q.set(X,ce,me,ge),xe.viewport(N.copy(q).multiplyScalar(ie).floor())},this.getScissor=function(X){return X.copy(Z)},this.setScissor=function(X,ce,me,ge){X.isVector4?Z.set(X.x,X.y,X.z,X.w):Z.set(X,ce,me,ge),xe.scissor(O.copy(Z).multiplyScalar(ie).floor())},this.getScissorTest=function(){return re},this.setScissorTest=function(X){xe.setScissorTest(re=X)},this.setOpaqueSort=function(X){j=X},this.setTransparentSort=function(X){z=X},this.getClearColor=function(X){return X.copy(rn.getClearColor())},this.setClearColor=function(){rn.setClearColor.apply(rn,arguments)},this.getClearAlpha=function(){return rn.getClearAlpha()},this.setClearAlpha=function(){rn.setClearAlpha.apply(rn,arguments)},this.clear=function(X=!0,ce=!0,me=!0){let ge=0;if(X){let fe=!1;if(C!==null){const Ze=C.texture.format;fe=Ze===nP||Ze===tP||Ze===eP}if(fe){const Ze=C.texture.type,ht=Ze===Ca||Ze===ll||Ze===Dw||Ze===Ec||Ze===JR||Ze===ZR,yt=rn.getClearColor(),At=rn.getClearAlpha(),Ut=yt.r,Pt=yt.g,Lt=yt.b;ht?(g[0]=Ut,g[1]=Pt,g[2]=Lt,g[3]=At,Q.clearBufferuiv(Q.COLOR,0,g)):(v[0]=Ut,v[1]=Pt,v[2]=Lt,v[3]=At,Q.clearBufferiv(Q.COLOR,0,v))}else ge|=Q.COLOR_BUFFER_BIT}ce&&(ge|=Q.DEPTH_BUFFER_BIT),me&&(ge|=Q.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),Q.clear(ge)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",je,!1),t.removeEventListener("webglcontextrestored",ne,!1),t.removeEventListener("webglcontextcreationerror",ke,!1),Qe.dispose(),xt.dispose(),Ye.dispose(),H.dispose(),le.dispose(),Ce.dispose(),_t.dispose(),on.dispose(),st.dispose(),Bt.dispose(),Bt.removeEventListener("sessionstart",vn),Bt.removeEventListener("sessionend",tn),Re&&(Re.dispose(),Re=null),Mn.stop()};function je(X){X.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),A=!0}function ne(){console.log("THREE.WebGLRenderer: Context Restored."),A=!1;const X=it.autoReset,ce=Pe.enabled,me=Pe.autoUpdate,ge=Pe.needsUpdate,fe=Pe.type;bn(),it.autoReset=X,Pe.enabled=ce,Pe.autoUpdate=me,Pe.needsUpdate=ge,Pe.type=fe}function ke(X){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",X.statusMessage)}function He(X){const ce=X.target;ce.removeEventListener("dispose",He),wt(ce)}function wt(X){Ie(X),Ye.remove(X)}function Ie(X){const ce=Ye.get(X).programs;ce!==void 0&&(ce.forEach(function(me){st.releaseProgram(me)}),X.isShaderMaterial&&st.releaseShaderCache(X))}this.renderBufferDirect=function(X,ce,me,ge,fe,Ze){ce===null&&(ce=De);const ht=fe.isMesh&&fe.matrixWorld.determinant()<0,yt=fu(X,ce,me,ge,fe);xe.setMaterial(ge,ht);let At=me.index,Ut=1;if(ge.wireframe===!0){if(At=Ae.getWireframeAttribute(me),At===void 0)return;Ut=2}const Pt=me.drawRange,Lt=me.attributes.position;let kn=Pt.start*Ut,pr=(Pt.start+Pt.count)*Ut;Ze!==null&&(kn=Math.max(kn,Ze.start*Ut),pr=Math.min(pr,(Ze.start+Ze.count)*Ut)),At!==null?(kn=Math.max(kn,0),pr=Math.min(pr,At.count)):Lt!=null&&(kn=Math.max(kn,0),pr=Math.min(pr,Lt.count));const Rn=pr-kn;if(Rn<0||Rn===1/0)return;_t.setup(fe,ge,yt,me,At);let mr,Ct=Tt;if(At!==null&&(mr=Ne.get(At),Ct=dt,Ct.setIndex(mr)),fe.isMesh)ge.wireframe===!0?(xe.setLineWidth(ge.wireframeLinewidth*Ue()),Ct.setMode(Q.LINES)):Ct.setMode(Q.TRIANGLES);else if(fe.isLine){let ot=ge.linewidth;ot===void 0&&(ot=1),xe.setLineWidth(ot*Ue()),fe.isLineSegments?Ct.setMode(Q.LINES):fe.isLineLoop?Ct.setMode(Q.LINE_LOOP):Ct.setMode(Q.LINE_STRIP)}else fe.isPoints?Ct.setMode(Q.POINTS):fe.isSprite&&Ct.setMode(Q.TRIANGLES);if(fe.isBatchedMesh)Ct.renderMultiDraw(fe._multiDrawStarts,fe._multiDrawCounts,fe._multiDrawCount);else if(fe.isInstancedMesh)Ct.renderInstances(kn,Rn,fe.count);else if(me.isInstancedBufferGeometry){const ot=me._maxInstanceCount!==void 0?me._maxInstanceCount:1/0,ss=Math.min(me.instanceCount,ot);Ct.renderInstances(kn,Rn,ss)}else Ct.render(kn,Rn)};function gt(X,ce,me){X.transparent===!0&&X.side===Us&&X.forceSinglePass===!1?(X.side=Zr,X.needsUpdate=!0,Fi(X,ce,me),X.side=_l,X.needsUpdate=!0,Fi(X,ce,me),X.side=Us):Fi(X,ce,me)}this.compile=function(X,ce,me=null){me===null&&(me=X),x=xt.get(me),x.init(),S.push(x),me.traverseVisible(function(fe){fe.isLight&&fe.layers.test(ce.layers
vendor: 64,738 bytes, line 4186
4186)&&(x.pushLight(fe),fe.castShadow&&x.pushShadow(fe))}),X!==me&&X.traverseVisible(function(fe){fe.isLight&&fe.layers.test(ce.layers)&&(x.pushLight(fe),fe.castShadow&&x.pushShadow(fe))}),x.setupLights(b._useLegacyLights);const ge=new Set;return X.traverse(function(fe){const Ze=fe.material;if(Ze)if(Array.isArray(Ze))for(let ht=0;ht<Ze.length;ht++){const yt=Ze[ht];gt(yt,me,fe),ge.add(yt)}else gt(Ze,me,fe),ge.add(Ze)}),S.pop(),x=null,ge},this.compileAsync=function(X,ce,me=null){const ge=this.compile(X,ce,me);return new Promise(fe=>{function Ze(){if(ge.forEach(function(ht){Ye.get(ht).currentProgram.isReady()&&ge.delete(ht)}),ge.size===0){fe(X);return}setTimeout(Ze,10)}ve.get("KHR_parallel_shader_compile")!==null?Ze():setTimeout(Ze,10)})};let bt=null;function Jt(X){bt&&bt(X)}function vn(){Mn.stop()}function tn(){Mn.start()}const Mn=new t8;Mn.setAnimationLoop(Jt),typeof self<"u"&&Mn.setContext(self),this.setAnimationLoop=function(X){bt=X,Bt.setAnimationLoop(X),X===null?Mn.stop():Mn.start()},Bt.addEventListener("sessionstart",vn),Bt.addEventListener("sessionend",tn),this.render=function(X,ce){if(ce!==void 0&&ce.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(A===!0)return;X.matrixWorldAutoUpdate===!0&&X.updateMatrixWorld(),ce.parent===null&&ce.matrixWorldAutoUpdate===!0&&ce.updateMatrixWorld(),Bt.enabled===!0&&Bt.isPresenting===!0&&(Bt.cameraAutoUpdate===!0&&Bt.updateCamera(ce),ce=Bt.getCamera()),X.isScene===!0&&X.onBeforeRender(b,X,ce,C),x=xt.get(X,S.length),x.init(),S.push(x),de.multiplyMatrices(ce.projectionMatrix,ce.matrixWorldInverse),te.setFromProjectionMatrix(de),we=this.localClippingEnabled,ae=Ft.init(this.clippingPlanes,we),_=Qe.get(X,y.length),_.init(),y.push(_),Ln(X,ce,0,b.sortObjects),_.finish(),b.sortObjects===!0&&_.sort(j,z),this.info.render.frame++,ae===!0&&Ft.beginShadows();const me=x.state.shadowsArray;if(Pe.render(me,X,ce),ae===!0&&Ft.endShadows(),this.info.autoReset===!0&&this.info.reset(),rn.render(_,X),x.setupLights(b._useLegacyLights),ce.isArrayCamera){const ge=ce.cameras;for(let fe=0,Ze=ge.length;fe<Ze;fe++){const ht=ge[fe];ei(_,X,ht,ht.viewport)}}else ei(_,X,ce);C!==null&&(G.updateMultisampleRenderTarget(C),G.updateRenderTargetMipmap(C)),X.isScene===!0&&X.onAfterRender(b,X,ce),_t.resetDefaultState(),P=-1,R=null,S.pop(),S.length>0?x=S[S.length-1]:x=null,y.pop(),y.length>0?_=y[y.length-1]:_=null};function Ln(X,ce,me,ge){if(X.visible===!1)return;if(X.layers.test(ce.layers)){if(X.isGroup)me=X.renderOrder;else if(X.isLOD)X.autoUpdate===!0&&X.update(ce);else if(X.isLight)x.pushLight(X),X.castShadow&&x.pushShadow(X);else if(X.isSprite){if(!X.frustumCulled||te.intersectsSprite(X)){ge&&$e.setFromMatrixPosition(X.matrixWorld).applyMatrix4(de);const ht=Ce.update(X),yt=X.material;yt.visible&&_.push(X,ht,yt,me,$e.z,null)}}else if((X.isMesh||X.isLine||X.isPoints)&&(!X.frustumCulled||te.intersectsObject(X))){const ht=Ce.update(X),yt=X.material;if(ge&&(X.boundingSphere!==void 0?(X.boundingSphere===null&&X.computeBoundingSphere(),$e.copy(X.boundingSphere.center)):(ht.boundingSphere===null&&ht.computeBoundingSphere(),$e.copy(ht.boundingSphere.center)),$e.applyMatrix4(X.matrixWorld).applyMatrix4(de)),Array.isArray(yt)){const At=ht.groups;for(let Ut=0,Pt=At.length;Ut<Pt;Ut++){const Lt=At[Ut],kn=yt[Lt.materialIndex];kn&&kn.visible&&_.push(X,ht,kn,me,$e.z,Lt)}}else yt.visible&&_.push(X,ht,yt,me,$e.z,null)}}const Ze=X.children;for(let ht=0,yt=Ze.length;ht<yt;ht++)Ln(Ze[ht],ce,me,ge)}function ei(X,ce,me,ge){const fe=X.opaque,Ze=X.transmissive,ht=X.transparent;x.setupLightsView(me),ae===!0&&Ft.setGlobalState(b.clippingPlanes,me),Ze.length>0&&ja(fe,Ze,ce,me),ge&&xe.viewport(N.copy(ge)),fe.length>0&&Ks(fe,ce,me),Ze.length>0&&Ks(Ze,ce,me),ht.length>0&&Ks(ht,ce,me),xe.buffers.depth.setTest(!0),xe.buffers.depth.setMask(!0),xe.buffers.color.setMask(!0),xe.setPolygonOffset(!1)}function ja(X,ce,me,ge){if((me.isScene===!0?me.overrideMaterial:null)!==null)return;const Ze=Le.isWebGL2;Re===null&&(Re=new ta(1,1,{generateMipmaps:!0,type:ve.has("EXT_color_buffer_half_float")?op:Ca,minFilter:zc,samples:Ze?4:0})),b.getDrawingBufferSize(Ge),Ze?Re.setSize(Ge.x,Ge.y):Re.setSize(A1(Ge.x),A1(Ge.y));const ht=b.getRenderTarget();b.setRenderTarget(Re),b.getClearColor(B),W=b.getClearAlpha(),W<1&&b.setClearColor(16777215,.5),b.clear();const yt=b.toneMapping;b.toneMapping=Aa,Ks(X,me,ge),G.updateMultisampleRenderTarget(Re),G.updateRenderTargetMipmap(Re);let At=!1;for(let Ut=0,Pt=ce.length;Ut<Pt;Ut++){const Lt=ce[Ut],kn=Lt.object,pr=Lt.geometry,Rn=Lt.material,mr=Lt.group;if(Rn.side===Us&&kn.layers.test(ge.layers)){const Ct=Rn.side;Rn.side=Zr,Rn.needsUpdate=!0,oa(kn,me,ge,pr,Rn,mr),Rn.side=Ct,Rn.needsUpdate=!0,At=!0}}At===!0&&(G.updateMultisampleRenderTarget(Re),G.updateRenderTargetMipmap(Re)),b.setRenderTarget(ht),b.setClearColor(B,W),b.toneMapping=yt}function Ks(X,ce,me){const ge=ce.isScene===!0?ce.overrideMaterial:null;for(let fe=0,Ze=X.length;fe<Ze;fe++){const ht=X[fe],yt=ht.object,At=ht.geometry,Ut=ge===null?ht.material:ge,Pt=ht.group;yt.layers.test(me.layers)&&oa(yt,ce,me,At,Ut,Pt)}}function oa(X,ce,me,ge,fe,Ze){X.onBeforeRender(b,ce,me,ge,fe,Ze),X.modelViewMatrix.multiplyMatrices(me.matrixWorldInverse,X.matrixWorld),X.normalMatrix.getNormalMatrix(X.modelViewMatrix),fe.onBeforeRender(b,ce,me,ge,X,Ze),fe.transparent===!0&&fe.side===Us&&fe.forceSinglePass===!1?(fe.side=Zr,fe.needsUpdate=!0,b.renderBufferDirect(me,ce,ge,fe,X,Ze),fe.side=_l,fe.needsUpdate=!0,b.renderBufferDirect(me,ce,ge,fe,X,Ze),fe.side=Us):b.renderBufferDirect(me,ce,ge,fe,X,Ze),X.onAfterRender(b,ce,me,ge,fe,Ze)}function Fi(X,ce,me){ce.isScene!==!0&&(ce=De);const ge=Ye.get(X),fe=x.state.lights,Ze=x.state.shadowsArray,ht=fe.state.version,yt=st.getParameters(X,fe.state,Ze,ce,me),At=st.getProgramCacheKey(yt);let Ut=ge.programs;ge.environment=X.isMeshStandardMaterial?ce.environment:null,ge.fog=ce.fog,ge.envMap=(X.isMeshStandardMaterial?le:H).get(X.envMap||ge.environment),Ut===void 0&&(X.addEventListener("dispose",He),Ut=new Map,ge.programs=Ut);let Pt=Ut.get(At);if(Pt!==void 0){if(ge.currentProgram===Pt&&ge.lightsStateVersion===ht)return hu(X,yt),Pt}else yt.uniforms=st.getUniforms(X),X.onBuild(me,yt,b),X.onBeforeCompile(yt,b),Pt=st.acquireProgram(yt,At),Ut.set(At,Pt),ge.uniforms=yt.uniforms;const Lt=ge.uniforms;return(!X.isShaderMaterial&&!X.isRawShaderMaterial||X.clipping===!0)&&(Lt.clippingPlanes=Ft.uniform),hu(X,yt),ge.needsLights=Xd(X),ge.lightsStateVersion=ht,ge.needsLights&&(Lt.ambientLightColor.value=fe.state.ambient,Lt.lightProbe.value=fe.state.probe,Lt.directionalLights.value=fe.state.directional,Lt.directionalLightShadows.value=fe.state.directionalShadow,Lt.spotLights.value=fe.state.spot,Lt.spotLightShadows.value=fe.state.spotShadow,Lt.rectAreaLights.value=fe.state.rectArea,Lt.ltc_1.value=fe.state.rectAreaLTC1,Lt.ltc_2.value=fe.state.rectAreaLTC2,Lt.pointLights.value=fe.state.point,Lt.pointLightShadows.value=fe.state.pointShadow,Lt.hemisphereLights.value=fe.state.hemi,Lt.directionalShadowMap.value=fe.state.directionalShadowMap,Lt.directionalShadowMatrix.value=fe.state.directionalShadowMatrix,Lt.spotShadowMap.value=fe.state.spotShadowMap,Lt.spotLightMatrix.value=fe.state.spotLightMatrix,Lt.spotLightMap.value=fe.state.spotLightMap,Lt.pointShadowMap.value=fe.state.pointShadowMap,Lt.pointShadowMatrix.value=fe.state.pointShadowMatrix),ge.currentProgram=Pt,ge.uniformsList=null,Pt}function du(X){if(X.uniformsList===null){const ce=X.currentProgram.getUniforms();X.uniformsList=w_.seqWithValue(ce.seq,X.uniforms)}return X.uniformsList}function hu(X,ce){const me=Ye.get(X);me.outputColorSpace=ce.outputColorSpace,me.batching=ce.batching,me.instancing=ce.instancing,me.instancingColor=ce.instancingColor,me.skinning=ce.skinning,me.morphTargets=ce.morphTargets,me.morphNormals=ce.morphNormals,me.morphColors=ce.morphColors,me.morphTargetsCount=ce.morphTargetsCount,me.numClippingPlanes=ce.numClippingPlanes,me.numIntersection=ce.numClipIntersection,me.vertexAlphas=ce.vertexAlphas,me.vertexTangents=ce.vertexTangents,me.toneMapping=ce.toneMapping}function fu(X,ce,me,ge,fe){ce.isScene!==!0&&(ce=De),G.resetTextureUnits();const Ze=ce.fog,ht=ge.isMeshStandardMaterial?ce.environment:null,yt=C===null?b.outputColorSpace:C.isXRRenderTarget===!0?C.texture.colorSpace:Oa,At=(ge.isMeshStandardMaterial?le:H).get(ge.envMap||ht),Ut=ge.vertexColors===!0&&!!me.attributes.color&&me.attributes.color.itemSize===4,Pt=!!me.attributes.tangent&&(!!ge.normalMap||ge.anisotropy>0),Lt=!!me.morphAttributes.position,kn=!!me.morphAttributes.normal,pr=!!me.morphAttributes.color;let Rn=Aa;ge.toneMapped&&(C===null||C.isXRRenderTarget===!0)&&(Rn=b.toneMapping);const mr=me.morphAttributes.position||me.morphAttributes.normal||me.morphAttributes.color,Ct=mr!==void 0?mr.length:0,ot=Ye.get(ge),ss=x.state.lights;if(ae===!0&&(we===!0||X!==R)){const Qn=X===R&&ge.id===P;Ft.setState(ge,X,Qn)}let Dt=!1;ge.version===ot.__version?(ot.needsLights&&ot.lightsStateVersion!==ss.state.version||ot.outputColorSpace!==yt||fe.isBatchedMesh&&ot.batching===!1||!fe.isBatchedMesh&&ot.batching===!0||fe.isInstancedMesh&&ot.instancing===!1||!fe.isInstancedMesh&&ot.instancing===!0||fe.isSkinnedMesh&&ot.skinning===!1||!fe.isSkinnedMesh&&ot.skinning===!0||fe.isInstancedMesh&&ot.instancingColor===!0&&fe.instanceColor===null||fe.isInstancedMesh&&ot.instancingColor===!1&&fe.instanceColor!==null||ot.envMap!==At||ge.fog===!0&&ot.fog!==Ze||ot.numClippingPlanes!==void 0&&(ot.numClippingPlanes!==Ft.numPlanes||ot.numIntersection!==Ft.numIntersection)||ot.vertexAlphas!==Ut||ot.vertexTangents!==Pt||ot.morphTargets!==Lt||ot.morphNormals!==kn||ot.morphColors!==pr||ot.toneMapping!==Rn||Le.isWebGL2===!0&&ot.morphTargetsCount!==Ct)&&(Dt=!0):(Dt=!0,ot.__version=ge.version);let pn=ot.currentProgram;Dt===!0&&(pn=Fi(ge,ce,fe));let di=!1,Hr=!1,ar=!1;const Vt=pn.getUniforms(),Ui=ot.uniforms;if(xe.useProgram(pn.program)&&(di=!0,Hr=!0,ar=!0),ge.id!==P&&(P=ge.id,Hr=!0),di||R!==X){Vt.setValue(Q,"projectionMatrix",X.projectionMatrix),Vt.setValue(Q,"viewMatrix",X.matrixWorldInverse);const Qn=Vt.map.cameraPosition;Qn!==void 0&&Qn.setValue(Q,$e.setFromMatrixPosition(X.matrixWorld)),Le.logarithmicDepthBuffer&&Vt.setValue(Q,"logDepthBufFC",2/(Math.log(X.far+1)/Math.LN2)),(ge.isMeshPhongMaterial||ge.isMeshToonMaterial||ge.isMeshLambertMaterial||ge.isMeshBasicMaterial||ge.isMeshStandardMaterial||ge.isShaderMaterial)&&Vt.setValue(Q,"isOrthographic",X.isOrthographicCamera===!0),R!==X&&(R=X,Hr=!0,ar=!0)}if(fe.isSkinnedMesh){Vt.setOptional(Q,fe,"bindMatrix"),Vt.setOptional(Q,fe,"bindMatrixInverse");const Qn=fe.skeleton;Qn&&(Le.floatVertexTextures?(Qn.boneTexture===null&&Qn.computeBoneTexture(),Vt.setValue(Q,"boneTexture",Qn.boneTexture,G)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}fe.isBatchedMesh&&(Vt.setOptional(Q,fe,"batchingTexture"),Vt.setValue(Q,"batchingTexture",fe._matricesTexture,G));const Ys=me.morphAttributes;if((Ys.position!==void 0||Ys.normal!==void 0||Ys.color!==void 0&&Le.isWebGL2===!0)&&zt.update(fe,me,pn),(Hr||ot.receiveShadow!==fe.receiveShadow)&&(ot.receiveShadow=fe.receiveShadow,Vt.setValue(Q,"receiveShadow",fe.receiveShadow)),ge.isMeshGouraudMaterial&&ge.envMap!==null&&(Ui.envMap.value=At,Ui.flipEnvMap.value=At.isCubeTexture&&At.isRenderTargetTexture===!1?-1:1),Hr&&(Vt.setValue(Q,"toneMappingExposure",b.toneMappingExposure),ot.needsLights&&pu(Ui,ar),Ze&&ge.fog===!0&&Ve.refreshFogUniforms(Ui,Ze),Ve.refreshMaterialUniforms(Ui,ge,ie,J,Re),w_.upload(Q,du(ot),Ui,G)),ge.isShaderMaterial&&ge.uniformsNeedUpdate===!0&&(w_.upload(Q,du(ot),Ui,G),ge.uniformsNeedUpdate=!1),ge.isSpriteMaterial&&Vt.setValue(Q,"center",fe.center),Vt.setValue(Q,"modelViewMatrix",fe.modelViewMatrix),Vt.setValue(Q,"normalMatrix",fe.normalMatrix),Vt.setValue(Q,"modelMatrix",fe.matrixWorld),ge.isShaderMaterial||ge.isRawShaderMaterial){const Qn=ge.uniformsGroups;for(let Pl=0,hi=Qn.length;Pl<hi;Pl++)if(Le.isWebGL2){const Kd=Qn[Pl];on.update(Kd,pn),on.bind(Kd,pn)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return pn}function pu(X,ce){X.ambientLightColor.needsUpdate=ce,X.lightProbe.needsUpdate=ce,X.directionalLights.needsUpdate=ce,X.directionalLightShadows.needsUpdate=ce,X.pointLights.needsUpdate=ce,X.pointLightShadows.needsUpdate=ce,X.spotLights.needsUpdate=ce,X.spotLightShadows.needsUpdate=ce,X.rectAreaLights.needsUpdate=ce,X.hemisphereLights.needsUpdate=ce}function Xd(X){return X.isMeshLambertMaterial||X.isMeshToonMaterial||X.isMeshPhongMaterial||X.isMeshStandardMaterial||X.isShadowMaterial||X.isShaderMaterial&&X.lights===!0}this.getActiveCubeFace=function(){return k},this.getActiveMipmapLevel=function(){return L},this.getRenderTarget=function(){return C},this.setRenderTargetTextures=function(X,ce,me){Ye.get(X.texture).__webglTexture=ce,Ye.get(X.depthTexture).__webglTexture=me;const ge=Ye.get(X);ge.__hasExternalTextures=!0,ge.__hasExternalTextures&&(ge.__autoAllocateDepthBuffer=me===void 0,ge.__autoAllocateDepthBuffer||ve.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ge.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(X,ce){const me=Ye.get(X);me.__webglFramebuffer=ce,me.__useDefaultFramebuffer=ce===void 0},this.setRenderTarget=function(X,ce=0,me=0){C=X,k=ce,L=me;let ge=!0,fe=null,Ze=!1,ht=!1;if(X){const At=Ye.get(X);At.__useDefaultFramebuffer!==void 0?(xe.bindFramebuffer(Q.FRAMEBUFFER,null),ge=!1):At.__webglFramebuffer===void 0?G.setupRenderTarget(X):At.__hasExternalTextures&&G.rebindTextures(X,Ye.get(X.texture).__webglTexture,Ye.get(X.depthTexture).__webglTexture);const Ut=X.texture;(Ut.isData3DTexture||Ut.isDataArrayTexture||Ut.isCompressedArrayTexture)&&(ht=!0);const Pt=Ye.get(X).__webglFramebuffer;X.isWebGLCubeRenderTarget?(Array.isArray(Pt[ce])?fe=Pt[ce][me]:fe=Pt[ce],Ze=!0):Le.isWebGL2&&X.samples>0&&G.useMultisampledRTT(X)===!1?fe=Ye.get(X).__webglMultisampledFramebuffer:Array.isArray(Pt)?fe=Pt[me]:fe=Pt,N.copy(X.viewport),O.copy(X.scissor),V=X.scissorTest}else N.copy(q).multiplyScalar(ie).floor(),O.copy(Z).multiplyScalar(ie).floor(),V=re;if(xe.bindFramebuffer(Q.FRAMEBUFFER,fe)&&Le.drawBuffers&&ge&&xe.drawBuffers(X,fe),xe.viewport(N),xe.scissor(O),xe.setScissorTest(V),Ze){const At=Ye.get(X.texture);Q.framebufferTexture2D(Q.FRAMEBUFFER,Q.COLOR_ATTACHMENT0,Q.TEXTURE_CUBE_MAP_POSITIVE_X+ce,At.__webglTexture,me)}else if(ht){const At=Ye.get(X.texture),Ut=ce||0;Q.framebufferTextureLayer(Q.FRAMEBUFFER,Q.COLOR_ATTACHMENT0,At.__webglTexture,me||0,Ut)}P=-1},this.readRenderTargetPixels=function(X,ce,me,ge,fe,Ze,ht){if(!(X&&X.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let yt=Ye.get(X).__webglFramebuffer;if(X.isWebGLCubeRenderTarget&&ht!==void 0&&(yt=yt[ht]),yt){xe.bindFramebuffer(Q.FRAMEBUFFER,yt);try{const At=X.texture,Ut=At.format,Pt=At.type;if(Ut!==Xi&&nt.convert(Ut)!==Q.getParameter(Q.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Lt=Pt===op&&(ve.has("EXT_color_buffer_half_float")||Le.isWebGL2&&ve.has("EXT_color_buffer_float"));if(Pt!==Ca&&nt.convert(Pt)!==Q.getParameter(Q.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Pt===$o&&(Le.isWebGL2||ve.has("OES_texture_float")||ve.has("WEBGL_color_buffer_float")))&&!Lt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ce>=0&&ce<=X.width-ge&&me>=0&&me<=X.height-fe&&Q.readPixels(ce,me,ge,fe,nt.convert(Ut),nt.convert(Pt),Ze)}finally{const At=C!==null?Ye.get(C).__webglFramebuffer:null;xe.bindFramebuffer(Q.FRAMEBUFFER,At)}}},this.copyFramebufferToTexture=function(X,ce,me=0){const ge=Math.pow(2,-me),fe=Math.floor(ce.image.width*ge),Ze=Math.floor(ce.image.height*ge);G.setTexture2D(ce,0),Q.copyTexSubImage2D(Q.TEXTURE_2D,me,0,0,X.x,X.y,fe,Ze),xe.unbindTexture()},this.copyTextureToTexture=function(X,ce,me,ge=0){const fe=ce.image.width,Ze=ce.image.height,ht=nt.convert(me.format),yt=nt.convert(me.type);G.setTexture2D(me,0),Q.pixelStorei(Q.UNPACK_FLIP_Y_WEBGL,me.flipY),Q.pixelStorei(Q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,me.premultiplyAlpha),Q.pixelStorei(Q.UNPACK_ALIGNMENT,me.unpackAlignment),ce.isDataTexture?Q.texSubImage2D(Q.TEXTURE_2D,ge,X.x,X.y,fe,Ze,ht,yt,ce.image.data):ce.isCompressedTexture?Q.compressedTexSubImage2D(Q.TEXTURE_2D,ge,X.x,X.y,ce.mipmaps[0].width,ce.mipmaps[0].height,ht,ce.mipmaps[0].data):Q.texSubImage2D(Q.TEXTURE_2D,ge,X.x,X.y,ht,yt,ce.image),ge===0&&me.generateMipmaps&&Q.generateMipmap(Q.TEXTURE_2D),xe.unbindTexture()},this.copyTextureToTexture3D=function(X,ce,me,ge,fe=0){if(b.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Ze=X.max.x-X.min.x+1,ht=X.max.y-X.min.y+1,yt=X.max.z-X.min.z+1,At=nt.convert(ge.format),Ut=nt.convert(ge.type);let Pt;if(ge.isData3DTexture)G.setTexture3D(ge,0),Pt=Q.TEXTURE_3D;else if(ge.isDataArrayTexture||ge.isCompressedArrayTexture)G.setTexture2DArray(ge,0),Pt=Q.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Q.pixelStorei(Q.UNPACK_FLIP_Y_WEBGL,ge.flipY),Q.pixelStorei(Q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ge.premultiplyAlpha),Q.pixelStorei(Q.UNPACK_ALIGNMENT,ge.unpackAlignment);const Lt=Q.getParameter(Q.UNPACK_ROW_LENGTH),kn=Q.getParameter(Q.UNPACK_IMAGE_HEIGHT),pr=Q.getParameter(Q.UNPACK_SKIP_PIXELS),Rn=Q.getParameter(Q.UNPACK_SKIP_ROWS),mr=Q.getParameter(Q.UNPACK_SKIP_IMAGES),Ct=me.isCompressedTexture?me.mipmaps[fe]:me.image;Q.pixelStorei(Q.UNPACK_ROW_LENGTH,Ct.width),Q.pixelStorei(Q.UNPACK_IMAGE_HEIGHT,Ct.height),Q.pixelStorei(Q.UNPACK_SKIP_PIXELS,X.min.x),Q.pixelStorei(Q.UNPACK_SKIP_ROWS,X.min.y),Q.pixelStorei(Q.UNPACK_SKIP_IMAGES,X.min.z),me.isDataTexture||me.isData3DTexture?Q.texSubImage3D(Pt,fe,ce.x,ce.y,ce.z,Ze,ht,yt,At,Ut,Ct.data):me.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Q.compressedTexSubImage3D(Pt,fe,ce.x,ce.y,ce.z,Ze,ht,yt,At,Ct.data)):Q.texSubImage3D(Pt,fe,ce.x,ce.y,ce.z,Ze,ht,yt,At,Ut,Ct),Q.pixelStorei(Q.UNPACK_ROW_LENGTH,Lt),Q.pixelStorei(Q.UNPACK_IMAGE_HEIGHT,kn),Q.pixelStorei(Q.UNPACK_SKIP_PIXELS,pr),Q.pixelStorei(Q.UNPACK_SKIP_ROWS,Rn),Q.pixelStorei(Q.UNPACK_SKIP_IMAGES,mr),fe===0&&ge.generateMipmaps&&Q.generateMipmap(Pt),xe.unbindTexture()},this.initTexture=function(X){X.isCubeTexture?G.setTextureCube(X,0):X.isData3DTexture?G.setTexture3D(X,0):X.isDataArrayTexture||X.isCompressedArrayTexture?G.setTexture2DArray(X,0):G.setTexture2D(X,0),xe.unbindTexture()},this.resetState=function(){k=0,L=0,C=null,xe.reset(),_t.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return qo}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===Ow?"display-p3":"srgb",t.unpackColorSpace=Pn.workingColorSpace===nv?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Or?Mc:sP}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Mc?Or:Oa}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class c8 extends gP{}c8.prototype.isWebGL1Renderer=!0;class Vw{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new tt(e),this.density=t}clone(){return new Vw(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class jw{constructor(e,t=1,r=1e3){this.isFog=!0,this.name="",this.color=new tt(e),this.near=t,this.far=r}clone(){return new jw(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class yP extends yn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class Bw{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=gy,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Gs()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,r){e*=this.stride,r*=t.stride;for(let i=0,s=this.stride;i<s;i++)this.array[e+i]=t.array[r+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Gs()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),r=new this.constructor(t,this.stride);return r.setUsage(this.usage),r}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Gs()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const Hi=new K;class Td{constructor(e,t,r,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=r,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,r=this.data.count;t<r;t++)Hi.fromBufferAttribute(this,t),Hi.applyMatrix4(e),this.setXYZ(t,Hi.x,Hi.y,Hi.z);return this}applyNormalMatrix(e){for(let t=0,r=this.count;t<r;t++)Hi.fromBufferAttribute(this,t),Hi.applyNormalMatrix(e),this.setXYZ(t,Hi.x,Hi.y,Hi.z);return this}transformDirection(e){for(let t=0,r=this.count;t<r;t++)Hi.fromBufferAttribute(this,t),Hi.transformDirection(e),this.setXYZ(t,Hi.x,Hi.y,Hi.z);return this}setX(e,t){return this.normalized&&(t=Qt(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Qt(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Qt(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Qt(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=ms(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=ms(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=ms(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=ms(t,this.array)),t}setXY(e,t,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Qt(t,this.array),r=Qt(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=r,this}setXYZ(e,t,r,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Qt(t,this.array),r=Qt(r,this.array),i=Qt(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=r,this.data.array[e+2]=i,this}setXYZW(e,t,r,i,s){return e=e*this.data.stride+this.offset,this.normalized&&(t=Qt(t,this.array),r=Qt(r,this.array),i=Qt(i,this.array),s=Qt(s,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=r,this.data.array[e+2]=i,this.data.array[e+3]=s,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let r=0;r<this.count;r++){const i=r*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[i+s])}return new an(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Td(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let r=0;r<this.count;r++){const i=r*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[i+s])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class vP extends Oi{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new tt(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let Dh;const Nm=new K,kh=new K,Oh=new K,Fh=new Te,Im=new Te,u8=new kt,hx=new K,Lm=new K,fx=new K,f4=new Te,JE=new Te,p4=new Te;class d8 extends yn{constructor(e=new vP){if(super(),this.isSprite=!0,this.type="Sprite",Dh===void 0){Dh=new Xt;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),r=new Bw(t,5);Dh.setIndex([0,1,2,0,2,3]),Dh.setAttribute("position",new Td(r,3,0,!1)),Dh.setAttribute("uv",new Td(r,2,3,!1))}this.geometry=Dh,this.material=e,this.center=new Te(.5,.5)}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),kh.setFromMatrixScale(this.matrixWorld),u8.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Oh.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&kh.multiplyScalar(-Oh.z);const r=this.material.rotation;let i,s;r!==0&&(s=Math.cos(r),i=Math.sin(r));const o=this.center;px(hx.set(-.5,-.5,0),Oh,o,kh,i,s),px(Lm.set(.5,-.5,0),Oh,o,kh,i,s),px(fx.set(.5,.5,0),Oh,o,kh,i,s),f4.set(0,0),JE.set(1,0),p4.set(1,1);let a=e.ray.intersectTriangle(hx,Lm,fx,!1,Nm);if(a===null&&(px(Lm.set(-.5,.5,0),Oh,o,kh,i,s),JE.set(0,1),a=e.ray.intersectTriangle(hx,fx,Lm,!1,Nm),a===null))return;const l=e.ray.origin.distanceTo(Nm);l<e.near||l>e.far||t.push({distance:l,point:Nm.clone(),uv:ps.getInterpolation(Nm,hx,Lm,fx,f4,JE,p4,new Te),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function px(n,e,t,r,i,s){Fh.subVectors(n,t).addScalar(.5).multiply(r),i!==void 0?(Im.x=s*Fh.x-i*Fh.y,Im.y=i*Fh.x+s*Fh.y):Im.copy(Fh),n.copy(e),n.x+=Im.x,n.y+=Im.y,n.applyMatrix4(u8)}const mx=new K,m4=new K;class h8 extends yn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let r=0,i=t.length;r<i;r++){const s=t[r];this.addLevel(s.object.clone(),s.distance,s.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,r=0){t=Math.abs(t);const i=this.levels;let s;for(s=0;s<i.length&&!(t<i[s].distance);s++);return i.splice(s,0,{distance:t,hysteresis:r,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let r,i;for(r=1,i=t.length;r<i;r++){let s=t[r].distance;if(t[r].object.visible&&(s-=s*t[r].hysteresis),e<s)break}return t[r-1].object}return null}raycast(e,t){if(this.levels.length>0){mx.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(mx);this.getObjectForDistance(i).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){mx.setFromMatrixPosition(e.matrixWorld),m4.setFromMatrixPosition(this.matrixWorld);const r=mx.distanceTo(m4)/e.zoom;t[0].object.visible=!0;let i,s;for(i=1,s=t.length;i<s;i++){let o=t[i].distance;if(t[i].object.visible&&(o-=o*t[i].hysteresis),r>=o)t[i-1].object.visible=!1,t[i].object.visible=!0;else break}for(this._currentLevel=i-1;i<s;i++)t[i].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const r=this.levels;for(let i=0,s=r.length;i<s;i++){const o=r[i];t.object.levels.push({object:o.object.uuid,distance:o.distance,hysteresis:o.hysteresis})}return t}}const g4=new K,y4=new Nn,v4=new Nn,lhe=new K,x4=new kt,gx=new K,ZE=new Di,_4=new kt,eT=new Lp;class f8 extends Ur{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=CA,this.bindMatrix=new kt,this.bindMatrixInverse=new kt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new es),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let r=0;r<t.count;r++)this.getVertexPosition(r,gx),this.boundingBox.expandByPoint(gx)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Di),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let r=0;r<t.count;r++)this.getVertexPosition(r,gx),this.boundingSphere.expandByPoint(gx)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const r=this.material,i=this.matrixWorld;r!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),ZE.copy(this.boundingSphere),ZE.applyMatrix4(i),e.ray.intersectsSphere(ZE)!==!1&&(_4.copy(i).invert(),eT.copy(e.ray).applyMatrix4(_4),!(this.boundingBox!==null&&eT.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,eT)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Nn,t=this.geometry.attributes.skinWeight;for(let r=0,i=t.count;r<i;r++){e.fromBufferAttribute(t,r);const s=1/e.manhattanLength();s!==1/0?e.multiplyScalar(s):e.set(1,0,0,0),t.setXYZW(r,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===CA?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===E6?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const r=this.skeleton,i=this.geometry;y4.fromBufferAttribute(i.attributes.skinIndex,e),v4.fromBufferAttribute(i.attributes.skinWeight,e),g4.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let s=0;s<4;s++){const o=v4.getComponent(s);if(o!==0){const a=y4.getComponent(s);x4.multiplyMatrices(r.bones[a].matrixWorld,r.boneInverses[a]),t.addScaledVector(lhe.copy(g4).applyMatrix4(x4),o)}}return t.applyMatrix4(this.bindMatrixInverse)}boneTransform(e,t){return console.warn("THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151."),this.applyBoneTransform(e,t)}}class xP extends yn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class md extends br{constructor(e=null,t=1,r=1,i,s,o,a,l,c=xr,u=xr,d,m){super(null,o,a,l,c,u,i,s,d,m),this.isDataTexture=!0,this.image={data:e,width:t,height:r},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const w4=new kt,che=new kt;class zw{constructor(e=[],t=[]){this.uuid=Gs(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let r=0,i=this.bones.length;r<i;r++)this.boneInverses.push(new kt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const r=new kt;this.bones[e]&&r.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(r)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const r=this.bones[e];r&&r.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const r=this.bones[e];r&&(r.parent&&r.parent.isBone?(r.matrix.copy(r.parent.matrixWorld).invert(),r.matrix.multiply(r.matrixWorld)):r.matrix.copy(r.matrixWorld),r.matrix.decompose(r.position,r.quaternion,r.scale))}}update(){const e=this.bones,t=this.boneInverses,r=this.boneMatrices,i=this.boneTexture;for(let s=0,o=e.length;s<o;s++){const a=e[s]?e[s].matrixWorld:che;w4.multiplyMatrices(a,t[s]),w4.toArray(r,s*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new zw(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const r=new md(t,e,e,Xi,$o);return r.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=r,this}getBoneByName(e){for(let t=0,r=this.bones.length;t<r;t++){const i=this.bones[t];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let r=0,i=e.bones.length;r<i;r++){const s=e.bones[r];let o=t[s];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",s),o=new xP),this.bones.push(o),this.boneInverses.push(new kt().fromArray(e.boneInverses[r]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,r=this.boneInverses;for(let i=0,s=t.length;i<s;i++){const o=t[i];e.bones.push(o.uuid);const a=r[i];e.boneInverses.push(a.toArray())}return e}}class up extends an{constructor(e,t,r,i=1){super(e,t,r),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const Uh=new kt,S4=new kt,yx=[],b4=new es,uhe=new kt,Dm=new Ur,km=new Di;class p8 extends Ur{constructor(e,t,r){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new up(new Float32Array(r*16),16),this.instanceColor=null,this.count=r,this.boundingBox=null,this.boundingSphere=null;for(let i=0;i<r;i++)this.setMatrixAt(i,uhe)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new es),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let r=0;r<t;r++)this.getMatrixAt(r,Uh),b4.copy(e.boundingBox).applyMatrix4(Uh),this.boundingBox.union(b4)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Di),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let r=0;r<t;r++)this.getMatrixAt(r,Uh),km.copy(e.boundingSphere).applyMatrix4(Uh),this.boundingSphere.union(km)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,e*16)}raycast(e,t){const r=this.matrixWorld,i=this.count;if(Dm.geometry=this.geometry,Dm.material=this.material,Dm.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),km.copy(this.boundingSphere),km.applyMatrix4(r),e.ray.intersectsSphere(km)!==!1))for(let s=0;s<i;s++){this.getMatrixAt(s,Uh),S4.multiplyMatrices(r,Uh),Dm.matrixWorld=S4,Dm.raycast(e,yx);for(let o=0,a=yx.length;o<a;o++){const l=yx[o];l.instanceId=s,l.object=this,t.push(l)}yx.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new up(new Float32Array(this.instanceMatrix.count*3),3)),t.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,e*16)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}function dhe(n,e){return n.z-e.z}function hhe(n,e){return e.z-n.z}class fhe{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t){const r=this.pool,i=this.list;this.index>=r.length&&r.push({start:-1,count:-1,z:-1});const s=r[this.index];i.push(s),this.index++,s.start=e.start,s.count=e.count,s.z=t}reset(){this.list.length=0,this.index=0}}const Vh="batchId",Wl=new kt,E4=new kt,phe=new kt,T4=new kt,tT=new ov,vx=new es,Lu=new Di,Om=new K,nT=new fhe,Ti=new Ur,xx=[];function mhe(n,e,t=0){const r=e.itemSize;if(n.isInterleavedBufferAttribute||n.array.constructor!==e.array.constructor){const i=n.count;for(let s=0;s<i;s++)for(let o=0;o<r;o++)e.setComponent(s+t,o,n.getComponent(s,o))}else e.array.set(n.array,t*r);e.needsUpdate=!0}class m8 extends Ur{get maxGeometryCount(){return this._maxGeometryCount}constructor(e,t,r=t*2,i){super(new Xt,i),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._drawRanges=[],this._reservedRanges=[],this._visibility=[],this._active=[],this._bounds=[],this._maxGeometryCount=e,this._maxVertexCount=t,this._maxIndexCount=r,this._geometryInitialized=!1,this._geometryCount=0,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._visibilityChanged=!0,this._matricesTexture=null,this._initMatricesTexture()}_initMatricesTexture(){let e=Math.sqrt(this._maxGeometryCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4),r=new md(t,e,e,Xi,$o);this._matricesTexture=r}_initializeGeometry(e){const t=this.geometry,r=this._maxVertexCount,i=this._maxGeometryCount,s=this._maxIndexCount;if(this._geometryInitialized===!1){for(const a in e.attributes){const l=e.getAttribute(a),{array:c,itemSize:u,normalized:d}=l,m=new c.constructor(r*u),g=new l.constructor(m,u,d);g.setUsage(l.usage),t.setAttribute(a,g)}if(e.getIndex()!==null){const a=r>65536?new Uint32Array(s):new Uint16Array(s);t.setIndex(new an(a,1))}const o=i>65536?new Uint32Array(r):new Uint16Array(r);t.setAttribute(Vh,new an(o,1)),this._geometryInitialized=!0}}_validateGeometry(e){if(e.getAttribute(Vh))throw new Error(`BatchedMesh: Geometry cannot use attribute "${Vh}"`);const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const r in t.attributes){if(r===Vh)continue;if(!e.hasAttribute(r))throw new Error(`BatchedMesh: Added geometry missing "${r}". All geometries must have consistent attributes.`);const i=e.getAttribute(r),s=t.getAttribute(r);if(i.itemSize!==s.itemSize||i.normalized!==s.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new es);const e=this._geometryCount,t=this.boundingBox,r=this._active;t.makeEmpty();for(let i=0;i<e;i++)r[i]!==!1&&(this.getMatrixAt(i,Wl),this.getBoundingBoxAt(i,vx).applyMatrix4(Wl),t.union(vx))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Di);const e=this._geometryCount,t=this.boundingSphere,r=this._active;t.makeEmpty();for(let i=0;i<e;i++)r[i]!==!1&&(this.getMatrixAt(i,Wl),this.getBoundingSphereAt(i,Lu).applyMatrix4(Wl),t.union(Lu))}addGeometry(e,t=-1,r=-1){if(this._initializeGeometry(e),this._validateGeometry(e),this._geometryCount>=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const i={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let s=null;const o=this._reservedRanges,a=this._drawRanges,l=this._bounds;this._geometryCount!==0&&(s=o[o.length-1]),t===-1?i.vertexCount=e.getAttribute("position").count:i.vertexCount=t,s===null?i.vertexStart=0:i.vertexStart=s.vertexStart+s.vertexCount;const c=e.getIndex(),u=c!==null;if(u&&(r===-1?i.indexCount=c.count:i.indexCount=r,s===null?i.indexStart=0:i.indexStart=s.indexStart+s.indexCount),i.indexStart!==-1&&i.indexStart+i.indexCount>this._maxIndexCount||i.vertexStart+i.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const d=this._visibility,m=this._active,g=this._matricesTexture,v=this._matricesTexture.image.data;d.push(!0),m.push(!0);const _=this._geometryCount;this._geometryCount++,phe.toArray(v,_*16),g.needsUpdate=!0,o.push(i),a.push({start:u?i.indexStart:i.vertexStart,count:-1}),l.push({boxInitialized:!1,box:new es,sphereInitialized:!1,sphere:new Di});const x=this.geometry.getAttribute(Vh);for(let y=0;y<i.vertexCount;y++)x.setX(i.vertexStart+y,_);return x.needsUpdate=!0,this.setGeometryAt(_,e),_}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const r=this.geometry,i=r.getIndex()!==null,s=r.getIndex(),o=t.getIndex(),a=this._reservedRanges[e];if(i&&o.count>a.indexCount||t.attributes.position.count>a.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.vertexCount;for(const g in r.attributes){if(g===Vh)continue;const v=t.getAttribute(g),_=r.getAttribute(g);mhe(v,_,l);const x=v.itemSize;for(let y=v.count,S=c;y<S;y++){const b=l+y;for(let A=0;A<x;A++)_.setComponent(b,A,0)}_.needsUpdate=!0}if(i){const g=a.indexStart;for(let v=0;v<o.count;v++)s.setX(g+v,l+o.getX(v));for(let v=o.count,_=a.indexCount;v<_;v++)s.setX(g+v,l);s.needsUpdate=!0}const u=this._bounds[e];t.boundingBox!==null?(u.box.copy(t.boundingBox),u.boxInitialized=!0):u.boxInitialized=!1,t.boundingSphere!==null?(u.sphere.copy(t.boundingSphere),u.sphereInitialized=!0):u.sphereInitialized=!1;const d=this._drawRanges[e],m=t.getAttribute("position");return d.count=i?o.count:m.count,this._visibilityChanged=!0,e}deleteGeometry(e){const t=this._active;return e>=t.length||t[e]===!1?this:(t[e]=!1,this._visibilityChanged=!0,this)}getBoundingBoxAt(e,t){if(this._active[e]===!1)return this;const i=this._bounds[e],s=i.box,o=this.geometry;if(i.boxInitialized===!1){s.makeEmpty();const a=o.index,l=o.attributes.position,c=this._drawRanges[e];for(let u=c.start,d=c.start+c.count;u<d;u++){let m=u;a&&(m=a.getX(m)),s.expandByPoint(Om.fromBufferAttribute(l,m))}i.boxInitialized=!0}return t.copy(s),t}getBoundingSphereAt(e,t){if(this._active[e]===!1)return this;const i=this._bounds[e],s=i.sphere,o=this.geometry;if(i.sphereInitialized===!1){s.makeEmpty(),this.getBoundingBoxAt(e,vx),vx.getCenter(s.center);const a=o.index,l=o.attributes.position,c=this._drawRanges[e];let u=0;for(let d=c.start,m=c.start+c.count;d<m;d++){let g=d;a&&(g=a.getX(g)),Om.fromBufferAttribute(l,g),u=Math.max(u,s.center.distanceToSquared(Om))}s.radius=Math.sqrt(u),i.sphereInitialized=!0}return t.copy(s),t}setMatrixAt(e,t){const r=this._active,i=this._matricesTexture,s=this._matricesTexture.image.data,o=this._geometryCount;return e>=o||r[e]===!1?this:(t.toArray(s,e*16),i.needsUpdate=!0,this)}getMatrixAt(e,t){const r=this._active,i=this._matricesTexture.image.data,s=this._geometryCount;return e>=s||r[e]===!1?null:t.fromArray(i,e*16)}setVisibleAt(e,t){const r=this._visibility,i=this._active,s=this._geometryCount;return e>=s||i[e]===!1||r[e]===t?this:(r[e]=t,this._visibilityChanged=!0,this)}getVisibleAt(e){const t=this._visibility,r=this._active,i=this._geometryCount;return e>=i||r[e]===!1?!1:t[e]}raycast(e,t){const r=this._visibility,i=this._active,s=this._drawRanges,o=this._geometryCount,a=this.matrixWorld,l=this.geometry;Ti.material=this.material,Ti.geometry.index=l.index,Ti.geometry.attributes=l.attributes,Ti.geometry.boundingBox===null&&(Ti.geometry.boundingBox=new es),Ti.geometry.boundingSphere===null&&(Ti.geometry.boundingSphere=new Di);for(let c=0;c<o;c++){if(!r[c]||!i[c])continue;const u=s[c];Ti.geometry.setDrawRange(u.start,u.count),this.getMatrixAt(c,Ti.matrixWorld).premultiply(a),this.getBoundingBoxAt(c,Ti.geometry.boundingBox),this.getBoundingSphereAt(c,Ti.geometry.boundingSphere),Ti.raycast(e,xx);for(let d=0,m=xx.length;d<m;d++){const g=xx[d];g.object=this,g.batchId=c,t.push(g)}xx.length=0}Ti.material=null,Ti.geometry.index=null,Ti.geometry.attributes={},Ti.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._drawRanges=e._drawRanges.map(t=>({...t})),this._reservedRanges=e._reservedRanges.map(t=>({...t})),this._visibility=e._visibility.slice(),this._active=e._active.slice(),this._bounds=e._bounds.map(t=>({boxInitialized:t.boxInitialized,box:t.box.clone(),sphereInitialized:t.sphereInitialized,sphere:t.sphere.clone()})),this._maxGeometryCount=e._maxGeometryCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(e,t,r,i,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=i.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,l=this._visibility,c=this._multiDrawStarts,u=this._multiDrawCounts,d=this._drawRanges,m=this.perObjectFrustumCulled;m&&(T4.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse).multiply(this.matrixWorld),tT.setFromProjectionMatrix(T4,e.isWebGPURenderer?ap:qo));let g=0;if(this.sortObjects){E4.copy(this.matrixWorld).invert(),Om.setFromMatrixPosition(r.matrixWorld).applyMatrix4(E4);for(let x=0,y=l.length;x<y;x++)if(l[x]){this.getMatrixAt(x,Wl),this.getBoundingSphereAt(x,Lu).applyMatrix4(Wl);let S=!1;if(m&&(S=!tT.intersectsSphere(Lu)),!S){const b=Om.distanceTo(Lu.center);nT.push(d[x],b)}}const v=nT.list,_=this.customSort;_===null?v.sort(s.transparent?hhe:dhe):_.call(this,v,r);for(let x=0,y=v.length;x<y;x++){const S=v[x];c[g]=S.start*a,u[g]=S.count,g++}nT.reset()}else for(let v=0,_=l.length;v<_;v++)if(l[v]){let x=!1;if(m&&(this.getMatrixAt(v,Wl),this.getBoundingSphereAt(v,Lu).applyMatrix4(Wl),x=!tT.intersectsSphere(Lu)),!x){const y=d[v];c[g]=y.start*a,u[g]=y.count,g++}}this._multiDrawCount=g,this._visibilityChanged=!1}onBeforeShadow(e,t,r,i,s,o){this.onBeforeRender(e,null,i,s,o)}}class rs extends Oi{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new tt(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const M4=new K,A4=new K,C4=new kt,rT=new Lp,_x=new Di;class Hc extends yn{constructor(e=new Xt,t=new rs){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,r=[0];for(let i=1,s=t.count;i<s;i++)M4.fromBufferAttribute(t,i-1),A4.fromBufferAttribute(t,i),r[i]=r[i-1],r[i]+=M4.distanceTo(A4);e.setAttribute("lineDistance",new pt(r,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const r=this.geometry,i=this.matrixWorld,s=e.params.Line.threshold,o=r.drawRange;if(r.boundingSphere===null&&r.computeBoundingSphere(),_x.copy(r.boundingSphere),_x.applyMatrix4(i),_x.radius+=s,e.ray.intersectsSphere(_x)===!1)return;C4.copy(i).invert(),rT.copy(e.ray).applyMatrix4(C4);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=new K,u=new K,d=new K,m=new K,g=this.isLineSegments?2:1,v=r.index,x=r.attributes.position;if(v!==null){const y=Math.max(0,o.start),S=Math.min(v.count,o.start+o.count);for(let b=y,A=S-1;b<A;b+=g){const k=v.getX(b),L=v.getX(b+1);if(c.fromBufferAttribute(x,k),u.fromBufferAttribute(x,L),rT.distanceSqToSegment(c,u,m,d)>l)continue;m.applyMatrix4(this.matrixWorld);const P=e.ray.origin.distanceTo(m);P<e.near||P>e.far||t.push({distance:P,point:d.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}else{const y=Math.max(0,o.start),S=Math.min(x.count,o.start+o.count);for(let b=y,A=S-1;b<A;b+=g){if(c.fromBufferAttribute(x,b),u.fromBufferAttribute(x,b+1),rT.distanceSqToSegment(c,u,m,d)>l)continue;m.applyMatrix4(this.matrixWorld);const L=e.ray.origin.distanceTo(m);L<e.near||L>e.far||t.push({distance:L,point:d.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,r=Object.keys(t);if(r.length>0){const i=t[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}}}}}const R4=new K,P4=new K;class Va extends Hc{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,r=[];for(let i=0,s=t.count;i<s;i+=2)R4.fromBufferAttribute(t,i),P4.fromBufferAttribute(t,i+1),r[i]=i===0?0:r[i-1],r[i+1]=r[i]+R4.distanceTo(P4);e.setAttribute("lineDistance",new pt(r,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class g8 extends Hc{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class _P extends Oi{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new tt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const N4=new kt,sC=new Lp,wx=new Di,Sx=new K;class y8 extends yn{constructor(e=new Xt,t=new _P){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const r=this.geometry,i=this.matrixWorld,s=e.params.Points.threshold,o=r.drawRange;if(r.boundingSphere===null&&r.computeBoundingSphere(),wx.copy(r.boundingSphere),wx.applyMatrix4(i),wx.radius+=s,e.ray.intersectsSphere(wx)===!1)return;N4.copy(i).invert(),sC.copy(e.ray).applyMatrix4(N4);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=r.index,d=r.attributes.position;if(c!==null){const m=Math.max(0,o.start),g=Math.min(c.count,o.start+o.count);for(let v=m,_=g;v<_;v++){const x=c.getX(v);Sx.fromBufferAttribute(d,x),I4(Sx,x,l,i,e,t,this)}}else{const m=Math.max(0,o.start),g=Math.min(d.count,o.start+o.count);for(let v=m,_=g;v<_;v++)Sx.fromBufferAttribute(d,v),I4(Sx,v,l,i,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,r=Object.keys(t);if(r.length>0){const i=t[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}}}}}function I4(n,e,t,r,i,s,o){const a=sC.distanceSqToPoint(n);if(a<t){const l=new K;sC.closestPointToPoint(n,l),l.applyMatrix4(r);const c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class ghe extends br{constructor(e,t,r,i,s,o,a,l,c){super(e,t,r,i,s,o,a,l,c),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:Sr,this.magFilter=s!==void 0?s:Sr,this.generateMipmaps=!1;const u=this;function d(){u.needsUpdate=!0,e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(d)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class yhe extends br{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=xr,this.minFilter=xr,this.generateMipmaps=!1,this.needsUpdate=!0}}class Hw extends br{constructor(e,t,r,i,s,o,a,l,c,u,d,m){super(null,o,a,l,c,u,i,s,d,m),this.isCompressedTexture=!0,this.image={width:t,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class vhe extends Hw{constructor(e,t,r,i,s,o){super(e,t,r,s,o),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Ii}}class xhe extends Hw{constructor(e,t,r){super(void 0,e[0].width,e[0].height,t,r,wl),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class _he extends br{constructor(e,t,r,i,s,o,a,l,c){super(e,t,r,i,s,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class ra{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const r=this.getUtoTmapping(e);return this.getPoint(r,t)}getPoints(e=5){const t=[];for(let r=0;r<=e;r++)t.push(this.getPoint(r/e));return t}getSpacedPoints(e=5){const t=[];for(let r=0;r<=e;r++)t.push(this.getPointAt(r/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let r,i=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)r=this.getPoint(o/e),s+=r.distanceTo(i),t.push(s),i=r;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const r=this.getLengths();let i=0;const s=r.length;let o;t?o=t:o=e*r[s-1];let a=0,l=s-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=r[i]-o,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,r[i]===o)return i/(s-1);const u=r[i],m=r[i+1]-u,g=(o-u)/m;return(i+g)/(s-1)}getTangent(e,t){let i=e-1e-4,s=e+1e-4;i<0&&(i=0),s>1&&(s=1);const o=this.getPoint(i),a=this.getPoint(s),l=t||(o.isVector2?new Te:new K);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const r=this.getUtoTmapping(e);return this.getTangent(r,t)}computeFrenetFrames(e,t){const r=new K,i=[],s=[],o=[],a=new K,l=new kt;for(let g=0;g<=e;g++){const v=g/e;i[g]=this.getTangentAt(v,new K)}s[0]=new K,o[0]=new K;let c=Number.MAX_VALUE;const u=Math.abs(i[0].x),d=Math.abs(i[0].y),m=Math.abs(i[0].z);u<=c&&(c=u,r.set(1,0,0)),d<=c&&(c=d,r.set(0,1,0)),m<=c&&r.set(0,0,1),a.crossVectors(i[0],r).normalize(),s[0].crossVectors(i[0],a),o[0].crossVectors(i[0],s[0]);for(let g=1;g<=e;g++){if(s[g]=s[g-1].clone(),o[g]=o[g-1].clone(),a.crossVectors(i[g-1],i[g]),a.length()>Number.EPSILON){a.normalize();const v=Math.acos(fr(i[g-1].dot(i[g]),-1,1));s[g].applyMatrix4(l.makeRotationAxis(a,v))}o[g].crossVectors(i[g],s[g])}if(t===!0){let g=Math.acos(fr(s[0].dot(s[e]),-1,1));g/=e,i[0].dot(a.crossVectors(s[0],s[e]))>0&&(g=-g);for(let v=1;v<=e;v++)s[v].applyMatrix4(l.makeRotationAxis(i[v],g*v)),o[v].crossVectors(i[v],s[v])}return{tangents:i,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Gw extends ra{constructor(e=0,t=0,r=1,i=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=r,this.yRadius=i,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t){const r=t||new Te,i=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)<Number.EPSILON;for(;s<0;)s+=i;for(;s>i;)s-=i;s<Number.EPSILON&&(o?s=0:s=i),this.aClockwise===!0&&!o&&(s===i?s=-i:s=s-i);const a=this.aStartAngle+e*s;let l=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const u=Math.cos(this.aRotation),d=Math.sin(this.aRotation),m=l-this.aX,g=c-this.aY;l=m*u-g*d+this.aX,c=m*d+g*u+this.aY}return r.set(l,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class v8 extends Gw{constructor(e,t,r,i,s,o){super(e,t,r,r,i,s,o),this.isArcCurve=!0,this.type="ArcCurve"}}function wP(){let n=0,e=0,t=0,r=0;function i(s,o,a,l){n=s,e=a,t=-3*s+3*o-2*a-l,r=2*s-2*o+a+l}return{initCatmullRom:function(s,o,a,l,c){i(o,a,c*(a-s),c*(l-o))},initNonuniformCatmullRom:function(s,o,a,l,c,u,d){let m=(o-s)/c-(a-s)/(c+u)+(a-o)/u,g=(a-o)/u-(l-o)/(u+d)+(l-a)/d;m*=u,g*=u,i(o,a,m,g)},calc:function(s){const o=s*s,a=o*s;return n+e*s+t*o+r*a}}}const bx=new K,iT=new wP,sT=new wP,oT=new wP;class x8 extends ra{constructor(e=[],t=!1,r="centripetal",i=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=r,this.tension=i}getPoint(e,t=new K){const r=t,i=this.points,s=i.length,o=(s-(this.closed?0:1))*e;let a=Math.floor(o),l=o-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let c,u;this.closed||a>0?c=i[(a-1)%s]:(bx.subVectors(i[0],i[1]).add(i[0]),c=bx);const d=i[a%s],m=i[(a+1)%s];if(this.closed||a+2<s?u=i[(a+2)%s]:(bx.subVectors(i[s-1],i[s-2]).add(i[s-1]),u=bx),this.curveType==="centripetal"||this.curveType==="chordal"){const g=this.curveType==="chordal"?.5:.25;let v=Math.pow(c.distanceToSquared(d),g),_=Math.pow(d.distanceToSquared(m),g),x=Math.pow(m.distanceToSquared(u),g);_<1e-4&&(_=1),v<1e-4&&(v=_),x<1e-4&&(x=_),iT.initNonuniformCatmullRom(c.x,d.x,m.x,u.x,v,_,x),sT.initNonuniformCatmullRom(c.y,d.y,m.y,u.y,v,_,x),oT.initNonuniformCatmullRom(c.z,d.z,m.z,u.z,v,_,x)}else this.curveType==="catmullrom"&&(iT.initCatmullRom(c.x,d.x,m.x,u.x,this.tension),sT.initCatmullRom(c.y,d.y,m.y,u.y,this.tension),oT.initCatmullRom(c.z,d.z,m.z,u.z,this.tension));return r.set(iT.calc(l),sT.calc(l),oT.calc(l)),r}copy(e){super.copy(e),this.points=[];for(let t=0,r=e.points.length;t<r;t++){const i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,r=this.points.length;t<r;t++){const i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,r=e.points.length;t<r;t++){const i=e.points[t];this.points.push(new K().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function L4(n,e,t,r,i){const s=(r-e)*.5,o=(i-t)*.5,a=n*n,l=n*a;return(2*t-2*r+s+o)*l+(-3*t+3*r-2*s-o)*a+s*n+t}function whe(n,e){const t=1-n;return t*t*e}function She(n,e){return 2*(1-n)*n*e}function bhe(n,e){return n*n*e}function bg(n,e,t,r){return whe(n,e)+She(n,t)+bhe(n,r)}function Ehe(n,e){const t=1-n;return t*t*t*e}function The(n,e){const t=1-n;return 3*t*t*n*e}function Mhe(n,e){return 3*(1-n)*n*n*e}function Ahe(n,e){return n*n*n*e}function Eg(n,e,t,r,i){return Ehe(n,e)+The(n,t)+Mhe(n,r)+Ahe(n,i)}class SP extends ra{constructor(e=new Te,t=new Te,r=new Te,i=new Te){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=r,this.v3=i}getPoint(e,t=new Te){const r=t,i=this.v0,s=this.v1,o=this.v2,a=this.v3;return r.set(Eg(e,i.x,s.x,o.x,a.x),Eg(e,i.y,s.y,o.y,a.y)),r}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class _8 extends ra{constructor(e=new K,t=new K,r=new K,i=new K){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=r,this.v3=i}getPoint(e,t=new K){const r=t,i=this.v0,s=this.v1,o=this.v2,a=this.v3;return r.set(Eg(e,i.x,s.x,o.x,a.x),Eg(e,i.y,s.y,o.y,a.y),Eg(e,i.z,s.z,o.z,a.z)),r}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class bP extends ra{constructor(e=new Te,t=new Te){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Te){const r=t;return e===1?r.copy(this.v2):(r.copy(this.v2).sub(this.v1),r.multiplyScalar(e).add(this.v1)),r}getPointAt(e,t){return this.getPoint(e,t)}
vendor: 4,414 bytes, line 4186
4186getTangent(e,t=new Te){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class w8 extends ra{constructor(e=new K,t=new K){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new K){const r=t;return e===1?r.copy(this.v2):(r.copy(this.v2).sub(this.v1),r.multiplyScalar(e).add(this.v1)),r}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new K){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class EP extends ra{constructor(e=new Te,t=new Te,r=new Te){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=r}getPoint(e,t=new Te){const r=t,i=this.v0,s=this.v1,o=this.v2;return r.set(bg(e,i.x,s.x,o.x),bg(e,i.y,s.y,o.y)),r}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class TP extends ra{constructor(e=new K,t=new K,r=new K){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=r}getPoint(e,t=new K){const r=t,i=this.v0,s=this.v1,o=this.v2;return r.set(bg(e,i.x,s.x,o.x),bg(e,i.y,s.y,o.y),bg(e,i.z,s.z,o.z)),r}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class MP extends ra{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Te){const r=t,i=this.points,s=(i.length-1)*e,o=Math.floor(s),a=s-o,l=i[o===0?o:o-1],c=i[o],u=i[o>i.length-2?i.length-1:o+1],d=i[o>i.length-3?i.length-1:o+2];return r.set(L4(a,l.x,c.x,u.x,d.x),L4(a,l.y,c.y,u.y,d.y)),r}copy(e){super.copy(e),this.points=[];for(let t=0,r=e.points.length;t<r;t++){const i=e.points[t];this.points.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,r=this.points.length;t<r;t++){const i=this.points[t];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,r=e.points.length;t<r;t++){const i=e.points[t];this.points.push(new Te().fromArray(i))}return this}}var C1=Object.freeze({__proto__:null,ArcCurve:v8,CatmullRomCurve3:x8,CubicBezierCurve:SP,CubicBezierCurve3:_8,EllipseCurve:Gw,LineCurve:bP,LineCurve3:w8,QuadraticBezierCurve:EP,QuadraticBezierCurve3:TP,SplineCurve:MP});class S8 extends ra{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){const r=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new C1[r](t,e))}return this}getPoint(e,t){const r=e*this.getLength(),i=this.getCurveLengths();let s=0;for(;s<i.length;){if(i[s]>=r){const o=i[s]-r,a=this.curves[s],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let r=0,i=this.curves.length;r<i;r++)t+=this.curves[r].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let r=0;r<=e;r++)t.push(this.getPoint(r/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let r;for(let i=0,s=this.curves;i<s.length;i++){const o=s[i],a=o.isEllipseCurve?e*2:o.isLineCurve||o.isLineCurve3?1:o.isS
vendor: 6,561 bytes, line 4186
4186plineCurve?e*o.points.length:e,l=o.getPoints(a);for(let c=0;c<l.length;c++){const u=l[c];r&&r.equals(u)||(t.push(u),r=u)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,r=e.curves.length;t<r;t++){const i=e.curves[t];this.curves.push(i.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,r=this.curves.length;t<r;t++){const i=this.curves[t];e.curves.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,r=e.curves.length;t<r;t++){const i=e.curves[t];this.curves.push(new C1[i.type]().fromJSON(i))}return this}}class vy extends S8{constructor(e){super(),this.type="Path",this.currentPoint=new Te,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,r=e.length;t<r;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const r=new bP(this.currentPoint.clone(),new Te(e,t));return this.curves.push(r),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,r,i){const s=new EP(this.currentPoint.clone(),new Te(e,t),new Te(r,i));return this.curves.push(s),this.currentPoint.set(r,i),this}bezierCurveTo(e,t,r,i,s,o){const a=new SP(this.currentPoint.clone(),new Te(e,t),new Te(r,i),new Te(s,o));return this.curves.push(a),this.currentPoint.set(s,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),r=new MP(t);return this.curves.push(r),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,r,i,s,o){const a=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(e+a,t+l,r,i,s,o),this}absarc(e,t,r,i,s,o){return this.absellipse(e,t,r,r,i,s,o),this}ellipse(e,t,r,i,s,o,a,l){const c=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+c,t+u,r,i,s,o,a,l),this}absellipse(e,t,r,i,s,o,a,l){const c=new Gw(e,t,r,i,s,o,a,l);if(this.curves.length>0){const d=c.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class cv extends Xt{constructor(e=[new Te(0,-.5),new Te(.5,0),new Te(0,.5)],t=12,r=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:r,phiLength:i},t=Math.floor(t),i=fr(i,0,Math.PI*2);const s=[],o=[],a=[],l=[],c=[],u=1/t,d=new K,m=new Te,g=new K,v=new K,_=new K;let x=0,y=0;for(let S=0;S<=e.length-1;S++)switch(S){case 0:x=e[S+1].x-e[S].x,y=e[S+1].y-e[S].y,g.x=y*1,g.y=-x,g.z=y*0,_.copy(g),g.normalize(),l.push(g.x,g.y,g.z);break;case e.length-1:l.push(_.x,_.y,_.z);break;default:x=e[S+1].x-e[S].x,y=e[S+1].y-e[S].y,g.x=y*1,g.y=-x,g.z=y*0,v.copy(g),g.x+=_.x,g.y+=_.y,g.z+=_.z,g.normalize(),l.push(g.x,g.y,g.z),_.copy(v)}for(let S=0;S<=t;S++){const b=r+S*u*i,A=Math.sin(b),k=Math.cos(b);for(let L=0;L<=e.length-1;L++){d.x=e[L].x*A,d.y=e[L].y,d.z=e[L].x*k,o.push(d.x,d.y,d.z),m.x=S/t,m.y=L/(e.length-1),a.push(m.x,m.y);const C=l[3*L+0]*A,P=l[3*L+1],R=l[3*L+0]*k;c.push(C,P,R)}}for(let S=0;S<t;S++)for(let b=0;b<e.length-1;b++){const A=b+S*e.length,k=A,L=A+e.length,C=A+e.length+1,P=A+1;s.push(k,L,P),s.push(C,P,L)}this.setIndex(s),this.setAttribute("position",new pt(o,3)),this.setAttribute("uv",new pt(a,2)),this.setAttribute("normal",new pt(c,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new cv(e.points,e.segments,e.phiStart,e.phiLength)}}class Ww extends cv{constructor(e=1,t=1,r=4,i=8){const s=new vy;s.absarc(0,-t/2,e,Math.PI*1.5,0),s.absarc(0,t/2,e,0,Math.PI*.5),super(s.getPoints(r),i),this.type="CapsuleGeometry",this.parameters={radius:e,length:t,capSegments:r,radialSegments:i}}static fromJSON(e){return new Ww(e.radius,e.length,e.capSegments,e.radialSegments)}}class $w extends Xt{constructor(e=1,t=32,r=0,i=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:r,thetaLength:i},t=Math.max(3,t);const s=[],o=[],a=[],l=[],c=new K,u=new Te;o.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let d=0,m=3;d<=t;d++,m+=3){const g=r+d/t*i;c.x=e*Math.cos(g),c.y=e*Math.sin(g),o.push(c.x,c.y,c.z),a.push(0,0,1),u.x=(o[m]/e+1)/2,u.y=(o[m+1]/e+1)/2,l.push(u.x,u.y)}for(let d=1;d<=t;d++)s.push(d,d+1,0);this.setIndex(s),this.setAttribute("position",new pt(o,3)),this.setAttribute("normal",new pt(a,3)),this.setAttribute("uv",new pt(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new $w(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class kp extends Xt{constructor(e=1,t=1,r=1,i=32,s=1,o=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:r,radialSegments:i,heightSegments:s,openEnded:o,thetaStart:a,thetaLength:l};const c=this;i=Math.floor(i),s=Math.floor(s);const u=[],d=[],m=[],g=[];let v=0;const _=[],x=r/2;let y=0;S(),o===!1&&(e>0&&b(!0),t>0&&b(!1)),this.setIndex(u),this.setAttribute("position",new pt(d,3)),this.setAttribute("normal",new pt(m,3)),this.setAttribute("uv",new pt(g,2));function S(){const A=new K,k=new K;let L=0;const C=(t-e)/r;for(let P=0;P<=s;P++){const R=[],N=P/s,O=N*(t-e)+e;for(let V=0;V<=i;V++){const B=V/i,W=B*l+a,ee=Math.sin(W),J=Math.cos(W);k.x=O*ee,k.y=-N*r+x,k.z=O*J,d.push(k.x,k.y,k.z),A.set(ee,C,J).normalize(),m.push(A.x,A.y,A.z),g.push(B,1-N),R.push(v++)}_.push(R)}for(let P=0;P<i;P++)for(let R=0;R<s;R++){const N=_[R][P],O=_[R+1][P],V=_[R+1][P+1],B=_[R][P+1];u.push(N,O,B),u.push(O,V,B),L+=6}c.addGroup(y,L,0),y+=L}function b(A){const k=v,L=new Te,C=new K;let P=0;const R=A===!0?e:t,N=A===!0?1:-1;for(let V=1;V<=i;V++)d.push(0,x*N,0),m.push(0,N,0),g.push(.5,.5),v++;const O=v;for(let V=0;V<=i;V++){const W=V/i*l+a,ee=Math.cos(W),J=Math.sin(W);C.x=R*J,C.y=x*N,C.z=R*ee,d.push(C.x,C.y,C.z),m.push(0,N,0),L.x=ee*.5+.5,L.y=J*.5*N+.5,g.push(L.x,L.y),v++}for(let V=0;V<i;V++){const B=k+V,W=O+V;A===!0?u.push(W,W+1,B):u.push(W+1,W,B),P+=3}c.addGroup(y,P,A===!0?1:2),y+=P}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new kp(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class qw extends kp{constructor(e=1,t=1,r=32,i=1,s=!1,o=0,a=Math.PI*2){super(0,e,t,r,i,s,o,a),this.type="C
4186oneGeometry",this.parameters={radius:e,height:t,radialSegments:r,heightSegments:i,openEnded:s,thetaStart:o,thetaLength:a}}static fromJSON(e){return new qw(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class iu extends Xt{constructor(e=[],t=[],r=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:r,detail:i};const s=[],o=[];a(i),c(r),u(),this.setAttribute("position",new pt(s,3)),this.setAttribute("normal",new pt(s.slice(),3)),this.setAttribute("uv",new pt(o,2)),i===0?this.computeVertexNormals():this.normalizeNormals();function a(S){const b=new K,A=new K,k=new K;for(let L=0;L<t.length;L+=3)g(t[L+0],b),g(t[L+1],A),g(t[L+2],k),l(b,A,k,S)}function l(S,b,A,k){const L=k+1,C=[];for(let P=0;P<=L;P++){C[P]=[];const R=S.clone().lerp(A,P/L),N=b.clone().lerp(A,P/L),O=L-P;for(let V=0;V<=O;V++)V===0&&P===L?C[P][V]=R:C[P][V]=R.clone().lerp(N,V/O)}for(let P=0;P<L;P++)for(let R=0;R<2*(L-P)-1;R++){const N=Math.floor(R/2);R%2===0?(m(C[P][N+1]),m(C[P+1][N]),m(C[P][N])):(m(C[P][N+1]),m(C[P+1][N+1]),m(C[P+1][N]))}}function c(S){const b=new K;for(let A=0;A<s.length;A+=3)b.x=s[A+0],b.y=s[A+1],b.z=s[A+2],b.normalize().multiplyScalar(S),s[A+0]=b.x,s[A+1]=b.y,s[A+2]=b.z}function u(){const S=new K;for(let b=0;b<s.length;b+=3){S.x=s[b+0],S.y=s[b+1],S.z=s[b+2];const A=x(S)/2/Math.PI+.5,k=y(S)/Math.PI+.5;o.push(A,1-k)}v(),d()}function d(){for(let S=0;S<o.length;S+=6){const b=o[S+0],A=o[S+2],k=o[S+4],L=Math.max(b,A,k),C=Math.min(b,A,k);L>.9&&C<.1&&(b<.2&&(o[S+0]+=1),A<.2&&(o[S+2]+=1),k<.2&&(o[S+4]+=1))}}function m(S){s.push(S.x,S.y,S.z)}function g(S,b){const A=S*3;b.x=e[A+0],b.y=e[A+1],b.z=e[A+2]}function v(){const S=new K,b=new K,A=new K,k=new K,L=new Te,C=new Te,P=new Te;for(let R=0,N=0;R<s.length;R+=9,N+=6){S.set(s[R+0],s[R+1],s[R+2]),b.set(s[R+3],s[R+4],s[R+5]),A.set(s[R+6],s[R+7],s[R+8]),L.set(o[N+0],o[N+1]),C.set(o[N+2],o[N+3]),P.set(o[N+4],o[N+5]),k.copy(S).add(b).add(A).divideScalar(3);const O=x(k);_(L,N+0,S,O),_(C,N+2,b,O),_(P,N+4,A,O)}}function _(S,b,A,k){k<0&&S.x===1&&(o[b]=S.x-1),A.x===0&&A.z===0&&(o[b]=k/2/Math.PI+.5)}function x(S){return Math.atan2(S.z,-S.x)}function y(S){return Math.atan2(-S.y,Math.sqrt(S.x*S.x+S.z*S.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new iu(e.vertices,e.indices,e.radius,e.details)}}class Xw extends iu{constructor(e=1,t=0){const r=(1+Math.sqrt(5))/2,i=1/r,s=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-r,0,-i,r,0,i,-r,0,i,r,-i,-r,0,-i,r,0,i,-r,0,i,r,0,-r,0,-i,r,0,-i,-r,0,i,r,0,i],o=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,
vendor: 126,898 bytes, line 4186
418619,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(s,o,e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Xw(e.radius,e.detail)}}const Ex=new K,Tx=new K,aT=new K,Mx=new ps;class b8 extends Xt{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},e!==null){const i=Math.pow(10,4),s=Math.cos(fd*t),o=e.getIndex(),a=e.getAttribute("position"),l=o?o.count:a.count,c=[0,0,0],u=["a","b","c"],d=new Array(3),m={},g=[];for(let v=0;v<l;v+=3){o?(c[0]=o.getX(v),c[1]=o.getX(v+1),c[2]=o.getX(v+2)):(c[0]=v,c[1]=v+1,c[2]=v+2);const{a:_,b:x,c:y}=Mx;if(_.fromBufferAttribute(a,c[0]),x.fromBufferAttribute(a,c[1]),y.fromBufferAttribute(a,c[2]),Mx.getNormal(aT),d[0]=`${Math.round(_.x*i)},${Math.round(_.y*i)},${Math.round(_.z*i)}`,d[1]=`${Math.round(x.x*i)},${Math.round(x.y*i)},${Math.round(x.z*i)}`,d[2]=`${Math.round(y.x*i)},${Math.round(y.y*i)},${Math.round(y.z*i)}`,!(d[0]===d[1]||d[1]===d[2]||d[2]===d[0]))for(let S=0;S<3;S++){const b=(S+1)%3,A=d[S],k=d[b],L=Mx[u[S]],C=Mx[u[b]],P=`${A}_${k}`,R=`${k}_${A}`;R in m&&m[R]?(aT.dot(m[R].normal)<=s&&(g.push(L.x,L.y,L.z),g.push(C.x,C.y,C.z)),m[R]=null):P in m||(m[P]={index0:c[S],index1:c[b],normal:aT.clone()})}}for(const v in m)if(m[v]){const{index0:_,index1:x}=m[v];Ex.fromBufferAttribute(a,_),Tx.fromBufferAttribute(a,x),g.push(Ex.x,Ex.y,Ex.z),g.push(Tx.x,Tx.y,Tx.z)}this.setAttribute("position",new pt(g,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class gd extends vy{constructor(e){super(e),this.uuid=Gs(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let r=0,i=this.holes.length;r<i;r++)t[r]=this.holes[r].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,r=e.holes.length;t<r;t++){const i=e.holes[t];this.holes.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,r=this.holes.length;t<r;t++){const i=this.holes[t];e.holes.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,r=e.holes.length;t<r;t++){const i=e.holes[t];this.holes.push(new vy().fromJSON(i))}return this}}const Che={triangulate:function(n,e,t=2){const r=e&&e.length,i=r?e[0]*t:n.length;let s=E8(n,0,i,t,!0);const o=[];if(!s||s.next===s.prev)return o;let a,l,c,u,d,m,g;if(r&&(s=Lhe(n,e,s,t)),n.length>80*t){a=c=n[0],l=u=n[1];for(let v=t;v<i;v+=t)d=n[v],m=n[v+1],d<a&&(a=d),m<l&&(l=m),d>c&&(c=d),m>u&&(u=m);g=Math.max(c-a,u-l),g=g!==0?32767/g:0}return xy(s,o,t,a,l,g,0),o}};function E8(n,e,t,r,i){let s,o;if(i===Ghe(n,e,t,r)>0)for(s=e;s<t;s+=r)o=D4(s,n[s],n[s+1],o);else for(s=t-r;s>=e;s-=r)o=D4(s,n[s],n[s+1],o);return o&&Kw(o,o.next)&&(wy(o),o=o.next),o}function Md(n,e){if(!n)return n;e||(e=n);let t=n,r;do if(r=!1,!t.steiner&&(Kw(t,t.next)||rr(t.prev,t,t.next)===0)){if(wy(t),t=e=t.prev,t===t.next)break;r=!0}else t=t.next;while(r||t!==e);return e}function xy(n,e,t,r,i,s,o){if(!n)return;!o&&s&&Uhe(n,r,i,s);let a=n,l,c;for(;n.prev!==n.next;){if(l=n.prev,c=n.next,s?Phe(n,r,i,s):Rhe(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(c.i/t|0),wy(n),n=c.next,a=c.next;continue}if(n=c,n===a){o?o===1?(n=Nhe(Md(n),e,t),xy(n,e,t,r,i,s,2)):o===2&&Ihe(n,e,t,r,i,s):xy(Md(n),e,t,r,i,s,1);break}}}function Rhe(n){const e=n.prev,t=n,r=n.next;if(rr(e,t,r)>=0)return!1;const i=e.x,s=t.x,o=r.x,a=e.y,l=t.y,c=r.y,u=i<s?i<o?i:o:s<o?s:o,d=a<l?a<c?a:c:l<c?l:c,m=i>s?i>o?i:o:s>o?s:o,g=a>l?a>c?a:c:l>c?l:c;let v=r.next;for(;v!==e;){if(v.x>=u&&v.x<=m&&v.y>=d&&v.y<=g&&xf(i,a,s,l,o,c,v.x,v.y)&&rr(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function Phe(n,e,t,r){const i=n.prev,s=n,o=n.next;if(rr(i,s,o)>=0)return!1;const a=i.x,l=s.x,c=o.x,u=i.y,d=s.y,m=o.y,g=a<l?a<c?a:c:l<c?l:c,v=u<d?u<m?u:m:d<m?d:m,_=a>l?a>c?a:c:l>c?l:c,x=u>d?u>m?u:m:d>m?d:m,y=oC(g,v,e,t,r),S=oC(_,x,e,t,r);let b=n.prevZ,A=n.nextZ;for(;b&&b.z>=y&&A&&A.z<=S;){if(b.x>=g&&b.x<=_&&b.y>=v&&b.y<=x&&b!==i&&b!==o&&xf(a,u,l,d,c,m,b.x,b.y)&&rr(b.prev,b,b.next)>=0||(b=b.prevZ,A.x>=g&&A.x<=_&&A.y>=v&&A.y<=x&&A!==i&&A!==o&&xf(a,u,l,d,c,m,A.x,A.y)&&rr(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;b&&b.z>=y;){if(b.x>=g&&b.x<=_&&b.y>=v&&b.y<=x&&b!==i&&b!==o&&xf(a,u,l,d,c,m,b.x,b.y)&&rr(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;A&&A.z<=S;){if(A.x>=g&&A.x<=_&&A.y>=v&&A.y<=x&&A!==i&&A!==o&&xf(a,u,l,d,c,m,A.x,A.y)&&rr(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function Nhe(n,e,t){let r=n;do{const i=r.prev,s=r.next.next;!Kw(i,s)&&T8(i,r,r.next,s)&&_y(i,s)&&_y(s,i)&&(e.push(i.i/t|0),e.push(r.i/t|0),e.push(s.i/t|0),wy(r),wy(r.next),r=n=s),r=r.next}while(r!==n);return Md(r)}function Ihe(n,e,t,r,i,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&Bhe(o,a)){let l=M8(o,a);o=Md(o,o.next),l=Md(l,l.next),xy(o,e,t,r,i,s,0),xy(l,e,t,r,i,s,0);return}a=a.next}o=o.next}while(o!==n)}function Lhe(n,e,t,r){const i=[];let s,o,a,l,c;for(s=0,o=e.length;s<o;s++)a=e[s]*r,l=s<o-1?e[s+1]*r:n.length,c=E8(n,a,l,r,!1),c===c.next&&(c.steiner=!0),i.push(jhe(c));for(i.sort(Dhe),s=0;s<i.length;s++)t=khe(i[s],t);return t}function Dhe(n,e){return n.x-e.x}function khe(n,e){const t=Ohe(n,e);if(!t)return e;const r=M8(t,n);return Md(r,r.next),Md(t,t.next)}function Ohe(n,e){let t=e,r=-1/0,i;const s=n.x,o=n.y;do{if(o<=t.y&&o>=t.next.y&&t.next.y!==t.y){const m=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(m<=s&&m>r&&(r=m,i=t.x<t.next.x?t:t.next,m===s))return i}t=t.next}while(t!==e);if(!i)return null;const a=i,l=i.x,c=i.y;let u=1/0,d;t=i;do s>=t.x&&t.x>=l&&s!==t.x&&xf(o<c?s:r,o,l,c,o<c?r:s,o,t.x,t.y)&&(d=Math.abs(o-t.y)/(s-t.x),_y(t,n)&&(d<u||d===u&&(t.x>i.x||t.x===i.x&&Fhe(i,t)))&&(i=t,u=d)),t=t.next;while(t!==a);return i}function Fhe(n,e){return rr(n.prev,n,e.prev)<0&&rr(e.next,n,n.next)<0}function Uhe(n,e,t,r){let i=n;do i.z===0&&(i.z=oC(i.x,i.y,e,t,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==n);i.prevZ.nextZ=null,i.prevZ=null,Vhe(i)}function Vhe(n){let e,t,r,i,s,o,a,l,c=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,r=t,a=0,e=0;e<c&&(a++,r=r.nextZ,!!r);e++);for(l=c;a>0||l>0&&r;)a!==0&&(l===0||!r||t.z<=r.z)?(i=t,t=t.nextZ,a--):(i=r,r=r.nextZ,l--),s?s.nextZ=i:n=i,i.prevZ=s,s=i;t=r}s.nextZ=null,c*=2}while(o>1);return n}function oC(n,e,t,r,i){return n=(n-t)*i|0,e=(e-r)*i|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function jhe(n){let e=n,t=n;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==n);return t}function xf(n,e,t,r,i,s,o,a){return(i-o)*(e-a)>=(n-o)*(s-a)&&(n-o)*(r-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(i-o)*(r-a)}function Bhe(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!zhe(n,e)&&(_y(n,e)&&_y(e,n)&&Hhe(n,e)&&(rr(n.prev,n,e.prev)||rr(n,e.prev,e))||Kw(n,e)&&rr(n.prev,n,n.next)>0&&rr(e.prev,e,e.next)>0)}function rr(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Kw(n,e){return n.x===e.x&&n.y===e.y}function T8(n,e,t,r){const i=Cx(rr(n,e,t)),s=Cx(rr(n,e,r)),o=Cx(rr(t,r,n)),a=Cx(rr(t,r,e));return!!(i!==s&&o!==a||i===0&&Ax(n,t,e)||s===0&&Ax(n,r,e)||o===0&&Ax(t,n,r)||a===0&&Ax(t,e,r))}function Ax(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Cx(n){return n>0?1:n<0?-1:0}function zhe(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&T8(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function _y(n,e){return rr(n.prev,n,n.next)<0?rr(n,e,n.next)>=0&&rr(n,n.prev,e)>=0:rr(n,e,n.prev)<0||rr(n,n.next,e)<0}function Hhe(n,e){let t=n,r=!1;const i=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&i<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(r=!r),t=t.next;while(t!==n);return r}function M8(n,e){const t=new aC(n.i,n.x,n.y),r=new aC(e.i,e.x,e.y),i=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=i,i.prev=t,r.next=t,t.prev=r,s.next=r,r.prev=s,r}function D4(n,e,t,r){const i=new aC(n,e,t);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function wy(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function aC(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ghe(n,e,t,r){let i=0;for(let s=e,o=t-r;s<t;s+=r)i+=(n[o]-n[s])*(n[s+1]+n[o+1]),o=s;return i}class Ra{static area(e){const t=e.length;let r=0;for(let i=t-1,s=0;s<t;i=s++)r+=e[i].x*e[s].y-e[s].x*e[i].y;return r*.5}static isClockWise(e){return Ra.area(e)<0}static triangulateShape(e,t){const r=[],i=[],s=[];k4(e),O4(r,e);let o=e.length;t.forEach(k4);for(let l=0;l<t.length;l++)i.push(o),o+=t[l].length,O4(r,t[l]);const a=Che.triangulate(r,i);for(let l=0;l<a.length;l+=3)s.push(a.slice(l,l+3));return s}}function k4(n){const e=n.length;e>2&&n[e-1].equals(n[0])&&n.pop()}function O4(n,e){for(let t=0;t<e.length;t++)n.push(e[t].x),n.push(e[t].y)}class Yw extends Xt{constructor(e=new gd([new Te(.5,.5),new Te(-.5,.5),new Te(-.5,-.5),new Te(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const r=this,i=[],s=[];for(let a=0,l=e.length;a<l;a++){const c=e[a];o(c)}this.setAttribute("position",new pt(i,3)),this.setAttribute("uv",new pt(s,2)),this.computeVertexNormals();function o(a){const l=[],c=t.curveSegments!==void 0?t.curveSegments:12,u=t.steps!==void 0?t.steps:1,d=t.depth!==void 0?t.depth:1;let m=t.bevelEnabled!==void 0?t.bevelEnabled:!0,g=t.bevelThickness!==void 0?t.bevelThickness:.2,v=t.bevelSize!==void 0?t.bevelSize:g-.1,_=t.bevelOffset!==void 0?t.bevelOffset:0,x=t.bevelSegments!==void 0?t.bevelSegments:3;const y=t.extrudePath,S=t.UVGenerator!==void 0?t.UVGenerator:Whe;let b,A=!1,k,L,C,P;y&&(b=y.getSpacedPoints(u),A=!0,m=!1,k=y.computeFrenetFrames(u,!1),L=new K,C=new K,P=new K),m||(x=0,g=0,v=0,_=0);const R=a.extractPoints(c);let N=R.shape;const O=R.holes;if(!Ra.isClockWise(N)){N=N.reverse();for(let Q=0,be=O.length;Q<be;Q++){const ve=O[Q];Ra.isClockWise(ve)&&(O[Q]=ve.reverse())}}const B=Ra.triangulateShape(N,O),W=N;for(let Q=0,be=O.length;Q<be;Q++){const ve=O[Q];N=N.concat(ve)}function ee(Q,be,ve){return be||console.error("THREE.ExtrudeGeometry: vec does not exist"),Q.clone().addScaledVector(be,ve)}const J=N.length,ie=B.length;function j(Q,be,ve){let Le,xe,it;const Ye=Q.x-be.x,G=Q.y-be.y,H=ve.x-Q.x,le=ve.y-Q.y,Ne=Ye*Ye+G*G,Ae=Ye*le-G*H;if(Math.abs(Ae)>Number.EPSILON){const Ce=Math.sqrt(Ne),st=Math.sqrt(H*H+le*le),Ve=be.x-G/Ce,Qe=be.y+Ye/Ce,xt=ve.x-le/st,Ft=ve.y+H/st,Pe=((xt-Ve)*le-(Ft-Qe)*H)/(Ye*le-G*H);Le=Ve+Ye*Pe-Q.x,xe=Qe+G*Pe-Q.y;const rn=Le*Le+xe*xe;if(rn<=2)return new Te(Le,xe);it=Math.sqrt(rn/2)}else{let Ce=!1;Ye>Number.EPSILON?H>Number.EPSILON&&(Ce=!0):Ye<-Number.EPSILON?H<-Number.EPSILON&&(Ce=!0):Math.sign(G)===Math.sign(le)&&(Ce=!0),Ce?(Le=-G,xe=Ye,it=Math.sqrt(Ne)):(Le=Ye,xe=G,it=Math.sqrt(Ne/2))}return new Te(Le/it,xe/it)}const z=[];for(let Q=0,be=W.length,ve=be-1,Le=Q+1;Q<be;Q++,ve++,Le++)ve===be&&(ve=0),Le===be&&(Le=0),z[Q]=j(W[Q],W[ve],W[Le]);const q=[];let Z,re=z.concat();for(let Q=0,be=O.length;Q<be;Q++){const ve=O[Q];Z=[];for(let Le=0,xe=ve.length,it=xe-1,Ye=Le+1;Le<xe;Le++,it++,Ye++)it===xe&&(it=0),Ye===xe&&(Ye=0),Z[Le]=j(ve[Le],ve[it],ve[Ye]);q.push(Z),re=re.concat(Z)}for(let Q=0;Q<x;Q++){const be=Q/x,ve=g*Math.cos(be*Math.PI/2),Le=v*Math.sin(be*Math.PI/2)+_;for(let xe=0,it=W.length;xe<it;xe++){const Ye=ee(W[xe],z[xe],Le);de(Ye.x,Ye.y,-ve)}for(let xe=0,it=O.length;xe<it;xe++){const Ye=O[xe];Z=q[xe];for(let G=0,H=Ye.length;G<H;G++){const le=ee(Ye[G],Z[G],Le);de(le.x,le.y,-ve)}}}const te=v+_;for(let Q=0;Q<J;Q++){const be=m?ee(N[Q],re[Q],te):N[Q];A?(C.copy(k.normals[0]).multiplyScalar(be.x),L.copy(k.binormals[0]).multiplyScalar(be.y),P.copy(b[0]).add(C).add(L),de(P.x,P.y,P.z)):de(be.x,be.y,0)}for(let Q=1;Q<=u;Q++)for(let be=0;be<J;be++){const ve=m?ee(N[be],re[be],te):N[be];A?(C.copy(k.normals[Q]).multiplyScalar(ve.x),L.copy(k.binormals[Q]).multiplyScalar(ve.y),P.copy(b[Q]).add(C).add(L),de(P.x,P.y,P.z)):de(ve.x,ve.y,d/u*Q)}for(let Q=x-1;Q>=0;Q--){const be=Q/x,ve=g*Math.cos(be*Math.PI/2),Le=v*Math.sin(be*Math.PI/2)+_;for(let xe=0,it=W.length;xe<it;xe++){const Ye=ee(W[xe],z[xe],Le);de(Ye.x,Ye.y,d+ve)}for(let xe=0,it=O.length;xe<it;xe++){const Ye=O[xe];Z=q[xe];for(let G=0,H=Ye.length;G<H;G++){const le=ee(Ye[G],Z[G],Le);A?de(le.x,le.y+b[u-1].y,b[u-1].x+ve):de(le.x,le.y,d+ve)}}}ae(),we();function ae(){const Q=i.length/3;if(m){let be=0,ve=J*be;for(let Le=0;Le<ie;Le++){const xe=B[Le];Ge(xe[2]+ve,xe[1]+ve,xe[0]+ve)}be=u+x*2,ve=J*be;for(let Le=0;Le<ie;Le++){const xe=B[Le];Ge(xe[0]+ve,xe[1]+ve,xe[2]+ve)}}else{for(let be=0;be<ie;be++){const ve=B[be];Ge(ve[2],ve[1],ve[0])}for(let be=0;be<ie;be++){const ve=B[be];Ge(ve[0]+J*u,ve[1]+J*u,ve[2]+J*u)}}r.addGroup(Q,i.length/3-Q,0)}function we(){const Q=i.length/3;let be=0;Re(W,be),be+=W.length;for(let ve=0,Le=O.length;ve<Le;ve++){const xe=O[ve];Re(xe,be),be+=xe.length}r.addGroup(Q,i.length/3-Q,1)}function Re(Q,be){let ve=Q.length;for(;--ve>=0;){const Le=ve;let xe=ve-1;xe<0&&(xe=Q.length-1);for(let it=0,Ye=u+x*2;it<Ye;it++){const G=J*it,H=J*(it+1),le=be+Le+G,Ne=be+xe+G,Ae=be+xe+H,Ce=be+Le+H;$e(le,Ne,Ae,Ce)}}}function de(Q,be,ve){l.push(Q),l.push(be),l.push(ve)}function Ge(Q,be,ve){De(Q),De(be),De(ve);const Le=i.length/3,xe=S.generateTopUV(r,i,Le-3,Le-2,Le-1);Ue(xe[0]),Ue(xe[1]),Ue(xe[2])}function $e(Q,be,ve,Le){De(Q),De(be),De(Le),De(be),De(ve),De(Le);const xe=i.length/3,it=S.generateSideWallUV(r,i,xe-6,xe-3,xe-2,xe-1);Ue(it[0]),Ue(it[1]),Ue(it[3]),Ue(it[1]),Ue(it[2]),Ue(it[3])}function De(Q){i.push(l[Q*3+0]),i.push(l[Q*3+1]),i.push(l[Q*3+2])}function Ue(Q){s.push(Q.x),s.push(Q.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,r=this.parameters.options;return $he(t,r,e)}static fromJSON(e,t){const r=[];for(let s=0,o=e.shapes.length;s<o;s++){const a=t[e.shapes[s]];r.push(a)}const i=e.options.extrudePath;return i!==void 0&&(e.options.extrudePath=new C1[i.type]().fromJSON(i)),new Yw(r,e.options)}}const Whe={generateTopUV:function(n,e,t,r,i){const s=e[t*3],o=e[t*3+1],a=e[r*3],l=e[r*3+1],c=e[i*3],u=e[i*3+1];return[new Te(s,o),new Te(a,l),new Te(c,u)]},generateSideWallUV:function(n,e,t,r,i,s){const o=e[t*3],a=e[t*3+1],l=e[t*3+2],c=e[r*3],u=e[r*3+1],d=e[r*3+2],m=e[i*3],g=e[i*3+1],v=e[i*3+2],_=e[s*3],x=e[s*3+1],y=e[s*3+2];return Math.abs(a-u)<Math.abs(o-c)?[new Te(o,1-l),new Te(c,1-d),new Te(m,1-v),new Te(_,1-y)]:[new Te(a,1-l),new Te(u,1-d),new Te(g,1-v),new Te(x,1-y)]}};function $he(n,e,t){if(t.shapes=[],Array.isArray(n))for(let r=0,i=n.length;r<i;r++){const s=n[r];t.shapes.push(s.uuid)}else t.shapes.push(n.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class Qw extends iu{constructor(e=1,t=0){const r=(1+Math.sqrt(5))/2,i=[-1,r,0,1,r,0,-1,-r,0,1,-r,0,0,-1,r,0,1,r,0,-1,-r,0,1,-r,r,0,-1,r,0,1,-r,0,-1,-r,0,1],s=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(i,s,e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Qw(e.radius,e.detail)}}class uv extends iu{constructor(e=1,t=0){const r=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],i=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(r,i,e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new uv(e.radius,e.detail)}}class Jw extends Xt{constructor(e=.5,t=1,r=32,i=1,s=0,o=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:r,phiSegments:i,thetaStart:s,thetaLength:o},r=Math.max(3,r),i=Math.max(1,i);const a=[],l=[],c=[],u=[];let d=e;const m=(t-e)/i,g=new K,v=new Te;for(let _=0;_<=i;_++){for(let x=0;x<=r;x++){const y=s+x/r*o;g.x=d*Math.cos(y),g.y=d*Math.sin(y),l.push(g.x,g.y,g.z),c.push(0,0,1),v.x=(g.x/t+1)/2,v.y=(g.y/t+1)/2,u.push(v.x,v.y)}d+=m}for(let _=0;_<i;_++){const x=_*(r+1);for(let y=0;y<r;y++){const S=y+x,b=S,A=S+r+1,k=S+r+2,L=S+1;a.push(b,A,L),a.push(A,k,L)}}this.setIndex(a),this.setAttribute("position",new pt(l,3)),this.setAttribute("normal",new pt(c,3)),this.setAttribute("uv",new pt(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Jw(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Zw extends Xt{constructor(e=new gd([new Te(0,.5),new Te(-.5,-.5),new Te(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const r=[],i=[],s=[],o=[];let a=0,l=0;if(Array.isArray(e)===!1)c(e);else for(let u=0;u<e.length;u++)c(e[u]),this.addGroup(a,l,u),a+=l,l=0;this.setIndex(r),this.setAttribute("position",new pt(i,3)),this.setAttribute("normal",new pt(s,3)),this.setAttribute("uv",new pt(o,2));function c(u){const d=i.length/3,m=u.extractPoints(t);let g=m.shape;const v=m.holes;Ra.isClockWise(g)===!1&&(g=g.reverse());for(let x=0,y=v.length;x<y;x++){const S=v[x];Ra.isClockWise(S)===!0&&(v[x]=S.reverse())}const _=Ra.triangulateShape(g,v);for(let x=0,y=v.length;x<y;x++){const S=v[x];g=g.concat(S)}for(let x=0,y=g.length;x<y;x++){const S=g[x];i.push(S.x,S.y,0),s.push(0,0,1),o.push(S.x,S.y)}for(let x=0,y=_.length;x<y;x++){const S=_[x],b=S[0]+d,A=S[1]+d,k=S[2]+d;r.push(b,A,k),l+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes;return qhe(t,e)}static fromJSON(e,t){const r=[];for(let i=0,s=e.shapes.length;i<s;i++){const o=t[e.shapes[i]];r.push(o)}return new Zw(r,e.curveSegments)}}function qhe(n,e){if(e.shapes=[],Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const i=n[t];e.shapes.push(i.uuid)}else e.shapes.push(n.uuid);return e}class dv extends Xt{constructor(e=1,t=32,r=16,i=0,s=Math.PI*2,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:r,phiStart:i,phiLength:s,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),r=Math.max(2,Math.floor(r));const l=Math.min(o+a,Math.PI);let c=0;const u=[],d=new K,m=new K,g=[],v=[],_=[],x=[];for(let y=0;y<=r;y++){const S=[],b=y/r;let A=0;y===0&&o===0?A=.5/t:y===r&&l===Math.PI&&(A=-.5/t);for(let k=0;k<=t;k++){const L=k/t;d.x=-e*Math.cos(i+L*s)*Math.sin(o+b*a),d.y=e*Math.cos(o+b*a),d.z=e*Math.sin(i+L*s)*Math.sin(o+b*a),v.push(d.x,d.y,d.z),m.copy(d).normalize(),_.push(m.x,m.y,m.z),x.push(L+A,1-b),S.push(c++)}u.push(S)}for(let y=0;y<r;y++)for(let S=0;S<t;S++){const b=u[y][S+1],A=u[y][S],k=u[y+1][S],L=u[y+1][S+1];(y!==0||o>0)&&g.push(b,A,L),(y!==r-1||l<Math.PI)&&g.push(A,k,L)}this.setIndex(g),this.setAttribute("position",new pt(v,3)),this.setAttribute("normal",new pt(_,3)),this.setAttribute("uv",new pt(x,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new dv(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class eS extends iu{constructor(e=1,t=0){const r=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],i=[2,1,0,0,3,2,1,3,0,2,3,1];super(r,i,e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new eS(e.radius,e.detail)}}class tS extends Xt{constructor(e=1,t=.4,r=12,i=48,s=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:r,tubularSegments:i,arc:s},r=Math.floor(r),i=Math.floor(i);const o=[],a=[],l=[],c=[],u=new K,d=new K,m=new K;for(let g=0;g<=r;g++)for(let v=0;v<=i;v++){const _=v/i*s,x=g/r*Math.PI*2;d.x=(e+t*Math.cos(x))*Math.cos(_),d.y=(e+t*Math.cos(x))*Math.sin(_),d.z=t*Math.sin(x),a.push(d.x,d.y,d.z),u.x=e*Math.cos(_),u.y=e*Math.sin(_),m.subVectors(d,u).normalize(),l.push(m.x,m.y,m.z),c.push(v/i),c.push(g/r)}for(let g=1;g<=r;g++)for(let v=1;v<=i;v++){const _=(i+1)*g+v-1,x=(i+1)*(g-1)+v-1,y=(i+1)*(g-1)+v,S=(i+1)*g+v;o.push(_,x,S),o.push(x,y,S)}this.setIndex(o),this.setAttribute("position",new pt(a,3)),this.setAttribute("normal",new pt(l,3)),this.setAttribute("uv",new pt(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new tS(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class nS extends Xt{constructor(e=1,t=.4,r=64,i=8,s=2,o=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:r,radialSegments:i,p:s,q:o},r=Math.floor(r),i=Math.floor(i);const a=[],l=[],c=[],u=[],d=new K,m=new K,g=new K,v=new K,_=new K,x=new K,y=new K;for(let b=0;b<=r;++b){const A=b/r*s*Math.PI*2;S(A,s,o,e,g),S(A+.01,s,o,e,v),x.subVectors(v,g),y.addVectors(v,g),_.crossVectors(x,y),y.crossVectors(_,x),_.normalize(),y.normalize();for(let k=0;k<=i;++k){const L=k/i*Math.PI*2,C=-t*Math.cos(L),P=t*Math.sin(L);d.x=g.x+(C*y.x+P*_.x),d.y=g.y+(C*y.y+P*_.y),d.z=g.z+(C*y.z+P*_.z),l.push(d.x,d.y,d.z),m.subVectors(d,g).normalize(),c.push(m.x,m.y,m.z),u.push(b/r),u.push(k/i)}}for(let b=1;b<=r;b++)for(let A=1;A<=i;A++){const k=(i+1)*(b-1)+(A-1),L=(i+1)*b+(A-1),C=(i+1)*b+A,P=(i+1)*(b-1)+A;a.push(k,L,P),a.push(L,C,P)}this.setIndex(a),this.setAttribute("position",new pt(l,3)),this.setAttribute("normal",new pt(c,3)),this.setAttribute("uv",new pt(u,2));function S(b,A,k,L,C){const P=Math.cos(b),R=Math.sin(b),N=k/A*b,O=Math.cos(N);C.x=L*(2+O)*.5*P,C.y=L*(2+O)*R*.5,C.z=L*Math.sin(N)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new nS(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class rS extends Xt{constructor(e=new TP(new K(-1,-1,0),new K(-1,1,0),new K(1,1,0)),t=64,r=1,i=8,s=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:r,radialSegments:i,closed:s};const o=e.computeFrenetFrames(t,s);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new K,l=new K,c=new Te;let u=new K;const d=[],m=[],g=[],v=[];_(),this.setIndex(v),this.setAttribute("position",new pt(d,3)),this.setAttribute("normal",new pt(m,3)),this.setAttribute("uv",new pt(g,2));function _(){for(let b=0;b<t;b++)x(b);x(s===!1?t:0),S(),y()}function x(b){u=e.getPointAt(b/t,u);const A=o.normals[b],k=o.binormals[b];for(let L=0;L<=i;L++){const C=L/i*Math.PI*2,P=Math.sin(C),R=-Math.cos(C);l.x=R*A.x+P*k.x,l.y=R*A.y+P*k.y,l.z=R*A.z+P*k.z,l.normalize(),m.push(l.x,l.y,l.z),a.x=u.x+r*l.x,a.y=u.y+r*l.y,a.z=u.z+r*l.z,d.push(a.x,a.y,a.z)}}function y(){for(let b=1;b<=t;b++)for(let A=1;A<=i;A++){const k=(i+1)*(b-1)+(A-1),L=(i+1)*b+(A-1),C=(i+1)*b+A,P=(i+1)*(b-1)+A;v.push(k,L,P),v.push(L,C,P)}}function S(){for(let b=0;b<=t;b++)for(let A=0;A<=i;A++)c.x=b/t,c.y=A/i,g.push(c.x,c.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new rS(new C1[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class A8 extends Xt{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],r=new Set,i=new K,s=new K;if(e.index!==null){const o=e.attributes.position,a=e.index;let l=e.groups;l.length===0&&(l=[{start:0,count:a.count,materialIndex:0}]);for(let c=0,u=l.length;c<u;++c){const d=l[c],m=d.start,g=d.count;for(let v=m,_=m+g;v<_;v+=3)for(let x=0;x<3;x++){const y=a.getX(v+x),S=a.getX(v+(x+1)%3);i.fromBufferAttribute(o,y),s.fromBufferAttribute(o,S),F4(i,s,r)===!0&&(t.push(i.x,i.y,i.z),t.push(s.x,s.y,s.z))}}}else{const o=e.attributes.position;for(let a=0,l=o.count/3;a<l;a++)for(let c=0;c<3;c++){const u=3*a+c,d=3*a+(c+1)%3;i.fromBufferAttribute(o,u),s.fromBufferAttribute(o,d),F4(i,s,r)===!0&&(t.push(i.x,i.y,i.z),t.push(s.x,s.y,s.z))}}this.setAttribute("position",new pt(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function F4(n,e,t){const r=`${n.x},${n.y},${n.z}-${e.x},${e.y},${e.z}`,i=`${e.x},${e.y},${e.z}-${n.x},${n.y},${n.z}`;return t.has(r)===!0||t.has(i)===!0?!1:(t.add(r),t.add(i),!0)}var U4=Object.freeze({__proto__:null,BoxGeometry:Vd,CapsuleGeometry:Ww,CircleGeometry:$w,ConeGeometry:qw,CylinderGeometry:kp,DodecahedronGeometry:Xw,EdgesGeometry:b8,ExtrudeGeometry:Yw,IcosahedronGeometry:Qw,LatheGeometry:cv,OctahedronGeometry:uv,PlaneGeometry:av,PolyhedronGeometry:iu,RingGeometry:Jw,ShapeGeometry:Zw,SphereGeometry:dv,TetrahedronGeometry:eS,TorusGeometry:tS,TorusKnotGeometry:nS,TubeGeometry:rS,WireframeGeometry:A8});class C8 extends Oi{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new tt(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class R8 extends bo{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class AP extends Oi{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new tt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=nu,this.normalScale=new Te(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class CP extends AP{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Te(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return fr(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new tt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new tt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new tt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class P8 extends Oi{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new tt(16777215),this.specular=new tt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=nu,this.normalScale=new Te(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=tv,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class N8 extends Oi{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new tt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=nu,this.normalScale=new Te(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class I8 extends Oi{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=nu,this.normalScale=new Te(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class L8 extends Oi{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=nu,this.normalScale=new Te(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=tv,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class D8 extends Oi{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new tt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=nu,this.normalScale=new Te(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class k8 extends rs{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function ed(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function O8(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function F8(n){function e(i,s){return n[i]-n[s]}const t=n.length,r=new Array(t);for(let i=0;i!==t;++i)r[i]=i;return r.sort(e),r}function lC(n,e,t){const r=n.length,i=new n.constructor(r);for(let s=0,o=0;o!==r;++s){const a=t[s]*e;for(let l=0;l!==e;++l)i[o++]=n[a+l]}return i}function RP(n,e,t,r){let i=1,s=n[0];for(;s!==void 0&&s[r]===void 0;)s=n[i++];if(s===void 0)return;let o=s[r];if(o!==void 0)if(Array.isArray(o))do o=s[r],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=n[i++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[r],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[i++];while(s!==void 0);else do o=s[r],o!==void 0&&(e.push(s.time),t.push(o)),s=n[i++];while(s!==void 0)}function Xhe(n,e,t,r,i=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l<s.tracks.length;++l){const c=s.tracks[l],u=c.getValueSize(),d=[],m=[];for(let g=0;g<c.times.length;++g){const v=c.times[g]*i;if(!(v<t||v>=r)){d.push(c.times[g]);for(let _=0;_<u;++_)m.push(c.values[g*u+_])}}d.length!==0&&(c.times=ed(d,c.times.constructor),c.values=ed(m,c.values.constructor),o.push(c))}s.tracks=o;let a=1/0;for(let l=0;l<s.tracks.length;++l)a>s.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l<s.tracks.length;++l)s.tracks[l].shift(-1*a);return s.resetDuration(),s}function Khe(n,e=0,t=n,r=30){r<=0&&(r=30);const i=t.tracks.length,s=e/r;for(let o=0;o<i;++o){const a=t.tracks[o],l=a.ValueTypeName;if(l==="bool"||l==="string")continue;const c=n.tracks.find(function(y){return y.name===a.name&&y.ValueTypeName===l});if(c===void 0)continue;let u=0;const d=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(u=d/3);let m=0;const g=c.getValueSize();c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(m=g/3);const v=a.times.length-1;let _;if(s<=a.times[0]){const y=u,S=d-u;_=a.values.slice(y,S)}else if(s>=a.times[v]){const y=v*d+u,S=y+d-u;_=a.values.slice(y,S)}else{const y=a.createInterpolant(),S=u,b=d-u;y.evaluate(s),_=y.resultBuffer.slice(S,b)}l==="quaternion"&&new ws().fromArray(_).normalize().conjugate().toArray(_);const x=c.times.length;for(let y=0;y<x;++y){const S=y*g+m;if(l==="quaternion")ws.multiplyQuaternionsFlat(c.values,S,_,0,c.values,S);else{const b=g-m*2;for(let A=0;A<b;++A)c.values[S+A]-=_[A]}}}return n.blendMode=iP,n}const Yhe={convertArray:ed,isTypedArray:O8,getKeyframeOrder:F8,sortedArray:lC,flattenJSON:RP,subclip:Xhe,makeClipAdditive:Khe};class hv{constructor(e,t,r,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(r),this.sampleValues=t,this.valueSize=r,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let r=this._cachedIndex,i=t[r],s=t[r-1];e:{t:{let o;n:{r:if(!(e<i)){for(let a=r+2;;){if(i===void 0){if(e<s)break r;return r=t.length,this._cachedIndex=r,this.copySampleValue_(r-1)}if(r===a)break;if(s=i,i=t[++r],e<i)break t}o=t.length;break n}if(!(e>=s)){const a=t[1];e<a&&(r=2,s=a);for(let l=r-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===l)break;if(i=s,s=t[--r-1],e>=s)break t}o=r,r=0;break n}break e}for(;r<o;){const a=r+o>>>1;e<t[a]?o=a:r=a+1}if(i=t[r],s=t[r-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return r=t.length,this._cachedIndex=r,this.copySampleValue_(r-1)}this._cachedIndex=r,this.intervalChanged_(r,s,i)}return this.interpolate_(r,s,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,r=this.sampleValues,i=this.valueSize,s=e*i;for(let o=0;o!==i;++o)t[o]=r[s+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class U8 extends hv{constructor(e,t,r,i){super(e,t,r,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Qu,endingEnd:Qu}}intervalChanged_(e,t,r){const i=this.parameterPositions;let s=e-2,o=e+1,a=i[s],l=i[o];if(a===void 0)switch(this.getSettings_().endingStart){case Ju:s=e,a=2*t-r;break;case hy:s=i.length-2,a=t+i[s]-i[s+1];break;default:s=e,a=r}if(l===void 0)switch(this.getSettings_().endingEnd){case Ju:o=e,l=2*r-t;break;case hy:o=1,l=r+i[1]-i[0];break;default:o=e-1,l=t}const c=(r-t)*.5,u=this.valueSize;this._weightPrev=c/(t-a),this._weightNext=c/(l-r),this._offsetPrev=s*u,this._offsetNext=o*u}interpolate_(e,t,r,i){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,u=this._offsetPrev,d=this._offsetNext,m=this._weightPrev,g=this._weightNext,v=(r-t)/(i-t),_=v*v,x=_*v,y=-m*x+2*m*_-m*v,S=(1+m)*x+(-1.5-2*m)*_+(-.5+m)*v+1,b=(-1-g)*x+(1.5+g)*_+.5*v,A=g*x-g*_;for(let k=0;k!==a;++k)s[k]=y*o[u+k]+S*o[c+k]+b*o[l+k]+A*o[d+k];return s}}class PP extends hv{constructor(e,t,r,i){super(e,t,r,i)}interpolate_(e,t,r,i){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,u=(r-t)/(i-t),d=1-u;for(let m=0;m!==a;++m)s[m]=o[c+m]*d+o[l+m]*u;return s}}class V8 extends hv{constructor(e,t,r,i){super(e,t,r,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class ia{constructor(e,t,r,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=ed(t,this.TimeBufferType),this.values=ed(r,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let r;if(t.toJSON!==this.toJSON)r=t.toJSON(e);else{r={name:e.name,times:ed(e.times,Array),values:ed(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(r.interpolation=i)}return r.type=e.ValueTypeName,r}InterpolantFactoryMethodDiscrete(e){return new V8(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new PP(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new U8(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case uy:t=this.InterpolantFactoryMethodDiscrete;break;case dy:t=this.InterpolantFactoryMethodLinear;break;case __:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const r="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(r);return console.warn("THREE.KeyframeTrack:",r),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return uy;case this.InterpolantFactoryMethodLinear:return dy;case this.InterpolantFactoryMethodSmooth:return __}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let r=0,i=t.length;r!==i;++r)t[r]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let r=0,i=t.length;r!==i;++r)t[r]*=e}return this}trim(e,t){const r=this.times,i=r.length;let s=0,o=i-1;for(;s!==i&&r[s]<e;)++s;for(;o!==-1&&r[o]>t;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=r.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,s=r.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(i!==void 0&&O8(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===__,s=e.length-1;let o=1;for(let a=1;a<s;++a){let l=!1;const c=e[a],u=e[a+1];if(c!==u&&(a!==1||c!==e[0]))if(i)l=!0;else{const d=a*r,m=d-r,g=d+r;for(let v=0;v!==r;++v){const _=t[d+v];if(_!==t[m+v]||_!==t[g+v]){l=!0;break}}}if(l){if(a!==o){e[o]=e[a];const d=a*r,m=o*r;for(let g=0;g!==r;++g)t[m+g]=t[d+g]}++o}}if(s>0){e[o]=e[s];for(let a=s*r,l=o*r,c=0;c!==r;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*r)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),r=this.constructor,i=new r(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}ia.prototype.TimeBufferType=Float32Array;ia.prototype.ValueBufferType=Float32Array;ia.prototype.DefaultInterpolation=dy;class jd extends ia{}jd.prototype.ValueTypeName="bool";jd.prototype.ValueBufferType=Array;jd.prototype.DefaultInterpolation=uy;jd.prototype.InterpolantFactoryMethodLinear=void 0;jd.prototype.InterpolantFactoryMethodSmooth=void 0;class NP extends ia{}NP.prototype.ValueTypeName="color";class Sy extends ia{}Sy.prototype.ValueTypeName="number";class j8 extends hv{constructor(e,t,r,i){super(e,t,r,i)}interpolate_(e,t,r,i){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(r-t)/(i-t);let c=e*a;for(let u=c+a;c!==u;c+=4)ws.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Op extends ia{InterpolantFactoryMethodLinear(e){return new j8(this.times,this.values,this.getValueSize(),e)}}Op.prototype.ValueTypeName="quaternion";Op.prototype.DefaultInterpolation=dy;Op.prototype.InterpolantFactoryMethodSmooth=void 0;class Bd extends ia{}Bd.prototype.ValueTypeName="string";Bd.prototype.ValueBufferType=Array;Bd.prototype.DefaultInterpolation=uy;Bd.prototype.InterpolantFactoryMethodLinear=void 0;Bd.prototype.InterpolantFactoryMethodSmooth=void 0;class by extends ia{}by.prototype.ValueTypeName="vector";class Ey{constructor(e,t=-1,r,i=kw){this.name=e,this.tracks=r,this.duration=t,this.blendMode=i,this.uuid=Gs(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],r=e.tracks,i=1/(e.fps||1);for(let o=0,a=r.length;o!==a;++o)t.push(Jhe(r[o]).scale(i));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=r.length;s!==o;++s)t.push(ia.toJSON(r[s]));return i}static CreateFromMorphTargetSequence(e,t,r,i){const s=t.length,o=[];for(let a=0;a<s;a++){let l=[],c=[];l.push((a+s-1)%s,a,(a+1)%s),c.push(0,1,0);const u=F8(l);l=lC(l,1,u),c=lC(c,1,u),!i&&l[0]===0&&(l.push(s),c.push(c[0])),o.push(new Sy(".morphTargetInfluences["+t[a].name+"]",l,c).scale(1/r))}return new this(e,-1,o)}static findByName(e,t){let r=e;if(!Array.isArray(e)){const i=e;r=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<r.length;i++)if(r[i].name===t)return r[i];return null}static CreateClipsFromMorphTargetSequences(e,t,r){const i={},s=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const c=e[a],u=c.name.match(s);if(u&&u.length>1){const d=u[1];let m=i[d];m||(i[d]=m=[]),m.push(c)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],t,r));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(d,m,g,v,_){if(g.length!==0){const x=[],y=[];RP(g,x,y,v),x.length!==0&&_.push(new d(m,x,y))}},i=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let d=0;d<c.length;d++){const m=c[d].keys;if(!(!m||m.length===0))if(m[0].morphTargets){const g={};let v;for(v=0;v<m.length;v++)if(m[v].morphTargets)for(let _=0;_<m[v].morphTargets.length;_++)g[m[v].morphTargets[_]]=-1;for(const _ in g){const x=[],y=[];for(let S=0;S!==m[v].morphTargets.length;++S){const b=m[v];x.push(b.time),y.push(b.morphTarget===_?1:0)}i.push(new Sy(".morphTargetInfluence["+_+"]",x,y))}l=g.length*o}else{const g=".bones["+t[d].name+"]";r(by,g+".position",m,"pos",i),r(Op,g+".quaternion",m,"rot",i),r(by,g+".scale",m,"scl",i)}}return i.length===0?null:new this(s,l,i,a)}resetDuration(){const e=this.tracks;let t=0;for(let r=0,i=e.length;r!==i;++r){const s=this.tracks[r];t=Math.max(t,s.times[s.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function Qhe(n){switch(n.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Sy;case"vector":case"vector2":case"vector3":case"vector4":return by;case"color":return NP;case"quaternion":return Op;case"bool":case"boolean":return jd;case"string":return Bd}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+n)}function Jhe(n){if(n.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=Qhe(n.type);if(n.times===void 0){const t=[],r=[];RP(n.keys,t,r,"value"),n.times=t,n.values=r}return e.parse!==void 0?e.parse(n):new e(n.name,n.times,n.values,n.interpolation)}const cl={enabled:!1,files:{},add:function(n,e){this.enabled!==!1&&(this.files[n]=e)},get:function(n){if(this.enabled!==!1)return this.files[n]},remove:function(n){delete this.files[n]},clear:function(){this.files={}}};class IP{constructor(e,t,r){const i=this;let s=!1,o=0,a=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=r,this.itemStart=function(u){a++,s===!1&&i.onStart!==void 0&&i.onStart(u,o,a),s=!0},this.itemEnd=function(u){o++,i.onProgress!==void 0&&i.onProgress(u,o,a),o===a&&(s=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(u){i.onError!==void 0&&i.onError(u)},this.resolveURL=function(u){return l?l(u):u},this.setURLModifier=function(u){return l=u,this},this.addHandler=function(u,d){return c.push(u,d),this},this.removeHandler=function(u){const d=c.indexOf(u);return d!==-1&&c.splice(d,2),this},this.getHandler=function(u){for(let d=0,m=c.length;d<m;d+=2){const g=c[d],v=c[d+1];if(g.global&&(g.lastIndex=0),g.test(u))return v}return null}}}const B8=new IP;class Es{constructor(e){this.manager=e!==void 0?e:B8,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const r=this;return new Promise(function(i,s){r.load(e,i,t,s)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}Es.DEFAULT_MATERIAL_NAME="__DEFAULT";const Za={};class Zhe extends Error{constructor(e,t){super(e),this.response=t}}class Sl extends Es{constructor(e){super(e)}load(e,t,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=cl.get(e);if(s!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(s),this.manager.itemEnd(e)},0),s;if(Za[e]!==void 0){Za[e].push({onLoad:t,onProgress:r,onError:i});return}Za[e]=[],Za[e].push({onLoad:t,onProgress:r,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=Za[e],d=c.body.getReader(),m=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),g=m?parseInt(m):0,v=g!==0;let _=0;const x=new ReadableStream({start(y){S();function S(){d.read().then(({done:b,value:A})=>{if(b)y.close();else{_+=A.byteLength;const k=new ProgressEvent("progress",{lengthComputable:v,loaded:_,total:g});for(let L=0,C=u.length;L<C;L++){const P=u[L];P.onProgress&&P.onProgress(k)}y.enqueue(A),S()}})}}});return new Response(x)}else throw new Zhe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),m=d&&d[1]?d[1].toLowerCase():void 0,g=new TextDecoder(m);return c.arrayBuffer().then(v=>g.decode(v))}}}).then(c=>{cl.add(e,c);const u=Za[e];delete Za[e];for(let d=0,m=u.length;d<m;d++){const g=u[d];g.onLoad&&g.onLoad(c)}}).catch(c=>{const u=Za[e];if(u===void 0)throw this.manager.itemError(e),c;delete Za[e];for(let d=0,m=u.length;d<m;d++){const g=u[d];g.onError&&g.onError(c)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class efe extends Es{constructor(e){super(e)}load(e,t,r,i){const s=this,o=new Sl(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),s.manager.itemError(e)}},r,i)}parse(e){const t=[];for(let r=0;r<e.length;r++){const i=Ey.parse(e[r]);t.push(i)}return t}}class tfe extends Es{constructor(e){super(e)}load(e,t,r,i){const s=this,o=[],a=new Hw,l=new Sl(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(s.withCredentials);let c=0;function u(d){l.load(e[d],function(m){const g=s.parse(m,!0);o[d]={width:g.width,height:g.height,format:g.format,mipmaps:g.mipmaps},c+=1,c===6&&(g.mipmapCount===1&&(a.minFilter=Sr),a.image=o,a.format=g.format,a.needsUpdate=!0,t&&t(a))},r,i)}if(Array.isArray(e))for(let d=0,m=e.length;d<m;++d)u(d);else l.load(e,function(d){const m=s.parse(d,!0);if(m.isCubemap){const g=m.mipmaps.length/m.mipmapCount;for(let v=0;v<g;v++){o[v]={mipmaps:[]};for(let _=0;_<m.mipmapCount;_++)o[v].mipmaps.push(m.mipmaps[v*m.mipmapCount+_]),o[v].format=m.format,o[v].width=m.width,o[v].height=m.height}a.image=o}else a.image.width=m.width,a.image.height=m.height,a.mipmaps=m.mipmaps;m.mipmapCount===1&&(a.minFilter=Sr),a.format=m.format,a.needsUpdate=!0,t&&t(a)},r,i);return a}}class Ty extends Es{constructor(e){super(e)}load(e,t,r,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=cl.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const a=yy("img");function l(){u(),cl.add(e,this),t&&t(this),s.manager.itemEnd(e)}function c(d){u(),i&&i(d),s.manager.itemError(e),s.manager.itemEnd(e)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),s.manager.itemStart(e),a.src=e,a}}class nfe extends Es{constructor(e){super(e)}load(e,t,r,i){const s=new sv;s.colorSpace=Or;const o=new Ty(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function l(c){o.load(e[c],function(u){s.images[c]=u,a++,a===6&&(s.needsUpdate=!0,t&&t(s))},void 0,i)}for(let c=0;c<e.length;++c)l(c);return s}}class rfe extends Es{constructor(e){super(e)}load(e,t,r,i){const s=this,o=new md,a=new Sl(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(s.withCredentials),a.load(e,function(l){let c;try{c=s.parse(l)}catch(u){if(i!==void 0)i(u);else{console.error(u);return}}c.image!==void 0?o.image=c.image:c.data!==void 0&&(o.image.width=c.width,o.image.height=c.height,o.image.data=c.data),o.wrapS=c.wrapS!==void 0?c.wrapS:Ii,o.wrapT=c.wrapT!==void 0?c.wrapT:Ii,o.magFilter=c.magFilter!==void 0?c.magFilter:Sr,o.minFilter=c.minFilter!==void 0?c.minFilter:Sr,o.anisotropy=c.anisotropy!==void 0?c.anisotropy:1,c.colorSpace!==void 0?o.colorSpace=c.colorSpace:c.encoding!==void 0&&(o.encoding=c.encoding),c.flipY!==void 0&&(o.flipY=c.flipY),c.format!==void 0&&(o.format=c.format),c.type!==void 0&&(o.type=c.type),c.mipmaps!==void 0&&(o.mipmaps=c.mipmaps,o.minFilter=zc),c.mipmapCount===1&&(o.minFilter=Sr),c.generateMipmaps!==void 0&&(o.generateMipmaps=c.generateMipmaps),o.needsUpdate=!0,t&&t(o,c)},r,i),o}}class ife extends Es{constructor(e){super(e)}load(e,t,r,i){const s=new br,o=new Ty(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){s.image=a,s.needsUpdate=!0,t!==void 0&&t(s)},r,i),s}}class su extends yn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new tt(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}class z8 extends su{constructor(e,t,r){super(e,r),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(yn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new tt(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const lT=new kt,V4=new K,j4=new K;class LP{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Te(512,512),this.map=null,this.mapPass=null,this.matrix=new kt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new ov,this._frameExtents=new Te(1,1),this._viewportCount=1,this._viewports=[new Nn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,r=this.matrix;V4.setFromMatrixPosition(e.matrixWorld),t.position.copy(V4),j4.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(j4),t.updateMatrixWorld(),lT.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(lT),r.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),r.multiply(lT)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class sfe extends LP{constructor(){super(new Qr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,r=lp*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,s=e.distance||t.far;(r!==t.fov||i!==t.aspect||s!==t.far)&&(t.fov=r,t.aspect=i,t.far=s,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class H8 extends su{constructor(e,t,r=0,i=Math.PI/3,s=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(yn.DEFAULT_UP),this.updateMatrix(),this.target=new yn,this.distance=r,this.angle=i,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new sfe}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const B4=new kt,Fm=new K,cT=new K;class ofe extends LP{constructor(){super(new Qr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Te(4,2),this._viewportCount=6,this._viewports=[new Nn(2,1,1,1),new Nn(0,1,1,1),new Nn(3,1,1,1),new Nn(1,1,1,1),new Nn(3,0,1,1),new Nn(1,0,1,1)],this._cubeDirections=[new K(1,0,0),new K(-1,0,0),new K(0,0,1),new K(0,0,-1),new K(0,1,0),new K(0,-1,0)],this._cubeUps=[new K(0,1,0),new K(0,1,0),new K(0,1,0),new K(0,1,0),new K(0,0,1),new K(0,0,-1)]}updateMatrices(e,t=0){const r=this.camera,i=this.matrix,s=e.distance||r.far;s!==r.far&&(r.far=s,r.updateProjectionMatrix()),Fm.setFromMatrixPosition(e.matrixWorld),r.position.copy(Fm),cT.copy(r.position),cT.add(this._cubeDirections[t]),r.up.copy(this._cubeUps[t]),r.lookAt(cT),r.updateMatrixWorld(),i.makeTranslation(-Fm.x,-Fm.y,-Fm.z),B4.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(B4)}}class G8 extends su{constructor(e,t,r=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=r,this.decay=i,this.shadow=new ofe}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class afe extends LP{constructor(){super(new lv(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class W8 extends su{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(yn.DEFAULT_UP),this.updateMatrix(),this.target=new yn,this.shadow=new afe}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class $8 extends su{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class q8 extends su{constructor(e,t,r=10,i=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=r,this.height=i}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class X8{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new K)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const r=e.x,i=e.y,s=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*i),t.addScaledVector(o[2],.488603*s),t.addScaledVector(o[3],.488603*r),t.addScaledVector(o[4],1.092548*(r*i)),t.addScaledVector(o[5],1.092548*(i*s)),t.addScaledVector(o[6],.315392*(3*s*s-1)),t.addScaledVector(o[7],1.092548*(r*s)),t.addScaledVector(o[8],.546274*(r*r-i*i)),t}getIrradianceAt(e,t){const r=e.x,i=e.y,s=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],2*.511664*i),t.addScaledVector(o[2],2*.511664*s),t.addScaledVector(o[3],2*.511664*r),t.addScaledVector(o[4],2*.429043*r*i),t.addScaledVector(o[5],2*.429043*i*s),t.addScaledVector(o[6],.743125*s*s-.247708),t.addScaledVector(o[7],2*.429043*r*s),t.addScaledVector(o[8],.429043*(r*r-i*i)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let r=0;r<9;r++)this.coefficients[r].addScaledVector(e.coefficients[r],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let r=0;r<9;r++)this.coefficients[r].lerp(e.coefficients[r],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,t=0){const r=this.coefficients;for(let i=0;i<9;i++)r[i].fromArray(e,t+i*3);return this}toArray(e=[],t=0){const r=this.coefficients;for(let i=0;i<9;i++)r[i].toArray(e,t+i*3);return e}static getBasisAt(e,t){const r=e.x,i=e.y,s=e.z;t[0]=.282095,t[1]=.488603*i,t[2]=.488603*s,t[3]=.488603*r,t[4]=1.092548*r*i,t[5]=1.092548*i*s,t[6]=.315392*(3*s*s-1),t[7]=1.092548*r*s,t[8]=.546274*(r*r-i*i)}}class K8 extends su{constructor(e=new X8,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class iS extends Es{constructor(e){super(e),this.textures={}}load(e,t,r,i){const s=this,o=new Sl(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),s.manager.itemError(e)}},r,i)}parse(e){const t=this.textures;function r(s){return t[s]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",s),t[s]}const i=iS.createMaterialFromType(e.type);if(e.uuid!==void 0&&(i.uuid=e.uuid),e.name!==void 0&&(i.name=e.name),e.color!==void 0&&i.color!==void 0&&i.color.setHex(e.color),e.roughness!==void 0&&(i.roughness=e.roughness),e.metalness!==void 0&&(i.metalness=e.metalness),e.sheen!==void 0&&(i.sheen=e.sheen),e.sheenColor!==void 0&&(i.sheenColor=new tt().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(i.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&i.emissive!==void 0&&i.emissive.setHex(e.emissive),e.specular!==void 0&&i.specular!==void 0&&i.specular.setHex(e.specular),e.specularIntensity!==void 0&&(i.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&i.specularColor!==void 0&&i.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(i.shininess=e.shininess),e.clearcoat!==void 0&&(i.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=e.clearcoatRoughness),e.iridescence!==void 0&&(i.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(i.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(i.transmission=e.transmission),e.thickness!==void 0&&(i.thickness=e.thickness),e.attenuationDistance!==void 0&&(i.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&i.attenuationColor!==void 0&&i.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(i.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(i.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(i.fog=e.fog),e.flatShading!==void 0&&(i.flatShading=e.flatShading),e.blending!==void 0&&(i.blending=e.blending),e.combine!==void 0&&(i.combine=e.combine),e.side!==void 0&&(i.side=e.side),e.shadowSide!==void 0&&(i.shadowSide=e.shadowSide),e.opacity!==void 0&&(i.opacity=e.opacity),e.transparent!==void 0&&(i.transparent=e.transparent),e.alphaTest!==void 0&&(i.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(i.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(i.depthFunc=e.depthFunc),e.depthTest!==void 0&&(i.depthTest=e.depthTest),e.depthWrite!==void 0&&(i.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(i.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(i.blendSrc=e.blendSrc),e.blendDst!==void 0&&(i.blendDst=e.blendDst),e.blendEquation!==void 0&&(i.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(i.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(i.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(i.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&i.blendColor!==void 0&&i.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(i.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(i.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(i.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(i.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(i.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(i.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(i.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(i.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(i.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(i.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(i.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(i.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(i.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(i.rotation=e.rotation),e.linewidth!==void 0&&(i.linewidth=e.linewidth),e.dashSize!==void 0&&(i.dashSize=e.dashSize),e.gapSize!==void 0&&(i.gapSize=e.gapSize),e.scale!==void 0&&(i.scale=e.scale),e.polygonOffset!==void 0&&(i.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(i.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(i.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(i.dithering=e.dithering),e.alphaToCoverage!==void 0&&(i.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(i.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(i.forceSinglePass=e.forceSinglePass),e.visible!==void 0&&(i.visible=e.visible),e.toneMapped!==void 0&&(i.toneMapped=e.toneMapped),e.userData!==void 0&&(i.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?i.vertexColors=e.vertexColors>0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(i.uniforms[s]={},o.type){case"t":i.uniforms[s].value=r(o.value);break;case"c":i.uniforms[s].value=new tt().setHex(o.value);break;case"v2":i.uniforms[s].value=new Te().fromArray(o.value);break;case"v3":i.uniforms[s].value=new K().fromArray(o.value);break;case"v4":i.uniforms[s].value=new Nn().fromArray(o.value);break;case"m3":i.uniforms[s].value=new en().fromArray(o.value);break;case"m4":i.uniforms[s].value=new kt().fromArray(o.value);break;default:i.uniforms[s].value=o.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(i.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)i.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(i.lights=e.lights),e.clipping!==void 0&&(i.clipping=e.clipping),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=r(e.map)),e.matcap!==void 0&&(i.matcap=r(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=r(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=r(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=r(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),i.normalScale=new Te().fromArray(s)}return e.displacementMap!==void 0&&(i.displacementMap=r(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=r(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=r(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=r(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=r(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=r(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=r(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=r(e.envMap)),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=r(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=r(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=r(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=r(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=r(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=r(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Te().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=r(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=r(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=r(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=r(e.thicknessMap)),e.anisotropyMap!==void 0&&(i.anisotropyMap=r(e.anisotropyMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=r(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=r(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const t={ShadowMaterial:C8,SpriteMaterial:vP,RawShaderMaterial:R8,ShaderMaterial:bo,PointsMaterial:_P,MeshPhysicalMaterial:CP,MeshStandardMaterial:AP,MeshPhongMaterial:P8,MeshToonMaterial:N8,MeshNormalMaterial:I8,MeshLambertMaterial:L8,MeshDepthMaterial:pP,MeshDistanceMaterial:mP,MeshBasicMaterial:ru,MeshMatcapMaterial:D8,LineDashedMaterial:k8,LineBasicMaterial:rs,Material:Oi};return new t[e]}}class cC{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let r=0,i=e.length;r<i;r++)t+=String.fromCharCode(e[r]);try{return decodeURIComponent(escape(t))}catch{return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class Y8 extends Xt{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class Q8 extends Es{constructor(e){super(e)}load(e,t,r,i){const s=this,o=new Sl(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),s.manager.itemError(e)}},r,i)}parse(e){const t={},r={};function i(g,v){if(t[v]!==void 0)return t[v];const x=g.interleavedBuffers[v],y=s(g,x.buffer),S=mf(x.type,y),b=new Bw(S,x.stride);return b.uuid=x.uuid,t[v]=b,b}function s(g,v){if(r[v]!==void 0)return r[v];const x=g.arrayBuffers[v],y=new Uint32Array(x).buffer;return r[v]=y,y}const o=e.isInstancedBufferGeometry?new Y8:new Xt,a=e.data.index;if(a!==void 0){const g=mf(a.type,a.array);o.setIndex(new an(g,1))}const l=e.data.attributes;for(const g in l){const v=l[g];let _;if(v.isInterleavedBufferAttribute){const x=i(e.data,v.data);_=new Td(x,v.itemSize,v.offset,v.normalized)}else{const x=mf(v.type,v.array),y=v.isInstancedBufferAttribute?up:an;_=new y(x,v.itemSize,v.normalized)}v.name!==void 0&&(_.name=v.name),v.usage!==void 0&&_.setUsage(v.usage),o.setAttribute(g,_)}const c=e.data.morphAttributes;if(c)for(const g in c){const v=c[g],_=[];for(let x=0,y=v.length;x<y;x++){const S=v[x];let b;if(S.isInterleavedBufferAttribute){const A=i(e.data,S.data);b=new Td(A,S.itemSize,S.offset,S.normalized)}else{const A=mf(S.type,S.array);b=new an(A,S.itemSize,S.normalized)}S.name!==void 0&&(b.name=S.name),_.push(b)}o.morphAttributes[g]=_}e.data.morphTargetsRelative&&(o.morphTargetsRelative=!0);const d=e.data.groups||e.data.drawcalls||e.data.offsets;if(d!==void 0)for(let g=0,v=d.length;g!==v;++g){const _=d[g];o.addGroup(_.start,_.count,_.materialIndex)}const m=e.data.boundingSphere;if(m!==void 0){const g=new K;m.center!==void 0&&g.fromArray(m.center),o.boundingSphere=new Di(g,m.radius)}return e.name&&(o.name=e.name),e.userData&&(o.userData=e.userData),o}}class lfe extends Es{constructor(e){super(e)}load(e,t,r,i){const s=this,o=this.path===""?cC.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const a=new Sl(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){let c=null;try{c=JSON.parse(l)}catch(d){i!==void 0&&i(d),console.error("THREE:ObjectLoader: Can't parse "+e+".",d.message);return}const u=c.metadata;if(u===void 0||u.type===void 0||u.type.toLowerCase()==="geometry"){i!==void 0&&i(new Error("THREE.ObjectLoader: Can't load "+e)),console.error("THREE.ObjectLoader: Can't load "+e);return}s.parse(c,t)},r,i)}async loadAsync(e,t){const r=this,i=this.path===""?cC.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||i;const s=new Sl(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials);const o=await s.loadAsync(e,t),a=JSON.parse(o),l=a.metadata;if(l===void 0||l.type===void 0||l.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return await r.parseAsync(a)}parse(e,t){const r=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),s=this.parseGeometries(e.geometries,i),o=this.parseImages(e.images,function(){t!==void 0&&t(c)}),a=this.parseTextures(e.textures,o),l=this.parseMaterials(e.materials,a),c=this.parseObject(e.object,s,l,a,r),u=this.parseSkeletons(e.skeletons,c);if(this.bindSkeletons(c,u),t!==void 0){let d=!1;for(const m in o)if(o[m].data instanceof HTMLImageElement){d=!0;break}d===!1&&t(c)}return c}async parseAsync(e){const t=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,r),s=await this.parseImagesAsync(e.images),o=this.parseTextures(e.textures,s),a=this.parseMaterials(e.materials,o),l=this.parseObject(e.object,i,a,o,t),c=this.parseSkeletons(e.skeletons,l);return this.bindSkeletons(l,c),l}parseShapes(e){const t={};if(e!==void 0)for(let r=0,i=e.length;r<i;r++){const s=new gd().fromJSON(e[r]);t[s.uuid]=s}return t}parseSkeletons(e,t){const r={},i={};if(t.traverse(function(s){s.isBone&&(i[s.uuid]=s)}),e!==void 0)for(let s=0,o=e.length;s<o;s++){const a=new zw().fromJSON(e[s],i);r[a.uuid]=a}return r}parseGeometries(e,t){const r={};if(e!==void 0){const i=new Q8;for(let s=0,o=e.length;s<o;s++){let a;const l=e[s];switch(l.type){case"BufferGeometry":case"InstancedBufferGeometry":a=i.parse(l);break;default:l.type in U4?a=U4[l.type].fromJSON(l,t):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${l.type}"`)}a.uuid=l.uuid,l.name!==void 0&&(a.name=l.name),l.userData!==void 0&&(a.userData=l.userData),r[l.uuid]=a}}return r}parseMaterials(e,t){const r={},i={};if(e!==void 0){const s=new iS;s.setTextures(t);for(let o=0,a=e.length;o<a;o++){const l=e[o];r[l.uuid]===void 0&&(r[l.uuid]=s.parse(l)),i[l.uuid]=r[l.uuid]}}return i}parseAnimations(e){const t={};if(e!==void 0)for(let r=0;r<e.length;r++){const i=e[r],s=Ey.parse(i);t[s.uuid]=s}return t}parseImages(e,t){const r=this,i={};let s;function o(l){return r.manager.itemStart(l),s.load(l,function(){r.manager.itemEnd(l)},void 0,function(){r.manager.itemError(l),r.manager.itemEnd(l)})}function a(l){if(typeof l=="string"){const c=l,u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c)?c:r.resourcePath+c;return o(u)}else return l.data?{data:mf(l.type,l.data),width:l.width,height:l.height}:null}if(e!==void 0&&e.length>0){const l=new IP(t);s=new Ty(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c<u;c++){const d=e[c],m=d.url;if(Array.isArray(m)){const g=[];for(let v=0,_=m.length;v<_;v++){const x=m[v],y=a(x);y!==null&&(y instanceof HTMLImageElement?g.push(y):g.push(new md(y.data,y.width,y.height)))}i[d.uuid]=new Zu(g)}else{const g=a(d.url);i[d.uuid]=new Zu(g)}}}return i}async parseImagesAsync(e){const t=this,r={};let i;async function s(o){if(typeof o=="string"){const a=o,l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(a)?a:t.resourcePath+a;return await i.loadAsync(l)}else return o.data?{data:mf(o.type,o.data),width:o.width,height:o.height}:null}if(e!==void 0&&e.length>0){i=new Ty(this.manager),i.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o<a;o++){const l=e[o],c=l.url;if(Array.isArray(c)){const u=[];for(let d=0,m=c.length;d<m;d++){const g=c[d],v=await s(g);v!==null&&(v instanceof HTMLImageElement?u.push(v):u.push(new md(v.data,v.width,v.height)))}r[l.uuid]=new Zu(u)}else{const u=await s(l.url);r[l.uuid]=new Zu(u)}}}return r}parseTextures(e,t){function r(s,o){return typeof s=="number"?s:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",s),o[s])}const i={};if(e!==void 0)for(let s=0,o=e.length;s<o;s++){const a=e[s];a.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),t[a.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",a.image);const l=t[a.image],c=l.data;let u;Array.isArray(c)?(u=new sv,c.length===6&&(u.needsUpdate=!0)):(c&&c.data?u=new md:u=new br,c&&(u.needsUpdate=!0)),u.source=l,u.uuid=a.uuid,a.name!==void 0&&(u.name=a.name),a.mapping!==void 0&&(u.mapping=r(a.mapping,cfe)),a.channel!==void 0&&(u.channel=a.channel),a.offset!==void 0&&u.offset.fromArray(a.offset),a.repeat!==void 0&&u.repeat.fromArray(a.repeat),a.center!==void 0&&u.center.fromArray(a.center),a.rotation!==void 0&&(u.rotation=a.rotation),a.wrap!==void 0&&(u.wrapS=r(a.wrap[0],z4),u.wrapT=r(a.wrap[1],z4)),a.format!==void 0&&(u.format=a.format),a.internalFormat!==void 0&&(u.internalFormat=a.internalFormat),a.type!==void 0&&(u.type=a.type),a.colorSpace!==void 0&&(u.colorSpace=a.colorSpace),a.encoding!==void 0&&(u.encoding=a.encoding),a.minFilter!==void 0&&(u.minFilter=r(a.minFilter,H4)),a.magFilter!==void 0&&(u.magFilter=r(a.magFilter,H4)),a.anisotropy!==void 0&&(u.anisotropy=a.anisotropy),a.flipY!==void 0&&(u.flipY=a.flipY),a.generateMipmaps!==void 0&&(u.generateMipmaps=a.generateMipmaps),a.premultiplyAlpha!==void 0&&(u.premultiplyAlpha=a.premultiplyAlpha),a.unpackAlignment!==void 0&&(u.unpackAlignment=a.unpackAlignment),a.compareFunction!==void 0&&(u.compareFunction=a.compareFunction),a.userData!==void 0&&(u.userData=a.userData),i[a.uuid]=u}return i}parseObject(e,t,r,i,s){let o;function a(m){return t[m]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",m),t[m]}function l(m){if(m!==void 0){if(Array.isArray(m)){const g=[];for(let v=0,_=m.length;v<_;v++){const x=m[v];r[x]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",x),g.push(r[x])}return g}return r[m]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",m),r[m]}}function c(m){return i[m]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",m),i[m]}let u,d;switch(e.type){case"Scene":o=new yP,e.background!==void 0&&(Number.isInteger(e.background)?o.background=new tt(e.background):o.background=c(e.background)),e.environment!==void 0&&(o.environment=c(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?o.fog=new jw(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(o.fog=new Vw(e.fog.color,e.fog.density)),e.fog.name!==""&&(o.fog.name=e.fog.name)),e.backgroundBlurriness!==void 0&&(o.backgroundBlurriness=e.backgroundBlurriness),e.backgroundIntensity!==void 0&&(o.backgroundIntensity=e.backgroundIntensity);break;case"PerspectiveCamera":o=new Qr(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(o.focus=e.focus),e.zoom!==void 0&&(o.zoom=e.zoom),e.filmGauge!==void 0&&(o.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(o.filmOffset=e.filmOffset),e.view!==void 0&&(o.view=Object.assign({},e.view));break;case"OrthographicCamera":o=new lv(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(o.zoom=e.zoom),e.view!==void 0&&(o.view=Object.assign({},e.view));break;case"AmbientLight":o=new $8(e.color,e.intensity);break;case"DirectionalLight":o=new W8(e.color,e.intensity);break;case"PointLight":o=new G8(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":o=new q8(e.color,e.intensity,e.width,e.height);break;case"SpotLight":o=new H8(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":o=new z8(e.color,e.groundColor,e.intensity);break;case"LightProbe":o=new K8().fromJSON(e);break;case"SkinnedMesh":u=a(e.geometry),d=l(e.material),o=new f8(u,d),e.bindMode!==void 0&&(o.bindMode=e.bindMode),e.bindMatrix!==void 0&&o.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(o.skeleton=e.skeleton);break;case"Mesh":u=a(e.geometry),d=l(e.material),o=new Ur(u,d);break;case"InstancedMesh":u=a(e.geometry),d=l(e.material);const m=e.count,g=e.instanceMatrix,v=e.instanceColor;o=new p8(u,d,m),o.instanceMatrix=new up(new Float32Array(g.array),16),v!==void 0&&(o.instanceColor=new up(new Float32Array(v.array),v.itemSize));break;case"BatchedMesh":u=a(e.geometry),d=l(e.material),o=new m8(e.maxGeometryCount,e.maxVertexCount,e.maxIndexCount,d),o.geometry=u,o.perObjectFrustumCulled=e.perObjectFrustumCulled,o.sortObjects=e.sortObjects,o._drawRanges=e.drawRanges,o._reservedRanges=e.reservedRanges,o._visibility=e.visibility,o._active=e.active,o._bounds=e.bounds.map(_=>{const x=new es;x.min.fromArray(_.boxMin),x.max.fromArray(_.boxMax);const y=new Di;return y.radius=_.sphereRadius,y.center.fromArray(_.sphereCenter),{boxInitialized:_.boxInitialized,box:x,sphereInitialized:_.sphereInitialized,sphere:y}}),o._maxGeometryCount=e.maxGeometryCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=c(e.matricesTexture.uuid);break;case"LOD":o=new h8;break;case"Line":o=new Hc(a(e.geometry),l(e.material));break;case"LineLoop":o=new g8(a(e.geometry),l(e.material));break;case"LineSegments":o=new Va(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new y8(a(e.geometry),l(e.material));break;case"Sprite":o=new d8(l(e.material));break;case"Group":o=new vf;break;case"Bone":o=new xP;break;default:o=new yn}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const m=e.children;for(let g=0;g<m.length;g++)o.add(this.parseObject(m[g],t,r,i,s))}if(e.animations!==void 0){const m=e.animations;for(let g=0;g<m.length;g++){const v=m[g];o.animations.push(s[v])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(o.autoUpdate=e.autoUpdate);const m=e.levels;for(let g=0;g<m.length;g++){const v=m[g],_=o.getObjectByProperty("uuid",v.object);_!==void 0&&o.addLevel(_,v.distance,v.hysteresis)}}return o}bindSkeletons(e,t){Object.keys(t).length!==0&&e.traverse(function(r){if(r.isSkinnedMesh===!0&&r.skeleton!==void 0){const i=t[r.skeleton];i===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",r.skeleton):r.bind(i,r.bindMatrix)}})}}const cfe={UVMapping:Lw,CubeReflectionMapping:wl,CubeRefractionMapping:Bc,EquirectangularReflectionMapping:oy,EquirectangularRefractionMapping:ay,CubeUVReflectionMapping:Ip},z4={RepeatWrapping:ly,ClampToEdgeWrapping:Ii,MirroredRepeatWrapping:cy},H4={NearestFilter:xr,NearestMipmapNearestFilter:T1,NearestMipmapLinearFilter:_g,LinearFilter:Sr,LinearMipmapNearestFilter:YR,LinearMipmapLinearFilter:zc};class ufe extends Es{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=cl.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(c=>{t&&t(c),s.manager.itemEnd(e)}).catch(c=>{i&&i(c)});return}return setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return cl.add(e,c),t&&t(c),s.manager.itemEnd(e),c}).catch(function(c){i&&i(c),cl.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});cl.add(e,l),s.manager.itemStart(e)}}let Rx;class DP{static getContext(){return Rx===void 0&&(Rx=new(window.AudioContext||window.webkitAudioContext)),Rx}static setContext(e){Rx=e}}class dfe extends Es{constructor(e){super(e)}load(e,t,r,i){const s=this,o=new Sl(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);DP.getContext().decodeAudioData(c,function(d){t(d)}).catch(a)}catch(c){a(c)}},r,i);function a(l){i?i(l):console.error(l),s.manager.itemError(e)}}}const G4=new kt,W4=new kt,Du=new kt;class hfe{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Qr,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Qr,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,Du.copy(e.projectionMatrix);const i=t.eyeSep/2,s=i*t.near/t.focus,o=t.near*Math.tan(fd*t.fov*.5)/t.zoom;let a,l;W4.elements[12]=-i,G4.elements[12]=i,a=-o*t.aspect+s,l=o*t.aspect+s,Du.elements[0]=2*t.near/(l-a),Du.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(Du),a=-o*t.aspect-s,l=o*t.aspect-s,Du.elements[0]=2*t.near/(l-a),Du.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(Du)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(W4),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(G4)}}class kP{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=$4(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=$4();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function $4(){return(typeof performance>"u"?Date:performance).now()}const ku=new K,q4=new ws,ffe=new K,Ou=new K;class pfe extends yn{constructor(){super(),this.type="AudioListener",this.context=DP.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new kP}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(ku,q4,ffe),Ou.set(0,0,-1).applyQuaternion(q4),t.positionX){const i=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(ku.x,i),t.positionY.linearRampToValueAtTime(ku.y,i),t.positionZ.linearRampToValueAtTime(ku.z,i),t.forwardX.linearRampToValueAtTime(Ou.x,i),t.forwardY.linearRampToValueAtTime(Ou.y,i),t.forwardZ.linearRampToValueAtTime(Ou.z,i),t.upX.linearRampToValueAtTime(r.x,i),t.upY.linearRampToValueAtTime(r.y,i),t.upZ.linearRampToValueAtTime(r.z,i)}else t.setPosition(ku.x,ku.y,ku.z),t.setOrientation(Ou.x,Ou.y,Ou.z,r.x,r.y,r.z)}}class J8 extends yn{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this._connected!==!1){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),this._connected===!0?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,this.source.detune!==void 0)return this.isPlaying===!0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.playbackRate=e,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.loop=e,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}const Fu=new K,X4=new ws,mfe=new K,Uu=new K;class gfe extends J8{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){super.connect(),this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,r){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=r,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(Fu,X4,mfe),Uu.set(0,0,1).applyQuaternion(X4);const t=this.panner;if(t.positionX){const r=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(Fu.x,r),t.positionY.linearRampToValueAtTime(Fu.y,r),t.positionZ.linearRampToValueAtTime(Fu.z,r),t.orientationX.linearRampToValueAtTime(Uu.x,r),t.orientationY.linearRampToValueAtTime(Uu.y,r),t.orientationZ.linearRampToValueAtTime(Uu.z,r)}else t.setPosition(Fu.x,Fu.y,Fu.z),t.setOrientation(Uu.x,Uu.y,Uu.z)}}class yfe{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let r=0;r<t.length;r++)e+=t[r];return e/t.length}}class Z8{constructor(e,t,r){this.binding=e,this.valueSize=r;let i,s,o;switch(t){case"quaternion":i=this._slerp,s=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(r*6),this._workIndex=5;break;case"string":case"bool":i=this._select,s=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(r*5);break;default:i=this._lerp,s=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(r*5)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=s,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const r=this.buffer,i=this.valueSize,s=e*i+i;let o=this.cumulativeWeight;if(o===0){for(let a=0;a!==i;++a)r[s+a]=r[a];o=t}else{o+=t;const a=t/o;this._mixBufferRegion(r,s,0,a,i)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,r=this.valueSize,i=r*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(t,i,0,e,r),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,r=this.buffer,i=e*t+t,s=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,s<1){const l=t*this._origIndex;this._mixBufferRegion(r,i,l,1-s,t)}o>0&&this._mixBufferRegionAdditive(r,i,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(r[l]!==r[l+t]){a.setValue(r,i);break}}saveOriginalState(){const e=this.binding,t=this.buffer,r=this.valueSize,i=r*this._origIndex;e.getValue(t,i);for(let s=r,o=i;s!==o;++s)t[s]=t[i+s%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let r=e;r<t;r++)this.buffer[r]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let r=0;r<this.valueSize;r++)this.buffer[t+r]=this.buffer[e+r]}_select(e,t,r,i,s){if(i>=.5)for(let o=0;o!==s;++o)e[t+o]=e[r+o]}_slerp(e,t,r,i){ws.slerpFlat(e,t,e,t,e,r,i)}_slerpAdditive(e,t,r,i,s){const o=this._workIndex*s;ws.multiplyQuaternionsFlat(e,o,e,t,e,r),ws.slerpFlat(e,t,e,t,e,o,i)}_lerp(e,t,r,i,s){const o=1-i;for(let a=0;a!==s;++a){const l=t+a;e[l]=e[l]*o+e[r+a]*i}}_lerpAdditive(e,t,r,i,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[r+o]*i}}}const OP="\\[\\]\\.:\\/",vfe=new RegExp("["+OP+"]","g"),FP="[^"+OP+"]",xfe="[^"+OP.replace("\\.","")+"]",_fe=/((?:WC+[\/:])*)/.source.replace("WC",FP),wfe=/(WCOD+)?/.source.replace("WCOD",xfe),Sfe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",FP),bfe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",FP),Efe=new RegExp("^"+_fe+wfe+Sfe+bfe+"$"),Tfe=["material","materials","bones","map"];class Mfe{constructor(e,t,r){const i=r||mn.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,t)}setValue(e,t){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=r.length;i!==s;++i)r[i].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,r=e.length;t!==r;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,r=e.length;t!==r;++t)e[t].unbind()}}class mn{constructor(e,t,r){this.path=t,this.parsedPath=r||mn.parseTrackName(t),this.node=mn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,r){return e&&e.isAnimationObjectGroup?new mn.Composite(e,t,r):new mn(e,t,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(vfe,"")}static parseTrackName(e){const t=Efe.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const s=r.nodeName.substring(i+1);Tfe.indexOf(s)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=s)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(t);if(r!==void 0)return r}if(e.children){const r=function(s){for(let o=0;o<s.length;o++){const a=s[o];if(a.name===t||a.uuid===t)return a;const l=r(a.children);if(l)return l}return null},i=r(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const r=this.resolvedProperty;for(let i=0,s=r.length;i!==s;++i)e[t++]=r[i]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const r=this.resolvedProperty;for(let i=0,s=r.length;i!==s;++i)r[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const r=this.resolvedProperty;for(let i=0,s=r.length;i!==s;++i)r[i]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const r=this.resolvedProperty;for(let i=0,s=r.length;i!==s;++i)r[i]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,r=t.objectName,i=t.propertyName;let s=t.propertyIndex;if(e||(e=mn.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(r){let c=t.objectIndex;switch(r){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let u=0;u<e.length;u++)if(e[u].name===c){c=u;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[r]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[r]}if(c!==void 0){if(e[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[c]}}const o=e[i];if(o===void 0){const c=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+i+" but it wasn't found.",e);return}let a=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?a=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(s!==void 0){if(i==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[s]!==void 0&&(s=e.morphTargetDictionary[s])}l=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=s}else o.fromArray!==void 0&&o.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(l=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}mn.Composite=Mfe;mn.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};mn.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};mn.prototype.GetterByBindingType=[mn.prototype._getValue_direct,mn.prototype._getValue_array,mn.prototype._getValue_arrayElement,mn.prototype._getValue_toArray];mn.prototype.SetterByBindingTypeAndVersioning=[[mn.prototype._setValue_direct,mn.prototype._setValue_direct_setNeedsUpdate,mn.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[mn.prototype._setValue_array,mn.prototype._setValue_array_setNeedsUpdate,mn.prototype._setValue_array_setMatrixWorldNeedsUpdate],[mn.prototype._setValue_arrayElement,mn.prototype._setValue_arrayElement_setNeedsUpdate,mn.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[mn.prototype._setValue_fromArray,mn.prototype._setValue_fromArray_setNeedsUpdate,mn.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class Afe{constructor(){this.isAnimationObjectGroup=!0,this.uuid=Gs(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let r=0,i=arguments.length;r!==i;++r)e[arguments[r].uuid]=r;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,r=this._paths,i=this._parsedPaths,s=this._bindings,o=s.length;let a,l=e.length,c=this.nCachedObjects_;for(let u=0,d=arguments.length;u!==d;++u){const m=arguments[u],g=m.uuid;let v=t[g];if(v===void 0){v=l++,t[g]=v,e.push(m);for(let _=0,x=o;_!==x;++_)s[_].push(new mn(m,r[_],i[_]))}else if(v<c){a=e[v];const _=--c,x=e[_];t[x.uuid]=v,e[v]=x,t[g]=_,e[_]=m;for(let y=0,S=o;y!==S;++y){const b=s[y],A=b[_];let k=b[v];b[v]=A,k===void 0&&(k=new mn(m,r[y],i[y])),b[_]=k}}else e[v]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=c}remove(){const e=this._objects,t=this._indicesByUUID,r=this._bindings,i=r.length;let s=this.nCachedObjects_;for(let o=0,a=arguments.length;o!==a;++o){const l=arguments[o],c=l.uuid,u=t[c];if(u!==void 0&&u>=s){const d=s++,m=e[d];t[m.uuid]=u,e[u]=m,t[c]=d,e[d]=l;for(let g=0,v=i;g!==v;++g){const _=r[g],x=_[d],y=_[u];_[u]=x,_[d]=y}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,r=this._bindings,i=r.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,d=t[u];if(d!==void 0)if(delete t[u],d<s){const m=--s,g=e[m],v=--o,_=e[v];t[g.uuid]=d,e[d]=g,t[_.uuid]=m,e[m]=_,e.pop();for(let x=0,y=i;x!==y;++x){const S=r[x],b=S[m],A=S[v];S[d]=b,S[m]=A,S.pop()}}else{const m=--o,g=e[m];m>0&&(t[g.uuid]=d),e[d]=g,e.pop();for(let v=0,_=i;v!==_;++v){const x=r[v];x[d]=x[m],x.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const r=this._bindingsIndicesByPath;let i=r[e];const s=this._bindings;if(i!==void 0)return s[i];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,d=new Array(c);i=s.length,r[e]=i,o.push(e),a.push(t),s.push(d);for(let m=u,g=l.length;m!==g;++m){const v=l[m];d[m]=new mn(v,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,r=t[e];if(r!==void 0){const i=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];t[c]=r,o[r]=l,o.pop(),s[r]=s[a],s.pop(),i[r]=i[a],i.pop()}}}class eH{constructor(e,t,r=null,i=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=r,this.blendMode=i;const s=t.tracks,o=s.length,a=new Array(o),l={endingStart:Qu,endingEnd:Qu};for(let c=0;c!==o;++c){const u=s[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=D6,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,r){if(e.fadeOut(t),this.fadeIn(t),r){const i=this._clip.duration,s=e._clip.duration,o=s/i,a=i/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,r){return e.crossFadeFrom(this,t,r)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,r){const i=this._mixer,s=i.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=s,l[1]=s+r,c[0]=e/o,c[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,r,i){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*r;l<0||r===0?t=0:(this._startTime=null,t=r*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case iP:for(let u=0,d=l.length;u!==d;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case kw:default:for(let u=0,d=l.length;u!==d;++u)l[u].evaluate(o),c[u].accumulate(i,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const r=this._weightInterpolant;if(r!==null){const i=r.evaluate(e)[0];t*=i,e>r.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const r=this._timeScaleInterpolant;if(r!==null){const i=r.evaluate(e)[0];t*=i,e>r.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,r=this.loop;let i=this.time+e,s=this._loopCount;const o=r===k6;if(e===0)return s===-1?i:o&&(s&1)===1?t-i:i;if(r===L6){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=t)i=t;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),i>=t||i<0){const a=Math.floor(i/t);i-=t*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?t:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(o&&(s&1)===1)return t-i}return i}_setEndings(e,t,r){const i=this._interpolantSettings;r?(i.endingStart=Ju,i.endingEnd=Ju):(e?i.endingStart=this.zeroSlopeAtStart?Ju:Qu:i.endingStart=hy,t?i.endingEnd=this.zeroSlopeAtEnd?Ju:Qu:i.endingEnd=hy)}_scheduleFading(e,t,r){const i=this._mixer,s=i.time;let o=this._weightInterpolant;o===null&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=t,a[1]=s+e,l[1]=r,this}}const Cfe=new Float32Array(1);class Rfe extends Rl{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const r=e._localRoot||this._root,i=e._clip.tracks,s=i.length,o=e._propertyBindings,a=e._interpolants,l=r.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let d=0;d!==s;++d){const m=i[d],g=m.name;let v=u[g];if(v!==void 0)++v.referenceCount,o[d]=v;else{if(v=o[d],v!==void 0){v._cacheIndex===null&&(++v.referenceCount,this._addInactiveBinding(v,l,g));continue}const _=t&&t._propertyBindings[d].binding.parsedPath;v=new Z8(mn.create(r,g,_),m.ValueTypeName,m.getValueSize()),++v.referenceCount,this._addInactiveBinding(v,l,g),o[d]=v}a[d].resultBuffer=v.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,s=this._actionsByClip[i];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,i,r)}const t=e._propertyBindings;for(let r=0,i=t.length;r!==i;++r){const s=t[r];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let r=0,i=t.length;r!==i;++r){const s=t[r];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t<this._nActiveActions}_addInactiveAction(e,t,r){const i=this._actions,s=this._actionsByClip;let o=s[t];if(o===void 0)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,s[t]=o;else{const a=o.knownActions;e._byClipCacheIndex=a.length,a.push(e)}e._cacheIndex=i.length,i.push(e),o.actionByRoot[r]=e}_removeInactiveAction(e){const t=this._actions,r=t[t.length-1],i=e._cacheIndex;r._cacheIndex=i,t[i]=r,t.pop(),e._cacheIndex=null;const s=e._clip.uuid,o=this._actionsByClip,a=o[s],l=a.knownActions,c=l[l.length-1],u=e._byClipCacheIndex;c._byClipCacheIndex=u,l[u]=c,l.pop(),e._byClipCacheIndex=null;const d=a.actionByRoot,m=(e._localRoot||this._root).uuid;delete d[m],l.length===0&&delete o[s],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let r=0,i=t.length;r!==i;++r){const s=t[r];--s.referenceCount===0&&this._removeInactiveBinding(s)}}_lendAction(e){const t=this._actions,r=e._cacheIndex,i=this._nActiveActions++,s=t[i];e._cacheIndex=i,t[i]=e,s._cacheIndex=r,t[r]=s}_takeBackAction(e){const t=this._actions,r=e._cacheIndex,i=--this._nActiveActions,s=t[i];e._cacheIndex=i,t[i]=e,s._cacheIndex=r,t[r]=s}_addInactiveBinding(e,t,r){const i=this._bindingsByRootAndName,s=this._bindings;let o=i[t];o===void 0&&(o={},i[t]=o),o[r]=e,e._cacheIndex=s.length,s.push(e)}_removeInactiveBinding(e){const t=this._bindings,r=e.binding,i=r.rootNode.uuid,s=r.path,o=this._bindingsByRootAndName,a=o[i],l=t[t.length-1],c=e._cacheIndex;l._cacheIndex=c,t[c]=l,t.pop(),delete a[s],Object.keys(a).length===0&&delete o[i]}_lendBinding(e){const t=this._bindings,r=e._cacheIndex,i=this._nActiveBindings++,s=t[i];e._cacheIndex=i,t[i]=e,s._cacheIndex=r,t[r]=s}_takeBackBinding(e){const t=this._bindings,r=e._cacheIndex,i=--this._nActiveBindings,s=t[i];e._cacheIndex=i,t[i]=e,s._cacheIndex=r,t[r]=s}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let r=e[t];return r===void 0&&(r=new PP(new Float32Array(2),new Float32Array(2),1,Cfe),r.__cacheIndex=t,e[t]=r),r}_takeBackControlInterpolant(e){const t=this._controlInterpolants,r=e.__cacheIndex,i=--this._nActiveControlInterpolants,s=t[i];e.__cacheIndex=i,t[i]=e,s.__cacheIndex=r,t[r]=s}clipAction(e,t,r){const i=t||this._root,s=i.uuid;let o=typeof e=="string"?Ey.findByName(i,e):e;const a=o!==null?o.uuid:e,l=this._actionsByClip[a];let c=null;if(r===void 0&&(o!==null?r=o.blendMode:r=kw),l!==void 0){const d=l.actionByRoot[s];if(d!==void 0&&d.blendMode===r)return d;c=l.knownActions[0],o===null&&(o=c._clip)}if(o===null)return null;const u=new eH(this,o,t,r);return this._bindAction(u,c),this._addInactiveAction(u,a,s),u}existingAction(e,t){const r=t||this._root,i=r.uuid,s=typeof e=="string"?Ey.findByName(r,e):e,o=s?s.uuid:e,a=this._actionsByClip[o];return a!==void 0&&a.actionByRoot[i]||null}stopAllAction(){const e=this._actions,t=this._nActiveActions;for(let r=t-1;r>=0;--r)e[r].stop();return this}update(e){e*=this.timeScale;const t=this._actions,r=this._nActiveActions,i=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==r;++c)t[c]._update(i,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,r=e.uuid,i=this._actionsByClip,s=i[r];if(s!==void 0){const o=s.knownActions;for(let a=0,l=o.length;a!==l;++a){const c=o[a];this._deactivateAction(c);const u=c._cacheIndex,d=t[t.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,d._cacheIndex=u,t[u]=d,t.pop(),this._removeInactiveBindingsForAction(c)}delete i[r]}}uncacheRoot(e){const t=e.uuid,r=this._actionsByClip;for(const o in r){const a=r[o].actionByRoot,l=a[t];l!==void 0&&(this._deactivateAction(l),this._removeInactiveAction(l))}const i=this._bindingsByRootAndName,s=i[t];if(s!==void 0)for(const o in s){const a=s[o];a.restoreOriginalState(),this._removeInactiveBinding(a)}}uncacheAction(e,t){const r=this.existingAction(e,t);r!==null&&(this._deactivateAction(r),this._removeInactiveAction(r))}}class UP{constructor(e){this.value=e}clone(){return new UP(this.value.clone===void 0?this.value:this.value.clone())}}let Pfe=0;class Nfe extends Rl{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:Pfe++}),this.name="",this.usage=gy,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const t=this.uniforms.indexOf(e);return t!==-1&&this.uniforms.splice(t,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){return this.dispatchEvent({type:"dispose"}),this}copy(e){this.name=e.name,this.usage=e.usage;const t=e.uniforms;this.uniforms.length=0;for(let r=0,i=t.length;r<i;r++){const s=Array.isArray(t[r])?t[r]:[t[r]];for(let o=0;o<s.length;o++)this.uniforms.push(s[o].clone())}return this}clone(){return new this.constructor().copy(this)}}class Ife extends Bw{constructor(e,t,r=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}class Lfe{constructor(e,t,r,i,s){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=r,this.elementSize=i,this.count=s,this.version=0}set needsUpdate(e){e===!0&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}class VP{constructor(e,t,r=0,i=1/0){this.ray=new Lp(e,t),this.near=r,this.far=i,this.camera=null,this.layers=new pd,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster:
4186Unsupported camera type: "+t.type)}intersectObject(e,t=!0,r=[]){return uC(e,this,r,t),r.sort(K4),r}intersectObjects(e,t=!0,r=[]){for(let i=0,s=e.length;i<s;i++)uC(e[i],this,r,t);return r.sort(K4),r}}function K4(n,e){return n.distance-e.distance}function uC(n,e,t,r){if(n.layers.test(e.layers)&&n.raycast(e,t),r===!0){const i=n.children;for(let s=0,o=i.length;s<o;s++)uC(i[s],e,t,!0)}}class tH{constructor(e=1,t=0,r=0){return this.radius=e,this.phi=t,this.theta=r,this}set(e,t,r){return this.radius=e,this.phi=t,this.theta=r,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,r){return this.radius=Math.sqrt(e*e+t*t+r*r),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,r),this.phi=Math.acos(fr(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class Dfe{constructor(e=1,t=0,r=0){return this.radius=e,this.theta=t,this.y=r,this}set(e,t,r){return this.radius=e,this.theta=t,this.y=r,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,r){return this.radius=Math.sqrt(e*e+r*r),this.theta=Math.atan2(e,r),this.y=t,this}clone(){return new this.constructor().copy(this)}}const Y4=new Te;class kfe{constructor(e=new Te(1/0,1/0),t=new Te(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,r=e.length;t<r;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const r=Y4.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Y4).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Q4=new K,Px=new K;class Ofe{constructor(e=new K,t=new K){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){Q4.subVectors(e,this.start),Px.subVectors(this.end,this.start);const r=Px.dot(Px);let s=Px.dot(Q4)/r;return t&&(s=fr(s,0,1)),s}closestPointToPoint(e,t,r){const i=this.closestPointToPointParameter(e,t);return this.delta(r).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const J4=new K;class Ffe extends yn{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const r=new Xt,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o<l;o++,a++){const c=o/l*Math.PI*2,u=a/l*Math.PI*2;i.push(Math.cos(c),Math.sin(c),1,Math.cos(u),Math.sin(u),1)}r.setAttribute("position",new pt(i,3));const s=new rs({fog:!1,toneMapped:!1});this.cone=new Va(r,s),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1);const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),J4.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(J4),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const $l=new K,Nx=new kt,uT=new kt;class Ufe extends Va{constructor(e){const t=nH(e),r=new Xt,i=[],s=[],o=new tt(0,0,1),a=new tt(0,1,0);for(let c=0;c<t.length;c++){const u=t[c];u.parent&&u.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),s.push(o.r,o.g,o.b),s.push(a.r,a.g,a.b))}r.setAttribute("position",new pt(i,3)),r.setAttribute("color",new pt(s,3));const l=new rs({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(r,l),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,r=this.geometry,i=r.getAttribute("position");uT.copy(this.root.matrixWorld).invert();for(let s=0,o=0;s<t.length;s++){const a=t[s];a.parent&&a.parent.isBone&&(Nx.multiplyMatrices(uT,a.matrixWorld),$l.setFromMatrixPosition(Nx),i.setXYZ(o,$l.x,$l.y,$l.z),Nx.multiplyMatrices(uT,a.parent.matrixWorld),$l.setFromMatrixPosition(Nx),i.setXYZ(o+1,$l.x,$l.y,$l.z),o+=2)}r.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose()}}function nH(n){const e=[];n.isBone===!0&&e.push(n);for(let t=0;t<n.children.length;t++)e.push.apply(e,nH(n.children[t]));return e}class Vfe extends Ur{constructor(e,t,r){const i=new dv(t,4,2),s=new ru({wireframe:!0,fog:!1,toneMapped:!1});super(i,s),this.light=e,this.color=r,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const jfe=new K,Z4=new tt,eO=new tt;class Bfe extends yn{constructor(e,t,r){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=r,this.type="HemisphereLightHelper";const i=new uv(t);i.rotateY(Math.PI*.5),this.material=new ru({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const s=i.getAttribute("position"),o=new Float32Array(s.count*3);i.setAttribute("color",new an(o,3)),this.add(new Ur(i,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");Z4.copy(this.light.color),eO.copy(this.light.groundColor);for(let r=0,i=t.count;r<i;r++){const s=r<i/2?Z4:eO;t.setXYZ(r,s.r,s.g,s.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(jfe.setFromMatrixPosition(this.light.matrixWorld).negate())}}class zfe extends Va{constructor(e=10,t=10,r=4473924,i=8947848){r=new tt(r),i=new tt(i);const s=t/2,o=e/t,a=e/2,l=[],c=[];for(let m=0,g=0,v=-a;m<=t;m++,v+=o){l.push(-a,0,v,a,0,v),l.push(v,0,-a,v,0,a);const _=m===s?r:i;_.toArray(c,g),g+=3,_.toArray(c,g),g+=3,_.toArray(c,g),g+=3,_.toArray(c,g),g+=3}const u=new Xt;u.setAttribute("position",new pt(l,3)),u.setAttribute("color",new pt(c,3));const d=new rs({vertexColors:!0,toneMapped:!1});super(u,d),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class Hfe extends Va{constructor(e=10,t=16,r=8,i=64,s=4473924,o=8947848){s=new tt(s),o=new tt(o);const a=[],l=[];
vendor: 21,555 bytes, lines 4186-4194
4186if(t>1)for(let d=0;d<t;d++){const m=d/t*(Math.PI*2),g=Math.sin(m)*e,v=Math.cos(m)*e;a.push(0,0,0),a.push(g,0,v);const _=d&1?s:o;l.push(_.r,_.g,_.b),l.push(_.r,_.g,_.b)}for(let d=0;d<r;d++){const m=d&1?s:o,g=e-e/r*d;for(let v=0;v<i;v++){let _=v/i*(Math.PI*2),x=Math.sin(_)*g,y=Math.cos(_)*g;a.push(x,0,y),l.push(m.r,m.g,m.b),_=(v+1)/i*(Math.PI*2),x=Math.sin(_)*g,y=Math.cos(_)*g,a.push(x,0,y),l.push(m.r,m.g,m.b)}}const c=new Xt;c.setAttribute("position",new pt(a,3)),c.setAttribute("color",new pt(l,3));const u=new rs({vertexColors:!0,toneMapped:!1});super(c,u),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const tO=new K,Ix=new K,nO=new K;class Gfe extends yn{constructor(e,t,r){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=r,this.type="DirectionalLightHelper",t===void 0&&(t=1);let i=new Xt;i.setAttribute("position",new pt([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const s=new rs({fog:!1,toneMapped:!1});this.lightPlane=new Hc(i,s),this.add(this.lightPlane),i=new Xt,i.setAttribute("position",new pt([0,0,0,0,0,1],3)),this.targetLine=new Hc(i,s),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),tO.setFromMatrixPosition(this.light.matrixWorld),Ix.setFromMatrixPosition(this.light.target.matrixWorld),nO.subVectors(Ix,tO),this.lightPlane.lookAt(Ix),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(Ix),this.targetLine.scale.z=nO.length()}}const Lx=new K,cr=new iv;class Wfe extends Va{constructor(e){const t=new Xt,r=new rs({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],s=[],o={};a("n1","n2"),a("n2","n4"),a("n4","n3"),a("n3","n1"),a("f1","f2"),a("f2","f4"),a("f4","f3"),a("f3","f1"),a("n1","f1"),a("n2","f2"),a("n3","f3"),a("n4","f4"),a("p","n1"),a("p","n2"),a("p","n3"),a("p","n4"),a("u1","u2"),a("u2","u3"),a("u3","u1"),a("c","t"),a("p","c"),a("cn1","cn2"),a("cn3","cn4"),a("cf1","cf2"),a("cf3","cf4");function a(v,_){l(v),l(_)}function l(v){i.push(0,0,0),s.push(0,0,0),o[v]===void 0&&(o[v]=[]),o[v].push(i.length/3-1)}t.setAttribute("position",new pt(i,3)),t.setAttribute("color",new pt(s,3)),super(t,r),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update();const c=new tt(16755200),u=new tt(16711680),d=new tt(43775),m=new tt(16777215),g=new tt(3355443);this.setColors(c,u,d,m,g)}setColors(e,t,r,i,s){const a=this.geometry.getAttribute("color");a.setXYZ(0,e.r,e.g,e.b),a.setXYZ(1,e.r,e.g,e.b),a.setXYZ(2,e.r,e.g,e.b),a.setXYZ(3,e.r,e.g,e.b),a.setXYZ(4,e.r,e.g,e.b),a.setXYZ(5,e.r,e.g,e.b),a.setXYZ(6,e.r,e.g,e.b),a.setXYZ(7,e.r,e.g,e.b),a.setXYZ(8,e.r,e.g,e.b),a.setXYZ(9,e.r,e.g,e.b),a.setXYZ(10,e.r,e.g,e.b),a.setXYZ(11,e.r,e.g,e.b),a.setXYZ(12,e.r,e.g,e.b),a.setXYZ(13,e.r,e.g,e.b),a.setXYZ(14,e.r,e.g,e.b),a.setXYZ(15,e.r,e.g,e.b),a.setXYZ(16,e.r,e.g,e.b),a.setXYZ(17,e.r,e.g,e.b),a.setXYZ(18,e.r,e.g,e.b),a.setXYZ(19,e.r,e.g,e.b),a.setXYZ(20,e.r,e.g,e.b),a.setXYZ(21,e.r,e.g,e.b),a.setXYZ(22,e.r,e.g,e.b),a.setXYZ(23,e.r,e.g,e.b),a.setXYZ(24,t.r,t.g,t.b),a.setXYZ(25,t.r,t.g,t.b),a.setXYZ(26,t.r,t.g,t.b),a.setXYZ(27,t.r,t.g,t.b),a.setXYZ(28,t.r,t.g,t.b),a.setXYZ(29,t.r,t.g,t.b),a.setXYZ(30,t.r,t.g,t.b),a.setXYZ(31,t.r,t.g,t.b),a.setXYZ(32,r.r,r.g,r.b),a.setXYZ(33,r.r,r.g,r.b),a.setXYZ(34,r.r,r.g,r.b),a.setXYZ(35,r.r,r.g,r.b),a.setXYZ(36,r.r,r.g,r.b),a.setXYZ(37,r.r,r.g,r.b),a.setXYZ(38,i.r,i.g,i.b),a.setXYZ(39,i.r,i.g,i.b),a.setXYZ(40,s.r,s.g,s.b),a.setXYZ(41,s.r,s.g,s.b),a.setXYZ(42,s.r,s.g,s.b),a.setXYZ(43,s.r,s.g,s.b),a.setXYZ(44,s.r,s.g,s.b),a.setXYZ(45,s.r,s.g,s.b),a.setXYZ(46,s.r,s.g,s.b),a.setXYZ(47,s.r,s.g,s.b),a.setXYZ(48,s.r,s.g,s.b),a.setXYZ(49,s.r,s.g,s.b),a.needsUpdate=!0}update(){const e=this.geometry,t=this.pointMap,r=1,i=1;cr.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),yr("c",t,e,cr,0,0,-1),yr("t",t,e,cr,0,0,1),yr("n1",t,e,cr,-r,-i,-1),yr("n2",t,e,cr,r,-i,-1),yr("n3",t,e,cr,-r,i,-1),yr("n4",t,e,cr,r,i,-1),yr("f1",t,e,cr,-r,-i,1),yr("f2",t,e,cr,r,-i,1),yr("f3",t,e,cr,-r,i,1),yr("f4",t,e,cr,r,i,1),yr("u1",t,e,cr,r*.7,i*1.1,-1),yr("u2",t,e,cr,-r*.7,i*1.1,-1),yr("u3",t,e,cr,0,i*2,-1),yr("cf1",t,e,cr,-r,0,1),yr("cf2",t,e,cr,r,0,1),yr("cf3",t,e,cr,0,-i,1),yr("cf4",t,e,cr,0,i,1),yr("cn1",t,e,cr,-r,0,-1),yr("cn2",t,e,cr,r,0,-1),yr("cn3",t,e,cr,0,-i,-1),yr("cn4",t,e,cr,0,i,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function yr(n,e,t,r,i,s,o){Lx.set(i,s,o).unproject(r);const a=e[n];if(a!==void 0){const l=t.getAttribute("position");for(let c=0,u=a.length;c<u;c++)l.setXYZ(a[c],Lx.x,Lx.y,Lx.z)}}const Dx=new es;class $fe extends Va{constructor(e,t=16776960){const r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Float32Array(8*3),s=new Xt;s.setIndex(new an(r,1)),s.setAttribute("position",new an(i,3)),super(s,new rs({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&Dx.setFromObject(this.object),Dx.isEmpty())return;const t=Dx.min,r=Dx.max,i=this.geometry.attributes.position,s=i.array;s[0]=r.x,s[1]=r.y,s[2]=r.z,s[3]=t.x,s[4]=r.y,s[5]=r.z,s[6]=t.x,s[7]=t.y,s[8]=r.z,s[9]=r.x,s[10]=t.y,s[11]=r.z,s[12]=r.x,s[13]=r.y,s[14]=t.z,s[15]=t.x,s[16]=r.y,s[17]=t.z,s[18]=t.x,s[19]=t.y,s[20]=t.z,s[21]=r.x,s[22]=t.y,s[23]=t.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class qfe extends Va{constructor(e,t=16776960){const r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],s=new Xt;s.setIndex(new an(r,1)),s.setAttribute("position",new pt(i,3)),super(s,new rs({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class Xfe extends Hc{constructor(e,t=1,r=16776960){const i=r,s=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],o=new Xt;o.setAttribute("position",new pt(s,3)),o.computeBoundingSphere(),super(o,new rs({color:i,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const a=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],l=new Xt;l.setAttribute("position",new pt(a,3)),l.computeBoundingSphere(),this.add(new Ur(l,new ru({color:i,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const rO=new K;let kx,dT;class Kfe extends yn{constructor(e=new K(0,0,1),t=new K(0,0,0),r=1,i=16776960,s=r*.2,o=s*.2){super(),this.type="ArrowHelper",kx===void 0&&(kx=new Xt,kx.setAttribute("position",new pt([0,0,0,0,1,0],3)),dT=new kp(0,.5,1,5,1),dT.translate(0,-.5,0)),this.position.copy(t),this.line=new Hc(kx,new rs({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Ur(dT,new ru({color:i,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(r,s,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{rO.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(rO,t)}}setLength(e,t=e*.2,r=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(r,t,r),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Yfe extends Va{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new Xt;i.setAttribute("position",new pt(t,3)),i.setAttribute("color",new pt(r,3));const s=new rs({vertexColors:!0,toneMapped:!1});super(i,s),this.type="AxesHelper"}setColors(e,t,r){const i=new tt,s=this.geometry.attributes.color.array;return i.set(e),i.toArray(s,0),i.toArray(s,3),i.set(t),i.toArray(s,6),i.toArray(s,9),i.set(r),i.toArray(s,12),i.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Qfe{constructor(){this.type="ShapePath",this.color=new tt,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new vy,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,r,i){return this.currentPath.quadraticCurveTo(e,t,r,i),this}bezierCurveTo(e,t,r,i,s,o){return this.currentPath.bezierCurveTo(e,t,r,i,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(y){const S=[];for(let b=0,A=y.length;b<A;b++){const k=y[b],L=new gd;L.curves=k.curves,S.push(L)}return S}function r(y,S){const b=S.length;let A=!1;for(let k=b-1,L=0;L<b;k=L++){let C=S[k],P=S[L],R=P.x-C.x,N=P.y-C.y;if(Math.abs(N)>Number.EPSILON){if(N<0&&(C=S[L],R=-R,P=S[k],N=-N),y.y<C.y||y.y>P.y)continue;if(y.y===C.y){if(y.x===C.x)return!0}else{const O=N*(y.x-C.x)-R*(y.y-C.y);if(O===0)return!0;if(O<0)continue;A=!A}}else{if(y.y!==C.y)continue;if(P.x<=y.x&&y.x<=C.x||C.x<=y.x&&y.x<=P.x)return!0}}return A}const i=Ra.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const c=[];if(s.length===1)return a=s[0],l=new gd,l.curves=a.curves,c.push(l),c;let u=!i(s[0].getPoints());u=e?!u:u;const d=[],m=[];let g=[],v=0,_;m[v]=void 0,g[v]=[];for(let y=0,S=s.length;y<S;y++)a=s[y],_=a.getPoints(),o=i(_),o=e?!o:o,o?(!u&&m[v]&&v++,m[v]={s:new gd,p:_},m[v].s.curves=a.curves,u&&v++,g[v]=[]):g[v].push({h:a,p:_[0]});if(!m[0])return t(s);if(m.length>1){let y=!1,S=0;for(let b=0,A=m.length;b<A;b++)d[b]=[];for(let b=0,A=m.length;b<A;b++){const k=g[b];for(let L=0;L<k.length;L++){const C=k[L];let P=!0;for(let R=0;R<m.length;R++)r(C.p,m[R].p)&&(b!==R&&S++,P?(P=!1,d[R].push(C)):y=!0);P&&d[b].push(C)}}S>0&&y===!1&&(g=d)}let x;for(let y=0,S=m.length;y<S;y++){l=m[y].s,c.push(l),x=g[y];for(let b=0,A=x.length;b<A;b++)l.holes.push(x[b].h)}return c}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Np}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Np);const Jfe=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:KR,AddEquation:ic,AddOperation:v6,AdditiveAnimationBlendMode:iP,AdditiveBlending:S1,AgXToneMapping:b6,AlphaFormat:A6,AlwaysCompare:W6,AlwaysDepth:d6,AlwaysStencilFunc:eC,AmbientLight:$8,AnimationAction:eH,AnimationClip:Ey,AnimationLoader:efe,AnimationMixer:Rfe,AnimationObjectGroup:Afe,AnimationUtils:Yhe,ArcCurve:v8,ArrayCamera:l8,ArrowHelper:Kfe,AttachedBindMode:CA,Audio:J8,AudioAnalyser:yfe,AudioContext:DP,AudioListener:pfe,AudioLoader:dfe,AxesHelper:Yfe,BackSide:Zr,BasicDepthPacking:O6,BasicShadowMap:qz,BatchedMesh:m8,Bone:xP,BooleanKeyframeTrack:jd,Box2:kfe,Box3:es,Box3Helper:qfe,BoxGeometry:Vd,BoxHelper:$fe,BufferAttribute:an,BufferGeometry:Xt,BufferGeometryLoader:Q8,ByteType:T6,Cache:cl,Camera:iv,CameraHelper:Wfe,CanvasTexture:_he,CapsuleGeometry:Ww,CatmullRomCurve3:x8,CineonToneMapping:w6,CircleGeometry:$w,ClampToEdgeWrapping:Ii,Clock:kP,Color:tt,ColorKeyframeTrack:NP,ColorManagement:Pn,CompressedArrayTexture:vhe,CompressedCubeTexture:xhe,CompressedTexture:Hw,CompressedTextureLoader:tfe,ConeGeometry:qw,ConstantAlphaFactor:l6,ConstantColorFactor:o6,CubeCamera:Z6,CubeReflectionMapping:wl,CubeRefractionMapping:Bc,CubeTexture:sv,CubeTextureLoader:nfe,CubeUVReflectionMapping:Ip,CubicBezierCurve:SP,CubicBezierCurve3:_8,CubicInterpolant:U8,CullFaceBack:bA,CullFaceFront:$z,CullFaceFrontBack:loe,CullFaceNone:Wz,Curve:ra,CurvePath:S8,CustomBlending:Xz,CustomToneMapping:S6,CylinderGeometry:kp,Cylindrical:Dfe,Data3DTexture:cP,DataArrayTexture:Fw,DataTexture:md,DataTextureLoader:rfe,DataUtils:yae,DecrementStencilOp:_oe,DecrementWrapStencilOp:Soe,DefaultLoadingManager:B8,DepthFormat:Tc,DepthStencilFormat:Ed,DepthTexture:fP,DetachedBindMode:E6,DirectionalLight:W8,DirectionalLightHelper:Gfe,DiscreteInterpolant:V8,DisplayP3ColorSpace:Ow,DodecahedronGeometry:Xw,DoubleSide:Us,DstAlphaFactor:t6,DstColorFactor:r6,DynamicCopyUsage:Foe,DynamicDrawUsage:Noe,DynamicReadUsage:Doe,EdgesGeometry:b8,EllipseCurve:Gw,EqualCompare:B6,EqualDepth:f6,EqualStencilFunc:Moe,EquirectangularReflectionMapping:oy,EquirectangularRefractionMapping:ay,Euler:rv,EventDispatcher:Rl,ExtrudeGeometry:Yw,FileLoader:Sl,Float16BufferAttribute:bae,Float32BufferAttribute:pt,Float64BufferAttribute:Eae,FloatType:$o,Fog:jw,FogExp2:Vw,FramebufferTexture:yhe,FrontSide:_l,Frustum:ov,GLBufferAttribute:Lfe,GLSL1:Voe,GLSL3:tC,GreaterCompare:z6,GreaterDepth:m6,GreaterEqualCompare:G6,GreaterEqualDepth:p6,GreaterEqualStencilFunc:Poe,GreaterStencilFunc:Coe,GridHelper:zfe,Group:vf,HalfFloatType:op,HemisphereLight:z8,HemisphereLightHelper:Bfe,IcosahedronGeometry:Qw,ImageBitmapLoader:ufe,ImageLoader:Ty,ImageUtils:lP,IncrementStencilOp:xoe,IncrementWrapStencilOp:woe,InstancedBufferAttribute:up,InstancedBufferGeometry:Y8,InstancedInterleavedBuffer:Ife,InstancedMesh:p8,Int16BufferAttribute:wae,Int32BufferAttribute:Sae,Int8BufferAttribute:vae,IntType:QR,InterleavedBuffer:Bw,InterleavedBufferAttribute:Td,Interpolant:hv,InterpolateDiscrete:uy,InterpolateLinear:dy,InterpolateSmooth:__,InvertStencilOp:boe,KeepStencilOp:zu,KeyframeTrack:ia,LOD:h8,LatheGeometry:cv,Layers:pd,LessCompare:j6,LessDepth:h6,LessEqualCompare:oP,LessEqualDepth:sy,LessEqualStencilFunc:Aoe,LessStencilFunc:Toe,Light:su,LightProbe:K8,Line:Hc,Line3:Ofe,LineBasicMaterial:rs,LineCurve:bP,LineCurve3:w8,LineDashedMaterial:k8,LineLoop:g8,LineSegments:Va,LinearDisplayP3ColorSpace:nv,LinearEncoding:sP,LinearFilter:Sr,LinearInterpolant:PP,LinearMipMapLinearFilter:foe,LinearMipMapNearestFilter:hoe,LinearMipmapLinearFilter:zc,LinearMipmapNearestFilter:YR,LinearSRGBColorSpace:Oa,LinearToneMapping:x6,LinearTransfer:fy,Loader:Es,LoaderUtils:cC,LoadingManager:IP,LoopOnce:L6,LoopPingPong:k6,LoopRepeat:D6,LuminanceAlphaFormat:R6,LuminanceFormat:C6,MOUSE:ooe,Material:Oi,MaterialLoader:iS,MathUtils:$6,Matrix3:en,Matrix4:kt,MaxEquation:AA,Mesh:Ur,MeshBasicMaterial:ru,MeshDepthMaterial:pP,MeshDistanceMaterial:mP,MeshLambertMaterial:L8,MeshMatcapMaterial:D8,MeshNormalMaterial:I8,MeshPhongMaterial:P8,MeshPhysicalMaterial:CP,MeshStandardMaterial:AP,MeshToonMaterial:N8,MinEquation:MA,MirroredRepeatWrapping:cy,MixOperation:y6,MultiplyBlending:TA,MultiplyOperation:tv,NearestFilter:xr,NearestMipMapLinearFilter:doe,NearestMipMapNearestFilter:uoe,NearestMipmapLinearFilter:_g,NearestMipmapNearestFilter:T1,NeverCompare:V6,NeverDepth:u6,NeverStencilFunc:Eoe,NoBlending:dl,NoColorSpace:Vs,NoToneMapping:Aa,NormalAnimationBlendMode:kw,NormalBlending:hd,NotEqualCompare:H6,NotEqualDepth:g6,NotEqualStencilFunc:Roe,NumberKeyframeTrack:Sy,Object3D:yn,ObjectLoader:lfe,ObjectSpaceNormalMap:U6,OctahedronGeometry:uv,OneFactor:Jz,OneMinusConstantAlphaFactor:c6,OneMinusConstantColorFactor:a6,OneMinusDstAlphaFactor:n6,OneMinusDstColorFactor:i6,OneMinusSrcAlphaFactor:E1,OneMinusSrcColorFactor:e6,OrthographicCamera:lv,P3Primaries:my,PCFShadowMap:Iw,PCFSoftShadowMap:xg,PMREMGenerator:rC,Path:vy,PerspectiveCamera:Qr,Plane:ec,PlaneGeometry:av,PlaneHelper:Xfe,PointLight:G8,PointLightHelper:Vfe,Points:y8,PointsMaterial:_P,PolarGridHelper:Hfe,PolyhedronGeometry:iu,PositionalAudio:gfe,PropertyBinding:mn,PropertyMixer:Z8,QuadraticBezierCurve:EP,QuadraticBezierCurve3:TP,Quaternion:ws,QuaternionKeyframeTrack:Op,QuaternionLinearInterpolant:j8,RED_GREEN_RGTC2_Format:JA,RED_RGTC1_Format:I6,REVISION:Np,RGBADepthPacking:F6,RGBAFormat:Xi,RGBAIntegerFormat:nP,RGBA_ASTC_10x10_Format:$A,RGBA_ASTC_10x5_Format:HA,RGBA_ASTC_10x6_Format:GA,RGBA_ASTC_10x8_Format:WA,RGBA_ASTC_12x10_Format:qA,RGBA_ASTC_12x12_Format:XA,RGBA_ASTC_4x4_Format:kA,RGBA_ASTC_5x4_Format:OA,RGBA_ASTC_5x5_Format:FA,RGBA_ASTC_6x5_Format:UA,RGBA_ASTC_6x6_Format:VA,RGBA_ASTC_8x5_Format:jA,RGBA_ASTC_8x6_Format:BA,RGBA_ASTC_8x8_Format:zA,RGBA_BPTC_Format:x_,RGBA_ETC2_EAC_Format:DA,RGBA_PVRTC_2BPPV1_Format:IA,RGBA_PVRTC_4BPPV1_Format:NA,RGBA_S3TC_DXT1_Format:g_,RGBA_S3TC_DXT3_Format:y_,RGBA_S3TC_DXT5_Format:v_,RGB_BPTC_SIGNED_Format:KA,RGB_BPTC_UNSIGNED_Format:YA,RGB_ETC1_Format:rP,RGB_ETC2_Format:LA,RGB_PVRTC_2BPPV1_Format:PA,RGB_PVRTC_4BPPV1_Format:RA,RGB_S3TC_DXT1_Format:m_,RGFormat:N6,RGIntegerFormat:tP,RawShaderMaterial:R8,Ray:Lp,Raycaster:VP,Rec709Primaries:py,RectAreaLight:q8,RedFormat:P6,RedIntegerFormat:eP,ReinhardToneMapping:_6,RenderTarget:K6,RepeatWrapping:ly,ReplaceStencilOp:voe,ReverseSubtractEquation:Yz,RingGeometry:Jw,SIGNED_RED_GREEN_RGTC2_Format:ZA,SIGNED_RED_RGTC1_Format:QA,SRGBColorSpace:Or,SRGBTransfer:On,Scene:yP,ShaderChunk:Yt,ShaderLib:Go,ShaderMaterial:bo,ShadowMaterial:C8,Shape:gd,ShapeGeometry:Zw,ShapePath:Qfe,ShapeUtils:Ra,ShortType:M6,Skeleton:zw,SkeletonHelper:Ufe,SkinnedMesh:f8,Source:Zu,Sphere:Di,SphereGeometry:dv,Spherical:tH,SphericalHarmonics3:X8,SplineCurve:MP,SpotLight:H8,SpotLightHelper:Ffe,Sprite:d8,SpriteMaterial:vP,SrcAlphaFactor:b1,SrcAlphaSaturateFactor:s6,SrcColorFactor:Zz,StaticCopyUsage:Ooe,StaticDrawUsage:gy,StaticReadUsage:Loe,StereoCamera:hfe,StreamCopyUsage:Uoe,StreamDrawUsage:Ioe,StreamReadUsage:koe,StringKeyframeTrack:Bd,SubtractEquation:Kz,SubtractiveBlending:EA,TOUCH:aoe,TangentSpaceNormalMap:nu,TetrahedronGeometry:eS,Texture:br,TextureLoader:ife,TorusGeometry:tS,TorusKnotGeometry:nS,Triangle:ps,TriangleFanDrawMode:goe,TriangleStripDrawMode:moe,TrianglesDrawMode:poe,TubeGeometry:rS,TwoPassDoubleSide:coe,UVMapping:Lw,Uint16BufferAttribute:uP,Uint32BufferAttribute:dP,Uint8BufferAttribute:xae,Uint8ClampedBufferAttribute:_ae,Uniform:UP,UniformsGroup:Nfe,UniformsLib:qe,UniformsUtils:J6,UnsignedByteType:Ca,UnsignedInt248Type:Ec,UnsignedIntType:ll,UnsignedShort4444Type:JR,UnsignedShort5551Type:ZR,UnsignedShortType:Dw,VSMShadowMap:Vo,Vector2:Te,Vector3:K,Vector4:Nn,VectorKeyframeTrack:by,VideoTexture:ghe,WebGL1Renderer:c8,WebGL3DRenderTarget:sae,WebGLArrayRenderTarget:iae,WebGLCoordinateSystem:qo,WebGLCubeRenderTarget:e8,WebGLMultipleRenderTargets:oae,WebGLRenderTarget:ta,WebGLRenderer:gP,WebGLUtils:a8,WebGPUCoordinateSystem:ap,WireframeGeometry:A8,WrapAroundEnding:hy,ZeroCurvatureEnding:Qu,ZeroFactor:Qz,ZeroSlopeEnding:Ju,ZeroStencilOp:yoe,_SRGBAFormat:M1,createCanvasElement:X6,sRGBEncoding:Mc},Symbol.toStringTag,{value:"Module"}));var rH={exports:{}},zd={};/** 4187 * @license React 4188 * react-reconciler-constants.production.min.js 4189 * 4190 * Copyright (c) Facebook, Inc. and its affiliates. 4191 * 4192 * This source code is licensed under the MIT license found in the 4193 * LICENSE file in the root directory of this source tree. 4194 */zd.ConcurrentRoot=1;zd.ContinuousEventPriority=4;zd.DefaultEventPriority=16;zd.DiscreteEventPriority=1;zd.IdleEventPriority=536870912;zd.LegacyRoot=0;rH.exports=zd;var _f=rH.exports;function Zfe(n){let e;const t=new Set,r=(c,u)=>{const d=typeof c=="function"?c(e):c;if(d!==e){const m=e;e=u?d:Object.assign({},e,d),t.forEach(g=>g(e,m))}},i=()=>e,s=(c,u=i,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let m=u(e);function g(){const v=u(e);if(!d(m,v)){const _=m;c(m=v,_)}}return t.add(g),()=>t.delete(g)},l={setState:r,getState:i,subscribe:(c,u,d)=>u||d?s(c,u,d):(t.add(c),()=>t.delete(c)),destroy:()=>t.clear()};return e=n(r,i,l),l}const epe=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),iO=epe?M.useEffect:M.useLayoutEffect;function iH(n){const e=typeof n=="function"?Zfe(n):n,t=(r=e.getState,i=Object.is)=>{const[,s]=M.useReducer(x=>x+1,0),o=e.getState(),a=M.useRef(o),l=M.useRef(r),c=M.useRef(i),u=M.useRef(!1),d=M.useRef();d.current===void 0&&(d.current=r(o));let m,g=!1;(a.current!==o||l.current!==r||c.current!==i||u.current)&&(m=r(o),g=!i(d.current,m)),iO(()=>{g&&(d.current=m),a.current=o,l.current=r,c.current=i,u.current=!1});const v=M.useRef(o);iO(()=>{const x=()=>{try{const S=e.getState(),b=l.current(S);c.current(d.current,b)||(a.current=S,d.current=b,s())}catch{u.current=!0,s()}},y=e.subscribe(x);return e.getState()!==v.current&&x(),y},[]);const _=g?m:d.current;return M.useDebugValue(_),_};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[t,e];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},t}
vendor: 4,863 bytes, lines 4194-4210
4194var sH={exports:{}},hT={exports:{}},fT={};/** 4195 * @license React 4196 * scheduler.production.min.js 4197 * 4198 * Copyright (c) Facebook, Inc. and its affiliates. 4199 * 4200 * This source code is licensed under the MIT license found in the 4201 * LICENSE file in the root directory of this source tree. 4202 */var sO;function tpe(){return sO||(sO=1,function(n){function e(j,z){var q=j.length;j.push(z);e:for(;0<q;){var Z=q-1>>>1,re=j[Z];if(0<i(re,z))j[Z]=z,j[q]=re,q=Z;else break e}}function t(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var z=j[0],q=j.pop();if(q!==z){j[0]=q;e:for(var Z=0,re=j.length,te=re>>>1;Z<te;){var ae=2*(Z+1)-1,we=j[ae],Re=ae+1,de=j[Re];if(0>i(we,q))Re<re&&0>i(de,we)?(j[Z]=de,j[Re]=q,Z=Re):(j[Z]=we,j[ae]=q,Z=ae);else if(Re<re&&0>i(de,q))j[Z]=de,j[Re]=q,Z=Re;else break e}}return z}function i(j,z){var q=j.sortIndex-z.sortIndex;return q!==0?q:j.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,m=3,g=!1,v=!1,_=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(j){for(var z=t(c);z!==null;){if(z.callback===null)r(c);else if(z.startTime<=j)r(c),z.sortIndex=z.expirationTime,e(l,z);else break;z=t(c)}}function A(j){if(_=!1,b(j),!v)if(t(l)!==null)v=!0,J(k);else{var z=t(c);z!==null&&ie(A,z.startTime-j)}}function k(j,z){v=!1,_&&(_=!1,y(P),P=-1),g=!0;var q=m;try{for(b(z),d=t(l);d!==null&&(!(d.expirationTime>z)||j&&!O());){var Z=d.callback;if(typeof Z=="function"){d.callback=null,m=d.priorityLevel;var re=Z(d.expirationTime<=z);z=n.unstable_now(),typeof re=="function"?d.callback=re:d===t(l)&&r(l),b(z)}else r(l);d=t(l)}if(d!==null)var te=!0;else{var ae=t(c);ae!==null&&ie(A,ae.startTime-z),te=!1}return te}finally{d=null,m=q,g=!1}}var L=!1,C=null,P=-1,R=5,N=-1;function O(){return!(n.unstable_now()-N<R)}function V(){if(C!==null){var j=n.unstable_now();N=j;var z=!0;try{z=C(!0,j)}finally{z?B():(L=!1,C=null)}}else L=!1}var B;if(typeof S=="function")B=function(){S(V)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,ee=W.port2;W.port1.onmessage=V,B=function(){ee.postMessage(null)}}else B=function(){x(V,0)};function J(j){C=j,L||(L=!0,B())}function ie(j,z){P=x(function(){j(n.unstable_now())},z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(j){j.callback=null},n.unstable_continueExecution=function(){v||g||(v=!0,J(k))},n.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<j?Math.floor(1e3/j):5},n.unstable_getCurrentPriorityLevel=function(){return m},n.unstable_getFirstCallbackNode=function(){return t(l)},n.unstable_next=function(j){switch(m){case 1:case 2:case 3:var z=3;break;default:z=m}var q=m;m=z;try{return j()}finally{m=q}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(j,z){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var q=m;m=j;try{return z()}finally{m=q}},n.unstable_scheduleCallback=function(j,z,q){var Z=n.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?Z+q:Z):q=Z,j){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=q+re,j={id:u++,callback:z,priorityLevel:j,startTime:q,expirationTime:re,sortIndex:-1},q>Z?(j.sortIndex=q,e(c,j),t(l)===null&&j===t(c)&&(_?(y(P),P=-1):_=!0,ie(A,q-Z))):(j.sortIndex=re,e(l,j),v||g||(v=!0,J(k))),j},n.unstable_shouldYield=O,n.unstable_wrapCallback=function(j){var z=m;return function(){var q=m;m=z;try{return j.apply(this,arguments)}finally{m=q}}}}(fT)),fT}var oO;function npe(){return oO||(oO=1,hT.exports=tpe()),hT.exports}/** 4203 * @license React 4204 * react-reconciler.production.min.js 4205 * 4206 * Copyright (c) Facebook, Inc. and its affiliates. 4207 * 4208 * This source code is licensed under the MIT license found in the 4209 * LICENSE file in the root directory of this source tree. 4210 */var rpe=function(e){var t={},r=M,i=npe(),s=Object.assign;function o(h){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+h,E=1;E<arguments.length;E++)p+="&args[]="+encodeURIComponent(arguments[E]);return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
vendor: 124,870 bytes, lines 4210-4228
4210var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),v=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),k=Symbol.iterator;function L(h){return h===null||typeof h!="object"?null:(h=k&&h[k]||h["@@iterator"],typeof h=="function"?h:null)}function C(h){if(h==null)return null;if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case u:return"Fragment";case c:return"Portal";case m:return"Profiler";case d:return"StrictMode";case x:return"Suspense";case y:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case v:return(h.displayName||"Context")+".Consumer";case g:return(h._context.displayName||"Context")+".Provider";case _:var p=h.render;return h=h.displayName,h||(h=p.displayName||p.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case S:return p=h.displayName||null,p!==null?p:C(h.type)||"Memo";case b:p=h._payload,h=h._init;try{return C(h(p))}catch{}}return null}function P(h){var p=h.type;switch(h.tag){case 24:return"Cache";case 9:return(p.displayName||"Context")+".Consumer";case 10:return(p._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return h=p.render,h=h.displayName||h.name||"",p.displayName||(h!==""?"ForwardRef("+h+")":"ForwardRef");case 7:return"Fragment";case 5:return p;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return C(p);case 8:return p===d?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p}return null}function R(h){var p=h,E=h;if(h.alternate)for(;p.return;)p=p.return;else{h=p;do p=h,p.flags&4098&&(E=p.return),h=p.return;while(h)}return p.tag===3?E:null}function N(h){if(R(h)!==h)throw Error(o(188))}function O(h){var p=h.alternate;if(!p){if(p=R(h),p===null)throw Error(o(188));return p!==h?null:h}for(var E=h,T=p;;){var I=E.return;if(I===null)break;var F=I.alternate;if(F===null){if(T=I.return,T!==null){E=T;continue}break}if(I.child===F.child){for(F=I.child;F;){if(F===E)return N(I),h;if(F===T)return N(I),p;F=F.sibling}throw Error(o(188))}if(E.return!==T.return)E=I,T=F;else{for(var Y=!1,se=I.child;se;){if(se===E){Y=!0,E=I,T=F;break}if(se===T){Y=!0,T=I,E=F;break}se=se.sibling}if(!Y){for(se=F.child;se;){if(se===E){Y=!0,E=F,T=I;break}if(se===T){Y=!0,T=F,E=I;break}se=se.sibling}if(!Y)throw Error(o(189))}}if(E.alternate!==T)throw Error(o(190))}if(E.tag!==3)throw Error(o(188));return E.stateNode.current===E?h:p}function V(h){return h=O(h),h!==null?B(h):null}function B(h){if(h.tag===5||h.tag===6)return h;for(h=h.child;h!==null;){var p=B(h);if(p!==null)return p;h=h.sibling}return null}function W(h){if(h.tag===5||h.tag===6)return h;for(h=h.child;h!==null;){if(h.tag!==4){var p=W(h);if(p!==null)return p}h=h.sibling}return null}var ee=Array.isArray,J=e.getPublicInstance,ie=e.getRootHostContext,j=e.getChildHostContext,z=e.prepareForCommit,q=e.resetAfterCommit,Z=e.createInstance,re=e.appendInitialChild,te=e.finalizeInitialChildren,ae=e.prepareUpdate,we=e.shouldSetTextContent,Re=e.createTextInstance,de=e.scheduleTimeout,Ge=e.cancelTimeout,$e=e.noTimeout,De=e.isPrimaryRenderer,Ue=e.supportsMutation,Q=e.supportsPersistence,be=e.supportsHydration,ve=e.getInstanceFromNode,Le=e.preparePortalMount,xe=e.getCurrentEventPriority,it=e.detachDeletedInstance,Ye=e.supportsMicrotasks,G=e.scheduleMicrotask,H=e.supportsTestSelectors,le=e.findFiberRoot,Ne=e.getBoundingRect,Ae=e.getTextContent,Ce=e.isHiddenSubtree,st=e.matchAccessibilityRole,Ve=e.setFocusIfFocusable,Qe=e.setupIntersectionObserver,xt=e.appendChild,Ft=e.appendChildToContainer,Pe=e.commitTextUpdate,rn=e.commitMount,zt=e.commitUpdate,Tt=e.insertBefore,dt=e.insertInContainerBefore,nt=e.removeChild,_t=e.removeChildFromContainer,on=e.resetTextContent,bn=e.hideInstance,Bt=e.hideTextInstance,je=e.unhideInstance,ne=e.unhideTextInstance,ke=e.clearContainer,He=e.cloneInstance,wt=e.createContainerChildSet,Ie=e.appendChildToContainerChildSet,gt=e.finalizeContainerChildren,bt=e.replaceContainerChildren,Jt=e.cloneHiddenInstance,vn=e.cloneHiddenTextInstance,tn=e.canHydrateInstance,Mn=e.canHydrateTextInstance,Ln=e.canHydrateSuspenseInstance,ei=e.isSuspenseInstancePending,ja=e.isSuspenseInstanceFallback,Ks=e.registerSuspenseInstanceRetry,oa=e.getNextHydratableSibling,Fi=e.getFirstHydratableChild,du=e.getFirstHydratableChildWithinContainer,hu=e.getFirstHydratableChildWithinSuspenseInstance,fu=e.hydrateInstance,pu=e.hydrateTextInstance,Xd=e.hydrateSuspenseInstance,X=e.getNextHydratableInstanceAfterSuspenseInstance,ce=e.commitHydratedContainer,me=e.commitHydratedSuspenseInstance,ge=e.clearSuspenseBoundary,fe=e.clearSuspenseBoundaryFromContainer,Ze=e.shouldDeleteUnhydratedTailInstances,ht=e.didNotMatchHydratedContainerTextInstance,yt=e.didNotMatchHydratedTextInstance,At;function Ut(h){if(At===void 0)try{throw Error()}catch(E){var p=E.stack.trim().match(/\n( *(at )?)/);At=p&&p[1]||""}return` 4211`+At+h}var Pt=!1;function Lt(h,p){if(!h||Pt)return"";Pt=!0;var E=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(p)if(p=function(){throw Error()},Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(ze){var T=ze}Reflect.construct(h,[],p)}else{try{p.call()}catch(ze){T=ze}h.call(p.prototype)}else{try{throw Error()}catch(ze){T=ze}h()}}catch(ze){if(ze&&T&&typeof ze.stack=="string"){for(var I=ze.stack.split(` 4212`),F=T.stack.split(` 4213`),Y=I.length-1,se=F.length-1;1<=Y&&0<=se&&I[Y]!==F[se];)se--;for(;1<=Y&&0<=se;Y--,se--)if(I[Y]!==F[se]){if(Y!==1||se!==1)do if(Y--,se--,0>se||I[Y]!==F[se]){var _e=` 4214`+I[Y].replace(" at new "," at ");return h.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",h.displayName)),_e}while(1<=Y&&0<=se);break}}}finally{Pt=!1,Error.prepareStackTrace=E}return(h=h?h.displayName||h.name:"")?Ut(h):""}var kn=Object.prototype.hasOwnProperty,pr=[],Rn=-1;function mr(h){return{current:h}}function Ct(h){0>Rn||(h.current=pr[Rn],pr[Rn]=null,Rn--)}function ot(h,p){Rn++,pr[Rn]=h.current,h.current=p}var ss={},Dt=mr(ss),pn=mr(!1),di=ss;function Hr(h,p){var E=h.type.contextTypes;if(!E)return ss;var T=h.stateNode;if(T&&T.__reactInternalMemoizedUnmaskedChildContext===p)return T.__reactInternalMemoizedMaskedChildContext;var I={},F;for(F in E)I[F]=p[F];return T&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=p,h.__reactInternalMemoizedMaskedChildContext=I),I}function ar(h){return h=h.childContextTypes,h!=null}function Vt(){Ct(pn),Ct(Dt)}function Ui(h,p,E){if(Dt.current!==ss)throw Error(o(168));ot(Dt,p),ot(pn,E)}function Ys(h,p,E){var T=h.stateNode;if(p=p.childContextTypes,typeof T.getChildContext!="function")return E;T=T.getChildContext();for(var I in T)if(!(I in p))throw Error(o(108,P(h)||"Unknown",I));return s({},E,T)}function Qn(h){return h=(h=h.stateNode)&&h.__reactInternalMemoizedMergedChildContext||ss,di=Dt.current,ot(Dt,h),ot(pn,pn.current),!0}function Pl(h,p,E){var T=h.stateNode;if(!T)throw Error(o(169));E?(h=Ys(h,p,di),T.__reactInternalMemoizedMergedChildContext=h,Ct(pn),Ct(Dt),ot(Dt,h)):Ct(pn),ot(pn,E)}var hi=Math.clz32?Math.clz32:VS,Kd=Math.log,US=Math.LN2;function VS(h){return h>>>=0,h===0?32:31-(Kd(h)/US|0)|0}var Yd=64,aa=4194304;function Ts(h){switch(h&-h){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 h&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return h&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return h}}function mu(h,p){var E=h.pendingLanes;if(E===0)return 0;var T=0,I=h.suspendedLanes,F=h.pingedLanes,Y=E&268435455;if(Y!==0){var se=Y&~I;se!==0?T=Ts(se):(F&=Y,F!==0&&(T=Ts(F)))}else Y=E&~I,Y!==0?T=Ts(Y):F!==0&&(T=Ts(F));if(T===0)return 0;if(p!==0&&p!==T&&!(p&I)&&(I=T&-T,F=p&-p,I>=F||I===16&&(F&4194240)!==0))return p;if(T&4&&(T|=E&16),p=h.entangledLanes,p!==0)for(h=h.entanglements,p&=T;0<p;)E=31-hi(p),I=1<<E,T|=h[E],p&=~I;return T}function Pv(h,p){switch(h){case 1:case 2:case 4:return p+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return p+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nv(h,p){for(var E=h.suspendedLanes,T=h.pingedLanes,I=h.expirationTimes,F=h.pendingLanes;0<F;){var Y=31-hi(F),se=1<<Y,_e=I[Y];_e===-1?(!(se&E)||se&T)&&(I[Y]=Pv(se,p)):_e<=p&&(h.expiredLanes|=se),F&=~se}}function Qd(h){return h=h.pendingLanes&-1073741825,h!==0?h:h&1073741824?1073741824:0}function Jd(h){for(var p=[],E=0;31>E;E++)p.push(h);return p}function Qs(h,p,E){h.pendingLanes|=p,p!==536870912&&(h.suspendedLanes=0,h.pingedLanes=0),h=h.eventTimes,p=31-hi(p),h[p]=E}function jS(h,p){var E=h.pendingLanes&~p;h.pendingLanes=p,h.suspendedLanes=0,h.pingedLanes=0,h.expiredLanes&=p,h.mutableReadLanes&=p,h.entangledLanes&=p,p=h.entanglements;var T=h.eventTimes;for(h=h.expirationTimes;0<E;){var I=31-hi(E),F=1<<I;p[I]=0,T[I]=-1,h[I]=-1,E&=~F}}function qp(h,p){var E=h.entangledLanes|=p;for(h=h.entanglements;E;){var T=31-hi(E),I=1<<T;I&p|h[T]&p&&(h[T]|=p),E&=~I}}var dn=0;function To(h){return h&=-h,1<h?4<h?h&268435455?16:536870912:4:1}var Xp=i.unstable_scheduleCallback,Zd=i.unstable_cancelCallback,eh=i.unstable_shouldYield,Iv=i.unstable_requestPaint,Gn=i.unstable_now,Ba=i.unstable_ImmediatePriority,Lv=i.unstable_UserBlockingPriority,gu=i.unstable_NormalPriority,Wn=i.unstable_IdlePriority,th=null,Js=null;function Dv(h){if(Js&&typeof Js.onCommitFiberRoot=="function")try{Js.onCommitFiberRoot(th,h,void 0,(h.current.flags&128)===128)}catch{}}function kv(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var Ms=typeof Object.is=="function"?Object.is:kv,os=null,As=!1,nh=!1;function Ov(h){os===null?os=[h]:os.push(h)}function yu(h){As=!0,Ov(h)}function Cs(){if(!nh&&os!==null){nh=!0;var h=0,p=dn;try{var E=os;for(dn=1;h<E.length;h++){var T=E[h];do T=T(!0);while(T!==null)}os=null,As=!1}catch(I){throw os!==null&&(os=os.slice(h+1)),Xp(Ba,Cs),I}finally{dn=p,nh=!1}}return null}var Kp=a.ReactCurrentBatchConfig;function za(h,p){if(Ms(h,p))return!0;if(typeof h!="object"||h===null||typeof p!="object"||p===null)return!1;var E=Object.keys(h),T=Object.keys(p);if(E.length!==T.length)return!1;for(T=0;T<E.length;T++){var I=E[T];if(!kn.call(p,I)||!Ms(h[I],p[I]))return!1}return!0}function Fv(h){switch(h.tag){case 5:return Ut(h.type);case 16:return Ut("Lazy");case 13:return Ut("Suspense");case 19:return Ut("SuspenseList");case 0:case 2:case 15:return h=Lt(h.type,!1),h;case 11:return h=Lt(h.type.render,!1),h;case 1:return h=Lt(h.type,!0),h;default:return""}}function fi(h,p){if(h&&h.defaultProps){p=s({},p),h=h.defaultProps;for(var E in h)p[E]===void 0&&(p[E]=h[E]);return p}return p}var rh=mr(null),vu=null,Zs=null,ih=null;function sh(){ih=Zs=vu=null}function oh(h,p,E){De?(ot(rh,p._currentValue),p._currentValue=E):(ot(rh,p._currentValue2),p._currentValue2=E)}function xu(h){var p=rh.current;Ct(rh),De?h._currentValue=p:h._currentValue2=p}function ah(h,p,E){for(;h!==null;){var T=h.alternate;if((h.childLanes&p)!==p?(h.childLanes|=p,T!==null&&(T.childLanes|=p)):T!==null&&(T.childLanes&p)!==p&&(T.childLanes|=p),h===E)break;h=h.return}}function Mo(h,p){vu=h,ih=Zs=null,h=h.dependencies,h!==null&&h.firstContext!==null&&(h.lanes&p&&(Is=!0),h.firstContext=null)}function Vi(h){var p=De?h._currentValue:h._currentValue2;if(ih!==h)if(h={context:h,memoizedValue:p,next:null},Zs===null){if(vu===null)throw Error(o(308));Zs=h,vu.dependencies={lanes:0,firstContext:h}}else Zs=Zs.next=h;return p}var Rs=null,pi=!1;function lh(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yp(h,p){h=h.updateQueue,p.updateQueue===h&&(p.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,effects:h.effects})}function eo(h,p){return{eventTime:h,lane:p,tag:0,payload:null,callback:null,next:null}}function Ao(h,p){var E=h.updateQueue;E!==null&&(E=E.shared,Er!==null&&h.mode&1&&!(nn&2)?(h=E.interleaved,h===null?(p.next=p,Rs===null?Rs=[E]:Rs.push(E)):(p.next=h.next,h.next=p),E.interleaved=p):(h=E.pending,h===null?p.next=p:(p.next=h.next,h.next=p),E.pending=p))}function Ha(h,p,E){if(p=p.updateQueue,p!==null&&(p=p.shared,(E&4194240)!==0)){var T=p.lanes;T&=h.pendingLanes,E|=T,p.lanes=E,qp(h,E)}}function mi(h,p){var E=h.updateQueue,T=h.alternate;if(T!==null&&(T=T.updateQueue,E===T)){var I=null,F=null;if(E=E.firstBaseUpdate,E!==null){do{var Y={eventTime:E.eventTime,lane:E.lane,tag:E.tag,payload:E.payload,callback:E.callback,next:null};F===null?I=F=Y:F=F.next=Y,E=E.next}while(E!==null);F===null?I=F=p:F=F.next=p}else I=F=p;E={baseState:T.baseState,firstBaseUpdate:I,lastBaseUpdate:F,shared:T.shared,effects:T.effects},h.updateQueue=E;return}h=E.lastBaseUpdate,h===null?E.firstBaseUpdate=p:h.next=p,E.lastBaseUpdate=p}function _u(h,p,E,T){var I=h.updateQueue;pi=!1;var F=I.firstBaseUpdate,Y=I.lastBaseUpdate,se=I.shared.pending;if(se!==null){I.shared.pending=null;var _e=se,ze=_e.next;_e.next=null,Y===null?F=ze:Y.next=ze,Y=_e;var ut=h.alternate;ut!==null&&(ut=ut.updateQueue,se=ut.lastBaseUpdate,se!==Y&&(se===null?ut.firstBaseUpdate=ze:se.next=ze,ut.lastBaseUpdate=_e))}if(F!==null){var Wt=I.baseState;Y=0,ut=ze=_e=null,se=F;do{var Rt=se.lane,Dn=se.eventTime;if((T&Rt)===Rt){ut!==null&&(ut=ut.next={eventTime:Dn,lane:0,tag:se.tag,payload:se.payload,callback:se.callback,next:null});e:{var St=h,xi=se;switch(Rt=p,Dn=E,xi.tag){case 1:if(St=xi.payload,typeof St=="function"){Wt=St.call(Dn,Wt,Rt);break e}Wt=St;break e;case 3:St.flags=St.flags&-65537|128;case 0:if(St=xi.payload,Rt=typeof St=="function"?St.call(Dn,Wt,Rt):St,Rt==null)break e;Wt=s({},Wt,Rt);break e;case 2:pi=!0}}se.callback!==null&&se.lane!==0&&(h.flags|=64,Rt=I.effects,Rt===null?I.effects=[se]:Rt.push(se))}else Dn={eventTime:Dn,lane:Rt,tag:se.tag,payload:se.payload,callback:se.callback,next:null},ut===null?(ze=ut=Dn,_e=Wt):ut=ut.next=Dn,Y|=Rt;if(se=se.next,se===null){if(se=I.shared.pending,se===null)break;Rt=se,se=Rt.next,Rt.next=null,I.lastBaseUpdate=Rt,I.shared.pending=null}}while(!0);if(ut===null&&(_e=Wt),I.baseState=_e,I.firstBaseUpdate=ze,I.lastBaseUpdate=ut,p=I.shared.interleaved,p!==null){I=p;do Y|=I.lane,I=I.next;while(I!==p)}else F===null&&(I.shared.lanes=0);gh|=Y,h.lanes=Y,h.memoizedState=Wt}}function Qp(h,p,E){if(h=p.effects,p.effects=null,h!==null)for(p=0;p<h.length;p++){var T=h[p],I=T.callback;if(I!==null){if(T.callback=null,T=E,typeof I!="function")throw Error(o(191,I));I.call(T)}}}var Ga=new r.Component().refs;function w(h,p,E,T){p=h.memoizedState,E=E(T,p),E=E==null?p:s({},p,E),h.memoizedState=E,h.lanes===0&&(h.updateQueue.baseState=E)}var D={isMounted:function(h){return(h=h._reactInternals)?R(h)===h:!1},enqueueSetState:function(h,p,E){h=h._reactInternals;var T=zi(),I=Ll(h),F=eo(T,I);F.payload=p,E!=null&&(F.callback=E),Ao(h,F),p=io(h,I,T),p!==null&&Ha(p,h,I)},enqueueReplaceState:function(h,p,E){h=h._reactInternals;var T=zi(),I=Ll(h),F=eo(T,I);F.tag=1,F.payload=p,E!=null&&(F.callback=E),Ao(h,F),p=io(h,I,T),p!==null&&Ha(p,h,I)},enqueueForceUpdate:function(h,p){h=h._reactInternals;var E=zi(),T=Ll(h),I=eo(E,T);I.tag=2,p!=null&&(I.callback=p),Ao(h,I),p=io(h,T,E),p!==null&&Ha(p,h,T)}};function U(h,p,E,T,I,F,Y){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(T,F,Y):p.prototype&&p.prototype.isPureReactComponent?!za(E,T)||!za(I,F):!0}function $(h,p,E){var T=!1,I=ss,F=p.contextType;return typeof F=="object"&&F!==null?F=Vi(F):(I=ar(p)?di:Dt.current,T=p.contextTypes,F=(T=T!=null)?Hr(h,I):ss),p=new p(E,F),h.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=D,h.stateNode=p,p._reactInternals=h,T&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=I,h.__reactInternalMemoizedMaskedChildContext=F),p}function ue(h,p,E,T){h=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(E,T),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(E,T),p.state!==h&&D.enqueueReplaceState(p,p.state,null)}function pe(h,p,E,T){var I=h.stateNode;I.props=E,I.state=h.memoizedState,I.refs=Ga,lh(h);var F=p.contextType;typeof F=="object"&&F!==null?I.context=Vi(F):(F=ar(p)?di:Dt.current,I.context=Hr(h,F)),I.state=h.memoizedState,F=p.getDerivedStateFromProps,typeof F=="function"&&(w(h,p,F,E),I.state=h.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof I.getSnapshotBeforeUpdate=="function"||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(p=I.state,typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount(),p!==I.state&&D.enqueueReplaceState(I,I.state,null),_u(h,E,I,T),I.state=h.memoizedState),typeof I.componentDidMount=="function"&&(h.flags|=4194308)}var Be=[],jt=0,$n=null,xn=0,En=[],Jn=0,ji=null,Gr=1,Wr="";function to(h,p){Be[jt++]=xn,Be[jt++]=$n,$n=h,xn=p}function ch(h,p,E){En[Jn++]=Gr,En[Jn++]=Wr,En[Jn++]=ji,ji=h;var T=Gr;h=Wr;var I=32-hi(T)-1;T&=~(1<<I),E+=1;var F=32-hi(p)+I;if(30<F){var Y=I-I%5;F=(T&(1<<Y)-1).toString(32),T>>=Y,I-=Y,Gr=1<<32-hi(p)+I|E<<I|T,Wr=F+h}else Gr=1<<F|E<<I|T,Wr=h}function BS(h){h.return!==null&&(to(h,1),ch(h,1,0))}function zS(h){for(;h===$n;)$n=Be[--jt],Be[jt]=null,xn=Be[--jt],Be[jt]=null;for(;h===ji;)ji=En[--Jn],En[Jn]=null,Wr=En[--Jn],En[Jn]=null,Gr=En[--Jn],En[Jn]=null}var Ps=null,Ns=null,qn=!1,Jp=!1,Co=null;function XN(h,p){var E=so(5,null,null,0);E.elementType="DELETED",E.stateNode=p,E.return=h,p=h.deletions,p===null?(h.deletions=[E],h.flags|=16):p.push(E)}function KN(h,p){switch(h.tag){case 5:return p=tn(p,h.type,h.pendingProps),p!==null?(h.stateNode=p,Ps=h,Ns=Fi(p),!0):!1;case 6:return p=Mn(p,h.pendingProps),p!==null?(h.stateNode=p,Ps=h,Ns=null,!0):!1;case 13:if(p=Ln(p),p!==null){var E=ji!==null?{id:Gr,overflow:Wr}:null;return h.memoizedState={dehydrated:p,treeContext:E,retryLane:1073741824},E=so(18,null,null,0),E.stateNode=p,E.return=h,h.child=E,Ps=h,Ns=null,!0}return!1;default:return!1}}function HS(h){return(h.mode&1)!==0&&(h.flags&128)===0}function GS(h){if(qn){var p=Ns;if(p){var E=p;if(!KN(h,p)){if(HS(h))throw Error(o(418));p=oa(E);var T=Ps;p&&KN(h,p)?XN(T,E):(h.flags=h.flags&-4097|2,qn=!1,Ps=h)}}else{if(HS(h))throw Error(o(418));h.flags=h.flags&-4097|2,qn=!1,Ps=h}}}function YN(h){for(h=h.return;h!==null&&h.tag!==5&&h.tag!==3&&h.tag!==13;)h=h.return;Ps=h}function Zp(h){if(!be||h!==Ps)return!1;if(!qn)return YN(h),qn=!0,!1;if(h.tag!==3&&(h.tag!==5||Ze(h.type)&&!we(h.type,h.memoizedProps))){var p=Ns;if(p){if(HS(h)){for(h=Ns;h;)h=oa(h);throw Error(o(418))}for(;p;)XN(h,p),p=oa(p)}}if(YN(h),h.tag===13){if(!be)throw Error(o(316));if(h=h.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(o(317));Ns=X(h)}else Ns=Ps?oa(h.stateNode):null;return!0}function uh(){be&&(Ns=Ps=null,Jp=qn=!1)}function WS(h){Co===null?Co=[h]:Co.push(h)}function em(h,p,E){if(h=E.ref,h!==null&&typeof h!="function"&&typeof h!="object"){if(E._owner){if(E=E._owner,E){if(E.tag!==1)throw Error(o(309));var T=E.stateNode}if(!T)throw Error(o(147,h));var I=T,F=""+h;return p!==null&&p.ref!==null&&typeof p.ref=="function"&&p.ref._stringRef===F?p.ref:(p=function(Y){var se=I.refs;se===Ga&&(se=I.refs={}),Y===null?delete se[F]:se[F]=Y},p._stringRef=F,p)}if(typeof h!="string")throw Error(o(284));if(!E._owner)throw Error(o(290,h))}return h}function Uv(h,p){throw h=Object.prototype.toString.call(p),Error(o(31,h==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":h))}function QN(h){var p=h._init;return p(h._payload)}function JN(h){function p(he,oe){if(h){var ye=he.deletions;ye===null?(he.deletions=[oe],he.flags|=16):ye.push(oe)}}function E(he,oe){if(!h)return null;for(;oe!==null;)p(he,oe),oe=oe.sibling;return null}function T(he,oe){for(he=new Map;oe!==null;)oe.key!==null?he.set(oe.key,oe):he.set(oe.index,oe),oe=oe.sibling;return he}function I(he,oe){return he=kl(he,oe),he.index=0,he.sibling=null,he}function F(he,oe,ye){return he.index=ye,h?(ye=he.alternate,ye!==null?(ye=ye.index,ye<oe?(he.flags|=2,oe):ye):(he.flags|=2,oe)):(he.flags|=1048576,oe)}function Y(he){return h&&he.alternate===null&&(he.flags|=2),he}function se(he,oe,ye,et){return oe===null||oe.tag!==6?(oe=Cb(ye,he.mode,et),oe.return=he,oe):(oe=I(oe,ye),oe.return=he,oe)}function _e(he,oe,ye,et){var vt=ye.type;return vt===u?ut(he,oe,ye.props.children,et,ye.key):oe!==null&&(oe.elementType===vt||typeof vt=="object"&&vt!==null&&vt.$$typeof===b&&QN(vt)===oe.type)?(et=I(oe,ye.props),et.ref=em(he,oe,ye),et.return=he,et):(et=m0(ye.type,ye.key,ye.props,null,he.mode,et),et.ref=em(he,oe,ye),et.return=he,et)}function ze(he,oe,ye,et){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==ye.containerInfo||oe.stateNode.implementation!==ye.implementation?(oe=Rb(ye,he.mode,et),oe.return=he,oe):(oe=I(oe,ye.children||[]),oe.return=he,oe)}function ut(he,oe,ye,et,vt){return oe===null||oe.tag!==7?(oe=Au(ye,he.mode,et,vt),oe.return=he,oe):(oe=I(oe,ye),oe.return=he,oe)}function Wt(he,oe,ye){if(typeof oe=="string"&&oe!==""||typeof oe=="number")return oe=Cb(""+oe,he.mode,ye),oe.return=he,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case l:return ye=m0(oe.type,oe.key,oe.props,null,he.mode,ye),ye.ref=em(he,null,oe),ye.return=he,ye;case c:return oe=Rb(oe,he.mode,ye),oe.return=he,oe;case b:var et=oe._init;return Wt(he,et(oe._payload),ye)}if(ee(oe)||L(oe))return oe=Au(oe,he.mode,ye,null),oe.return=he,oe;Uv(he,oe)}return null}function Rt(he,oe,ye,et){var vt=oe!==null?oe.key:null;if(typeof ye=="string"&&ye!==""||typeof ye=="number")return vt!==null?null:se(he,oe,""+ye,et);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case l:return ye.key===vt?_e(he,oe,ye,et):null;case c:return ye.key===vt?ze(he,oe,ye,et):null;case b:return vt=ye._init,Rt(he,oe,vt(ye._payload),et)}if(ee(ye)||L(ye))return vt!==null?null:ut(he,oe,ye,et,null);Uv(he,ye)}return null}function Dn(he,oe,ye,et,vt){if(typeof et=="string"&&et!==""||typeof et=="number")return he=he.get(ye)||null,se(oe,he,""+et,vt);if(typeof et=="object"&&et!==null){switch(et.$$typeof){case l:return he=he.get(et.key===null?ye:et.key)||null,_e(oe,he,et,vt);case c:return he=he.get(et.key===null?ye:et.key)||null,ze(oe,he,et,vt);case b:var Zt=et._init;return Dn(he,oe,ye,Zt(et._payload),vt)}if(ee(et)||L(et))return he=he.get(ye)||null,ut(oe,he,et,vt,null);Uv(oe,et)}return null}function St(he,oe,ye,et){for(var vt=null,Zt=null,$t=oe,_n=oe=0,qr=null;$t!==null&&_n<ye.length;_n++){$t.index>_n?(qr=$t,$t=null):qr=$t.sibling;var wn=Rt(he,$t,ye[_n],et);if(wn===null){$t===null&&($t=qr);break}h&&$t&&wn.alternate===null&&p(he,$t),oe=F(wn,oe,_n),Zt===null?vt=wn:Zt.sibling=wn,Zt=wn,$t=qr}if(_n===ye.length)return E(he,$t),qn&&to(he,_n),vt;if($t===null){for(;_n<ye.length;_n++)$t=Wt(he,ye[_n],et),$t!==null&&(oe=F($t,oe,_n),Zt===null?vt=$t:Zt.sibling=$t,Zt=$t);return qn&&to(he,_n),vt}for($t=T(he,$t);_n<ye.length;_n++)qr=Dn($t,he,_n,ye[_n],et),qr!==null&&(h&&qr.alternate!==null&&$t.delete(qr.key===null?_n:qr.key),oe=F(qr,oe,_n),Zt===null?vt=qr:Zt.sibling=qr,Zt=qr);return h&&$t.forEach(function(Ol){return p(he,Ol)}),qn&&to(he,_n),vt}function xi(he,oe,ye,et){var vt=L(ye);if(typeof vt!="function")throw Error(o(150));if(ye=vt.call(ye),ye==null)throw Error(o(151));for(var Zt=vt=null,$t=oe,_n=oe=0,qr=null,wn=ye.next();$t!==null&&!wn.done;_n++,wn=ye.next()){$t.index>_n?(qr=$t,$t=null):qr=$t.sibling;var Ol=Rt(he,$t,wn.value,et);if(Ol===null){$t===null&&($t=qr);break}h&&$t&&Ol.alternate===null&&p(he,$t),oe=F(Ol,oe,_n),Zt===null?vt=Ol:Zt.sibling=Ol,Zt=Ol,$t=qr}if(wn.done)return E(he,$t),qn&&to(he,_n),vt;if($t===null){for(;!wn.done;_n++,wn=ye.next())wn=Wt(he,wn.value,et),wn!==null&&(oe=F(wn,oe,_n),Zt===null?vt=wn:Zt.sibling=wn,Zt=wn);return qn&&to(he,_n),vt}for($t=T(he,$t);!wn.done;_n++,wn=ye.next())wn=Dn($t,he,_n,wn.value,et),wn!==null&&(h&&wn.alternate!==null&&$t.delete(wn.key===null?_n:wn.key),oe=F(wn,oe,_n),Zt===null?vt=wn:Zt.sibling=wn,Zt=wn);return h&&$t.forEach(function(G$){return p(he,G$)}),qn&&to(he,_n),vt}function oo(he,oe,ye,et){if(typeof ye=="object"&&ye!==null&&ye.type===u&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case l:e:{for(var vt=ye.key,Zt=oe;Zt!==null;){if(Zt.key===vt){if(vt=ye.type,vt===u){if(Zt.tag===7){E(he,Zt.sibling),oe=I(Zt,ye.props.children),oe.return=he,he=oe;break e}}else if(Zt.elementType===vt||typeof vt=="object"&&vt!==null&&vt.$$typeof===b&&QN(vt)===Zt.type){E(he,Zt.sibling),oe=I(Zt,ye.props),oe.ref=em(he,Zt,ye),oe.return=he,he=oe;break e}E(he,Zt);break}else p(he,Zt);Zt=Zt.sibling}ye.type===u?(oe=Au(ye.props.children,he.mode,et,ye.key),oe.return=he,he=oe):(et=m0(ye.type,ye.key,ye.props,null,he.mode,et),et.ref=em(he,oe,ye),et.return=he,he=et)}return Y(he);case c:e:{for(Zt=ye.key;oe!==null;){if(oe.key===Zt)if(oe.tag===4&&oe.stateNode.containerInfo===ye.containerInfo&&oe.stateNode.implementation===ye.implementation){E(he,oe.sibling),oe=I(oe,ye.children||[]),oe.return=he,he=oe;break e}else{E(he,oe);break}else p(he,oe);oe=oe.sibling}oe=Rb(ye,he.mode,et),oe.return=he,he=oe}return Y(he);case b:return Zt=ye._init,oo(he,oe,Zt(ye._payload),et)}if(ee(ye))return St(he,oe,ye,et);if(L(ye))return xi(he,oe,ye,et);Uv(he,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,oe!==null&&oe.tag===6?(E(he,oe.sibling),oe=I(oe,ye),oe.return=he,he=oe):(E(he,oe),oe=Cb(ye,he.mode,et),oe.return=he,he=oe),Y(he)):E(he,oe)}return oo}var dh=JN(!0),ZN=JN(!1),tm={},no=mr(tm),nm=mr(tm),hh=mr(tm);function la(h){if(h===tm)throw Error(o(174));return h}function $S(h,p){ot(hh,p),ot(nm,h),ot(no,tm),h=ie(p),Ct(no),ot(no,h)}function fh(){Ct(no),Ct(nm),Ct(hh)}function eI(h){var p=la(hh.current),E=la(no.current);p=j(E,h.type,p),E!==p&&(ot(nm,h),ot(no,p))}function qS(h){nm.current===h&&(Ct(no),Ct(nm))}var Zn=mr(0);function Vv(h){for(var p=h;p!==null;){if(p.tag===13){var E=p.memoizedState;if(E!==null&&(E=E.dehydrated,E===null||ei(E)||ja(E)))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if(p.flags&128)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===h)break;for(;p.sibling===null;){if(p.return===null||p.return===h)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var XS=[];function KS(){for(var h=0;h<XS.length;h++){var p=XS[h];De?p._workInProgressVersionPrimary=null:p._workInProgressVersionSecondary=null}XS.length=0}var jv=a.ReactCurrentDispatcher,ro=a.ReactCurrentBatchConfig,ph=0,lr=null,gi=null,$r=null,Bv=!1,rm=!1,im=0,m$=0;function yi(){throw Error(o(321))}function YS(h,p){if(p===null)return!1;for(var E=0;E<p.length&&E<h.length;E++)if(!Ms(h[E],p[E]))return!1;return!0}function QS(h,p,E,T,I,F){if(ph=F,lr=p,p.memoizedState=null,p.updateQueue=null,p.lanes=0,jv.current=h===null||h.memoizedState===null?x$:_$,h=E(T,I),rm){F=0;do{if(rm=!1,im=0,25<=F)throw Error(o(301));F+=1,$r=gi=null,p.updateQueue=null,jv.current=w$,h=E(T,I)}while(rm)}if(jv.current=$v,p=gi!==null&&gi.next!==null,ph=0,$r=gi=lr=null,Bv=!1,p)throw Error(o(300));return h}function JS(){var h=im!==0;return im=0,h}function Wa(){var h={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $r===null?lr.memoizedState=$r=h:$r=$r.next=h,$r}function ca(){if(gi===null){var h=lr.alternate;h=h!==null?h.memoizedState:null}else h=gi.next;var p=$r===null?lr.memoizedState:$r.next;if(p!==null)$r=p,gi=h;else{if(h===null)throw Error(o(310));gi=h,h={memoizedState:gi.memoizedState,baseState:gi.baseState,baseQueue:gi.baseQueue,queue:gi.queue,next:null},$r===null?lr.memoizedState=$r=h:$r=$r.next=h}return $r}function wu(h,p){return typeof p=="function"?p(h):p}function zv(h){var p=ca(),E=p.queue;if(E===null)throw Error(o(311));E.lastRenderedReducer=h;var T=gi,I=T.baseQueue,F=E.pending;if(F!==null){if(I!==null){var Y=I.next;I.next=F.next,F.next=Y}T.baseQueue=I=F,E.pending=null}if(I!==null){F=I.next,T=T.baseState;var se=Y=null,_e=null,ze=F;do{var ut=ze.lane;if((ph&ut)===ut)_e!==null&&(_e=_e.next={lane:0,action:ze.action,hasEagerState:ze.hasEagerState,eagerState:ze.eagerState,next:null}),T=ze.hasEagerState?ze.eagerState:h(T,ze.action);else{var Wt={lane:ut,action:ze.action,hasEagerState:ze.hasEagerState,eagerState:ze.eagerState,next:null};_e===null?(se=_e=Wt,Y=T):_e=_e.next=Wt,lr.lanes|=ut,gh|=ut}ze=ze.next}while(ze!==null&&ze!==F);_e===null?Y=T:_e.next=se,Ms(T,p.memoizedState)||(Is=!0),p.memoizedState=T,p.baseState=Y,p.baseQueue=_e,E.lastRenderedState=T}if(h=E.interleaved,h!==null){I=h;do F=I.lane,lr.lanes|=F,gh|=F,I=I.next;while(I!==h)}else I===null&&(E.lanes=0);return[p.memoizedState,E.dispatch]}function Hv(h){var p=ca(),E=p.queue;if(E===null)throw Error(o(311));E.lastRenderedReducer=h;var T=E.dispatch,I=E.pending,F=p.memoizedState;if(I!==null){E.pending=null;var Y=I=I.next;do F=h(F,Y.action),Y=Y.next;while(Y!==I);Ms(F,p.memoizedState)||(Is=!0),p.memoizedState=F,p.baseQueue===null&&(p.baseState=F),E.lastRenderedState=F}return[F,T]}function tI(){}function nI(h,p){var E=lr,T=ca(),I=p(),F=!Ms(T.memoizedState,I);if(F&&(T.memoizedState=I,Is=!0),T=T.queue,om(sI.bind(null,E,T,h),[h]),T.getSnapshot!==p||F||$r!==null&&$r.memoizedState.tag&1){if(E.flags|=2048,sm(9,iI.bind(null,E,T,I,p),void 0,null),Er===null)throw Error(o(349));ph&30||rI(E,p,I)}return I}function rI(h,p,E){h.flags|=16384,h={getSnapshot:p,value:E},p=lr.updateQueue,p===null?(p={lastEffect:null,stores:null},lr.updateQueue=p,p.stores=[h]):(E=p.stores,E===null?p.stores=[h]:E.push(h))}function iI(h,p,E,T){p.value=E,p.getSnapshot=T,oI(p)&&io(h,1,-1)}function sI(h,p,E){return E(function(){oI(p)&&io(h,1,-1)})}function oI(h){var p=h.getSnapshot;h=h.value;try{var E=p();return!Ms(h,E)}catch{return!0}}function ZS(h){var p=Wa();return typeof h=="function"&&(h=h()),p.memoizedState=p.baseState=h,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wu,lastRenderedState:h},p.queue=h,h=h.dispatch=v$.bind(null,lr,h),[p.memoizedState,h]}function sm(h,p,E,T){return h={tag:h,create:p,destroy:E,deps:T,next:null},p=lr.updateQueue,p===null?(p={lastEffect:null,stores:null},lr.updateQueue=p,p.lastEffect=h.next=h):(E=p.lastEffect,E===null?p.lastEffect=h.next=h:(T=E.next,E.next=h,h.next=T,p.lastEffect=h)),h}function aI(){return ca().memoizedState}function Gv(h,p,E,T){var I=Wa();lr.flags|=h,I.memoizedState=sm(1|p,E,void 0,T===void 0?null:T)}function Wv(h,p,E,T){var I=ca();T=T===void 0?null:T;var F=void 0;if(gi!==null){var Y=gi.memoizedState;if(F=Y.destroy,T!==null&&YS(T,Y.deps)){I.memoizedState=sm(p,E,F,T);return}}lr.flags|=h,I.memoizedState=sm(1|p,E,F,T)}function eb(h,p){return Gv(8390656,8,h,p)}function om(h,p){return Wv(2048,8,h,p)}function lI(h,p){return Wv(4,2,h,p)}function cI(h,p){return Wv(4,4,h,p)}function uI(h,p){if(typeof p=="function")return h=h(),p(h),function(){p(null)};if(p!=null)return h=h(),p.current=h,function(){p.current=null}}function dI(h,p,E){return E=E!=null?E.concat([h]):null,Wv(4,4,uI.bind(null,p,h),E)}function tb(){}function hI(h,p){var E=ca();p=p===void 0?null:p;var T=E.memoizedState;return T!==null&&p!==null&&YS(p,T[1])?T[0]:(E.memoizedState=[h,p],h)}function fI(h,p){var E=ca();p=p===void 0?null:p;var T=E.memoizedState;return T!==null&&p!==null&&YS(p,T[1])?T[0]:(h=h(),E.memoizedState=[h,p],h)}function g$(h,p){var E=dn;dn=E!==0&&4>E?E:4,h(!0);var T=ro.transition;ro.transition={};try{h(!1),p()}finally{dn=E,ro.transition=T}}function pI(){return ca().memoizedState}function y$(h,p,E){var T=Ll(h);E={lane:T,action:E,hasEagerState:!1,eagerState:null,next:null},mI(h)?gI(p,E):(yI(h,p,E),E=zi(),h=io(h,T,E),h!==null&&vI(h,p,T))}function v$(h,p,E){var T=Ll(h),I={lane:T,action:E,hasEagerState:!1,eagerState:null,next:null};if(mI(h))gI(p,I);else{yI(h,p,I);var F=h.alternate;if(h.lanes===0&&(F===null||F.lanes===0)&&(F=p.lastRenderedReducer,F!==null))try{var Y=p.lastRenderedState,se=F(Y,E);if(I.hasEagerState=!0,I.eagerState=se,Ms(se,Y))return}catch{}finally{}E=zi(),h=io(h,T,E),h!==null&&vI(h,p,T)}}function mI(h){var p=h.alternate;return h===lr||p!==null&&p===lr}function gI(h,p){rm=Bv=!0;var E=h.pending;E===null?p.next=p:(p.next=E.next,E.next=p),h.pending=p}function yI(h,p,E){Er!==null&&h.mode&1&&!(nn&2)?(h=p.interleaved,h===null?(E.next=E,Rs===null?Rs=[p]:Rs.push(p)):(E.next=h.next,h.next=E),p.interleaved=E):(h=p.pending,h===null?E.next=E:(E.next=h.next,h.next=E),p.pending=E)}function vI(h,p,E){if(E&4194240){var T=p.lanes;T&=h.pendingLanes,E|=T,p.lanes=E,qp(h,E)}}var $v={readContext:Vi,useCallback:yi,useContext:yi,useEffect:yi,useImperativeHandle:yi,useInsertionEffect:yi,useLayoutEffect:yi,useMemo:yi,useReducer:yi,useRef:yi,useState:yi,useDebugValue:yi,useDeferredValue:yi,useTransition:yi,useMutableSource:yi,useSyncExternalStore:yi,useId:yi,unstable_isNewReconciler:!1},x$={readContext:Vi,useCallback:function(h,p){return Wa().memoizedState=[h,p===void 0?null:p],h},useContext:Vi,useEffect:eb,useImperativeHandle:function(h,p,E){return E=E!=null?E.concat([h]):null,Gv(4194308,4,uI.bind(null,p,h),E)},useLayoutEffect:function(h,p){return Gv(4194308,4,h,p)},useInsertionEffect:function(h,p){return Gv(4,2,h,p)},useMemo:function(h,p){var E=Wa();return p=p===void 0?null:p,h=h(),E.memoizedState=[h,p],h},useReducer:function(h,p,E){var T=Wa();return p=E!==void 0?E(p):p,T.memoizedState=T.baseState=p,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:p},T.queue=h,h=h.dispatch=y$.bind(null,lr,h),[T.memoizedState,h]},useRef:function(h){var p=Wa();return h={current:h},p.memoizedState=h},useState:ZS,useDebugValue:tb,useDeferredValue:function(h){var p=ZS(h),E=p[0],T=p[1];return eb(function(){var I=ro.transition;ro.transition={};try{T(h)}finally{ro.transition=I}},[h]),E},useTransition:function(){var h=ZS(!1),p=h[0];return h=g$.bind(null,h[1]),Wa().memoizedState=h,[p,h]},useMutableSource:function(){},useSyncExternalStore:function(h,p,E){var T=lr,I=Wa();if(qn){if(E===void 0)throw Error(o(407));E=E()}else{if(E=p(),Er===null)throw Error(o(349));ph&30||rI(T,p,E)}I.memoizedState=E;var F={value:E,getSnapshot:p};return I.queue=F,eb(sI.bind(null,T,F,h),[h]),T.flags|=2048,sm(9,iI.bind(null,T,F,E,p),void 0,null),E},useId:function(){var h=Wa(),p=Er.identifierPrefix;if(qn){var E=Wr,T=Gr;E=(T&~(1<<32-hi(T)-1)).toString(32)+E,p=":"+p+"R"+E,E=im++,0<E&&(p+="H"+E.toString(32)),p+=":"}else E=m$++,p=":"+p+"r"+E.toString(32)+":";return h.memoizedState=p},unstable_isNewReconciler:!1},_$={readContext:Vi,useCallback:hI,useContext:Vi,useEffect:om,useImperativeHandle:dI,useInsertionEffect:lI,useLayoutEffect:cI,useMemo:fI,useReducer:zv,useRef:aI,useState:function(){return zv(wu)},useDebugValue:tb,useDeferredValue:function(h){var p=zv(wu),E=p[0],T=p[1];return om(function(){var I=ro.transition;ro.transition={};try{T(h)}finally{ro.transition=I}},[h]),E},useTransition:function(){var h=zv(wu)[0],p=ca().memoizedState;return[h,p]},useMutableSource:tI,useSyncExternalStore:nI,useId:pI,unstable_isNewReconciler:!1},w$={readContext:Vi,useCallback:hI,useContext:Vi,useEffect:om,useImperativeHandle:dI,useInsertionEffect:lI,useLayoutEffect:cI,useMemo:fI,useReducer:Hv,useRef:aI,useState:function(){return Hv(wu)},useDebugValue:tb,useDeferredValue:function(h){var p=Hv(wu),E=p[0],T=p[1];return om(function(){var I=ro.transition;ro.transition={};try{T(h)}finally{ro.transition=I}},[h]),E},useTransition:function(){var h=Hv(wu)[0],p=ca().memoizedState;return[h,p]},useMutableSource:tI,useSyncExternalStore:nI,useId:pI,unstable_isNewReconciler:!1};function nb(h,p){try{var E="",T=p;do E+=Fv(T),T=T.return;while(T);var I=E}catch(F){I=` 4215Error generating stack: `+F.message+` 4216`+F.stack}return{value:h,source:p,stack:I}}function rb(h,p){try{console.error(p.value)}catch(E){setTimeout(function(){throw E})}}var S$=typeof WeakMap=="function"?WeakMap:Map;function xI(h,p,E){E=eo(-1,E),E.tag=3,E.payload={element:null};var T=p.value;return E.callback=function(){l0||(l0=!0,wb=T),rb(h,p)},E}function _I(h,p,E){E=eo(-1,E),E.tag=3;var T=h.type.getDerivedStateFromError;if(typeof T=="function"){var I=p.value;E.payload=function(){return T(I)},E.callback=function(){rb(h,p)}}var F=h.stateNode;return F!==null&&typeof F.componentDidCatch=="function"&&(E.callback=function(){rb(h,p),typeof T!="function"&&(Nl===null?Nl=new Set([this]):Nl.add(this));var Y=p.stack;this.componentDidCatch(p.value,{componentStack:Y!==null?Y:""})}),E}function wI(h,p,E){var T=h.pingCache;if(T===null){T=h.pingCache=new S$;var I=new Set;T.set(p,I)}else I=T.get(p),I===void 0&&(I=new Set,T.set(p,I));I.has(E)||(I.add(E),h=O$.bind(null,h,p,E),p.then(h,h))}function SI(h){do{var p;if((p=h.tag===13)&&(p=h.memoizedState,p=p!==null?p.dehydrated!==null:!0),p)return h;h=h.return}while(h!==null);return null}function bI(h,p,E,T,I){return h.mode&1?(h.flags|=65536,h.lanes=I,h):(h===p?h.flags|=65536:(h.flags|=128,E.flags|=131072,E.flags&=-52805,E.tag===1&&(E.alternate===null?E.tag=17:(p=eo(-1,1),p.tag=2,Ao(E,p))),E.lanes|=1),h)}function ua(h){h.flags|=4}function EI(h,p){if(h!==null&&h.child===p.child)return!0;if(p.flags&16)return!1;for(h=p.child;h!==null;){if(h.flags&12854||h.subtreeFlags&12854)return!1;h=h.sibling}return!0}var am,lm,qv,Xv;if(Ue)am=function(h,p){for(var E=p.child;E!==null;){if(E.tag===5||E.tag===6)re(h,E.stateNode);else if(E.tag!==4&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===p)break;for(;E.sibling===null;){if(E.return===null||E.return===p)return;E=E.return}E.sibling.return=E.return,E=E.sibling}},lm=function(){},qv=function(h,p,E,T,I){if(h=h.memoizedProps,h!==T){var F=p.stateNode,Y=la(no.current);E=ae(F,E,h,T,I,Y),(p.updateQueue=E)&&ua(p)}},Xv=function(h,p,E,T){E!==T&&ua(p)};else if(Q){am=function(h,p,E,T){for(var I=p.child;I!==null;){if(I.tag===5){var F=I.stateNode;E&&T&&(F=Jt(F,I.type,I.memoizedProps,I)),re(h,F)}else if(I.tag===6)F=I.stateNode,E&&T&&(F=vn(F,I.memoizedProps,I)),re(h,F);else if(I.tag!==4){if(I.tag===22&&I.memoizedState!==null)F=I.child,F!==null&&(F.return=I),am(h,I,!0,!0);else if(I.child!==null){I.child.return=I,I=I.child;continue}}if(I===p)break;for(;I.sibling===null;){if(I.return===null||I.return===p)return;I=I.return}I.sibling.return=I.return,I=I.sibling}};var TI=function(h,p,E,T){for(var I=p.child;I!==null;){if(I.tag===5){var F=I.stateNode;E&&T&&(F=Jt(F,I.type,I.memoizedProps,I)),Ie(h,F)}else if(I.tag===6)F=I.stateNode,E&&T&&(F=vn(F,I.memoizedProps,I)),Ie(h,F);else if(I.tag!==4){if(I.tag===22&&I.memoizedState!==null)F=I.child,F!==null&&(F.return=I),TI(h,I,!0,!0);else if(I.child!==null){I.child.return=I,I=I.child;continue}}if(I===p)break;for(;I.sibling===null;){if(I.return===null||I.return===p)return;I=I.return}I.sibling.return=I.return,I=I.sibling}};lm=function(h,p){var E=p.stateNode;if(!EI(h,p)){h=E.containerInfo;var T=wt(h);TI(T,p,!1,!1),E.pendingChildren=T,ua(p),gt(h,T)}},qv=function(h,p,E,T,I){var F=h.stateNode,Y=h.memoizedProps;if((h=EI(h,p))&&Y===T)p.stateNode=F;else{var se=p.stateNode,_e=la(no.current),ze=null;Y!==T&&(ze=ae(se,E,Y,T,I,_e)),h&&ze===null?p.stateNode=F:(F=He(F,ze,E,Y,T,p,h,se),te(F,E,T,I,_e)&&ua(p),p.stateNode=F,h?ua(p):am(F,p,!1,!1))}},Xv=function(h,p,E,T){E!==T?(h=la(hh.current),E=la(no.current),p.stateNode=Re(T,h,E,p),ua(p)):p.stateNode=h.stateNode}}else lm=function(){},qv=function(){},Xv=function(){};function cm(h,p){if(!qn)switch(h.tailMode){case"hidden":p=h.tail;for(var E=null;p!==null;)p.alternate!==null&&(E=p),p=p.sibling;E===null?h.tail=null:E.sibling=null;break;case"collapsed":E=h.tail;for(var T=null;E!==null;)E.alternate!==null&&(T=E),E=E.sibling;T===null?p||h.tail===null?h.tail=null:h.tail.sibling=null:T.sibling=null}}function vi(h){var p=h.alternate!==null&&h.alternate.child===h.child,E=0,T=0;if(p)for(var I=h.child;I!==null;)E|=I.lanes|I.childLanes,T|=I.subtreeFlags&14680064,T|=I.flags&14680064,I.return=h,I=I.sibling;else for(I=h.child;I!==null;)E|=I.lanes|I.childLanes,T|=I.subtreeFlags,T|=I.flags,I.return=h,I=I.sibling;return h.subtreeFlags|=T,h.childLanes=E,p}function b$(h,p,E){var T=p.pendingProps;switch(zS(p),p.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vi(p),null;case 1:return ar(p.type)&&Vt(),vi(p),null;case 3:return T=p.stateNode,fh(),Ct(pn),Ct(Dt),KS(),T.pendingContext&&(T.context=T.pendingContext,T.pendingContext=null),(h===null||h.child===null)&&(Zp(p)?ua(p):h===null||h.memoizedState.isDehydrated&&!(p.flags&256)||(p.flags|=1024,Co!==null&&(Eb(Co),Co=null))),lm(h,p),vi(p),null;case 5:qS(p),E=la(hh.current);var I=p.type;if(h!==null&&p.stateNode!=null)qv(h,p,I,T,E),h.ref!==p.ref&&(p.flags|=512,p.flags|=2097152);else{if(!T){if(p.stateNode===null)throw Error(o(166));return vi(p),null}if(h=la(no.current),Zp(p)){if(!be)throw Error(o(175));h=fu(p.stateNode,p.type,p.memoizedProps,E,h,p,!Jp),p.updateQueue=h,h!==null&&ua(p)}else{var F=Z(I,T,E,h,p);am(F,p,!1,!1),p.stateNode=F,te(F,I,T,E,h)&&ua(p)}p.ref!==null&&(p.flags|=512,p.flags|=2097152)}return vi(p),null;case 6:if(h&&p.stateNode!=null)Xv(h,p,h.memoizedProps,T);else{if(typeof T!="string"&&p.stateNode===null)throw Error(o(166));if(h=la(hh.current),E=la(no.current),Zp(p)){if(!be)throw Error(o(176));if(h=p.stateNode,T=p.memoizedProps,(E=pu(h,T,p,!Jp))&&(I=Ps,I!==null))switch(F=(I.mode&1)!==0,I.tag){case 3:ht(I.stateNode.containerInfo,h,T,F);break;case 5:yt(I.type,I.memoizedProps,I.stateNode,h,T,F)}E&&ua(p)}else p.stateNode=Re(T,h,E,p)}return vi(p),null;case 13:if(Ct(Zn),T=p.memoizedState,qn&&Ns!==null&&p.mode&1&&!(p.flags&128)){for(h=Ns;h;)h=oa(h);return uh(),p.flags|=98560,p}if(T!==null&&T.dehydrated!==null){if(T=Zp(p),h===null){if(!T)throw Error(o(318));if(!be)throw Error(o(344));if(h=p.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(o(317));Xd(h,p)}else uh(),!(p.flags&128)&&(p.memoizedState=null),p.flags|=4;return vi(p),null}return Co!==null&&(Eb(Co),Co=null),p.flags&128?(p.lanes=E,p):(T=T!==null,E=!1,h===null?Zp(p):E=h.memoizedState!==null,T&&!E&&(p.child.flags|=8192,p.mode&1&&(h===null||Zn.current&1?Lr===0&&(Lr=3):Mb())),p.updateQueue!==null&&(p.flags|=4),vi(p),null);case 4:return fh(),lm(h,p),h===null&&Le(p.stateNode.containerInfo),vi(p),null;case 10:return xu(p.type._context),vi(p),null;case 17:return ar(p.type)&&Vt(),vi(p),null;case 19:if(Ct(Zn),I=p.memoizedState,I===null)return vi(p),null;if(T=(p.flags&128)!==0,F=I.rendering,F===null)if(T)cm(I,!1);else{if(Lr!==0||h!==null&&h.flags&128)for(h=p.child;h!==null;){if(F=Vv(h),F!==null){for(p.flags|=128,cm(I,!1),h=F.updateQueue,h!==null&&(p.updateQueue=h,p.flags|=4),p.subtreeFlags=0,h=E,T=p.child;T!==null;)E=T,I=h,E.flags&=14680066,F=E.alternate,F===null?(E.childLanes=0,E.lanes=I,E.child=null,E.subtreeFlags=0,E.memoizedProps=null,E.memoizedState=null,E.updateQueue=null,E.dependencies=null,E.stateNode=null):(E.childLanes=F.childLanes,E.lanes=F.lanes,E.child=F.child,E.subtreeFlags=0,E.deletions=null,E.memoizedProps=F.memoizedProps,E.memoizedState=F.memoizedState,E.updateQueue=F.updateQueue,E.type=F.type,I=F.dependencies,E.dependencies=I===null?null:{lanes:I.lanes,firstContext:I.firstContext}),T=T.sibling;return ot(Zn,Zn.current&1|2),p.child}h=h.sibling}I.tail!==null&&Gn()>_b&&(p.flags|=128,T=!0,cm(I,!1),p.lanes=4194304)}else{if(!T)if(h=Vv(F),h!==null){if(p.flags|=128,T=!0,h=h.updateQueue,h!==null&&(p.updateQueue=h,p.flags|=4),cm(I,!0),I.tail===null&&I.tailMode==="hidden"&&!F.alternate&&!qn)return vi(p),null}else 2*Gn()-I.renderingStartTime>_b&&E!==1073741824&&(p.flags|=128,T=!0,cm(I,!1),p.lanes=4194304);I.isBackwards?(F.sibling=p.child,p.child=F):(h=I.last,h!==null?h.sibling=F:p.child=F,I.last=F)}return I.tail!==null?(p=I.tail,I.rendering=p,I.tail=p.sibling,I.renderingStartTime=Gn(),p.sibling=null,h=Zn.current,ot(Zn,T?h&1|2:h&1),p):(vi(p),null);case 22:case 23:return Tb(),T=p.memoizedState!==null,h!==null&&h.memoizedState!==null!==T&&(p.flags|=8192),T&&p.mode&1?Ls&1073741824&&(vi(p),Ue&&p.subtreeFlags&6&&(p.flags|=8192)):vi(p),null;case 24:return null;case 25:return null}throw Error(o(156,p.tag))}var E$=a.ReactCurrentOwner,Is=!1;function Bi(h,p,E,T){p.child=h===null?ZN(p,null,E,T):dh(p,h.child,E,T)}function MI(h,p,E,T,I){E=E.render;var F=p.ref;return Mo(p,I),T=QS(h,p,E,T,F,I),E=JS(),h!==null&&!Is?(p.updateQueue=h.updateQueue,p.flags&=-2053,h.lanes&=~I,$a(h,p,I)):(qn&&E&&BS(p),p.flags|=1,Bi(h,p,T,I),p.child)}function AI(h,p,E,T,I){if(h===null){var F=E.type;return typeof F=="function"&&!Ab(F)&&F.defaultProps===void 0&&E.compare===null&&E.defaultProps===void 0?(p.tag=15,p.type=F,CI(h,p,F,T,I)):(h=m0(E.type,null,T,p,p.mode,I),h.ref=p.ref,h.return=p,p.child=h)}if(F=h.child,!(h.lanes&I)){var Y=F.memoizedProps;if(E=E.compare,E=E!==null?E:za,E(Y,T)&&h.ref===p.ref)return $a(h,p,I)}return p.flags|=1,h=kl(F,T),h.ref=p.ref,h.return=p,p.child=h}function CI(h,p,E,T,I){if(h!==null&&za(h.memoizedProps,T)&&h.ref===p.ref)if(Is=!1,(h.lanes&I)!==0)h.flags&131072&&(Is=!0);else return p.lanes=h.lanes,$a(h,p,I);return ib(h,p,E,T,I)}function RI(h,p,E){var T=p.pendingProps,I=T.children,F=h!==null?h.memoizedState:null;if(T.mode==="hidden")if(!(p.mode&1))p.memoizedState={baseLanes:0,cachePool:null},ot(mh,Ls),Ls|=E;else if(E&1073741824)p.memoizedState={baseLanes:0,cachePool:null},T=F!==null?F.baseLanes:E,ot(mh,Ls),Ls|=T;else return h=F!==null?F.baseLanes|E:E,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:h,cachePool:null},p.updateQueue=null,ot(mh,Ls),Ls|=h,null;else F!==null?(T=F.baseLanes|E,p.memoizedState=null):T=E,ot(mh,Ls),Ls|=T;return Bi(h,p,I,E),p.child}function PI(h,p){var E=p.ref;(h===null&&E!==null||h!==null&&h.ref!==E)&&(p.flags|=512,p.flags|=2097152)}function ib(h,p,E,T,I){var F=ar(E)?di:Dt.current;return F=Hr(p,F),Mo(p,I),E=QS(h,p,E,T,F,I),T=JS(),h!==null&&!Is?(p.updateQueue=h.updateQueue,p.flags&=-2053,h.lanes&=~I,$a(h,p,I)):(qn&&T&&BS(p),p.flags|=1,Bi(h,p,E,I),p.child)}function NI(h,p,E,T,I){if(ar(E)){var F=!0;Qn(p)}else F=!1;if(Mo(p,I),p.stateNode===null)h!==null&&(h.alternate=null,p.alternate=null,p.flags|=2),$(p,E,T),pe(p,E,T,I),T=!0;else if(h===null){var Y=p.stateNode,se=p.memoizedProps;Y.props=se;var _e=Y.context,ze=E.contextType;typeof ze=="object"&&ze!==null?ze=Vi(ze):(ze=ar(E)?di:Dt.current,ze=Hr(p,ze));var ut=E.getDerivedStateFromProps,Wt=typeof ut=="function"||typeof Y.getSnapshotBeforeUpdate=="function";Wt||typeof Y.UNSAFE_componentWillReceiveProps!="function"&&typeof Y.componentWillReceiveProps!="function"||(se!==T||_e!==ze)&&ue(p,Y,T,ze),pi=!1;var Rt=p.memoizedState;Y.state=Rt,_u(p,T,Y,I),_e=p.memoizedState,se!==T||Rt!==_e||pn.current||pi?(typeof ut=="function"&&(w(p,E,ut,T),_e=p.memoizedState),(se=pi||U(p,E,se,T,Rt,_e,ze))?(Wt||typeof Y.UNSAFE_componentWillMount!="function"&&typeof Y.componentWillMount!="function"||(typeof Y.componentWillMount=="function"&&Y.componentWillMount(),typeof Y.UNSAFE_componentWillMount=="function"&&Y.UNSAFE_componentWillMount()),typeof Y.componentDidMount=="function"&&(p.flags|=4194308)):(typeof Y.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=T,p.memoizedState=_e),Y.props=T,Y.state=_e,Y.context=ze,T=se):(typeof Y.componentDidMount=="function"&&(p.flags|=4194308),T=!1)}else{Y=p.stateNode,Yp(h,p),se=p.memoizedProps,ze=p.type===p.elementType?se:fi(p.type,se),Y.props=ze,Wt=p.pendingProps,Rt=Y.context,_e=E.contextType,typeof _e=="object"&&_e!==null?_e=Vi(_e):(_e=ar(E)?di:Dt.current,_e=Hr(p,_e));var Dn=E.getDerivedStateFromProps;(ut=typeof Dn=="function"||typeof Y.getSnapshotBeforeUpdate=="function")||typeof Y.UNSAFE_componentWillReceiveProps!="function"&&typeof Y.componentWillReceiveProps!="function"||(se!==Wt||Rt!==_e)&&ue(p,Y,T,_e),pi=!1,Rt=p.memoizedState,Y.state=Rt,_u(p,T,Y,I);var St=p.memoizedState;se!==Wt||Rt!==St||pn.current||pi?(typeof Dn=="function"&&(w(p,E,Dn,T),St=p.memoizedState),(ze=pi||U(p,E,ze,T,Rt,St,_e)||!1)?(ut||typeof Y.UNSAFE_componentWillUpdate!="function"&&typeof Y.componentWillUpdate!="function"||(typeof Y.componentWillUpdate=="function"&&Y.componentWillUpdate(T,St,_e),typeof Y.UNSAFE_componentWillUpdate=="function"&&Y.UNSAFE_componentWillUpdate(T,St,_e)),typeof Y.componentDidUpdate=="function"&&(p.flags|=4),typeof Y.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof Y.componentDidUpdate!="function"||se===h.memoizedProps&&Rt===h.memoizedState||(p.flags|=4),typeof Y.getSnapshotBeforeUpdate!="function"||se===h.memoizedProps&&Rt===h.memoizedState||(p.flags|=1024),p.memoizedProps=T,p.memoizedState=St),Y.props=T,Y.state=St,Y.context=_e,T=ze):(typeof Y.componentDidUpdate!="function"||se===h.memoizedProps&&Rt===h.memoizedState||(p.flags|=4),typeof Y.getSnapshotBeforeUpdate!="function"||se===h.memoizedProps&&Rt===h.memoizedState||(p.flags|=1024),T=!1)}return sb(h,p,E,T,F,I)}function sb(h,p,E,T,I,F){PI(h,p);var Y=(p.flags&128)!==0;if(!T&&!Y)return I&&Pl(p,E,!1),$a(h,p,F);T=p.stateNode,E$.current=p;var se=Y&&typeof E.getDerivedStateFromError!="function"?null:T.render();return p.flags|=1,h!==null&&Y?(p.child=dh(p,h.child,null,F),p.child=dh(p,null,se,F)):Bi(h,p,se,F),p.memoizedState=T.state,I&&Pl(p,E,!0),p.child}function II(h){var p=h.stateNode;p.pendingContext?Ui(h,p.pendingContext,p.pendingContext!==p.context):p.context&&Ui(h,p.context,!1),$S(h,p.containerInfo)}function LI(h,p,E,T,I){return uh(),WS(I),p.flags|=256,Bi(h,p,E,T),p.child}var Kv={dehydrated:null,treeContext:null,retryLane:0};function Yv(h){return{baseLanes:h,cachePool:null}}function DI(h,p,E){var T=p.pendingProps,I=Zn.current,F=!1,Y=(p.flags&128)!==0,se;if((se=Y)||(se=h!==null&&h.memoizedState===null?!1:(I&2)!==0),se?(F=!0,p.flags&=-129):(h===null||h.memoizedState!==null)&&(I|=1),ot(Zn,I&1),h===null)return GS(p),h=p.memoizedState,h!==null&&(h=h.dehydrated,h!==null)?(p.mode&1?ja(h)?p.lanes=8:p.lanes=1073741824:p.lanes=1,null):(I=T.children,h=T.fallback,F?(T=p.mode,F=p.child,I={mode:"hidden",children:I},!(T&1)&&F!==null?(F.childLanes=0,F.pendingProps=I):F=g0(I,T,0,null),h=Au(h,T,E,null),F.return=p,h.return=p,F.sibling=h,p.child=F,p.child.memoizedState=Yv(E),p.memoizedState=Kv,h):ob(p,I));if(I=h.memoizedState,I!==null){if(se=I.dehydrated,se!==null){if(Y)return p.flags&256?(p.flags&=-257,Qv(h,p,E,Error(o(422)))):p.memoizedState!==null?(p.child=h.child,p.flags|=128,null):(F=T.fallback,I=p.mode,T=g0({mode:"visible",children:T.children},I,0,null),F=Au(F,I,E,null),F.flags|=2,T.return=p,F.return=p,T.sibling=F,p.child=T,p.mode&1&&dh(p,h.child,null,E),p.child.memoizedState=Yv(E),p.memoizedState=Kv,F);if(!(p.mode&1))p=Qv(h,p,E,null);else if(ja(se))p=Qv(h,p,E,Error(o(419)));else if(T=(E&h.childLanes)!==0,Is||T){if(T=Er,T!==null){switch(E&-E){case 4:F=2;break;case 16:F=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:F=32;break;case 536870912:F=268435456;break;default:F=0}T=F&(T.suspendedLanes|E)?0:F,T!==0&&T!==I.retryLane&&(I.retryLane=T,io(h,T,-1))}Mb(),p=Qv(h,p,E,Error(o(421)))}else ei(se)?(p.flags|=128,p.child=h.child,p=F$.bind(null,h),Ks(se,p),p=null):(E=I.treeContext,be&&(Ns=hu(se),Ps=p,qn=!0,Co=null,Jp=!1,E!==null&&(En[Jn++]=Gr,En[Jn++]=Wr,En[Jn++]=ji,Gr=E.id,Wr=E.overflow,ji=p)),p=ob(p,p.pendingProps.children),p.flags|=4096);return p}return F?(T=OI(h,p,T.children,T.fallback,E),F=p.child,I=h.child.memoizedState,F.memoizedState=I===null?Yv(E):{baseLanes:I.baseLanes|E,cachePool:null},F.childLanes=h.childLanes&~E,p.memoizedState=Kv,T):(E=kI(h,p,T.children,E),p.memoizedState=null,E)}return F?(T=OI(h,p,T.children,T.fallback,E),F=p.child,I=h.child.memoizedState,F.memoizedState=I===null?Yv(E):{baseLanes:I.baseLanes|E,cachePool:null},F.childLanes=h.childLanes&~E,p.memoizedState=Kv,T):(E=kI(h,p,T.children,E),p.memoizedState=null,E)}function ob(h,p){return p=g0({mode:"visible",children:p},h.mode,0,null),p.return=h,h.child=p}function kI(h,p,E,T){var I=h.child;return h=I.sibling,E=kl(I,{mode:"visible",children:E}),!(p.mode&1)&&(E.lanes=T),E.return=p,E.sibling=null,h!==null&&(T=p.deletions,T===null?(p.deletions=[h],p.flags|=16):T.push(h)),p.child=E}function OI(h,p,E,T,I){var F=p.mode;h=h.child;var Y=h.sibling,se={mode:"hidden",children:E};return!(F&1)&&p.child!==h?(E=p.child,E.childLanes=0,E.pendingProps=se,p.deletions=null):(E=kl(h,se),E.subtreeFlags=h.subtreeFlags&14680064),Y!==null?T=kl(Y,T):(T=Au(T,F,I,null),T.flags|=2),T.return=p,E.return=p,E.sibling=T,p.child=E,T}function Qv(h,p,E,T){return T!==null&&WS(T),dh(p,h.child,null,E),h=ob(p,p.pendingProps.children),h.flags|=2,p.memoizedState=null,h}function FI(h,p,E){h.lanes|=p;var T=h.alternate;T!==null&&(T.lanes|=p),ah(h.return,p,E)}function ab(h,p,E,T,I){var F=h.memoizedState;F===null?h.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:T,tail:E,tailMode:I}:(F.isBackwards=p,F.rendering=null,F.renderingStartTime=0,F.last=T,F.tail=E,F.tailMode=I)}function UI(h,p,E){var T=p.pendingProps,I=T.revealOrder,F=T.tail;if(Bi(h,p,T.children,E),T=Zn.current,T&2)T=T&1|2,p.flags|=128;else{if(h!==null&&h.flags&128)e:for(h=p.child;h!==null;){if(h.tag===13)h.memoizedState!==null&&FI(h,E,p);else if(h.tag===19)FI(h,E,p);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===p)break e;for(;h.sibling===null;){if(h.return===null||h.return===p)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}T&=1}if(ot(Zn,T),!(p.mode&1))p.memoizedState=null;else switch(I){case"forwards":for(E=p.child,I=null;E!==null;)h=E.alternate,h!==null&&Vv(h)===null&&(I=E),E=E.sibling;E=I,E===null?(I=p.child,p.child=null):(I=E.sibling,E.sibling=null),ab(p,!1,I,E,F);break;case"backwards":for(E=null,I=p.child,p.child=null;I!==null;){if(h=I.alternate,h!==null&&Vv(h)===null){p.child=I;break}h=I.sibling,I.sibling=E,E=I,I=h}ab(p,!0,E,null,F);break;case"together":ab(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function $a(h,p,E){if(h!==null&&(p.dependencies=h.dependencies),gh|=p.lanes,!(E&p.childLanes))return null;if(h!==null&&p.child!==h.child)throw Error(o(153));if(p.child!==null){for(h=p.child,E=kl(h,h.pendingProps),p.child=E,E.return=p;h.sibling!==null;)h=h.sibling,E=E.sibling=kl(h,h.pendingProps),E.return=p;E.sibling=null}return p.child}function T$(h,p,E){switch(p.tag){case 3:II(p),uh();break;case 5:eI(p);break;case 1:ar(p.type)&&Qn(p);break;case 4:$S(p,p.stateNode.containerInfo);break;case 10:oh(p,p.type._context,p.memoizedProps.value);break;case 13:var T=p.memoizedState;if(T!==null)return T.dehydrated!==null?(ot(Zn,Zn.current&1),p.flags|=128,null):E&p.child.childLanes?DI(h,p,E):(ot(Zn,Zn.current&1),h=$a(h,p,E),h!==null?h.sibling:null);ot(Zn,Zn.current&1);break;case 19:if(T=(E&p.childLanes)!==0,h.flags&128){if(T)return UI(h,p,E);p.flags|=128}var I=p.memoizedState;if(I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),ot(Zn,Zn.current),T)break;return null;case 22:case 23:return p.lanes=0,RI(h,p,E)}return $a(h,p,E)}function M$(h,p){switch(zS(p),p.tag){case 1:return ar(p.type)&&Vt(),h=p.flags,h&65536?(p.flags=h&-65537|128,p):null;case 3:return fh(),Ct(pn),Ct(Dt),KS(),h=p.flags,h&65536&&!(h&128)?(p.flags=h&-65537|128,p):null;case 5:return qS(p),null;case 13:if(Ct(Zn),h=p.memoizedState,h!==null&&h.dehydrated!==null){if(p.alternate===null)throw Error(o(340));uh()}return h=p.flags,h&65536?(p.flags=h&-65537|128,p):null;case 19:return Ct(Zn),null;case 4:return fh(),null;case 10:return xu(p.type._context),null;case 22:case 23:return Tb(),null;case 24:return null;default:return null}}var Jv=!1,Su=!1,A$=typeof WeakSet=="function"?WeakSet:Set,Je=null;function Zv(h,p){var E=h.ref;if(E!==null)if(typeof E=="function")try{E(null)}catch(T){cs(h,p,T)}else E.current=null}function lb(h,p,E){try{E()}catch(T){cs(h,p,T)}}var VI=!1;function C$(h,p){for(z(h.containerInfo),Je=p;Je!==null;)if(h=Je,p=h.child,(h.subtreeFlags&1028)!==0&&p!==null)p.return=h,Je=p;else for(;Je!==null;){h=Je;try{var E=h.alternate;if(h.flags&1024)switch(h.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var T=E.memoizedProps,I=E.memoizedState,F=h.stateNode,Y=F.getSnapshotBeforeUpdate(h.elementType===h.type?T:fi(h.type,T),I);F.__reactInternalSnapshotBeforeUpdate=Y}break;case 3:Ue&&ke(h.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(se){cs(h,h.return,se)}if(p=h.sibling,p!==null){p.return=h.return,Je=p;break}Je=h.return}return E=VI,VI=!1,E}function bu(h,p,E){var T=p.updateQueue;if(T=T!==null?T.lastEffect:null,T!==null){var I=T=T.next;do{if((I.tag&h)===h){var F=I.destroy;I.destroy=void 0,F!==void 0&&lb(p,E,F)}I=I.next}while(I!==T)}}function um(h,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var E=p=p.next;do{if((E.tag&h)===h){var T=E.create;E.destroy=T()}E=E.next}while(E!==p)}}function cb(h){var p=h.ref;if(p!==null){var E=h.stateNode;switch(h.tag){case 5:h=J(E);break;default:h=E}typeof p=="function"?p(h):p.current=h}}function jI(h,p,E){if(Js&&typeof Js.onCommitFiberUnmount=="function")try{Js.onCommitFiberUnmount(th,p)}catch{}switch(p.tag){case 0:case 11:case 14:case 15:if(h=p.updateQueue,h!==null&&(h=h.lastEffect,h!==null)){var T=h=h.next;do{var I=T,F=I.destroy;I=I.tag,F!==void 0&&(I&2||I&4)&&lb(p,E,F),T=T.next}while(T!==h)}break;case 1:if(Zv(p,E),h=p.stateNode,typeof h.componentWillUnmount=="function")try{h.props=p.memoizedProps,h.state=p.memoizedState,h.componentWillUnmount()}catch(Y){cs(p,E,Y)}break;case 5:Zv(p,E);break;case 4:Ue?$I(h,p,E):Q&&Q&&(p=p.stateNode.containerInfo,E=wt(p),bt(p,E))}}function BI(h,p,E){for(var T=p;;)if(jI(h,T,E),T.child===null||Ue&&T.tag===4){if(T===p)break;for(;T.sibling===null;){if(T.return===null||T.return===p)return;T=T.return}T.sibling.return=T.return,T=T.sibling}else T.child.return=T,T=T.child}function zI(h){var p=h.alternate;p!==null&&(h.alternate=null,zI(p)),h.child=null,h.deletions=null,h.sibling=null,h.tag===5&&(p=h.stateNode,p!==null&&it(p)),h.stateNode=null,h.return=null,h.dependencies=null,h.memoizedProps=null,h.memoizedState=null,h.pendingProps=null,h.stateNode=null,h.updateQueue=null}function HI(h){return h.tag===5||h.tag===3||h.tag===4}function GI(h){e:for(;;){for(;h.sibling===null;){if(h.return===null||HI(h.return))return null;h=h.return}for(h.sibling.return=h.return,h=h.sibling;h.tag!==5&&h.tag!==6&&h.tag!==18;){if(h.flags&2||h.child===null||h.tag===4)continue e;h.child.return=h,h=h.child}if(!(h.flags&2))return h.stateNode}}function WI(h){if(Ue){e:{for(var p=h.return;p!==null;){if(HI(p))break e;p=p.return}throw Error(o(160))}var E=p;switch(E.tag){case 5:p=E.stateNode,E.flags&32&&(on(p),E.flags&=-33),E=GI(h),db(h,E,p);break;case 3:case 4:p=E.stateNode.containerInfo,E=GI(h),ub(h,E,p);break;default:throw Error(o(161))}}}function ub(h,p,E){var T=h.tag;if(T===5||T===6)h=h.stateNode,p?dt(E,h,p):Ft(E,h);else if(T!==4&&(h=h.child,h!==null))for(ub(h,p,E),h=h.sibling;h!==null;)ub(h,p,E),h=h.sibling}function db(h,p,E){var T=h.tag;if(T===5||T===6)h=h.stateNode,p?Tt(E,h,p):xt(E,h);else if(T!==4&&(h=h.child,h!==null))for(db(h,p,E),h=h.sibling;h!==null;)db(h,p,E),h=h.sibling}function $I(h,p,E){for(var T=p,I=!1,F,Y;;){if(!I){I=T.return;e:for(;;){if(I===null)throw Error(o(160));switch(F=I.stateNode,I.tag){case 5:Y=!1;break e;case 3:F=F.containerInfo,Y=!0;break e;case 4:F=F.containerInfo,Y=!0;break e}I=I.return}I=!0}if(T.tag===5||T.tag===6)BI(h,T,E),Y?_t(F,T.stateNode):nt(F,T.stateNode);else if(T.tag===18)Y?fe(F,T.stateNode):ge(F,T.stateNode);else if(T.tag===4){if(T.child!==null){F=T.stateNode.containerInfo,Y=!0,T.child.return=T,T=T.child;continue}}else if(jI(h,T,E),T.child!==null){T.child.return=T,T=T.child;continue}if(T===p)break;for(;T.sibling===null;){if(T.return===null||T.return===p)return;T=T.return,T.tag===4&&(I=!1)}T.sibling.return=T.return,T=T.sibling}}function hb(h,p){if(Ue){switch(p.tag){case 0:case 11:case 14:case 15:bu(3,p,p.return),um(3,p),bu(5,p,p.return);return;case 1:return;case 5:var E=p.stateNode;if(E!=null){var T=p.memoizedProps;h=h!==null?h.memoizedProps:T;var I=p.type,F=p.updateQueue;p.updateQueue=null,F!==null&&zt(E,F,I,h,T,p)}return;case 6:if(p.stateNode===null)throw Error(o(162));E=p.memoizedProps,Pe(p.stateNode,h!==null?h.memoizedProps:E,E);return;case 3:be&&h!==null&&h.memoizedState.isDehydrated&&ce(p.stateNode.containerInfo);return;case 12:return;case 13:e0(p);return;case 19:e0(p);return;case 17:return}throw Error(o(163))}switch(p.tag){case 0:case 11:case 14:case 15:bu(3,p,p.return),um(3,p),bu(5,p,p.return);return;case 12:return;case 13:e0(p);return;case 19:e0(p);return;case 3:be&&h!==null&&h.memoizedState.isDehydrated&&ce(p.stateNode.containerInfo);break;case 22:case 23:return}e:if(Q){switch(p.tag){case 1:case 5:case 6:break e;case 3:case 4:p=p.stateNode,bt(p.containerInfo,p.pendingChildren);break e}throw Error(o(163))}}function e0(h){var p=h.updateQueue;if(p!==null){h.updateQueue=null;var E=h.stateNode;E===null&&(E=h.stateNode=new A$),p.forEach(function(T){var I=U$.bind(null,h,T);E.has(T)||(E.add(T),T.then(I,I))})}}function R$(h,p){for(Je=p;Je!==null;){p=Je;var E=p.deletions;if(E!==null)for(var T=0;T<E.length;T++){var I=E[T];try{var F=h;Ue?$I(F,I,p):BI(F,I,p);var Y=I.alternate;Y!==null&&(Y.return=null),I.return=null}catch(vt){cs(I,p,vt)}}if(E=p.child,p.subtreeFlags&12854&&E!==null)E.return=p,Je=E;else for(;Je!==null;){p=Je;try{var se=p.flags;if(se&32&&Ue&&on(p.stateNode),se&512){var _e=p.alternate;if(_e!==null){var ze=_e.ref;ze!==null&&(typeof ze=="function"?ze(null):ze.current=null)}}if(se&8192)switch(p.tag){case 13:if(p.memoizedState!==null){var ut=p.alternate;(ut===null||ut.memoizedState===null)&&(xb=Gn())}break;case 22:var Wt=p.memoizedState!==null,Rt=p.alternate,Dn=Rt!==null&&Rt.memoizedState!==null;if(E=p,Ue){e:if(T=E,I=Wt,F=null,Ue)for(var St=T;;){if(St.tag===5){if(F===null){F=St;var xi=St.stateNode;I?bn(xi):je(St.stateNode,St.memoizedProps)}}else if(St.tag===6){if(F===null){var oo=St.stateNode;I?Bt(oo):ne(oo,St.memoizedProps)}}else if((St.tag!==22&&St.tag!==23||St.memoizedState===null||St===T)&&St.child!==null){St.child.return=St,St=St.child;continue}if(St===T)break;for(;St.sibling===null;){if(St.return===null||St.return===T)break e;F===St&&(F=null),St=St.return}F===St&&(F=null),St.sibling.return=St.return,St=St.sibling}}if(Wt&&!Dn&&E.mode&1){Je=E;for(var he=E.child;he!==null;){for(E=Je=he;Je!==null;){T=Je;var oe=T.child;switch(T.tag){case 0:case 11:case 14:case 15:bu(4,T,T.return);break;case 1:Zv(T,T.return);var ye=T.stateNode;if(typeof ye.componentWillUnmount=="function"){var et=T.return;try{ye.props=T.memoizedProps,ye.state=T.memoizedState,ye.componentWillUnmount()}catch(vt){cs(T,et,vt)}}break;case 5:Zv(T,T.return);break;case 22:if(T.memoizedState!==null){KI(E);continue}}oe!==null?(oe.return=T,Je=oe):KI(E)}he=he.sibling}}}switch(se&4102){case 2:WI(p),p.flags&=-3;break;case 6:WI(p),p.flags&=-3,hb(p.alternate,p);break;case 4096:p.flags&=-4097;break;case 4100:p.flags&=-4097,hb(p.alternate,p);break;case 4:hb(p.alternate,p)}}catch(vt){cs(p,p.return,vt)}if(E=p.sibling,E!==null){E.return=p.return,Je=E;break}Je=p.return}}}function P$(h,p,E){Je=h,qI(h)}function qI(h,p,E){for(var T=(h.mode&1)!==0;Je!==null;){var I=Je,F=I.child;if(I.tag===22&&T){var Y=I.memoizedState!==null||Jv;if(!Y){var se=I.alternate,_e=se!==null&&se.memoizedState!==null||Su;se=Jv;var ze=Su;if(Jv=Y,(Su=_e)&&!ze)for(Je=I;Je!==null;)Y=Je,_e=Y.child,Y.tag===22&&Y.memoizedState!==null?YI(I):_e!==null?(_e.return=Y,Je=_e):YI(I);for(;F!==null;)Je=F,qI(F),F=F.sibling;Je=I,Jv=se,Su=ze}XI(h)}else I.subtreeFlags&8772&&F!==null?(F.return=I,Je=F):XI(h)}}function XI(h){for(;Je!==null;){var p=Je;if(p.flags&8772){var E=p.alternate;try{if(p.flags&8772)switch(p.tag){case 0:case 11:case 15:Su||um(5,p);break;case 1:var T=p.stateNode;if(p.flags&4&&!Su)if(E===null)T.componentDidMount();else{var I=p.elementType===p.type?E.memoizedProps:fi(p.type,E.memoizedProps);T.componentDidUpdate(I,E.memoizedState,T.__reactInternalSnapshotBeforeUpdate)}var F=p.updateQueue;F!==null&&Qp(p,F,T);break;case 3:var Y=p.updateQueue;if(Y!==null){if(E=null,p.child!==null)switch(p.child.tag){case 5:E=J(p.child.stateNode);break;case 1:E=p.child.stateNode}Qp(p,Y,E)}break;case 5:var se=p.stateNode;E===null&&p.flags&4&&rn(se,p.type,p.memoizedProps,p);break;case 6:break;case 4:break;case 12:break;case 13:if(be&&p.memoizedState===null){var _e=p.alternate;if(_e!==null){var ze=_e.memoizedState;if(ze!==null){var ut=ze.dehydrated;ut!==null&&me(ut)}}}break;case 19:case 17:case 21:case 22:case 23:break;default:throw Error(o(163))}Su||p.flags&512&&cb(p)}catch(Wt){cs(p,p.return,Wt)}}if(p===h){Je=null;break}if(E=p.sibling,E!==null){E.return=p.return,Je=E;break}Je=p.return}}function KI(h){for(;Je!==null;){var p=Je;if(p===h){Je=null;break}var E=p.sibling;if(E!==null){E.return=p.return,Je=E;break}Je=p.return}}function YI(h){for(;Je!==null;){var p=Je;try{switch(p.tag){case 0:case 11:case 15:var E=p.return;try{um(4,p)}catch(_e){cs(p,E,_e)}break;case 1:var T=p.stateNode;if(typeof T.componentDidMount=="function"){var I=p.return;try{T.componentDidMount()}catch(_e){cs(p,I,_e)}}var F=p.return;try{cb(p)}catch(_e){cs(p,F,_e)}break;case 5:var Y=p.return;try{cb(p)}catch(_e){cs(p,Y,_e)}}}catch(_e){cs(p,p.return,_e)}if(p===h){Je=null;break}var se=p.sibling;if(se!==null){se.return=p.return,Je=se;break}Je=p.return}}var t0=0,n0=1,r0=2,i0=3,s0=4;if(typeof Symbol=="function"&&Symbol.for){var dm=Symbol.for;t0=dm("selector.component"),n0=dm("selector.has_pseudo_class"),r0=dm("selector.role"),i0=dm("selector.test_id"),s0=dm("selector.text")}function fb(h){var p=ve(h);if(p!=null){if(typeof p.memoizedProps["data-testname"]!="string")throw Error(o(364));return p}if(h=le(h),h===null)throw Error(o(362));return h.stateNode.current}function pb(h,p){switch(p.$$typeof){case t0:if(h.type===p.value)return!0;break;case n0:e:{p=p.value,h=[h,0];for(var E=0;E<h.length;){var T=h[E++],I=h[E++],F=p[I];if(T.tag!==5||!Ce(T)){for(;F!=null&&pb(T,F);)I++,F=p[I];if(I===p.length){p=!0;break e}else for(T=T.child;T!==null;)h.push(T,I),T=T.sibling}}p=!1}return p;case r0:if(h.tag===5&&st(h.stateNode,p.value))return!0;break;case s0:if((h.tag===5||h.tag===6)&&(h=Ae(h),h!==null&&0<=h.indexOf(p.value)))return!0;break;case i0:if(h.tag===5&&(h=h.memoizedProps["data-testname"],typeof h=="string"&&h.toLowerCase()===p.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function mb(h){switch(h.$$typeof){case t0:return"<"+(C(h.value)||"Unknown")+">";case n0:return":has("+(mb(h)||"")+")";case r0:return'[role="'+h.value+'"]';case s0:return'"'+h.value+'"';case i0:return'[data-testname="'+h.value+'"]';default:throw Error(o(365))}}function QI(h,p){var E=[];h=[h,0];for(var T=0;T<h.length;){var I=h[T++],F=h[T++],Y=p[F];if(I.tag!==5||!Ce(I)){for(;Y!=null&&pb(I,Y);)F++,Y=p[F];if(F===p.length)E.push(I);else for(I=I.child;I!==null;)h.push(I,F),I=I.sibling}}return E}function gb(h,p){if(!H)throw Error(o(363));h=fb(h),h=QI(h,p),p=[],h=Array.from(h);for(var E=0;E<h.length;){var T=h[E++];if(T.tag===5)Ce(T)||p.push(T.stateNode);else for(T=T.child;T!==null;)h.push(T),T=T.sibling}return p}var N$=Math.ceil,o0=a.ReactCurrentDispatcher,yb=a.ReactCurrentOwner,gr=a.ReactCurrentBatchConfig,nn=0,Er=null,Tr=null,ti=0,Ls=0,mh=mr(0),Lr=0,hm=null,gh=0,a0=0,vb=0,fm=null,as=null,xb=0,_b=1/0;function yh(){_b=Gn()+500}var l0=!1,wb=null,Nl=null,c0=!1,Il=null,u0=0,pm=0,Sb=null,d0=-1,h0=0;function zi(){return nn&6?Gn():d0!==-1?d0:d0=Gn()}function Ll(h){return h.mode&1?nn&2&&ti!==0?ti&-ti:Kp.transition!==null?(h0===0&&(h=Yd,Yd<<=1,!(Yd&4194240)&&(Yd=64),h0=h),h0):(h=dn,h!==0?h:xe()):1}function io(h,p,E){if(50<pm)throw pm=0,Sb=null,Error(o(185));var T=f0(h,p);return T===null?null:(Qs(T,p,E),(!(nn&2)||T!==Er)&&(T===Er&&(!(nn&2)&&(a0|=p),Lr===4&&Dl(T,ti)),ls(T,E),p===1&&nn===0&&!(h.mode&1)&&(yh(),As&&Cs())),T)}function f0(h,p){h.lanes|=p;var E=h.alternate;for(E!==null&&(E.lanes|=p),E=h,h=h.return;h!==null;)h.childLanes|=p,E=h.alternate,E!==null&&(E.childLanes|=p),E=h,h=h.return;return E.tag===3?E.stateNode:null}function ls(h,p){var E=h.callbackNode;Nv(h,p);var T=mu(h,h===Er?ti:0);if(T===0)E!==null&&Zd(E),h.callbackNode=null,h.callbackPriority=0;else if(p=T&-T,h.callbackPriority!==p){if(E!=null&&Zd(E),p===1)h.tag===0?yu(ZI.bind(null,h)):Ov(ZI.bind(null,h)),Ye?G(function(){nn===0&&Cs()}):Xp(Ba,Cs),E=null;else{switch(To(T)){case 1:E=Ba;break;case 4:E=Lv;break;case 16:E=gu;break;case 536870912:E=Wn;break;default:E=gu}E=l3(E,JI.bind(null,h))}h.callbackPriority=p,h.callbackNode=E}}function JI(h,p){if(d0=-1,h0=0,nn&6)throw Error(o(327));var E=h.callbackNode;if(Mu()&&h.callbackNode!==E)return null;var T=mu(h,h===Er?ti:0);if(T===0)return null;if(T&30||T&h.expiredLanes||p)p=p0(h,T);else{p=T;var I=nn;nn|=2;var F=n3();(Er!==h||ti!==p)&&(yh(),Eu(h,p));do try{D$();break}catch(se){t3(h,se)}while(!0);sh(),o0.current=F,nn=I,Tr!==null?p=0:(Er=null,ti=0,p=Lr)}if(p!==0){if(p===2&&(I=Qd(h),I!==0&&(T=I,p=bb(h,I))),p===1)throw E=hm,Eu(h,0),Dl(h,T),ls(h,Gn()),E;if(p===6)Dl(h,T);else{if(I=h.current.alternate,!(T&30)&&!I$(I)&&(p=p0(h,T),p===2&&(F=Qd(h),F!==0&&(T=F,p=bb(h,F))),p===1))throw E=hm,Eu(h,0),Dl(h,T),ls(h,Gn()),E;switch(h.finishedWork=I,h.finishedLanes=T,p){case 0:case 1:throw Error(o(345));case 2:Tu(h,as);break;case 3:if(Dl(h,T),(T&130023424)===T&&(p=xb+500-Gn(),10<p)){if(mu(h,0)!==0)break;if(I=h.suspendedLanes,(I&T)!==T){zi(),h.pingedLanes|=h.suspendedLanes&I;break}h.timeoutHandle=de(Tu.bind(null,h,as),p);break}Tu(h,as);break;case 4:if(Dl(h,T),(T&4194240)===T)break;for(p=h.eventTimes,I=-1;0<T;){var Y=31-hi(T);F=1<<Y,Y=p[Y],Y>I&&(I=Y),T&=~F}if(T=I,T=Gn()-T,T=(120>T?120:480>T?480:1080>T?1080:1920>T?1920:3e3>T?3e3:4320>T?4320:1960*N$(T/1960))-T,10<T){h.timeoutHandle=de(Tu.bind(null,h,as),T);break}Tu(h,as);break;case 5:Tu(h,as);break;default:throw Error(o(329))}}}return ls(h,Gn()),h.callbackNode===E?JI.bind(null,h):null}function bb(h,p){var E=fm;return h.current.memoizedState.isDehydrated&&(Eu(h,p).flags|=256),h=p0(h,p),h!==2&&(p=as,as=E,p!==null&&Eb(p)),h}function Eb(h){as===null?as=h:as.push.apply(as,h)}function I$(h){for(var p=h;;){if(p.flags&16384){var E=p.updateQueue;if(E!==null&&(E=E.stores,E!==null))for(var T=0;T<E.length;T++){var I=E[T],F=I.getSnapshot;I=I.value;try{if(!Ms(F(),I))return!1}catch{return!1}}}if(E=p.child,p.subtreeFlags&16384&&E!==null)E.return=p,p=E;else{if(p===h)break;for(;p.sibling===null;){if(p.return===null||p.return===h)return!0;p=p.return}p.sibling.return=p.return,p=p.sibling}}return!0}function Dl(h,p){for(p&=~vb,p&=~a0,h.suspendedLanes|=p,h.pingedLanes&=~p,h=h.expirationTimes;0<p;){var E=31-hi(p),T=1<<E;h[E]=-1,p&=~T}}function ZI(h){if(nn&6)throw Error(o(327));Mu();var p=mu(h,0);if(!(p&1))return ls(h,Gn()),null;var E=p0(h,p);if(h.tag!==0&&E===2){var T=Qd(h);T!==0&&(p=T,E=bb(h,T))}if(E===1)throw E=hm,Eu(h,0),Dl(h,p),ls(h,Gn()),E;if(E===6)throw Error(o(345));return h.finishedWork=h.current.alternate,h.finishedLanes=p,Tu(h,as),ls(h,Gn()),null}function e3(h){Il!==null&&Il.tag===0&&!(nn&6)&&Mu();var p=nn;nn|=1;var E=gr.transition,T=dn;try{if(gr.transition=null,dn=1,h)return h()}finally{dn=T,gr.transition=E,nn=p,!(nn&6)&&Cs()}}function Tb(){Ls=mh.current,Ct(mh)}function Eu(h,p){h.finishedWork=null,h.finishedLanes=0;var E=h.timeoutHandle;if(E!==$e&&(h.timeoutHandle=$e,Ge(E)),Tr!==null)for(E=Tr.return;E!==null;){var T=E;switch(zS(T),T.tag){case 1:T=T.type.childContextTypes,T!=null&&Vt();break;case 3:fh(),Ct(pn),Ct(Dt),KS();break;case 5:qS(T);break;case 4:fh();break;case 13:Ct(Zn);break;case 19:Ct(Zn);break;case 10:xu(T.type._context);break;case 22:case 23:Tb()}E=E.return}if(Er=h,Tr=h=kl(h.current,null),ti=Ls=p,Lr=0,hm=null,vb=a0=gh=0,as=fm=null,Rs!==null){for(p=0;p<Rs.length;p++)if(E=Rs[p],T=E.interleaved,T!==null){E.interleaved=null;var I=T.next,F=E.pending;if(F!==null){var Y=F.next;F.next=I,T.next=Y}E.pending=T}Rs=null}return h}function t3(h,p){do{var E=Tr;try{if(sh(),jv.current=$v,Bv){for(var T=lr.memoizedState;T!==null;){var I=T.queue;I!==null&&(I.pending=null),T=T.next}Bv=!1}if(ph=0,$r=gi=lr=null,rm=!1,im=0,yb.current=null,E===null||E.return===null){Lr=1,hm=p,Tr=null;break}e:{var F=h,Y=E.return,se=E,_e=p;if(p=ti,se.flags|=32768,_e!==null&&typeof _e=="object"&&typeof _e.then=="function"){var ze=_e,ut=se,Wt=ut.tag;if(!(ut.mode&1)&&(Wt===0||Wt===11||Wt===15)){var Rt=ut.alternate;Rt?(ut.updateQueue=Rt.updateQueue,ut.memoizedState=Rt.memoizedState,ut.lanes=Rt.lanes):(ut.updateQueue=null,ut.memoizedState=null)}var Dn=SI(Y);if(Dn!==null){Dn.flags&=-257,bI(Dn,Y,se,F,p),Dn.mode&1&&wI(F,ze,p),p=Dn,_e=ze;var St=p.updateQueue;if(St===null){var xi=new Set;xi.add(_e),p.updateQueue=xi}else St.add(_e);break e}else{if(!(p&1)){wI(F,ze,p),Mb();break e}_e=Error(o(426))}}else if(qn&&se.mode&1){var oo=SI(Y);if(oo!==null){!(oo.flags&65536)&&(oo.flags|=256),bI(oo,Y,se,F,p),WS(_e);break e}}F=_e,Lr!==4&&(Lr=2),fm===null?fm=[F]:fm.push(F),_e=nb(_e,se),se=Y;do{switch(se.tag){case 3:se.flags|=65536,p&=-p,se.lanes|=p;var he=xI(se,_e,p);mi(se,he);break e;case 1:F=_e;var oe=se.type,ye=se.stateNode;if(!(se.flags&128)&&(typeof oe.getDerivedStateFromError=="function"||ye!==null&&typeof ye.componentDidCatch=="function"&&(Nl===null||!Nl.has(ye)))){se.flags|=65536,p&=-p,se.lanes|=p;var et=_I(se,F,p);mi(se,et);break e}}se=se.return}while(se!==null)}i3(E)}catch(vt){p=vt,Tr===E&&E!==null&&(Tr=E=E.return);continue}break}while(!0)}function n3(){var h=o0.current;return o0.current=$v,h===null?$v:h}function Mb(){(Lr===0||Lr===3||Lr===2)&&(Lr=4),Er===null||!(gh&268435455)&&!(a0&268435455)||Dl(Er,ti)}function p0(h,p){var E=nn;nn|=2;var T=n3();Er===h&&ti===p||Eu(h,p);do try{L$();break}catch(I){t3(h,I)}while(!0);if(sh(),nn=E,o0.current=T,Tr!==null)throw Error(o(261));return Er=null,ti=0,Lr}function L$(){for(;Tr!==null;)r3(Tr)}function D$(){for(;Tr!==null&&!eh();)r3(Tr)}function r3(h){var p=a3(h.alternate,h,Ls);h.memoizedProps=h.pendingProps,p===null?i3(h):Tr=p,yb.current=null}function i3(h){var p=h;do{var E=p.alternate;if(h=p.return,p.flags&32768){if(E=M$(E,p),E!==null){E.flags&=32767,Tr=E;return}if(h!==null)h.flags|=32768,h.subtreeFlags=0,h.deletions=null;else{Lr=6,Tr=null;return}}else if(E=b$(E,p,Ls),E!==null){Tr=E;return}if(p=p.sibling,p!==null){Tr=p;return}Tr=p=h}while(p!==null);Lr===0&&(Lr=5)}function Tu(h,p){var E=dn,T=gr.transition;try{gr.transition=null,dn=1,k$(h,p,E)}finally{gr.transition=T,dn=E}return null}function k$(h,p,E){do Mu();while(Il!==null);if(nn&6)throw Error(o(327));var T=h.finishedWork,I=h.finishedLanes;if(T===null)return null;if(h.finishedWork=null,h.finishedLanes=0,T===h.current)throw Error(o(177));h.callbackNode=null,h.callbackPriority=0;var F=T.lanes|T.childLanes;if(jS(h,F),h===Er&&(Tr=Er=null,ti=0),!(T.subtreeFlags&2064)&&!(T.flags&2064)||c0||(c0=!0,l3(gu,function(){return Mu(),null})),F=(T.flags&15990)!==0,T.subtreeFlags&15990||F){F=gr.transition,gr.transition=null;var Y=dn;dn=1;var se=nn;nn|=4,yb.current=null,C$(h,T),R$(h,T),q(h.containerInfo),h.current=T,P$(T),Iv(),nn=se,dn=Y,gr.transition=F}else h.current=T;if(c0&&(c0=!1,Il=h,u0=I),F=h.pendingLanes,F===0&&(Nl=null),Dv(T.stateNode),ls(h,Gn()),p!==null)for(E=h.onRecoverableError,T=0;T<p.length;T++)E(p[T]);if(l0)throw l0=!1,h=wb,wb=null,h;return u0&1&&h.tag!==0&&Mu(),F=h.pendingLanes,F&1?h===Sb?pm++:(pm=0,Sb=h):pm=0,Cs(),null}function Mu(){if(Il!==null){var h=To(u0),p=gr.transition,E=dn;try{if(gr.transition=null,dn=16>h?16:h,Il===null)var T=!1;else{if(h=Il,Il=null,u0=0,nn&6)throw Error(o(331));var I=nn;for(nn|=4,Je=h.current;Je!==null;){var F=Je,Y=F.child;if(Je.flags&16){var se=F.deletions;if(se!==null){for(var _e=0;_e<se.length;_e++){var ze=se[_e];for(Je=ze;Je!==null;){var ut=Je;switch(ut.tag){case 0:case 11:case 15:bu(8,ut,F)}var Wt=ut.child;if(Wt!==null)Wt.return=ut,Je=Wt;else for(;Je!==null;){ut=Je;var Rt=ut.sibling,Dn=ut.return;if(zI(ut),ut===ze){Je=null;break}if(Rt!==null){Rt.return=Dn,Je=Rt;break}Je=Dn}}}var St=F.alternate;if(St!==null){var xi=St.child;if(xi!==null){St.child=null;do{var oo=xi.sibling;xi.sibling=null,xi=oo}while(xi!==null)}}Je=F}}if(F.subtreeFlags&2064&&Y!==null)Y.return=F,Je=Y;else e:for(;Je!==null;){if(F=Je,F.flags&2048)switch(F.tag){case 0:case 11:case 15:bu(9,F,F.return)}var he=F.sibling;if(he!==null){he.return=F.return,Je=he;break e}Je=F.return}}var oe=h.current;for(Je=oe;Je!==null;){Y=Je;var ye=Y.child;if(Y.subtreeFlags&2064&&ye!==null)ye.return=Y,Je=ye;else e:for(Y=oe;Je!==null;){if(se=Je,se.flags&2048)try{switch(se.tag){case 0:case 11:case 15:um(9,se)}}catch(vt){cs(se,se.return,vt)}if(se===Y){Je=null;break e}var et=se.sibling;if(et!==null){et.return=se.return,Je=et;break e}Je=se.return}}if(nn=I,Cs(),Js&&typeof Js.onPostCommitFiberRoot=="function")try{Js.onPostCommitFiberRoot(th,h)}catch{}T=!0}return T}finally{dn=E,gr.transition=p}}return!1}function s3(h,p,E){p=nb(E,p),p=xI(h,p,1),Ao(h,p),p=zi(),h=f0(h,1),h!==null&&(Qs(h,1,p),ls(h,p))}function cs(h,p,E){if(h.tag===3)s3(h,h,E);else for(;p!==null;){if(p.tag===3){s3(p,h,E);break}else if(p.tag===1){var T=p.stateNode;if(typeof p.type.getDerivedStateFromError=="function"||typeof T.componentDidCatch=="function"&&(Nl===null||!Nl.has(T))){h=nb(E,h),h=_I(p,h,1),Ao(p,h),h=zi(),p=f0(p,1),p!==null&&(Qs(p,1,h),ls(p,h));break}}p=p.return}}function O$(h,p,E){var T=h.pingCache;T!==null&&T.delete(p),p=zi(),h.pingedLanes|=h.suspendedLanes&E,Er===h&&(ti&E)===E&&(Lr===4||Lr===3&&(ti&130023424)===ti&&500>Gn()-xb?Eu(h,0):vb|=E),ls(h,p)}function o3(h,p){p===0&&(h.mode&1?(p=aa,aa<<=1,!(aa&130023424)&&(aa=4194304)):p=1);var E=zi();h=f0(h,p),h!==null&&(Qs(h,p,E),ls(h,E))}function F$(h){var p=h.memoizedState,E=0;p!==null&&(E=p.retryLane),o3(h,E)}function U$(h,p){var E=0;switch(h.tag){case 13:var T=h.stateNode,I=h.memoizedState;I!==null&&(E=I.retryLane);break;case 19:T=h.stateNode;break;default:throw Error(o(314))}T!==null&&T.delete(p),o3(h,E)}var a3;a3=function(h,p,E){if(h!==null)if(h.memoizedProps!==p.pendingProps||pn.current)Is=!0;else{if(!(h.lanes&E)&&!(p.flags&128))return Is=!1,T$(h,p,E);Is=!!(h.flags&131072)}else Is=!1,qn&&p.flags&1048576&&ch(p,xn,p.index);switch(p.lanes=0,p.tag){case 2:var T=p.type;h!==null&&(h.alternate=null,p.alternate=null,p.flags|=2),h=p.pendingProps;var I=Hr(p,Dt.current);Mo(p,E),I=QS(null,p,T,h,I,E);var F=JS();return p.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,ar(T)?(F=!0,Qn(p)):F=!1,p.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,lh(p),I.updater=D,p.stateNode=I,I._reactInternals=p,pe(p,T,h,E),p=sb(null,p,T,!0,F,E)):(p.tag=0,qn&&F&&BS(p),Bi(null,p,I,E),p=p.child),p;case 16:T=p.elementType;e:{switch(h!==null&&(h.alternate=null,p.alternate=null,p.flags|=2),h=p.pendingProps,I=T._init,T=I(T._payload),p.type=T,I=p.tag=j$(T),h=fi(T,h),I){case 0:p=ib(null,p,T,h,E);break e;case 1:p=NI(null,p,T,h,E);break e;case 11:p=MI(null,p,T,h,E);break e;case 14:p=AI(null,p,T,fi(T.type,h),E);break e}throw Error(o(306,T,""))}return p;case 0:return T=p.type,I=p.pendingProps,I=p.elementType===T?I:fi(T,I),ib(h,p,T,I,E);case 1:return T=p.type,I=p.pendingProps,I=p.elementType===T?I:fi(T,I),NI(h,p,T,I,E);case 3:e:{if(II(p),h===null)throw Error(o(387));T=p.pendingProps,F=p.memoizedState,I=F.element,Yp(h,p),_u(p,T,null,E);var Y=p.memoizedState;if(T=Y.element,be&&F.isDehydrated)if(F={element:T,isDehydrated:!1,cache:Y.cache,transitions:Y.transitions},p.updateQueue.baseState=F,p.memoizedState=F,p.flags&256){I=Error(o(423)),p=LI(h,p,T,E,I);break e}else if(T!==I){I=Error(o(424)),p=LI(h,p,T,E,I);break e}else for(be&&(Ns=du(p.stateNode.containerInfo),Ps=p,qn=!0,Co=null,Jp=!1),E=ZN(p,null,T,E),p.child=E;E;)E.flags=E.flags&-3|4096,E=E.sibling;else{if(uh(),T===I){p=$a(h,p,E);break e}Bi(h,p,T,E)}p=p.child}return p;case 5:return eI(p),h===null&&GS(p),T=p.type,I=p.pendingProps,F=h!==null?h.memoizedProps:null,Y=I.children,we(T,I)?Y=null:F!==null&&we(T,F)&&(p.flags|=32),PI(h,p),Bi(h,p,Y,E),p.child;case 6:return h===null&&GS(p),null;case 13:return DI(h,p,E);case 4:return $S(p,p.stateNode.containerInfo),T=p.pendingProps,h===null?p.child=dh(p,null,T,E):Bi(h,p,T,E),p.child;case 11:return T=p.type,I=p.pendingProps,I=p.elementType===T?I:fi(T,I),MI(h,p,T,I,E);case 7:return Bi(h,p,p.pendingProps,E),p.child;case 8:return Bi(h,p,p.pendingProps.children,E),p.child;case 12:return Bi(h,p,p.pendingProps.children,E),p.child;case 10:e:{if(T=p.type._context,I=p.pendingProps,F=p.memoizedProps,Y=I.value,oh(p,T,Y),F!==null)if(Ms(F.value,Y)){if(F.children===I.children&&!pn.current){p=$a(h,p,E);break e}}else for(F=p.child,F!==null&&(F.return=p);F!==null;){var se=F.dependencies;if(se!==null){Y=F.child;for(var _e=se.firstContext;_e!==null;){if(_e.context===T){if(F.tag===1){_e=eo(-1,E&-E),_e.tag=2;var ze=F.updateQueue;if(ze!==null){ze=ze.shared;var ut=ze.pending;ut===null?_e.next=_e:(_e.next=ut.next,ut.next=_e),ze.pending=_e}}F.lanes|=E,_e=F.alternate,_e!==null&&(_e.lanes|=E),ah(F.return,E,p),se.lanes|=E;break}_e=_e.next}}else if(F.tag===10)Y=F.type===p.type?null:F.child;else if(F.tag===18){if(Y=F.return,Y===null)throw Error(o(341));Y.lanes|=E,se=Y.alternate,se!==null&&(se.lanes|=E),ah(Y,E,p),Y=F.sibling}else Y=F.child;if(Y!==null)Y.return=F;else for(Y=F;Y!==null;){if(Y===p){Y=null;break}if(F=Y.sibling,F!==null){F.return=Y.return,Y=F;break}Y=Y.return}F=Y}Bi(h,p,I.children,E),p=p.child}return p;case 9:return I=p.type,T=p.pendingProps.children,Mo(p,E),I=Vi(I),T=T(I),p.flags|=1,Bi(h,p,T,E),p.child;case 14:return T=p.type,I=fi(T,p.pendingProps),I=fi(T.type,I),AI(h,p,T,I,E);case 15:return CI(h,p,p.type,p.pendingProps,E);case 17:return T=p.type,I=p.pendingProps,I=p.elementType===T?I:fi(T,I),h!==null&&(h.alternate=null,p.alternate=null,p.flags|=2),p.tag=1,ar(T)?(h=!0,Qn(p)):h=!1,Mo(p,E),$(p,T,I),pe(p,T,I,E),sb(null,p,T,!0,h,E);case 19:return UI(h,p,E);case 22:return RI(h,p,E)}throw Error(o(156,p.tag))};function l3(h,p){return Xp(h,p)}function V$(h,p,E,T){this.tag=h,this.key=E,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=T,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function so(h,p,E,T){return new V$(h,p,E,T)}function Ab(h){return h=h.prototype,!(!h||!h.isReactComponent)}function j$(h){if(typeof h=="function")return Ab(h)?1:0;if(h!=null){if(h=h.$$typeof,h===_)return 11;if(h===S)return 14}return 2}function kl(h,p){var E=h.alternate;return E===null?(E=so(h.tag,p,h.key,h.mode),E.elementType=h.elementType,E.type=h.type,E.stateNode=h.stateNode,E.alternate=h,h.alternate=E):(E.pendingProps=p,E.type=h.type,E.flags=0,E.subtreeFlags=0,E.deletions=null),E.flags=h.flags&14680064,E.childLanes=h.childLanes,E.lanes=h.lanes,E.child=h.child,E.memoizedProps=h.memoizedProps,E.memoizedState=h.memoizedState,E.updateQueue=h.updateQueue,p=h.dependencies,E.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},E.sibling=h.sibling,E.index=h.index,E.ref=h.ref,E}function m0(h,p,E,T,I,F){var Y=2;if(T=h,typeof h=="function")Ab(h)&&(Y=1);else if(typeof h=="string")Y=5;else e:switch(h){case u:return Au(E.children,I,F,p);case d:Y=8,I|=8;break;case m:return h=so(12,E,p,I|2),h.elementType=m,h.lanes=F,h;case x:return h=so(13,E,p,I),h.elementType=x,h.lanes=F,h;case y:return h=so(19,E,p,I),h.elementType=y,h.lanes=F,h;case A:return g0(E,I,F,p);default:if(typeof h=="object"&&h!==null)switch(h.$$typeof){case g:Y=10;break e;case v:Y=9;break e;case _:Y=11;break e;case S:Y=14;break e;case b:Y=16,T=null;break e}throw Error(o(130,h==null?h:typeof h,""))}return p=so(Y,E,p,I),p.elementType=h,p.type=T,p.lanes=F,p}function Au(h,p,E,T){return h=so(7,h,T,p),h.lanes=E,h}function g0(h,p,E,T){return h=so(22,h,T,p),h.elementType=A,h.lanes=E,h.stateNode={},h}function Cb(h,p,E){return h=so(6,h,null,p),h.lanes=E,h}function Rb(h,p,E){return p=so(4,h.children!==null?h.children:[],h.key,p),p.lanes=E,p.stateNode={containerInfo:h.containerInfo,pendingChildren:null,implementation:h.implementation},p}function B$(h,p,E,T,I){this.tag=p,this.containerInfo=h,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=$e,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jd(0),this.expirationTimes=Jd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jd(0),this.identifierPrefix=T,this.onRecoverableError=I,be&&(this.mutableSourceEagerHydrationData=null)}function c3(h,p,E,T,I,F,Y,se,_e){return h=new B$(h,p,E,se,_e),p===1?(p=1,F===!0&&(p|=8)):p=0,F=so(3,null,null,p),h.current=F,F.stateNode=h,F.memoizedState={element:T,isDehydrated:E,cache:null,transitions:null},lh(F),h}function u3(h){if(!h)return ss;h=h._reactInternals;e:{if(R(h)!==h||h.tag!==1)throw Error(o(170));var p=h;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(ar(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(o(171))}if(h.tag===1){var E=h.type;if(ar(E))return Ys(h,E,p)}return p}function d3(h){var p=h._reactInternals;if(p===void 0)throw typeof h.render=="function"?Error(o(188)):(h=Object.keys(h).join(","),Error(o(268,h)));return h=V(p),h===null?null:h.stateNode}function h3(h,p){if(h=h.memoizedState,h!==null&&h.dehydrated!==null){var E=h.retryLane;h.retryLane=E!==0&&E<p?E:p}}function Pb(h,p){h3(h,p),(h=h.alternate)&&h3(h,p)}function z$(h){return h=V(h),h===null?null:h.stateNode}function H$(){return null}return t.attemptContinuousHydration=function(h){if(h.tag===13){var p=zi();io(h,134217728,p),Pb(h,134217728)}},t.attemptHydrationAtCurrentPriority=function(h){if(h.tag===13){var p=zi(),E=Ll(h);io(h,E,p),Pb(h,E)}},t.attemptSynchronousHydration=function(h){switch(h.tag){case 3:var p=h.stateNode;if(p.current.memoizedState.isDehydrated){var E=Ts(p.pendingLanes);E!==0&&(qp(p,E|1),ls(p,Gn()),!(nn&6)&&(yh(),Cs()))}break;case 13:var T=zi();e3(function(){return io(h,1,T)}),Pb(h,1)}},t.batchedUpdates=function(h,p){var E=nn;nn|=1;try{return h(p)}finally{nn=E,nn===0&&(yh(),As&&Cs())}},t.createComponentSelector=function(h){return{$$typeof:t0,value:h}},t.createContainer=function(h,p,E,T,I,F,Y){return c3(h,p,!1,null,E,T,I,F,Y)},t.createHasPseudoClassSelector=function(h){return{$$typeof:n0,value:h}},t.createHydrationContainer=function(h,p,E,T,I,F,Y,se,_e){return h=c3(E,T,!0,h,I,F,Y,se,_e),h.context=u3(null),E=h.current,T=zi(),I=Ll(E),F=eo(T,I),F.callback=p??null,Ao(E,F),h.current.lanes=I,Qs(h,I,T),ls(h,T),h},t.createPortal=function(h,p,E){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:T==null?null:""+T,children:h,containerInfo:p,implementation:E}},t.createRoleSelector=function(h){return{$$typeof:r0,value:h}},t.createTestNameSelector=function(h){return{$$typeof:i0,value:h}},t.createTextSelector=function(h){return{$$typeof:s0,value:h}},t.deferredUpdates=function(h){var p=dn,E=gr.transition;try{return gr.transition=null,dn=16,h()}finally{dn=p,gr.transition=E}},t.discreteUpdates=function(h,p,E,T,I){var F=dn,Y=gr.transition;try{return gr.transition=null,dn=1,h(p,E,T,I)}finally{dn=F,gr.transition=Y,nn===0&&yh()}},t.findAllNodes=gb,t.findBoundingRects=function(h,p){if(!H)throw Error(o(363));p=gb(h,p),h=[];for(var E=0;E<p.length;E++)h.push(Ne(p[E]));for(p=h.length-1;0<p;p--){E=h[p];for(var T=E.x,I=T+E.width,F=E.y,Y=F+E.height,se=p-1;0<=se;se--)if(p!==se){var _e=h[se],ze=_e.x,ut=ze+_e.width,Wt=_e.y,Rt=Wt+_e.height;if(T>=ze&&F>=Wt&&I<=ut&&Y<=Rt){h.splice(p,1);break}else if(T!==ze||E.width!==_e.width||Rt<F||Wt>Y){if(!(F!==Wt||E.height!==_e.height||ut<T||ze>I)){ze>T&&(_e.width+=ze-T,_e.x=T),ut<I&&(_e.width=I-ze),h.splice(p,1);break}}else{Wt>F&&(_e.height+=Wt-F,_e.y=F),Rt<Y&&(_e.height=Y-Wt),h.splice(p,1);break}}}return h},t.findHostInstance=d3,t.findHostInstanceWithNoPortals=function(h){return h=O(h),h=h!==null?W(h):null,h===null?null:h.stateNode},t.findHostInstanceWithWarning=function(h){return d3(h)},t.flushControlled=function(h){var p=nn;nn|=1;var E=gr.transition,T=dn;try{gr.transition=null,dn=1,h()}finally{dn=T,gr.transition=E,nn=p,nn===0&&(yh(),Cs())}},t.flushPassiveEffects=Mu,t.flushSync=e3,t.focusWithin=function(h,p){if(!H)throw Error(o(363));for(h=fb(h),p=QI(h,p),p=Array.from(p),h=0;h<p.length;){var E=p[h++];if(!Ce(E)){if(E.tag===5&&Ve(E.stateNode))return!0;for(E=E.child;E!==null;)p.push(E),E=E.sibling}}return!1},t.getCurrentUpdatePriority=function(){return dn},t.getFindAllNodesFailureDescription=function(h,p){if(!H)throw Error(o(363));var E=0,T=[];h=[fb(h),0];for(var I=0;I<h.length;){var F=h[I++],Y=h[I++],se=p[Y];if((F.tag!==5||!Ce(F))&&(pb(F,se)&&(T.push(mb(se)),Y++,Y>E&&(E=Y)),Y<p.length))for(F=F.child;F!==null;)h.push(F,Y),F=F.sibling}if(E<p.length){for(h=[];E<p.length;E++)h.push(mb(p[E]));return`findAllNodes was able to match part of the selector: 4217 `+(T.join(" > ")+` 4218 4219No matching component was found for: 4220 `)+h.join(" > ")}return null},t.getPublicRootInstance=function(h){if(h=h.current,!h.child)return null;switch(h.child.tag){case 5:return J(h.child.stateNode);default:return h.child.stateNode}},t.injectIntoDevTools=function(h){if(h={bundleType:h.bundleType,version:h.version,rendererPackageName:h.rendererPackageName,rendererConfig:h.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:z$,findFiberByHostInstance:h.findFiberByHostInstance||H$,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")h=!1;else{var p=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(p.isDisabled||!p.supportsFiber)h=!0;else{try{th=p.inject(h),Js=p}catch{}h=!!p.checkDCE}}return h},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(h,p,E,T){if(!H)throw Error(o(363));h=gb(h,p);var I=Qe(h,E,T).disconnect;return{disconnect:function(){I()}}},t.registerMutableSourceForHydration=function(h,p){var E=p._getVersion;E=E(p._source),h.mutableSourceEagerHydrationData==null?h.mutableSourceEagerHydrationData=[p,E]:h.mutableSourceEagerHydrationData.push(p,E)},t.runWithPriority=function(h,p){var E=dn;try{return dn=h,p()}finally{dn=E}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(h,p,E,T){var I=p.current,F=zi(),Y=Ll(I);return E=u3(E),p.context===null?p.context=E:p.pendingContext=E,p=eo(F,Y),p.payload={element:h},T=T===void 0?null:T,T!==null&&(p.callback=T),Ao(I,p),h=io(I,Y,F),h!==null&&Ha(h,I,Y),Y},t};sH.exports=rpe;var ipe=sH.exports;const spe=GC(ipe);var oH={exports:{}},aH={};/** 4221 * @license React 4222 * scheduler.production.min.js 4223 * 4224 * Copyright (c) Facebook, Inc. and its affiliates. 4225 * 4226 * This source code is licensed under the MIT license found in the 4227 * LICENSE file in the root directory of this source tree. 4228 */(function(n){function e(j,z){var q=j.length;j.push(z);e:for(;0<q;){var Z=q-1>>>1,re=j[Z];if(0<i(re,z))j[Z]=z,j[q]=re,q=Z;else break e}}function t(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var z=j[0],q=j.pop();if(q!==z){j[0]=q;e:for(var Z=0,re=j.length,te=re>>>1;Z<te;){var ae=2*(Z+1)-1,we=j[ae],Re=ae+1,de=j[Re];if(0>i(we,q))Re<re&&0>i(de,we)?(j[Z]=de,j[Re]=q,Z=Re):(j[Z]=we,j[ae]=q,Z=ae);else if(Re<re&&0>i(de,q))j[Z]=de,j[Re]=q,Z=Re;else break e}}return z}function i(j,z){var q=j.sortIndex-z.sortIndex;return q!==0?q:j.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,m=3,g=!1,v=!1,_=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(j){for(var z=t(c);z!==null;){if(z.callback===null)r(c);else if(z.startTime<=j)r(c),z.sortIndex=z.expirationTime,e(l,z);else break;z=t(c)}}function A(j){if(_=!1,b(j),!v)if(t(l)!==null)v=!0,J(k);else{var z=t(c);z!==null&&ie(A,z.startTime-j)}}function k(j,z){v=!1,_&&(_=!1,y(P),P=-1),g=!0;var q=m;try{for(b(z),d=t(l);d!==null&&(!(d.expirationTime>z)||j&&!O());){var Z=d.callback;if(typeof Z=="function"){d.callback=null,m=d.priorityLevel;var re=Z(d.expirationTime<=z);z=n.unstable_now(),typeof re=="function"?d.callback=re:d===t(l)&&r(l),b(z)}else r(l);d=t(l)}if(d!==null)var te=!0;else{var ae=t(c);ae!==null&&ie(A,ae.startTime-z),te=!1}return te}finally{d=null,m=q,g=!1}}var L=!1,C=null,P=-1,R=5,N=-1;function O(){return!(n.unstable_now()-N<R)}function V(){if(C!==null){var j=n.unstable_now();N=j;var z=!0;try{z=C(!0,j)}finally{z?B():(L=!1,C=null)}}else L=!1}var B;if(typeof S=="function")B=function(){S(V)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,ee=W.port2;W.port1.onmessage=V,B=function(){ee.postMessage(null)}}else B=function(){x(V,0)};function J(j){C=j,L||(L=!0,B())}function ie(j,z){P=x(function(){j(n.unstable_now())},z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(j){j.callback=null},n.unstable_continueExecution=function(){v||g||(v=!0,J(k))},n.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<j?Math.floor(1e3/j):5},n.unstable_getCurrentPriorityLevel=function(){return m},n.unstable_getFirstCallbackNode=function(){return t(l)},n.unstable_next=function(j){switch(m){case 1:case 2:case 3:var z=3;break;default:z=m}var q=m;m=z;try{return j()}finally{m=q}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(j,z){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var q=m;m=j;try{return z()}finally{m=q}},n.unstable_scheduleCallback=function(j,z,q){var Z=n.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?Z+q:Z):q=Z,j){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=q+re,j={id:u++,callback:z,priorityLevel:j,startTime:q,expirationTime:re,sortIndex:-1},q>Z?(j.sortIndex=q,e(c,j),t(l)===null&&j===t(c)&&(_?(y(P),P=-1):_=!0,ie(A,q-Z))):(j.sortIndex=re,e(l,j),v||g||(v=!0,J(k))),j},n.unstable_shouldYield=O,n.unstable_wrapCallback=function(j){var z=m;return function(){var q=m;m=z;try{return j.apply(this,arguments)}finally{m=q}}}})(aH);oH.exports=aH;var aO=oH.exports;const jP={},ope=n=>void Object.assign(jP,n);function ape(n,e){function t(u,{args:d=[],attach:m,...g},v){let _=`${u[0].toUpperCase()}${u.slice(1)}`,x;if(u==="primitive"){if(g.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const y=g.object;x=Wh(y,{type:u,root:v,attach:m,primitive:!0})}else{const y=jP[_];if(!y)throw new Error(`R3F: ${_} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(d))throw new Error("R3F: The args prop must be an array!");x=Wh(new y(...d),{type:u,root:v,attach:m,memoizedProps:{args:d}})}return x.__r3f.attach===void 0&&(x.isBufferGeometry?x.__r3f.attach="geometry":x.isMaterial&&(x.__r3f.attach="material")),_!=="inject"&&gT(x,g),x}function r(u,d){let m=!1;if(d){var g,v;(g=d.__r3f)!=null&&g.attach?mT(u,d,d.__r3f.attach):d.isObject3D&&u.isObject3D&&(u.add(d),m=!0),m||(v=u.__r3f)==null||v.objects.push(d),d.__r3f||Wh(d,{}),d.__r3f.parent=u,hC(d),$h(d)}}function i(u,d,m){let g=!1;if(d){var v,_;if((v=d.__r3f)!=null&&v.attach)mT(u,d,d.__r3f.attach);else if(d.isObject3D&&u.isObject3D){d.parent=u,d.dispatchEvent({type:"added"}),u.dispatchEvent({type:"childadded",child:d});const x=u.children.filter(S=>S!==d),y=x.indexOf(m);u.children=[...x.slice(0,y),d,...x.slice(y)],g=!0}g||(_=u.__r3f)==null||_.objects.push(d),d.__r3f||Wh(d,{}),d.__r3f.parent=u,hC(d),$h(d)}}function s(u,d,m=!1){u&&[...u].forEach(g=>o(d,g,m))}function o(u,d,m){if(d){var g,v,_;if(d.__r3f&&(d.__r3f.parent=null),(g=u.__r3f)!=null&&g.objects&&(u.__r3f.objects=u.__r3f.objects.filter(A=>A!==d)),(v=d.__r3f)!=null&&v.attach)hO(u,d,d.__r3f.attach);else if(d.isObject3D&&u.isObject3D){var x;u.remove(d),(x=d.__r3f)!=null&&x.root&&ppe(S_(d),d)}const S=(_=d.__r3f)==null?void 0:_.primitive,b=!S&&(m===void 0?d.dispose!==null:m);if(!S){var y;s((y=d.__r3f)==null?void 0:y.objects,d,b),s(d.children,d,b)}if(delete d.__r3f,b&&d.dispose&&d.type!=="Scene"){const A=()=>{try{d.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?aO.unstable_scheduleCallback(aO.unstable_IdlePriority,A):A()}$h(u)}}function a(u,d,m,g){var v;const _=(v=u.__r3f)==null?void 0:v.parent;if(!_)return;const x=t(d,m,u.__r3f.root);if(u.children){for(const y of u.children)y.__r3f&&r(x,y);u.children=u.children.filter(y=>!y.__r3f)}u.__r3f.objects.forEach(y=>r(x,y)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||o(_,u),x.parent&&(x.__r3f.autoRemovedBeforeAppend=!0),r(_,x),x.raycast&&x.__r3f.eventCount&&S_(x).getState().internal.interaction.push(x),[g,g.alternate].forEach(y=>{y!==null&&(y.stateNode=x,y.ref&&(typeof y.ref=="function"?y.ref(x):y.ref.current=x))})}const l=()=>{};return{reconciler:spe({createInstance:t,removeChild:o,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(u,d)=>{if(!d)return;const m=u.getState().scene;m.__r3f&&(m.__r3f.root=u,r(m,d))},removeChildFromContainer:(u,d)=>{d&&o(u.getState().scene,d)},insertInContainerBefore:(u,d,m)=>{if(!d||!m)return;const g=u.getState().scene;g.__r3f&&i(g,d,m)},getRootHostContext:()=>null,getChildHostContext:u=>u,finalizeInitialChildren(u){var d;return!!((d=u==null?void 0:u.__r3f)!=null?d:{}).handlers},prepareUpdate(u,d,m,g){var v;if(((v=u==null?void 0:u.__r3f)!=null?v:{}).primitive&&g.object&&g.object!==u)return[!0];{const{args:x=[],children:y,...S}=g,{args:b=[],children:A,...k}=m;if(!Array.isArray(x))throw new Error("R3F: the args prop must be an array!");if(x.some((C,P)=>C!==b[P]))return[!0];const L=pH(u,S,k,!0);return L.changes.length?[!1,L]:null}},commitUpdate(u,[d,m],g,v,_,x){d?a(u,g,_,x):gT(u,m)},commitMount(u,d,m,g){var v;const _=(v=u.__r3f)!=null?v:{};u.raycast&&_.handlers&&_.eventCount&&S_(u).getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>Wh(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var d;const{attach:m,parent:g}=(d=u.__r3f)!=null?d:{};m&&g&&hO(g,u,m),u.isObject3D&&(u.visible=!1),$h(u)},unhideInstance(u,d){var m;const{attach:g,parent:v}=(m=u.__r3f)!=null?m:{};g&&v&&mT(v,u,g),(u.isObject3D&&d.visible==null||d.visible)&&(u.visible=!0),$h(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():_f.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&Bn.fun(performance.now)?performance.now:Bn.fun(Date.now)?Date.now:()=>0,scheduleTimeout:Bn.fun(setTimeout)?setTimeout:void 0,cancelTimeout:Bn.fun(clearTimeout)?clearTimeout:void 0}),applyProps:gT}}var lO,cO;const pT=n=>"colorSpace"in n||"outputColorSpace"in n,lH=()=>{var n;return(n=jP.ColorManagement)!=null?n:null},cH=n=>n&&n.isOrthographicCamera,lpe=n=>n&&n.hasOwnProperty("current"),fv=typeof window<"u"&&((lO=window.document)!=null&&lO.createElement||((cO=window.navigator)==null?void 0:cO.product)==="ReactNative")?M.useLayoutEffect:M.useEffect;function uH(n){const e=M.useRef(n);return fv(()=>void(e.current=n),[n]),e}function cpe({set:n}){return fv(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class dH extends M.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}dH.getDerivedStateFromError=()=>({error:!0});const hH="__default",uO=new Map,upe=n=>n&&!!n.memoized&&!!n.changes;function fH(n){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(n)?Math.min(Math.max(n[0],t),n[1]):n}const Um=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()};function S_(n){let e=n.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const Bn={obj:n=>n===Object(n)&&!Bn.arr(n)&&typeof n!="function",fun:n=>typeof n=="function",str:n=>typeof n=="string",num:n=>typeof n=="number",boo:n=>typeof n=="boolean",und:n=>n===void 0,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:r="reference",strict:i=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if(Bn.str(n)||Bn.num(n)||Bn.boo(n))return n===e;const s=Bn.obj(n);if(s&&r==="reference")return n===e;const o=Bn.arr(n);if(o&&t==="reference")return n===e;if((o||s)&&n===e)return!0;let a;for(a in n)if(!(a in e))return!1;if(s&&t==="shallow"&&r==="shallow"){for(a in i?e:n)if(!Bn.equ(n[a],e[a],{strict:i,objects:"reference"}))return!1}else for(a in i?e:n)if(n[a]!==e[a])return!1;if(Bn.und(a)){if(o&&n.length===0&&e.length===0||s&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function dpe(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function Wh(n,e){const t=n;return t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},n}function dC(n,e){let t=n;if(e.includes("-")){const r=e.split("-"),i=r.pop();return t=r.reduce((s,o)=>s[o],n),{target:t,key:i}}else return{target:t,key:e}}const dO=/-\d+$/;function mT(n,e,t){if(Bn.str(t)){if(dO.test(t)){const s=t.replace(dO,""),{target:o,key:a}=dC(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:r,key:i}=dC(n,t);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=t(n,e)}function hO(n,e,t){var r,i;if(Bn.str(t)){const{target:s,key:o}=dC(n,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(n,e);(i=e.__r3f)==null||delete i.previousAttach}function pH(n,{children:e,key:t,ref:r,...i},{children:s,key:o,ref:a,...l}={},c=!1){const u=n.__r3f,d=Object.entries(i),m=[];if(c){const v=Object.keys(l);for(let _=0;_<v.length;_++)i.hasOwnProperty(v[_])||d.unshift([v[_],hH+"remove"])}d.forEach(([v,_])=>{var x;if((x=n.__r3f)!=null&&x.primitive&&v==="object"||Bn.equ(_,l[v]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(v))return m.push([v,_,!0,[]]);let y=[];v.includes("-")&&(y=v.split("-")),m.push([v,_,!1,y]);for(const S in i){const b=i[S];S.startsWith(`${v}-`)&&m.push([S,b,!1,S.split("-")])}});const g={...i};return u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.args&&(g.args=u.memoizedProps.args),u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.attach&&(g.attach=u.memoizedProps.attach),{memoized:g,changes:m}}const hpe=typeof process<"u"&&!1;function gT(n,e){var t;const r=n.__r3f,i=r==null?void 0:r.root,s=i==null||i.getState==null?void 0:i.getState(),{memoized:o,changes:a}=upe(e)?e:pH(n,e),l=r==null?void 0:r.eventCount;n.__r3f&&(n.__r3f.memoizedProps=o);for(let m=0;m<a.length;m++){let[g,v,_,x]=a[m];if(pT(n)){const A="srgb",k="srgb-linear";g==="encoding"?(g="colorSpace",v=v===3001?A:k):g==="outputEncoding"&&(g="outputColorSpace",v=v===3001?A:k)}let y=n,S=y[g];if(x.length&&(S=x.reduce((b,A)=>b[A],n),!(S&&S.set))){const[b,...A]=x.reverse();y=A.reverse().reduce((k,L)=>k[L],n),g=b}if(v===hH+"remove")if(y.constructor){let b=uO.get(y.constructor);b||(b=new y.constructor,uO.set(y.constructor,b)),v=b[g]}else v=0;if(_&&r)v?r.handlers[g]=v:delete r.handlers[g],r.eventCount=Object.keys(r.handlers).length;else if(S&&S.set&&(S.copy||S instanceof pd)){if(Array.isArray(v))S.fromArray?S.fromArray(v):S.set(...v);else if(S.copy&&v&&v.constructor&&(hpe?S.constructor.name===v.constructor.name:S.constructor===v.constructor))S.copy(v);else if(v!==void 0){var c;const b=(c=S)==null?void 0:c.isColor;!b&&S.setScalar?S.setScalar(v):S instanceof pd&&v instanceof pd?S.mask=v.mask:S.set(v),!lH()&&s&&!s.linear&&b&&S.convertSRGBToLinear()}}else{var u;if(y[g]=v,(u=y[g])!=null&&u.isTexture&&y[g].format===Xi&&y[g].type===Ca&&s){const b=y[g];pT(b)&&pT(s.gl)?b.colorSpace=s.gl.outputColorSpace:b.encoding=s.gl.outputEncoding}}$h(n)}if(r&&r.parent&&n.raycast&&l!==r.eventCount){const m=S_(n).getState().internal,g=m.interaction.indexOf(n);g>-1&&m.interaction.splice(g,1),r.eventCount&&m.interaction.push(n)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(t=n.__r3f)!=null&&t.parent&&hC(n),n}function $h(n){var e,t;const r=(e=n.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();r&&r.internal.frames===0&&r.invalidate()}function hC(n){n.onUpdate==null||n.onUpdate(n)}function mH(n,e){n.manual||(cH(n)?(n.left=e.width/-2,n.right=e.width/2,n.top=e.height/2,n.bottom=e.height/-2):n.aspect=e.width/e.height,n.updateProjectionMatrix(),n.updateMatrixWorld())}function Ox(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function fpe(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return _f.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return _f.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return _f.ContinuousEventPriority;default:return _f.DefaultEventPriority}}function gH(n,e,t,r){const i=t.get(e);i&&(t.delete(e),t.size===0&&(n.delete(r),i.target.releasePointerCapture(r)))}function ppe(n,e){const{internal:t}=n.getState();t.interaction=t.interaction.filter(r=>r!==e),t.initialHits=t.initialHits.filter(r=>r!==e),t.hovered.forEach((r,i)=>{(r.eventObject===e||r.object===e)&&t.hovered.delete(i)}),t.capturedMap.forEach((r,i)=>{gH(t.capturedMap,e,r,i)})}function mpe(n){function e(l){const{internal:c}=n.getState(),u=l.offsetX-c.initialClick[0],d=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(u*u+d*d))}function t(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(u=>{var d;return(d=c.__r3f)==null?void 0:d.handlers["onPointer"+u]}))}function r(l,c){const u=n.getState(),d=new Set,m=[],g=c?c(u.internal.interaction):u.internal.interaction;for(let y=0;y<g.length;y++){const S=Um(g[y]);S&&(S.raycaster.camera=void 0)}u.previousRoot||u.events.compute==null||u.events.compute(l,u);function v(y){const S=Um(y);if(!S||!S.events.enabled||S.raycaster.camera===null)return[];if(S.raycaster.camera===void 0){var b;S.events.compute==null||S.events.compute(l,S,(b=S.previousRoot)==null?void 0:b.getState()),S.raycaster.camera===void 0&&(S.raycaster.camera=null)}return S.raycaster.camera?S.raycaster.intersectObject(y,!0):[]}let _=g.flatMap(v).sort((y,S)=>{const b=Um(y.object),A=Um(S.object);return!b||!A?y.distance-S.distance:A.events.priority-b.events.priority||y.distance-S.distance}).filter(y=>{const S=Ox(y);return d.has(S)?!1:(d.add(S),!0)});u.events.filter&&(_=u.events.filter(_,u));for(const y of _){let S=y.object;for(;S;){var x;(x=S.__r3f)!=null&&x.eventCount&&m.push({...y,eventObject:S}),S=S.parent}}if("pointerId"in l&&u.internal.capturedMap.has(l.pointerId))for(let y of u.internal.capturedMap.get(l.pointerId).values())d.has(Ox(y.intersection))||m.push(y.intersection);return m}function i(l,c,u,d){const m=n.getState();if(l.length){const g={stopped:!1};for(const v of l){const _=Um(v.object)||m,{raycaster:x,pointer:y,camera:S,internal:b}=_,A=new K(y.x,y.y,0).unproject(S),k=N=>{var O,V;return(O=(V=b.capturedMap.get(N))==null?void 0:V.has(v.eventObject))!=null?O:!1},L=N=>{const O={intersection:v,target:c.target};b.capturedMap.has(N)?b.capturedMap.get(N).set(v.eventObject,O):b.capturedMap.set(N,new Map([[v.eventObject,O]])),c.target.setPointerCapture(N)},C=N=>{const O=b.capturedMap.get(N);O&&gH(b.capturedMap,v.eventObject,O,N)};let P={};for(let N in c){let O=c[N];typeof O!="function"&&(P[N]=O)}let R={...v,...P,pointer:y,intersections:l,stopped:g.stopped,delta:u,unprojectedPoint:A,ray:x.ray,camera:S,stopPropagation(){const N="pointerId"in c&&b.capturedMap.get(c.pointerId);if((!N||N.has(v.eventObject))&&(R.stopped=g.stopped=!0,b.hovered.size&&Array.from(b.hovered.values()).find(O=>O.eventObject===v.eventObject))){const O=l.slice(0,l.indexOf(v));s([...O,v])}},target:{hasPointerCapture:k,setPointerCapture:L,releasePointerCapture:C},currentTarget:{hasPointerCapture:k,setPointerCapture:L,releasePointerCapture:C},nativeEvent:c};if(d(R),g.stopped===!0)break}}return l}function s(l){const{internal:c}=n.getState();for(const u of c.hovered.values())if(!l.length||!l.find(d=>d.object===u.object&&d.index===u.index&&d.instanceId===u.instanceId)){const m=u.eventObject.__r3f,g=m==null?void 0:m.handlers;if(c.hovered.delete(Ox(u)),m!=null&&m.eventCount){const v={...u,intersections:l};g.onPointerOut==null||g.onPointerOut(v),g.onPointerLeave==null||g.onPointerLeave(v)}}}function o(l,c){for(let u=0;u<c.length;u++){const d=c[u].__r3f;d==null||d.handlers.onPointerMissed==null||d.handlers.onPointerMissed(l)}}function a(l){switch(l){case"onPointerLeave":case"onPointerCancel":return()=>s([]);case"onLostPointerCapture":return c=>{const{internal:u}=n.getState();"pointerId"in c&&u.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{u.capturedMap.has(c.pointerId)&&(u.capturedMap.delete(c.pointerId),s([]))})}}return function(u){const{onPointerMissed:d,internal:m}=n.getState();m.lastEvent.current=u;const g=l==="onPointerMove",v=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",x=r(u,g?t:void 0),y=v?e(u):0;l==="onPointerDown"&&(m.initialClick=[u.offsetX,u.offsetY],m.initialHits=x.map(b=>b.eventObject)),v&&!x.length&&y<=2&&(o(u,m.interaction),d&&d(u)),g&&s(x);function S(b){const A=b.eventObject,k=A.__r3f,L=k==null?void 0:k.handlers;if(k!=null&&k.eventCount)if(g){if(L.onPointerOver||L.onPointerEnter||L.onPointerOut||L.onPointerLeave){const C=Ox(b),P=m.hovered.get(C);P?P.stopped&&b.stopPropagation():(m.hovered.set(C,b),L.onPointerOver==null||L.onPointerOver(b),L.onPointerEnter==null||L.onPointerEnter(b))}L.onPointerMove==null||L.onPointerMove(b)}else{const C=L[l];C?(!v||m.initialHits.includes(A))&&(o(u,m.interaction.filter(P=>!m.initialHits.includes(P))),C(b)):v&&m.initialHits.includes(A)&&o(u,m.interaction.filter(P=>!m.initialHits.includes(P)))}}i(x,u,y,S)}}return{handlePointer:a}}const gpe=["set","get","setSize","setFrameloop","setDpr","events","invalidate","advance","size","viewport"],yH=n=>!!(n!=null&&n.render),BP=M.createContext(null),ype=(n,e)=>{const t=iH((a,l)=>{const c=new K,u=new K,d=new K;function m(y=l().camera,S=u,b=l().size){const{width:A,height:k,top:L,left:C}=b,P=A/k;S.isVector3?d.copy(S):d.set(...S);const R=y.getWorldPosition(c).distanceTo(d);if(cH(y))return{width:A/y.zoom,height:k/y.zoom,top:L,left:C,factor:1,distance:R,aspect:P};{const N=y.fov*Math.PI/180,O=2*Math.tan(N/2)*R,V=O*(A/k);return{width:V,height:O,top:L,left:C,factor:A/V,distance:R,aspect:P}}}let g;const v=y=>a(S=>({performance:{...S.performance,current:y}})),_=new Te;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(y=1)=>n(l(),y),advance:(y,S)=>e(y,S,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new kP,pointer:_,mouse:_,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const y=l();g&&clearTimeout(g),y.performance.current!==y.performance.min&&v(y.performance.min),g=setTimeout(()=>v(l().performance.max),y.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:m},setEvents:y=>a(S=>({...S,events:{...S.events,...y}})),setSize:(y,S,b,A,k)=>{const L=l().camera,C={width:y,height:S,top:A||0,left:k||0,updateStyle:b};a(P=>({size:C,viewport:{...P.viewport,...m(L,u,C)}}))},setDpr:y=>a(S=>{const b=fH(y);return{viewport:{...S.viewport,dpr:b,initialDpr:S.viewport.initialDpr||b}}}),setFrameloop:(y="always")=>{const S=l().clock;S.stop(),S.elapsedTime=0,y!=="never"&&(S.start(),S.elapsedTime=0),a(()=>({frameloop:y}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:M.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(y,S,b)=>{const A=l().internal;return A.priority=A.priority+(S>0?1:0),A.subscribers.push({ref:y,priority:S,store:b}),A.subscribers=A.subscribers.sort((k,L)=>k.priority-L.priority),()=>{const k=l().internal;k!=null&&k.subscribers&&(k.priority=k.priority-(S>0?1:0),k.subscribers=k.subscribers.filter(L=>L.ref!==y))}}}}}),r=t.getState();let i=r.size,s=r.viewport.dpr,o=r.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:u,set:d}=t.getState();if(l.width!==i.width||l.height!==i.height||c.dpr!==s){var m;i=l,s=c.dpr,mH(a,l),u.setPixelRatio(c.dpr);const g=(m=l.updateStyle)!=null?m:typeof HTMLCanvasElement<"u"&&u.domElement instanceof HTMLCanvasElement;u.setSize(l.width,l.height,g)}a!==o&&(o=a,d(g=>({viewport:{...g.viewport,...g.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let Fx,vpe=new Set,xpe=new Set,_pe=new Set;function yT(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function Vm(n,e){switch(n){case"before":return yT(vpe,e);case"after":return yT(xpe,e);case"tail":return yT(_pe,e)}}let vT,xT;function _T(n,e,t){let r=e.clock.getDelta();for(e.frameloop==="never"&&typeof n=="number"&&(r=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),vT=e.internal.subscribers,Fx=0;Fx<vT.length;Fx++)xT=vT[Fx],xT.ref.current(xT.store.getState(),r,t);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}function wpe(n){let e=!1,t=!1,r,i,s;function o(c){i=requestAnimationFrame(o),e=!0,r=0,Vm("before",c),t=!0;for(const d of n.values()){var u;s=d.store.getState(),s.internal.active&&(s.frameloop==="always"||s.internal.frames>0)&&!((u=s.gl.xr)!=null&&u.isPresenting)&&(r+=_T(c,s))}if(t=!1,Vm("after",c),r===0)return Vm("tail",c),e=!1,cancelAnimationFrame(i)}function a(c,u=1){var d;if(!c)return n.forEach(m=>a(m.store.getState(),u));(d=c.gl.xr)!=null&&d.isPresenting||!c.internal.active||c.frameloop==="never"||(u>1?c.internal.frames=Math.min(60,c.internal.frames+u):t?c.internal.frames=2:c.internal.frames=1,e||(e=!0,requestAnimationFrame(o)))}function l(c,u=!0,d,m){if(u&&Vm("before",c),d)_T(c,d,m);else for(const g of n.values())_T(c,g.store.getState());u&&Vm("after",c)}return{loop:o,invalidate:a,advance:l}}function zP(){const n=M.useContext(BP);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function fO(n=t=>t,e){return zP()(n,e)}function Eo(n,e=0){const t=zP(),r=t.getState().internal.subscribe,i=uH(n);return fv(()=>r(i,e,t),[e,r,t]),null}const dp=new Map,{invalidate:pO,advance:mO}=wpe(dp),{reconciler:My,applyProps:jh}=ape(dp,fpe),Bh={objects:"shallow",strict:!1},Spe=(n,e)=>{const t=typeof n=="function"?n(e):n;return yH(t)?t:new gP({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function bpe(n,e){const t=typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement;if(e){const{width:r,height:i,top:s,left:o,updateStyle:a=t}=e;return{width:r,height:i,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&n.parentElement){const{width:r,height:i,top:s,left:o}=n.parentElement.getBoundingClientRect();return{width:r,height:i,top:s,left:o,updateStyle:t}}else if(typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas)return{width:n.width,height:n.height,top:0,left:0,updateStyle:t};return{width:0,height:0,top:0,left:0}}function Epe(n){const e=dp.get(n),t=e==null?void 0:e.fiber,r=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,s=r||ype(pO,mO),o=t||My.createContainer(s,_f.ConcurrentRoot,null,!1,null,"",i,null);e||dp.set(n,{fiber:o,store:s});let a,l=!1,c;return{configure(u={}){let{gl:d,size:m,scene:g,events:v,onCreated:_,shadows:x=!1,linear:y=!1,flat:S=!1,legacy:b=!1,orthographic:A=!1,frameloop:k="always",dpr:L=[1,2],performance:C,raycaster:P,camera:R,onPointerMissed:N}=u,O=s.getState(),V=O.gl;O.gl||O.set({gl:V=Spe(d,n)});let B=O.raycaster;B||O.set({raycaster:B=new VP});const{params:W,...ee}=P||{};if(Bn.equ(ee,B,Bh)||jh(B,{...ee}),Bn.equ(W,B.params,Bh)||jh(B,{params:{...B.params,...W}}),!O.camera||O.camera===c&&!Bn.equ(c,R,Bh)){c=R;const q=R instanceof iv,Z=q?R:A?new lv(0,0,0,0,.1,1e3):new Qr(75,0,.1,1e3);q||(Z.position.z=5,R&&(jh(Z,R),("aspect"in R||"left"in R||"right"in R||"bottom"in R||"top"in R)&&(Z.manual=!0,Z.updateProjectionMatrix())),!O.camera&&!(R!=null&&R.rotation)&&Z.lookAt(0,0,0)),O.set({camera:Z}),B.camera=Z}if(!O.scene){let q;g!=null&&g.isScene?q=g:(q=new yP,g&&jh(q,g)),O.set({scene:Wh(q)})}if(!O.xr){var J;const q=(te,ae)=>{const we=s.getState();we.frameloop!=="never"&&mO(te,!0,we,ae)},Z=()=>{const te=s.getState();te.gl.xr.enabled=te.gl.xr.isPresenting,te.gl.xr.setAnimationLoop(te.gl.xr.isPresenting?q:null),te.gl.xr.isPresenting||pO(te)},re={connect(){const te=s.getState().gl;te.xr.addEventListener("sessionstart",Z),te.xr.addEventListener("sessionend",Z)},disconnect(){const te=s.getState().gl;te.xr.removeEventListener("sessionstart",Z),te.xr.removeEventListener("sessionend",Z)}};typeof((J=V.xr)==null?void 0:J.addEventListener)=="function"&&re.connect(),O.set({xr:re})}if(V.shadowMap){const q=V.shadowMap.enabled,Z=V.shadowMap.type;if(V.shadowMap.enabled=!!x,Bn.boo(x))V.shadowMap.type=xg;else if(Bn.str(x)){var ie;const re={basic:qz,percentage:Iw,soft:xg,variance:Vo};V.shadowMap.type=(ie=re[x])!=null?ie:xg}else Bn.obj(x)&&Object.assign(V.shadowMap,x);(q!==V.shadowMap.enabled||Z!==V.shadowMap.type)&&(V.shadowMap.needsUpdate=!0)}const j=lH();j&&("enabled"in j?j.enabled=!b:"legacyMode"in j&&(j.legacyMode=b)),l||jh(V,{outputEncoding:y?3e3:3001,toneMapping:S?Aa:KR}),O.legacy!==b&&O.set(()=>({legacy:b})),O.linear!==y&&O.set(()=>({linear:y})),O.flat!==S&&O.set(()=>({flat:S})),d&&!Bn.fun(d)&&!yH(d)&&!Bn.equ(d,V,Bh)&&jh(V,d),v&&!O.events.handlers&&O.set({events:v(s)});const z=bpe(n,m);return Bn.equ(z,O.size,Bh)||O.setSize(z.width,z.height,z.updateStyle,z.top,z.left),L&&O.viewport.dpr!==fH(L)&&O.setDpr(L),O.frameloop!==k&&O.setFrameloop(k),O.onPointerMissed||O.set({onPointerMissed:N}),C&&!Bn.equ(C,O.performance,Bh)&&O.set(q=>({performance:{...q.performance,...C}})),a=_,l=!0,this},render(u){return l||this.configure(),My.updateContainer(f.jsx(Tpe,{store:s,children:u,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){vH(n)}}}function Tpe({store:n,children:e,onCreated:t,rootElement:r}){return fv(()=>{const i=n.getState();i.set(s=>({internal:{...s.internal,active:!0}})),t&&t(i),n.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),f.jsx(BP.Provider,{value:n,children:e})}function vH(n,e){const t=dp.get(n),r=t==null?void 0:t.fiber;if(r){const i=t==null?void 0:t.store.getState();i&&(i.internal.active=!1),My.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var s,o,a,l;i.events.disconnect==null||i.events.disconnect(),(s=i.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=i.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),dpe(i),dp.delete(n)}catch{}},500)})}}function Mpe(n,e,t){return f.jsx(Ape,{children:n,container:e,state:t},e.uuid)}function Ape({state:n={},children:e,container:t}){const{events:r,size:i,...s}=n,o=zP(),[a]=M.useState(()=>new VP),[l]=M.useState(()=>new Te),c=M.useCallback((d,m)=>{const g={...d};Object.keys(d).forEach(_=>{(gpe.includes(_)||d[_]!==m[_]&&m[_])&&delete g[_]});let v;if(m&&i){const _=m.camera;v=d.viewport.getCurrentViewport(_,new K,i),_!==d.camera&&mH(_,i)}return{...g,scene:t,raycaster:a,pointer:l,mouse:l,previousRoot:o,events:{...d.events,...m==null?void 0:m.events,...r},size:{...d.size,...i},viewport:{...d.viewport,...v},...s}},[n]),[u]=M.useState(()=>{const d=o.getState();return iH((g,v)=>({...d,scene:t,raycaster:a,pointer:l,mouse:l,previousRoot:o,events:{...d.events,...r},size:{...d.size,...i},...s,set:g,get:v,setEvents:_=>g(x=>({...x,events:{...x.events,..._}}))}))});return M.useEffect(()=>{const d=o.subscribe(m=>u.setState(g=>c(m,g)));return()=>{d()}},[c]),M.useEffect(()=>{u.setState(d=>c(o.getState(),d))},[c]),M.useEffect(()=>()=>{u.destroy()},[]),f.jsx(f.Fragment,{children:My.createPortal(f.jsx(BP.Provider,{value:u,children:e}),u,null)})}My.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:M.version});const wT={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function Cpe(n){const{handlePointer:e}=mpe(n);return{priority:1,enabled:!0,compute(t,r,i){r.pointer.set(t.offsetX/r.size.width*2-1,-(t.offsetY/r.size.height)*2+1),r.raycaster.setFromCamera(r.pointer,r.camera)},connected:void 0,handlers:Object.keys(wT).reduce((t,r)=>({...t,[r]:e(r)}),{}),update:()=>{var t;const{events:r,internal:i}=n.getState();(t=i.lastEvent)!=null&&t.current&&r.handlers&&r.handlers.onPointerMove(i.lastEvent.current)},connect:t=>{var r;const{set:i,events:s}=n.getState();s.disconnect==null||s.disconnect(),i(o=>({events:{...o.events,connected:t}})),Object.entries((r=s.handlers)!=null?r:[]).forEach(([o,a])=>{const[l,c]=wT[o];t.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:t,events:r}=n.getState();if(r.connected){var i;Object.entries((i=r.handlers)!=null?i:[]).forEach(([s,o])=>{if(r&&r.connected instanceof HTMLElement){const[a]=wT[s];r.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}function gO(n,e){let t;return(...r)=>{window.clearTimeout(t),t=window.setTimeout(()=>n(...r),e)}}function Rpe({debounce:n,scroll:e,polyfill:t,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=t||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,o]=M.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),a=M.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s,orientationHandler:null}),l=n?typeof n=="number"?n:n.scroll:null,c=n?typeof n=="number"?n:n.resize:null,u=M.useRef(!1);M.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[d,m,g]=M.useMemo(()=>{const y=()=>{if(!a.current.element)return;const{left:S,top:b,width:A,height:k,bottom:L,right:C,x:P,y:R}=a.current.element.getBoundingClientRect(),N={left:S,top:b,width:A,height:k,bottom:L,right:C,x:P,y:R};a.current.element instanceof HTMLElement&&r&&(N.height=a.current.element.offsetHeight,N.width=a.current.element.offsetWidth),Object.freeze(N),u.current&&!Lpe(a.current.lastBounds,N)&&o(a.current.lastBounds=N)};return[y,c?gO(y,c):y,l?gO(y,l):y]},[o,r,l,c]);function v(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(y=>y.removeEventListener("scroll",g,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",a.current.orientationHandler))}function _(){a.current.element&&(a.current.resizeObserver=new i(g),a.current.resizeObserver.observe(a.current.element),e&&a.current.scrollC
4228ontainers&&a.current.scrollContainers.forEach(y=>y.addEventListener("scroll",g,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{g()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}const x=y=>{!y||y===a.current.element||(v(),a.current.element=y,a.current.scrollContainers=xH(y),_())};return Npe(g,!!e),Ppe(m),M.useEffect(()=>{v(),_()},[e,g,m]),M.useEffect(()=>v,[]),[x,s,d]}function Ppe(n){M.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function Npe(n,e){M.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function xH(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:r,overflowY:i}=window.getComputedStyle(n);return[t,r,i].some(s=>s==="auto"||s==="scroll")&&e.push(n),[...e,...xH(n.parentElement)]}const Ipe=["x","y","top","bottom","left","right","width","height"],Lpe=(n,e)=>Ipe.every(t=>n[t]===e[t]);var Dpe=Object.defineProperty,kpe=Object.defineProperties,Ope=Object.getOwnPropertyDescriptors,yO=Object.getOwnPropertySymbols,Fpe=Object.prototype.hasOwnProperty,Upe=Object.prototype.propertyIsEnumerable,vO=(n,e,t)=>e in n?Dpe(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xO=(n,e)=>{for(var t in e||(e={}))Fpe.call(e,t)&&vO(n,t,e[t]);if(yO)for(var t of yO(e))Upe.call(e,t)&&vO(n,t,e[t]);return n},Vpe=(n,e)=>kpe(n,Ope(e)),_O,wO;typeof window<"u"&&((_O=window.document)!=null&&_O.createElement||((wO=window.navigator)==null?void 0:wO.product)==="ReactNative")?M.useLayoutEffect:M.useEffect;function _H(n,e,t){if(!n)return;if(t(n)===!0)return n;let r=n.child;for(;r;){const i=_H(r,e,t);if(i)return i;r=r.sibling}}function wH(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const SO=console.error;console.error=function(){const n=[...arguments].join("");if(n!=null&&n.startsWith("Warning:")&&n.includes("useContext")){console.error=SO;return}return SO.apply(this,arguments)};const HP=wH(M.createContext(null));class SH extends M.Component{render(){return M.createElement(HP.Provider,{value:this._reactInternals},this.props.children)}}function jpe(){const n=M.useContext(HP);if(n===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=M.useId();return M.useMemo(()=>{for(const r of[n,n==null?void 0:n.alternate]){if(!r)continue;const i=_H(r,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(i)return i}},[n,e])}function Bpe(){const n=jpe(),[e]=M.useState(()=>new Map);e.clear();let t=n;for(;t;){if(t.type&&typeof t.type=="object"){const i=t.type._context===void 0&&t.type.Provider===t.type?t.type:t.type._context;i&&i!==HP&&!e.has(i)&&e.set(i,M.useContext(wH(i)))}t=t.return}return e}function zpe(){const n=Bpe();return M.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>r=>M.createElement(e,null,M.createElement(t.Provider,Vpe(xO({},r),{value:n.get(t)}))),e=>M.createElement(SH,xO({},e))),[n])}const Hpe=M.forwardRef(function({children:e,fallback:t,resize:r,style:i,gl:s,events:o=Cpe,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:d,legacy:m,orthographic:g,frameloop:v,dpr:_,performance:x,raycaster:y,camera:S,scene:b,onPointerMissed:A,onCreated:k,...L},C){M.useMemo(()=>ope(Jfe),[]);const P=zpe(),[R,N]=Rpe({scroll:!0,debounce:{scroll:50,resize:0},...r}),O=M.useRef(null),V=M.useRef(null);M.useImperativeHandle(C,()=>O.current);const B=uH(A),[W,ee]=M.useState(!1),[J,ie]=M.useState(!1);if(W)throw W;if(J)throw J;const j=M.useRef(null);fv(()=>{const q=O.current;N.width>0&&N.height>0&&q&&(j.current||(j.current=Epe(q)),j.current.configure({gl:s,events:o,shadows:c,linear:u,flat:d,legacy:m,orthographic:g,frameloop:v,dpr:_,performance:x,raycaster:y,camera:S,scene:b,size:N,onPointerMissed:(...Z)=>B.current==null?void 0:B.current(...Z),onCreated:Z=>{Z.events.connect==null||Z.events.connect(a?lpe(a)?a.current:a:V.current),l&&Z.setEvents({compute:(re,te)=>{const ae=re[l+"X"],we=re[l+"Y"];te.pointer.set(ae/te.size.width*2-1,-(we/te.size.height)*2+1),te.raycaster.setFromCamera(te.pointer,te.camera)}}),k==null||k(Z)}}),j.current.render(f.jsx(P,{children:f.jsx(dH,{set:ie,children:f.jsx(M.Suspense,{fallback:f.jsx(cpe,{set:ee}),children:e??null})})})))}),M.useEffect(()=>{const q=O.current;if(q)return()=>vH(q)},[]);const z=a?"none":"auto";return f.jsx("div",{ref:V,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:z,...i},...L,children:f.jsx("div",{ref:R,style:{width:"100%",height:"100%"},children:f.jsx("canvas",{ref:O,style:{display:"block"},children:t})})})}),Gpe=M.forwardRef(function(e,t){return f.jsx(SH,{children:f.jsx(Hpe,{...e,ref:t})})});function R1(){return R1=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},R1.apply(null,arguments)}const Wpe=()=>parseInt(Np.replace(/\D+/g,"")),$pe=Wpe();var qpe=Object.defineProperty,Xpe=(n,e,t)=>e in n?qpe(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Tn=(n,e,t)=>(Xpe(n,typeof e!="symbol"?e+"":e,t),t);function ST(n,e,t,r,i){let s;if(n=n.subarray||n.slice?n:n.buffer,t=t.subarray||t.slice?t:t.buffer,n=e?n.subarray?n.subarray(e,i&&e+i):n.slice(e,i&&e+i):n,t.set)t.set(n,r);else for(s=0;s<n.length;s++)t[s+r]=n[s];return t}function Kpe(n){return n instanceof Float32Array?n:n instanceof Xt?n.getAttribute("position").array:n.map(e=>{const t=Array.isArray(e);return e instanceof K?[e.x,e.y,e.z]:e instanceof Te?[e.x,e.y,0]:t&&e.length===3?[e[0],e[1],e[2]]:t&&e.length===2?[e[0],e[1],0]:e}).flat()}class Ype extends Xt{constructor(){super(),Tn(this,"type","MeshLine"),Tn(this,"isMeshLine",!0),Tn(this,"positions",[]),Tn(this,"previous",[]),Tn(this,"next",[]),Tn(this,"side",[]),Tn(this,"width",[]),Tn(this,"indices_array",[]),Tn(this,"uvs",[]),Tn(this,"counters",[]),Tn(this,"widthCallback",null),Tn(this,"_attributes"),Tn(this,"_points",[]),Tn(this,"points"),Tn(this,"matrixWorld",new kt),Object.defineProperties(this,{points:{enumerable:!0,get(){return this._points},set(e){this.setPoints(e,this.widthCallback)}}})}setMatrixWorld(e){this.matrixWorld=e}setPoints(e,t){if(e=Kpe(e),this._points=e,this.widthCallback=t??null,this.positions=[],this.counters=[],e.length&&e[0]instanceof K)for(let r=0;r<e.length;r++){const i=e[r],s=r/(e.length-1);this.positions.push(i.x,i.y,i.z),this.positions.push(i.x,i.y,i.z),this.counters.push(s),this.counters.push(s)}else for(let r=0;r<e.length;r+=3){const i=r/(e.length-1);this.positions.push(e[r],e[r+1],e[r+2]),this.positions.push(e[r],e[r+1],e[r+2]),this.counters.push(i),this.counters.push(i)}this.process()}compareV3(e,t){const r=e*6,i=t*6;return this.positions[r]===this.positions[i]&&this.positions[r+1]===this.positions[i+1]&&this.positions[r+2]===this.positions[i+2]}copyV3(e){const t=e*6;return[this.positions[t],this.positions[t+1],this.positions[t+2]]}process(){const e=this.positions.length/6;this.previous=[],this.next=[],this.side=[],this.width=[],this.indices_array=[],this.uvs=[];let t,r;this.compareV3(0,e-1)?r=this.copyV3(e-2):r=this.copyV3(0),this.previous.push(r[0],r[1],r[2]),this.previous.push(r[0],r[1],r[2]);for(let i=0;i<e;i++){if(this.side.push(1),this.side.push(-1),this.widthCallback?t=this.widthCallback(i/(e-1)):t=1,this.width.push(t),this.width.push(t),this.uvs.push(i/(e-1),0),this.uvs.push(i/(e-1),1),i<e-1){r=this.copyV3(i),this.previous.push(r[0],r[1],r[2]),this.previous.push(r[0],r[1],r[2]);const s=i*2;this.indices_array.push(s,s+1,s+2),this.indices_array.push(s+2,s+1,s+3)}i>0&&(r=this.copyV3(i),this.next.push(r[0],r[1],r[2]),this.next.push(r[0],r[1],r[2]))}this.compareV3(e-1,0)?r=this.copyV3(1):r=this.copyV3(e-1),this.next.push(r[0],r[1],r[2]),this.next.push(r[0],r[1],r[2]),!this._attributes||this._attributes.position.count!==this.counters.length?this._attributes={position:new an(new Float32Array(this.positions),3),previous:new an(new Float32Array(this.previous),3),next:new an(new Float32Array(this.next),3),side:new an(new Float32Array(this.side),1),width:new an(new Float32Array(this.width),1),uv:new an(new Float32Array(this.uvs),2),index:new an(new Uint16Array(this.indices_array),1),counters:new an(new Float32Array(this.counters),1)}:(this._attributes.position.copyArray(new Float32Array(this.positions)),this._attributes.position.needsUpdate=!0,this._attributes.previous.copyArray(new Float32Array(this.previous)),this._attributes.previous.needsUpdate=!0,this._attributes.next.copyArray(new Float32Array(this.next)),this._attributes.next.needsUpdate=!0,this._attributes.side.copyArray(new Float32Array(this.side)),this._attributes.side.needsUpdate=!0,this._attributes.width.copyArray(new Float32Array(this.width)),this._attributes.width.needsUpdate=!0,this._attributes.uv.copyArray(new Float32Array(this.uvs)),this._attributes.uv.needsUpdate=!0,this._attributes.index.copyArray(new Uint16Array(this.indices_array)),this._attributes.index.needsUpdate=!0),this.setAttribute("position",this._attributes.position),this.setAttribute("previous",this._attributes.previous),this.setAttribute("next",this._attributes.next),this.setAttribute("side",this._attributes.side),this.setAttribute("width",this._attributes.width),this.setAttribute("uv",this._attributes.uv),this.setAttribute("counters",this._attributes.counters),this.setAttribute("position",this._attributes.position),this.setAttribute("previous",this._attributes.previous),this.setAttribute("next",this._attributes.next),this.setAttribute("side",this._attributes.side),this.setAttribute("width",this._attributes.width),this.setAttribute("uv",this._attributes.uv),this.setAttribute("counters",this._attributes.counters),this.setIndex(this._attributes.index),this.computeBoundingSphere(),this.computeBoundingBox()}advance({x:e,y:t,z:r}){const i=this._attributes.position.array,s=this._attributes.previous.array,o=this._attributes.next.array,a=i.length;ST(i,0,s,0,a),ST(i,6,i,0,a-6),i[a-6]=e,i[a-5]=t,i[a-4]=r,i[a-3]=e,i[a-2]=t,i[a-1]=r,ST(i,6,o,0,a-6),o[a-6]=e,o[a-5]=t,o[a-4]=r,o[a-3]=e,o[a-2]=t,o[a-1]=r,this._attributes.position.needsUpdate=!0,this._attributes.previous.needsUpdate=!0,this._attributes.next.needsUpdate=!0}}const Qpe=` 4229 #include <common> 4230 #include <logdepthbuf_pars_vertex> 4231 #include <fog_pars_vertex> 4232 #include <clipping_planes_pars_vertex> 4233 4234 attribute vec3 previous; 4235 attribute vec3 next; 4236 attribute float side; 4237 attribute float width; 4238 attribute float counters; 4239 4240 uniform vec2 resolution; 4241 uniform float lineWidth; 4242 uniform vec3 color; 4243 uniform float opacity; 4244 uniform float sizeAttenuation; 4245 4246 varying vec2 vUV; 4247 varying vec4 vColor; 4248 varying float vCounters; 4249 4250 vec2 fix(vec4 i, float aspect) { 4251 vec2 res = i.xy / i.w; 4252 res.x *= aspect; 4253 return res; 4254 } 4255 4256 void main() { 4257 float aspect = resolution.x / resolution.y; 4258 vColor = vec4(color, opacity); 4259 vUV = uv; 4260 vCounters = counters; 4261 4262 mat4 m = projectionMatrix * modelViewMatrix;
4263 vec4 finalPosition = m * vec4(position, 1.0) * aspect; 4264 vec4 prevPos = m * vec4(previous, 1.0); 4265 vec4 nextPos = m * vec4(next, 1.0); 4266 4267 vec2 currentP = fix(finalPosition, aspect); 4268 vec2 prevP = fix(prevPos, aspect); 4269 vec2 nextP = fix(nextPos, aspect); 4270 4271 float w = lineWidth * width; 4272 4273 vec2 dir; 4274 if (nextP == currentP) dir = normalize(currentP - prevP); 4275 else if (prevP == currentP) dir = normalize(nextP - currentP); 4276 else { 4277 vec2 dir1 = normalize(currentP - prevP); 4278 vec2 dir2 = normalize(nextP - currentP); 4279 dir = normalize(dir1 + dir2); 4280 4281 vec2 perp = vec2(-dir1.y, dir1.x); 4282 vec2 miter = vec2(-dir.y, dir.x); 4283 //w = clamp(w / dot(miter, perp), 0., 4. * lineWidth * width); 4284 } 4285 4286 //vec2 normal = (cross(vec3(dir, 0.), vec3(0., 0., 1.))).xy; 4287 vec4 normal = vec4(-dir.y, dir.x, 0., 1.); 4288 normal.xy *= .5 * w; 4289 //normal *= projectionMatrix; 4290 if (sizeAttenuation == 0.) { 4291 normal.xy *= finalPosition.w; 4292 normal.xy /= (vec4(resolution, 0., 1.) * projectionMatrix).xy * aspect; 4293 } 4294 4295 finalPosition.xy += normal.xy * side; 4296 gl_Position = finalPosition; 4297 #include <logdepthbuf_vertex> 4298 #include <fog_vertex> 4299 vec4 mvPosition = modelViewMatrix * vec4(position, 1.0); 4300 #include <clipping_planes_vertex> 4301 #include <fog_vertex> 4302 } 4303`,Jpe=parseInt(Np.replace(/\D+/g,"")),Zpe=Jpe>=154?"colorspace_fragment":"encodings_fragment",eme=` 4304 #include <fog_pars_fragment> 4305 #include <logdepthbuf_pars_fragment> 4306 #include <clipping_planes_pars_fragment> 4307 4308 uniform sampler2D map; 4309 uniform sampler2D alphaMap; 4310 uniform float useGradient; 4311 uniform float useMap; 4312 uniform float useAlphaMap; 4313 uniform float useDash; 4314 uniform float dashArray; 4315 uniform float dashOffset; 4316 uniform float dashRatio; 4317 uniform float visibility; 4318 uniform float alphaTest; 4319 uniform vec2 repeat; 4320 uniform vec3 gradient[2]; 4321 4322 varying vec2 vUV; 4323 varying vec4 vColor; 4324 varying float vCounters; 4325 4326 void main() { 4327 #include <logdepthbuf_fragment> 4328 vec4 diffuseColor = vColor; 4329 if (useGradient == 1.) diffuseColor = vec4(mix(gradient[0], gradient[1], vCounters), 1.0); 4330 if (useMap == 1.) diffuseColor *= texture2D(map, vUV * repeat); 4331 if (useAlphaMap == 1.) diffuseColor.a *= texture2D(alphaMap, vUV * repeat).a; 4332 if (diffuseColor.a < alphaTest) discard; 4333 if (useDash == 1.) diffuseColor.a *= ceil(mod(vCounters + dashOffset, dashArray) - (dashArray * dashRatio)); 4334 diffuseColor.a *= step(vCounters, visibility); 4335 #include <clipping_planes_fragment> 4336 gl_FragColor = diffuseColor; 4337 #include <fog_fragment> 4338 #include <tonemapping_fragment> 4339 #include <${Zpe}> 4340 } 4341`;class tme extends bo{constructor(e){super({uniforms:{...qe.fog,lineWidth:{value:1},map:{value:null},useMap:{value:0},alphaMap:{value:null},useAlphaMap:{value:0},color:{value:new tt(16777215)},gradient:{value:[new tt(16711680),new tt(65280)]},opacity:{value:1},resolution:{value:new Te(1,1)},sizeAttenuation:{value:1},dashArray:{value:0},dashOffset:{value:0},dashRatio:{value:.5},useDash:{value:0},useGradient:{value:0},visibility:{value:1},alphaTest:{value:0},repeat:{value:new Te(1,1)}},vertexShader:Qpe,fragmentShader:eme}),Tn(this,"lineWidth"),Tn(this,"map"),Tn(this,"useMap"),Tn(this,"alphaMap"),Tn(this,"useAlphaMap"),Tn(this,"color"),Tn(this,"gradient"),Tn(this,"resolution"),Tn(this,"sizeAttenuation"),Tn(this,"dashArray"),Tn(this,"dashOffset"),Tn(this,"dashRatio"),Tn(this,"useDash"),Tn(this,"useGradient"),Tn(this,"visibility"),Tn(this,"repeat"),this.type="MeshLineMaterial",Object.defineProperties(this,{lineWidth:{enumerable:!0,get(){return this.uniforms.lineWidth.value},set(t){this.uniforms.lineWidth.value=t}},map:{enumerable:!0,get(){return this.uniforms.map.value},set(t){this.uniforms.map.value=t}},useMap:{enumerable:!0,get(){return this.uniforms.useMap.value},set(t){this.uniforms.useMap.value=t}},alphaMap:{enumerable:!0,get(){return this.uniforms.alphaMap.value},set(t){this.uniforms.alphaMap.value=t}},useAlphaMap:{enumerable:!0,get(){return this.uniforms.useAlphaMap.value},set(t){this.uniforms.useAlphaMap.value=t}},color:{enumerable:!0,get(){return this.uniforms.color.value},set(t){this.uniforms.color.value=t}},gradient:{enumerable:!0,get(){return this.uniforms.gradient.value},set(t){this.uniforms.gradient.value=t}},opacity:{enumerable:!0,get(){return this.uniforms.opacity.value},set(t){this.uniforms.opacity.value=t}},resolution:{enumerable:!0,get(){return this.uniforms.resolution.value},set(t){this.uniforms.resolution.value.copy(t)}},sizeAttenuation:{enumerable:!0,get(){return this.uniforms.sizeAttenuation.value},set(t){this.uniforms.sizeAttenuation.value=t}},dashArray:{enumerable:!0,get(){return this.uniforms.dashArray.value},set(t){this.uniforms.dashArray.value=t,this.useDash=t!==0?1:0}},dashOffset:{enumerable:!0,get(){return this.uniforms.dashOffset.value},set(t){this.uniforms.dashOffset.value=t}},dashRatio:{enumerable:!0,get(){return this.uniforms.dashRatio.value},set(t){this.uniforms.dashRatio.value=t}},useDash:{enumerable:!0,get(){return this.uniforms.useDash.value},set(t){this.uniforms.useDash.value=t}},useGradient:{enumerable:!0,get(){return this.uniforms.useGradient.value},set(t){this.uniforms.useGradient.value=t}},visibility:{enumerable:!0,get(){return this.uniforms.visibility.value},set(t){this.uniforms.visibility.value=t}},alphaTest:{enumerable:!0,get(){return this.uniforms.alphaTest.value},set(t){this.uniforms.alphaTest.value=t}},repeat:{enumerable:!0,get(){return this.uniforms.repeat.value},set(t){this.uniforms.repeat.value.copy(t)}}}),this.setValues(e)}copy(e){return super.copy(e),this.lineWidth=e.lineWidth,this.map=e.map,this.useMap=e.useMap,this.alphaMap=e.alphaMap,this.useAlphaMap=e.useAlphaMap,this.color.copy(e.color),this.gradient=e.gradient,this.opacity=e.opacity,this.resolution.copy(e.resolution),this.sizeAttenuation=e.sizeAttenuation,this.dashArray=e.dashArray,this.dashOffset=e.dashOffset,this.dashRatio=e.dashRatio,this.useDash=e.useDash,this.useGradient=e.useGradient,this.visibility=e.visibility,this.alphaTest=e.alphaTest,this.repeat.copy(e.repeat),this}}const bH={width:.2,length:1,decay:1,local:!1,stride:0,interval:1},nme=(n,e=1)=>(n.set(n.subarray(e)),n.fill(-1/0,-e),n);function rme(n,e){const{length:t,local:r,decay:i,interval:s,stride:o}={...bH,...e},a=M.useRef(),[l]=M.useState(()=>new K);M.useLayoutEffect(()=>{n&&(a.current=Float32Array.from({length:t*10*3},(d,m)=>n.position.getComponent(m%3)))},[t,n]);const c=M.useRef(new K),u=M.useRef(0);return Eo(()=>
4341{if(n&&a.current){if(u.current===0){let d;r?d=n.position:(n.getWorldPosition(l),d=l);const m=1*i;for(let g=0;g<m;g++)d.distanceTo(c.current)<o||(nme(a.current,3),a.current.set(d.toArray(),a.current.length-3));c.current.copy(d)}u.current++,u.current=u.current%s}}),a}const ime=M.forwardRef((n,e)=>{const{children:t}=n,{width:r,length:i,decay:s,local:o,stride:a,interval:l}={...bH,...n},{color:c="hotpink",attenuation:u,target:d}=n,m=fO(A=>A.size),g=fO(A=>A.scene),v=M.useRef(null),[_,x]=M.useState(null),y=rme(_,{length:i,decay:s,local:o,stride:a,interval:l});M.useEffect(()=>{const A=(d==null?void 0:d.current)||v.current.children.find(k=>k instanceof yn);A&&x(A)},[y,d]);const S=M.useMemo(()=>new Ype,[]),b=M.useMemo(()=>{var A;const k=new tme({lineWidth:.1*r,color:c,sizeAttenuation:1,resolution:new Te(m.width,m.height)});let L;if(t)if(Array.isArray(t))L=t.find(C=>{const P=C;return typeof P.type=="string"&&P.type==="meshLineMaterial"});else{const C=t;typeof C.type=="string"&&C.type==="meshLineMaterial"&&(L=C)}return typeof((A=L)==null?void 0:A.props)=="object"&&k.setValues(L.props),k},[r,c,m,t]);return M.useEffect(()=>{b.uniforms.resolution.value.set(m.width,m.height)},[m]),Eo(()=>{y.current&&S.setPoints(y.current,u)}),M.createElement("group",null,Mpe(M.createElement("mesh",{ref:e,geometry:S,material:b}),g),M.createElement("group",{ref:v},t))});var sme=`#define GLSLIFY 1 4342vec3 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)+1.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);vec3 i=floor(v+dot(v,C.yyy));vec3 x0=v-i+dot(i,C.xxx);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);vec3 x1=x0-i1+C.xxx;vec3 x2=x0-i2+C.yyy;vec3 x3=x0-D.yyy;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));float n_=0.142857142857;vec3 ns=n_*D.wyz-D.xzx;vec4 j=p-49.0*floor(p*ns.z*ns.z);vec4 x_=floor(j*ns.z);vec4 y_=floor(j-7.0*x_);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=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);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;vec4 m=max(0.6-vec4(dot(x0,x0),dot(x1,x1),dot(x2,x2),dot(x3,x3)),0.0);m=m*m;return 42.0*dot(m*m,vec4(dot(p0,x0),dot(p1,x1),dot(p2,x2),dot(p3,x3)));}`;class ome extends CP{constructor(e={}){super(e),this.setValues(e),this._time={value:0},this._distort={value:.4},this._radius={value:1}}onBeforeCompile(e){e.uniforms.time=this._time,e.uniforms.radius=this._radius,e.uniforms.distort=this._distort,e.vertexShader=` 4343 uniform float time; 4344 uniform float radius; 4345 uniform float distort; 4346 ${sme} 4347 ${e.vertexShader} 4348 `,e.vertexShader=e.vertexShader.replace("#include <begin_vertex>",` 4349 float updateTime = time / 50.0; 4350 float noise = snoise(vec3(position / 2.0 + updateTime * 5.0)); 4351 vec3 transformed = vec3(position * (noise * pow(distort, 2.0) + radius)); 4352 `)}get time(){return this._time.value}set time(e){this._time.value=e}get distort(){return this._distort.value}set distort(e){this._distort.value=e}get radius(){return this._radius.value}set radius(e){this._radius.value=e}}const EH=M.forwardRef(({speed:n=1,...e},t)=>{const[r]=M.useState(()=>new ome);return Eo(i=>
4352r&&(r.time=i.clock.elapsedTime*n)),M.createElement("primitive",R1({object:r,ref:t,attach:"material"},e))});function ame(n,e){const t=n+"Geometry";return M.forwardRef(({args:r,children:i,...s},o)=>{const a=M.useRef(null);return M.useImperativeHandle(o,()=>a.current),M.useLayoutEffect(()=>void(e==null?void 0:e(a.current))),M.createElement("mesh",R1({ref:a},s),M.createElement(t,{attach:"geometry",args:r}),i)})}const Ac=ame("sphere"),lme=M.forwardRef(({children:n,enabled:e=!0,speed:t=1,rotationIntensity:r=1,floatIntensity:i=1,floatingRange:s=[-.1,.1],autoInvalidate:o=!1,...a},l)=>{const c=M.useRef(null);M.useImperativeHandle(l,()=>c.current,[]);const u=M.useRef(Math.random()*1e4);return Eo(d=>{var m,g;if(!e||t===0)return;o&&d.invalidate();const v=u.current+d.clock.elapsedTime;c.current.rotation.x=Math.cos(v/4*t)/8*r,c.current.rotation.y=Math.sin(v/4*t)/8*r,c.current.rotation.z=Math.sin(v/4*t)/20*r;let _=Math.sin(v/4*t)/10;_=$6.mapLinear(_,-.1,.1,(m=s==null?void 0:s[0])!==null&&m!==void 0?m:-.1,(g=s==null?void 0:s[1])!==null&&g!==void 0?g:.1),c.current.position.y=_*i,c.current.updateMatrix()}),M.createElement("group",a,M.createElement("group",{ref:c,matrixAutoUpdate:!1},n))});class cme extends bo{constructor(){super({uniforms:{time:{value:0},fade:{value:1}},vertexShader:` 4353 uniform float time; 4354 attribute float size; 4355 varying vec3 vColor; 4356 void main() { 4357 vColor = color; 4358 vec4 mvPosition = modelViewMatrix * vec4(position, 0.5); 4359 gl_PointSize = size * (30.0 / -mvPosition.z) * (3.0 + sin(time + 100.0)); 4360 gl_Position = projectionMatrix * mvPosition; 4361 }`,fragmentShader:` 4362 uniform sampler2D pointTexture; 4363 uniform float fade; 4364 varying vec3 vColor; 4365 void main() { 4366 float opacity = 1.0; 4367 if (fade == 1.0) { 4368 float d = distance(gl_PointCoord, vec2(0.5, 0.5)); 4369 opacity = 1.0 / (1.0 + exp(16.0 * (d - 0.25))); 4370 } 4371 gl_FragColor = vec4(vColor, opacity); 4372 4373 #include <tonemapping_fragment> 4374 #include <${$pe>=154?"colorspace_fragment":"encodings_fragment"}> 4375 }`})}}const ume=n=>new K().setFromSpherical(new tH(n,Math.acos(1-Math.random()*2),Math.random()*2*Math.PI)),dme=M.forwardRef(({radius:n=100,depth:e=50,count:t=5e3,saturation:r=0,factor:i=4,fade:s=!1,speed:o=1},a)=>{const l=M.useRef(),[c,u,d]=M.useMemo(()=>{const g=[],v=[],_=Array.from({length:t},()=>(.5+.5*Math.random())*i),x=new tt;let y=n+e;const S=e/t;for(let b=0;b<t;b++)y-=S*Math.random(),g.push(...ume(y).toArray()),x.setHSL(b/t,r,.9),v.push(x.r,x.g,x.b);return[new Float32Array(g),new Float32Array(v),new Float32Array(_)]},[t,e,i,n,r]);Eo(g=>l.current&&(l.current.uniforms.time.value=g.clock.elapsedTime*o));const[m]=M.useState(()=>new cme);return M.createElement("points",{ref:a},M.createElement("bufferGeometry",null,M.createElement("bufferAttribute",{attach:"attributes-position",args:[c,3]}),M.createElement("bufferAttribute",{attach:"attributes-color",args:[u,3]}),M.createElement("bufferAttribute",{attach:"attributes-size",args:[d,1]})),M.createElement("primitive",{ref:l,object:m,attach:"material",blending:S1,"uniforms-fade-value":s,depthWrite:!1,transparent:!0,vertexColors:!0}))}),hme=({isDark:n})=>{const e=M.useRef(null),t=M.useRef(null),r=M.useRef(null);Eo(a=>{if(e.current&&(e.current.rotation.y=a.clock.elapsedTime*.1),t.current){t.current.rotation.z=a.clock.elapsedTime*.05;const l=1+Math.sin(a.clock.elapsedTime*2)*.05;t.current.scale.setScalar(l)}if(r.current){const l=1+Math.sin(a.clock.elapsedTime*1.5)*.1;r.current.scale.setScalar(l)}});const i=n?"#fbbf24":"#f59e0b",s=n?"#f97316":"#ea580c",o=n?"#fcd34d":"#fbbf24";return f.jsxs("group",{position:[0,0,-15],children:[f.jsx(Ac,{ref:e,args:[2,64,64],children:f.jsx(EH,{color:i,emissive:i,emissiveIntensity:2,distort:.2,speed:2,roughness:0})}),f.jsx(Ac,{ref:t,args:[2.3,32,32],children:f.jsx("meshBasicMaterial",{color:s,transparent:!0,opacity:.4,side:Zr})}),f.jsx(Ac,{ref:r,args:[3,32,32],children:f.jsx("meshBasicMaterial",{color:o,transparent:!0,opacity:.15,side:Zr})}),f.jsx("pointLight",{color:i,intensity:n?3:2,distance:50})]})}
4375,jm=({orbitRadius:n,orbitSpeed:e,size:t,color:r,hasRings:i,ringColor:s,moons:o,tilt:a,isDark:l})=>{const c=M.useRef(null),u=M.useRef(null),d=M.useRef(null),m=M.useMemo(()=>Math.random()*Math.PI*2,[]);Eo(v=>{if(c.current){const _=m+v.clock.elapsedTime*e;c.current.position.x=Math.cos(_)*n,c.current.position.z=-15+Math.sin(_)*n*.6,c.current.position.y=Math.sin(_*.5)*(n*.1)}u.current&&(u.current.rotation.y+=.01),d.current&&(d.current.rotation.y-=.005)});const g=M.useMemo(()=>r,[r,l]);return f.jsxs("group",{ref:c,rotation:[0,0,a||0],children:[f.jsx(Ac,{ref:u,args:[t,32,32],children:f.jsx("meshStandardMaterial",{color:r,metalness:.3,roughness:.7})}),f.jsx(Ac,{ref:d,args:[t*1.15,32,32],children:f.jsx("meshBasicMaterial",{color:g,transparent:!0,opacity:.2,side:Zr})}),i&&f.jsxs("mesh",{rotation:[Math.PI/2.5,0,0],children:[f.jsx("ringGeometry",{args:[t*1.4,t*2.2,64]}),f.jsx("meshBasicMaterial",{color:s||"#d4a574",transparent:!0,opacity:.6,side:Us})]}),o&&Array.from({length:o}).map((v,_)=>f.jsx(fme,{planetSize:t,index:_,isDark:l},_))]})},fme=({planetSize:n,index:e,isDark:t})=>{const r=M.useRef(null),i=n*2+e*.3,s=2+e*.5;return Eo(o=>{if(r.current){const a=o.clock.elapsedTime*s+e*Math.PI;r.current.position.x=Math.cos(a)*i,r.current.position.z=Math.sin(a)*i,r.current.position.y=Math.sin(a*.5)*.2}}),f.jsx(Ac,{ref:r,args:[n*.2,16,16],children:f.jsx("meshStandardMaterial",{color:t?"#94a3b8":"#64748b",metalness:.2,roughness:.8})})},Bm=({radius:n,isDark:e})=>{const t=M.useMemo(()=>{const r=[];for(let i=0;i<=64;i++){const s=i/64*Math.PI*2;r.push(new K(Math.cos(s)*n,0,Math.sin(s)*n*.6))}return r},[n]);return f.jsxs("line",{children:[f.jsx("bufferGeometry",{children:f.jsx("bufferAttribute",{attach:"attributes-position",count:t.length,array:new Float32Array(t.flatMap(r=>[r.x,r.y,r.z])),itemSize:3})}),f.jsx("lineBasicMaterial",{color:e?"#334155":"#cbd5e1",transparent:!0,opacity:.3})]})},bT=({delay:n=0})=>{const e=M.useRef(null),t=M.useMemo(()=>({x:Math.random()*30-15,y:Math.random()*15+5,z:Math.random()*-20-10}),[]);return Eo(r=>{if(e.current){const i=(r.clock.elapsedTime+n)%12;i<3?(e.current.visible=!0,e.current.position.x=t.x-i*6,e.current.position.y=t.y-i*3,e.current.position.z=t.z+i*2):e.current.visible=!1}}),f.jsx(ime,{width:.8,length:12,color:"#38bdf8",attenuation:r=>r*r*r,children:f.jsxs("mesh",{ref:e,children:[f.jsx("sphereGeometry",{args:[.05,8,8]}),f.jsx("meshBasicMaterial",{color:"#ffffff"})]})})},pme=({isDark:n})=>{const e=M.useMemo(()=>Array.from({length:100}).map((t,r)=>({angle:Math.random()*Math.PI*2,radius:8+Math.random()*2,size:Math.random()*.05+.02,speed:Math.random()*.1+.05,yOffset:(Math.random()-.5)*.5})),[]);return f.jsx("group",{position:[0,0,-15],children:e.map((t,r)=>f.jsx(mme,{...t,isDark:n},r))})},mme=({angle:n,radius:e,size:t,speed:r,yOffset:i,isDark:s})=>{const o=M.useRef(null);return Eo(a=>{if(o.current){const l=n+a.clock.elapsedTime*r;o.current.position.x=Math.cos(l)*e,o.current.position.z=Math.sin(l)*e*.6,o.current.position.y=i,o.current.rotation.x+=.01,o.current.rotation.y+=.02}}),f.jsxs("mesh",{ref:o,children:[f.jsx("icosahedronGeometry",{args:[t,0]}),f.jsx("meshStandardMaterial",{color:s?"#64748b":"#94a3b8",metalness:.6,roughness:.4})]})},ET=({position:n,color:e,size:t=5,isDark:r})=>{const i=M.useRef(null);return Eo(s=>{if(i.current){i.current.rotation.z=s.clock.elapsedTime*.01;const o=1+Math.sin(s.clock.elapsedTime*.2)*.05;i.current.scale.setScalar(o)}}),f.jsx(lme,{speed:.5,rotationIntensity:.2,floatIntensity:.5,children:f.jsx(Ac,{ref:i,args:[t,32,32],position:n,children:f.jsx(EH,{color:e,transparent:!0,opacity:r?.08:.05,distort:.4,speed:.5,side:Us})})})},bO=({position:n,isDark:e})=>{const t=M.useRef(null);return Eo(r=>{t.current&&(t.current.rotation.z=r.clock.elapsedTime*.02)}),f.jsxs("group",{ref:t,position:n,rotation:[Math.PI/4,0,0],children:[f.jsx(Ac,{args:[.3,16,16],children:f.jsx("meshBasicMaterial",{color:e?"#fef3c7":"#fcd34d"})}),f.jsxs("mesh",{children:[f.jsx("ringGeometry",{args:[.5,1.5,64]}),f.jsx("meshBasicMaterial",{color:e?"#a78bfa":"#8b5cf6",transparent:!0,opacity:.3,side:Us})]})]})},gme=({isDark:n})=>{const e={mercury:n?"#94a3b8":"#64748b",venus:n?"#fbbf24":"#d97706",earth:n?"#3b82f6":"#2563eb",mars:n?"#ef4444":"#dc2626",jupiter:n?"#f97316":"#ea580c",saturn:n?"#fcd34d":"#eab308",uranus:n?"#22d3ee":"#06b6d4",neptune:n?"#6366f1":"#4f46e5",nebulaPurple:n?"#8b5cf6":"#7c3aed",nebulaPink:n?"#ec4899":"#db2777",nebulaCyan:n?"#22d3ee":"#06b6d4"};return f.jsxs(f.Fragment,{children:[f.jsx("ambientLight",{intensity:n?.1:.3}),f.jsx(hme,{isDark:n}),f.jsx(dme,{radius:100,depth:80,count:n?8e3:3e3,factor:n?5:3,saturation:.2,fade:!0,speed:.3}),f.jsxs("group",{position:[0,0,-15],children:[f.jsx(Bm,{radius:4,isDark:n}),f.jsx(Bm,{radius:5.5,isDark:n}),f.jsx(Bm,{radius:7,isDark:n}),f.jsx(Bm,{radius:10,isDark:n}),f.jsx(Bm,{radius:14,isDark:n})]}),f.jsx(jm,{orbitRadius:4,orbitSpeed:.5,size:.3,color:e.mercury,isDark:n}),f.jsx(jm,{orbitRadius:5.5,orbitSpeed:.35,size:.5,color:e.venus,isDark:n}),f.jsx(jm,{orbitRadius:7,orbitSpeed:.25,size:.55,color:e.earth,moons:1,isDark:n}),f.jsx(jm,{orbitRadius:10,orbitSpeed:.15,size:.8,color:e.jupiter,moons:2,isDark:n}),f.jsx(jm,{orbitRadius:14,orbitSpeed:.1,size:.7,color:e.saturn,hasRings:!0,ringColor:e.saturn,tilt:.4,isDark:n}),f.jsx(pme,{isDark:n}),f.jsx(ET,{position:[-15,8,-40],color:e.nebulaPurple,size:8,isDark:n}),f.jsx(ET,{position:[18,-5,-35],color:e.nebulaPink,size:6,isDark:n}),f.jsx(ET,{position:[5,12,-50],color:e.nebulaCyan,size:10,isDark:n}),f.jsx(bO,{position:[-20,10,-60],isDark:n}),f.jsx(bO,{position:[25,-8,-55],isDark:n}),f.jsx(bT,{delay:0}),f.jsx(bT,{delay:4}),f.jsx(bT,{delay:8})]})},yme=()=>{const{resolvedTheme:n}=z2(),e=n==="dark";return f.jsx("div",{className:"absolute inset-0 pointer-events-none",children:f.jsx(Gpe,{camera:{position:[0,2,20],fov:60},style:{background:"transparent"},gl:{alpha:!0,antialias:!0},children:f.jsx(gme,{isDark:e})})})},vme=()=>f.jsxs("section",{className:"relative min-h-screen flex items-center overflow-hidden",children:[f.jsx("div",{className:"absolute inset-0 gradient-mesh"}),f.jsx("div",{className:"absolute inset-0 grid-pattern opacity-10 dark:opacity-20"}),f.jsx(yme,{}),f.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-primary/10 dark:bg-primary/20 rounded-full blur-[120px] animate-pulse"}),f.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-80 h-80 bg-secondary/10 dark:bg-secondary/20 rounded-full blur-[120px] animate-pulse",style:{animationDelay:"1s"}}),f.jsx("div",{className:"absolute top-1/2 right-1/3 w-64 h-64 bg-accent/10 dark:bg-accent/15 rounded-full blur-[100px] animate-pulse",style:{animationDelay:"2s"}}),f.jsx("div",{className:"container mx-auto px-6 relative z-10",children:f.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[f.jsxs(Oe.div,{initial:{opacity:0,y:20}
4375,animate:{opacity:1,y:0},transition:{duration:.6},className:"inline-flex items-center gap-2 px-4 py-2 rounded-full glass-card mb-8",children:[f.jsx(tp,{className:"w-4 h-4 text-primary"}),f.jsx("span",{className:"text-sm text-muted-foreground",children:"Pioneering Educational Technology"})]}),f.jsxs(Oe.h1,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.1},className:"font-display text-5xl md:text-6xl lg:text-7xl font-bold leading-tight mb-6",children:["Building the"," ",f.jsx("span",{className:"text-gradient",children:"Future"}),f.jsx("br",{}),"of Learning"]}),f.jsx(Oe.p,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2},className:"text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto mb-10",children:"We craft innovative software solutions that transform how people learn, teach, and grow. From enterprise LMS platforms to immersive virtual classrooms."}),f.jsxs(Oe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.3},className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[f.jsx(wr,{to:"/products",children:f.jsxs(mt,{size:"lg",className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground hover:opacity-90 transition-all duration-300 group px-8",children:["Explore Products",f.jsx(Oc,{className:"ml-2 w-4 h-4 group-hover:translate-x-1 transition-transform"})]})}),f.jsxs(mt,{size:"lg",variant:"outline",className:"border-border hover:bg-muted/50 group px-8",children:[f.jsx(JV,{className:"mr-2 w-4 h-4"}),"Watch Demo"]})]}),f.jsx(Oe.div,{initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{duration:.8,delay:.5},className:"mt-20 grid grid-cols-2 md:grid-cols-4 gap-8",children:[{value:"50+",label:"Projects Delivered"},{value:"1M+",label:"Users Worldwide"},{value:"99%",label:"Client Satisfaction"},{value:"15+",label:"Countries Served"}].map((n,e)=>f.jsxs("div",{className:"text-center",children:[f.jsx("div",{className:"font-display text-3xl md:text-4xl font-bold text-gradient mb-2",children:n.value}),f.jsx("div",{className:"text-sm text-muted-foreground",children:n.label})]},e))})]})}),f.jsx(Oe.div,{initial:{opacity:0}
4375,animate:{opacity:1},transition:{delay:1,duration:1},className:"absolute bottom-8 left-1/2 -translate-x-1/2",children:f.jsx(Oe.div,{animate:{y:[0,10,0]},transition:{duration:1.5,repeat:1/0},className:"w-6 h-10 rounded-full border-2 border-border flex items-start justify-center p-2",children:f.jsx(Oe.div,{className:"w-1.5 h-1.5 rounded-full bg-primary"})})})]}),xme=[{icon:Cf,title:"Schools 8th - 12th Study Material",description:"Comprehensive study materials, notes, and practice tests for classes 8th to 12th across all subjects and boards.",gradient:"from-blue-500 via-cyan-500 to-teal-400",bgGradient:"from-blue-500/10 to-cyan-500/10",features:["CBSE & State Boards","Chapter-wise Notes","Practice MCQs","Video Lessons"]},{icon:$y,title:"Universities Material",description:"In-depth course materials, lecture notes, and exam preparation resources for undergraduate and postgraduate programs.",gradient:"from-purple-500 via-violet-500 to-indigo-500",bgGradient:"from-purple-500/10 to-violet-500/10",features:["B.Tech & B.Sc","MBA & BBA","Previous Papers","Project Guides"]},{icon:QY,title:"Competitive Exams Material",description:"Expert-curated study materials and mock tests for government exams, entrance tests, and professional certifications.",gradient:"from-amber-500 via-orange-500 to-red-500",bgGradient:"from-amber-500/10 to-orange-500/10",features:["UPSC & SSC","JEE & NEET","Banking Exams","Mock Tests"]},{icon:tp,title:"AI Products",description:"Cutting-edge AI-powered learning tools including smart tutors, personalized study plans, and instant doubt resolution.",gradient:"from-primary via-secondary to-pink-500",bgGradient:"from-primary/10 to-secondary/10",features:["AI Tutor","Smart Notes","Doubt Solver","Study Planner"]}],_me={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.15}}},wme={hidden:{opacity:0,y:40,scale:.95},visible:{opacity:1,y:0,scale:1,transition:{duration:.6,ease:"easeOut"}}},Sme=()=>f.jsxs("section",{className:"py-24 relative overflow-hidden",children:[f.jsx("div",{className:"absolute inset-0 gradient-mesh opacity-30"}),f.jsx("div",{className:"absolute top-20 left-10 w-72 h-72 bg-primary/20 rounded-full blur-3xl"}),f.jsx("div",{className:"absolute bottom-20 right-10 w-96 h-96 bg-secondary/20 rounded-full blur-3xl"}),f.jsxs("div",{className:"container mx-auto px-6 relative",children:[f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"text-center mb-16",children:[f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase mb-4 block",children:"What We Offer"}),f.jsxs("h2",{className:"font-display text-4xl md:text-5xl font-bold mb-4",children:["Our ",f.jsx("span",{className:"text-gradient",children:"Services"})]}),f.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto text-lg",children:"Empowering learners with comprehensive study materials and cutting-edge AI tools for academic excellence."})]}),f.jsx(Oe.div,{variants:_me,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"grid md:grid-cols-2 gap-6 lg:gap-8",children:xme.map((n,e)=>f.jsx(Oe.div,{variants:wme,className:"group relative",children:f.jsxs("div",{className:`relative h-full glass-card p-8 hover-lift glow-border cursor-pointer overflow-hidden bg-gradient-to-br ${n.bgGradient}`,children:[f.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${n.gradient} opacity-0 group-hover:opacity-10 transition-opacity duration-500`}),f.jsx("div",{className:`relative w-16 h-16 rounded-2xl bg-gradient-to-br ${n.gradient} flex items-center justify-center mb-6 group-hover:scale-110 group-hover:rotate-3 transition-all duration-300 shadow-lg`,children:f.jsx(n.icon,{className:"w-8 h-8 text-white"})}),f.jsx("h3",{className:"font-display text-xl md:text-2xl font-semibold mb-3 text-foreground group-hover:text-primary transition-colors",children:n.title}),f.jsx("p",{className:"text-muted-foreground text-sm md:text-base leading-relaxed mb-6",children:n.description}),f.jsx("div",{className:"flex flex-wrap gap-2",children:n.features.map((t,r)=>
4375f.jsx("span",{className:`px-3 py-1.5 text-xs font-medium rounded-full bg-gradient-to-r ${n.gradient} text-white shadow-sm`,children:t},r))}),f.jsx("div",{className:`absolute -bottom-10 -right-10 w-32 h-32 bg-gradient-to-br ${n.gradient} opacity-20 rounded-full blur-2xl group-hover:opacity-30 transition-opacity`})]})},e))})]})]}),bme=[{id:"crakify",name:"Crakify",subtitle:"Exam Preparation",description:"Your ultimate companion for competitive exam success with 1300+ exams covered.",highlights:["1300+ Competitive Exams","Video Lectures","Mock Tests","Flashcards"],stats:{exams:"1300+",users:"50K+",rating:"4.8"},gradient:"from-orange-500 via-red-500 to-pink-500",bgGradient:"from-orange-500/10 via-red-500/10 to-pink-500/10",iconGradient:"from-orange-400 to-red-500",icon:jM,websiteUrl:"https://crakify.com",playStoreUrl:"https://play.google.com/store/apps/details?id=com.crakify.app"},{id:"ignou-study",name:"IGNOU Study Material",subtitle:"Distance Learning Hub",description:"Complete study resources for all IGNOU courses
4375- Bachelors, Masters, Diploma & Certificates.",highlights:["All IGNOU Courses","Solved Assignments","PYQ Papers","Video Lectures"],stats:{courses:"500+",downloads:"100K+",rating:"4.7"},gradient:"from-blue-500 via-indigo-500 to-purple-500",bgGradient:"from-blue-500/10 via-indigo-500/10 to-purple-500/10",iconGradient:"from-blue-400 to-indigo-500",icon:Cf,playStoreUrl:"https://play.google.com/store/apps/details?id=com.recforge.ignoustudy&hl=en_IN&pli=1"},{id:"jk-study",name:"JK Study Material",subtitle:"J&K Education Portal",description:"Comprehensive study material for all Universities and Boards of Jammu & Kashmir.",highlights:["All J&K Universities","Board Exams","Latest Notes","Complete Syllabus"],stats:{subjects:"200+",students:"30K+",rating:"4.6"},gradient:"from-emerald-500 via-teal-500 to-cyan-500",bgGradient:"from-emerald-500/10 via-teal-500/10 to-cyan-500/10",iconGradient:"from-emerald-400 to-teal-500",icon:Jl,playStoreUrl:"https://play.google.com/store/apps/details?id=com.recforge.jkstudymaterial&hl=en_IN"}],Eme=()=>f.jsxs("section",{className:"py-24 relative overflow-hidden bg-card/30",children:[f.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[f.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 bg-primary/5 rounded-full blur-[120px]"}),f.jsx("div",{className:"absolute bottom-0 right-1/4 w-96 h-96 bg-secondary/5 rounded-full blur-[120px]"})]}),f.jsxs("div",{className:"container mx-auto px-6 relative",children:[f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"flex flex-col md:flex-row md:items-end justify-between gap-6 mb-16",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase mb-4 block",children:"Our Products"}),f.jsxs("h2",{className:"font-display text-4xl md:text-5xl font-bold",children:["Featured ",f.jsx("span",{className:"text-gradient",children:"Solutions"})]}),f.jsx("p",{className:"text-muted-foreground mt-4 max-w-xl",children:"Powerful mobile applications designed to transform your learning journey"})]}),f.jsx(wr,{to:"/products",children:f.jsxs(mt,{variant:"outline",className:"border-border hover:bg-accent group",children:["View All Products",f.jsx(Oc,{className:"ml-2 w-4 h-4 group-hover:translate-x-1 transition-transform"})]})})]}),f.jsx("div",{className:"grid lg:grid-cols-3 gap-8",children:bme.map((n,e)=>f.jsx(Oe.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:e*.15},className:"group",children:f.jsx(wr,{to:`/products/${n.id}`,children:f.jsxs("div",{className:"relative glass-card overflow-hidden hover-lift glow-border h-full",children:[f.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${n.bgGradient} opacity-50 group-hover:opacity-70 transition-opacity duration-500`}),f.jsx("div",{className:`absolute -top-20 -right-20 w-40 h-40 bg-gradient-to-br ${n.gradient}
4375 rounded-full blur-3xl opacity-0 group-hover:opacity-30 transition-opacity duration-500`}),f.jsxs("div",{className:"relative p-6 md:p-8",children:[f.jsxs("div",{className:"flex items-start justify-between mb-6",children:[f.jsx("div",{className:`w-16 h-16 rounded-2xl bg-gradient-to-br ${n.iconGradient} p-0.5 shadow-lg`,children:f.jsx("div",{className:"w-full h-full rounded-2xl bg-background/90 dark:bg-background/80 flex items-center justify-center",children:f.jsx(n.icon,{className:"w-8 h-8 text-foreground"})})}),f.jsxs("div",{className:"flex items-center gap-1 bg-background/80 dark:bg-background/60 backdrop-blur-sm px-3 py-1.5 rounded-full",children:[f.jsx(J2,{className:"w-4 h-4 text-primary"}),f.jsx("span",{className:"text-xs font-medium text-foreground",children:"Mobile App"})]})]}),f.jsxs("div",{className:"mb-6",children:[f.jsx("p",{className:`text-sm font-semibold bg-gradient-to-r ${n.gradient} bg-clip-text text-transparent mb-1`,children:n.subtitle}),f.jsx("h3",{className:"font-display text-2xl font-bold text-foreground mb-3 group-hover:text-primary transition-colors",children:n.name}),f.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:n.description})]}),f.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:n.highlights.map(t=>f.jsx("span",{className:"px-3 py-1.5 text-xs font-medium rounded-full bg-background/80 dark:bg-background/60 text-foreground border border-border/50",children:t},t))}),f.jsx("div",{className:"grid grid-cols-3 gap-4 mb-6 p-4 rounded-xl bg-background/60 dark:bg-background/40 backdrop-blur-sm",children:Object.entries(n.stats).map(([t,r])=>f.jsxs("div",{className:"text-center",children:[f.jsx("p",{className:`text-lg font-bold bg-gradient-to-r ${n.gradient} bg-clip-text text-transparent`,children:r}),f.jsx("p",{className:"text-xs text-muted-foreground capitalize",children:t})]},t))}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:`flex-1 py-3 rounded-xl bg-gradient-to-r ${n.gradient} text-center`,children:f.jsxs("span",{className:"text-sm font-semibold text-white flex items-center justify-center gap-2",children:[f.jsx(AY,{className:"w-4 h-4"}),"Explore App"]})}),f.jsx("a",{href:n.playStoreUrl,target:"_blank",rel:"noopener noreferrer",onClick:t=>t.stopPropagation(),className:"w-12 h-12 rounded-xl bg-background/80 dark:bg-background/60 border border-border/50 flex items-center justify-center hover:bg-accent transition-colors",children:f.jsx(BM,{className:"w-5 h-5 text-foreground"})})]})]})]})})},n.id))})]})]}),Tme=[{quote:"We've been using Recforge's platform for over a year now, and I can honestly say it's the best decision we made. Our employee training completion rates jumped from 65% to 92%, and the analytics dashboard helps us identify knowledge gaps immediately. The support team is incredibly responsive too.",author:"James Mitchell",role:"Head of Learning & Development",company:"InnovateTech Solutions",avatar:"https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100&h=100&fit=crop&crop=face"},{quote:"As someone who's tried multiple LMS platforms, Recforge stands out. The interface is intuitive, and our instructors love how easy it is to create engaging content. We've reduced our course creation time by 50% while improving student satisfaction scores significantly.",author:"Dr. Priya Sharma",role:"Academic Director",company:"Global Learning Institute",avatar:"https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=100&h=100&fit=crop&crop=face"},{quote:"The virtual classroom feature has been a lifesaver for our remote teams. The breakout rooms, whiteboard, and screen sharing work flawlessly. We've conducted over 200 sessions without any major technical issues. Highly recommend!",author:"Marcus Thompson",role:"Training Manager",company:"Digital Dynamics",avatar:"https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=100&h=100&fit=crop&crop=face"},{quote:"What impressed me most was how quickly we could get started. Within a week, we had our entire curriculum migrated and our team trained. The assessment tools are fantastic - we can now create quizzes and exams in minutes instead of hours.",author:"Lisa Anderson",role:"Curriculum Coordinator",company:"EduConnect Academy",avatar:"https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=100&h=100&fit=crop&crop=face"},{quote:"The ROI has been incredible. We've cut our training costs by 35% while reaching three times more employees. The mobile app means our field staff can complete training on the go, which was a game-changer for us.",author:"Robert Chen",role:"VP of Operations",company:"Manufacturing Plus",avatar:"https://images.unsplash.com/photo-1519085360753-af0119f7cbe7?w=100&h=100&fit=crop&crop=face"},{quote:"I was skeptical at first, but Recforge exceeded all expectations. The platform is robust, the customer service is top-notch, and they're constantly adding new features based on user feedback. It's clear they care about their clients' success.",author:"Amanda Foster",role:"Chief Learning Officer",company:"Healthcare Innovations",avatar:"https://images.unsplash.com/photo-1580489944761-15a19d654956?w=100&h=100&fit=crop&crop=face"}],Mme=()=>f.jsxs("section",{className:"py-24 relative overflow-hidden",children:[f.jsx("div",{className:"absolute inset-0 gradient-mesh opacity-20"}),f.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-primary/10 rounded-full blur-[150px]"}),f.jsxs("div",{className:"container mx-auto px-6 relative",children:[f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"text-center mb-16",children:[f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider up
4375percase mb-4 block",children:"Testimonials"}),f.jsxs("h2",{className:"font-display text-4xl md:text-5xl font-bold mb-4",children:["Trusted by ",f.jsx("span",{className:"text-gradient",children:"Leaders"})]}),f.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"See what our clients have to say about their experience working with us."})]}),f.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:Tme.map((n,e)=>f.jsxs(Oe.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:e*.1},className:"glass-card p-8 hover-lift relative",children:[f.jsx("div",{className:"absolute -top-4 -left-2 w-12 h-12 rounded-full bg-gradient-to-br from-primary to-secondary flex items-center justify-center",children:f.jsx(qY,{className:"w-5 h-5 text-white"})}),f.jsxs("blockquote",{className:"text-foreground mb-6 mt-4 leading-relaxed",children:['"',n.quote,'"']}),f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("img",{src:n.avatar,alt:n.author,className:"w-12 h-12 rounded-full object-cover ring-2 ring-primary/20"}),f.jsxs("div",{children:[f.jsx("div",{className:"font-semibold text-foreground",children:n.author}),f.jsxs("div",{className:"text-sm text-muted-foreground",children:[n.role," at ",n.company]})]})]})]},e))})]})]}),Nt=M.forwardRef(({className:n,type:e,...t},r)=>f.jsx("input",{type:e,className:Ot("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:r,...t}));Nt.displayName="Input";var Ame="Label",TH=M.forwardRef((n,e)=>f.jsx(Et.label,{...n,ref:e,onMouseDown:t=>{var i;t.target.closest("button, input, select, textarea")||((i=n.onMouseDown)==null||i.call(n,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));TH.displayName=Ame;var MH=TH;const Cme=q2("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ft=M.forwardRef(({className:n,...e},t)=>f.jsx(MH,{ref:t,className:Ot(Cme(),n),...e}));ft.displayName=MH.displayName;const Wo=M.forwardRef(({className:n,...e},t)=>f.jsx("textarea",{className:Ot("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
4375ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...e}));Wo.displayName="Textarea";var Rme=M.createContext(void 0);function pv(n){const e=M.useContext(Rme);return n||e||"ltr"}var TT="rovingFocusGroup.onEntryFocus",Pme={bubbles:!1,cancelable:!0},mv="RovingFocusGroup",[fC,AH,Nme]=fw(mv),[Ime,Fp]=bs(mv,[Nme]),[Lme,Dme]=Ime(mv),CH=M.forwardRef((n,e)=>f.jsx(fC.Provider,{scope:n.__scopeRovingFocusGroup,children:f.jsx(fC.Slot,{scope:n.__scopeRovingFocusGroup,children:f.jsx(kme,{...n,ref:e})})}));CH.displayName=mv;var kme=M.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,orientation:r,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=n,m=M.useRef(null),g=sn(e,m),v=pv(s),[_,x]=La({prop:o,defaultProp:a??null,onChange:l,caller:mv}),[y,S]=M.useState(!1),b=Ss(c),A=AH(t),k=M.useRef(!1),[L,C]=M.useState(0);return M.useEffect(()=>{const P=m.current;if(P)return P.addEventListener(TT,b),()=>P.removeEventListener(TT,b)},[b]),f.jsx(Lme,{scope:t,orientation:r,dir:v,loop:i,currentTabStopId:_,onItemFocus:M.useCallback(P=>x(P),[x]),onItemShiftTab:M.useCallback(()=>S(!0),[]),onFocusableItemAdd:M.useCallback(()=>C(P=>P+1),[]),onFocusableItemRemove:M.useCallback(()=>C(P=>P-1),[]),children:f.jsx(Et.div,{tabIndex:y||L===0?-1:0,"data-orientation":r,...d,ref:g,style:{outline:"none",...n.style},onMouseDown:Xe(n.onMouseDown,()=>{k.current=!0}),onFocus:Xe(n.onFocus,P=>{const R=!k.current;if(P.target===P.currentTarget&&R&&!y){const N=new CustomEvent(TT,Pme);if(P.currentTarget.dispatchEvent(N),!N.defaultPrevented){const O=A().filter(J=>J.focusable),V=O.find(J=>J.active),B=O.find(J=>J.id===_),ee=[V,B,...O].filter(Boolean).map(J=>J.ref.current);NH(ee,u)}}k.current=!1}),onBlur:Xe(n.onBlur,()=>S(!1))})})}),RH="RovingFocusGroupItem",PH=M.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,focusable:r=!0,active:i=!1,tabStopId:s,children:o,...a}=n,l=Sa(),c=s||l,u=Dme(RH,t),d=u.currentTabStopId===c,m=AH(t),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:_}=u;return M.useEffect(()=>{if(r)return g(),()=>v()},[r,g,v]),f.jsx(fC.ItemSlot,{scope:t,id:c,focusable:r,active:i,children:f.jsx(Et.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:e,onMouseDown:Xe(n.onMouseDown,x=>{r?u.onItemFocus(c):x.preventDefault()}),onFocus:Xe(n.onFocus,()=>u.onItemFocus(c)),onKeyDown:Xe(n.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=Ume(x,u.orientation,u.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=m().filter(A=>A.focusable).map(A=>A.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const A=b.indexOf(x.currentTarget);b=u.loop?Vme(b,A+1):b.slice(A+1)}setTimeout(()=>NH(b))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:_!=null}):o})})});PH.displayName=RH;var Ome={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Fme(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function Ume(n,e,t){const r=Fme(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ome[r]}function NH(n,e=!1){const t=document.activeElement;for(const r of n)if(r===t||(r.focus({preventScroll:e}),document.activeElement!==t))return}function Vme(n,e){return n.map((t,r)=>n[(e+r)%n.length])}var GP=CH,WP=PH;function sS(n){const e=M.useRef({value:n,previous:n});return M.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}var $P="Radio",[jme,IH]=bs($P),[Bme,zme]=jme($P),LH=M.forwardRef((n,e)=>{const{__scopeRadio:t,name:r,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,form:c,...u}=n,[d,m]=M.useState(null),g=sn(e,x=>m(x)),v=M.useRef(!1),_=d?c||!!d.closest("form"):!0;return f.jsxs(Bme,{scope:t,checked:i,disabled:o,children:[f.jsx(Et.button,{type:"button",role:"radio","aria-checked":i,"data-state":FH(i),"data-disabled":o?"":void 0,disabled:o,value:a,...u,ref:g,onClick:Xe(n.onClick,x=>{i||l==null||l(),_&&(v.current=x.isPropagationStopped(),v.current||x.stopPropagation())})}),_&&f.jsx(OH,{control:d,bubbles:!v.current,name:r,value:a,checked:i,required:s,disabled:o,form:c,style:{transform:"translateX(-100%)"}})]})});LH.displayName=$P;var DH="RadioIndicator",kH=M.forwardRef((n,e)=>{const{__scopeRadio:t,forceMount:r,...i}=n,s=zme(DH,t);return f.jsx(Xs,{present:r||s.checked,children:f.jsx(Et.span,{"data-state":FH(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:e})})});kH.displayName=DH;var Hme="RadioBubbleInput",OH=M.forwardRef(({__scopeRadio:n,control:e,checked:t,bubbles:r=!0,...i},s)=>{const o=M.useRef(null),a=sn(o,s),l=sS(t),c=ww(e);return M.useEffect(()=>{const u=o.current;if(!u)return;const d=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==t&&g){const v=new Event("click",{bubbles:r});g.call(u,t),u.dispatchEvent(v)}},[l,t,r]),f.jsx(Et.input,{type:"radio","aria-hidden":!0,defaultChecked:t,...i,tabIndex:-1,ref:a,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});OH.displayName=Hme;function FH(n){return n?"checked":"unchecked"}var Gme=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oS="RadioGroup",[Wme,Abe]=bs(oS,[Fp,IH]),UH=Fp(),VH=IH(),[$me,qme]=Wme(oS),jH=M.forwardRef((n,e)=>{const{__scopeRadioGroup:t,name:r,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:u=!0,onValueChange:d,...m}=n,g=UH(t),v=pv(c),[_,x]=La({prop:s,defaultProp:i??null,onChange:d,caller:oS});return f.jsx($me,{scope:t,name:r,required:o,disabled:a,value:_,onValueChange:x,children:f.jsx(GP,{asChild:!0,...g,orientation:l,dir:v,loop:u,children:f.jsx(Et.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v,...m,ref:e})})})});jH.displayName=oS;var BH="RadioGroupItem",zH=M.forwardRef((n,e)=>{const{__scopeRadioGroup:t,disabled:r,...i}=n,s=qme(BH,t),o=s.disabled||r,a=UH(t),l=VH(t),c=M.useRef(null),u=sn(e,c),d=s.value===i.value,m=M.useRef(!1);return M.useEffect(()=>{const g=_=>
vendor: 5,782 bytes, line 4375
4375{Gme.includes(_.key)&&(m.current=!0)},v=()=>m.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",v)}},[]),f.jsx(WP,{asChild:!0,...a,focusable:!o,active:d,children:f.jsx(LH,{disabled:o,required:s.required,checked:d,...l,...i,name:s.name,ref:u,onCheck:()=>s.onValueChange(i.value),onKeyDown:Xe(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:Xe(i.onFocus,()=>{var g;m.current&&((g=c.current)==null||g.click())})})})});zH.displayName=BH;var Xme="RadioGroupIndicator",HH=M.forwardRef((n,e)=>{const{__scopeRadioGroup:t,...r}=n,i=VH(t);return f.jsx(kH,{...i,...r,ref:e})});HH.displayName=Xme;var GH=jH,WH=zH,Kme=HH;const qP=M.forwardRef(({className:n,...e},t)=>f.jsx(GH,{className:Ot("grid gap-2",n),...e,ref:t}));qP.displayName=GH.displayName;const tc=M.forwardRef(({className:n,...e},t)=>f.jsx(WH,{ref:t,className:Ot("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),...e,children:f.jsx(Kme,{className:"flex items-center justify-center",children:f.jsx(qV,{className:"h-2.5 w-2.5 fill-current text-current"})})}));tc.displayName=WH.displayName;function EO(n,[e,t]){return Math.min(t,Math.max(e,n))}var MT=0;function XP(){M.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??TO()),document.body.insertAdjacentElement("beforeend",n[1]??TO()),MT++,()=>{MT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),MT--}},[])}function TO(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var AT="focusScope.autoFocusOnMount",CT="focusScope.autoFocusOnUnmount",MO={bubbles:!1,cancelable:!0},Yme="FocusScope",aS=M.forwardRef((n,e)=>{const{loop:t=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=n,[a,l]=M.useState(null),c=Ss(i),u=Ss(s),d=M.useRef(null),m=sn(e,_=>l(_)),g=M.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;M.useEffect(()=>{if(r){let _=function(b){if(g.paused||!a)return;const A=b.target;a.contains(A)?d.current=A:Kl(d.current,{select:!0})},x=function(b){if(g.paused||!a)return;const A=b.relatedTarget;A!==null&&(a.contains(A)||Kl(d.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const k of b)k.removedNodes.length>0&&Kl(a)};document.addEventListener("focusin",_),document.addEventListener("focusout",x);const S=new MutationObserver(y);return a&&S.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",x),S.disconnect()}}},[r,a,g.paused]),M.useEffect(()=>{if(a){CO.add(g);const _=document.activeElement;if(!a.contains(_)){const y=new CustomEvent(AT,MO);a.addEventListener(AT,c),a.dispatchEvent(y),y.defaultPrevented||(Qme(nge($H(a)),{select:!0}),document.activeElement===_&&Kl(a))}return()=>{a.removeEventListener(AT,c),setTimeout(()=>{const y=new CustomEvent(CT,MO);a.addEventListener(CT,u),a.dispatchEvent(y),y.defaultPrevented||Kl(_??document.body,{select:!0}),a.removeEventListener(CT,u),CO.remove(g)},0)}}},[a,c,u,g]);const v=M.useCallback(_=>{if(!t&&!r||g.paused)return;const x=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,y=document.activeElement;if(x&&y){const S=_.currentTarget,[b,A]=Jme(S);b&&A?!_.shiftKey&&y===A?(_.preventDefault(),t&&Kl(b,{select:!0})):_.shiftKey&&y===b&&(_.preventDefault(),t&&Kl(A,{select:!0})):y===S&&_.preventDefault()}},[t,r,g.paused]);return f.jsx(Et.div,{tabIndex:-1,...o,ref:m,onKeyDown:v})});aS.displayName=Yme;function Qme(n,{select:e=!1}={}){const t=document.activeElement;for(const r of n)if(Kl(r,{select:e}),document.activeElement!==t)return}function Jme(n){const e=$H(n),t=AO(e,n),r=AO(e.reverse(),n);return[t,r]}function $H(n){const e=[],t=document.createTreeWalker(n,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(;t.nextNode();)e.push(t.currentNode);return e}function AO(n,e){for(const t of n)if(!Zme(t,{upTo:e}))return t}function Zme(n,{upTo:e}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(e!==void 0&&n===e)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function ege(n){return n instanceof HTMLInputElement&&"select"in n}function Kl(n,{select:e=!1}={}){if(n&&n.focus){const t=document.activeElement;n.focus({preventScroll:!0}),n!==t&&ege(n)&&e&&n.select()}}var CO=tge();function tge(){let n=[];return{add(e){const t=n[0];e!==t&&(t==null||t.pause()),n=RO(n,e),n.unshift(e)},remove(e){var t;n=RO(n,e),(t=n[0])==null||t.resume()}}}function RO(n,e){const t=[...n],r=t.indexOf(e);return r!==-1&&t.splice(r,1),t}function nge(n){return n.filter(e=>e.tagName!=="A")}var rge=function(n){if(typeof document>"u")return null;var e=Array.isArray(n)?n[0]:n;return e.ownerDocument.body},zh=new WeakMap,Ux=new WeakMap,Vx={},RT=0,qH=function(n){return n&&(n.host||qH(n.parentNode))},ige=function(n,e){return e.map(function(t){if(n.contains(t))return t;var r=qH(t);return r&&n.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",n,". Doing nothing"),null)}).filter(function(t){return!!t})},sge=function(n,e,t,r){var i=ige(e,Array.isArray(n)?n:[n]);Vx[t]||(Vx[t]=new WeakMap);var s=Vx[t],o=[],a=new Set,l=new Set(i),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};
vendor: 6,500 bytes, lines 4375-4390
4375i.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(m){if(a.has(m))u(m);else try{var g=m.getAttribute(r),v=g!==null&&g!=="false",_=(zh.get(m)||0)+1,x=(s.get(m)||0)+1;zh.set(m,_),s.set(m,x),o.push(m),_===1&&v&&Ux.set(m,!0),x===1&&m.setAttribute(t,"true"),v||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return u(e),a.clear(),RT++,function(){o.forEach(function(d){var m=zh.get(d)-1,g=s.get(d)-1;zh.set(d,m),s.set(d,g),m||(Ux.has(d)||d.removeAttribute(r),Ux.delete(d)),g||d.removeAttribute(t)}),RT--,RT||(zh=new WeakMap,zh=new WeakMap,Ux=new WeakMap,Vx={})}},KP=function(n,e,t){t===void 0&&(t="data-aria-hidden");var r=Array.from(Array.isArray(n)?n:[n]),i=rge(n);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),sge(r,i,t,"aria-hidden")):function(){return null}},va=function(){return va=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},va.apply(this,arguments)};function XH(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t}function oge(n,e,t){if(t||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 n.concat(s||Array.prototype.slice.call(e))}var b_="right-scroll-bar-position",E_="width-before-scroll-bar",age="with-scroll-bars-hidden",lge="--removed-body-scroll-bar-size";function PT(n,e){return typeof n=="function"?n(e):n&&(n.current=e),n}function cge(n,e){var t=M.useState(function(){return{value:n,callback:e,facade:{get current(){return t.value},set current(r){var i=t.value;i!==r&&(t.value=r,t.callback(r,i))}}}})[0];return t.callback=e,t.facade}var uge=typeof window<"u"?M.useLayoutEffect:M.useEffect,PO=new WeakMap;function dge(n,e){var t=cge(null,function(r){return n.forEach(function(i){return PT(i,r)})});return uge(function(){var r=PO.get(t);if(r){var i=new Set(r),s=new Set(n),o=t.current;i.forEach(function(a){s.has(a)||PT(a,null)}),s.forEach(function(a){i.has(a)||PT(a,o)})}PO.set(t,n)},[n]),t}function hge(n){return n}function fge(n,e){e===void 0&&(e=hge);var t=[],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 t.length?t[t.length-1]:n},useMedium:function(s){var o=e(s,r);return t.push(o),function(){t=t.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(r=!0;t.length;){var o=t;t=[],o.forEach(s)}t={push:function(a){return s(a)},filter:function(){return t}}},assignMedium:function(s){r=!0;var o=[];if(t.length){var a=t;t=[],a.forEach(s),o=t}var l=function(){var u=o;o=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),t={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),t}}}};return i}function pge(n){n===void 0&&(n={});var e=fge(null);return e.options=va({async:!0,ssr:!1},n),e}var KH=function(n){var e=n.sideCar,t=XH(n,["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 M.createElement(r,va({},t))};KH.isSideCarExport=!0;function mge(n,e){return n.useMedium(e),KH}var YH=pge(),NT=function(){},lS=M.forwardRef(function(n,e){var t=M.useRef(null),r=M.useState({onScrollCapture:NT,onWheelCapture:NT,onTouchMoveCapture:NT}),i=r[0],s=r[1],o=n.forwardProps,a=n.children,l=n.className,c=n.removeScrollBar,u=n.enabled,d=n.shards,m=n.sideCar,g=n.noRelative,v=n.noIsolation,_=n.inert,x=n.allowPinchZoom,y=n.as,S=y===void 0?"div":y,b=n.gapMode,A=XH(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=m,L=dge([t,e]),C=va(va({},A),i);return M.createElement(M.Fragment,null,u&&M.createElement(k,{sideCar:YH,removeScrollBar:c,shards:d,noRelative:g,noIsolation:v,inert:_,setCallbacks:s,allowPinchZoom:!!x,lockRef:t,gapMode:b}),o?M.cloneElement(M.Children.only(a),va(va({},C),{ref:L})):M.createElement(S,va({},C,{className:l,ref:L}),a))});lS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lS.classNames={fullWidth:E_,zeroRight:b_};var gge=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function yge(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var e=gge();return e&&n.setAttribute("nonce",e),n}function vge(n,e){n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}function xge(n){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(n)}var _ge=function(){var n=0,e=null;return{add:function(t){n==0&&(e=yge())&&(vge(e,t),xge(e)),n++},remove:function(){n--,!n&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},wge=function(){var n=_ge();return function(e,t){M.useEffect(function(){return n.add(e),function(){n.remove()}},[e&&t])}},QH=function(){var n=wge(),e=function(t){var r=t.styles,i=t.dynamic;return n(r,i),null};return e},Sge={left:0,top:0,right:0,gap:0},IT=function(n){return parseInt(n||"",10)||0},bge=function(n){var e=window.getComputedStyle(document.body),t=e[n==="padding"?"paddingLeft":"marginLeft"],r=e[n==="padding"?"paddingTop":"marginTop"],i=e[n==="padding"?"paddingRight":"marginRight"];return[IT(t),IT(r),IT(i)]},Ege=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return Sge;var e=bge(n),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-t+e[2]-e[0])}},Tge=QH(),Df="data-scroll-locked",Mge=function(n,e,t,r){var i=n.left,s=n.top,o=n.right,a=n.gap;return t===void 0&&(t="margin"),` 4376 .`.concat(age,` { 4377 overflow: hidden `).concat(r,`; 4378 padding-right: `).concat(a,"px ").concat(r,`; 4379 } 4380 body[`).concat(Df,`] { 4381 overflow: hidden `).concat(r,`; 4382 overscroll-behavior: contain; 4383 `).concat([e&&"position: relative ".concat(r,";"),t==="margin"&&` 4384 padding-left: `.concat(i,`px; 4385 padding-top: `).concat(s,`px; 4386 padding-right: `).concat(o,`px; 4387 margin-left:0; 4388 margin-top:0; 4389 margin-right: `).concat(a,"px ").concat(r,`; 4390 `),t==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
4390")].filter(Boolean).join(""),` 4391 } 4392 4393 .`).concat(b_,` { 4394 right: `).concat(a,"px ").concat(r,`; 4395 } 4396 4397 .`).concat(E_,` { 4398 margin-right: `).concat(a,"px ").concat(r,`; 4399 } 4400 4401 .`).concat(b_," .").concat(b_,` { 4402 right: 0 `).concat(r,`; 4403 } 4404 4405 .`).concat(E_," .").concat(E_,` { 4406 margin-right: 0 `).concat(r,`; 4407 } 4408 4409 body[`).concat(Df,`] { 4410 `).concat(lge,": ").concat(a,`px; 4411 } 4412`)},NO=function(){var n=parseInt(document.body.getAttribute(Df)||"0",10);return isFinite(n)?n:0},Age=function(){M.useEffect(function(){return document.body.setAttribute(Df,(NO()+1).toString()),function(){var n=NO()-1;n<=0?document.body.removeAttribute(Df):document.body.setAttribute(Df,n.toString())}},[])},Cge=function(n){var e=n.noRelative,t=n.noImportant,r=n.gapMode,i=r===void 0?"margin":r;Age();var s=M.useMemo(function(){return Ege(i)},[i]);return M.createElement(Tge,{styles:Mge(s,!e,i,t?"":"!important")})},pC=!1;if(typeof window<"u")try{var jx=Object.defineProperty({},"passive",{get:function(){return pC=!0,!0}});window.addEventListener("test",jx,jx),window.removeEventListener("test",jx,jx)}catch{pC=!1}var Hh=pC?{passive:!1}:!1,Rge=function(n){return n.tagName==="TEXTAREA"},JH=function(n,e){if(!(n instanceof Element))return!1;var t=window.getComputedStyle(n);return t[e]!=="hidden"&&!(t.overflowY===t.overflowX&&!Rge(n)&&t[e]==="visible")},Pge=function(n){return JH(n,"overflowY")},Nge=function(n){return JH(n,"overflowX")},IO=function(n,e){var t=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=ZH(n,r);if(i){var s=e9(n,r),o=s[1],a=s[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==t.body);return!1},Ige=function(n){var e=n.scrollTop,t=n.scrollHeight,r=n.clientHeight;return[e,t,r]},Lge=function(n){var e=n.scrollLeft,t=n.scrollWidth,r=n.clientWidth;return[e,t,r]},ZH=function(n,e){return n==="v"?Pge(e):Nge(e)},e9=function(n,e){return n==="v"?Ige(e):Lge(e)},Dge=function(n,e){return n==="h"&&e==="rtl"?-1:1},kge=function(n,e,t,r,i){var s=Dge(n,window.getComputedStyle(e).direction),o=s*r,a=t.target,l=e.contains(a),c=!1,u=o>0,d=0,m=0;do{if(!a)break;var g=e9(n,a),v=g[0],_=g[1],x=g[2],y=_-x-s*v;(v||y)&&ZH(n,a)&&(d+=y,m+=v);var S=a.parentNode;a=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(Math.abs(d)<1||!i)||!u&&(Math.abs(m)<1||!i))&&(c=!0),c},Bx=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},LO=function(n){return[n.deltaX,n.deltaY]},DO=function(n){return n&&"current"in n?n.current:n},Oge=function(n,e){return n[0]===e[0]&&n[1]===e[1]},Fge=function(n){return` 4413 .block-interactivity-`.concat(n,` {pointer-events: none;} 4414 .allow-interactivity-`).concat(n,` {pointer-events: all;} 4415`)},Uge=0,Gh=[];function Vge(n){var e=M.useRef([]),t=M.useRef([0,0]),r=M.useRef(),i=M.useState(Uge++)[0],s=M.useState(QH)[0],o=M.useRef(n);M.useEffect(function(){o.current=n},[n]),M.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(i));var _=oge([n.lockRef.current],(n.shards||[]).map(DO),!0).filter(Boolean);return _.forEach(function(x){return x.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),_.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(i))})}}},[n.inert,n.lockRef.current,n.shards]);var a=M.useCallback(function(_,x){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!o.current.allowPinchZoom;var y=Bx(_),S=t.current,b="deltaX"in _?_.deltaX:S[0]-y[0],A="deltaY"in _?_.deltaY:S[1]-y[1],k,L=_.target,C=Math.abs(b)>Math.abs(A)?"h":"v";if("touches"in _&&C==="h"&&L.type==="range")return!1;var P=IO(C,L);if(!P)return!0;if(P?k=C:(k=C==="v"?"h":"v",P=IO(C,L)),!P)return!1;if(!r.current&&"changedTouches"in _&&(b||A)&&(r.current=k),!k)return!0;var R=r.current||k;return kge(R,x,_,R==="h"?b:A,!0)},[]),l=M.useCallback(function(_){var x=_;if(!(!Gh.length||Gh[Gh.length-1]!==s)){var y="deltaY"in x?LO(x):Bx(x),S=e.current.filter(function(k){return k.name===x.type&&(k.target===x.target||x.target===k.shadowParent)&&Oge(k.delta,y)})[0];if(S&&S.should){x.cancelable&&x.preventDefault();return}
vendor: 4,146 bytes, line 4415
4415if(!S){var b=(o.current.shards||[]).map(DO).filter(Boolean).filter(function(k){return k.contains(x.target)}),A=b.length>0?a(x,b[0]):!o.current.noIsolation;A&&x.cancelable&&x.preventDefault()}}},[]),c=M.useCallback(function(_,x,y,S){var b={name:_,delta:x,target:y,should:S,shadowParent:jge(y)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(A){return A!==b})},1)},[]),u=M.useCallback(function(_){t.current=Bx(_),r.current=void 0},[]),d=M.useCallback(function(_){c(_.type,LO(_),_.target,a(_,n.lockRef.current))},[]),m=M.useCallback(function(_){c(_.type,Bx(_),_.target,a(_,n.lockRef.current))},[]);M.useEffect(function(){return Gh.push(s),n.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Hh),document.addEventListener("touchmove",l,Hh),document.addEventListener("touchstart",u,Hh),function(){Gh=Gh.filter(function(_){return _!==s}),document.removeEventListener("wheel",l,Hh),document.removeEventListener("touchmove",l,Hh),document.removeEventListener("touchstart",u,Hh)}},[]);var g=n.removeScrollBar,v=n.inert;return M.createElement(M.Fragment,null,v?M.createElement(s,{styles:Fge(i)}):null,g?M.createElement(Cge,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function jge(n){for(var e=null;n!==null;)n instanceof ShadowRoot&&(e=n.host,n=n.host),n=n.parentNode;return e}const Bge=mge(YH,Vge);var cS=M.forwardRef(function(n,e){return M.createElement(lS,va({},n,{ref:e,sideCar:Bge}))});cS.classNames=lS.classNames;var zge=[" ","Enter","ArrowUp","ArrowDown"],Hge=[" ","Enter"],Ad="Select",[uS,dS,Gge]=fw(Ad),[Up,Cbe]=bs(Ad,[Gge,Mp]),hS=Mp(),[Wge,ou]=Up(Ad),[$ge,qge]=Up(Ad),t9=n=>{const{__scopeSelect:e,children:t,open:r,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:m,required:g,form:v}=n,_=hS(e),[x,y]=M.useState(null),[S,b]=M.useState(null),[A,k]=M.useState(!1),L=pv(c),[C,P]=La({prop:r,defaultProp:i??!1,onChange:s,caller:Ad}),[R,N]=La({prop:o,defaultProp:a,onChange:l,caller:Ad}),O=M.useRef(null),V=x?v||!!x.closest("form"):!0,[B,W]=M.useState(new Set),ee=Array.from(B).map(J=>J.props.value).join(";");return f.jsx(Dj,{..._,children:f.jsxs(Wge,{required:g,scope:e,trigger:x,onTriggerChange:y,valueNode:S,onValueNodeChange:b,valueNodeHasChildren:A,onValueNodeHasChildrenChange:k,contentId:Sa(),value:R,onValueChange:N,open:C,onOpenChange:P,dir:L,triggerPointerDownPosRef:O,disabled:m,children:[f.jsx(uS.Provider,{scope:e,children:f.jsx($ge,{scope:n.__scopeSelect,onNativeOptionAdd:M.useCallback(J=>{W(ie=>new Set(ie).add(J))},[]),onNativeOptionRemove:M.useCallback(J=>{W(ie=>{const j=new Set(ie);return j.delete(J),j})},[]),children:t})}),V?f.jsxs(T9,{"aria-hidden":!0,required:g,tabIndex:-1,name:u,autoComplete:d,value:R,onChange:J=>N(J.target.value),disabled:m,form:v,children:[R===void 0?f.jsx("option",{value:""}):null,Array.from(B)]},ee):null]})})};t9.displayName=Ad;var n9="SelectTrigger",r9=M.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:r=!1,...i}=n,s=hS(t),o=ou(n9,t),a=o.disabled||r,l=sn(e,o.onTriggerChange),c=dS(t),u=M.useRef("touch"),[d,m,g]=A9(_=>{const x=c().filter(b=>!b.disabled),y=x.find(b=>b.value===o.value),S=C9(x,_,y);S!==void 0&&o.onValueChange(S.value)}),v=_=>{a||(o.onOpenChange(!0),g()),_&&(o.triggerPointerDownPosRef.current={x:Math.round(_.pageX),y:Math.round(_.pageY)})};return f.jsx(cR,{asChild:!0,...s,children:f.jsx(Et.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":M9(o.value)?"":void 0,...i,ref:l,onClick:Xe(i.onClick,_=>{_.currentTarget.focus(),u.current!=="mouse"&&v(_)}),onPointerDown:Xe(i.onPointerDown,_=>{u.current=_.pointerType;const x=_.target;x.hasPointerCapture(_.pointerId)&&x.releasePointerCapture(_.pointerId),_.button===0&&_.ctrlKey===!1&&_.pointerType==="mouse"&&(v(_),_.preventDefault())}),onKeyDown:Xe(i.onKeyDown,_=>{const x=d.current!=="";!(_.ctrlKey||_.altKey||_.metaKey)&&_.key.length===1&&m(_.key),!(x&&_.key===" ")&&zge.includes(_.ke
vendor: 15,726 bytes, line 4415
4415y)&&(v(),_.preventDefault())})})})});r9.displayName=n9;var i9="SelectValue",s9=M.forwardRef((n,e)=>{const{__scopeSelect:t,className:r,style:i,children:s,placeholder:o="",...a}=n,l=ou(i9,t),{onValueNodeHasChildrenChange:c}=l,u=s!==void 0,d=sn(e,l.onValueNodeChange);return ci(()=>{c(u)},[c,u]),f.jsx(Et.span,{...a,ref:d,style:{pointerEvents:"none"},children:M9(l.value)?f.jsx(f.Fragment,{children:o}):s})});s9.displayName=i9;var Xge="SelectIcon",o9=M.forwardRef((n,e)=>{const{__scopeSelect:t,children:r,...i}=n;return f.jsx(Et.span,{"aria-hidden":!0,...i,ref:e,children:r||"▼"})});o9.displayName=Xge;var Kge="SelectPortal",a9=n=>f.jsx(Gy,{asChild:!0,...n});a9.displayName=Kge;var Cd="SelectContent",l9=M.forwardRef((n,e)=>{const t=ou(Cd,n.__scopeSelect),[r,i]=M.useState();if(ci(()=>{i(new DocumentFragment)},[]),!t.open){const s=r;return s?Od.createPortal(f.jsx(c9,{scope:n.__scopeSelect,children:f.jsx(uS.Slot,{scope:n.__scopeSelect,children:f.jsx("div",{children:n.children})})}),s):null}return f.jsx(u9,{...n,ref:e})});l9.displayName=Cd;var Oo=10,[c9,au]=Up(Cd),Yge="SelectContentImpl",Qge=Sd("SelectContent.RemoveScroll"),u9=M.forwardRef((n,e)=>{const{__scopeSelect:t,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:m,collisionPadding:g,sticky:v,hideWhenDetached:_,avoidCollisions:x,...y}=n,S=ou(Cd,t),[b,A]=M.useState(null),[k,L]=M.useState(null),C=sn(e,de=>A(de)),[P,R]=M.useState(null),[N,O]=M.useState(null),V=dS(t),[B,W]=M.useState(!1),ee=M.useRef(!1);M.useEffect(()=>{if(b)return KP(b)},[b]),XP();const J=M.useCallback(de=>{const[Ge,...$e]=V().map(Q=>Q.ref.current),[De]=$e.slice(-1),Ue=document.activeElement;for(const Q of de)if(Q===Ue||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===Ge&&k&&(k.scrollTop=0),Q===De&&k&&(k.scrollTop=k.scrollHeight),Q==null||Q.focus(),document.activeElement!==Ue))return},[V,k]),ie=M.useCallback(()=>J([P,b]),[J,P,b]);M.useEffect(()=>{B&&ie()},[B,ie]);const{onOpenChange:j,triggerPointerDownPosRef:z}=S;M.useEffect(()=>{if(b){let de={x:0,y:0};const Ge=De=>{var Ue,Q;de={x:Math.abs(Math.round(De.pageX)-(((Ue=z.current)==null?void 0:Ue.x)??0)),y:Math.abs(Math.round(De.pageY)-(((Q=z.current)==null?void 0:Q.y)??0))}},$e=De=>{de.x<=10&&de.y<=10?De.preventDefault():b.contains(De.target)||j(!1),document.removeEventListener("pointermove",Ge),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",Ge),document.addEventListener("pointerup",$e,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ge),document.removeEventListener("pointerup",$e,{capture:!0})}}},[b,j,z]),M.useEffect(()=>{const de=()=>j(!1);return window.addEventListener("blur",de),window.addEventListener("resize",de),()=>{window.removeEventListener("blur",de),window.removeEventListener("resize",de)}},[j]);const[q,Z]=A9(de=>{const Ge=V().filter(Ue=>!Ue.disabled),$e=Ge.find(Ue=>Ue.ref.current===document.activeElement),De=C9(Ge,de,$e);De&&setTimeout(()=>De.ref.current.focus())}),re=M.useCallback((de,Ge,$e)=>{const De=!ee.current&&!$e;(S.value!==void 0&&S.value===Ge||De)&&(R(de),De&&(ee.current=!0))},[S.value]),te=M.useCallback(()=>b==null?void 0:b.focus(),[b]),ae=M.useCallback((de,Ge,$e)=>{const De=!ee.current&&!$e;(S.value!==void 0&&S.value===Ge||De)&&O(de)},[S.value]),we=r==="popper"?mC:d9,Re=we===mC?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:m,collisionPadding:g,sticky:v,hideWhenDetached:_,avoidCollisions:x}:{};return f.jsx(c9,{scope:t,content:b,viewport:k,onViewportChange:L,itemRefCallback:re,selectedItem:P,onItemLeave:te,itemTextRefCallback:ae,focusSelectedItem:ie,selectedItemText:N,position:r,isPositioned:B,searchRef:q,children:f.jsx(cS,{as:Qge,allowPinchZoom:!0,children:f.jsx(aS,{asChild:!0,trapped:S.open,onMountAutoFocus:de=>{de.preventDefault()},onUnmountAutoFocus:Xe(i,de=>{var Ge;(Ge=S.trigger)==null||Ge.focus({preventScroll:!0}),de.preventDefault()}),children:f.jsx(Sp,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:de=>de.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:f.jsx(we,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:de=>de.preventDefault(),...y,...Re,onPlaced:()=>W(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Xe(y.onKeyDown,de=>{const Ge=de.ctrlKey||de.altKey||de.metaKey;if(de.key==="Tab"&&de.preventDefault(),!Ge&&de.key.length===1&&Z(de.key),["ArrowUp","ArrowDown","Home","End"].includes(de.key)){let De=V().filter(Ue=>!Ue.disabled).map(Ue=>Ue.ref.current);if(["ArrowUp","End"].includes(de.key)&&(De=De.slice().reverse()),["ArrowUp","ArrowDown"].includes(de.key)){const Ue=de.target,Q=De.indexOf(Ue);De=De.slice(Q+1)}setTimeout(()=>J(De)),de.preventDefault()}})})})})})})});u9.displayName=Yge;var Jge="SelectItemAlignedPosition",d9=M.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:r,...i}=n,s=ou(Cd,t),o=au(Cd,t),[a,l]=M.useState(null),[c,u]=M.useState(null),d=sn(e,C=>u(C)),m=dS(t),g=M.useRef(!1),v=M.useRef(!0),{viewport:_,selectedItem:x,selectedItemText:y,focusSelectedItem:S}=o,b=M.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&_&&x&&y){const C=s.trigger.getBoundingClientRect(),P=c.getBoundingClientRect(),R=s.valueNode.getBoundingClientRect(),N=y.getBoundingClientRect();if(s.dir!=="rtl"){const Ue=N.left-P.left,Q=R.left-Ue,be=C.left-Q,ve=C.width+be,Le=Math.max(ve,P.width),xe=window.innerWidth-Oo,it=EO(Q,[Oo,Math.max(Oo,xe-Le)]);a.style.minWidth=ve+"px",a.style.left=it+"px"}else{const Ue=P.right-N.right,Q=window.innerWidth-R.right-Ue,be=window.innerWidth-C.right-Q,ve=C.width+be,Le=Math.max(ve,P.width),xe=window.innerWidth-Oo,it=EO(Q,[Oo,Math.max(Oo,xe-Le)]);a.style.minWidth=ve+"px",a.style.right=it+"px"}const O=m(),V=window.innerHeight-Oo*2,B=_.scrollHeight,W=window.getComputedStyle(c),ee=parseInt(W.borderTopWidth,10),J=parseInt(W.paddingTop,10),ie=parseInt(W.borderBottomWidth,10),j=parseInt(W.paddingBottom,10),z=ee+J+B+j+ie,q=Math.min(x.offsetHeight*5,z),Z=window.getComputedStyle(_),re=parseInt(Z.paddingTop,10),te=parseInt(Z.paddingBottom,10),ae=C.top+C.height/2-Oo,we=V-ae,Re=x.offsetHeight/2,de=x.offsetTop+Re,Ge=ee+J+de,$e=z-Ge;if(Ge<=ae){const Ue=O.length>0&&x===O[O.length-1].ref.current;a.style.bottom="0px";const Q=c.clientHeight-_.offsetTop-_.offsetHeight,be=Math.max(we,Re+(Ue?te:0)+Q+ie),ve=Ge+be;a.style.height=ve+"px"}else{const Ue=O.length>0&&x===O[0].ref.current;a.style.top="0px";const be=Math.max(ae,ee+_.offsetTop+(Ue?re:0)+Re)+$e;a.style.height=be+"px",_.scrollTop=Ge-ae+_.offsetTop}a.style.margin=`${Oo}px 0`,a.style.minHeight=q+"px",a.style.maxHeight=V+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[m,s.trigger,s.valueNode,a,c,_,x,y,s.dir,r]);ci(()=>b(),[b]);const[A,k]=M.useState();ci(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const L=M.useCallback(C=>{C&&v.current===!0&&(b(),S==null||S(),v.current=!1)},[b,S]);return f.jsx(eye,{scope:t,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:L,children:f.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:f.jsx(Et.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});d9.displayName=Jge;var Zge="SelectPopperPosition",mC=M.forwardRef((n,e)=>{const{__scopeSelect:t,align:r="start",collisionPadding:i=Oo,...s}=n,o=hS(t);return f.jsx(uR,{...o,...s,ref:e,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});mC.displayName=Zge;var[eye,YP]=Up(Cd,{}),gC="SelectViewport",h9=M.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:r,...i}=n,s=au(gC,t),o=YP(gC,t),a=sn(e,s.onViewportChange),l=M.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),f.jsx(uS.Slot,{scope:t,children:f.jsx(Et.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Xe(i.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&d){const g=Math.abs(l.current-u.scrollTop);if(g>0){const v=window.innerHeight-Oo*2,_=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),y=Math.max(_,x);if(y<v){const S=y+g,b=Math.min(v,S),A=S-b;d.style.height=b+"px",d.style.bottom==="0px"&&(u.scrollTop=A>0?A:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});h9.displayName=gC;var f9="SelectGroup",[tye,nye]=Up(f9),rye=M.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n,i=Sa();return f.jsx(tye,{scope:t,id:i,children:f.jsx(Et.div,{role:"group","aria-labelledby":i,...r,ref:e})})});rye.displayName=f9;var p9="SelectLabel",m9=M.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n,i=nye(p9,t);return f.jsx(Et.div,{id:i.id,...r,ref:e})});m9.displayName=p9;var P1="SelectItem",[iye,g9]=Up(P1),y9=M.forwardRef((n,e)=>{const{__scopeSelect:t,value:r,disabled:i=!1,textValue:s,...o}=n,a=ou(P1,t),l=au(P1,t),c=a.value===r,[u,d]=M.useState(s??""),[m,g]=M.useState(!1),v=sn(e,S=>{var b;return(b=l.itemRefCallback)==null?void 0:b.call(l,S,r,i)}),_=Sa(),x=M.useRef("touch"),y=()=>{i||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsx(iye,{scope:t,value:r,disabled:i,textId:_,isSelected:c,onItemTextChange:M.useCallback(S=>{d(b=>b||((S==null?void 0:S.textContent)??"").trim())},[]),children:f.jsx(uS.ItemSlot,{scope:t,value:r,disabled:i,textValue:u,children:f.jsx(Et.div,{role:"option","aria-labelledby":_,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:v,onFocus:Xe(o.onFocus,()=>g(!0)),onBlur:Xe(o.onBlur,()=>g(!1)),onClick:Xe(o.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:Xe(o.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:Xe(o.onPointerDown,S=>{x.current=S.pointerType}),onPointerMove:Xe(o.onPointerMove,S=>{var b;x.current=S.pointerType,i?(b=l.onItemLeave)==null||b.call(l):x.current==="mouse"&&S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Xe(o.onPointerLeave,S=>{var b;S.currentTarget===document.activeElement&&((b=l.onItemLeave)==null||b.call(l))}),onKeyDown:Xe(o.onKeyDown,S=>{var A;((A=l.searchRef)==null?void 0:A.current)!==""&&S.key===" "||(Hge.includes(S.key)&&y(),S.key===" "&&S.preventDefault())})})})})});y9.displayName=P1;var Jm="SelectItemText",v9=M.forwardRef((n,e)=>{const{__scopeSelect:t,className:r,style:i,...s}=n,o=ou(Jm,t),a=au(Jm,t),l=g9(Jm,t),c=qge(Jm,t),[u,d]=M.useState(null),m=sn(e,y=>d(y),l.onItemTextChange,y=>{var S;return(S=a.itemTextRefCallback)==null?void 0:S.call(a,y,l.value,l.disabled)}),g=u==null?void 0:u.textContent,v=M.useMemo(()=>f.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:_,onNativeOptionRemove:x}=c;return ci(()=>(_(v),()=>x(v)),[_,x,v]),f.jsxs(f.Fragment,{children:[f.jsx(Et.span,{id:l.textId,...s,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Od.createPortal(s.children,o.valueNode):null]})});v9.displayName=Jm;var x9="SelectItemIndicator",_9=M.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n;return g9(x9,t).isSelected?f.jsx(Et.span,{"aria-hidden":!0,...r,ref:e}):null});_9.displayName=x9;var yC="SelectScrollUpButton",w9=M.forwardRef((n,e)=>{const t=au(yC,n.__scopeSelect),r=YP(yC,n.__scopeSelect),[i,s]=M.useState(!1),o=sn(e,r.onScrollButtonChange);return ci(()=>{if(t.viewport&&t.isPositioned){let a=function(){const c=l.scrollTop>0;s(c)};const l=t.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),i?f.jsx(b9,{...n,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=t;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});w9.displayName=yC;var vC="SelectScrollDownButton",S9=M.forwardRef((n,e)=>{const t=au(vC,n.__scopeSelect),r=YP(vC,n.__scopeSelect),[i,s]=M.useState(!1),o=sn(e,r.onScrollButtonChange);return ci(()=>{if(t.viewport&&t.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;s(u)};const l=t.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),i?f.jsx(b9,{...n,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=t;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});S9.displayName=vC;var b9=M.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:r,...i}=n,s=au("SelectScrollButton",t),o=M.useRef(null),a=dS(t),l=M.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return M.useEffect(()=>()=>l(),[l]),ci(()=>{var u;const c=a().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),f.jsx(Et.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerDown:Xe(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Xe(i.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Xe(i.onPointerLeave,()=>{l()})})}),sye="SelectSeparator",E9=M.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n;return f.jsx(Et.div,{"aria-hidden":!0,...r,ref:e})});E9.displayName=sye;var xC="SelectArrow",oye=M.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n,i=hS(t),s=ou(xC,t),o=au(xC,t);return s.open&&o.position==="popper"?f.jsx(dR,{...i,...r,ref:e}):null});oye.displayName=xC;var aye="SelectBubbleInput",T9=M.forwardRef(({__scopeSelect:n,value:e,...t},r)=>{const i=M.useRef(null),s=sn(r,i),o=sS(e);return M.useEffect(()=>{const a=i.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&u){const d=new Event("change",{bubbles:!0});u.call(a,e),a.dispatchEvent(d)}},[o,e]),f.jsx(Et.select,{...t,style:{...wV,...t.style},ref:s,defaultValue:e})});T9.displayName=aye;function M9(n){return n===""||n===void 0}function A9(n){const e=Ss(n),t=M.useRef(""),r=M.useRef(0),i=M.useCallback(o=>{const a=t.current+o;e(a),function l(c){t.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=M.useCallback(()=>{t.current="",window.clearTimeout(r.current)},[]);return M.useEffect(()=>()=>window.clearTimeout(r.current),[]),[t,i,s]}function C9(n,e,t){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=t?n.indexOf(t):-1;let o=lye(n,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==t));const l=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==t?l:void 0}function lye(n,e){return n.map((t,r)=>n[(e+r)%n.length])}var cye=t9,R9=r9,uye=s9,dye=o9,hye=a9,P9=l9,fye=h9,N9=m9,I9=y9,pye=v9,mye=_9,L9=w9,D9=S9,k9=E9;const LT=cye,DT=uye,T_=M.forwardRef(({className:n,children:e,...t},r)=>f.jsxs(R9,{ref:r,className:Ot("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
4415ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...t,children:[e,f.jsx(dye,{asChild:!0,children:f.jsx(WV,{className:"h-4 w-4 opacity-50"})})]}));T_.displayName=R9.displayName;const O9=M.forwardRef(({className:n,...e},t)=>f.jsx(L9,{ref:t,className:Ot("flex cursor-default items-center justify-center py-1",n),...e,children:f.jsx(TY,{className:"h-4 w-4"})}));O9.displayName=L9.displayName;const F9=M.forwardRef(({className:n,...e},t)=>f.jsx(D9,{ref:t,className:Ot("flex cursor-default items-center justify-center py-1",n),...e,children:f.jsx(WV,{className:"h-4 w-4"})}));F9.displayName=D9.displayName;const M_=M.forwardRef(({className:n,children:e,position:t="popper",...r},i)=>f.jsx(hye,{children:f.jsxs(P9,{ref:i,className:Ot("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:t,...r,children:[f.jsx(O9,{}),f.jsx(fye,{className:Ot("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),f.jsx(F9,{})]})}));M_.displayName=P9.displayName;const gye=M.forwardRef(({className:n,...e},t)=>f.jsx(N9,{ref:t,className:Ot("py-1.5 pl-8 pr-2 text-sm font-semibold",n),...e}));
vendor: 6,743 bytes, lines 4415-4419
4415gye.displayName=N9.displayName;const Ai=M.forwardRef(({className:n,children:e,...t},r)=>f.jsxs(I9,{ref:r,className:Ot("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",n),...t,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(mye,{children:f.jsx(gw,{className:"h-4 w-4"})})}),f.jsx(pye,{children:e})]}));Ai.displayName=I9.displayName;const yye=M.forwardRef(({className:n,...e},t)=>f.jsx(k9,{ref:t,className:Ot("-mx-1 my-1 h-px bg-muted",n),...e}));yye.displayName=k9.displayName;var fS="Dialog",[U9,Rbe]=bs(fS),[vye,sa]=U9(fS),V9=n=>{const{__scopeDialog:e,children:t,open:r,defaultOpen:i,onOpenChange:s,modal:o=!0}=n,a=M.useRef(null),l=M.useRef(null),[c,u]=La({prop:r,defaultProp:i??!1,onChange:s,caller:fS});return f.jsx(vye,{scope:e,triggerRef:a,contentRef:l,contentId:Sa(),titleId:Sa(),descriptionId:Sa(),open:c,onOpenChange:u,onOpenToggle:M.useCallback(()=>u(d=>!d),[u]),modal:o,children:t})};V9.displayName=fS;var j9="DialogTrigger",B9=M.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=sa(j9,t),s=sn(e,i.triggerRef);return f.jsx(Et.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ZP(i.open),...r,ref:s,onClick:Xe(n.onClick,i.onOpenToggle)})});B9.displayName=j9;var QP="DialogPortal",[xye,z9]=U9(QP,{forceMount:void 0}),H9=n=>{const{__scopeDialog:e,forceMount:t,children:r,container:i}=n,s=sa(QP,e);return f.jsx(xye,{scope:e,forceMount:t,children:M.Children.map(r,o=>f.jsx(Xs,{present:t||s.open,children:f.jsx(Gy,{asChild:!0,container:i,children:o})}))})};H9.displayName=QP;var N1="DialogOverlay",G9=M.forwardRef((n,e)=>{const t=z9(N1,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,s=sa(N1,n.__scopeDialog);return s.modal?f.jsx(Xs,{present:r||s.open,children:f.jsx(wye,{...i,ref:e})}):null});G9.displayName=N1;var _ye=Sd("DialogOverlay.RemoveScroll"),wye=M.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=sa(N1,t);return f.jsx(cS,{as:_ye,allowPinchZoom:!0,shards:[i.contentRef],children:f.jsx(Et.div,{"data-state":ZP(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Rd="DialogContent",W9=M.forwardRef((n,e)=>{const t=z9(Rd,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,s=sa(Rd,n.__scopeDialog);return f.jsx(Xs,{present:r||s.open,children:s.modal?f.jsx(Sye,{...i,ref:e}):f.jsx(bye,{...i,ref:e})})});W9.displayName=Rd;var Sye=M.forwardRef((n,e)=>{const t=sa(Rd,n.__scopeDialog),r=M.useRef(null),i=sn(e,t.contentRef,r);return M.useEffect(()=>{const s=r.current;if(s)return KP(s)},[]),f.jsx($9,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xe(n.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Xe(n.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:Xe(n.onFocusOutside,s=>s.preventDefault())})}),bye=M.forwardRef((n,e)=>{const t=sa(Rd,n.__scopeDialog),r=M.useRef(!1),i=M.useRef(!1);return f.jsx($9,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=n.onCloseAutoFocus)==null||o.call(n,s),s.defaultPrevented||(r.current||(a=t.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,c;(l=n.onInteractOutside)==null||l.call(n,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),$9=M.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=n,a=sa(Rd,t),l=M.useRef(null),c=sn(e,l);return XP(),f.jsxs(f.Fragment,{children:[f.jsx(aS,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:f.jsx(Sp,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ZP(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx(Eye,{titleId:a.titleId}),f.jsx(Mye,{contentRef:l,descriptionId:a.descriptionId})]})]})}),JP="DialogTitle",q9=M.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=sa(JP,t);return f.jsx(Et.h2,{id:i.titleId,...r,ref:e})});q9.displayName=JP;var X9="DialogDescription",K9=M.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=sa(X9,t);return f.jsx(Et.p,{id:i.descriptionId,...r,ref:e})});K9.displayName=X9;var Y9="DialogClose",Q9=M.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=sa(Y9,t);return f.jsx(Et.button,{type:"button",...r,ref:e,onClick:Xe(n.onClick,()=>i.onOpenChange(!1))})});Q9.displayName=Y9;function ZP(n){return n?"open":"closed"}var J9="DialogTitleWarning",[Pbe,Z9]=RK(J9,{contentName:Rd,titleName:JP,docsSlug:"dialog"}),Eye=({titleId:n})=>{const e=Z9(J9),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. 4416 4417If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. 4418 4419For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return M.useEffect(()=>{n&&(document.getElementById(n)||console.error(t))},[t,n]),null},Tye="DialogDescriptionWarning",Mye=({contentRef:n,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Z9(Tye).contentName}}.`;return M.useEffect(()=>{var s;const i=(s=n.current)==null?void 0:s.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,n,e]),null},Aye=V9,Cye=B9,Rye=H9,eG=G9,tG=W9,nG=q9,rG=K9,Pye=Q9;const gv=Aye,pS=Cye,Nye=Rye,iG=M.forwardRef(({className:n,...e},t)=>f.jsx(eG,{ref:t,className:Ot("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...e}));iG.displayName=eG.displayName;const Vp=M.forwardRef(({className:n,children:e,...t},r)=>f.jsxs(Nye,{children:[f.jsx(iG,{}),f.jsxs(tG,{ref:r,className:Ot("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
4419nded-lg",n),...t,children:[e,f.jsxs(Pye,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[f.jsx(Xy,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Vp.displayName=tG.displayName;const jp=({className:n,...e})=>f.jsx("div",{className:Ot("flex flex-col space-y-1.5 text-center sm:text-left",n),...e});jp.displayName="DialogHeader";const Pd=M.forwardRef(({className:n,...e},t)=>f.jsx(nG,{ref:t,className:Ot("text-lg font-semibold leading-none tracking-tight",n),...e}));Pd.displayName=nG.displayName;const _C=M.forwardRef(({className:n,...e},t)=>f.jsx(rG,{ref:t,className:Ot("text-sm text-muted-foreground",n),...e}));_C.displayName=rG.displayName;const Iye=()=>{};var kO={};/** 4420 * @license 4421 * Copyright 2017 Google LLC 4422 * 4423 * Licensed under the Apache License, Version 2.0 (the "License"); 4424 * you may not use this file except in compliance with the License. 4425 * You may obtain a copy of the License at 4426 * 4427 * http://www.apache.org/licenses/LICENSE-2.0 4428 * 4429 * Unless required by applicable law or agreed to in writing, software 4430 * distributed under the License is distributed on an "AS IS" BASIS, 4431 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4432 * See the License for the specific language governing permissions and 4433 * limitations under the License. 4434 */const sG=function(n){const e=[];let t=0;for(let r=0;r<n.length;r++){let i=n.charCodeAt(r);i<128?e[t++]=i:i<2048?(e[t++]=i>>6|192,e[t++]=i&63|128):(i&64512)===55296&&r+1<n.length&&(n.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(n.charCodeAt(++r)&1023),e[t++]=i>>18|240,e[t++]=i>>12&63|128,e[t++]=i>>6&63|128,e[t++]=i&63|128):(e[t++]=i>>12|224,e[t++]=i>>6&63|128,e[t++]=i&63|128)}return e},Lye=function(n){const e=[];let t=0,r=0;for(;t<n.length;){const i=n[t++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=n[t++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=n[t++],o=n[t++],a=n[t++],l=((i&7)<<18|(s&63)<<12|(o&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(l>>10)),e[r++]=String.fromCharCode(56320+(l&1023))}else{const s=n[t++],o=n[t++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},oG={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(n,e){if(!Array.isArray(n))throw Error("encodeByteArray takes an array as a parameter");this.init_();const t=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<n.length;i+=3){const s=n[i],o=i+1<n.length,a=o?n[i+1]:0,l=i+2<n.length,c=l?n[i+2]:0,u=s>>2,d=(s&3)<<4|a>>4;let m=(a&15)<<2|c>>6,g=c&63;l||(g=64,o||(m=64)),r.push(t[u],t[d],t[m],t[g])}return r.join("")},encodeString(n,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(n):this.encodeByteArray(sG(n),e)},decodeString(n,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(n):Lye(this.decodeStringToByteArray(n,e))},decodeStringToByteArray(n,e){this.init_();const t=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<n.length;){const s=t[n.charAt(i++)],a=i<n.length?t[n.charAt(i)]:0;++i;const c=i<n.length?t[n.charAt(i)]:64;++i;const d=i<n.length?t[n.charAt(i)]:64;if(++i,s==null||a==null||c==null||d==null)throw new Dye;const m=s<<2|a>>4;if(r.push(m),c!==64){const g=a<<4&240|c>>2;if(r.push(g),d!==64){const v=c<<6&192|d;r.push(v)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let n=0;n<this.ENCODED_VALS.length;n++)this.byteToCharMap_[n]=this.ENCODED_VALS.charAt(n),this.charToByteMap_[this.byteToCharMap_[n]]=n,this.byteToCharMapWebSafe_[n]=this.ENCODED_VALS_WEBSAFE.charAt(n),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[n]]=n,n>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(n)]=n,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(n)]=n)}}};
4434class Dye extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const kye=function(n){const e=sG(n);return oG.encodeByteArray(e,!0)},I1=function(n){return kye(n).replace(/\./g,"")},Oye=function(n){try{return oG.decodeString(n,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** 4435 * @license 4436 * Copyright 2022 Google LLC 4437 * 4438 * Licensed under the Apache License, Version 2.0 (the "License"); 4439 * you may not use this file except in compliance with the License. 4440 * You may obtain a copy of the License at 4441 * 4442 * http://www.apache.org/licenses/LICENSE-2.0 4443 * 4444 * Unless required by applicable law or agreed to in writing, software 4445 * distributed under the License is distributed on an "AS IS" BASIS, 4446 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4447 * See the License for the specific language governing permissions and 4448 * limitations under the License. 4449 */function Fye(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** 4450 * @license 4451 * Copyright 2022 Google LLC 4452 * 4453 * Licensed under the Apache License, Version 2.0 (the "License"); 4454 * you may not use this file except in compliance with the License. 4455 * You may obtain a copy of the License at 4456 * 4457 * http://www.apache.org/licenses/LICENSE-2.0 4458 * 4459 * Unless required by applicable law or agreed to in writing, software 4460 * distributed under the License is distributed on an "AS IS" BASIS, 4461 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4462 * See the License for the specific language governing permissions and 4463 * limitations under the License. 4464 */const Uye=()=>Fye().__FIREBASE_DEFAULTS__,Vye=()=>{if(typeof process>"u"||typeof kO>"u")return;const n=kO.__FIREBASE_DEFAULTS__;if(n)return JSON.parse(n)},jye=()=>{if(typeof document>"u")return;let n;try{n=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=n&&Oye(n[1]);return e&&JSON.parse(e)},eN=()=>{try{return Iye()||Uye()||Vye()||jye()}catch(n){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);return}},Bye=n=>{var e,t;return(t=(e=eN())==null?void 0:e.emulatorHosts)==null?void 0:t[n]},zye=n=>{const e=Bye(n);if(!e)return;const t=e.lastIndexOf(":");if(t<=0||t+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(t+1),10);return e[0]==="["?[e.substring(1,t-1),r]:[e.substring(0,t),r]},aG=()=>{var n;return(n=eN())==null?void 0:n.config};/** 4465 * @license 4466 * Copyright 2017 Google LLC 4467 * 4468 * Licensed under the Apache License, Version 2.0 (the "License"); 4469 * you may not use this file except in compliance with the License. 4470 * You may obtain a copy of the License at 4471 * 4472 * http://www.apache.org/licenses/LICENSE-2.0 4473 * 4474 * Unless required by applicable law or agreed to in writing, software 4475 * distributed under the License is distributed on an "AS IS" BASIS, 4476 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4477 * See the License for the specific language governing permissions and 4478 * limitations under the License. 4479 */class Hye{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(t):e(t,r))}}}/** 4480 * @license 4481 * Copyright 2025 Google LLC 4482 * 4483 * Licensed under the Apache License, Version 2.0 (the "License"); 4484 * you may not use this file except in compliance with the License. 4485 * You may obtain a copy of the License at 4486 * 4487 * http://www.apache.org/licenses/LICENSE-2.0 4488 * 4489 * Unless required by applicable law or agreed to in writing, software 4490 * distributed under the License is distributed on an "AS IS" BASIS, 4491 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4492 * See the License for the specific language governing permissions and 4493 * limitations under the License. 4494 */function tN(n){try{return(n.startsWith("http://")||n.startsWith("https://")?new URL(n).hostname:n).endsWith(".cloudworkstations.dev")}catch{return!1}}async function Gye(n){return(await fetch(n,{credentials:"include"})).ok}/** 4495 * @license 4496 * Copyright 2021 Google LLC 4497 * 4498 * Licensed under the Apache License, Version 2.0 (the "License");
4499 * you may not use this file except in compliance with the License. 4500 * You may obtain a copy of the License at 4501 * 4502 * http://www.apache.org/licenses/LICENSE-2.0 4503 * 4504 * Unless required by applicable law or agreed to in writing, software 4505 * distributed under the License is distributed on an "AS IS" BASIS, 4506 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4507 * See the License for the specific language governing permissions and 4508 * limitations under the License. 4509 */function Wye(n,e){if(n.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const t={alg:"none",type:"JWT"},r=e||"demo-project",i=n.iat||0,s=n.sub||n.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o={iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}},...n};return[I1(JSON.stringify(t)),I1(JSON.stringify(o)),""].join(".")}const Tg={};function $ye(){const n={prod:[],emulator:[]};for(const e of Object.keys(Tg))Tg[e]?n.emulator.push(e):n.prod.push(e);return n}function qye(n){let e=document.getElementById(n),t=!1;return e||(e=document.createElement("div"),e.setAttribute("id",n),t=!0),{created:t,element:e}}let OO=!1;function Xye(n,e){if(typeof window>"u"||typeof document>"u"||!tN(window.location.host)||Tg[n]===e||Tg[n]||OO)return;Tg[n]=e;function t(m){return`__firebase__banner__${m}`}const r="__firebase__banner",s=$ye().prod.length>0;function o(){const m=document.getElementById(r);m&&m.remove()}function a(m){m.style.display="flex",m.style.background="#7faaf0",m.style.position="fixed",m.style.bottom="5px",m.style.left="5px",m.style.padding=".5em",m.style.borderRadius="5px",m.style.alignItems="center"}function l(m,g){m.setAttribute("width","24"),m.setAttribute("id",g),m.setAttribute("height","24"),m.setAttribute("viewBox","0 0 24 24"),m.setAttribute("fill","none"),m.style.marginLeft="-6px"}function c(){const m=document.createElement("span");return m.style.cursor="pointer",m.style.marginLeft="16px",m.style.fontSize="24px",m.innerHTML=" ×",m.onclick=()=>{OO=!0,o()},m}function u(m,g){m.setAttribute("id",g),m.innerText="Learn more",m.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",m.setAttribute("target","__blank"),m.style.paddingLeft="5px",m.style.textDecoration="underline"}function d(){const m=qye(r),g=t("text"),v=document.getElementById(g)||document.createElement("span"),_=t("learnmore"),x=document.getElementById(_)||document.createElement("a"),y=t("preprendIcon"),S=document.getElementById(y)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(m.created){const b=m.element;a(b),u(x,_);const A=c();l(S,y),b.append(S,v,x,A),document.body.appendChild(b)}s?(v.innerText="Preview backend disconnected.",S.innerHTML=`<g clip-path="url(#clip0_6013_33858)"> 4510<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/> 4511</g> 4512<defs> 4513<clipPath id="clip0_6013_33858"> 4514<rect width="24" height="24" fill="white"/> 4515</clipPath> 4516</defs>`):(S.innerHTML=`<g clip-path="url(#clip0_6083_34804)"> 4517<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/> 4518</g> 4519<defs> 4520<clipPath id="clip0_6083_34804"> 4521<rect width="24" height="24" fill="white"/> 4522</clipPath> 4523</defs>`,v.innerText="Preview backend running in this workspace."),v.setAttribute("id",g)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",d):d()}/** 4524 * @license 4525 * Copyright 2017 Google LLC 4526 * 4527 * Licensed under the Apache License, Version 2.0 (the "License");
4528 * you may not use this file except in compliance with the License. 4529 * You may obtain a copy of the License at 4530 * 4531 * http://www.apache.org/licenses/LICENSE-2.0 4532 * 4533 * Unless required by applicable law or agreed to in writing, software 4534 * distributed under the License is distributed on an "AS IS" BASIS, 4535 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4536 * See the License for the specific language governing permissions and 4537 * limitations under the License. 4538 */function Kye(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Yye(){var e;const n=(e=eN())==null?void 0:e.forceEnvironment;if(n==="node")return!0;if(n==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function Qye(){return!Yye()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function Jye(){try{return typeof indexedDB=="object"}catch{return!1}}function Zye(){return new Promise((n,e)=>{try{let t=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),t||self.indexedDB.deleteDatabase(r),n(!0)},i.onupgradeneeded=()=>{t=!1},i.onerror=()=>{var s;e(((s=i.error)==null?void 0:s.message)||"")}}catch(t){e(t)}})}/** 4539 * @license 4540 * Copyright 2017 Google LLC 4541 * 4542 * Licensed under the Apache License, Version 2.0 (the "License"); 4543 * you may not use this file except in compliance with the License. 4544 * You may obtain a copy of the License at 4545 * 4546 * http://www.apache.org/licenses/LICENSE-2.0 4547 * 4548 * Unless required by applicable law or agreed to in writing, software 4549 * distributed under the License is distributed on an "AS IS" BASIS, 4550 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4551 * See the License for the specific language governing permissions and 4552 * limitations under the License. 4553 */const eve="FirebaseError";class Bp extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name=eve,Object.setPrototypeOf(this,Bp.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,lG.prototype.create)}}class lG{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){const r=t[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?tve(s,r):"Error",a=`${this.serviceName}: ${o} (${i}).`;return new Bp(i,a,r)}}function tve(n,e){return n.replace(nve,(t,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const nve=/\{\$([^}]+)}/g;function L1(n,e){if(n===e)return!0;const t=Object.keys(n),r=Object.keys(e);for(const i of t){if(!r.includes(i))return!1;const s=n[i],o=e[i];if(FO(s)&&FO(o)){if(!L1(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!t.includes(i))return!1;return!0}function FO(n){return n!==null&&typeof n=="object"}/** 4554 * @license 4555 * Copyright 2021 Google LLC 4556 * 4557 * Licensed under the Apache License, Version 2.0 (the "License"); 4558 * you may not use this file except in compliance with the License. 4559 * You may obtain a copy of the License at 4560 * 4561 * http://www.apache.org/licenses/LICENSE-2.0 4562 * 4563 * Unless required by applicable law or agreed to in writing, software 4564 * distributed under the License is distributed on an "AS IS" BASIS, 4565 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4566 * See the License for the specific language governing permissions and 4567 * limitations under the License. 4568 */function bl(n){return n&&n._delegate?n._delegate:n}class Ay{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/** 4569 * @license 4570 * Copyright 2019 Google LLC 4571 * 4572 * Licensed under the Apache License, Version 2.0 (the "License"); 4573 * you may not use this file except in compliance with the License. 4574 * You may obtain a copy of the License at 4575 * 4576 * http://www.apache.org/licenses/LICENSE-2.0 4577 * 4578 * Unless required by applicable law or agreed to in writing, softw
4578are 4579 * distributed under the License is distributed on an "AS IS" BASIS, 4580 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4581 * See the License for the specific language governing permissions and 4582 * limitations under the License. 4583 */const Gu="[DEFAULT]";/** 4584 * @license 4585 * Copyright 2019 Google LLC 4586 * 4587 * Licensed under the Apache License, Version 2.0 (the "License"); 4588 * you may not use this file except in compliance with the License. 4589 * You may obtain a copy of the License at 4590 * 4591 * http://www.apache.org/licenses/LICENSE-2.0 4592 * 4593 * Unless required by applicable law or agreed to in writing, software 4594 * distributed under the License is distributed on an "AS IS" BASIS, 4595 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4596 * See the License for the specific language governing permissions and 4597 * limitations under the License. 4598 */class rve{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const r=new Hye;if(this.instancesDeferred.set(t,r),this.isInitialized(t)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:t});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(t).promise}getImmediate(e){const t=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),r=(e==null?void 0:e.optional)??!1;if(this.isInitialized(t)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:t})}catch(i){if(r)return null;throw i}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(sve(e))try{this.getOrInitializeService({instanceIdentifier:Gu})}catch{}for(const[t,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(t);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=Gu){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(t=>"INTERNAL"in t).map(t=>t.INTERNAL.delete()),...e.filter(t=>"_delete"in t).map(t=>t._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Gu){return this.instances.has(e)}getOptions(e=Gu){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:t});for(const[s,o]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(s);r===a&&o.resolve(i)}return i}onInit(e,t){const r=this.normalizeInstanceIdentifier(t),i=this.onInitCallbacks.get(r)??new Set;i.add(e),this.onInitCallbacks.set(r,i);const s=this.instances.get(r);return s&&e(s,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const r=this.onInitCallbacks.get(t);if(r)for(const i of r)try{i(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:ive(e),options:t}),this.instances.set(e,r),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=Gu){return this.component?this.component.multipleInstances?e:Gu:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function ive(n){return n===Gu?void 0:n}function sve(n){return n.instantiationMode==="EAGER"}/** 4599 * @license 4600 * Copyright 2019 Google LLC 4601 * 4602 * Licensed under the Apache License, Version 2.0 (the "License");
4603 * you may not use this file except in compliance with the License. 4604 * You may obtain a copy of the License at 4605 * 4606 * http://www.apache.org/licenses/LICENSE-2.0 4607 * 4608 * Unless required by applicable law or agreed to in writing, software 4609 * distributed under the License is distributed on an "AS IS" BASIS, 4610 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4611 * See the License for the specific language governing permissions and 4612 * limitations under the License. 4613 */class ove{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new rve(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}/** 4614 * @license 4615 * Copyright 2017 Google LLC 4616 * 4617 * Licensed under the Apache License, Version 2.0 (the "License"); 4618 * you may not use this file except in compliance with the License. 4619 * You may obtain a copy of the License at 4620 * 4621 * http://www.apache.org/licenses/LICENSE-2.0 4622 * 4623 * Unless required by applicable law or agreed to in writing, software 4624 * distributed under the License is distributed on an "AS IS" BASIS, 4625 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4626 * See the License for the specific language governing permissions and 4627 * limitations under the License. 4628 */var fn;(function(n){n[n.DEBUG=0]="DEBUG",n[n.VERBOSE=1]="VERBOSE",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.SILENT=5]="SILENT"})(fn||(fn={}));const ave={debug:fn.DEBUG,verbose:fn.VERBOSE,info:fn.INFO,warn:fn.WARN,error:fn.ERROR,silent:fn.SILENT},lve=fn.INFO,cve={[fn.DEBUG]:"log",[fn.VERBOSE]:"log",[fn.INFO]:"info",[fn.WARN]:"warn",[fn.ERROR]:"error"},uve=(n,e,...t)=>{if(e<n.logLevel)return;const r=new Date().toISOString(),i=cve[e];if(i)console[i](`[${r}] ${n.name}:`,...t);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class cG{constructor(e){this.name=e,this._logLevel=lve,this._logHandler=uve,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in fn))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?ave[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,fn.DEBUG,...e),this._logHandler(this,fn.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,fn.VERBOSE,...e),this._logHandler(this,fn.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,fn.INFO,...e),this._logHandler(this,fn.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,fn.WARN,...e),this._logHandler(this,fn.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,fn.ERROR,...e),this._logHandler(this,fn.ERROR,...e)}}const dve=(n,e)=>e.some(t=>n instanceof t);let UO,VO;function hve(){return UO||(UO=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function fve(){return VO||(VO=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const uG=new WeakMap,wC=new WeakMap,dG=new WeakMap,kT=new WeakMap,nN=new WeakMap;function pve(n){const e=new Promise((t,r)=>{const i=()=>{n.removeEventListener("success",s),n.removeEventListener("error",o)},s=()=>{t(Cc(n.result)),i()},o=()=>{r(n.error),i()};n.addEventListener("success",s),n.addEventListener("error",o)});return e.then(t=>{t instanceof IDBCursor&&uG.set(t,n)}).catch(()=>{}),nN.set(e,n),e}function mve(n){if(wC.has(n))return;const e=new Promise((t,r)=>{const i=()=>{n.removeEventListener("complete",s),n.removeEventListener("error",o),n.removeEventListener("abort",o)},s=()=>{t(),i()},o=()=>{r(n.error||new DOMException("AbortError","AbortError")),i()};n.addEventListener("complete",s),n.addEventListener("error",o),n.addEventListener("abort",o)});wC.set(n,e)}let SC={get(n,e,t){if(n instanceof IDBTransaction){if(e==="done")return wC.get(n);if(e==="objectStoreNames")return n.objectStoreNames||dG.get(n);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return Cc(n[e])},set(n,e,t){return n[e]=t,!0},has(n,e){return n instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in n}};function gve(n){SC=n(SC)}
vendor: 4,137 bytes, lines 4628-4662
4628function yve(n){return n===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const r=n.call(OT(this),e,...t);return dG.set(r,e.sort?e.sort():[e]),Cc(r)}:fve().includes(n)?function(...e){return n.apply(OT(this),e),Cc(uG.get(this))}:function(...e){return Cc(n.apply(OT(this),e))}}function vve(n){return typeof n=="function"?yve(n):(n instanceof IDBTransaction&&mve(n),dve(n,hve())?new Proxy(n,SC):n)}function Cc(n){if(n instanceof IDBRequest)return pve(n);if(kT.has(n))return kT.get(n);const e=vve(n);return e!==n&&(kT.set(n,e),nN.set(e,n)),e}const OT=n=>nN.get(n);function xve(n,e,{blocked:t,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(n,e),a=Cc(o);return r&&o.addEventListener("upgradeneeded",l=>{r(Cc(o.result),l.oldVersion,l.newVersion,Cc(o.transaction),l)}),t&&o.addEventListener("blocked",l=>t(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const _ve=["get","getKey","getAll","getAllKeys","count"],wve=["put","add","delete","clear"],FT=new Map;function jO(n,e){if(!(n instanceof IDBDatabase&&!(e in n)&&typeof e=="string"))return;if(FT.get(e))return FT.get(e);const t=e.replace(/FromIndex$/,""),r=e!==t,i=wve.includes(t);if(!(t in(r?IDBIndex:IDBObjectStore).prototype)||!(i||_ve.includes(t)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return r&&(c=c.index(a.shift())),(await Promise.all([c[t](...a),i&&l.done]))[0]};return FT.set(e,s),s}gve(n=>({...n,get:(e,t,r)=>jO(e,t)||n.get(e,t,r),has:(e,t)=>!!jO(e,t)||n.has(e,t)}));/** 4629 * @license 4630 * Copyright 2019 Google LLC 4631 * 4632 * Licensed under the Apache License, Version 2.0 (the "License"); 4633 * you may not use this file except in compliance with the License. 4634 * You may obtain a copy of the License at 4635 * 4636 * http://www.apache.org/licenses/LICENSE-2.0 4637 * 4638 * Unless required by applicable law or agreed to in writing, software 4639 * distributed under the License is distributed on an "AS IS" BASIS, 4640 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4641 * See the License for the specific language governing permissions and 4642 * limitations under the License. 4643 */class Sve{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(bve(t)){const r=t.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(t=>t).join(" ")}}function bve(n){const e=n.getComponent();return(e==null?void 0:e.type)==="VERSION"}const bC="@firebase/app",BO="0.14.7";/** 4644 * @license 4645 * Copyright 2019 Google LLC 4646 * 4647 * Licensed under the Apache License, Version 2.0 (the "License"); 4648 * you may not use this file except in compliance with the License. 4649 * You may obtain a copy of the License at 4650 * 4651 * http://www.apache.org/licenses/LICENSE-2.0 4652 * 4653 * Unless required by applicable law or agreed to in writing, software 4654 * distributed under the License is distributed on an "AS IS" BASIS, 4655 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4656 * See the License for the specific language governing permissions and 4657 * limitations under the License. 4658 */const El=new cG("@firebase/app"),Eve="@firebase/app-compat",Tve="@firebase/analytics-compat",Mve="@firebase/analytics",Ave="@firebase/app-check-compat",Cve="@firebase/app-check",Rve="@firebase/auth",Pve="@firebase/auth-compat",Nve="@firebase/database",Ive="@firebase/data-connect",Lve="@firebase/database-compat",Dve="@firebase/functions",kve="@firebase/functions-compat",Ove="@firebase/installations",Fve="@firebase/installations-compat",Uve="@firebase/messaging",Vve="@firebase/messaging-compat",jve="@firebase/performance",Bve="@firebase/performance-compat",zve="@firebase/remote-config",Hve="@firebase/remote-config-compat",Gve="@firebase/storage",Wve="@firebase/storage-compat",$ve="@firebase/firestore",qve="@firebase/ai",Xve="@firebase/firestore-compat",Kve="firebase",Yve="12.8.0";/** 4659 * @license 4660 * Copyright 2019 Google LLC 4661 * 4662 * Licensed under the Apache License, Version 2.0 (the "License");
4663 * you may not use this file except in compliance with the License. 4664 * You may obtain a copy of the License at 4665 * 4666 * http://www.apache.org/licenses/LICENSE-2.0 4667 * 4668 * Unless required by applicable law or agreed to in writing, software 4669 * distributed under the License is distributed on an "AS IS" BASIS, 4670 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4671 * See the License for the specific language governing permissions and 4672 * limitations under the License. 4673 */const EC="[DEFAULT]",Qve={[bC]:"fire-core",[Eve]:"fire-core-compat",[Mve]:"fire-analytics",[Tve]:"fire-analytics-compat",[Cve]:"fire-app-check",[Ave]:"fire-app-check-compat",[Rve]:"fire-auth",[Pve]:"fire-auth-compat",[Nve]:"fire-rtdb",[Ive]:"fire-data-connect",[Lve]:"fire-rtdb-compat",[Dve]:"fire-fn",[kve]:"fire-fn-compat",[Ove]:"fire-iid",[Fve]:"fire-iid-compat",[Uve]:"fire-fcm",[Vve]:"fire-fcm-compat",[jve]:"fire-perf",[Bve]:"fire-perf-compat",[zve]:"fire-rc",[Hve]:"fire-rc-compat",[Gve]:"fire-gcs",[Wve]:"fire-gcs-compat",[$ve]:"fire-fst",[Xve]:"fire-fst-compat",[qve]:"fire-vertex","fire-js":"fire-js",[Kve]:"fire-js-all"};/** 4674 * @license 4675 * Copyright 2019 Google LLC 4676 * 4677 * Licensed under the Apache License, Version 2.0 (the "License"); 4678 * you may not use this file except in compliance with the License. 4679 * You may obtain a copy of the License at 4680 * 4681 * http://www.apache.org/licenses/LICENSE-2.0 4682 * 4683 * Unless required by applicable law or agreed to in writing, software 4684 * distributed under the License is distributed on an "AS IS" BASIS, 4685 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4686 * See the License for the specific language governing permissions and 4687 * limitations under the License. 4688 */const D1=new Map,Jve=new Map,TC=new Map;function zO(n,e){try{n.container.addComponent(e)}catch(t){El.debug(`Component ${e.name} failed to register with FirebaseApp ${n.name}`,t)}}function k1(n){const e=n.name;if(TC.has(e))return El.debug(`There were multiple attempts to register component ${e}.`),!1;TC.set(e,n);for(const t of D1.values())zO(t,n);for(const t of Jve.values())zO(t,n);return!0}function Zve(n,e){const t=n.container.getProvider("heartbeat").getImmediate({optional:!0});return t&&t.triggerHeartbeat(),n.container.getProvider(e)}function e0e(n){return n==null?!1:n.settings!==void 0}/** 4689 * @license 4690 * Copyright 2019 Google LLC 4691 * 4692 * Licensed under the Apache License, Version 2.0 (the "License"); 4693 * you may not use this file except in compliance with the License. 4694 * You may obtain a copy of the License at 4695 * 4696 * http://www.apache.org/licenses/LICENSE-2.0 4697 * 4698 * Unless required by applicable law or agreed to in writing, software 4699 * distributed under the License is distributed on an "AS IS" BASIS, 4700 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4701 * See the License for the specific language governing permissions and 4702 * limitations under the License. 4703 */const t0e={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
4703d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Rc=new lG("app","Firebase",t0e);/** 4704 * @license 4705 * Copyright 2019 Google LLC 4706 * 4707 * Licensed under the Apache License, Version 2.0 (the "License"); 4708 * you may not use this file except in compliance with the License. 4709 * You may obtain a copy of the License at 4710 * 4711 * http://www.apache.org/licenses/LICENSE-2.0 4712 * 4713 * Unless required by applicable law or agreed to in writing, software 4714 * distributed under the License is distributed on an "AS IS" BASIS, 4715 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4716 * See the License for the specific language governing permissions and 4717 * limitations under the License. 4718 */class n0e{constructor(e,t,r){this._isDeleted=!1,this._options={...e},this._config={...t},this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Ay("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Rc.create("app-deleted",{appName:this._name})}}/** 4719 * @license 4720 * Copyright 2019 Google LLC 4721 * 4722 * Licensed under the Apache License, Version 2.0 (the "License"); 4723 * you may not use this file except in compliance with the License. 4724 * You may obtain a copy of the License at 4725 * 4726 * http://www.apache.org/licenses/LICENSE-2.0 4727 * 4728 * Unless required by applicable law or agreed to in writing, software 4729 * distributed under the License is distributed on an "AS IS" BASIS, 4730 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4731 * See the License for the specific language governing permissions and 4732 * limitations under the License. 4733 */const r0e=Yve;function hG(n,e={}){let t=n;typeof e!="object"&&(e={name:e});const r={name:EC,automaticDataCollectionEnabled:!0,...e},i=r.name;if(typeof i!="string"||!i)throw Rc.create("bad-app-name",{appName:String(i)});if(t||(t=aG()),!t)throw Rc.create("no-options");const s=D1.get(i);if(s){if(L1(t,s.options)&&L1(r,s.config))return s;throw Rc.create("duplicate-app",{appName:i})}const o=new ove(i);for(const l of TC.values())o.addComponent(l);const a=new n0e(t,r,o);return D1.set(i,a),a}function i0e(n=EC){const e=D1.get(n);if(!e&&n===EC&&aG())return hG();if(!e)throw Rc.create("no-app",{appName:n});return e}function kf(n,e,t){let r=Qve[n]??n;t&&(r+=`-${t}`);const i=r.match(/\s|\//),s=e.match(/\s|\//);if(i||s){const o=[`Unable to register library "${r}" with version "${e}":`];i&&o.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&s&&o.push("and"),s&&o.push(`version name "${e}" contains illegal characters (whitespace or "/")`),El.warn(o.join(" "));return}k1(new Ay(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}/** 4734 * @license 4735 * Copyright 2021 Google LLC 4736 * 4737 * Licensed under the Apache License, Version 2.0 (the "License"); 4738 * you may not use this file except in compliance with the License. 4739 * You may obtain a copy of the License at 4740 * 4741 * http://www.apache.org/licenses/LICENSE-2.0 4742 * 4743 * Unless required by applicable law or agreed to in writing, softw
4743are 4744 * distributed under the License is distributed on an "AS IS" BASIS, 4745 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4746 * See the License for the specific language governing permissions and 4747 * limitations under the License. 4748 */const s0e="firebase-heartbeat-database",o0e=1,Cy="firebase-heartbeat-store";let UT=null;function fG(){return UT||(UT=xve(s0e,o0e,{upgrade:(n,e)=>{switch(e){case 0:try{n.createObjectStore(Cy)}catch(t){console.warn(t)}}}}).catch(n=>{throw Rc.create("idb-open",{originalErrorMessage:n.message})})),UT}async function a0e(n){try{const t=(await fG()).transaction(Cy),r=await t.objectStore(Cy).get(pG(n));return await t.done,r}catch(e){if(e instanceof Bp)El.warn(e.message);else{const t=Rc.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});El.warn(t.message)}}}async function HO(n,e){try{const r=(await fG()).transaction(Cy,"readwrite");await r.objectStore(Cy).put(e,pG(n)),await r.done}catch(t){if(t instanceof Bp)El.warn(t.message);else{const r=Rc.create("idb-set",{originalErrorMessage:t==null?void 0:t.message});El.warn(r.message)}}}function pG(n){return`${n.name}!${n.options.appId}`}/** 4749 * @license 4750 * Copyright 2021 Google LLC 4751 * 4752 * Licensed under the Apache License, Version 2.0 (the "License"); 4753 * you may not use this file except in compliance with the License. 4754 * You may obtain a copy of the License at 4755 * 4756 * http://www.apache.org/licenses/LICENSE-2.0 4757 * 4758 * Unless required by applicable law or agreed to in writing, software 4759 * distributed under the License is distributed on an "AS IS" BASIS, 4760 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4761 * See the License for the specific language governing permissions and 4762 * limitations under the License. 4763 */const l0e=1024,c0e=30;class u0e{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new h0e(t),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,t;try{const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=GO();if(((e=this._heartbeatsCache)==null?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s))return;if(this._heartbeatsCache.heartbeats.push({date:s,agent:i}),this._heartbeatsCache.heartbeats.length>c0e){const o=f0e(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(o,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(r){El.warn(r)}}async getHeartbeatsHeader(){var e;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)==null?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const t=GO(),{heartbeatsToSend:r,unsentEntries:i}=d0e(this._heartbeatsCache.heartbeats),s=I1(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=t,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}catch(t){return El.warn(t),""}}}function GO(){return new Date().toISOString().substring(0,10)}function d0e(n,e=l0e){const t=[];let r=n.slice();for(const i of n){const s=t.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),WO(t)>e){s.dates.pop();break}}else if(t.push({agent:i.agent,dates:[i.date]}),WO(t)>e){t.pop();break}r=r.slice(1)}return{heartbeatsToSend:t,unsentEntries:r}}class h0e{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return Jye()?Zye().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const t=await a0e(this.app);return t!=null&&t.heartbeats?t:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){const r=await this.read();return HO(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){if(await this._canUseIndexedDBPromise){const r=await this.read();return HO(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return}}function WO(n){return I1(JSON.stringify({version:2,heartbeats:n})).length}function f0e(n){if(n.length===0)return-1;let e=0,t=n[0].date;for(let r=1;r<n.length;r++)n[r].date<t&&(t=n[r].date,e=r);return e}/** 4764 * @license 4765 * Copyright 2019 Google LLC 4766 * 4767 * Licensed under the Apache License, Version 2.0 (the "License");
vendor: 10,216 bytes, lines 4768-4785
4768 * you may not use this file except in compliance with the License. 4769 * You may obtain a copy of the License at 4770 * 4771 * http://www.apache.org/licenses/LICENSE-2.0 4772 * 4773 * Unless required by applicable law or agreed to in writing, software 4774 * distributed under the License is distributed on an "AS IS" BASIS, 4775 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4776 * See the License for the specific language governing permissions and 4777 * limitations under the License. 4778 */function p0e(n){k1(new Ay("platform-logger",e=>new Sve(e),"PRIVATE")),k1(new Ay("heartbeat",e=>new u0e(e),"PRIVATE")),kf(bC,BO,n),kf(bC,BO,"esm2020"),kf("fire-js","")}p0e("");var $O=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license 4779Copyright The Closure Library Authors. 4780SPDX-License-Identifier: Apache-2.0 4781*/var Pc,mG;(function(){var n;/** @license 4782 4783 Copyright The Closure Library Authors. 4784 SPDX-License-Identifier: Apache-2.0 4785*/function e(C,P){function R(){}R.prototype=P.prototype,C.F=P.prototype,C.prototype=new R,C.prototype.constructor=C,C.D=function(N,O,V){for(var B=Array(arguments.length-2),W=2;W<arguments.length;W++)B[W-2]=arguments[W];return P.prototype[O].apply(N,B)}}function t(){this.blockSize=-1}function r(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.C=Array(this.blockSize),this.o=this.h=0,this.u()}e(r,t),r.prototype.u=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function i(C,P,R){R||(R=0);const N=Array(16);if(typeof P=="string")for(var O=0;O<16;++O)N[O]=P.charCodeAt(R++)|P.charCodeAt(R++)<<8|P.charCodeAt(R++)<<16|P.charCodeAt(R++)<<24;else for(O=0;O<16;++O)N[O]=P[R++]|P[R++]<<8|P[R++]<<16|P[R++]<<24;P=C.g[0],R=C.g[1],O=C.g[2];let V=C.g[3],B;B=P+(V^R&(O^V))+N[0]+3614090360&4294967295,P=R+(B<<7&4294967295|B>>>25),B=V+(O^P&(R^O))+N[1]+3905402710&4294967295,V=P+(B<<12&4294967295|B>>>20),B=O+(R^V&(P^R))+N[2]+606105819&4294967295,O=V+(B<<17&4294967295|B>>>15),B=R+(P^O&(V^P))+N[3]+3250441966&4294967295,R=O+(B<<22&4294967295|B>>>10),B=P+(V^R&(O^V))+N[4]+4118548399&4294967295,P=R+(B<<7&4294967295|B>>>25),B=V+(O^P&(R^O))+N[5]+1200080426&4294967295,V=P+(B<<12&4294967295|B>>>20),B=O+(R^V&(P^R))+N[6]+2821735955&4294967295,O=V+(B<<17&4294967295|B>>>15),B=R+(P^O&(V^P))+N[7]+4249261313&4294967295,R=O+(B<<22&4294967295|B>>>10),B=P+(V^R&(O^V))+N[8]+1770035416&4294967295,P=R+(B<<7&4294967295|B>>>25),B=V+(O^P&(R^O))+N[9]+2336552879&4294967295,V=P+(B<<12&4294967295|B>>>20),B=O+(R^V&(P^R))+N[10]+4294925233&4294967295,O=V+(B<<17&4294967295|B>>>15),B=R+(P^O&(V^P))+N[11]+2304563134&4294967295,R=O+(B<<22&4294967295|B>>>10),B=P+(V^R&(O^V))+N[12]+1804603682&4294967295,P=R+(B<<7&4294967295|B>>>25),B=V+(O^P&(R^O))+N[13]+4254626195&4294967295,V=P+(B<<12&4294967295|B>>>20),B=O+(R^V&(P^R))+N[14]+2792965006&4294967295,O=V+(B<<17&4294967295|B>>>15),B=R+(P^O&(V^P))+N[15]+1236535329&4294967295,R=O+(B<<22&4294967295|B>>>10),B=P+(O^V&(R^O))+N[1]+4129170786&4294967295,P=R+(B<<5&4294967295|B>>>27),B=V+(R^O&(P^R))+N[6]+3225465664&4294967295,V=P+(B<<9&4294967295|B>>>23),B=O+(P^R&(V^P))+N[11]+643717713&4294967295,O=V+(B<<14&4294967295|B>>>18),B=R+(V^P&(O^V))+N[0]+3921069994&4294967295,R=O+(B<<20&4294967295|B>>>12),B=P+(O^V&(R^O))+N[5]+3593408605&4294967295,P=R+(B<<5&4294967295|B>>>27),B=V+(R^O&(P^R))+N[10]+38016083&4294967295,V=P+(B<<9&4294967295|B>>>23),B=O+(P^R&(V^P))+N[15]+3634488961&4294967295,O=V+(B<<14&4294967295|B>>>18),B=R+(V^P&(O^V))+N[4]+3889429448&4294967295,R=O+(B<<20&4294967295|B>>>12),B=P+(O^V&(R^O))+N[9]+568446438&4294967295,P=R+(B<<5&4294967295|B>>>27),B=V+(R^O&(P^R))+N[14]+3275163606&4294967295,V=P+(B<<9&4294967295|B>>>23),B=O+(P^R&(V^P))+N[3]+4107603335&4294967295,O=V+(B<<14&4294967295|B>>>18),B=R+(V^P&(O^V))+N[8]+1163531501&4294967295,R=O+(B<<20&4294967295|B>>>12),B=P+(O^V&(R^O))+N[13]+2850285829&4294967295,P=R+(B<<5&4294967295|B>>>27),B=V+(R^O&(P^R))+N[2]+4243563512&4294967295,V=P+(B<<9&4294967295|B>>>23),B=O+(P^R&(V^P))+N[7]+1735328473&4294967295,O=V+(B<<14&4294967295|B>>>18),B=R+(V^P&(O^V))+N[12]+2368359562&4294967295,R=O+(B<<20&4294967295|B>>>12),B=P+(R^O^V)+N[5]+4294588738&4294967295,P=R+(B<<4&4294967295|B>>>28),B=V+(P^R^O)+N[8]+2272392833&4294967295,V=P+(B<<11&4294967295|B>>>21),B=O+(V^P^R)+N[11]+1839030562&4294967295,O=V+(B<<16&4294967295|B>>>16),B=R+(O^V^P)+N[14]+4259657740&4294967295,R=O+(B<<23&4294967295|B>>>9),B=P+(R^O^V)+N[1]+2763975236&4294967295,P=R+(B<<4&4294967295|B>>>28),B=V+(P^R^O)+N[4]+1272893353&4294967295,V=P+(B<<11&4294967295|B>>>21),B=O+(V^P^R)+N[7]+4139469664&4294967295,O=V+(B<<16&4294967295|B>>>16),B=R+(O^V^P)+N[10]+3200236656&4294967295,R=O+(B<<23&4294967295|B>>>9),B=P+(R^O^V)+N[13]+681279174&4294967295,P=R+(B<<4&4294967295|B>>>28),B=V+(P^R^O)+N[0]+3936430074&4294967295,V=P+(B<<11&4294967295|B>>>21),B=O+(V^P^R)+N[3]+3572445317&4294967295,O=V+(B<<16&4294967295|B>>>16),B=R+(O^V^P)+N[6]+76029189&4294967295,R=O+(B<<23&4294967295|B>>>9),B=P+(R^O^V)+N[9]+3654602809&4294967295,P=R+(B<<4&4294967295|B>>>28),B=V+(P^R^O)+N[12]+3873151461&4294967295,V=P+(B<<11&4294967295|B>>>21),B=O+(V^P^R)+N[15]+530742520&4294967295,O=V+(B<<16&4294967295|B>>>16),B=R+(O^V^P)+N[2]+3299628645&4294967295,R=O+(B<<23&4294967295|B>>>9),B=P+(O^(R|~V))+N[0]+4096336452&4294967295,P=R+(B<<6&4294967295|B>>>26),B=V+(R^(P|~O))+N[7]+1126891415&4294967295,V=P+(B<<10&4294967295|B>>>22),B=O+(P^(V|~R))+N[14]+2878612391&4294967295,O=V+(B<<15&4294967295|B>>>17),B=R+(V^(O|~P))+N[5]+4237533241&4294967295,R=O+(B<<21&4294967295|B>>>11),B=P+(O^(R|~V))+N[12]+1700485571&4294967295,P=R+(B<<6&4294967295|B>>>26),B=V+(R^(P|~O))+N[3]+2399980690&4294967295,V=P+(B<<10&4294967295|B>>>22),B=O+(P^(V|~R))+N[10]+4293915773&4294967295,O=V+(B<<15&4294967295|B>>>17),B=R+(V^(O|~P))+N[1]+2240044497&4294967295,R=O+(B<<21&4294967295|B>>>11),B=P+(O^(R|~V))+N[8]+1873313359&4294967295,P=R+(B<<6&4294967295|B>>>26),B=V+(R^(P|~O))+N[15]+4264355552&4294967295,V=P+(B<<10&4294967295|B>>>22),B=O+(P^(V|~R))+N[6]+2734768916&4294967295,O=V+(B<<15&4294967295|B>>>17),B=R+(V^(O|~P))+N[13]+1309151649&4294967295,R=O+(B<<21&4294967295|B>>>11),B=P+(O^(R|~V))+N[4]+4149444226&4294967295,P=R+(B<<6&4294967295|B>>>26),B=V+(R^(P|~O))+N[11]+3174756917&4294967295,V=P+(B<<10&4294967295|B>>>22),B=O+(P^(V|~R))+N[2]+718787259&4294967295,O=V+(B<<15&4294967295|B>>>17),B=R+(V^(O|~P))+N[9]+3951481745&4294967295,C.g[0]=C.g[0]+P&4294967295,C.g[1]=C.g[1]+(O+(B<<21&4294967295|B>>>11))&4294967295,C.g[2]=C.g[2]+O&4294967295,C.g[3]=C.g[3]+V&4294967295}r.prototype.v=function(C,P){P===void 0&&(P=C.length);const R=P-this.blockSize,N=this.C;let O=this.h,V=0;for(;V<P;){if(O==0)for(;V<=R;)i(this,C,V),V+=this.blockSize;if(typeof C=="string"){for(;V<P;)if(N[O++]=C.charCodeAt(V++),O==this.blockSize){i(this,N),O=0;break}}else for(;V<P;)if(N[O++]=C[V++],O==this.blockSize){i(this,N),O=0;break}}this.h=O,this.o+=P},r.prototype.A=function(){var C=Array((this.h<56?this.blockSize:this.blockSize*2)-this.h);C[0]=128;for(var P=1;P<C.length-8;++P)C[P]=0;P=this.o*8;for(var R=C.length-8;R<C.length;++R)C[R]=P&255,P/=256;for(this.v(C),C=Array(16),P=0,R=0;R<4;++R)for(let N=0;N<32;N+=8)C[P++]=this.g[R]>>>N&255;return C};function s(C,P){var R=a;return Object.prototype.hasOwnProperty.call(R,C)?R[C]:R[C]=P(C)}function o(C,P){this.h=P;const R=[];let N=!0;for(let O=C.length-1;O>=0;O--){const V=C[O]|0;N&&V==P||(R[O]=V,N=!1)}this.g=R}var a={};function l(C){return-128<=C&&C<128?s(C,function(P){return new o([P|0],P<0?-1:0)}):new o([C|0],C<0?-1:0)}function c(C){if(isNaN(C)||!isFinite(C))return d;if(C<0)return x(c(-C));const P=[];let R=1;for(let N=0;C>=R;N++)P[N]=C/R|0,R*=4294967296;return new o(P,0)}function u(C,P){if(C.length==0)throw Error("number format error: empty string");if(P=P||10,P<2||36<P)throw Error("radix out of range: "+P);if(C.charAt(0)=="-")return x(u(C.substring(1),P));if(C.indexOf("-")>=0)throw Error('number format error: interior "-" character');const R=c(Math.pow(P,8));let N=d;for(let V=0;V<C.length;V+=8){var O=Math.min(8,C.length-V);const B=parseInt(C.substring(V,V+O),P);O<8?(O=c(Math.pow(P,O)),N=N.j(O).add(c(B))):(N=N.j(R),N=N.add(c(B)))}return N}var d=l(0),m=l(1),g=l(16777216);n=o.prototype,n.m=function(){if(_(this))return-x(this).m();let C=0,P=1;for(let R=0;R<this.g.length;R++){const N=this.i(R);C+=(N>=0?N:4294967296+N)*P,P*=4294967296}return C},n.toString=function(C){if(C=C||10,C<2||36<C)throw Error("radix out of range: "+C);if(v(this))return"0";if(_(this))return"-"+x(this).toString(C);const P=c(Math.pow(C,6));var R=this;let N="";for(;;){const O=A(R,P).g;R=y(R,O.j(P));let V=((R.g.length>0?R.g[0]:R.h)>>>0).toString(C);if(R=O,v(R))return V+N;for(;V.length<6;)V="0"+V;N=V+N}},n.i=function(C){return C<0?0:C<this.g.length?this.g[C]:this.h};function v(C){if(C.h!=0)return!1;for(let P=0;P<C.g.length;P++)if(C.g[P]!=0)return!1;return!0}function _(C){return C.h==-1}n.l=function(C){return C=y(this,C),_(C)?-1:v(C)?0:1};function x(C){const P=C.g.length,R=[];for(let N=0;N<P;N++)R[N]=~C.g[N];return new o(R,~C.h).add(m)}n.abs=function(){return _(this)?x(this):this},n.add=function(C){const P=Math.max(this.g.length,C.g.length),R=[];let N=0;for(let O=0;O<=P;O++){let V=N+(this.i(O)&65535)+(C.i(O)&65535),B=(V>>>16)+(this.i(O)>>>16)+(C.i(O)>>>16);N=B>>>16,V&=65535,B&=65535,R[O]=B<<16|V}return new o(R,R[R.length-1]&-2147483648?-1:0)};function y(C,P){return C.add(x(P))}n.j=function(C){if(v(this)||v(C))return d;if(_(this))return _(C)?x(this).j(x(C)):x(x(this).j(C));if(_(C))return x(this.j(x(C)));if(this.l(g)<0&&C.l(g)<0)return c(this.m()*C.m());const P=this.g.length+C.g.length,R=[];for(var N=0;N<2*P;N++)R[N]=0;for(N=0;N<this.g.length;N++)for(let O=0;O<C.g.length;O++){const V=this.i(N)>>>16,B=this.i(N)&65535,W=C.i(O)>>>16,ee=C.i(O)&65535;R[2*N+2*O]+=B*ee,S(R,2*N+2*O),R[2*N+2*O+1]+=V*ee,S(R,2*N+2*O+1),R[2*N+2*O+1]+=B*W,S(R,2*N+2*O+1),R[2*N+2*O+2]+=V*W,S(R,2*N+2*O+2)}for(C=0;C<P;C++)R[C]=R[2*C+1]<<16|R[2*C];for(C=P;C<2*P;C++)R[C]=0;return new o(R,0)};function S(C,P){for(;(C[P]&65535)!=C[P];)C[P+1]+=C[P]>>>16,C[P]&=65535,P++}function b(C,P){this.g=C,this.h=P}function A(C,P){if(v(P))throw Error("division by zero");if(v(C))return new b(d,d);if(_(C))return P=A(x(C),P),new b(x(P.g),x(P.h));if(_(P))return P=A(C,x(P)),new b(x(P.g),P.h);if(C.g.length>
478530){if(_(C)||_(P))throw Error("slowDivide_ only works with positive integers.");for(var R=m,N=P;N.l(C)<=0;)R=k(R),N=k(N);var O=L(R,1),V=L(N,1);for(N=L(N,2),R=L(R,2);!v(N);){var B=V.add(N);B.l(C)<=0&&(O=O.add(R),V=B),N=L(N,1),R=L(R,1)}return P=y(C,O.j(P)),new b(O,P)}for(O=d;C.l(P)>=0;){for(R=Math.max(1,Math.floor(C.m()/P.m())),N=Math.ceil(Math.log(R)/Math.LN2),N=N<=48?1:Math.pow(2,N-48),V=c(R),B=V.j(P);_(B)||B.l(C)>0;)R-=N,V=c(R),B=V.j(P);v(V)&&(V=m),O=O.add(V),C=y(C,B)}return new b(O,C)}n.B=function(C){return A(this,C).h},n.and=function(C){const P=Math.max(this.g.length,C.g.length),R=[];for(let N=0;N<P;N++)R[N]=this.i(N)&C.i(N);return new o(R,this.h&C.h)},n.or=function(C){const P=Math.max(this.g.length,C.g.length),R=[];for(let N=0;N<P;N++)R[N]=this.i(N)|C.i(N);return new o(R,this.h|C.h)},n.xor=function(C){const P=Math.max(this.g.length,C.g.length),R=[];for(let N=0;N<P;N++)R[N]=this.i(N)^C.i(N);return new o(R,this.h^C.h)};function k(C){const P=C.g.length+1,R=[];for(let N=0;N<P;N++)R[N]=C.i(N)<<1|C.i(N-1)>>>31;return new o(R,C.h)}function L(C,P){const R=P>>5;P%=32;const N=C.g.length-R,O=[];for(let V=0;V<N;V++)O[V]=P>0?C.i(V+R)>>>P|C.i(V+R+1)<<32-P:C.i(V+R);return new o(O,C.h)}r.prototype.digest=r.prototype.A,r.prototype.reset=r.prototype.u,r.prototype.update=r.prototype.v,mG=r,o.prototype.add=o.prototype.add,o.prototype.multiply=o.prototype.j,o.prototype.modulo=o.prototype.B,o.prototype.compare=o.prototype.l,o.prototype.toNumber=o.prototype.m,o.prototype.toString=o.prototype.toString,o.prototype.getBits=o.prototype.i,o.fromNumber=c,o.fromString=u,Pc=o}).apply(typeof $O<"u"?$O:typeof self<"u"?self:typeof window<"u"?window:{});var zx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license 4786Copyright The Closure Library Authors. 4787SPDX-License-Identifier: Apache-2.0 4788*/var gG,Zm,yG,A_,MC,vG,xG,_G;(function(){var n,e=Object.defineProperty;function t(w){w=[typeof globalThis=="object"&&globalThis,w,typeof window=="object"&&window,typeof self=="object"&&self,typeof zx=="object"&&zx];for(var D=0;D<w.length;++D){var U=w[D];if(U&&U.Math==Math)return U}throw Error("Cannot find global object")}var r=t(this);function i(w,D){if(D)e:{var U=r;w=w.split(".");for(var $=0;$<w.length-1;$++){var ue=w[$];if(!(ue in U))break e;U=U[ue]}w=w[w.length-1],$=U[w],D=D($),D!=$&&D!=null&&e(U,w,{configurable:!0,writable:!0,value:D})}}i("Symbol.dispose",function(w){return w||Symbol("Symbol.dispose")}),i("Array.prototype.values",function(w){return w||function(){return this[Symbol.iterator]()}}),i("Object.entries",function(w){return w||function(D){var U=[],$;for($ in D)Object.prototype.hasOwnProperty.call(D,$)&&U.push([$,D[$]]);return U}});/** @license 4789 4790 Copyright The Closure Library Authors. 4791 SPDX-License-Identifier: Apache-2.0 4792*/var s=s||{},o=this||self;function a(w){var D=typeof w;return D=="object"&&w!=null||D=="function"}function l(w,D,U){return w.call.apply(w.bind,arguments)}function c(w,D,U){return c=l,c.apply(null,arguments)}function u(w,D){var U=Array.prototype.slice.call(arguments,1);return function(){var $=U.slice();return $.push.apply($,arguments),w.apply(this,$)}}function d(w,D){function U(){}U.prototype=D.prototype,w.Z=D.prototype,w.prototype=new U,w.prototype.constructor=w,w.Ob=function($,ue,pe){for(var Be=Array(arguments.length-2),jt=2;jt<arguments.length;jt++)Be[jt-2]=arguments[jt];return D.prototype[ue].apply($,Be)}}var m=typeof AsyncContext<"u"&&typeof AsyncContext.Snapshot=="function"?w=>w&&AsyncContext.Snapshot.wrap(w):w=>w;function g(w){const D=w.length;if(D>0){const U=Array(D);for(let $=0;$<D;$++)U[$]=w[$];return U}return[]}function v(w,D){for(let $=1;$<arguments.length;$++){const ue=arguments[$];var U=typeof ue;if(U=U!="object"?U:ue?Array.isArray(ue)?"array":U:"null",U=="array"||U=="object"&&typeof ue.length=="number"){U=w.length||0;const pe=ue.length||0;w.length=U+pe;for(let Be=0;Be<pe;Be++)w[U+Be]=ue[Be]}else w.push(ue)}}class _{constructor(D,U){this.i=D,this.j=U,this.h=0,this.g=null}get(){let D;return this.h>0?(this.h--,D=this.g,this.g=D.next,D.next=null):D=this.i(),D}}function x(w){o.setTimeout(()=>{throw w},0)}function y(){var w=C;let D=null;return w.g&&(D=w.g,w.g=w.g.next,w.g||(w.h=null),D.next=null),D}class S{constructor(){this.h=this.g=null}add(D,U){const $=b.get();$.set(D,U),this.h?this.h.next=$:this.g=$,this.h=$}}var b=new _(()=>new A,w=>w.reset());class A{constructor(){this.next=this.g=this.h=null}set(D,U){this.h=D,this.g=U,this.next=null}reset(){this.next=this.g=this.h=null}}let k,L=!1,C=new S,P=()=>{const w=Promise.resolve(void 0);k=()=>{w.then(R)}};function R(){for(var w;w=y();){try{w.h.call(w.g)}catch(U){x(U)}var D=b;D.j(w),D.h<100&&(D.h++,w.next=D.g,D.g=w)}L=!1}function N(){this.u=this.u,this.C=this.C}N.prototype.u=!1,N.prototype.dispose=function(){this.u||(this.u=!0,this.N())},N.prototype[Symbol.dispose]=function(){this.dispose()},N.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function O(w,D){this.type=w,this.g=this.target=D,this.defaultPrevented=!1}O.prototype.h=function(){this.defaultPrevented=!0};var V=function(){if(!o.addEventListener||!Object.defineProperty)return!1;var w=!1,D=Object.defineProperty({},"passive",{get:function(){w=!0}});try{const U=()=>{};o.addEventListener("test",U,D),o.removeEventListener("test",U,D)}catch{}return w}();function B(w){return/^[\s\xa0]*$/.test(w)}function W(w,D){O.call(this,w?w.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,w&&this.init(w,D)}d(W,O),W.prototype.init=function(w,D){const U=this.type=w.type,$=w.changedTouches&&w.changedTouches.length?w.changedTouches[0]:null;this.target=w.target||w.srcElement,this.g=D,D=w.relatedTarget,D||(U=="mouseover"?D=w.fromElement:U=="mouseout"&&(D=w.toElement)),this.relatedTarget=D,$?(this.clientX=$.clientX!==void 0?$.clientX:$.pageX,this.clientY=$.clientY!==void 0?$.clientY:$.pageY,this.screenX=$.screenX||0,this.screenY=$.screenY||0):(this.clientX=w.clientX!==void 0?w.clientX:w.pageX,this.clientY=w.clientY!==void 0?w.clientY:w.pageY,this.screenX=w.screenX||0,this.screenY=w.screenY||0),this.button=w.button,this.key=w.key||"",this.ctrlKey=w.ctrlKey,this.altKey=w.altKey,this.shiftKey=w.shiftKey,this.metaKey=w.metaKey,this.pointerId=w.pointerId||0,this.pointerType=w.pointerType,this.state=w.state,this.i=w,w.defaultPrevented&&W.Z.h.call(this)},W.prototype.h=function(){W.Z.h.call(this);const w=this.i;w.preventDefault?w.preventDefault():w.returnValue=!1};var ee="closure_listenable_"+(Math.random()*1e6|0),J=0;function ie(w,D,U,$,ue){this.listener=w,this.proxy=null,this.src=D,this.type=U,this.capture=!!$,this.ha=ue,this.key=++J,this.da=this.fa=!1}function j(w){w.da=!0,w.listener=null,w.proxy=null,w.src=null,w.ha=null}function z(w,D,U){for(const $ in w)D.call(U,w[$],$,w)}function q(w,D){for(const U in w)D.call(void 0,w[U],U,w)}function Z(w){const D={};for(const U in w)D[U]=w[U];return D}const re="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
4792ing toString valueOf".split(" ");function te(w,D){let U,$;for(let ue=1;ue<arguments.length;ue++){$=arguments[ue];for(U in $)w[U]=$[U];for(let pe=0;pe<re.length;pe++)U=re[pe],Object.prototype.hasOwnProperty.call($,U)&&(w[U]=$[U])}}function ae(w){this.src=w,this.g={},this.h=0}ae.prototype.add=function(w,D,U,$,ue){const pe=w.toString();w=this.g[pe],w||(w=this.g[pe]=[],this.h++);const Be=Re(w,D,$,ue);return Be>-1?(D=w[Be],U||(D.fa=!1)):(D=new ie(D,this.src,pe,!!$,ue),D.fa=U,w.push(D)),D};function we(w,D){const U=D.type;if(U in w.g){var $=w.g[U],ue=Array.prototype.indexOf.call($,D,void 0),pe;(pe=ue>=0)&&Array.prototype.splice.call($,ue,1),pe&&(j(D),w.g[U].length==0&&(delete w.g[U],w.h--))}}function Re(w,D,U,$){for(let ue=0;ue<w.length;++ue){const pe=w[ue];if(!pe.da&&pe.listener==D&&pe.capture==!!U&&pe.ha==$)return ue}return-1}var de="closure_lm_"+(Math.random()*1e6|0),Ge={};function $e(w,D,U,$,ue){if(Array.isArray(D)){for(let pe=0;pe<D.length;pe++)$e(w,D[pe],U,$,ue);return null}return U=Ye(U),w&&w[ee]?w.J(D,U,a($)?!!$.capture:!!$,ue):De(w,D,U,!1,$,ue)}function De(w,D,U,$,ue,pe){if(!D)throw Error("Invalid event type");const Be=a(ue)?!!ue.capture:!!ue;let jt=xe(w);if(jt||(w[de]=jt=new ae(w)),U=jt.add(D,U,$,Be,pe),U.proxy)return U;if($=Ue(),U.proxy=$,$.src=w,$.listener=U,w.addEventListener)V||(ue=Be),ue===void 0&&(ue=!1),w.addEventListener(D.toString(),$,ue);else if(w.attachEvent)w.attachEvent(ve(D.toString()),$);else if(w.addListener&&w.removeListener)w.addListener($);else throw Error("addEventListener and attachEvent are unavailable.");return U}function Ue(){function w(U){return D.call(w.src,w.listener,U)}const D=Le;return w}function Q(w,D,U,$,ue){if(Array.isArray(D))for(var pe=0;pe<D.length;pe++)Q(w,D[pe],U,$,ue);
vendor: 1,210 bytes, line 4792
4792else $=a($)?!!$.capture:!!$,U=Ye(U),w&&w[ee]?(w=w.i,pe=String(D).toString(),pe in w.g&&(D=w.g[pe],U=Re(D,U,$,ue),U>-1&&(j(D[U]),Array.prototype.splice.call(D,U,1),D.length==0&&(delete w.g[pe],w.h--)))):w&&(w=xe(w))&&(D=w.g[D.toString()],w=-1,D&&(w=Re(D,U,$,ue)),(U=w>-1?D[w]:null)&&be(U))}function be(w){if(typeof w!="number"&&w&&!w.da){var D=w.src;if(D&&D[ee])we(D.i,w);else{var U=w.type,$=w.proxy;D.removeEventListener?D.removeEventListener(U,$,w.capture):D.detachEvent?D.detachEvent(ve(U),$):D.addListener&&D.removeListener&&D.removeListener($),(U=xe(D))?(we(U,w),U.h==0&&(U.src=null,D[de]=null)):j(w)}}}function ve(w){return w in Ge?Ge[w]:Ge[w]="on"+w}function Le(w,D){if(w.da)w=!0;else{D=new W(D,this);const U=w.listener,$=w.ha||w.src;w.fa&&be(w),w=U.call($,D)}return w}function xe(w){return w=w[de],w instanceof ae?w:null}var it="__closure_events_fn_"+(Math.random()*1e9>>>0);function Ye(w){return typeof w=="function"?w:(w[it]||(w[it]=function(D){return w.handleEvent(D)}),w[it])}function G(){N.call(this),this.i=new ae(this),this.M=this,this.G=null}d(G,N),G.prototype[ee]=!0,G.prototype.removeEventListener=function(w,D,U,$){Q(this,w,D,U,$)};function H(w,D){var U,$=w.G;if($)for(U=[];$;$=$.G)U.push($);
4792if(w=w.M,$=D.type||D,typeof D=="string")D=new O(D,w);else if(D instanceof O)D.target=D.target||w;else{var ue=D;D=new O($,w),te(D,ue)}ue=!0;let pe,Be;if(U)for(Be=U.length-1;Be>=0;Be--)pe=D.g=U[Be],ue=le(pe,$,!0,D)&&ue;if(pe=D.g=w,ue=le(pe,$,!0,D)&&ue,ue=le(pe,$,!1,D)&&ue,U)for(Be=0;Be<U.length;Be++)pe=D.g=U[Be],ue=le(pe,$,!1,D)&&ue}G.prototype.N=function(){if(G.Z.N.call(this),this.i){var w=this.i;for(const D in w.g){const U=w.g[D];for(let $=0;$<U.length;$++)j(U[$]);delete w.g[D],w.h--}}this.G=null},G.prototype.J=function(w,D,U,$){return this.i.add(String(w),D,!1,U,$)},G.prototype.K=function(w,D,U,$){return this.i.add(String(w),D,!0,U,$)};function le(w,D,U,$){if(D=w.i.g[String(D)],!D)return!0;D=D.concat();let ue=!0;for(let pe=0;pe<D.length;++pe){const Be=D[pe];if(Be&&!Be.da&&Be.capture==U){const jt=Be.listener,$n=Be.ha||Be.src;Be.fa&&we(w.i,Be),ue=jt.call($n,$)!==!1&&ue}}return ue&&!$.defaultPrevented}function Ne(w,D){if(typeof w!="function")if(w&&typeof w.handleEvent=="function")w=c(w.handleEvent,w);else throw Error("Invalid listener argument");return Number(D)>2147483647?-1:o.setTimeout(w,D||0)}function Ae(w){w.g=Ne(()=>{w.g=null,w.i&&(w.i=!1,Ae(w))},w.l);const D=w.h;w.h=null,w.m.apply(null,D)}class Ce extends N{constructor(D,U){super(),this.m=D,this.l=U,this.h=null,this.i=!1,this.g=null}j(D){this.h=arguments,this.g?this.i=!0:Ae(this)}N(){super.N(),this.g&&(o.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function st(w){N.call(this),this.h=w,this.g={}}d(st,N);var Ve=[];function Qe(w){z(w.g,function(D,U){this.g.hasOwnProperty(U)&&be(D)},w),w.g={}}st.prototype.N=function(){st.Z.N.call(this),Qe(this)},st.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var xt=o.JSON.stringify,Ft=o.JSON.parse,Pe=class{stringify(w){return o.JSON.stringify(w,void 0)}parse(w){return o.JSON.parse(w,void 0)}};function rn(){}function zt(){}var Tt={OPEN:"a",hb:"b",ERROR:"c",tb:"d"};function dt(){O.call(this,"d")}d(dt,O);function nt(){O.call(this,"c")}d(nt,O);var _t={},on=null;function bn(){return on=on||new G}_t.Ia="serverreachability";function Bt(w){O.call(this,_t.Ia,w)}d(Bt,O);function je(w){const D=bn();H(D,new Bt(D))}_t.STAT_EVENT="statevent";function ne(w,D){O.call(this,_t.STAT_EVENT,w),this.stat=D}d(ne,O);function ke(w){const D=bn();H(D,new ne(D,w))}_t.Ja="timingevent";function He(w,D){O.call(this,_t.Ja,w),this.size=D}d(He,O);function wt(w,D){if(typeof w!="function")throw Error("Fn must not be null and must be a function");return o.setTimeout(function(){w()},D)}function Ie(){this.g=!0}Ie.prototype.ua=function(){this.g=!1};function gt(w,D,U,$,ue,pe){w.info(function(){if(w.g)if(pe){var Be="",jt=pe.split("&");for(let xn=0;xn<jt.length;xn++){var $n=jt[xn].split("=");if($n.length>1){const En=$n[0];$n=$n[1];const Jn=En.split("_");Be=Jn.length>=2&&Jn[1]=="type"?Be+(En+"="+$n+"&"):Be+(En+"=redacted&")}}}else Be=null;else Be=pe;return"XMLHTTP REQ ("+$+") [attempt "+ue+"]: "+D+` 4793`+U+` 4794`+Be})}function bt(w,D,U,$,ue,pe,Be){w.info(function(){return"XMLHTTP RESP ("+$+") [ attempt "+ue+"]: "+D+` 4795`+U+` 4796`+pe+" "+Be})}function Jt(w,D,U,$){w.info(function(){return"XMLHTTP TEXT ("+D+"): "+tn(w,U)+($?" "+$:"")})}function vn(w,D){w.info(function(){return"TIMEOUT: "+D})}Ie.prototype.info=function(){};function tn(w,D){if(!w.g)return D;if(!D)return null;try{const pe=JSON.parse(D);if(pe){for(w=0;w<pe.length;w++)if(Array.isArray(pe[w])){var U=pe[w];if(!(U.length<2)){var $=U[1];if(Array.isArray($)&&!($.length<1)){var ue=$[0];if(ue!="noop"&&ue!="stop"&&ue!="close")for(let Be=1;Be<$.length;Be++)$[Be]=""}}}}return xt(pe)}catch{return D}}var Mn={NO_ERROR:0,cb:1,qb:2,pb:3,kb:4,ob:5,rb:6,Ga:7,TIMEOUT:8,ub:9},Ln={ib:"complete",Fb:"success",ERROR:"error",Ga:"abort",xb:"ready",yb:"readystatechange",TIMEOUT:"timeout",sb:"incrementaldata",wb:"progress",lb:"downloadprogress",Nb:"uploadprogress"},ei;function ja(){}d(ja,rn),ja.prototype.g=function(){return new XMLHttpRequest},ei=new ja;function Ks(w){return encodeURIComponent(String(w))}function oa(w){var D=1;w=w.split(":");const U=[];for(;D>0&&w.length;)U.push(w.shift()),D--;return w.length&&U.push(w.join(":")),U}function Fi(w,D,U,$){this.j=w,this.i=D,this.l=U,this.S=$||1,this.V=new st(this),this.H=45e3,this.J=null,this.o=!1,this.u=this.B=this.A=this.M=this.F=this.T=this.D=null,this.G=[],this.g=null,this.C=0,this.m=this.v=null,this.X=-1,this.K=!1,this.P=0,this.O=null,this.W=this.L=this.U=this.R=!1,this.h=new du}function du(){this.i=null,this.g="",this.h=!1}var hu={},fu={};function pu(w,D,U){w.M=1,w.A=Ui(pn(D)),w.u=U,w.R=!0,Xd(w,null)}function Xd(w,D){w.F=Date.now(),ge(w),w.B=pn(w.A);var U=w.B,$=w.S;Array.isArray($)||($=[String($)]),Qd(U.i,"t",$),w.C=0,U=w.j.L,w.h=new du,w.g=eo(w.j,U?D:null,!w.u),w.P>0&&(w.O=new Ce(c(w.Y,w,w.g),w.P)),D=w.V,U=w.g,$=w.ba;var ue="readystatechange";Array.isArray(ue)||(ue&&(Ve[0]=ue.toString()),ue=Ve);for(let pe=0;pe<ue.length;pe++){const Be=$e(U,ue[pe],$||D.handleEvent,!1,D.h||D);if(!Be)break;D.g[Be.key]=Be}D=w.J?Z(w.J):{},w.u?(w.v||(w.v="POST"),D["Content-Type"]="application/x-www-form-urlencoded",w.g.ea(w.B,w.v,w.u,D)):(w.v="GET",w.g.ea(w.B,w.v,null,D)),je(),gt(w.i,w.v,w.B,w.l,w.S,w.u)}
4796Fi.prototype.ba=function(w){w=w.target;const D=this.O;D&&As(w)==3?D.j():this.Y(w)},Fi.prototype.Y=function(w){try{if(w==this.g)e:{const jt=As(this.g),$n=this.g.ya(),xn=this.g.ca();if(!(jt<3)&&(jt!=3||this.g&&(this.h.h||this.g.la()||nh(this.g)))){this.K||jt!=4||$n==7||($n==8||xn<=0?je(3):je(2)),Ze(this);var D=this.g.ca();this.X=D;var U=X(this);if(this.o=D==200,bt(this.i,this.v,this.B,this.l,this.S,jt,D),this.o){if(this.U&&!this.L){t:{if(this.g){var $,ue=this.g;if(($=ue.g?ue.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!B($)){var pe=$;break t}}pe=null}if(w=pe)Jt(this.i,this.l,w,"Initial handshake response via X-HTTP-Initial-Response"),this.L=!0,At(this,w);else{this.o=!1,this.m=3,ke(12),yt(this),ht(this);break e}}if(this.R){w=!0;let En;for(;!this.K&&this.C<U.length;)if(En=me(this,U),En==fu){jt==4&&(this.m=4,ke(14),w=!1),Jt(this.i,this.l,null,"[Incomplete Response]");break}else if(En==hu){this.m=4,ke(15),Jt(this.i,this.l,U,"[Invalid Chunk]"),w=!1;break}else Jt(this.i,this.l,En,null),At(this,En);if(ce(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),jt!=4||U.length!=0||this.h.h||(this.m=1,ke(16),w=!1),this.o=this.o&&w,!w)Jt(this.i,this.l,U,"[Invalid Chunked Response]"),yt(this),ht(this);else if(U.length>0&&!this.W){this.W=!0;var Be=this.j;Be.g==this&&Be.aa&&!Be.P&&(Be.j.info("Great, no buffering proxy detected. Bytes received: "+U.length),xu(Be),Be.P=!0,ke(11))}}else Jt(this.i,this.l,U,null),At(this,U);jt==4&&yt(this),this.o&&!this.K&&(jt==4?Vi(this.j,this):(this.o=!1,ge(this)))}else Ov(this.g),D==400&&U.indexOf("Unknown SID")>0?(this.m=3,ke(12)):(this.m=0,ke(13)),yt(this),ht(this)}}}catch{}finally{}};function X(w){if(!ce(w))return w.g.la();const D=nh(w.g);if(D==="")return"";let U="";const $=D.length,ue=As(w.g)==4;if(!w.h.i){if(typeof TextDecoder>"u")return yt(w),ht(w),"";w.h.i=new o.TextDecoder}for(let pe=0;pe<$;pe++)w.h.h=!0,U+=w.h.i.decode(D[pe],{stream:!(ue&&pe==$-1)});return D.length=0,w.h.g+=U,w.C=0,w.h.g}function ce(w){return w.g?w.v=="GET"&&w.M!=2&&w.j.Aa:!1}function me(w,D){var U=w.C,$=D.indexOf(` 4797`,U);return $==-1?fu:(U=Number(D.substring(U,$)),isNaN(U)?hu:($+=1,$+U>D.length?fu:(D=D.slice($,$+U),w.C=$+U,D)))}Fi.prototype.cancel=function(){this.K=!0,yt(this)};function ge(w){w.T=Date.now()+w.H,fe(w,w.H)}function fe(w,D){if(w.D!=null)throw Error("WatchDog timer not null");w.D=wt(c(w.aa,w),D)}function Ze(w){w.D&&(o.clearTimeout(w.D),w.D=null)}Fi.prototype.aa=function(){this.D=null;const w=Date.now();w-this.T>=0?(vn(this.i,this.B),this.M!=2&&(je(),ke(17)),yt(this),this.m=2,ht(this)):fe(this,this.T-w)};function ht(w){w.j.I==0||w.K||Vi(w.j,w)}function yt(w){Ze(w);var D=w.O;D&&typeof D.dispose=="function"&&D.dispose(),w.O=null,Qe(w.V),w.g&&(D=w.g,w.g=null,D.abort(),D.dispose())}function At(w,D){try{var U=w.j;if(U.I!=0&&(U.g==w||pr(U.h,w))){if(!w.L&&pr(U.h,w)&&U.I==3){try{var $=U.Ba.g.parse(D)}catch{$=null}if(Array.isArray($)&&$.length==3){var ue=$;if(ue[0]==0){e:if(!U.v){if(U.g)if(U.g.F+3e3<w.F)Mo(U),za(U);else break e;oh(U),ke(18)}}else U.xa=ue[1],0<U.xa-U.K&&ue[2]<37500&&U.F&&U.A==0&&!U.C&&(U.C=wt(c(U.Va,U),6e3));kn(U.h)<=1&&U.ta&&(U.ta=void 0)}else pi(U,11)}else if((w.L||U.g==w)&&Mo(U),!B(D))for(ue=U.Ba.g.parse(D),D=0;D<ue.length;D++){let xn=ue[D];const En=xn[0];if(!(En<=U.K))if(U.K=En,xn=xn[1],U.I==2)if(xn[0]=="c"){U.M=xn[1],U.ba=xn[2];const Jn=xn[3];Jn!=null&&(U.ka=Jn,U.j.info("VER="+U.ka));const ji=xn[4];ji!=null&&(U.za=ji,U.j.info("SVER="+U.za));const Gr=xn[5];Gr!=null&&typeof Gr=="number"&&Gr>0&&($=1.5*Gr,U.O=$,U.j.info("backChannelRequestTimeoutMs_="+$)),$=U;const Wr=w.g;if(Wr){const to=Wr.g?Wr.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(to){var pe=$.h;pe.g||to.indexOf("spdy")==-1&&to.indexOf("quic")==-1&&to.indexOf("h2")==-1||(pe.j=pe.l,pe.g=new Set,pe.h&&(Rn(pe,pe.h),pe.h=null))}if($.G){const ch=Wr.g?Wr.g.getResponseHeader("X-HTTP-Session-Id"):null;ch&&($.wa=ch,Vt($.J,$.G,ch))}}U.I=3,U.l&&U.l.ra(),U.aa&&(U.T=Date.now()-w.F,U.j.info("Handshake RTT: "+U.T+"ms")),$=U;var Be=w;if($.na=Yp($,$.L?$.ba:null,$.W),Be.L){mr($.h,Be);var jt=Be,$n=$.O;$n&&(jt.H=$n),jt.D&&(Ze(jt),ge(jt)),$.g=Be}else sh($);U.i.length>0&&fi(U)}else xn[0]!="stop"&&xn[0]!="close"||pi(U,7);else U.I==3&&(xn[0]=="stop"||xn[0]=="close"?xn[0]=="stop"?pi(U,7):Kp(U):xn[0]!="noop"&&U.l&&U.l.qa(xn),U.A=0)}}je(4)}catch{}}var Ut=class{constructor(w,D){this.g=w,this.map=D}};
4797function Pt(w){this.l=w||10,o.PerformanceNavigationTiming?(w=o.performance.getEntriesByType("navigation"),w=w.length>0&&(w[0].nextHopProtocol=="hq"||w[0].nextHopProtocol=="h2")):w=!!(o.chrome&&o.chrome.loadTimes&&o.chrome.loadTimes()&&o.chrome.loadTimes().wasFetchedViaSpdy),this.j=w?this.l:1,this.g=null,this.j>1&&(this.g=new Set),this.h=null,this.i=[]}function Lt(w){return w.h?!0:w.g?w.g.size>=w.j:!1}function kn(w){return w.h?1:w.g?w.g.size:0}function pr(w,D){return w.h?w.h==D:w.g?w.g.has(D):!1}function Rn(w,D){w.g?w.g.add(D):w.h=D}function mr(w,D){w.h&&w.h==D?w.h=null:w.g&&w.g.has(D)&&w.g.delete(D)}Pt.prototype.cancel=function(){if(this.i=Ct(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const w of this.g.values())w.cancel();this.g.clear()}};function Ct(w){if(w.h!=null)return w.i.concat(w.h.G);if(w.g!=null&&w.g.size!==0){let D=w.i;for(const U of w.g.values())D=D.concat(U.G);return D}return g(w.i)}var ot=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function ss(w,D){if(w){w=w.split("&");for(let U=0;U<w.length;U++){const $=w[U].indexOf("=");let ue,pe=null;$>=0?(ue=w[U].substring(0,$),pe=w[U].substring($+1)):ue=w[U],D(ue,pe?decodeURIComponent(pe.replace(/\+/g," ")):"")}}}function Dt(w){this.g=this.o=this.j="",this.u=null,this.m=this.h="",this.l=!1;let D;w instanceof Dt?(this.l=w.l,di(this,w.j),this.o=w.o,this.g=w.g,Hr(this,w.u),this.h=w.h,ar(this,Jd(w.i)),this.m=w.m):w&&(D=String(w).match(ot))?(this.l=!1,di(this,D[1]||"",!0),this.o=Ys(D[2]||""),this.g=Ys(D[3]||"",!0),Hr(this,D[4]),this.h=Ys(D[5]||"",!0),ar(this,D[6]||"",!0),this.m=Ys(D[7]||"")):(this.l=!1,this.i=new aa(null,this.l))}Dt.prototype.toString=function(){const w=[];var D=this.j;D&&w.push(Qn(D,hi,!0),":");var U=this.g;return(U||D=="file")&&(w.push("//"),(D=this.o)&&w.push(Qn(D,hi,!0),"@"),w.push(Ks(U).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),U=this.u,U!=null&&w.push(":",String(U))),(U=this.h)&&(this.g&&U.charAt(0)!="/"&&w.push("/"),w.push(Qn(U,U.charAt(0)=="/"?US:Kd,!0))),(U=this.i.toString())&&w.push("?",U),(U=this.m)&&w.push("#",Qn(U,Yd)),w.join("")},Dt.prototype.resolve=function(w){const D=pn(this);let U=!!w.j;U?di(D,w.j):U=!!w.o,U?D.o=w.o:U=!!w.g,U?D.g=w.g:U=w.u!=null;var $=w.h;if(U)Hr(D,w.u);else if(U=!!w.h){if($.charAt(0)!="/")if(this.g&&!this.h)$="/"+$;else{var ue=D.h.lastIndexOf("/");ue!=-1&&($=D.h.slice(0,ue+1)+$)}if(ue=$,ue==".."||ue==".")$="";else if(ue.indexOf("./")!=-1||ue.indexOf("/.")!=-1){$=ue.lastIndexOf("/",0)==0,ue=ue.split("/");const pe=[];for(let Be=0;Be<ue.length;){const jt=ue[Be++];jt=="."?$&&Be==ue.length&&pe.push(""):jt==".."?((pe.length>1||pe.length==1&&pe[0]!="")&&pe.pop(),$&&Be==ue.length&&pe.push("")):(pe.push(jt),$=!0)}$=pe.join("/")}else $=ue}return U?D.h=$:U=w.i.toString()!=="",U?ar(D,Jd(w.i)):U=!!w.m,U&&(D.m=w.m),D};function pn(w){return new Dt(w)}function di(w,D,U){w.j=U?Ys(D,!0):D,w.j&&(w.j=w.j.replace(/:$/,""))}function Hr(w,D){if(D){if(D=Number(D),isNaN(D)||D<0)throw Error("Bad port number "+D);w.u=D}else w.u=null}function ar(w,D,U){D instanceof aa?(w.i=D,jS(w.i,w.l)):(U||(D=Qn(D,VS)),w.i=new aa(D,w.l))}function Vt(w,D,U){w.i.set(D,U)}function Ui(w){return Vt(w,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^Date.now()).toString(36)),w}function Ys(w,D){return w?D?decodeURI(w.replace(/%25/g,"%2525")):decodeURIComponent(w):""}function Qn(w,D,U){return typeof w=="string"?(w=encodeURI(w).replace(D,Pl),U&&(w=w.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),w):null}function Pl(w){return w=w.charCodeAt(0),"%"+(w>>4&15).toString(16)+(w&15).toString(16)}var hi=/[#\/\?@]/g,Kd=/[#\?:]/g,US=/[#\?]/g,VS=/[#\?@]/g,Yd=/#/g;function aa(w,D){this.h=this.g=null,this.i=w||null,this.j=!!D}function Ts(w){w.g||(w.g=new Map,w.h=0,w.i&&ss(w.i,function(D,U){w.add(decodeURIComponent(D.replace(/\+/g," ")),U)}))}n=aa.prototype,n.add=function(w,D){Ts(this),this.i=null,w=Qs(this,w);let U=this.g.get(w);return U||this.g.set(w,U=[]),U.push(D),this.h+=1,this};function mu(w,D){Ts(w),D=Qs(w,D),w.g.has(D)&&(w.i=null,w.h-=w.g.get(
4797D).length,w.g.delete(D))}function Pv(w,D){return Ts(w),D=Qs(w,D),w.g.has(D)}n.forEach=function(w,D){Ts(this),this.g.forEach(function(U,$){U.forEach(function(ue){w.call(D,ue,$,this)},this)},this)};function Nv(w,D){Ts(w);let U=[];if(typeof D=="string")Pv(w,D)&&(U=U.concat(w.g.get(Qs(w,D))));else for(w=Array.from(w.g.values()),D=0;D<w.length;D++)U=U.concat(w[D]);return U}n.set=function(w,D){return Ts(this),this.i=null,w=Qs(this,w),Pv(this,w)&&(this.h-=this.g.get(w).length),this.g.set(w,[D]),this.h+=1,this},n.get=function(w,D){return w?(w=Nv(this,w),w.length>0?String(w[0]):D):D};function Qd(w,D,U){mu(w,D),U.length>0&&(w.i=null,w.g.set(Qs(w,D),g(U)),w.h+=U.length)}n.toString=function(){if(this.i)return this.i;if(!this.g)return"";const w=[],D=Array.from(this.g.keys());for(let $=0;$<D.length;$++){var U=D[$];const ue=Ks(U);U=Nv(this,U);for(let pe=0;pe<U.length;pe++){let Be=ue;U[pe]!==""&&(Be+="="+Ks(U[pe])),w.push(Be)}}return this.i=w.join("&")};function Jd(w){const D=new aa;return D.i=w.i,w.g&&(D.g=new Map(w.g),D.h=w.h),D}function Qs(w,D){return D=String(D),w.j&&(D=D.toLowerCase()),D}function jS(w,D){D&&!w.j&&(Ts(w),w.i=null,w.g.forEach(function(U,$){const ue=$.toLowerCase();$!=ue&&(mu(this,$),Qd(this,ue,U))},w)),w.j=D}function qp(w,D){const U=new Ie;if(o.Image){const $=new Image;$.onload=u(To,U,"TestLoadImage: loaded",!0,D,$),$.onerror=u(To,U,"TestLoadImage: error",!1,D,$),$.onabort=u(To,U,"TestLoadImage: abort",!1,D,$),$.ontimeout=u(To,U,"TestLoadImage: timeout",!1,D,$),o.setTimeout(function(){$.ontimeout&&$.ontimeout()},1e4),$.src=w}else D(!1)}function dn(w,D){const U=new Ie,$=new AbortController,ue=setTimeout(()=>{$.abort(),To(U,"TestPingServer: timeout",!1,D)},1e4);fetch(w,{signal:$.signal}).then(pe=>{clearTimeout(ue),pe.ok?To(U,"TestPingServer: ok",!0,D):To(U,"TestPingServer: server error",!1,D)}).catch(()=>{clearTimeout(ue),To(U,"TestPingServer: error",!1,D)})}function To(w,D,U,$,ue){try{ue&&(ue.onload=null,ue.onerror=null,ue.onabort=null,ue.ontimeout=null),$(U)}catch{}}function Xp(){this.g=new Pe}function Zd(w){this.i=w.Sb||null,this.h=w.ab||!1}d(Zd,rn),Zd.prototype.g=function(){return new eh(this.i,this.h)};function eh(w,D){G.call(this),this.H=w,this.o=D,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.A=new Headers,this.h=null,this.F="GET",this.D="",this.g=!1,this.B=this.j=this.l=null,this.v=new AbortController}d(eh,G),n=eh.prototype,n.open=function(w,D){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.F=w,this.D=D,this.readyState=1,Ba(this)},n.send=function(w){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");if(this.v.signal.aborted)throw this.abort(),Error("Request was aborted.");this.g=!0;const D={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};w&&(D.body=w),(this.H||o).fetch(new Request(this.D,D)).then(this.Pa.bind(this),this.ga.bind(this))},n.abort=function(){this.response=this.responseText="",this.A=new Headers,this.status=0,this.v.abort(),this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),this.readyState>=1&&this.g&&this.readyState!=4&&(this.g=!1,Gn(this)),this.readyState=0},n.Pa=function(w){if(this.g&&(this.l=w,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=w.headers,this.readyState=2,Ba(this)),this.g&&(this.readyState=3,Ba(this),this.g)))if(this.responseType==="arraybuffer")w.arrayBuffer().then(this.Na.bind(this),this.ga.bind(this));else if(typeof o.ReadableStream<"u"&&"body"in w){if(this.j=w.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.B=new TextDecoder;Iv(this)}else w.text().then(this.Oa.bind(this),this.ga.bind(this))};function Iv(w){w.j.read().then(w.Ma.bind(w)).catch(w.ga.bind(w))}n.Ma=function(w){if(this.g){if(this.o&&w.value)this.response.push(w.value);else if(!this.o){var D=w.value?w.value:new Uint8Array(0);(D=this.B.decode(D,{stream:!w.done}))&&(this.response=this.responseText+=D)}w.done?Gn(this):Ba(this),this.readyState==3&&Iv(this)}},n.Oa=function(w){this.g&&(this.response=this.responseText=w,Gn(this))},n.Na=function(w){this.g&&(this.response=w,Gn(this))},n.ga=function(){this.g&&Gn(this)};function Gn(w){w.readyState=4,w.l=null,w.j=null,w.B=null,Ba(w)}n.setRequestHeader=function(w,D){this.A.append(w,D)},n.getResponseHeader=function(w){return this.h&&this.h.get(w.toLowerCase())||""},n.getAllResponseHeaders=function(){if(!this.h)return"";const w=[],D=this.h.entries();for(var U=D.next();!U.done;)U=U.value,w.push(U[0]+": "+U[1]),U=D.next();return w.join(`\r 4798`)};function Ba(w){w.onreadystatechange&&w.onreadystatechange.call(w)}Object.defineProperty(eh.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(w){this.m=w?"include":"same-origin"}});function Lv(w){let D="";return z(w,function(U,$){D+=$,D+=":",D+=U,D+=`\r 4799`}),D}function gu(w,D,U){e:{for($ in U){var $=!1;break e}$=!0}$||(U=Lv(U),typeof w=="string"?U!=null&&Ks(U):Vt(w,D,U))}function Wn(w){G.call(this),this.headers=new Map,this.L=w||null,this.h=!1,this.g=null,this.D="",this.o=0,this.l="",this.j=this.B=this.v=this.A=!1,this.m=null,this.F="",this.H=!1}d(Wn,G);var th=/^https?$/i,Js=["POST","PUT"];n=Wn.prototype,n.Fa=function(w){this.H=w},n.ea=function(w,D,U,$){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+w);D=D?D.toUpperCase():"GET",this.D=w,this.l="",this.o=0,this.A=!1,this.h=!0,this.g=this.L?this.L.g():ei.g(),this.g.onreadystatechange=m(c(this.Ca,this));try{this.B=!0,this.g.open(D,String(w),!0),this.B=!1}catch(pe){Dv(this,pe);return}if(w=U||"",U=new Map(this.headers),$)if(Object.getPrototypeOf($)===Object.prototype)for(var ue in $)U.set(ue,$[ue]);else if(typeof $.keys=="function"&&typeof $.get=="function")for(const pe of $.keys())U.set(pe,$.get(pe));else throw Error("Unknown input type for opt_headers: "+String($));$=Array.from(U.keys()).find(pe=>pe.toLowerCase()=="content-type"),ue=o.FormData&&w instanceof o.FormData,!(Array.prototype.indexOf.call(Js,D,void 0)>=0)||$||ue||U.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[pe,Be]of U)this.g.setRequestHeader(pe,Be);this.F&&(this.g.responseType=this.F),"withCredentials"in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&(clearTimeout(this.m),this.m=null),this.v=!0,this.g.send(w),this.v=!1}catch(pe){Dv(this,pe)}};function Dv(w,D){w.h=!1,w.g&&(w.j=!0,w.g.abort(),w.j=!1),w.l=D,w.o=5,kv(w),os(w)}function kv(w){w.A||(w.A=!0,H(w,"complete"),H(w,"error"))}n.abort=function(w){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=w||7,H(this,"complete"),H(this,"abort"),os(this))},n.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),os(this,!0)),Wn.Z.N.call(this)}
vendor: 5,994 bytes, lines 4799-4800
4799,n.Ca=function(){this.u||(this.B||this.v||this.j?Ms(this):this.Xa())},n.Xa=function(){Ms(this)};function Ms(w){if(w.h&&typeof s<"u"){if(w.v&&As(w)==4)setTimeout(w.Ca.bind(w),0);else if(H(w,"readystatechange"),As(w)==4){w.h=!1;try{const pe=w.ca();e:switch(pe){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var D=!0;break e;default:D=!1}var U;if(!(U=D)){var $;if($=pe===0){let Be=String(w.D).match(ot)[1]||null;!Be&&o.self&&o.self.location&&(Be=o.self.location.protocol.slice(0,-1)),$=!th.test(Be?Be.toLowerCase():"")}U=$}if(U)H(w,"complete"),H(w,"success");else{w.o=6;try{var ue=As(w)>2?w.g.statusText:""}catch{ue=""}w.l=ue+" ["+w.ca()+"]",kv(w)}}finally{os(w)}}}}function os(w,D){if(w.g){w.m&&(clearTimeout(w.m),w.m=null);const U=w.g;w.g=null,D||H(w,"ready");try{U.onreadystatechange=null}catch{}}}n.isActive=function(){return!!this.g};function As(w){return w.g?w.g.readyState:0}n.ca=function(){try{return As(this)>2?this.g.status:-1}catch{return-1}},n.la=function(){try{return this.g?this.g.responseText:""}catch{return""}},n.La=function(w){if(this.g){var D=this.g.responseText;return w&&D.indexOf(w)==0&&(D=D.substring(w.length)),Ft(D)}};function nh(w){try{if(!w.g)return null;if("response"in w.g)return w.g.response;switch(w.F){case"":case"text":return w.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in w.g)return w.g.mozResponseArrayBuffer}return null}catch{return null}}function Ov(w){const D={};w=(w.g&&As(w)>=2&&w.g.getAllResponseHeaders()||"").split(`\r 4800`);for(let $=0;$<w.length;$++){if(B(w[$]))continue;var U=oa(w[$]);const ue=U[0];if(U=U[1],typeof U!="string")continue;U=U.trim();const pe=D[ue]||[];D[ue]=pe,pe.push(U)}q(D,function($){return $.join(", ")})}n.ya=function(){return this.o},n.Ha=function(){return typeof this.l=="string"?this.l:String(this.l)};function yu(w,D,U){return U&&U.internalChannelParams&&U.internalChannelParams[w]||D}function Cs(w){this.za=0,this.i=[],this.j=new Ie,this.ba=this.na=this.J=this.W=this.g=this.wa=this.G=this.H=this.u=this.U=this.o=null,this.Ya=this.V=0,this.Sa=yu("failFast",!1,w),this.F=this.C=this.v=this.m=this.l=null,this.X=!0,this.xa=this.K=-1,this.Y=this.A=this.D=0,this.Qa=yu("baseRetryDelayMs",5e3,w),this.Za=yu("retryDelaySeedMs",1e4,w),this.Ta=yu("forwardChannelMaxRetries",2,w),this.va=yu("forwardChannelRequestTimeoutMs",2e4,w),this.ma=w&&w.xmlHttpFactory||void 0,this.Ua=w&&w.Rb||void 0,this.Aa=w&&w.useFetchStreams||!1,this.O=void 0,this.L=w&&w.supportsCrossDomainXhr||!1,this.M="",this.h=new Pt(w&&w.concurrentRequestLimit),this.Ba=new Xp,this.S=w&&w.fastHandshake||!1,this.R=w&&w.encodeInitMessageHeaders||!1,this.S&&this.R&&(this.R=!1),this.Ra=w&&w.Pb||!1,w&&w.ua&&this.j.ua(),w&&w.forceLongPolling&&(this.X=!1),this.aa=!this.S&&this.X&&w&&w.detectBufferingProxy||!1,this.ia=void 0,w&&w.longPollingTimeout&&w.longPollingTimeout>0&&(this.ia=w.longPollingTimeout),this.ta=void 0,this.T=0,this.P=!1,this.ja=this.B=null}n=Cs.prototype,n.ka=8,n.I=1,n.connect=function(w,D,U,$){ke(0),this.W=w,this.H=D||{},U&&$!==void 0&&(this.H.OSID=U,this.H.OAID=$),this.F=this.X,this.J=Yp(this,null,this.W),fi(this)};function Kp(w){if(Fv(w),w.I==3){var D=w.V++,U=pn(w.J);if(Vt(U,"SID",w.M),Vt(U,"RID",D),Vt(U,"TYPE","terminate"),Zs(w,U),D=new Fi(w,w.j,D),D.M=2,D.A=Ui(pn(U)),U=!1,o.navigator&&o.navigator.sendBeacon)try{U=o.navigator.sendBeacon(D.A.toString(),"")}catch{}!U&&o.Image&&(new Image().src=D.A,U=!0),U||(D.g=eo(D.j,null),D.g.ea(D.A)),D.F=Date.now(),ge(D)}lh(w)}function za(w){w.g&&(xu(w),w.g.cancel(),w.g=null)}function Fv(w){za(w),w.v&&(o.clearTimeout(w.v),w.v=null),Mo(w),w.h.cancel(),w.m&&(typeof w.m=="number"&&o.clearTimeout(w.m),w.m=null)}function fi(w){if(!Lt(w.h)&&!w.m){w.m=!0;var D=w.Ea;k||P(),L||(k(),L=!0),C.add(D,w),w.D=0}}function rh(w,D){return kn(w.h)>=w.h.j-(w.m?1:0)?!1:w.m?(w.i=D.G.concat(w.i),!0):w.I==1||w.I==2||w.D>=(w.Sa?0:w.Ta)?!1:(w.m=wt(c(w.Ea,w,D),Rs(w,w.D)),w.D++,!0)}n.Ea=function(w){if(this.m)if(this.m=null,this.I==1){if(!w){this.V=Math.floor(Math.random()*1e5),w=this.V++;const ue=new Fi(this,this.j,w);let pe=this.o;if(this.U&&(pe?(pe=Z(pe),te(pe,this.U)):pe=this.U),this.u!==null||this.R||(ue.J=pe,pe=null),this.S)e:{for(var D=0,U=0;U<this.i.length;U++){t:{var $=this.i[U];if("__data__"in $.map&&($=$.map.__data__,typeof $=="string")){$=$.length;break t}$=void 0}if($===void 0)break;if(D+=$,D>4096){D=U;break e}if(D===4096||U===this.i.length-1){D=U+1;break e}}D=1e3}else D=1e3;D=ih(this,ue,D),U=pn(this.J),Vt(U,"RID",w),Vt(U,"CVER",22),this.G&&Vt(U,"X-HTTP-Session-Id",this.G),Zs(this,U),pe&&(this.R?D="headers="+Ks(Lv(pe))+"&"+D:this.u&&gu(U,this.u,pe)),Rn(this.h,ue),this.Ra&&Vt(U,"TYPE","init"),this.S?(Vt(U,"$req",D),Vt(U,"SID","null"),ue.U=!0,pu(ue,U,null)):pu(ue,U,D),this.I=2}}else this.I==3&&(w?vu(this,w):this.i.length==0||Lt(this.h)||vu(this))};function vu(w,D){var U;D?U=D.l:U=w.V++;const $=pn(w.J);Vt($,"SID",w.M),Vt($,"RID",U),Vt($,"AID",w.K),Zs(w,$),w.u&&w.o&&gu($,w.u,w.o),U=new Fi(w,w.j,U,w.D+1),w.u===null&&(U.J=w.o),D&&(w.i=D.G.concat(w.i)),D=ih(w,U,1e3),U.H=Math.round(w.va*.5)+Math.round(w.va*.5*Math.random()),Rn(w.h,U),pu(U,$,D)}function Zs(w,D){w.H&&z(w.H,function(U,$){Vt(D,$,U)}),w.l&&z({},function(U,$){Vt(D,$,U)})}function ih(w,D,U){U=Math.min(w.i.length,U);const $=w.l?c(w.l.Ka,w.l,w):null;e:{var ue=w.i;let jt=-1;for(;;){const $n=["count="+U];jt==-1?U>0?(jt=ue[0].g,$n.push("ofs="+jt)):jt=0:$n.push("ofs="+jt);let xn=!0;for(let En=0;En<U;En++){var pe=ue[En].g;const Jn=ue[En].map;if(pe-=jt,pe<0)jt=Math.max(0,ue[En].g-100),xn=!1;else try{pe="req"+pe+"_"||"";try{var Be=Jn instanceof Map?Jn:Object.entries(Jn);for(const[ji,Gr]of Be){let Wr=Gr;a(Gr)&&(Wr=xt(Gr)),$n.push(pe+ji+"="+encodeURIComponent(Wr))}}catch(ji){throw $n.push(pe+"type="+encodeURIComponent("_badmap")),ji}}catch{$&&$(Jn)}}if(xn){Be=$n.join("&");break e}}Be=void 0}return w=w.i.splice(0,U),D.G=w,Be}function sh(w){if(!w.g&&!w.v){w.Y=1;var D=w.Da;k||P(),L||(k(),L=!0),C.add(D,w),w.A=0}}function oh(w){return w.g||w.v||w.A>=3?!1:(w.Y++,w.v=wt(c(w.Da,w),Rs(w,w.A)),w.A++,!0)}
vendor: 4,261 bytes, line 4800
4800n.Da=function(){if(this.v=null,ah(this),this.aa&&!(this.P||this.g==null||this.T<=0)){var w=4*this.T;this.j.info("BP detection timer enabled: "+w),this.B=wt(c(this.Wa,this),w)}},n.Wa=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.P=!0,ke(10),za(this),ah(this))};function xu(w){w.B!=null&&(o.clearTimeout(w.B),w.B=null)}function ah(w){w.g=new Fi(w,w.j,"rpc",w.Y),w.u===null&&(w.g.J=w.o),w.g.P=0;var D=pn(w.na);Vt(D,"RID","rpc"),Vt(D,"SID",w.M),Vt(D,"AID",w.K),Vt(D,"CI",w.F?"0":"1"),!w.F&&w.ia&&Vt(D,"TO",w.ia),Vt(D,"TYPE","xmlhttp"),Zs(w,D),w.u&&w.o&&gu(D,w.u,w.o),w.O&&(w.g.H=w.O);var U=w.g;w=w.ba,U.M=1,U.A=Ui(pn(D)),U.u=null,U.R=!0,Xd(U,w)}n.Va=function(){this.C!=null&&(this.C=null,za(this),oh(this),ke(19))};function Mo(w){w.C!=null&&(o.clearTimeout(w.C),w.C=null)}function Vi(w,D){var U=null;if(w.g==D){Mo(w),xu(w),w.g=null;var $=2}else if(pr(w.h,D))U=D.G,mr(w.h,D),$=1;else return;if(w.I!=0){if(D.o)if($==1){U=D.u?D.u.length:0,D=Date.now()-D.F;var ue=w.D;$=bn(),H($,new He($,U)),fi(w)}else sh(w);else if(ue=D.m,ue==3||ue==0&&D.X>0||!($==1&&rh(w,D)||$==2&&oh(w)))switch(U&&U.length>0&&(D=w.h,D.i=D.i.concat(U)),ue){case 1:pi(w,5);break;case 4:pi(w,10);break;case 3:pi(w,6);break;default:pi(w,2)}}}function Rs(w,D){let U=w.Qa+Math.floor(Math.random()*w.Za);return w.isActive()||(U*=2),U*D}function pi(w,D){if(w.j.info("Error code "+D),D==2){var U=c(w.bb,w),$=w.Ua;const ue=!$;$=new Dt($||"//www.google.com/images/cleardot.gif"),o.location&&o.location.protocol=="http"||di($,"https"),Ui($),ue?qp($.toString(),U):dn($.toString(),U)}else ke(2);w.I=0,w.l&&w.l.pa(D),lh(w),Fv(w)}n.bb=function(w){w?(this.j.info("Successfully pinged google.com"),ke(2)):(this.j.info("Failed to ping google.com"),ke(1))};function lh(w){if(w.I=0,w.ja=[],w.l){const D=Ct(w.h);(D.length!=0||w.i.length!=0)&&(v(w.ja,D),v(w.ja,w.i),w.h.i.length=0,g(w.i),w.i.length=0),w.l.oa()}}function Yp(w,D,U){var $=U instanceof Dt?pn(U):new Dt(U);if($.g!="")D&&($.g=D+"."+$.g),Hr($,$.u);else{var ue=o.location;$=ue.protocol,D=D?D+"."+ue.hostname:ue.hostname,ue=+ue.port;const pe=new Dt(null);$&&di(pe,$),D&&(pe.g=D),ue&&Hr(pe,ue),U&&(pe.h=U),$=pe}return U=w.G,D=w.wa,U&&D&&Vt($,U,D),Vt($,"VER",w.ka),Zs(w,$),$}function eo(w,D,U){if(D&&!w.L)throw Error("Can't create secondary domain capable XhrIo object.");return D=w.Aa&&!w.ma?new Wn(new Zd({ab:U})):new Wn(w.ma),D.Fa(w.L),D}n.isActive=function(){return!!this.l&&this.l.isActive(this)};function Ao(){}n=Ao.prototype,n.ra=function(){},n.qa=function(){},n.pa=function(){},n.oa=function(){},n.isActive=function(){return!0},n.Ka=function(){};function Ha(){}Ha.prototype.g=function(w,D){return new mi(w,D)};function mi(w,D){G.call(this),this.g=new Cs(D),this.l=w,this.h=D&&D.messageUrlParams||null,w=D&&D.messageHeaders||null,D&&D.clientProtocolHeaderRequired&&(w?w["X-Client-Protocol"]="webchannel":w={"X-Client-Protocol":"webchannel"}),this.g.o=w,w=D&&D.initMessageHeaders||null,D&&D.messageContentType&&(w?w["X-WebChannel-Content-Type"]=D.messageContentType:w={"X-WebChannel-Content-Type":D.messageContentType}),D&&D.sa&&(w?w["X-WebChannel-Client-Profile"]=D.sa:w={"X-WebChannel-Client-Profile":D.sa}),this.g.U=w,(w=D&&D.Qb)&&!B(w)&&(this.g.u=w),this.A=D&&D.supportsCrossDomainXhr||!1,this.v=D&&D.sendRawJson||!1,(D=D&&D.httpSessionIdParam)&&!B(D)&&(this.g.G=D,w=this.h,w!==null&&D in w&&(w=this.h,D in w&&delete w[D])),this.j=new Ga(this)}d(mi,G),mi.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.L=!0),this.g.connect(this.l,this.h||void 0)},mi.prototype.close=function(){Kp(this.g)},mi.prototype.o=function(w){var D=this.g;if(typeof w=="string"){var U={};U.__data__=w,w=U}else this.v&&(U={},U.__data__=xt(w),w=U);D.i.push(new Ut(D.Ya++,w)),D.I==3&&fi(D)},mi.prototype.N=function(){this.g.l=null,delete this.j,Kp(this.g),delete this.g,mi.Z.N.call(this)};function _u(w){dt.call(this),w.__headers__&&(this.headers=w.__headers__,this.statusCode=w.__status__,delete w.__headers__,delete w.__status__);var D=w.__sm__;if(D){e:{for(const U in D){w=U;break e}w=void 0}(this.i=w)&&(w=this.i,D=D!==null&&w in D?D[w]:void 0),this.data=D}else this.data=w}d(_u,dt);function Qp(){nt.call(this),this.status=1}d(Qp,nt);function Ga(w){this.g=w}
4800d(Ga,Ao),Ga.prototype.ra=function(){H(this.g,"a")},Ga.prototype.qa=function(w){H(this.g,new _u(w))},Ga.prototype.pa=function(w){H(this.g,new Qp)},Ga.prototype.oa=function(){H(this.g,"b")},Ha.prototype.createWebChannel=Ha.prototype.g,mi.prototype.send=mi.prototype.o,mi.prototype.open=mi.prototype.m,mi.prototype.close=mi.prototype.close,_G=function(){return new Ha},xG=function(){return bn()},vG=_t,MC={jb:0,mb:1,nb:2,Hb:3,Mb:4,Jb:5,Kb:6,Ib:7,Gb:8,Lb:9,PROXY:10,NOPROXY:11,Eb:12,Ab:13,Bb:14,zb:15,Cb:16,Db:17,fb:18,eb:19,gb:20},Mn.NO_ERROR=0,Mn.TIMEOUT=8,Mn.HTTP_ERROR=6,A_=Mn,Ln.COMPLETE="complete",yG=Ln,zt.EventType=Tt,Tt.OPEN="a",Tt.CLOSE="b",Tt.ERROR="c",Tt.MESSAGE="d",G.prototype.listen=G.prototype.J,Zm=zt,Wn.prototype.listenOnce=Wn.prototype.K,Wn.prototype.getLastError=Wn.prototype.Ha,Wn.prototype.getLastErrorCode=Wn.prototype.ya,Wn.prototype.getStatus=Wn.prototype.ca,Wn.prototype.getResponseJson=Wn.prototype.La,Wn.prototype.getResponseText=Wn.prototype.la,Wn.prototype.send=Wn.prototype.ea,Wn.prototype.setWithCredentials=Wn.prototype.Fa,gG=Wn}).apply(typeof zx<"u"?zx:typeof self<"u"?self:typeof window<"u"?window:{});/** 4801 * @license 4802 * Copyright 2017 Google LLC 4803 * 4804 * Licensed under the Apache License, Version 2.0 (the "License"); 4805 * you may not use this file except in compliance with the License. 4806 * You may obtain a copy of the License at 4807 * 4808 * http://www.apache.org/licenses/LICENSE-2.0 4809 * 4810 * Unless required by applicable law or agreed to in writing, software 4811 * distributed under the License is distributed on an "AS IS" BASIS, 4812 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4813 * See the License for the specific language governing permissions and 4814 * limitations under the License. 4815 */class Ri{constructor(e){this.uid=e}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}Ri.UNAUTHENTICATED=new Ri(null),Ri.GOOGLE_CREDENTIALS=new Ri("google-credentials-uid"),Ri.FIRST_PARTY=new Ri("first-party-uid"),Ri.MOCK_USER=new Ri("mock-user");/** 4816 * @license 4817 * Copyright 2017 Google LLC 4818 * 4819 * Licensed under the Apache License, Version 2.0 (the "License"); 4820 * you may not use this file except in compliance with the License. 4821 * You may obtain a copy of the License at 4822 * 4823 * http://www.apache.org/licenses/LICENSE-2.0 4824 * 4825 * Unless required by applicable law or agreed to in writing, software 4826 * distributed under the License is distributed on an "AS IS" BASIS, 4827 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4828 * See the License for the specific language governing permissions and 4829 * limitations under the License. 4830 */let zp="12.8.0";function m0e(n){zp=n}/** 4831 * @license 4832 * Copyright 2020 Google LLC 4833 * 4834 * Licensed under the Apache License, Version 2.0 (the "License"); 4835 * you may not use this file except in compliance with the License. 4836 * You may obtain a copy of the License at 4837 * 4838 * http://www.apache.org/licenses/LICENSE-2.0 4839 * 4840 * Unless required by applicable law or agreed to in writing, software 4841 * distributed under the License is distributed on an "AS IS" BASIS, 4842 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4843 * See the License for the specific language governing permissions and 4844 * limitations under the License. 4845 *//** 4846 * @license 4847 * Copyright 2017 Google LLC 4848 * 4849 * Licensed under the Apache License, Version 2.0 (the "License"); 4850 * you may not use this file except in compliance with the License. 4851 * You may obtain a copy of the License at 4852 * 4853 * http://www.apache.org/licenses/LICENSE-2.0 4854 * 4855 * Unless required by applicable law or agreed to in writing, software 4856 * distributed under the License is distributed on an "AS IS" BASIS, 4857 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4858 * See the License for the specific language governing permissions and 4859 * limitations under the License. 4860 */const Nd=new cG("@firebase/firestore");function qh(){return Nd.logLevel}function at(n,...e){if(Nd.logLevel<=fn.DEBUG){const t=e.map(rN);Nd.debug(`Firestore (${zp}): ${n}`,...t)}}function Tl(n,...e){if(Nd.logLevel<=fn.ERROR){const t=e.map(rN);Nd.error(`Firestore (${zp}): ${n}`,...t)}}function hp(n,...e){if(Nd.logLevel<=fn.WARN){const t=e.map(rN);Nd.warn(`Firestore (${zp}): ${n}`,...t)}}function rN(n){if(typeof n=="string")return n;try{return function(t){return JSON.stringify(t)}(n)}catch{return n}}/** 4861 * @license 4862 * Copyright 2017 Google LLC 4863 * 4864 * Licensed under the Apache License, Version 2.0 (the "License");
4865 * you may not use this file except in compliance with the License. 4866 * You may obtain a copy of the License at 4867 * 4868 * http://www.apache.org/licenses/LICENSE-2.0 4869 * 4870 * Unless required by applicable law or agreed to in writing, software 4871 * distributed under the License is distributed on an "AS IS" BASIS, 4872 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4873 * See the License for the specific language governing permissions and 4874 * limitations under the License. 4875 */function It(n,e,t){let r="Unexpected state";typeof e=="string"?r=e:t=e,wG(n,r,t)}function wG(n,e,t){let r=`FIRESTORE (${zp}) INTERNAL ASSERTION FAILED: ${e} (ID: ${n.toString(16)})`;if(t!==void 0)try{r+=" CONTEXT: "+JSON.stringify(t)}catch{r+=" CONTEXT: "+t}throw Tl(r),new Error(r)}function Cn(n,e,t,r){let i="Unexpected state";typeof t=="string"?i=t:r=t,n||wG(e,i,r)}function Gt(n,e){return n}/** 4876 * @license 4877 * Copyright 2017 Google LLC 4878 * 4879 * Licensed under the Apache License, Version 2.0 (the "License"); 4880 * you may not use this file except in compliance with the License. 4881 * You may obtain a copy of the License at 4882 * 4883 * http://www.apache.org/licenses/LICENSE-2.0 4884 * 4885 * Unless required by applicable law or agreed to in writing, software 4886 * distributed under the License is distributed on an "AS IS" BASIS, 4887 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4888 * See the License for the specific language governing permissions and 4889 * limitations under the License. 4890 */const Ee={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class rt extends Bp{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** 4891 * @license 4892 * Copyright 2017 Google LLC 4893 * 4894 * Licensed under the Apache License, Version 2.0 (the "License"); 4895 * you may not use this file except in compliance with the License. 4896 * You may obtain a copy of the License at 4897 * 4898 * http://www.apache.org/licenses/LICENSE-2.0 4899 * 4900 * Unless required by applicable law or agreed to in writing, software 4901 * distributed under the License is distributed on an "AS IS" BASIS, 4902 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4903 * See the License for the specific language governing permissions and 4904 * limitations under the License. 4905 */class Nc{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}/** 4906 * @license 4907 * Copyright 2017 Google LLC 4908 * 4909 * Licensed under the Apache License, Version 2.0 (the "License"); 4910 * you may not use this file except in compliance with the License. 4911 * You may obtain a copy of the License at 4912 * 4913 * http://www.apache.org/licenses/LICENSE-2.0 4914 * 4915 * Unless required by applicable law or agreed to in writing, software 4916 * distributed under the License is distributed on an "AS IS" BASIS, 4917 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4918 * See the License for the specific language governing permissions and 4919 * limitations under the License. 4920 */class SG{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class g0e{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(Ri.UNAUTHENTICATED))}shutdown(){}}class y0e{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class v0e{constructor(e){this.t=e,this.currentUser=Ri.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){Cn(this.o===void 0,42304);let r=this.i;const i=l=>this.i!==r?(r=this.i,t(l)):Promise.resolve();let s=new Nc;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new Nc,e.enqueueRetryable(()=>i(this.currentUser))};const o=()=>{const l=s;e.enqueueRetryable(async()=>{await l.promise,await i(this.currentUser)})},a=l=>{at("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=l,this.o&&(this.auth.addAuthTokenListener(this.o),o())};this.t.onInit(l=>a(l)),setTimeout(()=>{if(!this.auth){const l=this.t.getImmediate({optional:!0});l?a(l):(at("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new Nc)}},0),o()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(r=>this.i!==e?(at("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(Cn(typeof r.accessToken=="string",31837,{l:r}),new SG(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const e=this.auth&&this.auth.getUid();return Cn(e===null||typeof e=="string",2055,{h:e}),new Ri(e)}}class x0e{constructor(e,t,r){this.P=e,this.T=t,this.I=r,this.type="FirstParty",this.user=Ri.FIRST_PARTY,this.R=new Map}A(){return this.I?this.I():null}get headers(){this.R.set("X-Goog-AuthUser",this.P);const e=this.A();return e&&this.R.set("Authorization",e),this.T&&this.R.set("X-Goog-Iam-Authorization-Token",this.T),this.R}}class _0e{constructor(e,t,r){this.P=e,this.T=t,this.I=r}getToken(){return Promise.resolve(new x0e(this.P,this.T,this.I))}start(e,t){e.enqueueRetryable(()=>t(Ri.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class qO{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class w0e{constructor(e,t){this.V=t,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,e0e(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,t){Cn(this.o===void 0,3512);const r=s=>{s.error!=null&&at("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.m;return this.m=s.token,at("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?t(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable(()=>r(s))};const i=s=>{at("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit(s=>i(s)),setTimeout(()=>{if(!this.appCheck){const s=this.V.getImmediate({optional:!0});s?i(s):at("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){if(this.p)return Promise.resolve(new qO(this.p));const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(t=>t?(Cn(typeof t.token=="string",44558,{tokenResult:t}),this.m=t.token,new qO(t.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}/** 4921 * @license 4922 * Copyright 2020 Google LLC 4923 * 4924 * Licensed under the Apache License, Version 2.0 (the "License");
4925 * you may not use this file except in compliance with the License. 4926 * You may obtain a copy of the License at 4927 * 4928 * http://www.apache.org/licenses/LICENSE-2.0 4929 * 4930 * Unless required by applicable law or agreed to in writing, software 4931 * distributed under the License is distributed on an "AS IS" BASIS, 4932 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4933 * See the License for the specific language governing permissions and 4934 * limitations under the License. 4935 */function S0e(n){const e=typeof self<"u"&&(self.crypto||self.msCrypto),t=new Uint8Array(n);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<n;r++)t[r]=Math.floor(256*Math.random());return t}/** 4936 * @license 4937 * Copyright 2017 Google LLC 4938 * 4939 * Licensed under the Apache License, Version 2.0 (the "License"); 4940 * you may not use this file except in compliance with the License. 4941 * You may obtain a copy of the License at 4942 * 4943 * http://www.apache.org/licenses/LICENSE-2.0 4944 * 4945 * Unless required by applicable law or agreed to in writing, software 4946 * distributed under the License is distributed on an "AS IS" BASIS, 4947 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4948 * See the License for the specific language governing permissions and 4949 * limitations under the License. 4950 */class iN{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=62*Math.floor(4.129032258064516);let r="";for(;r.length<20;){const i=S0e(40);for(let s=0;s<i.length;++s)r.length<20&&i[s]<t&&(r+=e.charAt(i[s]%62))}return r}}function cn(n,e){return n<e?-1:n>e?1:0}function AC(n,e){const t=Math.min(n.length,e.length);for(let r=0;r<t;r++){const i=n.charAt(r),s=e.charAt(r);if(i!==s)return VT(i)===VT(s)?cn(i,s):VT(i)?1:-1}return cn(n.length,e.length)}const b0e=55296,E0e=57343;function VT(n){const e=n.charCodeAt(0);return e>=b0e&&e<=E0e}function fp(n,e,t){return n.length===e.length&&n.every((r,i)=>t(r,e[i]))}/** 4951 * @license 4952 * Copyright 2017 Google LLC 4953 * 4954 * Licensed under the Apache License, Version 2.0 (the "License"); 4955 * you may not use this file except in compliance with the License. 4956 * You may obtain a copy of the License at 4957 * 4958 * http://www.apache.org/licenses/LICENSE-2.0 4959 * 4960 * Unless required by applicable law or agreed to in writing, software 4961 * distributed under the License is distributed on an "AS IS" BASIS, 4962 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4963 * See the License for the specific language governing permissions and 4964 * limitations under the License. 4965 */const XO="__name__";class fa{constructor(e,t,r){t===void 0?t=0:t>e.length&&It(637,{offset:t,range:e.length}),r===void 0?r=e.length-t:r>e.length-t&&It(1746,{length:r,range:e.length-t}),this.segments=e,this.offset=t,this.len=r}get length(){return this.len}isEqual(e){return fa.comparator(this,e)===0}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof fa?e.forEach(r=>{t.push(r)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,r=this.limit();t<r;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){const r=Math.min(e.length,t.length);for(let i=0;i<r;i++){const s=fa.compareSegments(e.get(i),t.get(i));if(s!==0)return s}return cn(e.length,t.length)}static compareSegments(e,t){const r=fa.isNumericId(e),i=fa.isNumericId(t);return r&&!i?-1:!r&&i?1:r&&i?fa.extractNumericId(e).compare(fa.extractNumericId(t)):AC(e,t)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return Pc.fromString(e.substring(4,e.length-2))}}class Fn extends fa{construct(e,t,r){return new Fn(e,t,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}
vendor: 5,036 bytes, lines 4965-4999
4965toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const t=[];for(const r of e){if(r.indexOf("//")>=0)throw new rt(Ee.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);t.push(...r.split("/").filter(i=>i.length>0))}return new Fn(t)}static emptyPath(){return new Fn([])}}const T0e=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class oi extends fa{construct(e,t,r){return new oi(e,t,r)}static isValidIdentifier(e){return T0e.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),oi.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)===XO}static keyField(){return new oi([XO])}static fromServerFormat(e){const t=[];let r="",i=0;const s=()=>{if(r.length===0)throw new rt(Ee.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(r),r=""};let o=!1;for(;i<e.length;){const a=e[i];if(a==="\\"){if(i+1===e.length)throw new rt(Ee.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const l=e[i+1];if(l!=="\\"&&l!=="."&&l!=="`")throw new rt(Ee.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=l,i+=2}else a==="`"?(o=!o,i++):a!=="."||o?(r+=a,i++):(s(),i++)}if(s(),o)throw new rt(Ee.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new oi(t)}static emptyPath(){return new oi([])}}/** 4966 * @license 4967 * Copyright 2017 Google LLC 4968 * 4969 * Licensed under the Apache License, Version 2.0 (the "License"); 4970 * you may not use this file except in compliance with the License. 4971 * You may obtain a copy of the License at 4972 * 4973 * http://www.apache.org/licenses/LICENSE-2.0 4974 * 4975 * Unless required by applicable law or agreed to in writing, software 4976 * distributed under the License is distributed on an "AS IS" BASIS, 4977 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4978 * See the License for the specific language governing permissions and 4979 * limitations under the License. 4980 */class Mt{constructor(e){this.path=e}static fromPath(e){return new Mt(Fn.fromString(e))}static fromName(e){return new Mt(Fn.fromString(e).popFirst(5))}static empty(){return new Mt(Fn.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&Fn.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,t){return Fn.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new Mt(new Fn(e.slice()))}}/** 4981 * @license 4982 * Copyright 2017 Google LLC 4983 * 4984 * Licensed under the Apache License, Version 2.0 (the "License"); 4985 * you may not use this file except in compliance with the License. 4986 * You may obtain a copy of the License at 4987 * 4988 * http://www.apache.org/licenses/LICENSE-2.0 4989 * 4990 * Unless required by applicable law or agreed to in writing, software 4991 * distributed under the License is distributed on an "AS IS" BASIS, 4992 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4993 * See the License for the specific language governing permissions and 4994 * limitations under the License. 4995 */function bG(n,e,t){if(!t)throw new rt(Ee.INVALID_ARGUMENT,`Function ${n}() cannot be called with an empty ${e}.`)}function M0e(n,e,t,r){if(e===!0&&r===!0)throw new rt(Ee.INVALID_ARGUMENT,`${n} and ${t} cannot be used together.`)}function KO(n){if(!Mt.isDocumentKey(n))throw new rt(Ee.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${n} has ${n.length}.`)}function YO(n){if(Mt.isDocumentKey(n))throw new rt(Ee.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${n} has ${n.length}.`)}function EG(n){return typeof n=="object"&&n!==null&&(Object.getPrototypeOf(n)===Object.prototype||Object.getPrototypeOf(n)===null)}function mS(n){if(n===void 0)return"undefined";if(n===null)return"null";if(typeof n=="string")return n.length>20&&(n=`${n.substring(0,20)}...`),JSON.stringify(n);if(typeof n=="number"||typeof n=="boolean")return""+n;if(typeof n=="object"){if(n instanceof Array)return"an array";{const e=function(r){return r.constructor?r.constructor.name:null}(n);return e?`a custom ${e} object`:"an object"}}return typeof n=="function"?"a function":It(12329,{type:typeof n})}function Id(n,e){if("_delegate"in n&&(n=n._delegate),!(n instanceof e)){if(e.name===n.constructor.name)throw new rt(Ee.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const t=mS(n);throw new rt(Ee.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${t}`)}}return n}/** 4996 * @license 4997 * Copyright 2025 Google LLC 4998 * 4999 * Licensed under the Apache License, Version 2.0 (the "License");
5000 * you may not use this file except in compliance with the License. 5001 * You may obtain a copy of the License at 5002 * 5003 * http://www.apache.org/licenses/LICENSE-2.0 5004 * 5005 * Unless required by applicable law or agreed to in writing, software 5006 * distributed under the License is distributed on an "AS IS" BASIS, 5007 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5008 * See the License for the specific language governing permissions and 5009 * limitations under the License. 5010 */function Nr(n,e){const t={typeString:n};return e&&(t.value=e),t}function yv(n,e){if(!EG(n))throw new rt(Ee.INVALID_ARGUMENT,"JSON must be an object");let t;for(const r in e)if(e[r]){const i=e[r].typeString,s="value"in e[r]?{value:e[r].value}:void 0;if(!(r in n)){t=`JSON missing required field: '${r}'`;break}const o=n[r];if(i&&typeof o!==i){t=`JSON field '${r}' must be a ${i}.`;break}if(s!==void 0&&o!==s.value){t=`Expected '${r}' field to equal '${s.value}'`;break}}if(t)throw new rt(Ee.INVALID_ARGUMENT,t);return!0}/** 5011 * @license 5012 * Copyright 2017 Google LLC 5013 * 5014 * Licensed under the Apache License, Version 2.0 (the "License"); 5015 * you may not use this file except in compliance with the License. 5016 * You may obtain a copy of the License at 5017 * 5018 * http://www.apache.org/licenses/LICENSE-2.0 5019 * 5020 * Unless required by applicable law or agreed to in writing, software 5021 * distributed under the License is distributed on an "AS IS" BASIS, 5022 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5023 * See the License for the specific language governing permissions and 5024 * limitations under the License. 5025 */const QO=-62135596800,JO=1e6;class An{static now(){return An.fromMillis(Date.now())}static fromDate(e){return An.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),r=Math.floor((e-1e3*t)*JO);return new An(t,r)}constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new rt(Ee.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new rt(Ee.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<QO)throw new rt(Ee.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new rt(Ee.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/JO}_compareTo(e){return this.seconds===e.seconds?cn(this.nanoseconds,e.nanoseconds):cn(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{type:An._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(e){if(yv(e,An._jsonSchema))return new An(e.seconds,e.nanoseconds)}valueOf(){const e=this.seconds-QO;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}An._jsonSchemaVersion="firestore/timestamp/1.0",An._jsonSchema={type:Nr("string",An._jsonSchemaVersion),seconds:Nr("number"),nanoseconds:Nr("number")};/** 5026 * @license 5027 * Copyright 2017 Google LLC 5028 * 5029 * Licensed under the Apache License, Version 2.0 (the "License"); 5030 * you may not use this file except in compliance with the License. 5031 * You may obtain a copy of the License at 5032 * 5033 * http://www.apache.org/licenses/LICENSE-2.0 5034 * 5035 * Unless required by applicable law or agreed to in writing, software 5036 * distributed under the License is distributed on an "AS IS" BASIS, 5037 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5038 * See the License for the specific language governing permissions and 5039 * limitations under the License. 5040 */class Ht{static fromTimestamp(e){return new Ht(e)}static min(){return new Ht(new An(0,0))}static max(){return new Ht(new An(253402300799,999999999))}constructor(e){this.timestamp=e}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** 5041 * @license 5042 * Copyright 2021 Google LLC 5043 * 5044 * Licensed under the Apache License, Version 2.0 (the "License");
5045 * you may not use this file except in compliance with the License. 5046 * You may obtain a copy of the License at 5047 * 5048 * http://www.apache.org/licenses/LICENSE-2.0 5049 * 5050 * Unless required by applicable law or agreed to in writing, software 5051 * distributed under the License is distributed on an "AS IS" BASIS, 5052 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5053 * See the License for the specific language governing permissions and 5054 * limitations under the License. 5055 */const Ry=-1;function A0e(n,e){const t=n.toTimestamp().seconds,r=n.toTimestamp().nanoseconds+1,i=Ht.fromTimestamp(r===1e9?new An(t+1,0):new An(t,r));return new Gc(i,Mt.empty(),e)}function C0e(n){return new Gc(n.readTime,n.key,Ry)}class Gc{constructor(e,t,r){this.readTime=e,this.documentKey=t,this.largestBatchId=r}static min(){return new Gc(Ht.min(),Mt.empty(),Ry)}static max(){return new Gc(Ht.max(),Mt.empty(),Ry)}}function R0e(n,e){let t=n.readTime.compareTo(e.readTime);return t!==0?t:(t=Mt.comparator(n.documentKey,e.documentKey),t!==0?t:cn(n.largestBatchId,e.largestBatchId))}/** 5056 * @license 5057 * Copyright 2020 Google LLC 5058 * 5059 * Licensed under the Apache License, Version 2.0 (the "License"); 5060 * you may not use this file except in compliance with the License. 5061 * You may obtain a copy of the License at 5062 * 5063 * http://www.apache.org/licenses/LICENSE-2.0 5064 * 5065 * Unless required by applicable law or agreed to in writing, software 5066 * distributed under the License is distributed on an "AS IS" BASIS, 5067 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5068 * See the License for the specific language governing permissions and 5069 * limitations under the License. 5070 */const P0e="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class N0e{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** 5071 * @license 5072 * Copyright 2017 Google LLC 5073 * 5074 * Licensed under the Apache License, Version 2.0 (the "License"); 5075 * you may not use this file except in compliance with the License. 5076 * You may obtain a copy of the License at 5077 * 5078 * http://www.apache.org/licenses/LICENSE-2.0 5079 * 5080 * Unless required by applicable law or agreed to in writing, software 5081 * distributed under the License is distributed on an "AS IS" BASIS, 5082 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5083 * See the License for the specific language governing permissions and 5084 * limitations under the License. 5085 */async function Hp(n){if(n.code!==Ee.FAILED_PRECONDITION||n.message!==P0e)throw n;at("LocalStore","Unexpectedly lost primary lease")}/** 5086 * @license 5087 * Copyright 2017 Google LLC 5088 * 5089 * Licensed under the Apache License, Version 2.0 (the "License"); 5090 * you may not use this file except in compliance with the License. 5091 * You may obtain a copy of the License at 5092 * 5093 * http://www.apache.org/licenses/LICENSE-2.0 5094 * 5095 * Unless required by applicable law or agreed to in writing, software 5096 * distributed under the License is distributed on an "AS IS" BASIS, 5097 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5098 * See the License for the specific language governing permissions and 5099 * limitations under the License. 5100 */class Me{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(t=>{this.isDone=!0,this.result=t,this.nextCallback&&this.nextCallback(t)},t=>{this.isDone=!0,this.error=t,this.catchCallback&&this.catchCallback(t)})}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&It(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new Me((r,i)=>{this.nextCallback=s=>{this.wrapSuccess(e,s).next(r,i)},this.catchCallback=s=>{this.wrapFailure(t,s).next(r,i)}})}toPromise(){return new Promise((e,t)=>{this.next(e,t)})}wrapUserFunction(e){try{const t=e();return t instanceof Me?t:Me.resolve(t)}catch(t){return Me.reject(t)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):Me.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):Me.reject(t)}static resolve(e){return new Me((t,r)=>{t(e)})}static reject(e){return new Me((t,r)=>{r(e)})}static waitFor(e){return new Me((t,r)=>{let i=0,s=0,o=!1;e.forEach(a=>{++i,a.next(()=>{++s,o&&s===i&&t()},l=>r(l))}),o=!0,s===i&&t()})}static or(e){let t=Me.resolve(!1);for(const r of e)t=t.next(i=>i?Me.resolve(i):r());return t}static forEach(e,t){const r=[];return e.forEach((i,s)=>{r.push(t.call(this,i,s))}),this.waitFor(r)}static mapArray(e,t){return new Me((r,i)=>{const s=e.length,o=new Array(s);let a=0;for(let l=0;l<s;l++){const c=l;t(e[c]).next(u=>{o[c]=u,++a,a===s&&r(o)},u=>i(u))}})}static doWhile(e,t){return new Me((r,i)=>{const s=()=>{e()===!0?t().next(()=>{s()},i):r()};s()})}}function I0e(n){const e=n.match(/Android ([\d.]+)/i),t=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(t)}function Gp(n){return n.name==="IndexedDbTransactionError"}/** 5101 * @license 5102 * Copyright 2018 Google LLC 5103 * 5104 * Licensed under the Apache License, Version 2.0 (the "License");
5105 * you may not use this file except in compliance with the License. 5106 * You may obtain a copy of the License at 5107 * 5108 * http://www.apache.org/licenses/LICENSE-2.0 5109 * 5110 * Unless required by applicable law or agreed to in writing, software 5111 * distributed under the License is distributed on an "AS IS" BASIS, 5112 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5113 * See the License for the specific language governing permissions and 5114 * limitations under the License. 5115 */class gS{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=r=>this.ae(r),this.ue=r=>t.writeSequenceNumber(r))}ae(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.ue&&this.ue(e),e}}gS.ce=-1;/** 5116 * @license 5117 * Copyright 2017 Google LLC 5118 * 5119 * Licensed under the Apache License, Version 2.0 (the "License"); 5120 * you may not use this file except in compliance with the License. 5121 * You may obtain a copy of the License at 5122 * 5123 * http://www.apache.org/licenses/LICENSE-2.0 5124 * 5125 * Unless required by applicable law or agreed to in writing, software 5126 * distributed under the License is distributed on an "AS IS" BASIS, 5127 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5128 * See the License for the specific language governing permissions and 5129 * limitations under the License. 5130 */const sN=-1;function yS(n){return n==null}function O1(n){return n===0&&1/n==-1/0}function L0e(n){return typeof n=="number"&&Number.isInteger(n)&&!O1(n)&&n<=Number.MAX_SAFE_INTEGER&&n>=Number.MIN_SAFE_INTEGER}/** 5131 * @license 5132 * Copyright 2017 Google LLC 5133 * 5134 * Licensed under the Apache License, Version 2.0 (the "License"); 5135 * you may not use this file except in compliance with the License. 5136 * You may obtain a copy of the License at 5137 * 5138 * http://www.apache.org/licenses/LICENSE-2.0 5139 * 5140 * Unless required by applicable law or agreed to in writing, software 5141 * distributed under the License is distributed on an "AS IS" BASIS, 5142 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5143 * See the License for the specific language governing permissions and 5144 * limitations under the License. 5145 */const TG="�";function D0e(n){let e="";for(let t=0;t<n.length;t++)e.length>0&&(e=ZO(e)),e=k0e(n.get(t),e);return ZO(e)}function k0e(n,e){let t=e;const r=n.length;for(let i=0;i<r;i++){const s=n.charAt(i);switch(s){case"\0":t+="��";break;case TG:t+="��";break;default:t+=s}}return t}function ZO(n){return n+TG+"�"}/** 5146 * @license 5147 * Copyright 2017 Google LLC 5148 * 5149 * Licensed under the Apache License, Version 2.0 (the "License"); 5150 * you may not use this file except in compliance with the License. 5151 * You may obtain a copy of the License at 5152 * 5153 * http://www.apache.org/licenses/LICENSE-2.0 5154 * 5155 * Unless required by applicable law or agreed to in writing, software 5156 * distributed under the License is distributed on an "AS IS" BASIS, 5157 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5158 * See the License for the specific language governing permissions and 5159 * limitations under the License. 5160 */function eF(n){let e=0;for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e++;return e}function lu(n,e){for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e(t,n[t])}function MG(n){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e))return!1;return!0}/** 5161 * @license 5162 * Copyright 2017 Google LLC 5163 * 5164 * Licensed under the Apache License, Version 2.0 (the "License"); 5165 * you may not use this file except in compliance with the License. 5166 * You may obtain a copy of the License at 5167 * 5168 * http://www.apache.org/licenses/LICENSE-2.0 5169 * 5170 * Unless required by applicable law or agreed to in writing, software 5171 * distributed under the License is distributed on an "AS IS" BASIS, 5172 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5173 * See the License for the specific language governing permissions and 5174 * limitations under the License. 5175 */class or{constructor(e,t){this.comparator=e,this.root=t||si.EMPTY}insert(e,t){return new or(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,si.BLACK,null,
vendor: 5,338 bytes, lines 5175-5185
5175null))}remove(e){return new or(this.comparator,this.root.remove(e,this.comparator).copy(null,null,si.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){const r=this.comparator(e,t.key);if(r===0)return t.value;r<0?t=t.left:r>0&&(t=t.right)}return null}indexOf(e){let t=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(i===0)return t+r.left.size;i<0?r=r.left:(t+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,r)=>(e(t,r),!1))}toString(){const e=[];return this.inorderTraversal((t,r)=>(e.push(`${t}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Hx(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Hx(this.root,e,this.comparator,!1)}getReverseIterator(){return new Hx(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Hx(this.root,e,this.comparator,!0)}}class Hx{constructor(e,t,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=t?r(e.key,t):1,t&&i&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(s===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class si{constructor(e,t,r,i,s){this.key=e,this.value=t,this.color=r??si.RED,this.left=i??si.EMPTY,this.right=s??si.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,r,i,s){return new si(e??this.key,t??this.value,r??this.color,i??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,r){let i=this;const s=r(e,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(e,t,r),null):s===0?i.copy(null,t,null,null,null):i.copy(null,null,null,null,i.right.insert(e,t,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return si.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,t){let r,i=this;if(t(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,t),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),t(e,i.key)===0){if(i.right.isEmpty())return si.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,t))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,si.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,si.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw It(43730,{key:this.key,value:this.value});if(this.right.isRed())throw It(14113,{key:this.key,value:this.value});const e=this.left.check();if(e!==this.right.check())throw It(27949);return e+(this.isRed()?0:1)}}si.EMPTY=null,si.RED=!0,si.BLACK=!1;si.EMPTY=new class{constructor(){this.size=0}get key(){throw It(57766)}get value(){throw It(16141)}get color(){throw It(16727)}get left(){throw It(29726)}get right(){throw It(36894)}copy(e,t,r,i,s){return this}insert(e,t,r){return new si(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** 5176 * @license 5177 * Copyright 2017 Google LLC 5178 * 5179 * Licensed under the Apache License, Version 2.0 (the "License"); 5180 * you may not use this file except in compliance with the License. 5181 * You may obtain a copy of the License at 5182 * 5183 * http://www.apache.org/licenses/LICENSE-2.0 5184 * 5185 * Unless required by applicable law or agreed to in writing, softw
5185are 5186 * distributed under the License is distributed on an "AS IS" BASIS, 5187 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5188 * See the License for the specific language governing permissions and 5189 * limitations under the License. 5190 */class jr{constructor(e){this.comparator=e,this.data=new or(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,r)=>(e(t),!1))}forEachInRange(e,t){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,e[1])>=0)return;t(i.key)}}forEachWhile(e,t){let r;for(r=t!==void 0?this.data.getIteratorFrom(t):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new tF(this.data.getIterator())}getIteratorFrom(e){return new tF(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach(r=>{t=t.add(r)}),t}isEqual(e){if(!(e instanceof jr)||this.size!==e.size)return!1;const t=this.data.getIterator(),r=e.data.getIterator();for(;t.hasNext();){const i=t.getNext().key,s=r.getNext().key;if(this.comparator(i,s)!==0)return!1}return!0}toArray(){const e=[];return this.forEach(t=>{e.push(t)}),e}toString(){const e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){const t=new jr(this.comparator);return t.data=e,t}}class tF{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** 5191 * @license 5192 * Copyright 2020 Google LLC 5193 * 5194 * Licensed under the Apache License, Version 2.0 (the "License"); 5195 * you may not use this file except in compliance with the License. 5196 * You may obtain a copy of the License at 5197 * 5198 * http://www.apache.org/licenses/LICENSE-2.0 5199 * 5200 * Unless required by applicable law or agreed to in writing, software 5201 * distributed under the License is distributed on an "AS IS" BASIS, 5202 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5203 * See the License for the specific language governing permissions and 5204 * limitations under the License. 5205 */class Bs{constructor(e){this.fields=e,e.sort(oi.comparator)}static empty(){return new Bs([])}unionWith(e){let t=new jr(oi.comparator);for(const r of this.fields)t=t.add(r);for(const r of e)t=t.add(r);return new Bs(t.toArray())}covers(e){for(const t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return fp(this.fields,e.fields,(t,r)=>t.isEqual(r))}}/** 5206 * @license 5207 * Copyright 2023 Google LLC 5208 * 5209 * Licensed under the Apache License, Version 2.0 (the "License"); 5210 * you may not use this file except in compliance with the License. 5211 * You may obtain a copy of the License at 5212 * 5213 * http://www.apache.org/licenses/LICENSE-2.0 5214 * 5215 * Unless required by applicable law or agreed to in writing, software 5216 * distributed under the License is distributed on an "AS IS" BASIS, 5217 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5218 * See the License for the specific language governing permissions and 5219 * limitations under the License. 5220 */class AG extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** 5221 * @license 5222 * Copyright 2020 Google LLC 5223 * 5224 * Licensed under the Apache License, Version 2.0 (the "License"); 5225 * you may not use this file except in compliance with the License. 5226 * You may obtain a copy of the License at 5227 * 5228 * http://www.apache.org/licenses/LICENSE-2.0 5229 * 5230 * Unless required by applicable law or agreed to in writing, software 5231 * distributed under the License is distributed on an "AS IS" BASIS, 5232 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5233 * See the License for the specific language governing permissions and 5234 * limitations under the License. 5235 */class ui{constructor(e){this.binaryString=e}static fromBase64String(e){const t=function(i){try{return atob(i)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new AG("Invalid base64 string: "+s):s}}(e);return new ui(t)}static fromUint8Array(e){const t=function(i){let s="";for(let o=0;o<i.length;++o)s+=String.fromCharCode(i[o]);return s}(e);return new ui(t)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return function(t){return btoa(t)}(this.binaryString)}
5235toUint8Array(){return function(t){const r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return cn(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}ui.EMPTY_BYTE_STRING=new ui("");const O0e=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Wc(n){if(Cn(!!n,39018),typeof n=="string"){let e=0;const t=O0e.exec(n);if(Cn(!!t,46558,{timestamp:n}),t[1]){let i=t[1];i=(i+"000000000").substr(0,9),e=Number(i)}const r=new Date(n);return{seconds:Math.floor(r.getTime()/1e3),nanos:e}}return{seconds:vr(n.seconds),nanos:vr(n.nanos)}}function vr(n){return typeof n=="number"?n:typeof n=="string"?Number(n):0}function $c(n){return typeof n=="string"?ui.fromBase64String(n):ui.fromUint8Array(n)}/** 5236 * @license 5237 * Copyright 2020 Google LLC 5238 * 5239 * Licensed under the Apache License, Version 2.0 (the "License"); 5240 * you may not use this file except in compliance with the License. 5241 * You may obtain a copy of the License at 5242 * 5243 * http://www.apache.org/licenses/LICENSE-2.0 5244 * 5245 * Unless required by applicable law or agreed to in writing, software 5246 * distributed under the License is distributed on an "AS IS" BASIS, 5247 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5248 * See the License for the specific language governing permissions and 5249 * limitations under the License. 5250 */const CG="server_timestamp",RG="__type__",PG="__previous_value__",NG="__local_write_time__";function oN(n){var t,r;return((r=(((t=n==null?void 0:n.mapValue)==null?void 0:t.fields)||{})[RG])==null?void 0:r.stringValue)===CG}function vS(n){const e=n.mapValue.fields[PG];return oN(e)?vS(e):e}function Py(n){const e=Wc(n.mapValue.fields[NG].timestampValue);return new An(e.seconds,e.nanos)}/** 5251 * @license 5252 * Copyright 2017 Google LLC 5253 * 5254 * Licensed under the Apache License, Version 2.0 (the "License"); 5255 * you may not use this file except in compliance with the License. 5256 * You may obtain a copy of the License at 5257 * 5258 * http://www.apache.org/licenses/LICENSE-2.0 5259 * 5260 * Unless required by applicable law or agreed to in writing, software 5261 * distributed under the License is distributed on an "AS IS" BASIS, 5262 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5263 * See the License for the specific language governing permissions and 5264 * limitations under the License. 5265 */class F0e{constructor(e,t,r,i,s,o,a,l,c,u,d){this.databaseId=e,this.appId=t,this.persistenceKey=r,this.host=i,this.ssl=s,this.forceLongPolling=o,this.autoDetectLongPolling=a,this.longPollingOptions=l,this.useFetchStreams=c,this.isUsingEmulator=u,this.apiKey=d}}const F1="(default)";class Ny{constructor(e,t){this.projectId=e,this.database=t||F1}static empty(){return new Ny("","")}get isDefaultDatabase(){return this.database===F1}isEqual(e){return e instanceof Ny&&e.projectId===this.projectId&&e.database===this.database}}function U0e(n,e){if(!Object.prototype.hasOwnProperty.apply(n.options,["projectId"]))throw new rt(Ee.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Ny(n.options.projectId,e)}/** 5266 * @license 5267 * Copyright 2020 Google LLC 5268 * 5269 * Licensed under the Apache License, Version 2.0 (the "License"); 5270 * you may not use this file except in compliance with the License. 5271 * You may obtain a copy of the License at 5272 * 5273 * http://www.apache.org/licenses/LICENSE-2.0 5274 * 5275 * Unless required by applicable law or agreed to in writing, software 5276 * distributed under the License is distributed on an "AS IS" BASIS, 5277 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5278 * See the License for the specific language governing permissions and 5279 * limitations under the License. 5280 */const IG="__type__",LG="__max__",Gx={mapValue:{fields:{__type__:{stringValue:LG}}}},DG="__vector__",U1="value";function qc(n){return"nullValue"in n?0:"booleanValue"in n?1:"integerValue"in n||"doubleValue"in n?2:"timestampValue"in n?3:"stringValue"in n?5:"bytesValue"in n?6:"referenceValue"in n?7:"geoPointValue"in n?8:"arrayValue"in n?9:"mapValue"in n?oN(n)?4:j0e(n)?9007199254740991:V0e(n)?10:11:It(28295,{value:n})}function Fa(n,e){if(n===e)return!0;const t=qc(n);if(t!==qc(e))return!1;switch(t){case 0:case 9007199254740991:return!0;case 1:return n.booleanValue===e.booleanValue;case 4:return Py(n).isEqual(Py(e));case 3:return function(i,s){if(typeof i.timestampValue=="string"&&typeof s.timestampValue=="string"&&i.timestampValue.length===s.timestampValue.length)return i.timestampValue===s.timestampValue;const o=Wc(i.timestampValue),a=Wc(s.timestampValue);return o.seconds===a.seconds&&o.nanos===a.nanos}(n,e);case 5:return n.stringValue===e.stringValue;case 6:return function(i,s){return $c(i.bytesValue).isEqual($c(s.bytesValue))}(n,e);case 7:return n.referenceValue===e.referenceValue;case 8:return function(i,s){return vr(i.geoPointValue.latitude)===vr(s.geoPointValue.latitude)&&vr(i.geoPointValue.longitude)===vr(s.geoPointValue.longitude)}(n,e);case 2:return function(i,s){if("integerValue"in i&&"integerValue"in s)return vr(i.integerValue)===vr(s.integerValue);if("doubleValue"in i&&"doubleValue"in s){const o=vr(i.doubleValue),a=vr(s.doubleValue);return o===a?O1(o)===O1(a):isNaN(o)&&isNaN(a)}return!1}(n,e);case 9:return fp(n.arrayValue.values||[],e.arrayValue.values||[],Fa);case 10:case 11:return function(i,s){const o=i.mapValue.fields||{},a=s.mapValue.fields||{};if(eF(o)!==eF(a))return!1;for(const l in o)if(o.hasOwnProperty(l)&&(a[l]===void 0||!Fa(o[l],a[l])))return!1;return!0}(n,e);default:return It(52216,{left:n})}}function Iy(n,e){return(n.values||[]).find(t=>Fa(t,e))!==void 0}function pp(n,e){if(n===e)return 0;const t=qc(n),r=qc(e);if(t!==r)return cn(t,r);switch(t){case 0:case 9007199254740991:return 0;case 1:return cn(n.booleanValue,e.booleanValue);case 2:return function(s,o){const a=vr(s.integerValue||s.doubleValue),l=vr(o.integerValue||o.doubleValue);return a<l?-1:a>l?1:a===l?0:isNaN(a)?isNaN(l)?0:-1:1}(n,e);case 3:return nF(n.timestampValue,e.timestampValue);case 4:return nF(Py(n),Py(e));case 5:return AC(n.stringValue,e.stringValue);case 6:return function(s,o){const a=$c(s),l=$c(o);return a.compareTo(l)}(n.bytesValue,e.bytesValue);case 7:return function(s,o){const a=s.split("/"),l=o.split("/");for(let c=0;c<a.length&&c<l.length;c++){const u=cn(a[c],l[c]);if(u!==0)return u}return cn(a.length,l.length)}(n.referenceValue,e.referenceValue);case 8:return function(s,o){const a=cn(vr(s.latitude),vr(o.latitude));return a!==0?a:cn(vr(s.longitude),vr(o.longitude))}(n.geoPointValue,e.geoPointValue);case 9:return rF(n.arrayValue,e.arrayValue);case 10:return function(s,o){var m,g,v,_;const a=s.fields||{},l=o.fields||{},c=(m=a[U1])==null?void 0:m.arrayValue,u=(g=l[U1])==null?void 0:g.arrayValue,d=cn(((v=c==null?void 0:c.values)==null?void 0:v.length)||0,((_=u==null?void 0:u.values)==null?void 0:_.length)||0);return d!==0?d:rF(c,u)}(n.mapValue,e.mapValue);case 11:return function(s,o){if(s===Gx.mapValue&&o===Gx.mapValue)return 0;if(s===Gx.mapValue)return 1;if(o===Gx.mapValue)return-1;const a=s.fields||{},l=Object.keys(a),c=o.fields||{},u=Object.keys(c);l.sort(),u.sort();for(let d=0;d<l.length&&d<u.length;++d){const m=AC(l[d],u[d]);if(m!==0)return m;const g=pp(a[l[d]],c[u[d]]);if(g!==0)return g}return cn(l.length,u.length)}(n.mapValue,e.mapValue);default:throw It(23264,{he:t})}}function nF(n,e){if(typeof n=="string"&&typeof e=="string"&&n.length===e.length)return cn(n,e);const t=Wc(n),r=Wc(e),i=cn(t.seconds,r.seconds);return i!==0?i:cn(t.nanos,r.nanos)}function rF(n,e){const t=n.values||[],r=e.values||[];for(let i=0;i<t.length&&i<r.length;++i){const s=pp(t[i],r[i]);if(s)return s}return cn(t.length,r.length)}function mp(n){return CC(n)}function CC(n){return"nullValue"in n?"null":"booleanValue"in n?""+n.booleanValue:"integerValue"in n?""+n.integerValue:"doubleValue"in n?""+n.doubleValue:"timestampValue"in n?function(t){const r=Wc(t);return`time(${r.seconds},${r.nanos})`}(n.timestampValue):"stringValue"in n?n.stringValue:"bytesValue"in n?function(t){return $c(t).toBase64()}(n.bytesValue):"referenceValue"in n?function(t){return Mt.fromName(t).toString()}(n.referenceValue):"geoPointValue"in n?function(t){return`geo(${t.latitude},${t.longitude})`}(n.geoPointValue):"arrayValue"in n?function(t){let r="[",i=!0;for(const s of t.values||[])i?i=!1:r+=",",r+=CC(s);return r+"]"}(n.arrayValue):"mapValue"in n?function(t){const r=Object.keys(t.fields||{}).sort();let i="{",s=!0;for(const o of r)s?s=!1:i+=",",i+=`${o}:${CC(t.fields[o])}`;return i+"}"}(n.mapValue):It(61005,{value:n})}function C_(n){switch(qc(n)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:const e=vS(n);return e?16+C_(e):16;case 5:return 2*n.stringValue.length;case 6:return $c(n.bytesValue).approximateByteSize();case 7:return n.referenceValue.length;case 9:return function(r){return(r.values||[]).reduce((i,s)=>i+C_(s),0)}(n.arrayValue);case 10:case 11:return function(r){let i=0;return lu(r.fields,(s,o)=>
5280{i+=s.length+C_(o)}),i}(n.mapValue);default:throw It(13486,{value:n})}}function iF(n,e){return{referenceValue:`projects/${n.projectId}/databases/${n.database}/documents/${e.path.canonicalString()}`}}function RC(n){return!!n&&"integerValue"in n}function aN(n){return!!n&&"arrayValue"in n}function sF(n){return!!n&&"nullValue"in n}function oF(n){return!!n&&"doubleValue"in n&&isNaN(Number(n.doubleValue))}function R_(n){return!!n&&"mapValue"in n}function V0e(n){var t,r;return((r=(((t=n==null?void 0:n.mapValue)==null?void 0:t.fields)||{})[IG])==null?void 0:r.stringValue)===DG}function Mg(n){if(n.geoPointValue)return{geoPointValue:{...n.geoPointValue}};if(n.timestampValue&&typeof n.timestampValue=="object")return{timestampValue:{...n.timestampValue}};if(n.mapValue){const e={mapValue:{fields:{}}};return lu(n.mapValue.fields,(t,r)=>e.mapValue.fields[t]=Mg(r)),e}if(n.arrayValue){const e={arrayValue:{values:[]}};for(let t=0;t<(n.arrayValue.values||[]).length;++t)e.arrayValue.values[t]=Mg(n.arrayValue.values[t]);return e}return{...n}}function j0e(n){return(((n.mapValue||{}).fields||{}).__type__||{}).stringValue===LG}/** 5281 * @license 5282 * Copyright 2017 Google LLC 5283 * 5284 * Licensed under the Apache License, Version 2.0 (the "License"); 5285 * you may not use this file except in compliance with the License. 5286 * You may obtain a copy of the License at 5287 * 5288 * http://www.apache.org/licenses/LICENSE-2.0 5289 * 5290 * Unless required by applicable law or agreed to in writing, software 5291 * distributed under the License is distributed on an "AS IS" BASIS, 5292 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5293 * See the License for the specific language governing permissions and 5294 * limitations under the License. 5295 */class gs{constructor(e){this.value=e}static empty(){return new gs({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let r=0;r<e.length-1;++r)if(t=(t.mapValue.fields||{})[e.get(r)],!R_(t))return null;return t=(t.mapValue.fields||{})[e.lastSegment()],t||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=Mg(t)}setAll(e){let t=oi.emptyPath(),r={},i=[];e.forEach((o,a)=>{if(!t.isImmediateParentOf(a)){const l=this.getFieldsMap(t);this.applyChanges(l,r,i),r={},i=[],t=a.popLast()}o?r[a.lastSegment()]=Mg(o):i.push(a.lastSegment())});const s=this.getFieldsMap(t);this.applyChanges(s,r,i)}delete(e){const t=this.field(e.popLast());R_(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return Fa(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let r=0;r<e.length;++r){let i=t.mapValue.fields[e.get(r)];R_(i)&&i.mapValue.fields||(i={mapValue:{fields:{}}},t.mapValue.fields[e.get(r)]=i),t=i}return t.mapValue.fields}applyChanges(e,t,r){lu(t,(i,s)=>e[i]=s);for(const i of r)delete e[i]}clone(){return new gs(Mg(this.value))}}function kG(n){const e=[];return lu(n.fields,(t,r)=>{const i=new oi([t]);if(R_(r)){const s=kG(r.mapValue).fields;
vendor: 4,180 bytes, lines 5295-5335
5295if(s.length===0)e.push(i);else for(const o of s)e.push(i.child(o))}else e.push(i)}),new Bs(e)}/** 5296 * @license 5297 * Copyright 2017 Google LLC 5298 * 5299 * Licensed under the Apache License, Version 2.0 (the "License"); 5300 * you may not use this file except in compliance with the License. 5301 * You may obtain a copy of the License at 5302 * 5303 * http://www.apache.org/licenses/LICENSE-2.0 5304 * 5305 * Unless required by applicable law or agreed to in writing, software 5306 * distributed under the License is distributed on an "AS IS" BASIS, 5307 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5308 * See the License for the specific language governing permissions and 5309 * limitations under the License. 5310 */class Ni{constructor(e,t,r,i,s,o,a){this.key=e,this.documentType=t,this.version=r,this.readTime=i,this.createTime=s,this.data=o,this.documentState=a}static newInvalidDocument(e){return new Ni(e,0,Ht.min(),Ht.min(),Ht.min(),gs.empty(),0)}static newFoundDocument(e,t,r,i){return new Ni(e,1,t,Ht.min(),r,i,0)}static newNoDocument(e,t){return new Ni(e,2,t,Ht.min(),Ht.min(),gs.empty(),0)}static newUnknownDocument(e,t){return new Ni(e,3,t,Ht.min(),Ht.min(),gs.empty(),2)}convertToFoundDocument(e,t){return!this.createTime.isEqual(Ht.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=gs.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=gs.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Ht.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof Ni&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new Ni(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/** 5311 * @license 5312 * Copyright 2022 Google LLC 5313 * 5314 * Licensed under the Apache License, Version 2.0 (the "License"); 5315 * you may not use this file except in compliance with the License. 5316 * You may obtain a copy of the License at 5317 * 5318 * http://www.apache.org/licenses/LICENSE-2.0 5319 * 5320 * Unless required by applicable law or agreed to in writing, software 5321 * distributed under the License is distributed on an "AS IS" BASIS, 5322 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5323 * See the License for the specific language governing permissions and 5324 * limitations under the License. 5325 */class V1{constructor(e,t){this.position=e,this.inclusive=t}}function aF(n,e,t){let r=0;for(let i=0;i<n.position.length;i++){const s=e[i],o=n.position[i];if(s.field.isKeyField()?r=Mt.comparator(Mt.fromName(o.referenceValue),t.key):r=pp(o,t.data.field(s.field)),s.dir==="desc"&&(r*=-1),r!==0)break}return r}function lF(n,e){if(n===null)return e===null;if(e===null||n.inclusive!==e.inclusive||n.position.length!==e.position.length)return!1;for(let t=0;t<n.position.length;t++)if(!Fa(n.position[t],e.position[t]))return!1;return!0}/** 5326 * @license 5327 * Copyright 2022 Google LLC 5328 * 5329 * Licensed under the Apache License, Version 2.0 (the "License"); 5330 * you may not use this file except in compliance with the License. 5331 * You may obtain a copy of the License at 5332 * 5333 * http://www.apache.org/licenses/LICENSE-2.0 5334 * 5335 * Unless required by applicable law or agreed to in writing, softw
5335are 5336 * distributed under the License is distributed on an "AS IS" BASIS, 5337 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5338 * See the License for the specific language governing permissions and 5339 * limitations under the License. 5340 */class j1{constructor(e,t="asc"){this.field=e,this.dir=t}}function B0e(n,e){return n.dir===e.dir&&n.field.isEqual(e.field)}/** 5341 * @license 5342 * Copyright 2022 Google LLC 5343 * 5344 * Licensed under the Apache License, Version 2.0 (the "License"); 5345 * you may not use this file except in compliance with the License. 5346 * You may obtain a copy of the License at 5347 * 5348 * http://www.apache.org/licenses/LICENSE-2.0 5349 * 5350 * Unless required by applicable law or agreed to in writing, software 5351 * distributed under the License is distributed on an "AS IS" BASIS, 5352 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5353 * See the License for the specific language governing permissions and 5354 * limitations under the License. 5355 */class OG{}class Pr extends OG{constructor(e,t,r){super(),this.field=e,this.op=t,this.value=r}static create(e,t,r){return e.isKeyField()?t==="in"||t==="not-in"?this.createKeyFieldInFilter(e,t,r):new H0e(e,t,r):t==="array-contains"?new $0e(e,r):t==="in"?new q0e(e,r):t==="not-in"?new X0e(e,r):t==="array-contains-any"?new K0e(e,r):new Pr(e,t,r)}static createKeyFieldInFilter(e,t,r){return t==="in"?new G0e(e,r):new W0e(e,r)}matches(e){const t=e.data.field(this.field);return this.op==="!="?t!==null&&t.nullValue===void 0&&this.matchesComparison(pp(t,this.value)):t!==null&&qc(this.value)===qc(t)&&this.matchesComparison(pp(t,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return e===0;case"!=":return e!==0;case">":return e>0;case">=":return e>=0;default:return It(47266,{operator:this.op})}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class na extends OG{constructor(e,t){super(),this.filters=e,this.op=t,this.Pe=null}static create(e,t){return new na(e,t)}matches(e){return FG(this)?this.filters.find(t=>!t.matches(e))===void 0:this.filters.find(t=>t.matches(e))!==void 0}getFlattenedFilters(){return this.Pe!==null||(this.Pe=this.filters.reduce((e,t)=>e.concat(t.getFlattenedFilters()),[])),this.Pe}getFilters(){return Object.assign([],this.filters)}}function FG(n){return n.op==="and"}function UG(n){return z0e(n)&&FG(n)}function z0e(n){for(const e of n.filters)if(e instanceof na)return!1;return!0}function PC(n){if(n instanceof Pr)return n.field.canonicalString()+n.op.toString()+mp(n.value);if(UG(n))return n.filters.map(e=>PC(e)).join(",");{const e=n.filters.map(t=>PC(t)).join(",");return`${n.op}(${e})`}}function VG(n,e){return n instanceof Pr?function(r,i){return i instanceof Pr&&r.op===i.op&&r.field.isEqual(i.field)&&Fa(r.value,i.value)}(n,e):n instanceof na?function(r,i){return i instanceof na&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce((s,o,a)=>s&&VG(o,i.filters[a]),!0):!1}(n,e):void It(19439)}function jG(n){return n instanceof Pr?function(t){return`${t.field.canonicalString()} ${t.op} ${mp(t.value)}`}(n):n instanceof na?function(t){return t.op.toString()+" {"+t.getFilters().map(jG).join(" ,")+"}"}(n):"Filter"}class H0e extends Pr{constructor(e,t,r){super(e,t,r),this.key=Mt.fromName(r.referenceValue)}matches(e){const t=Mt.comparator(e.key,this.key);return this.matchesComparison(t)}}class G0e extends Pr{constructor(e,t){super(e,"in",t),this.keys=BG("in",t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class W0e extends Pr{constructor(e,t){super(e,"not-in",t),this.keys=BG("not-in",t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function BG(n,e){var t;return(((t=e.arrayValue)==null?void 0:t.values)||[]).map(r=>Mt.fromName(r.referenceValue))}class $0e extends Pr{constructor(e,t){super(e,"array-contains",t)}matches(e){const t=e.data.field(this.field);return aN(t)&&Iy(t.arrayValue,this.value)}}class q0e extends Pr{constructor(e,t){super(e,"in",t)}matches(e){const t=e.data.field(this.field);return t!==null&&Iy(this.value.arrayValue,t)}}class X0e extends Pr{constructor(e,t){super(e,"not-in",t)}matches(e){if(Iy(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=e.data.field(this.field);return t!==null&&t.nullValue===void 0&&!Iy(this.value.arrayValue,t)}}class K0e extends Pr{constructor(e,t){super(e,"array-contains-any",t)}matches(e){const t=e.data.field(this.field);return!(!aN(t)||!t.arrayValue.values)&&t.arrayValue.values.some(r=>Iy(this.value.arrayValue,r))}}/** 5356 * @license 5357 * Copyright 2019 Google LLC 5358 * 5359 * Licensed under the Apache License, Version 2.0 (the "License");
5360 * you may not use this file except in compliance with the License. 5361 * You may obtain a copy of the License at 5362 * 5363 * http://www.apache.org/licenses/LICENSE-2.0 5364 * 5365 * Unless required by applicable law or agreed to in writing, software 5366 * distributed under the License is distributed on an "AS IS" BASIS, 5367 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5368 * See the License for the specific language governing permissions and 5369 * limitations under the License. 5370 */class Y0e{constructor(e,t=null,r=[],i=[],s=null,o=null,a=null){this.path=e,this.collectionGroup=t,this.orderBy=r,this.filters=i,this.limit=s,this.startAt=o,this.endAt=a,this.Te=null}}function cF(n,e=null,t=[],r=[],i=null,s=null,o=null){return new Y0e(n,e,t,r,i,s,o)}function lN(n){const e=Gt(n);if(e.Te===null){let t=e.path.canonicalString();e.collectionGroup!==null&&(t+="|cg:"+e.collectionGroup),t+="|f:",t+=e.filters.map(r=>PC(r)).join(","),t+="|ob:",t+=e.orderBy.map(r=>function(s){return s.field.canonicalString()+s.dir}(r)).join(","),yS(e.limit)||(t+="|l:",t+=e.limit),e.startAt&&(t+="|lb:",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map(r=>mp(r)).join(",")),e.endAt&&(t+="|ub:",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map(r=>mp(r)).join(",")),e.Te=t}return e.Te}function cN(n,e){if(n.limit!==e.limit||n.orderBy.length!==e.orderBy.length)return!1;for(let t=0;t<n.orderBy.length;t++)if(!B0e(n.orderBy[t],e.orderBy[t]))return!1;if(n.filters.length!==e.filters.length)return!1;for(let t=0;t<n.filters.length;t++)if(!VG(n.filters[t],e.filters[t]))return!1;return n.collectionGroup===e.collectionGroup&&!!n.path.isEqual(e.path)&&!!lF(n.startAt,e.startAt)&&lF(n.endAt,e.endAt)}function NC(n){return Mt.isDocumentKey(n.path)&&n.collectionGroup===null&&n.filters.length===0}/** 5371 * @license 5372 * Copyright 2017 Google LLC 5373 * 5374 * Licensed under the Apache License, Version 2.0 (the "License"); 5375 * you may not use this file except in compliance with the License. 5376 * You may obtain a copy of the License at 5377 * 5378 * http://www.apache.org/licenses/LICENSE-2.0 5379 * 5380 * Unless required by applicable law or agreed to in writing, software 5381 * distributed under the License is distributed on an "AS IS" BASIS, 5382 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5383 * See the License for the specific language governing permissions and 5384 * limitations under the License. 5385 */class vv{constructor(e,t=null,r=[],i=[],s=null,o="F",a=null,l=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=r,this.filters=i,this.limit=s,this.limitType=o,this.startAt=a,this.endAt=l,this.Ie=null,this.Ee=null,this.Re=null,this.startAt,this.endAt}}function Q0e(n,e,t,r,i,s,o,a){return new vv(n,e,t,r,i,s,o,a)}function zG(n){return new vv(n)}function uF(n){return n.filters.length===0&&n.limit===null&&n.startAt==null&&n.endAt==null&&(n.explicitOrderBy.length===0||n.explicitOrderBy.length===1&&n.explicitOrderBy[0].field.isKeyField())}function J0e(n){return Mt.isDocumentKey(n.path)&&n.collectionGroup===null&&n.filters.length===0}function HG(n){return n.collectionGroup!==null}function Ag(n){const e=Gt(n);if(e.Ie===null){e.Ie=[];const t=new Set;for(const s of e.explicitOrderBy)e.Ie.push(s),t.add(s.field.canonicalString());const r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(o){let a=new jr(oi.comparator);return o.filters.forEach(l=>{l.getFlattenedFilters().forEach(c=>{c.isInequality()&&(a=a.add(c.field))})}),a})(e).forEach(s=>{t.has(s.canonicalString())||s.isKeyField()||e.Ie.push(new j1(s,r))}),t.has(oi.keyField().canonicalString())||e.Ie.push(new j1(oi.keyField(),r))}return e.Ie}function Pa(n){const e=Gt(n);return e.Ee||(e.Ee=Z0e(e,Ag(n))),e.Ee}function Z0e(n,e){if(n.limitType==="F")return cF(n.path,n.collectionGroup,e,n.filters,n.limit,n.startAt,n.endAt);{e=e.map(i=>{const s=i.dir==="desc"?"asc":"desc";return new j1(i.field,s)});const t=n.endAt?new V1(n.endAt.position,n.endAt.inclusive):null,r=n.startAt?new V1(n.startAt.position,n.startAt.inclusive):null;return cF(n.path,n.collectionGroup,e,n.filters,n.limit,t,r)}}function IC(n,e){const t=n.filters.concat([e]);return new vv(n.path,n.collectionGroup,n.explicitOrderBy.slice(),t,n.limit,n.limitType,n.startAt,n.endAt)}function LC(n,e,t){return new vv(n.path,n.collectionGroup,n.explicitOrderBy.slice(),n.filters.slice(),e,t,n.startAt,n.endAt)}function xS(n,e){return cN(Pa(n),Pa(e))&&n.limitType===e.limitType}function GG(n){return`${lN(Pa(n))}|lt:${n.limitType}`}function Xh(n){return`Query(target=${function(t){let r=t.path.canonicalString();return t.collectionGroup!==null&&(r+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(r+=`, filters: [${t.filters.map(i=>jG(i)).join(", ")}]`),yS(t.limit)||(r+=", limit: "+t.limit),t.orderBy.length>0&&(r+=`, orderBy: [${t.orderBy.map(i=>function(o){return`${o.field.canonicalString()} (${o.dir})`}(i)).join(", ")}]`),t.startAt&&(r+=", startAt: ",r+=t.startAt.inclusive?"b:":"a:",r+=t.startAt.position.map(i=>mp(i)).join(",")),t.endAt&&(r+=", endAt: ",r+=t.endAt.inclusive?"a:":"b:",r+=t.endAt.position.map(i=>mp(i)).join(",")),`Target(${r})`}(Pa(n))}; limitType=${n.limitType})`}function _S(n,e){return e.isFoundDocument()&&function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):Mt.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)}(n,e)&&function(r,i){for(const s of Ag(r))if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0}(n,e)&&function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0}(n,e)&&function(r,i){return!(r.startAt&&!function(o,a,l){const c=aF(o,a,l);return o.inclusive?c<=0:c<0}(r.startAt,Ag(r),i)||r.endAt&&!function(o,a,l){const c=aF(o,a,l);return o.inclusive?c>=0:c>0}(r.endAt,Ag(r),i))}(n,e)}function exe(n){return n.collectionGroup||(n.path.length%2==1?n.path.lastSegment():n.path.get(n.path.length-2))}function WG(n){return(e,t)=>{let r=!1;for(const i of Ag(n)){const s=txe(i,e,t);if(s!==0)return s;r=r||i.field.isKeyField()}return 0}}function txe(n,e,t){const r=n.field.isKeyField()?Mt.comparator(e.key,t.key):function(s,o,a){const l=o.data.field(s),c=a.data.field(s);return l!==null&&c!==null?pp(l,c):It(42886)}(n.field,e,t);switch(n.dir){case"asc":return r;case"desc":return-1*r;default:return It(19790,{direction:n.dir})}}/** 5386 * @license 5387 * Copyright 2017 Google LLC 5388 * 5389 * Licensed under the Apache License, Version 2.0 (the "License");
5390 * you may not use this file except in compliance with the License. 5391 * You may obtain a copy of the License at 5392 * 5393 * http://www.apache.org/licenses/LICENSE-2.0 5394 * 5395 * Unless required by applicable law or agreed to in writing, software 5396 * distributed under the License is distributed on an "AS IS" BASIS, 5397 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5398 * See the License for the specific language governing permissions and 5399 * limitations under the License. 5400 */class Hd{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){const t=this.mapKeyFn(e),r=this.inner[t];if(r!==void 0){for(const[i,s]of r)if(this.equalsFn(i,e))return s}}has(e){return this.get(e)!==void 0}set(e,t){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return this.inner[r]=[[e,t]],void this.innerSize++;for(let s=0;s<i.length;s++)if(this.equalsFn(i[s][0],e))return void(i[s]=[e,t]);i.push([e,t]),this.innerSize++}delete(e){const t=this.mapKeyFn(e),r=this.inner[t];if(r===void 0)return!1;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return r.length===1?delete this.inner[t]:r.splice(i,1),this.innerSize--,!0;return!1}forEach(e){lu(this.inner,(t,r)=>{for(const[i,s]of r)e(i,s)})}isEmpty(){return MG(this.inner)}size(){return this.innerSize}}/** 5401 * @license 5402 * Copyright 2017 Google LLC 5403 * 5404 * Licensed under the Apache License, Version 2.0 (the "License"); 5405 * you may not use this file except in compliance with the License. 5406 * You may obtain a copy of the License at 5407 * 5408 * http://www.apache.org/licenses/LICENSE-2.0 5409 * 5410 * Unless required by applicable law or agreed to in writing, software 5411 * distributed under the License is distributed on an "AS IS" BASIS, 5412 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5413 * See the License for the specific language governing permissions and 5414 * limitations under the License. 5415 */const nxe=new or(Mt.comparator);function Ml(){return nxe}const $G=new or(Mt.comparator);function eg(...n){let e=$G;for(const t of n)e=e.insert(t.key,t);return e}function qG(n){let e=$G;return n.forEach((t,r)=>e=e.insert(t,r.overlayedDocument)),e}function td(){return Cg()}function XG(){return Cg()}function Cg(){return new Hd(n=>n.toString(),(n,e)=>n.isEqual(e))}const rxe=new or(Mt.comparator),ixe=new jr(Mt.comparator);function un(...n){let e=ixe;for(const t of n)e=e.add(t);return e}const sxe=new jr(cn);function oxe(){return sxe}/** 5416 * @license 5417 * Copyright 2020 Google LLC 5418 * 5419 * Licensed under the Apache License, Version 2.0 (the "License"); 5420 * you may not use this file except in compliance with the License. 5421 * You may obtain a copy of the License at 5422 * 5423 * http://www.apache.org/licenses/LICENSE-2.0 5424 * 5425 * Unless required by applicable law or agreed to in writing, software 5426 * distributed under the License is distributed on an "AS IS" BASIS, 5427 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5428 * See the License for the specific language governing permissions and 5429 * limitations under the License. 5430 */function uN(n,e){if(n.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:O1(e)?"-0":e}}function KG(n){return{integerValue:""+n}}function axe(n,e){return L0e(e)?KG(e):uN(n,e)}/** 5431 * @license 5432 * Copyright 2018 Google LLC 5433 * 5434 * Licensed under the Apache License, Version 2.0 (the "License"); 5435 * you may not use this file except in compliance with the License. 5436 * You may obtain a copy of the License at 5437 * 5438 * http://www.apache.org/licenses/LICENSE-2.0 5439 * 5440 * Unless required by applicable law or agreed to in writing, software 5441 * distributed under the License is distributed on an "AS IS" BASIS, 5442 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5443 * See the License for the specific language governing permissions and 5444 * limitations under the License. 5445 */class wS{constructor(){this._=void 0}}function lxe(n,e,t){return n instanceof B1?function(i,s){const o={fields:{[RG]:{stringValue:CG},[NG]:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&oN(s)&&(s=vS(s)),s&&(o.fields[PG]=s),{mapValue:o}}(t,e):n instanceof Ly?QG(n,e):n instanceof Dy?JG(n,e):function(i,s){const o=YG(i,s),a=dF(o)+dF(i.Ae);return RC(o)&&RC(i.Ae)?KG(a):uN(i.serializer,a)}(n,e)}function cxe(n,e,t){return n instanceof Ly?QG(n,e):n instanceof Dy?JG(n,e):t}function YG(n,e){return n instanceof z1?function(r){return RC(r)||function(s){return!!s&&"doubleValue"in s}(r)}(e)?e:{integerValue:0}:null}class B1 extends wS{}class Ly extends wS{constructor(e){super(),this.elements=e}}function QG(n,e){const t=ZG(e);for(const r of n.elements)t.some(i=>Fa(i,r))||t.push(r);return{arrayValue:{values:t}}}class Dy extends wS{constructor(e){super(),this.elements=e}}function JG(n,e){let t=ZG(e);for(const r of n.elements)t=t.filter(i=>!Fa(i,r));return{arrayValue:{values:t}}}
5445class z1 extends wS{constructor(e,t){super(),this.serializer=e,this.Ae=t}}function dF(n){return vr(n.integerValue||n.doubleValue)}function ZG(n){return aN(n)&&n.arrayValue.values?n.arrayValue.values.slice():[]}function uxe(n,e){return n.field.isEqual(e.field)&&function(r,i){return r instanceof Ly&&i instanceof Ly||r instanceof Dy&&i instanceof Dy?fp(r.elements,i.elements,Fa):r instanceof z1&&i instanceof z1?Fa(r.Ae,i.Ae):r instanceof B1&&i instanceof B1}(n.transform,e.transform)}class dxe{constructor(e,t){this.version=e,this.transformResults=t}}class Yo{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new Yo}static exists(e){return new Yo(void 0,e)}static updateTime(e){return new Yo(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function P_(n,e){return n.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(n.updateTime):n.exists===void 0||n.exists===e.isFoundDocument()}class SS{}function eW(n,e){if(!n.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return n.isNoDocument()?new dN(n.key,Yo.none()):new xv(n.key,n.data,Yo.none());{const t=n.data,r=gs.empty();let i=new jr(oi.comparator);for(let s of e.fields)if(!i.has(s)){let o=t.field(s);o===null&&s.length>1&&(s=s.popLast(),o=t.field(s)),o===null?r.delete(s):r.set(s,o),i=i.add(s)}return new cu(n.key,r,new Bs(i.toArray()),Yo.none())}}function hxe(n,e,t){n instanceof xv?function(i,s,o){const a=i.value.clone(),l=fF(i.fieldTransforms,s,o.transformResults);a.setAll(l),s.convertToFoundDocument(o.version,a).setHasCommittedMutations()}(n,e,t):n instanceof cu?function(i,s,o){if(!P_(i.precondition,s))return void s.convertToUnknownDocument(o.version);const a=fF(i.fieldTransforms,s,o.transformResults),l=s.data;l.setAll(tW(i)),l.setAll(a),s.convertToFoundDocument(o.version,l).setHasCommittedMutations()}(n,e,t):function(i,s,o){s.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,t)}function Rg(n,e,t,r){return n instanceof xv?function(s,o,a,l){if(!P_(s.precondition,o))return a;const c=s.value.clone(),u=pF(s.fieldTransforms,l,o);return c.setAll(u),o.convertToFoundDocument(o.version,c).setHasLocalMutations(),null}(n,e,t,r):n instanceof cu?function(s,o,a,l){if(!P_(s.precondition,o))return a;const c=pF(s.fieldTransforms,l,o),u=o.data;return u.setAll(tW(s)),u.setAll(c),o.convertToFoundDocument(o.version,u).setHasLocalMutations(),a===null?null:a.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(d=>d.field))}(n,e,t,r):function(s,o,a){return P_(s.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):a}(n,e,t)}function fxe(n,e){let t=null;for(const r of n.fieldTransforms){const i=e.data.field(r.field),s=YG(r.transform,i||null);s!=null&&(t===null&&(t=gs.empty()),t.set(r.field,s))}return t||null}function hF(n,e){return n.type===e.type&&!!n.key.isEqual(e.key)&&!!n.precondition.isEqual(e.precondition)&&!!function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&fp(r,i,(s,o)=>uxe(s,o))}(n.fieldTransforms,e.fieldTransforms)&&(n.type===0?n.value.isEqual(e.value):n.type!==1||n.data.isEqual(e.data)&&n.fieldMask.isEqual(e.fieldMask))}class xv extends SS{constructor(e,t,r,i=[]){super(),this.key=e,this.value=t,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class cu extends SS{constructor(e,t,r,i,s=[]){super(),this.key=e,this.data=t,this.fieldMask=r,this.precondition=i,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function tW(n){const e=new Map;return n.fieldMask.fields.forEach(t=>{if(!t.isEmpty()){const r=n.data.field(t);e.set(t,r)}}),e}function fF(n,e,t){const r=new Map;Cn(n.length===t.length,32656,{Ve:t.length,de:n.length});for(let i=0;i<t.length;i++){const s=n[i],o=s.transform,a=e.data.field(s.field);r.set(s.field,cxe(o,a,t[i]))}return r}function pF(n,e,t){const r=new Map;for(const i of n){const s=i.transform,o=t.data.field(i.field);r.set(i.field,lxe(s,o,e))}return r}class dN extends SS{constructor(e,t){super(),this.key=e,this.prec
5445ondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class pxe extends SS{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/** 5446 * @license 5447 * Copyright 2017 Google LLC 5448 * 5449 * Licensed under the Apache License, Version 2.0 (the "License"); 5450 * you may not use this file except in compliance with the License. 5451 * You may obtain a copy of the License at 5452 * 5453 * http://www.apache.org/licenses/LICENSE-2.0 5454 * 5455 * Unless required by applicable law or agreed to in writing, software 5456 * distributed under the License is distributed on an "AS IS" BASIS, 5457 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5458 * See the License for the specific language governing permissions and 5459 * limitations under the License. 5460 */class mxe{constructor(e,t,r,i){this.batchId=e,this.localWriteTime=t,this.baseMutations=r,this.mutations=i}applyToRemoteDocument(e,t){const r=t.mutationResults;for(let i=0;i<this.mutations.length;i++){const s=this.mutations[i];s.key.isEqual(e.key)&&hxe(s,e,r[i])}}applyToLocalView(e,t){for(const r of this.baseMutations)r.key.isEqual(e.key)&&(t=Rg(r,e,t,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(e.key)&&(t=Rg(r,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){const r=XG();return this.mutations.forEach(i=>{const s=e.get(i.key),o=s.overlayedDocument;let a=this.applyToLocalView(o,s.mutatedFields);a=t.has(i.key)?null:a;const l=eW(o,a);l!==null&&r.set(i.key,l),o.isValidDocument()||o.convertToNoDocument(Ht.min())}),r}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),un())}isEqual(e){return this.batchId===e.batchId&&fp(this.mutations,e.mutations,(t,r)=>hF(t,r))&&fp(this.baseMutations,e.baseMutations,(t,r)=>hF(t,r))}}
5460class hN{constructor(e,t,r,i){this.batch=e,this.commitVersion=t,this.mutationResults=r,this.docVersions=i}static from(e,t,r){Cn(e.mutations.length===r.length,58842,{me:e.mutations.length,fe:r.length});let i=function(){return rxe}();const s=e.mutations;for(let o=0;o<s.length;o++)i=i.insert(s[o].key,r[o].version);return new hN(e,t,r,i)}}/** 5461 * @license 5462 * Copyright 2022 Google LLC 5463 * 5464 * Licensed under the Apache License, Version 2.0 (the "License"); 5465 * you may not use this file except in compliance with the License. 5466 * You may obtain a copy of the License at 5467 * 5468 * http://www.apache.org/licenses/LICENSE-2.0 5469 * 5470 * Unless required by applicable law or agreed to in writing, software 5471 * distributed under the License is distributed on an "AS IS" BASIS, 5472 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5473 * See the License for the specific language governing permissions and 5474 * limitations under the License. 5475 */class gxe{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return e!==null&&this.mutation===e.mutation}toString(){return`Overlay{ 5476 largestBatchId: ${this.largestBatchId}, 5477 mutation: ${this.mutation.toString()} 5478 }`}}/** 5479 * @license 5480 * Copyright 2017 Google LLC 5481 * 5482 * Licensed under the Apache License, Version 2.0 (the "License"); 5483 * you may not use this file except in compliance with the License. 5484 * You may obtain a copy of the License at 5485 * 5486 * http://www.apache.org/licenses/LICENSE-2.0 5487 * 5488 * Unless required by applicable law or agreed to in writing, software 5489 * distributed under the License is distributed on an "AS IS" BASIS, 5490 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5491 * See the License for the specific language governing permissions and 5492 * limitations under the License. 5493 */class yxe{constructor(e,t){this.count=e,this.unchangedNames=t}}/** 5494 * @license 5495 * Copyright 2017 Google LLC 5496 * 5497 * Licensed under the Apache License, Version 2.0 (the "License"); 5498 * you may not use this file except in compliance with the License. 5499 * You may obtain a copy of the License at 5500 * 5501 * http://www.apache.org/licenses/LICENSE-2.0 5502 * 5503 * Unless required by applicable law or agreed to in writing, software 5504 * distributed under the License is distributed on an "AS IS" BASIS, 5505 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5506 * See the License for the specific language governing permissions and 5507 * limitations under the License. 5508 */var Ar,hn;function vxe(n){switch(n){case Ee.OK:return It(64938);case Ee.CANCELLED:case Ee.UNKNOWN:case Ee.DEADLINE_EXCEEDED:case Ee.RESOURCE_EXHAUSTED:case Ee.INTERNAL:case Ee.UNAVAILABLE:case Ee.UNAUTHENTICATED:return!1;case Ee.INVALID_ARGUMENT:case Ee.NOT_FOUND:case Ee.ALREADY_EXISTS:case Ee.PERMISSION_DENIED:case Ee.FAILED_PRECONDITION:case Ee.ABORTED:case Ee.OUT_OF_RANGE:case Ee.UNIMPLEMENTED:case Ee.DATA_LOSS:return!0;default:return It(15467,{code:n})}}function nW(n){if(n===void 0)return Tl("GRPC error has no .code"),Ee.UNKNOWN;switch(n){case Ar.OK:return Ee.OK;case Ar.CANCELLED:return Ee.CANCELLED;case Ar.UNKNOWN:return Ee.UNKNOWN;case Ar.DEADLINE_EXCEEDED:return Ee.DEADLINE_EXCEEDED;case Ar.RESOURCE_EXHAUSTED:return Ee.RESOURCE_EXHAUSTED;case Ar.INTERNAL:return Ee.INTERNAL;case Ar.UNAVAILABLE:return Ee.UNAVAILABLE;case Ar.UNAUTHENTICATED:return Ee.UNAUTHENTICATED;case Ar.INVALID_ARGUMENT:return Ee.INVALID_ARGUMENT;case Ar.NOT_FOUND:return Ee.NOT_FOUND;case Ar.ALREADY_EXISTS:return Ee.ALREADY_EXISTS;case Ar.PERMISSION_DENIED:return Ee.PERMISSION_DENIED;case Ar.FAILED_PRECONDITION:return Ee.FAILED_PRECONDITION;case Ar.ABORTED:return Ee.ABORTED;case Ar.OUT_OF_RANGE:return Ee.OUT_OF_RANGE;case Ar.UNIMPLEMENTED:return Ee.UNIMPLEMENTED;case Ar.DATA_LOSS:return Ee.DATA_LOSS;default:return It(39323,{code:n})}}(hn=Ar||(Ar={}))[hn.OK=0]="OK",hn[hn.CANCELLED=1]="CANCELLED",hn[hn.UNKNOWN=2]="UNKNOWN",hn[hn.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",hn[hn.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",hn[hn.NOT_FOUND=5]="NOT_FOUND",hn[hn.ALREADY_EXISTS=6]="ALREADY_EXISTS",hn[hn.PERMISSION_DENIED=7]="PERMISSION_DENIED",hn[hn.UNAUTHENTICATED=16]="UNAUTHENTICATED",hn[hn.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",hn[hn.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",hn[hn.ABORTED=10]="ABORTED",hn[hn.OUT_OF_RANGE=11]="OUT_OF_RANGE",hn[hn.UNIMPLEMENT
vendor: 4,107 bytes, lines 5508-5557
5508ED=12]="UNIMPLEMENTED",hn[hn.INTERNAL=13]="INTERNAL",hn[hn.UNAVAILABLE=14]="UNAVAILABLE",hn[hn.DATA_LOSS=15]="DATA_LOSS";/** 5509 * @license 5510 * Copyright 2023 Google LLC 5511 * 5512 * Licensed under the Apache License, Version 2.0 (the "License"); 5513 * you may not use this file except in compliance with the License. 5514 * You may obtain a copy of the License at 5515 * 5516 * http://www.apache.org/licenses/LICENSE-2.0 5517 * 5518 * Unless required by applicable law or agreed to in writing, software 5519 * distributed under the License is distributed on an "AS IS" BASIS, 5520 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5521 * See the License for the specific language governing permissions and 5522 * limitations under the License. 5523 */function xxe(){return new TextEncoder}/** 5524 * @license 5525 * Copyright 2022 Google LLC 5526 * 5527 * Licensed under the Apache License, Version 2.0 (the "License"); 5528 * you may not use this file except in compliance with the License. 5529 * You may obtain a copy of the License at 5530 * 5531 * http://www.apache.org/licenses/LICENSE-2.0 5532 * 5533 * Unless required by applicable law or agreed to in writing, software 5534 * distributed under the License is distributed on an "AS IS" BASIS, 5535 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5536 * See the License for the specific language governing permissions and 5537 * limitations under the License. 5538 */const _xe=new Pc([4294967295,4294967295],0);function mF(n){const e=xxe().encode(n),t=new mG;return t.update(e),new Uint8Array(t.digest())}function gF(n){const e=new DataView(n.buffer),t=e.getUint32(0,!0),r=e.getUint32(4,!0),i=e.getUint32(8,!0),s=e.getUint32(12,!0);return[new Pc([t,r],0),new Pc([i,s],0)]}class fN{constructor(e,t,r){if(this.bitmap=e,this.padding=t,this.hashCount=r,t<0||t>=8)throw new tg(`Invalid padding: ${t}`);if(r<0)throw new tg(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new tg(`Invalid hash count: ${r}`);if(e.length===0&&t!==0)throw new tg(`Invalid padding when bitmap length is 0: ${t}`);this.ge=8*e.length-t,this.pe=Pc.fromNumber(this.ge)}ye(e,t,r){let i=e.add(t.multiply(Pc.fromNumber(r)));return i.compare(_xe)===1&&(i=new Pc([i.getBits(0),i.getBits(1)],0)),i.modulo(this.pe).toNumber()}we(e){return!!(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(this.ge===0)return!1;const t=mF(e),[r,i]=gF(t);for(let s=0;s<this.hashCount;s++){const o=this.ye(r,i,s);if(!this.we(o))return!1}return!0}static create(e,t,r){const i=e%8==0?0:8-e%8,s=new Uint8Array(Math.ceil(e/8)),o=new fN(s,i,t);return r.forEach(a=>o.insert(a)),o}insert(e){if(this.ge===0)return;const t=mF(e),[r,i]=gF(t);for(let s=0;s<this.hashCount;s++){const o=this.ye(r,i,s);this.be(o)}}be(e){const t=Math.floor(e/8),r=e%8;this.bitmap[t]|=1<<r}}class tg extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/** 5539 * @license 5540 * Copyright 2017 Google LLC 5541 * 5542 * Licensed under the Apache License, Version 2.0 (the "License"); 5543 * you may not use this file except in compliance with the License. 5544 * You may obtain a copy of the License at 5545 * 5546 * http://www.apache.org/licenses/LICENSE-2.0 5547 * 5548 * Unless required by applicable law or agreed to in writing, software 5549 * distributed under the License is distributed on an "AS IS" BASIS, 5550 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5551 * See the License for the specific language governing permissions and 5552 * limitations under the License. 5553 */class bS{constructor(e,t,r,i,s){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=s}static createSynthesizedRemoteEventForCurrentChange(e,t,r){const i=new Map;return i.set(e,_v.createSynthesizedTargetChangeForCurrentChange(e,t,r)),new bS(Ht.min(),i,new or(cn),Ml(),un())}}class _v{constructor(e,t,r,i,s){this.resumeToken=e,this.current=t,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=s}static createSynthesizedTargetChangeForCurrentChange(e,t,r){return new _v(r,t,un(),un(),un())}}/** 5554 * @license 5555 * Copyright 2017 Google LLC 5556 * 5557 * Licensed under the Apache License, Version 2.0 (the "License");
5558 * you may not use this file except in compliance with the License. 5559 * You may obtain a copy of the License at 5560 * 5561 * http://www.apache.org/licenses/LICENSE-2.0 5562 * 5563 * Unless required by applicable law or agreed to in writing, software 5564 * distributed under the License is distributed on an "AS IS" BASIS, 5565 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5566 * See the License for the specific language governing permissions and 5567 * limitations under the License. 5568 */class N_{constructor(e,t,r,i){this.Se=e,this.removedTargetIds=t,this.key=r,this.De=i}}class rW{constructor(e,t){this.targetId=e,this.Ce=t}}class iW{constructor(e,t,r=ui.EMPTY_BYTE_STRING,i=null){this.state=e,this.targetIds=t,this.resumeToken=r,this.cause=i}}class yF{constructor(){this.ve=0,this.Fe=vF(),this.Me=ui.EMPTY_BYTE_STRING,this.xe=!1,this.Oe=!0}get current(){return this.xe}get resumeToken(){return this.Me}get Ne(){return this.ve!==0}get Be(){return this.Oe}Le(e){e.approximateByteSize()>0&&(this.Oe=!0,this.Me=e)}ke(){let e=un(),t=un(),r=un();return this.Fe.forEach((i,s)=>{switch(s){case 0:e=e.add(i);break;case 2:t=t.add(i);break;case 1:r=r.add(i);break;default:It(38017,{changeType:s})}}),new _v(this.Me,this.xe,e,t,r)}Ke(){this.Oe=!1,this.Fe=vF()}qe(e,t){this.Oe=!0,this.Fe=this.Fe.insert(e,t)}Ue(e){this.Oe=!0,this.Fe=this.Fe.remove(e)}$e(){this.ve+=1}We(){this.ve-=1,Cn(this.ve>=0,3241,{ve:this.ve})}Qe(){this.Oe=!0,this.xe=!0}}class wxe{constructor(e){this.Ge=e,this.ze=new Map,this.je=Ml(),this.He=Wx(),this.Je=Wx(),this.Ze=new or(cn)}Xe(e){for(const t of e.Se)e.De&&e.De.isFoundDocument()?this.Ye(t,e.De):this.et(t,e.key,e.De);for(const t of e.removedTargetIds)this.et(t,e.key,e.De)}tt(e){this.forEachTarget(e,t=>{const r=this.nt(t);switch(e.state){case 0:this.rt(t)&&r.Le(e.resumeToken);break;case 1:r.We(),r.Ne||r.Ke(),r.Le(e.resumeToken);break;case 2:r.We(),r.Ne||this.removeTarget(t);break;case 3:this.rt(t)&&(r.Qe(),r.Le(e.resumeToken));break;case 4:this.rt(t)&&(this.it(t),r.Le(e.resumeToken));break;default:It(56790,{state:e.state})}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.ze.forEach((r,i)=>{this.rt(i)&&t(i)})}st(e){const t=e.targetId,r=e.Ce.count,i=this.ot(t);if(i){const s=i.target;if(NC(s))if(r===0){const o=new Mt(s.path);this.et(t,o,Ni.newNoDocument(o,Ht.min()))}else Cn(r===1,20013,{expectedCount:r});else{const o=this._t(t);if(o!==r){const a=this.ut(e),l=a?this.ct(a,e,o):1;if(l!==0){this.it(t);const c=l===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ze=this.Ze.insert(t,c)}}}}}ut(e){const t=e.Ce.unchangedNames;if(!t||!t.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:s=0}=t;let o,a;try{o=$c(r).toUint8Array()}catch(l){if(l instanceof AG)return hp("Decoding the base64 bloom filter in existence filter failed ("+l.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw l}try{a=new fN(o,i,s)}catch(l){return hp(l instanceof tg?"BloomFilter error: ":"Applying bloom filter failed: ",l),null}return a.ge===0?null:a}ct(e,t,r){return t.Ce.count===r-this.Pt(e,t.targetId)?0:2}Pt(e,t){const r=this.Ge.getRemoteKeysForTarget(t);let i=0;return r.forEach(s=>{const o=this.Ge.ht(),a=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;e.mightContain(a)||(this.et(t,s,null),i++)}),i}Tt(e){const t=new Map;this.ze.forEach((s,o)=>{const a=this.ot(o);if(a){if(s.current&&NC(a.target)){const l=new Mt(a.target.path);this.It(l).has(o)||this.Et(o,l)||this.et(o,l,Ni.newNoDocument(l,e))}s.Be&&(t.set(o,s.ke()),s.Ke())}});let r=un();this.Je.forEach((s,o)=>{let a=!0;o.forEachWhile(l=>{const c=this.ot(l);return!c||c.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(r=r.add(s))}),this.je.forEach((s,o)=>o.setReadTime(e));const i=new bS(e,t,this.Ze,this.je,r);return this.je=Ml(),this.He=Wx(),this.Je=Wx(),this.Ze=new or(cn),i}Ye(e,t){if(!this.rt(e))return;const r=this.Et(e,t.key)?2:0;this.nt(e).qe(t.key,r),this.je=this.je.insert(t.key,t),this.He=this.He.insert(t.key,this.It(t.key).add(e)),this.Je=this.Je.insert(t.key,this.Rt(t.key).add(e))}et(e,t,r){if(!this.rt(e))return;const i=this.nt(e);this.Et(e,t)?i.qe(t,1):i.Ue(t),this.Je=this.Je.insert(t,this.Rt(t).delete(e)),this.Je=this.Je.insert(t,this.Rt(t).add(e)),r&&(this.je=this.je.insert(t,r))}removeTarget(e){this.ze.delete(e)}_t(e){const t=this.nt(e).ke();return this.Ge.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}$e(e){this.nt(e).$e()}nt(e){let t=this.ze.get(e);return t||(t=new yF,this.ze.set(e,t)),t}Rt(e){let t=this.Je.get(e);return t||(t=new jr(cn),this.Je=this.Je.insert(e,t)),t}It(e){let t=this.He.get(e);return t||(t=new jr(cn),this.He=this.He.insert(e,t)),t}rt(e){const t=this.ot(e)!==null;return t||at("WatchChangeAggregator","Detected inactive target",e),t}ot(e){const t=this.ze.get(e);return t&&t.Ne?null:this.Ge.At(e)}it(e){this.ze.set(e,new yF),this.Ge.getRemoteKeysForTarget(e).forEach(t=>{this.et(e,t,null)})}Et(e,t){return this.Ge.getRemoteKeysForTarget(e).has(t)}}function Wx(){return new or(Mt.comparator)}function vF(){return new or(Mt.comparator)}const Sxe={asc:"ASCENDING",desc:"DESCENDING"},bxe={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},Exe={and:"AND",or:"OR"};class Txe{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function DC(n,e){return n.useProto3Json||yS(e)?e:{value:e}}function H1(n,e){return n.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function sW(n,e){return n.useProto3Json?e.toBase64():e.toUint8Array()}function Mxe(n,e){return H1(n,e.toTimestamp())}function Na(n){return Cn(!!n,49232),Ht.fromTimestamp(function(t){const r=Wc(t);return new An(r.seconds,r.nanos)}(n))}function pN(n,e){return kC(n,e).canonicalString()}function kC(n,e){const t=function(i){return new Fn(["projects",i.projectId,"databases",i.database])}(n).child("documents");return e===void 0?t:t.child(e)}function oW(n){const e=Fn.fromString(n);return Cn(dW(e),10190,{key:e.toString()}),e}function OC(n,e){return pN(n.databaseId,e.path)}function jT(n,e){const t=oW(e);
5568if(t.get(1)!==n.databaseId.projectId)throw new rt(Ee.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+t.get(1)+" vs "+n.databaseId.projectId);if(t.get(3)!==n.databaseId.database)throw new rt(Ee.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+t.get(3)+" vs "+n.databaseId.database);return new Mt(lW(t))}function aW(n,e){return pN(n.databaseId,e)}function Axe(n){const e=oW(n);return e.length===4?Fn.emptyPath():lW(e)}function FC(n){return new Fn(["projects",n.databaseId.projectId,"databases",n.databaseId.database]).canonicalString()}function lW(n){return Cn(n.length>4&&n.get(4)==="documents",29091,{key:n.toString()}),n.popFirst(5)}function xF(n,e,t){return{name:OC(n,e),fields:t.value.mapValue.fields}}function Cxe(n,e){let t;if("targetChange"in e){e.targetChange;const r=function(c){return c==="NO_CHANGE"?0:c==="ADD"?1:c==="REMOVE"?2:c==="CURRENT"?3:c==="RESET"?4:It(39313,{state:c})}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],s=function(c,u){return c.useProto3Json?(Cn(u===void 0||typeof u=="string",58123),ui.fromBase64String(u||"")):(Cn(u===void 0||u instanceof Buffer||u instanceof Uint8Array,16193),ui.fromUint8Array(u||new Uint8Array))}(n,e.targetChange.resumeToken),o=e.targetChange.cause,a=o&&function(c){const u=c.code===void 0?Ee.UNKNOWN:nW(c.code);return new rt(u,c.message||"")}(o);t=new iW(r,i,s,a||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=jT(n,r.document.name),s=Na(r.document.updateTime),o=r.document.createTime?Na(r.document.createTime):Ht.min(),a=new gs({mapValue:{fields:r.document.fields}}),l=Ni.newFoundDocument(i,s,o,a),c=r.targetIds||[],u=r.removedTargetIds||[];t=new N_(c,u,l.key,l)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=jT(n,r.document),s=r.readTime?Na(r.readTime):Ht.min(),o=Ni.newNoDocument(i,s),a=r.removedTargetIds||[];t=new N_([],a,o.key,o)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=jT(n,r.document),s=r.removedTargetIds||[];t=new N_([],s,i,null)}else{if(!("filter"in e))return It(11601,{Vt:e});{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:s}=r,o=new yxe(i,s),a=r.targetId;t=new rW(a,o)}}return t}function Rxe(n,e){let t;if(e instanceof xv)t={update:xF(n,e.key,e.value)};else if(e instanceof dN)t={delete:OC(n,e.key)};else if(e instanceof cu)t={update:xF(n,e.key,e.data),updateMask:Uxe(e.fieldMask)};else{if(!(e instanceof pxe))return It(16599,{dt:e.type});t={verify:OC(n,e.key)}}return e.fieldTransforms.length>0&&(t.updateTransforms=e.fieldTransforms.map(r=>function(s,o){const a=o.transform;if(a instanceof B1)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof Ly)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof Dy)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof z1)return{fieldPath:o.field.canonicalString(),increment:a.Ae};throw It(20930,{transform:o.transform})}(0,r))),e.precondition.isNone||(t.currentDocument=function(i,s){return s.updateTime!==void 0?{updateTime:Mxe(i,s.updateTime)}:s.exists!==void 0?{exists:s.exists}:It(27497)}(n,e.precondition)),t}function Pxe(n,e){return n&&n.length>0?(Cn(e!==void 0,14353),n.map(t=>function(i,s){let o=i.updateTime?Na(i.updateTime):Na(s);return o.isEqual(Ht.min())&&(o=Na(s)),new dxe(o,i.transformResults||[])}(t,e))):[]}function Nxe(n,e){return{documents:[aW(n,e.path)]}}function Ixe(n,e){const t={structuredQuery:{}},r=e.path;let i;e.collectionGroup!==null?(i=r,t.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(i=r.popLast(),t.structuredQuery.from=[{collectionId:r.lastSegment()}]),t.parent=aW(n,i);const s=function(c){if(c.length!==0)return uW(na.create(c,"and"))}(e.filters);s&&(t.structuredQuery.where=s);const o=function(c){if(c.length!==0)return c.map(u=>function(m){return{field:Kh(m.field),direction:kxe(m.dir)}}(u))}(e.orderBy);o&&(t.structuredQuery.orderBy=o);const a=DC(n,e.limit);return a!==null&&(t.structuredQuery.limit=a),e.startAt&&(t.structuredQuery.startAt=function(c){return{before:c.inclusive,values:c.position}}(e.startAt)),e.endAt&&(t.structuredQuery.endAt=function(c){return{before:!c.inclusive,values:c.position}}(e.endAt)),{ft:t,parent:i}}function Lxe(n){let e=Axe(n.parent);
5568const t=n.structuredQuery,r=t.from?t.from.length:0;let i=null;if(r>0){Cn(r===1,65062);const u=t.from[0];u.allDescendants?i=u.collectionId:e=e.child(u.collectionId)}let s=[];t.where&&(s=function(d){const m=cW(d);return m instanceof na&&UG(m)?m.getFilters():[m]}(t.where));let o=[];t.orderBy&&(o=function(d){return d.map(m=>function(v){return new j1(Yh(v.field),function(x){switch(x){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(v.direction))}(m))}(t.orderBy));let a=null;t.limit&&(a=function(d){let m;return m=typeof d=="object"?d.value:d,yS(m)?null:m}(t.limit));let l=null;t.startAt&&(l=function(d){const m=!!d.before,g=d.values||[];return new V1(g,m)}(t.startAt));let c=null;return t.endAt&&(c=function(d){const m=!d.before,g=d.values||[];return new V1(g,m)}(t.endAt)),Q0e(e,i,o,s,a,"F",l,c)}function Dxe(n,e){const t=function(i){switch(i){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return It(28987,{purpose:i})}}(e.purpose);return t==null?null:{"goog-listen-tags":t}}function cW(n){return n.unaryFilter!==void 0?function(t){switch(t.unaryFilter.op){case"IS_NAN":const r=Yh(t.unaryFilter.field);return Pr.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=Yh(t.unaryFilter.field);return Pr.create(i,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=Yh(t.unaryFilter.field);return Pr.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=Yh(t.unaryFilter.field);return Pr.create(o,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":return It(61313);default:return It(60726)}}(n):n.fieldFilter!==void 0?function(t){return Pr.create(Yh(t.fieldFilter.field),function(i){switch(i){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":return It(58110);default:return It(50506)}}(t.fieldFilter.op),t.fieldFilter.value)}(n):n.compositeFilter!==void 0?function(t){return na.create(t.compositeFilter.filters.map(r=>cW(r)),function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return It(1026)}}(t.compositeFilter.op))}(n):It(30097,{filter:n})}function kxe(n){return Sxe[n]}function Oxe(n){return bxe[n]}function Fxe(n){return Exe[n]}function Kh(n){return{fieldPath:n.canonicalString()}}function Yh(n){return oi.fromServerFormat(n.fieldPath)}function uW(n){return n instanceof Pr?function(t){if(t.op==="=="){if(oF(t.value))return{unaryFilter:{field:Kh(t.field),op:"IS_NAN"}};if(sF(t.value))return{unaryFilter:{field:Kh(t.field),op:"IS_NULL"}}}else if(t.op==="!="){if(oF(t.value))return{unaryFilter:{field:Kh(t.field),op:"IS_NOT_NAN"}};if(sF(t.value))return{unaryFilter:{field:Kh(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Kh(t.field),op:Oxe(t.op),value:t.value}}}(n):n instanceof na?function(t){const r=t.getFilters().map(i=>uW(i));return r.length===1?r[0]:{compositeFilter:{op:Fxe(t.op),filters:r}}}(n):It(54877,{filter:n})}function Uxe(n){const e=[];return n.fields.forEach(t=>e.push(t.canonicalString())),{fieldPaths:e}}function dW(n){return n.length>=4&&n.get(0)==="projects"&&n.get(2)==="databases"}function hW(n){return!!n&&typeof n._toProto=="function"&&n._protoValueType==="ProtoValue"}/** 5569 * @license 5570 * Copyright 2017 Google LLC 5571 * 5572 * Licensed under the Apache License, Version 2.0 (the "License"); 5573 * you may not use this file except in compliance with the License. 5574 * You may obtain a copy of the License at 5575 * 5576 * http://www.apache.org/licenses/LICENSE-2.0 5577 * 5578 * Unless required by applicable law or agreed to in writing, software 5579 * distributed under the License is distributed on an "AS IS" BASIS, 5580 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5581 * See the License for the specific language governing permissions and 5582 * limitations under the License. 5583 */class pc{constructor(e,t,r,i,s=Ht.min(),o=Ht.min(),a=ui.EMPTY_BYTE_STRING,l=null){this.target=e,this.targetId=t,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a,this.expectedCount=l}withSequenceNumber(e){return new pc(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new pc(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new pc(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new pc(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/** 5584 * @license 5585 * Copyright 2017 Google LLC 5586 * 5587 * Licensed under the Apache License, Version 2.0 (the "License");
5588 * you may not use this file except in compliance with the License. 5589 * You may obtain a copy of the License at 5590 * 5591 * http://www.apache.org/licenses/LICENSE-2.0 5592 * 5593 * Unless required by applicable law or agreed to in writing, software 5594 * distributed under the License is distributed on an "AS IS" BASIS, 5595 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5596 * See the License for the specific language governing permissions and 5597 * limitations under the License. 5598 */class Vxe{constructor(e){this.yt=e}}function jxe(n){const e=Lxe({parent:n.parent,structuredQuery:n.structuredQuery});return n.limitType==="LAST"?LC(e,e.limit,"L"):e}/** 5599 * @license 5600 * Copyright 2019 Google LLC 5601 * 5602 * Licensed under the Apache License, Version 2.0 (the "License"); 5603 * you may not use this file except in compliance with the License. 5604 * You may obtain a copy of the License at 5605 * 5606 * http://www.apache.org/licenses/LICENSE-2.0 5607 * 5608 * Unless required by applicable law or agreed to in writing, software 5609 * distributed under the License is distributed on an "AS IS" BASIS, 5610 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5611 * See the License for the specific language governing permissions and 5612 * limitations under the License. 5613 */class Bxe{constructor(){this.Sn=new zxe}addToCollectionParentIndex(e,t){return this.Sn.add(t),Me.resolve()}getCollectionParents(e,t){return Me.resolve(this.Sn.getEntries(t))}addFieldIndex(e,t){return Me.resolve()}deleteFieldIndex(e,t){return Me.resolve()}deleteAllFieldIndexes(e){return Me.resolve()}createTargetIndexes(e,t){return Me.resolve()}getDocumentsMatchingTarget(e,t){return Me.resolve(null)}getIndexType(e,t){return Me.resolve(0)}getFieldIndexes(e,t){return Me.resolve([])}getNextCollectionGroupToUpdate(e){return Me.resolve(null)}getMinOffset(e,t){return Me.resolve(Gc.min())}getMinOffsetFromCollectionGroup(e,t){return Me.resolve(Gc.min())}updateCollectionGroup(e,t,r){return Me.resolve()}updateIndexEntries(e,t){return Me.resolve()}}class zxe{constructor(){this.index={}}add(e){const t=e.lastSegment(),r=e.popLast(),i=this.index[t]||new jr(Fn.comparator),s=!i.has(r);return this.index[t]=i.add(r),s}has(e){const t=e.lastSegment(),r=e.popLast(),i=this.index[t];return i&&i.has(r)}getEntries(e){return(this.index[e]||new jr(Fn.comparator)).toArray()}}/** 5614 * @license 5615 * Copyright 2018 Google LLC 5616 * 5617 * Licensed under the Apache License, Version 2.0 (the "License"); 5618 * you may not use this file except in compliance with the License. 5619 * You may obtain a copy of the License at 5620 * 5621 * http://www.apache.org/licenses/LICENSE-2.0 5622 * 5623 * Unless required by applicable law or agreed to in writing, software 5624 * distributed under the License is distributed on an "AS IS" BASIS, 5625 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5626 * See the License for the specific language governing permissions and 5627 * limitations under the License. 5628 */const _F={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},fW=41943040;class hs{static withCacheSize(e){return new hs(e,hs.DEFAULT_COLLECTION_PERCENTILE,hs.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,t,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=r}}/** 5629 * @license 5630 * Copyright 2017 Google LLC 5631 * 5632 * Licensed under the Apache License, Version 2.0 (the "License"); 5633 * you may not use this file except in compliance with the License. 5634 * You may obtain a copy of the License at 5635 * 5636 * http://www.apache.org/licenses/LICENSE-2.0 5637 * 5638 * Unless required by applicable law or agreed to in writing, software 5639 * distributed under the License is distributed on an "AS IS" BASIS, 5640 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5641 * See the License for the specific language governing permissions and 5642 * limitations under the License. 5643 */hs.DEFAULT_COLLECTION_PERCENTILE=10,hs.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,hs.DEFAULT=new hs(fW,hs.DEFAULT_COLLECTION_PERCENTILE,hs.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),hs.DISABLED=new hs(-1,0,0);/** 5644 * @license 5645 * Copyright 2017 Google LLC 5646 * 5647 * Licensed under the Apache License, Version 2.0 (the "License");
5648 * you may not use this file except in compliance with the License. 5649 * You may obtain a copy of the License at 5650 * 5651 * http://www.apache.org/licenses/LICENSE-2.0 5652 * 5653 * Unless required by applicable law or agreed to in writing, software 5654 * distributed under the License is distributed on an "AS IS" BASIS, 5655 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5656 * See the License for the specific language governing permissions and 5657 * limitations under the License. 5658 */class gp{constructor(e){this.sr=e}next(){return this.sr+=2,this.sr}static _r(){return new gp(0)}static ar(){return new gp(-1)}}/** 5659 * @license 5660 * Copyright 2020 Google LLC 5661 * 5662 * Licensed under the Apache License, Version 2.0 (the "License"); 5663 * you may not use this file except in compliance with the License. 5664 * You may obtain a copy of the License at 5665 * 5666 * http://www.apache.org/licenses/LICENSE-2.0 5667 * 5668 * Unless required by applicable law or agreed to in writing, software 5669 * distributed under the License is distributed on an "AS IS" BASIS, 5670 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5671 * See the License for the specific language governing permissions and 5672 * limitations under the License. 5673 */const wF="LruGarbageCollector",Hxe=1048576;function SF([n,e],[t,r]){const i=cn(n,t);return i===0?cn(e,r):i}class Gxe{constructor(e){this.Pr=e,this.buffer=new jr(SF),this.Tr=0}Ir(){return++this.Tr}Er(e){const t=[e,this.Ir()];if(this.buffer.size<this.Pr)this.buffer=this.buffer.add(t);else{const r=this.buffer.last();SF(t,r)<0&&(this.buffer=this.buffer.delete(r).add(t))}}get maxValue(){return this.buffer.last()[0]}}class Wxe{constructor(e,t,r){this.garbageCollector=e,this.asyncQueue=t,this.localStore=r,this.Rr=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.Ar(6e4)}stop(){this.Rr&&(this.Rr.cancel(),this.Rr=null)}get started(){return this.Rr!==null}Ar(e){at(wF,`Garbage collection scheduled in ${e}ms`),this.Rr=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,async()=>{this.Rr=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(t){Gp(t)?at(wF,"Ignoring IndexedDB error during garbage collection: ",t):await Hp(t)}await this.Ar(3e5)})}}class $xe{constructor(e,t){this.Vr=e,this.params=t}calculateTargetCount(e,t){return this.Vr.dr(e).next(r=>Math.floor(t/100*r))}nthSequenceNumber(e,t){if(t===0)return Me.resolve(gS.ce);const r=new Gxe(t);return this.Vr.forEachTarget(e,i=>r.Er(i.sequenceNumber)).next(()=>this.Vr.mr(e,i=>r.Er(i))).next(()=>r.maxValue)}removeTargets(e,t,r){return this.Vr.removeTargets(e,t,r)}removeOrphanedDocuments(e,t){return this.Vr.removeOrphanedDocuments(e,t)}collect(e,t){return this.params.cacheSizeCollectionThreshold===-1?(at("LruGarbageCollector","Garbage collection skipped; disabled"),Me.resolve(_F)):this.getCacheSize(e).next(r=>r<this.params.cacheSizeCollectionThreshold?(at("LruGarbageCollector",`Garbage collection skipped; Cache size ${r} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),_F):this.gr(e,t))}getCacheSize(e){return this.Vr.getCacheSize(e)}gr(e,t){let r,i,s,o,a,l,c;const u=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next(d=>(d>this.params.maximumSequenceNumbersToCollect?(at("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${d}`),i=this.params.maximumSequenceNumbersToCollect):i=d,o=Date.now(),this.nthSequenceNumber(e,i))).next(d=>(r=d,a=Date.now(),this.removeTargets(e,r,t))).next(d=>(s=d,l=Date.now(),this.removeOrphanedDocuments(e,r))).next(d=>(c=Date.now(),qh()<=fn.DEBUG&&at("LruGarbageCollector",`LRU Garbage Collection 5674 Counted targets in ${o-u}ms 5675 Determined least recently used ${i} in `+(a-o)+`ms 5676 Removed ${s} targets in `+(l-a)+`ms 5677 Removed ${d} documents in `+(c-l)+`ms 5678Total Duration: ${c-u}ms`),Me.resolve({didRun:!0,sequenceNumbersCollected:i,targetsRemoved:s,documentsRemoved:d})))}}function qxe(n,e){return new $xe(n,e)}/** 5679 * @license 5680 * Copyright 2017 Google LLC 5681 * 5682 * Licensed under the Apache License, Version 2.0 (the "License");
5683 * you may not use this file except in compliance with the License. 5684 * You may obtain a copy of the License at 5685 * 5686 * http://www.apache.org/licenses/LICENSE-2.0 5687 * 5688 * Unless required by applicable law or agreed to in writing, software 5689 * distributed under the License is distributed on an "AS IS" BASIS, 5690 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5691 * See the License for the specific language governing permissions and 5692 * limitations under the License. 5693 */class Xxe{constructor(){this.changes=new Hd(e=>e.toString(),(e,t)=>e.isEqual(t)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,Ni.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();const r=this.changes.get(t);return r!==void 0?Me.resolve(r):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/** 5694 * @license 5695 * Copyright 2017 Google LLC 5696 * 5697 * Licensed under the Apache License, Version 2.0 (the "License"); 5698 * you may not use this file except in compliance with the License. 5699 * You may obtain a copy of the License at 5700 * 5701 * http://www.apache.org/licenses/LICENSE-2.0 5702 * 5703 * Unless required by applicable law or agreed to in writing, software 5704 * distributed under the License is distributed on an "AS IS" BASIS, 5705 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5706 * See the License for the specific language governing permissions and 5707 * limitations under the License. 5708 *//** 5709 * @license 5710 * Copyright 2022 Google LLC 5711 * 5712 * Licensed under the Apache License, Version 2.0 (the "License"); 5713 * you may not use this file except in compliance with the License. 5714 * You may obtain a copy of the License at 5715 * 5716 * http://www.apache.org/licenses/LICENSE-2.0 5717 * 5718 * Unless required by applicable law or agreed to in writing, software 5719 * distributed under the License is distributed on an "AS IS" BASIS, 5720 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5721 * See the License for the specific language governing permissions and 5722 * limitations under the License. 5723 */class Kxe{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}/** 5724 * @license 5725 * Copyright 2017 Google LLC 5726 * 5727 * Licensed under the Apache License, Version 2.0 (the "License"); 5728 * you may not use this file except in compliance with the License. 5729 * You may obtain a copy of the License at 5730 * 5731 * http://www.apache.org/licenses/LICENSE-2.0 5732 * 5733 * Unless required by applicable law or agreed to in writing, software 5734 * distributed under the License is distributed on an "AS IS" BASIS, 5735 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5736 * See the License for the specific language governing permissions and 5737 * limitations under the License.
5738 */class Yxe{constructor(e,t,r,i){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,t){let r=null;return this.documentOverlayCache.getOverlay(e,t).next(i=>(r=i,this.remoteDocumentCache.getEntry(e,t))).next(i=>(r!==null&&Rg(r.mutation,i,Bs.empty(),An.now()),i))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(r=>this.getLocalViewOfDocuments(e,r,un()).next(()=>r))}getLocalViewOfDocuments(e,t,r=un()){const i=td();return this.populateOverlays(e,i,t).next(()=>this.computeViews(e,t,i,r).next(s=>{let o=eg();return s.forEach((a,l)=>{o=o.insert(a,l.overlayedDocument)}),o}))}getOverlayedDocuments(e,t){const r=td();return this.populateOverlays(e,r,t).next(()=>this.computeViews(e,t,r,un()))}populateOverlays(e,t,r){const i=[];return r.forEach(s=>{t.has(s)||i.push(s)}),this.documentOverlayCache.getOverlays(e,i).next(s=>{s.forEach((o,a)=>{t.set(o,a)})})}computeViews(e,t,r,i){let s=Ml();const o=Cg(),a=function(){return Cg()}();return t.forEach((l,c)=>{const u=r.get(c.key);i.has(c.key)&&(u===void 0||u.mutation instanceof cu)?s=s.insert(c.key,c):u!==void 0?(o.set(c.key,u.mutation.getFieldMask()),Rg(u.mutation,c,u.mutation.getFieldMask(),An.now())):o.set(c.key,Bs.empty())}),this.recalculateAndSaveOverlays(e,s).next(l=>(l.forEach((c,u)=>o.set(c,u)),t.forEach((c,u)=>a.set(c,new Kxe(u,o.get(c)??null))),a))}recalculateAndSaveOverlays(e,t){const r=Cg();let i=new or((o,a)=>o-a),s=un();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(o=>{for(const a of o)a.keys().forEach(l=>{const c=t.get(l);if(c===null)return;let u=r.get(l)||Bs.empty();u=a.applyToLocalView(c,u),r.set(l,u);const d=(i.get(a.batchId)||un()).add(l);i=i.insert(a.batchId,d)})}).next(()=>{const o=[],a=i.getReverseIterator();for(;a.hasNext();){const l=a.getNext(),c=l.key,u=l.value,d=XG();u.forEach(m=>{if(!s.has(m)){const g=eW(t.get(m),r.get(m));g!==null&&d.set(m,g),s=s.add(m)}}),o.push(this.documentOverlayCache.saveOverlays(e,c,d))}return Me.waitFor(o)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,t,r,i){return J0e(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):HG(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,r,i):this.getDocumentsMatchingCollectionQuery(e,t,r,i)}getNextDocuments(e,t,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,r,i).next(s=>{const o=i-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,r.largestBatchId,i-s.size):Me.resolve(td());let a=Ry,l=s;return o.next(c=>Me.forEach(c,(u,d)=>(a<d.largestBatchId&&(a=d.largestBatchId),s.get(u)?Me.resolve():this.remoteDocumentCache.getEntry(e,u).next(m=>{l=l.insert(u,m)}))).next(()=>this.populateOverlays(e,c,s)).next(()=>this.computeViews(e,l,c,un())).next(u=>({batchId:a,changes:qG(u)})))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new Mt(t)).next(r=>{let i=eg();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,t,r,i){const s=t.collectionGroup;let o=eg();return this.indexManager.getCollectionParents(e,s).next(a=>Me.forEach(a,l=>{const c=function(d,m){return new vv(m,null,d.explicitOrderBy.slice(),d.filters.slice(),d.limit,d.limitType,d.startAt,d.endAt)}(t,l.child(s));return this.getDocumentsMatchingCollectionQuery(e,c,r,i).next(u=>{u.forEach((d,m)=>{o=o.insert(d,m)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,t,r,i){let s;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,r.largestBatchId).next(o=>(s=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,r,s,i))).next(o=>{s.forEach((l,c)=>{const u=c.getKey();o.get(u)===null&&(o=o.insert(u,Ni.newInvalidDocument(u)))});let a=eg();return o.forEach((l,c)=>{const u=s.get(l);u!==void 0&&Rg(u.mutation,c,Bs.empty(),An.now()),_S(t,c)&&(a=a.insert(l,c))}),a})}}/** 5739 * @license 5740 * Copyright 2020 Google LLC 5741 * 5742 * Licensed under the Apache License, Version 2.0 (the "License"); 5743 * you may not use this file except in compliance with the License. 5744 * You may obtain a copy of the License at 5745 * 5746 * http://www.apache.org/licenses/LICENSE-2.0 5747 * 5748 * Unless required by applicable law or agreed to in writing, softw
5748are 5749 * distributed under the License is distributed on an "AS IS" BASIS, 5750 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5751 * See the License for the specific language governing permissions and 5752 * limitations under the License. 5753 */class Qxe{constructor(e){this.serializer=e,this.Nr=new Map,this.Br=new Map}getBundleMetadata(e,t){return Me.resolve(this.Nr.get(t))}saveBundleMetadata(e,t){return this.Nr.set(t.id,function(i){return{id:i.id,version:i.version,createTime:Na(i.createTime)}}(t)),Me.resolve()}getNamedQuery(e,t){return Me.resolve(this.Br.get(t))}saveNamedQuery(e,t){return this.Br.set(t.name,function(i){return{name:i.name,query:jxe(i.bundledQuery),readTime:Na(i.readTime)}}(t)),Me.resolve()}}/** 5754 * @license 5755 * Copyright 2022 Google LLC 5756 * 5757 * Licensed under the Apache License, Version 2.0 (the "License"); 5758 * you may not use this file except in compliance with the License. 5759 * You may obtain a copy of the License at 5760 * 5761 * http://www.apache.org/licenses/LICENSE-2.0 5762 * 5763 * Unless required by applicable law or agreed to in writing, software 5764 * distributed under the License is distributed on an "AS IS" BASIS, 5765 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5766 * See the License for the specific language governing permissions and 5767 * limitations under the License. 5768 */class Jxe{constructor(){this.overlays=new or(Mt.comparator),this.Lr=new Map}getOverlay(e,t){return Me.resolve(this.overlays.get(t))}getOverlays(e,t){const r=td();return Me.forEach(t,i=>this.getOverlay(e,i).next(s=>{s!==null&&r.set(i,s)})).next(()=>r)}saveOverlays(e,t,r){return r.forEach((i,s)=>{this.bt(e,t,s)}),Me.resolve()}removeOverlaysForBatchId(e,t,r){const i=this.Lr.get(r);return i!==void 0&&(i.forEach(s=>this.overlays=this.overlays.remove(s)),this.Lr.delete(r)),Me.resolve()}getOverlaysForCollection(e,t,r){const i=td(),s=t.length+1,o=new Mt(t.child("")),a=this.overlays.getIteratorFrom(o);for(;a.hasNext();){const l=a.getNext().value,c=l.getKey();if(!t.isPrefixOf(c.path))break;c.path.length===s&&l.largestBatchId>r&&i.set(l.getKey(),l)}return Me.resolve(i)}getOverlaysForCollectionGroup(e,t,r,i){let s=new or((c,u)=>c-u);const o=this.overlays.getIterator();for(;o.hasNext();){const c=o.getNext().value;if(c.getKey().getCollectionGroup()===t&&c.largestBatchId>r){let u=s.get(c.largestBatchId);u===null&&(u=td(),s=s.insert(c.largestBatchId,u)),u.set(c.getKey(),c)}}const a=td(),l=s.getIterator();for(;l.hasNext()&&(l.getNext().value.forEach((c,u)=>a.set(c,u)),!(a.size()>=i)););return Me.resolve(a)}bt(e,t,r){const i=this.overlays.get(r.key);if(i!==null){const o=this.Lr.get(i.largestBatchId).delete(r.key);this.Lr.set(i.largestBatchId,o)}this.overlays=this.overlays.insert(r.key,new gxe(t,r));let s=this.Lr.get(t);s===void 0&&(s=un(),this.Lr.set(t,s)),this.Lr.set(t,s.add(r.key))}}/** 5769 * @license 5770 * Copyright 2024 Google LLC 5771 * 5772 * Licensed under the Apache License, Version 2.0 (the "License"); 5773 * you may not use this file except in compliance with the License. 5774 * You may obtain a copy of the License at 5775 * 5776 * http://www.apache.org/licenses/LICENSE-2.0 5777 * 5778 * Unless required by applicable law or agreed to in writing, software 5779 * distributed under the License is distributed on an "AS IS" BASIS, 5780 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5781 * See the License for the specific language governing permissions and 5782 * limitations under the License. 5783 */class Zxe{constructor(){this.sessionToken=ui.EMPTY_BYTE_STRING}getSessionToken(e){return Me.resolve(this.sessionToken)}setSessionToken(e,t){return this.sessionToken=t,Me.resolve()}}/** 5784 * @license 5785 * Copyright 2017 Google LLC 5786 * 5787 * Licensed under the Apache License, Version 2.0 (the "License"); 5788 * you may not use this file except in compliance with the License. 5789 * You may obtain a copy of the License at 5790 * 5791 * http://www.apache.org/licenses/LICENSE-2.0 5792 * 5793 * Unless required by applicable law or agreed to in writing, software 5794 * distributed under the License is distributed on an "AS IS" BASIS, 5795 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5796 * See the License for the specific language governing permissions and 5797 * limitations under the License. 5798 */class mN{constructor(){this.kr=new jr(Kr.Kr),this.qr=new jr(Kr.Ur)}isEmpty(){return this.kr.isEmpty()}addReference(e,t){const r=new Kr(e,t);this.kr=this.kr.add(r),this.qr=this.qr.add(r)}$r(e,t){e.forEach(r=>this.addReference(r,t))}removeReference(e,t){this.Wr(new Kr(e,t))}Qr(e,t){e.forEach(r=>this.removeReference(r,t))}Gr(e){const t=new Mt(new Fn([])),r=new Kr(t,e),i=new Kr(t,e+1),s=[];return this.qr.forEachInRange([r,i],o=>{this.Wr(o),s.push(o.key)}),s}
5798zr(){this.kr.forEach(e=>this.Wr(e))}Wr(e){this.kr=this.kr.delete(e),this.qr=this.qr.delete(e)}jr(e){const t=new Mt(new Fn([])),r=new Kr(t,e),i=new Kr(t,e+1);let s=un();return this.qr.forEachInRange([r,i],o=>{s=s.add(o.key)}),s}containsKey(e){const t=new Kr(e,0),r=this.kr.firstAfterOrEqual(t);return r!==null&&e.isEqual(r.key)}}class Kr{constructor(e,t){this.key=e,this.Hr=t}static Kr(e,t){return Mt.comparator(e.key,t.key)||cn(e.Hr,t.Hr)}static Ur(e,t){return cn(e.Hr,t.Hr)||Mt.comparator(e.key,t.key)}}/** 5799 * @license 5800 * Copyright 2017 Google LLC 5801 * 5802 * Licensed under the Apache License, Version 2.0 (the "License"); 5803 * you may not use this file except in compliance with the License. 5804 * You may obtain a copy of the License at 5805 * 5806 * http://www.apache.org/licenses/LICENSE-2.0 5807 * 5808 * Unless required by applicable law or agreed to in writing, software 5809 * distributed under the License is distributed on an "AS IS" BASIS, 5810 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5811 * See the License for the specific language governing permissions and 5812 * limitations under the License. 5813 */class e_e{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.Yn=1,this.Jr=new jr(Kr.Kr)}checkEmpty(e){return Me.resolve(this.mutationQueue.length===0)}addMutationBatch(e,t,r,i){const s=this.Yn;this.Yn++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new mxe(s,t,r,i);this.mutationQueue.push(o);for(const a of i)this.Jr=this.Jr.add(new Kr(a.key,s)),this.indexManager.addToCollectionParentIndex(e,a.key.path.popLast());return Me.resolve(o)}lookupMutationBatch(e,t){return Me.resolve(this.Zr(t))}getNextMutationBatchAfterBatchId(e,t){const r=t+1,i=this.Xr(r),s=i<0?0:i;return Me.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return Me.resolve(this.mutationQueue.length===0?sN:this.Yn-1)}getAllMutationBatches(e){return Me.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){const r=new Kr(t,0),i=new Kr(t,Number.POSITIVE_INFINITY),s=[];return this.Jr.forEachInRange([r,i],o=>{const a=this.Zr(o.Hr);s.push(a)}),Me.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(e,t){let r=new jr(cn);return t.forEach(i=>{const s=new Kr(i,0),o=new Kr(i,Number.POSITIVE_INFINITY);this.Jr.forEachInRange([s,o],a=>{r=r.add(a.Hr)})}),Me.resolve(this.Yr(r))}getAllMutationBatchesAffectingQuery(e,t){const r=t.path,i=r.length+1;let s=r;Mt.isDocumentKey(s)||(s=s.child(""));const o=new Kr(new Mt(s),0);let a=new jr(cn);return this.Jr.forEachWhile(l=>{const c=l.key.path;return!!r.isPrefixOf(c)&&(c.length===i&&(a=a.add(l.Hr)),!0)},o),Me.resolve(this.Yr(a))}Yr(e){const t=[];return e.forEach(r=>{const i=this.Zr(r);i!==null&&t.push(i)}),t}removeMutationBatch(e,t){Cn(this.ei(t.batchId,"removed")===0,55003),this.mutationQueue.shift();let r=this.Jr;return Me.forEach(t.mutations,i=>{const s=new Kr(i.key,t.batchId);return r=r.delete(s),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)}).next(()=>{this.Jr=r})}nr(e){}containsKey(e,t){const r=new Kr(t,0),i=this.Jr.firstAfterOrEqual(r);return Me.resolve(t.isEqual(i&&i.key))}performConsistencyCheck(e){return this.mutationQueue.length,Me.resolve()}ei(e,t){return this.Xr(e)}Xr(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Zr(e){const t=this.Xr(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}/** 5814 * @license 5815 * Copyright 2017 Google LLC 5816 * 5817 * Licensed under the Apache License, Version 2.0 (the "License"); 5818 * you may not use this file except in compliance with the License. 5819 * You may obtain a copy of the License at 5820 * 5821 * http://www.apache.org/licenses/LICENSE-2.0 5822 * 5823 * Unless required by applicable law or agreed to in writing, software 5824 * distributed under the License is distributed on an "AS IS" BASIS, 5825 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5826 * See the License for the specific language governing permissions and 5827 * limitations under the License. 5828 */class t_e{constructor(e){this.ti=e,this.docs=function(){return new or(Mt.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){const r=t.key,i=this.docs.get(r),s=i?i.size:0,o=this.ti(t);return this.docs=this.docs.insert(r,{document:t.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){const r=this.docs.get(t);return Me.resolve(r?r.document.mutableCopy():Ni.newInvalidDocument(t))}getEntries(e,t){let r=Ml();return t.forEach(i=>
vendor: 4,188 bytes, lines 5828-5858
5828{const s=this.docs.get(i);r=r.insert(i,s?s.document.mutableCopy():Ni.newInvalidDocument(i))}),Me.resolve(r)}getDocumentsMatchingQuery(e,t,r,i){let s=Ml();const o=t.path,a=new Mt(o.child("__id-9223372036854775808__")),l=this.docs.getIteratorFrom(a);for(;l.hasNext();){const{key:c,value:{document:u}}=l.getNext();if(!o.isPrefixOf(c.path))break;c.path.length>o.length+1||R0e(C0e(u),r)<=0||(i.has(u.key)||_S(t,u))&&(s=s.insert(u.key,u.mutableCopy()))}return Me.resolve(s)}getAllFromCollectionGroup(e,t,r,i){It(9500)}ni(e,t){return Me.forEach(this.docs,r=>t(r))}newChangeBuffer(e){return new n_e(this)}getSize(e){return Me.resolve(this.size)}}class n_e extends Xxe{constructor(e){super(),this.Mr=e}applyChanges(e){const t=[];return this.changes.forEach((r,i)=>{i.isValidDocument()?t.push(this.Mr.addEntry(e,i)):this.Mr.removeEntry(r)}),Me.waitFor(t)}getFromCache(e,t){return this.Mr.getEntry(e,t)}getAllFromCache(e,t){return this.Mr.getEntries(e,t)}}/** 5829 * @license 5830 * Copyright 2017 Google LLC 5831 * 5832 * Licensed under the Apache License, Version 2.0 (the "License"); 5833 * you may not use this file except in compliance with the License. 5834 * You may obtain a copy of the License at 5835 * 5836 * http://www.apache.org/licenses/LICENSE-2.0 5837 * 5838 * Unless required by applicable law or agreed to in writing, software 5839 * distributed under the License is distributed on an "AS IS" BASIS, 5840 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5841 * See the License for the specific language governing permissions and 5842 * limitations under the License. 5843 */class r_e{constructor(e){this.persistence=e,this.ri=new Hd(t=>lN(t),cN),this.lastRemoteSnapshotVersion=Ht.min(),this.highestTargetId=0,this.ii=0,this.si=new mN,this.targetCount=0,this.oi=gp._r()}forEachTarget(e,t){return this.ri.forEach((r,i)=>t(i)),Me.resolve()}getLastRemoteSnapshotVersion(e){return Me.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return Me.resolve(this.ii)}allocateTargetId(e){return this.highestTargetId=this.oi.next(),Me.resolve(this.highestTargetId)}setTargetsMetadata(e,t,r){return r&&(this.lastRemoteSnapshotVersion=r),t>this.ii&&(this.ii=t),Me.resolve()}lr(e){this.ri.set(e.target,e);const t=e.targetId;t>this.highestTargetId&&(this.oi=new gp(t),this.highestTargetId=t),e.sequenceNumber>this.ii&&(this.ii=e.sequenceNumber)}addTargetData(e,t){return this.lr(t),this.targetCount+=1,Me.resolve()}updateTargetData(e,t){return this.lr(t),Me.resolve()}removeTargetData(e,t){return this.ri.delete(t.target),this.si.Gr(t.targetId),this.targetCount-=1,Me.resolve()}removeTargets(e,t,r){let i=0;const s=[];return this.ri.forEach((o,a)=>{a.sequenceNumber<=t&&r.get(a.targetId)===null&&(this.ri.delete(o),s.push(this.removeMatchingKeysForTargetId(e,a.targetId)),i++)}),Me.waitFor(s).next(()=>i)}getTargetCount(e){return Me.resolve(this.targetCount)}getTargetData(e,t){const r=this.ri.get(t)||null;return Me.resolve(r)}addMatchingKeys(e,t,r){return this.si.$r(t,r),Me.resolve()}removeMatchingKeys(e,t,r){this.si.Qr(t,r);const i=this.persistence.referenceDelegate,s=[];return i&&t.forEach(o=>{s.push(i.markPotentiallyOrphaned(e,o))}),Me.waitFor(s)}removeMatchingKeysForTargetId(e,t){return this.si.Gr(t),Me.resolve()}getMatchingKeysForTargetId(e,t){const r=this.si.jr(t);return Me.resolve(r)}containsKey(e,t){return Me.resolve(this.si.containsKey(t))}}/** 5844 * @license 5845 * Copyright 2017 Google LLC 5846 * 5847 * Licensed under the Apache License, Version 2.0 (the "License"); 5848 * you may not use this file except in compliance with the License. 5849 * You may obtain a copy of the License at 5850 * 5851 * http://www.apache.org/licenses/LICENSE-2.0 5852 * 5853 * Unless required by applicable law or agreed to in writing, software 5854 * distributed under the License is distributed on an "AS IS" BASIS, 5855 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5856 * See the License for the specific language governing permissions and 5857 * limitations under the License. 5858 */class pW{constructor(e,t){this._i={},this.overlays={},this.ai=new gS(0),this.ui=!1,this.ui=!0,this.ci=new Zxe,this.referenceDelegate=e(this),this.li=new r_e(this),this.indexManager=new Bxe,this.remoteDocumentCache=function(i){return new t_e(i)}(r=>
vendor: 3,652 bytes, line 5858
5858this.referenceDelegate.hi(r)),this.serializer=new Vxe(t),this.Pi=new Qxe(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.ui=!1,Promise.resolve()}get started(){return this.ui}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new Jxe,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let r=this._i[e.toKey()];return r||(r=new e_e(t,this.referenceDelegate),this._i[e.toKey()]=r),r}getGlobalsCache(){return this.ci}getTargetCache(){return this.li}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Pi}runTransaction(e,t,r){at("MemoryPersistence","Starting transaction:",e);const i=new i_e(this.ai.next());return this.referenceDelegate.Ti(),r(i).next(s=>this.referenceDelegate.Ii(i).next(()=>s)).toPromise().then(s=>(i.raiseOnCommittedEvent(),s))}Ei(e,t){return Me.or(Object.values(this._i).map(r=>()=>r.containsKey(e,t)))}}class i_e extends N0e{constructor(e){super(),this.currentSequenceNumber=e}}class gN{constructor(e){this.persistence=e,this.Ri=new mN,this.Ai=null}static Vi(e){return new gN(e)}get di(){if(this.Ai)return this.Ai;throw It(60996)}addReference(e,t,r){return this.Ri.addReference(r,t),this.di.delete(r.toString()),Me.resolve()}removeReference(e,t,r){return this.Ri.removeReference(r,t),this.di.add(r.toString()),Me.resolve()}markPotentiallyOrphaned(e,t){return this.di.add(t.toString()),Me.resolve()}removeTarget(e,t){this.Ri.Gr(t.targetId).forEach(i=>this.di.add(i.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next(i=>{i.forEach(s=>this.di.add(s.toString()))}).next(()=>r.removeTargetData(e,t))}Ti(){this.Ai=new Set}Ii(e){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return Me.forEach(this.di,r=>{const i=Mt.fromPath(r);return this.mi(e,i).next(s=>{s||t.removeEntry(i,Ht.min())})}).next(()=>(this.Ai=null,t.apply(e)))}updateLimboDocument(e,t){return this.mi(e,t).next(r=>{r?this.di.delete(t.toString()):this.di.add(t.toString())})}hi(e){return 0}mi(e,t){return Me.or([()=>Me.resolve(this.Ri.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Ei(e,t)])}}class G1{constructor(e,t){this.persistence=e,this.fi=new Hd(r=>D0e(r.path),(r,i)=>r.isEqual(i)),this.garbageCollector=qxe(this,t)}static Vi(e,t){return new G1(e,t)}Ti(){}Ii(e){return Me.resolve()}forEachTarget(e,t){return this.persistence.getTargetCache().forEachTarget(e,t)}dr(e){const t=this.pr(e);return this.persistence.getTargetCache().getTargetCount(e).next(r=>t.next(i=>r+i))}pr(e){let t=0;return this.mr(e,r=>{t++}).next(()=>t)}mr(e,t){return Me.forEach(this.fi,(r,i)=>this.wr(e,r,i).next(s=>s?Me.resolve():t(i)))}removeTargets(e,t,r){return this.persistence.getTargetCache().removeTargets(e,t,r)}removeOrphanedDocuments(e,t){let r=0;const i=this.persistence.getRemoteDocumentCache(),s=i.newChangeBuffer();return i.ni(e,o=>this.wr(e,o,t).next(a=>{a||(r++,s.removeEntry(o,Ht.min()))})).next(()=>s.apply(e)).next(()=>r)}markPotentiallyOrphaned(e,t){return this.fi.set(t,e.currentSequenceNumber),Me.resolve()}removeTarget(e,t){const r=t.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,r)}addReference(e,t,r){return this.fi.set(r,e.currentSequenceNumber),Me.resolve()}removeReference(e,t,r){return this.fi.set(r,e.currentSequenceNumber),Me.resolve()}updateLimboDocument(e,t){return this.fi.set(t,e.currentSequenceNumber),Me.resolve()}hi(e){let t=e.key.toString().length;return e.isFoundDocument()&&(t+=C_(e.data.value)),t}
vendor: 4,740 bytes, lines 5858-5903
5858wr(e,t,r){return Me.or([()=>this.persistence.Ei(e,t),()=>this.persistence.getTargetCache().containsKey(e,t),()=>{const i=this.fi.get(t);return Me.resolve(i!==void 0&&i>r)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}}/** 5859 * @license 5860 * Copyright 2017 Google LLC 5861 * 5862 * Licensed under the Apache License, Version 2.0 (the "License"); 5863 * you may not use this file except in compliance with the License. 5864 * You may obtain a copy of the License at 5865 * 5866 * http://www.apache.org/licenses/LICENSE-2.0 5867 * 5868 * Unless required by applicable law or agreed to in writing, software 5869 * distributed under the License is distributed on an "AS IS" BASIS, 5870 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5871 * See the License for the specific language governing permissions and 5872 * limitations under the License. 5873 */class yN{constructor(e,t,r,i){this.targetId=e,this.fromCache=t,this.Ts=r,this.Is=i}static Es(e,t){let r=un(),i=un();for(const s of t.docChanges)switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}return new yN(e,t.fromCache,r,i)}}/** 5874 * @license 5875 * Copyright 2023 Google LLC 5876 * 5877 * Licensed under the Apache License, Version 2.0 (the "License"); 5878 * you may not use this file except in compliance with the License. 5879 * You may obtain a copy of the License at 5880 * 5881 * http://www.apache.org/licenses/LICENSE-2.0 5882 * 5883 * Unless required by applicable law or agreed to in writing, software 5884 * distributed under the License is distributed on an "AS IS" BASIS, 5885 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5886 * See the License for the specific language governing permissions and 5887 * limitations under the License. 5888 */class s_e{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/** 5889 * @license 5890 * Copyright 2019 Google LLC 5891 * 5892 * Licensed under the Apache License, Version 2.0 (the "License"); 5893 * you may not use this file except in compliance with the License. 5894 * You may obtain a copy of the License at 5895 * 5896 * http://www.apache.org/licenses/LICENSE-2.0 5897 * 5898 * Unless required by applicable law or agreed to in writing, software 5899 * distributed under the License is distributed on an "AS IS" BASIS, 5900 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5901 * See the License for the specific language governing permissions and 5902 * limitations under the License. 5903 */class o_e{constructor(){this.Rs=!1,this.As=!1,this.Vs=100,this.ds=function(){return Qye()?8:I0e(Kye())>0?6:4}()}initialize(e,t){this.fs=e,this.indexManager=t,this.Rs=!0}getDocumentsMatchingQuery(e,t,r,i){const s={result:null};return this.gs(e,t).next(o=>{s.result=o}).next(()=>{if(!s.result)return this.ps(e,t,i,r).next(o=>{s.result=o})}).next(()=>{if(s.result)return;const o=new s_e;return this.ys(e,t,o).next(a=>{if(s.result=a,this.As)return this.ws(e,t,o,a.size)})}).next(()=>s.result)}ws(e,t,r,i){return r.documentReadCount<this.Vs?(qh()<=fn.DEBUG&&at("QueryEngine","SDK will not create cache indexes for query:",Xh(t),"since it only creates cache indexes for collection contains","more than or equal to",this.Vs,"documents"),Me.resolve()):(qh()<=fn.DEBUG&&at("QueryEngine","Query:",Xh(t),"scans",r.documentReadCount,"local documents and returns",i,"documents as results."),r.documentReadCount>this.ds*i?(qh()<=fn.DEBUG&&at("QueryEngine","The SDK decides to create cache indexes for query:",Xh(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Pa(t))):Me.resolve())}gs(e,t){if(uF(t))return Me.resolve(null);let r=Pa(t);return this.indexManager.getIndexType(e,r).next(i=>i===0?null:(t.limit!==null&&i===1&&(t=LC(t,null,"F"),r=Pa(t)),this.indexManager.getDocumentsMatchingTarget(e,r).next(s=>{const o=un(...s);return this.fs.getDocuments(e,o).next(a=>this.indexManager.getMinOffset(e,r).next(l=>{const c=this.bs(t,a);return this.Ss(t,c,o,l.readTime)?this.gs(e,LC(t,null,"F")):this.Ds(e,c,t,l)}))})))}ps(e,t,r,i){return uF(t)||i.isEqual(Ht.min())?Me.resolve(null):this.fs.getDocuments(e,r).next(s=>{const o=this.bs(t,s);return this.Ss(t,o,r,i)?Me.resolve(null):(qh()<=fn.DEBUG&&at("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),Xh(t)),this.Ds(e,o,t,A0e(i,Ry)).next(a=>a))})}bs(e,t){let r=new jr(WG(e));return t.forEach((i,s)=>{_S(e,s)&&(r=r.add(s))}),r}Ss(e,t,r,i){if(e.limit===null)return!1;if(r.size!==t.size)return!0;const s=e.limitType==="F"?t.last():t.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(i)>0)}ys(e,t,r){return qh()<=fn.DEBUG&&at("QueryEngine","Using full collection scan to execute query:",Xh(t)),this.fs.getDocumentsMatchingQuery(e,t,Gc.min(),r)}
5903Ds(e,t,r,i){return this.fs.getDocumentsMatchingQuery(e,r,i).next(s=>(t.forEach(o=>{s=s.insert(o.key,o)}),s))}}/** 5904 * @license 5905 * Copyright 2020 Google LLC 5906 * 5907 * Licensed under the Apache License, Version 2.0 (the "License"); 5908 * you may not use this file except in compliance with the License. 5909 * You may obtain a copy of the License at 5910 * 5911 * http://www.apache.org/licenses/LICENSE-2.0 5912 * 5913 * Unless required by applicable law or agreed to in writing, software 5914 * distributed under the License is distributed on an "AS IS" BASIS, 5915 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5916 * See the License for the specific language governing permissions and 5917 * limitations under the License. 5918 */const vN="LocalStore",a_e=3e8;class l_e{constructor(e,t,r,i){this.persistence=e,this.Cs=t,this.serializer=i,this.vs=new or(cn),this.Fs=new Hd(s=>lN(s),cN),this.Ms=new Map,this.xs=e.getRemoteDocumentCache(),this.li=e.getTargetCache(),this.Pi=e.getBundleCache(),this.Os(r)}Os(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new Yxe(this.xs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.xs.setIndexManager(this.indexManager),this.Cs.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.vs))}}function c_e(n,e,t,r){return new l_e(n,e,t,r)}async function mW(n,e){const t=Gt(n);return await t.persistence.runTransaction("Handle user change","readonly",r=>{let i;return t.mutationQueue.getAllMutationBatches(r).next(s=>(i=s,t.Os(e),t.mutationQueue.getAllMutationBatches(r))).next(s=>{const o=[],a=[];let l=un();for(const c of i){o.push(c.batchId);for(const u of c.mutations)l=l.add(u.key)}for(const c of s){a.push(c.batchId);for(const u of c.mutations)l=l.add(u.key)}return t.localDocuments.getDocuments(r,l).next(c=>({Ns:c,removedBatchIds:o,addedBatchIds:a}))})})}function u_e(n,e){const t=Gt(n);return t.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const i=e.batch.keys(),s=t.xs.newChangeBuffer({trackRemovals:!0});return function(a,l,c,u){const d=c.batch,m=d.keys();let g=Me.resolve();return m.forEach(v=>{g=g.next(()=>u.getEntry(l,v)).next(_=>{const x=c.docVersions.get(v);Cn(x!==null,48541),_.version.compareTo(x)<0&&(d.applyToRemoteDocument(_,c),_.isValidDocument()&&(_.setReadTime(c.commitVersion),u.addEntry(_)))})}),g.next(()=>a.mutationQueue.removeMutationBatch(l,d))}(t,r,e,s).next(()=>s.apply(r)).next(()=>t.mutationQueue.performConsistencyCheck(r)).next(()=>t.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId)).next(()=>t.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(a){let l=un();for(let c=0;c<a.mutationResults.length;++c)a.mutationResults[c].transformResults.length>0&&(l=l.add(a.batch.mutations[c].key));return l}(e))).next(()=>t.localDocuments.getDocuments(r,i))})}function gW(n){const e=Gt(n);return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.li.getLastRemoteSnapshotVersion(t))}function d_e(n,e){const t=Gt(n),r=e.snapshotVersion;let i=t.vs;return t.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{const o=t.xs.newChangeBuffer({trackRemovals:!0});i=t.vs;const a=[];
vendor: 4,419 bytes, lines 5918-5922
5918e.targetChanges.forEach((u,d)=>{const m=i.get(d);if(!m)return;a.push(t.li.removeMatchingKeys(s,u.removedDocuments,d).next(()=>t.li.addMatchingKeys(s,u.addedDocuments,d)));let g=m.withSequenceNumber(s.currentSequenceNumber);e.targetMismatches.get(d)!==null?g=g.withResumeToken(ui.EMPTY_BYTE_STRING,Ht.min()).withLastLimboFreeSnapshotVersion(Ht.min()):u.resumeToken.approximateByteSize()>0&&(g=g.withResumeToken(u.resumeToken,r)),i=i.insert(d,g),function(_,x,y){return _.resumeToken.approximateByteSize()===0||x.snapshotVersion.toMicroseconds()-_.snapshotVersion.toMicroseconds()>=a_e?!0:y.addedDocuments.size+y.modifiedDocuments.size+y.removedDocuments.size>0}(m,g,u)&&a.push(t.li.updateTargetData(s,g))});let l=Ml(),c=un();if(e.documentUpdates.forEach(u=>{e.resolvedLimboDocuments.has(u)&&a.push(t.persistence.referenceDelegate.updateLimboDocument(s,u))}),a.push(h_e(s,o,e.documentUpdates).next(u=>{l=u.Bs,c=u.Ls})),!r.isEqual(Ht.min())){const u=t.li.getLastRemoteSnapshotVersion(s).next(d=>t.li.setTargetsMetadata(s,s.currentSequenceNumber,r));a.push(u)}return Me.waitFor(a).next(()=>o.apply(s)).next(()=>t.localDocuments.getLocalViewOfDocuments(s,l,c)).next(()=>l)}).then(s=>(t.vs=i,s))}function h_e(n,e,t){let r=un(),i=un();return t.forEach(s=>r=r.add(s)),e.getEntries(n,r).next(s=>{let o=Ml();return t.forEach((a,l)=>{const c=s.get(a);l.isFoundDocument()!==c.isFoundDocument()&&(i=i.add(a)),l.isNoDocument()&&l.version.isEqual(Ht.min())?(e.removeEntry(a,l.readTime),o=o.insert(a,l)):!c.isValidDocument()||l.version.compareTo(c.version)>0||l.version.compareTo(c.version)===0&&c.hasPendingWrites?(e.addEntry(l),o=o.insert(a,l)):at(vN,"Ignoring outdated watch update for ",a,". Current version:",c.version," Watch version:",l.version)}),{Bs:o,Ls:i}})}function f_e(n,e){const t=Gt(n);return t.persistence.runTransaction("Get next mutation batch","readonly",r=>(e===void 0&&(e=sN),t.mutationQueue.getNextMutationBatchAfterBatchId(r,e)))}function p_e(n,e){const t=Gt(n);return t.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return t.li.getTargetData(r,e).next(s=>s?(i=s,Me.resolve(i)):t.li.allocateTargetId(r).next(o=>(i=new pc(e,o,"TargetPurposeListen",r.currentSequenceNumber),t.li.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=t.vs.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(t.vs=t.vs.insert(r.targetId,r),t.Fs.set(e,r.targetId)),r})}async function UC(n,e,t){const r=Gt(n),i=r.vs.get(e),s=t?"readwrite":"readwrite-primary";try{t||await r.persistence.runTransaction("Release target",s,o=>r.persistence.referenceDelegate.removeTarget(o,i))}catch(o){if(!Gp(o))throw o;at(vN,`Failed to update sequence numbers for target ${e}: ${o}`)}r.vs=r.vs.remove(e),r.Fs.delete(i.target)}function bF(n,e,t){const r=Gt(n);let i=Ht.min(),s=un();return r.persistence.runTransaction("Execute query","readwrite",o=>function(l,c,u){const d=Gt(l),m=d.Fs.get(u);return m!==void 0?Me.resolve(d.vs.get(m)):d.li.getTargetData(c,u)}(r,o,Pa(e)).next(a=>{if(a)return i=a.lastLimboFreeSnapshotVersion,r.li.getMatchingKeysForTargetId(o,a.targetId).next(l=>{s=l})}).next(()=>r.Cs.getDocumentsMatchingQuery(o,e,t?i:Ht.min(),t?s:un())).next(a=>(m_e(r,exe(e),a),{documents:a,ks:s})))}function m_e(n,e,t){let r=n.Ms.get(e)||Ht.min();t.forEach((i,s)=>{s.readTime.compareTo(r)>0&&(r=s.readTime)}),n.Ms.set(e,r)}class EF{constructor(){this.activeTargetIds=oxe()}Qs(e){this.activeTargetIds=this.activeTargetIds.add(e)}Gs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Ws(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class g_e{constructor(){this.vo=new EF,this.Fo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,r){}addLocalQueryTarget(e,t=!0){return t&&this.vo.Qs(e),this.Fo[e]||"not-current"}updateQueryState(e,t,r){this.Fo[e]=t}removeLocalQueryTarget(e){this.vo.Gs(e)}isLocalQueryTarget(e){return this.vo.activeTargetIds.has(e)}clearQueryState(e){delete this.Fo[e]}getAllActiveQueryTargets(){return this.vo.activeTargetIds}isActiveQueryTarget(e){return this.vo.activeTargetIds.has(e)}start(){return this.vo=new EF,Promise.resolve()}handleUserChange(e,t,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** 5919 * @license 5920 * Copyright 2019 Google LLC 5921 * 5922 * Licensed under the Apache License, Version 2.0 (the "License");
5923 * you may not use this file except in compliance with the License. 5924 * You may obtain a copy of the License at 5925 * 5926 * http://www.apache.org/licenses/LICENSE-2.0 5927 * 5928 * Unless required by applicable law or agreed to in writing, software 5929 * distributed under the License is distributed on an "AS IS" BASIS, 5930 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5931 * See the License for the specific language governing permissions and 5932 * limitations under the License. 5933 */class y_e{Mo(e){}shutdown(){}}/** 5934 * @license 5935 * Copyright 2019 Google LLC 5936 * 5937 * Licensed under the Apache License, Version 2.0 (the "License"); 5938 * you may not use this file except in compliance with the License. 5939 * You may obtain a copy of the License at 5940 * 5941 * http://www.apache.org/licenses/LICENSE-2.0 5942 * 5943 * Unless required by applicable law or agreed to in writing, software 5944 * distributed under the License is distributed on an "AS IS" BASIS, 5945 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5946 * See the License for the specific language governing permissions and 5947 * limitations under the License. 5948 */const TF="ConnectivityMonitor";class MF{constructor(){this.xo=()=>this.Oo(),this.No=()=>this.Bo(),this.Lo=[],this.ko()}Mo(e){this.Lo.push(e)}shutdown(){window.removeEventListener("online",this.xo),window.removeEventListener("offline",this.No)}ko(){window.addEventListener("online",this.xo),window.addEventListener("offline",this.No)}Oo(){at(TF,"Network connectivity changed: AVAILABLE");for(const e of this.Lo)e(0)}Bo(){at(TF,"Network connectivity changed: UNAVAILABLE");for(const e of this.Lo)e(1)}static v(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/** 5949 * @license 5950 * Copyright 2023 Google LLC 5951 * 5952 * Licensed under the Apache License, Version 2.0 (the "License"); 5953 * you may not use this file except in compliance with the License. 5954 * You may obtain a copy of the License at 5955 * 5956 * http://www.apache.org/licenses/LICENSE-2.0 5957 * 5958 * Unless required by applicable law or agreed to in writing, software 5959 * distributed under the License is distributed on an "AS IS" BASIS, 5960 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5961 * See the License for the specific language governing permissions and 5962 * limitations under the License. 5963 */let $x=null;function VC(){return $x===null?$x=function(){return 268435456+Math.round(2147483648*Math.random())}():$x++,"0x"+$x.toString(16)}/** 5964 * @license 5965 * Copyright 2020 Google LLC 5966 * 5967 * Licensed under the Apache License, Version 2.0 (the "License"); 5968 * you may not use this file except in compliance with the License. 5969 * You may obtain a copy of the License at 5970 * 5971 * http://www.apache.org/licenses/LICENSE-2.0 5972 * 5973 * Unless required by applicable law or agreed to in writing, software 5974 * distributed under the License is distributed on an "AS IS" BASIS, 5975 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5976 * See the License for the specific language governing permissions and 5977 * limitations under the License. 5978 */const BT="RestConnection",v_e={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery",ExecutePipeline:"executePipeline"};class x_e{get Ko(){return!1}constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const t=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),i=encodeURIComponent(this.databaseId.database);this.qo=t+"://"+e.host,this.Uo=`projects/${r}/databases/${i}`,this.$o=this.databaseId.database===F1?`project_id=${r}`:`project_id=${r}&database_id=${i}`}Wo(e,t,r,i,s){const o=VC(),a=this.Qo(e,t.toUriEncodedString());at(BT,`Sending RPC '${e}' ${o}:`,a,r);const l={"google-cloud-resource-prefix":this.Uo,"x-goog-request-params":this.$o};this.Go(l,i,s);const{host:c}=new URL(a),u=tN(c);return this.zo(e,a,l,r,u).then(d=>(at(BT,`Received RPC '${e}' ${o}: `,d),d),d=>{throw hp(BT,`RPC '${e}' ${o} failed with error: `,d,"url: ",a,"request:",r),d})}jo(e,t,r,i,s,o){return this.Wo(e,t,r,i,s)}Go(e,t,r){e["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+zp}(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEac
5978h((i,s)=>e[s]=i),r&&r.headers.forEach((i,s)=>e[s]=i)}Qo(e,t){const r=v_e[e];let i=`${this.qo}/v1/${t}:${r}`;return this.databaseInfo.apiKey&&(i=`${i}?key=${encodeURIComponent(this.databaseInfo.apiKey)}`),i}terminate(){}}/** 5979 * @license 5980 * Copyright 2017 Google LLC 5981 * 5982 * Licensed under the Apache License, Version 2.0 (the "License"); 5983 * you may not use this file except in compliance with the License. 5984 * You may obtain a copy of the License at 5985 * 5986 * http://www.apache.org/licenses/LICENSE-2.0 5987 * 5988 * Unless required by applicable law or agreed to in writing, software 5989 * distributed under the License is distributed on an "AS IS" BASIS, 5990 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 5991 * See the License for the specific language governing permissions and 5992 * limitations under the License. 5993 */class __e{constructor(e){this.Ho=e.Ho,this.Jo=e.Jo}Zo(e){this.Xo=e}Yo(e){this.e_=e}t_(e){this.n_=e}onMessage(e){this.r_=e}close(){this.Jo()}send(e){this.Ho(e)}i_(){this.Xo()}s_(){this.e_()}o_(e){this.n_(e)}__(e){this.r_(e)}}/** 5994 * @license 5995 * Copyright 2017 Google LLC 5996 * 5997 * Licensed under the Apache License, Version 2.0 (the "License"); 5998 * you may not use this file except in compliance with the License. 5999 * You may obtain a copy of the License at 6000 * 6001 * http://www.apache.org/licenses/LICENSE-2.0 6002 * 6003 * Unless required by applicable law or agreed to in writing, software 6004 * distributed under the License is distributed on an "AS IS" BASIS, 6005 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6006 * See the License for the specific language governing permissions and 6007 * limitations under the License. 6008 */const Mi="WebChannelConnection",zm=(n,e,t)=>{n.listen(e,r=>{try{t(r)}catch(i){setTimeout(()=>{throw i},0)}})};class Of extends x_e{constructor(e){super(e),this.a_=[],this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}static u_(){if(!Of.c_){const e=xG();zm(e,vG.STAT_EVENT,t=>{t.stat===MC.PROXY?at(Mi,"STAT_EVENT: detected buffering proxy"):t.stat===MC.NOPROXY&&at(Mi,"STAT_EVENT: detected no buffering proxy")}),Of.c_=!0}}zo(e,t,r,i,s){const o=VC();return new Promise((a,l)=>{const c=new gG;c.setWithCredentials(!0),c.listenOnce(yG.COMPLETE,()=>{try{switch(c.getLastErrorCode()){case A_.NO_ERROR:const d=c.getResponseJson();at(Mi,`XHR for RPC '${e}' ${o} received:`,JSON.stringify(d)),a(d);break;case A_.TIMEOUT:at(Mi,`RPC '${e}' ${o} timed out`),l(new rt(Ee.DEADLINE_EXCEEDED,"Request time out"));break;case A_.HTTP_ERROR:const m=c.getStatus();if(at(Mi,`RPC '${e}' ${o} failed with status:`,m,"response text:",c.getResponseText()),m>0){let g=c.getResponseJson();Array.isArray(g)&&(g=g[0]);const v=g==null?void 0:g.error;if(v&&v.status&&v.message){const _=function(y){const S=y.toLowerCase().replace(/_/g,"-");return Object.values(Ee).indexOf(S)>=0?S:Ee.UNKNOWN}(v.status);l(new rt(_,v.message))}else l(new rt(Ee.UNKNOWN,"Server responded with status "+c.getStatus()))}else l(new rt(Ee.UNAVAILABLE,"Connection failed."));break;default:It(9055,{l_:e,streamId:o,h_:c.getLastErrorCode(),P_:c.getLastError()})}}finally{at(Mi,`RPC '${e}' ${o} completed.`)}});const u=JSON.stringify(i);at(Mi,`RPC '${e}' ${o} sending request:`,i),c.send(t,"POST",u,r,15)})}T_(e,t,r){const i=VC(),s=[this.qo,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=this.createWebChannelTransport(),a={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},l=this.longPollingOptions.timeoutSeconds;l!==void 0&&(a.longPollingTimeout=Math.round(1e3*l)),this.useFetchStreams&&(a.useFetchStreams=!0),this.Go(a.initMessageHeaders,t,r),a.encodeInitMessageHeaders=!0;const c=s.join("");at(Mi,`Creating RPC '${e}' stream ${i}: ${c}`,a);const u=o.createWebChannel(c,a);this.I_(u);let d=!1,m=!1;const g=new __e({Ho:v=>{m?at(Mi,`Not sending because RPC '${e}' stream ${i} is closed:`,v):(d||(at(Mi,`Opening RPC '${e}' stream ${i} transport.`),u.open(),d=!0),at(Mi,`RPC '${e}' stream ${i} sending:`,v),u.send(v))},Jo:()=>u.close()});return zm(u,Zm.EventType.OPEN,()=>{m||(at(Mi,`RPC '${e}' stream ${i} transport opened.`),g.i_())}),zm(u,Zm.EventType.CLOSE,()=>{m||(m=!0,at(Mi,`RPC '${e}' stream ${i} transport closed`),g.o_(),this.E_(u))}
6008),zm(u,Zm.EventType.ERROR,v=>{m||(m=!0,hp(Mi,`RPC '${e}' stream ${i} transport errored. Name:`,v.name,"Message:",v.message),g.o_(new rt(Ee.UNAVAILABLE,"The operation could not be completed")))}),zm(u,Zm.EventType.MESSAGE,v=>{var _;if(!m){const x=v.data[0];Cn(!!x,16349);const y=x,S=(y==null?void 0:y.error)||((_=y[0])==null?void 0:_.error);if(S){at(Mi,`RPC '${e}' stream ${i} received error:`,S);const b=S.status;let A=function(C){const P=Ar[C];if(P!==void 0)return nW(P)}(b),k=S.message;A===void 0&&(A=Ee.INTERNAL,k="Unknown error status: "+b+" with message "+S.message),m=!0,g.o_(new rt(A,k)),u.close()}else at(Mi,`RPC '${e}' stream ${i} received:`,x),g.__(x)}}),Of.u_(),setTimeout(()=>{g.s_()},0),g}terminate(){this.a_.forEach(e=>e.close()),this.a_=[]}I_(e){this.a_.push(e)}E_(e){this.a_=this.a_.filter(t=>t===e)}Go(e,t,r){super.Go(e,t,r),this.databaseInfo.apiKey&&(e["x-goog-api-key"]=this.databaseInfo.apiKey)}createWebChannelTransport(){return _G()}}/** 6009 * @license 6010 * Copyright 2020 Google LLC 6011 * 6012 * Licensed under the Apache License, Version 2.0 (the "License"); 6013 * you may not use this file except in compliance with the License. 6014 * You may obtain a copy of the License at 6015 * 6016 * http://www.apache.org/licenses/LICENSE-2.0 6017 * 6018 * Unless required by applicable law or agreed to in writing, software 6019 * distributed under the License is distributed on an "AS IS" BASIS, 6020 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6021 * See the License for the specific language governing permissions and 6022 * limitations under the License. 6023 */function w_e(n){return new Of(n)}function zT(){return typeof document<"u"?document:null}/** 6024 * @license 6025 * Copyright 2020 Google LLC 6026 * 6027 * Licensed under the Apache License, Version 2.0 (the "License"); 6028 * you may not use this file except in compliance with the License. 6029 * You may obtain a copy of the License at 6030 * 6031 * http://www.apache.org/licenses/LICENSE-2.0 6032 * 6033 * Unless required by applicable law or agreed to in writing, software 6034 * distributed under the License is distributed on an "AS IS" BASIS, 6035 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6036 * See the License for the specific language governing permissions and 6037 * limitations under the License. 6038 */function ES(n){return new Txe(n,!0)}/** 6039 * @license 6040 * Copyright 2017 Google LLC 6041 * 6042 * Licensed under the Apache License, Version 2.0 (the "License"); 6043 * you may not use this file except in compliance with the License. 6044 * You may obtain a copy of the License at 6045 * 6046 * http://www.apache.org/licenses/LICENSE-2.0 6047 * 6048 * Unless required by applicable law or agreed to in writing, software 6049 * distributed under the License is distributed on an "AS IS" BASIS, 6050 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6051 * See the License for the specific language governing permissions and 6052 * limitations under the License. 6053 */Of.c_=!1;class yW{constructor(e,t,r=1e3,i=1.5,s=6e4){this.Ci=e,this.timerId=t,this.R_=r,this.A_=i,this.V_=s,this.d_=0,this.m_=null,this.f_=Date.now(),this.reset()}reset(){this.d_=0}g_(){this.d_=this.V_}p_(e){this.cancel();const t=Math.floor(this.d_+this.y_()),r=Math.max(0,Date.now()-this.f_),i=Math.max(0,t-r);i>0&&at("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.d_} ms, delay with jitter: ${t} ms, last attempt: ${r} ms ago)`),this.m_=this.Ci.enqueueAfterDelay(this.timerId,i,()=>(this.f_=Date.now(),e())),this.d_*=this.A_,this.d_<this.R_&&(this.d_=this.R_),this.d_>this.V_&&(this.d_=this.V_)}w_(){this.m_!==null&&(this.m_.skipDelay(),this.m_=null)}cancel(){this.m_!==null&&(this.m_.cancel(),this.m_=null)}y_(){return(Math.random()-.5)*this.d_}}/** 6054 * @license 6055 * Copyright 2017 Google LLC 6056 * 6057 * Licensed under the Apache License, Version 2.0 (the "License"); 6058 * you may not use this file except in compliance with the License. 6059 * You may obtain a copy of the License at 6060 * 6061 * http://www.apache.org/licenses/LICENSE-2.0 6062 * 6063 * Unless required by applicable law or agreed to in writing, software 6064 * distributed under the License is distributed on an "AS IS" BASIS, 6065 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6066 * See the License for the specific language governing permissions and 6067 * limitations under the License. 6068 */const AF="PersistentStream";class vW{constructor(e,t,r,i,s,o,a,l){this.Ci=e,this.b_=r,this.S_=i,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=a,this.listener=l,this.state=0,this.D_=0,this.C_=null,this.v_=null,this.stream=null,this.F_=0,this.M_=new yW
6068(e,t)}x_(){return this.state===1||this.state===5||this.O_()}O_(){return this.state===2||this.state===3}start(){this.F_=0,this.state!==4?this.auth():this.N_()}async stop(){this.x_()&&await this.close(0)}B_(){this.state=0,this.M_.reset()}L_(){this.O_()&&this.C_===null&&(this.C_=this.Ci.enqueueAfterDelay(this.b_,6e4,()=>this.k_()))}K_(e){this.q_(),this.stream.send(e)}async k_(){if(this.O_())return this.close(0)}q_(){this.C_&&(this.C_.cancel(),this.C_=null)}U_(){this.v_&&(this.v_.cancel(),this.v_=null)}async close(e,t){this.q_(),this.U_(),this.M_.cancel(),this.D_++,e!==4?this.M_.reset():t&&t.code===Ee.RESOURCE_EXHAUSTED?(Tl(t.toString()),Tl("Using maximum backoff delay to prevent overloading the backend."),this.M_.g_()):t&&t.code===Ee.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.W_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.t_(t)}W_(){}auth(){this.state=1;const e=this.Q_(this.D_),t=this.D_;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,i])=>{this.D_===t&&this.G_(r,i)},r=>{e(()=>{const i=new rt(Ee.UNKNOWN,"Fetching auth token failed: "+r.message);return this.z_(i)})})}G_(e,t){const r=this.Q_(this.D_);this.stream=this.j_(e,t),this.stream.Zo(()=>{r(()=>this.listener.Zo())}),this.stream.Yo(()=>{r(()=>(this.state=2,this.v_=this.Ci.enqueueAfterDelay(this.S_,1e4,()=>(this.O_()&&(this.state=3),Promise.resolve())),this.listener.Yo()))}),this.stream.t_(i=>{r(()=>this.z_(i))}),this.stream.onMessage(i=>{r(()=>++this.F_==1?this.H_(i):this.onNext(i))})}N_(){this.state=5,this.M_.p_(async()=>{this.state=0,this.start()})}z_(e){return at(AF,`close with error: ${e}`),this.stream=null,this.close(4,e)}Q_(e){return t=>{this.Ci.enqueueAndForget(()=>this.D_===e?t():(at(AF,"stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class S_e extends vW{constructor(e,t,r,i,s,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,r,i,o),this.serializer=s}j_(e,t){return this.connection.T_("Listen",e,t)}H_(e){return this.onNext(e)}onNext(e){this.M_.reset();const t=Cxe(this.serializer,e),r=function(s){if(!("targetChange"in s))return Ht.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?Ht.min():o.readTime?Na(o.readTime):Ht.min()}(e);return this.listener.J_(t,r)}Z_(e){const t={};t.database=FC(this.serializer),t.addTarget=function(s,o){let a;const l=o.target;if(a=NC(l)?{documents:Nxe(s,l)}:{query:Ixe(s,l).ft},a.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){a.resumeToken=sW(s,o.resumeToken);const c=DC(s,o.expectedCount);c!==null&&(a.expectedCount=c)}else if(o.snapshotVersion.compareTo(Ht.min())>0){a.readTime=H1(s,o.snapshotVersion.toTimestamp());const c=DC(s,o.expectedCount);c!==null&&(a.expectedCount=c)}return a}(this.serializer,e);const r=Dxe(this.serializer,e);r&&(t.labels=r),this.K_(t)}X_(e){const t={};t.database=FC(this.serializer),t.removeTarget=e,this.K_(t)}}class b_e extends vW{constructor(e,t,r,i,s,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,r,i,o),this.serializer=s}get Y_(){return this.F_>0}start(){this.lastStreamToken=void 0,super.start()}W_(){this.Y_&&this.ea([])}j_(e,t){return this.connection.T_("Write",e,t)}H_(e){return Cn(!!e.streamToken,31322),this.lastStreamToken=e.streamToken,Cn(!e.writeResults||e.writeResults.length===0,55816),this.listener.ta()}onNext(e){Cn(!!e.streamToken,12678),this.lastStreamToken=e.streamToken,this.M_.reset();const t=Pxe(e.writeResults,e.commitTime),r=Na(e.commitTime);return this.listener.na(r,t)}ra(){const e={};e.database=FC(this.serializer),this.K_(e)}ea(e){const t={streamToken:this.lastStreamToken,writes:e.map(r=>Rxe(this.serializer,r))};this.K_(t)}}/** 6069 * @license 6070 * Copyright 2017 Google LLC 6071 * 6072 * Licensed under the Apache License, Version 2.0 (the "License"); 6073 * you may not use this file except in compliance with the License. 6074 * You may obtain a copy of the License at 6075 * 6076 * http://www.apache.org/licenses/LICENSE-2.0 6077 * 6078 * Unless required by applicable law or agreed to in writing, softw
6078are 6079 * distributed under the License is distributed on an "AS IS" BASIS, 6080 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6081 * See the License for the specific language governing permissions and 6082 * limitations under the License. 6083 */class E_e{}class T_e extends E_e{constructor(e,t,r,i){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=r,this.serializer=i,this.ia=!1}sa(){if(this.ia)throw new rt(Ee.FAILED_PRECONDITION,"The client has already been terminated.")}Wo(e,t,r,i){return this.sa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.Wo(e,kC(t,r),i,s,o)).catch(s=>{throw s.name==="FirebaseError"?(s.code===Ee.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new rt(Ee.UNKNOWN,s.toString())})}jo(e,t,r,i,s){return this.sa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,a])=>this.connection.jo(e,kC(t,r),i,o,a,s)).catch(o=>{throw o.name==="FirebaseError"?(o.code===Ee.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new rt(Ee.UNKNOWN,o.toString())})}terminate(){this.ia=!0,this.connection.terminate()}}function M_e(n,e,t,r){return new T_e(n,e,t,r)}class A_e{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.oa=0,this._a=null,this.aa=!0}ua(){this.oa===0&&(this.ca("Unknown"),this._a=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this._a=null,this.la("Backend didn't respond within 10 seconds."),this.ca("Offline"),Promise.resolve())))}ha(e){this.state==="Online"?this.ca("Unknown"):(this.oa++,this.oa>=1&&(this.Pa(),this.la(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.ca("Offline")))}set(e){this.Pa(),this.oa=0,e==="Online"&&(this.aa=!1),this.ca(e)}ca(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}la(e){const t=`Could not reach Cloud Firestore backend. ${e} 6084This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.aa?(Tl(t),this.aa=!1):at("OnlineStateTracker",t)}Pa(){this._a!==null&&(this._a.cancel(),this._a=null)}}/** 6085 * @license 6086 * Copyright 2017 Google LLC 6087 * 6088 * Licensed under the Apache License, Version 2.0 (the "License"); 6089 * you may not use this file except in compliance with the License. 6090 * You may obtain a copy of the License at 6091 * 6092 * http://www.apache.org/licenses/LICENSE-2.0 6093 * 6094 * Unless required by applicable law or agreed to in writing, software 6095 * distributed under the License is distributed on an "AS IS" BASIS, 6096 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6097 * See the License for the specific language governing permissions and 6098 * limitations under the License. 6099 */const Ld="RemoteStore";class C_e{constructor(e,t,r,i,s){this.localStore=e,this.datastore=t,this.asyncQueue=r,this.remoteSyncer={},this.Ta=[],this.Ia=new Map,this.Ea=new Set,this.Ra=[],this.Aa=s,this.Aa.Mo(o=>{r.enqueueAndForget(async()=>{Gd(this)&&(at(Ld,"Restarting streams for network reachability change."),await async function(l){const c=Gt(l);c.Ea.add(4),await wv(c),c.Va.set("Unknown"),c.Ea.delete(4),await TS(c)}(this))})}),this.Va=new A_e(r,i)}}async function TS(n){if(Gd(n))for(const e of n.Ra)await e(!0)}async function wv(n){for(const e of n.Ra)await e(!1)}function xW(n,e){const t=Gt(n);t.Ia.has(e.targetId)||(t.Ia.set(e.targetId,e),SN(t)?wN(t):Wp(t).O_()&&_N(t,e))}function xN(n,e){const t=Gt(n),r=Wp(t);t.Ia.delete(e),r.O_()&&_W(t,e),t.Ia.size===0&&(r.O_()?r.L_():Gd(t)&&t.Va.set("Unknown"))}function _N(n,e){if(n.da.$e(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(Ht.min())>0){const t=n.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(t)}Wp(n).Z_(e)}function _W(n,e){n.da.$e(e),Wp(n).X_(e)}function wN(n){n.da=new wxe({getRemoteKeysForTarget:e=>n.remoteSyncer.getRemoteKeysForTarget(e),At:e=>n.Ia.get(e)||null,ht:()=>n.datastore.serializer.databaseId}
6099),Wp(n).start(),n.Va.ua()}function SN(n){return Gd(n)&&!Wp(n).x_()&&n.Ia.size>0}function Gd(n){return Gt(n).Ea.size===0}function wW(n){n.da=void 0}async function R_e(n){n.Va.set("Online")}async function P_e(n){n.Ia.forEach((e,t)=>{_N(n,e)})}async function N_e(n,e){wW(n),SN(n)?(n.Va.ha(e),wN(n)):n.Va.set("Unknown")}async function I_e(n,e,t){if(n.Va.set("Online"),e instanceof iW&&e.state===2&&e.cause)try{await async function(i,s){const o=s.cause;for(const a of s.targetIds)i.Ia.has(a)&&(await i.remoteSyncer.rejectListen(a,o),i.Ia.delete(a),i.da.removeTarget(a))}(n,e)}catch(r){at(Ld,"Failed to remove targets %s: %s ",e.targetIds.join(","),r),await W1(n,r)}else if(e instanceof N_?n.da.Xe(e):e instanceof rW?n.da.st(e):n.da.tt(e),!t.isEqual(Ht.min()))try{const r=await gW(n.localStore);t.compareTo(r)>=0&&await function(s,o){const a=s.da.Tt(o);return a.targetChanges.forEach((l,c)=>{if(l.resumeToken.approximateByteSize()>0){const u=s.Ia.get(c);u&&s.Ia.set(c,u.withResumeToken(l.resumeToken,o))}}),a.targetMismatches.forEach((l,c)=>{const u=s.Ia.get(l);if(!u)return;s.Ia.set(l,u.withResumeToken(ui.EMPTY_BYTE_STRING,u.snapshotVersion)),_W(s,l);const d=new pc(u.target,l,c,u.sequenceNumber);_N(s,d)}),s.remoteSyncer.applyRemoteEvent(a)}(n,t)}catch(r){at(Ld,"Failed to raise snapshot:",r),await W1(n,r)}}async function W1(n,e,t){if(!Gp(e))throw e;n.Ea.add(1),await wv(n),n.Va.set("Offline"),t||(t=()=>gW(n.localStore)),n.asyncQueue.enqueueRetryable(async()=>{at(Ld,"Retrying IndexedDB access"),await t(),n.Ea.delete(1),await TS(n)})}function SW(n,e){return e().catch(t=>W1(n,t,e))}async function MS(n){const e=Gt(n),t=Xc(e);let r=e.Ta.length>0?e.Ta[e.Ta.length-1].batchId:sN;for(;L_e(e);)try{const i=await f_e(e.localStore,r);if(i===null){e.Ta.length===0&&t.L_();break}r=i.batchId,D_e(e,i)}catch(i){await W1(e,i)}bW(e)&&EW(e)}function L_e(n){return Gd(n)&&n.Ta.length<10}function D_e(n,e){n.Ta.push(e);const t=Xc(n);t.O_()&&t.Y_&&t.ea(e.mutations)}function bW(n){return Gd(n)&&!Xc(n).x_()&&n.Ta.length>0}function EW(n){Xc(n).start()}async function k_e(n){Xc(n).ra()}async function O_e(n){const e=Xc(n);for(const t of n.Ta)e.ea(t.mutations)}async function F_e(n,e,t){const r=n.Ta.shift(),i=hN.from(r,e,t);await SW(n,()=>n.remoteSyncer.applySuccessfulWrite(i)),await MS(n)}async function U_e(n,e){e&&Xc(n).Y_&&await async function(r,i){if(function(o){return vxe(o)&&o!==Ee.ABORTED}(i.code)){const s=r.Ta.shift();Xc(r).B_(),await SW(r,()=>r.remoteSyncer.rejectFailedWrite(s.batchId,i)),await MS(r)}}(n,e),bW(n)&&EW(n)}async function CF(n,e){const t=Gt(n);t.asyncQueue.verifyOperationInProgress(),at(Ld,"RemoteStore received new credentials");const r=Gd(t);t.Ea.add(3),await wv(t),r&&t.Va.set("Unknown"),await t.remoteSyncer.handleCredentialChange(e),t.Ea.delete(3),await TS(t)}async function V_e(n,e){const t=Gt(n);e?(t.Ea.delete(2),await TS(t)):e||(t.Ea.add(2),await wv(t),t.Va.set("Unknown"))}function Wp(n){return n.ma||(n.ma=function(t,r,i){const s=Gt(t);return s.sa(),new S_e(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(n.datastore,n.asyncQueue,{Zo:R_e.bind(null,n),Yo:P_e.bind(null,n),t_:N_e.bind(null,n),J_:I_e.bind(null,n)}),n.Ra.push(async e=>{e?(n.ma.B_(),SN(n)?wN(n):n.Va.set("Unknown")):(await n.ma.stop(),wW(n))})),n.ma}function Xc(n){return n.fa||(n.fa=function(t,r,i){const s=Gt(t);return s.sa(),new b_e(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(n.datastore,n.asyncQueue,{Zo:()=>Promise.resolve(),Yo:k_e.bind(null,n),t_:U_e.bind(null,n),ta:O_e.bind(null,n),na:F_e.bind(null,n)}),n.Ra.push(async e=>{e?(n.fa.B_(),await MS(n)):(await n.fa.stop(),n.Ta.length>0&&(at(Ld,`Stopping write stream with ${n.Ta.length} pending writes`),n.Ta=[]))})),n.fa}/** 6100 * @license 6101 * Copyright 2017 Google LLC 6102 * 6103 * Licensed under the Apache License, Version 2.0 (the "License"); 6104 * you may not use this file except in compliance with the License. 6105 * You may obtain a copy of the License at 6106 * 6107 * http://www.apache.org/licenses/LICENSE-2.0 6108 * 6109 * Unless required by applicable law or agreed to in writing, software 6110 * distributed under the License is distributed on an "AS IS" BASIS, 6111 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6112 * See the License for the specific language governing permissions and 6113 * limitations under the License. 6114 */class bN{constructor(e,t,r,i,s){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new Nc,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,t,r,i,s){const o=Date.now()+r,a=new bN(e,t,o,i,s);return a.start(r),a}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new rt(Ee.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function EN(n,e){if(Tl("AsyncQueue",`${e}: ${n}`),Gp(n))return new rt(Ee.UNAVAILABLE,`${e}: ${n}`);throw n}/** 6115 * @license 6116 * Copyright 2017 Google LLC 6117 * 6118 * Licensed under the Apache License, Version 2.0 (the "License");
6119 * you may not use this file except in compliance with the License. 6120 * You may obtain a copy of the License at 6121 * 6122 * http://www.apache.org/licenses/LICENSE-2.0 6123 * 6124 * Unless required by applicable law or agreed to in writing, software 6125 * distributed under the License is distributed on an "AS IS" BASIS, 6126 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6127 * See the License for the specific language governing permissions and 6128 * limitations under the License. 6129 */class Ff{static emptySet(e){return new Ff(e.comparator)}constructor(e){this.comparator=e?(t,r)=>e(t,r)||Mt.comparator(t.key,r.key):(t,r)=>Mt.comparator(t.key,r.key),this.keyedMap=eg(),this.sortedSet=new or(this.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((t,r)=>(e(t),!1))}add(e){const t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){const t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof Ff)||this.size!==e.size)return!1;const t=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;t.hasNext();){const i=t.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0}toString(){const e=[];return this.forEach(t=>{e.push(t.toString())}),e.length===0?"DocumentSet ()":`DocumentSet ( 6130 `+e.join(` 6131`)+` 6132)`}copy(e,t){const r=new Ff;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=t,r}}/** 6133 * @license 6134 * Copyright 2017 Google LLC 6135 * 6136 * Licensed under the Apache License, Version 2.0 (the "License"); 6137 * you may not use this file except in compliance with the License. 6138 * You may obtain a copy of the License at 6139 * 6140 * http://www.apache.org/licenses/LICENSE-2.0 6141 * 6142 * Unless required by applicable law or agreed to in writing, software 6143 * distributed under the License is distributed on an "AS IS" BASIS, 6144 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6145 * See the License for the specific language governing permissions and 6146 * limitations under the License. 6147 */class RF{constructor(){this.ga=new or(Mt.comparator)}track(e){const t=e.doc.key,r=this.ga.get(t);r?e.type!==0&&r.type===3?this.ga=this.ga.insert(t,e):e.type===3&&r.type!==1?this.ga=this.ga.insert(t,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.ga=this.ga.insert(t,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.ga=this.ga.insert(t,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.ga=this.ga.remove(t):e.type===1&&r.type===2?this.ga=this.ga.insert(t,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.ga=this.ga.insert(t,{type:2,doc:e.doc}):It(63341,{Vt:e,pa:r}):this.ga=this.ga.insert(t,e)}ya(){const e=[];return this.ga.inorderTraversal((t,r)=>{e.push(r)}),e}}class yp{constructor(e,t,r,i,s,o,a,l,c){this.query=e,this.docs=t,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=a,this.excludesMetadataChanges=l,this.hasCachedResults=c}static fromInitialDocuments(e,t,r,i,s){const o=[];return t.forEach(a=>{o.push({type:0,doc:a})}),new yp(e,t,Ff.emptySet(t),o,r,i,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&xS(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const t=this.docChanges,r=e.docChanges;if(t.length!==r.length)return!1;for(let i=0;i<t.length;i++)if(t[i].type!==r[i].type||!t[i].doc.isEqual(r[i].doc))return!1;return!0}}/** 6148 * @license 6149 * Copyright 2017 Google LLC 6150 * 6151 * Licensed under the Apache License, Version 2.0 (the "License"); 6152 * you may not use this file except in compliance with the License. 6153 * You may obtain a copy of the License at 6154 * 6155 * http://www.apache.org/licenses/LICENSE-2.0 6156 * 6157 * Unless required by applicable law or agreed to in writing, softw
6157are 6158 * distributed under the License is distributed on an "AS IS" BASIS, 6159 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6160 * See the License for the specific language governing permissions and 6161 * limitations under the License. 6162 */class j_e{constructor(){this.wa=void 0,this.ba=[]}Sa(){return this.ba.some(e=>e.Da())}}class B_e{constructor(){this.queries=PF(),this.onlineState="Unknown",this.Ca=new Set}terminate(){(function(t,r){const i=Gt(t),s=i.queries;i.queries=PF(),s.forEach((o,a)=>{for(const l of a.ba)l.onError(r)})})(this,new rt(Ee.ABORTED,"Firestore shutting down"))}}function PF(){return new Hd(n=>GG(n),xS)}async function z_e(n,e){const t=Gt(n);let r=3;const i=e.query;let s=t.queries.get(i);s?!s.Sa()&&e.Da()&&(r=2):(s=new j_e,r=e.Da()?0:1);try{switch(r){case 0:s.wa=await t.onListen(i,!0);break;case 1:s.wa=await t.onListen(i,!1);break;case 2:await t.onFirstRemoteStoreListen(i)}}catch(o){const a=EN(o,`Initialization of query '${Xh(e.query)}' failed`);return void e.onError(a)}t.queries.set(i,s),s.ba.push(e),e.va(t.onlineState),s.wa&&e.Fa(s.wa)&&TN(t)}async function H_e(n,e){const t=Gt(n),r=e.query;let i=3;const s=t.queries.get(r);if(s){const o=s.ba.indexOf(e);o>=0&&(s.ba.splice(o,1),s.ba.length===0?i=e.Da()?0:1:!s.Sa()&&e.Da()&&(i=2))}switch(i){case 0:return t.queries.delete(r),t.onUnlisten(r,!0);case 1:return t.queries.delete(r),t.onUnlisten(r,!1);case 2:return t.onLastRemoteStoreUnlisten(r);default:return}}function G_e(n,e){const t=Gt(n);let r=!1;for(const i of e){const s=i.query,o=t.queries.get(s);if(o){for(const a of o.ba)a.Fa(i)&&(r=!0);o.wa=i}}r&&TN(t)}function W_e(n,e,t){const r=Gt(n),i=r.queries.get(e);if(i)for(const s of i.ba)s.onError(t);r.queries.delete(e)}function TN(n){n.Ca.forEach(e=>{e.next()})}var jC,NF;(NF=jC||(jC={})).Ma="default",NF.Cache="cache";class $_e{constructor(e,t,r){this.query=e,this.xa=t,this.Oa=!1,this.Na=null,this.onlineState="Unknown",this.options=r||{}}Fa(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new yp(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.Oa?this.Ba(e)&&(this.xa.next(e),t=!0):this.La(e,this.onlineState)&&(this.ka(e),t=!0),this.Na=e,t}onError(e){this.xa.error(e)}va(e){this.onlineState=e;let t=!1;return this.Na&&!this.Oa&&this.La(this.Na,e)&&(this.ka(this.Na),t=!0),t}La(e,t){if(!e.fromCache||!this.Da())return!0;const r=t!=="Offline";return(!this.options.Ka||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||t==="Offline")}Ba(e){if(e.docChanges.length>0)return!0;const t=this.Na&&this.Na.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&this.options.includeMetadataChanges===!0}ka(e){e=yp.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Oa=!0,this.xa.next(e)}Da(){return this.options.source!==jC.Cache}}/** 6163 * @license 6164 * Copyright 2017 Google LLC 6165 * 6166 * Licensed under the Apache License, Version 2.0 (the "License"); 6167 * you may not use this file except in compliance with the License. 6168 * You may obtain a copy of the License at 6169 * 6170 * http://www.apache.org/licenses/LICENSE-2.0 6171 * 6172 * Unless required by applicable law or agreed to in writing, software 6173 * distributed under the License is distributed on an "AS IS" BASIS, 6174 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6175 * See the License for the specific language governing permissions and 6176 * limitations under the License. 6177 */class TW{constructor(e){this.key=e}}class MW{constructor(e){this.key=e}}class q_e{constructor(e,t){this.query=e,this.Za=t,this.Xa=null,this.hasCachedResults=!1,this.current=!1,this.Ya=un(),this.mutatedKeys=un(),this.eu=WG(e),this.tu=new Ff(this.eu)}get nu(){return this.Za}ru(e,t){const r=t?t.iu:new RF,i=t?t.tu:this.tu;let s=t?t.mutatedKeys:this.mutatedKeys,o=i,a=!1;const l=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,c=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((u,d)=>{const m=i.get(u),g=_S(this.query,d)?d:null,v=!!m&&this.mutatedKeys.has(m.ke
6177y),_=!!g&&(g.hasLocalMutations||this.mutatedKeys.has(g.key)&&g.hasCommittedMutations);let x=!1;m&&g?m.data.isEqual(g.data)?v!==_&&(r.track({type:3,doc:g}),x=!0):this.su(m,g)||(r.track({type:2,doc:g}),x=!0,(l&&this.eu(g,l)>0||c&&this.eu(g,c)<0)&&(a=!0)):!m&&g?(r.track({type:0,doc:g}),x=!0):m&&!g&&(r.track({type:1,doc:m}),x=!0,(l||c)&&(a=!0)),x&&(g?(o=o.add(g),s=_?s.add(u):s.delete(u)):(o=o.delete(u),s=s.delete(u)))}),this.query.limit!==null)for(;o.size>this.query.limit;){const u=this.query.limitType==="F"?o.last():o.first();o=o.delete(u.key),s=s.delete(u.key),r.track({type:1,doc:u})}return{tu:o,iu:r,Ss:a,mutatedKeys:s}}su(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,r,i){const s=this.tu;this.tu=e.tu,this.mutatedKeys=e.mutatedKeys;const o=e.iu.ya();o.sort((u,d)=>function(g,v){const _=x=>{switch(x){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return It(20277,{Vt:x})}};return _(g)-_(v)}(u.type,d.type)||this.eu(u.doc,d.doc)),this.ou(r),i=i??!1;const a=t&&!i?this._u():[],l=this.Ya.size===0&&this.current&&!i?1:0,c=l!==this.Xa;return this.Xa=l,o.length!==0||c?{snapshot:new yp(this.query,e.tu,s,o,e.mutatedKeys,l===0,c,!1,!!r&&r.resumeToken.approximateByteSize()>0),au:a}:{au:a}}va(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({tu:this.tu,iu:new RF,mutatedKeys:this.mutatedKeys,Ss:!1},!1)):{au:[]}}uu(e){return!this.Za.has(e)&&!!this.tu.has(e)&&!this.tu.get(e).hasLocalMutations}ou(e){e&&(e.addedDocuments.forEach(t=>this.Za=this.Za.add(t)),e.modifiedDocuments.forEach(t=>{}),e.removedDocuments.forEach(t=>this.Za=this.Za.delete(t)),this.current=e.current)}_u(){if(!this.current)return[];const e=this.Ya;this.Ya=un(),this.tu.forEach(r=>{this.uu(r.key)&&(this.Ya=this.Ya.add(r.key))});const t=[];return e.forEach(r=>{this.Ya.has(r)||t.push(new MW(r))}),this.Ya.forEach(r=>{e.has(r)||t.push(new TW(r))}),t}cu(e){this.Za=e.ks,this.Ya=un();const t=this.ru(e.documents);return this.applyChanges(t,!0)}lu(){return yp.fromInitialDocuments(this.query,this.tu,this.mutatedKeys,this.Xa===0,this.hasCachedResults)}}const MN="SyncEngine";class X_e{constructor(e,t,r){this.query=e,this.targetId=t,this.view=r}}class K_e{constructor(e){this.key=e,this.hu=!1}}class Y_e{constructor(e,t,r,i,s,o){this.localStore=e,this.remoteStore=t,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.Pu={},this.Tu=new Hd(a=>GG(a),xS),this.Iu=new Map,this.Eu=new Set,this.Ru=new or(Mt.comparator),this.Au=new Map,this.Vu=new mN,this.du={},this.mu=new Map,this.fu=gp.ar(),this.onlineState="Unknown",this.gu=void 0}get isPrimaryClient(){return this.gu===!0}}async function Q_e(n,e,t=!0){const r=IW(n);let i;const s=r.Tu.get(e);return s?(r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.view.lu()):i=await AW(r,e,t,!0),i}async function J_e(n,e){const t=IW(n);await AW(t,e,!0,!1)}async function AW(n,e,t,r){const i=await p_e(n.localStore,Pa(e)),s=i.targetId,o=n.sharedClientState.addLocalQueryTarget(s,t);let a;return r&&(a=await Z_e(n,e,s,o==="current",i.resumeToken)),n.isPrimaryClient&&t&&xW(n.remoteStore,i),a}async function Z_e(n,e,t,r,i){n.pu=(d,m,g)=>async function(_,x,y,S){let b=x.view.ru(y);b.Ss&&(b=await bF(_.localStore,x.query,!1).then(({documents:C})=>x.view.ru(C,b)));const A=S&&S.targetChanges.get(x.targetId),k=S&&S.targetMismatches.get(x.targetId)!=null,L=x.view.applyChanges(b,_.isPrimaryClient,A,k);return LF(_,x.targetId,L.au),L.snapshot}(n,d,m,g);const s=await bF(n.localStore,e,!0),o=new q_e(e,s.ks),a=o.ru(s.documents),l=_v.createSynthesizedTargetChangeForCurrentChange(t,r&&n.onlineState!=="Offline",i),c=o.applyChanges(a,n.isPrimaryClient,l);LF(n,t,c.au);const u=new X_e(e,t,o);return n.Tu.set(e,u),n.Iu.has(t)?n.Iu.get(t).push(e):n.Iu.set(t,[e]),c.snapshot}async function e1e(n,e,t){const r=Gt(n),i=r.Tu.get(e),s=r.Iu.get(i.targetId);if(s.length>1)return r.Iu.set(i.targetId,s.filter(o=>!xS(o,e))),void r.Tu.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
6177ientState.isActiveQueryTarget(i.targetId)||await UC(r.localStore,i.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(i.targetId),t&&xN(r.remoteStore,i.targetId),BC(r,i.targetId)}).catch(Hp)):(BC(r,i.targetId),await UC(r.localStore,i.targetId,!0))}async function t1e(n,e){const t=Gt(n),r=t.Tu.get(e),i=t.Iu.get(r.targetId);t.isPrimaryClient&&i.length===1&&(t.sharedClientState.removeLocalQueryTarget(r.targetId),xN(t.remoteStore,r.targetId))}async function n1e(n,e,t){const r=c1e(n);try{const i=await function(o,a){const l=Gt(o),c=An.now(),u=a.reduce((g,v)=>g.add(v.key),un());let d,m;return l.persistence.runTransaction("Locally write mutations","readwrite",g=>{let v=Ml(),_=un();return l.xs.getEntries(g,u).next(x=>{v=x,v.forEach((y,S)=>{S.isValidDocument()||(_=_.add(y))})}).next(()=>l.localDocuments.getOverlayedDocuments(g,v)).next(x=>{d=x;const y=[];for(const S of a){const b=fxe(S,d.get(S.key).overlayedDocument);b!=null&&y.push(new cu(S.key,b,kG(b.value.mapValue),Yo.exists(!0)))}return l.mutationQueue.addMutationBatch(g,c,y,a)}).next(x=>{m=x;const y=x.applyToLocalDocumentSet(d,_);return l.documentOverlayCache.saveOverlays(g,x.batchId,y)})}).then(()=>({batchId:m.batchId,changes:qG(d)}))}(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),function(o,a,l){let c=o.du[o.currentUser.toKey()];c||(c=new or(cn)),c=c.insert(a,l),o.du[o.currentUser.toKey()]=c}(r,i.batchId,t),await Sv(r,i.changes),await MS(r.remoteStore)}catch(i){const s=EN(i,"Failed to persist write");t.reject(s)}}async function CW(n,e){const t=Gt(n);try{const r=await d_e(t.localStore,e);
6177e.targetChanges.forEach((i,s)=>{const o=t.Au.get(s);o&&(Cn(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1,22616),i.addedDocuments.size>0?o.hu=!0:i.modifiedDocuments.size>0?Cn(o.hu,14607):i.removedDocuments.size>0&&(Cn(o.hu,42227),o.hu=!1))}),await Sv(t,r,e)}catch(r){await Hp(r)}}function IF(n,e,t){const r=Gt(n);if(r.isPrimaryClient&&t===0||!r.isPrimaryClient&&t===1){const i=[];r.Tu.forEach((s,o)=>{const a=o.view.va(e);a.snapshot&&i.push(a.snapshot)}),function(o,a){const l=Gt(o);l.onlineState=a;let c=!1;l.queries.forEach((u,d)=>{for(const m of d.ba)m.va(a)&&(c=!0)}),c&&TN(l)}(r.eventManager,e),i.length&&r.Pu.J_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function r1e(n,e,t){const r=Gt(n);r.sharedClientState.updateQueryState(e,"rejected",t);const i=r.Au.get(e),s=i&&i.key;if(s){let o=new or(Mt.comparator);o=o.insert(s,Ni.newNoDocument(s,Ht.min()));const a=un().add(s),l=new bS(Ht.min(),new Map,new or(cn),o,a);await CW(r,l),r.Ru=r.Ru.remove(s),r.Au.delete(e),AN(r)}else await UC(r.localStore,e,!1).then(()=>BC(r,e,t)).catch(Hp)}async function i1e(n,e){const t=Gt(n),r=e.batch.batchId;try{const i=await u_e(t.localStore,e);PW(t,r,null),RW(t,r),t.sharedClientState.updateMutationState(r,"acknowledged"),await Sv(t,i)}catch(i){await Hp(i)}}async function s1e(n,e,t){const r=Gt(n);try{const i=await function(o,a){const l=Gt(o);return l.persistence.runTransaction("Reject batch","readwrite-primary",c=>{let u;return l.mutationQueue.lookupMutationBatch(c,a).next(d=>(Cn(d!==null,37113),u=d.keys(),l.mutationQueue.removeMutationBatch(c,d))).next(()=>l.mutationQueue.performConsistencyCheck(c)).next(()=>l.documentOverlayCache.removeOverlaysForBatchId(c,u,a)).next(()=>l.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(c,u)).next(()=>l.localDocuments.getDocuments(c,u))})}(r.localStore,e);PW(r,e,t),RW(r,e),r.sharedClientState.updateMutationState(e,"rejected",t),await Sv(r,i)}catch(i){await Hp(i)}}function RW(n,e){(n.mu.get(e)||[]).forEach(t=>{t.resolve()}),n.mu.delete(e)}function PW(n,e,t){const r=Gt(n);let i=r.du[r.currentUser.toKey()];if(i){const s=i.get(e);s&&(t?s.reject(t):s.resolve(),i=i.remove(e)),r.du[r.currentUser.toKey()]=i}}function BC(n,e,t=null){n.sharedClientState.removeLocalQueryTarget(e);for(const r of n.Iu.get(e))n.Tu.delete(r),t&&n.Pu.yu(r,t);n.Iu.delete(e),n.isPrimaryClient&&n.Vu.Gr(e).forEach(r=>{n.Vu.containsKey(r)||NW(n,r)})}function NW(n,e){n.Eu.delete(e.path.canonicalString());const t=n.Ru.get(e);t!==null&&(xN(n.remoteStore,t),n.Ru=n.Ru.remove(e),n.Au.delete(t),AN(n))}function LF(n,e,t){for(const r of t)r instanceof TW?(n.Vu.addReference(r.key,e),o1e(n,r)):r instanceof MW?(at(MN,"Document no longer in limbo: "+r.key),n.Vu.removeReference(r.key,e),n.Vu.containsKey(r.key)||NW(n,r.key)):It(19791,{wu:r})}function o1e(n,e){const t=e.key,r=t.path.canonicalString();n.Ru.get(t)||n.Eu.has(r)||(at(MN,"New document in limbo: "+t),n.Eu.add(r),AN(n))}function AN(n){for(;n.Eu.size>0&&n.Ru.size<n.maxConcurrentLimboResolutions;){const e=n.Eu.values().next().value;n.Eu.delete(e);const t=new Mt(Fn.fromString(e)),r=n.fu.next();n.Au.set(r,new K_e(t)),n.Ru=n.Ru.insert(t,r),xW(n.remoteStore,new pc(Pa(zG(t.path)),r,"TargetPurposeLimboResolution",gS.ce))}}async function Sv(n,e,t){const r=Gt(n),i=[],s=[],o=[];r.Tu.isEmpty()||(r.Tu.forEach((a,l)=>{o.push(r.pu(l,e,t).then(c=>{var u;if((c||t)&&r.isPrimaryClient){const d=c?!c.fromCache:(u=t==null?void 0:t.targetChanges.get(l.targetId))==null?void 0:u.current;
6177r.sharedClientState.updateQueryState(l.targetId,d?"current":"not-current")}if(c){i.push(c);const d=yN.Es(l.targetId,c);s.push(d)}}))}),await Promise.all(o),r.Pu.J_(i),await async function(l,c){const u=Gt(l);try{await u.persistence.runTransaction("notifyLocalViewChanges","readwrite",d=>Me.forEach(c,m=>Me.forEach(m.Ts,g=>u.persistence.referenceDelegate.addReference(d,m.targetId,g)).next(()=>Me.forEach(m.Is,g=>u.persistence.referenceDelegate.removeReference(d,m.targetId,g)))))}catch(d){if(!Gp(d))throw d;at(vN,"Failed to update sequence numbers: "+d)}for(const d of c){const m=d.targetId;if(!d.fromCache){const g=u.vs.get(m),v=g.snapshotVersion,_=g.withLastLimboFreeSnapshotVersion(v);u.vs=u.vs.insert(m,_)}}}(r.localStore,s))}async function a1e(n,e){const t=Gt(n);if(!t.currentUser.isEqual(e)){at(MN,"User change. New user:",e.toKey());const r=await mW(t.localStore,e);t.currentUser=e,function(s,o){s.mu.forEach(a=>{a.forEach(l=>{l.reject(new rt(Ee.CANCELLED,o))})}),s.mu.clear()}(t,"'waitForPendingWrites' promise is rejected due to a user change."),t.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await Sv(t,r.Ns)}}function l1e(n,e){const t=Gt(n),r=t.Au.get(e);if(r&&r.hu)return un().add(r.key);{let i=un();const s=t.Iu.get(e);if(!s)return i;for(const o of s){const a=t.Tu.get(o);i=i.unionWith(a.view.nu)}return i}}function IW(n){const e=Gt(n);return e.remoteStore.remoteSyncer.applyRemoteEvent=CW.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=l1e.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=r1e.bind(null,e),e.Pu.J_=G_e.bind(null,e.eventManager),e.Pu.yu=W_e.bind(null,e.eventManager),e}function c1e(n){const e=Gt(n);return e.remoteStore.remoteSyncer.applySuccessfulWrite=i1e.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=s1e.bind(null,e),e}class $1{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=ES(e.databaseInfo.databaseId),this.sharedClientState=this.Du(e),this.persistence=this.Cu(e),await this.persistence.start(),this.localStore=this.vu(e),this.gcScheduler=this.Fu(e,this.localStore),this.indexBackfillerScheduler=this.Mu(e,this.localStore)}Fu(e,t){return null}Mu(e,t){return null}vu(e){return c_e(this.persistence,new o_e,e.initialUser,this.serializer)}Cu(e){return new pW(gN.Vi,this.serializer)}Du(e){return new g_e}async terminate(){var e,t;(e=this.gcScheduler)==null||e.stop(),(t=this.indexBackfillerScheduler)==null||t.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}$1.provider={build:()=>new $1};class u1e extends $1{constructor(e){super(),this.cacheSizeBytes=e}Fu(e,t){Cn(this.persistence.referenceDelegate instanceof G1,46915);const r=this.persistence.referenceDelegate.garbageCollector;return new Wxe(r,e.asyncQueue,t)}Cu(e){const t=this.cacheSizeBytes!==void 0?hs.withCacheSize(this.cacheSizeBytes):hs.DEFAULT;return new pW(r=>G1.Vi(r,t),this.serializer)}}class zC{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>IF(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=a1e.bind(null,this.syncEngine),await V_e(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new B_e}()}createDatastore(e){const t=ES(e.databaseInfo.databaseId),r=w_e(e.databaseInfo);return M_e(e.authCredentials,e.appCheckCredentials,r,t)}createRemoteStore(e){return function(r,i,s,o,a){return new C_e(r,i,s,o,a)}(this.localStore,this.datastore,e.asyncQueue,t=>IF(this.syncEngine,t,0),function(){return MF.v()?new MF:new y_e}())}createSyncEngine(e,t){return function(i,s,o,a,l,c,u){const d=new Y_e(i,s,o,a,l,c);return u&&(d.gu=!0),d}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}async terminate(){var e,t;await async function(i){const s=Gt(i);at(Ld,"RemoteStore shutting down."),s.Ea.add(5),await wv(s),s.Aa.shutdown(),s.Va.set("Unknown")}(this.remoteStore),(e=this.datastore)==null||e.terminate(),(t=this.eventManager)==null||t.terminate()}}zC.provider={build:()=>new zC};/** 6178 * @license 6179 * Copyright 2020 Google LLC 6180 * 6181 * Licensed under the Apache License, Version 2.0 (the "License");
6182 * you may not use this file except in compliance with the License. 6183 * You may obtain a copy of the License at 6184 * 6185 * http://www.apache.org/licenses/LICENSE-2.0 6186 * 6187 * Unless required by applicable law or agreed to in writing, software 6188 * distributed under the License is distributed on an "AS IS" BASIS, 6189 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6190 * See the License for the specific language governing permissions and 6191 * limitations under the License. 6192 *//** 6193 * @license 6194 * Copyright 2017 Google LLC 6195 * 6196 * Licensed under the Apache License, Version 2.0 (the "License"); 6197 * you may not use this file except in compliance with the License. 6198 * You may obtain a copy of the License at 6199 * 6200 * http://www.apache.org/licenses/LICENSE-2.0 6201 * 6202 * Unless required by applicable law or agreed to in writing, software 6203 * distributed under the License is distributed on an "AS IS" BASIS, 6204 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6205 * See the License for the specific language governing permissions and 6206 * limitations under the License. 6207 */class d1e{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.Ou(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.Ou(this.observer.error,e):Tl("Uncaught Error in snapshot listener:",e.toString()))}Nu(){this.muted=!0}Ou(e,t){setTimeout(()=>{this.muted||e(t)},0)}}/** 6208 * @license 6209 * Copyright 2017 Google LLC 6210 * 6211 * Licensed under the Apache License, Version 2.0 (the "License"); 6212 * you may not use this file except in compliance with the License. 6213 * You may obtain a copy of the License at 6214 * 6215 * http://www.apache.org/licenses/LICENSE-2.0 6216 * 6217 * Unless required by applicable law or agreed to in writing, software 6218 * distributed under the License is distributed on an "AS IS" BASIS, 6219 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6220 * See the License for the specific language governing permissions and 6221 * limitations under the License. 6222 */const Kc="FirestoreClient";class h1e{constructor(e,t,r,i,s){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=r,this._databaseInfo=i,this.user=Ri.UNAUTHENTICATED,this.clientId=iN.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=s,this.authCredentials.start(r,async o=>{at(Kc,"Received user=",o.uid),await this.authCredentialListener(o),this.user=o}),this.appCheckCredentials.start(r,o=>(at(Kc,"Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this._databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();const e=new Nc;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(t){const r=EN(t,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function HT(n,e){n.asyncQueue.verifyOperationInProgress(),at(Kc,"Initializing OfflineComponentProvider");const t=n.configuration;await e.initialize(t);let r=t.initialUser;n.setCredentialChangeListener(async i=>{r.isEqual(i)||(await mW(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>n.terminate()),n._offlineComponents=e}async function DF(n,e){n.asyncQueue.verifyOperationInProgress();const t=await f1e(n);at(Kc,"Initializing OnlineComponentProvider"),await e.initialize(t,n.configuration),n.setCredentialChangeListener(r=>CF(e.remoteStore,r)),n.setAppCheckTokenChangeListener((r,i)=>CF(e.remoteStore,i)),n._onlineComponents=e}async function f1e(n){if(!n._offlineComponents)if(n._uninitializedComponentsProvider){at(Kc,"Using user provided OfflineComponentProvider");try{await HT(n,n._uninitializedComponentsProvider._offline)}catch(e){const t=e;if(!function(i){return i.name==="FirebaseError"?i.code===Ee.FAILED_PRECONDITION||i.code===Ee.UNIMPLEMENT
6222ED:!(typeof DOMException<"u"&&i instanceof DOMException)||i.code===22||i.code===20||i.code===11}(t))throw t;hp("Error using user provided cache. Falling back to memory cache: "+t),await HT(n,new $1)}}else at(Kc,"Using default OfflineComponentProvider"),await HT(n,new u1e(void 0));return n._offlineComponents}async function LW(n){return n._onlineComponents||(n._uninitializedComponentsProvider?(at(Kc,"Using user provided OnlineComponentProvider"),await DF(n,n._uninitializedComponentsProvider._online)):(at(Kc,"Using default OnlineComponentProvider"),await DF(n,new zC))),n._onlineComponents}function p1e(n){return LW(n).then(e=>e.syncEngine)}async function m1e(n){const e=await LW(n),t=e.eventManager;return t.onListen=Q_e.bind(null,e.syncEngine),t.onUnlisten=e1e.bind(null,e.syncEngine),t.onFirstRemoteStoreListen=J_e.bind(null,e.syncEngine),t.onLastRemoteStoreUnlisten=t1e.bind(null,e.syncEngine),t}function g1e(n,e,t={}){const r=new Nc;return n.asyncQueue.enqueueAndForget(async()=>function(s,o,a,l,c){const u=new d1e({next:m=>{u.Nu(),o.enqueueAndForget(()=>H_e(s,d)),m.fromCache&&l.source==="server"?c.reject(new rt(Ee.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):c.resolve(m)},error:m=>c.reject(m)}),d=new $_e(a,u,{includeMetadataChanges:!0,Ka:!0});return z_e(s,d)}(await m1e(n),n.asyncQueue,e,t,r)),r.promise}function y1e(n,e){const t=new Nc;return n.asyncQueue.enqueueAndForget(async()=>n1e(await p1e(n),e,t)),t.promise}/** 6223 * @license 6224 * Copyright 2023 Google LLC 6225 * 6226 * Licensed under the Apache License, Version 2.0 (the "License"); 6227 * you may not use this file except in compliance with the License. 6228 * You may obtain a copy of the License at 6229 * 6230 * http://www.apache.org/licenses/LICENSE-2.0 6231 * 6232 * Unless required by applicable law or agreed to in writing, software 6233 * distributed under the License is distributed on an "AS IS" BASIS, 6234 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6235 * See the License for the specific language governing permissions and 6236 * limitations under the License. 6237 */function DW(n){const e={};return n.timeoutSeconds!==void 0&&(e.timeoutSeconds=n.timeoutSeconds),e}/** 6238 * @license 6239 * Copyright 2020 Google LLC 6240 * 6241 * Licensed under the Apache License, Version 2.0 (the "License"); 6242 * you may not use this file except in compliance with the License. 6243 * You may obtain a copy of the License at 6244 * 6245 * http://www.apache.org/licenses/LICENSE-2.0 6246 * 6247 * Unless required by applicable law or agreed to in writing, software 6248 * distributed under the License is distributed on an "AS IS" BASIS, 6249 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6250 * See the License for the specific language governing permissions and 6251 * limitations under the License. 6252 */const v1e="ComponentProvider",kF=new Map;function x1e(n,e,t,r,i){return new F0e(n,e,t,i.host,i.ssl,i.experimentalForceLongPolling,i.experimentalAutoDetectLongPolling,DW(i.experimentalLongPollingOptions),i.useFetchStreams,i.isUsingEmulator,r)}/** 6253 * @license 6254 * Copyright 2020 Google LLC 6255 * 6256 * Licensed under the Apache License, Version 2.0 (the "License"); 6257 * you may not use this file except in compliance with the License. 6258 * You may obtain a copy of the License at 6259 * 6260 * http://www.apache.org/licenses/LICENSE-2.0 6261 * 6262 * Unless required by applicable law or agreed to in writing, software 6263 * distributed under the License is distributed on an "AS IS" BASIS, 6264 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6265 * See the License for the specific language governing permissions and 6266 * limitations under the License. 6267 */const kW="firestore.googleapis.com",OF=!0;class FF{constructor(e){if(e.host===void 0){if(e.ssl!==void 0)throw new rt(Ee.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=kW,this.ssl=OF}else this.host=e.host,this.ssl=e.ssl??OF;if(this.isUsingEmulator=e.emulatorOptions!==void 0,this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=fW;
6267else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<Hxe)throw new rt(Ee.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}M0e("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=DW(e.experimentalLongPollingOptions??{}),function(r){if(r.timeoutSeconds!==void 0){if(isNaN(r.timeoutSeconds))throw new rt(Ee.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (must not be NaN)`);if(r.timeoutSeconds<5)throw new rt(Ee.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (minimum allowed value is 5)`);if(r.timeoutSeconds>30)throw new rt(Ee.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(r,i){return r.timeoutSeconds===i.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}
6267class AS{constructor(e,t,r,i){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new FF({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new rt(Ee.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!=="notTerminated"}_setSettings(e){if(this._settingsFrozen)throw new rt(Ee.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new FF(e),this._emulatorOptions=e.emulatorOptions||{},e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new g0e;switch(r.type){case"firstParty":return new _0e(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new rt(Ee.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask==="notTerminated"&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask==="notTerminated"?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(t){const r=kF.get(t);r&&(at(v1e,"Removing Datastore"),kF.delete(t),r.terminate())}(this),Promise.resolve()}}function _1e(n,e,t,r={}){var c;n=Id(n,AS);const i=tN(e),s=n._getSettings(),o={...s,emulatorOptions:n._getEmulatorOptions()},a=`${e}:${t}`;i&&(Gye(`https://${a}`),Xye("Firestore",!0)),s.host!==kW&&s.host!==a&&hp("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");const l={...s,host:a,ssl:i,emulatorOptions:r};if(!L1(l,o)&&(n._setSettings(l),r.mockUserToken)){let u,d;if(typeof r.mockUserToken=="string")u=r.mockUserToken,d=Ri.MOCK_USER;else{u=Wye(r.mockUserToken,(c=n._app)==null?void 0:c.options.projectId);const m=r.mockUserToken.sub||r.mockUserToken.user_id;if(!m)throw new rt(Ee.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");d=new Ri(m)}n._authCredentials=new y0e(new SG(u,d))}}/** 6268 * @license 6269 * Copyright 2020 Google LLC 6270 * 6271 * Licensed under the Apache License, Version 2.0 (the "License"); 6272 * you may not use this file except in compliance with the License. 6273 * You may obtain a copy of the License at 6274 * 6275 * http://www.apache.org/licenses/LICENSE-2.0 6276 * 6277 * Unless required by applicable law or agreed to in writing, software 6278 * distributed under the License is distributed on an "AS IS" BASIS, 6279 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6280 * See the License for the specific language governing permissions and 6281 * limitations under the License. 6282 */class $p{constructor(e,t,r){this.converter=t,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new $p(this.firestore,e,this._query)}}class Vr{constructor(e,t,r){this.converter=t,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Ic(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new Vr(this.firestore,e,this._key)}toJSON(){return{type:Vr._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(e,t,r){if(yv(t,Vr._jsonSchema))return new Vr(e,r||null,new Mt(Fn.fromString(t.referencePath)))}}Vr._jsonSchemaVersion="firestore/documentReference/1.0",Vr._jsonSchema={type:Nr("string",Vr._jsonSchemaVersion),referencePath:Nr("string")};class Ic extends $p{constructor(e,t,r){super(e,t,zG(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}
6282get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new Vr(this.firestore,null,new Mt(e))}withConverter(e){return new Ic(this.firestore,e,this._path)}}function bv(n,e,...t){if(n=bl(n),bG("collection","path",e),n instanceof AS){const r=Fn.fromString(e,...t);return YO(r),new Ic(n,null,r)}{if(!(n instanceof Vr||n instanceof Ic))throw new rt(Ee.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=n._path.child(Fn.fromString(e,...t));return YO(r),new Ic(n.firestore,null,r)}}function CN(n,e,...t){if(n=bl(n),arguments.length===1&&(e=iN.newId()),bG("doc","path",e),n instanceof AS){const r=Fn.fromString(e,...t);return KO(r),new Vr(n,null,new Mt(r))}{if(!(n instanceof Vr||n instanceof Ic))throw new rt(Ee.INVALID_ARGUMENT,"Expected first argument to doc() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=n._path.child(Fn.fromString(e,...t));return KO(r),new Vr(n.firestore,n instanceof Ic?n.converter:null,new Mt(r))}}/** 6283 * @license 6284 * Copyright 2020 Google LLC 6285 * 6286 * Licensed under the Apache License, Version 2.0 (the "License"); 6287 * you may not use this file except in compliance with the License. 6288 * You may obtain a copy of the License at 6289 * 6290 * http://www.apache.org/licenses/LICENSE-2.0 6291 * 6292 * Unless required by applicable law or agreed to in writing, software 6293 * distributed under the License is distributed on an "AS IS" BASIS, 6294 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6295 * See the License for the specific language governing permissions and 6296 * limitations under the License. 6297 */const UF="AsyncQueue";class VF{constructor(e=Promise.resolve()){this.Yu=[],this.ec=!1,this.tc=[],this.nc=null,this.rc=!1,this.sc=!1,this.oc=[],this.M_=new yW(this,"async_queue_retry"),this._c=()=>{const r=zT();r&&at(UF,"Visibility state changed to "+r.visibilityState),this.M_.w_()},this.ac=e;const t=zT();t&&typeof t.addEventListener=="function"&&t.addEventListener("visibilitychange",this._c)}get isShuttingDown(){return this.ec}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.uc(),this.cc(e)}enterRestrictedMode(e){if(!this.ec){this.ec=!0,this.sc=e||!1;const t=zT();t&&typeof t.removeEventListener=="function"&&t.removeEventListener("visibilitychange",this._c)}}enqueue(e){if(this.uc(),this.ec)return new Promise(()=>{});const t=new Nc;return this.cc(()=>this.ec&&this.sc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Yu.push(e),this.lc()))}async lc(){if(this.Yu.length!==0){try{await this.Yu[0](),this.Yu.shift(),this.M_.reset()}catch(e){if(!Gp(e))throw e;at(UF,"Operation failed with retryable error: "+e)}this.Yu.length>0&&this.M_.p_(()=>this.lc())}}cc(e){const t=this.ac.then(()=>(this.rc=!0,e().catch(r=>{throw this.nc=r,this.rc=!1,Tl("INTERNAL UNHANDLED ERROR: ",jF(r)),r}).then(r=>(this.rc=!1,r))));return this.ac=t,t}enqueueAfterDelay(e,t,r){this.uc(),this.oc.indexOf(e)>-1&&(t=0);const i=bN.createAndSchedule(this,e,t,r,s=>this.hc(s));return this.tc.push(i),i}uc(){this.nc&&It(47125,{Pc:jF(this.nc)})}verifyOperationInProgress(){}async Tc(){let e;do e=this.ac,await e;while(e!==this.ac)}Ic(e){for(const t of this.tc)if(t.timerId===e)return!0;return!1}Ec(e){return this.Tc().then(()=>{this.tc.sort((t,r)=>t.targetTimeMs-r.targetTimeMs);for(const t of this.tc)if(t.skipDelay(),e!=="all"&&t.timerId===e)break;return this.Tc()})}Rc(e){this.oc.push(e)}hc(e){const t=this.tc.indexOf(e);this.tc.splice(t,1)}}function jF(n){let e=n.message||"";return n.stack&&(e=n.stack.includes(n.message)?n.stack:n.message+` 6298`+n.stack),e}
6298class Ev extends AS{constructor(e,t,r,i){super(e,t,r,i),this.type="firestore",this._queue=new VF,this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new VF(e),this._firestoreClient=void 0,await e}}}function w1e(n,e){const t=typeof n=="object"?n:i0e(),r=typeof n=="string"?n:F1,i=Zve(t,"firestore").getImmediate({identifier:r});if(!i._initialized){const s=zye("firestore");s&&_1e(i,...s)}return i}function OW(n){if(n._terminated)throw new rt(Ee.FAILED_PRECONDITION,"The client has already been terminated.");return n._firestoreClient||S1e(n),n._firestoreClient}function S1e(n){var r,i,s,o;const e=n._freezeSettings(),t=x1e(n._databaseId,((r=n._app)==null?void 0:r.options.appId)||"",n._persistenceKey,(i=n._app)==null?void 0:i.options.apiKey,e);n._componentsProvider||(s=e.localCache)!=null&&s._offlineComponentProvider&&((o=e.localCache)!=null&&o._onlineComponentProvider)&&(n._componentsProvider={_offline:e.localCache._offlineComponentProvider,_online:e.localCache._onlineComponentProvider}),n._firestoreClient=new h1e(n._authCredentials,n._appCheckCredentials,n._queue,t,n._componentsProvider&&function(l){const c=l==null?void 0:l._online.build();return{_offline:l==null?void 0:l._offline.build(c),_online:c}}(n._componentsProvider))}/** 6299 * @license 6300 * Copyright 2020 Google LLC 6301 * 6302 * Licensed under the Apache License, Version 2.0 (the "License"); 6303 * you may not use this file except in compliance with the License. 6304 * You may obtain a copy of the License at 6305 * 6306 * http://www.apache.org/licenses/LICENSE-2.0 6307 * 6308 * Unless required by applicable law or agreed to in writing, software 6309 * distributed under the License is distributed on an "AS IS" BASIS, 6310 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6311 * See the License for the specific language governing permissions and 6312 * limitations under the License. 6313 */class po{constructor(e){this._byteString=e}static fromBase64String(e){try{return new po(ui.fromBase64String(e))}catch(t){throw new rt(Ee.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}static fromUint8Array(e){return new po(ui.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}toJSON(){return{type:po._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(e){if(yv(e,po._jsonSchema))return po.fromBase64String(e.bytes)}}po._jsonSchemaVersion="firestore/bytes/1.0",po._jsonSchema={type:Nr("string",po._jsonSchemaVersion),bytes:Nr("string")};/** 6314 * @license 6315 * Copyright 2020 Google LLC 6316 * 6317 * Licensed under the Apache License, Version 2.0 (the "License"); 6318 * you may not use this file except in compliance with the License. 6319 * You may obtain a copy of the License at 6320 * 6321 * http://www.apache.org/licenses/LICENSE-2.0 6322 * 6323 * Unless required by applicable law or agreed to in writing, software 6324 * distributed under the License is distributed on an "AS IS" BASIS, 6325 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6326 * See the License for the specific language governing permissions and 6327 * limitations under the License. 6328 */class RN{constructor(...e){for(let t=0;t<e.length;++t)if(e[t].length===0)throw new rt(Ee.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new oi(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/** 6329 * @license 6330 * Copyright 2020 Google LLC 6331 * 6332 * Licensed under the Apache License, Version 2.0 (the "License"); 6333 * you may not use this file except in compliance with the License. 6334 * You may obtain a copy of the License at 6335 * 6336 * http://www.apache.org/licenses/LICENSE-2.0 6337 * 6338 * Unless required by applicable law or agreed to in writing, software 6339 * distributed under the License is distributed on an "AS IS" BASIS, 6340 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6341 * See the License for the specific language governing permissions and 6342 * limitations under the License. 6343 */class PN{constructor(e){this._methodName=e}}/** 6344 * @license 6345 * Copyright 2017 Google LLC 6346 * 6347 * Licensed under the Apache License, Version 2.0 (the "License");
6348 * you may not use this file except in compliance with the License. 6349 * You may obtain a copy of the License at 6350 * 6351 * http://www.apache.org/licenses/LICENSE-2.0 6352 * 6353 * Unless required by applicable law or agreed to in writing, software 6354 * distributed under the License is distributed on an "AS IS" BASIS, 6355 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6356 * See the License for the specific language governing permissions and 6357 * limitations under the License. 6358 */class Ia{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new rt(Ee.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new rt(Ee.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}_compareTo(e){return cn(this._lat,e._lat)||cn(this._long,e._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:Ia._jsonSchemaVersion}}static fromJSON(e){if(yv(e,Ia._jsonSchema))return new Ia(e.latitude,e.longitude)}}Ia._jsonSchemaVersion="firestore/geoPoint/1.0",Ia._jsonSchema={type:Nr("string",Ia._jsonSchemaVersion),latitude:Nr("number"),longitude:Nr("number")};/** 6359 * @license 6360 * Copyright 2024 Google LLC 6361 * 6362 * Licensed under the Apache License, Version 2.0 (the "License"); 6363 * you may not use this file except in compliance with the License. 6364 * You may obtain a copy of the License at 6365 * 6366 * http://www.apache.org/licenses/LICENSE-2.0 6367 * 6368 * Unless required by applicable law or agreed to in writing, software 6369 * distributed under the License is distributed on an "AS IS" BASIS, 6370 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6371 * See the License for the specific language governing permissions and 6372 * limitations under the License. 6373 */class Qo{constructor(e){this._values=(e||[]).map(t=>t)}toArray(){return this._values.map(e=>e)}isEqual(e){return function(r,i){if(r.length!==i.length)return!1;for(let s=0;s<r.length;++s)if(r[s]!==i[s])return!1;return!0}(this._values,e._values)}toJSON(){return{type:Qo._jsonSchemaVersion,vectorValues:this._values}}static fromJSON(e){if(yv(e,Qo._jsonSchema)){if(Array.isArray(e.vectorValues)&&e.vectorValues.every(t=>typeof t=="number"))return new Qo(e.vectorValues);throw new rt(Ee.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}}Qo._jsonSchemaVersion="firestore/vectorValue/1.0",Qo._jsonSchema={type:Nr("string",Qo._jsonSchemaVersion),vectorValues:Nr("object")};/** 6374 * @license 6375 * Copyright 2017 Google LLC 6376 * 6377 * Licensed under the Apache License, Version 2.0 (the "License"); 6378 * you may not use this file except in compliance with the License. 6379 * You may obtain a copy of the License at 6380 * 6381 * http://www.apache.org/licenses/LICENSE-2.0 6382 * 6383 * Unless required by applicable law or agreed to in writing, software 6384 * distributed under the License is distributed on an "AS IS" BASIS, 6385 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6386 * See the License for the specific language governing permissions and 6387 * limitations under the License. 6388 */const b1e=/^__.*__$/;class E1e{constructor(e,t,r){this.data=e,this.fieldMask=t,this.fieldTransforms=r}toMutation(e,t){return this.fieldMask!==null?new cu(e,this.data,this.fieldMask,t,this.fieldTransforms):new xv(e,this.data,t,this.fieldTransforms)}}class FW{constructor(e,t,r){this.data=e,this.fieldMask=t,this.fieldTransforms=r}toMutation(e,t){return new cu(e,this.data,this.fieldMask,t,this.fieldTransforms)}}function UW(n){switch(n){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw It(40011,{dataSource:n})}}class NN{constructor(e,t,r,i,s,o){this.settings=e,this.databaseId=t,this.serializer=r,this.ignoreUndefinedProperties=i,s===void 0&&this.validatePath(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get dataSource(){return this.settings.dataSource}contextWith(e){return new NN({...this.settings,...e},this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}childContextForField(e){var i;const t=(i=this.path)==null?void 0:i.child(e),r=this.contextWith({path:t,arrayElement:!1});return r.validatePathSegment(e),r}childContextForFieldPath(e){var i;const t=(i=this.path)==null?void 0:i.child(e),r=this.contextWith({path:t,arrayElement:!1});return r.validatePath(),r}childContextForArray(e){return this.contextWith({path:void 0,arrayElement:!0})}createError(e){return q1(e,this.settings.methodName,this.settings.hasConverter||!1,this.path,this.settings.targetDoc)}contains(e){return this.fieldMask.find(t=>e.isPrefixOf(t))!==void 0||this.fieldTransforms.find(t=>e.isPrefixOf(t.field))!==void 0}validatePath(){if(this.path)for(let e=0;e<this.path.length;e++)this.validatePathSegment(this.path.get(e))}validatePathSegment(e){if(e.length===0)throw this.createError("Document fields must not be empty");if(UW(this.dataSource)&&b1e.test(e))throw this.createError('Document fields cannot begin and end with "__"')}}class T1e{constructor(e,t,r){this.databaseId=e,this.ignoreUndefinedProperties=t,this.serializer
6388=r||ES(e)}createContext(e,t,r,i=!1){return new NN({dataSource:e,methodName:t,targetDoc:r,path:oi.emptyPath(),arrayElement:!1,hasConverter:i},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function IN(n){const e=n._freezeSettings(),t=ES(n._databaseId);return new T1e(n._databaseId,!!e.ignoreUndefinedProperties,t)}function M1e(n,e,t,r,i,s={}){const o=n.createContext(s.merge||s.mergeFields?2:0,e,t,i);LN("Data must be an object, but it was:",o,r);const a=VW(r,o);let l,c;if(s.merge)l=new Bs(o.fieldMask),c=o.fieldTransforms;else if(s.mergeFields){const u=[];for(const d of s.mergeFields){const m=vp(e,d,t);if(!o.contains(m))throw new rt(Ee.INVALID_ARGUMENT,`Field '${m}' is specified in your field mask but missing from your input data.`);zW(u,m)||u.push(m)}l=new Bs(u),c=o.fieldTransforms.filter(d=>l.covers(d.field))}else l=null,c=o.fieldTransforms;return new E1e(new gs(a),l,c)}class CS extends PN{_toFieldTransform(e){if(e.dataSource!==2)throw e.dataSource===1?e.createError(`${this._methodName}() can only appear at the top level of your update data`):e.createError(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof CS}}function A1e(n,e,t,r){const i=n.createContext(1,e,t);LN("Data must be an object, but it was:",i,r);const s=[],o=gs.empty();lu(r,(l,c)=>{const u=BW(e,l,t);c=bl(c);const d=i.childContextForFieldPath(u);if(c instanceof CS)s.push(u);else{const m=Tv(c,d);m!=null&&(s.push(u),o.set(u,m))}});const a=new Bs(s);return new FW(o,a,i.fieldTransforms)}function C1e(n,e,t,r,i,s){const o=n.createContext(1,e,t),a=[vp(e,r,t)],l=[i];if(s.length%2!=0)throw new rt(Ee.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let m=0;m<s.length;m+=2)a.push(vp(e,s[m])),l.push(s[m+1]);const c=[],u=gs.empty();for(let m=a.length-1;m>=0;--m)if(!zW(c,a[m])){const g=a[m];let v=l[m];v=bl(v);const _=o.childContextForFieldPath(g);if(v instanceof CS)c.push(g);else{const x=Tv(v,_);x!=null&&(c.push(g),u.set(g,x))}}const d=new Bs(c);return new FW(u,d,o.fieldTransforms)}function R1e(n,e,t,r=!1){return Tv(t,n.createContext(r?4:3,e))}function Tv(n,e){if(jW(n=bl(n)))return LN("Unsupported field value:",e,n),VW(n,e);if(n instanceof PN)return function(r,i){if(!UW(i.dataSource))throw i.createError(`${r._methodName}() can only be used with update() and set()`);if(!i.path)throw i.createError(`${r._methodName}() is not currently supported inside arrays`);const s=r._toFieldTransform(i);s&&i.fieldTransforms.push(s)}(n,e),null;if(n===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),n instanceof Array){if(e.settings.arrayElement&&e.dataSource!==4)throw e.createError("Nested arrays are not supported");return function(r,i){const s=[];let o=0;for(const a of r){let l=Tv(a,i.childContextForArray(o));l==null&&(l={nullValue:"NULL_VALUE"}),s.push(l),o++}return{arrayValue:{values:s}}}(n,e)}return function(r,i){if((r=bl(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return axe(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const s=An.fromDate(r);return{timestampValue:H1(i.serializer,s)}}if(r instanceof An){const s=new An(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:H1(i.serializer,s)}}if(r instanceof Ia)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof po)return{bytesValue:sW(i.serializer,r._byteString)};if(r instanceof Vr){const s=i.databaseId,o=r.firestore._databaseId;if(!o.isEqual(s))throw i.createError(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:pN(r.firestore._databaseId||i.databaseId,r._key.path)}}if(r instanceof Qo)return function(o,a){const l=o instanceof Qo?o.toArray():o;return{mapValue:{fields:{[IG]:{stringValue:DG},[U1]:{arrayValue:{values:l.map(u=>{if(typeof u!="number")throw a.createError("VectorValues must only contain numeric values.");return uN(a.serializer,u)})}}}}}}(r,i);if(hW(r))return r._toProto(i.serializer);throw i.createError(`Unsupported field value: ${mS(r)}`)}(n,e)}function VW(n,e){const t={};return MG(n)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):lu(n,(r,i)=>{const s=Tv(i,e.childContextForField(r));s!=null&&(t[r]=s)}),{mapValue:{fields:t}}}function jW(n){return!(typeof n!="object"||n===null||n instanceof Array||n instanceof Date||n instanceof An||n instanceof Ia||n instanceof po||n instanceof Vr||n instanceof PN||n instanceof Qo||hW(n))}function LN(n,e,t){if(!jW(t)||!EG(t)){const r=mS(t);throw r==="an object"?e.createError(n+" a custom object"):e.createError(n+" "+r)}}function vp(n,e,t){if((e=bl(e))instanceof RN)return e._internalPath;if(typeof e=="string")return BW(n,e);throw q1("Field path arguments must be of type string or ",n,!1,void 0,t)}const P1e=new RegExp("[~\\*/\\[\\]]");function BW(n,e,t){if(e.search(P1e)>=0)throw q1(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,n,!1,void 0,t);try{return new RN(...e.split("."))._internalPath}catch{throw q1(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,n,!1,void 0,t)}}function q1(n,e,t,r,i){const s=r&&!r.isEmpty(),o=i!==void 0;let a=`Function ${e}
6388() called with invalid data`;t&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(s||o)&&(l+=" (found",s&&(l+=` in field ${r}`),o&&(l+=` in document ${i}`),l+=")"),new rt(Ee.INVALID_ARGUMENT,a+n+l)}function zW(n,e){return n.some(t=>t.isEqual(e))}/** 6389 * @license 6390 * Copyright 2020 Google LLC 6391 * 6392 * Licensed under the Apache License, Version 2.0 (the "License"); 6393 * you may not use this file except in compliance with the License. 6394 * You may obtain a copy of the License at 6395 * 6396 * http://www.apache.org/licenses/LICENSE-2.0 6397 * 6398 * Unless required by applicable law or agreed to in writing, software 6399 * distributed under the License is distributed on an "AS IS" BASIS, 6400 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6401 * See the License for the specific language governing permissions and 6402 * limitations under the License. 6403 */class N1e{convertValue(e,t="none"){switch(qc(e)){case 0:return null;case 1:return e.booleanValue;case 2:return vr(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes($c(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 11:return this.convertObject(e.mapValue,t);case 10:return this.convertVectorValue(e.mapValue);default:throw It(62114,{value:e})}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e,t="none"){const r={};return lu(e,(i,s)=>{r[i]=this.convertValue(s,t)}),r}convertVectorValue(e){var r,i,s;const t=(s=(i=(r=e.fields)==null?void 0:r[U1].arrayValue)==null?void 0:i.values)==null?void 0:s.map(o=>vr(o.doubleValue));return new Qo(t)}convertGeoPoint(e){return new Ia(vr(e.latitude),vr(e.longitude))}convertArray(e,t){return(e.values||[]).map(r=>this.convertValue(r,t))}convertServerTimestamp(e,t){switch(t){case"previous":const r=vS(e);return r==null?null:this.convertValue(r,t);case"estimate":return this.convertTimestamp(Py(e));default:return null}}convertTimestamp(e){const t=Wc(e);return new An(t.seconds,t.nanos)}convertDocumentKey(e,t){const r=Fn.fromString(e);Cn(dW(r),9688,{name:e});const i=new Ny(r.get(1),r.get(3)),s=new Mt(r.popFirst(5));return i.isEqual(t)||Tl(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),s}}/** 6404 * @license 6405 * Copyright 2024 Google LLC 6406 * 6407 * Licensed under the Apache License, Version 2.0 (the "License"); 6408 * you may not use this file except in compliance with the License. 6409 * You may obtain a copy of the License at 6410 * 6411 * http://www.apache.org/licenses/LICENSE-2.0 6412 * 6413 * Unless required by applicable law or agreed to in writing, software 6414 * distributed under the License is distributed on an "AS IS" BASIS, 6415 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6416 * See the License for the specific language governing permissions and 6417 * limitations under the License. 6418 */class I1e extends N1e{constructor(e){super(),this.firestore=e}convertBytes(e){return new po(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new Vr(this.firestore,null,t)}}const BF="@firebase/firestore",zF="4.10.0";/** 6419 * @license 6420 * Copyright 2020 Google LLC 6421 * 6422 * Licensed under the Apache License, Version 2.0 (the "License"); 6423 * you may not use this file except in compliance with the License. 6424 * You may obtain a copy of the License at 6425 * 6426 * http://www.apache.org/licenses/LICENSE-2.0 6427 * 6428 * Unless required by applicable law or agreed to in writing, software 6429 * distributed under the License is distributed on an "AS IS" BASIS, 6430 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6431 * See the License for the specific language governing permissions and 6432 * limitations under the License. 6433 */class HW{constructor(e,t,r,i,s){this._firestore=e,this._userDataWriter=t,this._key=r,this._document=i,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new Vr(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new L1e(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}_fieldsProto(){var e;return((e=this._document)==null?void 0:e.data.clone().value.mapValue.fields)??void 0}get(e){if(this._document){const t=this._document.data.field(vp("DocumentSnapshot.get",e));if(t!==null)return this._userDataWriter.convertValue(t)}}}class L1e extends HW{data(){return super.data()}}/** 6434 * @license 6435 * Copyright 2020 Google LLC 6436 * 6437 * Licensed under the Apache License, Version 2.0 (the "License");
6438 * you may not use this file except in compliance with the License. 6439 * You may obtain a copy of the License at 6440 * 6441 * http://www.apache.org/licenses/LICENSE-2.0 6442 * 6443 * Unless required by applicable law or agreed to in writing, software 6444 * distributed under the License is distributed on an "AS IS" BASIS, 6445 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6446 * See the License for the specific language governing permissions and 6447 * limitations under the License. 6448 */function D1e(n){if(n.limitType==="L"&&n.explicitOrderBy.length===0)throw new rt(Ee.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class DN{}class k1e extends DN{}function O1e(n,e,...t){let r=[];e instanceof DN&&r.push(e),r=r.concat(t),function(s){const o=s.filter(l=>l instanceof kN).length,a=s.filter(l=>l instanceof RS).length;if(o>1||o>0&&a>0)throw new rt(Ee.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r);for(const i of r)n=i._apply(n);return n}class RS extends k1e{constructor(e,t,r){super(),this._field=e,this._op=t,this._value=r,this.type="where"}static _create(e,t,r){return new RS(e,t,r)}_apply(e){const t=this._parse(e);return GW(e._query,t),new $p(e.firestore,e.converter,IC(e._query,t))}_parse(e){const t=IN(e.firestore);return function(s,o,a,l,c,u,d){let m;if(c.isKeyField()){if(u==="array-contains"||u==="array-contains-any")throw new rt(Ee.INVALID_ARGUMENT,`Invalid Query. You can't perform '${u}' queries on documentId().`);if(u==="in"||u==="not-in"){GF(d,u);const v=[];for(const _ of d)v.push(HF(l,s,_));m={arrayValue:{values:v}}}else m=HF(l,s,d)}else u!=="in"&&u!=="not-in"&&u!=="array-contains-any"||GF(d,u),m=R1e(a,o,d,u==="in"||u==="not-in");return Pr.create(c,u,m)}(e._query,"where",t,e.firestore._databaseId,this._field,this._op,this._value)}}function F1e(n,e,t){const r=e,i=vp("where",n);return RS._create(i,r,t)}class kN extends DN{constructor(e,t){super(),this.type=e,this._queryConstraints=t}static _create(e,t){return new kN(e,t)}_parse(e){const t=this._queryConstraints.map(r=>r._parse(e)).filter(r=>r.getFilters().length>0);return t.length===1?t[0]:na.create(t,this._getOperator())}_apply(e){const t=this._parse(e);return t.getFilters().length===0?e:(function(i,s){let o=i;const a=s.getFlattenedFilters();for(const l of a)GW(o,l),o=IC(o,l)}(e._query,t),new $p(e.firestore,e.converter,IC(e._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}function HF(n,e,t){if(typeof(t=bl(t))=="string"){if(t==="")throw new rt(Ee.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!HG(e)&&t.indexOf("/")!==-1)throw new rt(Ee.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${t}' contains a '/' character.`);const r=e.path.child(Fn.fromString(t));if(!Mt.isDocumentKey(r))throw new rt(Ee.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return iF(n,new Mt(r))}if(t instanceof Vr)return iF(n,t._key);throw new rt(Ee.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${mS(t)}.`)}function GF(n,e){if(!Array.isArray(n)||n.length===0)throw new rt(Ee.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function GW(n,e){const t=function(i,s){for(const o of i)for(const a of o.getFlattenedFilters())if(s.indexOf(a.op)>=0)return a.op;return null}(n.filters,function(i){switch(i){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(t!==null)throw t===e.op?new rt(Ee.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new rt(Ee.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${t.toString()}' filters.`)}function U1e(n,e,t){let r;return r=n?n.toFirestore(e):e,r}class qx{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class Uf extends HW{constructor(e,t,r,i,s,o){super(e,t,r,i,o),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const t=new I_(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){const r=this._document.data.field(vp("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,t.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new rt(Ee.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e=this._document,t={};return t.type=Uf._jsonSchemaVersion,t.bundle="",t.bundleSource="DocumentSnapshot",t.bundleName=this._key.toString(),!e||!e.isValidDocument()||!e.isFoundDocument()?t:(this._userDataWriter.convertObjectMap(e.data.value.mapValue.fields,"previous"),t.bundle=(this._firestore,this.ref.path,"NOT SUPPORTED"),t)}}Uf._jsonSchemaVersion="firestore/documentSnapshot/1.0",Uf._jsonSchema={type:Nr("string",Uf._jsonSchemaVersion),bundleSource:Nr("string","DocumentSnapshot"),bundleName:Nr("string"),bundle:Nr("string")};class I_ extends Uf{data(e={}){return super.data(e)}}
6448class Vf{constructor(e,t,r,i){this._firestore=e,this._userDataWriter=t,this._snapshot=i,this.metadata=new qx(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,t){this._snapshot.docs.forEach(r=>{e.call(t,new I_(this._firestore,this._userDataWriter,r.key,r,new qx(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new rt(Ee.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(i,s){if(i._snapshot.oldDocs.isEmpty()){let o=0;return i._snapshot.docChanges.map(a=>{const l=new I_(i._firestore,i._userDataWriter,a.doc.key,a.doc,new qx(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);return a.doc,{type:"added",doc:l,oldIndex:-1,newIndex:o++}})}{let o=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(a=>s||a.type!==3).map(a=>{const l=new I_(i._firestore,i._userDataWriter,a.doc.key,a.doc,new qx(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);let c=-1,u=-1;return a.type!==0&&(c=o.indexOf(a.doc.key),o=o.delete(a.doc.key)),a.type!==1&&(o=o.add(a.doc),u=o.indexOf(a.doc.key)),{type:V1e(a.type),doc:l,oldIndex:c,newIndex:u}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new rt(Ee.FAILED_PRECONDITION,"QuerySnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e={};e.type=Vf._jsonSchemaVersion,e.bundleSource="QuerySnapshot",e.bundleName=iN.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;const t=[],r=[],i=[];return this.docs.forEach(s=>{s._document!==null&&(t.push(s._document),r.push(this._userDataWriter.convertObjectMap(s._document.data.value.mapValue.fields,"previous")),i.push(s.ref.path))}),e.bundle=(this._firestore,this.query._query,e.bundleName,"NOT SUPPORTED"),e}}function V1e(n){switch(n){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return It(61501,{type:n})}}/** 6449 * @license 6450 * Copyright 2022 Google LLC 6451 * 6452 * Licensed under the Apache License, Version 2.0 (the "License"); 6453 * you may not use this file except in compliance with the License. 6454 * You may obtain a copy of the License at 6455 * 6456 * http://www.apache.org/licenses/LICENSE-2.0 6457 * 6458 * Unless required by applicable law or agreed to in writing, software 6459 * distributed under the License is distributed on an "AS IS" BASIS, 6460 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6461 * See the License for the specific language governing permissions and 6462 * limitations under the License. 6463 */Vf._jsonSchemaVersion="firestore/querySnapshot/1.0",Vf._jsonSchema={type:Nr("string",Vf._jsonSchemaVersion),bundleSource:Nr("string","QuerySnapshot"),bundleName:Nr("string"),bundle:Nr("string")};function WW(n){n=Id(n,$p);const e=Id(n.firestore,Ev),t=OW(e),r=new I1e(e);return D1e(n._query),g1e(t,n._query).then(i=>
6463new Vf(e,r,n,i))}function j1e(n,e,t,...r){n=Id(n,Vr);const i=Id(n.firestore,Ev),s=IN(i);let o;return o=typeof(e=bl(e))=="string"||e instanceof RN?C1e(s,"updateDoc",n._key,e,t,r):A1e(s,"updateDoc",n._key,e),FN(i,[o.toMutation(n._key,Yo.exists(!0))])}function B1e(n){return FN(Id(n.firestore,Ev),[new dN(n._key,Yo.none())])}function ON(n,e){const t=Id(n.firestore,Ev),r=CN(n),i=U1e(n.converter,e),s=IN(n.firestore);return FN(t,[M1e(s,"addDoc",r._key,i,n.converter!==null,{}).toMutation(r._key,Yo.exists(!1))]).then(()=>r)}function FN(n,e){const t=OW(n);return y1e(t,e)}(function(e,t=!0){m0e(r0e),k1(new Ay("firestore",(r,{instanceIdentifier:i,options:s})=>{const o=r.getProvider("app").getImmediate(),a=new Ev(new v0e(r.getProvider("auth-internal")),new w0e(o,r.getProvider("app-check-internal")),U0e(o,i),o);return s={useFetchStreams:t,...s},a._setSettings(s),a},"PUBLIC").setMultipleInstances(!0)),kf(BF,zF,e),kf(BF,zF,"esm2020")})();var z1e="firebase",H1e="12.8.0";/** 6464 * @license 6465 * Copyright 2020 Google LLC 6466 * 6467 * Licensed under the Apache License, Version 2.0 (the "License"); 6468 * you may not use this file except in compliance with the License. 6469 * You may obtain a copy of the License at 6470 * 6471 * http://www.apache.org/licenses/LICENSE-2.0 6472 * 6473 * Unless required by applicable law or agreed to in writing, software 6474 * distributed under the License is distributed on an "AS IS" BASIS, 6475 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6476 * See the License for the specific language governing permissions and 6477 * limitations under the License. 6478 */kf(z1e,H1e,"app");const G1e={apiKey:"AIzaSyD_GYwdsREMLuGi9TxapPnhc2FGDIAhmDw",authDomain:"recforge-4e860.firebaseapp.com",projectId:"recforge-4e860",storageBucket:"recforge-4e860.appspot.com",messagingSenderId:"327580671232",appId:"1:327580671232:web:905ae9160f128f663427e5",measurementId:"G-PPTPDL9PKC"},W1e=hG(G1e),Wd=w1e(W1e),Mv="deletionPages",$1e=async n=>{try{return(await ON(bv(Wd,Mv),{...n,createdAt:An.now(),updatedAt:An.now()})).id}catch(e){throw console.error("Error adding deletion page:",e),e}},q1e=async()=>{try{return(await WW(bv(Wd,Mv))).docs.map(e=>{var t,r;return{id:e.id,...e.data(),createdAt:(t=e.data().createdAt)==null?void 0:t.toDate(),updatedAt:(r=e.data().updatedAt)==null?void 0:r.toDate()}})}catch(n){throw console.error("Error getting deletion pages:",n),n}},X1e=async n=>{var e,t;try{const r=O1e(bv(Wd,Mv),F1e("url","==",n)),i=await WW(r);if(i.empty)return null;const s=i.docs[0];return{id:s.id,...s.data(),createdAt:(e=s.data().createdAt)==null?void 0:e.toDate(),updatedAt:(t=s.data().updatedAt)==null?void 0:t.toDate()}}catch(r){throw console.error("Error getting deletion page by URL:",r),r}},K1e=async(n,e)=>{try{const t=CN(Wd,Mv,n);await j1e(t,{...e,updatedAt:An.now()})}catch(t){throw console.error("Error updating deletion page:",t),t}},Y1e=async n=>{try{const e=CN(Wd,Mv,n);await B1e(e)}catch(e){throw console.error("Error deleting deletion page:",e),e}},Q1e="deletionRequests",J1e=async n=>{try{return(await ON(bv(Wd,Q1e),{...n,status:"pending",createdAt:An.now()})).id}catch(e){throw console.error("Error submitting deletion request:",e),e}},Z1e="Premium Requests",ewe=n=>Object.fromEntries(Object.entries(n).filter(([e,t])=>t!==void 0)),twe=async n=>{try{const e=ewe(n);return(await ON(bv(Wd,Z1e),{...e,status:"new",createdAt:An.now()})).id}catch(e){throw console.error("Error submitting lead:",e),e}},WF=[{value:"student",label:"Student",icon:fo,description:"Looking for learning solutions"},{value:"company",label:"Company",icon:$y,description:"Enterprise training needs"},{value:"investor",label:"Investor",icon:a1,description:"Investment opportunities"},{value:"other",label:"Other",icon:nj,description:"General inquiry"}],nwe=()=>{const[n,e]=M.useState(""),[t,r]=M.useState(!1),[i,s]=M.useState(!1),[o,a]=M.useState(!1),[l,c]=M.useState("student"),[u,d]=M.useState({fullName:"",phone:"",organization:"",role:"",companySize:"",budget:"",investmentInterest:"",message:""}),m=y=>{if(y.preventDefault(),!n||!n.includes("@")){hr({title:"Invalid Email",description:"Please enter a valid email address",variant:"destructive"});return}r(!0)},g=(y,S)=>{d(b=>({...b,[y]:S}))},v=async y=>{var S,b,A,k,L,C;if(y.preventDefault(),!u.fullName.trim()){hr({title:"Validation Error",description:"Please enter your full name",variant:"destructive"});return}if(!u.message.trim()){hr({title:"Validation Error",description:"Please enter a message",variant:"destructive"});return}if(l==="company"&&!u.organization){hr({title:"Validation Error",description:"Please enter your company name",variant:"destructive"});return}try{s(!0);const P={category:l,email:n,fullName:u.fullName,message:u.message};(S=u.phone)!=null&&S.trim()&&(P.phone=u.phone.trim()),(b=u.organization)!=null&&b.trim()&&(P.organization=u.organization.trim()),(A=u.role)!=null&&A.trim()&&(P.role=u.role.trim()),(k=u.companySize)!=null&&k.trim()&&(P.companySize=u.companySize.trim()),(L=u.budget)!=null&&L.trim()&&(P.budget=u.budget.trim()),(C=u.investmentInterest)!=null&&C.trim()&&(P.investmentInterest=u.investmentInterest.trim()),await twe(P),a(!0),hr({title:"Thank You!",description:"We'll get back to you within 24 hours."})}catch(P){console.error("Error submitting form:",P),hr({title:"Error",description:"Failed to submit form. Please try again.",variant:"destructive"})}finally{s(!1)}},_=()=>{e(""),c("student"),d({fullName:"",phone:"",organization:"",role:"",companySize:"",budget:"",investmentInterest:"",message:""}),a(!1)},x=y=>{r(y),!y&&o&&_()};return WF.find(y=>y.value===l),f.jsxs(f.Fragment,{children:[f.jsxs("section",{className:"py-24 relative overflow-hidden",children:[f.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/10 via-background to-secondary/10"}),f.jsx("div",{className:"absolute inset-0 grid-pattern opacity-10"}),f.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 bg-primary/20 rounded-full blur-[120px]"}),f.jsx("div",{className:"absolute bottom-0 right-1/4 w-80 h-80 bg-secondary/20 rounded-full blur-[100px]"}),f.jsx("div",{className:"container mx-auto px-6 relative",children:f.jsxs(Oe.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8},className:"max-w-4xl mx-auto text-center",children:[f.jsxs("h2",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Ready to Transform"," ",f.jsx("span",{className:"text-gradient",children:"Your Education?"})]}),f.jsx("p",{className:"text-lg text-muted-foreground mb-10 max-w-2xl mx-auto",children:"Let's discuss how we
6478can help you build the perfect learning solution. Get in touch with our team for a free consultation."}),f.jsxs(Oe.form,{onSubmit:m,initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.2},className:"flex flex-col sm:flex-row gap-4 max-w-md mx-auto",children:[f.jsxs("div",{className:"relative flex-1",children:[f.jsx(Y2,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),f.jsx(Nt,{type:"email",placeholder:"Enter your email",value:n,onChange:y=>e(y.target.value),className:"pl-12 h-12 bg-card/50 border-white/10 focus:border-primary",required:!0})]}),f.jsxs(mt,{type:"submit",size:"lg",className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground hover:opacity-90 transition-opacity group h-12",children:["Get Started",f.jsx(Oc,{className:"ml-2 w-4 h-4 group-hover:translate-x-1 transition-transform"})]})]}),f.jsxs(Oe.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6,delay:.4},className:"mt-12 flex flex-wrap items-center justify-center gap-8 text-muted-foreground text-sm",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),f.jsx("span",{children:"Free Consultation"})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),f.jsx("span",{children:"No Credit Card Required"})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),f.jsx("span",{children:"24/7 Support"})]})]})]})})]}),f.jsx(gv,{open:t,onOpenChange:x,children:f.jsx(Vp,{className:"glass-card border-white/10 max-w-2xl max-h-[90vh] overflow-y-auto",children:f.jsx($R,{mode:"wait",children:o?f.jsxs(Oe.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"text-center py-8",children:[f.jsx(Oe.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2,type:"spring"},className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-green-500/20 mb-6",children:f.jsx(X2,{className:"w-10 h-10 text-green-500"})}),f.jsx(Pd,{className:"text-2xl font-bold mb-3",children:"Thank You!"}),f.jsx(_C,{className:"text-base mb-6",children:"We've received your information and will get back to you within 24 hours. Our team is excited to help you transform your education journey!"}),f.jsx(mt,{onClick:()=>x(!1),className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground",children:"Close"})]},"success"):f.jsxs(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},children:[f.jsxs(jp,{children:[f.jsx(Pd,{className:"text-2xl font-display",children:"Tell Us About Yourself"}),f.jsx(_C,{children:"Help us understand your needs so we can provide the best solution for you."})]}),f.jsxs("form",{onSubmit:v,className:"space-y-6 mt-6",children:[f.jsxs("div",{className:"space-y-3",children:[f.jsx(ft,{className:"text-base font-semibold",children:"I am a... *"}),f.jsx(qP,{value:l,onValueChange:y=>c(y),className:"grid grid-cols-2 gap-3",children:WF.map(y=>{const S=y.icon;return f.jsxs("div",{className:"relative",children:[f.jsx(tc,{value:y.value,id:y.value,className:"peer sr-only"}),f.jsxs(ft,{htmlFor:y.value,className:"flex flex-col items-center justify-center p-4 rounded-lg border-2 border-white/10 hover:border-primary/50 cursor-pointer transition-all peer-data-[state=checked]:border-primary peer-data-[state=checked]:bg-primary/10",children:[f.jsx(S,{className:"w-6 h-6 mb-2 text-primary"}),f.jsx("span",{className:"font-medium",children:y.label}),f.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:y.description})]})]},y.value)})})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"fullName",children:"Full Name *"}),f.jsx(Nt,{id:"fullName",placeholder:"John Doe",value:u.fullName,onChange:y=>g("fullName",y.target.value),className:"bg-card/50 border-white/10",required:!0})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"email",children:"Email Address *"}),f.jsx(Nt,{id:"email",type:"email",value:n,disabled:!0,className:"bg-muted/50 border-white/10"})]})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"phone",children:"Phone Number"}),f.jsx(Nt,{id:"phone",type:"tel",placeholder:"+1 (555) 123-4567",value:u.phone,onChange:y=>g("phone",y.target.value),className:"bg-card/50 border-white/10"})]}),l==="company"&&f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"organization",children:"Company Name *"}),f.jsx(Nt,{id:"organization",placeholder:"Your Company",value:u.organization,onChange:y=>g("organization",y.target.value),className:"bg-card/50 border-white/10",required:!0})]}),l==="company"&&f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"role",children:"Your Role"}),f.jsx(Nt,{id:"role",placeholder:"e.g., HR Manager, Training Director",value:u.role,onChange:y=>g("role",y.target.value),className:"bg-card/50 border-white/10"})]}),l==="company"&&f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"companySize",children:"Company Size"}),f.jsxs(LT,{value:u.companySize,onValueChange:y=>g("companySize",y),children:[f.jsx(T_,{className:"bg-card/50 border-white/10",children:f.jsx(DT,{placeholder:"Select company size"})}),f.jsxs(M_,{children:[f.jsx(Ai,{value:"1-10",children:"1-10 employees"}),f.jsx(Ai,{value:"11-50",children:"11-50 employees"}),f.jsx(Ai,{value:"51-200",children:"51-200 employees"}),f.jsx(Ai,{value:"201-500",children:"201-500 employees"}),f.jsx(Ai,{value:"501-1000",children:"501-1000 employees"}),f.jsx(Ai,{value:"1000+",children:"1000+ employees"})]})]})]}),l==="company"&&f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"budget",children:"Budget Range"}),f.jsxs(LT,{value:u.budget,onValueChange:y=>g("budget",y),children:[f.jsx(T_,{className:"bg-card/50 border-white/10",children:f.jsx(DT,{placeholder:"Select budget range"})}),f.jsxs(M_,{children:[f.jsx(Ai,{value:"under-10k",children:"Under $10,000"}),f.jsx(Ai,{value:"10k-50k",children:"$10,000 - $50,000"}),f.jsx(Ai,{value:"50k-100k",children:"$50,000 - $100,000"}),f.jsx(Ai,{value:"100k-250k",children:"$100,000 - $250,000"}),f.jsx(Ai,{value:"250k+",children:"$250,000+"})]})]})]}),l==="investor"&&f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"investmentInterest",children:"Investment Interest"}),f.jsxs(LT,{value:u.investmentInterest,onValueChange:y=>g("investmentInterest",y),children:[f.jsx(T_,{className:"bg-card/50 border-white/10",children:f.jsx(DT,{placeholder:"Select interest level"})}),f.jsxs(M_,{children:[f.jsx(Ai,{value:"exploring",children:"Just exploring"}),f.jsx(Ai,{value:"serious",children:"Seriously considering"}),f.jsx(Ai,{value:"ready",children:"Ready to invest"}),f.jsx(Ai,{value:"partnership",children:"Partnership opportunity"})]})]})]}),(l==="student"||l==="other")&&f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"organization",children:"Organization / Institution"}),f.jsx(Nt,{id:"organization",placeholder:"Your school or organization",value:u.organization,onChange:y=>g("organization",y.target.value),className:"bg-card/50 border-white/10"})]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsxs(ft,{htmlFor:"message",className:"flex items-center gap-2",children:[f.jsx(o1,{className:"w-4 h-4 text-primary"}),"Tell us about your needs *"]}),f.jsx(Wo,{id:"message",placeholder:l==="student"?"What learning solutions are you looking for?":l==="company"?"Tell us about your training needs and goals...":l==="investor"?"What investment opportunities interest you?":"How can we help you?",value:u.message,onChange:y=>g("message",y.target.value),className:"bg-card/50 border-white/10 min-h-[120px]",required:!0})]}),f.jsxs("div",{className:"flex gap-3 pt-4",children:[f.jsx(mt,{type:"submit",disabled:i,className:"flex-1 bg-gradient-to-r from-primary to-secondary text-primary-foreground h-12",children:i?f.jsxs(f.Fragment,{children:[f.jsx(zM,{className:"w-5 h-5 mr-2 animate-spin"}),"Submitting..."]}):f.jsxs(f.Fragment,{children:["Submit Request",f.jsx(Oc,{className:"ml-2 w-4 h-4"})]})}),f.jsx(mt,{type:"button",variant:"outline",onClick:()=>x(!1),disabled:i,className:"border-white/10 h-12",children:"Cancel"})]})]})]},"form")})})})]})},rwe=()=>f.jsxs(Ma,{children:[f.jsx(vme,{}),f.jsx(Sme,{}),f.jsx(Eme,{}),f.jsx(Mme,{}),f.jsx(nwe,{})]}),iwe=["All","Mobile Apps","AI Products","Web Platforms","Client Projects"],swe=[{id:"crakify",name:"Crakify",description:"Comprehensive exam preparation app with 1300+ competitive exams, video lectures, flashcards, mock tests & more.",category:"Mobile Apps",tags:["1300+ Exams","Mock Tests","Video Lectures"],gradient:"from-orange-500 via-red-500 to-pink-500",bgGradient:"from-orange-500/20 via-red-500/10 to-pink-500/20",icon:tp,stats:"1300+",statsLabel:"Exams"},{id:"ignou-study",name:"IGNOU Study Material",description:"Complete IGNOU learning app with notes, books, solved assignments, PYQ papers & video lectures for all c
6478ourses.",category:"Mobile Apps",tags:["All Courses","Solved Assignments","PYQ Papers"],gradient:"from-blue-500 via-indigo-500 to-purple-500",bgGradient:"from-blue-500/20 via-indigo-500/10 to-purple-500/20",icon:Cf,stats:"100+",statsLabel:"Courses"},{id:"jk-study",name:"JK Study Material",description:"Study material for all J&K universities and boards including notes, PYQ papers, books & complete syllabus.",category:"Mobile Apps",tags:["J&K Universities","Board Exams","Notes"],gradient:"from-emerald-500 via-teal-500 to-cyan-500",bgGradient:"from-emerald-500/20 via-teal-500/10 to-cyan-500/20",icon:HY,stats:"50+",statsLabel:"Universities"},{id:"recforge-publications",name:"Recforge Publications",description:"Access 400+ universities and boards latest notes and guess papers for students across India.",category:"Web Platforms",tags:["400+ Universities","Guess Papers","Latest Notes"],gradient:"from-violet-500 via-purple-500 to-fuchsia-500",bgGradient:"from-violet-500/20 via-purple-500/10 to-fuchsia-500/20",icon:Jl,stats:"400+",statsLabel:"Universities"},{id:"recforge-support",name:"Recforge Support",description:"AI-powered customer support platform serving 1800+ companies worldwide with intelligent automation.",category:"AI Products",tags:["1800+ Companies","AI Model","Global Support"],gradient:"from-cyan-500 via-blue-500 to-indigo-500",bgGradient:"from-cyan-500/20 via-blue-500/10 to-indigo-500/20",icon:KV,stats:"1800+",statsLabel:"Companies"},{id:"haida-ai",name:"Haida AI",description:"Imagine Anything into Existence - AI platform for YouTube videos, logos, banners, reels & social media content.",category:"AI Products",tags:["Video Creation","AI Generation","Free Access"],gradient:"from-rose-500 via-pink-500 to-orange-500",bgGradient:"from-rose-500/20 via-pink-500/10 to-orange-500/20",icon:ZY,stats:"∞",statsLabel:"Possibilities"},{id:"certscope",name:"CertScope",description:"Professional courses marketplace supporting 28 currencies with advanced e-commerce features worldwide.",category:"Client Projects",tags:["28 Currencies","Professional Courses","Global"],gradient:"from-amber-500 via-yellow-500 to-lime-500",bgGradient:"from-amber-500/20 via-yellow-500/10 to-lime-500/20",icon:GV,stats:"28",statsLabel:"Currencies"},{id:"wows-app",name:"Wows App",description:"Advanced social media platform with group talks, gift sending, real-time games & support for 180+ countries.",category:"Client Projects",tags:["180+ Countries","Real-time Games","Social Platform"],gradient:"from-pink-500 via-rose-500 to-red-500",bgGradient:"from-pink-500/20 via-rose-500/10 to-red-500/20",icon:zY,stats:"180+",statsLabel:"Countries"}],owe=()=>{const[n,e]=M.useState(""),[t,r]=M.useState("All"),i=swe.filter(s=>{const o=s.name.toLowerCase().includes(n.toLowerCase())||s.description.toLowerCase().includes(n.toLowerCase()),a=t==="All"||s.category===t;return o&&a});return f.jsxs(Ma,{children:[f.jsxs("section",{className:"pt-32 pb-16 relative overflow-hidden",children:[f.jsx("div",{className:"absolute inset-0 gradient-mesh opacity-30"}),f.jsx("div",{className:"absolute top-1/4 right-1/4 w-96 h-96 bg-primary/10 rounded-full blur-[120px]"}),f.jsx("div",{className:"container mx-auto px-6 relative",children:f.jsxs(Oe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center max-w-3xl mx-auto",children:[f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase mb-4 block",children:"Our Products"}),f.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Educational Technology"," ",f.jsx("span",{className:"text-gradient",children:"Solutions"})]}),f.jsx("p",{className:"text-lg text-muted-foreground",children:"Explore our comprehensive suite of products designed to transform how organizations deliver and manage learning experiences."})]})})]}),f.jsx("section",{className:"py-8 border-y border-white/5",children:f.jsx("div",{className:"container mx-auto px-6",children:f.jsxs("div",{className:"flex flex-col lg:flex-row gap-6 items-center justify-between",children:[f.jsxs("div",{className:"relative w-full lg:w-80",children:[f.jsx(Fd,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),f.jsx(Nt,{type:"text",placeholder:"Search products...",value:n,onChange:s=>e(s.target.value),className:"pl-12 bg-card/50 border-white/10"})]}),f.jsx("div",{className:"flex flex-wrap gap-2",children:iwe.map(s=>f.jsx(mt,{variant:t===s?"default":"outline",size:"sm",onClick:()=>r(s),className:t===s?"bg-gradient-to-r from-primary to-secondary text-primary-foreground":"border-white/10 hover:bg-white/5",children:s},s))})]})})}),f.jsx("section",{className:"py-16",children:f.jsxs("div",{className:"container mx-auto px-6",children:[f.jsx(Oe.div,{initial:"hidden",animate:"visible",variants:{visible:{transition:{staggerChildren:.1}}},className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:i.map(s=>{const o=s.icon;return f.jsx(Oe.div,{variants:{hidden:{opacity:0,y:30,scale:.95},visible:{opacity:1,y:0,scale:1}},transition:{duration:.5},className:"group",children:f.jsx(wr,{to:`/products/${s.id}`,children:f.jsxs("div",{className:"relative h-full overflow-hidden rounded-2xl border border-white/10 bg-card/50 backdrop-blur-xl transition-all duration-500 hover:border-white/20 hover:shadow-2xl hover:shadow-
6478primary/10 hover:-translate-y-2",children:[f.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${s.bgGradient} opacity-50 group-hover:opacity-80 transition-opacity duration-500`}),f.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-white/5 to-transparent rounded-full blur-2xl transform translate-x-8 -translate-y-8 group-hover:scale-150 transition-transform duration-700"}),f.jsx("div",{className:`absolute inset-0 rounded-2xl bg-gradient-to-r ${s.gradient} opacity-0 group-hover:opacity-20 blur-xl transition-opacity duration-500`}),f.jsxs("div",{className:"relative p-6 h-full flex flex-col",children:[f.jsxs("div",{className:"flex items-start justify-between mb-6",children:[f.jsxs("div",{className:`relative p-4 rounded-2xl bg-gradient-to-br ${s.gradient} shadow-lg shadow-primary/20 group-hover:scale-110 group-hover:rotate-3 transition-all duration-500`,children:[f.jsx(o,{className:"w-8 h-8 text-white"}),f.jsx("div",{className:"absolute inset-0 rounded-2xl bg-white/20 opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),f.jsx("span",{className:"px-3 py-1.5 text-xs font-semibold rounded-full bg-white/10 backdrop-blur-sm text-foreground border border-white/10",children:s.category})]}),f.jsx("div",{className:"mb-4",children:f.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-gradient-to-r from-white/5 to-white/10 border border-white/10",children:[f.jsx("span",{className:`text-xl font-bold bg-gradient-to-r ${s.gradient} bg-clip-text text-transparent`,children:s.stats}),f.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:s.statsLabel})]})}),f.jsx("h3",{className:"font-display text-xl font-bold mb-3 group-hover:text-primary transition-colors duration-300",children:s.name}),f.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed mb-5 flex-grow",children:s.description}),f.jsx("div",{className:"flex flex-wrap gap-2 mb-5",children:s.tags.map(a=>f.jsx("span",{className:`px-2.5 py-1 text-xs font-medium rounded-full bg-gradient-to-r ${s.gradient} bg-opacity-10 text-white/90 border border-white/10`,children:a},a))}),f.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-white/10",children:[f.jsx("span",{className:"text-sm font-medium text-muted-foreground group-hover:text-primary transition-colors",children:"View Details"}),f.jsx("div",{className:`p-2 rounded-full bg-gradient-to-r ${s.gradient} opacity-80 group-hover:opacity-100 transform group-hover:translate-x-1 transition-all duration-300`,children:f.jsx(Oc,{className:"w-4 h-4 text-white"})})]})]})]})})},s.id)})}),i.length===0&&f.jsx(Oe.div,{initial:{opacity:0}
6478,animate:{opacity:1},className:"text-center py-16",children:f.jsx("p",{className:"text-muted-foreground text-lg",children:"No products found matching your criteria."})})]})})]})},awe={crakify:{name:"Crakify",tagline:"Your Ultimate Exam Preparation Companion",description:"Crakify is the most comprehensive exam preparation app available on the Play Store. With coverage of 1300+ competitive exams, we provide everything you need to crack any exam - from detailed notes and video lectures to flashcards and mock tests. Our app is designed to make your preparation journey smoother and more effective.",gradient:"from-orange-500 via-red-500 to-pink-500",bgGradient:"from-orange-500/20 via-red-500/20 to-pink-500/20",icon:jM,type:"app",features:[{icon:Zl,title:"Latest Notes",description:"Comprehensive notes updated regularly for all 1300+ competitive exams"},{icon:Xm,title:"Video Lectures",description:"High-quality video content from expert educators"},{icon:bm,title:"Mock Tests",description:"Practice with realistic mock tests and subject-wise tests"},{icon:Jl,title:"Flashcards",description:"Quick revision with smart flashcards for key concepts"},{icon:qm,title:"Latest Updates",description:"Stay informed with exam notifications and updates"},{icon:fo,title:"Community",description:"Join thousands of aspirants preparing together"}],highlights:["1300+ Competitive Exams Covered","Daily Updated Content","Offline Access Available","Expert-Curated Material","Performance Analytics","Personalized Study Plans","Discussion Forums","Previous Year Papers"],stats:[{label:"Exams Covered",value:"1300+"},{label:"Active Users",value:"50K+"},{label:"Video Lectures",value:"10K+"},{label:"Rating",value:"4.8★"}],playStoreUrl:"https://play.google.com/store/apps/details?id=com.crakify.app",websiteUrl:"https://crakify.com"},"ignou-study":{name:"IGNOU Study Material",tagline:"Complete IGNOU Learning Ecosystem",description:"Your one-stop solution for all IGNOU study needs. We provide comprehensive study material for all IGNOU courses including Bachelors, Masters, Diploma, and Certificate programs. From solved assignments to video lectures, everything you need to excel in your IGNOU journey is right here.",gradient:"from-blue-500 via-indigo-500 to-purple-500",bgGradient:"from-blue-500/20 via-indigo-500/20 to-purple-500/20",icon:Cf,type:"app",features:[{icon:Zl,title:"Latest Notes",description:"Updated notes for all IGNOU courses and subjects"},{icon:Jl,title:"Study Books",description:"Digital access to all course books and references"},{icon:bm,title:"Solved Assignments",description:"Complete solved assignments for every session"},{icon:Zl,title:"PYQ Papers",description:"Previous year question papers with solutions"},{icon:Xm,title:"Video Lectures",description:"Easy-to-understand video explanations"},{icon:qm,title:"Latest Updates",description:"Exam dates, assignment deadlines, and notifications"}],highlights:["All IGNOU Courses Covered","Bachelors Programs (BA, BCom, BSc, BCA)","Masters Programs (MA, MCom, MSc, MCA)","Diploma & Certificate Courses","Session-wise Assignments","Previous Year Solutions","Offline Download","Regular Content Updates"],stats:[{label:"Courses",value:"500+"},{label:"Downloads",value:"100K+"},{label:"Assignments",value:"5K+"},{label:"Rating",value:"4.7★"}],playStoreUrl:"https://play.google.com/store/apps/details?id=com.recforge.ignoustudy&hl=en_IN&pli=1"},"jk-study":{name:"JK Study Material",tagline:"Complete J&K Education Hub",description:"The most comprehensive app for students of Jammu & Kashmir. We provide study material for all universities and boards in J&K including Kashmir University, Jammu University, Cluster University, and all board exams. Get access to notes, PYQ papers, books, and complete syllabus at your fingertips.",gradient:"from-emerald-500 via-teal-500 to-cyan-500",bgGradient:"from-emerald-500/20 via-teal-500/20 to-cyan-500/20",icon:Jl,type:"app",features:[{icon:Zl,title:"Latest Notes",description:"Subject-wise notes for all J&K universities"},{icon:bm,title:"PYQ Papers",description:"Previous year papers with detailed solutions"}
6478,{icon:Jl,title:"Study Books",description:"Reference books and study guides"},{icon:Zl,title:"Complete Syllabus",description:"Updated syllabus for all courses"},{icon:Xm,title:"Video Content",description:"Video explanations for complex topics"},{icon:qm,title:"Exam Updates",description:"Date sheets, notifications, and results"}],highlights:["Kashmir University Material","Jammu University Material","Cluster University Content","JKBOSE Board Exams","All Undergraduate Courses","Postgraduate Programs","Entrance Exam Prep","Offline Access"],stats:[{label:"Subjects",value:"200+"},{label:"Students",value:"30K+"},{label:"Universities",value:"10+"},{label:"Rating",value:"4.6★"}],playStoreUrl:"https://play.google.com/store/apps/details?id=com.recforge.jkstudymaterial&hl=en_IN"},"recforge-publications":{name:"Recforge Publications",tagline:"Your Gateway to Academic Excellence",description:"Recforge Publications is a comprehensive educational platform where students can access study material for 400+ universities and boards across India. We provide the latest notes, guess papers, and study resources to help students excel in their academics.",gradient:"from-violet-500 via-purple-500 to-fuchsia-500",bgGradient:"from-violet-500/20 via-purple-500/20 to-fuchsia-500/20",icon:Jl,type:"web",features:[{icon:$y,title:"400+ Universities",description:"Comprehensive coverage of universities across India"},{icon:Zl,title:"Latest Notes",description:"Up-to-date study notes for all c
6478ourses"},{icon:bm,title:"Guess Papers",description:"Expertly prepared guess papers for exams"},{icon:Cf,title:"All Boards",description:"Study material for various education boards"},{icon:qm,title:"Regular Updates",description:"Content updated according to latest syllabus"},{icon:fo,title:"Student Community",description:"Join thousands of students benefiting from our resources"}],highlights:["400+ Universities Covered","All Major Boards Included","Latest Guess Papers","Updated Study Notes","Easy Navigation","Mobile Friendly","Regular Content Updates","Expert Curated Material"],stats:[{label:"Universities",value:"400+"},{label:"Students",value:"200K+"},{label:"Study Notes",value:"50K+"},{label:"Daily Visitors",value:"10K+"}],websiteUrl:"https://publications.recforge.com"},"recforge-support":{name:"Recforge Support",tagline:"AI-Powered Customer Support Excellence",description:"Recforge Support is an advanced AI-powered customer support platform that serves over 1800+ companies worldwide. Our intelligent AI model handles customer queries efficiently, reducing response time and improving customer satisfaction across industries.",gradient:"from-cyan-500 via-blue-500 to-indigo-500",bgGradient:"from-cyan-500/20 via-blue-500/20 to-indigo-500/20",icon:o1,type:"web",features:[{icon:jM,title:"AI Model",description:"Advanced AI for intelligent query resolution"},{icon:Af,title:"Global Reach",description:"Supporting companies across multiple countries"},{icon:Rf,title:"Instant Response",description:"Lightning-fast automated responses"},{icon:fo,title:"1800+ Companies",description:"Trusted by businesses worldwide"},{icon:IL,title:"Multi-language",description:"Support in multiple languages"},{icon:bm,title:"Analytics",description:"Detailed support analytics and insights"}],highlights:["1800+ Companies Served","AI-Powered Responses","24/7 Availability","Multi-language Support","Real-time Analytics","Custom Integration","Scalable Solution","Enterprise Ready"],stats:[{label:"Companies",value:"1800+"},{label:"Queries/Day",value:"50K+"},{label:"Response Time",value:"<1 min"},{label:"Satisfaction",value:"98%"}],websiteUrl:"https://support.recforge.com"},"haida-ai":{name:"Haida AI",tagline:"Imagine Anything into Existence",description:"Haida AI is a revolutionary AI platform that empowers users to create stunning content effortlessly. From YouTube videos to logos, banners, reels, and social media posts - our AI model helps you bring your imagination to life. Get access to educational updates, video recording tools, and reel editing software, all completely free!",gradient:"from-rose-500 via-pink-500 to-orange-500",bgGradient:"from-rose-500/20 via-pink-500/20 to-orange-500/20",icon:tp,type:"web",features:[{icon:Xm,title:"YouTube Videos",description:"Create professional YouTube content with AI"},{icon:WY,title:"Logo & Banners",description:"Design stunning logos and banners instantly"},{icon:EY,title:"Video Recording",description:"Built-in video recording tools"},{icon:JV,title:"Reel Editing",description:"Edit reels with professional tools"},{icon:YY,title:"Social Media",description:"Generate engaging social media posts"},{icon:Jl,title:"Educational Updates",description:"Stay updated with latest educational content"}],highlights:["YouTube Video Creation","Logo Generation","Banner Design","Video Recording Tool","Reel Editing Software","Social Media Posts","Educational Updates","100% Free Access"],stats:[{label:"Users",value:"100K+"},{label:"Videos Created",value:"500K+"},{label:"Designs Made",value:"1M+"},{label:"Features",value:"Free"}],websiteUrl:"https://ai.recforge.com"},certscope:{name:"CertScope",tagline:"Global Professional Certification Marketplace",description:"CertScope is a premium e-commerce platform for professional courses worldwide. We've built this advanced platform for our client, featuring support for 28 currencies, multi-language capabilities, and cutting-edge e-commerce features to provide a seamless learning experience globally.",gradient:"from-amber-500 via-yellow-500 to-lime-500",bgGradient:"from-amber-500/20 via-yellow-500/20 to-lime-500/20",icon:GV,type:"web",features:[{icon:CY,title:"28 Currencies",description:"Support for multiple payment currencies worldwide"},{icon:Af,title:"Global Reach",description:"Access courses from anywhere in the world"},{icon:Cf,title:"Pro Courses",description:"Wide range of professional certification courses"},{icon:IL,title:"Multi-language",description:"Platform available in multiple languages"},{icon:Rf,title:"Advanced Features",description:"Cutting-edge e-commerce functionality"},{icon:fo,title:"User Friendly",description:"Intuitive interface for easy navigation"}],highlights:["28 Currency Support","Professional Courses","Global Marketplace","Advanced E-commerce","Secure Payments","Certificate Verification","Multi-language UI","Mobile Responsive"],stats:[{label:"Currencies",value:"28"},{label:"Courses",value:"5000+"},{label:"Students",value:"50K+"},{label:"Countries",value:"100+"}],websiteUrl:"https://certscope.com"},"wows-app":{name:"Wows App",tagline:"Connect, Play & Celebrate Together",description:"Wows App is an advanced social media platform we built for our client. Users can engage in group talks, send virtual gifts in rooms, and play multiple real-time games together. With supp
6478ort for 180+ countries, Wows brings people together from around the world for meaningful connections and entertainment.",gradient:"from-pink-500 via-rose-500 to-red-500",bgGradient:"from-pink-500/20 via-rose-500/20 to-red-500/20",icon:fo,type:"web",features:[{icon:o1,title:"Group Talks",description:"Engage in lively group conversations"},{icon:LY,title:"Virtual Gifts",description:"Send and receive gifts in chat rooms"},{icon:IY,title:"Real-time Games",description:"Play exciting games with friends"},{icon:Af,title:"180+ Countries",description:"Connect with users worldwide"},{icon:fo,title:"Social Rooms",description:"Join themed rooms and communities"},{icon:Rf,title:"Real-time",description:"Instant messaging and interactions"}],highlights:["180+ Countries Supported","Group Voice/Video Calls","Virtual Gift System","Real-time Multiplayer Games","Social Rooms","Community Features","Secure Messaging","Premium Features"],stats:[{label:"Countries",value:"180+"},{label:"Users",value:"500K+"},{label:"Daily Active",value:"50K+"},{label:"Games",value:"20+"}],websiteUrl:"https://wows.co.in"}},lwe=()=>{const{id:n}=iB(),e=n?awe[n]:null;if(!e)return f.jsx(Ma,{children:f.jsx("div",{className:"min-h-screen flex items-center justify-center",children:f.jsxs("div",{className:"text-center",children:[f.jsx("h1",{className:"font-display text-4xl font-bold mb-4",children:"Product Not Found"}),f.jsx(wr,{to:"/products",children:f.jsx(mt,{children:"Back to Products"})})]})})});const t=e.icon;return f.jsxs(Ma,{children:[f.jsxs("section",{className:"pt-32 pb-16 relative overflow-hidden",children:[f.jsx("div",{className:"absolute inset-0 gradient-mesh opacity-30"}),f.jsx("div",{className:`absolute top-1/4 right-1/4 w-[500px] h-[500px] bg-gradient-to-br ${e.bgGradient} rounded-full blur-[150px]`}),f.jsx("div",{className:`absolute bottom-1/4 left-1/4 w-[300px] h-[300px] bg-gradient-to-br ${e.bgGradient} rounded-full blur-[100px]`}),f.jsxs("div",{className:"container mx-auto px-6 relative",children:[f.jsx(Oe.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},className:"mb-8",children:f.jsxs(wr,{to:"/products",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[f.jsx(l_,{className:"w-4 h-4"}),"Back to Products"]})}),f.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[f.jsxs(Oe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},children:[f.jsx(Oe.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",delay:.2},className:`w-20 h-20 rounded-2xl bg-gradient-to-br ${e.gradient} p-0.5 shadow-2xl mb-6 inline-block`,children:f.jsx("div",{className:"w-full h-full rounded-2xl bg-background/90 flex items-center justify-center",children:f.jsx(t,{className:"w-10 h-10 text-foreground"})})}),f.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[f.jsx("span",{className:`text-sm font-semibold bg-gradient-to-r ${e.gradient} bg-clip-text text-transparent uppercase tracking-wider`,children:e.type==="app"?"Mobile App":"Web Platform"}),f.jsx("span",{className:"px-3 py-1 text-xs font-medium rounded-full bg-green-500/20 text-green-500 border border-green-500/30",children:e.type==="app"?"Available on Play Store":"Live & Active"})]}),f.jsx("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-4",children:e.name}),f.jsx("p",{className:`text-xl md:text-2xl font-medium bg-gradient-to-r ${e.gradient} bg-clip-text text-transparent mb-6`,children:e.tagline}),f.jsx("p",{className:"text-muted-foreground text-lg mb-8 leading-relaxed",children:e.description}),f.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.playStoreUrl&&f.jsx("a",{href:e.playStoreUrl,target:"_blank",rel:"noopener noreferrer",children:f.jsxs(mt,{size:"lg",className:`bg-gradient-to-r ${e.gradient} text-white hover:opacity-90 w-full sm:w-auto`,children:[f.jsx(BM,{className:"mr-2 w-5 h-5"}),"Download on Play Store"]})}),e.websiteUrl&&f.jsx("a",{href:e.websiteUrl,target:"_blank",rel:"noopener noreferrer",children:f.jsxs(mt,{size:"lg",variant:"outline",className:"border-border hover:bg-accent w-full sm:w-auto",children:[f.jsx(ud,{className:"mr-2 w-5 h-5"}),"Visit Website"]})})]})]}),f.jsxs(Oe.div,{initial:{opacity:0,x:40}
6478,animate:{opacity:1,x:0},transition:{duration:.6,delay:.2},className:"relative",children:[f.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${e.gradient} rounded-3xl blur-xl opacity-20`}),f.jsxs("div",{className:"glass-card p-8 md:p-10 relative",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.type==="app"?f.jsx(J2,{className:"w-6 h-6 text-primary"}):f.jsx(Af,{className:"w-6 h-6 text-primary"}),f.jsx("span",{className:"text-lg font-semibold",children:e.type==="app"?"App Statistics":"Platform Statistics"})]}),f.jsx("div",{className:"grid grid-cols-2 gap-6",children:e.stats.map((r,i)=>f.jsxs(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4+i*.1},className:"text-center p-4 rounded-2xl bg-background/50",children:[f.jsx("p",{className:`text-3xl md:text-4xl font-bold bg-gradient-to-r ${e.gradient} bg-clip-text text-transparent`,children:r.value}),f.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:r.label})]},r.label))}),f.jsxs("div",{className:"mt-8 p-4 rounded-2xl bg-background/50 flex items-center justify-center gap-2",children:[f.jsx("div",{className:"flex",children:[1,2,3,4,5].map(r=>f.jsx(ej,{className:"w-5 h-5 text-yellow-500 fill-yellow-500"},r))}),f.jsx("span",{className:"text-muted-foreground",children:e.type==="app"?"Highly Rated on Play Store":"Trusted by Users Worldwide"})]})]})]})]})]})]}),f.jsx("section",{className:"py-24 bg-card/30",children:f.jsxs("div",{className:"container mx-auto px-6",children:[f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-16",children:[f.jsxs("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:["Powerful ",f.jsx("span",{className:"text-gradient",children:"Features"})]}),f.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Everything you need for effective learning, all in one app."})]}),f.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.features.map((r,i)=>{const s=r.icon;return f.jsxs(Oe.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:i*.1},className:"glass-card p-6 hover-lift group",children:[f.jsx("div",{className:`w-14 h-14 rounded-2xl bg-gradient-to-br ${e.gradient} p-0.5 mb-4`,children:f.jsx("div",{className:"w-full h-full rounded-2xl bg-background/90 flex items-center justify-center group-hover:bg-transparent transition-colors",children:f.jsx(s,{className:"w-7 h-7 text-foreground group-hover:text-white transition-colors"})})}),f.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:r.title}),f.jsx("p",{className:"text-muted-foreground text-sm",children:r.description})]},i)})})]})}),f.jsx("section",{className:"py-24",children:f.jsxs("div",{className:"container mx-auto px-6",children:[f.jsx(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-16",children:f.jsxs("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:["What's ",f.jsx("span",{className:"text-gradient",children:"Included"})]})}),f.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-4",children:e.highlights.map((r,i)=>f.jsxs(Oe.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:i*.05},className:"glass-card p-4 flex items-start gap-3",children:[f.jsx("div",{className:`w-6 h-6 rounded-full bg-gradient-to-br ${e.gradient} flex items-center justify-center flex-shrink-0 mt-0.5`,children:f.jsx(gw,{className:"w-3 h-3 text-white"})}),f.jsx("span",{className:"text-sm text-foreground",children:r})]},i))})]})}),f.jsx("section",{className:"py-24 bg-card/30",children:f.jsx("div",{className:"container mx-auto px-6",children:f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"relative overflow-hidden rounded-3xl",children:[f.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${e.gradient} opacity-10`}),f.jsx("div",{className:`absolute top-0 right-0 w-96 h-96 bg-gradient-to-br ${e.gradient} rounded-full blur-[150px] opacity-30`}),f.jsxs("div",{className:"relative p-12 text-center",children:[f.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:e.type==="app"?"Ready to Start Learning?":"Ready to Get Started?"}),f.jsx("p",{className:"text-muted-foreground mb-8 max-w-2xl mx-auto",children:e.type==="app"?`Download ${e.name} now and take the first step towards your success. Join thousands of students who are already achieving their goals.`:`Visit ${e.name} today and experience the power of our platform. Join thousands of users who trust us for their needs.`}),f.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[e.playStoreUrl&&f.jsx("a",{href:e.playStoreUrl,target:"_blank",rel:"noopener noreferrer",children:f.jsxs(mt,{size:"lg",className:`bg-gradient-to-r ${e.gradient} text-white hover:opacity-90`,children:[f.jsx(BM,{className:"mr-2 w-5 h-5"}),"Download Now - It's Free"]})}),e.websiteUrl&&!e.playStoreUrl&&f.jsx("a",{href:e.websiteUrl,target:"_blank",rel:"noopener noreferrer",children:f.jsxs(mt,{size:"lg",className:`bg-gradient-to-r ${e.gradient} text-white hover:opacity-90`,children:[f.jsx(ud,{className:"mr-2 w-5 h-5"}),"Visit Platform"]})}),f.jsx(wr,{to:"/products",children:f.jsxs(mt,{size:"lg",variant:"outline",className:"border-border hover:bg-accent",children:["Explore More Products",f.jsx(Oc,{className:"ml-2 w-4 h-4"})]})})]})]})]})})})]})},cwe=[{id:"pdf-generator",title:"PDF Generator",description:"Generate eye-catching PDFs with full support for mathematical equations and image rendering. Perfect for academic papers, reports, and professional documents.",icon:Zl,gradient:"from-rose-500 to-orange-500",bgGlow:"bg-rose-500/20",features:["Mathematical Equations","Image Rendering","Custom Templates","Export Options"],stats:{label:"Documents Generated",value:"50K+"}},{id:"video-generator",title:"Video Generator",description:"Automatically generate complete videos with synchronized audio using advanced AI models. Transform your ideas into engaging video content effortlessly.",icon:Xm,gradient:"from-violet-500 to-purple-600",bgGlow:"bg-violet-500/20",features:["AI Voice Generation","Auto Sync Audio","Multiple Formats","Script to Video"],stats:{label:"Videos Created",value:"25K+"}},{id:"reel-editor",title:"Reel Editor",description:"AI-based reel editor that understands your commands. Simply describe what you want, and watch as your reels are automatically edited to perfection.",icon:NY,gradient:"from-cyan-500 to-blue-600",bgGlow:"bg-cyan-500/20",features:["Voice Commands","Auto Transitions","Music Sync","Smart Cropping"],stats:{label:"Reels Edited",value:"100K+"}},{id:"customer-helper",title:"Customer Helper Agent",description:"An intelligent AI agent that helps users resolve issues efficie
6478ntly while persuasively guiding them toward product solutions. Boost conversions naturally.",icon:KV,gradient:"from-emerald-500 to-teal-600",bgGlow:"bg-emerald-500/20",features:["24/7 Support","Multi-language","Smart Escalation","Sales Integration"],stats:{label:"Issues Resolved",value:"500K+"}},{id:"data-scraper",title:"Data Scraper",description:"Powerful browser extension that extracts verified emails and phone numbers from businesses worldwide. Build your lead database with accurate contact information.",icon:Fd,gradient:"from-amber-500 to-yellow-500",bgGlow:"bg-amber-500/20",features:["Email Extraction","Phone Numbers","Bulk Export","Verified Data"],stats:{label:"Data Points Collected",value:"10M+"}}],uwe=()=>f.jsxs(Ma,{children:[f.jsxs("section",{className:"pt-32 pb-20 relative overflow-hidden",children:[f.jsx("div",{className:"absolute inset-0 gradient-mesh opacity-30"}),f.jsx("div",{className:"absolute top-1/4 right-1/4 w-96 h-96 bg-primary/10 rounded-full blur-[120px]"}),f.jsx("div",{className:"absolute bottom-1/4 left-1/4 w-96 h-96 bg-secondary/10 rounded-full blur-[120px]"}),f.jsx("div",{className:"container mx-auto px-6 relative",children:f.jsxs(Oe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center max-w-4xl mx-auto",children:[f.jsxs(Oe.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2,type:"spring",stiffness:200},className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-primary/10 border border-primary/20 mb-6",children:[f.jsx(tp,{className:"w-4 h-4 text-primary"}),f.jsx("span",{className:"text-sm font-medium text-primary",children:"Powered by AI"})]}),f.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Powerful"," ",f.jsx("span",{className:"text-gradient",children:"Tools"}),f.jsx("br",{className:"hidden sm:block"}),"Built for Efficiency"]}),f.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto",children:"Discover our suite of AI-powered tools designed to automate your workflow, boost productivity, and transform the way you work."}),f.jsxs(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"flex flex-wrap justify-center gap-4 mt-8",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[f.jsx(Rf,{className:"w-4 h-4 text-primary"}),f.jsx("span",{children:"Lightning Fast"})]}),f.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[f.jsx(X2,{className:"w-4 h-4 text-primary"}),f.jsx("span",{children:"Enterprise Ready"})]}),f.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[f.jsx(tp,{className:"w-4 h-4 text-primary"}),f.jsx("span",{children:"AI Powered"})]})]})]})})]}),f.jsx("section",{className:"py-16 md:py-24",children:f.jsx("div",{className:"container mx-auto px-6",children:f.jsx("div",{className:"grid gap-8 md:gap-10",children:cwe.map((n,e)=>f.jsx(Oe.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.5,delay:e*.1},children:f.jsxs("div",{className:`group relative glass-card overflow-hidden hover-lift transition-all duration-500 ${e%2===0?"":"md:flex-row-reverse"}`,children:[f.jsx("div",{className:`absolute -top-20 -right-20 w-64 h-64 ${n.bgGlow} rounded-full blur-[100px] opacity-0 group-hover:opacity-100 transition-opacity duration-500`}),f.jsxs("div",{className:"relative p-6 md:p-10 flex flex-col md:flex-row gap-6 md:gap-10 items-start md:items-center",children:[f.jsxs("div",{className:"flex flex-col items-center gap-4 md:min-w-[200px]",children:[f.jsxs(Oe.div,{whileHover:{scale:1.1,rotate:5},className:`relative w-20 h-20 md:w-24 md:h-24 rounded-2xl bg-gradient-to-br ${n.gradient} flex items-center justify-center shadow-lg`,children:[f.jsx(n.icon,{className:"w-10 h-10 md:w-12 md:h-12 text-white"}),f.jsx("div",{className:`absolute inset-0 rounded-2xl bg-gradient-to-br ${n.gradient} opacity-50 blur-xl -z-10`})]}),f.jsxs("div",{className:"text-center",children:[f.jsx("div",{className:`text-2xl md:text-3xl font-bold bg-gradient-to-r ${n.gradient} bg-clip-text text-transparent`,children:n.stats.value}),f.jsx("div",{className:"text-xs text-muted-foreground",children:n.stats.label})]})]}),f.jsxs("div",{className:"flex-1",children:[f.jsx("h3",{className:"font-display text-2xl md:text-3xl font-bold mb-3 group-hover:text-primary transition-colors",children:n.title}),f.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:n.description}),f.jsx("div",{className:"grid grid-cols-2 gap-3 mb-6",children:n.features.map(t=>f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx("div",{className:`w-1.5 h-1.5 rounded-full bg-gradient-to-r ${n.gradient}`}),f.jsx("span",{className:"text-foreground",children:t})]},t))}),f.jsxs(mt,{className:`bg-gradient-to-r ${n.gradient} text-white hover:opacity-90 transition-opacity group/btn`,children:["Try ",n.title.split(" ")[0],f.jsx(Oc,{className:"ml-2 w-4 h-4 group-hover/btn:translate-x-1 transition-transform"})]})]})]})]})},n.id))})})}),f.jsxs("section",{className:"py-20 relative overflow-hidden",children:[f.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-primary/5 to-transparent"}),f.jsx("div",{className:"container mx-auto px-6 relative",children:f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"glass-card p-8 md:p-12 text-center max-w-3xl mx-auto",children:[f.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-primary to-secondary mb-6",children:f.jsx(Rf,{className:"w-8 h-8 text-white"})}),f.jsx("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:"Need a Custom Tool?"}),f.jsx("p",{className:"text-muted-foreground mb-8 max-w-xl mx-auto",children:"Our team specializes in building custom AI-powered tools tailored to your specific needs. Let's discuss how we
6478can automate your workflow."}),f.jsxs(mt,{size:"lg",className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground hover:opacity-90",children:["Request Custom Tool",f.jsx(Oc,{className:"ml-2 w-4 h-4"})]})]})})]})]}),dwe="/Employees",$F={"Imtiyaz Mukhtar":"Imtiyaz_mukhtar.jpg","Meer Tanveer":"Tanveer_meer.jpg","Anzar Maqbool":"Anzar_Maqbool_Sheikh.jpg","Fiza Farooq":"Fiza_farooq.jpg","Muneer Ahmad":"muneer_ahmad_najar.jpeg","Showkat Mukhtar":"Showkat_mukhtar.jpeg","Shahid Farooq":"shahid_farooq.jpg","Shahid Yousuf":"shahid_yousuf.jpg"},hwe=n=>n.split(" ").map(e=>e[0]).slice(0,2).join("").toUpperCase(),L_=[{name:"Imtiyaz Mukhtar",role:"Founder & CEO"},{name:"Tanveer Mukhtar",role:"Director"},{name:"Anzar Maqbool",role:"Web Developer"},{name:"Muzamil Ameen",role:"App Developer"},{name:"Meer Tanveer",role:"Social Media Manager"},{name:"Rashida Rashid",role:"UI/UX Developer"},{name:"Muneer Ahmad",role:"Content Creator"},{name:"Fiza Farooq",role:"Content Creator"},{name:"Mehraj Mukhtar",role:"Content Creator"},{name:"Faisal Ali",role:"Marketing Assistant"},{name:"Ubaid Meer",role:"Data Analyst"},{name:"Mubashir Ahmad",role:"Data Handler"},{name:"Showkat Mukhtar",role:"Marketing Head"},{name:"Rukhsana Shamas",role:"Customer Support"},{name:"Shahid Farooq",role:"Team Member"},{name:"Shahid Yousuf",role:"Team Member"}],fwe=[{icon:tj,title:"Mission-Driven",description:"We believe education is the most powerful tool for change. Every product we build serves this purpose."},{icon:fo,title:"User-Centric",description:"We design with learners and educators at the center, ensuring intuitive and impactful experiences."},{icon:Rf,title:"Innovation First",description:"We leverage cutting-edge technology to push the boundaries of what educational software can achieve."},{icon:Af,title:"Global Impact",description:"We build solutions that scale across cultures and contexts, making quality education accessible worldwide."}],pwe=[{number:String(L_.length),label:"Team Members"},{number:"1800+",label:"Companies Served"},{number:"180+",label:"Countries Reached"},{number:"400+",label:"Universities Supported"}],mwe=()=>f.jsxs(Ma,{children:[f.jsxs("section",{className:"pt-32 pb-24 relative overflow-hidden",children:[f.jsx("div",{className:"absolute inset-0 gradient-mesh opacity-30"}),f.jsx("div",{className:"absolute top-1/3 left-1/2 -translate-x-1/2 w-[600px] h-[600px] bg-primary/10 rounded-full blur-[150px]"}),f.jsx("div",{className:"container mx-auto px-6 relative",children:f.jsxs(Oe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center max-w-4xl mx-auto",children:[f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase mb-4 block",children:"About Us"}),f.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Building the Future"," ",f.jsx("span",{className:"text-gradient",children:"From Kashmir"})]}),f.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Recforge International PVT LTD is a Kashmir-based technology startup dedicated to building innovative solutions that empower businesses and learners worldwide."})]})})]}),f.jsx("section",{className:"py-24 bg-card/30",children:f.jsx("div",{className:"container mx-auto px-6",children:f.jsxs("div",{className:"grid lg:grid-cols-2 gap-16 items-center",children:[f.jsxs(Oe.div,{initial:{opacity:0,x:-40},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},children:[f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase mb-4 block",children:"Our Founder"}),f.jsxs("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-6",children:["Meet ",f.jsx("span",{className:"text-gradient",children:"Imtiyaz Mukhtar"})]}),f.jsxs("div",{className:"space-y-4 text-muted-foreground",children:[f.jsx("p",{children:"At just 22 years old, Imtiyaz Mukhtar founded Recforge International PVT LTD with a vision to create world-class technology solutions from Kashmir."}),f.jsxs("p",{children:["As the Founder & CEO, Imtiyaz leads a talented team of ",L_.length," employees, driving innovation in educational technology, AI-powered tools, and enterprise solutions."]}),f.jsx("p",{children:"Under his leadership, Recforge has grown to serve over 1800+ companies worldwide and has built products that reach users in 180+ countries."})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-4 mt-8",children:[f.jsxs("div",{className:"glass-card p-4 flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-primary/20 to-secondary/20 flex items-center justify-center",children:f.jsx(YV,{className:"w-5 h-5 text-primary"})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground",children:"Head Office"}),f.jsx("p",{className:"text-sm font-medium",children:"Kralpora, Kupwara J&K"})]})]}),f.jsxs("div",{className:"glass-card p-4 flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-primary/20 to-secondary/20 flex items-center justify-center",children:f.jsx($y,{className:"w-5 h-5 text-primary"})}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground",children:"Company Type"}),f.jsx("p",{className:"text-sm font-medium",children:"Private Limited"})]})]})]})]}),f.jsx(Oe.div,{initial:{opacity:0,x:40},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},className:"relative",children:f.jsxs("div",{className:"glass-card p-8 space-y-6",children:[f.jsxs("div",{className:"flex gap-4",children:[f.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-primary to-secondary flex items-center justify-center flex-shrink-0",children:f.jsx(tj,{className:"w-6 h-6 text-white"})}),f.jsxs("div",{children:[f.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:"Our Mission"}),f.jsx("p",{className:"text-muted-foreground text-sm",children:"To democratize quality technology through innovative solutions, making digital tools accessible, engaging, and effective for everyone."})]})]}),f.jsxs("div",{className:"flex gap-4",children:[f.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-purple-500 to-pink-500 flex items-center justify-center flex-shrink-0",children:f.jsx(XV,{className:"w-6 h-6 text-white"})}),f.jsxs("div",{children:[f.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:"Our Vision"}),f.jsx("p",{className:"text-muted-foreground text-sm",children:"A world
6478where every business and learner has access to personalized, high-quality technology solutions powered by innovation."})]})]})]})})]})})}),f.jsx("section",{className:"py-24",children:f.jsxs("div",{className:"container mx-auto px-6",children:[f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-16",children:[f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase mb-4 block",children:"Our Values"}),f.jsxs("h2",{className:"font-display text-3xl md:text-4xl font-bold",children:["What Drives ",f.jsx("span",{className:"text-gradient",children:"Us Forward"})]})]}),f.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:fwe.map((n,e)=>f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:e*.1},className:"glass-card p-6 text-center hover-lift",children:[f.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-primary/20 to-secondary/20 flex items-center justify-center mx-auto mb-4",children:f.jsx(n.icon,{className:"w-7 h-7 text-primary"})}),f.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:n.title}),f.jsx("p",{className:"text-muted-foreground text-sm",children:n.description})]},e))})]})}),f.jsx("section",{className:"py-24 bg-card/30",children:f.jsx("div",{className:"container mx-auto px-6",children:f.jsx(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"glass-card p-12",children:f.jsx("div",{className:"grid md:grid-cols-4 gap-8",children:pwe.map((n,e)=>f.jsxs(Oe.div,{initial:{opacity:0,scale:.9},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.5,delay:e*.1},className:"text-center",children:[f.jsx("div",{className:"font-display text-4xl md:text-5xl font-bold text-gradient mb-2",children:n.number}),f.jsx("div",{className:"text-muted-foreground",children:n.label})]},e))})})})}),f.jsx("section",{className:"py-24",children:f.jsxs("div",{className:"container mx-auto px-6",children:[f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-16",children:[f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase mb-4 block",children:"Our Team"}),f.jsxs("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:["Meet Our ",f.jsxs("span",{className:"text-gradient",children:[L_.length," Experts"]})]}),f.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"A dedicated team of professionals working together to build innovative solutions from Kashmir to the world."})]}),f.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4",children:L_.map((n,e)=>f.jsx(Oe.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:e*.05},className:"group",children:f.jsxs("div",{className:"glass-card p-4 text-center hover-lift h-full flex flex-col items-center justify-center gap-2 relative overflow-hidden",children:[f.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 to-secondary/5 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),f.jsx("div",{className:"w-14 h-14 rounded-full overflow-hidden flex-shrink-0 mb-1 ring-2 ring-primary/20 group-hover:scale-105 group-hover:ring-primary/40 transition-all duration-300",children:$F[n.name]?f.jsx("img",{src:`${dwe}/${$F[n.name]}`,alt:n.name,className:"w-full h-full object-cover"}):f.jsx("div",{className:"w-full h-full bg-gradient-to-br from-primary/30 to-secondary/30 flex items-center justify-center",children:f.jsx("span",{className:"font-display font-bold text-lg text-primary",children:hwe(n.name)})})}),f.jsx("h3",{className:"font-display font-semibold text-sm leading-tight relative z-10",children:n.name}),f.jsx("p",{className:"text-primary text-xs font-medium relative z-10",children:n.role})]})},e))})]})}),f.jsx("section",{className:"py-24 bg-card/30",children:f.jsxs("div",{className:"container mx-auto px-6",children:[f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-12",children:[f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider up
6478percase mb-4 block",children:"Extended Network"}),f.jsxs("h2",{className:"font-display text-3xl md:text-4xl font-bold mb-4",children:[f.jsx("span",{className:"text-gradient",children:"35+ Freelancers"})," Connected"]}),f.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"We work with a growing network of skilled freelancers to scale content, creativity, and development—delivering more without compromising quality."})]}),f.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:[{icon:PY,count:"20",label:"Content Extractors",description:"Curating and structuring learning content at scale."},{icon:$Y,count:"10",label:"Content Creators",description:"Creating engaging educational and marketing content."},{icon:J2,count:"5",label:"App Developers",description:"Building and maintaining mobile and web applications."}].map((n,e)=>f.jsxs(Oe.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:e*.1},className:"glass-card p-6 text-center hover-lift",children:[f.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-primary/20 to-secondary/20 flex items-center justify-center mx-auto mb-4",children:f.jsx(n.icon,{className:"w-6 h-6 text-primary"})}),f.jsx("div",{className:"font-display text-3xl font-bold text-gradient mb-1",children:n.count}),f.jsx("h3",{className:"font-display font-semibold text-foreground mb-2",children:n.label}),f.jsx("p",{className:"text-muted-foreground text-sm",children:n.description})]},n.label))})]})})]}),sl="/News Images",gwe=[{name:"JK Media",image:`${sl}/JK_Media.jpeg`},{name:"Jammu Tribune",image:`${sl}/Jammu_Tribune.jpeg`},{name:"Kashmir Rays",image:`${sl}/Kashmir_Rays.jpeg`},{name:"Rising Kashmir",image:`${sl}/Rising_kashmir.jpeg`},{name:"The Global Kashmir",image:`${sl}/The_Global_Kashmir.jpeg`}],ywe=()=>f.jsxs(Ma,{children:[f.jsxs("section",{className:"pt-32 pb-20 relative overflow-hidden",children:[f.jsx("div",{className:"absolute inset-0 gradient-mesh opacity-30"}),f.jsx("div",{className:"absolute top-1/3 left-1/2 -translate-x-1/2 w-[600px] h-[600px] bg-primary/10 rounded-full blur-[150px]"}),f.jsx("div",{className:"container mx-auto px-6 relative",children:f.jsxs(Oe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center max-w-4xl mx-auto",children:[f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase mb-4 block",children:"Our Journey"}),f.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:["Success Stories of"," ",f.jsx("span",{className:"text-gradient",children:"Recforge International"})]}),f.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"From JKEDI launch to Bangalore Tech Summit, angel meetings, and apps touching lakhs of students—here’s how we’re building the future from Kashmir."})]})})]}),f.jsx("section",{className:"py-16 md:py-24",children:f.jsx("div",{className:"container mx-auto px-6",children:f.jsx(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"glass-card p-6 md:p-10 overflow-hidden",children:f.jsxs("div",{className:"flex flex-col lg:flex-row gap-8 lg:gap-12 items-start",children:[f.jsx("div",{className:"flex-shrink-0 w-14 h-14 rounded-2xl bg-gradient-to-br from-primary to-secondary flex items-center justify-center",children:f.jsx(GY,{className:"w-7 h-7 text-primary-foreground"})}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase mb-2 block",children:"Media & Launch"}),f.jsx("h2",{className:"font-display text-2xl md:text-3xl font-bold mb-4",children:"Crakify App — Launched at JKEDI, Srinagar, J&K"}),f.jsx("p",{className:"text-muted-foreground mb-6",children:'The Director of Jammu and Kashmir Entrepreneurship Development Institute (JKEDI) launched our AI-backed exam preparation app "Crakify" at JKEDI, Pulwama. The launch was covered by leading newspapers including Greater Kashmir, Kashmir Uzma, JK Media, Jammu Tribune, and Kashmir Rays.'}),f.jsxs("a",{href:"https://www.greaterkashmir.com/business/director-jkedi-launches-online-exam-preparation-app-crakify/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-primary font-medium hover:underline",children:["Read article on Greater Kashmir",f.jsx(ud,{className:"w-4 h-4"})]}),f.jsxs("div",{className:"mt-8",children:[f.jsx("p",{className:"text-sm font-medium text-foreground mb-4",children:"Featured in"}),f.jsx("div",{className:"flex flex-wrap gap-4 md:gap-6",children:gwe.map((n,e)=>f.jsxs(Oe.div,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:e*.05},className:"flex flex-col items-center gap-2",children:[f.jsx("div",{className:"w-20 h-14 md:w-24 md:h-16 rounded-lg overflow-hidden border border-border bg-muted/50 flex items-center justify-center",children:f.jsx("img",{src:n.image,alt:n.name,className:"w-full h-full object-contain p-1"})}),f.jsx("span",{className:"text-xs text-muted-foreground text-center max-w-[80px]",children:n.name})]},n.name))})]})]})]})})})}),f.jsx("section",{className:"py-16 md:py-24 bg-card/30",children:f.jsx("div",{className:"container mx-auto px-6",children:f.jsx(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"glass-card p-6 md:p-10 overflow-hidden",children:f.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 lg:gap-12 items-center",children:[f.jsxs("div",{children:[f.jsx("div",{className:"w-14 h-14 roun
6478ded-2xl bg-gradient-to-br from-primary to-secondary flex items-center justify-center mb-6",children:f.jsx(OY,{className:"w-7 h-7 text-primary-foreground"})}),f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase mb-2 block",children:"Events & Partnerships"}),f.jsx("h2",{className:"font-display text-2xl md:text-3xl font-bold mb-4",children:"BTS 2025 — Bangalore Tech Summit"}),f.jsxs("p",{className:"text-muted-foreground mb-4",children:["We joined the Bangalore Tech Summit and connected with 40+ startups. We signed a collaboration with ",f.jsx("strong",{className:"text-foreground",children:"Entrar PVT LTD"}),", an ed-tech startup, and with South Korea's ",f.jsx("strong",{className:"text-foreground",children:"AutoL"})," for future software development."]}),f.jsxs("ul",{className:"space-y-2 text-muted-foreground text-sm",children:[f.jsxs("li",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary"}),"40+ startups connected"]}),f.jsxs("li",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary"}),"Collaboration with Entrar PVT LTD (Ed-Tech)"]}),f.jsxs("li",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary"}),"Partnership with AutoL (South Korea)"]})]})]}),f.jsx("div",{className:"relative rounded-2xl overflow-hidden border border-border aspect-[4/3] max-h-[320px] lg:max-h-none",children:f.jsx("img",{src:`${sl}/AutoL_collaboration.jpeg`,alt:"Recforge at BTS 2025 with AutoL collaboration",className:"w-full h-full object-cover"})})]})})})}),f.jsx("section",{className:"py-16 md:py-24",children:f.jsx("div",{className:"container mx-auto px-6",children:f.jsx(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"glass-card p-6 md:p-10 overflow-hidden",children:f.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 lg:gap-12 items-center",children:[f.jsx("div",{className:"relative rounded-2xl overflow-hidden border border-border aspect-square max-w-sm mx-auto lg:max-w-none",children:f.jsx("img",{src:`${sl}/Tahir_Qazi.jpg`,alt:"Tahir Qazi, CEO at iQuasar, Member of Angel Network Kashmir",className:"w-full h-full object-cover"})}),f.jsxs("div",{children:[f.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-primary to-secondary flex items-center justify-center mb-6",children:f.jsx($y,{className:"w-7 h-7 text-primary-foreground"})}),f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase mb-2 block",children:"Funding & Growth"}),f.jsx("h2",{className:"font-display text-2xl md:text-3xl font-bold mb-4",children:"Angel Network Kashmir"}),f.jsxs("p",{className:"text-muted-foreground mb-4",children:["We have held meetings with ",f.jsx("strong",{className:"text-foreground",children:"Tahir Qazi"}),", CEO at iQuasar and Member of Angel Network Kashmir. Fundraising of ",f.jsx("strong",{className:"text-foreground",children:"70 Lakh+"})," is currently under process to scale our products and reach."]}),f.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[f.jsx(YV,{className:"w-4 h-4 text-primary"}),"Tahir Qazi — CEO, iQuasar · Angel Network Kashmir"]})]})]})})})}),f.jsx("section",{className:"py-16 md:py-24 bg-card/30",children:f.jsxs("div",{className:"container mx-auto px-6",children:[f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-12",children:[f.jsx("span",{className:"text-primary text-sm font-semibold tracking-wider uppercase mb-4 block",children:"Our Apps"}),f.jsxs("h2",{className:"font-display text-3xl md:text-4xl font-bold",children:["Products ",f.jsx("span",{className:"text-gradient",children:"Making an Impact"})]})]}),f.jsxs("div",{className:"grid md:grid-cols-2 gap-6 lg:gap-8",children:[f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"glass-card p-6 md:p-8 hover-lift flex flex-col",children:[f.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[f.jsx("div",{className:"w-16 h-16 rounded-2xl overflow-hidden border border-border bg-muted/30 flex-shrink-0",children:f.jsx("img",{src:`${sl}/ignou_app_logo.png`,alt:"IGNOU Study Material app",className:"w-full h-full object-contain p-2"})}),f.jsxs("div",{children:[f.jsx("h3",{className:"font-display text-xl md:text-2xl font-bold mb-1",children:"IGNOU Study Material"}),f.jsxs("div",{className:"flex items-center gap-2 text-amber-500",children:[f.jsx(ej,{className:"w-4 h-4 fill-current"}),f.jsx("span",{className:"text-sm font-medium text-foreground",children:"4+ Rating · #1 on Play Store"})]})]})]}),f.jsxs("p",{className:"text-muted-foreground mb-6 flex-1",children:["Our official IGNOU Study Material app has ",f.jsx("strong",{className:"text-foreground",children:"80K+ students"})," and ranks ",f.jsx("strong",{className:"text-foreground",children:"#1 on the Play Store"})," in its category with a 4+ rating, helping learners access study materials, solved assignments, and exam alerts."]}),f.jsxs("a",{href:"https://play.google.com/store/apps/details?id=com.recforge.ignoustudy&hl=en_IN",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 w-full md:w-auto py-3 px-5 rounded-xl bg-gradient-to-r from-primary to-secondary text-primary-foreground font-medium hover:opacity-90 transition-opacity",children:["View on Play Store",f.jsx(ud,{className:"w-4 h-4"})]})]}),f.jsxs(Oe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1},className:"glass-card p-6 md:p-8 hover-lift flex flex-col",children:[f.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[f.jsx("div",{className:"w-16 h-16 rounded-2xl overflow-hidden border border-border bg-muted/30 flex-shrink-0",children:f.jsx("img",{src:`${sl}/crakify_app_logo.png`,alt:"Crakify Exam Preparation app",className:"w-full h-full object-contain p-2"})}),f.jsxs("div",{children:[f.jsx("h3",{className:"font-display text-xl md:text-2xl font-bold mb-1",children:"Crakify — Exam Preparation"}),f.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[f.jsx(a1,{className:"w-4 h-4"}),f.jsx("span",{className:"text-sm font-medium text-foreground",children:"20K+ active students"})]})]})]}),f.jsxs("p",{className:"text-muted-foreground mb-6 flex-1",children:["Crakify is our AI-powered competitive exam prep app with ",f.jsx("strong",{className:"text-foreground",children:"20K+ active students"}),", growing rapidly. It helps aspirants prepare for NEET, JEE, UPSC, CUET, JKSSB, and other exams with subject-wise tests and real-time analytics."]}),f.jsxs("a",{href:"https://play.google.com/store/apps/details?id=com.recforge.crakify&hl=en_IN",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 w-full md:w-auto py-3 px-5 rounded-xl bg-gradient-to-r from-primary to-secondary text-primary-foreground font-medium hover:opacity-90 transition-opacity",children:["View on Play Store",f.jsx(ud,{className:"w-4 h-4"})]})]})]})]})}),f.jsx("section",{className:"py-20",children:f.jsx("div",{className:"container mx-auto px-6",children:f.jsxs(Oe.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"glass-card p-8 md:p-12 text-center",children:[f.jsxs("h2",{className:"font-display text-2xl md:text-3xl font-bold mb-3",children:["Join our ",f.jsx("span",{className:"text-gradient",children:"journey"})]}),f.jsx("p",{className:"text-muted-foreground max-w-xl mx-auto mb-6",children:"From Kupwara to Bangalore and beyond—we’re building the future of ed-tech, one product at a time."}),f.jsxs("div",{className:"flex flex-wrap justify-center gap-4 text-sm",children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-full bg-primary/10 text-primary font-medium",children:[f.jsx(fo,{className:"w-4 h-4"}),"80K+ IGNOU learners"]}),f.jsxs("span",{className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-full bg-primary/10 text-primary font-medium",children:[f.jsx(a1,{className:"w-4 h-4"}),"20K+ Crakify users"]})]})]})})})]}),vwe=[{name:"Dashboard",icon:UY,path:"/admin"},{name:"Products",icon:Q2,path:"/admin/products"},{name:"Projects",icon:K2,path:"/admin/projects"},{name:"Page Content",icon:Zl,path:"/admin/content"},{name:"Team",icon:fo,path:"/admin/team"},{name:"Media",icon:FY,path:"/admin/media"}
6478,{name:"Deletion Pages",icon:gl,path:"/admin/deletion-pages"},{name:"Settings",icon:KY,path:"/admin/settings"}],uu=({children:n,title:e,description:t})=>{const[r,i]=M.useState(!0),s=eu();return f.jsxs("div",{className:"min-h-screen bg-background flex",children:[f.jsxs(Oe.aside,{initial:!1,animate:{width:r?280:80},className:"fixed left-0 top-0 bottom-0 z-40 glass-card border-r border-white/5 flex flex-col",children:[f.jsxs("div",{className:"h-20 flex items-center justify-between px-6 border-b border-white/5",children:[r&&f.jsxs(Oe.div,{initial:{opacity:0},animate:{opacity:1},className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-primary to-secondary flex items-center justify-center",children:f.jsx("span",{className:"text-primary-foreground font-display font-bold text-lg",children:"R"})}),f.jsxs("div",{children:[f.jsx("span",{className:"font-display font-semibold text-foreground",children:"Recforge"}),f.jsx("span",{className:"text-xs text-muted-foreground block",children:"Admin Panel"})]})]}),f.jsx("button",{onClick:()=>i(!r),className:"p-2 hover:bg-white/5 rounded-lg transition-colors",children:r?f.jsx(Xy,{size:20}):f.jsx(QV,{size:20})})]}),f.jsx("nav",{className:"flex-1 py-6 px-3 space-y-1 overflow-y-auto",children:vwe.map(o=>{const a=s.pathname===o.path;return f.jsxs(wr,{to:o.path,className:`flex items-center gap-3 px-3 py-3 rounded-xl transition-all duration-200 group ${a?"bg-gradient-to-r from-primary/20 to-secondary/20 text-primary":"text-muted-foreground hover:bg-white/5 hover:text-foreground"}`,children:[f.jsx(o.icon,{size:20,className:a?"text-primary":""}),r&&f.jsx(Oe.span,{initial:{opacity:0}
6478,animate:{opacity:1},className:"font-medium",children:o.name}),a&&r&&f.jsx($V,{size:16,className:"ml-auto"})]},o.path)})}),f.jsx("div",{className:"p-4 border-t border-white/5",children:f.jsx(wr,{to:"/",children:f.jsxs(mt,{variant:"ghost",className:`w-full justify-start gap-3 text-muted-foreground hover:text-foreground ${!r&&"justify-center"}`,children:[f.jsx(BY,{size:20}),r&&"Back to Site"]})})})]}),f.jsxs("main",{className:"flex-1 transition-all duration-300",style:{marginLeft:r?280:80},children:[f.jsx("header",{className:"h-20 border-b border-white/5 flex items-center px-8",children:f.jsxs("div",{children:[f.jsx("h1",{className:"font-display text-2xl font-bold",children:e}),t&&f.jsx("p",{className:"text-sm text-muted-foreground",children:t})]})}),f.jsx("div",{className:"p-8",children:n})]})]})},Kn=M.forwardRef(({className:n,...e},t)=>f.jsx("div",{ref:t,className:Ot("rounded-lg border bg-card text-card-foreground shadow-sm",n),...e}));Kn.displayName="Card";const Ki=M.forwardRef(({className:n,...e},t)=>f.jsx("div",{ref:t,className:Ot("flex flex-col space-y-1.5 p-6",n),...e}));Ki.displayName="CardHeader";const Yi=M.forwardRef(({className:n,...e},t)=>f.jsx("h3",{ref:t,className:Ot("text-2xl font-semibold leading-none tracking-tight",n),...e}));Yi.displayName="CardTitle";const mo=M.forwardRef(({className:n,...e},t)=>f.jsx("p",{ref:t,className:Ot("text-sm text-muted-foreground",n),...e}));mo.displayName="CardDescription";const Yn=M.forwardRef(({className:n,...e},t)=>f.jsx("div",{ref:t,className:Ot("p-6 pt-0",n),...e}));Yn.displayName="CardContent";const xwe=M.forwardRef(({className:n,...e},t)=>f.jsx("div",{ref:t,className:Ot("flex items-center p-6 pt-0",n),...e}));xwe.displayName="CardFooter";const _we=[{title:"Total Products",value:"6",change:"+2",trend:"up",icon:Q2,gradient:"from-primary to-cyan-400"},{title:"Active Projects",value:"12",change:"+3",trend:"up",icon:K2,gradient:"from-purple-500 to-pink-500"},{title:"Team Members",value:"8",change:"+1",trend:"up",icon:fo,gradient:"from-green-500 to-emerald-400"},{title:"Page Views",value:"24.5K",change:"+12%",trend:"up",icon:XV,gradient:"from-orange-500 to-amber-400"}],wwe=[{action:"Product updated",item:"EduLearn Pro",time:"2 hours ago"},{action:"New project added",item:"Corporate Training Portal",time:"5 hours ago"},{action:"Team member added",item:"John Smith - Developer",time:"1 day ago"},{action:"Content published",item:"About page updated",time:"2 days ago"},{action:"Media uploaded",item:"5 new images",time:"3 days ago"}],Swe=[{label:"Add Product",path:"/admin/products",icon:Q2},{label:"Add Project",path:"/admin/projects",icon:K2},{label:"Edit Content",path:"/admin/content",icon:fo}],bwe=()=>f.jsxs(uu,{title:"Dashboard",description:"Welcome back! Here's what's happening.",children:[f.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:_we.map((n,e)=>f.jsx(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:e*.1},children:f.jsx(Kn,{className:"glass-card border-white/5 hover-lift",children:f.jsxs(Yn,{className:"p-6",children:[f.jsxs("div",{className:"flex items-start justify-between mb-4",children:[f.jsx("div",{className:`w-12 h-12 rounded-xl bg-gradient-to-br ${n.gradient} flex items-center justify-center`,children:f.jsx(n.icon,{className:"w-6 h-6 text-white"})}),f.jsxs("div",{className:`flex items-center gap-1 text-sm ${n.trend==="up"?"text-green-500":"text-red-500"}`,children:[n.change,n.trend==="up"?f.jsx(c_,{className:"w-4 h-4"}):f.jsx(bY,{className:"w-4 h-4"})]})]}),f.jsx("div",{className:"font-display text-3xl font-bold mb-1",children:n.value}),f.jsx("div",{className:"text-sm text-muted-foreground",children:n.title})]})})},e))}),f.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[f.jsx(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"lg:col-span-2",children:f.jsxs(Kn,{className:"glass-card border-white/5 h-full",children:[f.jsxs(Ki,{className:"flex flex-row items-center justify-between",children:[f.jsx(Yi,{className:"font-display",children:"Recent Activity"}),f.jsx(mt,{variant:"ghost",size:"icon",children:f.jsx(qy,{className:"w-4 h-4"})})]}),f.jsx(Yn,{children:f.jsx("div",{className:"space-y-4",children:wwe.map((n,e)=>f.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-white/5 last:border-0",children:[f.jsxs("div",{children:[f.jsx("div",{className:"font-medium text-foreground",children:n.action}),f.jsx("div",{className:"text-sm text-muted-foreground",children:n.item})]}),f.jsx("div",{className:"text-xs text-muted-foreground",children:n.time})]},e))})})]})}),f.jsx(Oe.div,{initial:{opacity:0,y:20}
vendor: 19,721 bytes, line 6478
6478,animate:{opacity:1,y:0},transition:{delay:.5},children:f.jsxs(Kn,{className:"glass-card border-white/5 h-full",children:[f.jsx(Ki,{children:f.jsx(Yi,{className:"font-display",children:"Quick Actions"})}),f.jsx(Yn,{className:"space-y-3",children:Swe.map((n,e)=>f.jsxs(mt,{variant:"outline",className:"w-full justify-start gap-3 border-white/10 hover:bg-white/5 h-auto py-4",children:[f.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",children:f.jsx(n.icon,{className:"w-5 h-5 text-primary"})}),f.jsx("span",{children:n.label})]},e))})]})})]}),f.jsx(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"mt-8",children:f.jsxs(Kn,{className:"glass-card border-white/5",children:[f.jsxs(Ki,{className:"flex flex-row items-center justify-between",children:[f.jsx(Yi,{className:"font-display",children:"Analytics Overview"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(mt,{variant:"outline",size:"sm",className:"border-white/10",children:"7 days"}),f.jsx(mt,{variant:"outline",size:"sm",className:"border-white/10",children:"30 days"}),f.jsx(mt,{size:"sm",className:"bg-primary/20 text-primary hover:bg-primary/30",children:"90 days"})]})]}),f.jsx(Yn,{children:f.jsx("div",{className:"h-64 flex items-center justify-center text-muted-foreground",children:f.jsxs("div",{className:"text-center",children:[f.jsx(a1,{className:"w-12 h-12 mx-auto mb-4 text-primary/50"}),f.jsx("p",{children:"Analytics charts will be displayed here"}),f.jsx("p",{className:"text-sm",children:"Connect to a database to enable real-time analytics"})]})})})]})})]});var HC=["Enter"," "],Ewe=["ArrowDown","PageUp","Home"],$W=["ArrowUp","PageDown","End"],Twe=[...Ewe,...$W],Mwe={ltr:[...HC,"ArrowRight"],rtl:[...HC,"ArrowLeft"]},Awe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Av="Menu",[ky,Cwe,Rwe]=fw(Av),[$d,qW]=bs(Av,[Rwe,Mp,Fp]),PS=Mp(),XW=Fp(),[Pwe,qd]=$d(Av),[Nwe,Cv]=$d(Av),KW=n=>{const{__scopeMenu:e,open:t=!1,children:r,dir:i,onOpenChange:s,modal:o=!0}=n,a=PS(e),[l,c]=M.useState(null),u=M.useRef(!1),d=Ss(s),m=pv(i);return M.useEffect(()=>{const g=()=>{u.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>u.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),f.jsx(Dj,{...a,children:f.jsx(Pwe,{scope:e,open:t,onOpenChange:d,content:l,onContentChange:c,children:f.jsx(Nwe,{scope:e,onClose:M.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:m,modal:o,children:r})})})};KW.displayName=Av;var Iwe="MenuAnchor",UN=M.forwardRef((n,e)=>{const{__scopeMenu:t,...r}=n,i=PS(t);return f.jsx(cR,{...i,...r,ref:e})});UN.displayName=Iwe;var VN="MenuPortal",[Lwe,YW]=$d(VN,{forceMount:void 0}),QW=n=>{const{__scopeMenu:e,forceMount:t,children:r,container:i}=n,s=qd(VN,e);return f.jsx(Lwe,{scope:e,forceMount:t,children:f.jsx(Xs,{present:t||s.open,children:f.jsx(Gy,{asChild:!0,container:i,children:r})})})};QW.displayName=VN;var _o="MenuContent",[Dwe,jN]=$d(_o),JW=M.forwardRef((n,e)=>{const t=YW(_o,n.__scopeMenu),{forceMount:r=t.forceMount,...i}=n,s=qd(_o,n.__scopeMenu),o=Cv(_o,n.__scopeMenu);return f.jsx(ky.Provider,{scope:n.__scopeMenu,children:f.jsx(Xs,{present:r||s.open,children:f.jsx(ky.Slot,{scope:n.__scopeMenu,children:o.modal?f.jsx(kwe,{...i,ref:e}):f.jsx(Owe,{...i,ref:e})})})})}),kwe=M.forwardRef((n,e)=>{const t=qd(_o,n.__scopeMenu),r=M.useRef(null),i=sn(e,r);return M.useEffect(()=>{const s=r.current;if(s)return KP(s)},[]),f.jsx(BN,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:Xe(n.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),Owe=M.forwardRef((n,e)=>{const t=qd(_o,n.__scopeMenu);return f.jsx(BN,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),Fwe=Sd("MenuContent.ScrollLock"),BN=M.forwardRef((n,e)=>{const{__scopeMenu:t,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:m,onDismiss:g,disableOutsideScroll:v,..._}=n,x=qd(_o,t),y=Cv(_o,t),S=PS(t),b=XW(t),A=Cwe(t),[k,L]=M.useState(null),C=M.useRef(null),P=sn(e,C,x.onContentChange),R=M.useRef(0),N=M.useRef(""),O=M.useRef(0),V=M.useRef(null),B=M.useRef("right"),W=M.useRef(0),ee=v?cS:M.Fragment,J=v?{as:Fwe,allowPinchZoom:!0}:void 0,ie=z=>{var de,Ge;const q=N.current+z,Z=A().filter($e=>!$e.disabled),re=document.activeElement,te=(de=Z.find($e=>$e.ref.current===re))==null?void 0:de.textValue,ae=Z.map($e=>$e.textValue),we=Kwe(ae,q,te),Re=(Ge=Z.find($e=>$e.textValue===we))==null?void 0:Ge.ref.current;(function $e(De){N.current=De,window.clearTimeout(R.current),De!==""&&(R.current=window.setTimeout(()=>$e(""),1e3))})(q),Re&&setTimeout(()=>Re.focus())};M.useEffect(()=>()=>window.clearTimeout(R.current),[]),XP();const j=M.useCallback(z=>{var Z,re;return B.current===((Z=V.current)==null?void 0:Z.side)&&Qwe(z,(re=V.current)==null?void 0:re.area)},[]);return f.jsx(Dwe,{scope:t,searchRef:N,onItemEnter:M.useCallback(z=>{j(z)&&z.preventDefault()},[j]),onItemLeave:M.useCallback(z=>{var q;j(z)||((q=C.current)==null||q.focus(),L(null))},[j]),onTriggerLeave:M.useCallback(z=>{j(z)&&z.preventDefault()},[j]),pointerGraceTimerRef:O,onPointerGraceIntentChange:M.useCallback(z=>{V.current=z},[]),children:f.jsx(ee,{...J,children:f.jsx(aS,{asChild:!0,trapped:i,onMountAutoFocus:Xe(s,z=>{var q;z.preventDefault(),(q=C.current)==null||q.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:f.jsx(Sp,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:m,onDismiss:g,children:f.jsx(GP,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:k,onCurrentTabStopIdChange:L,onEntryFocus:Xe(l,z=>{y.isUsingKeyboardRef.current||z.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(uR,{role:"menu","aria-orientation":"vertical","data-state":p7(x.open),"data-radix-menu-content":"",dir:y.dir,...S,..._,ref:P,style:{outline:"none",..._.style},onKeyDown:Xe(_.onKeyDown,z=>{const Z=z.target.closest("[data-radix-menu-content]")===z.currentTarget,re=z.ctrlKey||z.altKey||z.metaKey,te=z.key.length===1;Z&&(z.key==="Tab"&&z.preventDefault(),!re&&te&&ie(z.key));const ae=C.current;if(z.target!==ae||!Twe.includes(z.key))return;z.preventDefault();const Re=A().filter(de=>!de.disabled).map(de=>de.ref.current);$W.includes(z.key)&&Re.reverse(),qwe(Re)}),onBlur:Xe(n.onBlur,z=>{z.currentTarget.contains(z.target)||(window.clearTimeout(R.current),N.current="")}),onPointerMove:Xe(n.onPointerMove,Oy(z=>{const q=z.target,Z=W.current!==z.clientX;if(z.currentTarget.contains(q)&&Z){const re=z.clientX>W.current?"right":"left";B.current=re,W.current=z.clientX}}))})})})})})})});JW.displayName=_o;var Uwe="MenuGroup",zN=M.forwardRef((n,e)=>{const{__scopeMenu:t,...r}=n;return f.jsx(Et.div,{role:"group",...r,ref:e})});zN.displayName=Uwe;var Vwe="MenuLabel",ZW=M.forwardRef((n,e)=>{const{__scopeMenu:t,...r}=n;return f.jsx(Et.div,{...r,ref:e})});ZW.displayName=Vwe;var X1="MenuItem",qF="menu.itemSelect",NS=M.forwardRef((n,e)=>{const{disabled:t=!1,onSelect:r,...i}=n,s=M.useRef(null),o=Cv(X1,n.__scopeMenu),a=jN(X1,n.__scopeMenu),l=sn(e,s),c=M.useRef(!1),u=()=>{const d=s.current;if(!t&&d){const m=new CustomEvent(qF,{bubbles:!0,cancelable:!0});d.addEventListener(qF,g=>r==null?void 0:r(g),{once:!0}),H2(d,m),m.defaultPrevented?c.current=!1:o.onClose()}};return f.jsx(e7,{...i,ref:l,disabled:t,onClick:Xe(n.onClick,u),onPointerDown:d=>{var m;(m=n.onPointerDown)==null||m.call(n,d),c.current=!0},onPointerUp:Xe(n.onPointerUp,d=>{var m;c.current||(m=d.currentTarget)==null||m.click()}),onKeyDown:Xe(n.onKeyDown,d=>{const m=a.searchRef.current!=="";t||m&&d.key===" "||HC.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});NS.displayName=X1;var e7=M.forwardRef((n,e)=>{const{__scopeMenu:t,disabled:r=!1,textValue:i,...s}=n,o=jN(X1,t),a=XW(t),l=M.useRef(null),c=sn(e,l),[u,d]=M.useState(!1),[m,g]=M.useState("");return M.useEffect(()=>{const v=l.current;v&&g((v.textContent??"").trim())},[s.children]),f.jsx(ky.ItemSlot,{scope:t,disabled:r,textValue:i??m,children:f.jsx(WP,{asChild:!0,...a,focusable:!r,children:f.jsx(Et.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:c,onPointerMove:Xe(n.onPointerMove,Oy(v=>{r?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Xe(n.onPointerLeave,Oy(v=>o.onItemLeave(v))),onFocus:Xe(n.onFocus,()=>d(!0)),onBlur:Xe(n.onBlur,()=>d(!1))})})})}),jwe="MenuCheckboxItem",t7=M.forwardRef((n,e)=>{const{checked:t=!1,onCheckedChange:r,...i}=n;return f.jsx(o7,{scope:n.__scopeMenu,checked:t,children:f.jsx(NS,{role:"menuitemcheckbox","aria-checked":K1(t)?"mixed":t,...i,ref:e,"data-state":GN(t),onSelect:Xe(i.onSelect,()=>r==null?void 0:r(K1(t)?!0:!t),{checkForDefaultPrevented:!1})})})});t7.displayName=jwe;var n7="MenuRadioGroup",[Bwe,zwe]=$d(n7,{value:void 0,onValueChange:()=>{}}),r7=M.forwardRef((n,e)=>{const{value:t,onValueChange:r,...i}=n,s=Ss(r);return f.jsx(Bwe,{scope:n.__scopeMenu,value:t,onValueChange:s,children:f.jsx(zN,{...i,ref:e})})});r7.displayName=n7;var i7="MenuRadioItem",s7=M.forwardRef((n,e)=>{const{value:t,...r}=n,i=zwe(i7,n.__scopeMenu),s=t===i.value;return f.jsx(o7,{scope:n.__scopeMenu,checked:s,children:f.jsx(NS,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":GN(s),onSelect:Xe(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,t)},{checkForDefaultPrevented:!1})})})});s7.displayName=i7;var HN="MenuItemIndicator",[o7,Hwe]=$d(HN,{checked:!1}),a7=M.forwardRef((n,e)=>{const{__scopeMenu:t,forceMount:r,...i}=n,s=Hwe(HN,t);return f.jsx(Xs,{present:r||K1(s.checked)||s.checked===!0,children:f.jsx(Et.span,{...i,ref:e,"data-state":GN(s.checked)})})});a7.displayName=HN;var Gwe="MenuSeparator",l7=M.forwardRef((n,e)=>{const{__scopeMenu:t,...r}=n;return f.jsx(Et.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});l7.displayName=Gwe;var Wwe="MenuArrow",c7=M.forwardRef((n,e)=>{const{__scopeMenu:t,...r}=n,i=PS(t);return f.jsx(dR,{...i,...r,ref:e})});c7.displayName=Wwe;var $we="MenuSub",[Ibe,u7]=$d($we),ng="MenuSubTrigger",d7=M.forwardRef((n,e)=>{const t=qd(ng,n.__scopeMenu),r=Cv(ng,n.__scopeMenu),i=u7(ng,n.__scopeMenu),s=jN(ng,n.__scopeMenu),o=M.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,c={__scopeMenu:n.__scopeMenu},u=M.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return M.useEffect(()=>u,[u]),M.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),f.jsx(UN,{asChild:!0,...c,children:f.jsx(e7,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":i.contentId,"data-state":p7(t.open),...n,ref:hw(e,i.onTriggerChange),onClick:d=>{var m;(m=n.onClick)==null||m.call(n,d),!(n.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:Xe(n.onPointerMove,Oy(d=>{s.onItemEnter(d),!d.defaultPrevented&&!n.disabled&&!t.open&&!o.current&&(s.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{t.onOpenChange(!0),u()},100))})),onPointerLeave:Xe(n.onPointerLeave,Oy(d=>{var g,v;u();const m=(g=t.content)==null?void 0:g.getBoundingClientRect();if(m){const _=(v=t.content)==null?void 0:v.dataset.side,x=_==="right",y=x?-5:5,S=m[x?"left":"right"],b=m[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+y,y:d.clientY},{x:S,y:m.top},{x:b,y:m.top},{x:b,y:m.bottom},{x:S,y:m.bottom}],side:_}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Xe(n.onKeyDown,d=>{var g;const m=s.searchRef.current!=="";n.disabled||m&&d.key===" "||Mwe[r.dir].includes(d.key)&&(t.onOpenChange(!0),(g=t.content)==null||g.focus(),d.preventDefault())})})})});d7.displayName=ng;var h7="MenuSubContent",f7=M.forwardRef((n,e)=>{const t=YW(_o,n.__scopeMenu),{forceMount:r=t.forceMount,...i}=n,s=qd(_o,n.__scopeMenu),o=Cv(_o,n.__scopeMenu),a=u7(h7,n.__scopeMenu),l=M.useRef(null),c=sn(e,l);return f.jsx(ky.Provider,{scope:n.__scopeMenu,children:f.jsx(Xs,{present:r||s.open,children:f.jsx(ky.Slot,{scope:n.__scopeMenu,children:f.jsx(BN,{id:a.contentId,"aria-labelledby":a.triggerId,...i,ref:c,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var d;o.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:Xe(n.onFocusOutside,u=>{u.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Xe(n.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:Xe(n.onKeyDown,u=>{var g;const d=u.currentTarget.contains(u.target),m=Awe[o.dir].includes(u.key);d&&m&&(s.onOpenChange(!1),(g=a.trigger)==null||g.focus(),u.preventDefault())})})})})})});f7.displayName=h7;function p7(n){return n?"open":"closed"}function K1(n){return n==="indeterminate"}function GN(n){return K1(n)?"indeterminate":n?"checked":"unchecked"}function qwe(n){const e=document.activeElement;for(const t of n)if(t===e||(t.focus(),document.activeElement!==e))return}function Xwe(n,e){return n.map((t,r)=>n[(e+r)%n.length])}function Kwe(n,e,t){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=t?n.indexOf(t):-1;let o=Xwe(n,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==t));const l=o.find(c=>c.toLowerCase().startsWith(i.toLowerCase()));return l!==t?l:void 0}function Ywe(n,e){const{x:t,y:r}=n;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s],l=e[o],c=a.x,u=a.y,d=l.x,m=l.y;u>r!=m>r&&t<(d-c)*(r-u)/(m-u)+c&&(i=!i)}return i}function Qwe(n,e){if(!e)return!1;const t={x:n.clientX,y:n.clientY};return Ywe(t,e)}function Oy(n){return e=>e.pointerType==="mouse"?n(e):void 0}var Jwe=KW,Zwe=UN,eSe=QW,tSe=JW,nSe=zN,rSe=ZW,iSe=NS,sSe=t7,oSe=r7,aSe=s7,lSe=a7,cSe=l7,uSe=c7,dSe=d7,hSe=f7,IS="DropdownMenu",[fSe,Lbe]=bs(IS,[qW]),is=qW(),[pSe,m7]=fSe(IS),g7=n=>{const{__scopeDropdownMenu:e,children:t,dir:r,open:i,defaultOpen:s,onOpenChange:o,modal:a=!0}=n,l=is(e),c=M.useRef(null),[u,d]=La({prop:i,defaultProp:s??!1,onChange:o,caller:IS});return f.jsx(pSe,{scope:e,triggerId:Sa(),triggerRef:c,contentId:Sa(),open:u,onOpenChange:d,onOpenToggle:M.useCallback(()=>d(m=>!m),[d]),modal:a,children:f.jsx(Jwe,{...l,open:u,onOpenChange:d,dir:r,modal:a,children:t})})};g7.displayName=IS;var y7="DropdownMenuTrigger",v7=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,disabled:r=!1,...i}=n,s=m7(y7,t),o=is(t);return f.jsx(Zwe,{asChild:!0,...o,children:f.jsx(Et.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:hw(e,s.triggerRef),onPointerDown:Xe(n.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:Xe(n.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});v7.displayName=y7;var mSe="DropdownMenuPortal",x7=n=>{const{__scopeDropdownMenu:e,...t}=n,r=is(e);return f.jsx(eSe,{...r,...t})};x7.displayName=mSe;var _7="DropdownMenuContent",w7=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...r}=n,i=m7(_7,t),s=is(t),o=M.useRef(!1);return f.jsx(tSe,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...r,ref:e,onCloseAutoFocus:Xe(n.onCloseAutoFocus,a=>{var l;o.current||(l=i.triggerRef.current)==null||l.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:Xe(n.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!i.modal||u)&&(o.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});w7.displayName=_7;var gSe="DropdownMenuGroup",ySe=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...r}=n,i=is(t);return f.jsx(nSe,{...i,...r,ref:e})});ySe.displayName=gSe;var vSe="DropdownMenuLabel",S7=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...r}=n,i=is(t);return f.jsx(rSe,{...i,...r,ref:e})});S7.displayName=vSe;var xSe="DropdownMenuItem",b7=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...r}=n,i=is(t);return f.jsx(iSe,{...i,...r,ref:e})});b7.displayName=xSe;var _Se="DropdownMenuCheckboxItem",E7=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...r}=n,i=is(t);return f.jsx(sSe,{...i,...r,ref:e})});E7.displayName=_Se;var wSe="DropdownMenuRadioGroup",SSe=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...r}=n,i=is(t);return f.jsx(oSe,{...i,...r,ref:e})});SSe.displayName=wSe;var bSe="DropdownMenuRadioItem",T7=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...r}=n,i=is(t);return f.jsx(aSe,{...i,...r,ref:e})});T7.displayName=bSe;var ESe="DropdownMenuItemIndicator",M7=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...r}=n,i=is(t);return f.jsx(lSe,{...i,...r,ref:e})});M7.displayName=ESe;var TSe="DropdownMenuSeparator",A7=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...r}=n,i=is(t);return f.jsx(cSe,{...i,...r,ref:e})});A7.displayName=TSe;var MSe="DropdownMenuArrow",ASe=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...r}=n,i=is(t);return f.jsx(uSe,{...i,...r,ref:e})});ASe.displayName=MSe;var CSe="DropdownMenuSubTrigger",C7=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...r}=n,i=is(t);return f.jsx(dSe,{...i,...r,ref:e})});C7.displayName=CSe;var RSe="DropdownMenuSubContent",R7=M.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...r}=n,i=is(t);return f.jsx(hSe,{...i,...r,ref:e,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});R7.displayName=RSe;var PSe=g7,NSe=v7,ISe=x7,P7=w7,N7=S7,I7=b7,L7=E7,D7=T7,k7=M7,O7=A7,F7=C7,U7=R7;const LS=PSe,DS=NSe,LSe=M.forwardRef(({className:n,inset:e,children:t,...r},i)=>f.jsxs(F7,{ref:i,className:Ot("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",e&&"pl-8",n),...r,children:[t,f.jsx($V,{className:"ml-auto h-4 w-4"})]}));LSe.displayName=F7.displayName;const DSe=M.forwardRef(({className:n,...e},t)=>f.jsx(U7,{ref:t,className:Ot("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
6478de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...e}));DSe.displayName=U7.displayName;const Rv=M.forwardRef(({className:n,sideOffset:e=4,...t},r)=>f.jsx(ISe,{children:f.jsx(P7,{ref:r,sideOffset:e,className:Ot("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...t})}));Rv.displayName=P7.displayName;const Al=M.forwardRef(({className:n,inset:e,...t},r)=>f.jsx(I7,{ref:r,className:Ot("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e&&"pl-8",n),...t}));Al.displayName=I7.displayName;const kSe=M.forwardRef(({className:n,children:e,checked:t,...r},i)=>f.jsxs(L7,{ref:i,className:Ot("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",n),checked:t,...r,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(k7,{children:f.jsx(gw,{className:"h-4 w-4"})})}),e]}));kSe.displayName=L7.displayName;const OSe=M.forwardRef(({className:n,children:e,...t},r)=>f.jsxs(D7,{ref:r,className:Ot("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",n),...t,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(k7,{children:f.jsx(qV,{className:"h-2 w-2 fill-current"})})}),e]}));OSe.displayName=D7.displayName;const FSe=M.forwardRef(({className:n,inset:e,...t},r)=>f.jsx(N7,{ref:r,className:Ot("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",n),...t}));FSe.displayName=N7.displayName;const USe=M.forwardRef(({className:n,...e},t)=>f.jsx(O7,{ref:t,className:Ot("-mx-1 my-1 h-px bg-muted",n),...e}));USe.displayName=O7.displayName;const VSe=[{id:"edulearn-pro",name:"EduLearn Pro",category:"LMS",status:"Published",description:"Enterprise-grade learning management system"},{id:"virtual-class",name:"Virtual Classroom",category:"Virtual Learning",status:"Published",description:"Immersive online learning platform"},{id:"assessment-hub",name:"Assessment Hub",category:"Assessment",status:"Published",description:"AI-powered testing and evaluation"},{id:"learn-analytics",name:"Learn Analytics",category:"Analytics",status:"Draft",description:"Powerful analytics dashboard"}],jSe=()=>{const[n,e]=M.useState(VSe),[t,r]=M.useState(""),[i,s]=M.useState(!1),[o,a]=M.useState(null),l=n.filter(u=>u.name.toLowerCase().includes(t.toLowerCase())),c=u=>{e(n.filter(d=>d.id!==u))};return f.jsx(uu,{title:"Products",description:"Manage your product catalog",children:f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between",children:[f.jsxs("div",{className:"relative w-full sm:w-80",children:[f.jsx(Fd,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),f.jsx(Nt,{placeholder:"Search products...",value:t,onChange:u=>r(u.target.value),className:"pl-10 bg-card/50 border-white/10"})]}),f.jsxs(gv,{open:i,onOpenChange:s,children:[f.jsx(pS,{asChild:!0,children:f.jsxs(mt,{className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground",children:[f.jsx(qg,{className:"w-4 h-4 mr-2"}),"Add Product"]})}),f.jsxs(Vp,{className:"glass-card border-white/10",children:[f.jsx(jp,{children:f.jsx(Pd,{className:"font-display",children:o?"Edit Product":"Add New Product"})}),f.jsxs("div",{className:"space-y-4 pt-4",children:[f.jsxs("div",{children:[f.jsx(ft,{children:"Product Name"}),f.jsx(Nt,{placeholder:"Enter product name",className:"mt-2 bg-card/50 border-white/10",defaultValue:o==null?void 0:o.name})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Category"}),f.jsx(Nt,{placeholder:"e.g., LMS, Analytics",className:"mt-2 bg-card/50 border-white/10",defaultValue:o==null?void 0:o.category})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Description"}),f.jsx(Wo,{placeholder:"Enter product description",className:"mt-2 bg-card/50 border-white/10",defaultValue:o==null?void 0:o.description})]}),f.jsxs("div",{className:"flex gap-2 pt-4",children:[f.jsx(mt,{className:"flex-1 bg-gradient-to-r from-primary to-secondary text-primary-foreground",onClick:()=>s(!1),children:o?"Save Changes":"Add Product"}),f.jsx(mt,{variant:"outline",className:"border-white/10",onClick:()=>{s(!1),a(null)},children:"Cancel"})]})]})]})]})]}),f.jsx(Kn,{className:"glass-card border-white/5",children:f.jsx(Yn,{className:"p-0",children:f.jsx("div",{className:"overflow-x-auto",children:f.jsxs("table",{className:"w-full",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"border-b border-white/5",children:[f.jsx("th",{className:"text-left py-4 px-6 text-sm font-medium text-muted-foreground",children:"Product"}),f.jsx("th",{className:"text-left py-4 px-6 text-sm font-medium text-muted-foreground",children:"Category"}),f.jsx("th",{className:"text-left py-4 px-6 text-sm font-medium text-muted-foreground",children:"Status"}),f.jsx("th",{className:"text-right py-4 px-6 text-sm font-medium text-muted-foreground",children:"Actions"})]})}),f.jsx("tbody",{children:l.map((u,d)=>f.jsxs(Oe.tr,{initial:{opacity:0,y:10}
6478,animate:{opacity:1,y:0},transition:{delay:d*.05},className:"border-b border-white/5 hover:bg-white/5 transition-colors",children:[f.jsx("td",{className:"py-4 px-6",children:f.jsxs("div",{children:[f.jsx("div",{className:"font-medium text-foreground",children:u.name}),f.jsx("div",{className:"text-sm text-muted-foreground",children:u.description})]})}),f.jsx("td",{className:"py-4 px-6",children:f.jsx("span",{className:"px-2 py-1 text-xs rounded-full bg-primary/10 text-primary",children:u.category})}),f.jsx("td",{className:"py-4 px-6",children:f.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${u.status==="Published"?"bg-green-500/10 text-green-500":"bg-yellow-500/10 text-yellow-500"}`,children:u.status})}),f.jsx("td",{className:"py-4 px-6",children:f.jsxs("div",{className:"flex items-center justify-end gap-2",children:[f.jsx(mt,{variant:"ghost",size:"icon",className:"h-8 w-8",children:f.jsx(ud,{className:"w-4 h-4"})}),f.jsxs(LS,{children:[f.jsx(DS,{asChild:!0,children:f.jsx(mt,{variant:"ghost",size:"icon",className:"h-8 w-8",children:f.jsx(qy,{className:"w-4 h-4"})})}),f.jsxs(Rv,{align:"end",className:"glass-card border-white/10",children:[f.jsxs(Al,{onClick:()=>{a(u),s(!0)},children:[f.jsx(yw,{className:"w-4 h-4 mr-2"}),"Edit"]}),f.jsxs(Al,{className:"text-destructive",onClick:()=>c(u.id),children:[f.jsx(gl,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})]})})]},u.id))})]})})})})]})})},BSe=[{id:"1",title:"Pacific University LMS",client:"Pacific University",category:"Platform",status:"Completed",description:"Complete learning management system serving 50,000+ students"},{id:"2",title:"TechCorp Training Portal",client:"TechCorp Global",category:"Web App",status:"Completed",description:"Enterprise training platform with certification tracking"},{id:"3",title:"LearnOnGo Mobile App",client:"EduStart Inc",category:"Mobile App",status:"In Progress",description:"Native iOS and Android learning app"},{id:"4",title:"Virtual Science Labs",client:"National Education Board",category:"Web App",status:"Completed",description:"Interactive 3D virtual laboratory simulations"}],zSe=()=>{const[n,e]=M.useState(BSe),[t,r]=M.useState(""),[i,s]=M.useState(!1),[o,a]=M.useState(null),l=n.filter(u=>u.title.toLowerCase().includes(t.toLowerCase())||u.client.toLowerCase().includes(t.toLowerCase())),c=u=>{e(n.filter(d=>d.id!==u))};return f.jsx(uu,{title:"Projects",description:"Manage your freelancing portfolio",children:f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between",children:[f.jsxs("div",{className:"relative w-full sm:w-80",children:[f.jsx(Fd,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),f.jsx(Nt,{placeholder:"Search projects...",value:t,onChange:u=>r(u.target.value),className:"pl-10 bg-card/50 border-white/10"})]}),f.jsxs(gv,{open:i,onOpenChange:s,children:[f.jsx(pS,{asChild:!0,children:f.jsxs(mt,{className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground",children:[f.jsx(qg,{className:"w-4 h-4 mr-2"}),"Add Project"]})}),f.jsxs(Vp,{className:"glass-card border-white/10",children:[f.jsx(jp,{children:f.jsx(Pd,{className:"font-display",children:o?"Edit Project":"Add New Project"})}),f.jsxs("div",{className:"space-y-4 pt-4",children:[f.jsxs("div",{children:[f.jsx(ft,{children:"Project Title"}),f.jsx(Nt,{placeholder:"Enter project title",className:"mt-2 bg-card/50 border-white/10",defaultValue:o==null?void 0:o.title})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Client Name"}),f.jsx(Nt,{placeholder:"Enter client name",className:"mt-2 bg-card/50 border-white/10",defaultValue:o==null?void 0:o.client})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Category"}),f.jsx(Nt,{placeholder:"e.g., Web App, Mobile App",className:"mt-2 bg-card/50 border-white/10",defaultValue:o==null?void 0:o.category})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Description"}),f.jsx(Wo,{placeholder:"Enter project description",className:"mt-2 bg-card/50 border-white/10",defaultValue:o==null?void 0:o.description})]}),f.jsxs("div",{className:"flex gap-2 pt-4",children:[f.jsx(mt,{className:"flex-1 bg-gradient-to-r from-primary to-secondary text-primary-foreground",onClick:()=>s(!1),children:o?"Save Changes":"Add Project"}),f.jsx(mt,{variant:"outline",className:"border-white/10",onClick:()=>{s(!1),a(null)},children:"Cancel"})]})]})]})]})]}),f.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:l.map((u,d)=>f.jsx(Oe.div,{initial:{opacity:0,y:20}
vendor: 5,050 bytes, line 6478
6478,animate:{opacity:1,y:0},transition:{delay:d*.1},children:f.jsx(Kn,{className:"glass-card border-white/5 hover-lift",children:f.jsxs(Yn,{className:"p-6",children:[f.jsxs("div",{className:"flex items-start justify-between mb-4",children:[f.jsxs("div",{className:"flex gap-2",children:[f.jsx("span",{className:"px-2 py-1 text-xs rounded-full bg-primary/10 text-primary",children:u.category}),f.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${u.status==="Completed"?"bg-green-500/10 text-green-500":"bg-yellow-500/10 text-yellow-500"}`,children:u.status})]}),f.jsxs(LS,{children:[f.jsx(DS,{asChild:!0,children:f.jsx(mt,{variant:"ghost",size:"icon",className:"h-8 w-8",children:f.jsx(qy,{className:"w-4 h-4"})})}),f.jsxs(Rv,{align:"end",className:"glass-card border-white/10",children:[f.jsxs(Al,{onClick:()=>{a(u),s(!0)},children:[f.jsx(yw,{className:"w-4 h-4 mr-2"}),"Edit"]}),f.jsxs(Al,{className:"text-destructive",onClick:()=>c(u.id),children:[f.jsx(gl,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})]}),f.jsx("h3",{className:"font-display font-semibold text-lg mb-1",children:u.title}),f.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:u.client}),f.jsx("p",{className:"text-sm text-muted-foreground",children:u.description})]})})},u.id))})]})})};var kS="Tabs",[HSe,Dbe]=bs(kS,[Fp]),V7=Fp(),[GSe,WN]=HSe(kS),j7=M.forwardRef((n,e)=>{const{__scopeTabs:t,value:r,onValueChange:i,defaultValue:s,orientation:o="horizontal",dir:a,activationMode:l="automatic",...c}=n,u=pv(a),[d,m]=La({prop:r,onChange:i,defaultProp:s??"",caller:kS});return f.jsx(GSe,{scope:t,baseId:Sa(),value:d,onValueChange:m,orientation:o,dir:u,activationMode:l,children:f.jsx(Et.div,{dir:u,"data-orientation":o,...c,ref:e})})});j7.displayName=kS;var B7="TabsList",z7=M.forwardRef((n,e)=>{const{__scopeTabs:t,loop:r=!0,...i}=n,s=WN(B7,t),o=V7(t);return f.jsx(GP,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:r,children:f.jsx(Et.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:e})})});z7.displayName=B7;var H7="TabsTrigger",G7=M.forwardRef((n,e)=>{const{__scopeTabs:t,value:r,disabled:i=!1,...s}=n,o=WN(H7,t),a=V7(t),l=q7(o.baseId,r),c=X7(o.baseId,r),u=r===o.value;return f.jsx(WP,{asChild:!0,...a,focusable:!i,active:u,children:f.jsx(Et.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...s,ref:e,onMouseDown:Xe(n.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?o.onValueChange(r):d.preventDefault()}),onKeyDown:Xe(n.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&o.onValueChange(r)}),onFocus:Xe(n.onFocus,()=>{const d=o.activationMode!=="manual";!u&&!i&&d&&o.onValueChange(r)})})})});G7.displayName=H7;var W7="TabsContent",$7=M.forwardRef((n,e)=>{const{__scopeTabs:t,value:r,forceMount:i,children:s,...o}=n,a=WN(W7,t),l=q7(a.baseId,r),c=X7(a.baseId,r),u=r===a.value,d=M.useRef(u);return M.useEffect(()=>{const m=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(m)},[]),f.jsx(Xs,{present:i||u,children:({present:m})=>f.jsx(Et.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:c,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:d.current?"0s":void 0},children:m&&s})})});$7.displayName=W7;function q7(n,e){return`${n}-trigger-${e}`}function X7(n,e){return`${n}-content-${e}`}var WSe=j7,K7=z7,Y7=G7,Q7=$7;const $Se=WSe,J7=M.forwardRef(({className:n,...e},t)=>f.jsx(K7,{ref:t,className:Ot("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",n),...e}));J7.displayName=K7.displayName;const rg=M.forwardRef(({className:n,...e},t)=>f.jsx(Y7,{ref:t,className:Ot("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",n),...e}));rg.displayName=Y7.displayName;const ig=M.forwardRef(({className:n,...e},t)=>f.jsx(Q7,{ref:t,className:Ot("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),...e}));ig.displayName=Q7.displayName;const qSe=()=>f.jsx(uu,{title:"Page Content",description:"Edit content for all pages",children:f.jsxs($Se,{defaultValue:"home",className:"space-y-6",children:[f.jsxs(J7,{className:"glass-card border-white/10 p-1",children:[f.jsx(rg,{value:"home",className:"data-[state=active]:bg-primary/20",children:"Home"}),f.jsx(rg,{value:"about",className:"data-[state=active]:bg-primary/20",children:"About"}),f.jsx(rg,{value:"products",className:"data-[state=active]:bg-primary/20",children:"Products"}),f.jsx(rg,{value:"projects",className:"data-[state=active]:bg-primary/20",children:"Projects"})]}),f.jsx(ig,{value:"home",children:f.jsxs(Oe.div,{initial:{opacity:0,y:20}
vendor: 4,718 bytes, line 6478
6478,animate:{opacity:1,y:0},className:"space-y-6",children:[f.jsxs(Kn,{className:"glass-card border-white/5",children:[f.jsxs(Ki,{children:[f.jsx(Yi,{className:"font-display",children:"Hero Section"}),f.jsx(mo,{children:"Edit the main hero content on the home page"})]}),f.jsxs(Yn,{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx(ft,{children:"Badge Text"}),f.jsx(Nt,{defaultValue:"Pioneering Educational Technology",className:"mt-2 bg-card/50 border-white/10"})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Headline"}),f.jsx(Nt,{defaultValue:"Building the Future of Learning",className:"mt-2 bg-card/50 border-white/10"})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Subheadline"}),f.jsx(Wo,{defaultValue:"We craft innovative software solutions that transform how people learn, teach, and grow. From enterprise LMS platforms to immersive virtual classrooms.",className:"mt-2 bg-card/50 border-white/10"})]})]})]}),f.jsxs(Kn,{className:"glass-card border-white/5",children:[f.jsxs(Ki,{children:[f.jsx(Yi,{className:"font-display",children:"Stats Section"}),f.jsx(mo,{children:"Edit the statistics displayed on the home page"})]}),f.jsx(Yn,{children:f.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[f.jsxs("div",{children:[f.jsx(ft,{children:"Stat 1 Value"}),f.jsx(Nt,{defaultValue:"50+",className:"mt-2 bg-card/50 border-white/10"}),f.jsx(Nt,{defaultValue:"Projects Delivered",className:"mt-2 bg-card/50 border-white/10",placeholder:"Label"})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Stat 2 Value"}),f.jsx(Nt,{defaultValue:"1M+",className:"mt-2 bg-card/50 border-white/10"}),f.jsx(Nt,{defaultValue:"Users Worldwide",className:"mt-2 bg-card/50 border-white/10",placeholder:"Label"})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Stat 3 Value"}),f.jsx(Nt,{defaultValue:"99%",className:"mt-2 bg-card/50 border-white/10"}),f.jsx(Nt,{defaultValue:"Client Satisfaction",className:"mt-2 bg-card/50 border-white/10",placeholder:"Label"})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Stat 4 Value"}),f.jsx(Nt,{defaultValue:"15+",className:"mt-2 bg-card/50 border-white/10"}),f.jsx(Nt,{defaultValue:"Countries Served",className:"mt-2 bg-card/50 border-white/10",placeholder:"Label"})]})]})})]}),f.jsxs("div",{className:"flex gap-4",children:[f.jsxs(mt,{className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground",children:[f.jsx(HM,{className:"w-4 h-4 mr-2"}),"Save Changes"]}),f.jsxs(mt,{variant:"outline",className:"border-white/10",children:[f.jsx(XY,{className:"w-4 h-4 mr-2"}),"Reset to Default"]})]})]})}),f.jsx(ig,{value:"about",children:f.jsxs(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-6",children:[f.jsxs(Kn,{className:"glass-card border-white/5",children:[f.jsxs(Ki,{children:[f.jsx(Yi,{className:"font-display",children:"About Page Content"}),f.jsx(mo,{children:"Edit the about page content"})]}),f.jsxs(Yn,{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx(ft,{children:"Page Title"}),f.jsx(Nt,{defaultValue:"Transforming Education Through Technology",className:"mt-2 bg-card/50 border-white/10"})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Mission Statement"}),f.jsx(Wo,{defaultValue:"To democratize quality education through innovative technology, making learning accessible, engaging, and effective for everyone.",className:"mt-2 bg-card/50 border-white/10",rows:3})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Vision Statement"}),f.jsx(Wo,{defaultValue:"A world where every learner has access to personalized, high-quality education powered by technology.",className:"mt-2 bg-card/50 border-white/10",rows:3})]})]})]}),f.jsx("div",{className:"flex gap-4",children:f.jsxs(mt,{className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground",children:[f.jsx(HM,{className:"w-4 h-4 mr-2"}),"Save Changes"]})})]})}),f.jsx(ig,{value:"products",children:f.jsx(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:f.jsxs(Kn,{className:"glass-card border-white/5",children:[f.jsxs(Ki,{children:[f.jsx(Yi,{className:"font-display",children:"Products Page Content"}),f.jsx(mo,{children:"Edit the products page header content"})]}),f.jsxs(Yn,{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx(ft,{children:"Page Title"}),f.jsx(Nt,{defaultValue:"Educational Technology Solutions",className:"mt-2 bg-card/50 border-white/10"})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Page Description"}),f.jsx(Wo,{defaultValue:"Explore our comprehensive suite of products designed to transform how organizations deliver and manage learning experiences.",className:"mt-2 bg-card/50 border-white/10"})]})]})]})})}),f.jsx(ig,{value:"projects",children:f.jsx(Oe.div,{initial:{opacity:0,y:20}
6478,animate:{opacity:1,y:0},children:f.jsxs(Kn,{className:"glass-card border-white/5",children:[f.jsxs(Ki,{children:[f.jsx(Yi,{className:"font-display",children:"Projects Page Content"}),f.jsx(mo,{children:"Edit the projects page header content"})]}),f.jsxs(Yn,{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx(ft,{children:"Page Title"}),f.jsx(Nt,{defaultValue:"Freelancing Projects",className:"mt-2 bg-card/50 border-white/10"})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Page Description"}),f.jsx(Wo,{defaultValue:"Explore our portfolio of successful projects delivered for clients across various industries and educational sectors.",className:"mt-2 bg-card/50 border-white/10"})]})]})]})})})]})}),XSe=[{id:"1",name:"Alex Johnson",role:"CEO & Founder",bio:"15+ years in EdTech industry",image:"https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&h=400&fit=crop&crop=face"},{id:"2",name:"Sarah Chen",role:"CTO",bio:"Former Google Engineer",image:"https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=400&h=400&fit=crop&crop=face"},{id:"3",name:"Michael Roberts",role:"Head of Product",bio:"Ex-Coursera Product Lead",image:"https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=400&h=400&fit=crop&crop=face"},{id:"4",name:"Emily Watson",role:"Head of Design",bio:"Award-winning UX Designer",image:"https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=400&h=400&fit=crop&crop=face"}],KSe=()=>{const[n,e]=M.useState(XSe),[t,r]=M.useState(""),[i,s]=M.useState(!1),[o,a]=M.useState(null),l=n.filter(u=>u.name.toLowerCase().includes(t.toLowerCase())||u.role.toLowerCase().includes(t.toLowerCase())),c=u=>{e(n.filter(d=>d.id!==u))};return f.jsx(uu,{title:"Team Members",description:"Manage your team",children:f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between",children:[f.jsxs("div",{className:"relative w-full sm:w-80",children:[f.jsx(Fd,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),f.jsx(Nt,{placeholder:"Search team members...",value:t,onChange:u=>r(u.target.value),className:"pl-10 bg-card/50 border-white/10"})]}),f.jsxs(gv,{open:i,onOpenChange:s,children:[f.jsx(pS,{asChild:!0,children:f.jsxs(mt,{className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground",children:[f.jsx(qg,{className:"w-4 h-4 mr-2"}),"Add Member"]})}),f.jsxs(Vp,{className:"glass-card border-white/10",children:[f.jsx(jp,{children:f.jsx(Pd,{className:"font-display",children:o?"Edit Team Member":"Add Team Member"})}),f.jsxs("div",{className:"space-y-4 pt-4",children:[f.jsxs("div",{children:[f.jsx(ft,{children:"Name"}),f.jsx(Nt,{placeholder:"Enter name",className:"mt-2 bg-card/50 border-white/10",defaultValue:o==null?void 0:o.name})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Role"}),f.jsx(Nt,{placeholder:"Enter role",className:"mt-2 bg-card/50 border-white/10",defaultValue:o==null?void 0:o.role})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Bio"}),f.jsx(Nt,{placeholder:"Short bio",className:"mt-2 bg-card/50 border-white/10",defaultValue:o==null?void 0:o.bio})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Image URL"}),f.jsx(Nt,{placeholder:"https://...",className:"mt-2 bg-card/50 border-white/10",defaultValue:o==null?void 0:o.image})]}),f.jsxs("div",{className:"flex gap-2 pt-4",children:[f.jsx(mt,{className:"flex-1 bg-gradient-to-r from-primary to-secondary text-primary-foreground",onClick:()=>s(!1),children:o?"Save Changes":"Add Member"}),f.jsx(mt,{variant:"outline",className:"border-white/10",onClick:()=>{s(!1),a(null)},children:"Cancel"})]})]})]})]})]}),f.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:l.map((u,d)=>f.jsx(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:d*.1},children:f.jsxs(Kn,{className:"glass-card border-white/5 overflow-hidden hover-lift",children:[f.jsxs("div",{className:"relative h-48",children:[f.jsx("img",{src:u.image,alt:u.name,className:"w-full h-full object-cover"}),f.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-card to-transparent"}),f.jsx("div",{className:"absolute top-2 right-2",children:f.jsxs(LS,{children:[f.jsx(DS,{asChild:!0,children:f.jsx(mt,{variant:"ghost",size:"icon",className:"h-8 w-8 bg-background/50 backdrop-blur-sm",children:f.jsx(qy,{className:"w-4 h-4"})})}),f.jsxs(Rv,{align:"end",className:"glass-card border-white/10",children:[f.jsxs(Al,{onClick:()=>{a(u),s(!0)},children:[f.jsx(yw,{className:"w-4 h-4 mr-2"}),"Edit"]}),f.jsxs(Al,{className:"text-destructive",onClick:()=>c(u.id),children:[f.jsx(gl,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})})]}),f.jsxs(Yn,{className:"p-4",children:[f.jsx("h3",{className:"font-display font-semibold mb-1",children:u.name}),f.jsx("p",{className:"text-primary text-sm mb-1",children:u.role}),f.jsx("p",{className:"text-muted-foreground text-sm",children:u.bio})]})]})},u.id))})]})})},YSe=[{id:"1",name:"hero-image.jpg",type:"image",size:"2.4 MB",url:"https://images.unsplash.com/photo-1516321318423-f06f85e504b3?w=400&h=300&fit=crop"},{id:"2",name:"team-photo.jpg",type:"image",size:"1.8 MB",url:"https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=400&h=300&fit=crop"},{id:"3",name:"product-demo.jpg",type:"image",size:"3.2 MB",url:"https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=400&h=300&fit=crop"},{id:"4",name:"office.jpg",type:"image",size:"2.1 MB",url:"https://images.unsplash.com/photo-1497366216548-37526070297c?w=400&h=300&fit=crop"},{id:"5",name:"learning.jpg",type:"image",size:"1.5 MB",url:"https://images.unsplash.com/photo-1434030216411-0b793f4b4173?w=400&h=300&fit=crop"},{id:"6",name:"students.jpg",type:"image",size:"2.8 MB",url:"https://images.unsplash.com/photo-1523050854058-8df90110c9f1?w=400&h=300&fit=crop"}],QSe=()=>
6478{const[n,e]=M.useState(YSe),[t,r]=M.useState(""),[i,s]=M.useState("grid"),[o,a]=M.useState([]),l=n.filter(d=>d.name.toLowerCase().includes(t.toLowerCase())),c=d=>{a(m=>m.includes(d)?m.filter(g=>g!==d):[...m,d])},u=()=>{e(n.filter(d=>!o.includes(d.id))),a([])};return f.jsx(uu,{title:"Media Library",description:"Manage your images and files",children:f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex flex-col md:flex-row gap-4 justify-between",children:[f.jsxs("div",{className:"flex gap-4 flex-1",children:[f.jsxs("div",{className:"relative flex-1 max-w-sm",children:[f.jsx(Fd,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),f.jsx(Nt,{placeholder:"Search files...",value:t,onChange:d=>r(d.target.value),className:"pl-10 bg-card/50 border-white/10"})]}),f.jsxs("div",{className:"flex border border-white/10 rounded-lg overflow-hidden",children:[f.jsx(mt,{variant:"ghost",size:"icon",className:i==="grid"?"bg-primary/20":"",onClick:()=>s("grid"),children:f.jsx(kY,{className:"w-4 h-4"})}),f.jsx(mt,{variant:"ghost",size:"icon",className:i==="list"?"bg-primary/20":"",onClick:()=>s("list"),children:f.jsx(jY,{className:"w-4 h-4"})})]})]}),f.jsxs("div",{className:"flex gap-2",children:[o.length>0&&f.jsxs(mt,{variant:"destructive",onClick:u,children:[f.jsx(gl,{className:"w-4 h-4 mr-2"}),"Delete (",o.length,")"]}),f.jsxs(mt,{className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground",children:[f.jsx(kL,{className:"w-4 h-4 mr-2"}),"Upload Files"]})]})]}),f.jsx(Kn,{className:"glass-card border-white/5 border-dashed",children:f.jsx(Yn,{className:"p-8",children:f.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[f.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mb-4",children:f.jsx(kL,{className:"w-8 h-8 text-primary"})}),f.jsx("h3",{className:"font-display font-semibold text-lg mb-2",children:"Drop files here to upload"}),f.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Supports images, videos, and documents up to 10MB"}),f.jsx(mt,{variant:"outline",className:"border-white/10",children:"Browse Files"})]})})}),i==="grid"?f.jsx("div",{className:"grid md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-4",children:l.map((d,m)=>f.jsxs(Oe.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:m*.05},onClick:()=>c(d.id),className:`cursor-pointer group relative rounded-xl overflow-hidden border-2 transition-all ${o.includes(d.id)?"border-primary ring-2 ring-primary/20":"border-transparent hover:border-white/20"}`,children:[f.jsx("div",{className:"aspect-square",children:f.jsx("img",{src:d.url,alt:d.name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"})}),f.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity",children:f.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-3",children:[f.jsx("p",{className:"text-sm font-medium truncate",children:d.name}),f.jsx("p",{className:"text-xs text-muted-foreground",children:d.size})]})}),o.includes(d.id)&&f.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-primary flex items-center justify-center",children:f.jsx("svg",{className:"w-4 h-4 text-primary-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})})]},d.id))}):f.jsx(Kn,{className:"glass-card border-white/5",children:f.jsx(Yn,{className:"p-0",children:f.jsxs("table",{className:"w-full",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"border-b border-white/5",children:[f.jsx("th",{className:"text-left py-4 px-6 text-sm font-medium text-muted-foreground",children:"Name"}),f.jsx("th",{className:"text-left py-4 px-6 text-sm font-medium text-muted-foreground",children:"Type"}),f.jsx("th",{className:"text-left py-4 px-6 text-sm font-medium text-muted-foreground",children:"Size"}),f.jsx("th",{className:"text-right py-4 px-6 text-sm font-medium text-muted-foreground",children:"Actions"})]})}),f.jsx("tbody",{children:l.map(d=>f.jsxs("tr",{className:"border-b border-white/5 hover:bg-white/5 transition-colors cursor-pointer",onClick:()=>c(d.id),children:[f.jsx("td",{className:"py-4 px-6",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("img",{src:d.url,alt:d.name,className:"w-10 h-10 rounded object-cover"}),f.jsx("span",{className:"font-medium",children:d.name})]})}),f.jsx("td",{className:"py-4 px-6",children:f.jsx("span",{className:"px-2 py-1 text-xs rounded-full bg-primary/10 text-primary capitalize",children:d.type})}),f.jsx("td",{className:"py-4 px-6 text-muted-foreground",children:d.size}),f.jsx("td",{className:"py-4 px-6 text-right",children:f.jsx(mt,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive",children:f.jsx(gl,{className:"w-4 h-4"})})})]},d.id))})]})})})]})})};var OS="Switch",[JSe,kbe]=bs(OS),[ZSe,ebe]=JSe(OS),Z7=M.forwardRef((n,e)=>{const{__scopeSwitch:t,name:r,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:c,form:u,...d}
vendor: 5,614 bytes, line 6478
6478=n,[m,g]=M.useState(null),v=sn(e,b=>g(b)),_=M.useRef(!1),x=m?u||!!m.closest("form"):!0,[y,S]=La({prop:i,defaultProp:s??!1,onChange:c,caller:OS});return f.jsxs(ZSe,{scope:t,checked:y,disabled:a,children:[f.jsx(Et.button,{type:"button",role:"switch","aria-checked":y,"aria-required":o,"data-state":r$(y),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:v,onClick:Xe(n.onClick,b=>{S(A=>!A),x&&(_.current=b.isPropagationStopped(),_.current||b.stopPropagation())})}),x&&f.jsx(n$,{control:m,bubbles:!_.current,name:r,value:l,checked:y,required:o,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});Z7.displayName=OS;var e$="SwitchThumb",t$=M.forwardRef((n,e)=>{const{__scopeSwitch:t,...r}=n,i=ebe(e$,t);return f.jsx(Et.span,{"data-state":r$(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:e})});t$.displayName=e$;var tbe="SwitchBubbleInput",n$=M.forwardRef(({__scopeSwitch:n,control:e,checked:t,bubbles:r=!0,...i},s)=>{const o=M.useRef(null),a=sn(o,s),l=sS(t),c=ww(e);return M.useEffect(()=>{const u=o.current;if(!u)return;const d=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==t&&g){const v=new Event("click",{bubbles:r});g.call(u,t),u.dispatchEvent(v)}},[l,t,r]),f.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...i,tabIndex:-1,ref:a,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});n$.displayName=tbe;function r$(n){return n?"checked":"unchecked"}var i$=Z7,nbe=t$;const Qh=M.forwardRef(({className:n,...e},t)=>f.jsx(i$,{className:Ot("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",n),...e,ref:t,children:f.jsx(nbe,{className:Ot("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Qh.displayName=i$.displayName;var rbe="Separator",XF="horizontal",ibe=["horizontal","vertical"],s$=M.forwardRef((n,e)=>{const{decorative:t,orientation:r=XF,...i}=n,s=sbe(r)?r:XF,a=t?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return f.jsx(Et.div,{"data-orientation":s,...a,...i,ref:e})});s$.displayName=rbe;function sbe(n){return ibe.includes(n)}var o$=s$;const D_=M.forwardRef(({className:n,orientation:e="horizontal",decorative:t=!0,...r},i)=>f.jsx(o$,{ref:i,decorative:t,orientation:e,className:Ot("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",n),...r}));D_.displayName=o$.displayName;const obe=()=>f.jsx(uu,{title:"Settings",description:"Configure your admin panel",children:f.jsxs("div",{className:"max-w-4xl space-y-6",children:[f.jsx(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:f.jsxs(Kn,{className:"glass-card border-white/5",children:[f.jsx(Ki,{children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",children:f.jsx(Af,{className:"w-5 h-5 text-primary"})}),f.jsxs("div",{children:[f.jsx(Yi,{className:"font-display",children:"General Settings"}),f.jsx(mo,{children:"Basic site configuration"})]})]})}),f.jsxs(Yn,{className:"space-y-4",children:[f.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[f.jsxs("div",{children:[f.jsx(ft,{children:"Site Name"}),f.jsx(Nt,{defaultValue:"Recforge International",className:"mt-2 bg-card/50 border-white/10"})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Contact Email"}),f.jsx(Nt,{defaultValue:"[email protected]",className:"mt-2 bg-card/50 border-white/10"})]})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Site URL"}),f.jsx(Nt,{defaultValue:"https://recforge.com",className:"mt-2 bg-card/50 border-white/10"})]})]})]})}),f.jsx(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},children:f.jsxs(Kn,{className:"glass-card border-white/5",children:[f.jsx(Ki,{children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-500/10 flex items-center justify-center",children:f.jsx(qm,{className:"w-5 h-5 text-purple-500"})}),f.jsxs("div",{children:[f.jsx(Yi,{className:"font-display",children:"Notifications"}),f.jsx(mo,{children:"Configure notification preferences"})]})]})}),f.jsxs(Yn,{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("div",{className:"font-medium",children:"Email Notifications"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:"Receive email for new inquiries"})]}),f.jsx(Qh,{defaultChecked:!0})]}),f.jsx(D_,{className:"bg-white/5"}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("div",{className:"font-medium",children:"Weekly Reports"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:"Get weekly analytics summary"})]}),f.jsx(Qh,{defaultChecked:!0})]}),f.jsx(D_,{className:"bg-white/5"}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("div",{className:"font-medium",children:"System Alerts"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:"Important system notifications"})]}),f.jsx(Qh,{defaultChecked:!0})]})]})]})}),f.jsx(Oe.div,{initial:{opacity:0,y:20}
6478,animate:{opacity:1,y:0},transition:{delay:.2},children:f.jsxs(Kn,{className:"glass-card border-white/5",children:[f.jsx(Ki,{children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-lg bg-green-500/10 flex items-center justify-center",children:f.jsx(ZV,{className:"w-5 h-5 text-green-500"})}),f.jsxs("div",{children:[f.jsx(Yi,{className:"font-display",children:"Security"}),f.jsx(mo,{children:"Manage security settings"})]})]})}),f.jsxs(Yn,{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("div",{className:"font-medium",children:"Two-Factor Authentication"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:"Add an extra layer of security"})]}),f.jsx(Qh,{})]}),f.jsx(D_,{className:"bg-white/5"}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("div",{className:"font-medium",children:"Session Timeout"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:"Automatically log out after inactivity"})]}),f.jsx(Qh,{defaultChecked:!0})]})]})]})}),f.jsx(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:f.jsxs(Kn,{className:"glass-card border-white/5",children:[f.jsx(Ki,{children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-lg bg-orange-500/10 flex items-center justify-center",children:f.jsx(RY,{className:"w-5 h-5 text-orange-500"})}),f.jsxs("div",{children:[f.jsx(Yi,{className:"font-display",children:"Database (Firebase)"}),f.jsx(mo,{children:"Configure your Firebase connection"})]})]})}),f.jsxs(Yn,{className:"space-y-4",children:[f.jsx("div",{className:"p-4 rounded-lg bg-yellow-500/10 border border-yellow-500/20",children:f.jsx("p",{className:"text-sm text-yellow-500",children:"Firebase integration is not configured. Connect your Firebase project to enable real-time data persistence and authentication."})}),f.jsxs("div",{children:[f.jsx(ft,{children:"Firebase API Key"}),f.jsx(Nt,{placeholder:"Enter your Firebase API key",className:"mt-2 bg-card/50 border-white/10",type:"password"})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Project ID"}),f.jsx(Nt,{placeholder:"your-project-id",className:"mt-2 bg-card/50 border-white/10"})]}),f.jsx(mt,{variant:"outline",className:"border-white/10",children:"Test Connection"})]})]})}),f.jsx(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"flex gap-4",children:f.jsxs(mt,{className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground",children:[f.jsx(HM,{className:"w-4 h-4 mr-2"}),"Save All Settings"]})})]})}),abe=()=>{const[n,e]=M.useState([]),[t,r]=M.useState(""),[i,s]=M.useState(!1),[o,a]=M.useState(null),[l,c]=M.useState(!1),[u,d]=M.useState({name:"",url:"",apps:[]});M.useEffect(()=>{m()},[]);const m=async()=>{try{c(!0);const L=await q1e();e(L)}catch{hr({title:"Error",description:"Failed to load deletion pages",variant:"destructive"})}finally{c(!1)}},g=n.filter(L=>L.name.toLowerCase().includes(t.toLowerCase())||L.url.toLowerCase().includes(t.toLowerCase())),v=()=>{d({...u,apps:[...u.apps,{appName:"",deletionUrl:"",instructions:""}]})},_=L=>{d({...u,apps:u.apps.filter((C,P)=>P!==L)})},x=(L,C,P)=>{const R=[...u.apps];R[L]={...R[L],[C]:P},d({...u,apps:R})},y=async()=>{if(!u.name.trim()||!u.url.trim()){hr({title:"Validation Error",description:"Please fill in name and URL",variant:"destructive"});return}if(u.apps.length===0){hr({title:"Validation Error",description:"Please add at least one app deletion option",variant:"destructive"});return}for(const L of u.apps)if(!L.appName.trim()||!L.deletionUrl.trim()){hr({title:"Validation Error",description:"Please fill in all app fields",variant:"destructive"});return}try{c(!0),o!=null&&o.id?(await K1e(o.id,{name:u.name,url:u.url,apps:u.apps,published:!0}),hr({title:"Success",description:"Deletion page updated successfully"})):(await $1e({name:u.name,url:u.url,apps:u.apps,published:!0}),hr({title:"Success",description:"Deletion page published successfully"})),s(!1),A(),m()}
6478catch{hr({title:"Error",description:"Failed to save deletion page",variant:"destructive"})}finally{c(!1)}},S=L=>{a(L),d({name:L.name,url:L.url,apps:L.apps||[]}),s(!0)},b=async L=>{if(confirm("Are you sure you want to delete this deletion page?"))try{c(!0),await Y1e(L),hr({title:"Success",description:"Deletion page deleted successfully"}),m()}catch{hr({title:"Error",description:"Failed to delete deletion page",variant:"destructive"})}finally{c(!1)}},A=()=>{d({name:"",url:"",apps:[]}),a(null)},k=L=>{s(L),L||A()};return f.jsx(uu,{title:"Deletion Pages",description:"Manage account deletion pages",children:f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between",children:[f.jsxs("div",{className:"relative w-full sm:w-80",children:[f.jsx(Fd,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),f.jsx(Nt,{placeholder:"Search deletion pages...",value:t,onChange:L=>r(L.target.value),className:"pl-10 bg-card/50 border-white/10"})]}),f.jsxs(gv,{open:i,onOpenChange:k,children:[f.jsx(pS,{asChild:!0,children:f.jsxs(mt,{className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground",children:[f.jsx(qg,{className:"w-4 h-4 mr-2"}),"Add Deletion Page"]})}),f.jsxs(Vp,{className:"glass-card border-white/10 max-w-3xl max-h-[90vh] overflow-y-auto",children:[f.jsx(jp,{children:f.jsx(Pd,{className:"font-display",children:o?"Edit Deletion Page":"Create New Deletion Page"})}),f.jsxs("div",{className:"space-y-4 pt-4",children:[f.jsxs("div",{children:[f.jsx(ft,{children:"Page Name"}),f.jsx(Nt,{placeholder:"e.g., Account Deletion",className:"mt-2 bg-card/50 border-white/10",value:u.name,onChange:L=>d({...u,name:L.target.value})})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Page URL"}),f.jsx(Nt,{placeholder:"e.g., account-deletion",className:"mt-2 bg-card/50 border-white/10",value:u.url,onChange:L=>d({...u,url:L.target.value})}),f.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"This will be accessible at /deletion/[url]"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx(ft,{children:"App Deletion Options"}),f.jsxs(mt,{type:"button",variant:"outline",size:"sm",onClick:v,className:"border-white/10",children:[f.jsx(qg,{className:"w-4 h-4 mr-2"}),"Add App"]})]}),u.apps.length===0?f.jsx("div",{className:"text-sm text-muted-foreground text-center py-4 border border-dashed border-white/10 rounded-lg",children:'No apps added. Click "Add App" to add deletion options.'}):f.jsx("div",{className:"space-y-4",children:u.apps.map((L,C)=>f.jsx(Kn,{className:"bg-card/30 border-white/10",children:f.jsxs(Yn,{className:"p-4 space-y-3",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("span",{className:"text-sm font-medium",children:["App #",C+1]}),f.jsx(mt,{type:"button",variant:"ghost",size:"icon",onClick:()=>_(C),className:"h-6 w-6",children:f.jsx(Xy,{className:"w-4 h-4"})})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"App Name"}),f.jsx(Nt,{placeholder:"e.g., Facebook",className:"mt-1 bg-card/50 border-white/10",value:L.appName,onChange:P=>x(C,"appName",P.target.value)})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Deletion URL"}),f.jsx(Nt,{placeholder:"https://...",className:"mt-1 bg-card/50 border-white/10",value:L.deletionUrl,onChange:P=>x(C,"deletionUrl",P.target.value)})]}),f.jsxs("div",{children:[f.jsx(ft,{children:"Instructions (Optional)"}),f.jsx(Wo,{placeholder:"Additional instructions for deletion...",className:"mt-1 bg-card/50 border-white/10",value:L.instructions||"",onChange:P=>x(C,"instructions",P.target.value),rows:2})]})]})},C))})]}),f.jsxs("div",{className:"flex gap-2 pt-4",children:[f.jsx(mt,{className:"flex-1 bg-gradient-to-r from-primary to-secondary text-primary-foreground",onClick:y,disabled:l,children:l?"Publishing...":o?"Update & Publish":"Publish"}),f.jsx(mt,{variant:"outline",className:"border-white/10",onClick:()=>k(!1),disabled:l,children:"Cancel"})]})]})]})]})]}),f.jsx(Kn,{className:"glass-card border-white/5",children:f.jsx(Yn,{className:"p-0",children:l&&n.length===0?f.jsx("div",{className:"p-8 text-center text-muted-foreground",children:"Loading..."}):g.length===0?f.jsx("div",{className:"p-8 text-center text-muted-foreground",children:t?"No pages found":"No deletion pages yet. Create one to get started."}):f.jsx("div",{className:"overflow-x-auto",children:f.jsxs("table",{className:"w-full",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"border-b border-white/5",children:[f.jsx("th",{className:"text-left py-4 px-6 text-sm font-medium text-muted-foreground",children:"Name"}),f.jsx("th",{className:"text-left py-4 px-6 text-sm font-medium text-muted-foreground",children:"URL"}),f.jsx("th",{className:"text-left py-4 px-6 text-sm font-medium text-muted-foreground",children:"Apps"}),f.jsx("th",{className:"text-left py-4 px-6 text-sm font-medium text-muted-foreground",children:"Status"}),f.jsx("th",{className:"text-right py-4 px-6 text-sm font-medium text-muted-foreground",children:"Actions"})]})}),f.jsx("tbody",{children:g.map((L,C)=>{var P;return f.jsxs(Oe.tr,{initial:{opacity:0,y:10}
vendor: 5,351 bytes, line 6478
6478,animate:{opacity:1,y:0},transition:{delay:C*.05},className:"border-b border-white/5 hover:bg-white/5 transition-colors",children:[f.jsx("td",{className:"py-4 px-6",children:f.jsx("div",{className:"font-medium text-foreground",children:L.name})}),f.jsx("td",{className:"py-4 px-6",children:f.jsxs("code",{className:"text-sm text-muted-foreground",children:["/deletion/",L.url]})}),f.jsx("td",{className:"py-4 px-6",children:f.jsxs("span",{className:"px-2 py-1 text-xs rounded-full bg-primary/10 text-primary",children:[((P=L.apps)==null?void 0:P.length)||0," apps"]})}),f.jsx("td",{className:"py-4 px-6",children:f.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${L.published?"bg-green-500/10 text-green-500":"bg-yellow-500/10 text-yellow-500"}`,children:L.published?"Published":"Draft"})}),f.jsx("td",{className:"py-4 px-6",children:f.jsxs("div",{className:"flex items-center justify-end gap-2",children:[f.jsx(mt,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>window.open(`/deletion/${L.url}`,"_blank"),children:f.jsx(ud,{className:"w-4 h-4"})}),f.jsxs(LS,{children:[f.jsx(DS,{asChild:!0,children:f.jsx(mt,{variant:"ghost",size:"icon",className:"h-8 w-8",children:f.jsx(qy,{className:"w-4 h-4"})})}),f.jsxs(Rv,{align:"end",className:"glass-card border-white/10",children:[f.jsxs(Al,{onClick:()=>S(L),children:[f.jsx(yw,{className:"w-4 h-4 mr-2"}),"Edit"]}),f.jsxs(Al,{className:"text-destructive",onClick:()=>L.id&&b(L.id),children:[f.jsx(gl,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})]})})]},L.id)})})]})})})})]})})};var FS="Checkbox",[lbe,Obe]=bs(FS),[cbe,$N]=lbe(FS);function ube(n){const{__scopeCheckbox:e,checked:t,children:r,defaultChecked:i,disabled:s,form:o,name:a,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=n,[m,g]=La({prop:t,defaultProp:i??!1,onChange:l,caller:FS}),[v,_]=M.useState(null),[x,y]=M.useState(null),S=M.useRef(!1),b=v?!!o||!!v.closest("form"):!0,A={checked:m,disabled:s,setChecked:g,control:v,setControl:_,name:a,form:o,value:u,hasConsumerStoppedPropagationRef:S,required:c,defaultChecked:Lc(i)?!1:i,isFormControl:b,bubbleInput:x,setBubbleInput:y};return f.jsx(cbe,{scope:e,...A,children:dbe(d)?d(A):r})}var a$="CheckboxTrigger",l$=M.forwardRef(({__scopeCheckbox:n,onKeyDown:e,onClick:t,...r},i)=>{const{control:s,value:o,disabled:a,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:v}=$N(a$,n),_=sn(i,u),x=M.useRef(l);return M.useEffect(()=>{const y=s==null?void 0:s.form;if(y){const S=()=>d(x.current);return y.addEventListener("reset",S),()=>y.removeEventListener("reset",S)}},[s,d]),f.jsx(Et.button,{type:"button",role:"checkbox","aria-checked":Lc(l)?"mixed":l,"aria-required":c,"data-state":f$(l),"data-disabled":a?"":void 0,disabled:a,value:o,...r,ref:_,onKeyDown:Xe(e,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Xe(t,y=>{d(S=>Lc(S)?!0:!S),v&&g&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})});l$.displayName=a$;var qN=M.forwardRef((n,e)=>{const{__scopeCheckbox:t,name:r,checked:i,defaultChecked:s,required:o,disabled:a,value:l,onCheckedChange:c,form:u,...d}=n;return f.jsx(ube,{__scopeCheckbox:t,checked:i,defaultChecked:s,disabled:a,required:o,onCheckedChange:c,name:r,form:u,value:l,internal_do_not_use_render:({isFormControl:m})=>f.jsxs(f.Fragment,{children:[f.jsx(l$,{...d,ref:e,__scopeCheckbox:t}),m&&f.jsx(h$,{__scopeCheckbox:t})]})})});qN.displayName=FS;var c$="CheckboxIndicator",u$=M.forwardRef((n,e)=>{const{__scopeCheckbox:t,forceMount:r,...i}=n,s=$N(c$,t);return f.jsx(Xs,{present:r||Lc(s.checked)||s.checked===!0,children:f.jsx(Et.span,{"data-state":f$(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:e,style:{pointerEvents:"none",...n.style}})})});u$.displayName=c$;var d$="CheckboxBubbleInput",h$=M.forwardRef(({__scopeCheckbox:n,...e},t)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:o,required:a,disabled:l,name:c,value:u,form:d,bubbleInput:m,setBubbleInput:g}=$N(d$,n),v=sn(t,g),_=sS(s),x=ww(r);M.useEffect(()=>{const S=m;if(!S)return;const b=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(b,"checked").set,L=!i.current;if(_!==s&&k){const C=new Event("click",{bubbles:L});S.indeterminate=Lc(s),k.call(S,Lc(s)?!1:s),S.dispatchEvent(C)}},[m,_,s,i]);const y=M.useRef(Lc(s)?!1:s);return f.jsx(Et.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??y.current,required:a,disabled:l,name:c,value:u,form:d,...e,tabIndex:-1,ref:v,style:{...e.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});h$.displayName=d$;function dbe(n){return typeof n=="function"}function Lc(n){return n==="indeterminate"}function f$(n){return Lc(n)?"indeterminate":n?"checked":"unchecked"}const p$=M.forwardRef(({className:n,...e},t)=>f.jsx(qN,{ref:t,className:Ot("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),...e,children:f.jsx(u$,{className:Ot("flex items-center justify-center text-current"),children:f.jsx(gw,{className:"h-4 w-4"})})}));p$.displayName=qN.displayName;const hbe=()=>{var y;const{url:n}
6478=iB(),[e,t]=M.useState(null),[r,i]=M.useState(!0),[s,o]=M.useState(null),[a,l]=M.useState("");M.useState(!1);const[c,u]=M.useState(!1),[d,m]=M.useState(!1),[g,v]=M.useState({fullName:"",email:"",phone:"",username:"",reason:"",additionalInfo:"",confirmation:!1});M.useEffect(()=>{(async()=>{if(!n){o("Invalid URL"),i(!1);return}try{i(!0);const b=await X1e(n);!b||!b.published?o("Page not found or not published"):(t(b),b.apps&&b.apps.length>0&&l(b.apps[0].appName))}catch(b){console.error("Error loading deletion page:",b),o("Failed to load page")}finally{i(!1)}})()},[n]);const _=(S,b)=>{v(A=>({...A,[S]:b}))},x=async S=>{if(S.preventDefault(),!g.fullName.trim()){hr({title:"Validation Error",description:"Please enter your full name",variant:"destructive"});return}if(!g.email.trim()||!g.email.includes("@")){hr({title:"Validation Error",description:"Please enter a valid email address",variant:"destructive"});return}if(!g.reason){hr({title:"Validation Error",description:"Please select a reason for deletion",variant:"destructive"});return}if(!g.confirmation){hr({title:"Confirmation Required",description:"Please confirm that you understand the consequences",variant:"destructive"});return}try{u(!0),await J1e({pageId:(e==null?void 0:e.id)||"",pageUrl:n||"",appName:a,fullName:g.fullName,email:g.email,phone:g.phone||void 0,username:g.username||void 0,reason:g.reason,additionalInfo:g.additionalInfo||void 0,confirmation:g.confirmation}),m(!0),hr({title:"Request Submitted",description:"Your account deletion request has been received. We will process it shortly."})}catch(b){console.error("Error submitting request:",b),hr({title:"Error",description:"Failed to submit deletion request. Please try again.",variant:"destructive"})}finally{u(!1)}};return r?f.jsx(Ma,{children:f.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background via-background to-primary/5",children:f.jsxs("div",{className:"text-center",children:[f.jsx(zM,{className:"w-8 h-8 animate-spin mx-auto mb-4 text-primary"}),f.jsx("p",{className:"text-muted-foreground",children:"Loading..."})]})})}):s||!e?f.jsx(Ma,{children:f.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background via-background to-primary/5",children:f.jsxs(Kn,{className:"glass-card border-white/10 max-w-md",children:[f.jsxs(Ki,{children:[f.jsx(Yi,{children:"Page Not Found"}),f.jsx(mo,{children:s||"The deletion page you are looking for does not exist."})]}),f.jsx(Yn,{children:f.jsx(wr,{to:"/",children:f.jsxs(mt,{className:"w-full",children:[f.jsx(l_,{className:"w-4 h-4 mr-2"}),"Go to Home"]})})})]})})}):((y=e.apps)==null||y.find(S=>S.appName===a),f.jsx(Ma,{children:f.jsx("div",{className:"min-h-screen py-12 px-4 sm:px-6 lg:px-8 bg-gradient-to-br from-background via-background to-primary/5",children:f.jsxs("div",{className:"max-w-3xl mx-auto",children:[f.jsxs(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center mb-12",children:[f.jsx(Oe.div,{initial:{scale:.9},animate:{scale:1},className:"inline-flex items-center justify-center w-20 h-20 rounded-full bg-gradient-to-br from-red-500/20 to-orange-500/20 mb-6",children:f.jsx(gl,{className:"w-10 h-10 text-red-500"})}),f.jsx("h1",{className:"text-5xl font-display font-bold mb-4 bg-gradient-to-r from-foreground to-foreground/70 bg-clip-text text-transparent",children:e.name}),f.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"We're sorry to see you go. Please fill out the form below to request account deletion."})]}),f.jsx($R,{mode:"wait",children:d?f.jsx(Oe.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},children:f.jsx(Kn,{className:"glass-card border-green-500/20 bg-green-500/5",children:f.jsxs(Yn,{className:"p-12 text-center",children:[f.jsx(Oe.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2,type:"spring"},className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-green-500/20 mb-6",children:f.jsx(X2,{className:"w-10 h-10 text-green-500"})}),f.jsx("h2",{className:"text-2xl font-bold mb-3",children:"Request Submitted Successfully!"}),f.jsxs("p",{className:"text-muted-foreground mb-6",children:["Your account deleti
6478on request has been received. Our team will review and process it within 7-30 Days. You will receive a confirmation email at ",f.jsx("strong",{children:g.email}),"."]}),f.jsx("div",{className:"flex gap-4 justify-center",children:f.jsx(wr,{to:"/",children:f.jsxs(mt,{className:"bg-gradient-to-r from-primary to-secondary text-primary-foreground",children:[f.jsx(l_,{className:"w-4 h-4 mr-2"}),"Back to Home"]})})})]})})},"success"):f.jsx(Oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},children:f.jsxs(Kn,{className:"glass-card border-white/10 shadow-2xl",children:[f.jsx(Ki,{className:"border-b border-white/5 pb-6",children:f.jsxs("div",{className:"flex items-start gap-4",children:[f.jsx("div",{className:"p-3 rounded-xl bg-primary/10",children:f.jsx(ZV,{className:"w-6 h-6 text-primary"})}),f.jsxs("div",{className:"flex-1",children:[f.jsx(Yi,{className:"text-2xl mb-2",children:"Account Deletion Request"}),f.jsx(mo,{children:"Please provide the following information to process your account deletion request."})]})]})}),f.jsx(Yn,{className:"p-6",children:f.jsxs("form",{onSubmit:x,className:"space-y-6",children:[e.apps&&e.apps.length>1&&f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{className:"text-base font-semibold",children:"Select Service"}),f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:e.apps.map(S=>f.jsx("button",{type:"button",onClick:()=>l(S.appName),className:`p-4 rounded-lg border-2 transition-all text-left ${a===S.appName?"border-primary bg-primary/10":"border-white/10 hover:border-white/20"}`,children:f.jsx("div",{className:"font-medium",children:S.appName})},S.appName))})]}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("h3",{className:"text-lg font-semibold flex items-center gap-2",children:[f.jsx(nj,{className:"w-5 h-5 text-primary"}),"Personal Information"]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"fullName",children:"Full Name *"}),f.jsx(Nt,{id:"fullName",placeholder:"John Doe",value:g.fullName,onChange:S=>_("fullName",S.target.value),className:"bg-card/50 border-white/10",required:!0})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"email",children:"Email Address *"}),f.jsx(Nt,{id:"email",type:"email",placeholder:"[email protected]",value:g.email,onChange:S=>_("email",S.target.value),className:"bg-card/50 border-white/10",required:!0})]})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"phone",children:"Phone Number"}),f.jsx(Nt,{id:"phone",type:"tel",placeholder:"+1 (555) 123-4567",value:g.phone,onChange:S=>_("phone",S.target.value),className:"bg-card/50 border-white/10"})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(ft,{htmlFor:"username",children:"Username / Account ID"}),f.jsx(Nt,{id:"username",placeholder:"Your account username",value:g.username,onChange:S=>_("username",S.target.value),className:"bg-card/50 border-white/10"})]})]})]}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("h3",{className:"text-lg font-semibold flex items-center gap-2",children:[f.jsx(o1,{className:"w-5 h-5 text-primary"}),"Why are you deleting your account? *"]}),f.jsxs(qP,{value:g.reason,onValueChange:S=>_("reason",S),className:"space-y-3",children:[f.jsxs("div",{className:"flex items-center space-x-2 p-4 rounded-lg border border-white/10 hover:bg-white/5 transition-colors",children:[f.jsx(tc,{value:"no-longer-needed",id:"reason-1"}),f.jsx(ft,{htmlFor:"reason-1",className:"flex-1 cursor-pointer",children:"No longer need the service"})]}),f.jsxs("div",{className:"flex items-center space-x-2 p-4 rounded-lg border border-white/10 hover:bg-white/5 transition-colors",children:[f.jsx(tc,{value:"privacy-concerns",id:"reason-2"}),f.jsx(ft,{htmlFor:"reason-2",className:"flex-1 cursor-pointer",children:"Privacy concerns"})]}),f.jsxs("div",{className:"flex items-center space-x-2 p-4 rounded-lg border border-white/10 hover:bg-white/5 transition-colors",children:[f.jsx(tc,{value:"found-alternative",id:"reason-3"}),f.jsx(ft,{htmlFor:"reason-3",className:"flex-1 cursor-pointer",children:"Found an alternative service"})]}),f.jsxs("div",{className:"flex items-center space-x-2 p-4 rounded-lg border border-white/10 hover:bg-white/5 transition-colors",children:[f.jsx(tc,{value:"too-expensive",id:"reason-4"}),f.jsx(ft,{htmlFor:"reason-4",className:"flex-1 cursor-pointer",children:"Too expensive"})]}),f.jsxs("div",{className:"flex items-center space-x-2 p-4 rounded-lg border border-white/10 hover:bg-white/5 transition-colors",children:[f.jsx(tc,{value:"poor-experience",id:"reason-5"}),f.jsx(ft,{htmlFor:"reason-5",className:"flex-1 cursor-pointer",children:"Poor user experience"})]}),f.jsxs("div",{className:"flex items-center space-x-2 p-4 rounded-lg border border-white/10 hover:bg-white/5 transition-colors",children:[f.jsx(tc,{value:"other",id:"reason-6"}),f.jsx(ft,{htmlFor:"reason-6",className:"flex-1 cursor-pointer",children:"Other reason"})]})]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsxs(ft,{htmlFor:"additionalInfo",className:"flex items-center gap-2",children:[f.jsx(Y2,{className:"w-4 h-4 text-primary"}),"Additional Information (Optional)"]}),f.jsx(Wo,{id:"additionalInfo",placeholder:"Please share any additional details that might help us improve our service...",value:g.additionalInfo,onChange:S=>_("additionalInfo",S.target.value),className:"bg-card/50 border-white/10 min-h-[100px]",rows:4})]}),f.jsx("div",{className:"p-4 rounded-lg border border-orange-500/20 bg-orange-500/5",children:f.jsxs("div",{className:"flex items-start space-x-3",children:[f.jsx(p$,{id:"confirmation",checked:g.confirmation,onCheckedChange:S=>_("confirmation",S),className:"mt-1"}),f.jsx(ft,{htmlFor:"confirmation",className:"flex-1 cursor-pointer",children:f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(MY,{className:"w-5 h-5 text-orange-500 mt-0.5 flex-shrink-0"}),f.jsxs("div",{children:[f.jsx("span",{className:"font-semibold",children:"I understand the consequences *"}),f.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"I acknowledge that deleting my account will permanently remove all my data, including saved content, preferences, and account history. This action cannot be undone."})]})]})})]})}),f.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 pt-4",children:[f.jsx(mt,{type:"submit",disabled:c,
6478className:"flex-1 bg-gradient-to-r from-red-500 to-orange-500 hover:from-red-600 hover:to-orange-600 text-white h-12 text-lg font-semibold",children:c?f.jsxs(f.Fragment,{children:[f.jsx(zM,{className:"w-5 h-5 mr-2 animate-spin"}),"Submitting Request..."]}):f.jsxs(f.Fragment,{children:[f.jsx(gl,{className:"w-5 h-5 mr-2"}),"Submit Deletion Request"]})}),f.jsx(wr,{to:"/",className:"sm:w-auto w-full",children:f.jsxs(mt,{type:"button",variant:"outline",className:"w-full sm:w-auto border-white/10 h-12",children:[f.jsx(l_,{className:"w-4 h-4 mr-2"}),"Cancel"]})})]})]})})]})},"form")})]})})}))},fbe=()=>{const n=eu();return M.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",n.pathname)},[n.pathname]),f.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:f.jsxs("div",{className:"text-center",children:[f.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),f.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),f.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},pbe=new yee,mbe=()=>f.jsx(xee,{client:pbe,children:f.jsxs(qZ,{children:[f.jsx(kQ,{}),f.jsx(cJ,{}),f.jsx(gte,{children:f.jsxs(cte,{children:[f.jsx(ni,{path:"/",element:f.jsx(rwe,{})}),f.jsx(ni,{path:"/products",element:f.jsx(owe,{})}),f.jsx(ni,{path:"/products/:id",element:f.jsx(lwe,{})}),f.jsx(ni,{path:"/tools",element:f.jsx(uwe,{})}),f.jsx(ni,{path:"/about",element:f.jsx(mwe,{})}),f.jsx(ni,{path:"/success-stories",element:f.jsx(ywe,{})}),f.jsx(ni,{path:"/recforge-admin",element:f.jsx(bwe,{})}),f.jsx(ni,{path:"/admin/products",element:f.jsx(jSe,{})}),f.jsx(ni,{path:"/admin/projects",element:f.jsx(zSe,{})}),f.jsx(ni,{path:"/admin/content",element:f.jsx(qSe,{})}),f.jsx(ni,{path:"/admin/team",element:f.jsx(KSe,{})}),f.jsx(ni,{path:"/admin/media",element:f.jsx(QSe,{})}),f.jsx(ni,{path:"/admin/settings",element:f.jsx(obe,{})}),f.jsx(ni,{path:"/admin/deletion-pages",element:f.jsx(abe,{})}),f.jsx(ni,{path:"/:url",element:f.jsx(hbe,{})}),f.jsx(ni,{path:"*",element:f.jsx(fbe,{})})]})})]})});gV(document.getElementById("root")).render(f.jsx(xK,{attribute:"class",defaultTheme:"dark",enableSystem:!0,children:f.jsx(mbe,{})}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.