@vuemap/vue-amap-extra
Version:
@vuemap/vue-amap扩展库,包含threejs相关图层
7 lines • 712 kB
JavaScript
/*! @vuemap/vue-amap-extra v2.1.5 */(function(Ge,fe){typeof exports=="object"&&typeof module!="undefined"?fe(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],fe):(Ge=typeof globalThis!="undefined"?globalThis:Ge||self,fe(Ge.VueAMap={},Ge.Vue))})(this,function(Ge,fe){"use strict";const hp=(s=[])=>{const e=[];return{install:t=>{e.includes(t)||(e.push(t),s.forEach(n=>t.use(n)))}}};function up(s){if(!s||s.length<4)return s;const e=s.substring(3,s.length);return s[2].toLowerCase()+e}const dp=/^on[A-Z]+/;function fp(s){return s&&s.charAt(0).toUpperCase()+s.slice(1)}function pp(s,e,t){!s||!s.on||s.on(e,t)}function mp(s,e,t){!s||!s.off||s.off(e,t)}const gp={visible:{type:Boolean,default:!0},zIndex:{type:Number},reEventWhenUpdate:{type:Boolean,default:!1},extraOptions:{type:Object}},Qt=s=>Object.assign({},gp,s),Ql="parentInstance",en=(s,e)=>{let t=fe.getCurrentInstance(),{props:n,attrs:i}=t,r=fe.inject(Ql,void 0);const o=e.emits;let a=!1,l;fe.onMounted(()=>{r?r.$amapComponent?c():r.addChildComponent(c):e.isRoot&&c()}),fe.onBeforeUnmount(()=>{l&&(L(),b(),e.destroyComponent?e.destroyComponent():A(),e.provideData&&(e.provideData.isDestroy=!0),r=void 0,n=void 0,i=void 0,t=void 0,l=void 0)}),fe.onBeforeUpdate(()=>{n.reEventWhenUpdate&&a&&l&&L()}),fe.onUpdated(()=>{n.reEventWhenUpdate&&a&&l&&S()});const c=()=>{const R=d();s(R,r==null?void 0:r.$amapComponent).then(X=>{l=X,S(),h(),x(),Object.assign(t.ctx,t.exposed),o("init",l,t.ctx),fe.nextTick(()=>{v()}).then(),a=!0})},h=()=>{["editable","visible","zooms"].forEach(R=>{if(n[R]!==void 0){const X=y(R);X&&X.call(l,m(g(R,n[R])))}})},u=e.propsRedirect||{},d=()=>{const R={};return n.extraOptions&&Object.assign(R,n.extraOptions),Object.keys(n).forEach(X=>{let J=X;const D=g(J,n[J]);D!==void 0&&(u&&u[X]&&(J=u[J]),R[J]=D)}),R},p=e.converts||{},g=(R,X)=>p&&p[R]?p[R].call(void 0,X):X,m=R=>fe.isProxy(R)?fe.toRaw(R):fe.unref(R);let f=[],_=Object.assign({__visible:R=>{l&&l.show&&l.hide&&(R?l.show():l.hide())},__zIndex(R){l&&l.setzIndex&&l.setzIndex(R)}},e.watchRedirectFn||{});const x=()=>{Object.keys(n).forEach(R=>{let X=R;u&&u[R]&&(X=u[R]);const J=y(X);if(!J)return;const D={deep:!1},U=Object.prototype.toString.call(n[R]);(U==="[object Object]"||U==="[object Array]")&&(D.deep=!0);const B=fe.watch(()=>n[R],W=>{J.call(l,m(g(R,W)))},D);f.push(B)})},b=()=>{f.forEach(R=>R()),f=[],_=void 0},y=R=>_[`__${R}`]?_[`__${R}`]:l?l[`set${fp(R)}`]:null,w={},S=()=>{Object.keys(i).forEach(R=>{if(dp.test(R)){const X=up(R);pp(l,X,i[R]),w[X]=i[R]}})},L=()=>{Object.keys(w).forEach(R=>{mp(l,R,w[R]),delete w[R]})},v=()=>{const R=e.needInitComponents||[];for(;R.length>0;)R[0](),R.splice(0,1)},A=()=>{l&&(l.setMap&&l.setMap(null),l.close&&l.close(),l.editor&&l.editor.close())};function P(){return l}return{$$getInstance:P,parentInstance:r,isMounted:a}};var ec=typeof global=="object"&&global&&global.Object===Object&&global,_p=typeof self=="object"&&self&&self.Object===Object&&self,Ht=ec||_p||Function("return this")(),wr=Ht.Symbol,tc=Object.prototype,vp=tc.hasOwnProperty,xp=tc.toString,bs=wr?wr.toStringTag:void 0;function yp(s){var e=vp.call(s,bs),t=s[bs];try{s[bs]=void 0;var n=!0}catch(r){}var i=xp.call(s);return n&&(e?s[bs]=t:delete s[bs]),i}var bp=Object.prototype,Mp=bp.toString;function wp(s){return Mp.call(s)}var Sp="[object Null]",Tp="[object Undefined]",nc=wr?wr.toStringTag:void 0;function Ms(s){return s==null?s===void 0?Tp:Sp:nc&&nc in Object(s)?yp(s):wp(s)}function Xn(s){return s!=null&&typeof s=="object"}var Ap="[object Symbol]";function Ep(s){return typeof s=="symbol"||Xn(s)&&Ms(s)==Ap}var Sr=Array.isArray,Cp=/\s/;function Lp(s){for(var e=s.length;e--&&Cp.test(s.charAt(e)););return e}var Rp=/^\s+/;function Pp(s){return s&&s.slice(0,Lp(s)+1).replace(Rp,"")}function tn(s){var e=typeof s;return s!=null&&(e=="object"||e=="function")}var ic=NaN,Ip=/^[-+]0x[0-9a-f]+$/i,Dp=/^0b[01]+$/i,Fp=/^0o[0-7]+$/i,Np=parseInt;function Op(s){if(typeof s=="number")return s;if(Ep(s))return ic;if(tn(s)){var e=typeof s.valueOf=="function"?s.valueOf():s;s=tn(e)?e+"":e}if(typeof s!="string")return s===0?s:+s;s=Pp(s);var t=Dp.test(s);return t||Fp.test(s)?Np(s.slice(2),t?2:8):Ip.test(s)?ic:+s}var sc=1/0,Bp=17976931348623157e292;function Up(s){if(!s)return s===0?s:0;if(s=Op(s),s===sc||s===-sc){var e=s<0?-1:1;return e*Bp}return s===s?s:0}function rc(s){var e=Up(s),t=e%1;return e===e?t?e-t:e:0}function Bo(s){return s}var kp="[object AsyncFunction]",zp="[object Function]",Gp="[object GeneratorFunction]",Vp="[object Proxy]";function Uo(s){if(!tn(s))return!1;var e=Ms(s);return e==zp||e==Gp||e==kp||e==Vp}var ko=Ht["__core-js_shared__"],oc=function(){var s=/[^.]+$/.exec(ko&&ko.keys&&ko.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}();function Hp(s){return!!oc&&oc in s}var Wp=Function.prototype,jp=Wp.toString;function $p(s){if(s!=null){try{return jp.call(s)}catch(e){}try{return s+""}catch(e){}}return""}var qp=/[\\^$.*+?()[\]{}|]/g,Xp=/^\[object .+?Constructor\]$/,Yp=Function.prototype,Kp=Object.prototype,Jp=Yp.toString,Zp=Kp.hasOwnProperty,Qp=RegExp("^"+Jp.call(Zp).replace(qp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function em(s){if(!tn(s)||Hp(s))return!1;var e=Uo(s)?Qp:Xp;return e.test($p(s))}function tm(s,e){return s==null?void 0:s[e]}function Tr(s,e){var t=tm(s,e);return em(t)?t:void 0}var ac=Tr(Ht,"WeakMap"),Ar=ac&&new ac,lc=Ar?function(s,e){return Ar.set(s,e),s}:Bo,cc=Object.create,Er=function(){function s(){}return function(e){if(!tn(e))return{};if(cc)return cc(e);s.prototype=e;var t=new s;return s.prototype=void 0,t}}();function ws(s){return function(){var e=arguments;switch(e.length){case 0:return new s;case 1:return new s(e[0]);case 2:return new s(e[0],e[1]);case 3:return new s(e[0],e[1],e[2]);case 4:return new s(e[0],e[1],e[2],e[3]);case 5:return new s(e[0],e[1],e[2],e[3],e[4]);case 6:return new s(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new s(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var t=Er(s.prototype),n=s.apply(t,e);return tn(n)?n:t}}var nm=1;function im(s,e,t){var n=e&nm,i=ws(s);function r(){var o=this&&this!==Ht&&this instanceof r?i:s;return o.apply(n?t:this,arguments)}return r}function zo(s,e,t){switch(t.length){case 0:return s.call(e);case 1:return s.call(e,t[0]);case 2:return s.call(e,t[0],t[1]);case 3:return s.call(e,t[0],t[1],t[2])}return s.apply(e,t)}var sm=Math.max;function hc(s,e,t,n){for(var i=-1,r=s.length,o=t.length,a=-1,l=e.length,c=sm(r-o,0),h=Array(l+c),u=!n;++a<l;)h[a]=e[a];for(;++i<o;)(u||i<r)&&(h[t[i]]=s[i]);for(;c--;)h[a++]=s[i++];return h}var rm=Math.max;function uc(s,e,t,n){for(var i=-1,r=s.length,o=-1,a=t.length,l=-1,c=e.length,h=rm(r-a,0),u=Array(h+c),d=!n;++i<h;)u[i]=s[i];for(var p=i;++l<c;)u[p+l]=e[l];for(;++o<a;)(d||i<r)&&(u[p+t[o]]=s[i++]);return u}function om(s,e){for(var t=s.length,n=0;t--;)s[t]===e&&++n;return n}function Go(){}var am=4294967295;function bi(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=am,this.__views__=[]}bi.prototype=Er(Go.prototype),bi.prototype.constructor=bi;function lm(){}var dc=Ar?function(s){return Ar.get(s)}:lm,fc={},cm=Object.prototype,hm=cm.hasOwnProperty;function um(s){for(var e=s.name+"",t=fc[e],n=hm.call(fc,e)?t.length:0;n--;){var i=t[n],r=i.func;if(r==null||r==s)return i.name}return e}function Mi(s,e){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}Mi.prototype=Er(Go.prototype),Mi.prototype.constructor=Mi;function Vo(s,e){var t=-1,n=s.length;for(e||(e=Array(n));++t<n;)e[t]=s[t];return e}function dm(s){if(s instanceof bi)return s.clone();var e=new Mi(s.__wrapped__,s.__chain__);return e.__actions__=Vo(s.__actions__),e.__index__=s.__index__,e.__values__=s.__values__,e}var fm=Object.prototype,pm=fm.hasOwnProperty;function Cr(s){if(Xn(s)&&!Sr(s)&&!(s instanceof bi)){if(s instanceof Mi)return s;if(pm.call(s,"__wrapped__"))return dm(s)}return new Mi(s)}Cr.prototype=Go.prototype,Cr.prototype.constructor=Cr;function mm(s){var e=um(s),t=Cr[e];if(typeof t!="function"||!(e in bi.prototype))return!1;if(s===t)return!0;var n=dc(t);return!!n&&s===n[0]}var gm=800,_m=16,vm=Date.now;function pc(s){var e=0,t=0;return function(){var n=vm(),i=_m-(n-t);if(t=n,i>0){if(++e>=gm)return arguments[0]}else e=0;return s.apply(void 0,arguments)}}var mc=pc(lc),xm=/\{\n\/\* \[wrapped with (.+)\] \*/,ym=/,? & /;function bm(s){var e=s.match(xm);return e?e[1].split(ym):[]}var Mm=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function wm(s,e){var t=e.length;if(!t)return s;var n=t-1;return e[n]=(t>1?"& ":"")+e[n],e=e.join(t>2?", ":" "),s.replace(Mm,`{
/* [wrapped with `+e+`] */
`)}function Sm(s){return function(){return s}}var Lr=function(){try{var s=Tr(Object,"defineProperty");return s({},"",{}),s}catch(e){}}(),Tm=Lr?function(s,e){return Lr(s,"toString",{configurable:!0,enumerable:!1,value:Sm(e),writable:!0})}:Bo,gc=pc(Tm);function Am(s,e){for(var t=-1,n=s==null?0:s.length;++t<n&&e(s[t],t,s)!==!1;);return s}function Em(s,e,t,n){for(var i=s.length,r=t+(n?1:-1);n?r--:++r<i;)if(e(s[r],r,s))return r;return-1}function Cm(s){return s!==s}function Lm(s,e,t){for(var n=t-1,i=s.length;++n<i;)if(s[n]===e)return n;return-1}function Rm(s,e,t){return e===e?Lm(s,e,t):Em(s,Cm,t)}function Pm(s,e){var t=s==null?0:s.length;return!!t&&Rm(s,e,0)>-1}var Im=1,Dm=2,Fm=8,Nm=16,Om=32,Bm=64,Um=128,km=256,zm=512,Gm=[["ary",Um],["bind",Im],["bindKey",Dm],["curry",Fm],["curryRight",Nm],["flip",zm],["partial",Om],["partialRight",Bm],["rearg",km]];function Vm(s,e){return Am(Gm,function(t){var n="_."+t[0];e&t[1]&&!Pm(s,n)&&s.push(n)}),s.sort()}function _c(s,e,t){var n=e+"";return gc(s,wm(n,Vm(bm(n),t)))}var Hm=1,Wm=2,jm=4,$m=8,vc=32,xc=64;function yc(s,e,t,n,i,r,o,a,l,c){var h=e&$m,u=h?o:void 0,d=h?void 0:o,p=h?r:void 0,g=h?void 0:r;e|=h?vc:xc,e&=~(h?xc:vc),e&jm||(e&=~(Hm|Wm));var m=[s,e,i,p,u,g,d,a,l,c],f=t.apply(void 0,m);return mm(s)&&mc(f,m),f.placeholder=n,_c(f,s,e)}function Ho(s){var e=s;return e.placeholder}var qm=9007199254740991,Xm=/^(?:0|[1-9]\d*)$/;function Wo(s,e){var t=typeof s;return e=e==null?qm:e,!!e&&(t=="number"||t!="symbol"&&Xm.test(s))&&s>-1&&s%1==0&&s<e}var Ym=Math.min;function Km(s,e){for(var t=s.length,n=Ym(e.length,t),i=Vo(s);n--;){var r=e[n];s[n]=Wo(r,t)?i[r]:void 0}return s}var bc="__lodash_placeholder__";function Ss(s,e){for(var t=-1,n=s.length,i=0,r=[];++t<n;){var o=s[t];(o===e||o===bc)&&(s[t]=bc,r[i++]=t)}return r}var Jm=1,Zm=2,Qm=8,eg=16,tg=128,ng=512;function jo(s,e,t,n,i,r,o,a,l,c){var h=e&tg,u=e&Jm,d=e&Zm,p=e&(Qm|eg),g=e&ng,m=d?void 0:ws(s);function f(){for(var _=arguments.length,x=Array(_),b=_;b--;)x[b]=arguments[b];if(p)var y=Ho(f),w=om(x,y);if(n&&(x=hc(x,n,i,p)),r&&(x=uc(x,r,o,p)),_-=w,p&&_<c){var S=Ss(x,y);return yc(s,e,jo,f.placeholder,t,x,S,a,l,c-_)}var L=u?t:this,v=d?L[s]:s;return _=x.length,a?x=Km(x,a):g&&_>1&&x.reverse(),h&&l<_&&(x.length=l),this&&this!==Ht&&this instanceof f&&(v=m||ws(v)),v.apply(L,x)}return f}function ig(s,e,t){var n=ws(s);function i(){for(var r=arguments.length,o=Array(r),a=r,l=Ho(i);a--;)o[a]=arguments[a];var c=r<3&&o[0]!==l&&o[r-1]!==l?[]:Ss(o,l);if(r-=c.length,r<t)return yc(s,e,jo,i.placeholder,void 0,o,c,void 0,void 0,t-r);var h=this&&this!==Ht&&this instanceof i?n:s;return zo(h,this,o)}return i}var sg=1;function rg(s,e,t,n){var i=e&sg,r=ws(s);function o(){for(var a=-1,l=arguments.length,c=-1,h=n.length,u=Array(h+l),d=this&&this!==Ht&&this instanceof o?r:s;++c<h;)u[c]=n[c];for(;l--;)u[c++]=arguments[++a];return zo(d,i?t:this,u)}return o}var Mc="__lodash_placeholder__",$o=1,og=2,ag=4,wc=8,Ts=128,Sc=256,lg=Math.min;function cg(s,e){var t=s[1],n=e[1],i=t|n,r=i<($o|og|Ts),o=n==Ts&&t==wc||n==Ts&&t==Sc&&s[7].length<=e[8]||n==(Ts|Sc)&&e[7].length<=e[8]&&t==wc;if(!(r||o))return s;n&$o&&(s[2]=e[2],i|=t&$o?0:ag);var a=e[3];if(a){var l=s[3];s[3]=l?hc(l,a,e[4]):a,s[4]=l?Ss(s[3],Mc):e[4]}return a=e[5],a&&(l=s[5],s[5]=l?uc(l,a,e[6]):a,s[6]=l?Ss(s[5],Mc):e[6]),a=e[7],a&&(s[7]=a),n&Ts&&(s[8]=s[8]==null?e[8]:lg(s[8],e[8])),s[9]==null&&(s[9]=e[9]),s[0]=e[0],s[1]=i,s}var hg="Expected a function",Tc=1,ug=2,qo=8,Xo=16,Yo=32,Ac=64,Ec=Math.max;function dg(s,e,t,n,i,r,o,a){var l=e&ug;if(!l&&typeof s!="function")throw new TypeError(hg);var c=n?n.length:0;if(c||(e&=~(Yo|Ac),n=i=void 0),o=o===void 0?o:Ec(rc(o),0),a=a===void 0?a:rc(a),c-=i?i.length:0,e&Ac){var h=n,u=i;n=i=void 0}var d=l?void 0:dc(s),p=[s,e,t,n,i,h,u,r,o,a];if(d&&cg(p,d),s=p[0],e=p[1],t=p[2],n=p[3],i=p[4],a=p[9]=p[9]===void 0?l?0:s.length:Ec(p[9]-c,0),!a&&e&(qo|Xo)&&(e&=~(qo|Xo)),!e||e==Tc)var g=im(s,e,t);else e==qo||e==Xo?g=ig(s,e,a):(e==Yo||e==(Tc|Yo))&&!i.length?g=rg(s,e,t,n):g=jo.apply(void 0,p);var m=d?lc:mc;return _c(m(g,p),s,e)}function Ko(s,e,t){e=="__proto__"&&Lr?Lr(s,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):s[e]=t}function Rr(s,e){return s===e||s!==s&&e!==e}var fg=Object.prototype,pg=fg.hasOwnProperty;function mg(s,e,t){var n=s[e];(!(pg.call(s,e)&&Rr(n,t))||t===void 0&&!(e in s))&&Ko(s,e,t)}function gg(s,e,t,n){var i=!t;t||(t={});for(var r=-1,o=e.length;++r<o;){var a=e[r],l=n?n(t[a],s[a],a,t,s):void 0;l===void 0&&(l=s[a]),i?Ko(t,a,l):mg(t,a,l)}return t}var Cc=Math.max;function _g(s,e,t){return e=Cc(e===void 0?s.length-1:e,0),function(){for(var n=arguments,i=-1,r=Cc(n.length-e,0),o=Array(r);++i<r;)o[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=t(o),zo(s,this,a)}}function Lc(s,e){return gc(_g(s,e,Bo),s+"")}var vg=9007199254740991;function Rc(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=vg}function Jo(s){return s!=null&&Rc(s.length)&&!Uo(s)}function xg(s,e,t){if(!tn(t))return!1;var n=typeof e;return(n=="number"?Jo(t)&&Wo(e,t.length):n=="string"&&e in t)?Rr(t[e],s):!1}function yg(s){return Lc(function(e,t){var n=-1,i=t.length,r=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(r=s.length>3&&typeof r=="function"?(i--,r):void 0,o&&xg(t[0],t[1],o)&&(r=i<3?void 0:r,i=1),e=Object(e);++n<i;){var a=t[n];a&&s(e,a,n,r)}return e})}var bg=Object.prototype;function Pc(s){var e=s&&s.constructor,t=typeof e=="function"&&e.prototype||bg;return s===t}function Mg(s,e){for(var t=-1,n=Array(s);++t<s;)n[t]=e(t);return n}var wg="[object Arguments]";function Ic(s){return Xn(s)&&Ms(s)==wg}var Dc=Object.prototype,Sg=Dc.hasOwnProperty,Tg=Dc.propertyIsEnumerable,Zo=Ic(function(){return arguments}())?Ic:function(s){return Xn(s)&&Sg.call(s,"callee")&&!Tg.call(s,"callee")};function Ag(){return!1}var Fc=typeof Ge=="object"&&Ge&&!Ge.nodeType&&Ge,Nc=Fc&&typeof module=="object"&&module&&!module.nodeType&&module,Eg=Nc&&Nc.exports===Fc,Oc=Eg?Ht.Buffer:void 0,Cg=Oc?Oc.isBuffer:void 0,Bc=Cg||Ag,Lg="[object Arguments]",Rg="[object Array]",Pg="[object Boolean]",Ig="[object Date]",Dg="[object Error]",Fg="[object Function]",Ng="[object Map]",Og="[object Number]",Bg="[object Object]",Ug="[object RegExp]",kg="[object Set]",zg="[object String]",Gg="[object WeakMap]",Vg="[object ArrayBuffer]",Hg="[object DataView]",Wg="[object Float32Array]",jg="[object Float64Array]",$g="[object Int8Array]",qg="[object Int16Array]",Xg="[object Int32Array]",Yg="[object Uint8Array]",Kg="[object Uint8ClampedArray]",Jg="[object Uint16Array]",Zg="[object Uint32Array]",Ke={};Ke[Wg]=Ke[jg]=Ke[$g]=Ke[qg]=Ke[Xg]=Ke[Yg]=Ke[Kg]=Ke[Jg]=Ke[Zg]=!0,Ke[Lg]=Ke[Rg]=Ke[Vg]=Ke[Pg]=Ke[Hg]=Ke[Ig]=Ke[Dg]=Ke[Fg]=Ke[Ng]=Ke[Og]=Ke[Bg]=Ke[Ug]=Ke[kg]=Ke[zg]=Ke[Gg]=!1;function Qg(s){return Xn(s)&&Rc(s.length)&&!!Ke[Ms(s)]}function e_(s){return function(e){return s(e)}}var Uc=typeof Ge=="object"&&Ge&&!Ge.nodeType&&Ge,As=Uc&&typeof module=="object"&&module&&!module.nodeType&&module,t_=As&&As.exports===Uc,Qo=t_&&ec.process,kc=function(){try{var s=As&&As.require&&As.require("util").types;return s||Qo&&Qo.binding&&Qo.binding("util")}catch(e){}}(),zc=kc&&kc.isTypedArray,Gc=zc?e_(zc):Qg,n_=Object.prototype,i_=n_.hasOwnProperty;function s_(s,e){var t=Sr(s),n=!t&&Zo(s),i=!t&&!n&&Bc(s),r=!t&&!n&&!i&&Gc(s),o=t||n||i||r,a=o?Mg(s.length,String):[],l=a.length;for(var c in s)(e||i_.call(s,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||r&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Wo(c,l)))&&a.push(c);return a}function r_(s,e){return function(t){return s(e(t))}}function o_(s){var e=[];if(s!=null)for(var t in Object(s))e.push(t);return e}var a_=Object.prototype,l_=a_.hasOwnProperty;function c_(s){if(!tn(s))return o_(s);var e=Pc(s),t=[];for(var n in s)n=="constructor"&&(e||!l_.call(s,n))||t.push(n);return t}function Vc(s){return Jo(s)?s_(s,!0):c_(s)}var Es=Tr(Object,"create");function h_(){this.__data__=Es?Es(null):{},this.size=0}function u_(s){var e=this.has(s)&&delete this.__data__[s];return this.size-=e?1:0,e}var d_="__lodash_hash_undefined__",f_=Object.prototype,p_=f_.hasOwnProperty;function m_(s){var e=this.__data__;if(Es){var t=e[s];return t===d_?void 0:t}return p_.call(e,s)?e[s]:void 0}var g_=Object.prototype,__=g_.hasOwnProperty;function v_(s){var e=this.__data__;return Es?e[s]!==void 0:__.call(e,s)}var x_="__lodash_hash_undefined__";function y_(s,e){var t=this.__data__;return this.size+=this.has(s)?0:1,t[s]=Es&&e===void 0?x_:e,this}function Yn(s){var e=-1,t=s==null?0:s.length;for(this.clear();++e<t;){var n=s[e];this.set(n[0],n[1])}}Yn.prototype.clear=h_,Yn.prototype.delete=u_,Yn.prototype.get=m_,Yn.prototype.has=v_,Yn.prototype.set=y_;function b_(){this.__data__=[],this.size=0}function Pr(s,e){for(var t=s.length;t--;)if(Rr(s[t][0],e))return t;return-1}var M_=Array.prototype,w_=M_.splice;function S_(s){var e=this.__data__,t=Pr(e,s);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():w_.call(e,t,1),--this.size,!0}function T_(s){var e=this.__data__,t=Pr(e,s);return t<0?void 0:e[t][1]}function A_(s){return Pr(this.__data__,s)>-1}function E_(s,e){var t=this.__data__,n=Pr(t,s);return n<0?(++this.size,t.push([s,e])):t[n][1]=e,this}function un(s){var e=-1,t=s==null?0:s.length;for(this.clear();++e<t;){var n=s[e];this.set(n[0],n[1])}}un.prototype.clear=b_,un.prototype.delete=S_,un.prototype.get=T_,un.prototype.has=A_,un.prototype.set=E_;var Hc=Tr(Ht,"Map");function C_(){this.size=0,this.__data__={hash:new Yn,map:new(Hc||un),string:new Yn}}function L_(s){var e=typeof s;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?s!=="__proto__":s===null}function Ir(s,e){var t=s.__data__;return L_(e)?t[typeof e=="string"?"string":"hash"]:t.map}function R_(s){var e=Ir(this,s).delete(s);return this.size-=e?1:0,e}function P_(s){return Ir(this,s).get(s)}function I_(s){return Ir(this,s).has(s)}function D_(s,e){var t=Ir(this,s),n=t.size;return t.set(s,e),this.size+=t.size==n?0:1,this}function wi(s){var e=-1,t=s==null?0:s.length;for(this.clear();++e<t;){var n=s[e];this.set(n[0],n[1])}}wi.prototype.clear=C_,wi.prototype.delete=R_,wi.prototype.get=P_,wi.prototype.has=I_,wi.prototype.set=D_;var Wc=r_(Object.getPrototypeOf,Object),F_="[object Object]",N_=Function.prototype,O_=Object.prototype,jc=N_.toString,B_=O_.hasOwnProperty,U_=jc.call(Object);function k_(s){if(!Xn(s)||Ms(s)!=F_)return!1;var e=Wc(s);if(e===null)return!0;var t=B_.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&jc.call(t)==U_}var z_=1,G_=32,dn=Lc(function(s,e,t){var n=z_;if(t.length){var i=Ss(t,Ho(dn));n|=G_}return dg(s,n,e,t,i)});dn.placeholder={};function V_(){this.__data__=new un,this.size=0}function H_(s){var e=this.__data__,t=e.delete(s);return this.size=e.size,t}function W_(s){return this.__data__.get(s)}function j_(s){return this.__data__.has(s)}var $_=200;function q_(s,e){var t=this.__data__;if(t instanceof un){var n=t.__data__;if(!Hc||n.length<$_-1)return n.push([s,e]),this.size=++t.size,this;t=this.__data__=new wi(n)}return t.set(s,e),this.size=t.size,this}function Si(s){var e=this.__data__=new un(s);this.size=e.size}Si.prototype.clear=V_,Si.prototype.delete=H_,Si.prototype.get=W_,Si.prototype.has=j_,Si.prototype.set=q_;var $c=typeof Ge=="object"&&Ge&&!Ge.nodeType&&Ge,qc=$c&&typeof module=="object"&&module&&!module.nodeType&&module,X_=qc&&qc.exports===$c,Xc=X_?Ht.Buffer:void 0,Yc=Xc?Xc.allocUnsafe:void 0;function Y_(s,e){if(e)return s.slice();var t=s.length,n=Yc?Yc(t):new s.constructor(t);return s.copy(n),n}var Kc=Ht.Uint8Array;function K_(s){var e=new s.constructor(s.byteLength);return new Kc(e).set(new Kc(s)),e}function J_(s,e){var t=e?K_(s.buffer):s.buffer;return new s.constructor(t,s.byteOffset,s.length)}function Z_(s){return typeof s.constructor=="function"&&!Pc(s)?Er(Wc(s)):{}}function Q_(s){return function(e,t,n){for(var i=-1,r=Object(e),o=n(e),a=o.length;a--;){var l=o[s?a:++i];if(t(r[l],l,r)===!1)break}return e}}var e0=Q_();function ea(s,e,t){(t!==void 0&&!Rr(s[e],t)||t===void 0&&!(e in s))&&Ko(s,e,t)}function t0(s){return Xn(s)&&Jo(s)}function ta(s,e){if(!(e==="constructor"&&typeof s[e]=="function")&&e!="__proto__")return s[e]}function n0(s){return gg(s,Vc(s))}function i0(s,e,t,n,i,r,o){var a=ta(s,t),l=ta(e,t),c=o.get(l);if(c){ea(s,t,c);return}var h=r?r(a,l,t+"",s,e,o):void 0,u=h===void 0;if(u){var d=Sr(l),p=!d&&Bc(l),g=!d&&!p&&Gc(l);h=l,d||p||g?Sr(a)?h=a:t0(a)?h=Vo(a):p?(u=!1,h=Y_(l,!0)):g?(u=!1,h=J_(l,!0)):h=[]:k_(l)||Zo(l)?(h=a,Zo(a)?h=n0(a):(!tn(a)||Uo(a))&&(h=Z_(l))):u=!1}u&&(o.set(l,h),i(h,l,n,r,o),o.delete(l)),ea(s,t,h)}function Jc(s,e,t,n,i){s!==e&&e0(e,function(r,o){if(i||(i=new Si),tn(r))i0(s,e,o,t,Jc,n,i);else{var a=n?n(ta(s,o),r,o+"",s,e,i):void 0;a===void 0&&(a=r),ea(s,o,a)}},Vc)}var Zc=yg(function(s,e,t){Jc(s,e,t)});/**
* @license
* Copyright 2010-2022 Three.js Authors
* SPDX-License-Identifier: MIT
*/const na="143",s0=0,Qc=1,r0=2,eh=1,o0=2,Cs=3,Ti=0,Wt=1,jt=2,a0=1,Ln=0,Ai=1,th=2,nh=3,ih=4,l0=5,Ei=100,c0=101,h0=102,sh=103,rh=104,u0=200,d0=201,f0=202,p0=203,oh=204,ah=205,m0=206,g0=207,_0=208,v0=209,x0=210,y0=0,b0=1,M0=2,ia=3,w0=4,S0=5,T0=6,A0=7,Dr=0,E0=1,C0=2,fn=0,L0=1,R0=2,P0=3,I0=4,D0=5,lh=300,Ci=301,Li=302,sa=303,ra=304,Fr=306,Kn=1e3,Ct=1001,Nr=1002,mt=1003,oa=1004,aa=1005,Ye=1006,ch=1007,Jn=1008,Zn=1009,F0=1010,N0=1011,hh=1012,O0=1013,Qn=1014,Ot=1015,$t=1016,B0=1017,U0=1018,Ri=1020,k0=1021,z0=1022,qt=1023,G0=1024,V0=1025,ei=1026,Pi=1027,H0=1028,W0=1029,j0=1030,$0=1031,q0=1033,la=33776,ca=33777,ha=33778,ua=33779,uh=35840,dh=35841,fh=35842,ph=35843,X0=36196,mh=37492,gh=37496,_h=37808,vh=37809,xh=37810,yh=37811,bh=37812,Mh=37813,wh=37814,Sh=37815,Th=37816,Ah=37817,Eh=37818,Ch=37819,Lh=37820,Rh=37821,Ph=36492,Y0=2200,K0=2201,J0=2202,Ls=2300,Ii=2301,da=2302,Di=2400,Fi=2401,Or=2402,fa=2500,Z0=2501,Q0=1,Ih=2,nn=3e3,Ve=3001,ev=3200,tv=3201,Br=0,nv=1,pn="srgb",ti="srgb-linear",pa=7680,iv=519,ma=35044,Dh="300 es",ga=1035;class ni{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const n=this._listeners[e.type];if(n!==void 0){e.target=this;const i=n.slice(0);for(let r=0,o=i.length;r<o;r++)i[r].call(this,e);e.target=null}}}const vt=["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 Fh=1234567;const Rs=Math.PI/180,Ps=180/Math.PI;function Bt(){const s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(vt[s&255]+vt[s>>8&255]+vt[s>>16&255]+vt[s>>24&255]+"-"+vt[e&255]+vt[e>>8&255]+"-"+vt[e>>16&15|64]+vt[e>>24&255]+"-"+vt[t&63|128]+vt[t>>8&255]+"-"+vt[t>>16&255]+vt[t>>24&255]+vt[n&255]+vt[n>>8&255]+vt[n>>16&255]+vt[n>>24&255]).toLowerCase()}function at(s,e,t){return Math.max(e,Math.min(t,s))}function _a(s,e){return(s%e+e)%e}function sv(s,e,t,n,i){return n+(s-e)*(i-n)/(t-e)}function rv(s,e,t){return s!==e?(t-s)/(e-s):0}function Is(s,e,t){return(1-t)*s+t*e}function ov(s,e,t,n){return Is(s,e,1-Math.exp(-t*n))}function av(s,e=1){return e-Math.abs(_a(s,e*2)-e)}function lv(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function cv(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function hv(s,e){return s+Math.floor(Math.random()*(e-s+1))}function uv(s,e){return s+Math.random()*(e-s)}function dv(s){return s*(.5-Math.random())}function fv(s){s!==void 0&&(Fh=s);let e=Fh+=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 pv(s){return s*Rs}function mv(s){return s*Ps}function va(s){return(s&s-1)===0&&s!==0}function Nh(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function Ur(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function gv(s,e,t,n,i){const r=Math.cos,o=Math.sin,a=r(t/2),l=o(t/2),c=r((e+n)/2),h=o((e+n)/2),u=r((e-n)/2),d=o((e-n)/2),p=r((n-e)/2),g=o((n-e)/2);switch(i){case"XYX":s.set(a*h,l*u,l*d,a*c);break;case"YZY":s.set(l*d,a*h,l*u,a*c);break;case"ZXZ":s.set(l*u,l*d,a*h,a*c);break;case"XZX":s.set(a*h,l*g,l*p,a*c);break;case"YXY":s.set(l*p,a*h,l*g,a*c);break;case"ZYZ":s.set(l*g,l*p,a*h,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function _v(s,e){switch(e.constructor){case Float32Array:return s;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function vv(s,e){switch(e.constructor){case Float32Array:return s;case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}var Ni=Object.freeze({__proto__:null,DEG2RAD:Rs,RAD2DEG:Ps,generateUUID:Bt,clamp:at,euclideanModulo:_a,mapLinear:sv,inverseLerp:rv,lerp:Is,damp:ov,pingpong:av,smoothstep:lv,smootherstep:cv,randInt:hv,randFloat:uv,randFloatSpread:dv,seededRandom:fv,degToRad:pv,radToDeg:mv,isPowerOfTwo:va,ceilPowerOfTwo:Nh,floorPowerOfTwo:Ur,setQuaternionFromProperEuler:gv,normalize:vv,denormalize:_v});class ee{constructor(e=0,t=0){ee.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}sub(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,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+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 n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*n-o*i+e.x,this.y=r*i+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ut{constructor(){Ut.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,n,i,r,o,a,l,c){const h=this.elements;return h[0]=e,h[1]=i,h[2]=a,h[3]=t,h[4]=r,h[5]=l,h[6]=n,h[7]=o,h[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,o=n[0],a=n[3],l=n[6],c=n[1],h=n[4],u=n[7],d=n[2],p=n[5],g=n[8],m=i[0],f=i[3],_=i[6],x=i[1],b=i[4],y=i[7],w=i[2],S=i[5],L=i[8];return r[0]=o*m+a*x+l*w,r[3]=o*f+a*b+l*S,r[6]=o*_+a*y+l*L,r[1]=c*m+h*x+u*w,r[4]=c*f+h*b+u*S,r[7]=c*_+h*y+u*L,r[2]=d*m+p*x+g*w,r[5]=d*f+p*b+g*S,r[8]=d*_+p*y+g*L,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],h=e[8];return t*o*h-t*a*c-n*r*h+n*a*l+i*r*c-i*o*l}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],h=e[8],u=h*o-a*c,d=a*l-h*r,p=c*r-o*l,g=t*u+n*d+i*p;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/g;return e[0]=u*m,e[1]=(i*c-h*n)*m,e[2]=(a*n-i*o)*m,e[3]=d*m,e[4]=(h*t-i*l)*m,e[5]=(i*r-a*t)*m,e[6]=p*m,e[7]=(n*l-c*t)*m,e[8]=(o*t-n*r)*m,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,r,o,a){const l=Math.cos(r),c=Math.sin(r);return this.set(n*l,n*c,-n*(l*o+c*a)+o+e,-i*c,i*l,-i*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),i=this.elements,r=i[0],o=i[3],a=i[6],l=i[1],c=i[4],h=i[7];return i[0]=t*r+n*l,i[3]=t*o+n*c,i[6]=t*a+n*h,i[1]=-n*r+t*l,i[4]=-n*o+t*c,i[7]=-n*a+t*h,this}translate(e,t){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}function Oh(s){for(let e=s.length-1;e>=0;--e)if(s[e]>65535)return!0;return!1}function Ds(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function ii(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function kr(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}const xa={[pn]:{[ti]:ii},[ti]:{[pn]:kr}},Xt={legacyMode:!0,get workingColorSpace(){return ti},set workingColorSpace(s){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(s,e,t){if(this.legacyMode||e===t||!e||!t)return s;if(xa[e]&&xa[e][t]!==void 0){const n=xa[e][t];return s.r=n(s.r),s.g=n(s.g),s.b=n(s.b),s}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(s,e){return this.convert(s,this.workingColorSpace,e)},toWorkingColorSpace:function(s,e){return this.convert(s,e,this.workingColorSpace)}},Bh={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},lt={r:0,g:0,b:0},Yt={h:0,s:0,l:0},zr={h:0,s:0,l:0};function ya(s,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*6*(2/3-t):s}function Gr(s,e){return e.r=s.r,e.g=s.g,e.b=s.b,e}let pe=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,t===void 0&&n===void 0?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=pn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Xt.toWorkingColorSpace(this,t),this}setRGB(e,t,n,i=ti){return this.r=e,this.g=t,this.b=n,Xt.toWorkingColorSpace(this,i),this}setHSL(e,t,n,i=ti){if(e=_a(e,1),t=at(t,0,1),n=at(n,0,1),t===0)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,o=2*n-r;this.r=ya(o,r,e+1/3),this.g=ya(o,r,e),this.b=ya(o,r,e-1/3)}return Xt.toWorkingColorSpace(this,i),this}setStyle(e,t=pn){function n(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let r;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,Xt.toWorkingColorSpace(this,t),n(r[4]),this;if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,Xt.toWorkingColorSpace(this,t),n(r[4]),this;break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){const l=parseFloat(r[1])/360,c=parseInt(r[2],10)/100,h=parseInt(r[3],10)/100;return n(r[4]),this.setHSL(l,c,h,t)}break}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=i[1],o=r.length;if(o===3)return this.r=parseInt(r.charAt(0)+r.charAt(0),16)/255,this.g=parseInt(r.charAt(1)+r.charAt(1),16)/255,this.b=parseInt(r.charAt(2)+r.charAt(2),16)/255,Xt.toWorkingColorSpace(this,t),this;if(o===6)return this.r=parseInt(r.charAt(0)+r.charAt(1),16)/255,this.g=parseInt(r.charAt(2)+r.charAt(3),16)/255,this.b=parseInt(r.charAt(4)+r.charAt(5),16)/255,Xt.toWorkingColorSpace(this,t),this}return e&&e.length>0?this.setColorName(e,t):this}setColorName(e,t=pn){const n=Bh[e.toLowerCase()];return n!==void 0?this.setHex(n,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=ii(e.r),this.g=ii(e.g),this.b=ii(e.b),this}copyLinearToSRGB(e){return this.r=kr(e.r),this.g=kr(e.g),this.b=kr(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=pn){return Xt.fromWorkingColorSpace(Gr(this,lt),e),at(lt.r*255,0,255)<<16^at(lt.g*255,0,255)<<8^at(lt.b*255,0,255)<<0}getHexString(e=pn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=ti){Xt.fromWorkingColorSpace(Gr(this,lt),t);const n=lt.r,i=lt.g,r=lt.b,o=Math.max(n,i,r),a=Math.min(n,i,r);let l,c;const h=(a+o)/2;if(a===o)l=0,c=0;else{const u=o-a;switch(c=h<=.5?u/(o+a):u/(2-o-a),o){case n:l=(i-r)/u+(i<r?6:0);break;case i:l=(r-n)/u+2;break;case r:l=(n-i)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=h,e}getRGB(e,t=ti){return Xt.fromWorkingColorSpace(Gr(this,lt),t),e.r=lt.r,e.g=lt.g,e.b=lt.b,e}getStyle(e=pn){return Xt.fromWorkingColorSpace(Gr(this,lt),e),e!==pn?`color(${e} ${lt.r} ${lt.g} ${lt.b})`:`rgb(${lt.r*255|0},${lt.g*255|0},${lt.b*255|0})`}offsetHSL(e,t,n){return this.getHSL(Yt),Yt.h+=e,Yt.s+=t,Yt.l+=n,this.setHSL(Yt.h,Yt.s,Yt.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Yt),e.getHSL(zr);const n=Is(Yt.h,zr.h,t),i=Is(Yt.s,zr.s,t),r=Is(Yt.l,zr.l,t);return this.setHSL(n,i,r),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),e.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}};pe.NAMES=Bh;let Oi;class Uh{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement=="undefined")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Oi===void 0&&(Oi=Ds("canvas")),Oi.width=e.width,Oi.height=e.height;const n=Oi.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Oi}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!="undefined"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap){const t=Ds("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let o=0;o<r.length;o++)r[o]=ii(r[o]/255)*255;return n.putImageData(i,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(ii(t[n]/255)*255):t[n]=ii(t[n]);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}}class kh{constructor(e=null){this.isSource=!0,this.uuid=Bt(),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 n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let r;if(Array.isArray(i)){r=[];for(let o=0,a=i.length;o<a;o++)i[o].isDataTexture?r.push(ba(i[o].image)):r.push(ba(i[o]))}else r=ba(i);n.url=r}return t||(e.images[this.uuid]=n),n}}function ba(s){return typeof HTMLImageElement!="undefined"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&s instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&s instanceof ImageBitmap?Uh.getDataURL(s):s.data?{data:Array.from(s.data),width:s.width,height:s.height,type:s.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let xv=0;class gt extends ni{constructor(e=gt.DEFAULT_IMAGE,t=gt.DEFAULT_MAPPING,n=Ct,i=Ct,r=Ye,o=Jn,a=qt,l=Zn,c=1,h=nn){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:xv++}),this.uuid=Bt(),this.name="",this.source=new kh(e),this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new ee(0,0),this.repeat=new ee(1,1),this.center=new ee(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ut,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=h,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e){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.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.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 n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==lh)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Kn:e.x=e.x-Math.floor(e.x);break;case Ct:e.x=e.x<0?0:1;break;case Nr: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 Kn:e.y=e.y-Math.floor(e.y);break;case Ct:e.y=e.y<0?0:1;break;case Nr: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)}}gt.DEFAULT_IMAGE=null,gt.DEFAULT_MAPPING=lh;class qe{constructor(e=0,t=0,n=0,i=1){qe.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,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,n,i){return this.x=e,this.y=t,this.z=n,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,n=this.y,i=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*t+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*t+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*t+o[7]*n+o[11]*i+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,r;const l=e.elements,c=l[0],h=l[4],u=l[8],d=l[1],p=l[5],g=l[9],m=l[2],f=l[6],_=l[10];if(Math.abs(h-d)<.01&&Math.abs(u-m)<.01&&Math.abs(g-f)<.01){if(Math.abs(h+d)<.1&&Math.abs(u+m)<.1&&Math.abs(g+f)<.1&&Math.abs(c+p+_-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(c+1)/2,y=(p+1)/2,w=(_+1)/2,S=(h+d)/4,L=(u+m)/4,v=(g+f)/4;return b>y&&b>w?b<.01?(n=0,i=.707106781,r=.707106781):(n=Math.