C端小程序
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

2 satır
1.5 MiB

  1. /*! Released Version 0.9.1,BUILD 143. Fengmap Javascript SDK, see: https://www.fengmap.com for details */
  2. function c(e){if(b[e])return b[e].exports;var t=b[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,c),t.l=!0,t.exports}var a,b;exports.fengmap=(a=[function(e,t,n){e.exports=n(269)},function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var i=n(186);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i(e,r.key,r)}}function a(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(273)},function(e,t,n){var r=n(308),i=n(311);function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=r(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(56).default,i=n(89);function a(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(t,e,n){var r=n(188),i=n(315);function a(e){return t.exports=a=r?i:function(e){return e.__proto__||i(e)},t.exports.default=t.exports,t.exports.__esModule=!0,a(e)}t.exports=a,t.exports.default=t.exports,t.exports.__esModule=!0},function(e,t,n){"use strict";var p=n(18),m=n(81).f,v=n(169),g=n(11),y=n(72),_=n(39),x=n(37),w=function(r){var e=function(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,n)}return r.apply(this,arguments)};return e.prototype=r.prototype,e};e.exports=function(e,t){var n,r,i,a,o,s=e.target,l=e.global,u=e.stat,h=e.proto,c=l?p:u?p[s]:(p[s]||{}).prototype,d=l?g:g[s]||(g[s]={}),f=d.prototype;for(n in t)r=v(l?n:s+(u?".":"#")+n,e.forced),a=!r&&c&&x(c,n),r=d[n],a&&(i=e.noTargetGet?(o=m(c,n),o&&o.value):c[n]),o=a&&i?i:t[n],a&&typeof r==typeof o||(a=e.bind&&a?y(o,p):e.wrap&&a?w(o):h&&"function"==typeof o?y(Function.call,o):o,(e.sham||o&&o.sham||r&&r.sham)&&_(a,"sham",!0),d[n]=a,h&&(a=s+"Prototype",x(g,a)||_(g,a,{}),g[a][n]=o,e.real&&f&&!f[n]&&_(f,n,o)))}},function(e,t,n){e.exports=n(336)},function(e,t,n){e.exports=n(369)},function(e,t){e.exports={}},function(e,t,n){e.exports=n(344)},function(e,t,n){e.exports=n(332)},function(e,t,n){e.exports=n(356)},function(e,t,n){e.exports=n(340)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(10)),o=i(n(2)),s=i(n(3)),n=function(){function n(e,t){(0,o.default)(this,n),this._eid=e,this._groupId=e,this.parent=null,this._nodeType=t,this._x=0,this._y=0,this._z=0,this._height=0,this._alwaysShow=!1,this._show=!0,this.renderNodeInited=!1,this.tryInit=!1,this.needAvoid=!0,this._visible=!0}return(0,s.default)(n,[{key:"findParent",value:function(e){for(var t=this.parent;t;){if(t instanceof e)return t;t=t.parent}return!1}},{key:"avoid",value:function(e){this.needAvoid=e,e||(this.show=!0)}},{key:"alwaysShow",value:function(){var e;this._alwaysShow=!0;for(var t=this.parent;t;){if(t.isGroup){e=t;break}t=t.parent}e&&this.renderNode&&e.alwaysShowMarkers.push(this.renderNode)}},{key:"isAlwaysShow",get:function(){return this._alwaysShow}},{key:"groupID",get:function(){if(this.isGroup)return this._eid;for(var e,t=this.parent;t;){if(t.isGroup){e=t;break}t=t.parent}return e?e.eid:0}},{key:"height",get:function(){return this._height},set:function(e){this._height=e}},{key:"mapCoord",get:function(){return{x:this._x,y:this._y,z:this._height}},set:function(e){this._mapCoord=e}},{key:"nodeType",get:function(){return this._nodeType},set:function(e){this._nodeType=e}},{key:"show",get:function(){return this._show},set:function(e){this._show=e,this._renderNode&&(this._renderNode.visible=e)}},{key:"x",get:function(){return this._x},set:function(e){this._x=e}},{key:"y",get:function(){return this._y},set:function(e){this._y=e}},{key:"z",get:function(){return this._z},set:function(e){this._z=e}},{key:"eid",get:function(){return this._eid}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.parent&&this.parent.parent&&this.parent.parent.parent&&(0,a.default)(this.parent.parent.parent).setRenderList()}}]),n}(),n=n;t.default=n},function(n,e,t){!function(e){var t=function(e){return e&&e.Math==Math&&e};n.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||function(){return this}()||Function("return this")()}.call(this,t(49))},function(e,t,n){e.exports=n(427)},function(e,t,n){e.exports=n(442)},function(e,t,n){e.exports=n(443)},function(e,t,n){e.exports=n(444)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(18),i=n(126),a=n(37),o=n(104),s=n(129),n=n(178),l=i("wks"),u=r.Symbol,h=n?u:u&&u.withoutSetter||o;e.exports=function(e){return a(l,e)&&(s||"string"==typeof l[e])||(s&&a(u,e)?l[e]=u[e]:l[e]=h("Symbol."+e)),l[e]}},function(e,t,n){var r=n(11),i=n(37),a=n(132),o=n(40).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||o(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(11);e.exports=function(e){return r[e+"Prototype"]}},function(e,t,n){e.exports=n(361)},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var d=i(n(31)),a=i(n(2)),o=i(n(3)),v=1e-5,f=1e-5,y=.001,s=.01,n=function(){function g(){(0,a.default)(this,g)}return(0,o.default)(g,null,[{key:"epsilon",value:function(){return y}},{key:"isZero",value:function(e){return e<v&&-v<e}},{key:"gtZero",value:function(e){return v<e}},{key:"ltZero",value:function(e){return e<-v}},{key:"pointDistanceToLine",value:function(e,t,n,r){var i=t.x,a=t.y,o=n.x,s=n.y,l=e.x,u=e.y,h=o-i,c=s-a,d=Math.sqrt(h*h+c*c),f=l-i,p=u-a,e=Math.sqrt(f*f+p*p),e=g.isZero(d)?(r.x=t.x,r.y=t.y,g.isZero(e)?0:e):(h/=d,c/=d,p=h*f+c*p,g.gtZero(p)?g.ltZero(p-d)?(h=i+p*h,c=a+p*c,l-=h,u-=c,u=Math.sqrt(l*l+u*u),r.x=h,r.y=c,u):(o=l-o,s=u-s,s=Math.sqrt(o*o+s*s),r.x=n.x,r.y=n.y,s):(r.x=t.x,r.y=t.y,e));return e}},{key:"distanceOfTwoPoints",value:function(e,t){return e&&t?Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)):Number.NaN}},{key:"isSamePoint",value:function(e,t){return Math.abs(e.x-t.x)<=f&&Math.abs(e.y-t.y)<=f}},{key:"isNearlySamePoint",value:function(e,t){return Math.abs(e.x-t.x)<=s&&Math.abs(e.y-t.y)<=s}},{key:"getPolygonInnerPoint",value:function(e){if(e&&0==e.length)return{x:0,y:0};var t=e.length;if(t<3)return e[0];var n=e[0],t=e[1],r={x:(n.x+t.x)/2,y:(n.y+t.y)/2},i=Math.atan2(t.y-n.y,t.x-n.x);i-=Math.PI/2;for(var a=3;.5<a;){var o={x:r.x+a*Math.cos(i),y:r.y+a*Math.sin(i)};if(g.isInPolygon(o,e))return o;a/=2}for(i+=Math.PI,a=3;.5<a;){var s={x:r.x+a*Math.cos(i),y:r.y+a*Math.sin(i)};if(g.isInPolygon(s,e))return s;a/=2}return{x:0,y:0}}},{key:"isInPolygon",value:function(e,t){for(var n=!1,r=t.length,i=0,a=r-1;i<r;a=i,++i){var o=t[i].x,s=t[i].y,l=t[a].x,u=t[a].y;if(o==e.x&&s==e.y||l==e.x&&u==e.y)return!0;if(s<e.y&&u>=e.y||s>=e.y&&u<e.y){if(s=o+(e.y-s)*(l-o)/(u-s),s==e.x)return!0;s>e.x&&(n=!n)}}return n}},{key:"isInCircle",value:function(e,t,n,r){if(e.x<r[0]&&e.x>r[1])return!1;if(e.y<r[2]&&e.y>r[3])return!1;var i=n*n,r=e.x,n=e.y,e=t.x,t=t.y,r=e-r,n=t-n,n=r*r+n*n;return n<i}},{key:"isRectCross",value:function(e,t,n,r){return!(Math.max(e.x,t.x)<Math.min(n.x,r.x)||Math.max(e.y,t.y)<Math.min(n.y,r.y)||Math.max(n.x,r.x)<Math.min(e.x,t.x)||Math.max(n.y,r.y)<Math.min(e.y,t.y))}},{key:"pointIsInRect",value:function(e,t,n,r){return Math.abs(e.x-t.x)<n&&Math.abs(e.y-t.y)<r}},{key:"pointIsInRect1",value:function(e,t,n){var r=Math.min(t.x,n.x),i=Math.max(t.x,n.x),a=Math.min(t.y,n.y),n=Math.max(t.y,n.y);return!(e.x<r||e.x>i||e.y<a||e.y>n)}},{key:"cross",value:function(e,t,n){return(e.x-n.x)*(t.y-n.y)-(t.x-n.x)*(e.y-n.y)}},{key:"isLineSegmentCross",value:function(e,t,n,r){return!(Math.max(e.x,t.x)<Math.min(n.x,r.x)||Math.max(e.y,t.y)<Math.min(n.y,r.y)||Math.max(n.x,r.x)<Math.min(e.x,t.x)||Math.max(n.y,r.y)<Math.min(e.y,t.y)||g.cross(n,t,e)*g.cross(t,r,e)<0||g.cross(e,r,n)*g.cross(r,t,n)<0)}},{key:"rayCrossSegment",value:function(e,t,n,r,i){var a=Math.min(e.x,n.x,r.x),o=Math.max(e.x,n.x,r.x),s=Math.min(e.y,n.y,r.y),l=Math.max(e.y,n.y,r.y),l=Math.sqrt((o-a)*(o-a)+(l-s)*(l-s)),s=t/180*Math.PI,t=l*Math.cos(s)+e.x,s=l*Math.sin(s)+e.y;return 1==this.calcCrossPoint(e,{x:t,y:s},n,r,i)}},{key:"calcCrossPoint",value:function(e,t,n,r,i){if(1!=g.isLineSegmentCross(e,t,n,r))return 0;var a=(r.x-n.x)*(e.y-t.y)-(t.x-e.x)*(n.y-r.y),o=(e.y-n.y)*(t.x-e.x)*(r.x-n.x)+n.x*(r.y-n.y)*(t.x-e.x)-e.x*(t.y-e.y)*(r.x-n.x);return i.x=o/a,a=(e.x-t.x)*(r.y-n.y)-(t.y-e.y)*(n.x-r.x),o=t.y*(e.x-t.x)*(r.y-n.y)+(r.x-t.x)*(r.y-n.y)*(e.y-t.y)-r.y*(n.x-r.x)*(t.y-e.y),i.y=o/a,1}},{key:"pointInPolygon2d",value:function(e,t,n){for(var r=!1,i=null,a=null,o=0;o<n;o++)i=e[o],a=e[(o+1)%n],(i.y<t.y&&a.y>=t.y||a.y<t.y&&i.y>=t.y)&&(i.x<=t.x||a.x<=t.x)&&i.x+(t.y-i.y)/(a.y-i.y)*(a.x-i.x)<t.x&&(r=!r);return r}},{key:"pointInPolygon2d1",value:function(e,t,n){for(var r=0,i=null,a=null,o=null,s=0;s<n;s++)if(i=e[s],a=e[(s+1)%n],(i.y<t.y&&a.y>=t.y||a.y<t.y&&i.y>=t.y)&&(i.x<=t.x||a.x<=t.x)){if(o=i.x+(t.y-i.y)/(a.y-i.y)*(a.x-i.x),Math.abs(o-t.x)<=y)return 2;o<t.x&&(r=!r)}return r}},{key:"pointInPolygonVector2d",value:function(e,t,n){for(var r=!1,i=null,a=null,o=0,s=n/2,l=0;l<s;l++)o=2*l,i={x:e[o],y:e[o+1]},a={x:e[(o+2)%n],y:e[(o+3)%n]},(i.y<t.y&&a.y>=t.y||a.y<t.y&&i.y>=t.y)&&(i.x<=t.x||a.x<=t.x)&&i.x+(t.y-i.y)/(a.y-i.y)*(a.x-i.x)<t.x&&(r=!r);return r}},{key:"pointToSegmentDistance",value:function(e,t,n){var r=e.x,i=e.y,a=t.x,o=t.y,s=n.x,e=n.y,t=(s-a)*(r-a)+(e-o)*(i-o);return t<=0?Math.sqrt((r-a)*(r-a)+(i-o)*(i-o)):(n=(s-a)*(s-a)+(e-o)*(e-o),n<=t?Math.sqrt((r-s)*(r-s)+(i-e)*(i-e)):(n=t/n,a+=(s-a)*n,n=o+(e-o)*n,Math.sqrt((r-a)*(r-a)+(n-i)*(n-i))))}},{key:"pointToPolygon2d",value:function(e,t,n){for(var r=null,i=null,a=Number.MAX_VALUE,o=0;o<n;o++){var r=e[o],i=e[(o+1)%n],s=g.pointToSegmentDistance(t,r,i);s<a&&(a=s)}return a}},{key:"lineInCircle2d",value:function(e,t,n,r,i){if(e.x<i[0]&&t.x<i[0])return!1;if(e.x>i[1]&&t.x>i[1])return!1;if(e.y<i[2]&&t.y<i[2])return!1;if(e.y>i[3]&&t.y>i[3])return!1;var a=r*r,o=e.x,s=e.y,l=t.x,u=t.y,h=n.x,c=n.y,d=l-o,i=u-s,r=d*d+i*i,e=h-o,t=c-s,n=e*e+t*t;return g.isZero(r)?!!g.isZero(n)||n<a:(r=Math.sqrt(r),d/=r,i/=r,t=d*e+i*t,g.gtZero(t)?g.ltZero(t-r)?(d=o+t*d,i=s+t*i,d=h-d,i=c-i,i=d*d+i*i,i<a):(l=h-l,u=c-u,u=l*l+u*u,u<a):n<a)}},{key:"lineInPolygon2d",value:function(e,t,n,r){if(e.x<r[0]&&t.x<r[0])return!1;if(e.x>r[1]&&t.x>r[1])return!1;if(e.y<r[2]&&t.y<r[2])return!1;if(e.y>r[3]&&t.y>r[3])return!1;var i=n.length;if(g.pointInPolygon2d(n,e,i))return!0;if(g.pointInPolygon2d(n,t,i))return!0;for(var a=0;a<i;a++){var o=(a+1)%i;if(g.isLineSegmentCross(e,t,n[a],n[o]))return!0}return!1}},{key:"calcLineCircleCrossPoints2d",value:function(e,t,n,r,i){if(e.x<i[0]&&t.x<i[0])return null;if(e.x>i[1]&&t.x>i[1])return null;if(e.y<i[2]&&t.y<i[2])return null;if(e.y>i[3]&&t.y>i[3])return null;var a={isContain:!1,crossPoints:[]},o=r*r,s=e.x,l=e.y,u=t.x,h=t.y,c=n.x,d=n.y,f=u-s,p=h-l,m=f*f+p*p,i=c-s,r=d-l,n=i*i+r*r,u=c-u,h=d-h,h=u*u+h*h;return g.isZero(m)?((g.isZero(n)||n<o)&&(a.isContain=!0,a.crossPoints=[e,t]),a):n<o&&h<o?(a.isContain=!0,a.crossPoints=[e,t],a):(e=Math.sqrt(m),t=f/e,m=p/e,f=i*t+r*m,p=f*f,r=i*i+r*r,o-r+p<0?null:(r=Math.sqrt(o-r+p),p=f-r,-v<+p&&p-e<v&&a.crossPoints.push({x:s+p*t,y:l+p*m}),p=f+r,-v<+p&&p-e<v&&a.crossPoints.push({x:s+p*t,y:l+p*m}),a))}},{key:"calcLinePolygonCrossPoints2d",value:function(e,t,n,r){if(e.x<r[0]&&t.x<r[0])return null;if(e.x>r[1]&&t.x>r[1])return null;if(e.y<r[2]&&t.y<r[2])return null;if(e.y>r[3]&&t.y>r[3])return null;var i={containType:0,crossPoints:[]},a=n.length;g.pointInPolygon2d(n,e,a)&&(i.containType|=1),g.pointInPolygon2d(n,t,a)&&(i.containType|=2);for(var o=[],s=0;s<a;s++){var l,u=(s+1)%a,h={};g.calcCrossPoint(e,t,n[s],n[u],h)&&(l=h.x-e.x,u=h.y-e.y,o.push({dis2:l*l+u*u,point:h}))}if(0==o.length)return null;(0,d.default)(o).call(o,function(e,t){return t.dis2-e.dis2});for(var c=0;c<o.length;c++)i.crossPoints.push(o[c].point);return i}},{key:"calcCenterOfGravityPoint",value:function(e,t){for(var n=0,r=0,i=0,a=0;a<t;a++){var o=e[a],s=e[(a+1)%t],l=(o.x*s.y-o.y*s.x)/2;n+=l,r+=l*(o.x+s.x)/3,i+=l*(o.y+s.y)/3}return r/=n,i/=n,{x:r,y:i}}},{key:"calcPolygonArea2d",value:function(e){var t=e.length;if(t<3)return 0;for(var n=0,r=0;r<t;++r){var i=e[r],a=e[(r+1)%t];n+=i.x*a.y-i.y*a.x}return Math.abs(n/2)}},{key:"quickRayIntersect",value:function(e,t,n,r,i){var a=Math.min(n.x,r.x),o=Math.max(n.x,r.x),s=Math.min(n.y,r.y),l=Math.max(n.y,r.y),u=e.x,h=e.y,c=n.x,d=n.y,f=r.x,p=r.y;if(90==t){if(e.x<a||e.x>o)return!1;var m=(p-d)/(f-c),m=m*(u-c)+d;return i.y=m,i.x=u,!(m<h||!g.pointIsInRect1(i,n,r))}if(270==t)return!(e.x<a||e.x>o||(e=(p-d)/(f-c),e=e*(u-c)+d,i.y=e,i.x=u,h<e||!g.pointIsInRect1(i,n,r)));if(270!=t&&90!=t&&o-a<y&&(o=a,a=Math.tan(t/180*Math.PI),a=a*(o-u)+h,i.y=a,i.x=o,g.pointIsInRect1(i,n,r)))return o-=u,a-=h,o/=Math.sqrt(o*o+a*a),a=Math.cos(t/180*Math.PI),0<o*a;if(l-s<=1e-6){if(l=s,s=Math.tan(t/180*Math.PI),s=1/s*(l-h)+u,i.x=s,i.y=l,g.pointIsInRect1(i,n,r)){var s=s-u,v=l-h,s=s/Math.sqrt(s*s+v*v),v=Math.cos(t/180*Math.PI);return 0<s*v}return!1}return v=Math.tan(t/180*Math.PI),f=(p-d)/(f-c),f=(d-h-(f*c-v*u))/(v-f),v=h+v*(f-u),i.x=f,i.y=v,!!g.pointIsInRect1(i,n,r)&&(u=f-u,h=v-h,h=u/Math.sqrt(u*u+h*h),t=Math.cos(t/180*Math.PI),0<h*t)}},{key:"calcFootOfUpright",value:function(e,t,n,r){var i=Math.min(t.x,n.x),a=Math.max(t.x,n.x),o=Math.min(t.y,n.y),s=Math.max(t.y,n.y),l=e.x,u=e.y,h=t.x,c=t.y,d=n.x,e=n.y;return Math.abs(h-d)<f?(r.x=h,r.y=u,o<=u&&u<=s):Math.abs(c-e)<f?(r.x=l,r.y=c,i<=l&&l<=a):(a=(e-c)/(d-h),a=-1/a,d=(e-c)/(d-h),d=(c-u-(d*h-a*l))/(a-d),l=u+a*(d-l),r.x=d,r.y=l,!!g.pointIsInRect1(r,t,n))}},{key:"vectorCross",value:function(e,t){return{x:e.y*t.z-e.z*t.y,y:e.z*t.x-e.x*t.z,z:e.x*t.y-e.y*t.x}}},{key:"vectorDot",value:function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z}},{key:"vectorLength",value:function(e){return Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z)}},{key:"vector2DDot",value:function(e,t){return e.x*t.x+e.y*t.y}},{key:"vector2DLength",value:function(e){return Math.sqrt(e.x*e.x+e.y*e.y)}},{key:"calcRotateAngle",value:function(e,t){var n={x:e.x,y:e.y,z:0},r={x:t.x,y:t.y,z:0},n=g.vectorCross(n,r),r=g.vector2DDot(e,t),t=Math.acos(r/(g.vector2DLength(e)*g.vector2DLength(t)));return 0<n.z?t/Math.PI*180:360-t/Math.PI*180}},{key:"isPointOnSegment",value:function(e,t,n){return(e.x-t.x)*(n.y-t.y)==(n.x-t.x)*(e.y-t.y)&&Math.min(t.x,n.x)<=e.x&&e.x<=Math.max(t.x,n.x)&&Math.min(t.y,n.y)<=e.y&&e.y<=Math.max(t.y,n.y)}},{key:"segCrossPolygon",value:function(e,t,n,r){for(var i=0;i<n.length;i++){var a=n[i],o=n[(i+1)%n.length];if(1==this.calcCrossPoint(e,t,a,o,r))return!0}return!1}}]),g}(),n=n;t.default=n},function(e,t,n){e.exports=n(365)},function(e,t,n){n=n(16),e.exports=!n(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},function(e,t,n){e.exports=n(376)},function(e,t,n){e.exports=n(407)},function(e,t,n){var r=n(23);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(463),i=n(466),a=n(471),o=n(474);function s(e){return r(e)||i(e)||a(e)||o()}e.exports=s,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(398)},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={NONE:0,EXTENT:4,FLOOR:4,MODEL:5,DYNMODEL:6,FACILITY:11,LABEL:12,LINE:21,IMAGE_MARKER:31,TEXT_MARKER:32,LOCATION_MARKER:33,SURFACEIMAGE_MARKER:34,EXTERANL_MODEL:35,EXTERNAL_MODEL:35,POLYGON_MARKER:36,WATER_MARKER:37,EXTRUDE_MARKER:38,GRADIENT_POLYGON_MARKER:39,EDGES_LINES_TYPE:40,ALL:65535,ELEMENT:100},t.default=n},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(82);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(30),i=n(40),a=n(71);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(30),i=n(168),a=n(33),o=n(100),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(a(e),t=o(t,!0),a(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){n(108);var r,i=n(306),a=n(18),o=n(51),s=n(39),l=n(59),n=n(24),u=n("toStringTag");for(r in i){var h=a[r],h=h&&h.prototype;h&&o(h)!==u&&s(h,u,r),l[r]=l.Array}},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(29)),o=i(n(9)),s=i(n(15)),g=i(n(64)),l=i(n(2)),u=i(n(3)),n=function(){function e(){(0,l.default)(this,e)}return(0,u.default)(e,null,[{key:"toColor",value:function(e){if("number"==typeof e)return e;var t=e.split(",");return 3<=t.length?(0,a.default)(t[0])<<16|(0,a.default)(t[1])<<8|(0,a.default)(t[2]):(console.error("color format error",e),0)}},{key:"toRgba",value:function(e){if("number"==typeof e)return"rgba("+(0,a.default)(255*new fm.Color(e).r)+","+(0,a.default)(255*new fm.Color(e).g)+","+(0,a.default)(255*new fm.Color(e).b)+",1)";var t=e.split(",");return 3<=t.length?"rgba("+(0,a.default)(t[0])+","+(0,a.default)(t[1])+","+(0,a.default)(t[2])+",1)":e}},{key:"bindEvent",value:function(e,a,t,o){e.addEventListener(t,function(e){var t,n=e||window.event,r=n.target||n.srcElement,i=n.currentTarget;for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1<n});r!==i;)r.matches(a)&&(t=r,o.call(t,n)),r=r.parentNode})}},{key:"toSceneCoord",value:function(e,t){var n=0;return t.groupID&&(n=e.getFMGroup(t.groupID).height),new fm.Vector3(t.x-e.center.x,e.center.y+n,-t.y+e.center.y)}},{key:"removeFormArray",value:function(e,t){t=(0,o.default)(e).call(e,t),-1<t&&(0,s.default)(e).call(e,t,1)}},{key:"scrollTopAnFun",value:function(){var m,v=!1;return function t(n){var r=n.el,i=n.to,e=n.form,a=(n.time,i<e?"up":"bottom"),o=e<i?i-e:i==e?0:e-i,s=10,l=o/s,u=0,h=function(e){var t=e.val,n=e.nbak,r=e.n,e=e.elTop;return"up"==a?e+(n-r)*t:e-(n-r)*t};function c(){m=0,(0,g.default)(function(){var e=Object(n,{to:r.scrollTop});v=!1,t(e)},s+1)}var d=function(){v=!1,m=!1,0==e&&(r.scrollTop=0)},f=function e(){var t;m--,m<=0?d():(t=function(){!1!==m&&(u=h({val:s,nbak:l,n:m,elTop:i,VDIRECTIONE:a}),u&&(r.scrollTop=u),e())},(0,g.default)(t,s))};function p(){v?c():(v=!0,m=l,f())}p()}}},{key:"toVector",value:function(e){return e.hasOwnProperty("z")?new fm.Vector3(e.x,e.y,e.z):new fm.Vector2(e.x,e.y)}},{key:"sleep",value:function(e){for(var t=(new Date).getTime(),n=0;n<1e7&&!((new Date).getTime()-t>e);n++);}}]),e}(),n=n;t.default=n},function(e,t,n){var r=n(98),i=n(82);e.exports=function(e){return r(i(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(11),i=n(18),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e])||a(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},function(e,t,n){var r=n(74),i=Math.min;e.exports=function(e){return 0<e?i(r(e),9007199254740991):0}},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(35)),o=i(n(2)),s=i(n(3)),l=i(n(477)),u=i(n(209)),h=i(n(210)),n=function(){function e(){(0,o.default)(this,e),this._sceneRawData={},this._sceneDecodeData={},this._reader=new l.default,this.file_ver=1}return(0,s.default)(e,[{key:"putRawScene",value:function(e,t){this.sceneRawData[t+""]=e}},{key:"removeRawScene",value:function(e){this.sceneRawData[e+""]=void 0}},{key:"parseScene",value:function(e,t,n){if(e=t?this._reader.sceneDecode(this.sceneRawData[e+""],n,e):this._reader.mapDecode(this.sceneRawData[e+""],n,e),!e)return e;t&&(e={scene:e,floors:[]});for(var r=e.scene.layerGroups,i=0;i<r.length;i++){var a=r[i];a.elevation=a.height}return e}},{key:"parseFloor",value:function(e,t,n){return e=this._reader.floorGeoDecode(e),t=this._reader.floorBizDecode(t),n=this._reader.floorNaviDecode(n),[e,t,n]}},{key:"isSceneHasZone",value:function(e){if(!e)return!1;if(e=this._sceneDecodeData[e+""],!e)return!1;var t=!1;return(0,a.default)(e=e.floors).call(e,function(e){0<e.navi[0].naviZones.length&&(t=!0)}),t}},{key:"putDecodeScene",value:function(e,t){this.file_ver=e.scene.file_ver,this.sceneDecodeData[t+""]=e}},{key:"removeDecodeScene",value:function(e){this.sceneDecodeData[e+""]=void 0}},{key:"getRawScene",value:function(e){return this.sceneRawData[e+""]}},{key:"getDecodeScene",value:function(e){return this.sceneDecodeData[e+""]}},{key:"dispose",value:function(){for(var e in this._reader.dispose(),this.sceneRawData)this.sceneRawData[e]=void 0;for(var t in this.sceneDecodeData)this.sceneDecodeData[t]=void 0;this.sceneRawData=void 0,this.sceneDecodeData=void 0}},{key:"disposeById",value:function(e){this.sceneRawData[e]=void 0,this.sceneDecodeData[e]=void 0}},{key:"sceneRawData",get:function(){return this._sceneRawData},set:function(e){this._sceneRawData=e}},{key:"sceneDecodeData",get:function(){return this._sceneDecodeData},set:function(e){this._sceneDecodeData=e}}],[{key:"convertGeo2Geometry",value:function(e){var t=(new u.default).parse(e),e={vertices:t.toStrip(!0)};return t.hasHoles()&&(e.holes=t.toStripHoles(!0)),e}},{key:"convertArr2Geometry",value:function(e,t){for(var n=e[0].idxs[0],r=[],i=0;i<n-2;i+=2)r.push(t[i]),r.push(t[i+1]);var a={vertices:r};if(1<e.length){for(var o=[],s=1;s<e.length;s++){for(var l=e[s-1],u=e[s],h=[],c=l;c<u-2;c+=2)h.push(t[c]),h.push(t[c+1]);o.push(h)}a.holes=o}return a}},{key:"convertArray2Geometry",value:function(e,t){return e=(new h.default).parseGeometry(e,t),t={vertices:e.toStrip(!0)},e.hasHoles()&&(t.holes=e.toStripHoles(!0)),t}},{key:"convertGeo2Points",value:function(e){return e=(new u.default).parse(e),e={vertices:e.points},e}},{key:"convertArrayPoints",value:function(e,t){return t=(new h.default).parse(e,t),t={vertices:t.points},t}},{key:"checkClockwise",value:function(e){for(var t=Number.NEGATIVE_INFINITY,n=0,r=0,i=0,a=0;a<e.length;a+=2)e[a]>t&&(t=e[a],n=a);var o=new fm.Vector3(e[n],e[n+1],0),r=0===n?e.length-2:n-2,i=n===e.length-2?0:n+2,r=new fm.Vector3(e[r],e[r+1],0),i=new fm.Vector3(e[i],e[i+1],0),r=(new fm.Vector3).copy(o).sub(r),o=(new fm.Vector3).copy(i).sub(o),o=r.cross(o);return 0<o.z}}]),e}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=void 0;var c=o(n(32)),y=o(n(9)),b=o(n(14)),_=o(n(53)),d=o(n(13)),M=o(n(27)),T=o(n(10)),f=o(n(2)),p=o(n(3)),m=o(n(149)),S=o(n(47)),v=o(n(500)),g=o(n(231)),x=o(n(514)),w=o(n(516)),E=o(n(531)),A=o(n(42)),I=o(n(94)),L=o(n(66)),R=n(532),N=n(533);function k(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=P(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function P(e,t){if(e){if("string"==typeof e)return C(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n=function(){function n(e,t){(0,f.default)(this,n),this._scenes={},this._materialManager=new v.default(t,e),this._raycaster=new fm.Raycaster,this._focusAlphaMode=e._focusAlphaMode,this._focusAlpha=e._focusAlpha,this._map=t,this._externalModelUrl=e.mapServerURL+"/models/",this._externalLoader=new w.default(this._map,this._externalModelUrl,"fengmap"==e.mapServerURL,e.key),this._dynamicLoader=new E.default(this._map),this._externalLoader.setLoadedBack(function(){t.dispatchEvent({type:"externalLoaded"}),t.dispatchEvent({type:"gltfLoaded"}),t.checkNode(),t.setRenderList()}),this.isNeedSweep=t.MapOptions.isNeedSweep,this.sweepMax=t.MapOptions.sweepMax,this.sweepMin=t.MapOptions.sweepMin}return(0,p.default)(n,[{key:"createCompassNode",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t=1<arguments.length?arguments[1]:void 0,n=2<arguments.length?arguments[2]:void 0,r=3<arguments.length?arguments[3]:void 0,i=4<arguments.length?arguments[4]:void 0,t=t||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAGhUlEQVR4nOWbzW/cRBjGn7HHY7u7m8RLojIF8SFUUQECFQqnimsF/wAgEIiWKEqgH+LjAJxRDwjU0kIEpZWASvQvAM6IEy1IILUqogiEaKZVluxu1tv1ztgeDvHSELLJfno3yU/KIfaM93kfjz2ej5fMzc2hEzjnLZUTQowCeBzAgwDuBbALAAfgAcgkxaoASgDmAFwG8AuAnwF8yzkvdySwRUg/DBBC3APgOQBPEEIeZYzVKKV1SqmklErTNEPDMGJCSAwAWmsjjmMjiiIahiFL/mwppau1Pg/gawBnOee/dSR2DXpmgBDCBPA0gGnTNB9zHGfRcZwqYyzoRqCU0gmCIBMEwUgURd8DmAVwjnMedXPdBl0bkAR+GMB7juNUtm3bVrJtu9YLcSup1+vujRs3xoIgyAF4DcDxbo3oygAhxEsATrmuW85mswuUUtWNmFYJw9DyfT9fq9VGAUxyzj/t9FqdGnAfgBnLsg6MjIxcZ4zVOxXQDVJKe3FxcbtS6jSAjzjnl9q9RicGzBBCTmaz2flsNltqt3I/8H1/zPf9Ca31K5zzj9qp264BR03TfNXzPGFZ1kDuejOUUnaxWORRFL3HOX+r1XpGG79xjDF2aHx8/M9hCx4ALMuqj4+P/8kYOyyEONZqvVYNOGHb9v58Pn/VMIy4Q419xzCMOJ/PX7Vte78Q4kRLdVooc8y27Rfy+bwghOguNfYdQojO5/PCtu0XWmkJ6xlwlDE26XnetR7pSw3P864xxiaFEEfXKreWATPJC29uI9z5lRBCtOd5c6ZpviqEmGlWrpkBDxBCTnqeJ4b5mV8PwzBiz/MEIeSkEOL+Vcs0qTudy+Xmh/Ft3y6WZdVzudw8gOnVzq9mwIxlWS9mMpmh+MjpBZlMpmRZ1gEhxOTKcys/hCgAOax9fTcopexCoXAnALp8ALWyBRx2XXdxswUPLD0KruuWsTRy/ZflLYACkBMTE3+kNapLmzAMrfn5+bsAMM55CPy3BTzrOE5lswYPAJRS5TiOD+DZxrHlBkxvphdfMzKZTBHLeoSGAfdRSnd3O321EWCMBZTS3Y3vgoYBTzuOUxmgrlRJYn0KuGnAPtu2q4OTlC5JrPuAJQPGCCF7tkLzb8AYCwghe4QQYwaAvYyxvsziDjNJzHsNAA9RSjfdh896JDE/ZADYRSmVgxaUNknMuwwAO7ewATsNALebphkOWlDaJDHfbgAY2ciTHp2SxDxqAMg1Vmm3EknM2XbWBTYVWmsCQBoAKlrrLWdEEnPFALAYx/GWMyCJuWIA+CuKIjpoQWkTx7EJ4LoB4NcwDNmgBaVNEvOvBoDLW9iAywaAn8IwtActKG2SmH8yAHwnpXQHLShtkpi/MwCUtNYXpJTOoEWlhZTS0Vpf4JyXGt3f1/V6PbNmrU1EEus3wM0psbO1Wm1kcJLSJYn1C+CmAVeiKDq/Fd4FUko3iqLznPMrwH/XBWar1erogHSlRhLjbOP/5QacC4IgF4ahlb6sdAjD0Ep2mZ5rHFtuQAjgDd/386krS4kkttcb64LA/1eHj9VqtVGl1Kb7MFJK2cnW2uPLj680IAIwVS6Xt6emLCWSmKZWbq5ebRj8iVLqdLVaHUtHWv/xfX9MKXWac/7JynPN5gFmK5XKhFJqww+SlFK27/sTAFbdQ9zMgIta60PFYnHHRp4siePYKBaLO7TWU812kq8V3Mkoit5PLkD6pLFvaK1JsVjckWyePtWs3Hp3900p5alSqXRrj/X1nVKpdKuU8hTn/M21yrXSvI8EQfBZsVjkG6ElJHeeB0HwGef8yHrlW32+DwZBcGZhYeG2YX4nxHFsLCws3BYEwRnO+cFW6rQTzBEp5QeFQuGOYewdlFKsUCjcIaX8oJU736CTlJmXCSEncrnc/LBsqqpWq2OVSmVCa32Qc/5hO3U7TZq6H8C0ZVkHRkdHrw9qY6VSyi6Xy42kqVnO+cV2r9Ft2twkgI9d113M5XJ/p7XKHEURrVQqtyQTG1NrdXPr0YvESQrgDQDvOI5TyWQypX7tN5JSOtVqtZE4+TaAd5eP7Dqhl6mzDMAzAKZM09zjuu6ibds9SZ2t1+uZWq02EkXRBQAfA/iSc96TTR39TJ5+HsCThJCHGWM3LMuqJ4nTaq3k6SiKrDAMmVLKllJu01r/COArAJ8PdfJ0M4QQY1hKn38ESxmndwPYjtXT568B+B3AJQA/YCl9vq89zT/uIvNLxH1bgwAAAABJRU5ErkJggg==",n=n||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODc3NkExOTBBM0QwMTFFNkI4Rjk5RTE2MjhCMzFCODAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODc3NkExOTFBM0QwMTFFNkI4Rjk5RTE2MjhCMzFCODAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozRkM2NUZGNUEzQ0MxMUU2QjhGOTlFMTYyOEIzMUI4MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozRkM2NUZGNkEzQ0MxMUU2QjhGOTlFMTYyOEIzMUI4MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvSIOBAAAAKaSURBVHja7JvLTuMwFECddNQPQEhVNMCkCJHhESqxa5o9YofEewV7EJ3Zt0gzHzDzPbPvY1vmBwZaEOqCRXeoPIqdelBTQpu0tYPta+lKIdjXV+ceG1SB1ul0kMpDR4oPAAAAAAAAAAAAAAAAAACg6vjEKnGtVhs25TOOP6lUijxv4LgZNNkwDOkM+IVjhcZv1Y6AjWOn5+tt+k4ZAIW+vXX6TgkAK33d/z/Iu1UVABTf2TcWC/QYur874Pu7dI60AApD9uRuAU8ASzj2Qswjc5ZlBFAMuR9XC3SO3d+PMH+frpEGQCHiXtws4AHgK46DEdaRNZYMAIoj7kPWnIsOwIp49oPuAktkAKT7iTHWJ1jfBTrj7h9MIM8hjkURARyN2f1eC45FBLD5QXNxA2B+0Fy+obH6+4BHy3rQm82hnzk2cbypoNXyFzk19Wzc3SVY1MnsQ1GkaW291ZpM/unpe+GOwOP8/N+JJVtYuBAOwFM6/QPpE0hPcpjmT+HuAHwEUNt1/yVLpYEX2G3QHdA7XPdSK5XSBqM6mf4m+LC2djKWBWQtycFwMDWADGzBJbbgy0gG4LUId59kEtIAzwLbHs0Cssa2T1nXx9wAasEVtmAukgGuW0fUHKENoBacRrKAU/e5GeBZkMtdJcvluVAG5HJ1VC6/3hvCG0B/IpyFsqB785/xqoubAZ4FjlNPViqzAw1wnAaqVHymSGFAKAu63f/GsyauBlALGtiCmUADHOca9RkilQHUgnygBd3u53nXw90Az4JstpGsVmd8BmSz16hanQ1MJZMBngWZTN4HiDxnMt/jqCUWA3rvAs+Ad86+tAZ4ANbXt55Ms41I4Oe46tDgf4YUHwAAAAAAAAAAAAAAAAAAQNXxIsAAkfC85URYZVgAAAAASUVORK5CYII=",a=new x.default;return a.transparent=!0,a.uniforms.scale={value:e},a.uniforms.offset={value:new fm.Vector2(r,i)},a.uniforms.mapfront={},a.uniforms.mapBack={},a.uniforms.mapfront.value=this._materialManager.loadTexture(n,function(e){e.flipY=!0,a.needsUpdate=!0}),a.uniforms.mapBack.value=this._materialManager.loadTexture(t,function(e){e.flipY=!0,a.needsUpdate=!0}),t=new g.default,t=new fm.Mesh(t,a),t.userData.coord={x:r,y:i},t.userData.width=.5*e,t.frustumCulled=!1,t}},{key:"getModel",value:function(e,t,n,r){return e=this._scenes[e],e?(t=e.getGroupsModels(t),this._raycaster.setFromCamera(n,r),t=this._raycaster.intersectObjects(t),t):[]}},{key:"getExternalModels",value:function(e,t,n,r){return e=this._scenes[e],e?(t=e.getGroupsExternalModels(t),this._raycaster.setFromCamera(n,r),t=this._raycaster.intersectObjects(t),t):[]}},{key:"getModelExternal",value:function(e,t,n,r){var i=this._scenes[e];return i?(e=i.getGroupsModels(t),t=i.getGroupsExternalModels(t),t=(0,c.default)(e).call(e,t),this._raycaster.setFromCamera(n,r),t=this._raycaster.intersectObjects(t),t):[]}},{key:"getMarkers",value:function(e,t,n,r){var i=this._scenes[e];if(!i)return[];for(var a=[],o=0;o<t.length;o++)for(var s=i.getAllImageMarker(t[o]),l=0;l<s.length;l++)a.push(s[l]);return this._raycaster.setFromCamera(n,r),this._raycaster.perspective="PerspectiveCamera"===r.type,r=this._raycaster.intersectObjects(a),r}},{key:"getNode",value:function(e,t,n,r,i){var a=this._scenes[e];if(!a)return[];e=a.getNodesExceptFacility(t,i),t=a.getDynnodes(i,t),this._raycaster.setFromCamera(n,r),this._raycaster.perspective="PerspectiveCamera"===r.type;var e=this._raycaster.intersectObjects(e),o=this._raycaster.intersectObjects(t,!0);if(o[0])for(var s=o[0].object;s.parent;){if(s.parent.mapNode){o[0].object=s.parent;break}s=s.parent}return o[0]&&e[0]?o[0].distance>e.distance?e:o:o[0]?o:e[0]?e:[]}},{key:"getFacility",value:function(e,t,n,r,i){if(e=this._scenes[e],!e)return[];i=e.getFacilityByFilter(t,i),this._raycaster.setFromCamera(n,r),this._raycaster.perspective="PerspectiveCamera"===r.type;for(var a=this._raycaster.intersectObjects(i),o=0;o<a.length;o++)if(o){if(!(a[o].distance-a[o-1].distance<1e-6))break;if("number"==typeof a[o].object.material.priority&&"number"!=typeof a[o-1].object.material.priority){var s=a[o],l=a[o-1];a[o-1]=s,a[o]=l}else if("number"==typeof a[o].object.material.priority&&"number"==typeof a[o-1].object.material.priority)for(var u=0,h=1;h<=o&&a[o-u].object.material.priority>a[o-h].object.material.priority;h++){var c=a[o-u],d=a[o-h];a[o-h]=c,a[o]=d,u++}}return a}},{key:"getGroupLength",value:function(e){return this._scenes[""+e].groupLength}},{key:"getGroupIds",value:function(e){return this._scenes[""+e].groupIds}},{key:"getGroup",value:function(e,t){return this._scenes[""+e].groups[t+""]}},{key:"getRenderList",value:function(){if(this._scenes){var e,t=[];for(e in this._scenes){var n=this._scenes[e].getRenderGroup();t.push(n)}return t}}},{key:"conformatScene",value:function(e,t,n){e=new m.default(t,e,this),e.parent=this,this._scenes[t+""]=e,this._scenes[t+""].theme=n}},{key:"checkMaterialAlpha",value:function(e,t){var n;if(e)if(this._focusAlphaMode&&t!==this._map.currentFocusGroup&&(0,y.default)(n=this._map.otherFocus).call(n,t)<0){if((0,b.default)(e.material)){var r,i=k(e.material);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.opacity=this._focusAlpha}}catch(e){i.e(e)}finally{i.f()}}else if(e.material)if(void 0===e.material.length)e.material.opacity!==this._focusAlpha&&(e.material.opacity=this._focusAlpha);else for(var o=0;o<e.material.length;o++)e.material[o].opacity!==this._focusAlpha&&(e.material[o].opacity=this._focusAlpha)}else if((0,b.default)(e.material)){var s,l=k(e.material);try{for(l.s();!(s=l.n()).done;){var u=s.value;"number"==typeof u.userData.opacity&&(u.opacity=u.userData.opacity)}}catch(e){l.e(e)}finally{l.f()}}else void 0!==e.material&&"number"==typeof e.material.userData.opacity&&(e.material.opacity=e.material.userData.opacity)}},{key:"checkNodeByFrustum",value:function(e,l,t,u,h){var c=this;if(c._scenes[h+""]){var d=c._scenes[h+""].theme,f=this._scenes[""+h].center.x,p=this._scenes[""+h].center.y,m=this._scenes[""+h].mapcenter.x,v=this._scenes[""+h].mapcenter.y,g=this._map.labelLanguage;I.default[this._map.uuid].bbox=this._scenes[""+h].bboxTh,I.default[this._map.uuid].bbox.uuid=this._map.uuid;var n=this._scenes[""+h].groups;try{var r,i=(0,_.default)(n),a=function(e){var s=n[e];if((0,y.default)(t).call(t,s.eid)<=-1)return s.visible=!1,"continue";s.visible=!0,s.traverseByAlias(["extent","model","label","facility","externalModel"],function(r,e){var t=r.bdata,t=-1===t.minlevel||-1===t.maxlevel||0!==t.minlevel&&!t.minlevel||!t.maxlevel||t.minlevel<=u&&t.maxlevel>u;if(t){switch(e){case"extent":r.renderNodeInited?c.checkMaterialAlpha(r.renderNode,s.eid):c.createExtent(r,h,s.eid);break;case"model":r.renderNodeInited?(c.checkMaterialAlpha(r.renderNode,s.eid),c.checkMaterialAlpha(r.line,s.eid)):c.createModel(r,h,s.eid);break;case"label":r.renderNodeInited?c.checkMaterialAlpha(r._renderNode,s.eid):r.tryInit||c.createLabel(r,h,g,s.eid);break;case"facility":r.renderNodeInited?c.checkMaterialAlpha(r._renderNode,s.eid):c.createFacility(r,h,s.eid);break;case"externalModel":if(r.renderNodeInited)c.checkMaterialAlpha(r._renderNode,s.eid);else{var i=r.bdata,a=r.gdata,o=d.getExteralModelTheme(i.fid);if(!o)return;c._externalLoader.preLoadModels[o.normalid]||(c._externalLoader.preLoadModels[o.normalid]={loaded:!1,isLoading:!1,modelUrl:o.model,model:null,geometry:null,material:null});var n=c._externalLoader.preLoadModels[o.normalid];n.loaded?c.createExterModel(n.geometry,n.material,a,i,o,r,f,p,s.height,m,v,n.isGltf):(c._externalLoader.waitingBacks[o.normalid]?c._externalLoader.addWaitingBacks(o.normalid,function(e,t,n){c.createExterModel(e,t,a,i,o,r,f,p,s.height,m,v,"js"!==n)},i.fid):c._externalLoader.addWaitingBacks(o.normalid,function(e,t,n){c.createExterModel(e,t,a,i,o,r,f,p,s.height,m,v,"js"!==n)},i.fid),n.isLoading||c._externalLoader.load(o.normalid))}}r.checkByFrustum(l)}else r.visible=!1})},o=k(i);try{for(o.s();!(r=o.n()).done;){var s=r.value;a(s)}}catch(e){o.e(e)}finally{o.f()}}catch(e){console.error("渲染楼层失败!",e)}}}},{key:"createModel",value:function(e,t,n){var r=this._scenes[""+t].center.x,i=this._scenes[""+t].center.y,a=this._scenes[""+t].mapcenter.x,o=this._scenes[""+t].mapcenter.y,s=this._scenes[""+t].theme,l=e.gdata,u=e.bdata;this._map.MapOptions.useStoreApply&&(h=s.getStoreApplyTheme(u.fid));var h=h||s.getModelTheme(u),s=null,s=1===this._map.dataManager.file_ver?S.default.convertGeo2Geometry(l.geo):S.default.convertArray2Geometry(l.idxs,l.pts);e._data=s,u=l.height&&-1!==l.height?l.height:2,s=this.createGeometry(s,u,t),t=this._materialManager.createNormalMaterial(h),e._geometry=s,s=this.isNeedSweep,this.isNeedSweep&&(fm.ShaderLib.physical.vertexShader=R.vertexShader,fm.ShaderLib.physical.fragmentShader=N.fragmentShader,(0,d.default)(fm.ShaderLib.physical.uniforms,{maxPos:{value:this.sweepMax},minPos:{value:this.sweepMin},relativeModelMatrix:{value:void 0}})),e.initMesh(t,new fm.Vector3(r,i+u,0),s),e.x=a,e.y=o,e.height=u,e.currHeight=u,this.checkMaterialAlpha(e.renderNode,n),e.initLine(this._materialManager.createLineMaterial(h),l.height),this.checkMaterialAlpha(e.line,n),h.image&&h.sizes&&(l=h.sizes.split(","),n=[],h.coords&&(n=h.coords.split(",")),e.addStoreImage({image:h.image?this._map.MapOptions.mapThemeURL+"/"+this._map.MapOptions.defaultThemeName+"/"+h.image:"",angle:h.angle||0,size:[(0,M.default)(l[0]),(0,M.default)(l[1])],mapCoord:h.coords?new fm.Vector2((0,M.default)(n[0]),(0,M.default)(n[1])):void 0}))}},{key:"createExtent",value:function(e,t,n){var r=e.gdata,i=this._scenes[t+""].theme,a=this._scenes[""+t].center.x,o=this._scenes[""+t].center.y,s=this._scenes[""+t].mapcenter.x,l=this._scenes[""+t].mapcenter.y,u=null,u=1===this._map.dataManager.file_ver?S.default.convertGeo2Geometry(r.geo):S.default.convertArray2Geometry(r.idxs,r.pts);e._geometry=this.createGeometry(u,r.height||1,t),e.x=s,e.y=l,l=this._materialManager.createNormalMaterial(),e.initMesh(l,new fm.Vector3(a,o,0),i.floorColor,i.floorOpacity),this.checkMaterialAlpha(e.renderNode,n)}},{key:"createLabel",value:function(e,t,n,r){var i=e.gdata,a=e.bdata,o=this._scenes[""+t].mapcenter.x,s=this._scenes[""+t].mapcenter.y,l=this._scenes[""+t].center.x,u=this._scenes[""+t].center.y,h=this._scenes[t+""].theme,t=null,t=1===this._map.dataManager.file_ver?S.default.convertGeo2Points(i.geo):S.default.convertArrayPoints(i.idxs,i.pts),i=-1===i.height?2.2:i.height,s=new fm.Vector3(t.vertices[0].x-o,-t.vertices[0].y+s,0).applyEuler(new fm.Euler(Math.PI/2,0,0,"XYZ")).add(new fm.Vector3(l,u+i,0)),l=a.ename,u=a.name,l=n===L.default.ZH?u:l;e.x=t.vertices[0].x,e.y=t.vertices[0].y,e.height=i,e.pos=s,e.tryInit=!0,a=h.getLabelTheme(a),a&&(e.theme=a,e.size=1.4*a.fontsize,l&&(a=this._materialManager.createLabelMaterial(l,a,!1,e),e.initSprite(a,(new fm.Vector3).copy(s)),this.checkMaterialAlpha(e._renderNode,r),e.setSize()))}},{key:"createFacility",value:function(e,t,n){var r=e.gdata,i=e.bdata,a=this._scenes[""+t].center.x,o=this._scenes[""+t].center.y,s=this._scenes[""+t].mapcenter.x,l=this._scenes[""+t].mapcenter.y,u=this._scenes[t+""].theme,t=null,t=1===this._map.dataManager.file_ver?S.default.convertGeo2Points(r.geo):S.default.convertArrayPoints(r.idxs,r.pts),r=-1===r.height?2.2:r.height,o=new fm.Vector3(t.vertices[0].x-s,-t.vertices[0].y+l,0).applyEuler(new fm.Euler(Math.PI/2,0,0,"XYZ")).add(new fm.Vector3(a,o+r,0)),u=u.getPoiTheme(i),i=this._materialManager.createPoiMaterial(u,e);e.x=t.vertices[0].x,e.y=t.vertices[0].y,e.height=r,e.pos=o,u.height&&(e.size=u.height),this._map.wxInfo.pixelRatio&&(e.size*=this._map.wxInfo.pixelRatio),e.initSprite(i,(new fm.Vector3).copy(o)),this.checkMaterialAlpha(e._renderNode,n),e.setSize()}},{key:"everGroup",value:function(e,t){for(var n=0;n<e.biz.length;n++){for(var r=0;r<e.biz[n].extentLayer.length;r++)t(e.geo[n].extentLayer[r],"extentLayer",e.biz[n].extentLayer[r]);for(var i=0;i<e.biz[n].labelLayer.length;i++)t(e.geo[n].labelLayer[i],"labelLayer",e.biz[n].labelLayer[i]);for(var a=0;a<e.biz[n].modelLayer.length;a++)t(e.geo[n].modelLayer[a],"modelLayer",e.biz[n].modelLayer[a]);for(var o=0;o<e.biz[n].poiLayer.length;o++)t(e.geo[n].poiLayer[o],"poiLayer",e.biz[n].poiLayer[o]);for(var s=0;s<e.biz[n].stairLayer.length;s++)t(e.geo[n].stairLayer[s],"stairLayer",e.biz[n].stairLayer[s]);for(var l=0;l<e.biz[n].externalModelLayer.length;l++)t(e.geo[n].externalModelLayer[l],"externalModelLayer",e.biz[n].externalModelLayer[l])}}},{key:"createGeometry",value:function(e,t,n){var r=e.vertices;function i(e){for(var t=[],n=0;n<e.length;n+=2){var r=(e.length-n)/2;t[2*(r-1)]=e[n],t[2*(r-1)+1]=e[n+1]}return t}var a=S.default.checkClockwise(r);if(a||(r=i(r),e.vertices=r),6<=r.length){var o=new fm.Shape,s=this._scenes[""+n].mapcenter.x,l=this._scenes[""+n].mapcenter.y;if(e.holes&&0<e.holes.length){var u={};for(b in e.holes){var h=e.holes[b],c=S.default.checkClockwise(h);c||(h=i(h),e.holes[b]=h);for(var d=0;d<h.length;d+=2){var f=h[d]+"-"+h[d+1];u[f]=!0}}for(b in this.forEachVertForShape(r,function(e,t,n){e?o.moveTo(t-s,n-l):u[t+"-"+n]||o.lineTo(t-s,n-l)}),e.holes){var h=e.holes[b],p=new fm.Path;this.forEachVertForShape(h,function(e,t,n){e?p.moveTo(t-s,n-l):p.lineTo(t-s,n-l)}),o.holes.push(p)}}else this.forEachVertForShape(r,function(e,t,n){e?o.moveTo(t-s,n-l):o.lineTo(t-s,n-l)});for(var m=0==t?new fm.ShapeGeometry(o):new fm.ExtrudeGeometry(o,{depth:t,bevelEnabled:!1}),v=I.default[this._map.uuid].bbox.min.x,g=I.default[this._map.uuid].bbox.min.y,y=I.default[this._map.uuid].bbox.max.x-I.default[this._map.uuid].bbox.min.x,_=I.default[this._map.uuid].bbox.max.y-I.default[this._map.uuid].bbox.min.y,x=m.faces,w=x.length,b=0;b<w;b++){var M=m.vertices[x[b].a],T=m.vertices[x[b].b],E=m.vertices[x[b].c];m.faceVertexUvs[0][b][0].x=(M.x-v)/y,m.faceVertexUvs[0][b][0].y=(M.y-g)/_,m.faceVertexUvs[0][b][1].x=(T.x-v)/y,m.faceVertexUvs[0][b][1].y=(T.y-g)/_,m.faceVertexUvs[0][b][2].x=(E.x-v)/y,m.faceVertexUvs[0][b][2].y=(E.y-g)/_}return m.computeBoundingSphere(),{geometry:m,shape:o}}return null}},{key:"createExterModel",value:function(e,t,n,r,i,a,o,s,l,u,h,c){var d=this,f=null,f=1===this._map.dataManager.file_ver?S.default.convertGeo2Points(n.geo):S.default.convertArrayPoints(n.idxs,n.pts),o=new fm.Vector3(f.vertices[0].x-u,-f.vertices[0].y+h,0).applyEuler(new fm.Euler(Math.PI/2,0,0,"XYZ")).add(new fm.Vector3(o,s+(-1===n.height?2.2:n.height),0));if(c){var s=e.scene,p=s.clone();p.traverse(function(e){if(e instanceof fm.Mesh){if(void 0!==e.material.length)for(var t=0;t<e.material.length;t++)e.material[t]=e.material[t].clone(),e.material[t].color=new fm.Color(A.default.toColor(i.color)),e.material[t].needsUpdate=!0,e.material[t].userData.opacity=e.material[t].opacity;else e.material=e.material.clone(),d.isNeedSweep&&(e.name="isNeedSweep",e.material.uniforms={maxPos:{value:d.sweepMax},minPos:{value:d.sweepMin},relativeModelMatrix:{value:e.matrixWorld}}),e.material.transparent=!0,e.material.color=new fm.Color(A.default.toColor(i.color)),e.material.needsUpdate=!0,e.material.userData.opacity=e.material.opacity;e.renderOrder=r.eid}});var m=i.scale.split(","),c=i.rotate.split(","),v=i.translate.split(","),s=new fm.Vector3;s.set((0,M.default)(c[0])*fm.Math.DEG2RAD,(0,M.default)(c[2])*fm.Math.DEG2RAD,(0,M.default)(c[1])*fm.Math.DEG2RAD),p.rotation.setFromVector3(s,"YXZ"),p.scale.set((0,M.default)(m[0]),(0,M.default)(m[2]),(0,M.default)(m[1])),o.add(new fm.Vector3((0,M.default)(v[0]),(0,M.default)(v[2]),(0,M.default)(v[1]))),p.position.set(o.x,o.y,o.z),a.renderNode=p,a.x=f.vertices[0].x+(0,M.default)(v[0]),a.y=f.vertices[0].y+(0,M.default)(v[1]),a.height=-1===n.height?2.2:n.height,a._renderNode&&(a._renderNode.frustumCulled=!1,a.renderNodeInited=!0)}else{if((0,b.default)(t)){var g,y=k(t);try{for(y.s();!(g=y.n()).done;){var _=g.value;_.color=new fm.Color(A.default.toColor(i.color)),_.transparent=!0,(0,T.default)(_)&&((0,T.default)(_).wrapS=fm.RepeatWrapping,(0,T.default)(_).wrapT=fm.RepeatWrapping,_.color.setScalar(1)),_.userData.opacity=_.opacity}}catch(e){y.e(e)}finally{y.f()}}else t.color=new fm.Color(A.default.toColor(i.color)),t.transparent=!0,(0,T.default)(t)&&((0,T.default)(t).wrapS=fm.RepeatWrapping,(0,T.default)(t).wrapT=fm.RepeatWrapping,t.color.setScalar(1)),t.userData.opacity=t.opacity;var x=[];if(void 0!==t.length)for(var w=0;w<t.length;w++)x.push(t[w].clone());else x.push(t.clone());m=new fm.Mesh(e,x),p=i.scale.split(","),v=i.rotate.split(","),e=i.translate.split(","),m.scale.set((0,M.default)(p[0]),(0,M.default)(p[2]),(0,M.default)(p[1])),p=new fm.Vector3,p.set((0,M.default)(v[0])*fm.Math.DEG2RAD,(0,M.default)(v[2])*fm.Math.DEG2RAD,(0,M.default)(v[1])*fm.Math.DEG2RAD),m.rotation.setFromVector3(p,"YXZ"),o.add(new fm.Vector3((0,M.default)(e[0]),(0,M.default)(e[2]),(0,M.default)(e[1]))),m.position.set(o.x,o.y,o.z),m.renderOrder=r.eid,a.renderNode=m,a.x=f.vertices[0].x+(0,M.default)(e[0]),a.y=f.vertices[0].y+(0,M.default)(e[1]),a.height=-1===n.height?2.2:n.height,a._renderNode&&(a._renderNode.frustumCulled=!1,a.renderNodeInited=!0)}}},{key:"findGltfMesh",value:function(e,t){if(e instanceof fm.Mesh)t(e);else{var n,r=k(e.children);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.findGltfMesh(i,t)}}catch(e){r.e(e)}finally{r.f()}}}},{key:"getDynLoader",value:function(){return this._dynamicLoader}},{key:"getSceneCenter",value:function(e){return(new fm.Vector3).copy(this._scenes[e+""].center)}},{key:"forEachVertForShape",value:function(e,t){var n=0;for(t(!0,e[n],e[n+1]),n=2;n<e.length;n+=2)t(!1,e[n],e[n+1]);n=0,t(!1,e[n],e[n+1])}},{key:"getCurrentNodeCenter",value:function(e,t){for(var n=this._scenes[t],t=n.center,r=0,i=0;i<e.length;i++)r+=e[i]*n.space;return new fm.Vector3(t.x,t.y+r/e.length,0)}},{key:"getHeight",value:function(e,t){return this._scenes[""+e].getHeight(t)}},{key:"getSceneById",value:function(e){return this._scenes[""+e]}},{key:"dispose",value:function(){for(var e in this._materialManager.dispose(),this._scenes)this._scenes[e].dispose(),this._scenes[e].parent=void 0;this._map=void 0,this._scenes=void 0,this._materialManager=void 0}},{key:"disposeById",value:function(e){this._scenes[e].dispose(),this._scenes[e].parent=void 0,this._scenes[e]=void 0}},{key:"map",get:function(){return this._map}},{key:"materialManager",get:function(){return this._materialManager}}]),n}(),t.default=n},function(e,t){var n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){e.exports=n(431)},function(e,t,n){var r=n(133),i=n(99),n=n(24),a=n("toStringTag"),o="Arguments"==i(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(e){}};e.exports=r?i:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(e=s(t=Object(e),a))?e:o?i(t):"Object"==(e=i(t))&&"function"==typeof t.callee?"Arguments":e}},function(e,t,n){var r,i,a,o,s,l,u,h=n(181),c=n(18),d=n(23),f=n(39),p=n(37),m=n(127),v=n(103),g=n(83),y=c.WeakMap,n=function(e){return _(e)?l(e):s(e,{})},c=function(n){return function(e){var t;if(!d(e)||(t=l(e)).type!==n)throw TypeError("Incompatible receiver, "+n+" required");return t}},_=h?(r=m.state||(m.state=new y),i=r.get,a=r.has,o=r.set,s=function(e,t){return t.facade=e,o.call(r,e,t),t},l=function(e){return i.call(r,e)||{}},function(e){return a.call(r,e)}):(u=v("state"),g[u]=!0,s=function(e,t){return t.facade=e,f(e,u,t),t},l=function(e){return p(e,u)?e[u]:{}},function(e){return p(e,u)});e.exports={set:s,get:l,has:_,enforce:n,getterFor:c}},function(e,t,n){e.exports=n(373)},function(e,t,n){e.exports=n(403)},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={NaviNodeType_NULL:-1,NaviNodeType_COMMON:0,NaviNodeType_SIDE:1,NaviNodeType_FLOOR:2,NaviNodeType_EXTENT:3,NaviLiftType_NULL:0,NaviLiftType_Lift:1,NaviLiftType_Stair:2,NaviLiftType_Escalator:3,NaviLiftType_Accessible:4,NaviLiftEntry_BOTH:0,NaviLiftEntry_UP:1,NaviLiftEntry_DOWN:2,NaviLiftEntry_FORBID:3,NaviEntranceType_NULL:0,NaviEntranceType_EXIT:1,NaviEntranceType_ENTRANCE:2,NaviEntranceType_ACCESS:3,NaviRoadRank_MAIN:1,NaviRoadRank_MINOR:2,NaviRoadRank_NARROW:3,NaviRoadEntry_BOTH:0,NaviRoadEntry_FORWARD:1,NaviRoadEntry_BACK:2,NaviRoadEntry_FORBID:3,NaviRoadPass_NULL:-1,NaviRoadPass_NOT_THROUGH:0,NaviRoadPass_THROUGH:1,NaviZoneType_NULL:-1,NaviZoneType_PASS_UNRESTRAINT:0,NaviZoneType_PASS_THROUGH:1,NaviZoneType_PASS_NOT_THROUGH:2,NaviZoneType_NO_ENTRY:3,NaviZoneType_CORRIDOR:4,NaviModelPassType_PASS_THROUGH:0,NaviModelPassType_PASS_NOT_THROUGH:1,NaviModelPassType_NOT_PASS:2,NaviModelPassType_DECORATE:3,NaviRoadHinderType_HINDER_GENERAL:0,NaviRoadHinderType_HINDER_HIGH:1,NaviObstructType_MODEL:0,NaviObstructType_EXTENT:1},t.default=n},function(t,e,n){var r=n(175),i=n(300);function a(e){return t.exports=a="function"==typeof r&&"symbol"==typeof i?function(e){return typeof e}:function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},t.exports.default=t.exports,t.exports.__esModule=!0,a(e)}t.exports=a,t.exports.default=t.exports,t.exports.__esModule=!0},function(e,t,n){var x=n(72),w=n(98),b=n(38),M=n(46),T=n(128),E=[].push,n=function(d){var f=1==d,p=2==d,m=3==d,v=4==d,g=6==d,y=7==d,_=5==d||g;return function(e,t,n,r){for(var i,a,o=b(e),s=w(o),l=x(t,n,3),u=M(s.length),h=0,r=r||T,c=f?r(e,u):p||y?r(e,0):void 0;h<u;h++)if((_||h in s)&&(i=s[h],a=l(i,h,o),d))if(f)c[h]=a;else if(a)switch(d){case 3:return!0;case 5:return i;case 6:return h;case 2:E.call(c,i)}else switch(d){case 4:return!1;case 7:E.call(c,i)}return g?-1:m||v?v:c}};e.exports={forEach:n(0),map:n(1),filter:n(2),some:n(3),every:n(4),find:n(5),findIndex:n(6),filterOut:n(7)}},function(e,t,n){"use strict";var r=n(303).charAt,i=n(52),n=n(134),a="String Iterator",o=i.set,s=i.getterFor(a);n(String,"String",function(e){o(this,{type:a,string:String(e),index:0})},function(){var e=s(this),t=e.string,n=e.index;return n>=t.length?{value:void 0,done:!0}:(n=r(t,n),e.index+=n.length,{value:n,done:!1})})},function(e,t){e.exports={}},function(e,t,n){e.exports=n(350)},function(e,t,n){e.exports=n(358)},function(e,t,n){var v=n(33),g=n(194),y=n(46),_=n(72),x=n(112),w=n(195),b=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var r,i,a,o,s,l,u=n&&n.that,h=!(!n||!n.AS_ENTRIES),c=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),f=_(t,u,1+h+d),p=function(e){return r&&w(r),new b(!0,e)},m=function(e){return h?(v(e),d?f(e[0],e[1],p):f(e[0],e[1])):d?f(e,p):f(e)};if(c)r=e;else{if(c=x(e),"function"!=typeof c)throw TypeError("Target is not iterable");if(g(c)){for(i=0,a=y(e.length);i<a;i++)if(o=m(e[i]),o&&o instanceof b)return o;return new b(!1)}r=c.call(e)}for(s=r.next;!(l=s.call(r)).done;){try{o=m(l.value)}catch(e){throw w(r),e}if("object"==typeof o&&o&&o instanceof b)return o}return new b(!1)}},function(e,t,n){e.exports=n(417)},function(e,t,n){e.exports=n(420)},function(e,t){var n,r,e=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}function s(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,u=[],h=!1,c=-1;function d(){h&&l&&(h=!1,l.length?u=l.concat(u):c=-1,u.length&&f())}function f(){if(!h){var e=o(d);h=!0;for(var t=u.length;t;){for(l=u,u=[];++c<t;)l&&l[c].run();c=-1,t=u.length}l=null,h=!1,s(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}e.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||h||o(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=m,e.addListener=m,e.once=m,e.off=m,e.removeListener=m,e.removeAllListeners=m,e.emit=m,e.prependListener=m,e.prependOnceListener=m,e.listeners=function(e){return[]},e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={ZH:"zh",EN:"en",CHN:"zh"},t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.mapOptionMessage=t.tileMessage=t.cerityMessage=void 0,n={warn_nokey:"key%E5%80%BC%E6%9C%AA%E9%85%8D%E7%BD%AE%EF%BC%8C%E8%AF%B7%E8%AE%BF%E9%97%AE%E8%9C%82%E9%B8%9F%E4%BA%91%E6%8E%A7%E5%88%B6%E5%8F%B0%E6%9F%A5%E7%9C%8B%E5%BA%94%E7%94%A8%E5%90%8D%E7%A7%B0%E3%80%82",warn_noappname:"%E5%BA%94%E7%94%A8%E5%90%8D%E7%A7%B0%EF%BC%88appname%EF%BC%89%E6%9C%AA%E9%85%8D%E7%BD%AE%EF%BC%8C%E8%AF%B7%E8%AE%BF%E9%97%AE%E8%9C%82%E9%B8%9F%E4%BA%91%E6%8E%A7%E5%88%B6%E5%8F%B0%E6%9F%A5%E7%9C%8B%E5%BA%94%E7%94%A8%E5%90%8D%E7%A7%B0%E3%80%82",warn_nomapid:"%E5%9C%B0%E5%9B%BEID%E6%9C%AA%E9%85%8D%E7%BD%AE%EF%BC%8C%E8%AF%B7%E8%AE%BF%E9%97%AE%E8%9C%82%E9%B8%9F%E4%BA%91%E6%8E%A7%E5%88%B6%E5%8F%B0%E6%9F%A5%E7%9C%8B%E5%9C%B0%E5%9B%BEID%E3%80%82",warn_keynotright:"%E6%82%A8%E9%85%8D%E7%BD%AE%E7%9A%84key%E5%80%BC%E4%B8%8D%E6%AD%A3%E7%A1%AE%EF%BC%8C%E8%AF%B7%E8%AE%BF%E9%97%AE%E8%9C%82%E9%B8%9F%E4%BA%91%E6%8E%A7%E5%88%B6%E5%8F%B0%E6%A3%80%E6%9F%A5%E6%AD%A4%E5%BA%94%E7%94%A8%E4%B8%8B%E7%9A%84key%E5%80%BC%E3%80%82",warn_offline:"%E6%82%A8%E9%85%8D%E7%BD%AE%E7%9A%84%E5%BA%94%E7%94%A8%E5%90%8D%E7%A7%B0%EF%BC%88appname%EF%BC%89%E6%88%96key%E5%80%BC%E4%B8%8D%E6%AD%A3%E7%A1%AE%EF%BC%8C%E8%AF%B7%E8%AE%BF%E9%97%AE%E8%9C%82%E9%B8%9F%E4%BA%91%E6%8E%A7%E5%88%B6%E5%8F%B0%E6%A3%80%E6%9F%A5%E6%82%A8%E7%9A%84%E5%BA%94%E7%94%A8%E3%80%82",warn_openerror:"%E6%96%87%E4%BB%B6%E8%A7%A3%E6%9E%90%E5%A4%B1%E8%B4%A5",warn_connecterror:"%E6%97%A0%E6%B3%95%E8%BF%9E%E6%8E%A5%E5%88%B0%E8%9C%82%E9%B8%9F%E4%BA%91",warn_downloaderror:"%E4%BB%8E%E8%9C%82%E9%B8%9F%E4%BA%91%E4%B8%8A%E8%8E%B7%E5%BE%97%E5%9C%B0%E5%9B%BE%E6%95%B0%E6%8D%AE%E5%A4%B1%E8%B4%A5",warn_local:"%E6%9C%AC%E5%9C%B0%E9%AA%8C%E8%AF%81%E5%A4%B1%E8%B4%A5"},t.cerityMessage=n,n={noGroup:"目标楼层未初始化,请检查楼层id是否越界,或者等待楼层加载!",noFocus:"焦点层不在可视楼层中,请检查焦点层和可视楼层的参数设置!"},t.tileMessage=n,n={defaultViewCenterError:"地图初始化中心位置错误,请检查fengmap.FMMap初始化参数defaultViewCenter的正确性"},t.mapOptionMessage=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={MODULE_SHORTEST:1,MODULE_BEST:2},t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={ROUTE_SUCCESS:1,ROUTE_FAILED_NO_FMDBDATA:2,ROUTE_FAILED_TOO_CLOSE:3,ROUTE_FAILED_NO_DATA_START:4,ROUTE_FAILED_NO_DATA_END:5,ROUTE_FAILED_NO_STAIR:6,ROUTE_FAILED_NOTSUPPORT:7,ROUTE_FAILED_CANNOT_CALCULATE:8,ROUTE_FAILED_CANNOT_ARRIVE:9,ROUTE_FAILED_WAYPOINT_CALCULATE_ERROR:10,ROUTE_FAILED_NO_STAIR_ARRIVAL:11,ROUTE_FAILED_NO_END_ARRIVAL:12,ROUTE_FAILED_OUTLINE:13,ROUTE_FAILED_NO_DOOR_START:14,ROUTE_FAILED_NO_DOOR_END:15},t.default=n},function(e,t,n){"use strict";var r=n(120),i=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n};e.exports=h,e=Object.create(n(96)),e.inherits=n(79);var a=n(256),o=n(162);e.inherits(h,a);for(var s=i(o.prototype),l=0;l<s.length;l++){var u=s[l];h.prototype[u]||(h.prototype[u]=o.prototype[u])}function h(e){if(!(this instanceof h))return new h(e);a.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",c)}function c(){this.allowHalfOpen||this._writableState.ended||r.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),h.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var a=n(44);e.exports=function(r,i,e){if(a(r),void 0===i)return r;switch(e){case 0:return function(){return r.call(i)};case 1:return function(e){return r.call(i,e)};case 2:return function(e,t){return r.call(i,e,t)};case 3:return function(e,t,n){return r.call(i,e,t,n)}}return function(){return r.apply(i,arguments)}}},function(e,t,n){var r,i=n(33),a=n(170),o=n(125),s=n(83),l=n(173),u=n(124),n=n(103),h=">",c="<",d="prototype",f="script",p=n("IE_PROTO"),m=function(){},v=function(e){return c+f+h+e+c+"/"+f+h},g=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},y=function(){var e=u("iframe"),t="java"+f+":";return e.style.display="none",l.appendChild(e),e.src=String(t),e=e.contentWindow.document,e.open(),e.write(v("document.F=Object")),e.close(),e.F},_=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}_=r?g(r):y();for(var e=o.length;e--;)delete _[d][o[e]];return _()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m[d]=i(e),n=new m,m[d]=null,n[p]=e):n=_(),void 0===t?n:a(n,t)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?r:n)(e)}},function(e,t){e.exports=!0},function(e,t,n){var r=n(99);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var i=n(133),a=n(40).f,o=n(39),s=n(37),l=n(278),n=n(24),u=n("toStringTag");e.exports=function(e,t,n,r){e&&(e=n?e:e.prototype,s(e,u)||a(e,u,{configurable:!0,value:t}),r&&!i&&o(e,"toString",l))}},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(13)),s=i(n(2)),l=i(n(3)),n=function(){function a(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1e3,r=3<arguments.length?arguments[3]:void 0,i=4<arguments.length?arguments[4]:void 0;(0,s.default)(this,a),this._left=(0,o.default)({},e),this._right=(0,o.default)({},t),this._time=n,this._enable=!1,this._countTime=0,this._endBack=r,this._runBack=i,this.speed=1,this._result=(0,o.default)({},e)}return(0,l.default)(a,[{key:"run",value:function(e){var t,n=e*this.speed,r={};if(this._countTime+n>this._time){for(var i in this._left){var a=(this._right[i]-this._left[i])*(this._time-this._countTime)/this._time;this._result[i]+=a,r[i]=a}return this._enable=!1,this._runBack(this._result,r),this._endBack(this._result,r),this._result={},void(this._countTime=0)}for(t in this._left){var o=(this._right[t]-this._left[t])*n/this._time;this._result[t]+=o,r[t]=o}this._countTime+=n,this._runBack(this._result,r)}},{key:"pause",value:function(){return this._enable=!1,this}},{key:"resume",value:function(){return this._enable=!0,this}},{key:"stop",value:function(){return this._enable=!1,this._countTime=0,this._result=(0,o.default)({},this._left),this}},{key:"start",value:function(){return this._enable=!0,this}},{key:"enable",get:function(){return this._enable},set:function(e){this._enable=e}}]),a}(),n=n;t.default=n},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){var n;t&&(e.super_=t,n=function(){},n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e)}},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(13)),o=i(n(2)),s=i(n(3)),l=(i(n(157)),i(n(55))),n=function(){function e(){(0,o.default)(this,e),this.Id=0,this.point={},this._type=0,this.liftFloors=[],this.segLinks=[],this.liftFlag=0,this.relatedLiftNodes=[],this.treatHead=!1,this.treatTail=!1,this._dist=0,this._visited=!1,this._vPre=[]}return(0,s.default)(e,[{key:"nodeType",get:function(){return 3&this._type},set:function(e){-1!=e&&(this._type|=e)}},{key:"liftType",get:function(){return this._type>>2&7},set:function(e){this._type|=e<<2}},{key:"liftEntry",get:function(){return this._type>>5&3},set:function(e){this._type|=e<<5}},{key:"entranceType",get:function(){return this._type>>7&3},set:function(e){this._type|=e<<7}},{key:"tempType",get:function(){return _type>>9&3},set:function(e){this._type|=e<<9}},{key:"init",value:function(e){this.Id=e,this.point={x:0,y:0},this._type=0,this.liftFlag=0,this.treatHead=!1,this.treatTail=!1}},{key:"equals",value:function(e){return this.Id==e.Id}},{key:"setNode",value:function(e){this.Id=e.Id,this.point=(0,a.default)({},e.point),this._type=e._type,this.liftFloors=[];for(var t=0;t<e.liftFloors.length;t++)this.liftFloors[t]=e.liftFloors[t];this.segLinks=[];for(var n=0;n<e.segLinks.length;n++)this.segLinks[n]=e.segLinks[n];this.liftFlag=e.liftFlag,this.relatedLiftNodes=[];for(var r=0;r<e.relatedLiftNodes.length;r++)this.relatedLiftNodes[r]=e.relatedLiftNodes[r];this.treatHead=e.treatHead,this.treatTail=e.treatTail}},{key:"getLiftFloorsLength",value:function(){return this.liftFloors.length}},{key:"getSegLinksLength",value:function(){return this.segLinks.length}},{key:"contansFloor",value:function(e){if(this.liftType==l.default.NaviLiftType_Stair)return!0;for(var t=this.liftFloors.length-1;0<=t;t--)if(this.liftFloors[t]==e)return!0;return!1}}]),e}(),n=n;t.default=n},function(e,t,n){var r=n(30),i=n(123),a=n(71),o=n(43),s=n(100),l=n(37),u=n(168),h=Object.getOwnPropertyDescriptor;t.f=r?h:function(e,t){if(e=o(e),t=s(t,!0),u)try{return h(e,t)}catch(e){}if(l(e,t))return a(!i.f.call(e,t),e[t])}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(100),i=n(40),a=n(71);e.exports=function(e,t,n){t=r(t),t in e?i.f(e,t,a(0,n)):e[t]=n}},function(e,t,n){var r=n(99),n=n(18);e.exports="process"==r(n.process)},function(e,t,n){var r,i,a=n(18),n=n(105),a=a.process,a=a&&a.versions,a=a&&a.v8;a?(r=a.split("."),i=r[0]+r[1]):n&&(r=n.match(/Edge\/(\d+)/),(!r||74<=r[1])&&(r=n.match(/Chrome\/(\d+)/),r&&(i=r[1]))),e.exports=i&&+i},function(e,t,n){var r=n(16),i=n(24),a=n(86),o=i("species");e.exports=function(n){return 51<=a||!r(function(){var e=[],t=e.constructor={};return t[o]=function(){return{foo:1}},1!==e[n](Boolean).foo})}},function(e,t,n){var i=n(39);e.exports=function(e,t,n,r){r&&r.enumerable?e[t]=n:i(e,t,n)}},function(e,t){function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(16);e.exports=function(e,t){var n=[][e];return!!n&&r(function(){n.call(null,t||function(){throw 1},1)})}},function(e,t,n){e.exports=n(347)},function(e,t,n){var r=n(83),i=n(23),a=n(37),o=n(40).f,s=n(104),l=n(192),u=s("meta"),h=0,c=Object.isExtensible||function(){return!0},d=function(e){o(e,u,{value:{objectID:"O"+ ++h,weakData:{}}})},f=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,u)){if(!c(e))return"F";if(!t)return"E";d(e)}return e[u].objectID},n=function(e,t){if(!a(e,u)){if(!c(e))return!0;if(!t)return!1;d(e)}return e[u].weakData},s=function(e){return l&&p.REQUIRED&&c(e)&&!a(e,u)&&d(e),e},p=e.exports={REQUIRED:!1,fastKey:f,getWeakData:n,onFreeze:s};r[u]=!0},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n="https://console.fengmap.com/api-s/",t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function e(){(0,a.default)(this,e),this.currentModel=null,this.isToggleViewMode=!1,this.externalLoadingCount=0}return(0,o.default)(e,[{key:"dispose",value:function(e){for(var t in this[e])this[e][t]=void 0}}]),e}(),n=new n,n=n;t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={PRIORITY_DEFAULT:1,PRIORITY_LIFTFIRST:2,PRIORITY_ESCALATORFIRST:3,PRIORITY_STAIRFIRST:4,PRIORITY_LIFTONLY:5,PRIORITY_ESCALATORONLY:6,PRIORITY_STAIRONLY:7,PRIORITY_ACCESSIBLEONLY:8,PRIORITY_LIFTFIRST1:9,PRIORITY_ESCALATORFIRST1:10,PRIORITY_STAIRFIRST1:11},t.default=n},function(e,v,t){!function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===m(e)}function n(e){return"boolean"==typeof e}function r(e){return null===e}function i(e){return null==e}function a(e){return"number"==typeof e}function o(e){return"string"==typeof e}function s(e){return"symbol"==typeof e}function l(e){return void 0===e}function u(e){return"[object RegExp]"===m(e)}function h(e){return"object"==typeof e&&null!==e}function c(e){return"[object Date]"===m(e)}function d(e){return"[object Error]"===m(e)||e instanceof Error}function f(e){return"function"==typeof e}function p(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function m(e){return Object.prototype.toString.call(e)}v.isArray=t,v.isBoolean=n,v.isNull=r,v.isNullOrUndefined=i,v.isNumber=a,v.isString=o,v.isSymbol=s,v.isUndefined=l,v.isRegExp=u,v.isObject=h,v.isDate=c,v.isError=d,v.isFunction=f,v.isPrimitive=p,v.isBuffer=e.isBuffer}.call(this,t(259).Buffer)},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(63)),o=i(n(9)),s=i(n(15)),l=i(n(31)),u=i(n(2)),h=i(n(3)),n=function(){function e(){(0,u.default)(this,e),this.keys=[],this.data={}}return(0,h.default)(e,[{key:"clear",value:function(){this.keys=[],this.data={}}},{key:"put",value:function(e,t){null==this.data[e]&&(0,a.default)(this).push(e),this.data[e]=t}},{key:"get",value:function(e){return this.data[e]}},{key:"has",value:function(e){for(var t=(0,a.default)(this).length,n=0;n<t;n++){var r=(0,a.default)(this)[n];if(r==e)return!0}return!1}},{key:"remove",value:function(e){var t,n=(0,o.default)(t=(0,a.default)(this)).call(t,e);-1!=n&&((0,s.default)(t=(0,a.default)(this)).call(t,n,1),this.data[e]=null)}},{key:"each",value:function(e){if("function"==typeof e)for(var t=(0,a.default)(this).length,n=0;n<t;n++){var r=(0,a.default)(this)[n];e(r,this.data[r],n)}}},{key:"entrys",value:function(){for(var e=(0,a.default)(this).length,t=new Array(e),n=0;n<e;n++)t[n]={key:(0,a.default)(this)[n],value:this.data[n]};return t}},{key:"isEmpty",value:function(){return 0==(0,a.default)(this).length}},{key:"size",value:function(){return(0,a.default)(this).length}},{key:"toString",value:function(){for(var e="{",t=0;t<(0,a.default)(this).length;t++,e+=","){var n=(0,a.default)(this)[t];e+=n+"="+this.data[n]}return e+="}",e}},{key:"sort",value:function(){var e;(0,l.default)(e=(0,a.default)(this)).call(e,function(e,t){return e-t})}}]),e}(),n=n;t.default=n},function(e,t,n){var r=n(16),i=n(99),a="".split;e.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==i(e)?a.call(e,""):Object(e)}:Object},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var i=n(23);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(171),i=n(125);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(74),i=Math.max,a=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):a(e,t)}},function(e,t,n){var r=n(126),i=n(104),a=r("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){n=n(45),e.exports=n("navigator","userAgent")||""},function(e,t){},function(e,t,n){var r=n(37),i=n(38),a=n(103),n=n(185),o=a("IE_PROTO"),s=Object.prototype;e.exports=n?Object.getPrototypeOf:function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){"use strict";var r=n(43),i=n(136),a=n(59),o=n(52),n=n(134),s="Array Iterator",l=o.set,u=o.getterFor(s);e.exports=n(Array,"Array",function(e,t){l(this,{type:s,target:r(e),index:0,kind:t})},function(){var e=u(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e,t,n){e.exports=n(351)},function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(e,t,n){var i=n(88);e.exports=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:i(e,r,t[r],n);return e}},function(e,t,n){var r=n(51),i=n(59),n=n(24),a=n("iterator");e.exports=function(e){if(null!=e)return e[a]||e["@@iterator"]||i[r(e)]}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){"use strict";var i=n(53),a=n(453),o=n(196),s=n(202),l=n(35),u=n(456),h=n(91),c=n(0),r=n(1);c(t,"__esModule",{value:!0}),t.default=void 0;var d=r(n(137)),f=r(n(3)),p=r(n(2)),m=r(n(139)),v=r(n(15)),g=r(n(10)),y=r(n(12));function _(t,e){var n,r=i(t);return a&&(n=a(t),e&&(n=o(n).call(n,function(e){return s(t,e).enumerable})),r.push.apply(r,n)),r}function x(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};e%2?l(n=_(Object(r),!0)).call(n,function(e){(0,d.default)(t,e,r[e])}):u?h(t,u(r)):l(n=_(Object(r))).call(n,function(e){c(t,e,s(r,e))})}return t}var w=new m.default,b=function e(t){(0,p.default)(this,e),this.identifier=t.identifier,this.force=void 0===t.force?1:t.force,this.pageX=t.pageX||t.x,this.pageY=t.pageY||t.y,this.clientX=t.clientX||t.x,this.clientY=t.clientY||t.y,this.screenX=this.pageX,this.screenY=this.pageY},m=function(){function e(){(0,p.default)(this,e),w.set(this,{})}return(0,f.default)(e,[{key:"addEventListener",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=w.get(this);r||(r={},w.set(this,r)),r[e]||(r[e]=[]),r[e].push(t),n.capture,n.once,n.passive}},{key:"removeEventListener",value:function(e,t){var n=w.get(this);if(n){var r=n[e];if(r&&0<r.length)for(var i=r.length;i--;)if(r[i]===t){(0,v.default)(r).call(r,i,1);break}}}},{key:"dispatchEvent",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};"function"!=typeof e.preventDefault&&(e.preventDefault=function(){}),"function"!=typeof e.stopPropagation&&(e.stopPropagation=function(){});var t=w.get(this)[e.type];if(t)for(var n=0;n<t.length;n++)t[n](e)}},{key:"dispatchTouchEvent",value:function(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=x({},this),t={changedTouches:(0,g.default)(e=t.changedTouches).call(e,function(e){return new b(e)}),touches:(0,g.default)(e=t.touches).call(e,function(e){return new b(e)}),targetTouches:(0,y.default)(Array.prototype).call((0,g.default)(e=t.touches).call(e,function(e){return new b(e)})),timeStamp:t.timeStamp,target:n,currentTarget:n,type:t.type,cancelBubble:!1,cancelable:!1};this.dispatchEvent(t)}}]),e}();t.default=m},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7));function c(n){var r=d();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,l.default)(n,e);var t=c(n);function n(e){return(0,o.default)(this,n),t.call(this,e)}return(0,s.default)(n,[{key:"raycast",value:function(o,e){var s=this,l=new fm.Vector3,u=new fm.Vector3,h=new fm.Vector3,c=new fm.Vector2,d=new fm.Vector2,f=new fm.Matrix4,p=new fm.Vector3,m=new fm.Vector3,v=new fm.Vector3,g=new fm.Vector2,y=new fm.Vector2,_=new fm.Vector2,x=new fm.Vector4,w=function(e,t,n,r,i,a){c.subVectors(e,n).addScalar(.5).multiply(r),o.perspective&&!s.material.sizeAttenuation&&(x.applyMatrix4(s.modelViewMatrix),c.multiplyScalar(Math.abs(x.z))),void 0!==i?(d.x=a*c.x-i*c.y,d.y=i*c.x+a*c.y):d.copy(c),e.copy(t),e.x+=d.x,e.y+=d.y,e.applyMatrix4(f)};!function(e,t){u.setFromMatrixScale(s.matrixWorld),f.getInverse(s.modelViewMatrix).premultiply(s.matrixWorld),h.setFromMatrixPosition(s.modelViewMatrix);var n=s.material.rotation;0!==n&&(a=Math.cos(n),i=Math.sin(n));var r=s.center;w(p.set(-.5,-.5,0),h,r,u,i,a),w(m.set(.5,-.5,0),h,r,u,i,a),w(v.set(.5,.5,0),h,r,u,i,a),g.set(0,0),y.set(1,0),_.set(1,1);var i,a,n=e.ray.intersectTriangle(p,m,v,!1,l);null===n&&(w(m.set(-.5,.5,0),h,r,u,i,a),y.set(0,1),n=e.ray.intersectTriangle(p,v,m,!1,l),null===n)||(i=p.clone().project(e.camera),a=m.clone().project(e.camera),n=v.clone().project(e.camera),(i.x<-1||1<i.x||i.y<-1||1<i.y)&&(a.x<-1||1<a.x||a.y<-1||1<a.y)&&(n.x<-1||1<n.x||n.y<-1||1<n.y)||(n=e.ray.origin.distanceTo(l),n<e.near||n>e.far||t.push({distance:n,point:l.clone(),uv:fm.Triangle.getUV(l,p,m,v,g,y,_,new fm.Vector2),face:null,object:s})))}(o,e)}}]),n}(fm.Sprite),t.default=n},function(e,t,n){e.exports=n(501)},function(e,t,n){"use strict";var i=n(44),r=function(e){var n,r;this.promise=new e(function(e,t){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=e,r=t}),this.resolve=i(n),this.reject=i(r)};e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var s=i(n(34)),a=i(n(2)),o=i(n(3)),l=i(n(226)),u=i(n(28)),n=function(){function t(e){(0,a.default)(this,t),this._points=e||null,this._groupId=0,this._lineDis=[],this._linePoints=null,this._screenPoints=[],this._screenDis=[],this._radiusPoint=[],this._radiuInit=!1,this._uvys=null,this._minRadius=1,this.needSmooth=!0}return(0,o.default)(t,[{key:"initSegement",value:function(e,t){"number"!=typeof t&&(t=this._minRadius),this._linePoints=this.pointsToLinePnts(e,t),this._uvys=this.computerUVY()}},{key:"pointsToRadius",value:function(e){for(var t,n,r=[],i=new l.default,a=0;a<this._points.length;a++)0<a&&a<this._points.length-1?(n=u.default.distanceOfTwoPoints(r[r.length-1],this._points[a]),t=u.default.distanceOfTwoPoints(this._points[a],this._points[a+1]),t=.5*(t<n?t:n),n=e,t<n&&(n=t),r.push.apply(r,(0,s.default)(i.computerArcLineByPoints(r[r.length-1],this._points[a],this._points[a+1],n||1,12)))):r.push(this._points[a]);this._radiusPoint=r,this._radiuInit=!0}},{key:"pointsToLinePnts",value:function(e,t){this.needSmooth?this._radiuInit||this.pointsToRadius(t):(t=[],t.push.apply(t,(0,s.default)(this._points)),this._radiusPoint=t);for(var n=[],r=0;r<this._radiusPoint.length;r++){var i=this._radiusPoint[r].x-e.x,a=this._radiusPoint[r].z,o=-this._radiusPoint[r].y+e.y;n.push(i,a,o),0!==r&&(a=new fm.Vector3(this._radiusPoint[r].x,this._radiusPoint[r].y,this._radiusPoint[r].z),o=new fm.Vector3(this._radiusPoint[r-1].x,this._radiusPoint[r-1].y,this._radiusPoint[r-1].z),this._lineDis.push(a.distanceTo(o)))}return n}},{key:"getIndexDis",value:function(e){for(var t=0,n=0;n<this._lineDis.length;n++)n<e&&(t+=this._lineDis[n]);return t}},{key:"computerUVY",value:function(){for(var e,t=[],n=this.getIndexDis(this._lineDis.length),r=0;r<this._radiusPoint.length;r++)0===r?t.push(0):r===this._radiusPoint.length-1?t.push(1):(e=this.getIndexDis(r)/n,t.push(e),t.push(e));return t}},{key:"computeScreenCoord",value:function(e,t,n,r){for(var i=[],a=0,o=[],s=e.matrixWorldInverse,l=0;l<this._linePoints.length;l+=3){var u=this._linePoints[l],h=this._linePoints[l+1],c=this._linePoints[l+2],c=new fm.Vector3(u+r.x,h+r.y,c+r.z),c=c.applyMatrix4(s);c.z,e.near,c=c.applyMatrix4(e.projectionMatrix),c=new fm.Vector2(t/2+t/2*c.x,n/2-n/2*c.y),i.push(c),2<l&&(c=c.distanceTo(i[Math.round(l/3)-1]),a+=c,o.push(c))}return this._screenPoints=i,this._screenDis=o,a}},{key:"_calcMinRadius",value:function(){if(this.points){this._minRadius=1;for(var e=0;e<this._points.length-1;e++){var t=this._points[e],n=this._points[e+1],n=.368*u.default.distanceOfTwoPoints(t,n);this._minRadius>n&&(this._minRadius=n)}}}},{key:"points",get:function(){return this._points},set:function(e){this._points=e}},{key:"groupId",get:function(){return this._groupId},set:function(e){this._groupId=e}},{key:"allLength",get:function(){return this.getIndexDis(this._lineDis.length)}},{key:"linePoints",get:function(){return this._linePoints}},{key:"uvys",get:function(){return this._uvys}}]),t}(),n=n;t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t._Math=void 0;var r={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var i=[],e=0;e<256;e++)i[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,r=i[255&e]+i[e>>8&255]+i[e>>16&255]+i[e>>24&255]+"-"+i[255&t]+i[t>>8&255]+"-"+i[t>>16&15|64]+i[t>>24&255]+"-"+i[63&n|128]+i[n>>8&255]+"-"+i[n>>16&255]+i[n>>24&255]+i[255&r]+i[r>>8&255]+i[r>>16&255]+i[r>>24&255];return r.toUpperCase()}}(),clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:n<=e?1:(e=(e-t)/(n-t),e*e*(3-2*e))},smootherstep:function(e,t,n){return e<=t?0:n<=e?1:(e=(e-t)/(n-t),e*e*e*(e*(6*e-15)+10))},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*r.DEG2RAD},radToDeg:function(e){return e*r.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}};t._Math=r},function(t,e,n){"use strict";!function(s){function e(e,t,n,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,a,o=arguments.length;switch(o){case 0:case 1:return s.nextTick(e);case 2:return s.nextTick(function(){e.call(null,t)});case 3:return s.nextTick(function(){e.call(null,t,n)});case 4:return s.nextTick(function(){e.call(null,t,n,r)});default:for(i=new Array(o-1),a=0;a<i.length;)i[a++]=arguments[a];return s.nextTick(function(){e.apply(null,i)})}}void 0===s||!s.version||0===s.version.indexOf("v0.")||0===s.version.indexOf("v1.")&&0!==s.version.indexOf("v1.8.")?t.exports={nextTick:e}:t.exports=s}.call(this,n(65))},function(e,t,n){var r=n(259),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");return e=i(e),void 0!==t?"string"==typeof n?e.fill(t,n):e.fill(t):e.fill(0),e},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){e.exports=n(593)},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!r.call({1:2},1);t.f=a?function(e){return e=i(this,e),!!e&&e.enumerable}:r},function(e,t,n){var r=n(18),n=n(23),i=r.document,a=n(i)&&n(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r=n(75),i=n(127);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.10.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(18),i=n(276),n="__core-js_shared__",n=r[n]||i(n,{});e.exports=n},function(e,t,n){var r=n(23),i=n(76),n=n(24),a=n("species");e.exports=function(e,t){var n;return i(e)&&(n=e.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?r(n)&&(n=n[a],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r=n(85),i=n(86),n=n(16);e.exports=!!Object.getOwnPropertySymbols&&!n(function(){return!Symbol.sham&&(r?38===i:37<i&&i<41)})},function(e,t,n){var r=n(171),n=n(125),i=n.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){n=n(24),t.f=n},function(e,t,n){var r=n(24),n=r("toStringTag"),r={};r[n]="z",e.exports="[object z]"===String(r)},function(e,t,n){"use strict";var m=n(8),v=n(304),g=n(107),y=n(135),_=n(77),x=n(39),w=n(88),r=n(24),b=n(75),M=n(59),n=n(184),T=n.IteratorPrototype,E=n.BUGGY_SAFARI_ITERATORS,S=r("iterator"),A="keys",I="values",L="entries",R=function(){return this};e.exports=function(e,t,n,r,i,a,o){v(n,t,r);var s,l,u=function(e){if(e===i&&p)return p;if(!E&&e in d)return d[e];switch(e){case A:case I:case L:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",c=!1,d=e.prototype,f=d[S]||d["@@iterator"]||i&&d[i],p=!E&&f||u(i),r="Array"==t&&d.entries||f;if(r&&(e=g(r.call(new e)),T!==Object.prototype&&e.next&&(b||g(e)===T||(y?y(e,T):"function"!=typeof e[S]&&x(e,S,R)),_(e,h,!0,!0),b&&(M[h]=R))),i==I&&f&&f.name!==I&&(c=!0,p=function(){return f.call(this)}),b&&!o||d[S]===p||x(d,S,p),M[t]=p,i)if(s={values:u(I),keys:a?p:u(A),entries:u(L)},o)for(l in s)!E&&!c&&l in d||w(d,l,s[l]);else m({target:t,proto:!0,forced:E||c},s);return s}},function(e,t,n){var i=n(33),a=n(305);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,e={};try{n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,n.call(e,[]),r=e instanceof Array}catch(e){}return function(e,t){return i(e),a(t),r?n.call(e,t):e.__proto__=t,e}}():void 0)},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(186);function i(e,t,n){return t in e?r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.exports=i,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(82),n=n(110),n="["+n+"]",i=RegExp("^"+n+n+"*"),a=RegExp(n+n+"*$"),n=function(t){return function(e){return e=String(r(e)),1&t&&(e=e.replace(i,"")),2&t&&(e=e.replace(a,"")),e}};e.exports={start:n(1),end:n(2),trim:n(3)}},function(e,t,n){e.exports=n(380)},function(e,t,n){e.exports=n(414)},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0,r=i(n(142)),i=i(n(114)),n={AudioContext:function(){},URL:{}},(0,r.default)(n.constructor.prototype,i.default.prototype),t.default=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=g;var c=o(n(446)),d=o(n(202)),f=o(n(0));function p(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=m(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function m(e,t){if(e){if("string"==typeof e)return v(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){var n,r=p((0,c.default)(t));try{for(r.s();!(n=r.n()).done;){var i,a=n.value;"constructor"!==a&&"prototype"!==a&&"name"!==a&&(i=(0,d.default)(t,a),(0,f.default)(e,a,i))}}catch(e){r.e(e)}finally{r.f()}}},function(e,t,n){"use strict";var i=n(4),r=n(12),a=n(19),s=n(20),l=n(21),u=n(14),h=n(22),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d,f=c(n(34)),p=c(n(56)),m=c(n(2)),v=c(n(3)),g=c(n(89)),y=c(n(5)),_=c(n(6)),x=c(n(7)),w=c(n(61)),b=c(n(50)),M=c(n(12)),T=c(n(27)),E=c(n(15)),S=c(n(14)),A=c(n(9)),I=c(n(29)),L=c(n(64)),R=c(n(144)),N=c(n(32)),k=c(n(54)),P=c(n(145)),C=c(n(146)),D=c(n(476)),O=c(n(47)),B=c(n(48)),F=c(n(534)),U=c(n(78)),z=c(n(94)),G=c(n(42)),V=c(n(240)),o=c(n(152)),H=c(n(36)),j=c(n(241)),W=c(n(28)),Y=c(n(536)),q=n(67),X=c(n(93)),Z=c(n(148)),J=c(n(541)),K=c(n(242)),Q=n(67),$=c(n(243)),ee=n(244),te=c(n(544)),ne=c(n(545));function re(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=ie(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function ie(e,t){if(e){if("string"==typeof e)return ae(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ae(e,t):void 0}}function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oe(n){var r=se();return function(){var e,t=(0,x.default)(n),t=r?(e=(0,x.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,_.default)(this,t)}}function se(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}function le(a){var e=this.MapOptions.mapThemeURL+"/"+this.MapOptions.defaultThemeName+"/"+this.MapOptions.defaultThemeName+".theme",o=this;this.fmServer.getTheme(e,function(e){o.initTheme(o.MapOptions.defaultThemeName,e,function(n){var e,r=null,t=o.MapOptions.mapServerURL,i="GET";"fengmap"===o.MapOptions.mapServerURL&&(t=X.default+"sdk/auth/downMaps",o.MapOptions.tile&&(t=X.default+"sdk/authLayered/downMaps"),e=Z.default.getCerityData(o.MapOptions.key,o.MapOptions.appName,a),e={newFlag:"2",mapId:e.mapId,keyValue:e.appKey,appName:e.appName,webUrl:e.webURL,keyType:3,isSeparate:o.MapOptions.tile},r=(0,w.default)(e),i="POST"),o.fmServer.getScene(t,a,o.MapOptions.tile,r,i,function(e,t){o.dataExcute(n,e,t,r)},function(e){d&&d(e)}),o._currentSceneId=a})})}o=function(e){(0,y.default)(a,e);var r=oe(a);function a(e){var t,n;return(0,m.default)(this,a),n=r.call(this),n.uuid=fm.Math.generateUUID(),z.default[n.uuid]={},n.wxInfo=new ne.default,void 0!==e.resolutionScale&&(n.wxInfo.pixelRatio=Math.min(n.wxInfo.pixelRatio,e.resolutionScale)),n.MapOptions=new D.default(e,n.wxInfo),n.fmServer=new C.default,n.dataManager=new O.default,n.nodeManager=new B.default(n.MapOptions,(0,g.default)(n)),n.isMarkerTip=!1,e.isMarkerTip&&(n.isMarkerTip=!0),n.isMarkerMove=!1,e.isMarkerMove&&(n.isMarkerMove=!0),n.render=null,n.getRenderOption(),e.lightEffects?z.default.light=!0:z.default.light=!1,n.renderer=new $.default(n.MapOptions,(0,g.default)(n)),n.controls=new fm.OrbitControls("3d"===n.MapOptions.defaultViewMode?n.renderer.perspectiveCamera:n.renderer.orthographicCamera,n.renderer.canvas,(0,g.default)(n)),n.controls.panSpeed*=n.wxInfo.pixelRatio,n.mapScaleLevels=[295829355.45,147914677.73,73957338.86,36978669.43,18489334.72,9244667.36,4622333.68,2311166.84,1155583.42,577791.71,288895.85,144447.93,72223.96,36111.98,18056,9028,4514,2257,1128,564,282,141,70,35,17,8,4,2,1],n._mapScaleLevel=20,n._mapScale=564,n._minScale=1,n._maxScale=295829355.45,n._minScaleLevel=1,n._maxScaleLevel=29,n._animaters=[],n._windowPops=[],n._currentSceneId="10347",n._currentFocusGroup=n.MapOptions.defaultFocusGroup,n._visibleGroups=n.MapOptions.defaultVisibleGroups,n._viewMode=n.MapOptions.defaultViewMode,n.renderer.viewMode=n.MapOptions.defaultViewMode,n._currentTime=(new Date).getTime(),n._showAllGroup=!1,n._lineMarkers=[],n._lastMoveEvent=null,n._mouseHoverTime=0,n._mouseHoverStart=!0,n._compassBG=n.MapOptions.compassBg,n._compassFG=n.MapOptions.compassFg,n.getMapScaleInfo(),n.scaleLevelInit(),n.controlEventInit(),n._loopHander=(0,ee.doAnimationFrame)((0,b.default)(t=n.update).call(t,(0,g.default)(n))),n.allowRender=!0,n.pickFilterFunction=null,n.animationMixers=[],n.hoverFilterFunction=null,n._eventId=0,n._modelSelectColor={r:.97,g:.388,b:.196,a:1},n._fullScreen=!1,n._enterControl=new J.default,n._enterControl.enableMapHover=n.MapOptions.modelHoverEffect,n._allowfps=60,n._renderTime=0,n.controls.setEnterCtrl(n._enterControl),n.otherFocus=[],n.tileLoading=!1,n.letUpdate=!1,n.selectedObjects=[],n.isFpsDisplay=void 0!==e.isFpsDisplay&&e.isFpsDisplay,n.stats=null,n.isFpsDisplay&&(n.stats=new Y.default,n.stats.showPanel(0),document.body.appendChild(n.stats.dom)),n.videoMemory=new te.default((0,g.default)(n)),n.getStation(),n}return(0,v.default)(a,[{key:"getRenderOption",value:function(){try{this.MapOptions.logarithmicDepthBuffer?this.render=new fm.WebGLRenderer({antialias:!0,alpha:!0,logarithmicDepthBuffer:!0,canvas:this.MapOptions.canvas,tempCanvas:this.MapOptions.tempCanvas}):this.render=new fm.WebGLRenderer({antialias:!0,alpha:!0,canvas:this.MapOptions.canvas,tempCanvas:this.MapOptions.tempCanvas})}catch(e){return console.error("WebGLRenderer ERROR: ",e),(new fengmap.MapError).noWebGL(this.renderOption.canvas),!1}this.canvas=this.render.domElement;var e=this.MapOptions.canvas.width,t=this.MapOptions.canvas.height;return this.perspectiveCamera=new fm.PerspectiveCamera(35,e/t,2,1e5),this.orthographicCamera=new fm.OrthographicCamera(-e/2,e/2,t/2,-t/2,1,1e5),!0}},{key:"isOnLine",value:function(e,t){var n=new Image;n.onload=function(){e&&e()},n.onerror=function(){t&&t()},n.style.display="none",n.src="http://www.baidu.com/img/baidu_sylogo1.gif?"+(0,M.default)(n=""+Math.random()).call(n,-6)}},{key:"openMapById",value:function(t,n){var e,r;function i(){"fengmap"===r.MapOptions.mapServerURL?Z.default.checkIsOnLine(function(){Z.default.checkOnLine(r.MapOptions.key,r.MapOptions.appName,t,function(e){le.call(r,t,!0)},function(e){e?(console.warn(e.error_code,e.error_message),n&&n({msg:"线上验证失败!",data:e})):(console.warn("offLine 2"),le.call(r,t))},"POST")},function(){console.warn("offLine 1"),le.call(r,t)},1e3):le.call(r,t)}function a(){le.call(r,t)}d=n,t?this.MapOptions.key?(e=/^[a-zA-z\d]{32}$/,e.test(this.MapOptions.key)?this.MapOptions.appName?(this._zopStep_=1,r=this,this.MapOptions.useCompatibleOnLineCheck?this.isOnLine(i,a):i()):console.warn(decodeURIComponent(q.cerityMessage.warn_noappname)):console.warn(decodeURIComponent(q.cerityMessage.warn_keynotright))):console.warn(decodeURIComponent(q.cerityMessage.warn_nokey)):console.warn(decodeURIComponent(q.cerityMessage.warn_nomapid))}},{key:"search",value:function(e,t,n){return K.default.search(this,e,t,n)}},{key:"changeFocusToGroup",value:function(n){var r=this,e=this.nodeManager.getSceneCenter(this._currentSceneId),t=this.controls.target.y;if(this.currentFocusGroup=n.gid,e=this.nodeManager.getHeight(this._currentSceneId,this.currentFocusGroup)+e.y,!this.MapOptions.focusAnimateMode)return this.controls.panUp(e-t),this.controls.update(),n.callback&&n.callback(),void this.setRenderList();z.default[this.uuid].currentGroupChangeAnimater&&(z.default[this.uuid].currentGroupChangeAnimater.stop(),this.removeAnimater(z.default[this.uuid].currentGroupChangeAnimater));var i=new U.default({h:t},{h:e},n.duration?1e3*n.duration:800,function(){r.removeAnimater(i),z.default[r.uuid].currentGroupChangeAnimater=null,n.callback&&n.callback()},function(e,t){r.controls.panUp(t.h),n.update&&n.update()}).start();z.default[this.uuid].currentGroupChangeAnimater=i,this._animaters.push(i)}},{key:"dataExcute",value:function(e,t,n,r){var i=this;if(this&&this.MapOptions){var a=new fm.Color(e.selectedColor);if(this._modelSelectColor.r=a.r,this._modelSelectColor.g=a.g,this._modelSelectColor.b=a.b,0===this.MapOptions.defaultBackgroundColor?this.MapOptions.defaultBackgroundColor=0:this.MapOptions.defaultBackgroundColor||(this.MapOptions.defaultBackgroundColor=G.default.toColor(e.data.viewtheme.clearcolor)),this.MapOptions.defaultBackgroundAlpha=(0,T.default)(e.data.viewtheme.clearalpha),this.renderer.setClearColor(this.MapOptions.defaultBackgroundColor,this.MapOptions.defaultBackgroundAlpha),this.dataManager.putRawScene(t,n),a=this.dataManager.parseScene(n,this.MapOptions.tile,this.MapOptions.license),a){if(t=!a.scene.key||Z.default.checkOffLine(this.MapOptions.key,this.MapOptions.appName,"",a.scene.key),!t)return console.warn(decodeURIComponent(q.cerityMessage.warn_offline)),void(d&&d({message:decodeURIComponent(q.cerityMessage.warn_local)}));this.dataManager.putDecodeScene(a,n),this.nodeManager.conformatScene(a,n,e),this.groupSpace=this.MapOptions.defaultGroupSpace,this.initCameraPosition();var e=this.renderer.getFrustumByViewMode(this._viewMode),o=this.getVisibleGroups();if(this.MapOptions.tile){var s=this.nodeManager.getSceneById(this._currentSceneId);s.sdata=r;var l=s.getNeedLoadGroup(o),u=function(){var t=function(){var t=s.getNeedLoadGroup(o,!0);t.length<1?i.dispatchEvent({type:"loadComplete"}):i.loadAndExcuteData(t,s,0,!1,function(e){i.tileLoading=!1,e===t.length-1&&i.dispatchEvent({type:"loadComplete"})})};if(l.length<1)return i.dispatchEvent({type:"visibleGroupLoaded"}),void t();i.loadAndExcuteData(l,s,0,!1,function(e){i.nodeManager.checkNodeByFrustum(i.dataManager.getDecodeScene(i._currentSceneId),i.renderer.getFrustumByViewMode(i._viewMode),i.getVisibleGroups(),i.mapScaleLevel,n),i.setRenderList(),i.avoidMarkers(),e===l.length-1&&(i.dispatchEvent({type:"visibleGroupLoaded"}),t())})};this.tileLoading=!0;for(var h=-1,c=0;c<l.length;c++)if(l[c].gid&&l[c].gid==this._currentFocusGroup){h=c;break}if(h<0)return void console.error(Q.tileMessage.noFocus);this.loadAndExcuteData(l,s,h,!0,function(e){i.nodeManager.checkNodeByFrustum(i.dataManager.getDecodeScene(i._currentSceneId),i.renderer.getFrustumByViewMode(i._viewMode),i.getVisibleGroups(),i.mapScaleLevel,n),i.setRenderList(),i.avoidMarkers(),(0,E.default)(l).call(l,h,1),u()})}else this.nodeManager.checkNodeByFrustum(a,e,o,this.mapScaleLevel,n),this.setRenderList(),this.avoidMarkers(),this.dispatchEvent({type:"visibleGroupLoaded"}),this.dispatchEvent({type:"loadComplete"}),this.renderer.setClearColor(this.MapOptions.defaultBackgroundColor,this.MapOptions.defaultBackgroundAlpha);this.letUpdate=!0}}}},{key:"loadAndExcuteData",value:function(i,a,o,s,l){var u=this,h=i[o];this.fmServer.getFloor(this.MapOptions.mapServerURL,h.url,this._currentSceneId,h.gid,function(e,t,n,r){n=u.dataManager.parseFloor(e,t,n),n={geo:[n[0]],biz:[n[1]],navi:[n[2]],gid:r},u.dataManager.getDecodeScene(u._currentSceneId).floors.push(n),h.layerData.loaded=!0,a.addGroup(r,n,h.layerData),l&&l(o),s||(o++,o<i.length&&u.loadAndExcuteData(i,a,o,!1,l))},a.sdata)}},{key:"moveLinesUv",value:function(e){var t,n=re(this._lineMarkers);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.moveUv(e)}}catch(e){n.e(e)}finally{n.f()}}},{key:"resetLineRepeat",value:function(){var e,t=re(this._lineMarkers);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.resetRepeat(this)}}catch(e){t.e(e)}finally{t.f()}}},{key:"hideOrShowLine",value:function(){var e,t=this.groupIDs[this.groupIDs.length-1],n=re(this._lineMarkers);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.hideOrShowBy(this._visibleGroups,t)}}catch(e){n.e(e)}finally{n.f()}}},{key:"getVisibleGroups",value:function(){return this._visibleGroups}},{key:"setVisibleGroups",value:function(e){this._visibleGroups=e,this.checkNode(),this.setRenderList(),this.dispatchEvent({type:"visibleGroupIDsChanged",gids:e})}},{key:"initCameraPosition",value:function(){var e,t=this.getCameraDistanceByScale(this.mapScale),n=this.MapOptions.defaultViewCenter;try{n?(e=this.nodeManager.getSceneById(this._currentSceneId).mapcenter,n.x-=e.x,n.y-=e.y):n=this.nodeManager.getSceneById(this._currentSceneId).center;var r=this.nodeManager.getHeight(this._currentSceneId,this._currentFocusGroup);n.z=0,n.y+=r,this.controls.target=(new fm.Vector3).copy(n)}catch(e){console.error(Q.mapOptionMessage.defaultViewCenterError)}"3d"===this._viewMode?(this.controls.minPolarAngle=(90-this.MapOptions.defaultMaxTiltAngle)*fm.Math.DEG2RAD,this.controls.maxPolarAngle=(90-this.MapOptions.defaultMinTiltAngle)*fm.Math.DEG2RAD,e=(90-this.MapOptions.defaultTiltAngle)*fm.Math.DEG2RAD,r=t*Math.cos(e),e=t*Math.sin(e),e=new fm.Vector3(0,r,e),this.controls.object.position.set(n.x+e.x,n.y+e.y,n.z+e.z),this.controls.object.lookAt(n),this.renderer.orthographicCamera.position.set(n.x+e.x,n.y+e.y,n.z+e.z),this.renderer.orthographicCamera.lookAt(n)):(i=this.getCameraScaleByScale(this.mapScale),this.controls.minPolarAngle=0,this.controls.maxPolarAngle=0,this.controls.object.position.set(n.x,n.y+t,n.z),this.controls.object.zoom=1/i,this.controls.object.lookAt(n),this.renderer.orthographicCamera.updateProjectionMatrix());var i=this.MapOptions.computePoseToAngle();this.controls.rotateLeft(i*fm.Math.DEG2RAD),this._changePanrange(t,n),this.controls.update()}},{key:"_changePanrange",value:function(e,t){var n,r;this.MapOptions.enabledPanRange&&(n=.5,r=this.nodeManager.getSceneById(this._currentSceneId).bboxTh,this.controls.viewBox=new fm.Box3(new fm.Vector3(r.min.x,0,r.min.y),new fm.Vector3(r.max.x,this.getGroupHeight(this.groupIDs[this.groupIDs.length-1])+this.groupSpace,r.max.y)),this.controls.viewBox.min.multiplyScalar(n),this.controls.viewBox.max.multiplyScalar(n),this.controls.useRange=!0)}},{key:"scaleLevelInit",value:function(){var e;this.MapOptions.mapScaleLevelRange&&this.setMapScaleLevelRange(this.MapOptions.mapScaleLevelRange),this.MapOptions.mapScaleRange&&this.setMapScaleRange(this.MapOptions.mapScaleRange),this.MapOptions.defaultMapScaleLevel&&(e=this.MapOptions.defaultMapScaleLevel,this._mapScaleLevel=e,this._mapScale=this.levelToScale(e)),this.MapOptions.defaultMapScale&&(this.mapScale=this.MapOptions.defaultMapScale)}},{key:"setMapScaleRange",value:function(e,t){(0,S.default)(e)?(this.minScale=e[0],this.maxScale=e[1]):(this.minScale=e,this.maxScale=t)}},{key:"setMapScaleLevelRange",value:function(e,t){(0,S.default)(e)?(this.minScaleLevel=e[0],this.maxScaleLevel=e[1]):(this.minScaleLevel=e,this.maxScaleLevel=t)}},{key:"showSingerOrMultiGroup",value:function(e){this._showAllGroup=e,this.visibleGroupIDs=e?(0,M.default)(e=this.getCurrGroupIds()).call(e,0):[this._currentFocusGroup]}},{key:"removeAnimater",value:function(e){var t=(0,A.default)(t=this._animaters).call(t,e);-1<t&&(0,E.default)(e=this._animaters).call(e,t,1)}},{key:"dollyOut",value:function(){var n=this,r=1,e=new U.default({scale:1},{scale:2},500,function(){n.removeAnimater(e)},function(e){var t=e.scale/r;r=e.scale,n.controls.dollyOut(t)}).start();this._animaters.push(e)}},{key:"dollyIn",value:function(){var n=this,r=1,e=new U.default({scale:1},{scale:2},500,function(){n.removeAnimater(e)},function(e){var t=e.scale/r;r=e.scale,n.controls.dollyIn(t)}).start();this._animaters.push(e)}},{key:"zoomIn",value:function(){this.dollyIn()}},{key:"zoomOut",value:function(){this.dollyOut()}},{key:"checkNode",value:function(){var e,t,n,r;this.renderer&&(e=this.renderer.getFrustumByViewMode(this._viewMode),t=this._currentSceneId,n=this.dataManager.getDecodeScene(t),r="top"===this._viewMode?this.getScaleByCameraScale():this.getScaleByCameraDistance(),r=this.scaleTolevel(r),this.nodeManager.checkNodeByFrustum(n,e,this.getVisibleGroups(),r,t))}},{key:"getCurrDecodeData",value:function(){var e=this._currentSceneId,e=this.dataManager.getDecodeScene(e);return e}},{key:"setBackgroundColor",value:function(e,t){var n=this;"string"==typeof e&&(e=(0,I.default)(e.replace("#","0x"))),(0,L.default)(function(){n.renderer.setClearColor(e,t)},500)}},{key:"setBackground",value:function(e){this.renderer.setClearColor(0,0),this.renderer.setBackground(e)}},{key:"addAnimationMixer",value:function(e){this.animationMixers.push(e)}},{key:"setRenderList",value:function(){var e;this.nodeManager&&(e=this.nodeManager.getRenderList(),this.renderer.renderList=e,this.renderer.resetSpriteSize())}},{key:"rushRenderNode",value:function(){this.setRenderList(),this.renderer.resetSpriteSize()}},{key:"controlEventInit",value:function(){var r=this;this.controls.addEventListener("change",function(){r.checkNode(),r.setRenderList(),r.avoidMarkers(),r.renderer.compassNode&&(r.renderer.compassNode.material.uniforms.rotation.value=-r.controls.getAzimuthalAngle()),e="top"===r._viewMode?r.getScaleByCameraScale():r.getScaleByCameraDistance(),r.dispatchEvent({type:"mapViewChanged"}),.5<Math.abs(e-r._mapScale)&&r.dispatchEvent({type:"scaleLevelChanged",scale:e}),r._mapScale=e;var e=r.scaleTolevel(e);e!==r._mapScaleLevel&&(r._mapScaleLevel=e,r.dispatchEvent({type:"mapScaleLevelChanged",mapScale:e})),r._mapScaleLevel=e,r.renderer.resetSpriteSize(),r.moveLinesUv(.01),r.resetLineRepeat(),r.renderer.resetLocationsSize()});var n=0,i=0,a=null;this.isMarkerMove&&this.MapOptions.canvas.addEventListener("mousedown",function(e){var t={x:2*e.offsetX/r.MapOptions.canvas.width-1,y:1-2*e.offsetY/r.MapOptions.canvas.height};n=(new Date).getTime(),a=(0,R.default)(function(){var e;i=(new Date).getTime(),1e3<i-n&&(e=r.nodeManager.getFacility(r._currentSceneId,r.getVisibleGroups(),t,r.renderer.getCameraByViewMode(r._viewMode)),0<e.length&&r.dispatchEvent({type:"press",target:e[0].object.mapNode}),clearInterval(a))},250)}),this.controls.addEventListener("mouseup",function(e){var t=e.mousePoint,n={x:2*t.x/t.w-1,y:1-2*t.y/t.h};r._eventId++,t=r.dispatchClickEvent(n,e.event),e.mouseButton===fm.MOUSE.LEFT&&t&&null!=t.target&&(4!=t.target._nodeType?r.modelFire(n):r.selectNull()),r.checkCompassClick(n),null!==a&&(clearInterval(a),a=null),r.dispatchEvent({type:"pressover"})}),this.controls.addEventListener("mousemove",function(e){(r.isMarkerTip||r.isMarkerMove)&&r.mouseIntoInfo(e),r._lastMoveEvent=e,r._mouseHoverTime=0,r._mouseHoverStart=!0,null!==a&&(clearInterval(a),a=null)})}},{key:"mouseIntoInfo",value:function(e){e=e.mousePoint,e={x:2*e.x/e.w-1,y:1-2*e.y/e.h},this.isMarkerTip||(e=this.nodeManager.getFacility(this._currentSceneId,this.getVisibleGroups(),e,this.renderer.getCameraByViewMode(this._viewMode)),0!==e.length?this.dispatchEvent({type:"hover",target:e[0].object.mapNode}):this.dispatchEvent({type:"mouseleave"}))}},{key:"checkCompassClick",value:function(e){var t;this.renderer.compassNode&&this.showCompass&&(t=this.renderer.compassNode.userData,W.default.pointIsInRect(e,t.coord,t.width,t.width)&&this.dispatchEvent({type:"mapClickCompass",target:this.renderer.compassNode}))}},{key:"dispatchClickEvent",value:function(e,t){if(this._enterControl.enableMapSingleTap){var n=this.nodeManager.getNode(this._currentSceneId,this.getVisibleGroups(),e,this.renderer.getCameraByViewMode(this._viewMode)),r=this.nodeManager.getFacility(this._currentSceneId,this.getVisibleGroups(),e,this.renderer.getCameraByViewMode(this._viewMode)),i=this.nodeManager.getExternalModels(this._currentSceneId,this.getVisibleGroups(),e,this.renderer.getCameraByViewMode(this._viewMode)),a={type:"mapClickNode",target:null,mouse:t.mouse,domEvent:t,eventInfo:{domEvent:t,coord:null,eventID:this._eventId},nodeType:null};if(n.length<1&&r.length<1&&i.length<1)return this.dispatchEvent(a),l={target:!0},l;if(1<=r.length&&(o=0,this.pickFilterFunction&&(e=this.pickFilterFunction({nodeType:r[0].object.mapNode.nodeType,typeID:r[0].object.mapNode.bdata&&r[0].object.mapNode.bdata.type,data:r[0].object.mapNode.bdata}),e||(o=1)),l={type:"mapClickNode",target:r[0].object.mapNode,mouse:t.mouse,domEvent:t,eventInfo:{domEvent:t,coord:{x:r[0].object.mapNode.x,y:r[0].object.mapNode.y},eventID:this._eventId},mapCoord:{x:r[0].object.mapNode.x,y:r[0].object.mapNode.y},nodeType:r[0].object.mapNode.nodeType},1==o?this.dispatchEvent(a):this.dispatchEvent(l)),1<=n.length){var o=0;this.pickFilterFunction&&(s=this.pickFilterFunction({nodeType:n[0].object.mapNode.nodeType,typeID:n[0].object.mapNode.bdata&&n[0].object.mapNode.bdata.type,data:n[0].object.mapNode.bdata}),s||(o=1));var s=(new fm.Vector3).copy(n[0].point),l={type:"mapClickNode",target:n[0].object.mapNode,mouse:t.mouse,domEvent:t,eventInfo:{domEvent:t,threeCoord:s,coord:{x:s.x+this.center.x,y:this.center.y-s.z},eventID:this._eventId},mapCoord:{x:s.x+this.center.x,y:this.center.y-s.z},nodeType:n[0].object.mapNode.nodeType};return 1===o?(this.dispatchEvent(a),a):(this.dispatchEvent(l),l)}return 1<=i.length?(a=(new fm.Vector3).copy(i[0].point),l={type:"mapClickNode",target:i[0].object,mouse:t.mouse,domEvent:t,eventInfo:{domEvent:t,threeCoord:a,coord:{x:a.x+this.center.x,y:this.center.y-a.z},eventID:this._eventId},mapCoord:{x:a.x+this.center.x,y:this.center.y-a.z},nodeType:35},this.dispatchEvent(l),l):void 0}}},{key:"getDatasByAlias",value:function(e,t,n){n=n||function(){return!0};var r=this.nodeManager.getSceneById(this._currentSceneId);return r.getGroupsNodelsByFilter([e],t,n)}},{key:"mouseHoverEventFire",value:function(e){var t,n,r,i,a,o;this._mouseHoverStart&&(this._mouseHoverTime>this.MapOptions.modelHoverTime?this._enterControl.enableMapHover&&this._lastMoveEvent&&(t=this._lastMoveEvent,n=t.mousePoint,i={x:2*n.x/n.w-1,y:1-2*n.y/n.h},r=this.nodeManager.getNode(this._currentSceneId,this.getVisibleGroups(),i,this.renderer.getCameraByViewMode(this._viewMode)),o=this.nodeManager.getFacility(this._currentSceneId,this.getVisibleGroups(),i,this.renderer.getCameraByViewMode(this._viewMode)),r.length<1&&o.length<1||(r[0]&&(i=(new fm.Vector3).copy(r[0].point),a={type:"mapHoverNode",target:r[0].object.mapNode,mouse:n,eventInfo:{domEvent:t.event,threeCoord:r[0].point,eventID:t.eventID,coord:{x:i.x+this.center.x,y:r[0].object.mapNode.y-i.z}},groupID:r[0].object.mapNode.groupID,nodeType:r[0].object.mapNode.nodeType},this.hoverFilterFunction?(i=this.hoverFilterFunction({nodeType:r[0].object.mapNode.nodeType,typeID:r[0].object.mapNode.bdata&&r[0].object.mapNode.bdata.type,data:r[0].object.mapNode.bdata}),i&&(r[0].object.mapNode.nodeType===H.default.MODEL&&this.MapOptions.modelHoverEffect&&this.storeSelect(r[0].object),this.dispatchEvent(a))):(r[0].object.mapNode.nodeType===H.default.MODEL&&this.MapOptions.modelHoverEffect&&this.storeSelect(r[0].object),this.dispatchEvent(a))),o[0]&&(a=(new fm.Vector3).copy(o[0].point),a={type:"mapHoverNode",target:o[0].object.mapNode,mouse:n,eventInfo:{domEvent:t.event,threeCoord:o[0].point,eventID:t.eventID,coord:{x:a.x+this.center.x,y:o[0].object.mapNode.y-a.z}},groupID:o[0].object.mapNode.groupID,nodeType:o[0].object.mapNode.nodeType},this.hoverFilterFunction?(o=this.hoverFilterFunction({nodeType:o[0].object.mapNode.nodeType,typeID:o[0].object.mapNode.bdata&&o[0].object.mapNode.bdata.type,data:o[0].object.mapNode.bdata}),o&&this.dispatchEvent(a)):this.dispatchEvent(a)),this._mouseHoverStart=!1,this._mouseHoverTime=0)):this._mouseHoverTime+=e)}},{key:"selectNull",value:function(){if(z.default[this.uuid].currentModel){z.default[this.uuid].currentAnimater&&(z.default[this.uuid].currentAnimater.stop(),z.default[this.uuid].currentAnimater=void 0);var e=z.default[this.uuid].currentModel;if(void 0===z.default[this.uuid].currentModel.material.length)e.material.color=z.default[this.uuid].currentModel.material.userData.color,e.material.opacity=z.default[this.uuid].currentModel.material.userData.opacity,e.material.userData.opacity=void 0,e.material.userData.color=void 0,e.material.update=!0,z.default[this.uuid].currentModel=void 0;else{for(var t=0;t<z.default[this.uuid].currentModel.material.length;t++)e.material[t].color=z.default[this.uuid].currentModel.material[t].userData.color,e.material[t].opacity=z.default[this.uuid].currentModel.material[t].userData.opacity,e.material[t].userData.opacity=void 0,e.material[t].userData.color=void 0,e.material[t].update=!0;z.default[this.uuid].currentModel=void 0}}}},{key:"callAllLayersByAlias",value:function(e,t){this.nodeManager.getSceneById(this._currentSceneId).getAllGroupLayerByAlias(e,t)}},{key:"storeSelect",value:function(e){var n,t,r=this,i=e;if(e.nodeType&&e.nodeType===H.default.MODEL){if(!e.renderNodeInited)return;i=e.renderNode}if(z.default[this.uuid].currentModel&&z.default[this.uuid].currentModel!==i)if(z.default[this.uuid].currentAnimater&&(z.default[this.uuid].currentAnimater.stop(),z.default[this.uuid].currentAnimater=void 0),void 0===z.default[this.uuid].currentModel.material.length)z.default[this.uuid].currentModel.material.color=z.default[this.uuid].currentModel.material.userData.color,z.default[this.uuid].currentModel.material.opacity=z.default[this.uuid].currentModel.material.userData.opacity,z.default[this.uuid].currentModel.material.update=!0;else for(var a=0;a<z.default[this.uuid].currentModel.material.length;a++)z.default[this.uuid].currentModel.material[a].color=z.default[this.uuid].currentModel.material[a].userData.color,z.default[this.uuid].currentModel.material[a].opacity=z.default[this.uuid].currentModel.material[a].userData.opacity,z.default[this.uuid].currentModel.material[a].update=!0;if(z.default[this.uuid].currentModel=i,void 0===i.material.length)i.material.userData.color||(i.material.userData.color=i.material.color,i.material.userData.opacity=i.material.opacity);else for(var o=0;o<i.material.length;o++)i.material[o].userData.color||(i.material[o].userData.color=i.material[o].color,i.material[o].userData.opacity=i.material[o].opacity);z.default[this.uuid].currentAnimater||(n=this._modelSelectColor.a,0===n&&(n=1),t=new U.default({r:this._modelSelectColor.r/2,g:this._modelSelectColor.g/2,b:this._modelSelectColor.b/2,a:n/2},this._modelSelectColor,500,function(){r.removeAnimater(t),z.default[r.uuid].currentAnimater=null},function(e){if(void 0===i.material.length)i.material.userData.color&&(i.material.color=new fm.Color(e.r,e.g,e.b),i.material.opacity=n,i.material.update=!0);else for(var t=0;t<i.material.length;t++)i.material[t].userData.color&&(i.material[t].color=new fm.Color(e.r,e.g,e.b),i.material[t].opacity=n,i.material[t].update=!0)}),z.default[this.uuid].currentAnimater=t,t.start(),this._animaters.push(t))}},{key:"modelFire",value:function(e){var t=[],n=[];this.MapOptions.lightEffects?(t=this.nodeManager.getExternalModels(this._currentSceneId,this.getVisibleGroups(),e,this.renderer.getCameraByViewMode(this._viewMode)),n=this.nodeManager.getModel(this._currentSceneId,this.getVisibleGroups(),e,this.renderer.getCameraByViewMode(this._viewMode)),n=(0,N.default)(t).call(t,n),n.length<1?this.selectNull():this.MapOptions.modelSelectedEffect&&this.storeSelect(n[0].object)):(t=this.nodeManager.getModelExternal(this._currentSceneId,this.getVisibleGroups(),e,this.renderer.getCameraByViewMode(this._viewMode)),t.length<1?this.selectNull():this.MapOptions.modelSelectedEffect&&this.storeSelect(t[0].object))}},{key:"setModelSelectColor",value:function(e,t){var n=new fm.Color;n.set(e),this._modelSelectColor={r:n.r,g:n.g,b:n.b,a:t}}},{key:"checkMarkerAvoid",value:function(e){if(!(e.length<1)){for(var t=e[0],n=[],r=1;r<e.length;r++)W.default.isRectCross(t.leftTop,t.rightDown,e[r].leftTop,e[r].rightDown)?e[r].target.visible=!1:(e[r].target.visible=!0,n.push(e[r]));1<n.length&&((0,k.default)(n).call(n),this.checkMarkerAvoid(n))}}},{key:"avoidMarkers",value:function(){var e=this.nodeManager.getSceneById(this._currentSceneId);if(e)for(var t=this.renderer.getCameraByViewMode(this._viewMode),n=0;n<this._visibleGroups.length;n++){var r=e.getMarkers(this._visibleGroups[n],t,this.renderer.domElementHeight);this.checkMarkerAvoid(r);for(var i=e.getUserMarkers(this._visibleGroups[n],t,this.renderer.domElementHeight),a=0;a<i.length;a++)this.checkMarkerAvoid(i[a])}}},{key:"addAnimater",value:function(e){this._animaters.push(e)}},{key:"initTheme",value:function(e,t,n){var r=this.MapOptions.themeFileType||t.filetype||t.fileType||t.image,i=new F.default(this.MapOptions.mapThemeURL,e);i.clearColor=this.MapOptions.defaultBackgroundColor,i.clearAlpha=this.MapOptions.defaultBackgroundAlpha,i.version=this.MapOptions.themeVersion,"rtheme"==r?(e=this.MapOptions.mapThemeURL+"/"+this.MapOptions.themeName+"/"+e+".rtheme",this.fmServer.getTheme(e,function(e){i.rtheme=e,i.data=t,n&&(i.fileType=r,n(i))},function(){i.rtheme=null,console.warn("以 rtheme 格式加入资源失败!")})):(i.rtheme=null,i.data=t,n&&n(i)),this._modelSelectColor=i.getModelSelectColor()}},{key:"levelToScale",value:function(e){return this.mapScaleLevels[e-1]}},{key:"scaleTolevel",value:function(e){if(e>this.mapScaleLevels[0])return 1;if(e<this.mapScaleLevels[this.mapScaleLevels.length-1])return this.mapScaleLevels.length;for(var t=0;t<this.mapScaleLevels.length-1;t++)if(e>=this.mapScaleLevels[t+1]&&e<=this.mapScaleLevels[t]){var n=e-this.mapScaleLevels[t+1],r=this.mapScaleLevels[t]-e;return n<r?t+2:t+1}}},{key:"getMapScaleInfo",value:function(){this._pixelsPerCentimeter=this.wxInfo.screenWidth/2.54}},{key:"getOrthoCameraSizeByPerspectiveCamera",value:function(e,t,n){e instanceof a&&(n=t,t=e.controls,e=e.mapView.camera);var r=e.fov,i=e.aspect,e=null!=n?n:t.target.distanceTo(e.position),r=Math.tan(r*fm.Math.DEG2RAD/2)*e,e=2*r,i=e*i,i=i/2;return{top:r||1,right:i}}},{key:"getCameraDistanceByScale",value:function(e){var t=this.renderer.perspectiveCamera.fov,t=e/100*(this.renderer.domElementHeight/this._pixelsPerCentimeter)/2/Math.tan(t/2*fm.Math.DEG2RAD);return t}},{key:"getScaleByCameraDistance",value:function(){var e=this.renderer.perspectiveCamera.fov,t=(new fm.Vector3).copy(this.controls.object.position).sub(this.controls.target).length(),e=100*Math.tan(e/2*fm.Math.DEG2RAD)*2/(this.renderer.domElementHeight/this._pixelsPerCentimeter);return t*e}},{key:"getCameraScaleByScale",value:function(e){var t=this.renderer.orthographicCamera.top,n=this.renderer.orthographicCamera.bottom,n=Math.abs(t-n)*this._pixelsPerCentimeter*100/this.renderer.domElementHeight;return e/n}},{key:"getScaleByCameraScale",value:function(){var e=this.renderer.orthographicCamera.top,t=this.renderer.orthographicCamera.bottom,t=Math.abs(e-t)*this._pixelsPerCentimeter*100/this.renderer.domElementHeight;return t/this.renderer.orthographicCamera.zoom}},{key:"getLayerByAlias",value:function(e,t,n){var r=[],e=this.getFMGroup(e);return e.traverseByAlias([t],function(e,t){r.push(e),n&&n(e)},!0),r}},{key:"moveTo",value:function(e){return this._moveTo(e,!1)}},{key:"_moveTo",value:function(n,e){var t,r=this,i=this.center,a=n.x-i.x,o=-n.y+i.y,s=this.controls.target.x,l=this.controls.target.z,u=n.groupID,i=u?(t=this.controls.target.y,this.currentFocusGroup=u,this.nodeManager.getHeight(this._currentSceneId,this.currentFocusGroup)):(t=0,0);if(!this.MapOptions.moveToAnimateMode&&!e)return u&&this.controls.panUp(i-t),this.controls.panAdd({x:a-s,z:o-l,y:0}),this.controls.update(),null;z.default[this.uuid].currentMoveMapAnimater&&(z.default[this.uuid].currentMoveMapAnimater.stop(),this.removeAnimater(z.default[this.uuid].currentMoveMapAnimater));var h=new U.default({h:t,x:s,z:l},{h:i,x:a,z:o},n.time?1e3*n.time:500,function(){r.removeAnimater(h),z.default[r.uuid].currentMoveMapAnimater=null,n.callback&&n.callback()},function(e,t){u&&r.controls.panUp(t.h),r.controls.panAdd({x:t.x,z:t.z,y:0}),r.controls.update(),n.update&&n.update()}).start();return z.default[this.uuid].currentMoveMapAnimater=h,this._animaters.push(h),h}},{key:"moveToCenter",value:function(e){var t;"object"!==(0,p.default)(e)?(t=this.center,this.moveTo({x:t.x,y:t.y,groupID:e||this.focusGroupID})):this.moveTo(e)}},{key:"rotateTo",value:function(n){var r=this,e=this.controls.getAzimuthalAngle(),t=-n.to%360*fm.Math.DEG2RAD,i=t,a=0;t-e!=0&&(a=Math.sin(t-e)/Math.abs(Math.sin(t-e))*Math.acos(Math.cos(t-e))),t=e+a,z.default[this.uuid].currentRotateAnimater&&(z.default[this.uuid].currentRotateAnimater.stop(),this.removeAnimater(z.default[this.uuid].currentRotateAnimater));var o=new U.default({theta:e},{theta:t},n.duration?1e3*n.duration:500,function(){r.removeAnimater(o),r.controls.setUpdate(void 0,void 0,void 0,i),n.callback&&n.callback()},function(e,t){r.controls.setUpdate(void 0,t.theta),n.update&&n.update()}).start();return z.default[this.uuid].currentRotateAnimater=o,this._animaters.push(o),o}},{key:"scaleTo",value:function(n,e){var r=this;if(n.scale){var t=n.scale,i=this.mapScale,a=this.getCameraDistanceByScale(t),o=this.controls.object.position.distanceTo(this.controls.target),s=(new fm.Vector3).copy(this.controls.object.position).sub(this.controls.target).normalize();if(!this.MapOptions.scaleToAnimateMode&&!e)return e=(new fm.Vector3).copy(s).multiplyScalar(a-o),this.controls.setUpdate(0,0,e),e=this.getCameraScaleByScale(t),this.renderer.orthographicCamera.zoom=1/e,this.renderer.orthographicCamera.updateProjectionMatrix(),this.renderer.resetSpriteSize(),null;var l=new U.default({phi:o,scale:i},{phi:a,scale:t},n.duration?1e3*n.duration:500,function(e){r.removeAnimater(l),n.callback&&n.callback(),r.renderer.resetSpriteSize()},function(e,t){t=(new fm.Vector3).copy(s).multiplyScalar(t.phi),r.controls.setUpdate(0,0,t),n.update&&n.update(),e=r.getCameraScaleByScale(e.scale),r.renderer.orthographicCamera.zoom=1/e,r.renderer.orthographicCamera.updateProjectionMatrix()}).start();return this._animaters.push(l),l}}},{key:"scaleLevelIn",value:function(){var e=this.scaleLevel;e--,this.scaleLevelTo({level:e})}},{key:"scaleLevelOut",value:function(){var e=this.scaleLevel;e++,this.scaleLevelTo({level:e})}},{key:"scaleLevelTo",value:function(n){var r=this;if(n.level){var e=this.levelToScale(n.level),t=this.mapScale,i=this.getCameraDistanceByScale(e),a=this.controls.object.position.distanceTo(this.controls.target),o=(new fm.Vector3).copy(this.controls.object.position).sub(this.controls.target).normalize();if(!n.duration){var s=(new fm.Vector3).copy(o).multiplyScalar(i-a);return this.controls.setUpdate(0,0,s),s=this.getCameraScaleByScale(e),this.renderer.orthographicCamera.zoom=1/s,this.renderer.orthographicCamera.updateProjectionMatrix(),void this.controls.update()}var l=new U.default({phi:a,scale:t},{phi:i,scale:e},n.duration?1e3*n.duration:500,function(e){r.removeAnimater(l),n.callback&&n.callback(),r.renderer.resetSpriteSize()},function(e,t){t=(new fm.Vector3).copy(o).multiplyScalar(t.phi),r.controls.setUpdate(0,0,t),n.update&&n.update(),e=r.getCameraScaleByScale(e.scale),r.renderer.orthographicCamera.zoom=1/e,r.renderer.orthographicCamera.updateProjectionMatrix()}).start();return this._animaters.push(l),l}}},{key:"tiltTo",value:function(n){var r=this;if(0!==n.to&&n.to){var e=this.controls.getPolarAngle(),t=(90-n.to)*fm.Math.DEG2RAD,i=new U.default({phi:e},{phi:t},n.duration?1e3*n.duration:500,function(e){r.removeAnimater(i),n.callback&&n.callback(),r.renderer.resetSpriteSize()},function(e,t){r.controls.setUpdate(t.phi),n.update&&n.update(e)}).start();return this._animaters.push(i),i}}},{key:"fullScreenAvaliable",value:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"coordMapToScreen",value:function(e,t,n){var r=this.threeCenter,i=this.center,a=this.controls.object,t=this.getRotationCoord(e,t,!0),r=new fm.Vector3(t.x-i.x,r.y+n,-t.y+r.y+i.y);return r.project(a),i=this.renderer.canvas.clientWidth,a=this.renderer.canvas.clientHeight,i=i/2*r.x+i/2,a=-a/2*r.y+a/2,{x:i,y:a}}},{key:"getRotationCoord",value:function(e,t,n){var r=e-this.center.x,i=t-this.center.y,a=1;n&&(a=-1);var o=this.nodeManager._scenes[this._currentSceneId].groups[this.focusGroupID]._layers.extent[0]._scene.rotation.y,n=Math.sin(a*o)*i+Math.cos(a*o)*r,o=Math.cos(a*o)*i-Math.sin(a*o)*r,r=n-r,i=o-i;return{x:e+r,y:t+i}}},{key:"coordScreenToMap",value:function(e,t,n,r,i){var a=this.controls.object,o=1e-4,s=this.center,l=this.threeCenter,u=this.getFMGroup(this._currentFocusGroup).height;if(null!=u&&(n=void 0===n?u+this.MapOptions.pickCoordHeight:n,u=null,u=r?new fm.Vector3(e,t,n):new fm.Vector3(e/this.renderer.domElementWidth*2-1,1-t/this.renderer.domElementHeight*2,.5),e=new fm.Vector3,t=new fm.Vector3,a&&a.isPerspectiveCamera?(e.setFromMatrixPosition(a.matrixWorld),t.set(u.x,u.y,.5).unproject(a).sub(e).normalize()):a&&a.isOrthographicCamera&&(e.set(u.x,u.y,(a.near+a.far)/(a.near-a.far)).unproject(a),t.set(0,0,-1).transformDirection(a.matrixWorld)),a=new fm.Vector3(0,1,0),a=a.dot(t),!(Math.abs(a)<o)))return l=-e.y+n+l.y,l/=t.y,l=(new fm.Vector3).copy(e).add((new fm.Vector3).copy(t).multiplyScalar(l)),i?l:{x:l.x+s.x,y:s.y-l.z,z:n}}},{key:"getScalelevelValueByVectics",value:function(e,t){return this.scaleTolevel(this.getScaleValueByVectics(e,t))}},{key:"getScaleValueByVectics",value:function(e,t){var n,r=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y),a=this.renderer.domElementHeight,t=this.renderer.domElementWidth,e=null;return e=t<=a?r/i<=t/a?(n=a/+this._pixelsPerCentimeter,100*i/n):(n=t/+this._pixelsPerCentimeter,100*r/n):r/i<=t/a?(a/=+this._pixelsPerCentimeter,100*i/a):(t/=+this._pixelsPerCentimeter,100*r/t),e}},{key:"toggleToTop",value:function(n){var r=this,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1e3;this.controls.minPolarAngle=0,this.controls.update();var t=this.controls.getPolarAngle();z.default[this.uuid].curPolarAngle=t,this.MapOptions.viewModeAnimateMode||(e=.001);var i=new U.default({phi:t},{phi:0},e,function(e){r.removeAnimater(i),r.controls.maxPolarAngle=0;var t=r.getScaleByCameraDistance(),t=r.getCameraScaleByScale(t);r.renderer.orthographicCamera.zoom=1/t,r.renderer.orthographicCamera.quaternion.copy(r.controls.object.quaternion),r.renderer.orthographicCamera.position.copy(r.controls.object.position),r.renderer.orthographicCamera.updateProjectionMatrix(),r.controls.object=r.renderer.orthographicCamera,n&&n(),r.renderer.resetSpriteSize(),z.default[r.uuid].isToggleViewMode=!1},function(e,t){r.controls.setUpdate(t.phi)}).start();z.default[this.uuid].isToggleViewMode=!0,this._animaters.push(i)}},{key:"toggleTo3D",value:function(t){var n=this,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1e3;this.controls.maxPolarAngle=(90-this.MapOptions.defaultMinTiltAngle)*fm.Math.DEG2RAD;var r=this.getScaleByCameraScale(),r=this.getCameraDistanceByScale(r);this.renderer.perspectiveCamera.quaternion.copy(this.controls.object.quaternion),this.renderer.perspectiveCamera.position.copy(this.controls.object.position),this.renderer.perspectiveCamera.position.setY(this.controls.target.y+r),this.renderer.perspectiveCamera.updateMatrix(),this.controls.object=this.renderer.perspectiveCamera,this.renderer.resetSpriteSize(),r=z.default[this.uuid].curPolarAngle||(90-this.MapOptions.defaultTiltAngle)*fm.Math.DEG2RAD,this.MapOptions.viewModeAnimateMode||(e=.001);var i=new U.default({phi:0},{phi:r},e,function(e){t&&t(),n.removeAnimater(i),z.default[n.uuid].isToggleViewMode=!1,n.renderer.resetSpriteSize()},function(e,t){n.controls.setUpdate(t.phi)}).start();z.default[this.uuid].isToggleViewMode=!0,this._animaters.push(i)}},{key:"getPixelTo3DdisByGid",value:function(e){var t,n,r=(new fm.Vector3).copy(this.controls.target),i=this.nodeManager.getSceneCenter(this._currentSceneId);return r.y=this.getFMGroup(e).height+this.getFMGroup(e).offsetHeight+i.y,t="top"===this._viewMode?(i=this.renderer.orthographicCamera.top,n=this.renderer.orthographicCamera.bottom,10*Math.abs(i-n)/this.renderer.domElementHeight/this.renderer.orthographicCamera.zoom):(t=this.renderer.perspectiveCamera.near,n=this.renderer.perspectiveCamera.fov,r=this.controls.object.position.distanceTo(r),n=10*t*Math.tan(n/2*fm.Math.DEG2RAD)*2/this.renderer.domElementHeight,n*r/t),10/t}},{key:"dispose",value:function(){(0,ee.abortAnimationFrame)(this._loopHander),this.dispatchEvent({type:"dispose"});var e,t=re(this._lineMarkers);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.dispose(this)}}catch(e){t.e(e)}finally{t.f()}this.nodeManager.dispose(),this.dataManager.dispose(),this.controls.dispose(),this.renderer.dispose(),z.default.dispose(this.uuid),this._lineMarkers.length=0,this._windowPops.length=0,this.nodeManager=void 0,this.dataManager=void 0,this.controls=void 0,this.renderer=void 0,this.fmServer=void 0,this.MapOptions=void 0}},{key:"disposeById",value:function(e){this.nodeManager.disposeById(e),this.dataManager.disposeById(e)}},{key:"addLocationMarker",value:function(e){e.map=this,e.scene=this.nodeManager.getSceneById(this._currentSceneId),e.initSprite(this.nodeManager),this.addLocationToGroup(e,this._currentSceneId,e.groupID),e.renderNode.updateMatrixWorld(!0),this.renderer.setLocationSize(e.renderNode,e.size)}},{key:"addLocationToGroup",value:function(e,t,n){n=this.nodeManager.getGroup(t,n),n.addLocation(e)}},{key:"removeLocationMarker",value:function(e){this.removeLocationByGroup(e,this._currentSceneId,e.groupID),e.dispose()}},{key:"removeLocationByGroup",value:function(e,t,n){n=this.nodeManager.getGroup(t,n),n.removeLocation(e)}},{key:"addLineMarker",value:function(e,t){var n=this.center;e.initLine(n,t,this),this._lineMarkers.push(e),e.hideOrShowBy(this.visibleGroupIDs)}},{key:"removeLineMarker",value:function(e){var t,n=(0,A.default)(t=this._lineMarkers).call(t,e);-1<n&&(0,E.default)(t=this._lineMarkers).call(t,n,1),e.removeByMap(this)}},{key:"removeAllMarkers",value:function(){for(var e=this._lineMarkers.length-1;-1<e;e--)this._lineMarkers[e].removeByMap(this);this._lineMarkers.length=0}},{key:"clearLineMark",value:function(e){if(e)if((0,S.default)(e)){var t,n=re(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.removeLineMarker(r)}}catch(e){n.e(e)}finally{n.f()}}else this.removeLineMarker(e);else this.removeAllMarkers()}},{key:"drawLineMark",value:function(e,t){t.resolution=new fm.Vector2(this.renderer.canvas.clientWidth,this.renderer.canvas.clientHeight);var n=this.renderer.getCameraByViewMode(this._viewMode);t.near=n.near,t.far=n.far,this.addLineMarker(e,t)}},{key:"setLastRender",value:function(){var e=this.nodeManager.getSceneById(this._currentSceneId);e&&(e=e.getLastRenderArray(),this.renderer.setBackRender(e))}},{key:"update",value:function(){if(this._loopHander=(0,ee.doAnimationFrame)((0,b.default)(e=this.update).call(e,this)),this.letUpdate){this.isFpsDisplay&&this.stats.begin();var e=(new Date).getTime(),t=e-this._currentTime;this._currentTime=e,this.mouseHoverEventFire(t);var n,r=re(this._animaters);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.enable&&i.run(t)}}catch(e){r.e(e)}finally{r.f()}var a,o=re(this.animationMixers);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.update(t/1e3)}}catch(e){o.e(e)}finally{o.f()}this.dispatchEvent({type:"frameLoop",delTime:t}),this.controls.update();var l,e=!1;this._renderTime+=t,1e3/this._allowfps<this._renderTime&&(l=this._renderTime,this._renderTime=0,e=!0),this.renderer&&e&&(this.updatePopsPosition(),this.allowRender&&(this.setLastRender(),this.renderer.update(this._viewMode)),this.dispatchEvent({type:"update",fps:1e3/l})),this.isFpsDisplay&&this.stats.end()}}},{key:"on",value:function(e,t){this.addEventListener(e,t)}},{key:"off",value:function(e,t){this.removeEventListener(e,t)}},{key:"registeredPop",value:function(e){this._windowPops.push(e)}},{key:"logoutPop",value:function(e){var t=(0,A.default)(t=this._windowPops).call(t,e);-1<t&&(0,E.default)(e=this._windowPops).call(e,t,1)}},{key:"updatePopsPosition",value:function(){var e,t=this.renderer.getCameraByViewMode(this._viewMode),n=re(this._windowPops);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.updatePopPosition(r,t)}}catch(e){n.e(e)}finally{n.f()}}},{key:"updatePopPosition",value:function(e,t){t=t||this.renderer.getCameraByViewMode(this._viewMode);var n,r=new fm.Vector3;e.threeCoord?r.copy(e.threeCoord):e.marker?e.marker instanceof j.default?0<e.marker._meshes.length&&(e.marker._meshes[0].updateMatrixWorld(),e.marker._meshes[0].updateMatrixWorld(!0),r=(new fm.Vector3).setFromMatrixPosition(e.marker._meshes[0].matrixWorld)):(e.marker.renderNode.parent.updateMatrixWorld(),e.marker.renderNode.updateMatrixWorld(!0),r=(new fm.Vector3).setFromMatrixPosition(e.marker.renderNode.matrixWorld)):(n=this.center,r=r.set(e.coord.x-n.x,this.getFMGroup(e.coord.groupID).getHeight()+e.coord.height,-e.coord.y+n.y)),r=r.project(t),t=(r.x+1)/2*this.renderer.canvas.clientWidth,r=(1-r.y)/2*this.renderer.canvas.clientHeight,e.updateCoord(t,r)}},{key:"getFMGroup",value:function(e){return this.nodeManager.getGroup(this._currentSceneId,e)}},{key:"getGroupHeight",value:function(e){return this.getFMGroup(e).getHeight()}},{key:"getContainer",value:function(){return this.renderer.canvas}},{key:"getCurrGroupLength",value:function(){this.nodeManager.getGroupLength(this._currentSceneId)}},{key:"getCurrGroupIds",value:function(){return this.nodeManager.getGroupIds(this._currentSceneId)}},{key:"screenshot",value:function(e,t,n,s,l){var u=t.x-e.x,h=t.y-e.y,r={x:0,y:0};r.x=(t.x+e.x)/2,r.y=(t.y+e.y)/2;var i=this.renderer.container.getElementsByTagName("canvas")[0].style.width,a=this.renderer.container.getElementsByTagName("canvas")[0].style.height,c=i.split("p")[0],d=a.split("p")[0],f=null,f=(t.x-e.x)/(t.y-e.y)>c/d?c/(t.x-e.x):d/(t.y-e.y),t=r.x-c/2,e=r.y-d/2,r=document.getElementsByTagName("canvas")[0],p=document.createElement("canvas"),m=document.createElement("canvas"),v=document.createElement("canvas"),g=window.devicePixelRatio,y=new Image;("3d"===this.viewMode?this.renderer.perspectiveCamera:this.renderer.orthographicCamera).setViewOffset(c*f,d*f,c*(f-1)/2+t*f,d*(f-1)/2+e*f,c,d),this.renderer.update(),p.width=u*f*g,p.height=h*f*g,p.style.width=u*f*g+"px",p.style.height=h*f*g+"px",n?(m.width=1240*Math.pow(1.414,s-1),m.height=1754*Math.pow(1.414,s-1),m.style.width=1240*Math.pow(1.414,s-1)+"px",m.style.height=1754*Math.pow(1.414,s-1)+"px"):(m.height=1240*Math.pow(1.414,s-1),m.width=1754*Math.pow(1.414,s-1),m.style.height=1240*Math.pow(1.414,s-1)+"px",m.style.width=1754*Math.pow(1.414,s-1)+"px"),v.height=h*Math.pow(1.414,s-1),v.width=u*Math.pow(1.414,s-1),v.style.height=h*Math.pow(1.414,s-1)+"px",v.style.width=u*Math.pow(1.414,s-1)+"px",y.src=r.toDataURL("image/png"),("3d"===this.viewMode?this.renderer.perspectiveCamera:this.renderer.orthographicCamera).clearViewOffset();var _=p.getContext("2d"),x=m.getContext("2d"),w=v.getContext("2d"),b=this;y.onload=function(){b.viewMode,_.drawImage(y,-(c*g-u*f*g)/2,-(d*g-h*f*g)/2);var o=new Image;o.src=p.toDataURL("image/png"),o.onload=function(){var e=Math.min(1240*Math.pow(1.414,s-1)/(u*f),1754*Math.pow(1.414,s-1)/(h*f)),t=(m.width-u*f*e)/2,n=(m.height-h*f*e)/2;x.drawImage(o,t,n,u*f*e,h*f*e),w.drawImage(o,0,0,u*Math.pow(1.414,s-1),h*Math.pow(1.414,s-1));var r,i=m.toDataURL("image/png"),a=v.toDataURL("image/png");-1<(0,A.default)(e=navigator.userAgent).call(e,"Edge")||-1<(0,A.default)(r=navigator.userAgent).call(r,".NET4.0C")?(e=null,r=null,l(i,e,a,r)):m.toBlob(function(t){v.toBlob(function(e){l(i,t,a,e)})})}}}},{key:"enableKeys",value:function(e){this.controls.enableKeys=e}},{key:"getSearchObjects",value:function(e){for(var t=[],n=0;n<e.length;n++){var r=null;5===e[n].nodeType?r="model":4===e[n].nodeType?r="extent":12===e[n].nodeType?r="label":11===e[n].nodeType?r="facility":35===e[n].nodeType&&(r="externalModel"),t.push(this.getFMGroup(e[n].groupID).getNodeByLayerId(r,e[n].ID))}return t}},{key:"getEffectRenderer",value:function(){var e=new FMEffectRenderer(this.MapOptions,this);return this.renderer=e,e}},{key:"getCompassOffset",value:function(){return{left:this.MapOptions.compassOffset[0],top:this.MapOptions.compassOffset[1]}}},{key:"setCompassOffset",value:function(e,t){this.MapOptions.compassOffset[0]=t,this.MapOptions.compassOffset[1]=e,this.renderer.resetCompass()}},{key:"getCompassScale",value:function(){return this.MapOptions.compassSize}},{key:"setCompassScale",value:function(e){this.MapOptions.compassSize=e,this.renderer.resetCompass()}},{key:"getStation",value:function(){var e={};e.sdkVersion=V.default.VERSION+"."+V.default.BUILD,e.device=this.wxInfo.device,e.os=this.wxInfo.system,e.appName=this.MapOptions.appName,e.appkey=this.MapOptions.key,e.brand=this.wxInfo.brand,e.product="Mini";var t=(0,w.default)(e),n=new P.default;return n.open("POST",X.default+"sdk/collect",!0),n.setRequestHeader("Content-type","application/json"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.onreadystatechange=function(e){4===n.readyState&&n.status},n.send(t),e}},{key:"getVideoMemoryAmount",value:function(e){var t=null,t=this.videoMemory.getVideoMemoryAmount(e);return t}},{key:"setCompass",value:function(e){var t,n,r,i,a;this.renderer.compassNode||(t=this.renderer.getAspect(),n=this.renderer.getScaleByPixels(1,this.MapOptions.compassSize),r=-this.renderer.getScaleByPixels(1,a[1]),i=this.renderer.getScaleByPixels(1,a[0])/t,a=this.renderer.getCompassOffset(this.MapOptions.compassPosition,n,t,i,r),this.renderer.compassNode=this.nodeManager.createCompassNode(n,this._compassBG,this._compassFG,a.ox,a.oy),this.renderer.compassNode.material.uniforms.rotation.value=this.controls.getAzimuthalAngle())}},{key:"showAllGroup",get:function(){return this._showAllGroup}},{key:"compass",get:function(){var t=this,n=this.renderer,r=this.nodeManager.materialManager;return{setBgImage:function(e){t._compassBG=e,n.compassNode&&(n.compassNode.material.uniforms.mapBack.value=r.loadTexture(e,function(e){n.compassNode.material.needsUpdate=!0}))},setFgImage:function(e){t._compassFG=e,n.compassNode&&(n.compassNode.material.uniforms.mapfront.value=r.loadTexture(e,function(e){n.compassNode.material.needsUpdate=!0}))}}}},{key:"modelSelectColor",get:function(){return this._modelSelectColor}},{key:"groupIDs",get:function(){var e=[];return e.push.apply(e,(0,f.default)(this.nodeManager.getSceneById(this._currentSceneId).groupIds)),e}},{key:"visibleGroupIDs",get:function(){return this.getVisibleGroups()},set:function(e){this._visibleGroups=e,this.hideOrShowLine(),this.checkNode(),this.setRenderList(),this.avoidMarkers(),this.renderer.resetSpriteSize(),this.dispatchEvent({type:"visibleGroupIDsChanged",gids:e})}},{key:"mapScaleLevel",get:function(){return this._mapScaleLevel},set:function(e){var t,n;"object"===(0,p.default)(e)&&(t=e.duration,n=e.callback,e=e.level),e<this.minScaleLevel?e=this.minScaleLevel:e>this.maxScaleLevel&&(e=this.maxScaleLevel),this.scaleLevelTo({level:e,duration:t,callback:n}),this._mapScale=this.levelToScale(e),this._mapScaleLevel=e}},{key:"mapScale",get:function(){return this._mapScale},set:function(e){e<this.minScale?e=this.minScale:e>this.maxScale&&(e=this.maxScale),this.scaleTo({scale:e}),this._mapScaleLevel=this.scaleTolevel(e),this._mapScale=e}},{key:"scaleLevel",get:function(){return this.mapScaleLevel}},{key:"maxScale",get:function(){return this._maxScale},set:function(e){e<=this.mapScaleLevels[this.mapScaleLevels.length-1]?e=this.mapScaleLevels[this.mapScaleLevels.length-2]:e>this.mapScaleLevels[0]&&(e=this.mapScaleLevels[0]),this._minScaleLevel=this.scaleTolevel(e),this._maxScale=e,this.controls.maxDistance=this.getCameraDistanceByScale(this._maxScale)}},{key:"minScale",get:function(){return this._minScale},set:function(e){e<this.mapScaleLevels[this.mapScaleLevels.length-1]?e=this.mapScaleLevels[this.mapScaleLevels.length-1]:e>=this.mapScaleLevels[0]&&(e=this.mapScaleLevels[1]),this._maxScaleLevel=this.scaleTolevel(e),this._minScale=e,this.controls.minDistance=this.getCameraDistanceByScale(this._minScale)}},{key:"minScaleLevel",get:function(){return this._minScaleLevel},set:function(e){e<1&&(e=1),29<=e&&(e=28),this._maxScale=this.levelToScale(e),this.controls.maxDistance=this.getCameraDistanceByScale(this._maxScale),this.controls.minZoom=1/this.getCameraScaleByScale(this._maxScale),this._minScaleLevel=e}},{key:"maxScaleLevel",get:function(){return this._maxScaleLevel},set:function(e){e<=1&&(e=2),29<e&&(e=29),this._minScale=this.levelToScale(e),this._maxScaleLevel=e,this.controls.minDistance=this.getCameraDistanceByScale(this._minScale),this.controls.maxZoom=1/this.getCameraScaleByScale(this._minScale)}},{key:"maxFps",get:function(){return this._allowfps},set:function(e){this._allowfps=e}},{key:"viewMode",get:function(){return this._viewMode},set:function(t){var n,e,r=this;z.default[this.uuid].isToggleViewMode||(n=function(){r.dispatchEvent({type:"viewModeChange",mode:t})},"3d"==t&&"3d"!=this._viewMode?(this.renderer.viewMode=t,this._viewMode=t,e=this.nodeManager.getRenderList(),this.renderer.renderList=e,this.toggleTo3D(function(){n()},1e3*this.MapOptions.viewModeAnimateTime)):"top"==t&&"top"!=this._viewMode&&this.toggleToTop(function(){r._viewMode=t,r.renderer.viewMode=t;var e=r.nodeManager.getRenderList();r.renderer.renderList=e,n()},1e3*this.MapOptions.viewModeAnimateTime))}},{key:"showCompass",get:function(){return this.renderer.showCompass},set:function(e){var t,n,r,i;e&&!this.renderer.compassNode&&(t=this.renderer.getAspect(),n=this.renderer.getScaleByPixels(1,this.MapOptions.compassSize),i=-this.renderer.getScaleByPixels(1,this.MapOptions.compassOffset[1]),r=this.renderer.getScaleByPixels(1,this.MapOptions.compassOffset[0])/t,i=this.renderer.getCompassOffset(this.MapOptions.compassPosition,n,t,r,i),this.renderer.compassNode=this.nodeManager.createCompassNode(n,this._compassBG,this._compassFG,i.ox,i.oy),this.renderer.compassNode.material.uniforms.rotation.value=-this.controls.getAzimuthalAngle()),this.renderer.showCompass=e}},{key:"currentFocusGroup",get:function(){return this._currentFocusGroup},set:function(e){var t;this._currentFocusGroup=e,1<this.visibleGroupIDs.length?-1<(0,A.default)(t=this.visibleGroupIDs).call(t,e)||(this.visibleGroupIDs.push(e),this.visibleGroupIDs=this.visibleGroupIDs,this.checkNode(),this.setRenderList()):this.visibleGroupIDs=[e],this.dispatchEvent({type:"focusGroupIDChanged",gid:e})}},{key:"focusGroupID",get:function(){return this.currentFocusGroup},set:function(e){this.changeFocusToGroup({gid:e})}},{key:"center",get:function(){return(new fm.Vector3).copy(this.nodeManager.getSceneById(this._currentSceneId).mapcenter)}},{key:"threeCenter",get:function(){return(new fm.Vector3).copy(this.nodeManager.getSceneById(this._currentSceneId).center)}},{key:"maxX",get:function(){return this.nodeManager.getSceneById(this._currentSceneId).bbox.max.x}},{key:"maxY",get:function(){return this.nodeManager.getSceneById(this._currentSceneId).bbox.max.y}},{key:"minX",get:function(){return this.nodeManager.getSceneById(this._currentSceneId).bbox.min.x}},{key:"minY",get:function(){return this.nodeManager.getSceneById(this._currentSceneId).bbox.min.y}},{key:"groupSpace",get:function(){return this.nodeManager.getSceneById(this._currentSceneId).space},set:function(e){var t=this.nodeManager.getSceneById(this._currentSceneId);t.space=e;var n=t.mapcenter,r=this.groupIDs[this.groupIDs.length-1];this.nodeManager.checkNodeByFrustum(this.dataManager.getDecodeScene(this._currentSceneId),this.renderer.getFrustumByViewMode(this._viewMode),this.getVisibleGroups(),this.mapScaleLevel,this._currentSceneId);var i,a=re(this._lineMarkers);try{for(a.s();!(i=a.n()).done;){var o=i.value;o.rebuildLine(n,this,this._visibleGroups,r)}}catch(e){a.e(e)}finally{a.f()}}},{key:"themeName",get:function(){var e=this.nodeManager.getSceneById(this._currentSceneId);return e.theme.themeName},set:function(t){var e=this.MapOptions.mapThemeURL+"/"+t+"/"+t+".theme",n=this,r=this.nodeManager.getSceneById(this._currentSceneId),i=r.theme.themeName;i!==t&&this.fmServer.getTheme(e,function(e){n.initTheme(t,e,function(e){n.setBackgroundColor(e.clearColor,e.clearAlpha),r.theme=e,r.changeTheme(e)})})}},{key:"setThemeByJson",value:function(e,t){var n=this,r=this.nodeManager.getSceneById(this._currentSceneId);n.initTheme(e,t,function(e){n.setBackgroundColor(e.clearColor,e.clearAlpha),r.theme=e,r.changeTheme(e)})}},{key:"setAutoRotateBymodel",value:function(e){this.autoRotateBymodel=e}},{key:"getAutoRotateBymodel",value:function(){return this.autoRotateBymodel}},{key:"setAutoRotateBymodelSpeed",value:function(e){this.autoRotateBymodelSpeed=e}},{key:"getAutoRotateBymodelSpeed",value:function(){return this.autoRotateBymodelSpeed}},{key:"fullScreen",get:function(){return this._fullScreen},set:function(e){var t=this.renderer.canvas,t=t||document.body;try{e?(t.webkitRequestFullScreen||t.mozRequestFullScreen).call(t):(document.webkitCancelFullScreen||document.mozCancelFullScreen).call(document),this._fullScreen=e}catch(e){console.error(e)}}},{key:"rotateAngle",get:function(){return-this.controls.getAzimuthalAngle()*fm.Math.RAD2DEG},set:function(e){e=-e*fm.Math.DEG2RAD,e>Math.PI?e-=2*Math.PI:e<-Math.PI&&(e=2*Math.PI+e),e<this.controls.minAzimuthAngle&&(e=this.controls.minAzimuthAngle),e>this.controls.maxAzimuthAngle&&(e=this.controls.maxAzimuthAngle),this.controls.setUpdate(void 0,void 0,void 0,e),this.controls.update()}},{key:"maxTitleAngle",get:function(){return(Math.PI/2-this.controls.minPolarAngle)*fm.Math.RAD2DEG},set:function(e){"3d"===this._viewMode&&(this.controls.minPolarAngle=(90-e)*fm.Math.DEG2RAD),this.MapOptions.defaultMaxTiltAngle=e}},{key:"minTitleAngle",get:function(){return(Math.PI/2-this.controls.maxPolarAngle)*fm.Math.RAD2DEG},set:function(e){"3d"===this._viewMode&&(this.controls.maxPolarAngle=(90-e)*fm.Math.DEG2RAD),this.MapOptions.defaultMinTiltAngle=e}},{key:"labelLanguage",get:function(){return this.MapOptions.defaultLabelLanguage},set:function(e){var t;e!==this.labelLanguage&&(this.MapOptions.defaultLabelLanguage=e,t=this.nodeManager.getSceneById(this._currentSceneId),t&&t.setLabelLanguage(e))}},{key:"backgroundColor",set:function(e){this.renderer.renderer.setClearColor((0,I.default)(e))}},{key:"tiltAngle",get:function(){return(Math.PI/2-this.controls.getPolarAngle())*fm.Math.RAD2DEG},set:function(e){e=(90-e)*fm.Math.DEG2RAD,e<this.controls.minPolarAngle&&(e=this.controls.minPolarAngle),e>this.controls.maxPolarAngle&&(e=this.controls.maxPolarAngle),this.controls.setUpdate(void 0,void 0,void 0,void 0,e)}},{key:"listGroups",get:function(){return this.dataManager.getDecodeScene(this._currentSceneId).scene.layerGroups}},{key:"layerLocalHeight",get:function(){return 0}},{key:"gestureEnableController",get:function(){return this._enterControl}}]),a}(o.default),t.default=o},function(e,t,n){e.exports=n(475)},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(89)),u=a(n(5)),h=a(n(6)),c=a(n(7)),r=a(n(139)),f=a(n(10)),p=a(n(53)),m=a(n(32)),v=a(n(61)),g=a(n(0)),y=a(n(9)),n=a(n(114));function _(n){var r=d();return function(){var e,t=(0,c.default)(n),t=r?(e=(0,c.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}var x=new r.default,w=new r.default,b=new r.default;function M(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};t.target=t.target||this,"function"==typeof this["on".concat(e)]&&this["on".concat(e)].call(this,t)}function T(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this.readyState=e,t.readyState=e,M.call(this,"readystatechange",t)}function E(e){return!/^(http|https|ftp|wxfile):\/\/.*/i.test(e)}n=function(e){(0,u.default)(d,e);var t=_(d);function d(){var e;return(0,o.default)(this,d),e=t.call(this),e.onabort=null,e.onerror=null,e.onload=null,e.onloadstart=null,e.onprogress=null,e.ontimeout=null,e.onloadend=null,e.onreadystatechange=null,e.readyState=0,e.response=null,e.responseText=null,e.responseType="text",e.dataType="string",e.responseXML=null,e.status=0,e.statusText="",e.upload={},e.withCredentials=!1,x.set((0,l.default)(e),{"content-type":"application/x-www-form-urlencoded"}),w.set((0,l.default)(e),{}),e}return(0,s.default)(d,[{key:"abort",value:function(){var e=b.get(this);e&&e.abort()}},{key:"getAllResponseHeaders",value:function(){var e,n=w.get(this);return(0,f.default)(e=(0,p.default)(n)).call(e,function(e){var t;return(0,m.default)(t="".concat(e,": ")).call(t,n[e])}).join("\n")}},{key:"getResponseHeader",value:function(e){return w.get(this)[e]}},{key:"open",value:function(e,t){this._method=e,this._url=t,T.call(this,d.OPENED)}},{key:"overrideMimeType",value:function(){}},{key:"send",value:function(){var r=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";if(this.readyState!==d.OPENED)throw new Error("Failed to execute 'send' on 'XMLHttpRequest': The object's state must be OPENED.");var t,n=this._url,i=x.get(this),a=this.responseType,o=this.dataType,s=E(n);"arraybuffer"===a||(t="utf8"),delete this.response,this.response=null;var l=function(e){var t=e.data,n=e.statusCode,e=e.header,n=void 0===n?200:n;if("string"!=typeof t&&!(t instanceof ArrayBuffer))try{t=(0,v.default)(t)}catch(e){}r.status=n,e&&w.set(r,e),M.call(r,"loadstart"),T.call(r,d.HEADERS_RECEIVED),T.call(r,d.LOADING),r.response=t,t instanceof ArrayBuffer?(0,g.default)(r,"responseText",{enumerable:!0,configurable:!0,get:function(){throw"InvalidStateError : responseType is "+this.responseType}}):r.responseText=t,T.call(r,d.DONE),M.call(r,"load"),M.call(r,"loadend")},u=function(e){e=e.errMsg,-1!==(0,y.default)(e).call(e,"abort")?M.call(r,"abort"):M.call(r,"error",{message:e}),M.call(r,"loadend"),s&&console.warn(e)};if(s){var h=wx.getFileSystemManager(),c={filePath:n,success:l,fail:u};return t&&(c.encoding=t),void h.readFile(c)}wx.request({data:e,url:n,method:this._method,header:i,dataType:o,responseType:a,success:l,fail:u})}},{key:"setRequestHeader",value:function(e,t){var n=x.get(this);n[e]=t,x.set(this,n)}},{key:"addEventListener",value:function(e,t){var n=this;"function"==typeof t&&(this["on"+e]=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};e.target=e.target||n,t.call(n,e)})}},{key:"removeEventListener",value:function(e,t){this["on"+e]===t&&(this["on"+e]=null)}}]),d}(n.default),t.default=n,n.UNSEND=0,n.OPENED=1,n.HEADERS_RECEIVED=2,n.LOADING=3,n.DONE=4},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),u=i(n(205)),s=i(n(93)),n=function(){function e(){(0,a.default)(this,e),this.netArea=s.default}return(0,o.default)(e,[{key:"getScene",value:function(e,t,n,r,i,a,o){var s=n?t+".scene":t,l=e+"/"+s+".fmap",s=new u.default;r&&(n||(l=e),s.setRequestHeader({"X-Requested-With":"XMLHttpRequest","Content-type":"application/json;charset=utf-8"})),s.requestMethod=i||"GET",s.sendData=r,s.setResponseType("arraybuffer"),s.getFile(l,function(e){a(e,t)},function(e){console.error("网络请求错误"),o&&o(e)})}},{key:"getFloor",value:function(e,t,n,r,i,a){var o=new u.default;"fengmap"==e&&(e=this.netArea+"sdk/authLayered/downMaps",o.requestMethod="POST",o.sendData=a,o.setRequestHeader({"X-Requested-With":"XMLHttpRequest","Content-type":"application/json;charset=utf-8"}));var s=e+"/"+n+"."+t+".biz.fmap",a=e+"/"+n+"."+t+".geo.fmap",l=e+"/"+n+"."+t+".navi.fmap";o.setResponseType("arraybuffer"),o.getFile(a,function(n){o.getFile(s,function(t){o.getFile(l,function(e){i(n,t,e,r)},function(){console.error("网络请求错误")})},function(){console.error("网络请求错误")})},function(){console.error("网络请求错误")})}},{key:"getTheme",value:function(e,t){var n=new u.default;n.getFile(e,function(e){e=JSON.parse(e),t(e)},function(){})}},{key:"getData",value:function(e,t,n,r,i,a){var o=new u.default;o.requestMethod=r||"GET",o.sendData=i,o.setRequestHeader(a),o.getFile(e,function(e){e=JSON.parse(e),t(e)},function(e){n(e)})}}]),e}(),n=n;t.default=n},function(e,se,le){"use strict";!function(e){var t=le(0),n=le(1);t(se,"__esModule",{value:!0}),se.ProtoBuf=void 0;var y=n(le(56)),_=n(le(0)),x=n(le(9)),w=n(le(29)),b=n(le(12)),M=n(le(50)),r=n(le(54)),u=n(le(27)),T=n(le(14)),h=n(le(140)),E=n(le(60)),S=n(le(53)),A=n(le(10)),I=n(le(35)),L=n(le(479)),R=n(le(61)),N=n(le(64));function s(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function d(e){return!0===(e&&e.__isLong__)}s.__isLong__,(0,_.default)(s.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),s.isLong=d;var a={},o={};function i(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=o[e],r)?r:(n=p(e,(0|e)<0?-1:0,!0),i&&(o[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=a[e],r)?r:(n=p(e,e<0?-1:0,!1),i&&(a[e]=n),n))}function f(e,t){if(isNaN(e)||!isFinite(e))return t?D:C;if(t){if(e<0)return D;if(g<=e)return U}else{if(e<=-k)return z;if(k<=e+1)return F}return e<0?f(-e,t).neg():p(e%l|0,e/l|0,t)}function p(e,t,n){return new s(e,t,n)}s.fromInt=i,s.fromNumber=f,s.fromBits=p;var c=Math.pow;function m(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return C;if("number"==typeof t&&(n=t,t=!1),n=n||10,n<2||36<n)throw RangeError("radix");var r;if(0<(r=(0,x.default)(e).call(e,"-")))throw Error("interior hyphen");if(0===r)return m(e.substring(1),t,n).neg();for(var i=f(c(n,8)),a=C,o=0;o<e.length;o+=8)var s=Math.min(8,e.length-o),l=(0,w.default)(e.substring(o,o+s),n),a=s<8?(s=f(c(n,s)),a.mul(s).add(f(l))):(a=a.mul(i),a.add(f(l)));return a.unsigned=t,a}function v(e){return e instanceof s?e:"number"==typeof e?f(e):"string"==typeof e?m(e):p(e.low,e.high,e.unsigned)}s.fromString=m,s.fromValue=v;var t=65536,n=1<<24,l=t*t,g=l*l,k=g/2,P=i(n),C=i(0);s.ZERO=C;var D=i(0,!0);s.UZERO=D;var O=i(1);s.ONE=O,n=i(1,!0),s.UONE=n;var B=i(-1);s.NEG_ONE=B;var F=p(-1,2147483647,!1);s.MAX_VALUE=F;var U=p(-1,-1,!0);s.MAX_UNSIGNED_VALUE=U;var z=p(0,-2147483648,!1);s.MIN_VALUE=z,n=s.prototype,n.toInt=function(){return this.unsigned?this.low>>>0:this.low},n.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},n.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(z)){var t=f(e),n=this.div(t),t=n.mul(t).sub(this);return n.toString(e)+t.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var r=f(c(e,6),this.unsigned),i=this,a="";;){var o=i.div(r),s=i.sub(o.mul(r)).toInt()>>>0,l=s.toString(e),i=o;if(i.isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},n.getHighBits=function(){return this.high},n.getHighBitsUnsigned=function(){return this.high>>>0},n.getLowBits=function(){return this.low},n.getLowBitsUnsigned=function(){return this.low>>>0},n.getNumBitsAbs=function(){if(this.isNegative())return this.eq(z)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;0<t&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},n.isZero=function(){return 0===this.high&&0===this.low},n.isNegative=function(){return!this.unsigned&&this.high<0},n.isPositive=function(){return this.unsigned||0<=this.high},n.isOdd=function(){return 1==(1&this.low)},n.isEven=function(){return 0==(1&this.low)},n.equals=function(e){return d(e)||(e=v(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},n.eq=n.equals,n.notEquals=function(e){return!this.eq(e)},n.neq=n.notEquals,n.lessThan=function(e){return this.comp(e)<0},n.lt=n.lessThan,n.lessThanOrEqual=function(e){return this.comp(e)<=0},n.lte=n.lessThanOrEqual,n.greaterThan=function(e){return 0<this.comp(e)},n.gt=n.greaterThan,n.greaterThanOrEqual=function(e){return 0<=this.comp(e)},n.gte=n.greaterThanOrEqual,n.compare=function(e){if(d(e)||(e=v(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},n.comp=n.compare,n.negate=function(){return!this.unsigned&&this.eq(z)?z:this.not().add(O)},n.neg=n.negate,n.add=function(e){d(e)||(e=v(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,a=e.high>>>16,o=65535&e.high,s=e.low>>>16,l=65535&e.low,u=0,h=0,c=0,e=0;return e+=i+l,c+=e>>>16,e&=65535,c+=r+s,h+=c>>>16,c&=65535,h+=n+o,u+=h>>>16,h&=65535,u+=t+a,u&=65535,p(c<<16|e,u<<16|h,this.unsigned)},n.subtract=function(e){return d(e)||(e=v(e)),this.add(e.neg())},n.sub=n.subtract,n.multiply=function(e){if(this.isZero())return C;if(d(e)||(e=v(e)),e.isZero())return C;if(this.eq(z))return e.isOdd()?z:C;if(e.eq(z))return this.isOdd()?z:C;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(P)&&e.lt(P))return f(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,a=e.high>>>16,o=65535&e.high,s=e.low>>>16,l=65535&e.low,u=0,h=0,c=0,e=0;return e+=i*l,c+=e>>>16,e&=65535,c+=r*l,h+=c>>>16,c&=65535,c+=i*s,h+=c>>>16,c&=65535,h+=n*l,u+=h>>>16,h&=65535,h+=r*s,u+=h>>>16,h&=65535,h+=i*o,u+=h>>>16,h&=65535,u+=t*l+n*s+r*o+i*a,u&=65535,p(c<<16|e,u<<16|h,this.unsigned)},n.mul=n.multiply,n.divide=function(e){if(d(e)||(e=v(e)),e.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?D:C;var t,n;if(this.eq(z)){if(e.eq(O)||e.eq(B))return z;if(e.eq(z))return O;var r=this.shr(1),i=r.div(e).shl(1);return i.eq(C)?e.isNegative()?O:B:(t=this.sub(e.mul(i)),n=i.add(t.div(e)),n)}if(e.eq(z))return this.unsigned?D:C;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();for(n=C,t=this;t.gte(e);){for(var i=Math.max(1,Math.floor(t.toNumber()/e.toNumber())),a=Math.ceil(Math.log(i)/Math.LN2),o=a<=48?1:c(2,a-48),s=f(i),l=s.mul(e);l.isNegative()||l.gt(t);)i-=o,s=f(i,this.unsigned),l=s.mul(e);s.isZero()&&(s=O),n=n.add(s),t=t.sub(l)}return n},n.div=n.divide,n.modulo=function(e){return d(e)||(e=v(e)),this.sub(this.div(e).mul(e))},n.mod=n.modulo,n.not=function(){return p(~this.low,~this.high,this.unsigned)},n.and=function(e){return d(e)||(e=v(e)),p(this.low&e.low,this.high&e.high,this.unsigned)},n.or=function(e){return d(e)||(e=v(e)),p(this.low|e.low,this.high|e.high,this.unsigned)},n.xor=function(e){return d(e)||(e=v(e)),p(this.low^e.low,this.high^e.high,this.unsigned)},n.shiftLeft=function(e){return d(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?p(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):p(0,this.low<<e-32,this.unsigned)},n.shl=n.shiftLeft,n.shiftRight=function(e){return d(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?p(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):p(this.high>>e-32,0<=this.high?0:-1,this.unsigned)},n.shr=n.shiftRight,n.shiftRightUnsigned=function(e){if(d(e)&&(e=e.toInt()),e&=63,0===e)return this;var t=this.high;if(e<32){var n=this.low;return p(n>>>e|t<<32-e,t>>>e,this.unsigned)}return p(32===e?t:t>>>e-32,0,this.unsigned)},n.shru=n.shiftRightUnsigned,n.toSigned=function(){return this.unsigned?p(this.low,this.high,!1):this},n.toUnsigned=function(){return this.unsigned?this:p(this.low,this.high,!0)};var G=function e(t,n,r){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===n&&(n=e.DEFAULT_ENDIAN),void 0===r&&(r=e.DEFAULT_NOASSERT),!r){if(t|=0,t<0)throw RangeError("Illegal capacity");n=!!n,r=!!r}this.buffer=0===t?H:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=n,this.noAssert=r};G.VERSION="5.0.1",G.LITTLE_ENDIAN=!0,G.BIG_ENDIAN=!1,G.DEFAULT_CAPACITY=16,G.DEFAULT_ENDIAN=G.BIG_ENDIAN,G.DEFAULT_NOASSERT=!1,G.Long=s||null;var V=G.prototype;V.__isByteBuffer__,(0,_.default)(V,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var H=new ArrayBuffer(0),j=String.fromCharCode;function W(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function Y(){var e=[],t=[];return function(){if(0===arguments.length)return t.join("")+j.apply(String,e);1024<e.length+arguments.length&&(t.push(j.apply(String,e)),e.length=0),Array.prototype.push.apply(e,arguments)}}function q(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,u=l>>1,h=-7,c=n?i-1:0,d=n?-1:1,n=e[t+c];for(c+=d,a=n&(1<<-h)-1,n>>=-h,h+=s;0<h;a=256*a+e[t+c],c+=d,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=r;0<h;o=256*o+e[t+c],c+=d,h-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:Infinity*(n?-1:1);o+=Math.pow(2,r),a-=u}return(n?-1:1)*o*Math.pow(2,a-r)}function X(e,t,n,r,i,a){var o,s,l=8*a-i-1,u=(1<<l)-1,h=u>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,f=r?1:-1,a=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||Infinity===t?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(r=Math.pow(2,-o))<1&&(o--,r*=2),t+=1<=o+h?c/r:c*Math.pow(2,1-h),2<=t*r&&(o++,r/=2),u<=o+h?(s=0,o=u):1<=o+h?(s=(t*r-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));8<=i;e[n+d]=255&s,d+=f,s/=256,i-=8);for(o=o<<i|s,l+=i;0<l;e[n+d]=255&o,d+=f,o/=256,l-=8);e[n+d-f]|=128*a}G.accessor=function(){return Uint8Array},G.allocate=function(e,t,n){return new G(e,t,n)},G.concat=function(e,t,n,r){"boolean"!=typeof t&&"string"==typeof t||(r=n,n=t,t=void 0);for(var i,a=0,o=0,s=e.length;o<s;++o)G.isByteBuffer(e[o])||(e[o]=G.wrap(e[o],t)),i=e[o].limit-e[o].offset,0<i&&(a+=i);if(0===a)return new G(0,n,r);for(var l,u=new G(a,n,r),o=0;o<s;)l=e[o++],i=l.limit-l.offset,i<=0||(u.view.set(l.view.subarray(l.offset,l.limit),u.offset),u.offset+=i);return u.limit=u.offset,u.offset=0,u},G.isByteBuffer=function(e){return!0===(e&&e.__isByteBuffer__)},G.type=function(){return ArrayBuffer},G.wrap=function(e,t,n,r){if("string"!=typeof t&&(r=n,n=t,t=void 0),"string"==typeof e)switch(void 0===t&&(t="utf8"),t){case"base64":return G.fromBase64(e,n);case"hex":return G.fromHex(e,n);case"binary":return G.fromBinary(e,n);case"utf8":return G.fromUTF8(e,n);case"debug":return G.fromDebug(e,n);default:throw Error("Unsupported encoding: "+t)}if(null===e||"object"!==(0,y.default)(e))throw TypeError("Illegal buffer");var i;if(G.isByteBuffer(e))return i=V.clone.call(e),i.markedOffset=-1,i;if(e instanceof Uint8Array)i=new G(0,n,r),0<e.length&&(i.buffer=e.buffer,i.offset=e.byteOffset,i.limit=e.byteOffset+e.byteLength,i.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)i=new G(0,n,r),0<e.byteLength&&(i.buffer=e,i.offset=0,i.limit=e.byteLength,i.view=0<e.byteLength?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");i=new G(e.length,n,r),i.limit=e.length;for(var a=0;a<e.length;++a)i.view[a]=e[a]}return i},V.writeBitSet=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r=t,i=e.length,a=i>>3,o=0;for(t+=this.writeVarint32(i,t);a--;)l=1&!!e[o++]|(1&!!e[o++])<<1|(1&!!e[o++])<<2|(1&!!e[o++])<<3|(1&!!e[o++])<<4|(1&!!e[o++])<<5|(1&!!e[o++])<<6|(1&!!e[o++])<<7,this.writeByte(l,t++);if(o<i){for(var s=0,l=0;o<i;)l|=(1&!!e[o++])<<s++;this.writeByte(l,t++)}return n?(this.offset=t,this):t-r},V.readBitSet=function(e){var t=void 0===e;t&&(e=this.offset);var n=this.readVarint32(e),r=n.value,i=r>>3,a=0,o=[];for(e+=n.length;i--;)l=this.readByte(e++),o[a++]=!!(1&l),o[a++]=!!(2&l),o[a++]=!!(4&l),o[a++]=!!(8&l),o[a++]=!!(16&l),o[a++]=!!(32&l),o[a++]=!!(64&l),o[a++]=!!(128&l);if(a<r)for(var s=0,l=this.readByte(e++);a<r;)o[a++]=!!(l>>s++&1);return t&&(this.offset=e),o},V.readBytes=function(e,t){var n,r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}return t=(0,b.default)(n=this).call(n,t,t+e),r&&(this.offset+=e),t},V.writeBytes=V.append,V.writeInt8=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var r=this.buffer.byteLength;return r<t&&this.resize((r*=2)>t?r:t),--t,this.view[t]=e,n&&(this.offset+=1),this},V.writeByte=V.writeInt8,V.readInt8=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}return e=this.view[e],128==(128&e)&&(e=-(255-e+1)),t&&(this.offset+=1),e},V.readByte=V.readInt8,V.writeUint8=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var r=this.buffer.byteLength;return r<t&&this.resize((r*=2)>t?r:t),--t,this.view[t]=e,n&&(this.offset+=1),this},V.writeUInt8=V.writeUint8,V.readUint8=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}return e=this.view[e],t&&(this.offset+=1),e},V.readUInt8=V.readUint8,V.writeInt16=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var r=this.buffer.byteLength;return r<t&&this.resize((r*=2)>t?r:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},V.writeShort=V.writeInt16,V.readInt16=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e],n|=this.view[e+1]<<8):(n=this.view[e]<<8,n|=this.view[e+1]),32768==(32768&n)&&(n=-(65535-n+1)),t&&(this.offset+=2),n},V.readShort=V.readInt16,V.writeUint16=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var r=this.buffer.byteLength;return r<t&&this.resize((r*=2)>t?r:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},V.writeUInt16=V.writeUint16,V.readUint16=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e],n|=this.view[e+1]<<8):(n=this.view[e]<<8,n|=this.view[e+1]),t&&(this.offset+=2),n},V.readUInt16=V.readUint16,V.writeInt32=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return r<t&&this.resize((r*=2)>t?r:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},V.writeInt=V.writeInt32,V.readInt32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),n|=0,t&&(this.offset+=4),n},V.readInt=V.readInt32,V.writeUint32=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return r<t&&this.resize((r*=2)>t?r:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},V.writeUInt32=V.writeUint32,V.readUint32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),t&&(this.offset+=4),n},V.readUInt32=V.readUint32,s&&(V.writeInt64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s.fromNumber(e);else if("string"==typeof e)e=s.fromString(e);else if(!(e&&e instanceof s))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s.fromNumber(e):"string"==typeof e&&(e=s.fromString(e)),t+=8;var r=this.buffer.byteLength;return r<t&&this.resize((r*=2)>t?r:t),t-=8,r=e.low,e=e.high,this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),n&&(this.offset+=8),this},V.writeLong=V.writeInt64,V.readInt64=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,r=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0):(r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),r=new s(n,r,!1),t&&(this.offset+=8),r},V.readLong=V.readInt64,V.writeUint64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s.fromNumber(e);else if("string"==typeof e)e=s.fromString(e);else if(!(e&&e instanceof s))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s.fromNumber(e):"string"==typeof e&&(e=s.fromString(e)),t+=8;var r=this.buffer.byteLength;return r<t&&this.resize((r*=2)>t?r:t),t-=8,r=e.low,e=e.high,this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r,t+=4,this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e,t+=4,this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),n&&(this.offset+=8),this},V.writeUInt64=V.writeUint64,V.readUint64=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,r=0;return this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0):(r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0),r=new s(n,r,!0),t&&(this.offset+=8),r},V.readUInt64=V.readUint64),V.writeFloat32=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return r<t&&this.resize((r*=2)>t?r:t),t-=4,X(this.view,e,t,this.littleEndian,23,4),n&&(this.offset+=4),this},V.writeFloat=V.writeFloat32,V.readFloat32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}return e=q(this.view,e,this.littleEndian,23,4),t&&(this.offset+=4),e},V.readFloat=V.readFloat32,V.writeFloat64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var r=this.buffer.byteLength;return r<t&&this.resize((r*=2)>t?r:t),t-=8,X(this.view,e,t,this.littleEndian,52,8),n&&(this.offset+=8),this},V.writeDouble=V.writeFloat64,V.readFloat64=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}return e=q(this.view,e,this.littleEndian,52,8),t&&(this.offset+=8),e},V.readDouble=V.readFloat64,G.MAX_VARINT32_BYTES=5,G.calculateVarint32=function(e){return e>>>=0,e<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},G.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},G.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},V.writeVarint32=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r,i=G.calculateVarint32(e);t+=i;var a=this.buffer.byteLength;for(a<t&&this.resize((a*=2)>t?a:t),t-=i,e>>>=0;128<=e;)r=127&e|128,this.view[t++]=r,e>>>=7;return this.view[t++]=e,n?(this.offset=t,this):i},V.writeVarint32ZigZag=function(e,t){return this.writeVarint32(G.zigZagEncode32(e),t)},V.readVarint32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=0,r=0;do{if(!this.noAssert&&e>this.limit){var i=Error("Truncated");throw i.truncated=!0,i}}while(i=this.view[e++],n<5&&(r|=(127&i)<<7*n),++n,0!=(128&i));return r|=0,t?(this.offset=e,r):{value:r,length:n}},V.readVarint32ZigZag=function(e){return e=this.readVarint32(e),"object"===(0,y.default)(e)?e.value=G.zigZagDecode32(e.value):e=G.zigZagDecode32(e),e},s&&(G.MAX_VARINT64_BYTES=10,G.calculateVarint64=function(e){"number"==typeof e?e=s.fromNumber(e):"string"==typeof e&&(e=s.fromString(e));var t=e.toInt()>>>0,n=e.shiftRightUnsigned(28).toInt()>>>0,e=e.shiftRightUnsigned(56).toInt()>>>0;return 0==e?0==n?t<16384?t<128?1:2:t<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:e<128?9:10},G.zigZagEncode64=function(e){return"number"==typeof e?e=s.fromNumber(e,!1):"string"==typeof e?e=s.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},G.zigZagDecode64=function(e){return"number"==typeof e?e=s.fromNumber(e,!1):"string"==typeof e?e=s.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(s.ONE).toSigned().negate()).toSigned()},V.writeVarint64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=s.fromNumber(e);else if("string"==typeof e)e=s.fromString(e);else if(!(e&&e instanceof s))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=s.fromNumber(e,!1):"string"==typeof e?e=s.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned());var r=G.calculateVarint64(e),i=e.toInt()>>>0,a=e.shiftRightUnsigned(28).toInt()>>>0,o=e.shiftRightUnsigned(56).toInt()>>>0;switch(t+=r,e=this.buffer.byteLength,e<t&&this.resize((e*=2)>t?e:t),t-=r,r){case 10:this.view[t+9]=o>>>7&1;case 9:this.view[t+8]=9!==r?128|o:127&o;case 8:this.view[t+7]=8!==r?a>>>21|128:a>>>21&127;case 7:this.view[t+6]=7!==r?a>>>14|128:a>>>14&127;case 6:this.view[t+5]=6!==r?a>>>7|128:a>>>7&127;case 5:this.view[t+4]=5!==r?128|a:127&a;case 4:this.view[t+3]=4!==r?i>>>21|128:i>>>21&127;case 3:this.view[t+2]=3!==r?i>>>14|128:i>>>14&127;case 2:this.view[t+1]=2!==r?i>>>7|128:i>>>7&127;case 1:this.view[t]=1!==r?128|i:127&i}return n?(this.offset+=r,this):r},V.writeVarint64ZigZag=function(e,t){return this.writeVarint64(G.zigZagEncode64(e),t)},V.readVarint64=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,r=0,i=0,a=0,o=0,o=this.view[e++],r=127&o;if(128&o&&(o=this.view[e++],r|=(127&o)<<7,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],r|=(127&o)<<14,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],r|=(127&o)<<21,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],i=127&o,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],i|=(127&o)<<7,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],i|=(127&o)<<14,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],i|=(127&o)<<21,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],a=127&o,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],a|=(127&o)<<7,128&o||this.noAssert&&void 0===o))))))))))throw Error("Buffer overrun");return a=s.fromBits(r|i<<28,i>>>4|a<<24,!1),t?(this.offset=e,a):{value:a,length:e-n}},V.readVarint64ZigZag=function(e){return e=this.readVarint64(e),e&&e.value instanceof s?e.value=G.zigZagDecode64(e.value):e=G.zigZagDecode64(e),e}),V.writeCString=function(e,t){var n=void 0===t;n&&(t=this.offset);var r,i=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(r=0;r<i;++r)if(0===e.charCodeAt(r))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}i=K.calculateUTF16asUTF8(W(e))[1],t+=i+1;var a=this.buffer.byteLength;return a<t&&this.resize((a*=2)>t?a:t),t-=i+1,K.encodeUTF16toUTF8(W(e),(0,M.default)(a=function(e){this.view[t++]=e}).call(a,this)),this.view[t++]=0,n?(this.offset=t,this):i},V.readCString=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n,r=e,i=-1;return K.decodeUTF8toUTF16((0,M.default)(n=function(){if(0===i)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return i=this.view[e++],0===i?null:i}).call(n,this),n=Y(),!0),t?(this.offset=e,n()):{string:n(),length:e-r}},V.writeIString=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r=t,i=K.calculateUTF16asUTF8(W(e),this.noAssert)[1];t+=4+i;var a=this.buffer.byteLength;if(a<t&&this.resize((a*=2)>t?a:t),t-=4+i,this.littleEndian?(this.view[t+3]=i>>>24&255,this.view[t+2]=i>>>16&255,this.view[t+1]=i>>>8&255,this.view[t]=255&i):(this.view[t]=i>>>24&255,this.view[t+1]=i>>>16&255,this.view[t+2]=i>>>8&255,this.view[t+3]=255&i),t+=4,K.encodeUTF16toUTF8(W(e),(0,M.default)(e=function(e){this.view[t++]=e}).call(e,this)),t!==r+4+i)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+i));return n?(this.offset=t,this):t-r},V.readIString=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=e,r=this.readUint32(e),r=this.readUTF8String(r,G.METRICS_BYTES,e+=4);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-n}},G.METRICS_CHARS="c",G.METRICS_BYTES="b",V.writeUTF8String=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r=t,i=K.calculateUTF16asUTF8(W(e))[1];t+=i;var a=this.buffer.byteLength;return a<t&&this.resize((a*=2)>t?a:t),t-=i,K.encodeUTF16toUTF8(W(e),(0,M.default)(e=function(e){this.view[t++]=e}).call(e,this)),n?(this.offset=t,this):t-r},V.writeString=V.writeUTF8String,G.calculateUTF8Chars=function(e){return K.calculateUTF16asUTF8(W(e))[0]},G.calculateUTF8Bytes=function(e){return K.calculateUTF16asUTF8(W(e))[1]},G.calculateString=G.calculateUTF8Bytes,V.readUTF8String=function(e,t,n){"number"==typeof t&&(n=t,t=void 0);var r=void 0===n;if(r&&(n=this.offset),void 0===t&&(t=G.METRICS_CHARS),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var i=0,a=n;if(t===G.METRICS_CHARS){var o,s=Y();if(K.decodeUTF8((0,M.default)(o=function(){return i<e&&n<this.limit?this.view[n++]:null}).call(o,this),function(e){++i,K.UTF8toUTF16(e,s)}),i!==e)throw RangeError("Illegal range: Truncated data, "+i+" == "+e);return r?(this.offset=n,s()):{string:s(),length:n-a}}if(t!==G.METRICS_BYTES)throw TypeError("Unsupported metrics: "+t);if(!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+e+") <= "+this.buffer.byteLength)}var l=n+e;if(K.decodeUTF8toUTF16((0,M.default)(t=function(){return n<l?this.view[n++]:null}).call(t,this),s=Y(),this.noAssert),n!==l)throw RangeError("Illegal range: Truncated data, "+n+" == "+l);return r?(this.offset=n,s()):{string:s(),length:n-a}},V.readString=V.readUTF8String,V.writeVString=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r=t,i=K.calculateUTF16asUTF8(W(e),this.noAssert)[1],a=G.calculateVarint32(i);t+=a+i;var o=this.buffer.byteLength;if(o<t&&this.resize((o*=2)>t?o:t),t-=a+i,t+=this.writeVarint32(i,t),K.encodeUTF16toUTF8(W(e),(0,M.default)(e=function(e){this.view[t++]=e}).call(e,this)),t!==r+i+a)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+i+a));return n?(this.offset=t,this):t-r},V.readVString=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,r=this.readVarint32(e),r=this.readUTF8String(r.value,G.METRICS_BYTES,e+=r.length);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-n}},V.append=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof G||(e=G.wrap(e,t));var i=e.limit-e.offset;return i<=0||(n+=i,t=this.buffer.byteLength,t<n&&this.resize((t*=2)>n?t:n),n-=i,this.view.set(e.view.subarray(e.offset,e.limit),n),e.offset+=i,r&&(this.offset+=i)),this},V.appendTo=function(e,t){return e.append(this,t),this},V.assert=function(e){return this.noAssert=!e,this},V.capacity=function(){return this.buffer.byteLength},V.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},V.clone=function(e){var t=new G(0,this.littleEndian,this.noAssert);return e?(t.buffer=new ArrayBuffer(this.buffer.byteLength),t.view=new Uint8Array(t.buffer)):(t.buffer=this.buffer,t.view=this.view),t.offset=this.offset,t.markedOffset=this.markedOffset,t.limit=this.limit,t},V.compact=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||t<e||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var n=t-e;if(0===n)return this.buffer=H,this.view=null,0<=this.markedOffset&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var r=new ArrayBuffer(n),i=new Uint8Array(r);return i.set(this.view.subarray(e,t)),this.buffer=r,this.view=i,0<=this.markedOffset&&(this.markedOffset-=e),this.offset=0,this.limit=n,this},V.copy=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||t<e||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(e===t)return new G(0,this.littleEndian,this.noAssert);var n=t-e,r=new G(n,this.littleEndian,this.noAssert);return r.offset=0,r.limit=n,0<=r.markedOffset&&(r.markedOffset-=e),this.copyTo(r,0,e,t),r},V.copyTo=function(e,t,n,r){var i,a;if(!this.noAssert&&!G.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(t=(a=void 0===t)?e.offset:0|t,n=(i=void 0===n)?this.offset:0|n,r=void 0===r?this.limit:0|r,t<0||t>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+t+" <= "+e.buffer.byteLength);if(n<0||r>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var o=r-n;return 0===o?e:(e.ensureCapacity(t+o),e.view.set(this.view.subarray(n,r),t),i&&(this.offset+=o),a&&(e.offset+=o),this)},V.ensureCapacity=function(e){var t=this.buffer.byteLength;return t<e?this.resize((t*=2)>e?t:e):this},V.fill=function(e,t,n){var r=void 0===t;if(r&&(t=this.offset),"string"==typeof e&&0<e.length&&(e=e.charCodeAt(0)),void 0===t&&(t=this.offset),void 0===n&&(n=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal end: Not an integer");if(n>>>=0,t<0||n<t||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}if(n<=t)return this;for(;t<n;)this.view[t++]=e;return r&&(this.offset=t),this},V.flip=function(){return this.limit=this.offset,this.offset=0,this},V.mark=function(e){if(e=void 0===e?this.offset:e,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},V.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},V.LE=function(e){return this.littleEndian=void 0===e||!!e,this},V.BE=function(e){return this.littleEndian=void 0!==e&&!e,this},V.prepend=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof G||(e=G.wrap(e,t));var i=e.limit-e.offset;if(i<=0)return this;var a,o=i-n;return 0<o?(a=new ArrayBuffer(this.buffer.byteLength+o),t=new Uint8Array(a),t.set(this.view.subarray(n,this.buffer.byteLength),i),this.buffer=a,this.view=t,this.offset+=o,0<=this.markedOffset&&(this.markedOffset+=o),this.limit+=o,n+=o):new Uint8Array(this.buffer),this.view.set(e.view.subarray(e.offset,e.limit),n-i),e.offset=e.limit,r&&(this.offset-=i),this},V.prependTo=function(e,t){return e.prepend(this,t),this},V.printDebug=function(e){var t;"function"!=typeof e&&(e=(0,M.default)(t=console.log).call(t,console)),e(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},V.remaining=function(){return this.limit-this.offset},V.reset=function(){return 0<=this.markedOffset?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},V.resize=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal capacity: "+e+" (not an integer)");if(e|=0,e<0)throw RangeError("Illegal capacity: 0 <= "+e)}var t;return this.buffer.byteLength<e&&(t=new ArrayBuffer(e),e=new Uint8Array(t),e.set(this.view),this.buffer=t,this.view=e),this},V.reverse=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||t<e||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t||(0,r.default)(Array.prototype).call(this.view.subarray(e,t)),this},V.skip=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},V.slice=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||t<e||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var n=this.clone();return n.offset=e,n.limit=t,n},V.toBuffer=function(e){var t=this.offset,n=this.limit;if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal limit: Not an integer");if(n>>>=0,t<0||n<t||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}return e||0!==t||n!==this.buffer.byteLength?t===n?H:(e=new ArrayBuffer(n-t),new Uint8Array(e).set(new Uint8Array(this.buffer).subarray(t,n),0),e):this.buffer},V.toArrayBuffer=V.toBuffer,V.toString=function(e,t,n){if(void 0===e)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof e&&(e="utf8",t=e,n=t),e){case"utf8":return this.toUTF8(t,n);case"base64":return this.toBase64(t,n);case"hex":return this.toHex(t,n);case"binary":return this.toBinary(t,n);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var Z=function(){for(var e={},i=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],o=[],t=0,n=i.length;t<n;++t)o[i[t]]=t;return e.encode=function(e,t){for(var n,r;null!==(n=e());)t(i[n>>2&63]),r=(3&n)<<4,null!==(n=e())?(r|=n>>4&15,t(i[63&(r|n>>4&15)]),r=(15&n)<<2,null!==(n=e())?(t(i[63&(r|n>>6&3)]),t(i[63&n])):(t(i[63&r]),t(61))):(t(i[63&r]),t(61),t(61))},e.decode=function(e,t){var n,r,i;function a(e){throw Error("Illegal character code: "+e)}for(;null!==(n=e());)if(r=o[n],void 0===r&&a(n),null!==(n=e())&&(i=o[n],void 0===i&&a(n),t(r<<2>>>0|(48&i)>>4),null!==(n=e()))){if(r=o[n],void 0===r){if(61===n)break;a(n)}if(t((15&i)<<4>>>0|(60&r)>>2),null!==(n=e())){if(i=o[n],void 0===i){if(61===n)break;a(n)}t((3&r)<<6>>>0|i)}}},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},e}();V.toBase64=function(e,t){var n;if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),e|=0,t|=0,e<0||t>this.capacity||t<e)throw RangeError("begin, end");return Z.encode((0,M.default)(n=function(){return e<t?this.view[e++]:null}).call(n,this),n=Y()),n()},G.fromBase64=function(e,t){if("string"!=typeof e)throw TypeError("str");var n=new G(e.length/4*3,t),r=0;return Z.decode(W(e),function(e){n.view[r++]=e}),n.limit=r,n},G.btoa=function(e){return G.fromBinary(e).toBase64()},G.atob=function(e){return G.fromBase64(e).toBinary()},V.toBinary=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),e|=0,t|=0,e<0||t>this.capacity()||t<e)throw RangeError("begin, end");if(e===t)return"";for(var n=[],r=[];e<t;)n.push(this.view[e++]),1024<=n.length&&(r.push(String.fromCharCode.apply(String,n)),n=[]);return r.join("")+String.fromCharCode.apply(String,n)},G.fromBinary=function(e,t){if("string"!=typeof e)throw TypeError("str");for(var n,r=0,i=e.length,a=new G(i,t);r<i;){if(n=e.charCodeAt(r),255<n)throw RangeError("illegal char code: "+n);a.view[r++]=n}return a.limit=i,a},V.toDebug=function(e){for(var t,n=-1,r=this.buffer.byteLength,i="",a="",o="";n<r;){if(-1!==n&&(t=this.view[n],i+=t<16?"0"+t.toString(16).toUpperCase():t.toString(16).toUpperCase(),e&&(a+=32<t&&t<127?String.fromCharCode(t):".")),++n,e&&0<n&&n%16==0&&n!==r){for(;i.length<51;)i+=" ";o+=i+a+"\n",i=a=""}n===this.offset&&n===this.limit?i+=n===this.markedOffset?"!":"|":n===this.offset?i+=n===this.markedOffset?"[":"<":n===this.limit?i+=n===this.markedOffset?"]":">":i+=n===this.markedOffset?"'":e||0!==n&&n!==r?" ":""}if(e&&" "!==i){for(;i.length<51;)i+=" ";o+=i+a+"\n"}return e?o:i},G.fromDebug=function(e,t,n){for(var r,i,a=e.length,o=new G((a+1)/3|0,t,n),s=0,l=0,u=!1,h=!1,c=!1,d=!1,f=!1;s<a;){switch(r=e.charAt(s++)){case"!":if(!n){if(h||c||d){f=!0;break}h=c=d=!0}o.offset=o.markedOffset=o.limit=l,u=!1;break;case"|":if(!n){if(h||d){f=!0;break}h=d=!0}o.offset=o.limit=l,u=!1;break;case"[":if(!n){if(h||c){f=!0;break}h=c=!0}o.offset=o.markedOffset=l,u=!1;break;case"<":if(!n){if(h){f=!0;break}h=!0}o.offset=l,u=!1;break;case"]":if(!n){if(d||c){f=!0;break}d=c=!0}o.limit=o.markedOffset=l,u=!1;break;case">":if(!n){if(d){f=!0;break}d=!0}o.limit=l,u=!1;break;case"'":if(!n){if(c){f=!0;break}c=!0}o.markedOffset=l,u=!1;break;case" ":u=!1;break;default:if(!n&&u){f=!0;break}if(i=(0,w.default)(r+e.charAt(s++),16),!n&&(isNaN(i)||i<0||255<i))throw TypeError("Illegal str: Not a debug encoded string");o.view[l++]=i,u=!0}if(f)throw TypeError("Illegal str: Invalid symbol at "+s)}if(!n){if(!h||!d)throw TypeError("Illegal str: Missing offset or limit");if(l<o.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+l+" < "+a)}return o},V.toHex=function(e,t){if(e=void 0===e?this.offset:e,t=void 0===t?this.limit:t,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||t<e||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var n,r=new Array(t-e);e<t;)n=this.view[e++],n<16?r.push("0",n.toString(16)):r.push(n.toString(16));return r.join("")},G.fromHex=function(e,t,n){if(!n){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if(e.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var r,i=e.length,a=new G(i/2|0,t),o=0,s=0;o<i;o+=2){if(r=(0,w.default)(e.substring(o,o+2),16),!n&&(!isFinite(r)||r<0||255<r))throw TypeError("Illegal str: Contains non-hex characters");a.view[s++]=r}return a.limit=s,a};var J,K=(J={MAX_CODEPOINT:1114111,encodeUTF8:function(e,t){var n=null;for("number"==typeof e&&(n=e,e=function(){return null});null!==n||null!==(n=e());)n<128?t(127&n):(n<2048?t(n>>6&31|192):(n<65536?t(n>>12&15|224):(t(n>>18&7|240),t(n>>12&63|128)),t(n>>6&63|128)),t(63&n|128)),n=null},decodeUTF8:function(e,t){for(var n,r,i,a,o=function(e){e=(0,b.default)(e).call(e,0,(0,x.default)(e).call(e,null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(n=e());)if(0==(128&n))t(n);else if(192==(224&n))null===(r=e())&&o([n,r]),t((31&n)<<6|63&r);else if(224==(240&n))null!==(r=e())&&null!==(i=e())||o([n,r,i]),t((15&n)<<12|(63&r)<<6|63&i);else{if(240!=(248&n))throw RangeError("Illegal starting byte: "+n);null!==(r=e())&&null!==(i=e())&&null!==(a=e())||o([n,r,i,a]),t((7&n)<<18|(63&r)<<12|(63&i)<<6|63&a)}},UTF16toUTF8:function(e,t){for(var n,r=null;null!==(n=null!==r?r:e());)55296<=n&&n<=57343&&null!==(r=e())&&56320<=r&&r<=57343?(t(1024*(n-55296)+r-56320+65536),r=null):t(n);null!==r&&t(r)},UTF8toUTF16:function(e,t){var n=null;for("number"==typeof e&&(n=e,e=function(){return null});null!==n||null!==(n=e());)n<=65535?t(n):(n-=65536,t(55296+(n>>10)),t(n%1024+56320)),n=null},encodeUTF16toUTF8:function(e,t){J.UTF16toUTF8(e,function(e){J.encodeUTF8(e,t)})},decodeUTF8toUTF16:function(e,t){J.decodeUTF8(e,function(e){J.UTF8toUTF16(e,t)})},calculateCodePoint:function(e){return e<128?1:e<2048?2:e<65536?3:4},calculateUTF8:function(e){for(var t,n=0;null!==(t=e());)n+=t<128?1:t<2048?2:t<65536?3:4;return n},calculateUTF16asUTF8:function(e){var t=0,n=0;return J.UTF16toUTF8(e,function(e){++t,n+=e<128?1:e<2048?2:e<65536?3:4}),[t,n]}},J);V.toUTF8=function(t,n){if(void 0===t&&(t=this.offset),void 0===n&&(n=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal end: Not an integer");if(n>>>=0,t<0||n<t||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}var e,r;try{K.decodeUTF8toUTF16((0,M.default)(r=function(){return t<n?this.view[t++]:null}).call(r,this),e=Y())}catch(e){if(t!==n)throw RangeError("Illegal range: Truncated data, "+t+" != "+n)}return e()},G.fromUTF8=function(e,t,n){if(!n&&"string"!=typeof e)throw TypeError("Illegal str: Not a string");var r=new G(K.calculateUTF16asUTF8(W(e),!0)[1],t,n),i=0;return K.encodeUTF16toUTF8(W(e),function(e){r.view[i++]=e}),r.limit=i,r};var Q,$,ee,te,ne,re,ie={};function ae(t){var e;t.messages&&(0,I.default)(e=t.messages).call(e,function(e){e.syntax=t.syntax,ae(e)}),t.enums&&(0,I.default)(e=t.enums).call(e,function(e){e.syntax=t.syntax})}function oe(e){var t=0;return{next:function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}}se.ProtoBuf=ie,ie.ByteBuffer=G,ie.Long=G.Long||null,ie.VERSION="5.0.1",ie.WIRE_TYPES={},ie.WIRE_TYPES.VARINT=0,ie.WIRE_TYPES.BITS64=1,ie.WIRE_TYPES.LDELIM=2,ie.WIRE_TYPES.STARTGROUP=3,ie.WIRE_TYPES.ENDGROUP=4,ie.WIRE_TYPES.BITS32=5,ie.PACKABLE_WIRE_TYPES=[ie.WIRE_TYPES.VARINT,ie.WIRE_TYPES.BITS64,ie.WIRE_TYPES.BITS32],ie.TYPES={int32:{name:"int32",wireType:ie.WIRE_TYPES.VARINT,defaultValue:0},uint32:{name:"uint32",wireType:ie.WIRE_TYPES.VARINT,defaultValue:0},sint32:{name:"sint32",wireType:ie.WIRE_TYPES.VARINT,defaultValue:0},int64:{name:"int64",wireType:ie.WIRE_TYPES.VARINT,defaultValue:ie.Long?ie.Long.ZERO:void 0},uint64:{name:"uint64",wireType:ie.WIRE_TYPES.VARINT,defaultValue:ie.Long?ie.Long.UZERO:void 0},sint64:{name:"sint64",wireType:ie.WIRE_TYPES.VARINT,defaultValue:ie.Long?ie.Long.ZERO:void 0},bool:{name:"bool",wireType:ie.WIRE_TYPES.VARINT,defaultValue:!1},double:{name:"double",wireType:ie.WIRE_TYPES.BITS64,defaultValue:0},string:{name:"string",wireType:ie.WIRE_TYPES.LDELIM,defaultValue:""},bytes:{name:"bytes",wireType:ie.WIRE_TYPES.LDELIM,defaultValue:null},fixed32:{name:"fixed32",wireType:ie.WIRE_TYPES.BITS32,defaultValue:0},sfixed32:{name:"sfixed32",wireType:ie.WIRE_TYPES.BITS32,defaultValue:0},fixed64:{name:"fixed64",wireType:ie.WIRE_TYPES.BITS64,defaultValue:ie.Long?ie.Long.UZERO:void 0},sfixed64:{name:"sfixed64",wireType:ie.WIRE_TYPES.BITS64,defaultValue:ie.Long?ie.Long.ZERO:void 0},float:{name:"float",wireType:ie.WIRE_TYPES.BITS32,defaultValue:0},enum:{name:"enum",wireType:ie.WIRE_TYPES.VARINT,defaultValue:0},message:{name:"message",wireType:ie.WIRE_TYPES.LDELIM,defaultValue:null},group:{name:"group",wireType:ie.WIRE_TYPES.STARTGROUP,defaultValue:null}},ie.MAP_KEY_TYPES=[ie.TYPES.int32,ie.TYPES.sint32,ie.TYPES.sfixed32,ie.TYPES.uint32,ie.TYPES.fixed32,ie.TYPES.int64,ie.TYPES.sint64,ie.TYPES.sfixed64,ie.TYPES.uint64,ie.TYPES.fixed64,ie.TYPES.bool,ie.TYPES.string,ie.TYPES.bytes],ie.ID_MIN=1,ie.ID_MAX=536870911,ie.convertFieldsToCamelCase=!1,ie.populateAccessors=!0,ie.populateDefaults=!0,ie.Util=(Q={},Q.IS_NODE=!("object"!==(void 0===e?"undefined":(0,y.default)(e))||e+""!="[object process]"||e.browser),Q.XHR=function(){for(var e=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],t=null,n=0;n<e.length;n++){try{t=e[n]()}catch(e){continue}break}if(!t)throw Error("XMLHttpRequest is not supported");return t},Q.fetch=function(e,n){if(n&&"function"!=typeof n&&(n=null),Q.IS_NODE){var t=le(483);if(n)t.readFile(e,function(e,t){n(e?null:""+t)});else try{return t.readFileSync(e)}catch(e){return null}}else{var r=Q.XHR();if(r.open("GET",e,!!n),r.setRequestHeader("Accept","text/plain"),"function"==typeof r.overrideMimeType&&r.overrideMimeType("text/plain"),!n)return r.send(null),200==r.status||0==r.status&&"string"==typeof r.responseText?r.responseText:null;r.onreadystatechange=function(){4==r.readyState&&(200==r.status||0==r.status&&"string"==typeof r.responseText?n(r.responseText):n(null))},4!=r.readyState&&r.send(null)}},Q.toCamelCase=function(e){return e.replace(/_([a-zA-Z])/g,function(e,t){return t.toUpperCase()})},Q),ie.Lang={DELIM:/[\s\{\}=;:\[\],'"\(\)<>]/g,RULE:/^(?:required|optional|repeated|map)$/,TYPE:/^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,NAME:/^[a-zA-Z_][a-zA-Z_0-9]*$/,TYPEDEF:/^[a-zA-Z][a-zA-Z_0-9]*$/,TYPEREF:/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,FQTYPEREF:/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,NUMBER:/^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,NUMBER_DEC:/^(?:[1-9][0-9]*|0)$/,NUMBER_HEX:/^0[xX][0-9a-fA-F]+$/,NUMBER_OCT:/^0[0-7]+$/,NUMBER_FLT:/^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,BOOL:/^(?:true|false)$/i,ID:/^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,NEGID:/^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,WHITESPACE:/\s/,STRING:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,STRING_DQ:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,STRING_SQ:/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},ie.DotProto=function(i,a){var e={},t=function(e){this.source=e+"",this.index=0,this.line=1,this.stack=[],this._stringOpen=null},n=t.prototype;n._readString=function(){var e='"'===this._stringOpen?a.STRING_DQ:a.STRING_SQ;e.lastIndex=this.index-1;var t=e.exec(this.source);if(!t)throw Error("unterminated string");return this.index=e.lastIndex,this.stack.push(this._stringOpen),this._stringOpen=null,t[1]},n.next=function(){if(0<this.stack.length)return this.stack.shift();if(this.index>=this.source.length)return null;if(null!==this._stringOpen)return this._readString();var e,t,n;do{for(e=!1;a.WHITESPACE.test(n=this.source.charAt(this.index));)if("\n"===n&&++this.line,++this.index===this.source.length)return null;if("/"===this.source.charAt(this.index))if(++this.index,"/"===this.source.charAt(this.index)){for(;"\n"!==this.source.charAt(++this.index);)if(this.index==this.source.length)return null;++this.index,++this.line,e=!0}else{if("*"!==(n=this.source.charAt(this.index)))return"/";do{if("\n"===n&&++this.line,++this.index===this.source.length)return null}while(t=n,n=this.source.charAt(this.index),"*"!==t||"/"!==n);++this.index,e=!0}}while(e);if(this.index===this.source.length)return null;var r=this.index;a.DELIM.lastIndex=0;var i=a.DELIM.test(this.source.charAt(r++));if(!i)for(;r<this.source.length&&!a.DELIM.test(this.source.charAt(r));)++r;return i=this.source.substring(this.index,this.index=r),'"'!==i&&"'"!==i||(this._stringOpen=i),i},n.peek=function(){if(0===this.stack.length){var e=this.next();if(null===e)return null;this.stack.push(e)}return this.stack[0]},n.skip=function(e){var t=this.next();if(t!==e)throw Error("illegal '"+t+"', '"+e+"' expected")},n.omit=function(e){return this.peek()===e&&(this.next(),!0)},n.toString=function(){return"Tokenizer ("+this.index+"/"+this.source.length+" at line "+this.line+")"},e.Tokenizer=t;var r=function(e){this.tn=new t(e),this.proto3=!1},n=r.prototype;function o(e,t){var n=-1,r=1;if("-"==e.charAt(0)&&(r=-1,e=e.substring(1)),a.NUMBER_DEC.test(e))n=(0,w.default)(e);else if(a.NUMBER_HEX.test(e))n=(0,w.default)(e.substring(2),16);else{if(!a.NUMBER_OCT.test(e))throw Error("illegal id value: "+(r<0?"-":"")+e);n=(0,w.default)(e.substring(1),8)}if(n=r*n|0,!t&&n<0)throw Error("illegal id value: "+(r<0?"-":"")+e);return n}function s(e){var t=1;if("-"==e.charAt(0)&&(t=-1,e=e.substring(1)),a.NUMBER_DEC.test(e))return t*(0,w.default)(e,10);if(a.NUMBER_HEX.test(e))return t*(0,w.default)(e.substring(2),16);if(a.NUMBER_OCT.test(e))return t*(0,w.default)(e.substring(1),8);if("inf"===e)return Infinity*t;if("nan"===e)return NaN;if(a.NUMBER_FLT.test(e))return t*(0,u.default)(e);throw Error("illegal number value: "+(t<0?"-":"")+e)}function l(e,t,n){void 0===e[t]?e[t]=n:((0,T.default)(e[t])||(e[t]=[e[t]]),e[t].push(n))}return n.parse=function(){var e,t,n={name:"[ROOT]",package:null,messages:[],enums:[],imports:[],options:{},services:[]},r=!0;try{for(;e=this.tn.next();)switch(e){case"package":if(!r||null!==n.package)throw Error("unexpected 'package'");if(e=this.tn.next(),!a.TYPEREF.test(e))throw Error("illegal package name: "+e);this.tn.skip(";"),n.package=e;break;case"import":if(!r)throw Error("unexpected 'import'");e=this.tn.peek(),"public"!==e&&!(t="weak"===e)||this.tn.next(),e=this._readString(),this.tn.skip(";"),t||n.imports.push(e);break;case"syntax":if(!r)throw Error("unexpected 'syntax'");this.tn.skip("="),"proto3"===(n.syntax=this._readString())&&(this.proto3=!0),this.tn.skip(";");break;case"message":this._parseMessage(n,null),r=!1;break;case"enum":this._parseEnum(n),r=!1;break;case"option":this._parseOption(n);break;case"service":this._parseService(n);break;case"extend":this._parseExtend(n);break;default:throw Error("unexpected '"+e+"'")}}catch(e){throw e.message="Parse error at line "+this.tn.line+": "+e.message,e}return delete n.name,n},r.parse=function(e){return new r(e).parse()},n._readString=function(){var e,t="";do{if(e=this.tn.next(),"'"!==e&&'"'!==e)throw Error("illegal string delimiter: "+e)}while(t+=this.tn.next(),this.tn.skip(e),e=this.tn.peek(),'"'===e||'"'===e);return t},n._readValue=function(e){var t=this.tn.peek();if('"'===t||"'"===t)return this._readString();if(this.tn.next(),a.NUMBER.test(t))return s(t);if(a.BOOL.test(t))return"true"===t.toLowerCase();if(e&&a.TYPEREF.test(t))return t;throw Error("illegal value: "+t)},n._parseOption=function(e,t){var n=this.tn.next(),r=!1;if("("===n&&(r=!0,n=this.tn.next()),!a.TYPEREF.test(n))throw Error("illegal option name: "+n);var i=n;r&&(this.tn.skip(")"),i="("+i+")",n=this.tn.peek(),a.FQTYPEREF.test(n)&&(i+=n,this.tn.next())),this.tn.skip("="),this._parseOptionValue(e,i),t||this.tn.skip(";")},n._parseOptionValue=function(e,t){var n=this.tn.peek();if("{"!==n)l(e.options,t,this._readValue(!0));else for(this.tn.skip("{");"}"!==(n=this.tn.next());){if(!a.NAME.test(n))throw Error("illegal option name: "+t+"."+n);this.tn.omit(":")?l(e.options,t+"."+n,this._readValue(!0)):this._parseOptionValue(e,t+"."+n)}},n._parseService=function(e){var t=this.tn.next();if(!a.NAME.test(t))throw Error("illegal service name at line "+this.tn.line+": "+t);var n=t,r={name:n,rpc:{},options:{}};for(this.tn.skip("{");"}"!==(t=this.tn.next());)if("option"===t)this._parseOption(r);else{if("rpc"!==t)throw Error("illegal service token: "+t);this._parseServiceRPC(r)}this.tn.omit(";"),e.services.push(r)},n._parseServiceRPC=function(e){var t="rpc",n=this.tn.next();if(!a.NAME.test(n))throw Error("illegal rpc service method name: "+n);var r=n,i={request:null,response:null,request_stream:!1,response_stream:!1,options:{}};if(this.tn.skip("("),n=this.tn.next(),"stream"===n.toLowerCase()&&(i.request_stream=!0,n=this.tn.next()),!a.TYPEREF.test(n))throw Error("illegal rpc service request type: "+n);if(i.request=n,this.tn.skip(")"),n=this.tn.next(),"returns"!==n.toLowerCase())throw Error("illegal rpc service request type delimiter: "+n);if(this.tn.skip("("),n=this.tn.next(),"stream"===n.toLowerCase()&&(i.response_stream=!0,n=this.tn.next()),i.response=n,this.tn.skip(")"),n=this.tn.peek(),"{"===n){for(this.tn.next();"}"!==(n=this.tn.next());){if("option"!==n)throw Error("illegal rpc service token: "+n);this._parseOption(i)}this.tn.omit(";")}else this.tn.skip(";");void 0===e[t]&&(e[t]={}),e[t][r]=i},n._parseMessage=function(e,t){var n=!!t,r=this.tn.next(),i={name:"",fields:[],enums:[],messages:[],options:{},services:[],oneofs:{}};if(!a.NAME.test(r))throw Error("illegal "+(n?"group":"message")+" name: "+r);for(i.name=r,n&&(this.tn.skip("="),t.id=o(this.tn.next()),i.isGroup=!0),r=this.tn.peek(),"["===r&&t&&this._parseFieldOptions(t),this.tn.skip("{");"}"!==(r=this.tn.next());)if(a.RULE.test(r))this._parseMessageField(i,r);else if("oneof"===r)this._parseMessageOneOf(i);else if("enum"===r)this._parseEnum(i);else if("message"===r)this._parseMessage(i);else if("option"===r)this._parseOption(i);else if("service"===r)this._parseService(i);else if("extensions"===r)i.extensions=this._parseExtensionRanges();else if("reserved"===r)this._parseIgnored();else if("extend"===r)this._parseExtend(i);else{if(!a.TYPEREF.test(r))throw Error("illegal message token: "+r);if(!this.proto3)throw Error("illegal field rule: "+r);this._parseMessageField(i,"optional",r)}return this.tn.omit(";"),e.messages.push(i),i},n._parseIgnored=function(){for(;";"!==this.tn.peek();)this.tn.next();this.tn.skip(";")},n._parseMessageField=function(e,t,n){if(!a.RULE.test(t))throw Error("illegal message field rule: "+t);var r,i={rule:t,type:"",name:"",options:{},id:0};if("map"===t){if(n)throw Error("illegal type: "+n);if(this.tn.skip("<"),r=this.tn.next(),!a.TYPE.test(r)&&!a.TYPEREF.test(r))throw Error("illegal message field type: "+r);if(i.keytype=r,this.tn.skip(","),r=this.tn.next(),!a.TYPE.test(r)&&!a.TYPEREF.test(r))throw Error("illegal message field: "+r);if(i.type=r,this.tn.skip(">"),r=this.tn.next(),!a.NAME.test(r))throw Error("illegal message field name: "+r);i.name=r,this.tn.skip("="),i.id=o(this.tn.next()),r=this.tn.peek(),"["===r&&this._parseFieldOptions(i),this.tn.skip(";")}else if(n=void 0!==n?n:this.tn.next(),"group"===n){if(t=this._parseMessage(e,i),!/^[A-Z]/.test(t.name))throw Error("illegal group name: "+t.name);i.type=t.name,i.name=t.name.toLowerCase(),this.tn.omit(";")}else{if(!a.TYPE.test(n)&&!a.TYPEREF.test(n))throw Error("illegal message field type: "+n);if(i.type=n,r=this.tn.next(),!a.NAME.test(r))throw Error("illegal message field name: "+r);i.name=r,this.tn.skip("="),i.id=o(this.tn.next()),r=this.tn.peek(),"["===r&&this._parseFieldOptions(i),this.tn.skip(";")}return e.fields.push(i),i},n._parseMessageOneOf=function(e){var t=this.tn.next();if(!a.NAME.test(t))throw Error("illegal oneof name: "+t);var n,r=t,i=[];for(this.tn.skip("{");"}"!==(t=this.tn.next());)n=this._parseMessageField(e,"optional",t),n.oneof=r,i.push(n.id);this.tn.omit(";"),e.oneofs[r]=i},n._parseFieldOptions=function(e){this.tn.skip("[");for(var t=!0;"]"!==this.tn.peek();)t||this.tn.skip(","),this._parseOption(e,!0),t=!1;this.tn.next()},n._parseEnum=function(e){var t={name:"",values:[],options:{}},n=this.tn.next();if(!a.NAME.test(n))throw Error("illegal name: "+n);for(t.name=n,this.tn.skip("{");"}"!==(n=this.tn.next());)if("option"===n)this._parseOption(t);else{if(!a.NAME.test(n))throw Error("illegal name: "+n);this.tn.skip("=");var r={name:n,id:o(this.tn.next(),!0)},n=this.tn.peek();"["===n&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),(0,h.default)(t).push(r)}this.tn.omit(";"),e.enums.push(t)},n._parseExtensionRanges=function(){var e,t,n,r=[];do{for(t=[];;){switch(e=this.tn.next(),e){case"min":n=i.ID_MIN;break;case"max":n=i.ID_MAX;break;default:n=s(e)}if(t.push(n),2===t.length)break;if("to"!==this.tn.peek()){t.push(n);break}this.tn.next()}}while(r.push(t),this.tn.omit(","));return this.tn.skip(";"),r},n._parseExtend=function(e){var t=this.tn.next();if(!a.TYPEREF.test(t))throw Error("illegal extend reference: "+t);var n={ref:t,fields:[]};for(this.tn.skip("{");"}"!==(t=this.tn.next());)if(a.RULE.test(t))this._parseMessageField(n,t);else{if(!a.TYPEREF.test(t))throw Error("illegal extend token: "+t);if(!this.proto3)throw Error("illegal field rule: "+t);this._parseMessageField(n,"optional",t)}return this.tn.omit(";"),e.messages.push(n),n},n.toString=function(){return"Parser at line "+this.tn.line},e.Parser=r,e}(ie,ie.Lang),ie.Reflect=function(p){var o={},h=function(e,t,n){this.builder=e,this.parent=t,this.name=n,this.className},e=h.prototype;e.fqn=function(){for(var e=this.name,t=this;t=t.parent,null!=t;)e=t.name+"."+e;return e},e.toString=function(e){return(e?this.className+" ":"")+this.fqn()},e.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},o.T=h;var s=function(e,t,n,r,i){h.call(this,e,t,n),this.className="Namespace",this.children=[],this.options=r||{},this.syntax=i||"proto2"},t=s.prototype=(0,E.default)(h.prototype);t.getChildren=function(e){var t;if(e=e||null,null==e)return(0,b.default)(t=this.children).call(t);for(var n=[],r=0,i=this.children.length;r<i;++r)this.children[r]instanceof e&&n.push(this.children[r]);return n},t.addChild=function(e){var t;if(t=this.getChild(e.name))if(t instanceof d.Field&&t.name!==t.originalName&&null===this.getChild(t.originalName))t.name=t.originalName;else{if(!(e instanceof d.Field&&e.name!==e.originalName&&null===this.getChild(e.originalName)))throw Error("Duplicate name in namespace "+this.toString(!0)+": "+e.name);e.name=e.originalName}this.children.push(e)},t.getChild=function(e){for(var t="number"==typeof e?"id":"name",n=0,r=this.children.length;n<r;++n)if(this.children[n][t]===e)return this.children[n];return null},t.resolve=function(e,t){var n,r="string"==typeof e?e.split("."):e,i=this,a=0;if(""===r[a]){for(;null!==i.parent;)i=i.parent;a++}do{do{if(!(i instanceof o.Namespace)){i=null;break}if(n=i.getChild(r[a]),!n||!(n instanceof o.T)||t&&!(n instanceof o.Namespace)){i=null;break}}while(i=n,a++,a<r.length);if(null!=i)break;if(null!==this.parent)return this.parent.resolve(e,t)}while(null!=i);return i},t.qn=function(e){for(var t=[],n=e;t.unshift(n.name),n=n.parent,null!==n;);for(var r=1;r<=t.length;r++){var i=(0,b.default)(t).call(t,t.length-r);if(e===this.resolve(i,e instanceof o.Namespace))return i.join(".")}return e.fqn()},t.build=function(){for(var e,t={},n=this.children,r=0,i=n.length;r<i;++r)e=n[r],e instanceof s&&(t[e.name]=e.build());return _.default&&(0,_.default)(t,"$options",{value:this.buildOpt()}),t},t.buildOpt=function(){for(var e={},t=(0,S.default)(this.options),n=0,r=t.length;n<r;++n){var i=t[n],a=this.options[t[n]];e[i]=a}return e},t.getOption=function(e){return void 0===e?this.options:void 0!==this.options[e]?this.options[e]:null},o.Namespace=s;var c=function(e,t,n,r){if(this.type=e,this.resolvedType=t,this.isMapKey=n,this.syntax=r,n&&(0,x.default)(n=p.MAP_KEY_TYPES).call(n,e)<0)throw Error("Invalid map key type: "+e.name)},e=c.prototype;function n(e){if("string"==typeof e&&(e=p.TYPES[e]),void 0===e.defaultValue)throw Error("default value for type "+e.name+" is not supported");return e==p.TYPES.bytes?new G(0):e.defaultValue}function l(e,t){if(e&&"number"==typeof e.low&&"number"==typeof e.high&&"boolean"==typeof e.unsigned&&e.low==e.low&&e.high==e.high)return new p.Long(e.low,e.high,void 0===t?e.unsigned:t);if("string"==typeof e)return p.Long.fromString(e,t||!1,10);if("number"==typeof e)return p.Long.fromNumber(e,t||!1);throw Error("not convertible to Long")}c.defaultFieldValue=n,e.verifyValue=function(t){var n=this;function r(e,t){throw Error("Illegal value for "+n.toString(!0)+" of type "+n.type.name+": "+e+" ("+t+")")}switch(this.type){case p.TYPES.int32:case p.TYPES.sint32:case p.TYPES.sfixed32:return("number"!=typeof t||t==t&&t%1!=0)&&r((0,y.default)(t),"not an integer"),4294967295<t?0|t:t;case p.TYPES.uint32:case p.TYPES.fixed32:return("number"!=typeof t||t==t&&t%1!=0)&&r((0,y.default)(t),"not an integer"),t<0?t>>>0:t;case p.TYPES.int64:case p.TYPES.sint64:case p.TYPES.sfixed64:if(p.Long)try{return l(t,!1)}catch(e){r((0,y.default)(t),e.message)}else r((0,y.default)(t),"requires Long.js");case p.TYPES.uint64:case p.TYPES.fixed64:if(p.Long)try{return l(t,!0)}catch(e){r((0,y.default)(t),e.message)}else r((0,y.default)(t),"requires Long.js");case p.TYPES.bool:return"boolean"!=typeof t&&r((0,y.default)(t),"not a boolean"),t;case p.TYPES.float:case p.TYPES.double:return"number"!=typeof t&&r((0,y.default)(t),"not a number"),t;case p.TYPES.string:return"string"==typeof t||t&&t instanceof String||r((0,y.default)(t),"not a string"),""+t;case p.TYPES.bytes:return G.isByteBuffer(t)?t:G.wrap(t,"base64");case p.TYPES.enum:for(var e=this.resolvedType.getChildren(p.Reflect.Enum.Value),i=0;i<e.length;i++){if(e[i].name==t)return e[i].id;if(e[i].id==t)return e[i].id}if("proto3"===this.syntax)return("number"!=typeof t||t==t&&t%1!=0)&&r((0,y.default)(t),"not an integer"),(4294967295<t||t<0)&&r((0,y.default)(t),"not in range for uint32"),t;r(t,"not a valid enum value");case p.TYPES.group:case p.TYPES.message:if(t&&"object"===(0,y.default)(t)||r((0,y.default)(t),"object expected"),t instanceof this.resolvedType.clazz)return t;if(t instanceof p.Builder.Message){var a={};for(i in t)t.hasOwnProperty(i)&&(a[i]=t[i]);t=a}return new this.resolvedType.clazz(t)}throw Error("[INTERNAL] Illegal value for "+this.toString(!0)+": "+t+" (undefined type "+this.type+")")},e.calculateLength=function(e,t){if(null===t)return 0;var n;switch(this.type){case p.TYPES.int32:return t<0?G.calculateVarint64(t):G.calculateVarint32(t);case p.TYPES.uint32:return G.calculateVarint32(t);case p.TYPES.sint32:return G.calculateVarint32(G.zigZagEncode32(t));case p.TYPES.fixed32:case p.TYPES.sfixed32:case p.TYPES.float:return 4;case p.TYPES.int64:case p.TYPES.uint64:return G.calculateVarint64(t);case p.TYPES.sint64:return G.calculateVarint64(G.zigZagEncode64(t));case p.TYPES.fixed64:case p.TYPES.sfixed64:return 8;case p.TYPES.bool:return 1;case p.TYPES.enum:return G.calculateVarint32(t);case p.TYPES.double:return 8;case p.TYPES.string:return n=G.calculateUTF8Bytes(t),G.calculateVarint32(n)+n;case p.TYPES.bytes:if(t.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+t.remaining()+" bytes remaining");return G.calculateVarint32(t.remaining())+t.remaining();case p.TYPES.message:return n=this.resolvedType.calculate(t),G.calculateVarint32(n)+n;case p.TYPES.group:return n=this.resolvedType.calculate(t),n+G.calculateVarint32(e<<3|p.WIRE_TYPES.ENDGROUP)}throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+t+" (unknown type)")},e.encodeValue=function(e,t,n){if(null===t)return n;switch(this.type){case p.TYPES.int32:t<0?n.writeVarint64(t):n.writeVarint32(t);break;case p.TYPES.uint32:n.writeVarint32(t);break;case p.TYPES.sint32:n.writeVarint32ZigZag(t);break;case p.TYPES.fixed32:n.writeUint32(t);break;case p.TYPES.sfixed32:n.writeInt32(t);break;case p.TYPES.int64:case p.TYPES.uint64:n.writeVarint64(t);break;case p.TYPES.sint64:n.writeVarint64ZigZag(t);break;case p.TYPES.fixed64:n.writeUint64(t);break;case p.TYPES.sfixed64:n.writeInt64(t);break;case p.TYPES.bool:"string"==typeof t?n.writeVarint32("false"===t.toLowerCase()?0:!!t):n.writeVarint32(t?1:0);break;case p.TYPES.enum:n.writeVarint32(t);break;case p.TYPES.float:n.writeFloat32(t);break;case p.TYPES.double:n.writeFloat64(t);break;case p.TYPES.string:n.writeVString(t);break;case p.TYPES.bytes:if(t.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+t.remaining()+" bytes remaining");var r=t.offset;n.writeVarint32(t.remaining()),n.append(t),t.offset=r;break;case p.TYPES.message:r=(new G).LE(),this.resolvedType.encode(t,r),n.writeVarint32(r.offset),n.append(r.flip());break;case p.TYPES.group:this.resolvedType.encode(t,n),n.writeVarint32(e<<3|p.WIRE_TYPES.ENDGROUP);break;default:throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+t+" (unknown type)")}return n},e.decode=function(e,t,n){if(t!=this.type.wireType)throw Error("Unexpected wire type for element");var r,i;switch(this.type){case p.TYPES.int32:return 0|e.readVarint32();case p.TYPES.uint32:return e.readVarint32()>>>0;case p.TYPES.sint32:return 0|e.readVarint32ZigZag();case p.TYPES.fixed32:return e.readUint32()>>>0;case p.TYPES.sfixed32:return 0|e.readInt32();case p.TYPES.int64:return e.readVarint64();case p.TYPES.uint64:return e.readVarint64().toUnsigned();case p.TYPES.sint64:return e.readVarint64ZigZag();case p.TYPES.fixed64:return e.readUint64();case p.TYPES.sfixed64:return e.readInt64();case p.TYPES.bool:return!!e.readVarint32();case p.TYPES.enum:return e.readVarint32();case p.TYPES.float:return e.readFloat();case p.TYPES.double:return e.readDouble();case p.TYPES.string:return e.readVString();case p.TYPES.bytes:if(i=e.readVarint32(),e.remaining()<i)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+i+" required but got only "+e.remaining());return r=e.clone(),r.limit=r.offset+i,e.offset+=i,r;case p.TYPES.message:return i=e.readVarint32(),this.resolvedType.decode(e,i);case p.TYPES.group:return this.resolvedType.decode(e,-1,n)}throw Error("[INTERNAL] Illegal decode type")},e.valueFromString=function(e){if(!this.isMapKey)throw Error("valueFromString() called on non-map-key element");switch(this.type){case p.TYPES.int32:case p.TYPES.sint32:case p.TYPES.sfixed32:case p.TYPES.uint32:case p.TYPES.fixed32:return this.verifyValue((0,w.default)(e));case p.TYPES.int64:case p.TYPES.sint64:case p.TYPES.sfixed64:case p.TYPES.uint64:case p.TYPES.fixed64:return this.verifyValue(e);case p.TYPES.bool:return"true"===e;case p.TYPES.string:return this.verifyValue(e);case p.TYPES.bytes:return G.fromBinary(e)}},e.valueToString=function(e){if(!this.isMapKey)throw Error("valueToString() called on non-map-key element");return this.type===p.TYPES.bytes?e.toString("binary"):e.toString()},o.Element=c;var d=function(e,t,n,r,i,a){s.call(this,e,t,n,r,a),this.className="Message",this.extensions=void 0,this.clazz=null,this.isGroup=!!i,this._fields=null,this._fieldsById=null,this._fieldsByName=null},e=d.prototype=(0,E.default)(s.prototype);function m(e,t){var n=t.readVarint32(),r=7&n,i=n>>>3;switch(r){case p.WIRE_TYPES.VARINT:for(;n=t.readUint8(),128==(128&n););break;case p.WIRE_TYPES.BITS64:t.offset+=8;break;case p.WIRE_TYPES.LDELIM:n=t.readVarint32(),t.offset+=n;break;case p.WIRE_TYPES.STARTGROUP:m(i,t);break;case p.WIRE_TYPES.ENDGROUP:if(i===e)return!1;throw Error("Illegal GROUPEND after unknown group: "+i+" ("+e+" expected)");case p.WIRE_TYPES.BITS32:t.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+e+": "+r)}return!0}e.build=function(e){if(this.clazz&&!e)return this.clazz;var t=function(c,s){var l=s.getChildren(c.Reflect.Message.Field),u=s.getChildren(c.Reflect.Message.OneOf),r=function e(t,n){c.Builder.Message.call(this);for(var r,i=0,a=u.length;i<a;++i)this[u[i].name]=null;for(i=0,a=l.length;i<a;++i){var o=l[i];this[o.name]=o.repeated?[]:(0,A.default)(o)?new c.Map(o):null,!o.required&&"proto3"!==s.syntax||null===o.defaultValue||(this[o.name]=o.defaultValue)}if(0<arguments.length)if(1!==arguments.length||null===t||"object"!==(0,y.default)(t)||!("function"!=typeof t.encode||t instanceof e)||(0,T.default)(t)||t instanceof c.Map||G.isByteBuffer(t)||t instanceof ArrayBuffer||c.Long&&t instanceof c.Long)for(i=0,a=arguments.length;i<a;++i)void 0!==(r=arguments[i])&&this.$set(l[i].name,r);else this.$set(t)},a=r.prototype=(0,E.default)(c.Builder.Message.prototype);a.add=function(e,t,n){var r=s._fieldsByName[e];if(!n){if(!r)throw Error(this+"#"+e+" is undefined");if(!(r instanceof c.Reflect.Message.Field))throw Error(this+"#"+e+" is not a field: "+r.toString(!0));if(!r.repeated)throw Error(this+"#"+e+" is not a repeated field");t=r.verifyValue(t,!0)}return null===this[e]&&(this[e]=[]),this[e].push(t),this},a.$add=a.add,a.set=function(e,t,n){if(e&&"object"===(0,y.default)(e)){for(var r in n=t,e)e.hasOwnProperty(r)&&void 0!==(t=e[r])&&this.$set(r,t,n);return this}var i,a=s._fieldsByName[e];if(n)this[e]=t;else{if(!a)throw Error(this+"#"+e+" is not a field: undefined");if(!(a instanceof c.Reflect.Message.Field))throw Error(this+"#"+e+" is not a field: "+a.toString(!0));this[a.name]=t=a.verifyValue(t)}return a&&a.oneof&&(i=this[a.oneof.name],null!==t?(null!==i&&i!==a.name&&(this[i]=null),this[a.oneof.name]=a.name):i===e&&(this[a.oneof.name]=null)),this},a.$set=a.set,a.get=function(e,t){if(t)return this[e];if(t=s._fieldsByName[e],!(t&&t instanceof c.Reflect.Message.Field))throw Error(this+"#"+e+" is not a field: undefined");if(!(t instanceof c.Reflect.Message.Field))throw Error(this+"#"+e+" is not a field: "+t.toString(!0));return this[t.name]},a.$get=a.get;for(var e=0;e<l.length;e++){var t=l[e];t instanceof c.Reflect.Message.ExtensionField||s.builder.options.populateAccessors&&function(n){var e=n.originalName.replace(/(_[a-zA-Z])/g,function(e){return e.toUpperCase().replace("_","")}),e=e.substring(0,1).toUpperCase()+e.substring(1),t=n.originalName.replace(/([A-Z])/g,function(e){return"_"+e}),r=function(e,t){return this[n.name]=t?e:n.verifyValue(e),this},i=function(){return this[n.name]};null===s.getChild("set"+e)&&(a["set"+e]=r),null===s.getChild("set_"+t)&&(a["set_"+t]=r),null===s.getChild("get"+e)&&(a["get"+e]=i),null===s.getChild("get_"+t)&&(a["get_"+t]=i)}(t)}function d(e,n,r,i){if(null===e||"object"!==(0,y.default)(e)){if(i&&i instanceof c.Reflect.Enum){var t=c.Reflect.Enum.getName(i.object,e);if(null!==t)return t}return e}if(G.isByteBuffer(e))return n?e.toBase64():e.toBuffer();if(c.Long.isLong(e))return r?e.toString():c.Long.fromValue(e);var a;if((0,T.default)(e))return a=[],(0,I.default)(e).call(e,function(e,t){a[t]=d(e,n,r,i)}),a;if(a={},e instanceof c.Map){for(var o=(0,L.default)(e).call(e),s=o.next();!s.done;s=o.next())a[e.keyElem.valueToString(s.value[0])]=d(s.value[1],n,r,e.valueElem.resolvedType);return a}var l,u=e.$type,h=void 0;for(l in e)e.hasOwnProperty(l)&&(u&&(h=u.getChild(l))?a[l]=d(e[l],n,r,h.resolvedType):a[l]=d(e[l],n,r));return a}return a.encode=function(t,e){"boolean"==typeof t&&(e=t,t=void 0);var n=!1;t||(t=new G,n=!0);var r=t.littleEndian;try{return s.encode(this,t.LE(),e),(n?t.flip():t).LE(r)}catch(e){throw t.LE(r),e}},r.encode=function(e,t,n){return new r(e).encode(t,n)},a.calculate=function(){return s.calculate(this)},a.encodeDelimited=function(e,t){var n=!1;e||(e=new G,n=!0);var r=(new G).LE();return s.encode(this,r,t).flip(),e.writeVarint32(r.remaining()),e.append(r),n?e.flip():e},a.encodeAB=function(){try{return this.encode().toArrayBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toArrayBuffer()),e}},a.toArrayBuffer=a.encodeAB,a.encodeNB=function(){try{return this.encode().toBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBuffer()),e}},a.toBuffer=a.encodeNB,a.encode64=function(){try{return this.encode().toBase64()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBase64()),e}},a.toBase64=a.encode64,a.encodeHex=function(){try{return this.encode().toHex()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toHex()),e}},a.toHex=a.encodeHex,a.toRaw=function(e,t){return d(this,!!e,!!t,this.$type)},a.encodeJSON=function(){return(0,R.default)(d(this,!0,!0,this.$type))},r.decode=function(t,e,n){"string"==typeof e&&(n=e,e=-1),"string"==typeof t&&(t=G.wrap(t,n||"base64")),t=G.isByteBuffer(t)?t:G.wrap(t),n=t.littleEndian;try{var r=s.decode(t.LE());return t.LE(n),r}catch(e){throw t.LE(n),e}},r.decodeDelimited=function(t,n){if("string"==typeof t&&(t=G.wrap(t,n||"base64")),t=G.isByteBuffer(t)?t:G.wrap(t),t.remaining()<1)return null;var e=t.offset,n=t.readVarint32();if(t.remaining()<n)return t.offset=e,null;try{var r=s.decode((0,b.default)(t).call(t,t.offset,t.offset+n).LE());return t.offset+=n,r}catch(e){throw t.offset+=n,e}},r.decode64=function(e){return r.decode(e,"base64")},r.decodeHex=function(e){return r.decode(e,"hex")},r.decodeJSON=function(e){return new r(JSON.parse(e))},a.toString=function(){return s.toString()},_.default&&((0,_.default)(r,"$options",{value:s.buildOpt()}),(0,_.default)(a,"$options",{value:r.$options}),(0,_.default)(r,"$type",{value:s}),(0,_.default)(a,"$type",{value:s})),r}(p,this);this._fields=[],this._fieldsById={},this._fieldsByName={};for(var n,r=0,i=this.children.length;r<i;r++)if(n=this.children[r],n instanceof a||n instanceof d||n instanceof v){if(t.hasOwnProperty(n.name))throw Error("Illegal reflect child of "+this.toString(!0)+": "+n.toString(!0)+" cannot override static property '"+n.name+"'");t[n.name]=n.build()}else if(n instanceof d.Field)n.build(),this._fields.push(n),this._fieldsById[n.id]=n,this._fieldsByName[n.name]=n;else if(!(n instanceof d.OneOf||n instanceof f))throw Error("Illegal reflect child of "+this.toString(!0)+": "+this.children[r].toString(!0));return this.clazz=t},e.encode=function(e,t,n){for(var r,i,a=null,o=0,s=this._fields.length;o<s;++o)r=this._fields[o],i=e[r.name],r.required&&null===i?null===a&&(a=r):r.encode(n?i:r.verifyValue(i),t,e);if(null===a)return t;var l=Error("Missing at least one required field for "+this.toString(!0)+": "+a);throw l.encoded=t,l},e.calculate=function(e){for(var t,n,r=0,i=0,a=this._fields.length;i<a;++i){if(t=this._fields[i],n=e[t.name],t.required&&null===n)throw Error("Missing at least one required field for "+this.toString(!0)+": "+t);r+=t.calculate(n,e)}return r},e.decode=function(e,t,n){t="number"==typeof t?t:-1;for(var r,i,a,o,s,l=e.offset,u=new this.clazz;e.offset<l+t||-1===t&&0<e.remaining();){if(r=e.readVarint32(),i=7&r,a=r>>>3,i===p.WIRE_TYPES.ENDGROUP){if(a!==n)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+a+" ("+(n?n+" expected":"not a group")+")");break}if(o=this._fieldsById[a])o.repeated&&!o.options.packed?u[o.name].push(o.decode(i,e)):(0,A.default)(o)?(s=o.decode(i,e),u[o.name].set(s[0],s[1])):(u[o.name]=o.decode(i,e),o.oneof&&(s=u[o.oneof.name],null!==s&&s!==o.name&&(u[s]=null),u[o.oneof.name]=o.name));else switch(i){case p.WIRE_TYPES.VARINT:e.readVarint32();break;case p.WIRE_TYPES.BITS32:e.offset+=4;break;case p.WIRE_TYPES.BITS64:e.offset+=8;break;case p.WIRE_TYPES.LDELIM:var h=e.readVarint32();e.offset+=h;break;case p.WIRE_TYPES.STARTGROUP:for(;m(a,e););break;default:throw Error("Illegal wire type for unknown field "+a+" in "+this.toString(!0)+"#decode: "+i)}}for(var c=0,d=this._fields.length;c<d;++c)if(o=this._fields[c],null===u[o.name])if("proto3"===this.syntax)u[o.name]=o.defaultValue;else{if(o.required){var f=Error("Missing at least one required field for "+this.toString(!0)+": "+o.name);throw f.decoded=u,f}p.populateDefaults&&null!==o.defaultValue&&(u[o.name]=o.defaultValue)}return u},o.Message=d;var u=function(e,t,n,r,i,a,o,s,l,u){h.call(this,e,t,a),this.className="Message.Field",this.required="required"===n,this.repeated="repeated"===n,this.map="map"===n,this.keyType=r||null,this.type=i,this.resolvedType=null,this.id=o,this.options=s||{},this.defaultValue=null,this.oneof=l||null,this.syntax=u||"proto2",this.originalName=this.name,this.element=null,this.keyElement=null,!this.builder.options.convertFieldsToCamelCase||this instanceof d.ExtensionField||(this.name=p.Util.toCamelCase(this.name))},e=u.prototype=(0,E.default)(h.prototype);e.build=function(){this.element=new c(this.type,this.resolvedType,!1,this.syntax),(0,A.default)(this)&&(this.keyElement=new c(this.keyType,void 0,!0,this.syntax)),"proto3"!==this.syntax||this.repeated||(0,A.default)(this)?void 0!==this.options.default&&(this.defaultValue=this.verifyValue(this.options.default)):this.defaultValue=c.defaultFieldValue(this.type)},e.verifyValue=function(e,t){t=t||!1;var n=this;function r(e,t){throw Error("Illegal value for "+n.toString(!0)+" of type "+n.type.name+": "+e+" ("+t+")")}if(null===e)return this.required&&r((0,y.default)(e),"required"),"proto3"===this.syntax&&this.type!==p.TYPES.message&&r((0,y.default)(e),"proto3 field without field presence cannot be null"),null;if(!this.repeated||t)return(0,A.default)(this)&&!t?e instanceof p.Map?e:(e instanceof Object||r((0,y.default)(e),"expected ProtoBuf.Map or raw object for map field"),new p.Map(this,e)):(!this.repeated&&(0,T.default)(e)&&r((0,y.default)(e),"no array expected"),this.element.verifyValue(e));(0,T.default)(e)||(e=[e]);for(var i=[],a=0;a<e.length;a++)i.push(this.element.verifyValue(e[a]));return i},e.hasWirePresence=function(e,t){if("proto3"!==this.syntax)return null!==e;if(this.oneof&&t[this.oneof.name]===this.name)return!0;switch(this.type){case p.TYPES.int32:case p.TYPES.sint32:case p.TYPES.sfixed32:case p.TYPES.uint32:case p.TYPES.fixed32:return 0!==e;case p.TYPES.int64:case p.TYPES.sint64:case p.TYPES.sfixed64:case p.TYPES.uint64:case p.TYPES.fixed64:return 0!==e.low||0!==e.high;case p.TYPES.bool:return e;case p.TYPES.float:case p.TYPES.double:return 0!==e;case p.TYPES.string:return 0<e.length;case p.TYPES.bytes:return 0<e.remaining();case p.TYPES.enum:return 0!==e;case p.TYPES.message:return null!==e;default:return!0}},e.encode=function(t,i,e){if(null===this.type||"object"!==(0,y.default)(this.type))throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===t||this.repeated&&0==t.length)return i;try{var n;if(this.repeated)if(this.options.packed&&0<=(0,x.default)(n=p.PACKABLE_WIRE_TYPES).call(n,this.type.wireType)){i.writeVarint32(this.id<<3|p.WIRE_TYPES.LDELIM),i.ensureCapacity(i.offset+=1);for(var r=i.offset,a=0;a<t.length;a++)this.element.encodeValue(this.id,t[a],i);var o,s=i.offset-r,l=G.calculateVarint32(s);1<l&&(o=(0,b.default)(i).call(i,r,i.offset),r+=l-1,i.offset=r,i.append(o)),i.writeVarint32(s,r-l)}else for(a=0;a<t.length;a++)i.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,t[a],i);else(0,A.default)(this)?(0,I.default)(t).call(t,function(e,t,n){var r=G.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,t)+G.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,e);i.writeVarint32(this.id<<3|p.WIRE_TYPES.LDELIM),i.writeVarint32(r),i.writeVarint32(8|this.keyType.wireType),this.keyElement.encodeValue(1,t,i),i.writeVarint32(16|this.type.wireType),this.element.encodeValue(2,e,i)},this):this.hasWirePresence(t,e)&&(i.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,t,i))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+t+" ("+e+")")}return i},e.calculate=function(t,e){if(t=this.verifyValue(t),null===this.type||"object"!==(0,y.default)(this.type))throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===t||this.repeated&&0==t.length)return 0;var n,r,i,a=0;try{if(this.repeated)if(this.options.packed&&0<=(0,x.default)(n=p.PACKABLE_WIRE_TYPES).call(n,this.type.wireType)){for(a+=G.calculateVarint32(this.id<<3|p.WIRE_TYPES.LDELIM),i=0,r=0;r<t.length;r++)i+=this.element.calculateLength(this.id,t[r]);a+=G.calculateVarint32(i),a+=i}else for(r=0;r<t.length;r++)a+=G.calculateVarint32(this.id<<3|this.type.wireType),a+=this.element.calculateLength(this.id,t[r]);else(0,A.default)(this)?(0,I.default)(t).call(t,function(e,t,n){e=G.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,t)+G.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,e),a+=G.calculateVarint32(this.id<<3|p.WIRE_TYPES.LDELIM),a+=G.calculateVarint32(e),a+=e},this):this.hasWirePresence(t,e)&&(a+=G.calculateVarint32(this.id<<3|this.type.wireType),a+=this.element.calculateLength(this.id,t))}catch(e){throw Error("Illegal value for "+this.toString(!0)+": "+t+" ("+e+")")}return a},e.decode=function(e,t,n){var r=!(0,A.default)(this)&&e==this.type.wireType||!n&&this.repeated&&this.options.packed&&e==p.WIRE_TYPES.LDELIM||(0,A.default)(this)&&e==p.WIRE_TYPES.LDELIM;if(!r)throw Error("Illegal wire type for field "+this.toString(!0)+": "+e+" ("+this.type.wireType+" expected)");if(e==p.WIRE_TYPES.LDELIM&&this.repeated&&this.options.packed&&0<=(0,x.default)(r=p.PACKABLE_WIRE_TYPES).call(r,this.type.wireType)&&!n){for(var i=t.readVarint32(),i=t.offset+i,a=[];t.offset<i;)a.push(this.decode(this.type.wireType,t,!0));return a}if((0,A.default)(this)){var o=c.defaultFieldValue(this.keyType),s=c.defaultFieldValue(this.type);if(i=t.readVarint32(),t.remaining()<i)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+i+" required but got only "+t.remaining());var l=t.clone();for(l.limit=l.offset+i,t.offset+=i;0<l.remaining();){var u=l.readVarint32();if(e=7&u,u>>>=3,1===u)o=this.keyElement.decode(l,e,u);else{if(2!==u)throw Error("Unexpected tag in map field key/value submessage");s=this.element.decode(l,e,u)}}return[o,s]}return this.element.decode(t,e,this.id)},o.Message.Field=u,e=function(e,t,n,r,i,a,o){u.call(this,e,t,n,null,r,i,a,o),this.extension},e.prototype=(0,E.default)(u.prototype),o.Message.ExtensionField=e,e=function(e,t,n){h.call(this,e,t,n),this.fields=[]},o.Message.OneOf=e;var a=function(e,t,n,r,i){s.call(this,e,t,n,r,i),this.className="Enum",this.object=null};a.getName=function(e,t){for(var n,r=(0,S.default)(e),i=0;i<r.length;++i)if(e[n=r[i]]===t)return n;return null},e=a.prototype=(0,E.default)(s.prototype),e.build=function(e){if(this.object&&!e)return this.object;for(var t=new p.Builder.Enum,n=this.getChildren(a.Value),r=0,i=n.length;r<i;++r)t[n[r].name]=n[r].id;return _.default&&(0,_.default)(t,"$options",{value:this.buildOpt(),enumerable:!1}),this.object=t},o.Enum=a,e=function(e,t,n,r){h.call(this,e,t,n),this.className="Enum.Value",this.id=r},e.prototype=(0,E.default)(h.prototype),o.Enum.Value=e;var f=function(e,t,n,r){h.call(this,e,t,n),this.field=r};f.prototype=(0,E.default)(h.prototype),o.Extension=f;var v=function(e,t,n,r){s.call(this,e,t,n,r),this.className="Service",this.clazz=null},e=v.prototype=(0,E.default)(s.prototype);e.build=function(e){return this.clazz&&!e?this.clazz:this.clazz=function(t,i){for(var a=function(e){t.Builder.Service.call(this),this.rpcImpl=e||function(e,t,n){(0,N.default)((0,M.default)(n).call(n,this,Error("Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services")),0)}},e=a.prototype=(0,E.default)(t.Builder.Service.prototype),n=i.getChildren(t.Reflect.Service.RPCMethod),r=0;r<n.length;r++)!function(r){e[r.name]=function(e,n){try{try{e=r.resolvedRequestType.clazz.decode(G.wrap(e))}catch(e){if(!(e instanceof TypeError))throw e}if(null===e||"object"!==(0,y.default)(e))throw Error("Illegal arguments");e instanceof r.resolvedRequestType.clazz||(e=new r.resolvedRequestType.clazz(e)),this.rpcImpl(r.fqn(),e,function(e,t){if(e)n(e);else{null===t&&(t="");try{t=r.resolvedResponseType.clazz.decode(t)}catch(e){}t&&t instanceof r.resolvedResponseType.clazz?n(null,t):n(Error("Illegal response type received in service method "+i.name+"#"+r.name))}})}catch(e){(0,N.default)((0,M.default)(n).call(n,this,e),0)}},a[r.name]=function(e,t,n){new a(e)[r.name](t,n)},_.default&&((0,_.default)(a[r.name],"$options",{value:r.buildOpt()}),(0,_.default)(e[r.name],"$options",{value:a[r.name].$options}))}(n[r]);return _.default&&((0,_.default)(a,"$options",{value:i.buildOpt()}),(0,_.default)(e,"$options",{value:a.$options}),(0,_.default)(a,"$type",{value:i}),(0,_.default)(e,"$type",{value:i})),a}(p,this)},o.Service=v;var g=function(e,t,n,r){h.call(this,e,t,n),this.className="Service.Method",this.options=r||{}},e=g.prototype=(0,E.default)(h.prototype);return e.buildOpt=t.buildOpt,o.Service.Method=g,t=function(e,t,n,r,i,a,o,s){g.call(this,e,t,n,s),this.className="Service.RPCMethod",this.requestName=r,this.responseName=i,this.requestStream=a,this.responseStream=o,this.resolvedRequestType=null,this.resolvedResponseType=null},t.prototype=(0,E.default)(g.prototype),o.Service.RPCMethod=t,o}(ie),ie.Builder=($=ie,ee=ie.Lang,te=ie.Reflect,ne=function(e){this.ns=new te.Namespace(this,null,""),this.ptr=this.ns,this.resolved=!1,this.result=null,this.files={},this.importRoot=null,this.options=e||{}},n=ne.prototype,ne.isMessage=function(e){return"string"==typeof e.name&&void 0===(0,h.default)(e)&&void 0===e.rpc},ne.isMessageField=function(e){return"string"==typeof e.rule&&"string"==typeof e.name&&"string"==typeof e.type&&void 0!==e.id},ne.isEnum=function(e){return"string"==typeof e.name&&!(void 0===(0,h.default)(e)||!(0,T.default)((0,h.default)(e))||0===(0,h.default)(e).length)},ne.isService=function(e){return!("string"!=typeof e.name||"object"!==(0,y.default)(e.rpc)||!e.rpc)},ne.isExtend=function(e){return"string"==typeof e.ref},n.reset=function(){return this.ptr=this.ns,this},n.define=function(e){if("string"!=typeof e||!ee.TYPEREF.test(e))throw Error("illegal namespace: "+e);return(0,I.default)(e=e.split(".")).call(e,function(e){var t=this.ptr.getChild(e);null===t&&this.ptr.addChild(t=new te.Namespace(this,this.ptr,e)),this.ptr=t},this),this},n.create=function(e){if(!e)return this;if((0,T.default)(e)){if(0===e.length)return this;e=(0,b.default)(e).call(e)}else e=[e];for(var t=[e];0<t.length;){if(e=t.pop(),!(0,T.default)(e))throw Error("not a valid namespace: "+(0,R.default)(e));for(;0<e.length;){var n,r=e.shift();if(ne.isMessage(r)){var i,a,o=new te.Message(this,this.ptr,r.name,r.options,r.isGroup,r.syntax),s={};r.oneofs&&(0,I.default)(i=(0,S.default)(r.oneofs)).call(i,function(e){o.addChild(s[e]=new te.Message.OneOf(this,o,e))},this),r.fields&&(0,I.default)(i=r.fields).call(i,function(e){if(null!==o.getChild(0|e.id))throw Error("duplicate or invalid field id in "+o.name+": "+e.id);if(e.options&&"object"!==(0,y.default)(e.options))throw Error("illegal field options in "+o.name+"#"+e.name);var t=null;if("string"==typeof e.oneof&&!(t=s[e.oneof]))throw Error("illegal oneof in "+o.name+"#"+e.name+": "+e.oneof);e=new te.Message.Field(this,o,e.rule,e.keytype,e.type,e.name,e.id,e.options,t,r.syntax),t&&t.fields.push(e),o.addChild(e)},this);var l=[];if(r.enums&&(0,I.default)(a=r.enums).call(a,function(e){l.push(e)}),r.messages&&(0,I.default)(a=r.messages).call(a,function(e){l.push(e)}),r.services&&(0,I.default)(u=r.services).call(u,function(e){l.push(e)}),r.extensions&&("number"==typeof r.extensions[0]?o.extensions=[r.extensions]:o.extensions=r.extensions),this.ptr.addChild(o),0<l.length){t.push(e),e=l,l=null,this.ptr=o,o=null;continue}l=null}else if(ne.isEnum(r)){var u,o=new te.Enum(this,this.ptr,r.name,r.options,r.syntax);(0,I.default)(u=(0,h.default)(r)).call(u,function(e){o.addChild(new te.Enum.Value(this,o,e.name,e.id))},this),this.ptr.addChild(o)}else if(ne.isService(r))o=new te.Service(this,this.ptr,r.name,r.options),(0,I.default)(n=(0,S.default)(r.rpc)).call(n,function(e){var t=r.rpc[e];o.addChild(new te.Service.RPCMethod(this,o,e,t.request,t.response,!!t.request_stream,!!t.response_stream,t.options))},this),this.ptr.addChild(o);else{if(!ne.isExtend(r))throw Error("not a valid definition: "+(0,R.default)(r));if(o=this.ptr.resolve(r.ref,!0),o)(0,I.default)(n=r.fields).call(n,function(t){if(null!==o.getChild(0|t.id))throw Error("duplicate extended field id in "+o.name+": "+t.id);if(o.extensions){var n=!1;if((0,I.default)(r=o.extensions).call(r,function(e){t.id>=e[0]&&t.id<=e[1]&&(n=!0)}),!n)throw Error("illegal extended field id in "+o.name+": "+t.id+" (not within valid ranges)")}var e=t.name;this.options.convertFieldsToCamelCase&&(e=$.Util.toCamelCase(e));var r=new te.Message.ExtensionField(this,o,t.rule,t.type,this.ptr.fqn()+"."+e,t.id,t.options),e=new te.Extension(this,this.ptr,t.name,r);r.extension=e,this.ptr.addChild(e),o.addChild(r)},this);else if(!/\.?google\.protobuf\./.test(r.ref))throw Error("extended message "+r.ref+" is not defined")}r=null,o=null}e=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},n.import=function(t,e){var n="/";if("string"==typeof e){if($.Util.IS_NODE&&(e=le(207).resolve(e)),!0===this.files[e])return this.reset();this.files[e]=!0}else if("object"===(0,y.default)(e)){var r,i=e.root;if($.Util.IS_NODE&&(i=le(207).resolve(i)),(0<=(0,x.default)(i).call(i,"\\")||0<=(0,x.default)(r=e.file).call(r,"\\"))&&(n="\\"),i=i+n+e.file,!0===this.files[i])return this.reset();this.files[i]=!0}if(t.imports&&0<t.imports.length){var a,o=!1;"object"===(0,y.default)(e)?(this.importRoot=e.root,o=!0,a=this.importRoot,e=e.file,(0<=(0,x.default)(a).call(a,"\\")||0<=(0,x.default)(e).call(e,"\\"))&&(n="\\")):"string"==typeof e?this.importRoot?a=this.importRoot:0<=(0,x.default)(e).call(e,"/")?(a=e.replace(/\/[^\/]*$/,""),""===a&&(a="/")):0<=(0,x.default)(e).call(e,"\\")?(a=e.replace(/\\[^\\]*$/,""),n="\\"):a=".":a=null;for(var s=0;s<t.imports.length;s++)if("string"==typeof t.imports[s]){if(!a)throw Error("cannot determine import root");var l=t.imports[s];if("google/protobuf/descriptor.proto"!==l&&(l=a+n+l,!0!==this.files[l])){/\.proto$/i.test(l)&&!$.DotProto&&(l=l.replace(/\.proto$/,".json"));var u=$.Util.fetch(l);if(null===u)throw Error("failed to import '"+l+"' in '"+e+"': file not found");/\.json$/i.test(l)?this.import(JSON.parse(u+""),l):this.import($.DotProto.Parser.parse(u),l)}}else e?/\.(\w+)$/.test(e)?this.import(t.imports[s],e.replace(/^(.+)\.(\w+)$/,function(e,t,n){return t+"_import"+s+"."+n})):this.import(t.imports[s],e+"_import"+s):this.import(t.imports[s]);o&&(this.importRoot=null)}t.package&&this.define(t.package),t.syntax&&ae(t);var h=this.ptr;return t.options&&(0,I.default)(o=(0,S.default)(t.options)).call(o,function(e){h.options[e]=t.options[e]}),t.messages&&(this.create(t.messages),this.ptr=h),t.enums&&(this.create(t.enums),this.ptr=h),t.services&&(this.create(t.services),this.ptr=h),t.extends&&this.create(t.extends),this.reset()},n.resolveAll=function(){var e,t;if(null==this.ptr||"object"===(0,y.default)(this.ptr.type))return this;if(this.ptr instanceof te.Namespace)(0,I.default)(t=this.ptr.children).call(t,function(e){this.ptr=e,this.resolveAll()},this);else if(this.ptr instanceof te.Message.Field){if(ee.TYPE.test(this.ptr.type))this.ptr.type=$.TYPES[this.ptr.type];else{if(!ee.TYPEREF.test(this.ptr.type))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(e=(this.ptr instanceof te.Message.ExtensionField?this.ptr.extension:this.ptr).parent.resolve(this.ptr.type,!0),!e)throw Error("unresolvable type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(this.ptr.resolvedType=e,e instanceof te.Enum){if(this.ptr.type=$.TYPES.enum,"proto3"===this.ptr.syntax&&"proto3"!==e.syntax)throw Error("proto3 message cannot reference proto2 enum")}else{if(!(e instanceof te.Message))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);this.ptr.type=e.isGroup?$.TYPES.group:$.TYPES.message}}if((0,A.default)(this.ptr)){if(!ee.TYPE.test(this.ptr.keyType))throw Error("illegal key type for map field in "+this.ptr.toString(!0)+": "+this.ptr.keyType);this.ptr.keyType=$.TYPES[this.ptr.keyType]}}else if(this.ptr instanceof $.Reflect.Service.Method){if(!(this.ptr instanceof $.Reflect.Service.RPCMethod))throw Error("illegal service type in "+this.ptr.toString(!0));if(e=this.ptr.parent.resolve(this.ptr.requestName,!0),!(e&&e instanceof $.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.requestName);if(this.ptr.resolvedRequestType=e,e=this.ptr.parent.resolve(this.ptr.responseName,!0),!(e&&e instanceof $.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.responseName);this.ptr.resolvedResponseType=e}else if(!(this.ptr instanceof $.Reflect.Message.OneOf||this.ptr instanceof $.Reflect.Extension||this.ptr instanceof $.Reflect.Enum.Value))throw Error("illegal object in namespace: "+(0,y.default)(this.ptr)+": "+this.ptr);return this.reset()},n.build=function(e){if(this.reset(),this.resolved||(this.resolveAll(),this.resolved=!0,this.result=null),null===this.result&&(this.result=this.ns.build()),!e)return this.result;for(var t="string"==typeof e?e.split("."):e,n=this.result,r=0;r<t.length;r++){if(!n[t[r]]){n=null;break}n=n[t[r]]}return n},n.lookup=function(e,t){return e?this.ns.resolve(e,t):this.ns},n.toString=function(){return"Builder"},ne.Message=function(){},ne.Enum=function(){},ne.Service=function(){},ne),ie.Map=(re=ie.Reflect,e=function(e,t){if(!(0,A.default)(e))throw Error("field is not a map");if(this.field=e,this.keyElem=new re.Element(e.keyType,null,!0,e.syntax),this.valueElem=new re.Element(e.type,e.resolvedType,!1,e.syntax),this.map={},(0,_.default)(this,"size",{get:function(){return(0,S.default)((0,A.default)(this)).length}}),t)for(var n=(0,S.default)(t),r=0;r<n.length;r++){var i=this.keyElem.valueFromString(n[r]),a=this.valueElem.verifyValue(t[n[r]]);(0,A.default)(this)[this.keyElem.valueToString(i)]={key:i,value:a}}},n=e.prototype,n.clear=function(){this.map={}},n.delete=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e)),e=t in(0,A.default)(this);return delete(0,A.default)(this)[t],e},n.entries=function(){for(var e,t=[],n=(0,S.default)((0,A.default)(this)),r=0;r<n.length;r++)t.push([(e=(0,A.default)(this)[n[r]]).key,e.value]);return oe(t)},n.keys=function(){for(var e=[],t=(0,S.default)((0,A.default)(this)),n=0;n<t.length;n++)e.push((0,A.default)(this)[t[n]].key);return oe(e)},n.values=function(){for(var e=[],t=(0,S.default)((0,A.default)(this)),n=0;n<t.length;n++)e.push((0,A.default)(this)[t[n]].value);return oe(e)},n.forEach=function(e,t){for(var n,r=(0,S.default)((0,A.default)(this)),i=0;i<r.length;i++)e.call(t,(n=(0,A.default)(this)[r[i]]).value,n.key,this)},n.set=function(e,t){return e=this.keyElem.verifyValue(e),t=this.valueElem.verifyValue(t),(0,A.default)(this)[this.keyElem.valueToString(e)]={key:e,value:t},this},n.get=function(e){if(e=this.keyElem.valueToString(this.keyElem.verifyValue(e)),e in(0,A.default)(this))return(0,A.default)(this)[e].value},n.has=function(e){return e=this.keyElem.valueToString(this.keyElem.verifyValue(e)),e in(0,A.default)(this)},e),ie.loadProto=function(e,t,n){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(n=t,t=void 0),ie.loadJson(ie.DotProto.Parser.parse(e),t,n)},ie.protoFromString=ie.loadProto,ie.loadProtoFile=function(t,n,r){if(n&&"object"===(0,y.default)(n)?(r=n,n=null):n&&"function"==typeof n||(n=null),n)return ie.Util.fetch("string"==typeof t?t:t.root+"/"+t.file,function(e){if(null!==e)try{n(null,ie.loadProto(e,r,t))}catch(e){n(e)}else n(Error("Failed to fetch file"))});var e=ie.Util.fetch("object"===(0,y.default)(t)?t.root+"/"+t.file:t);return null===e?null:ie.loadProto(e,r,t)},ie.protoFromFile=ie.loadProtoFile,ie.newBuilder=function(e){return e=e||{},void 0===e.convertFieldsToCamelCase&&(e.convertFieldsToCamelCase=ie.convertFieldsToCamelCase),void 0===e.populateAccessors&&(e.populateAccessors=ie.populateAccessors),new ie.Builder(e)},ie.loadJson=function(e,t,n){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(n=t,t=null),t&&"object"===(0,y.default)(t)||(t=ie.newBuilder()),"string"==typeof e&&(e=JSON.parse(e)),t.import(e,n),t.resolveAll(),t},ie.loadJsonFile=function(t,n,r){if(n&&"object"===(0,y.default)(n)?(r=n,n=null):n&&"function"==typeof n||(n=null),n)return ie.Util.fetch("string"==typeof t?t:t.root+"/"+t.file,function(e){if(null!==e)try{n(null,ie.loadJson(JSON.parse(e),r,t))}catch(e){n(e)}else n(Error("Failed to fetch file"))});var e=ie.Util.fetch("object"===(0,y.default)(t)?t.root+"/"+t.file:t);return null===e?null:ie.loadJson(JSON.parse(e),r,t)}}.call(this,le(65))},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(9)),o=i(n(12)),s=i(n(61)),l=i(n(208)),u=i(n(486)),i=i(n(146)),h=new i.default,n=h.netArea,c={check:n+"sdk/check",onlineCheck:n+"sdk/auth/web",fmFileServer:n+"sdk/auth/downMaps"},d="026685bf295f587b5dffc1f18d5dc27c",i=function(e,t,n){return!(!e||"string"!=typeof t||32!=t.length||null!=e&&""!=e&&(t=l.default.decryption(t,d),n=u.default.encryption(n),t=l.default.decryption(t,n),t!=e))},f=function(e,t,n){return n=n||"fengmap.localhost:",t=u.default.encryption(n+t),t=l.default.decryption(e,t),t},n=function(){var e=new Date,t=(e.getFullYear(),e.getMonth()+1),e=e.getDate(),n=e%2==0?1:-1,r=Math.max(Math.pow(e%10+ +n,2)+n*t,0),t=Math.abs(2*e+n*t);return""+r+t},p=(n(),function(e,t,n){f(e,t);var r=location?location.host:"",i=(0,a.default)(r).call(r,":");return-1<i&&(r=(0,o.default)(r).call(r,0,i)),r=r||"0.0.0.0",{webURL:r,appKey:e,mapId:n,appName:t}}),i={checkOffLine:function(e,t,n,r){return n=n||r,t=f(e,t),n==t},checkIsOnLine:function(t,n,e){h.getData(c.check,function(e){t&&t()},function(e){n&&n()})},checkOnLine:function(e,t,n,r,i,a){var o=c.onlineCheck,n=p(e,t,n),n=(0,s.default)(n);h.getData(o,function(e){e?e.success?r&&r(e):i&&i(e):i&&i()},function(e){e?(e=JSON.parse(e),i&&i(e)):i&&i()},a,n,{"X-Requested-With":"XMLHttpRequest","Content-type":"application/json;charset=utf-8"})},checkLicense:i,getCerityData:p,ls:0},i=i;t.default=i},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=void 0;var c=o(n(29)),d=o(n(9)),f=o(n(10)),p=o(n(13)),g=o(n(31)),m=o(n(32)),v=o(n(34)),y=o(n(2)),_=o(n(3)),x=o(n(66)),w=o(n(211));function b(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=M(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function M(e,t){if(e){if("string"==typeof e)return T(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n=function(){function r(e,t,n){(0,y.default)(this,r),this.groups={},this._id=e,this._center=new fm.Vector2,this._mapcenter=new fm.Vector2(t.scene.x,t.scene.y),this._theme=null,this.parent=n,this.layerGroups=t.scene.layerGroups,this._bbox={max:new fm.Vector2(-Infinity,-Infinity),min:new fm.Vector2(Infinity,Infinity)},this._bboxTh={max:new fm.Vector2(-Infinity,-Infinity),min:new fm.Vector2(Infinity,Infinity)},this._bbox.max.x=t.scene.maxX,this._bbox.max.y=t.scene.maxY,this._bbox.min.x=t.scene.minX,this._bbox.min.y=t.scene.minY,this._bboxTh.max.x=t.scene.maxX-t.scene.x,this._bboxTh.max.y=t.scene.maxY-t.scene.y,this._bboxTh.min.x=t.scene.minX-t.scene.x,this._bboxTh.min.y=t.scene.minY-t.scene.y,this._groupIds=[],this.initGroupByData(t),this._spcace=(0,c.default)(t.scene.layerGroups[0].height)}return(0,_.default)(r,[{key:"getNeedLoadGroup",value:function(e,t){var n,r=[],i=b(this.layerGroups);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=-1<(0,d.default)(e).call(e,a.gid);t&&(o=!o),!a.loaded&&o&&r.push({gid:a.gid,url:this.getGroupLoadUrl(a.gname,a.gid),layerData:a})}}catch(e){i.e(e)}finally{i.f()}return r}},{key:"getGroupLoadUrl",value:function(e,t){return"floor."+e}},{key:"getLastAndNextName",value:function(e,t){var n,r,i,e=""+e,a=b(this.layerGroups);try{for(a.s();!(i=a.n()).done;){var o=i.value;o.gid===t-1&&(n="_"+o.gname),o.gid===t+1&&(r="_"+o.gname)}}catch(e){a.e(e)}finally{a.f()}return n=n||"_no",r=r||"_no",e+=n+r,e}},{key:"initGroupByData",value:function(e){var t=e.floors;this._groupLength=t.length;for(var n=0;n<t.length;n++)this.addGroup(t[n].gid,t[n],e.scene.layerGroups[n])}},{key:"addGroup",value:function(e,t,n){this._groupIds.push(e),t=new w.default(e,t,n),t.hideWithFree=(0,f.default)(this.parent).MapOptions.autoDispose,t.parent=this,n=(0,c.default)(e),t.height=this._space*n,-1<(0,d.default)(n=(0,f.default)(this.parent).visibleGroupIDs).call(n,e)?t.visible=!0:t.visible=!1,this.groups[e+""]=t}},{key:"changeTheme",value:function(r,e){var i=this;this._theme=r;var a,t,o=["extent","model","label","facility"],n=function(n){i.groups[n].traverseByAlias(o,function(e,t){switch(t){case"extent":a=r;break;case"model":a=(0,f.default)(i.parent).MapOptions.useStoreApply?r.getStoreApplyTheme(e.bdata.fid):void 0,a=a||r.getModelTheme(e.bdata),a=(0,p.default)(a,{logoPath:r.data.logoPath});break;case"label":a=r.getLabelTheme(e.bdata);break;case"facility":a=r.getPoiTheme(e.bdata)}e.renderNodeInited&&(e.setByTheme(a),i.parent.checkMaterialAlpha(e.renderNode,(0,c.default)(n)),"model"==t&&i.parent.checkMaterialAlpha(e.line,(0,c.default)(n)))})};for(t in this.groups)n(t)}},{key:"getAllGroupLayerByAlias",value:function(e,t){for(var n in this.groups){var r,n=this.groups[n].layers[e],i=b(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;t(a)}}catch(e){i.e(e)}finally{i.f()}}}},{key:"getFacilityByFilter",value:function(e,t){var n,r=[],i=b(e);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=this.groups[a];if(o){for(var s=["imageMarker","textMarker","facility"],l=0,u=s;l<u.length;l++){var h,c=u[l],d=o.getLayers(c),f=b(d);try{for(f.s();!(h=f.n()).done;)for(var p=h.value,m=0;m<p.scene.children.length;m++)t&&!t(p.scene.children[m])||r.push(p.scene.children[m])}catch(e){f.e(e)}finally{f.f()}}for(var v=o._locationScene.children,g=0;g<v.length;g++)t&&!t(v[g])||r.push(v[g])}}}catch(e){i.e(e)}finally{i.f()}return r}},{key:"getSpriteInfo",value:function(e,t,n,r){e.updateMatrixWorld(!0);var i=(new fm.Vector3).setFromMatrixPosition(e.matrixWorld),i=i.applyMatrix4(n.matrixWorldInverse),i=i.applyMatrix4(n.projectionMatrix),r=e.mapNode.size/r*2,a=t?(t=this.parent._map.labelLanguage==x.default.ZH?e.mapNode.name:e.mapNode.ename,t&&(a=t.split("%rn%").length,r*=a),r/e.material.userData.scaleRatio):r;return"PerspectiveCamera"==n.type&&(i.x*=n.aspect),n={x:i.x-a/2,y:i.y+r/2},r={x:i.x+a/2,y:i.y-r/2},{target:e,z:e.mapNode.eid,position:i,leftTop:n,rightDown:r}}},{key:"getMarkers",value:function(e,t,n){var r=[],i=this.groups[e];if(!i)return r;var a,e=i.getLayers("facility"),o=b(e);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.needAvoid)for(var l=0;l<s.scene.children.length;l++){var u,h=s.scene.children[l];h.mapNode.needAvoid&&h.mapNode.show&&(u=this.getSpriteInfo(h,!1,t,n),r.push(u))}}}catch(e){o.e(e)}finally{o.f()}var c,i=i.getLayers("label"),d=b(i);try{for(d.s();!(c=d.n()).done;){var f=c.value;if(f.needAvoid)for(var p=0;p<f.scene.children.length;p++){var m,v=f.scene.children[p];v.mapNode.needAvoid&&v.mapNode.show&&(m=this.getSpriteInfo(v,!0,t,n),r.push(m))}}}catch(e){d.e(e)}finally{d.f()}return(0,g.default)(r).call(r,function(e,t){return e.z-t.z}),r}},{key:"getAllImageMarker",value:function(e){var t=[],e=this.groups[e];if(!e)return t;for(var n=e.layers.imageMarker,r=0;r<n.length;r++)for(var i=0;i<n[r].scene.children.length;i++){var a=n[r].scene.children[i];t.push(a)}return t}},{key:"getUserMarkers",value:function(e,t,n){var r=[],e=this.groups[e];if(!e)return r;for(var i=e.layers.imageMarker,a=0;a<i.length;a++){var o=[];if(i[a].needAvoid){for(var s=0;s<i[a].scene.children.length;s++){var l=i[a].scene.children[s];l.mapNode.needAvoid&&l.mapNode.show&&(l=this.getSpriteInfo(l,!1,t,n),o.push(l))}r.push(o)}}for(var u=e.layers.textMarker,h=0;h<u.length;h++){var c=[];if(u[h].needAvoid){for(var d=0;d<u[h].scene.children.length;d++){var f=u[h].scene.children[d];f.mapNode.needAvoid&&f.mapNode.show&&(f=this.getSpriteInfo(f,!0,t,n),c.push(f))}r.push(c)}}return r}},{key:"getNodesExceptFacility",value:function(e,n){var t,r=[],i=b(e);try{for(i.s();!(t=i.n()).done;){var a=t.value,o=this.groups[a];o&&o.everyLayers(["facility","label","imageMarker","textMarker","dynmodel"],function(e){for(var t=0;t<e.children.length;t++)n&&!n(e.children[t])||r.push(e.children[t])})}}catch(e){i.e(e)}finally{i.f()}return r}},{key:"getDynnodes",value:function(n,e){var t,r=[],i=b(e);try{for(i.s();!(t=i.n()).done;){var a=t.value,o=this.groups[a];o&&o.getDynmodel(function(e){for(var t=0;t<e.children.length;t++)n&&!n(e.children[t])||r.push(e.children[t])})}}catch(e){i.e(e)}finally{i.f()}return r}},{key:"getGroupsModels",value:function(e){var t,n=[],r=b(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,a=this.groups[i];if(a){var o,s=a.getLayers("model"),l=b(s);try{for(l.s();!(o=l.n()).done;){var u=o.value;u.checkSceneNode(),n=(0,m.default)(n).call(n,u.scene.children)}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"getGroupsExternalModels",value:function(e){var t,n=[],r=b(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,a=this.groups[i];if(a){var o,s=a.getLayers("externalModel"),l=b(s);try{for(l.s();!(o=l.n()).done;){var u=o.value;u.checkSceneNode();for(var h=0;h<u.scene.children.length;h++)u.scene.children[h].traverse(function(e){e instanceof fm.Mesh&&n.push(e)})}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"getGroupsNodelsByFilter",value:function(e,t,n){var r,i=[],a=b(e);try{for(a.s();!(r=a.n()).done;){var o,s=r.value,l=this.groups[s];for(o in l.layers)if(t===o){var u,h=l.layers[o],c=b(h);try{for(c.s();!(u=c.n()).done;){var d=u.value;d.traverse(function(e){n(e)&&i.push({nodeType:e.nodeType,typeID:e.bdata&&e.bdata.type,data:e.bdata,target:e})})}}catch(e){c.e(e)}finally{c.f()}}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"getNodesExpectExtent",value:function(e){var t,n=[],r=b(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,a=this.groups[i];a.everyLayers(["extent"],function(e){n.push.apply(n,(0,v.default)(e.children))})}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"getRenderGroup",value:function(){var e,t=[];for(e in this.groups)this.groups[e].visible&&t.push(this.groups[e]);return(0,g.default)(t).call(t,function(e,t){return e.getHeight()-t.getHeight()})}},{key:"getLastRenderArray",value:function(){var e,t=[];for(e in this.groups)t.push.apply(t,(0,v.default)(this.groups[e].alwaysShowMarkers));return t}},{key:"getHeight",value:function(e){return e=this.groups[""+e]?this.groups[""+e].getHeight():this._space*e,e}},{key:"setLabelLanguage",value:function(t){for(var e in this.groups)this.groups[e].traverseByAlias(["label"],function(e){e.setByLanguage(t)})}},{key:"mapcenter",get:function(){return(new fm.Vector2).copy(this._mapcenter)}},{key:"dispose",value:function(){for(var e in this.groups)this.groups[e].dispose(),this.groups[e].parent=void 0,this.groups[e]=void 0;this.groups=void 0,this._theme&&(this._theme.dispose(),this._theme=void 0)}},{key:"groupLength",get:function(){return this._groupIds.length}},{key:"groupIds",get:function(){return this._groupIds}},{key:"center",get:function(){return(new fm.Vector2).copy(this._center)},set:function(e){this._center=e}},{key:"theme",get:function(){return this._theme},set:function(e){this._theme=e}},{key:"bbox",get:function(){return this._bbox}},{key:"bboxTh",get:function(){return this._bboxTh}},{key:"space",get:function(){return this._space},set:function(e){for(var t in this._space=e,this.groups){var n=(0,c.default)(t);this.groups[t].height=e*n}}}]),r}(),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.FMTextureUtil=void 0;var a=i(n(2)),o=i(n(3)),s=i(n(228)),n=function(){function r(){(0,a.default)(this,r)}return(0,o.default)(r,null,[{key:"createTexture",value:function(e,t,n){var r=new fm.Texture;return r.minFilter=fm.LinearFilter,r.generateMipmaps=!1,r.wrapS=fm.ClampToEdgeWrapping,r.wrapT=fm.ClampToEdgeWrapping,s.default.createImage(e,t,function(e){r.image=e,r.needsUpdate=!0,n&&n(r)}),r}},{key:"createTexture_canvas",value:function(e,t,n){return t=t.toDataURL("image/png"),r.createTexture(e,t,n)}},{key:"createTexture_URL",value:function(e,t,n){return r.createTexture(e,t,n)}},{key:"createTexture_canvasFile",value:function(n,e,r){var i=new fm.Texture;i.minFilter=fm.LinearFilter,i.generateMipmaps=!1,i.wrapS=fm.RepeatWrapping,i.wrapT=fm.RepeatWrapping;var t=e.toDataURL("image/png").replace("data:image/png;base64,",""),e=wx.getFileSystemManager(),a=wx.env.USER_DATA_PATH+"/01.png";return e.writeFile({filePath:a,data:t,encoding:"base64",success:function(e){wx.saveImageToPhotosAlbum({filePath:a,success:function(e){}});var t=n.createImage();t.crossOrigin="Anonymous",t.onload=function(){i.image=t,i.needsUpdate=!0,r&&r(i)},t.src=a},fail:function(e){}}),i}}]),r}();t.FMTextureUtil=n},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(9)),o=i(n(15)),s=i(n(12)),l=i(n(2)),u=i(n(3)),n=function(){function e(){(0,l.default)(this,e)}return(0,u.default)(e,[{key:"addEventListener",value:function(e,t){var n;void 0===this._listeners&&(this._listeners={});var r=this._listeners;void 0===r[e]&&(r[e]=[]),-1===(0,a.default)(n=r[e]).call(n,t)&&r[e].push(t)}},{key:"hasEventListener",value:function(e,t){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[e]&&-1!==(0,a.default)(e=n[e]).call(e,t)}},{key:"removeEventListener",value:function(e,t){var n;void 0!==this._listeners&&(n=this._listeners,e=n[e],void 0!==e&&(t=(0,a.default)(e).call(e,t),-1!==t&&(0,o.default)(e).call(e,t,1)))}},{key:"dispatchEvent",value:function(e){if(void 0!==this._listeners){var t=this._listeners,t=t[e.type];if(void 0!==t)for(var n=(0,s.default)(t).call(t,0),r=0,i=n.length;r<i;r++)n[r].call(this,e)}}}]),e}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(9)),o=i(n(2)),s=i(n(3)),u=i(n(205)),l=i(n(209)),h=i(n(210)),n=function(){function t(e){(0,o.default)(this,t),this._options=e,this._staticNaviScene=null,this._wktReader=new l.default,this._scene=null}return(0,s.default)(t,[{key:"setScene",value:function(e){this._scene=e}},{key:"queryScene",value:function(e,t,n){var r,i=this;this._options.useStatic?(r=this._options.naviServerURL+"/"+e+".fmap",new u.default(r,function(e){e=i._convertStatic1(e),t(e.scene_data)},!0)):(r=this._options.naviServerURL+"/"+e,new u.default(r,function(e){e=i._convertSite1(e),t(e.scene_data)},!0))}},{key:"queryNaviData",value:function(e,t,n,r){var i,a,o,s,l=this;this._options.useStatic?(i=l._convertStatic2(t),n(i)):(a=null,o=null,s=null,l=this,new u.default(this._options.naviServerURL+"/group_v2/"+e+"/"+t+"/geo",function(e){a=e,null!=a&&null!=o&&null!=s&&(e=l._convertSite2(t,a,o,s),n(e))},!0),new u.default(this._options.naviServerURL+"/group_v2/"+e+"/"+t+"/biz",function(e){o=e,null!=a&&null!=o&&null!=s&&(e=l._convertSite2(t,a,o,s),n(e))},!0),new u.default(this._options.naviServerURL+"/group_v2/"+e+"/"+t+"/navi",function(e){s=e,null!=a&&null!=o&&null!=s&&(e=l._convertSite2(t,a,o,s),n(e))},!0))}},{key:"convertToGroup",value:function(e,t,n,r){return this._convertToGroup(e,t,n,r)}},{key:"convertGeo2Geometry",value:function(e,t){return this._convertGeo2Geometry(e,t)}},{key:"convertArray2Geometry",value:function(e,t){return this._convertArray2Geometry(e,t)}},{key:"_convertSite1",value:function(e){var t=fmSceneDecode(e),e={scene_data:t};return e}},{key:"_convertSite2",value:function(e,t,n,r){return t=fmFloorGeoDecode(t),n=fmFloorBizDecode(n),r=fmFloorNaviDecode(r),this._convertToGroup(e,t,n,r)}},{key:"_convertGeo2Geometry",value:function(e,t){return e=this._wktReader.parse(e),{points:e._points,holes:e._holes}}},{key:"_convertArray2Geometry",value:function(e,t){return t=(new h.default).parseGeometry(e,t),{points:t._points,holes:t._holes}}},{key:"_tempFlipX",value:function(e){if(e&&"string"!=typeof e)for(var t in e){var n=e[t];if("vertices"==t||"vertex"==t)for(var r in n)r%2==0&&(n[r]=-n[r]);else"scene_data"==t?(n.x=-n.x,n.defCenX=-n.defCenX):this._tempFlipX(n)}}},{key:"_convertStringToArray",value:function(e){if(""==e||!e)return[];var t=[],n=e,e=[];return 0<=(0,a.default)(n).call(n,"|")||0<=(0,a.default)(n).call(n,"-")||0<=(0,a.default)(n).call(n,",")?(e=n.split(/[|,-]/),t.push.apply(t,e)):t.push(n),t}},{key:"_convertStatic1",value:function(e){return this._staticNaviScene=fmMapDecode(e,!1),e={scene_data:this._staticNaviScene.scene},e}},{key:"_convertStatic2",value:function(e){for(var t=this._staticNaviScene.floors,n=0;n<t.length;n++){var r=t[n];if(r.gid==e)return this._convertToGroup(e,r.geo[0],r.biz[0],r.navi[0])}return null}},{key:"_convertToGroup",value:function(e,t,n,r){for(var i={},a=[],o=[],s=[],l=[],u=[],h=this._scene.scene.file_ver,c=0,d=t.extentLayer.length;c<d;c++){var f=t.extentLayer[c],p=null,p=1===h?this._convertGeo2Geometry(f.geo):this._convertArray2Geometry(f.idxs,f.pts);f.geoArr=p.points,f.holes=p.holes,o.push(f)}for(var m=0,v=t.labelLayer.length;m<v;m++)i[t.labelLayer[m].eid]=t.labelLayer[m];for(var g=0,y=t.modelLayer.length;g<y;g++){var _=t.modelLayer[g],x=n.modelLayer[g],w={};w.fid=x.fid,w.eid=_.eid,w.pass=x.pass,w.center=(1===h?this._convertGeo2Geometry(i[_.eid].geo):this._convertArray2Geometry(i[_.eid].idxs,i[_.eid].pts)).points[0],x=null,x=1===h?this._convertGeo2Geometry(_.geo):this._convertArray2Geometry(_.idxs,_.pts),w.geoArr=x.points,w.holes=x.holes,a.push(w)}for(var b=0,M=r.naviNodes.length;b<M;b++){var T=r.naviNodes[b];T.geoArr=(1===h?this._convertGeo2Geometry(T.geo):this._convertArray2Geometry(T.idxs,T.pts)).points[0],T.linkSegArr=this._convertStringToArray(T.linkSeg),T.liftFloorArr=this._convertStringToArray(T.liftFloor),s.push(T)}for(var E=0,S=r.naviSegments.length;E<S;E++){var A=r.naviSegments[E];A.geoArr=(1===h?this._convertGeo2Geometry(A.geo):this._convertArray2Geometry(A.idxs,A.pts)).points,A.m_Id=r.mid,l.push(A)}if(r.naviZones)for(var I=0,S=r.naviZones.length;I<S;I++){var L=r.naviZones[I],R=null,R=1===h?this._convertGeo2Geometry(L.geo):this._convertArray2Geometry(L.idxs,L.pts);L.geoArr=R.points,L.holes=R.holes,L.m_Id=r.mid,u.push(L)}return e={gid:e,extentLayer:o,modelLayer:a,naviSegments:l,naviNodes:s,naviZones:u},e}}]),t}(),n=n;t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={RIGHT:1,LEFT:2,BOTTOM:3,TOP:4,RIGHT_BOTTOM:5,LEFT_BOTTOM:6,RIGHT_TOP:7,LEFT_TOP:8,CENTER:9},t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),n=a(n(17));function c(n){var r=d();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,l.default)(r,e);var n=c(r);function r(e,t){return(0,o.default)(this,r),t=n.call(this,e,t),t._renderNode=null,t._isInit=!1,t}return(0,s.default)(r,[{key:"init",value:function(){}},{key:"dispose",value:function(){this._renderNode&&(this._renderNode.material.texture&&this._renderNode.material.texture.dispose(),this._renderNode.material.dispose(),this._renderNode.geometry.dispose(),this._renderNode.material=void 0,this._renderNode.geometry=void 0,this._geometry=void 0,this._renderNode.mapNode=void 0,this._renderNode=void 0)}},{key:"renderNode",get:function(){return this._renderNode}},{key:"isInit",get:function(){return this._isInit}}]),r}(n.default),t.default=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(4),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d=c(n(35)),f=c(n(10)),p=c(n(13)),m=c(n(50)),v=c(n(109)),g=c(n(9)),y=c(n(34)),_=c(n(2)),x=c(n(3)),w=c(n(5)),b=c(n(6)),M=c(n(7)),o=c(n(17));n(248);var T=c(n(249)),E=c(n(548)),S=c(n(118)),A=c(n(247)),I=n(67);function L(n){var r=R();return function(){var e,t=(0,M.default)(n),t=r?(e=(0,M.default)(this).constructor,a(t,arguments,e)):t.apply(this,arguments);return(0,b.default)(this,t)}}function R(){if("undefined"==typeof Reflect||!a)return!1;if(a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(a(Boolean,[],function(){})),!0}catch(e){return!1}}function N(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=k(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function k(e,t){if(e){if("string"==typeof e)return P(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var C=function(e){var t,n=N(this._lineNodes);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.line.material.uniforms.offset.value.y-=.001*e.delTime,this.passed&&r.gid===this._passedGid&&(r.line.material.uniforms.miny.value=this.specific)}}catch(e){n.e(e)}finally{n.f()}},o=function(e){(0,w.default)(n,e);var t=L(n);function n(){var e;return(0,_.default)(this,n),e=t.call(this),e._renderNode=null,e._segment=[],e._noAnimate=!0,e._lineDis=[],e._lineNodes=[],e._style=null,e._secLen=60,e._hwProp=10,e._passed=!0,e._passedColor="#aeaeae",e._specific=0,e}return(0,x.default)(n,[{key:"addSegment",value:function(e){this._segment.push(e)}},{key:"convertPointByCenter",value:function(e,t){return[e.x-t.x,e.z,-e.y+t.y]}},{key:"segPointsToLinePnts",value:function(e){for(var t,n,r=[],i=0;i<this._segment.points.length;i++)0<i&&i<this._segment.points.length-1&&this._segment.points[i-1],r.push.apply(r,(0,y.default)(this.convertPointByCenter(this._segment.points[i],e))),0!==i&&(t=new fm.Vector3(this._segment.points[i].x,this._segment.points[i].y,this._segment.points[i].z),n=new fm.Vector3(this._segment.points[i-1].x,this._segment.points[i-1].y,this._segment.points[i-1].z),this._lineDis.push(t.distanceTo(n)));return r}},{key:"getIndexDis",value:function(e){for(var t=0,n=0;n<this._lineDis.length;n++)n<e&&(t+=this._lineDis[n]);return t}},{key:"computerUVY",value:function(){for(var e,t=[],n=this.getIndexDis(this._lineDis.length),r=0;r<this._segment.points.length;r++)0===r?t.push(0):r===this._segment.points.length-1?t.push(1):(e=this.getIndexDis(r)/n,t.push(e),t.push(e));return t}},{key:"initLine",value:function(e,t,n){var r,i;this._style=t,t.mapUrl?t.useMap=!0:(i=t.lineWidth,t.lineWidth&&(i*=n.wxInfo.pixelRatio),r=this.getLineTextureParams(t.lineType,i,t.godColor,t.godEdgeColor,t.color),n.wxInfo.pixelRatio&&r.dashArray.constructor===Array&&(0,d.default)(i=r.dashArray).call(i,function(e,t){r.dashArray[t]=e*n.wxInfo.pixelRatio}),t.useMap=r.useMap,t.useMap&&(t.map=n.nodeManager.materialManager[r.textureCommand](r),(0,f.default)(t).wrapS=fm.RepeatWrapping,(0,f.default)(t).wrapT=fm.RepeatWrapping));for(var a=this._segment.length-1;-1<a;a--){var o,s,l,u=this.createLine(this._segment[a],e,t,n),h=n.getFMGroup(this._segment[a].groupId);h?(this._lineNodes.push({line:u,gid:this._segment[a].groupId,seg:this._segment[a],isCross:!1}),h.addLine(u),-1<a-1&&this._segment[a].groupId!==this._segment[a-1].groupId&&(o=n.getFMGroup(this._segment[a-1].groupId),o?(s=o.height+o.offsetHeight,l=(0,p.default)({},this._segment[a-1].points[this._segment[a-1].points.length-1]),h=(0,p.default)({},this._segment[a].points[0]),u=n.getFMGroup(this._segment[a].groupId),u?(l.z=s-u.height-u.offsetHeight+l.z-h.z,l=new S.default([l,h]),l.groupId=this._segment[a].groupId,h=this.createLine(l,e,t,n),this._lineNodes.push({line:h,gid:this._segment[a-1].groupId,gidAn:this._segment[a].groupId,seg:l,isCross:!0}),o.addLine(h)):console.warn(I.tileMessage.noGroup)):console.warn(I.tileMessage.noGroup))):console.warn(I.tileMessage.noGroup)}this._noAnimate=t.noAnimate,this._noAnimate||n.on("frameLoop",(0,m.default)(C).call(C,this))}},{key:"computeMaterialRepeat",value:function(e,t,n,r){var i=t.allLength,t=i*n.getPixelTo3DdisByGid(t.groupId),r=Math.floor(t/r);(0,v.default)(e.uniforms).value.y=r}},{key:"resetRepeat",value:function(e){var t,n=N(this._lineNodes);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.computeMaterialRepeat(r.line.material,r.seg,e,this._secLen)}}catch(e){n.e(e)}finally{n.f()}}},{key:"rebuildLine",value:function(e,t,n,r){this.removeByMap(t);for(var i=this._style,a=this._segment.length-1;-1<a;a--){var o,s,l,u=this.createLine(this._segment[a],e,i,t),h=t.getFMGroup(this._segment[a].groupId);this._lineNodes.push({line:u,gid:this._segment[a].groupId,seg:this._segment[a],isCross:!1}),h.addLine(u),-1<a-1&&this._segment[a].groupId!=this._segment[a-1].groupId&&(o=t.getFMGroup(this._segment[a-1].groupId),s=o.height+o.offsetHeight,l=(0,p.default)({},this._segment[a].points[this._segment[a].points.length-1]),h=(0,p.default)({},this._segment[a-1].points[0]),u=t.getFMGroup(this._segment[a].groupId),l.z=s-u.height-u.offsetHeight+l.z-h.z,l=new S.default([l,h]),l.groupId=this._segment[a].groupId,h=this.createLine(l,e,i,t),this._lineNodes.push({line:h,gid:this._segment[a-1].groupId,gidAn:this._segment[a].groupId,seg:l,isCross:!0}),o.addLine(h))}this.hideOrShowBy(n,r)}},{key:"removeByMap",value:function(e,t){var n,r=N(this._lineNodes);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.line.material.dispose(),i.line.geometry.dispose();var a=e.getFMGroup(i.gid);a.removeLine(i.line)}}catch(e){r.e(e)}finally{r.f()}t&&e.off("frameLoop",C),this._lineNodes.length=0}},{key:"dispose",value:function(e){this.removeByMap(e,!0)}},{key:"hideOrShowBy",value:function(e,t){var n,r=N(this._lineNodes);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.isCross?(0,g.default)(e).call(e,i.gid)<0||(0,g.default)(e).call(e,i.gidAn)<0?i.line.visible=!1:i.line.visible=!0:-1<(0,g.default)(e).call(e,i.gid)?i.line.visible=!0:i.line.visible=!1}}catch(e){r.e(e)}finally{r.f()}}},{key:"createLine",value:function(e,t,n,r){var i=r.getFMGroup(e.groupId),a=i.height+i.offsetHeight,i=new fm.Vector3(0,a,0),a=new T.default;e.needSmooth=!1!==n.smooth,e.initSegement(t,n.radius);for(var o=[],s=0;s<e.linePoints.length;s++)o.push(e.linePoints[s]);t=e.uvys,a.setPositions(o),a.setUvys(t);var l=new fm.LineMaterial({linewidth:5,vertexColors:fm.VertexColors,dashed:!1,transparent:!0});return n.color&&(l.color=new fm.Color(n.color)),l.resolution.set(n.resolution.x,n.resolution.y),t=n.lineWidth,t&&(t*=r.wxInfo.pixelRatio),l.linewidth=t,n.useMap&&(l.defines.USE_MMAP=!0,n.mapUrl?(n.useMap=!0,r.nodeManager.materialManager.loadTexture(n.mapUrl,function(e){e.wrapS=fm.RepeatWrapping,e.wrapT=fm.RepeatWrapping,l.uniforms.mmap.value=e,l.needsUpdate=!0})):l.uniforms.mmap.value=(0,f.default)(n),this.computeMaterialRepeat(l,e,r,this._secLen),l.needsUpdate=!0),a=new E.default(a,l),a.computeLineDistances(),a.position.set(i.x,i.y,i.z),a}},{key:"initLinePoints",value:function(e,t){var n=new T.default;n.setPositions(e),e=new fm.LineMaterial({color:t.color,linewidth:t.lineWidth,vertexColors:fm.VertexColors,dashed:!1,transparent:!0}),e.lineWidth=t.lineWidth,e.resolution.set(t.resolution.x,t.resolution.y),this._renderNode=new E.default(n,e),this._renderNode.computeLineDistances()}},{key:"moveUv",value:function(e){if(this._noAnimate){var t,n=N(this._lineNodes);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.line.material.uniforms.offset.value.y-=e}}catch(e){n.e(e)}finally{n.f()}}}},{key:"getLineTextureParams",value:function(e,t,n,r,i){var a={type:"normal",width:128,height:128,color:void 0!==i?i:"#ff0000",arrowWidth:20,arrowHeightPercent:.6,arrowWidthPercent:1,arrowPercent:.1,lineType:null,dashArray:[2,1],textureCommand:"createNormalLineTexture",godHeightPercent:1,godEdgePercent:.2,godArrowPercent:.15,godColor:void 0!==n?n:"#33cc61",godEdgeColor:void 0!==r?r:"#4a82d2",godArrowColor:"#F4FEFB",godArrowXScale:4,godArrowWidthPercent:.9};switch(e){case A.default.FULL:a.useMap=!1;break;case A.default.DOTTED:a.dashArray=[1,1],a.useMap=!0;break;case A.default.DOT_DASH:a.dashArray=[2.5,1,.5,1],a.useMap=!0;break;case A.default.CENTER:a.dashArray=[3,1,1.5,1],a.useMap=!0;break;case A.default.DASH:a.dashArray=[2,1],a.useMap=!0;break;case A.default.DOUBLE_DOT_DASH:a.dashArray=[2.5,.5,.5,.5,.5,.5],a.useMap=!0;break;case A.default.TRI_DOT_DASH:a.dashArray=[2.5,.5,.5,.5,.5,.5,.5,.5],a.useMap=!0;break;case A.default.ARROW:a.dashArray=[5,0],a.useMap=!0,a.textureCommand="createArrowLineTexture";break;case A.default.FMARROW:var o=void 0!==t?t:8,s=o*this._hwProp;this._secLen=s,a.width=10*o,a.height=10*s,a.arrowWidth=a.height/8,a.dashArray=[7,0],a.useMap=!0,a.textureCommand="createArrowWidthBackTexture";break;default:a.useMap=!1}return a}},{key:"setPassed",value:function(e,t){for(var n=0,r=0,i=[],a=0;a<this._segment.length;a++)if(this._segment[a].groupId===e){i=this._segment[a]._points;break}for(var o=0;o<i.length;o++)0!==o&&(t<o&&(r+=Math.abs(Math.sqrt(Math.pow(i[o].y-i[o-1].y,2)+Math.pow(i[o].x-i[o-1].x,2)))),n+=Math.abs(Math.sqrt(Math.pow(i[o].y-i[o-1].y,2)+Math.pow(i[o].x-i[o-1].x,2))));this._specific=r/n,this._passedGid=e}},{key:"renderNode",get:function(){return this._renderNode}},{key:"segment",get:function(){return this._segment}},{key:"passed",get:function(){return this._passed},set:function(e){this._passed=e}},{key:"passedColor",get:function(){return this._passedColor},set:function(e){this._passedColor=e}},{key:"specific",get:function(){return this._specific},set:function(e){this._specific=e}}]),n}(o.default),o=o,o=o;t.default=o},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function e(){(0,a.default)(this,e),this.x=void 0,this.y=void 0,this.z=void 0,this.gid=void 0}return(0,o.default)(e,[{key:"setGeoPoint",value:function(e){this.x=e.x,this.y=e.y}}]),e}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function e(){(0,a.default)(this,e),this.minX=Number.MAX_VALUE,this.minY=Number.MAX_VALUE,this.maxX=-Number.MAX_VALUE,this.maxY=-Number.MAX_VALUE}return(0,o.default)(e,[{key:"init",value:function(){this.minX=Number.MAX_VALUE,this.minY=Number.MAX_VALUE,this.maxX=-Number.MAX_VALUE,this.maxY=-Number.MAX_VALUE}},{key:"expandBy",value:function(e){e&&e.x&&e.y&&(this.minX>e.x&&(this.minX=e.x),this.maxX<e.x&&(this.maxX=e.x),this.minY>e.y&&(this.minY=e.y),this.maxY<e.y&&(this.maxY=e.y))}},{key:"isSeparate",value:function(e){return this.minX>e.maxX||this.minY>e.maxY||this.maxX<e.minX||this.maxY<e.minY}}]),e}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.Vector3=h;var a,o,s,l,i=i(n(13)),u=n(119),n=n(255);function h(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}(0,i.default)(h.prototype,{isVector3:!0,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(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:function(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:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:(l=new n.Quaternion,function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(l.setFromEuler(e))}),applyAxisAngle:(s=new n.Quaternion,function(e,t){return this.applyQuaternion(s.setFromAxisAngle(e,t))}),applyMatrix3:function(e){var t=this.x,n=this.y,r=this.z,e=e.elements;return this.x=e[0]*t+e[3]*n+e[6]*r,this.y=e[1]*t+e[4]*n+e[7]*r,this.z=e[2]*t+e[5]*n+e[8]*r,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,e=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*e,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*e,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*e,this},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,l=s*t+a*r-o*n,u=s*n+o*t-i*r,e=s*r+i*n-a*t,r=-i*t-a*n-o*r;return this.x=l*s+r*-i+u*-o-e*-a,this.y=u*s+r*-a+e*-i-l*-o,this.z=e*s+r*-o+l*-a-u*-i,this},project:function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)},unproject:function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)},transformDirection:function(e){var t=this.x,n=this.y,r=this.z,e=e.elements;return this.x=e[0]*t+e[4]*n+e[8]*r,this.y=e[1]*t+e[5]*n+e[9]*r,this.z=e[2]*t+e[6]*n+e[10]*r,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(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:function(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:function(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:function(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:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(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:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var n=e.x,r=e.y,i=e.z,a=t.x,e=t.y,t=t.z;return this.x=r*t-i*e,this.y=i*a-n*t,this.z=n*e-r*a,this},projectOnVector:function(e){var t=e.dot(this)/e.lengthSq();return this.copy(e).multiplyScalar(t)},projectOnPlane:(o=new h,function(e){return o.copy(this).projectOnVector(e),this.sub(o)}),reflect:(a=new h,function(e){return this.sub(a.copy(e).multiplyScalar(2*this.dot(e)))}),angleTo:function(e){return e=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq()),Math.acos(u._Math.clamp(e,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y,e=this.z-e.z;return t*t+n*n+e*e},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)},setFromSphericalCoords:function(e,t,n){var r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this},setFromCylindrical:function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},setFromCylindricalCoords:function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this},setFromMatrixPosition:function(e){return e=e.elements,this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),e=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=e,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}})},function(e,t,n){"use strict";var r="object"==typeof Reflect?Reflect:null,l=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};function o(e){console&&console.warn&&console.warn(e)}var i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)},a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=x,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function h(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,a;return h(n),i=e._events,void 0===i?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener||n),i=e._events),a=i[t]),void 0===a?(a=i[t]=n,++e._eventsCount):("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),n=c(e),0<n&&a.length>n&&!a.warned&&(a.warned=!0,n=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit"),n.name="MaxListenersExceededWarning",n.emitter=e,n.type=t,n.count=a.length,o(n))),e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){return e={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},t=f.bind(e),t.listener=n,e.wrapFn=t,t}function m(e,t,n){return e=e._events,void 0===e?[]:(t=e[t],void 0===t?[]:"function"==typeof t?n?[t.listener||t]:[t]:n?_(t):g(t,t.length))}function v(e){var t=this._events;if(void 0!==t){if(e=t[e],"function"==typeof e)return 1;if(void 0!==e)return e.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function y(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function _(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function x(i,a){return new Promise(function(e,t){function n(e){i.removeListener(a,r),t(e)}function r(){"function"==typeof i.removeListener&&i.removeListener("error",n),e([].slice.call(arguments))}b(i,a,r,{once:!0}),"error"!==a&&w(i,n,{once:!0})})}function w(e,t,n){"function"==typeof e.on&&b(e,"error",t,n)}function b(n,r,i,a){if("function"==typeof n.on)a.once?n.once(r,i):n.on(r,i);else{if("function"!=typeof n.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n);n.addEventListener(r,function e(t){a.once&&n.removeEventListener(r,e),i(t)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r,i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){if(0<t.length&&(r=t[0]),r instanceof Error)throw r;throw i=new Error("Unhandled error."+(r?" ("+r.message+")":"")),i.context=r,i}if(e=a[e],void 0===e)return!1;if("function"==typeof e)l(e,this,t);else for(var o=e.length,s=g(e,o),n=0;n<o;++n)l(s[n],this,t);return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return h(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return h(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(h(t),r=this._events,void 0===r)return this;if(n=r[e],void 0===n)return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;0<=a;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():y(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events;if(void 0===n)return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){for(var r,i=Object.keys(n),a=0;a<i.length;++a)r=i[a],"removeListener"!==r&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],"function"==typeof t)this.removeListener(e,t);else if(void 0!==t)for(a=t.length-1;0<=a;a--)this.removeListener(e,t[a]);return this},s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},s.prototype.listenerCount=v,s.prototype.eventNames=function(){return 0<this._eventsCount?i(this._events):[]}},function(e,t,n){t=e.exports=n(256),t.Stream=t,t.Readable=t,t.Writable=n(162),t.Duplex=n(70),t.Transform=n(262),t.PassThrough=n(586)},function(C,e,D){"use strict";!function(e,t,n){var o=D(120);function c(e){var t=this;this.next=null,this.entry=null,this.finish=function(){P(t,e)}}C.exports=v;var s,a=!e.browser&&-1<["v0.10","v0.9."].indexOf(e.version.slice(0,5))?t:o.nextTick;v.WritableState=m,t=Object.create(D(96)),t.inherits=D(79);var r={deprecate:D(585)},i=D(258),l=D(121).Buffer,u=n.Uint8Array||function(){};function h(e){return l.from(e)}function d(e){return l.isBuffer(e)||e instanceof u}var f,n=D(260);function p(){}function m(e,t){s=s||D(70),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(i||0===i)?i:a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,a=!1===e.decodeStrings,this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){T(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}function v(e){if(s=s||D(70),!(f.call(v,this)||this instanceof s))return new v(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),i.call(this)}function g(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}function y(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(r,a),i=!1),i}function _(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n)),t}function x(e,t,n,r,i,a){n||(s=_(t,r,i),r!==s&&(n=!0,i="buffer",r=s));var o=t.objectMode?1:r.length;t.length+=o;var s,l=t.length<t.highWaterMark;return l||(t.needDrain=!0),t.writing||t.corked?(s=t.lastBufferedRequest,t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1):w(e,t,!1,o,r,i,a),l}function w(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function b(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(N,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),N(e,t))}function M(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function T(e,t){var n=e._writableState,r=n.sync,i=n.writecb;M(n),t?b(e,n,r,t,i):(t=I(n),t||n.corked||n.bufferProcessing||!n.bufferedRequest||A(e,n),r?a(E,e,n,t,i):E(e,n,t,i))}function E(e,t,n,r){n||S(e,t),t.pendingcb--,r(),N(e,t)}function S(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function A(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),r=t.corkedRequestsFree;r.entry=n;for(var a=0,o=!0;n;)i[a]=n,n.isBuf||(o=!1),n=n.next,a+=1;i.allBuffers=o,w(e,t,!0,t.length,i,"",r.finish),t.pendingcb++,t.lastBufferedRequest=null,r.next?(t.corkedRequestsFree=r.next,r.next=null):t.corkedRequestsFree=new c(t),t.bufferedRequestCount=0}else{for(;n;){var s=n.chunk,l=n.encoding,u=n.callback,h=t.objectMode?1:s.length;if(w(e,t,!1,h,s,l,u),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function L(t,n){t._final(function(e){n.pendingcb--,e&&t.emit("error",e),n.prefinished=!0,t.emit("prefinish"),N(t,n)})}function R(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(L,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function N(e,t){var n=I(t);return n&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}function k(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function P(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}t.inherits(v,i),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===v&&e&&e._writableState instanceof m}})):f=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=!r.objectMode&&d(e);return a&&!l.isBuffer(e)&&(e=h(e)),"function"==typeof t&&(n=t,t=null),t=a?"buffer":t||r.defaultEncoding,"function"!=typeof n&&(n=p),r.ended?g(this,n):(a||y(this,r,e,n))&&(r.pendingcb++,i=x(this,r,a,e,t,n)),i},v.prototype.cork=function(){var e=this._writableState;e.corked++},v.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||A(this,e))},v.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||k(this,r,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=n.destroy,v.prototype._undestroy=n.undestroy,v.prototype._destroy=function(e,t){this.end(),t(e)}}.call(this,D(65),D(583).setImmediate,D(49))},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function i(e,t,n,r){(0,a.default)(this,i),this._groupId=e,this._length=t,this._pointList=n||[],this._nodeList=r||[]}return(0,o.default)(i,[{key:"dispose",value:function(){this._pointList=[],this._nodeList=[]}},{key:"groupId",get:function(){return this._groupId}},{key:"GroupId",get:function(){return this._groupId}},{key:"length",get:function(){return this._length}},{key:"Length",get:function(){return this._length}},{key:"pointList",get:function(){return this.getPointList()}},{key:"PointList",get:function(){return this.getPointList()}},{key:"getPointList",value:function(){for(var e=[],t=0,n=this._pointList.length;t<n;t++)e.push({x:this._pointList[t].x,y:this._pointList[t].y,groupId:this._groupId});return e}}]),i}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(13)),o=i(n(2)),s=i(n(3)),l=i(n(28)),n=(i(n(157)),function(){function e(){(0,o.default)(this,e),this.Id=0,this.startId=-1,this.startPoint={},this.endId=-1,this.endPoint={},this.length=0,this._type=0,this.pointVector=[],this.extentId=-1,this._isInAdj=!1,this._info=0}return(0,s.default)(e,[{key:"roadRank",get:function(){return 3&this._type},set:function(e){this._type|=e}},{key:"roadEntry",get:function(){return this._type>>2&3},set:function(e){this._type|=e<<2}},{key:"tempType",get:function(){return this._type>>4&3},set:function(e){this._type|=e<<4}},{key:"through",get:function(){return 16&this._type?1:0},set:function(e){e?this._type|=16:this._type&=-17}},{key:"setRoad",value:function(e){this.Id=e.Id,this.startId=e.startId,this.startPoint=(0,a.default)({},e.startPoint),this.endId=e.endId,this.endPoint=(0,a.default)({},e.endPoint),this.length=e.length,this._type=e._type,this.pointVector=[],this.extentId=e.extentId;for(var t=0;t<e.pointVector.length;t++)this.pointVector[t]=e.pointVector[t]}},{key:"calcLength",value:function(){this.length=l.default.distanceOfTwoPoints(this.startPoint,this.endPoint)}},{key:"calcManhattanDistance",value:function(){var e=this.startPoint.x-this.endPoint.x,t=this.startPoint.y-this.endPoint.y;this.length=Math.abs(e)+Math.abs(t)}},{key:"calcMiddlePoint",value:function(){var e={};return e.x=(this.startPoint.x+this.endPoint.x)/2,e.y=(this.startPoint.y+this.endPoint.y)/2,e}}]),e}()),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.NodeDistance=t.default=void 0;var h=i(n(31)),c=i(n(27)),a=i(n(15)),f=i(n(63)),o=i(n(122)),s=i(n(29)),l=i(n(34)),u=i(n(3)),p=i(n(2)),m=i(n(28)),v=i(n(80)),g=i(n(55)),y=i(n(97)),_=function e(){(0,p.default)(this,e),this.distance=Number.MAX_VALUE,this.node=null};t.NodeDistance=_,n=function(){function d(e,t,n,r){(0,p.default)(this,d),this.groupId=0,this._type=r,this.nodeVector=e,this.roadVector=t,this.obstructModels=[],this.obstructExtents=[],this.obstructLines=[],this.zones=[],this.zoneIDMap=new y.default,this.vertexLen=[],this.adjList=new y.default,this.nextFloorMap=new y.default,this._needVertex=n,this._roadDiffusion=[],this._nodeMap=new y.default,this._roadMap=new y.default,this._maxNodeId=0,this._maxRoadId=0,this.simplify(),this._init()}return(0,u.default)(d,[{key:"dispose",value:function(){this.nodeVector=null,this.roadVector=null,this.obstructModels=null,this.obstructExtents=null,this.obstructLines=null,this.zones=null,null!=this.zoneIDMap&&(this.zoneIDMap.clear(),this.zoneIDMap=null),null!=this.adjList&&(this.adjList.clear(),this.adjList=null),this.vertexLen=null,null!=this.nextFloorMap&&(this.nextFloorMap.clear(),this.nextFloorMap=null),this._roadDiffusion=null,null!=this._nodeMap&&(this._nodeMap.clear(),this._nodeMap=null),null!=this._roadMap&&(this._roadMap.clear(),this._roadMap=null)}},{key:"initVertexLen",value:function(e){for(var t,n,r=Number.MAX_VALUE,i=0;i<this.roadVector.length;i++)0!=this.needVertex&&(t=this.roadVector[i],1==e?r=t.length:2==e&&(r=t.length*t.roadRank),n=t.roadEntry,n!=g.default.NaviRoadEntry_BOTH&&n!=g.default.NaviRoadEntry_FORWARD||(this.vertexLen[t.startId][t.endId]=r),n!=g.default.NaviRoadEntry_BOTH&&n!=g.default.NaviRoadEntry_BACK||(this.vertexLen[t.endId][t.startId]=r))}},{key:"invalide",value:function(){return 0==this.nodeVector.length||0==this.roadVector.length}},{key:"reset",value:function(){for(var e=0;e<this.nodeVector.length;e++)this.nodeVector[e]._treatHead=!1;if(1==this._needVertex)for(var t=this.nodeVector.length+1,n=0;n<t;n++)for(var r=0;r<t;r++)void 0!==this.vertexLen[n]&&void 0!==this.vertexLen[n][r]&&(this.vertexLen[n][r]=Number.MAX_VALUE)}},{key:"obstructsToZones",value:function(){this.zones=[];for(var e=0;e<this.obstructExtents.length;e++){var t=this.obstructExtents[e],t=t.toZone();this.zones.push(t)}for(var n=0;n<this.obstructModels.length;n++){var r=this.obstructExtents[n],r=r.toZone();this.zones.push(r)}}},{key:"getZone",value:function(e){for(var t=0;t<this.zones.length;t++){var n=this.zones[t];if(n&&n.Id==e)return n}return null}},{key:"queryZoneByPoint",value:function(e){for(var t=0;t<this.zones.length;t++){var n=this.zones[t];if(n&&1==n.contain(e))return n}return null}},{key:"transpose",value:function(){}},{key:"queryEntranceCoordByPoint",value:function(e,t){var n=null;if(this.nodeVector.length<=0||this.roadVector.length<=0)return n;for(var r=[],i=0,a=this.nodeVector.length;i<a;i++){var o=this.nodeVector[i],s=o.entranceType;s!=t&&s!=g.default.NaviEntranceType_ACCESS||(s=new _,s.node=o,s.distance=m.default.distanceOfTwoPoints(e,o.point),r.push(s))}return 0==r.length||(r=(0,h.default)(r).call(r,this._nodeDistanceFunc),n=r[0].node.point),n}},{key:"queryEntranceCoords",value:function(e){var t=[];if(this.nodeVector.length<=0||this.roadVector.length<=0)return t;for(var n=0,r=this.nodeVector.length;n<r;n++){var i=this.nodeVector[n],a=i.entranceType;a!=e&&a!=g.default.NaviEntranceType_ACCESS||t.push(i.point)}return t}},{key:"nodesAccess",value:function(e,t){if(this.nodeVector.length<=0||this.roadVector.length<=0)return!1;if(e.Id==t.Id)return!0;this._resetRoadDiffusion();var n=[];n.push(e.Id);for(var r=null,i=null,a=0,o=a;a!=n.length;)for(var o=a,a=n.length,s=o;s<n.length;s++)for(var l=0;l<this.roadVector.length;l++)if(1!=this._roadDiffusion[l]){if(r=this.roadVector[l],i=r.roadEntry,r.startId==n[s]&&(i==g.default.NaviRoadEntry_BOTH||i==g.default.NaviRoadEntry_FORWARD)){if(r.endId==t.Id)return!0;n.push(r.endId),this._roadDiffusion[l]=!0}if(r.endId==n[s]&&(i==g.default.NaviRoadEntry_BOTH||i==g.default.NaviRoadEntry_BACK)){if(r.startId==t.Id)return!0;n.push(r.startId),this._roadDiffusion[l]=!0}}return!1}},{key:"querySameExtentLiftNodesByGeoPoint",value:function(e,t,n,r){if(this.nodeVector.length<=0||this.roadVector.length<=0)return[];var i=this.queryContainExtentId(e);if(0==i)return!1;for(var a=[],o=0;o<this.nodeVector.length;o++){var s=this.nodeVector[o],l=this.queryContainExtentId(s.point);!s.contansFloor(t)||l!=i&&0!=i||(l=new _,l.node=s,l.distance=m.default.distanceOfTwoPoints(e,s.point),l.distance=(0,c.default)(l.distance).toFixed(4),a.push(l))}if(!a||0==a.length)return[];for(var a=(0,h.default)(a).call(a,this._nodeDistanceFunc),u=0;u<a.length;u++)n[u]=new v.default,n[u].setNode(a[u].node),r[u]=(0,c.default)(a[u].distance);return n}},{key:"queryLiftNodeByFLAGID",value:function(e,t){if(!this.nodeVector||this.nodeVector.length<=0||!this.roadVector||this.roadVector.length<=0)return!1;for(var n=0;n<this.nodeVector.length;n++){var r=this.nodeVector[n];if(r.nodeType==g.default.NaviNodeType_FLOOR){var i=r.liftFlag;if(i==e)return t.setNode(r),!0}}return!1}},{key:"queryLiftNodesByType",value:function(e,t){if(!this.nodeVector||this.nodeVector.length<=0||!this.roadVector||this.roadVector.length<=0)return!1;for(var n=0;n<this.nodeVector.length;n++){var r=this.nodeVector[n];r.liftType==e&&(t[n]=r)}return 0!=t.length}},{key:"queryContainExtentId",value:function(e){if(0==this.obstructExtents.length||!e)return 0;for(var t=0,n=this.obstructExtents.length;t<n;t++){var r=this.obstructExtents[t];if(r.contain(e))return r.Id}return 0}},{key:"isLineObstruct",value:function(e,t){if(0==this.obstructLines.length||!e||!t)return!1;for(var n=0;n<this.obstructLines.length;n++)if(this.obstructLines[n].isCross(e,t))return!0;return!1}},{key:"queryNearestSameExtentElementByGeoPoint",value:function(e,t,n,r,i){var a=Number.MAX_VALUE,o={};if(new v.default,this.nodeVector.length<=0||this.roadVector.length<=0)return!1;var s=this.queryContainExtentId(e);if(0==s)return!1;for(var l=0,u=this.roadVector.length;l<u;l++){var h,c=this.roadVector[l];c&&s==this.queryContainExtentId(c.startPoint)&&(h=m.default.pointDistanceToLine(e,c.startPoint,c.endPoint,o),this.isLineObstruct(o,e)||h<a&&(a=h,t.setRoad(c),r.x=o.x,r.y=o.y))}if(!t||t.roadEntry==g.default.NaviRoadEntry_FORBID)return!1;for(var d=t.roadEntry==g.default.NaviRoadEntry_BACK||t.roadEntry!=g.default.NaviRoadEntry_FORWARD&&m.default.distanceOfTwoPoints(t.startPoint,r)<=m.default.distanceOfTwoPoints(t.endPoint,r)?t.startId:t.endId,f=0;f<this.nodeVector.length;f++){var p=this.nodeVector[f];if(p.Id==d){n.setNode(p);break}}return!0}},{key:"queryNearestSameExtentElementByGeoPointProcessForbid",value:function(e,t,n,r){var i=Number.MAX_VALUE,a={};if(new v.default,this.nodeVector.length<=0||this.roadVector.length<=0)return!1;var o=this.queryContainExtentId(e);if(0==o)return!1;for(var s=0;s<this.roadVector.length;s++){var l,u=this.roadVector[s];g.default.NaviRoadEntry_BOTH==u.roadEntry&&(o!=this.queryContainExtentId(u.startPoint)&&0!=o||(l=m.default.pointDistanceToLine(e,u.startPoint,u.endPoint,a),this.isLineObstruct(a,e)||l<i&&(i=l,t.setRoad(u),r.x=a.x,r.y=a.y)))}if(-1==t.Id)return!1;for(var h=m.default.distanceOfTwoPoints(t.startPoint,r)<=m.default.distanceOfTwoPoints(t.endPoint,r)?t.startId:t.endId,c=0;c<this.nodeVector.length;c++){var d=this.nodeVector[c];if(d.Id==h){n.setNode(d);break}}return-1!=n.Id}},{key:"simplify",value:function(){this._maxNodeId=0,this._maxRoadId=0;for(var e,t=0;t<this.roadVector.length;)null==this.roadVector[t]?(0,a.default)(e=this.roadVector).call(e,t,1):(this.roadVector[t].Id>this._maxRoadId&&(this._maxRoadId=this.roadVector[t].Id),t++);for(var n,r=0;r<this.nodeVector.length;)null==this.nodeVector[r]?(0,a.default)(n=this.nodeVector).call(n,r,1):(this.nodeVector[r].Id>this._maxNodeId&&(this._maxNodeId=this.nodeVector[r].Id),r++)}},{key:"consoleAdjList",value:function(e){if(e){var t,n=this.adjList,r=(this.nodeVector,this),i=(naviMap.size(),"********* ADJLIST ************\n");for(t in(0,f.default)(n))for(var a=(0,f.default)(n)[t],o=a,s=n.get(a),l=0;l<s.length;l++){var u=s[l],h=u.nodeId,u=this._naviGraph.getIndexByNodeID(o),h=(this._naviGraph.getIndexByNodeID(h),r.nodeVector[u]),u=r.nodeVector[endidx],i=i+h.Id+","+h.point.x+","+h.point.y;i+=",",i=i+u.Id+","+u.point.x+","+u.point.y,i+="\n"}i+="*********** END **************"}}},{key:"consoleNodeInfos",value:function(e){if(e){var t=[];t.push.apply(t,(0,l.default)(this.nodeVector)),(0,h.default)(t).call(t,function(e,t){return e.Id-t.Id});for(var n=0;n<t.length;n++)for(var r=t[n],i=(r.Id,0);i<r.segLinks.length;i++)r.segLinks[i]}}},{key:"consoleNodePres",value:function(e){if(e)for(var t=0;t<this.nodeVector.length;t++)for(var n=this.nodeVector[t],r=(n.Id,0);r<n._vPre.length;r++)n._vPre[r]}},{key:"consoleRoadInfos",value:function(e){if(e){var t=[];t.push.apply(t,(0,l.default)(this.roadVector)),(0,h.default)(t).call(t,function(e,t){return e.Id-t.Id});for(var n=0;n<t.length;n++){var r=t[n];r.Id,r.startId,r.endId}}}},{key:"consoleAdjInfos",value:function(e){e&&((0,h.default)(e=this.adjList).call(e),this.adjList.each(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.nodeId,r.length.toFixed(6)}}))}},{key:"getIndexByNodeID",value:function(e){return e=this._nodeMap.get(e),void 0===e?null:e}},{key:"getIndexByRoadID",value:function(e){return e=this._roadMap.get(e),void 0===e?null:e}},{key:"findObstruct",value:function(e){for(var t=Number.MAX_VALUE,n=null,r=0;r<this.obstructExtents.length;++r){var i=this.obstructExtents[r],a=i.contain(e);a&&i.area<t&&(t=cur_area,n=i)}for(var o=0;o<this.obstructModels.size();++o){var s=this.obstructModels[o],l=s.contain(e);l&&s.area<t&&(t=cur_area,n=s)}return n||null}},{key:"findModel",value:function(e){for(var t=Number.MAX_VALUE,n=null,r=0;r<this.obstructModels.length;++r){var i=this.obstructModels[r],a=i.contain(e);a&&i.area<t&&(t=i.area,n=i)}return n||null}},{key:"generateNodeId",value:function(){return++this._maxNodeId}},{key:"generateRoadId",value:function(){return++this._maxRoadId}},{key:"setBaseNodeId",value:function(e){this._maxNodeId=e}},{key:"setBaseRoadId",value:function(e){this._maxRoadId=e}},{key:"createNodeMap",value:function(){for(var e=0;e<this.nodeVector.length;e++){var t=this.nodeVector[e];t&&this._nodeMap.put(t.Id,e)}}},{key:"createRoadMap",value:function(){for(var e=0;e<this.roadVector.length;e++){var t=this.roadVector[e];t&&this._roadMap.put(t.Id,e)}}},{key:"clearNodeCache",value:function(){var n=this;this._nodeMap.each(function(e,t){t=n.nodeVector[t],t._vPre=[]})}},{key:"makeUpAdjList",value:function(){var i=this;this.adjList.clear();for(var a,e=function(e){var t=i.roadVector[e];if(null==t)return"continue";var n,r=t.roadEntry;g.default.NaviRoadEntry_BOTH!=r&&g.default.NaviRoadEntry_FORWARD!=r||(e=t.startId,n=i.adjList.get(e),n||(n=[],i.adjList.put(e,n)),a=(0,o.default)(n).call(n,function(e){return e.nodeId==t.endId}),null==a&&n.push({nodeId:t.endId,length:t.length})),g.default.NaviRoadEntry_BOTH!=r&&g.default.NaviRoadEntry_BACK!=r||(n=t.endId,r=i.adjList.get(n),r||(r=[],i.adjList.put(n,r)),a=(0,o.default)(r).call(r,function(e){return e.nodeId==t.startId}),null==a&&r.push({nodeId:t.startId,length:t.length}))},t=0;t<this.roadVector.length;t++)e(t)}},{key:"getIdxByNodeId",value:function(e){for(var t=9;t<this.nodeVector.length;t++)if(this.nodeVector[t].Id==e)return t;return-1}},{key:"getIdxByRoadId",value:function(e){for(var t=9;t<this.roadVector.length;t++)if(this.roadVector[t].Id==e)return t;return-1}},{key:"queryRoadsByPolygon",value:function(e){for(var t=[],n=this.roadVector,r=0;r<n.length;r++){var i=n[r].startPoint,a=n[r].endPoint,o=[];m.default.segCrossPolygon(i,a,e,o)?((0,h.default)(o).call(o,function(e,t){return e=m.default.distanceOfTwoPoints(i,e),t=m.default.distanceOfTwoPoints(i,t),e-t}),t.push({road:n[r],crss:o})):m.default.pointInPolygon2d(e,i,e.length)&&t.push({road:n[r],crss:[]})}return t}},{key:"getModelByPoint",value:function(e){for(var t=null,n=Infinity,r=0;r<this.obstructModels.length;r++){var i=this.obstructModels[r];i.Id,i.fid,m.default.pointInPolygon2d(i.points,e,i.points.length)&&n>m.default.calcPolygonArea2d(i.points)&&(t=i,n=m.default.calcPolygonArea2d(i.points))}return t}},{key:"getZoneIdByPoint",value:function(e){for(var t=-1,n=0;n<this.zones.length;n++){var r=this.zones[n];if(m.default.pointInPolygon2d(r.points,e,r.points.length)){t=r.Id;break}}return t}},{key:"getRandomModel",value:function(){var e=this.obstructModels.length,e=(0,s.default)(Math.random()*e);return this.obstructModels[e]}},{key:"_init",value:function(){if(1==this._needVertex)for(var e=null,t=0;t<this.roadVector.length;t++)e=this.roadVector[t],void 0===this.vertexLen[e.startId]&&(this.vertexLen[e.startId]=new Array),this.vertexLen[e.startId][e.endId]=Number.MAX_VALUE,void 0===this.vertexLen[e.endId]&&(this.vertexLen[e.endId]=new Array),this.vertexLen[e.endId][e.startId]=Number.MAX_VALUE;for(var n=0;n<this.roadVector.length;n++)this._roadDiffusion[n]=!1}},{key:"_resetRoadDiffusion",value:function(){for(var e=0;e<this._roadDiffusion.length;e++)this._roadDiffusion[e]=!1}},{key:"_nodeDistanceFunc",value:function(e,t){return(0,c.default)(e.distance)-(0,c.default)(t.distance)}},{key:"getLifts",value:function(){for(var e=[],t=0;t<this.nodeVector.length;t++){var n=this.nodeVector[t];n.liftType==g.default.NaviLiftType_Lift&&e.push(n)}return e}},{key:"getNodeByFlag",value:function(e){for(var t=0;t<this.nodeVector.length;t++)if(this.nodeVector[t].liftFlag==e)return this.nodeVector[t];return null}},{key:"getEscalators",value:function(){}},{key:"getStaris",value:function(){}},{key:"getAllLifts",value:function(){for(var e=[],t=0;t<this.nodeVector.length;t++){var n=this.nodeVector[t];n.liftType!=g.default.NaviLiftType_NULL&&e.push(n)}return e}},{key:"getGraphByEid",value:function(e){for(var t=null,n=0;n<this.obstructExtents.length;n++)if(e==this.obstructExtents[n].Id){t=this.obstructExtents[n];break}if(!t)return null;for(var r=[],i=0;i<this.nodeVector.length;i++){var a=this.nodeVector[i];m.default.pointInPolygon2d(t.points,a.point,t.points.length)&&r.push(a)}for(var o=[],s=0;s<this.roadVector.length;s++){var l=this.roadVector[s];m.default.pointInPolygon2d(t.points,l.startPoint,t.points.length)&&o.push(l)}for(var u=[],n=0;n<this.obstructModels.length;n++){var h=this.obstructModels[n];m.default.pointInPolygon2d(t.points,h.center,t.points.length)&&u.push(h)}var c=new d(r,o,!0,1);return c.obstructModels=u,c.obstructExtents=[t],c}}]),d}(),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(54)),y=i(n(50)),_=i(n(15)),x=i(n(9)),w=i(n(31)),o=i(n(35)),s=i(n(2)),l=i(n(3)),u=i(n(68)),h=i(n(69)),n=function(){function t(e){(0,s.default)(this,t),this._naviGraph=e,this._startNode=null,this._endNode=null,this._startNodeID=-1,this._endNodeID=-1,this._mode=u.default.MODULE_SHORTEST,this._naviGraph.createNodeMap(),this._naviGraph.createRoadMap(),this._naviGraph.makeUpAdjList(),this._kEPSILON_VALUE=5e-4}return(0,l.default)(t,[{key:"routeMultiDestinations",value:function(e,t,n){if(this._switchToMode(n),this._destIds=t,e=this._naviGraph.getIndexByNodeID(e),-1==e)return h.default.ROUTE_FAILED_CANNOT_CALCULATE;this.endIdxs=[];for(var r=0;r<t.length;r++){var i=this._naviGraph.getIndexByNodeID(t[r]);this.endIdxs.push(i)}return e=this._dijkstraAssist_1vN(this._naviGraph,e,this.endIdxs),this._naviGraph.consoleNodePres(),!!e}},{key:"getMultiRoute",value:function(e){for(var t=0;t<this.endIdxs.length;t++){var n=[];this._getOneRoute(this.endIdxs[t],n),(0,a.default)(n).call(n),e.push(n)}}},{key:"_getOneRoute",value:function(e,t){e=this._naviGraph.nodeVector[e],t.push(e),e=e._vPre[0],null!=e&&this._getOneRoute(e,t)}},{key:"routeCalculate",value:function(e,t,n){return this._switchToMode(n),this._startNode=e,this._endNode=t,this._startNodeID=e.Id,this._endNodeID=t.Id,n=this._naviGraph.getIndexByNodeID(this._startNodeID),-1==n?h.default.ROUTE_FAILED_CANNOT_CALCULATE:(e=this._naviGraph.getIndexByNodeID(t.Id),-1==e?h.default.ROUTE_FAILED_CANNOT_CALCULATE:(t=[],t.push(e),t=this._dijkstraAssist_1vN(this._naviGraph,n,t),this._naviGraph.consoleNodePres(),t?h.default.ROUTE_SUCCESS:h.default.ROUTE_FAILED_CANNOT_ARRIVE))}},{key:"getRouteCalculateResult",value:function(){var e=[],t=this._naviGraph.getIndexByNodeID(this._endNodeID),n=[];n.push(t);var r=[],t=[];return this._multiPathNodeVector(n,this._naviGraph.nodeVector,r,t),e.push.apply(e,r),e}},{key:"dispose",value:function(){this._naviGraph.dispose(),this._naviGraph=null,this._startNode=null,this._endNode=null}},{key:"_dijkstraAssist_1vN",value:function(e,t,n){if(null==e)return!1;var r=e.nodeVector.length;if(t<0||r<=t)return!1;this._removeArrayAll(n,t);for(var i=0;i<r;++i)e.nodeVector[i]._dist=Number.MAX_VALUE,e.nodeVector[i]._visited=!1,e.nodeVector[i]._vPre=[];e.nodeVector[t]._dist=0;var a=n.length,o=0,s=[];s.push(e.nodeVector[t]);for(var l=(0,y.default)(t=this._nodeDistCompareFunc).call(t,this);0<s.length;){var u=s[0].Id;(0,_.default)(s).call(s,0,1);var h=e.getIndexByNodeID(u);if(null!=h){var c=e.nodeVector[h];if(!c._visited){c._visited=!0;var d=(0,x.default)(n).call(n,h);if(-1!=d&&(++o,o==a))return!0;if(0!=e.adjList.size()){var f=e.adjList.get(u);if(f)for(var p=0;p<f.length;p++){var m=f[p],v=m.nodeId,g=e.getIndexByNodeID(v);null!=g&&(v=m.length,m=e.nodeVector[g],m._visited||(m._dist>v+c._dist?(m._dist=v+c._dist,m._vPre=[],m._vPre.push(h),s.push(e.nodeVector[g]),(0,w.default)(s).call(s,l)):Math.abs(m._dist-(v+c._dist))<1e-12&&-1!=(0,x.default)(v=m._vPre).call(v,h)&&m._vPre.push(h)))}}}}}return!(o<a)}},{key:"_nodeDistCompareFunc",value:function(e,t){return e._dist-(t._dist+this._kEPSILON_VALUE)}},{key:"_removeArrayAll",value:function(e,t){for(var n=(0,x.default)(e).call(e,t);-1!=n;)(0,_.default)(e).call(e,n,1),n=(0,x.default)(e).call(e,t)}},{key:"_switchToMode",value:function(e){var t;this._mode!=e&&(u.default.MODULE_SHORTEST==e?(0,o.default)(t=this._naviGraph.roadVector).call(t,function(e){e.length=e.length/e.roadRank}):u.default.MODULE_BEST==e&&(0,o.default)(t=this._naviGraph.roadVector).call(t,function(e){e.length=e.length*e.roadRank}),this._naviGraph.makeUpAdjList(),this._mode=e)}},{key:"_pathNodeVector",value:function(e,t,n,r){0!=t[e]._vPre.length&&(e=t[e]._vPre[0],n.push(t[e]),r.count++,this._pathNodeVector(e,t,n,r))}},{key:"_multiPathNodeVector",value:function(e,t,n,r){for(var i=0;i<e.length;i++){var a=e[i];n.push(t[a]);var o={count:1};this._pathNodeVector(a,t,n,o),r.push(o.count)}}}]),t}(),n=n;t.default=n},function(e,t,n){n(270);var n=n(11),r=n.Object,e=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(e.sham=!0)},function(e,t,n){var r=n(30),i=n(16),a=n(124);e.exports=!r&&!i(function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(16),i=/#|\.prototype\./,n=function(e,t){return e=o[a(e)],e==l||e!=s&&("function"==typeof t?r(t):!!t)},a=n.normalize=function(e){return String(e).replace(i,".").toLowerCase()},o=n.data={},s=n.NATIVE="N",l=n.POLYFILL="P";e.exports=n},function(e,t,n){var r=n(30),o=n(40),s=n(33),l=n(101);e.exports=r?Object.defineProperties:function(e,t){s(e);for(var n,r=l(t),i=r.length,a=0;a<i;)o.f(e,n=r[a++],t[n]);return e}},function(e,t,n){var o=n(37),s=n(43),l=n(172).indexOf,u=n(83);e.exports=function(e,t){var n,r=s(e),i=0,a=[];for(n in r)!o(u,n)&&o(r,n)&&a.push(n);for(;t.length>i;)o(r,n=t[i++])&&(~l(a,n)||a.push(n));return a}},function(e,t,n){var l=n(43),u=n(46),h=n(102),n=function(s){return function(e,t,n){var r,i=l(e),a=u(i.length),o=h(n,a);if(s&&t!=t){for(;o<a;)if(r=i[o++],r!=r)return!0}else for(;o<a;o++)if((s||o in i)&&i[o]===t)return s||o||0;return!s&&-1}};e.exports={includes:n(!0),indexOf:n(!1)}},function(e,t,n){n=n(45),e.exports=n("document","documentElement")},function(e,t,n){"use strict";var a=n(44),o=n(23),s=[].slice,l={},u=function(e,t,n){if(!(t in l)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";l[t]=Function("C,a","return new C("+r.join(",")+")")}return l[t](e,n)};e.exports=Function.bind||function(t){var n=a(this),r=s.call(arguments,1),i=function(){var e=r.concat(s.call(arguments));return this instanceof i?u(n,e.length,e):n.apply(t,e)};return o(n.prototype)&&(i.prototype=n.prototype),i}},function(e,t,n){e.exports=n(277)},function(e,t,n){n(177),n(106),n(179),n(279),n(280),n(281),n(282),n(183),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n=n(11),e.exports=n.Symbol},function(e,t,n){"use strict";var r=n(8),i=n(16),a=n(76),o=n(23),u=n(38),h=n(46),c=n(84),d=n(128),s=n(87),l=n(24),n=n(86),f=l("isConcatSpreadable"),p=9007199254740991,m="Maximum allowed index exceeded",i=51<=n||!i(function(){var e=[];return e[f]=!1,e.concat()[0]!==e}),s=s("concat"),v=function(e){if(!o(e))return!1;var t=e[f];return void 0!==t?!!t:a(e)},s=!i||!s;r({target:"Array",proto:!0,forced:s},{concat:function(e){for(var t,n,r,i=u(this),a=d(i,0),o=0,s=-1,l=arguments.length;s<l;s++)if(r=-1===s?i:arguments[s],v(r)){if(n=h(r.length),p<o+n)throw TypeError(m);for(t=0;t<n;t++,o++)t in r&&c(a,o,r[t])}else{if(p<=o)throw TypeError(m);c(a,o++,r)}return a.length=o,a}})},function(e,t,n){n=n(129),e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var r=n(8),i=n(18),a=n(45),o=n(75),s=n(30),l=n(129),u=n(178),h=n(16),c=n(37),d=n(76),f=n(23),p=n(33),m=n(38),v=n(43),g=n(100),y=n(71),_=n(73),x=n(101),w=n(130),b=n(180),M=n(131),T=n(81),E=n(40),S=n(123),A=n(39),I=n(88),L=n(126),R=n(103),N=n(83),k=n(104),P=n(24),C=n(132),D=n(25),O=n(77),B=n(52),F=n(57).forEach,U=R("hidden"),z="Symbol",G="prototype",R=P("toPrimitive"),V=B.set,H=B.getterFor(z),j=Object[G],W=i.Symbol,Y=a("JSON","stringify"),q=T.f,X=E.f,Z=b.f,J=S.f,K=L("symbols"),Q=L("op-symbols"),$=L("string-to-symbol-registry"),ee=L("symbol-to-string-registry"),a=L("wks"),L=i.QObject,te=!L||!L[G]||!L[G].findChild,ne=s&&h(function(){return 7!=_(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=q(j,t);r&&delete j[t],X(e,t,n),r&&e!==j&&X(j,t,r)}:X,re=function(e,t){var n=K[e]=_(W[G]);return V(n,{type:z,tag:e,description:t}),s||(n.description=t),n},ie=u?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof W},ae=function(e,t,n){return e===j&&ae(Q,t,n),p(e),t=g(t,!0),p(n),c(K,t)?(n.enumerable?(c(e,U)&&e[U][t]&&(e[U][t]=!1),n=_(n,{enumerable:y(0,!1)})):(c(e,U)||X(e,U,y(1,{})),e[U][t]=!0),ne(e,t,n)):X(e,t,n)},oe=function(t,e){p(t);var n=v(e),e=x(n).concat(le(n));return F(e,function(e){s&&!se.call(n,e)||ae(t,e,n[e])}),t},i=function(e,t){return void 0===t?_(e):oe(_(e),t)},se=function(e){var t=g(e,!0),e=J.call(this,t);return!(this===j&&c(K,t)&&!c(Q,t))&&(!(e||!c(this,t)||!c(K,t)||c(this,U)&&this[U][t])||e)},L=function(e,t){var n=v(e),e=g(t,!0);if(n!==j||!c(K,e)||c(Q,e))return t=q(n,e),!t||!c(K,e)||c(n,U)&&n[U][e]||(t.enumerable=!0),t},u=function(e){var e=Z(v(e)),t=[];return F(e,function(e){c(K,e)||c(N,e)||t.push(e)}),t},le=function(e){var t=e===j,e=Z(t?Q:v(e)),n=[];return F(e,function(e){!c(K,e)||t&&!c(j,e)||n.push(K[e])}),n};l||(W=function(){if(this instanceof W)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=k(e),n=function(e){this===j&&n.call(Q,e),c(this,U)&&c(this[U],t)&&(this[U][t]=!1),ne(this,t,y(1,e))};return s&&te&&ne(j,t,{configurable:!0,set:n}),re(t,e)},I(W[G],"toString",function(){return H(this).tag}),I(W,"withoutSetter",function(e){return re(k(e),e)}),S.f=se,E.f=ae,T.f=L,w.f=b.f=u,M.f=le,C.f=function(e){return re(P(e),e)},s&&(X(W[G],"description",{configurable:!0,get:function(){return H(this).description}}),o||I(j,"propertyIsEnumerable",se,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:W}),F(x(a),function(e){D(e)}),r({target:z,stat:!0,forced:!l},{for:function(e){var t=String(e);return c($,t)?$[t]:(e=W(t),$[t]=e,ee[e]=t,e)},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(c(ee,e))return ee[e]},useSetter:function(){te=!0},useSimple:function(){te=!1}}),r({target:"Object",stat:!0,forced:!l,sham:!s},{create:i,defineProperty:ae,defineProperties:oe,getOwnPropertyDescriptor:L}),r({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:u,getOwnPropertySymbols:le}),r({target:"Object",stat:!0,forced:h(function(){M.f(1)})},{getOwnPropertySymbols:function(e){return M.f(m(e))}}),Y&&(h=!l||h(function(){var e=W();return"[null]"!=Y([e])||"{}"!=Y({a:e})||"{}"!=Y(Object(e))}),r({target:"JSON",stat:!0,forced:h},{stringify:function(e,t,n){for(var r,i=[e],a=1;a<arguments.length;)i.push(arguments[a++]);if(r=t,(f(t)||void 0!==e)&&!ie(e))return d(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),i[1]=t,Y.apply(null,i)}})),W[G][R]||A(W[G],R,W[G].valueOf),O(W,z),N[U]=!0},function(e,t,n){var r=n(43),i=n(130).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(e){return o.slice()}};e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?s(e):i(r(e))}},function(e,t,n){var r=n(18),n=n(182),r=r.WeakMap;e.exports="function"==typeof r&&/native code/.test(n(r))},function(e,t,n){var n=n(127),r=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return r.call(e)}),e.exports=n.inspectSource},function(e,t,n){n=n(25),n("iterator")},function(e,t,n){"use strict";var r,i=n(16),a=n(107),o=n(39),s=n(37),l=n(24),u=n(75),h=l("iterator"),c=!1,n=function(){return this};[].keys&&(l=[].keys(),"next"in l?(l=a(a(l)),l!==Object.prototype&&(r=l)):c=!0),i=null==r||i(function(){var e={};return r[h].call(e)!==e}),i&&(r={}),u&&!i||s(r,h)||o(r,h,n),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:c}},function(e,t,n){n=n(16),e.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},function(e,t,n){e.exports=n(307)},function(e,t,n){n(310);var n=n(11),r=n.Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){e.exports=n(312)},function(e,t,n){e.exports=n(319)},function(e,t,n){var r=n(345),i=Array.prototype;e.exports=function(e){var t=e.slice;return e===i||e instanceof Array&&t===i.slice?r:t}},function(e,t,n){n(357),n=n(11),e.exports=n.Array.isArray},function(e,t,n){n=n(16),e.exports=!n(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(e,t,n){"use strict";var c=n(8),d=n(18),f=n(92),p=n(16),m=n(39),v=n(62),g=n(113),y=n(23),_=n(77),x=n(40).f,w=n(57).forEach,b=n(30),n=n(52),M=n.set,T=n.getterFor;e.exports=function(n,e,t){var a,o,r=-1!==n.indexOf("Map"),s=-1!==n.indexOf("Weak"),i=r?"set":"add",l=d[n],u=l&&l.prototype,h={};return b&&"function"==typeof l&&(s||u.forEach&&!p(function(){(new l).entries().next()}))?(a=e(function(e,t){M(g(e,a,n),{type:n,collection:new l}),null!=t&&v(t,e[i],{that:e,AS_ENTRIES:r})}),o=T(n),w(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(r){var i="add"==r||"set"==r;r in u&&(!s||"clear"!=r)&&m(a.prototype,r,function(e,t){var n=o(this).collection;return i||!s||y(e)?(t=n[r](0===e?0:e,t),i?this:t):"get"==r&&void 0})}),s||x(a.prototype,"size",{configurable:!0,get:function(){return o(this).collection.size}})):(a=t.getConstructor(e,n,r,i),f.REQUIRED=!0),_(a,n,!1,!0),h[n]=a,c({global:!0,forced:!0},h),s||t.setStrong(a,n,r),a}},function(e,t,n){var r=n(24),i=n(59),a=r("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[a]===e)}},function(e,t,n){var r=n(33);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},function(e,t,n){e.exports=n(390)},function(e,t,n){e.exports=n(394)},function(e,t,n){"use strict";var r=n(45),i=n(40),a=n(24),o=n(30),s=a("species");e.exports=function(e){var t=r(e),e=i.f;o&&t&&!t[s]&&e(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(8),i=n(18),a=n(105),o=[].slice,n=/MSIE .\./.test(a),a=function(i){return function(e,t){var n=2<arguments.length,r=n?o.call(arguments,2):void 0;return i(n?function(){("function"==typeof e?e:Function(e)).apply(this,r)}:e,t)}};r({global:!0,bind:!0,forced:n},{setTimeout:a(i.setTimeout),setInterval:a(i.setInterval)})},function(e,t,n){n(58),n(428),n=n(11),e.exports=n.Array.from},function(e,t,n){var n=n(24),i=n("iterator"),a=!1;try{var r=0,o={next:function(){return{done:!!r++}},return:function(){a=!0}};o[i]=function(){return this},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var n=!1;try{var r={};r[i]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}},function(e,t,n){e.exports=n(450)},function(e,t){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(470)},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),s=i(n(145)),n=function(){function e(){(0,a.default)(this,e),this.requestMethod="GET",this._requestHeader={},this.sendData=null}return(0,o.default)(e,[{key:"getFile",value:function(e,n,r,t,i){void 0!==this._path&&(e=this._path+e);var a,o=new s.default;for(a in o.open(this.requestMethod,e,!0),o.addEventListener("load",function(e){var t=this.response;200===this.status||0===this.status||201===this.status?(0===this.status&&console.warn("FMMap FileLoader: HTTP Status 0 received."),n(t)):r(t)},!1),o.addEventListener("progress",function(e){t&&t()},!1),o.addEventListener("error",function(e){r()},!1),o.addEventListener("abort",function(e){i&&i()},!1),void 0!==this._responseType&&(o.responseType=this._responseType),void 0!==this._withCredentials&&(o.withCredentials=this._withCredentials),o.overrideMimeType&&o.overrideMimeType(void 0!==this._mimeType?this._mimeType:"text/plain"),this._requestHeader)o.setRequestHeader(a,this._requestHeader[a]);o.send(this.sendData)}},{key:"setPath",value:function(e){return this._path=e,this}},{key:"setResponseType",value:function(e){return this._responseType=e,this}},{key:"setWithCredentials",value:function(e){return this._withCredentials=e,this}},{key:"setMimeType",value:function(e){return this._mimeType=e,this}},{key:"setRequestHeader",value:function(e){return e&&(this._requestHeader=e),this}}]),e}(),n=n;t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={NORTH:"n",n:0,SOUTH:"s",s:180,WEST:"w",w:-90,EAST:"e",e:90,NORTH_EAST:"ne",ne:45,NORTH_WEST:"nw",nw:-45,SOUTH_EAST:"se",se:135,SOUTH_WEST:"sw",sw:-135},t.default=n},function(e,u,t){!function(i){function a(e,t){for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;)e.unshift("..");return e}function n(e){"string"!=typeof e&&(e+="");for(var t=0,n=-1,r=!0,i=e.length-1;0<=i;--i)if(47===e.charCodeAt(i)){if(!r){t=i+1;break}}else-1===n&&(r=!1,n=i+1);return-1===n?"":e.slice(t,n)}function o(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}u.resolve=function(){for(var e="",t=!1,n=arguments.length-1;-1<=n&&!t;n--){var r=0<=n?arguments[n]:i.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");r&&(e=r+"/"+e,t="/"===r.charAt(0))}return e=a(o(e.split("/"),function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."},u.normalize=function(e){var t=u.isAbsolute(e),n="/"===r(e,-1);return e=a(o(e.split("/"),function(e){return!!e}),!t).join("/"),e||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},u.isAbsolute=function(e){return"/"===e.charAt(0)},u.join=function(){var e=Array.prototype.slice.call(arguments,0);return u.normalize(o(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},u.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;0<=n&&""===e[n];n--);return n<t?[]:e.slice(t,n-t+1)}e=u.resolve(e).substr(1),t=u.resolve(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),a=Math.min(r.length,i.length),o=a,s=0;s<a;s++)if(r[s]!==i[s]){o=s;break}for(var l=[],s=o;s<r.length;s++)l.push("..");return l=l.concat(i.slice(o)),l.join("/")},u.sep="/",u.delimiter=":",u.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,a=e.length-1;1<=a;--a)if(t=e.charCodeAt(a),47===t){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},u.basename=function(e,t){return e=n(e),t&&e.substr(-1*t.length)===t&&(e=e.substr(0,e.length-t.length)),e},u.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,a=0,o=e.length-1;0<=o;--o){var s=e.charCodeAt(o);if(47===s){if(i)continue;n=o+1;break}-1===r&&(i=!1,r=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1)}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)};var r="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}.call(this,t(65))},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a,o,p,m,v,g,y,_,x,w,b,s=i(n(29)),n=(a=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],o=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],p=0,m=0,v=[2,0,0,0],g=function(e,t){for(var n=0,r=0,i=0,r=0;r<8;r++)1&t&&(n^=e),i=128&e,e<<=1,i&&(e^=27),t>>=1;return n},y=function(e,t,n){for(var r=0;r<4;r++)e[0+r]^=t[16*n+4*r],e[4+r]^=t[16*n+4*r+1],e[8+r]^=t[16*n+4*r+2],e[12+r]^=t[16*n+4*r+3]},_=function(e){for(var t,n,r,i=1;i<4;i++)for(n=0;n<i;){for(r=e[4*i+4-1],t=3;0<t;t--)e[4*i+t]=e[4*i+t-1];e[4*i+0]=r,n++}},x=function(e){for(var t,n,r,i=0;i<4;i++)for(t=0;t<4;t++)n=(240&e[4*i+t])>>4,r=15&e[4*i+t],e[4*i+t]=o[16*n+r]},w=function(e){for(var t=0;t<4;t++)e[t]=a[16*((240&e[t])>>4)+(15&e[t])]},b=function(e){return(0,s.default)(e,16)},{decryption:function(e,t){for(var n=Array(16),r=0;r<16;r++)n[r]=16*b(t.substr(2*r,1))+b(t.substr(2*r+1,1));for(var i=Array(16),r=0;r<16;r++)i[r]=16*b(e.substr(2*r,1))+b(e.substr(2*r+1,1));var a=Array(16);switch(r=[],n.length){default:case 16:p=4,m=10;break;case 24:p=6,m=12;break;case 32:p=8,m=14}for(var o=r=Array(16*(m+1)),s=Array(4),l=4*(m+1),u=0;u<p;u++)o[4*u+0]=n[4*u+0],o[4*u+1]=n[4*u+1],o[4*u+2]=n[4*u+2],o[4*u+3]=n[4*u+3];for(u=p;u<l;u++){if(s[0]=o[4*(u-1)+0],s[1]=o[4*(u-1)+1],s[2]=o[4*(u-1)+2],s[3]=o[4*(u-1)+3],0==u%p){for(var n=s,h=void 0,c=void 0,h=n[0],c=0;c<3;c++)n[c]=n[c+1];if(n[3]=h,w(s),n=u/p,1==n)v[0]=1;else if(1<n)for(v[0]=2,n--;0<n-1;)v[0]=g(v[0],2),n--;n=s,h=v,c=s,c[0]=n[0]^h[0],c[1]=n[1]^h[1],c[2]=n[2]^h[2],c[3]=n[3]^h[3]}else 6<p&&4==u%p&&w(s);o[4*u+0]=o[4*(u-p)+0]^s[0],o[4*u+1]=o[4*(u-p)+1]^s[1],o[4*u+2]=o[4*(u-p)+2]^s[2],o[4*u+3]=o[4*(u-p)+3]^s[3]}for(o=Array(16),s=0;s<4;s++)for(u=0;u<4;u++)o[4*s+u]=i[s+4*u];for(y(o,r,m),i=m-1;1<=i;i--)for(_(o),x(o),y(o,r,i),s=o,u=[14,9,13,11],l=c=void 0,n=Array(4),h=Array(4),l=0;l<4;l++){for(c=0;c<4;c++)n[c]=s[4*c+l];var c=u,d=n,f=h;for(f[0]=g(c[0],d[0])^g(c[3],d[1])^g(c[2],d[2])^g(c[1],d[3]),f[1]=g(c[1],d[0])^g(c[0],d[1])^g(c[3],d[2])^g(c[2],d[3]),f[2]=g(c[2],d[0])^g(c[1],d[1])^g(c[0],d[2])^g(c[3],d[3]),f[3]=g(c[3],d[0])^g(c[2],d[1])^g(c[1],d[2])^g(c[0],d[3]),c=0;c<4;c++)s[4*c+l]=h[c]}for(_(o),x(o),y(o,r,0),s=0;s<4;s++)for(u=0;u<4;u++)a[s+4*u]=o[4*s+u];for(i="",r=0;r<16;++r)o=a[r].toString(16),o.length<2&&(o="0"+o),i+=o;return i}}),n=n;t.default=n},function(e,n,r){"use strict";var i=r(0),a=r(1);i(n,"__esModule",{value:!0}),n.default=void 0;var s=a(r(9)),l=a(r(27)),c=a(r(15)),o=a(r(2)),u=a(r(3)),h=h||{};h.GLEN1="MULTIPOLYGON(((".length,h.GLEN2="POINT(".length,h.GLEN3="MULTILINESTRING((".length,r=function(){function e(){(0,o.default)(this,e),this._points,this._holes}return(0,u.default)(e,[{key:"parse",value:function(e){if(this._points=[],this._holes=[],0==(0,s.default)(e).call(e,"MULTIPOLYGON((("))for(var t=e.substring(h.GLEN1,e.length-3).split(/\),\(/),n=0;n<t.length;n++){var r=t[n].split(/,/);if(0==n)for(var i=0;i<r.length;i++){var a=r[i].split(" ");this._points.push({x:(0,l.default)(a[0]),y:(0,l.default)(a[1])})}else{for(var o=[],i=0;i<r.length;i++)a=r[i].split(" "),o.push({x:(0,l.default)(a[0]),y:(0,l.default)(a[1])});this._holes.push(o)}}else if(0==(0,s.default)(e).call(e,"POINT("))a=e.substring(h.GLEN2,e.length-1).split(" "),this._points.push({x:(0,l.default)(a[0]),y:(0,l.default)(a[1])});else if(0==(0,s.default)(e).call(e,"MULTILINESTRING(("))for(r=e.substring(h.GLEN3,e.length-2).split(","),i=0;i<r.length;i++)a=r[i].split(" "),this._points.push({x:(0,l.default)(a[0]),y:(0,l.default)(a[1])});return this}},{key:"toFixed",value:function(e){return+e.toFixed(2)}},{key:"parsePnt",value:function(e){if(this._points=[],0==(0,s.default)(e).call(e,"MULTIPOLYGON((("))for(var t=e.substring(h.GLEN1,e.length-3).split(","),n=0;n<t.length;n++){var r=t[n].split(" ");this._points.push({x:(0,l.default)(r[0]),y:(0,l.default)(r[1])})}else if(0==(0,s.default)(e).call(e,"POINT("))r=e.substring(h.GLEN2,e.length-1).split(" "),this._points.push({x:(0,l.default)(r[0]),y:(0,l.default)(r[1])});else if(0==(0,s.default)(e).call(e,"MULTILINESTRING(("))for(t=e.substring(h.GLEN3,e.length-2).split(","),n=0;n<t.length;n++)r=t[n].split(" "),this._points.push({x:(0,l.default)(r[0]),y:(0,l.default)(r[1])});return this}},{key:"toPntStrip",value:function(e){var t=[],n=this._points.length;if(!0===e){if(1<=n)for(var r=0;r<n-1;r++){var i=this._points[r];t.push(i.x,i.y)}}else for(r=0;r<n;r++)i=this._points[r],t.push(i.x,i.y);return t}},{key:"mergePnts",value:function(e){for(var t=[],n=e.length,r=0;r<n;r++){for(var i=e[r],a={x:this.toFixed(i.x),y:this.toFixed(i.y)},o=t.length,s=!1,l=0;l<o;l++){var u=t[l];if(u.x==a.x&&u.y==a.y){s=!0;break}}s||t.push(a)}return t}},{key:"toStrip",value:function(e){var n,r=[],i=this._points.length;if(i<=0)return r;for(var i=(0,c.default)(n=this._points).call(n,i-1,1)[0],a=this.mergePnts(this._points),o=a.length,s=0;s<o;s++){var l=a[s];r.push(l.x,l.y)}return!0===e||(t={x:this.toFixed(i.x),y:this.toFixed(i.y)},r.push(t.x,t.y),this._points.push(i)),r}},{key:"hasHoles",value:function(){return null!=this._holes&&0<this._holes.length}},{key:"toStripHoles",value:function(e){for(var n=[],r=0;r<this._holes.length;r++){for(var i=this._holes[r],a=[],o=i.length,o=(0,c.default)(i).call(i,o-1,1)[0],s=this.mergePnts(i),l=s.length,u=0;u<l;u++){var h=s[u];a.push(h.x,h.y)}!0===e||(t={x:this.toFixed(o.x),y:this.toFixed(o.y)},a.push(t.x,t.y)),n.push(a)}return n}},{key:"holes",get:function(){return this._holes},set:function(e){this._holes=e}},{key:"points",get:function(){return this._points},set:function(e){this._points=e}}]),e}(),n.default=r},function(e,n,r){"use strict";var i=r(0),a=r(1);i(n,"__esModule",{value:!0}),n.default=void 0;var c=a(r(15)),o=a(r(2)),s=a(r(3)),r=function(){function e(){(0,o.default)(this,e),this._points,this._holes}return(0,s.default)(e,[{key:"parse",value:function(e,t){this._points=[],this._holes=[];for(var n=0,r=0;r<e.length;r++){var i=e[r].idxs,i=i||e[r];if("number"==typeof i)for(;n<i;)this._points.push({x:t[n],y:t[n+1]}),n+=2;else for(var a=0;a<i.length;a++)for(var o=i[a];n<o;)this._points.push({x:t[n],y:t[n+1]}),n+=2}return this}},{key:"parseGeometry",value:function(e,t){this._points=[],this._holes=[];for(var n=0,r=0;r<e.length;r++){var i=e[r].idxs,i=i||e[r];if("number"==typeof i)for(;n<i;)this._points.push({x:t[n],y:t[n+1]}),n+=2;else for(var a=0;a<i.length;a++)if(0===a)for(var o=i[a];n<o;)this._points.push({x:t[n],y:t[n+1]}),n+=2;else{for(var s=[],l=i[a];n<l;)s.push({x:t[n],y:t[n+1]}),n+=2;this._holes.push(s)}}return this}},{key:"mergePnts",value:function(e){for(var t=[],n=e.length,r=0;r<n;r++){for(var i=e[r],a={x:this.toFixed(i.x),y:this.toFixed(i.y)},o=t.length,s=!1,l=0;l<o;l++){var u=t[l];if(u.x==a.x&&u.y==a.y){s=!0;break}}s||t.push(a)}return t}},{key:"toStrip",value:function(e){var n,r=[],i=this._points.length;if(i<=0)return r;for(var i=(0,c.default)(n=this._points).call(n,i-1,1)[0],a=this._points,o=a.length,s=0;s<o;s++){var l=a[s];r.push(l.x,l.y)}return!0===e||(t={x:this.toFixed(i.x),y:this.toFixed(i.y)},r.push(t.x,t.y),this._points.push(i)),r}},{key:"toFixed",value:function(e){return+e.toFixed(2)}},{key:"hasHoles",value:function(){return null!=this._holes&&0<this._holes.length}},{key:"toStripHoles",value:function(e){for(var n=[],r=0;r<this._holes.length;r++){for(var i=this._holes[r],a=[],o=i.length,o=(0,c.default)(i).call(i,o-1,1)[0],s=this.mergePnts(i),l=s.length,u=0;u<l;u++){var h=s[u];a.push(h.x,h.y)}!0===e||(t={x:this.toFixed(o.x),y:this.toFixed(o.y)},a.push(t.x,t.y)),n.push(a)}return n}},{key:"holes",get:function(){return this._holes},set:function(e){this._holes=e}},{key:"points",get:function(){return this._points},set:function(e){this._points=e}}]),e}(),r=r;n.default=r},function(e,t,n){"use strict";var i=n(4),r=n(12),a=n(19),s=n(20),l=n(21),u=n(14),h=n(22),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d=c(n(10)),f=c(n(9)),p=c(n(15)),m=c(n(53)),v=c(n(34)),g=c(n(2)),y=c(n(3)),_=c(n(5)),x=c(n(6)),w=c(n(7)),o=c(n(17)),b=n(212),M=c(n(28)),T=c(n(47));function E(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=S(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function S(e,t){if(e){if("string"==typeof e)return A(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(n){var r=L();return function(){var e,t=(0,w.default)(n),t=r?(e=(0,w.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,x.default)(this,t)}}function L(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}o=function(e){(0,_.default)(i,e);var r=I(i);function i(e,t,n){return(0,g.default)(this,i),e=r.call(this,e),e._layers={},e.initLayers(),e.initLayersByData(t),e._visible=!0,e._groupMessage=n,e._locations=[],e._height=n.height,e._locationScene=new fm.Scene,e._locationScene.userData.type="location",e._locationScene.position.setY(e._height),e._locationScene.updateMatrix(),e._locationScene.updateWorldMatrix(),e._offsetHeight=0,e._lineScene=new fm.Scene,e._lineScene.userData.type="line",e.externalModels={},e.isGroup=!0,e.alwaysShowMarkers=[],e._groupAlias=n.alias,e._groupDesc=n.desc,e._groupName=n.gname,e._hideWithFree=!1,e.modelShadow={},e._group=new fm.Scene,e._mainLight=null,e.initScene(),e}return(0,y.default)(i,[{key:"initScene",value:function(){this._layers.extent[0]&&this._group.add(this._layers.extent[0]._scene),this._layers.model[0]&&this._group.add(this._layers.model[0]._scene)}},{key:"getHeight",value:function(){return this.height+this._offsetHeight}},{key:"getOrCreateLayer",value:function(e){if(this._layers[e][0])return this._layers[e][0];var t=b.AliasLayerMap.get(e),t=new t;return t.scene.position.setY(this._height),t.scene.updateMatrix(),t.scene.updateWorldMatrix(),t.parent=this,this._layers[e].push(t),(0,d.default)(this.parent.parent).setRenderList(),this._layers[e][0]}},{key:"getLayers",value:function(e){var t=[],e=this._layers[e];return t.push.apply(t,(0,v.default)(e)),t}},{key:"getDynmodel",value:function(e){for(var t=this._layers.dynmodel,n=0;n<t.length;n++){var r=t[n].scene;r&&e(r)}}},{key:"everyLayers",value:function(e,t){if(this._layers)for(var n in this._layers)if(!(-1<(0,f.default)(e).call(e,n)))for(var r=this._layers[n],i=0;i<r.length;i++){var a=r[i].scene;a&&t(a)}}},{key:"getNodeByLayerId",value:function(e,t){if(this._layers)return this._layers[e][0]?this._layers[e][0].getNodeById(t):void 0}},{key:"bcross",value:function(e,t){var n=e.renderNode.boundingBox.min,r=e.renderNode.boundingBox.max,e=t.renderNode.boundingBox.min,t=t.renderNode.boundingBox.max;return M.default.isRectCross(new vector2(n.x,n.z),new vector2(r.x,r.z),new vector2(e.x,e.z),new vector2(t.x,t.z))}},{key:"mergeModels",value:function(e){var t,n=this._layers.model[0],r=[];for(t in n._models)n._models[t].FID in e&&r.push(n._models[t]);var i,a=this.checkModelsNearly(r),o=E(a.l);try{for(o.s();!(i=o.n()).done;){var s=i.value;n.removeNode(s)}}catch(e){o.e(e)}finally{o.f()}}},{key:"mergeModel",value:function(e,t){var n=new ThreeBSP(e.renderNode.geometry),t=new ThreeBSP(t.renderNode.geometry),t=n.union(t.tree),t=t.toMesh(e.material);return e._renderNode=t}},{key:"couldMerge",value:function(e,t){return e=new ThreeBSP(e.renderNode.geometry),t=new ThreeBSP(t.renderNode.geometry),t=e.intersect(t.tree),0<t.tree.polygons.length}},{key:"checkModelsNearly",value:function(e){for(var t=[],n=0;n<e.length;n++){for(var r=0,i=0;i<e.length;i++)this.bcross(e[n],e[i])&&r++;r||t.push(n)}for(var a=t.length-1;-1<a;a--){var o=(0,f.default)(e).call(e,e[t[a]]);-1<o&&(0,p.default)(e).call(e,o,1)}for(var s=0,l=1,u=[],h=[];0<e.length;)if(this.couldMerge(e[s],e[l])){var c=this.mergeM(e[s],e[l]);h.push(e[l]),(0,p.default)(e).call(e,l,1),(0,p.default)(e).call(e,s,1),e.push(c),s=0,l=1}else{if(l!==e.length-1)return l++,{e:u,l:h};c=(0,p.default)(e).call(e,s,1),u.push(c),s=0,l=1}}},{key:"traverse",value:function(e){if(this._layers)for(var t in this._layers)for(var n=this._layers[t],r=0;r<n.length;r++)e(n[r])}},{key:"traverseByAlias",value:function(r,i,a){var o=this;if(this._layers){var e,t=function(t){if(-1<(0,f.default)(r).call(r,t))for(var e=o._layers[t],n=0;n<e.length;n++)a?i(e[n],t):e[n].traverse(function(e){i(e,t)})};for(e in this._layers)t(e)}}},{key:"setExtentImage",value:function(e){var t,n=this.parent.parent.materialManager.loadTexture(e,function(){}),e=this.getLayers("extent"),r=E(e);try{for(r.s();!(t=r.n()).done;){var i,a=t.value;for(i in a.extents){var o=a.extents[i];(0,d.default)(o.renderNode.material)&&(0,d.default)(o.renderNode.material).dispose(),o.renderNode.material.map=n,o.renderNode.material.needsUpdate=!0}}}catch(e){r.e(e)}finally{r.f()}}},{key:"clearExtentImage",value:function(){var e,t=this.getLayers("extent"),n=E(t);try{for(n.s();!(e=n.n()).done;){var r,i=e.value;for(r in i.extents){var a=i.extents[r];(0,d.default)(a.renderNode.material).dispose(),a.renderNode.material.map=null,a.renderNode.material.needsUpdate=!0}}}catch(e){n.e(e)}finally{n.f()}}},{key:"_getLayers",value:function(e){if(this._layers){var t,n={};for(t in this._layers){for(var r=this._layers[t],i=[],a=0;a<r.length;a++){e&&r[a].checkSceneNode();var o=r[a].scene;r[a].visible&&o&&i.push(o)}n[t]=i}return n}}},{key:"initLayers",value:function(){var e,t=E(b.LayerAlias);try{for(t.s();!(e=t.n()).done;){var n=e.value;this._layers[n]=[]}}catch(e){t.e(e)}finally{t.f()}}},{key:"initLayersByData",value:function(e){var t,n=e.geo[0],r=e.biz[0],e=(0,m.default)(n),i=E(e);try{for(i.s();!(t=i.n()).done;){var a,o,s=t.value;n[s]&&0<n[s].length&&b.Prop2Alias[s]&&(a=b.AliasLayerMap.get(b.Prop2Alias[s]),o=new a(n[s],r[s]),o.scene.position.setY(this._height),o.scene.updateMatrix(),o.scene.updateWorldMatrix(),o.parent=this,this._layers[b.Prop2Alias[s]].push(o))}}catch(e){i.e(e)}finally{i.f()}}},{key:"removeAlwaysShowMarker",value:function(e){var t=(0,f.default)(t=this.alwaysShowMarkers).call(t,e);-1<t&&(0,p.default)(e=this.alwaysShowMarkers).call(e,t,1)}},{key:"dispose",value:function(){for(var e in this.alwaysShowMarkers.length=0,this.layers){for(var t=this.layers[e],n=0;n<t.length;n++)t[n].dispose(),t[n].parent=void 0;t.length=0,this._layers[e]=void 0}for(var r=this._locationScene.children.length-1;-1<r;r--)this._locationScene.remove(this._locationScene.children[r]);var i,a=E(this._locations);try{for(a.s();!(i=a.n()).done;){var o=i.value;o.parent=void 0,o.dispose()}}catch(e){a.e(e)}finally{a.f()}this._groupMessage=void 0,this._layers=void 0}},{key:"addLayer",value:function(e){e.parent=this,e.scene.position.setY(this._height),e.scene.updateMatrix(),e.scene.updateWorldMatrix(),this._layers[e.alias].push(e),(0,d.default)(this.parent.parent).setRenderList(),(e.prepareInited||0<e.prepareInitObjects.length)&&e.initPrepare()}},{key:"removeLayer",value:function(e){e.removeAll&&e.removeAll(),e.parent=void 0;var t=(0,f.default)(t=this._layers[e.alias]).call(t,e);-1<t&&(0,p.default)(e=this._layers[e.alias]).call(e,t,1),(0,d.default)(this.parent.parent).setRenderList()}},{key:"getLayer",value:function(e){var t=this._layers[e];return 1<t.length?(e=[],e.push.apply(e,(0,v.default)(t)),e):t[0]}},{key:"getFirstLayer",value:function(e){var t=this._layers[layer.alias];return t[0]}},{key:"addLocation",value:function(e){e.parent=this,this._locations.push(e),this._locationScene.add(e.renderNode)}},{key:"removeLocation",value:function(e){var t,n=(0,f.default)(t=this._locations).call(t,e);e.isAlwaysShow&&this.removeAlwaysShowMarker(e),e.parent=void 0,-1<n&&(0,p.default)(t=this._locations).call(t,n,1),this._locationScene.remove(e.renderNode)}},{key:"getCenterPosition",value:function(){return new fm.Vector3(this.parent.center.x,this.parent.center.y+this._height,0)}},{key:"getModelMeshs",value:function(){var e,t=[],n=E(this._layers.model);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push.apply(t,(0,v.default)(r.getAllMesh()))}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"getExtentMeshs",value:function(){var e,t=[],n=E(this._layers.extent);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push.apply(t,(0,v.default)(r.getAllMesh()))}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"applyHeatMap",value:function(e){e&&(e.renderToMap(this._groupId),this.heatmap_=e)}},{key:"removeHeatMap",value:function(e){e.disposeHeatMap(this._groupId),this.heatmap_=null}},{key:"addLine",value:function(e){this._lineScene.add(e)}},{key:"removeLine",value:function(e){this._lineScene.remove(e)}},{key:"locationScene",get:function(){return this._locationScene}},{key:"lineScene",get:function(){return this._lineScene}},{key:"groupAlias",get:function(){return this._groupAlias}},{key:"groupDesc",get:function(){return this._groupDesc}},{key:"groupName",get:function(){return this._groupName}},{key:"groupHeight",get:function(){return this._groupHeight}},{key:"height",get:function(){return this._height},set:function(t){this._height=t,this.traverse(function(e){e.scene.position.setY(t),e.scene.updateMatrix(),e.scene.updateWorldMatrix()}),this._locationScene.position.setY(t),this._locationScene.updateMatrix(),this._locationScene.updateWorldMatrix()}},{key:"layers",get:function(){return this._layers}},{key:"visible",get:function(){return this._visible},set:function(e){this._hideWithFree&&(e||this.traverseByAlias(["extent","label","facility","model"],function(e){e.releaseGpuMemory()})),this._visible=e}},{key:"offsetHeight",get:function(){return this._offsetHeight},set:function(e){this._offsetHeight=e}},{key:"hideWithFree",set:function(e){this._hideWithFree=e}},{key:"mapCoord",get:function(){return(new fm.Vector2).copy(this.parent.mapcenter)}},{key:"mapCoordRange",get:function(){for(var e=[{x:Number.MAX_VALUE,y:Number.MAX_VALUE},{x:-Number.MAX_VALUE,y:-Number.MAX_VALUE}],t=this._layers.extent,n=0;n<t.length;n++){var r,i=t[n],a=i._extents;for(r in a)for(var o=a[r],s=o.gdata.geo,l=null,l=(null!==s?T.default.convertGeo2Geometry(s):T.default.convertArray2Geometry(o.gdata.idxs,o.gdata.pts)).vertices,u=0;u<l.length;u++)u%2==0?(l[u]<e[0].x&&(e[0].x=l[u]),l[u]>e[1].x&&(e[1].x=l[u])):(l[u]<e[0].y&&(e[0].y=l[u]),l[u]>e[1].y&&(e[1].y=l[u]))}return e}}]),i}(o.default),t.default=o},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.netArea=t.LayerOrder=t.Prop2Alias=t.AliasLayerMap=t.LayerAlias=void 0;var a=i(n(197)),o=i(n(213)),s=i(n(488)),l=i(n(489)),u=i(n(217)),h=i(n(219)),c=i(n(221)),d=i(n(223)),f=i(n(224)),p=i(n(494)),m=i(n(225)),v=i(n(496)),g=i(n(497)),y=i(n(227)),r=i(n(498)),i=i(n(499)),n=["extent","model","label","facility","line","locationMarker","text","textMarker","polygonMarker","gradientPolygonMarker","extrudeMarker","imageMarker","stair","externalModel","heatmap","dynmodel","symbol","domMarker","waterMarker","dynline"];t.LayerAlias=n,a=new a.default,t.AliasLayerMap=a,a.set("extent",o.default),a.set("externalModel",s.default),a.set("model",l.default),a.set("label",u.default),a.set("facility",h.default),a.set("imageMarker",c.default),a.set("polygonMarker",d.default),a.set("textMarker",f.default),a.set("stair",p.default),a.set("heatmap",m.default),a.set("symbol",v.default),a.set("domMarker",g.default),a.set("dynmodel",y.default),a.set("waterMarker",r.default),a.set("dynline",i.default),i={extentLayer:"extent",externalModelLayer:"externalModel",labelLayer:"label",modelLayer:"model",poiLayer:"facility",stairLayer:"stair"},t.Prop2Alias=i,i={extent:0,line:2,model:1,externalModel:.5,heatmap:3,polygonMarker:4,gradientPolygonMarker:4,extrudeMarker:4,location:4,facility:3.5,label:4,imageMarker:4,textMarker:4,domMarker:4,waterMarker:3,dynmodel:.5,dynline:2},t.LayerOrder=i,i="https://www.fengmap.com/",t.netArea=i},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(10)),s=a(n(2)),l=a(n(3)),u=a(n(5)),h=a(n(6)),c=a(n(7)),r=a(n(17)),d=a(n(487));function f(n){var r=p();return function(){var e,t=(0,c.default)(n),t=r?(e=(0,c.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,t)}}function p(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,u.default)(i,e);var r=f(i);function i(e,t){var n;return(0,s.default)(this,i),n=r.call(this,"extentLayer"),n._scene=new fm.Scene,n._scene.name="extent",n._scene.userData.type="extent",n._extents={},n.initNode(e,t),n._visible=!0,n.initLight(),n.putLight(),n}return(0,l.default)(i,[{key:"initLight",value:function(){this._ambientLight=new fm.AmbientLight(7631988),this._target=new fm.Object3D,this._mainLight=new fm.DirectionalLight(8947848,1.2),this._mainLight.position.set(-1,1,1).normalize(),this._mainLight.castShadow=!1,this._mainLight.target=this._target,this._secondLight=new fm.DirectionalLight(3355443),this._secondLight.position.set(-.5,1,-1).normalize(),this._secondLight.target=this._target}},{key:"initNode",value:function(e,t){for(var n=0;n<e.length;n++)this.createNode(e[n],t[n])}},{key:"createNode",value:function(e,t){t=new d.default(e,t),t.parent=this,this._extents[""+t.eid]=t}},{key:"addNodes",value:function(e){e.parent=this,e.renderNode&&this._scene.add(e.renderNode),this._extents[""+e.eid]=e}},{key:"putLight",value:function(){var e=this;this.scene.add(this._mainLight),this.scene.add(this._ambientLight),this.scene.add(this._secondLight),this.scene.add(this._target),this.scene.removeLight=function(){e.removeLight()}}},{key:"removeLight",value:function(){this.scene.remove(this._mainLight),this.scene.remove(this._ambientLight),this.scene.remove(this._secondLight)}},{key:"disposeLight",value:function(){this._mainLight=void 0,this._ambientLight=void 0,this._secondLight=void 0}},{key:"getNodeById",value:function(e){return this._extents[""+e]}},{key:"traverse",value:function(e){for(var t in this._extents)e&&e(this._extents[t])}},{key:"getVideoMemoryAmount",value:function(){var t=null;return this.traverse(function(e){e._renderNode&&e._renderNode.geometry&&e._renderNode.geometry._bufferGeometry&&(t+=e._renderNode.geometry._bufferGeometry.attributes.position.array.byteLength,t+=e._renderNode.geometry._bufferGeometry.attributes.color.array.byteLength,t+=e._renderNode.geometry._bufferGeometry.attributes.normal.array.byteLength,t+=e._renderNode.geometry._bufferGeometry.attributes.uv.array.byteLength)}),t}},{key:"checkSceneNode",value:function(){for(var e in this._scene.children.length=0,this._extents)this._extents[e].visible&&this._extents[e].renderNode&&this._scene.add(this._extents[e].renderNode);this.putLight()}},{key:"getAllMesh",value:function(){var e,t=[];for(e in this._extents)this._extents[e].renderNode&&t.push(this._extents[e].renderNode);return t}},{key:"dispose",value:function(){for(var e in this._extents)this._extents[e].dispose(),this._scene.remove(this._extents[e].renderNode),this._extents[e].parent=void 0,this._extents[e]=void 0;this.removeLight(),this.disposeLight(),this._scene.length=0,this._scene=void 0}},{key:"extents",get:function(){return this._extents},set:function(e){this._extents=e}},{key:"scene",get:function(){return this._scene}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.parent&&this.parent.parent&&this.parent.parent.parent&&(0,o.default)(this.parent.parent.parent).setRenderList()}},{key:"show",get:function(){return this.visible},set:function(e){this.visible=e}}]),i}(r.default),t.default=r},function(e,t,n){"use strict";var i=n(4),r=n(12),a=n(19),s=n(20),l=n(21),u=n(14),h=n(22),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d=c(n(14)),f=c(n(29)),p=c(n(10)),m=c(n(9)),v=c(n(2)),g=c(n(3)),y=c(n(5)),_=c(n(6)),x=c(n(7)),o=c(n(17)),w=c(n(36)),b=c(n(42));function M(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=T(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function T(e,t){if(e){if("string"==typeof e)return E(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(n){var r=A();return function(){var e,t=(0,x.default)(n),t=r?(e=(0,x.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,_.default)(this,t)}}function A(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}o=function(e){(0,y.default)(i,e);var r=S(i);function i(e,t){var n;return(0,v.default)(this,i),n=r.call(this,t.eid,w.default.EXTERANL_MODEL),n._parseData=null,n._isInitMesh=!0,n._visible=!0,n._renderNode=null,n._geometry=void 0,n._line=null,n._bdata=t,n._selected=!1,n._preColor=null,n._preOpacity=null,n.name=t.name,n.FID=t.fid,n.ID=t.eid,n.typeID=t.type,n.gdata=e,n}return(0,g.default)(i,[{key:"initMesh",value:function(e,t){this._geometry&&(this._renderNode=new fm.Mesh(this._geometry.geometry,e),this._renderNode.mapNode=this,this._renderNode.scale.set(-1,1,1),this._renderNode.rotation.set(Math.PI/2,0,0,"XYZ"),this._renderNode.position.copy(t),this._renderNode.parent=this.parent.scene,this._renderNode.visible=this.show)}},{key:"setByTheme",value:function(e){var t=this._renderNode.material,n=this._renderNode;if((0,d.default)(t)){var r,i=M(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.color=new fm.Color(b.default.toColor(e.color)),a.userData.opacity=t.opacity}}catch(e){i.e(e)}finally{i.f()}}else t.color=new fm.Color(b.default.toColor(e.color)),t.userData.opacity=t.opacity;var o=e.scale.split(","),s=e.rotate.split(",");e.translate.split(","),n.scale.set((0,f.default)(o[0]),(0,f.default)(o[1]),(0,f.default)(o[2])),n.rotation.set((0,f.default)(s[0])*fm.Math.DEG2RAD,(0,f.default)(s[2])*fm.Math.DEG2RAD,(0,f.default)(s[1])*fm.Math.DEG2RAD)}},{key:"checkByFrustum",value:function(e){var t=!0;this._renderNode&&("Mesh"===this._renderNode.type||"Scene"===this._renderNode.type&&this._renderNode.traverse(function(e){fm.Mesh}),this._renderNode.updateMatrixWorld(!0),this.visible=t)}},{key:"setColor",value:function(n,r){var i=this;this._renderNode.traverse(function(e){if(e instanceof fm.Mesh)if(void 0!==e.material.length)for(var t=0;t<e.material.length;t++)i._preColor=e.material[t].color,e.material[t].color=new fm.Color(b.default.toRgba(n)),i._preOpacity=e.material[t].opacity,"number"==typeof r&&(e.material[t].opacity=r),e.material[t].needsUpdate=!0;else i._preColor=e.material.color,e.material.color=new fm.Color(b.default.toRgba(n)),i._preOpacity=e.material.opacity,"number"==typeof r&&(e.material.opacity=r),e.material.needsUpdate=!0})}},{key:"setColorToDefault",value:function(){var n=this;this._renderNode.traverse(function(e){if(e instanceof fm.Mesh)if(void 0!==e.material.length)for(var t=0;t<e.material.length;t++)e.material[t].color=n._preColor,e.material[t].opacity=n._preOpacity,e.material[t].needsUpdate=!0;else e.material.color=n._preColor,e.material.opacity=n._preOpacity,e.material.needsUpdate=!0})}},{key:"gradientColor",value:function(){var e,t,n=this;this._renderNode&&(this._renderNode.material.userData.color=this._renderNode.material.color,t=this.findParent(NodeManager),e=(0,p.default)(t),t=e.modelSelectColor,animater=new Animater({r:t.r/2,g:t.g/2,b:t.b/2,a:t.a/2},t,500,function(){e.removeAnimater(animater),animater=void 0},function(e){n._renderNode.material.color=new fm.Color(e.r,e.g,e.b),n._renderNode.material.alpha=e.a,n._renderNode.material.update=!0}).start(),e.addAnimater(animater))}},{key:"clearGradient",value:function(){var e;this._renderNode&&(e=this.findParent(NodeManager),e=(0,p.default)(e),animater&&e.removeAnimater(animater),this._renderNode.material.color=this._renderNode.material.userData.color,this._renderNode.material.userData.color=void 0)}},{key:"dispose",value:function(){if(this._renderNode&&"Mesh"===this._renderNode.type){for(var e in this._renderNode.material.uniforms)e.value instanceof fm.Texture&&e.value.dispose();if((0,d.default)(this._renderNode.material)){var t,n=M(this._renderNode.material);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.dispose()}}catch(e){n.e(e)}finally{n.f()}}else this._renderNode.material.dispose();this._renderNode.geometry.dispose(),this._renderNode.material=void 0,this._renderNode.geometry=void 0,this._geometry=void 0,this._renderNode.mapNode=void 0,this._renderNode=void 0}}},{key:"visible",get:function(){return this._visible},set:function(e){var t;e?(0,m.default)(t=this.parent.scene.children).call(t,this._renderNode)<0&&this._renderNode&&this.parent.scene.add(this._renderNode):(this._renderNode&&this.parent.scene.remove(this._renderNode),this._renderNode.parent=this.parent.scene),this._visible=e}},{key:"renderNode",get:function(){return this._renderNode},set:function(e){this.parent&&(this._renderNode=e,this._renderNode.mapNode=this,(0,m.default)(e=this.parent.scene.children).call(e,this._renderNode)<0&&this._renderNode&&this.parent.scene.add(this._renderNode))}},{key:"bdata",get:function(){return this._bdata},set:function(e){this._bdata=e}}]),i}(o.default),t.default=o},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o,s,l=a(n(27)),u=a(n(13)),h=a(n(10)),c=a(n(216)),d=a(n(9)),f=a(n(2)),p=a(n(3)),m=a(n(5)),v=a(n(6)),g=a(n(7)),r=a(n(17)),y=a(n(36)),_=a(n(48)),x=a(n(78)),w=a(n(47)),b=a(n(28));function M(n){var r=T();return function(){var e,t=(0,g.default)(n),t=r?(e=(0,g.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,v.default)(this,t)}}function T(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,m.default)(i,e);var r=M(i);function i(e,t){var n;return(0,f.default)(this,i),n=r.call(this,t.eid,y.default.MODEL),n._parseData=null,n._isInitMesh=!0,n._visible=!0,n._renderNode=null,n._data=null,n._geometry,n._shape,n.currHeight=2,n._line=null,n._modelColor=null,n._modeAlpha=1,n._lineColor=null,n._lineAlpha=1,n._selected=!1,n._sgstat=!1,n._card={top:null,left:null,right:null,front:null,back:null},n.precolor={useModel:!1,useStroke:!1,mcolor:null,strokeColor:null,malpha:1,strokeAlpha:1},n.FID=t.fid,n.ID=t.eid,n.ename=t.ename,n.name=t.name,n.typeID=t.type,n.minlevel=t.minlevel,n.maxlevel=t.maxlevel,n.bdata=t,n.gdata=e,n.preSelect=!1,n}return(0,p.default)(i,[{key:"initMesh",value:function(e,t,n){this._geometry&&(this._renderNode=new fm.Mesh(this._geometry.geometry,e),this._renderNode.mapNode=this,this._modelColor=e.color,this._modelAlpha=e.opacity,this._renderNode.scale.set(1,-1,1),this._renderNode.rotation.set(Math.PI/2,0,0,"XYZ"),this._renderNode.position.copy(t),this._renderNode.frustumCulled=!1,this._renderNode.parent=this.parent.scene,this._renderNode.castShadow=!0,this._renderNode.name="oneModel",n&&(this._renderNode.name="isNeedSweeep",this._renderNode.material.uniforms={maxPos:{value:this.sweepMax},minPos:{value:this.sweepMin},relativeModelMatrix:{value:this._renderNode.matrixWorld}}),this.renderNodeInited=!0,this.precolor.useModel&&(this.precolor.mcolor&&(e.color=this.precolor.mcolor),"number"==typeof this.precolor.malpha&&(e.opacity=this.precolor.malpha)),this.preSelect&&(this.selected=!0,this.preSelect=!1))}},{key:"releaseGpuMemory",value:function(){this.renderNode&&(this._geometry=null,this._data=null,this.renderNodeInited=!1,this.renderNode.parent.remove(this.renderNode),this.dispose())}},{key:"restoreGpuMemeory",value:function(){}},{key:"getBbox",value:function(){}},{key:"getRadius1",value:function(){return this._renderNode.geometry.boundingSphere.radius}},{key:"getRadius",value:function(){for(var e=null,t={x:this._renderNode._x-this.parent.parent.parent.mapcenter.x,y:this._renderNode._y-this.parent.parent.parent.mapcenter.y},n=[],r=this._renderNode.geometry.vertices,i=0;i<r.length;i++){var a,o={};o.vertex=r[i],o.distance=Math.abs(Math.sqrt(Math.pow(r[i].x-t.x,2)+Math.pow(r[i].y-t.y,2))),n.length<2?n.push(o):2===n.length?n[0].distance>n[1].distance&&(a=null,a=n.shift(),n.push(a)):o.distance<n[1].distance&&(o.distance<n[0].distance?(a=null,n.pop(),a=n.shift(),n.push(o),n.push(a)):(n.pop(),n.push(o)))}var s={x:(n[0].vertex.x+n[1].vertex.x)/2,y:(n[0].vertex.y+n[1].vertex.y)/2},s=Math.abs(Math.sqrt(Math.pow(s.x-t.x,2)+Math.pow(s.y-t.y,2))),e=n[0].distance<s?n[0].distance:s;return e}},{key:"setByTheme",value:function(e){var t,n,r;this._renderNode&&(t=this.findParent(_.default),n=t.materialManager.createNormalMaterial(e),r=t.materialManager.createLineMaterial(e),this._lineColor=r.color,this._lineAlpha=r.opacity,this._modelColor=n.color,this._modeAlpha=n.opacity,this._renderNode.material.dispose(),this._renderNode.material=n,this._line&&(this._line.material=r),this._geometry=null,this._card.top&&this.removeStoreImage(),e.image&&e.sizes&&(n=e.sizes.split(","),r=[],e.coords&&(r=e.coords.split(",")),this.addStoreImage({image:e.image?t._map.MapOptions.themeServerURL+e.logoPath+"/"+e.image:"",angle:e.angle||0,size:[(0,l.default)(n[0]),(0,l.default)(n[1])],mapCoord:e.coords?new fm.Vector2((0,l.default)(r[0]),(0,l.default)(r[1])):void 0})))}},{key:"initLine",value:function(e,t){if(this._geometry){var n=(new fm.Geometry).setFromPoints(this._geometry.shape.getPoints());n&&0<n.vertices.length&&n.vertices.push(n.vertices[0]);for(var r=[],i=n.vertices.length,a=0;a<i;a++)0==a||a==i-1?r.push(n.vertices[a]):r.push(n.vertices[a],n.vertices[a]);n.vertices=r;var o=new fm.LineSegments(n,e);this._lineColor=e.color,this._lineAlpha=e.opacity,o.castShadow=!1,o.position.setZ(.005*-t),o.geometry.computeBoundingSphere(),this.precolor.useStroke&&(e.color=this.precolor.strokeColor,e.opacity=this.precolor.strokeAlpha),this._line=o,this._line.frustumCulled=!1,this._line.matrixAutoUpdate=!1,this._renderNode.add(o),this._shape=this._geometry.shape,this._geometry=null}}},{key:"setHeight",value:function(e){this.currHeight&&(this._renderNode.scale.z*=e/this.currHeight,this._renderNode.position.y+=e-this.currHeight),this.currHeight=e}},{key:"checkByFrustum",value:function(e){var t=!0;this._renderNode&&(this._renderNode.updateMatrixWorld(!0),t=e.intersectsObject(this._renderNode)),this.visible=t}},{key:"setColor",value:function(e,t){if(!this._renderNode)return this.precolor.mcolor=e&&new fm.Color(e),this.precolor.malpha=t,void(this.precolor.useModel=!0);e&&(this._renderNode.material.color=new fm.Color(e)),"number"==typeof t&&(this._renderNode.material.opacity=t,t!==this._renderNode.material.userData.opacity&&(this._renderNode.material.userData.opacity=t))}},{key:"setStrokeColor",value:function(e,t){if(!this._renderNode)return this.precolor.strokeColor=new fm.Color(e),this.precolor.strokeAlpha=t,void(this.precolor.useStroke=!0);this._line.material.color=new fm.Color(e),this._line.material.opacity=t}},{key:"setColorToDefault",value:function(){this._renderNode&&(this._renderNode.material.color=this._modelColor,this._renderNode.material.opacity=this._modeAlpha)}},{key:"setStrokeColorToDefault",value:function(){this._line.material.color=this._lineColor,this._line.material.opacity=this._lineAlpha}},{key:"addStoreImage",value:function(e){var t,n=this.findParent(_.default),r=this.parent.parent.parent,i=r.mapcenter,a=e.mapCoord||this.mapCoord;this._renderNode&&e.image&&(e=(0,u.default)({size:[5,5],height:.1,angle:0,offset:[0,0]},e),this._card.top&&this.removeStoreImage(),r=new fm.PlaneBufferGeometry(1,1,1,1),t=new fm.MeshLambertMaterial({transparent:!0,depthWrite:!1}),n.materialManager.loadTexture(e.image,function(e){e.anisotropy=4,e.minFilter=fm.LinearFilter,t.map=e,t.needsUpdate=!0}),r=new fm.Mesh(r,t),r.scale.set(e.size[0],e.size[1],-1),r.position.set(e.offset[0]+a.x-i.x,e.offset[1]+a.y-i.y,-e.height),r.rotation.z=-e.angle*fm.Math.DEG2RAD,r.renderOrder=10,this._renderNode.add(r),this._card.top=r)}},{key:"getUvTransForm",value:function(){var e=this.parent.parent.parent,e=(e.center,e.bbox);e.max.x,e.min.x,e.max.y,e.min.y,this.renderNode}},{key:"removeStoreImage",value:function(){this._card.top&&(this._renderNode.remove(this._card.top),this._card.top.geometry.dispose(),(0,h.default)(this._card.top.material)&&(0,h.default)(this._card.top.material).dispose(),this._card.top.material.dispose(),this._card.top=null)}},{key:"dispose",value:function(){this._renderNode&&(this._line&&(this._renderNode.remove(this._line),this._line.material.dispose(),this._line.geometry.dispose(),this._line=void 0),this.removeStoreImage(),this._renderNode.material.dispose(),this._renderNode.geometry.dispose(),this._renderNode.material=void 0,this._renderNode.geometry=void 0,this._geometry=void 0,this._data=void 0,this._renderNode.mapNode=void 0,this._renderNode=void 0)}},{key:"flash",value:function(){var e,t,n,r=this;this._renderNode&&(this._renderNode.material.userData.color=this._renderNode.material.color,t=this.findParent(_.default),e=(0,h.default)(t),t=e.modelSelectColor,n={r:t.r/2,g:t.g/2,b:t.b/2,a:t.a/2},o=function(e){var t=(Math.sin((new Date).getTime()/180)+1)/2;r._renderNode.material.color=new fm.Color(n.r*(1+t),n.g*(1+t),n.b*(1+t))},e.on("frameLoop",o))}},{key:"stopFlash",value:function(){var e;this._renderNode&&(e=this.findParent(_.default),e=(0,h.default)(e),e.off("frameLoop",o),this._renderNode.material.color=this._renderNode.material.userData.color)}},{key:"gradientColor",value:function(){var e,t,n=this;this._renderNode&&(this._renderNode.material.userData.color=this._renderNode.material.color,t=this.findParent(_.default),e=(0,h.default)(t),t=e.modelSelectColor,s=new x.default({r:t.r/2,g:t.g/2,b:t.b/2,a:t.a/2},t,500,function(){e.removeAnimater(s),s=void 0},function(e){n._renderNode.material.color=new fm.Color(e.r,e.g,e.b),n._renderNode.material.alpha=e.a,n._renderNode.material.update=!0}).start(),e.addAnimater(s))}},{key:"clearGradient",value:function(){var e;this._renderNode&&(e=this.findParent(_.default),e=(0,h.default)(e),s&&e.removeAnimater(s),this._renderNode.material.color=this._renderNode.material.userData.color,this._renderNode.material.userData.color=void 0)}},{key:"distanceToPoint",value:function(e){var t=this._shape.getPoints(),n=b.default.isInPolygon(e,t);if(n)return 0;for(var r=c.default,i=0;i<t.length-1;i++){var a=b.default.pointDistanceToLine(e,t[i],t[i+1],new fm.Vector2);a<r&&(r=a)}return r}},{key:"selected",get:function(){return this._selected},set:function(e){e!==this._selected&&(this._selected=e,this.renderNodeInited?e?this.gradientColor():this.clearGradient():this.preSelect=!0)}},{key:"visible",get:function(){return this._visible},set:function(e){var t;e?(0,d.default)(t=this.parent.scene.children).call(t,this._renderNode)<0&&this._renderNode&&this.parent.scene.add(this._renderNode):this._renderNode&&(this.parent.scene.remove(this._renderNode),this._renderNode.parent=this.parent.scene),this._visible=e}},{key:"renderNode",get:function(){return this._renderNode},set:function(e){this._renderNode=e}},{key:"mapCoord",get:function(){var e=(0,h.default)(this.parent.parent.parent.parent).dataManager.file_ver,t=this.parent.parent.layers.label[0].labels[""+this._eid];if(t){if(t.renderNodeInited)return{x:t.x,y:t.y,z:this.height};var n=null,n=1===e?w.default.convertGeo2Points(t.gdata.geo):w.default.convertArrayPoints(t.gdata.idxs,t.gdata.pts);return{x:n.vertices[0].x,y:n.vertices[0].y,z:this.height}}return{x:null,y:null,z:null}}},{key:"label",get:function(){return this.parent.parent.layers.label[0].labels[""+this._eid]}},{key:"height",get:function(){return this.renderNodeInited?this._height:this.gdata.height},set:function(e){this._height=e}},{key:"line",get:function(){return this._line}}]),i}(r.default),t.default=r},function(e,t,n){e.exports=n(490)},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(10)),s=a(n(2)),l=a(n(3)),u=a(n(5)),h=a(n(6)),c=a(n(7)),r=a(n(17)),d=a(n(218));function f(n){var r=p();return function(){var e,t=(0,c.default)(n),t=r?(e=(0,c.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,t)}}function p(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,u.default)(i,e);var r=f(i);function i(e,t){var n;return(0,s.default)(this,i),n=r.call(this),n._scene=new fm.Scene,n._scene.userData.type="label",n._scene.name="label",n.alias="label",n._labels={},n.initNode(e,t),n.needAvoid=!0,n._visible=!0,n}return(0,l.default)(i,[{key:"traverse",value:function(e){for(var t in this._labels)e&&e(this._labels[t])}},{key:"getVideoMemoryAmount",value:function(){var n=null;return this.traverse(function(e){var t;e._renderNode&&(n+=e._renderNode.geometry.attributes.position.array.byteLength,n+=e._renderNode.geometry.attributes.uv.array.byteLength,(0,o.default)(e._renderNode.material)&&(t=null,t=(0,o.default)(e._renderNode.material).image.width*(0,o.default)(e._renderNode.material).image.height*32/8,n+=t))}),n}},{key:"initNode",value:function(e,t){for(var n=0;n<e.length;n++)this.createNode(e[n],t[n])}},{key:"createNode",value:function(e,t){t=new d.default(e,t),t.parent=this,this._labels[""+t.eid]=t}},{key:"addNodes",value:function(e){e.parent=this,e.renderNode&&this._scene.add(e.renderNode),this._labels[""+e.eid]=e}},{key:"getNodeById",value:function(e){return this._labels[""+e]}},{key:"checkSceneNode",value:function(){for(var e in this._scene.children.length=0,this._labels)this._labels[e].visible&&this._labels[e].renderNode&&this._scene.add(this._labels[e].renderNode)}},{key:"dispose",value:function(){for(var e in this._labels)this._labels[e].dispose(),this._scene.remove(this._labels[e].renderNode),this._labels[e].parent=void 0,this._labels[e]=void 0;this._scene=void 0}},{key:"scene",get:function(){return this._scene}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.parent&&this.parent.parent&&this.parent.parent.parent&&(0,o.default)(this.parent.parent.parent).rushRenderNode()}},{key:"show",get:function(){return this.visible},set:function(e){this.visible=e}},{key:"labels",get:function(){return this._labels}}]),i}(r.default),t.default=r},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(10)),s=a(n(9)),l=a(n(2)),u=a(n(3)),h=a(n(5)),c=a(n(6)),d=a(n(7)),r=a(n(17)),f=a(n(36)),p=a(n(48)),m=a(n(115)),v=a(n(66)),g=a(n(47));function y(n){var r=_();return function(){var e,t=(0,d.default)(n),t=r?(e=(0,d.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,c.default)(this,t)}}function _(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,h.default)(i,e);var r=y(i);function i(e,t){var n;return(0,l.default)(this,i),n=r.call(this,t.eid,f.default.LABEL),n._isInitSprite=!0,n._visible=!0,n._renderNode=null,n._geometry=void 0,n._size=20,n._theme=void 0,n.bdata=t,n.ename=t.ename,n._text=t.name,n.gdata=e,n.FID=t.fid,n.ID=t.eid,n.name=t.name,n.typeID=t.type,n.minlevel=t.minlevel,n.maxlevel=t.maxlevel,n}return(0,u.default)(i,[{key:"checkByFrustum",value:function(e){var t=!0;this._renderNode&&(this._renderNode.updateMatrixWorld(!0),t=e.intersectsSprite(this._renderNode)),this.visible=t}},{key:"initSprite",value:function(e,t){e&&(this._renderNode=new m.default(e),this._renderNode.position.copy(t),this._renderNode.mapNode=this,this._renderNode.frustumCulled=!0,this.renderNodeInited=!0,this._renderNode.parent=this.parent.scene,this._renderNode.visible=this.show,this._renderNode.name="spirit")}},{key:"setText",value:function(e){var t;this._renderNode&&this._theme&&(t=this.findParent(p.default),(0,o.default)(this._renderNode.material)&&(0,o.default)(this._renderNode.material).dispose(),this._renderNode.material&&this._renderNode.material.dispose(),this._renderNode.material=t.materialManager.createLabelMaterial(e,this._theme),this._text=e,this.setSize())}},{key:"releaseGpuMemory",value:function(){this.renderNode&&(this.renderNodeInited=!1,this._isInitSprite=!1,this.tryInit=!1,this.renderNode.parent.remove(this.renderNode),this.dispose())}},{key:"setByLanguage",value:function(e){var t,n=e===v.default.EN?this.bdata.ename:this.bdata.name;if(!n)return this.visible=!1,void this.dispose();this._renderNode?this.setText(n):this.tryInit&&!this.renderNodeInited&&(t=this.findParent(p.default),e=this.parent.parent.parent.theme.getLabelTheme(this.bdata),this._theme=e,e=t.materialManager.createLabelMaterial(n,e),this.initSprite(e,this.pos),this.setSize()),this.visible=!0}},{key:"setByTheme",value:function(e){var t;this._text&&(t=this.findParent(p.default),this._theme=e,this.size=1.4*e.fontsize,(0,o.default)(this._renderNode.material)&&(0,o.default)(this._renderNode.material).dispose(),this._renderNode.material&&this._renderNode.material.dispose(),this._renderNode&&(this._renderNode.material=t.materialManager.createLabelMaterial(this._text,this._theme,!1,this)),this.setSize())}},{key:"setSize",value:function(){var e=this.findParent(p.default);(0,o.default)(e).renderer.setLabelSize(this._renderNode,this.size)}},{key:"dispose",value:function(){this._renderNode&&(this._renderNode.material.dispose(),this._renderNode.geometry.dispose(),this._renderNode.material=void 0,this._renderNode.geometry=void 0,this.geometry=void 0,this._renderNode.mapNode=void 0,this._renderNode=void 0,this.renderNodeInited=!1)}},{key:"mapCoord",get:function(){var e=(0,o.default)(this.parent.parent.parent.parent).dataManager.file_ver,t=this;if(t){if(t.renderNodeInited)return{x:t.x,y:t.y,z:this.height};var n=null,n=1===e?g.default.convertGeo2Points(t.gdata.geo):g.default.convertArrayPoints(t.gdata.idxs,t.gdata.pts);return{x:n.vertices[0].x,y:n.vertices[0].y,z:this.height}}return{x:null,y:null,z:null}}},{key:"model",get:function(){return this.parent.parent.layers.model[0].models[""+this._eid]}},{key:"visible",get:function(){return this._visible},set:function(e){var t;this._renderNode&&(e?(0,s.default)(t=this.parent.scene.children).call(t,this._renderNode)<0&&this._renderNode&&this.parent.scene.add(this._renderNode):(this.parent.scene.remove(this._renderNode),this._renderNode.parent=this.parent.scene)),this._visible=e}},{key:"renderNode",get:function(){return this._renderNode},set:function(e){this._renderNode=e}},{key:"size",get:function(){return this._size},set:function(e){this._size=e,e=this.findParent(p.default),(0,o.default)(e).wxInfo.pixelRatio&&(this._size*=(0,o.default)(e).wxInfo.pixelRatio)}},{key:"theme",set:function(e){this._theme=e}}]),i}(r.default),t.default=r},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(10)),s=a(n(2)),l=a(n(3)),u=a(n(5)),h=a(n(6)),c=a(n(7)),r=a(n(17)),d=a(n(220));function f(n){var r=p();return function(){var e,t=(0,c.default)(n),t=r?(e=(0,c.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,t)}}function p(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,u.default)(i,e);var r=f(i);function i(e,t){var n;return(0,s.default)(this,i),n=r.call(this),n._scene=new fm.Scene,n._scene.userData.type="facility",n.alias="facility",n._facility={},n.needAvoid=!0,n.initNode(e,t),n._visible=!0,n}return(0,l.default)(i,[{key:"initNode",value:function(e,t){if(e)for(var n=0;n<e.length;n++)this.createNode(e[n],t[n])}},{key:"createNode",value:function(e,t){t=new d.default(e,t),t.parent=this,this._facility[""+t.eid]=t}},{key:"addNodes",value:function(e){e.parent=this,e.renderNode&&this._scene.add(e.renderNode),this._facility[""+e.eid]=e}},{key:"traverse",value:function(e){for(var t in this._facility)e&&e(this._facility[t])}},{key:"getNodeById",value:function(e){return this._facility[""+e]}},{key:"getVideoMemoryAmount",value:function(){var n=null;return this.traverse(function(e){var t;e._renderNode&&(n+=e._renderNode.geometry.attributes.position.array.byteLength,n+=e._renderNode.geometry.attributes.uv.array.byteLength,(0,o.default)(e._renderNode.material)&&(t=null,t=(0,o.default)(e._renderNode.material).image.width*(0,o.default)(e._renderNode.material).image.height*32/8,n+=t))}),n}},{key:"checkSceneNode",value:function(){for(var e in this._scene.children.length=0,this._facility)this._facility[e].visible&&this._facility[e].renderNode&&this._scene.add(this._facility[e].renderNode)}},{key:"dispose",value:function(){for(var e in this._facility)this._facility[e].dispose(),this._scene.remove(this._facility[e].renderNode),this._facility[e].parent=void 0,this._facility[e]=void 0;this._scene=void 0}},{key:"scene",get:function(){return this._scene}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.parent&&this.parent.parent&&this.parent.parent.parent&&(0,o.default)(this.parent.parent.parent).setRenderList()}},{key:"show",get:function(){return this.visible},set:function(e){this.visible=e}}]),i}(r.default),t.default=r},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var s=a(n(13)),l=a(n(10)),o=a(n(9)),u=a(n(27)),h=a(n(2)),c=a(n(3)),d=a(n(5)),f=a(n(6)),p=a(n(7)),r=a(n(17)),m=a(n(36)),v=a(n(48)),g=a(n(115)),y=a(n(47));function _(n){var r=x();return function(){var e,t=(0,p.default)(n),t=r?(e=(0,p.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,f.default)(this,t)}}function x(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,d.default)(i,e);var r=_(i);function i(e,t){var n;return(0,h.default)(this,i),n=r.call(this,t.eid,m.default.FACILITY),n._isInitSprite=!0,n._visible=!0,n._renderNode=null,n._geometry=void 0,n._size=20,n.bdata=t,n.gdata=e,n.FID=t.fid,n.ID=t.eid,n.ename=t.ename,n.name=t.name,n.typeID=t.type,n.minlevel=t.minlevel,n.maxlevel=t.maxlevel,n}return(0,c.default)(i,[{key:"checkByFrustum",value:function(e){var t=!0;this._renderNode&&(this._renderNode.updateMatrixWorld(!0),t=e.intersectsObject(this._renderNode)),this.visible=t}},{key:"jump",value:function(e){var n,r,i,a,o=this;this._renderNode&&!this._isJumping&&(this._isJumping=!0,n=(0,s.default)({height:8,times:0,duration:1,delay:0},e),"number"==typeof n.height&&"number"==typeof n.times&&"number"==typeof n.duration&&"number"==typeof n.delay&&(n.duration*=1e3,n.delay*=1e3,n.all=n.duration+n.delay,n.halfDuration=n.duration/2,r=n.height-this._height,this._origonY=this._renderNode.position.y,i=(new Date).getTime(),e=this.findParent(v.default),a=(0,l.default)(e),this.jumpEvent=function(e){var t;o._renderNode?(t=(new Date).getTime()-i,0!=n.times&&t/n.all>n.times?o.stopJump():(t%=n.all,t>n.duration?o._renderNode.position.y!=o._origonY&&(o._renderNode.position.y=o._origonY):(t=t/n.halfDuration-1,t=1-t*t,o._renderNode.position.y=o._origonY+r*t))):a.off("frameLoop",o.jumpEvent)},a.on("frameLoop",this.jumpEvent)))}},{key:"stopJump",value:function(){var e;this._renderNode&&this.jumpEvent&&(this._renderNode.position.y=this._origonY,this._isJumping=!1,e=this.findParent(v.default),e=(0,l.default)(e),e.off("frameLoop",this.jumpEvent))}},{key:"boost",value:function(e){var n,r,i,a=this;this._renderNode&&!this._isBoosting&&(this._isBoosting=!0,n=(0,s.default)({size:8,ratio:0,duration:1,delay:0},e),"number"==typeof n.size&&"number"==typeof n.ratio&&"number"==typeof n.duration&&"number"==typeof n.delay&&(n.duration*=1e3,n.delay*=1e3,n.all=n.duration+n.delay,n.halfDuration=n.duration/2,r=n.size-this._size,this._origonSize=this._size,e=this.findParent(v.default),i=(0,l.default)(e),this.boostEvent=function(e){var t;a._renderNode?(t=(new Date).getTime(),t=Math.sin(t*n.ratio)/2+.5,a._size=a._origonSize+t*r,a.setSize()):i.off("frameLoop",a.boostEvent)},i.on("frameLoop",this.boostEvent)))}},{key:"stopBoost",value:function(){var e;this._renderNode&&this.boostEvent&&(this._size=this._origonSize,this._isBoosting=!1,e=this.findParent(v.default),e=(0,l.default)(e),e.off("frameLoop",this.boostEvent),this.setSize())}},{key:"initSprite",value:function(e,t){this._renderNode=new g.default(e),this._renderNode.mapNode=this,this._renderNode.frustumCulled=!1,this._renderNode.position.copy(t),this._renderNode.parent=this.parent.scene,this.renderNodeInited=!0,this._renderNode.visible=this.show,this._renderNode.name="spirit"}},{key:"releaseGpuMemory",value:function(){this.renderNode&&(this.renderNodeInited=!1,this.renderNode.parent.remove(this.renderNode),this.dispose())}},{key:"setByTheme",value:function(e){var t;this._renderNode&&(t=this.findParent(v.default),e=t.materialManager.createPoiMaterial(e),this._renderNode.material.dispose(),this._renderNode.material=e)}},{key:"setSize",value:function(){var e=this.findParent(v.default);e&&(0,l.default)(e).renderer.setFacilitySize(this._renderNode,this._size)}},{key:"dispose",value:function(){this._renderNode&&(this._renderNode.material.dispose(),this._renderNode.geometry.dispose(),this._renderNode.material=void 0,this._renderNode.geometry=void 0,this.geometry=void 0,this._renderNode.mapNode=void 0,this._renderNode=void 0)}},{key:"visible",get:function(){return this._visible},set:function(e){var t;e?(0,o.default)(t=this.parent.scene.children).call(t,this._renderNode)<0&&(this._renderNode&&this.parent.scene.add(this._renderNode),this.setSize()):(this._renderNode&&this.parent.scene.remove(this._renderNode),this._renderNode&&(this._renderNode.parent=this.parent.scene)),this._visible=e,this._visible=e}},{key:"renderNode",get:function(){return this._renderNode},set:function(e){this._renderNode=e}},{key:"size",get:function(){return this._size},set:function(e){this._size=(0,u.default)(e)}},{key:"mapCoord",get:function(){var e=(0,l.default)(this.parent.parent.parent.parent).dataManager.file_ver,t=this;if(t){if(t.renderNodeInited)return{x:t.x,y:t.y,z:this.height};var n=null,n=1===e?y.default.convertGeo2Points(t.gdata.geo):y.default.convertArrayPoints(t.gdata.idxs,t.gdata.pts);return{x:n.vertices[0].x,y:n.vertices[0].y,z:this.height}}return{x:null,y:null,z:null}}}]),i}(r.default),t.default=r},function(e,t,n){"use strict";var i=n(4),r=n(12),a=n(19),s=n(20),l=n(21),u=n(14),h=n(22),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d=c(n(9)),f=c(n(15)),p=c(n(34)),m=c(n(2)),v=c(n(3)),g=c(n(5)),y=c(n(6)),_=c(n(7)),n=c(n(222));function x(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=w(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return b(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(n){var r=T();return function(){var e,t=(0,_.default)(n),t=r?(e=(0,_.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,y.default)(this,t)}}function T(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,g.default)(n,e);var t=M(n);function n(){var e;return(0,m.default)(this,n),e=t.call(this),e._scene.userData.type="imageMarker",e.alias="imageMarker",e}return(0,v.default)(n,[{key:"removeAll",value:function(){var e,t=x(this._markers);try{for(t.s();!(e=t.n()).done;){var n=e.value;this.removeNode(n,!0)}}catch(e){t.e(e)}finally{t.f()}this._markers.length=0}},{key:"untiedMarker",value:function(e){e.parent=void 0,this._scene.remove(e.renderNode)}},{key:"removeNode",value:function(e,t){e.parent=void 0,this._scene.remove(e.renderNode),e.isAlwaysShow&&(this.parent.removeAlwaysShowMarker(e.renderNode),e.show=!1),e.dispose(),t||(t=(0,d.default)(t=this._markers).call(t,e),-1<t&&(0,f.default)(e=this._markers).call(e,t,1))}},{key:"removeMarker",value:function(e){this.removeNode(e)}},{key:"markers",get:function(){var e=[];return e.push.apply(e,(0,p.default)(this._markers)),e}}]),n}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(12),a=n(19),s=n(20),l=n(21),u=n(14),h=n(22),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d=c(n(9)),f=c(n(15)),p=c(n(2)),m=c(n(3)),v=c(n(5)),g=c(n(6)),y=c(n(7)),n=c(n(493));function _(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=x(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function x(e,t){if(e){if("string"==typeof e)return w(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(n){var r=M();return function(){var e,t=(0,y.default)(n),t=r?(e=(0,y.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,g.default)(this,t)}}function M(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,v.default)(n,e);var t=b(n);function n(){var e;return(0,p.default)(this,n),e=t.call(this),e._markers=[],e.prepareInitMarkers=[],e}return(0,m.default)(n,[{key:"addMarker",value:function(e){e.parent=this,e.isInit||e.init()?this.pushMarker(e):this.prepareInitMarkers.push(e)}},{key:"traverse",value:function(e){var t,n=_(this._markers);try{for(n.s();!(t=n.n()).done;){var r=t.value;e&&e(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"initPrepare",value:function(){var e,t=_(this.prepareInitMarkers);try{for(t.s();!(e=t.n()).done;){var n,r,i,a=e.value;a.init()&&(r=(0,d.default)(n=this.prepareInitMarkers).call(n,a),-1<r&&(0,f.default)(i=this.prepareInitMarkers).call(i,r,1),this.pushMarker(a))}}catch(e){t.e(e)}finally{t.f()}}},{key:"pushMarker",value:function(e){this._markers.push(e),e.renderNode&&this._scene.add(e.renderNode)}},{key:"removeAll",value:function(){var e,t=_(this._markers);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.parent=void 0,this._scene.remove(n.renderNode),n.dispose()}}catch(e){t.e(e)}finally{t.f()}this._markers.length=0}},{key:"removeNode",value:function(e){this.removeMarker(e)}},{key:"removeMarker",value:function(e){e.parent=void 0,this._scene.remove(e.renderNode),e.dispose();var t=(0,d.default)(t=this._markers).call(t,e);-1<t&&(0,f.default)(e=this._markers).call(e,t,1)}},{key:"checkSceneNode",value:function(){this._scene.children.length=0;var e,t=_(this._markers);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.visible&&n.renderNode&&this._scene.add(n.renderNode)}}catch(e){t.e(e)}finally{t.f()}}},{key:"markers",get:function(){return this._markers}},{key:"dispose",value:function(){var e,t=_(this._markers);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.dispose(),this._scene.remove(n.renderNode),n.parent=void 0}}catch(e){t.e(e)}finally{t.f()}this._markers.length=0,this._scene=void 0}}]),n}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(12),a=n(19),s=n(20),l=n(21),u=n(14),h=n(22),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d=c(n(9)),f=c(n(15)),p=c(n(10)),m=c(n(2)),v=c(n(3)),g=c(n(5)),y=c(n(6)),_=c(n(7)),n=c(n(17));function x(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=w(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return b(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(n){var r=T();return function(){var e,t=(0,_.default)(n),t=r?(e=(0,_.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,y.default)(this,t)}}function T(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,g.default)(n,e);var t=M(n);function n(){var e;return(0,m.default)(this,n),e=t.call(this),e._scene=new fm.Scene,e._scene.userData.type="polygonMarker",e.alias="polygonMarker",e.polygonMarkers=[],e._visible=!0,e.prepareInitObjects=[],e}return(0,v.default)(n,[{key:"addMarker",value:function(e){e.parent=this,e.isInit||e.init()?this.pushPolygonMarker(e):this.prepareInitObjects.push(e)}},{key:"traverse",value:function(e){var t,n=x(this.polygonMarkers);try{for(n.s();!(t=n.n()).done;){var r=t.value;e&&e(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"initPrepare",value:function(){var e,t=x(this.prepareInitObjects);try{for(t.s();!(e=t.n()).done;){var n,r,i,a=e.value;a.init()&&(r=(0,d.default)(n=this.prepareInitObjects).call(n,a),-1<r&&(0,f.default)(i=this.prepareInitObjects).call(i,r,1),this.pushPolygonMarker(a))}}catch(e){t.e(e)}finally{t.f()}}},{key:"pushPolygonMarker",value:function(e){this.polygonMarkers.push(e),e.renderNode&&this._scene.add(e.renderNode)}},{key:"removeAll",value:function(){var e,t=x(this.polygonMarkers);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.parent=void 0,this._scene.remove(n.renderNode),n.dispose()}}catch(e){t.e(e)}finally{t.f()}this.polygonMarkers.length=0}},{key:"removeNode",value:function(e){e.parent=void 0,this._scene.remove(e.renderNode),e.dispose();var t=(0,d.default)(t=this.polygonMarkers).call(t,e);-1<t&&(0,f.default)(e=this.polygonMarkers).call(e,t,1)}},{key:"removeMarker",value:function(e){this.removeNode(e)}},{key:"checkSceneNode",value:function(){this._scene.children.length=0;var e,t=x(this.polygonMarkers);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.visible&&n.renderNode&&this._scene.add(n.renderNode)}}catch(e){t.e(e)}finally{t.f()}}},{key:"markers",get:function(){return this.polygonMarkers}},{key:"dispose",value:function(){var e,t=x(this.polygonMarkers);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.dispose(),this._scene.remove(n.renderNode),n.parent=void 0}}catch(e){t.e(e)}finally{t.f()}this.polygonMarkers.length=0,this._scene=void 0}},{key:"scene",get:function(){return this._scene}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.parent&&this.parent.parent&&this.parent.parent.parent&&(0,p.default)(this.parent.parent.parent).setRenderList()}},{key:"show",get:function(){return this.visible},set:function(e){this.visible=e}}]),n}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(12),a=n(19),s=n(20),l=n(21),u=n(14),h=n(22),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d=c(n(9)),f=c(n(15)),p=c(n(10)),m=c(n(2)),v=c(n(3)),g=c(n(5)),y=c(n(6)),_=c(n(7)),n=c(n(222));function x(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=w(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return b(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(n){var r=T();return function(){var e,t=(0,_.default)(n),t=r?(e=(0,_.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,y.default)(this,t)}}function T(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,g.default)(n,e);var t=M(n);function n(){var e;return(0,m.default)(this,n),e=t.call(this),e._scene.userData.type="textMarker",e._scene.name="textMarker",e.alias="textMarker",e._visible=!0,e}return(0,v.default)(n,[{key:"removeAll",value:function(){var e,t=x(this._markers);try{for(t.s();!(e=t.n()).done;){var n=e.value;this.removeNode(n,!0)}}catch(e){t.e(e)}finally{t.f()}this._markers.length=0}},{key:"untiedMarker",value:function(e){e.parent=void 0,this._scene.remove(e.renderNode)}},{key:"removeNode",value:function(e,t){e.parent=void 0,this._scene.remove(e.renderNode),e.isAlwaysShow&&(this.parent.removeAlwaysShowMarker(e.renderNode),e.show=!1),e.dispose(),t||(t=(0,d.default)(t=this._markers).call(t,e),-1<t&&(0,f.default)(e=this._markers).call(e,t,1))}},{key:"removeMarker",value:function(e){this.removeNode(e)}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.parent&&this.parent.parent&&this.parent.parent.parent&&(0,p.default)(this.parent.parent.parent).setRenderList()}}]),n}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(12),a=n(19),s=n(20),l=n(21),u=n(14),h=n(22),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d=c(n(10)),f=c(n(2)),p=c(n(3)),m=c(n(5)),v=c(n(6)),g=c(n(7)),o=c(n(17)),y=c(n(48)),_=c(n(495));function x(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=w(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return b(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(n){var r=T();return function(){var e,t=(0,g.default)(n),t=r?(e=(0,g.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,v.default)(this,t)}}function T(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}o=function(e){(0,m.default)(r,e);var n=M(r);function r(e){var t;return(0,f.default)(this,r),t=n.call(this),t._scene=new fm.Scene,t._scene.userData.type="heatmap",t.alias="heatmap",t._prepareInited=!1,t._randomInited=!0,t._randomNum=0,t._gradient=null==e.gradient?{.45:"rgb(0,0,255)",.55:"rgb(0,255,255)",.65:"rgb(0,255,0)",.95:"yellow",1:"rgb(255,0,0)"}:e.gradient,t._points=null,t._opacity="number"==typeof e.opacity?e.opacity:.5,t._prepareInitObjects=[],t._visible=!0,t}return(0,p.default)(r,[{key:"init",value:function(){var e=this.findParent(y.default);if(e&&this._points){var t=this.parent.parent,n=this.parent.getHeight(),r=t.center,e=e.materialManager,e=e.getHeatMapGradient(this._gradient),i=new _.default({},{},e);i.material.opacity=this._opacity;var a,o=x(this._points);try{for(o.s();!(a=o.n()).done;){var s=a.value,l=i.clone();l.position.set(s.x,r.y+3+n,s.y-r.y),l.mapNode=this,this._scene.add(l)}}catch(e){o.e(e)}finally{o.f()}this._prepareInited=!1}else this._prepareInited=!0}},{key:"initPrepare",value:function(){this._randomInited||(this.randomPoints(this._randomNum,!0),this._randomInited=!0,this._randomNum=0),this._points,this.init()}},{key:"removeAll",value:function(){var e=this._scene;if(e){for(var t=e.children.length-1;-1<t;t--){var n=e.children[t];e.remove(n),n.mapNode=void 0,n.geometry.dispose(),n.material.dispose(),(0,d.default)(n.material).dispose()}e.children.length=0}this._points.length=0}},{key:"clearPoints",value:function(){this.removeAll()}},{key:"addPoints",value:function(e){this._points=e,this.init()}},{key:"randomPoints",value:function(e,t){var n=this.findParent(y.default);if(!n)return this._prepareInited=!0,this._randomInited=!1,void(this._randomNum=e);for(var n=this.parent.parent,r=n.bbox,i=r.max.x-r.min.x,a=r.max.y-r.min.y,o=[],s=0;s<e;s++)o.push({x:Math.random()*i+r.min.x,y:Math.random()*a+r.min.y});this._points=o,t||this.init()}},{key:"dispose",value:function(){this.removeAll(),this._scene=void 0,this._gradient=void 0}},{key:"scene",get:function(){return this._scene}},{key:"prepareInited",get:function(){return this._prepareInited}},{key:"prepareInitObjects",get:function(){return this._prepareInitObjects}},{key:"visible",get:function(){return this._visible}}]),r}(o.default),t.default=o},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=(i(n(208)),function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,[{key:"createGeometry",value:function(e,t,n,r){for(var i=new Float32Array((t+1)*n*3),a=new Float32Array((t+1)*n*2),o=new Uint16Array(t*n*2*3),s=0;s<t+1;s++)for(var l=s/t*e,u=4/Math.sqrt(2*Math.PI)*Math.exp(-l*l/2/r)/Math.sqrt(r),h=0;h<n;h++){var c=h/n*Math.PI*2,d=l*Math.sin(c),f=l*Math.cos(c),p=s*n*3+3*h;i[p]=f,i[p+1]=u,i[p+2]=d;var m=s*n*2+2*h;a[m]=h/n,a[m+1]=s/t,s<t&&(c=void 0,f=void 0,p=void 0,d=void 0,m=s*n*6+6*h,c=s*n+h,f=h+1===n?s*n:c+1,p=c+n,d=f+n,o[m]=c,o[m+1]=f,o[m+2]=p,o[m+3]=f,o[m+4]=d,o[m+5]=p)}return{index:o,uv:a,vertice:i}}},{key:"computerArcLineByPoints",value:function(e,t,n,r,i){var a=(new fm.Vector3).copy(e).distanceTo(t),o=(new fm.Vector3).copy(n).distanceTo(t),s=(new fm.Vector3).copy(e),l=(new fm.Vector3).copy(e),u=[];r<a&&(s=(new fm.Vector3).copy(t).add((new fm.Vector3).copy(e).sub(t).normalize().multiplyScalar(r)),u.push(s)),r<o&&(l=(new fm.Vector3).copy(t).add((new fm.Vector3).copy(n).sub(t).normalize().multiplyScalar(r)));for(var h=new fm.QuadraticBezierCurve3(s,t,l),c=0;c<i-1;c++){var d=(c+1)/i,d=h.getPoint(d);u.push(d)}return r<o&&u.push(l),u}}]),e}()),n=n;t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(144)),s=a(n(10)),l=a(n(2)),u=a(n(3)),h=a(n(5)),c=a(n(6)),d=a(n(7)),n=a(n(17));function f(n){var r=p();return function(){var e,t=(0,d.default)(n),t=r?(e=(0,d.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,c.default)(this,t)}}function p(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,h.default)(n,e);var t=f(n);function n(){var e;return(0,l.default)(this,n),e=t.call(this,"dynmodel"),e._scene=new fm.Scene,e._scene.userData.type="dynmodel",e._scene.name="dynmodel",e.alias="dynmodel",e._models={},e.prepareInitObjects=[],e._visible=!0,e.initLight(),e.putLight(),e}return(0,u.default)(n,[{key:"initLight",value:function(){this._ambientLight=new fm.AmbientLight(7631988),this._target=new fm.Object3D,this._mainLight=new fm.DirectionalLight(8947848,1.2),this._mainLight.position.set(-1,1,1).normalize(),this._mainLight.target=this._target,this._secondLight=new fm.DirectionalLight(3355443),this._secondLight.position.set(-.5,1,-1).normalize(),this._secondLight.target=this._target}},{key:"addNodes",value:function(e){e.parent=this,e.renderNode&&this._scene.add(e.renderNode),this._models[""+e.eid]=e}},{key:"removeNode",value:function(n){n.parent=void 0;var r=this;n.renderNode.traverse(function(e){var t;e instanceof fm.Mesh&&(e.material.transparent=!0,n._fadeOut?t=(0,o.default)(function(){.05<e.material.opacity?e.material.opacity-=.05:(clearInterval(t),r._scene.remove(n.renderNode))},200):r._scene.remove(n.renderNode))}),n.dispose()}},{key:"putLight",value:function(){var e=this;this.scene.add(this._mainLight),this.scene.add(this._ambientLight),this.scene.add(this._secondLight),this.scene.add(this._target),this.scene.removeLight=function(){e.removeLight()}}},{key:"removeLight",value:function(){this.scene.remove(this._mainLight),this.scene.remove(this._ambientLight),this.scene.remove(this._secondLight)}},{key:"disposeLight",value:function(){this._mainLight=void 0,this._ambientLight=void 0,this._secondLight=void 0}},{key:"getNodeById",value:function(e){return this._models[""+e]}},{key:"traverse",value:function(e){for(var t in this._models)e&&e(this._models[t])}},{key:"checkSceneNode",value:function(){for(var e in this._scene.children.length=0,this._models)this._models[e].visible&&this._models[e].renderNode&&this._scene.add(this._models[e].renderNode);this.putLight()}},{key:"getAllMesh",value:function(){var e,t=[];for(e in this._models)this._models[e].renderNode&&t.push(this._models[e].renderNode);return t}},{key:"dispose",value:function(){for(var e in this._models)this._models[e].dispose(),this._scene.remove(this._models[e].renderNode),this._models[e].parent=void 0,this._models[e]=void 0;this.removeLight(),this.disposeLight(),this._scene.length=0,this._scene=void 0}},{key:"models",get:function(){return this._models},set:function(e){this._models=e}},{key:"scene",get:function(){return this._scene}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.parent&&this.parent.parent&&this.parent.parent.parent&&(0,s.default)(this.parent.parent.parent).setRenderList()}},{key:"show",get:function(){return this.visible},set:function(e){this.visible=e}}]),n}(n.default),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"createImage",value:function(e,t,n){var r=e.createImage();return r.crossOrigin="Anonymous",r.onload=function(){n&&n(r)},r.src=t,r}}]),e}(),n=n;t.default=n},function(e,t,n){e.exports=n(509)},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.FMMathUtils=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"findNearNthPowerOfTwo",value:function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e<0?1:e+1}},{key:"generateUUID",value:function(){for(var e=[],t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);var n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0,a=4294967295*Math.random()|0,a=e[255&n]+e[n>>8&255]+e[n>>16&255]+e[n>>24&255]+"-"+e[255&r]+e[r>>8&255]+"-"+e[r>>16&15|64]+e[r>>24&255]+"-"+e[63&i|128]+e[i>>8&255]+"-"+e[i>>16&255]+e[i>>24&255]+e[255&a]+e[a>>8&255]+e[a>>16&255]+e[a>>24&255];return a.toUpperCase()}}]),e}();t.FMMathUtils=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(5)),l=a(n(6)),u=a(n(7));function h(n){var r=c();return function(){var e,t=(0,u.default)(n),t=r?(e=(0,u.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,l.default)(this,t)}}function c(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,s.default)(r,e);var n=h(r);function r(){(0,o.default)(this,r);var e=n.call(this),t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new fm.InterleavedBuffer(t,5);return e.setIndex([0,1,2,0,2,3]),e.setAttribute("position",new fm.InterleavedBufferAttribute(t,3,0,!1)),e.setAttribute("uv",new fm.InterleavedBufferAttribute(t,2,3,!1)),e}return r}(fm.BufferGeometry),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(13)),g=i(n(64)),y=i(n(145)),_={};function a(e){this.manager=void 0!==e?e:fm.DefaultLoadingManager}(0,r.default)(a.prototype,{load:function(o,e,t,n){void 0===o&&(o=""),void 0!==this.path&&(o=this.path+o),o=this.manager.resolveURL(o);var s=this,r=fm.Cache.get(o);if(void 0!==r)return s.manager.itemStart(o),(0,g.default)(function(){e&&e(r),s.manager.itemEnd(o)},0),r;if(void 0===_[o]){var i=/^data:(.*?)(;base64)?,(.*)$/,a=o.match(i);if(a){var l=a[1],i=!!a[2],u=a[3],u=decodeURIComponent(u);i&&(u=atob(u));try{var h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var c=new Uint8Array(u.length),d=0;d<u.length;d++)c[d]=u.charCodeAt(d);p="blob"===h?new Blob([c.buffer],{type:l}):c.buffer;break;case"document":var f=new DOMParser,p=f.parseFromString(u,l);break;case"json":p=JSON.parse(u);break;default:p=u}(0,g.default)(function(){e&&e(p),s.manager.itemEnd(o)},0)}catch(e){(0,g.default)(function(){n&&n(e),s.manager.itemError(o),s.manager.itemEnd(o)},0)}}else{_[o]=[],_[o].push({onLoad:e,onProgress:t,onError:n});var m,v=new y.default;for(m in v.open("GET",o,!0),v.addEventListener("load",function(e){var t=this.response;fm.Cache.add(o,t);var n=_[o];if(delete _[o],200===this.status||0===this.status){0===this.status&&console.warn("fm.FileLoader: HTTP Status 0 received.");for(var r=0,i=n.length;r<i;r++){var a=n[r];a.onLoad&&a.onLoad(t)}s.manager.itemEnd(o)}else{for(r=0,i=n.length;r<i;r++)a=n[r],a.onError&&a.onError(e);s.manager.itemError(o),s.manager.itemEnd(o)}},!1),v.addEventListener("progress",function(e){for(var t=_[o],n=0,r=t.length;n<r;n++){var i=t[n];i.onProgress&&i.onProgress(e)}},!1),v.addEventListener("error",function(e){var t=_[o];delete _[o];for(var n=0,r=t.length;n<r;n++){var i=t[n];i.onError&&i.onError(e)}s.manager.itemError(o),s.manager.itemEnd(o)},!1),v.addEventListener("abort",function(e){var t=_[o];delete _[o];for(var n=0,r=t.length;n<r;n++){var i=t[n];i.onError&&i.onError(e)}s.manager.itemError(o),s.manager.itemEnd(o)},!1),void 0!==this.responseType&&(v.responseType=this.responseType),void 0!==this.withCredentials&&(v.withCredentials=this.withCredentials),v.overrideMimeType&&v.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)v.setRequestHeader(m,this.requestHeader[m]);v.send(null)}return s.manager.itemStart(o),v}_[o].push({onLoad:e,onProgress:t,onError:n})},setPath:function(e){return this.path=e,this},setResponseType:function(e){return this.responseType=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setMimeType:function(e){return this.mimeType=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}}),r=a,t.default=r},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.TextureLoader=a;var t=i(n(13)),i=i(n(60)),o=n(519);function a(e,t){fm.Loader.call(this,t),this._map=e}a.prototype=(0,t.default)((0,i.default)(fm.Loader.prototype),{constructor:a,load:function(t,n,e,r){var i=new fm.Texture,a=new o.ImageLoader(this._map,this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(t,function(e){i.image=e,e=0<t.search(/\.jpe?g($|\?)/i)||0===t.search(/^data\:image\/jpeg/),i.format=e?fm.RGBFormat:fm.RGBAFormat,i.needsUpdate=!0,void 0!==n&&n(i)},e,r),i}})},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(56)),c=i(n(9)),g=i(n(520)),h=i(n(14)),w=i(n(12)),o=i(n(109)),f=i(n(10)),r=i(n(60)),s=i(n(13)),l=i(n(31)),p=i(n(53)),S=i(n(140)),d=i(n(50)),u=i(n(232)),m=n(233);function v(e,t){this._map=e,this.manager=void 0!==t?t:fm.DefaultLoadingManager,this.dracoLoader=null,this.ddsLoader=null}function y(){var n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}v.prototype={constructor:v,crossOrigin:"anonymous",load:function(n,r,e,t){var i=this,a=void 0!==this.resourcePath?this.resourcePath:void 0!==this.path?this.path:fm.LoaderUtils.extractUrlBase(n);i.manager.itemStart(n);var o=function(e){t?t(e):console.error(e),i.manager.itemError(n),i.manager.itemEnd(n)},s=new u.default(i.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),"use-credentials"===i.crossOrigin&&s.setWithCredentials(!0),s.load(n,function(t){try{i.parse(t,a,function(e){r(e,t),i.manager.itemEnd(n)},o)}catch(e){console.warn("数据解析失败!"),o(e)}},e,o)},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this},setResourcePath:function(e){return this.resourcePath=e,this},setDRACOLoader:function(e){return this.dracoLoader=e,this},setDDSLoader:function(e){return this.ddsLoader=e,this},parse:function(e,t,n,r){var i,a={};if("string"==typeof e)i=e;else{var o=fm.LoaderUtils.decodeText(new Uint8Array(e,0,4));if(o===T){try{a[_.KHR_BINARY_GLTF]=new I(e)}catch(e){return void(r&&r(e))}i=a[_.KHR_BINARY_GLTF].content}else i=fm.LoaderUtils.decodeText(new Uint8Array(e))}var s=JSON.parse(i);if(void 0===s.asset||s.asset.version[0]<2)r&&r(new Error("fm.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead."));else{if(s.extensionsUsed)for(var l=0;l<s.extensionsUsed.length;++l){var u=s.extensionsUsed[l],h=s.extensionsRequired||[];switch(u){case _.KHR_LIGHTS_PUNCTUAL:a[u]=new b(s);break;case _.KHR_MATERIALS_UNLIT:a[u]=new M;break;case _.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:a[u]=new N;break;case _.KHR_DRACO_MESH_COMPRESSION:a[u]=new L(s,this.dracoLoader);break;case _.MSFT_TEXTURE_DDS:a[_.MSFT_TEXTURE_DDS]=new x(this.ddsLoader);break;case _.KHR_TEXTURE_TRANSFORM:a[_.KHR_TEXTURE_TRANSFORM]=new R;break;default:0<=(0,c.default)(h).call(h,u)&&console.warn('fm.GLTFLoader: Unknown extension "'+u+'".')}}t=new $(s,a,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,manager:this.manager,map:this._map}),t.parse(n,r)}}};var _={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function x(e){if(!e)throw new Error("fm.GLTFLoader: Attempting to load .dds texture without importing fm.DDSLoader");this.name=_.MSFT_TEXTURE_DDS,this.ddsLoader=e}function b(e){this.name=_.KHR_LIGHTS_PUNCTUAL,e=e.extensions&&e.extensions[_.KHR_LIGHTS_PUNCTUAL]||{},this.lightDefs=e.lights||[]}function M(){this.name=_.KHR_MATERIALS_UNLIT}b.prototype.loadLight=function(e){var t,n=this.lightDefs[e],r=new fm.Color(16777215);void 0!==n.color&&r.fromArray(n.color);var i=void 0!==n.range?n.range:0;switch(n.type){case"directional":t=new fm.DirectionalLight(r),t.target.position.set(0,0,-1),t.add(t.target);break;case"point":t=new fm.PointLight(r),t.distance=i;break;case"spot":t=new fm.SpotLight(r),t.distance=i,n.spot=n.spot||{},n.spot.innerConeAngle=void 0!==n.spot.innerConeAngle?n.spot.innerConeAngle:0,n.spot.outerConeAngle=void 0!==n.spot.outerConeAngle?n.spot.outerConeAngle:Math.PI/4,t.angle=n.spot.outerConeAngle,t.penumbra=1-n.spot.innerConeAngle/n.spot.outerConeAngle,t.target.position.set(0,0,-1),t.add(t.target);break;default:throw new Error('fm.GLTFLoader: Unexpected light type, "'+n.type+'".')}return t.position.set(0,0,0),t.decay=2,void 0!==n.intensity&&(t.intensity=n.intensity),t.name=n.name||"light_"+e,g.default.resolve(t)},M.prototype.getMaterialType=function(){return fm.MeshBasicMaterial},M.prototype.extendParams=function(e,t,n){var r=[];e.color=new fm.Color(1,1,1),e.opacity=1;var i=t.pbrMetallicRoughness;return i&&((0,h.default)(i.baseColorFactor)&&(t=i.baseColorFactor,e.color.fromArray(t),e.opacity=t[3]),void 0!==i.baseColorTexture&&r.push(n.assignTexture(e,"map",i.baseColorTexture))),g.default.all(r)};var T="glTF",E=12,A={JSON:1313821514,BIN:5130562};function I(e){this.name=_.KHR_BINARY_GLTF,this.content=null,this.body=null;var t=new DataView(e,0,E);if(this.header={magic:fm.LoaderUtils.decodeText(new Uint8Array((0,w.default)(e).call(e,0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==T)throw new Error("fm.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("fm.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");for(var n=new DataView(e,E),r=0;r<n.byteLength;){var i=n.getUint32(r,!0);r+=4;var a,o=n.getUint32(r,!0);r+=4,o===A.JSON?(a=new Uint8Array(e,E+r,i),this.content=fm.LoaderUtils.decodeText(a)):o===A.BIN&&(o=E+r,this.body=(0,w.default)(e).call(e,o,o+i)),r+=i}if(null===this.content)throw new Error("fm.GLTFLoader: JSON content not found.")}function L(e,t){if(!t)throw new Error("fm.GLTFLoader: No DRACOLoader instance provided.");this.name=_.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t}function R(){this.name=_.KHR_TEXTURE_TRANSFORM}function N(){return{name:_.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return fm.ShaderMaterial},extendParams:function(e,t,n){var r=t.extensions[this.name],i=fm.ShaderLib.standard,a=fm.UniformsUtils.clone(i.uniforms),o=["#ifdef USE_SPECULARMAP","\tuniform sampler2D specularMap;","#endif"].join("\n"),s=["#ifdef USE_GLOSSINESSMAP","\tuniform sampler2D glossinessMap;","#endif"].join("\n"),l=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\tvec4 texelSpecular = texture2D( specularMap, vUv );","\ttexelSpecular = sRGBToLinear( texelSpecular );","\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\n"),t=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\n"),t=i.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",o).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",l).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",t);return delete a.roughness,delete a.metalness,delete a.roughnessMap,delete a.metalnessMap,a.specular={value:(new fm.Color).setHex(1118481)},a.glossiness={value:.5},a.specularMap={value:null},a.glossinessMap={value:null},e.vertexShader=i.vertexShader,e.fragmentShader=t,e.uniforms=a,e.defines={STANDARD:""},e.color=new fm.Color(1,1,1),e.opacity=1,t=[],(0,h.default)(r.diffuseFactor)&&(a=r.diffuseFactor,e.color.fromArray(a),e.opacity=a[3]),void 0!==r.diffuseTexture&&t.push(n.assignTexture(e,"map",r.diffuseTexture)),e.emissive=new fm.Color(0,0,0),e.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,e.specular=new fm.Color(1,1,1),(0,h.default)(r.specularFactor)&&e.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture&&(r=r.specularGlossinessTexture,t.push(n.assignTexture(e,"glossinessMap",r)),t.push(n.assignTexture(e,"specularMap",r))),g.default.all(t)},createMaterial:function(e){var t=new fm.ShaderMaterial({defines:e.defines,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,fog:!0,lights:!0,opacity:e.opacity,transparent:e.transparent});return t.isGLTFSpecularGlossinessMaterial=!0,t.color=e.color,t.map=void 0===(0,f.default)(e)?null:(0,f.default)(e),t.lightMap=null,t.lightMapIntensity=1,t.aoMap=void 0===e.aoMap?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=1,t.emissiveMap=void 0===e.emissiveMap?null:e.emissiveMap,t.bumpMap=void 0===e.bumpMap?null:e.bumpMap,t.bumpScale=1,t.normalMap=void 0===e.normalMap?null:e.normalMap,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=void 0===e.specularMap?null:e.specularMap,t.specular=e.specular,t.glossinessMap=void 0===e.glossinessMap?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=void 0===e.envMap?null:e.envMap,t.envMapIntensity=1,t.refractionRatio=.98,t.extensions.derivatives=!0,t},cloneMaterial:function(e){var t=e.clone();t.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++){var a=e[n[r]];t[n[r]]=a&&a.isColor?a.clone():a}return t},refreshUniforms:function(e,t,n,r,i){var a,o,s;!0===i.isGLTFSpecularGlossinessMaterial&&(a=i.uniforms,o=i.defines,a.opacity.value=i.opacity,a.diffuse.value.copy(i.color),a.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),(0,f.default)(a).value=(0,f.default)(i),a.specularMap.value=i.specularMap,a.alphaMap.value=i.alphaMap,a.lightMap.value=i.lightMap,a.lightMapIntensity.value=i.lightMapIntensity,a.aoMap.value=i.aoMap,a.aoMapIntensity.value=i.aoMapIntensity,(0,f.default)(i)?s=(0,f.default)(i):i.specularMap?s=i.specularMap:i.displacementMap?s=i.displacementMap:i.normalMap?s=i.normalMap:i.bumpMap?s=i.bumpMap:i.glossinessMap?s=i.glossinessMap:i.alphaMap?s=i.alphaMap:i.emissiveMap&&(s=i.emissiveMap),void 0!==s&&(s.isWebGLRenderTarget&&(s=s.texture),!0===s.matrixAutoUpdate&&s.updateMatrix(),a.uvTransform.value.copy(s.matrix)),i.envMap&&(a.envMap.value=i.envMap,a.envMapIntensity.value=i.envMapIntensity,a.flipEnvMap.value=i.envMap.isCubeTexture?-1:1,a.reflectivity.value=i.reflectivity,a.refractionRatio.value=i.refractionRatio,a.maxMipLevel.value=e.properties.get(i.envMap).__maxMipLevel),a.specular.value.copy(i.specular),a.glossiness.value=i.glossiness,a.glossinessMap.value=i.glossinessMap,a.emissiveMap.value=i.emissiveMap,a.bumpMap.value=i.bumpMap,a.normalMap.value=i.normalMap,a.displacementMap.value=i.displacementMap,a.displacementScale.value=i.displacementScale,a.displacementBias.value=i.displacementBias,null!==a.glossinessMap.value&&void 0===o.USE_GLOSSINESSMAP&&(o.USE_GLOSSINESSMAP="",o.USE_ROUGHNESSMAP=""),null===a.glossinessMap.value&&void 0!==o.USE_GLOSSINESSMAP&&(delete o.USE_GLOSSINESSMAP,delete o.USE_ROUGHNESSMAP))}}}function k(e,t,n,r){fm.Interpolant.call(this,e,t,n,r)}L.prototype.decodePrimitive=function(e,t){var n,r=this.json,i=this.dracoLoader,a=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,s={},l={},u={};for(n in o){var h=U[n]||n.toLowerCase();s[h]=o[n]}for(n in e.attributes){var c,d,h=U[n]||n.toLowerCase();void 0!==o[n]&&(c=r.accessors[e.attributes[n]],d=D[c.componentType],u[h]=d,l[h]=!0===c.normalized)}return t.getDependency("bufferView",a).then(function(e){return new g.default(function(r){i.decodeDracoFile(e,function(e){for(var t in e.attributes){var n=e.attributes[t],t=l[t];void 0!==t&&(n.normalized=t)}r(e)},s,u)})})},R.prototype.extendTexture=function(e,t){return e=e.clone(),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&(0,o.default)(e).fromArray(t.scale),void 0!==t.texCoord&&console.warn('fm.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),e.needsUpdate=!0,e},k.prototype=(0,r.default)(fm.Interpolant.prototype),k.prototype.constructor=k,k.prototype.copySampleValue_=function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r,a=0;a!==r;a++)t[a]=n[i+a];return t},k.prototype.beforeStart_=k.prototype.copySampleValue_,k.prototype.afterEnd_=k.prototype.copySampleValue_,k.prototype.interpolate_=function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=2*o,l=3*o,u=r-t,r=(n-t)/u,n=r*r,t=n*r,h=e*l,c=h-l,d=-2*t+3*n,f=t-n,p=1-d,m=f-n+r,v=0;v!==o;v++){var g=a[c+v+o],y=a[c+v+s]*u,_=a[h+v+o],x=a[h+v]*u;i[v]=p*g+m*y+d*_+f*x}return i};var P,C={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},D={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},O={9728:fm.NearestFilter,9729:fm.LinearFilter,9984:fm.NearestMipmapNearestFilter,9985:fm.LinearMipmapNearestFilter,9986:fm.NearestMipmapLinearFilter,9987:fm.LinearMipmapLinearFilter},B={33071:fm.ClampToEdgeWrapping,33648:fm.MirroredRepeatWrapping,10497:fm.RepeatWrapping},F={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},U={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},z={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},G={CUBICSPLINE:void 0,LINEAR:fm.InterpolateLinear,STEP:fm.InterpolateDiscrete},V={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"},H={"image/png":fm.RGBAFormat,"image/jpeg":fm.RGBFormat};function j(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^(wxfile:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}function W(){return P=P||new fm.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:fm.FrontSide}),P}function Y(e,t,n){for(var r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function q(e,t){void 0!==t.extras&&("object"===(0,a.default)(t.extras)?(0,s.default)(e.userData,t.extras):console.warn("fm.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function X(f,p,e){for(var m=!1,v=!1,t=0,n=p.length;t<n;t++){var r=p[t];if(void 0!==r.POSITION&&(m=!0),void 0!==r.NORMAL&&(v=!0),m&&v)break}if(!m&&!v)return g.default.resolve(f);for(var i=[],a=[],t=0,n=p.length;t<n;t++){var o,r=p[t];m&&(o=void 0!==r.POSITION?e.getDependency("accessor",r.POSITION):f.attributes.position,i.push(o)),v&&(o=void 0!==r.NORMAL?e.getDependency("accessor",r.NORMAL):f.attributes.normal,a.push(o))}return g.default.all([g.default.all(i),g.default.all(a)]).then(function(e){for(var t=e[0],n=e[1],r=0,i=t.length;r<i;r++)f.attributes.position!==t[r]&&(t[r]=Q(t[r]));for(r=0,i=n.length;r<i;r++)f.attributes.normal!==n[r]&&(n[r]=Q(n[r]));for(r=0,i=p.length;r<i;r++){var a=p[r],o="morphTarget"+r;if(m&&void 0!==a.POSITION){var s=t[r];s.name=o;for(var l=f.attributes.position,u=0,h=s.count;u<h;u++)s.setXYZ(u,s.getX(u)+l.getX(u),s.getY(u)+l.getY(u),s.getZ(u)+l.getZ(u))}if(v&&void 0!==a.NORMAL){var c=n[r];c.name=o;for(var d=f.attributes.normal,u=0,h=c.count;u<h;u++)c.setXYZ(u,c.getX(u)+d.getX(u),c.getY(u)+d.getY(u),c.getZ(u)+d.getZ(u))}}return m&&(f.morphAttributes.position=t),v&&(f.morphAttributes.normal=n),f})}function Z(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(var n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&(0,h.default)(t.extras.targetNames)){var i=t.extras.targetNames;if(e.morphTargetInfluences.length===i.length)for(e.morphTargetDictionary={},n=0,r=i.length;n<r;n++)e.morphTargetDictionary[i[n]]=n;else console.warn("fm.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function J(e){var t=e.extensions&&e.extensions[_.KHR_DRACO_MESH_COMPRESSION],e=t?"draco:"+t.bufferView+":"+t.indices+":"+K(t.attributes):e.indices+":"+K(e.attributes)+":"+e.mode;return e}function K(e){for(var t,n="",r=(0,l.default)(t=(0,p.default)(e)).call(t),i=0,a=r.length;i<a;i++)n+=r[i]+":"+e[r[i]]+";";return n}function Q(e){if(e.isInterleavedBufferAttribute){for(var t,n=e.count,r=e.itemSize,i=(0,w.default)(t=e.array).call(t,0,n*r),a=0,o=0;a<n;++a)i[o++]=e.getX(a),2<=r&&(i[o++]=e.getY(a)),3<=r&&(i[o++]=e.getZ(a)),4<=r&&(i[o++]=e.getW(a));return new fm.BufferAttribute(i,r,e.normalized)}return e.clone()}function $(e,t,n){this.json=e||{},this.extensions=t||{},this.options=n||{},this.cache=new y,this.primitiveCache={},this.textureLoader=new m.TextureLoader((0,f.default)(this.options),this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new u.default(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}$.prototype.parse=function(t,e){var n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this.markDefs(),g.default.all([this.getDependencies("scene"),this.getDependencies("animation"),this.getDependencies("camera")]).then(function(e){e={scene:e[0][r.scene||0],scenes:e[0],animations:e[1],cameras:e[2],asset:r.asset,parser:n,userData:{}},Y(i,e,r),q(e,r),t(e)}).catch(e)},$.prototype.markDefs=function(){for(var e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[],r={},i={},a=0,o=t.length;a<o;a++)for(var s=t[a].joints,l=0,u=s.length;l<u;l++)e[s[l]].isBone=!0;for(var h=0,c=e.length;h<c;h++){var d=e[h];void 0!==d.mesh&&(void 0===r[d.mesh]&&(r[d.mesh]=i[d.mesh]=0),r[d.mesh]++,void 0!==d.skin&&(n[d.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},$.prototype.getDependency=function(e,t){var n=e+":"+t,r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this.loadNode(t);break;case"mesh":r=this.loadMesh(t);break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this.loadBufferView(t);break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this.loadMaterial(t);break;case"texture":r=this.loadTexture(t);break;case"skin":r=this.loadSkin(t);break;case"animation":r=this.loadAnimation(t);break;case"camera":r=this.loadCamera(t);break;case"light":r=this.extensions[_.KHR_LIGHTS_PUNCTUAL].loadLight(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,r)}return r},$.prototype.getDependencies=function(n){var r,e,t=this.cache.get(n);return t||(r=this,e=this.json[n+("mesh"===n?"es":"s")]||[],t=g.default.all((0,f.default)(e).call(e,function(e,t){return r.getDependency(n,t)})),this.cache.add(n,t)),t},$.prototype.loadBuffer=function(e){var n=this.json.buffers[e],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("fm.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===e)return g.default.resolve(this.extensions[_.KHR_BINARY_GLTF].body);var i=this.options;return new g.default(function(e,t){r.load(j(n.uri,i.path),e,void 0,function(){t(new Error('fm.GLTFLoader: Failed to load buffer "'+n.uri+'".'))})})},$.prototype.loadBufferView=function(e){var r=this.json.bufferViews[e];return this.getDependency("buffer",r.buffer).then(function(e){var t=r.byteLength||0,n=r.byteOffset||0;return(0,w.default)(e).call(e,n,n+t)})},$.prototype.loadAccessor=function(e){var y=this,_=this.json,x=this.json.accessors[e];return void 0===x.bufferView&&void 0===x.sparse?g.default.resolve(null):(e=[],void 0!==x.bufferView?e.push(this.getDependency("bufferView",x.bufferView)):e.push(null),void 0!==x.sparse&&(e.push(this.getDependency("bufferView",x.sparse.indices.bufferView)),e.push(this.getDependency("bufferView",(0,S.default)(x.sparse).bufferView))),g.default.all(e).then(function(e){var t,n,r=e[0],i=F[x.type],a=D[x.componentType],o=a.BYTES_PER_ELEMENT,s=o*i,l=x.byteOffset||0,u=void 0!==x.bufferView?_.bufferViews[x.bufferView].byteStride:void 0,h=!0===x.normalized,c=u&&u!==s?(t=Math.floor(l/u),n="InterleavedBuffer:"+x.bufferView+":"+x.componentType+":"+t+":"+x.count,s=y.cache.get(n),s||(d=new a(r,t*u,x.count*u/o),s=new fm.InterleavedBuffer(d,u/o),y.cache.add(n,s)),new fm.InterleavedBufferAttribute(s,i,l%u/o,h)):(d=null===r?new a(x.count*i):new a(r,l,x.count*i),new fm.BufferAttribute(d,i,h));if(void 0!==x.sparse){var o=F.SCALAR,l=D[x.sparse.indices.componentType],d=x.sparse.indices.byteOffset||0,h=(0,S.default)(x.sparse).byteOffset||0,f=new l(e[1],d,x.sparse.count*o),p=new a(e[2],h,x.sparse.count*i);null!==r&&c.setArray((0,w.default)(r=c.array).call(r));for(var m=0,v=f.length;m<v;m++){var g=f[m];if(c.setX(g,p[m*i]),2<=i&&c.setY(g,p[m*i+1]),3<=i&&c.setZ(g,p[m*i+2]),4<=i&&c.setW(g,p[m*i+3]),5<=i)throw new Error("fm.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return c}))};var ee=0;function te(n,e,r){var t,i,a=e.attributes,o=[];function s(e,t){return r.getDependency("accessor",e).then(function(e){n.setAttribute(t,e)})}for(t in a){var l=U[t]||t.toLowerCase();l in n.attributes||o.push(s(a[t],l))}return void 0===e.indices||n.index||(i=r.getDependency("accessor",e.indices).then(function(e){n.setIndex(e)}),o.push(i)),q(n,e),g.default.all(o).then(function(){return void 0!==e.targets?X(n,e.targets,r):n})}function ne(e,o,s,l){var u=s.nodes[e];return l.getDependency("node",e).then(function(e){return void 0===u.skin?e:l.getDependency("skin",u.skin).then(function(e){s=e;for(var t=[],n=0,r=s.joints.length;n<r;n++)t.push(l.getDependency("node",s.joints[n]));return g.default.all(t)}).then(function(o){return e.traverse(function(e){if(e.isMesh){for(var t=[],n=[],r=0,i=o.length;r<i;r++){var a=o[r];a?(t.push(a),a=new fm.Matrix4,void 0!==s.inverseBindMatrices&&a.fromArray(s.inverseBindMatrices.array,16*r),n.push(a)):console.warn('fm.GLTFLoader: Joint "%s" could not be found.',s.joints[r])}(0,d.default)(e).call(e,new fm.Skeleton(t,n),e.matrixWorld)}}),e});var s}).then(function(e){o.add(e);var t=[];if(u.children)for(var n=u.children,r=0,i=n.length;r<i;r++){var a=n[r];t.push(ne(a,e,s,l))}return g.default.all(t)})}$.prototype.loadTexture=function(e){var t=this,n=this.json,i=this.options,a=this.textureLoader,r=n.textures[e],o=r.extensions||{},s=o[_.MSFT_TEXTURE_DDS]?n.images[o[_.MSFT_TEXTURE_DDS].source]:n.images[r.source],e=s.uri;return void 0!==s.bufferView&&(e=t.getDependency("bufferView",s.bufferView).then(function(e){var i=wx.getFileSystemManager();return new g.default(function(t,n){var r=wx.env.USER_DATA_PATH+"/"+ee+".png";ee++,i.writeFile({filePath:r,data:e,encoding:"binary",success:function(e){t(r)},fail:function(e){n(r)}})})})),g.default.resolve(e).then(function(n){var e=new fm.LoadingManager,r=e.getHandler(n),r=r||(o[_.MSFT_TEXTURE_DDS]?t.extensions[_.MSFT_TEXTURE_DDS].ddsLoader:a);return new g.default(function(e,t){r.load(j(n,i.path),e,void 0,t)})}).then(function(e){e.flipY=!1,void 0!==r.name&&(e.name=r.name),s.mimeType in H&&(e.format=H[s.mimeType]);var t=n.samplers||{},t=t[r.sampler]||{};return e.magFilter=O[t.magFilter]||fm.LinearFilter,e.minFilter=O[t.minFilter]||fm.LinearMipmapLinearFilter,e.wrapS=B[t.wrapS]||fm.RepeatWrapping,e.wrapT=B[t.wrapT]||fm.RepeatWrapping,e})},$.prototype.assignTexture=function(n,r,i){var a=this;return this.getDependency("texture",i.index).then(function(e){if(!e.isCompressedTexture)switch(r){case"aoMap":case"emissiveMap":case"metalnessMap":case"normalMap":case"roughnessMap":e.format=fm.RGBFormat}var t;a.extensions[_.KHR_TEXTURE_TRANSFORM]&&(t=void 0!==i.extensions?i.extensions[_.KHR_TEXTURE_TRANSFORM]:void 0,t&&(e=a.extensions[_.KHR_TEXTURE_TRANSFORM].extendTexture(e,t))),n[r]=e}).catch(function(e){console.warn("图片超过最大限制,贴图未能正常初始化:",e)})},$.prototype.assignFinalMaterial=function(e){var t,n,r,i=e.geometry,a=e.material,o=this.extensions,s=void 0!==i.attributes.tangent,l=void 0!==i.attributes.color,u=void 0===i.attributes.normal,h=!0===e.isSkinnedMesh,c=0<(0,p.default)(i.morphAttributes).length,d=c&&void 0!==i.morphAttributes.normal;e.isPoints?(n="PointsMaterial:"+a.uuid,t=this.cache.get(n),t||(t=new fm.PointsMaterial,fm.Material.prototype.copy.call(t,a),t.color.copy(a.color),t.map=(0,f.default)(a),t.lights=!1,this.cache.add(n,t)),a=t):e.isLine&&(n="LineBasicMaterial:"+a.uuid,r=this.cache.get(n),r||(r=new fm.LineBasicMaterial,fm.Material.prototype.copy.call(r,a),r.color.copy(a.color),r.lights=!1,this.cache.add(n,r)),a=r),(s||l||u||h||c)&&(n="ClonedMaterial:"+a.uuid+":",a.isGLTFSpecularGlossinessMaterial&&(n+="specular-glossiness:"),h&&(n+="skinning:"),s&&(n+="vertex-tangents:"),l&&(n+="vertex-colors:"),u&&(n+="flat-shading:"),c&&(n+="morph-targets:"),d&&(n+="morph-normals:"),r=this.cache.get(n),r||(r=a.isGLTFSpecularGlossinessMaterial?o[_.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(a):a.clone(),h&&(r.skinning=!0),s&&(r.vertexTangents=!0),l&&(r.vertexColors=fm.VertexColors),u&&(r.flatShading=!0),c&&(r.morphTargets=!0),d&&(r.morphNormals=!0),this.cache.add(n,r)),a=r),a.aoMap&&void 0===i.attributes.uv2&&void 0!==i.attributes.uv&&i.setAttribute("uv2",new fm.BufferAttribute(i.attributes.uv.array,2)),a.isGLTFSpecularGlossinessMaterial&&(e.onBeforeRender=o[_.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),e.material=a},$.prototype.loadMaterial=function(e){var t,n,r=this,i=this.json,a=this.extensions,o=i.materials[e],s={},l=o.extensions||{},i=[];l[_.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]?(e=a[_.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS],t=e.getMaterialType(),i.push(e.extendParams(s,o,r))):l[_.KHR_MATERIALS_UNLIT]?(n=a[_.KHR_MATERIALS_UNLIT],t=n.getMaterialType(),i.push(n.extendParams(s,o,r))):(t=fm.MeshStandardMaterial,u=o.pbrMetallicRoughness||{},s.color=new fm.Color(1,1,1),s.opacity=1,(0,h.default)(u.baseColorFactor)&&(n=u.baseColorFactor,s.color.fromArray(n),s.opacity=n[3]),void 0!==u.baseColorTexture&&i.push(r.assignTexture(s,"map",u.baseColorTexture)),s.metalness=void 0!==u.metallicFactor?u.metallicFactor:1,s.roughness=void 0!==u.roughnessFactor?u.roughnessFactor:1,void 0!==u.metallicRoughnessTexture&&(i.push(r.assignTexture(s,"metalnessMap",u.metallicRoughnessTexture)),i.push(r.assignTexture(s,"roughnessMap",u.metallicRoughnessTexture)))),!0===o.doubleSided&&(s.side=fm.DoubleSide);var u=o.alphaMode||V.OPAQUE;return u===V.BLEND?s.transparent=!0:(s.transparent=!1,u===V.MASK&&(s.alphaTest=void 0!==o.alphaCutoff?o.alphaCutoff:.5)),void 0!==o.normalTexture&&t!==fm.MeshBasicMaterial&&(i.push(r.assignTexture(s,"normalMap",o.normalTexture)),s.normalScale=new fm.Vector2(1,1),void 0!==o.normalTexture.scale&&s.normalScale.set(o.normalTexture.scale,o.normalTexture.scale)),void 0!==o.occlusionTexture&&t!==fm.MeshBasicMaterial&&(i.push(r.assignTexture(s,"aoMap",o.occlusionTexture)),void 0!==o.occlusionTexture.strength&&(s.aoMapIntensity=o.occlusionTexture.strength)),void 0!==o.emissiveFactor&&t!==fm.MeshBasicMaterial&&(s.emissive=(new fm.Color).fromArray(o.emissiveFactor)),void 0!==o.emissiveTexture&&t!==fm.MeshBasicMaterial&&i.push(r.assignTexture(s,"emissiveMap",o.emissiveTexture)),g.default.all(i).then(function(){var e=t===fm.ShaderMaterial?a[_.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):new t(s);return void 0!==o.name&&(e.name=o.name),(0,f.default)(e)&&((0,f.default)(e).encoding=fm.sRGBEncoding),e.emissiveMap&&(e.emissiveMap.encoding=fm.sRGBEncoding),e.specularMap&&(e.specularMap.encoding=fm.sRGBEncoding),q(e,o),o.extensions&&Y(a,e,o),e})},$.prototype.loadGeometries=function(e){var n=this,r=this.extensions,t=this.primitiveCache;function i(t){return r[_.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(t,n).then(function(e){return te(e,t,n)})}for(var a=[],o=0,s=e.length;o<s;o++){var l=e[o],u=J(l),h=t[u];h?a.push(h.promise):(h=l.extensions&&l.extensions[_.KHR_DRACO_MESH_COMPRESSION]?i(l):te(new fm.BufferGeometry,l,n),t[u]={primitive:l,promise:h},a.push(h))}return g.default.all(a)},$.prototype.loadMesh=function(h){for(var c=this,e=this.json,d=e.meshes[h],f=d.primitives,t=[],n=0,r=f.length;n<r;n++){var i=void 0===f[n].material?W():this.getDependency("material",f[n].material);t.push(i)}return g.default.all(t).then(function(u){return c.loadGeometries(f).then(function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i,a=e[n],o=f[n],s=u[n];if(o.mode===C.TRIANGLES||o.mode===C.TRIANGLE_STRIP||o.mode===C.TRIANGLE_FAN||void 0===o.mode)i=new(!0===d.isSkinnedMesh?fm.SkinnedMesh:fm.Mesh)(a,s),!0!==i.isSkinnedMesh||i.geometry.attributes.skinWeight.normalized||i.normalizeSkinWeights(),o.mode===C.TRIANGLE_STRIP?i.drawMode=fm.TriangleStripDrawMode:o.mode===C.TRIANGLE_FAN&&(i.drawMode=fm.TriangleFanDrawMode);else if(o.mode===C.LINES)i=new fm.LineSegments(a,s);else if(o.mode===C.LINE_STRIP)i=new fm.Line(a,s);else if(o.mode===C.LINE_LOOP)i=new fm.LineLoop(a,s);else{if(o.mode!==C.POINTS)throw new Error("fm.GLTFLoader: Primitive mode unsupported: "+o.mode);i=new fm.Points(a,s)}0<(0,p.default)(i.geometry.morphAttributes).length&&Z(i,d),i.name=d.name||"mesh_"+h,1<e.length&&(i.name+="_"+n),q(i,d),c.assignFinalMaterial(i),t.push(i)}if(1===t.length)return t[0];for(var l=new fm.Group,n=0,r=t.length;n<r;n++)l.add(t[n]);return l})})},$.prototype.loadCamera=function(e){var t,n=this.json.cameras[e],e=n[n.type];if(e)return"perspective"===n.type?t=new fm.PerspectiveCamera(fm.Math.radToDeg(e.yfov),e.aspectRatio||1,e.znear||1,e.zfar||2e6):"orthographic"===n.type&&(t=new fm.OrthographicCamera(e.xmag/-2,e.xmag/2,e.ymag/2,e.ymag/-2,e.znear,e.zfar)),void 0!==n.name&&(t.name=n.name),q(t,n),g.default.resolve(t);console.warn("fm.GLTFLoader: Missing camera parameters.")},$.prototype.loadSkin=function(e){var e=this.json.skins[e],t={joints:e.joints};return void 0===e.inverseBindMatrices?g.default.resolve(t):this.getDependency("accessor",e.inverseBindMatrices).then(function(e){return t.inverseBindMatrices=e,t})},$.prototype.loadAnimation=function(T){for(var e=this.json,E=e.animations[T],t=[],n=[],r=[],i=[],a=[],o=0,s=E.channels.length;o<s;o++){var l=E.channels[o],u=E.samplers[l.sampler],h=l.target,c=void 0!==h.node?h.node:h.id,d=void 0!==E.parameters?E.parameters[u.input]:u.input,l=void 0!==E.parameters?E.parameters[u.output]:u.output;t.push(this.getDependency("node",c)),n.push(this.getDependency("accessor",d)),r.push(this.getDependency("accessor",l)),i.push(u),a.push(h)}return g.default.all([g.default.all(t),g.default.all(n),g.default.all(r),g.default.all(i),g.default.all(a)]).then(function(e){for(var t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=[],s=0,l=t.length;s<l;s++){var u,h=t[s],c=n[s],d=r[s],f=i[s],p=a[s];if(void 0!==h){switch(h.updateMatrix(),h.matrixAutoUpdate=!0,z[p.path]){case z.weights:u=fm.NumberKeyframeTrack;break;case z.rotation:u=fm.QuaternionKeyframeTrack;break;case z.position:case z.scale:default:u=fm.VectorKeyframeTrack}var m=h.name||h.uuid,v=void 0!==f.interpolation?G[f.interpolation]:fm.InterpolateLinear,g=[];z[p.path]===z.weights?h.traverse(function(e){!0===e.isMesh&&e.morphTargetInfluences&&g.push(e.name||e.uuid)}):g.push(m);var y,_=d.array;if(d.normalized){if(_.constructor===Int8Array)y=1/127;else if(_.constructor===Uint8Array)y=1/255;else if(_.constructor==Int16Array)y=1/32767;else{if(_.constructor!==Uint16Array)throw new Error("fm.GLTFLoader: Unsupported output accessor component type.");y=1/65535}for(var x=new Float32Array(_.length),w=0,b=_.length;w<b;w++)x[w]=_[w]*y;_=x}for(w=0,b=g.length;w<b;w++){var M=new u(g[w]+"."+z[p.path],c.array,_,v);"CUBICSPLINE"===f.interpolation&&(M.createInterpolant=function(e){return new k(this.times,(0,S.default)(this),this.getValueSize()/3,e)},M.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),o.push(M)}}}return e=void 0!==E.name?E.name:"animation_"+T,new fm.AnimationClip(e,void 0,o)})},$.prototype.loadNode=function(e){var t=this.json,a=this.extensions,n=this,o=t.meshReferences,s=t.meshUses,l=t.nodes[e];return e=[],void 0!==l.mesh&&e.push(n.getDependency("mesh",l.mesh).then(function(e){if(1<o[l.mesh]){var t=s[l.mesh]++,n=e.clone();n.name+="_instance_"+t,n.onBeforeRender=e.onBeforeRender;for(var r=0,i=n.children.length;r<i;r++)n.children[r].name+="_instance_"+t,n.children[r].onBeforeRender=e.children[r].onBeforeRender}else n=e;return void 0!==l.weights&&n.traverse(function(e){if(e.isMesh)for(var t=0,n=l.weights.length;t<n;t++)e.morphTargetInfluences[t]=l.weights[t]}),n})),void 0!==l.camera&&e.push(n.getDependency("camera",l.camera)),l.extensions&&l.extensions[_.KHR_LIGHTS_PUNCTUAL]&&void 0!==l.extensions[_.KHR_LIGHTS_PUNCTUAL].light&&e.push(n.getDependency("light",l.extensions[_.KHR_LIGHTS_PUNCTUAL].light)),g.default.all(e).then(function(e){var t,n=!0===l.isBone?new fm.Bone:1<e.length?new fm.Group:1===e.length?e[0]:new fm.Object3D;if(n!==e[0])for(var r=0,i=e.length;r<i;r++)n.add(e[r]);return void 0!==l.name&&(n.userData.name=l.name,n.name=fm.PropertyBinding.sanitizeNodeName(l.name)),q(n,l),l.extensions&&Y(a,n,l),void 0!==l.matrix?(t=new fm.Matrix4,t.fromArray(l.matrix),n.applyMatrix(t)):(void 0!==l.translation&&n.position.fromArray(l.translation),void 0!==l.rotation&&n.quaternion.fromArray(l.rotation),void 0!==l.scale&&n.scale.fromArray(l.scale)),n})},$.prototype.loadScene=function(e){var t=this.json,n=this.extensions,e=this.json.scenes[e],r=this,i=new fm.Scene;void 0!==e.name&&(i.name=e.name),q(i,e),e.extensions&&Y(n,i,e);for(var a=e.nodes||[],o=[],s=0,l=a.length;s<l;s++)o.push(ne(a[s],i,t,r));return g.default.all(o).then(function(){return i})},r=v,t.default=r},function(e,t,n){n=n(18),e.exports=n.Promise},function(e,t,n){var r=n(33),i=n(44),n=n(24),a=n("species");e.exports=function(e,t){var n,e=r(e).constructor;return void 0===e||null==(n=r(e)[a])?t:i(n)}},function(e,t,n){var r,i=n(18),a=n(16),o=n(72),s=n(173),l=n(124),u=n(238),h=n(85),c=i.location,d=i.setImmediate,f=i.clearImmediate,p=i.process,m=i.MessageChannel,v=i.Dispatch,g=0,y={},_="onreadystatechange",x=function(e){var t;y.hasOwnProperty(e)&&(t=y[e],delete y[e],t())},w=function(e){return function(){x(e)}},b=function(e){x(e.data)},n=function(e){i.postMessage(e+"",c.protocol+"//"+c.host)};d&&f||(d=function(e){for(var t=[],n=1;n<arguments.length;)t.push(arguments[n++]);return y[++g]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(g),g},f=function(e){delete y[e]},h?r=function(e){p.nextTick(w(e))}:v&&v.now?r=function(e){v.now(w(e))}:m&&!u?(u=new m,m=u.port2,u.port1.onmessage=b,r=o(m.postMessage,m,1)):i.addEventListener&&"function"==typeof postMessage&&!i.importScripts&&c&&"file:"!==c.protocol&&!a(n)?(r=n,i.addEventListener("message",b,!1)):r=_ in l("script")?function(e){s.appendChild(l("script"))[_]=function(){s.removeChild(this),x(e)}}:function(e){setTimeout(w(e),0)}),e.exports={set:d,clear:f}},function(e,t,n){n=n(105),e.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(n)},function(e,t,n){var r=n(33),i=n(23),a=n(117);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=a.f(e),e=n.resolve;return e(t),n.promise}},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={VERSION:"0.9.1",BUILD:143},t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(12),a=n(19),s=n(20),l=n(21),u=n(14),h=n(22),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d=c(n(144)),f=c(n(53)),p=c(n(10)),m=c(n(9)),v=c(n(31)),g=c(n(2)),y=c(n(3)),_=c(n(5)),x=c(n(6)),w=c(n(7)),o=c(n(17)),b=c(n(48)),M=c(n(78)),T=c(n(36));function E(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=S(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function S(e,t){if(e){if("string"==typeof e)return A(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(n){var r=L();return function(){var e,t=(0,w.default)(n),t=r?(e=(0,w.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,x.default)(this,t)}}function L(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}o=function(e){(0,_.default)(i,e);var r=I(i);function i(e,t){var n;return(0,g.default)(this,i),n=r.call(this,t.id||fm.Math.generateUUID(),T.default.DYNMODEL),n._url=t.url,n._url=n._url+"?"+n.getRandomNumber()+(new Date).getTime()+n.getRandomNumber(),n._loader=e.nodeManager.getDynLoader(),n._mixer=null,n._renderNode=null,n._gltf=null,n._visible=!0,n._actions={},n._color=t.color,n._scale=t.scale,n._rotation=t.rotation,n._moveAnimater=null,n._isMoving=!1,n._map=e,n._mapCenter=(new fm.Vector2).copy(e.center),n._meshes=[],n._fadeIn=t.fadeIn,n._fadeOut=t.fadeOut,n.init(e,t.coord,t.callback),n}return(0,y.default)(i,[{key:"init",value:function(i,a,o){var s=this;this._loader?(this._height="number"==typeof a.z?a.z:5,this._loader.load(this._url,function(e){s._fadeIn&&s.fadeIn(e.scene),s._gltf=e,s._renderNode=e.scene,s._renderNode.name="oneModel",s._getMeshes(s._renderNode,s._meshes),s._color&&s.setColor(s._color),s._scale&&s.setScale(s._scale),s._rotation&&s.setRotate(s._rotation),s._renderNode.scale.z*=-1,s._renderNode.mapNode=s,s._mixer=new fm.AnimationMixer(s._renderNode),i.addAnimationMixer(s._mixer);var t,n=E(e.animations);try{for(n.s();!(t=n.n()).done;){var r=t.value;s._actions[r.name]=s._mixer.clipAction(r)}}catch(e){n.e(e)}finally{n.f()}s.setPosition(a.x,a.y,0,s._height),s.renderNodeInited=!0,s.visible=!0,o&&o(s)},function(e){console.warn("FMDynamicModel => 模型加载失败!",e)})):console.error("外部模型加载器缺失")}},{key:"lookAt",value:function(e){var t,n;this.parent&&this.parent.parent?(n=this._map.center,t=this.parent.parent.height,n=new fm.Vector3(e.x-n.x,t+e.z,-e.y+n.y),this._renderNode.lookAt(n)):console.warn("请将模型加载进入地图!")}},{key:"setPosition",value:function(e,t,n,r){var i=this._mapCenter;this._height=r,this._x=e,this._y=t,this._renderNode.position.set(this._x-i.x,this._height,i.y-this._y)}},{key:"rotateTo",value:function(t){var n=this,e=this._renderNode.rotation.y,r=t.to%360*fm.Math.DEG2RAD;this.rotateAnimater&&(this.rotateAnimater.stop(),this._map.removeAnimater(this.rotateAnimater));var i=new M.default({angle:e},{angle:r},t.duration?1e3*t.duration:500,function(){n._map.removeAnimater(i),n.rotateAnimater=null,t.callback&&t.callback()},function(e){n._renderNode.rotation.y=e.angle,t.update&&t.update()}).start();this._map.addAnimater(i),this.rotateAnimater=i}},{key:"setRotate",value:function(e){this._renderNode.rotation.y=e%360*fm.Math.DEG2RAD}},{key:"setScale",value:function(e){for(var t=this._renderNode.children,n=0;n<t.length;n++)t[n].scale.x=e,t[n].scale.y=e,t[n].scale.z=e}},{key:"setColor",value:function(e){for(var t=new fm.Color(e),n=this._meshes,r=0;r<n.length;r++){var i=n[r];i.material.color.r=t.r,i.material.color.g=t.g,i.material.color.b=t.b}}},{key:"fadeIn",value:function(e){e.traverse(function(e){var t;e instanceof fm.Mesh&&(e.material.transparent=!0,e.material.opacity=0,t=(0,d.default)(function(){e.material.opacity<1?e.material.opacity+=.05:clearInterval(t)},200))})}},{key:"setHeight",value:function(e){this.setPosition(this._x,this._y,0,e)}},{key:"setAngle",value:function(e){this._renderNode&&(this._renderNode.rotation.y=e*fm.Math.DEG2RAD)}},{key:"startAction",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:.2,n=2<arguments.length?arguments[2]:void 0,e=this._actions[e];e&&(n&&(e.clampWhenFinished=!0,e.loop=fm.LoopOnce),e.reset().setEffectiveTimeScale(1).setEffectiveWeight(1).fadeIn(t).play())}},{key:"stopAction",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:.2,e=this._actions[e];e&&e.fadeOut(t)}},{key:"getActionList",value:function(){return(0,f.default)(this._actions)}},{key:"moveTo",value:function(t){var e,n,r,i,a=this;this._isMoving||(e=this.findParent(b.default),n=t.x,r=t.y,t.time||(t.time=.5),i=new M.default({x:this.x,y:this.y},{x:n,y:r},1e3*t.time,function(){(0,p.default)(e).removeAnimater(i),a._moveAnimater=null,a._isMoving=!1,t.callback&&t.callback()},function(e){a.setPosition(e.x,e.y,0,a._height),t.update&&t.update(e)}).start(),this._isMoving=!0,(0,p.default)(e).addAnimater(i),this._moveAnimater=i)}},{key:"stopMoveTo",value:function(){var e=this.findParent(b.default);this._moveAnimater&&this._moveAnimater.stop(),(0,p.default)(e).removeAnimater(this._moveAnimater),this._isMoving=!1,this._moveAnimater=null}},{key:"_getMeshes",value:function(e,t){if(e instanceof fm.Mesh)e.material=e.material.clone(),t.push(e);else if(e.children)for(var n=0;n<e.children.length;n++)this._getMeshes(e.children[n],t)}},{key:"visible",get:function(){return this._visible},set:function(e){var t;e?this.parent&&(0,m.default)(t=this.parent.scene.children).call(t,this._renderNode)<0&&this._renderNode&&this.parent.scene.add(this._renderNode):(this._renderNode&&this.parent.scene.remove(this._renderNode),this._renderNode.parent=this.parent.scene),this._visible=e}},{key:"renderNode",get:function(){return this._renderNode},set:function(e){this._renderNode=e,this._renderNode.mapNode=this,(0,m.default)(e=this.parent.scene.children).call(e,this._renderNode)<0&&this._renderNode&&this.parent.scene.add(this._renderNode)}},{key:"mapCoord",get:function(){if(this.parent&&this.parent.parent){var e=this._map.center,t=this.parent.parent.height,n=this._renderNode.position;return new fm.Vector3(n.x+e.x,e.y-n.z,-t+n.y)}console.warn("请将模型加载进入地图!")}},{key:"getRandomNumber",value:function(){for(var e=100,t=new Array,n=0;n<e;n++)t[n]=n+1;return(0,v.default)(t).call(t,function(){return.5-Math.random()}),t[Math.floor(Math.random()*e)]}},{key:"dispose",value:function(){this._renderNode.mapNode=null}}]),i}(o.default),t.default=o},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var y=i(n(35)),h=i(n(32)),c=i(n(9)),a=i(n(2)),o=i(n(3)),r=i(n(137)),_=(i(n(143)),i(n(153))),n=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"search",value:function(e,t,n,r){}},{key:"drawNaviRoads",value:function(e){if(e&&e._currentSceneId&&e.dataManager){var t=e.dataManager._sceneDecodeData[e._currentSceneId];if(t){var n=t.floors;if(0!=n.length){var r,i=[{lineWidth:1,alpha:1,lineType:fengmap.FMLineType.FULL,color:"#00FFFF"},{lineWidth:1,alpha:1,lineType:fengmap.FMLineType.FULL,color:"#00FF00"},{lineWidth:1,alpha:1,lineType:fengmap.FMLineType.FULL,color:"#FF00FF"},{lineWidth:1,alpha:1,lineType:fengmap.FMLineType.FULL,color:"#FF0000"}],a=1,o=[];for(r in n){var s=n[r].gid;if(null!=s){var l,u=n[r].geo[0],h=n[r].biz[0],c=n[r].navi[0],d=new _.default({}),f=d.convertToGroup(s,u,h,c);for(l in f.naviSegments){var p,m=f.naviSegments[l],v=new fengmap.FMLineMarker,g=new fengmap.FMSegment;g.groupId=s,g.points=m.geoArr,(0,y.default)(p=g.points).call(p,function(e){e.z=a}),v.addSegment(g),e.drawLineMark(v,i[m.entry]),o.push(v)}}}return o}}}}},{key:"convertPointCoordsByCenter",value:function(e,t){return e.x=e.x-t.x,e.y=e.y-t.y,void 0!==e.z&&void 0!==t.z&&(e.z=e.z-t.z),e}},{key:"convertPointsCoordsByCenter",value:function(e,t){for(var n=0;n<e.length;n++)this.convertPointCoordsByCenter(e[n],t);return e}}]),e}();(0,r.default)(n,"getLayerByAlias",function(e,t,n,r){var i=e.getFMGroup(t);if(i&&i.layers){n=(0,h.default)(t=[]).call(t,n);for(var a=[],o=0;o<i.layers.length;o++){var s=i.layers[o];if(s._type_)-1<(0,c.default)(n).call(n,s._type_)&&(r&&r(s,s._type_)&&o--,a.push(s));else for(var l=0;l<n.length;l++){var u=n[l];fengmap.Map.layerAlias[u]&&s instanceof fengmap.Map.layerAlias[u]&&(r&&r(s,u)&&o--,a.push(s))}}return 0==a.length?null:1==a.length?a[0]:a}}),t.default=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=void 0;var c=o(n(31)),d=o(n(32)),f=o(n(15)),p=o(n(9)),m=o(n(29)),v=o(n(2)),g=o(n(3)),y=o(n(141)),_=n(212),x=o(n(231)),w=o(n(542)),b=o(n(94));function M(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=T(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function T(e,t){if(e){if("string"==typeof e)return E(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(e,t){var n,r,i;b.default.d&&(r=b.default.d(t),r.minFilter=fm.LinearFilter,r.generateMipmaps=!1,i=.4,n=new fm.Vector2(i,.12*i/.5),i=new w.default,i.transparent=!0,i.uniforms.scale={value:n},e=-1*(.5*n.x/e-1),n=-1*(1-.5*n.y),i.uniforms.offset={value:new fm.Vector2(e,n)},i.uniforms.mmap={value:r},i.needsUpdate=!0,r=new x.default,i=new fm.Mesh(r,i),i.frustumCulled=!1,b.default[t.uuid].f=i)}n=function(){function n(e,t){(0,v.default)(this,n),this.canvas=e.canvas,this.renderer=null,this._map=t,this._clearColor=16777215,this._clearAlpha=1,this._viewMode=t._viewMode,this._w=this.canvas.width,this._h=this.canvas.height,this._spriteRenderHeight=15,this._poiSpriteHeight=15,this._logarithmicDepthBuffer="boolean"==typeof e.logarithmicDepthBuffer&&e.logarithmicDepthBuffer,this.init(),this._envMap=null,this._renderList=[],this._showCompass=!1,this._compassNode=null,this._lineMarkerScene=new fm.Scene,this._backrenderScene=new fm.Scene,this.background=new fm.Scene,this._backrenderScene.userData.type="lastScene",this._fristRender=!1,this.skyEffect=null,this.reflectEffect=null,this._time=(new Date).getTime(),this._sweep={},this._sweep.max=10,this._sweep.min=0,S(this._w/this._h,t)}return(0,g.default)(n,[{key:"getFrustumByViewMode",value:function(e){return e="3d"===e?this.perspectiveCamera:this.orthographicCamera,e.updateMatrixWorld(!0),(new fm.Frustum).setFromProjectionMatrix((new fm.Matrix4).multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse))}},{key:"getScaleByPixels",value:function(e,t){return t/(e/2*this.domElementHeight)}},{key:"setBackground",value:function(e){this.background.background=(new fm.TextureLoader).load(e)}},{key:"setSkyEffect",value:function(e){this.skyEffect=e,this.skyEffect.updateRenderList()}},{key:"setReflectEffect",value:function(e){this.reflectEffect=e}},{key:"resetCompass",value:function(){var e,t,n,r;this.compassNode&&(e=this.getAspect(),t=this.getScaleByPixels(1,this._map.MapOptions.compassSize),r=-this.getScaleByPixels(1,this._map.MapOptions.compassOffset[1]),n=this.getScaleByPixels(1,this._map.MapOptions.compassOffset[0])/e,r=this.getCompassOffset(this._map.MapOptions.compassPosition,t,e,n,r),this.compassNode.material.uniforms.scale={value:t},this.compassNode.material.uniforms.offset={value:new fm.Vector2(r.ox,r.oy)},this.compassNode.userData.coord={x:r.ox,y:r.oy},this.compassNode.userData.width=.5*t)}},{key:"getCompassOffset",value:function(e,t,n,r,i){var a=1,o=1;switch(e){case 3:a=-1;break;case 2:o=-1;break;case 4:o=-1,a=-1}return n=a*(.5*t/n-1),t=o*(1-.5*t),{ox:n+r,oy:t+i}}},{key:"resetLocationsSize",value:function(){var e,t=this.renderList,n=M(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("location"===r.userData.type){var i,a=M(r.children);try{for(a.s();!(i=a.n()).done;){var o=i.value;this.setLocationSize(o,o.mapNode.size)}}catch(e){a.e(e)}finally{a.f()}}}}catch(e){n.e(e)}finally{n.f()}}},{key:"setLocationSize",value:function(e,t){var n;"3d"===this._viewMode?(n=new fm.Matrix4,n.multiplyMatrices(this.perspectiveCamera.matrixWorldInverse,e.matrixWorld),n=(new fm.Vector3).applyMatrix4(n),n=t/(this.canvas.height/(2*Math.tan(this.perspectiveCamera.fov*fm.Math.DEG2RAD/2)))*Math.abs(n.z),e.scale.set(n,n,n)):(t=t*Math.abs(this.orthographicCamera.top-this.orthographicCamera.bottom)/this.orthographicCamera.zoom/this.canvas.height,e.scale.set(t,t,t))}},{key:"setLabelSize",value:function(e,t){var n;"3d"===this._viewMode?(n=t/(this.canvas.height/(2*Math.tan(this.perspectiveCamera.fov*fm.Math.DEG2RAD/2))),e.scale.set(n,n,n)):(t=t*Math.abs(this.orthographicCamera.top-this.orthographicCamera.bottom)/this.orthographicCamera.zoom/this.canvas.height,e.scale.set(t,t,t)),e.scale.multiplyScalar(e.material.userData.mspriteScale),e.scale.setX(e.scale.x/e.material.userData.scaleRatio)}},{key:"setFacilitySize",value:function(e,t){var n=1,t="3d"===this._viewMode?t/(this.canvas.height/(2*Math.tan(this.perspectiveCamera.fov*fm.Math.DEG2RAD/2))):t*Math.abs(this.orthographicCamera.top-this.orthographicCamera.bottom)/this.orthographicCamera.zoom/this.canvas.height;e.material.userData.scaleRatio&&(n=e.material.userData.scaleRatio),e.scale.set(t,t/n,t)}},{key:"setImageMarkerSize",value:function(e){var t=1,n="3d"===this._viewMode?e.material.userData.size/(this.canvas.height/(2*Math.tan(this.perspectiveCamera.fov*fm.Math.DEG2RAD/2))):e.material.userData.size*Math.abs(this.orthographicCamera.top-this.orthographicCamera.bottom)/this.orthographicCamera.zoom/this.canvas.height;e.material&&(t=e.material.userData.scaleRatio),isNaN(t)&&(t=1),e.scale.set(n,n/t,n)}},{key:"parseGroup",value:function(e){var t=[],n=e._getLayers(!1);this.getShadowScene();var r,i=this.shadowscene.children;for(r in n){var a=n[r];if(!this.needshadow||"model"!==r&&"extent"!==r){var o,s=M(a);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.renderOrder=_.LayerOrder[r],l.e_id=e.eid,t.push(l)}}catch(e){s.e(e)}finally{s.f()}}else{var u,h=M(a[0].children);try{for(h.s();!(u=h.n()).done;){var c=u.value;c instanceof fm.Mesh&&i.push(c)}}catch(e){h.e(e)}finally{h.f()}}}return this.needshadow&&(this.shadowscene.renderOrder=_.LayerOrder.model,t.push(this.shadowscene)),e.locationScene.renderOrder=_.LayerOrder.location,t.push(e.locationScene),e.lineScene.renderOrder=_.LayerOrder.line,t.push(e.lineScene),t}},{key:"getShadowScene",value:function(){this.shadowscene=new fm.Scene;var e=new fm.AmbientLight(7631988),t=new fm.Object3D,n=new fm.DirectionalLight(8947848,1.2);n.position.set(-1,1,1),n.target=t,n.castShadow=!0,n.shadow.camera=new fm.OrthographicCamera(-100,100,100,-100,.5,1e3),n.shadow.mapSize.width=720*y.default.devicePixelRatio,n.shadow.mapSize.height=610*y.default.devicePixelRatio;var r=new fm.DirectionalLight(3355443);r.position.set(-.5,1,-1).normalize(),r.target=t,this.shadowscene.add(n),this.shadowscene.add(e),this.shadowscene.add(r),this.shadowscene.add(t)}},{key:"parseList",value:function(e,t){var o=this,s=[];if(e){var n,r=M(e);try{for(r.s();!(n=r.n()).done;){var i,a=n.value,l=function(e){for(var t=o.parseGroup(e),n=[],r=0;r<t.length;r++)"model"===t[r].name?t[r].traverse(function(e){"oneModel"===e.name&&n.push(e)}):"dynmodel"===t[r].name?t[r].traverse(function(e){"oneModel"===e.name&&n.push(e)}):"extent"===t[r].name&&t[r].traverse(function(e){"oneExtent"===e.name&&n.push(e)});for(var i=0;i<t.length;i++)if("waterMarker"===t[i].name)for(var a=0;a<n.length;a++)t[i].add(n[a]);(0,c.default)(t).call(t,function(e,t){return e.renderOrder-t.renderOrder}),s=(0,d.default)(s).call(s,t)},u=M(a);try{for(u.s();!(i=u.n()).done;){var h=i.value;l(h)}}catch(e){u.e(e)}finally{u.f()}}}catch(e){r.e(e)}finally{r.f()}}return s}},{key:"setBackRender",value:function(e){this._backrenderScene.children=e}},{key:"init",value:function(){this.renderer=this._map.render,this.renderer.setClearColor(this._clearColor,this._clearAlpha);var e=this.canvas.width,t=this.canvas.height;return this.renderer.setSize(e,t),this.renderer.setPixelRatio(y.default.devicePixelRatio),this.renderer.shadowMap.enabled=!0,this.renderer.shadowMap.type=fm.PCFSoftShadowMap,this.renderer.autoClear=!1,this.canvas=this._map.canvas,this.orthographicCamera=this._map.orthographicCamera,this.perspectiveCamera=this._map.perspectiveCamera,!0}},{key:"getCameraByViewMode",value:function(e){return"3d"===e?this.perspectiveCamera:this.orthographicCamera}},{key:"getCurrentCamera",value:function(){return this.getCameraByViewMode(this._viewMode)}},{key:"resetSpriteSize",value:function(){var e,t=this.renderList,n=M(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("facility"===r.userData.type){var i,a=M(r.children);try{for(a.s();!(i=a.n()).done;){var o=i.value;this.setFacilitySize(o,o.mapNode.size)}}catch(e){a.e(e)}finally{a.f()}}else if("label"===r.userData.type){var s,l=M(r.children);try{for(l.s();!(s=l.n()).done;){var u=s.value;this.setLabelSize(u,u.mapNode.size)}}catch(e){l.e(e)}finally{l.f()}}else if("imageMarker"===r.userData.type){var h,c=M(r.children);try{for(c.s();!(h=c.n()).done;){var d=h.value;this.setImageMarkerSize(d)}}catch(e){c.e(e)}finally{c.f()}}else if("textMarker"===r.userData.type){var f,p=M(r.children);try{for(p.s();!(f=p.n()).done;){var m=f.value;this.setLabelSize(m,m.mapNode.size)}}catch(e){p.e(e)}finally{p.f()}}}}catch(e){n.e(e)}finally{n.f()}}},{key:"getAspect",value:function(){return this._w/this._h}},{key:"resize",value:function(){this.renderer.setSize(this._w,this._h),this.perspectiveCamera.aspect=this._w/this._h,this.resizeWater(this._w/this._h),this.perspectiveCamera.updateProjectionMatrix(),this.orthographicCamera.left=-this._w/2,this.orthographicCamera.right=this._w/2,this.orthographicCamera.top=this._h/2,this.orthographicCamera.bottom=-this._h/2,this.orthographicCamera.updateProjectionMatrix()}},{key:"resizeWater",value:function(e){var t;b.default[this._map.uuid].f&&(t=.4,t=new fm.Vector2(t,.12*t/.5),b.default[this._map.uuid].f.material.uniforms.scale={value:t},isNaN(e),e=-1*(.5*t.x/e-1),t=-1*(1-.5*t.y),b.default[this._map.uuid].f.material.uniforms.offset={value:new fm.Vector2(e,t)})}},{key:"resizeLine",value:function(){var e,t=this.renderList,n=M(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("line"===r.userData.type){var i,a=M(r.children);try{for(a.s();!(i=a.n()).done;){var o=i.value;o.material.resolution.set(this.domElementWidth,this.domElementHeight)}}catch(e){a.e(e)}finally{a.f()}}}}catch(e){n.e(e)}finally{n.f()}}},{key:"update",value:function(){var t=this;this._fristRender||(this._map.dispatchEvent({type:"firstRender"}),this._firstRender=!0),(5<Math.abs(this._w-this.canvas.width)||5<Math.abs(this._h-this.canvas.height))&&(this._w=this.canvas.width,this._h=this.canvas.height,this.resize(),this.resetSpriteSize(),this.resetLocationsSize(),this._map.updatePopsPosition(),this.resizeLine(),this.resetCompass());var e="3d"===this._viewMode?this.perspectiveCamera:this.orthographicCamera,n=this.renderList;if(n&&this.renderer){for(var r=0;r<n.length;r++)"waterMarker"===n[r].name?n[r].traverse(function(e){"water"===e.name&&(e.material.uniforms.time.value+=1/60)}):"dynline"===n[r].name&&n[r].traverse(function(e){var t,n,r,i;"line"===e.name&&(t=e.userData.colors,n=t.pop(),r=t.pop(),i=t.pop(),(0,f.default)(t).call(t,0,0,n),(0,f.default)(t).call(t,0,0,r),(0,f.default)(t).call(t,0,0,i),e.geometry.setColors(t))}),this._map.MapOptions.isNeedSweep&&(this._sweep.max<400?(this._sweep.max+=((new Date).getTime()-this._time)/40,this._sweep.min+=((new Date).getTime()-this._time)/40):(this._sweep.max=-610,this._sweep.min=-620),n[r].traverse(function(e){"isNeedSweep"===e.name&&(e.material.uniforms.maxPos.value=t._sweep.max,e.material.uniforms.minPos.value=t._sweep.min)}));if(this._time=(new Date).getTime(),this.renderer.clear(),this.renderer.clearDepth(),this._envMap&&this.renderer.render(this._envMap,e),this.lightEffects)this.effectRender(e);else{void 0!==this.background.background&&this.renderer.render(this.background,e);var i,a=M(n);try{for(a.s();!(i=a.n()).done;){var o=i.value;this.renderer.render(o,e)}}catch(e){a.e(e)}finally{a.f()}e.layers.set(0),this._showCompass&&this._compassNode&&this.renderer.render(this._compassNode,e)}b.default[this._map.uuid].f&&this.renderer.render(b.default[this._map.uuid].f,e),null!==this.skyEffect&&this.skyEffect.update(this,e),null!==this.reflectEffect&&this.reflectEffect.render()}}},{key:"setSceneNodeLayers",value:function(e,t){var n,r=M(e.children);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.mapNode&&!i.mapNode.picLoading&&i.layers.set(t)}}catch(e){r.e(e)}finally{r.f()}}},{key:"setClearColor",value:function(e,t){"string"==typeof e&&0<=(0,p.default)(e).call(e,"#")?this._clearColor=(0,m.default)(e.replace("#","0x")):this._clearColor=e,this._clearAlpha="number"==typeof t?t:1,this.renderer.setClearColor(this._clearColor,this._clearAlpha)}},{key:"setEnvMap",value:function(e){var t;e&&e.path&&e.format&&(t=e.path,e=e.format,e=(new fm.CubeTextureLoader).load([t+"px"+e,t+"nx"+e,t+"py"+e,t+"ny"+e,t+"pz"+e,t+"nz"+e]),this._envMap||(this._envMap=new fm.Scene),this._envMap.background=e)}},{key:"dispose",value:function(){this._envMap&&(this._envMap=void 0);var e=this.renderList;if(e){var t,n=M(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r){for(var i=r.children.length-1;-1<i;i--)r.remove(r.children[i]);r.children.length=0,r=void 0}}}catch(e){n.e(e)}finally{n.f()}}this._compassNode&&(this._compassNode.material.dispose(),this._compassNode.geometry.dispose());for(var a=this._lineMarkerScene.children.length-1;-1<a;a--)this._lineMarkerScene.remove(this._lineMarkerScene.children[a]);this._map=void 0,this.renderer.dispose(),this.renderer.forceContextLoss(),this.canvas=void 0,this.renderer=void 0}},{key:"renderList",get:function(){return this._renderList},set:function(e){this._renderList=this.parseList(e,void 0)}},{key:"domElementHeight",get:function(){return this.canvas.height}},{key:"domElementWidth",get:function(){return this.canvas.width}},{key:"viewMode",set:function(e){this._viewMode=e}},{key:"showCompass",get:function(){return this._showCompass},set:function(e){this._showCompass=e}},{key:"compassNode",get:function(){return this._compassNode},set:function(e){this._compassNode=e}},{key:"lineMarkerScene",get:function(){return this._lineMarkerScene}}]),n}(),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.abortAnimationFrame=t.doAnimationFrame=void 0;var a=i(n(64)),o=0,n=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-o)),r=(0,a.default)(function(){e(t+n)},n);return o=t+n,r};t.doAnimationFrame=n,n=function(e){clearTimeout(e)},t.abortAnimationFrame=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var s=a(n(10)),l=a(n(13)),o=a(n(9)),u=a(n(2)),h=a(n(3)),c=a(n(5)),d=a(n(6)),f=a(n(7)),p=a(n(48)),m=a(n(149)),v=a(n(78)),g=a(n(36)),y=a(n(115)),_=a(n(154)),x=n(67),n=a(n(155));function w(n){var r=b();return function(){var e,t=(0,f.default)(n),t=r?(e=(0,f.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,d.default)(this,t)}}function b(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,c.default)(i,e);var r=w(i);function i(e,t){var n;return(0,u.default)(this,i),n=r.call(this,0,g.default.IMAGE_MARKER),n._map=e,n._url=t.url,n._size=t.size,n._map.wxInfo.pixelRatio&&(n._size*=n._map.wxInfo.pixelRatio),n._height=0,n._offsetHeight=t.height||0,n._opx=t.x||0,n._opy=t.y||0,n._callBack=t.callback,n._moveAnimater=null,n._isMoving=!1,n._depth=t.depth,n._isJumping=!1,n._origonY=0,n.center=n.getCenterByAnchor(t.anchor),n.picLoading=!1,n.markername=t.name,n}return(0,h.default)(i,[{key:"init",value:function(){var e=this,t=this.findParent(p.default);if(!t)return!1;var n=!0,r=t.materialManager.createPoiMaterial({imageUrl:this._url,imageSrc:this._url,alpha:1},null,function(){e._renderNode?(e.picLoading=!1,e._renderNode.layers.set(0),e._renderNode.frustumCulled=!1,(0,s.default)(t).renderer.setImageMarkerSize(e._renderNode)):n=!1},this._depth,this._priority);r.userData.size=this._size,this._renderNode=new y.default(r),this._renderNode.markername=this.markername,n&&(this.picLoading=!0,this._renderNode.layers.set(2)),this._renderNode.mapNode=this,this._renderNode.parent=this.parent.scene,this._renderNode.center.set(this.center.x,this.center.y),(0,s.default)(t).renderer.setImageMarkerSize(this._renderNode),this._renderNode.visible=this.show,this._renderNode.name="spirit",this._isInit=!0;var i=this.parent.parent.groupID,r=this.parent.parent.parent.mapcenter;return this._opx&&this._opy?(this._x=this._opx,this._y=this._opy):(this._x=r.x,this._y=r.y),this.setPosition(this.x,this.y,i,this._offsetHeight),this._callBack&&this._callBack(this),!0}},{key:"setPosition",value:function(e,t,n,r){var i=this.findParent(m.default);i?("number"==typeof n&&0<n&&this.moveToGroup(n),n=i.center,i=i.mapcenter,this._height=r,this._x=e,this._y=t,this._renderNode.position.set(this._x-i.x,n.y+this._height,n.y-this._y+i.y)):console.error("Can't change position before map init Marker")}},{key:"getPosition",value:function(){return{x:this._y,y:this._y,z:this._height,groupID:this.parent.parent.groupID}}},{key:"moveTo",value:function(t){var e,n,r,i,a,o=this;this._isMoving||(e=this.findParent(p.default),n=t.x,r=t.y,i=null,i=t.height||this._height,a=new v.default({x:this.x,y:this.y,height:this._height},{x:n,y:r,height:i},1e3*t.time,function(){(0,s.default)(e).removeAnimater(a),o._moveAnimater=null,o._isMoving=!1,t.callback()},function(e){o.setPosition(e.x,e.y,0,e.height),t.update(e)}).start(),this._isMoving=!0,(0,s.default)(e).addAnimater(a),this._moveAnimater=a)}},{key:"moveToGroup",value:function(e){var t=this.findParent(p.default),n=this.parent.parent.groupID;n!==e&&(this.parent.parent.parent.groups[""+e]?(this._groupId=e,e=this.parent.parent.parent.groups[""+e].getOrCreateLayer("imageMarker"),this.parent.untiedMarker(this),e.addMarker(this),this._renderNode.material.opacity=.9,(0,s.default)(t).renderer.setImageMarkerSize(this._renderNode)):console.warn(x.tileMessage.noGroup))}},{key:"stopMoveTo",value:function(){var e=this.findParent(p.default);this._moveAnimater&&this._moveAnimater.stop(),(0,s.default)(e).removeAnimater(this._moveAnimater),this._isMoving=!1,this._moveAnimater=null}},{key:"jump",value:function(e){var n,r,i,a,o=this;this._renderNode&&!this._isJumping&&(this._isJumping=!0,n=(0,l.default)({height:8,times:0,duration:1,delay:0},e),"number"==typeof n.height&&"number"==typeof n.times&&"number"==typeof n.duration&&"number"==typeof n.delay&&(n.duration*=1e3,n.delay*=1e3,n.all=n.duration+n.delay,n.halfDuration=n.duration/2,r=n.height-this._height,this._origonY=this._renderNode.position.y,i=(new Date).getTime(),e=this.findParent(p.default),a=(0,s.default)(e),this.jumpEvent=function(e){var t;o._renderNode?(t=(new Date).getTime()-i,0!=n.times&&t/n.all>n.times?o.stopJump():(t%=n.all,t>n.duration?o._renderNode.position.y!=o._origonY&&(o._renderNode.position.y=o._origonY):(t=t/n.halfDuration-1,t=1-t*t,o._renderNode.position.y=o._origonY+r*t))):a.off("frameLoop",o.jumpEvent)},a.on("frameLoop",this.jumpEvent)))}},{key:"stopJump",value:function(){var e;this._renderNode&&this.jumpEvent&&(this._renderNode.position.y=this._origonY,this._isJumping=!1,e=this.findParent(p.default),e=(0,s.default)(e),e.off("frameLoop",this.jumpEvent))}},{key:"url",get:function(){return this._url},set:function(e){var t=this.findParent(p.default);if(!t)return!1;t=t.materialManager.createPoiMaterial({imageUrl:e,imageSrc:e,alpha:1}),t.userData.size=this._size,this._renderNode.material.dispose(),this._renderNode.material=t,this._url=e}},{key:"setSize",value:function(){var e=this.findParent(p.default);(0,s.default)(e).renderer.setFacilitySize(this._renderNode,this._size)}},{key:"getCenterByAnchor",value:function(e){var t=new fm.Vector2(.5,.5);switch(e){case _.default.LEFT:t.setX(0);break;case _.default.RIGHT:t.setX(1);break;case _.default.TOP:t.setY(1);break;case _.default.BOTTOM:t.setY(0);break;case _.default.LEFT_TOP:t.set(0,1);break;case _.default.RIGHT_TOP:t.set(1,1);break;case _.default.LEFT_BOTTOM:t.set(0,0);break;case _.default.RIGHT_BOTTOM:t.set(1,0)}return t}},{key:"visible",set:function(e){var t;e?(0,o.default)(t=this.parent.scene.children).call(t,this._renderNode)<0&&this._renderNode&&this.parent.scene.add(this._renderNode):this._renderNode&&this.parent.scene.remove(this._renderNode),this._visible=e}},{key:"size",get:function(){return this._size},set:function(e){this._size=e}},{key:"height",set:function(e){this._height=e,this._renderNode.position.y=this._height}}]),i}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),r=a(n(17)),c=a(n(547)),d=a(n(36)),f=a(n(78)),p=n(67);function m(n){var r=v();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function v(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,l.default)(i,e);var r=m(i);function i(e,t){var n;return(0,o.default)(this,i),n=r.call(this,0,d.default.LOCATION_MARKER),n._map=e,n._size=t.size||20,n._map.wxInfo.pixelRatio&&(n._size*=n._map.wxInfo.pixelRatio),n._url=t.url,n._groupId=t.groupID||1,n._x=t.x||n._x,n._y=t.y||n._y,n._dheight=t.height||2.1,n._gid=t.groupID||1,n._scene=null,n._renderNode=null,n._callBack=t.callback,n.rotateAnimater=null,n}return(0,s.default)(i,[{key:"initSprite",value:function(e){var t=this,n=new c.default,r=new fm.MeshBasicMaterial,i=!0;return e.materialManager.loadTexture(this._url,function(e){e.minFilter=fm.LinearFilter,e.generateMipmaps=!1,e.flipY=!1,r.map=e,r.needsUpdate=!0,t._renderNode?(t.picLoading=!1,t._renderNode.layers.set(0)):i=!1}),r.side=2,r.transparent=!0,this._renderNode=new fm.Mesh(n,r),this._renderNode.mapNode=this,i&&(this.picLoading=!0,this._renderNode.layers.set(2)),n=this._scene.mapcenter,this._x&&this._y||(this._x=n.x,this._y=n.y),this._callBack&&this._callBack(this),this.setPosition({x:this._x,y:this._y}),!0}},{key:"setPosition",value:function(e){if(this._scene){void 0!==e.zOffset&&(this._dheight=e.zOffset),void 0!==e.height&&(this._dheight=e.height);var t=this._scene.groups[this._gid];if(e.groupID&&e.groupID!==this._gid){var n=t,r=this._scene.groups[e.groupID];if(!r)return void console.warn(p.tileMessage.noGroup);n.removeLocation(this),r.addLocation(this),t=r,this.isAlwaysShow&&this.alwaysShow(),this._gid=e.groupID,this._groupId=this._gid}t=this._scene.mapcenter,this._x=e.x,this._y=e.y,this._renderNode.position.set(this._x-t.x,this._dheight,-this._y+t.y)}else console.error("Can't change position before map init Marker")}},{key:"rotate",value:function(e){this._renderNode.rotation.y=e*fm.Math.DEG2RAD}},{key:"rotateTo",value:function(t){var n=this,e=this.renderNode.rotation.y,r=t.to%360*fm.Math.DEG2RAD,i=r,a=0;r-e!=0&&(a=Math.sin(r-e)/Math.abs(Math.sin(r-e))*Math.acos(Math.cos(r-e))),a=e+a,this.rotateAnimater&&(this.rotateAnimater.stop(),this._map.removeAnimater(this.rotateAnimater));var o=new f.default({angle:e},{angle:a},t.duration?1e3*t.duration:500,function(){n._map.removeAnimater(o),n.rotateAnimater=null,n._renderNode.rotation.y=i,t.callback&&t.callback()},function(e){n._renderNode.rotation.y=e.angle,t.update&&t.update()}).start();this._map.addAnimater(o),this.rotateAnimater=o}},{key:"moveTo",value:function(t){var e,n,r,i=this;this._isRuning||(e=t.x,n=t.y,r=new f.default({x:this._x,y:this._y},{x:e,y:n},t.time?1e3*t.time:500,function(){i._map.removeAnimater(r),i._isRuning=!1,t.callback&&t.callback()},function(e){i.setPosition({x:e.x,y:e.y,groupID:0,height:i._dheight}),t.update&&t.update(e)}).start(),this._isRuning=!0,this._map.addAnimater(r))}},{key:"alwaysShow",value:function(){var e;this._alwaysShow=!0;for(var t=this.parent;t;){if(t.isGroup){e=t;break}t=t.parent}e&&this.renderNode&&(this.renderNode.material.depthTest=!1,e.alwaysShowMarkers.push(this.renderNode))}},{key:"dispose",value:function(){this.parent&&this.parent.removeLocation(this),this.parent=null,this._renderNode&&(this._renderNode.material.dispose(),this._renderNode.geometry.dispose(),this._renderNode.material=void 0,this._renderNode.geometry=void 0,this._renderNode.mapNode=void 0,this._renderNode=void 0)}},{key:"direction",get:function(){return this.renderNode.rotation.y},set:function(e){this.renderNode.rotation.y=e*fm.Math.DEG2RAD}},{key:"scene",set:function(e){this._scene=e}},{key:"map",set:function(e){this._map=e}},{key:"size",get:function(){return this._size}},{key:"renderNode",get:function(){return this._renderNode}},{key:"groupID",get:function(){return this._groupId}},{key:"height",get:function(){return this._dheight}}]),i}(r.default),t.default=r},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={FULL:"full",DOTTED:"dotted",DOT_DASH:"dotDash",CENTER:"center",DASH:"dash",DOUBLE_DOT_DASH:"doubleDotDash",TRI_DOT_DASH:"triDotDash",NORMAL:"normal",ARROW:"arrow",RAW:"raw",FMARROW:"fmarrow",TEXTURE:"texture"},t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(91)),n=i(n(60));fm.UniformsLib.line={linewidth:{value:1},resolution:{value:new fm.Vector2(1,1)},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1},mmap:{value:null},offset:{value:new fm.Vector2(0,0)},repeat:{value:new fm.Vector2(1,1)},miny:{value:0},pcolor:{value:new fm.Color(11447982)}},fm.ShaderLib.line={uniforms:fm.UniformsUtils.merge([fm.UniformsLib.common,fm.UniformsLib.fog,fm.UniformsLib.line]),vertexShader:"\n\t\t#include <common>\n\t\t#include <color_pars_vertex>\n\t\t#include <fog_pars_vertex>\n\t\t#include <logdepthbuf_pars_vertex>\n\t\t#include <clipping_planes_pars_vertex>\n\n\t\tuniform float linewidth;\n\t\tuniform vec2 resolution;\n\n\t\tattribute float uvyStart;\n\t\tattribute float uvyEnd;\n\n\t\tattribute vec3 instanceStart;\n\t\tattribute vec3 instanceEnd;\n\n\t\tattribute vec3 instanceColorStart;\n\t\tattribute vec3 instanceColorEnd;\n\t\tattribute vec2 uv2;\n\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec2 vUv2;\n\t\tvarying float uvScale;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashScale;\n\t\t\tattribute float instanceDistanceStart;\n\t\t\tattribute float instanceDistanceEnd;\n\t\t\tvarying float vLineDistance;\n\n\t\t#endif\n\n\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t// conservative estimate of the near plane\n\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#ifdef USE_COLOR\n\n\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t#endif\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\n\t\t\t#endif\n\n\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\tvUv = uv;\n\t\t\t\n\t\t\tfloat duvy = uvyEnd - uvyStart;\n\t\t\tfloat uvy = uvyStart + duvy * uv2.y;\n\t\t\t// vUv2 = vec2(uv2.x ,uvy);\n\t\t\tvUv2 = ( position.y < 0.5 ) ? vec2(uv2.x ,uvyStart) : vec2(uv2.x ,uvyEnd);\n\t\t\t// camera space\n\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\tif ( perspective ) {\n\n\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// clip space\n\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t// ndc space\n\t\t\tvec2 ndcStart = clipStart.xy / clipStart.w;\n\t\t\tvec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\n\t\t\t// direction\n\t\t\tvec2 dir = ndcEnd - ndcStart;\n\n\t\t\t// account for clip-space aspect ratio\n\t\t\tdir.x *= aspect;\n\t\t\tfloat scaleDir = length(dir);\n\t\t\tuvScale = 0.05/scaleDir;\n\t\t\tdir = normalize( dir );\n\n\t\t\t// perpendicular to dir\n\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\n\t\t\t// undo aspect ratio adjustment\n\t\t\tdir.x /= aspect;\n\t\t\toffset.x /= aspect;\n\n\t\t\t// sign flip\n\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t// endcaps\n\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\toffset += - dir;\n\n\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\toffset += dir;\n\n\t\t\t}\n\n\t\t\t// adjust for linewidth\n\t\t\toffset *= linewidth;\n\n\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\toffset /= resolution.y;\n\n\t\t\t// select end\n\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t// back to clip space\n\t\t\toffset *= clip.w;\n\n\t\t\tclip.xy += offset;\n\n\t\t\tgl_Position = clip;\n\n\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t#include <logdepthbuf_vertex>\n\t\t\t\n\t\t\t#include <fog_vertex>\n\n\t\t}\n\t\t",fragmentShader:"\n\t\tuniform vec3 diffuse;\n\t\tuniform float opacity;\n\t\tuniform vec2 repeat;\n\t\tuniform vec2 offset;\n\t\tuniform float miny;\n\t\tuniform vec3 pcolor;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashSize;\n\t\t\tuniform float gapSize;\n\n\t\t#endif\n\t\t\n\t\t\n\n\t\t\tuniform sampler2D mmap;\n\n\t\n\n\t\tvarying float vLineDistance;\n\n\t\t#include <common>\n\t\t#include <color_pars_fragment>\n\t\t#include <fog_pars_fragment>\n\t\t#include <logdepthbuf_pars_fragment>\n\t\t#include <clipping_planes_pars_fragment>\n\n\t\tvarying float uvScale;\n\t\tvarying vec2 vUv;\n\t\tvarying vec2 vUv2;\n\n\t\tvoid main() {\n\n\t\t\t#include <clipping_planes_fragment>\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\tif ( mod( vLineDistance, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t#endif\n\n\t\t\t// if ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t// \tfloat a = vUv.x;\n\t\t\t// \tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t// \tfloat len2 = a * a + b * b;\n\n\t\t\t// \tif ( len2 > 1.0 ) discard;\n\n\t\t\t// }\n\n\t\t\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t\n\t\t\t#ifdef USE_MMAP\n\t\t\t\n\t\t\t\tif(vUv2.y>miny){\t\t\t\t\n\t\t\t\tdiffuseColor = texture2D( mmap, vUv2 * repeat + offset );\n\t\t\t\t}else{\n\t\t\t\t\tdiffuseColor = vec4(pcolor,1.0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t#endif\n\n\t\t\t#include <logdepthbuf_fragment>\n\t\t\tgl_FragColor = diffuseColor;\n\n\t\t\t#include <premultiplied_alpha_fragment>\n\t\t\t#include <tonemapping_fragment>\n\t\t\t#include <encodings_fragment>\n\t\t\t#include <fog_fragment>\n\n\t\t}\n\t\t"},fm.LineMaterial=function(e){fm.ShaderMaterial.call(this,{type:"LineMaterial",uniforms:fm.UniformsUtils.clone(fm.ShaderLib.line.uniforms),vertexShader:fm.ShaderLib.line.vertexShader,fragmentShader:fm.ShaderLib.line.fragmentShader}),this.dashed=!1,(0,a.default)(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}}}),this.setValues(e)},fm.LineMaterial.prototype=(0,n.default)(fm.ShaderMaterial.prototype),fm.LineMaterial.prototype.constructor=fm.LineMaterial,fm.LineMaterial.prototype.isLineMaterial=!0,fm.LineMaterial.prototype.copy=function(e){return fm.ShaderMaterial.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.resolution=e.resolution,this},n=fm.LineMaterial,t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),c=a(n(250));function d(n){var r=f();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function f(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,l.default)(n,e);var t=d(n);function n(){var e;return(0,o.default)(this,n),e=t.call(this),e.type="LineGeometry",e.isLineGeometry=!0,e}return(0,s.default)(n,[{key:"setPositions",value:function(e){for(var t=e.length-3,n=new Float32Array(2*t),r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return this.test="ddd",(new c.default).setPositions.call(this,n),this}},{key:"setColors",value:function(e){for(var t=e.length-3,n=new Float32Array(2*t),r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return(new c.default).setColors.call(this,n),this}},{key:"fromLine",value:function(e){return e=e.geometry,e.isGeometry?this.setPositions(e.vertices):e.isBufferGeometry&&this.setPositions(e.position.array),this}},{key:"copy",value:function(e){return this}}]),n}(c.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var s=a(n(14)),l=a(n(2)),u=a(n(3)),h=a(n(5)),o=a(n(6)),c=a(n(7));function d(n){var r=f();return function(){var e,t=(0,c.default)(n),t=r?(e=(0,c.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,o.default)(this,t)}}function f(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,h.default)(o,e);var a=d(o);function o(){var e;(0,l.default)(this,o),e=a.call(this),e.type="LineSegmentsGeometry",new fm.BufferGeometry;var t=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],n=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],r=[0,0,1,0,0,1/3,1,1/3,0,2/3,1,2/3,0,1,1,1],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];return e.isLineSegmentsGeometry=!0,e.setIndex(i),e.setAttribute("position",new fm.Float32BufferAttribute(t,3)),e.setAttribute("uv",new fm.Float32BufferAttribute(n,2)),e.setAttribute("uv2",new fm.Float32BufferAttribute(r,2)),e}return(0,u.default)(o,[{key:"applyMatrix",value:function(e){var t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return void 0!==t&&(e.applyToBufferAttribute(t),e.applyToBufferAttribute(n),t.data.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}},{key:"setPositions",value:function(e){e instanceof Float32Array?t=e:(0,s.default)(e)&&(t=new Float32Array(e));var t=new fm.InstancedInterleavedBuffer(t,6,1);return this.setAttribute("instanceStart",new fm.InterleavedBufferAttribute(t,3,0)),this.setAttribute("instanceEnd",new fm.InterleavedBufferAttribute(t,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}},{key:"setColors",value:function(e){e instanceof Float32Array?t=e:(0,s.default)(e)&&(t=new Float32Array(e));var t=new fm.InstancedInterleavedBuffer(t,6,1);return this.addAttribute("instanceColorStart",new fm.InterleavedBufferAttribute(t,3,0)),this.addAttribute("instanceColorEnd",new fm.InterleavedBufferAttribute(t,3,3)),this}},{key:"setUvys",value:function(e){e instanceof Float32Array?t=e:(0,s.default)(e)&&(t=new Float32Array(e));var t=new fm.InstancedInterleavedBuffer(t,2,1);return this.addAttribute("uvyStart",new fm.InterleavedBufferAttribute(t,1,0)),this.addAttribute("uvyEnd",new fm.InterleavedBufferAttribute(t,1,1)),this}},{key:"fromWireframeGeometry",value:function(e){return this.setPositions(e.attributes.position.array),this}},{key:"fromEdgesGeometry",value:function(e){return this.setPositions(e.attributes.position.array),this}},{key:"fromMesh",value:function(e){return this.fromWireframeGeometry(new fm.WireframeGeometry(e.geometry)),this}},{key:"fromLineSegements",value:function(e){return e=e.geometry,e.isGeometry?this.setPositions(e.vertices):e.isBufferGeometry&&this.setPositions(e.position.array),this}},{key:"computeBoundingBox",value:function(){var e=new fm.Box3;null===this.boundingBox&&(this.boundingBox=new fm.Box3);var t=this.attributes.instanceStart,n=this.attributes.instanceEnd;void 0!==t&&void 0!==n&&(this.boundingBox.setFromBufferAttribute(t),e.setFromBufferAttribute(n),this.boundingBox.union(e))}},{key:"computeBoundingSphere",value:function(){var e=new fm.Vector3;null===this.boundingSphere&&(this.boundingSphere=new fm.Sphere),null===this.boundingBox&&this.computeBoundingBox();var t=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(void 0!==t&&void 0!==n){var r=this.boundingSphere.center;this.boundingBox.getCenter(r);for(var i=0,a=0,o=t.count;a<o;a++)e.fromBufferAttribute(t,a),i=Math.max(i,r.distanceToSquared(e)),e.fromBufferAttribute(n,a),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("fm.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}},{key:"toJSON",value:function(){}},{key:"clone",value:function(){}},{key:"copy",value:function(e){return this}}]),o}(fm.InstancedBufferGeometry),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),n=function e(){(0,a.default)(this,e),this.circle,this.polygon,this.eName,this.FID,this.groupID,this.ID,this.keyword,this.name,this.typeID,this.nodeType,this.startPoint,this.pathPoints,this.bufferRadius},n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var I=i(n(9)),L=i(n(29)),R=i(n(14)),N=i(n(10)),k=i(n(27)),a=i(n(2)),o=i(n(3)),P=i(n(28)),n=function(){function t(e){(0,a.default)(this,t),this._data=e,this.Graphics=new P.default}return(0,o.default)(t,[{key:"check2",value:function(e,t,n,r,i,a,o){var s,l,u,h="",c="",d="";n.name&&(h=n.name),n.eName&&(c=n.eName),n.keyword&&(d=n.keyword),n.circle&&(l=n.circle),n.polygon&&(u=2<n.polygon.length?new SearchPolygon(n.polygon,!0):null);var f=e.name,p=e.ename,m=e.type,v=void 0===n.typeID||!(!n.typeID||!m)&&(g="number"==typeof n.typeID?[n.typeID]:n.typeID,-1<(0,I.default)(g).call(g,(0,L.default)(m))),g=!1;p&&c&&-1<(0,I.default)(m=p.toLowerCase()).call(m,c.toLowerCase())&&(g=!0),p&&d&&-1<(0,I.default)(s=p.toLowerCase()).call(s,d.toLowerCase())&&(g=!0),f&&d&&-1<(0,I.default)(s=f.toLowerCase()).call(s,d.toLowerCase())&&(g=!0),f&&h&&-1<(0,I.default)(f=f.toLowerCase()).call(f,h.toLowerCase())&&(g=!0),d||c||h||(g=!0),y=void 0===n.FID||!(!e.fid||!n.FID)&&(y=n.FID,y=(0,R.default)(y)?(0,N.default)(y).call(y,function(e){return e.toString()}):[y.toString()],-1<(0,I.default)(y).call(y,e.fid.toString())),_=void 0===n.ID||!(!e.eid||!n.ID)&&(_=n.ID,(0,R.default)(_)?fids=(0,N.default)(fids).call(fids,function(e){return e.toString()}):_=[_.toString()],-1<(0,I.default)(_).call(_,e.eid.toString()));var y=g&&v&&y&&_;if(y){if(l){var _=t.geo;"model"===r&&i&&(_=i);var y=_.substring(6,_.length-1).split(" "),_=(0,k.default)(y[0]),y=(0,k.default)(y[1]),x=l.center,w=Math.sqrt((_-x.x)*(_-x.x)+(y-x.y)*(y-x.y));if(w<l.radius)return o&&(o.distance=w),!0;if("model"==r){var b=0,M=null,T=this._map.getFMGroup(a).getNodeByLayerId("model",e.eid);o.target=T,T&&T._data&&(M=T._data.vertices),null==M&&(M=DataManager.convertGeo2Geometry(t.geo).vertices);for(var E=M.length/2,S=0;S<E-1;S++){var A=2*S,b=P.default.pointDistanceToLine(x,{x:M[A],y:M[A+1]},{x:M[A+2],y:M[A+3]},{});if(b<l.radius)return o&&(o.distance=w),!0}if(P.default.pointInPolygonVector2d(M,x,M.length))return o.distance=w,!0}return!1}if(!u)return!0;if(T=t.geo,"model"===r&&i&&(T=i),T=T.substring(6,T.length-1).split(" "),T={x:(0,k.default)(T[0]),y:(0,k.default)(T[1])},u.contain(T))return o.distance=u.distanceToPoint(T),!0;if("model"==r&&(r=null,e=this._map.getFMGroup(a).getNodeByLayerId("model",e.eid),o.target=e,e&&e._data&&(r=e._data.vertices),null==r&&(r=DataManager.convertGeo2Geometry(t.geo).vertices),u.containXYArray(r)))return o.distance=u.distanceToPoint(T),!0}return!1}},{key:"check",value:function(e,t,n,r,i,a){if(void 0!==n.FID&&n.FID!==e.fid)return!1;if(void 0!==n.groupID&&n.groupID!==a)return!1;if(void 0!==n.ID&&n.ID!==e.eid)return!1;if(void 0!==n.name&&n.name!==e.name)return!1;if(void 0!==n.eName&&n.eName!==e.ename)return!1;if(void 0!==n.typeID&&n.typeID!==e.type)return!1;var o;if(void 0!==n.keyword)if(e.name&&e.ename){if((0,I.default)(a=e.name.toLowerCase()).call(a,n.keyword.toLowerCase())<0&&e.ename&&(0,I.default)(a=e.ename.toLowerCase()).call(a,n.keyword.toLowerCase())<0)return!1}else if(e.name&&!e.ename){if((0,I.default)(o=e.name.toLowerCase()).call(o,n.keyword.toLowerCase())<0)return!1}else if(!e.name&&e.ename){if((0,I.default)(o=e.ename.toLowerCase()).call(o,n.keyword.toLowerCase())<0)return!1}else if(!e.name&&!e.ename)return!1;return!0}},{key:"everyModel",value:function(e,t){for(var n=e.biz[0].modelLayer.length,r=0;r<n;r++)t(e.biz[0].modelLayer[r],e.geo[0].modelLayer[r],"model",e.geo[0].labelLayer[r])}},{key:"everyExternalModel",value:function(e,t){var n=e.biz[0].externalModelLayer.length,r=e.geo[0].externalModelLayer.length,i=e.geo[0].labelLayer.length;r<n&&(n=r),i<n&&(n=i);for(var a=0;a<n;a++)e.gid,t(e.biz[0].externalModelLayer[a],e.geo[0].externalModelLayer[a],"externalModel",e.geo[0].labelLayer[a])}},{key:"everyFacility",value:function(e,t){for(var n=e.biz[0].poiLayer.length,r=0;r<n;r++)t(e.biz[0].poiLayer[r],e.geo[0].poiLayer[r],"poi")}},{key:"everyLabel",value:function(e,t){for(var n=e.biz[0].labelLayer.length,r=0;r<n;r++)t(e.biz[0].labelLayer[r],e.geo[0].labelLayer[r],"label")}}]),t}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),n=function e(t){(0,a.default)(this,e),this._data=t},n=n;t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(5)),l=a(n(6)),u=a(n(7)),r=a(n(253)),h=a(n(28));function c(n){var r=d();return function(){var e,t=(0,u.default)(n),t=r?(e=(0,u.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,l.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,s.default)(r,e);var n=c(r);function r(e,t){return(0,o.default)(this,r),e=n.call(this,e),e._map=t,e.Graphics=h.default,e}return r}(r.default),t.default=r},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.Quaternion=o;var t=i(n(13)),m=i(n(189)),i=i(n(91)),a=n(119);function o(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._w=void 0!==r?r:1}(0,t.default)(o,{slerp:function(e,t,n,r){return n.copy(e).slerp(t,r)},slerpFlat:function(e,t,n,r,i,a,o){var s=n[r+0],l=n[r+1],u=n[r+2],h=n[r+3],c=i[a+0],d=i[a+1],f=i[a+2],p=i[a+3];h===p&&s===c&&l===d&&u===f||(n=1-o,r=s*c+l*d+u*f+h*p,i=0<=r?1:-1,a=1-r*r,a>m.default&&(a=Math.sqrt(a),r=Math.atan2(a,r*i),n=Math.sin(n*r)/a,o=Math.sin(o*r)/a),i*=o,s=s*n+c*i,l=l*n+d*i,u=u*n+f*i,h=h*n+p*i,n===1-o&&(o=1/Math.sqrt(s*s+l*l+u*u+h*h),s*=o,l*=o,u*=o,h*=o)),e[t]=s,e[t+1]=l,e[t+2]=u,e[t+3]=h}}),(0,i.default)(o.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}}}),(0,t.default)(o.prototype,{isQuaternion:!0,set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,a=e.order,o=Math.cos,s=Math.sin,l=o(n/2),e=o(r/2),o=o(i/2),n=s(n/2),r=s(r/2),i=s(i/2);return"XYZ"===a?(this._x=n*e*o+l*r*i,this._y=l*r*o-n*e*i,this._z=l*e*i+n*r*o,this._w=l*e*o-n*r*i):"YXZ"===a?(this._x=n*e*o+l*r*i,this._y=l*r*o-n*e*i,this._z=l*e*i-n*r*o,this._w=l*e*o+n*r*i):"ZXY"===a?(this._x=n*e*o-l*r*i,this._y=l*r*o+n*e*i,this._z=l*e*i+n*r*o,this._w=l*e*o-n*r*i):"ZYX"===a?(this._x=n*e*o-l*r*i,this._y=l*r*o+n*e*i,this._z=l*e*i-n*r*o,this._w=l*e*o+n*r*i):"YZX"===a?(this._x=n*e*o+l*r*i,this._y=l*r*o+n*e*i,this._z=l*e*i-n*r*o,this._w=l*e*o-n*r*i):"XZY"===a&&(this._x=n*e*o-l*r*i,this._y=l*r*o-n*e*i,this._z=l*e*i+n*r*o,this._w=l*e*o+n*r*i),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,t=Math.sin(n);return this._x=e.x*t,this._y=e.y*t,this._z=e.z*t,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,r=n[0],i=n[4],a=n[8],o=n[1],s=n[5],l=n[9],u=n[2],h=n[6],e=n[10],n=r+s+e;return 0<n?(t=.5/Math.sqrt(n+1),this._w=.25/t,this._x=(h-l)*t,this._y=(a-u)*t,this._z=(o-i)*t):s<r&&e<r?(t=2*Math.sqrt(1+r-s-e),this._w=(h-l)/t,this._x=.25*t,this._y=(i+o)/t,this._z=(a+u)/t):e<s?(t=2*Math.sqrt(1+s-r-e),this._w=(a-u)/t,this._x=(i+o)/t,this._y=.25*t,this._z=(l+h)/t):(t=2*Math.sqrt(1+e-r-s),this._w=(o-i)/t,this._x=(a+u)/t,this._y=(l+h)/t,this._z=.25*t),this._onChangeCallback(),this},setFromUnitVectors:function(e,t){var n=1e-6,r=e.dot(t)+1;return r<n?(r=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0):(this._x=0,this._y=-e.z,this._z=e.y)):(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:function(e){return 2*Math.acos(Math.abs(a._Math.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);return 0===n||(n=Math.min(1,t/n),this.slerp(e,n)),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,e=t._z,t=t._w;return this._x=n*t+a*o+r*e-i*s,this._y=r*t+a*s+i*o-n*e,this._z=i*t+a*e+n*s-r*o,this._w=a*t-n*o-r*s-i*e,this._onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,a=this._w,o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),1<=o)return this._w=a,this._x=n,this._y=r,this._z=i,this;if(e=1-o*o,e<=m.default){var s=1-t;return this._w=s*a+t*this._w,this._x=s*n+t*this._x,this._y=s*r+t*this._y,this._z=s*i+t*this._z,this.normalize(),this._onChangeCallback(),this}return s=Math.sqrt(e),e=Math.atan2(s,o),o=Math.sin((1-t)*e)/s,s=Math.sin(t*e)/s,this._w=a*o+this._w*s,this._x=n*o+this._x*s,this._y=r*o+this._y*s,this._z=i*o+this._z*s,this._onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},_onChange:function(e){return this._onChangeCallback=e,this},_onChangeCallback:function(){}})},function(H,e,j){"use strict";!function(e,m){var v=j(120);H.exports=f;var a,r=j(257);f.ReadableState=d,j(160).EventEmitter;var g=function(e,t){return e.listeners(t).length},n=j(258),s=j(121).Buffer,t=e.Uint8Array||function(){};function l(e){return s.from(e)}function i(e){return s.isBuffer(e)||e instanceof t}var o=Object.create(j(96));o.inherits=j(79);var u,e=j(580),y=void 0,y=e&&e.debuglog?e.debuglog("stream"):function(){},h=j(581),e=j(260);o.inherits(f,n);var c=["error","close","destroy","pause","resume"];function _(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?r(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function d(e,t){a=a||j(70),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=e.readableHighWaterMark,t=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(i||0===i)?i:t,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u=u||j(261).StringDecoder,this.decoder=new u(e.encoding),this.encoding=e.encoding)}function f(e){if(a=a||j(70),!(this instanceof f))return new f(e);this._readableState=new d(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),n.call(this)}function p(e,t,n,r,i){var a,o=e._readableState;return null===t?(o.reading=!1,S(e,o)):(i||(a=w(o,t)),a?e.emit("error",a):o.objectMode||t&&0<t.length?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=l(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):L(e,o)):x(e,o,t,!1))):r||(o.reading=!1)),b(o)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&A(e)),L(e,t)}function w(e,t){var n;return i(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function b(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),f.prototype.destroy=e.destroy,f.prototype._undestroy=e.undestroy,f.prototype._destroy=function(e,t){this.push(null),t(e)},f.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=s.from(e,t),t=""),n=!0),p(this,e,t,!1,n)},f.prototype.unshift=function(e){return p(this,e,null,!0,!1)},f.prototype.isPaused=function(){return!1===this._readableState.flowing},f.prototype.setEncoding=function(e){return u=u||j(261).StringDecoder,this._readableState.decoder=new u(e),this._readableState.encoding=e,this};var M=8388608;function T(e){return M<=e?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?(t.flowing&&t.length?t.buffer.head.data:t).length:(e>t.highWaterMark&&(t.highWaterMark=T(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e,t){var n;t.ended||(t.decoder&&(n=t.decoder.end(),n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)),t.ended=!0,A(e))}function A(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(y("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?v.nextTick(I,e):I(e))}function I(e){y("emit readable"),e.emit("readable"),D(e)}function L(e,t){t.readingMore||(t.readingMore=!0,v.nextTick(R,e,t))}function R(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(y("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function N(t){return function(){var e=t._readableState;y("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&g(t,"data")&&(e.flowing=!0,D(t))}}function k(e){y("readable nexttick read 0"),e.read(0)}function P(e,t){t.resumeScheduled||(t.resumeScheduled=!0,v.nextTick(C,e,t))}function C(e,t){t.reading||(y("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(y("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=B(e,t.buffer,t.decoder),n);var n}function B(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():(n?F:U)(e,t),r}function F(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),e-=o,0===e){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function U(e,t){var n=s.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,0===e){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function z(e){var t=e._readableState;if(0<t.length)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,v.nextTick(G,t,e))}function G(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function V(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}f.prototype.read=function(e){y("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return y("read: emitReadable",t.length,t.ended),(0===t.length&&t.ended?z:A)(this),null;if(e=E(e,t),0===e&&t.ended)return 0===t.length&&z(this),null;var r=t.needReadable;return y("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,y("length less than watermark",r)),t.ended||t.reading?(r=!1,y("reading or ended",r)):r&&(y("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(n,t))),r=0<e?O(e,t):null,null===r?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&z(this)),null!==r&&this.emit("data",r),r},f.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},f.prototype.pipe=function(t,e){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}function i(e,t){y("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,l())}function a(){y("onend"),t.end()}r.pipesCount+=1,y("pipe count=%d opts=%j",r.pipesCount,e),e=(!e||!1!==e.end)&&t!==m.stdout&&t!==m.stderr,e=e?a:p,r.endEmitted?v.nextTick(e):n.once("end",e),t.on("unpipe",i);var o=N(n);t.on("drain",o);var s=!1;function l(){y("cleanup"),t.removeListener("close",d),t.removeListener("finish",f),t.removeListener("drain",o),t.removeListener("error",c),t.removeListener("unpipe",i),n.removeListener("end",a),n.removeListener("end",p),n.removeListener("data",h),s=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||o()}var u=!1;function h(e){y("ondata"),u=!1,e=t.write(e),!1!==e||u||((1===r.pipesCount&&r.pipes===t||1<r.pipesCount&&-1!==V(r.pipes,t))&&!s&&(y("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,u=!0),n.pause())}function c(e){y("onerror",e),p(),t.removeListener("error",c),0===g(t,"error")&&t.emit("error",e)}function d(){t.removeListener("finish",f),p()}function f(){y("onfinish"),t.removeListener("close",d),p()}function p(){y("unpipe"),n.unpipe(t)}return n.on("data",h),_(t,"error",c),t.once("close",d),t.once("finish",f),t.emit("pipe",n),r.flowing||(y("pipe resume"),n.resume()),t},f.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e=e||t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,n);return this}var o=V(t.pipes,e);return-1===o||(t.pipes.splice(o,1),--t.pipesCount,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},f.prototype.on=function(e,t){return t=n.prototype.on.call(this,e,t),"data"===e?!1!==this._readableState.flowing&&this.resume():"readable"===e&&(e=this._readableState,e.endEmitted||e.readableListening||(e.readableListening=e.needReadable=!0,e.emittedReadable=!1,e.reading?e.length&&A(this):v.nextTick(k,this))),t},f.prototype.addListener=f.prototype.on,f.prototype.resume=function(){var e=this._readableState;return e.flowing||(y("resume"),e.flowing=!0,P(this,e)),this},f.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this},f.prototype.wrap=function(t){var e,n=this,r=this._readableState,i=!1;for(e in t.on("end",function(){var e;y("wrapped end"),r.decoder&&!r.ended&&(e=r.decoder.end(),e&&e.length&&n.push(e)),n.push(null)}),t.on("data",function(e){y("wrapped data"),r.decoder&&(e=r.decoder.write(e)),r.objectMode&&null==e||(r.objectMode||e&&e.length)&&(e=n.push(e),e||(i=!0,t.pause()))}),t)void 0===this[e]&&"function"==typeof t[e]&&(this[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e));for(var a=0;a<c.length;a++)t.on(c[a],this.emit.bind(this,c[a]));return this._read=function(e){y("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(f.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),f._fromList=O}.call(this,j(49),j(65))},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=n(160).EventEmitter},function(e,ee,te){"use strict";!function(e){var r=te(578),a=te(579),o=te(257);function t(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function n(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(n()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=c.prototype):(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"!=typeof e)return s(this,e,t,n);if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}function s(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?p(e,t,n,r):"string"==typeof t?d(e,t,n):m(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t,n,r){return l(t),t<=0||void 0===n?i(e,t):"string"==typeof r?i(e,t).fill(n,r):i(e,t).fill(n)}function h(e,t){if(l(t),e=i(e,t<0?0:0|v(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|y(t,n);return e=i(e,r),n=e.write(t,n),n!==r&&(e=e.slice(0,n)),e}function f(e,t){var n=t.length<0?0:0|v(t.length);e=i(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),c.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=c.prototype):e=f(e,t),e}function m(e,t){if(c.isBuffer(t)){var n=0|v(t.length);return e=i(e,n),0===e.length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||$(t.length)?i(e,0):f(e,t);if("Buffer"===t.type&&o(t.data))return f(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(e){if(e>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),c.alloc(+e)}function y(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return K(e).length;default:if(r)return X(e).length;t=(""+t).toLowerCase(),r=!0}}function _(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e=e||"utf8";;)switch(e){case"hex":return D(this,t,n);case"utf8":case"utf-8":return R(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return L(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function x(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647<n?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var a=1,o=e.length,s=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i)for(var u=-1,h=n;h<o;h++)if(l(e,h)===l(t,-1===u?0:h-u)){if(-1===u&&(u=h),h-u+1===s)return u*a}else-1!==u&&(h-=h-u),u=-1;else for(o<n+s&&(n=o-s),h=n;0<=h;h--){for(var c=!0,d=0;d<s;d++)if(l(e,h+d)!==l(t,d)){c=!1;break}if(c)return h}return-1}function M(e,t,n,r){n=Number(n)||0;var i=e.length-n;if(r?(r=Number(r),i<r&&(r=i)):r=i,i=t.length,i%2!=0)throw new TypeError("Invalid hex string");i/2<r&&(r=i/2);for(var a=0;a<r;++a){var o=parseInt(t.substr(2*a,2),16);if(isNaN(o))return a;e[n+a]=o}return a}function T(e,t,n,r){return Q(X(t,e.length-n),e,n,r)}function E(e,t,n,r){return Q(Z(t),e,n,r)}function S(e,t,n,r){return E(e,t,n,r)}function A(e,t,n,r){return Q(K(t),e,n,r)}function I(e,t,n,r){return Q(J(t,e.length-n),e,n,r)}function L(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function R(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,l,u=e[i],h=null,c=239<u?4:223<u?3:191<u?2:1;if(i+c<=n)switch(c){case 1:u<128&&(h=u);break;case 2:a=e[i+1],128==(192&a)&&(l=(31&u)<<6|63&a,127<l&&(h=l));break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(l=(15&u)<<12|(63&a)<<6|63&o,2047<l&&(l<55296||57343<l)&&(h=l));break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s,65535<l&&l<1114112&&(h=l))}null===h?(h=65533,c=1):65535<h&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=c}return k(r)}ee.Buffer=c,ee.SlowBuffer=g,ee.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:t(),ee.kMaxLength=n(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return s(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return u(null,e,t,n)},c.allocUnsafe=function(e){return h(null,e)},c.allocUnsafeSlow=function(e){return h(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;for(var n=c.allocUnsafe(t),r=0,i=0;i<e.length;++i){var a=e[i];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,r),r+=a.length}return n},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)x(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?R(this,0,e):_.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",t=ee.INSPECT_MAX_BYTES;return 0<this.length&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(i<=r&&n<=t)return 0;if(i<=r)return-1;if(n<=t)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,o=n-t,s=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n),h=0;h<s;++h)if(l[h]!==u[h]){a=l[h],o=u[h];break}return a<o?-1:o<a?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||i<n)&&(n=i),0<e.length&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r=r||"utf8";for(var a=!1;;)switch(r){case"hex":return M(this,e,t,n);case"utf8":case"utf-8":return T(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var N=4096;function k(e){var t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=N));return n}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function D(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||r<n)&&(n=r);for(var i="",a=t;a<n;++a)i+=q(e[a]);return i}function O(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function B(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(n<e+t)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,n,r,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i<t||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function U(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function z(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function G(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function V(e,t,n,r,i){return i||G(e,t,n,4,34028234663852886e22,-34028234663852886e22),a.write(e,t,n,r,23,4),n+4}function H(e,t,n,r,i){return i||G(e,t,n,8,17976931348623157e292,-17976931348623157e292),a.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):n<e&&(e=n),t<0?(t+=n,t<0&&(t=0)):n<t&&(t=n),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=c.prototype;else for(var r=t-e,i=new c(r,void 0),a=0;a<r;++a)i[a]=this[a+e];return i},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=this[e+--t],i=1;0<t&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUInt8=function(e,t){return t||B(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||B(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||B(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,i<=r&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||B(e,t,this.length);for(var r=t,i=1,a=this[e+--r];0<r&&(i*=256);)a+=this[e+--r]*i;return i*=128,i<=a&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){return t||B(e,2,this.length),e=this[e]|this[e+1]<<8,32768&e?4294901760|e:e},c.prototype.readInt16BE=function(e,t){return t||B(e,2,this.length),e=this[e+1]|this[e]<<8,32768&e?4294901760|e:e},c.prototype.readInt32LE=function(e,t){return t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||B(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||B(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||B(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||B(e,8,this.length),a.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||(r=Math.pow(2,8*n)-1,F(this,e,t,n,r,0));var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||(r=Math.pow(2,8*n)-1,F(this,e,t,n,r,0));var i=n-1,a=1;for(this[t+i]=255&e;0<=--i&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):z(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){e=+e,t|=0,r||(r=Math.pow(2,8*n-1),F(this,e,t,n,r-1,-r));var i=0,a=1,o=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){e=+e,t|=0,r||(r=Math.pow(2,8*n-1),F(this,e,t,n,r-1,-r));var i=n-1,a=1,o=0;for(this[t+i]=255&e;0<=--i&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):z(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return V(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return V(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return H(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return H(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n=n||0,r||0===r||(r=this.length),t>=e.length&&(t=e.length),t=t||0,0<r&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;0<=i;--i)e[i+t]=this[i+n];else if(a<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){var i;if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length&&(i=e.charCodeAt(0),i<256&&(e=i)),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;if(t>>>=0,n=void 0===n?this.length:n>>>0,e=e||0,"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else for(var a=c.isBuffer(e)?e:X(new c(e,r).toString()),o=a.length,s=0;s<n-t;++s)this[s+t]=a[s%o];return this};var j=/[^+\/0-9A-Za-z-_]/g;function W(e){if(e=Y(e).replace(j,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Y(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function q(e){return e<16?"0"+e.toString(16):e.toString(16)}function X(e,t){var n;t=t||Infinity;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if(n=e.charCodeAt(o),55295<n&&n<57344){if(!i){if(56319<n){-1<(t-=3)&&a.push(239,191,189);continue}if(o+1===r){-1<(t-=3)&&a.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(t-=3)&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(t-=3)&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function Z(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function J(e,t){for(var n,r,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,r%=256,i.push(r),i.push(n);return i}function K(e){return r.toByteArray(W(e))}function Q(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function $(e){return e!=e}}.call(this,te(49))},function(e,t,n){"use strict";var a=n(120);function r(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||a.nextTick(o,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(a.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(e,t){e.emit("error",t)}e.exports={destroy:r,undestroy:i}},function(e,t,n){"use strict";var r=n(121).Buffer,i=r.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function o(e){var t=a(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=p,this.end=m,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=v,this.end=g,t=3;break;default:return this.write=y,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function l(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e,t,n){var r=t.length-1;if(r<n)return 0;var i=l(t[r]);return 0<=i?(0<i&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=l(t[r]),0<=i?(0<i&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=l(t[r]),0<=i?(0<i&&(2===i?i=0:e.lastNeed=i-3),i):0))}function h(e,t,n){return 128!=(192&t[0])?(e.lastNeed=0,"�"):1<e.lastNeed&&1<t.length?128!=(192&t[1])?(e.lastNeed=1,"�"):2<e.lastNeed&&2<t.length&&128!=(192&t[2])?(e.lastNeed=2,"�"):void 0:void 0}function c(e){var t=this.lastTotal-this.lastNeed,n=h(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function d(e,t){var n=u(this,e,t);return this.lastNeed?(this.lastTotal=n,n=e.length-(n-this.lastNeed),e.copy(this.lastChar,0,n),e.toString("utf8",t,n)):e.toString("utf8",t)}function f(e){return e=e&&e.length?this.write(e):"",this.lastNeed?e+"�":e}function p(e,t){if((e.length-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);var n=e.toString("utf16le",t);return n&&(t=n.charCodeAt(n.length-1),55296<=t&&t<=56319)?(this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)):n}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?(e=this.lastTotal-this.lastNeed,t+this.lastChar.toString("utf16le",0,e)):t}function v(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function g(e){return e=e&&e.length?this.write(e):"",this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function y(e){return e.toString(this.encoding)}function _(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},s.prototype.end=f,s.prototype.text=d,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";e.exports=a;var r=n(70),e=Object.create(n(96));function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e),e=this._readableState,e.reading=!1,(e.needReadable||e.length<e.highWaterMark)&&this._read(e.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);r.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var n=this;"function"==typeof this._flush?this._flush(function(e,t){s(n,e,t)}):s(this,null,null)}function s(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}e.inherits=n(79),e.inherits(a,r),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;r.writecb=n,r.writechunk=e,r.writeencoding=t,r.transforming||(t=this._readableState,(r.needTransform||t.needReadable||t.length<t.highWaterMark)&&this._read(t.highWaterMark))},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var u=i(n(13)),a=i(n(32)),o=i(n(14)),s=i(n(34)),l=i(n(2)),h=i(n(3)),c=i(n(28)),d=i(n(143)),f=i(n(118)),p=i(n(68)),m=i(n(95)),v=i(n(163)),g=i(n(69)),y=i(n(592));n(42),n=function(){function t(e){(0,l.default)(this,t),this._options={},this._navi=null,this._naviResults=[],"function"==typeof d.default&&e instanceof d.default&&(this._map=null,this.init(e)),this._endDoor=null}return(0,h.default)(t,[{key:"navi",get:function(){this._navi}},{key:"passPts",set:function(e){this._navi.passPts=e}},{key:"routePassingPoints",value:function(e,t){t=this._navi.routePassingPoints(e,t),t==g.default.ROUTE_SUCCESS?(this._naviResults=this._navi.getRouteResult(),this.failedInsertedPts=this._navi.failedInsertedPts):this._naviResults=[]}},{key:"naviToDoor",get:function(){return this._navi.naviToDoor},set:function(e){this._navi.naviToDoor=e}},{key:"analyzeNavi",value:function(e,t,n,r,i,a){return a=this._navi.route(e,t,n,r,i||p.default.MODULE_SHORTEST,a||m.default.PRIORITY_DEFAULT),a==g.default.ROUTE_SUCCESS?(this._naviResults=this._navi.getRouteResult(),this._endDoor=this._navi._endDoor):this._naviResults=[],a}},{key:"init",value:function(e){this._map=e,this._navi=new y.default({}),this._navi.initByMap(e)}},{key:"initByScene",value:function(e){this._navi=new y.default({}),this._navi.initByScene(e)}},{key:"dispose",value:function(){this._map=null;for(var e=0;e<this._naviResults.length;e++){var t=this._naviResults[e];t.dispose(),t=null}this._naviResults=[],this._navi&&(this._navi.dispose(),this._navi=null)}},{key:"assignInfos",value:function(e){this._navi._assignedInfos=e,this._navi.routeAssigned(),this._naviResults=this._navi.getRouteResult()}},{key:"getNaviResults",value:function(){return this._naviResults}},{key:"getNaviResult",value:function(e){return this.getNaviResults()}},{key:"getRouteAllPoints",value:function(e){var t=e||this._naviResults;if(!this._isNaviResultsValide(t))return[];var n,r=[];for(n in t)t[n].getPointList&&r.push.apply(r,(0,s.default)(t[n].getPointList()));return r}},{key:"getRouteLineSegments",value:function(e){var t=e||this._naviResults;if(!this._isNaviResultsValide(t))return[];for(var n=[],r=0;r<t.length;r++){var i=t[r],a=i.groupId,o=i.pointList,s=new f.default;s.groupId=a,s.points=[];for(var l=0;l<o.length;l++)s.points.push((0,u.default)({},o[l]));n.push(s)}return n}},{key:"getRouteDistance",value:function(e){if(e=e||this._naviResults,!this._isNaviResultsValide(e))return 0;var t=this.getRouteAllPoints(e);if(0==t.length)return 0;for(var n=0,r=0;r<t.length-1;r++)n+=c.default.distanceOfTwoPoints(t[r],t[r+1]);return n}},{key:"getRouteGroupIds",value:function(e){var t=e||this._naviResults;if(!this._isNaviResultsValide(t))return[];var n,r=[];for(n in t)!t[n].groupId||0!=n&&r[r.length-1]==t[n].groupId||r.push(t[n].groupId);return r}},{key:"getRouteGroupPoints",value:function(e,t){var n=t||this._naviResults;if(!this._isNaviResultsValide(n))return[];var r,i=[];for(r in n)n[r].groupId&&n[r].groupId==e&&(i=(0,a.default)(i).call(i,n[r].getPointList()));return i}},{key:"pathConstraint",value:function(e,t){return this._navi?this._navi.pathConstraint(e,t):null}},{key:"losedPoints",get:function(){return this._navi.failedInsertedPts}},{key:"_getNaviResults",value:function(e){for(var t,n=[],r=0;r<e.length;r++)null!=e[r].groupId&&(t=new v.default(e[r].groupId,e[r].length,e[r].pointVector,e[r].nodeVector),n.push(t));return n}},{key:"_isNaviResultsValide",value:function(e){if(!(0,o.default)(e))return!1;if(0==e.length)return!1;for(var t=0;t<e.length;t++)if(!e[t]instanceof v.default)return!1;return!0}}]),t}(),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),s=i(n(28)),l=i(n(158)),n=function(){function i(e,t,n,r){(0,a.default)(this,i),this.Id=e,this.groupId=t,this._type=n,this.points=r,this.pointCount=r&&r.length?r.length:0,this._level=-1,this.inId=0,this._parent=null,this._child=null,this._brothers=[],this._linkAccessNodes=[],this._area=null,this.bb=new l.default,this.refreshBB()}return(0,o.default)(i,[{key:"pass",get:function(){return 3&this._type},set:function(e){this._type|=e}},{key:"level",get:function(){return 31&this._level},set:function(e){this._level=31&e}},{key:"area",get:function(){return this._area||(this._area=s.default.calcPolygonArea2d()),this._area}},{key:"contain",value:function(e){return s.default.pointInPolygon2d1(this.points,e,this.points.length-1)}},{key:"calcCrossPoint",value:function(e,t){for(var n={},r=0;r<this.pointCount;r++){var i=this.points[r],a=this.points[(r+1)%this.pointCount];if(1==s.default.calcCrossPoint(i,a,e,t,n))break}return n}},{key:"refreshBB",value:function(){this.bb.init();for(var e=0;e<this.pointCount;e++)this.bb.expandBy({x:this.points[e].x,y:this.points[e].y})}}]),i}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(55)),n=function e(){(0,a.default)(this,e),this.cross=null,this.road=null,this.model=null,this.distance=0,this.toDistance=0,this.stickToRoad=!1,this.obstructType=o.default.NaviObstructType_MODEL},n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(15)),o=i(n(2)),s=i(n(3)),l=i(n(605)),f=function(){function t(e){(0,o.default)(this,t),this._wayPoints=e||[]}return(0,s.default)(t,[{key:"drop",value:function(e){for(var t,n=-1,r=0;r<this._wayPoints.length;r++)if(this[r]==e){n=r;break}n<0||(0,a.default)(t=this._wayPoints).call(t,n,1)}},{key:"cloneDrop",value:function(e){for(var t=[],n=0;n<this._wayPoints.length;n++)t.push(this._wayPoints[n]);for(var r=-1,i=0;i<t.length;i++)if(t[i]==e){r=i;break}if(!(r<0))return(0,a.default)(t).call(t,r,1),t}},{key:"toArray",value:function(){for(var e=[],t=0;t<this._wayPoints.length;t++)e.push(this._wayPoints[t]);return e}},{key:"len",value:function(){return this._wayPoints.length}}]),t}(),n=function(){function t(e){(0,o.default)(this,t),0!=e.length&&(this._adjTable=new l.default(e))}return(0,s.default)(t,[{key:"setSId",value:function(e){return this._sId=e,this}},{key:"setEId",value:function(e){return this._eId=e,this}},{key:"setWayNodes",value:function(e){return this._wayPoints=e,this}},{key:"route",value:function(){this._result=this._route(this._sId,this._eId,this._wayPoints)}},{key:"getResult",value:function(){return this._result}},{key:"_route",value:function(e,t,n){if(0==n.length){if(e==t)return{route:[e],dist:0};var r=this._adjTable.lookup(e,t);if(null!=r)return{route:[e,t],dist:r};var i=this._adjTable.enhance(e,t,this._wayPoints);return{route:[e,i.transit,t],dist:i.dist}}for(var a=new f(n),o=a.toArray(),s=Infinity,l=[],u=0;u<a.len();u++){var h,c=o[u],d=this._route(e,c,a.cloneDrop(c));null!=d.dist&&(h=this._adjTable.lookup(c,t),null==h?(i=this._adjTable.enhance(c,t,this._wayPoints),h=i.dist,h+d.dist<s&&(s=h+d.dist,d.route.push(i.transit),d.route.push(t),l=d.route)):h+d.dist<s&&(s=h+d.dist,d.route.push(t),l=d.route))}return{route:l,dist:s}}}]),t}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.SmallQueue=l,t.Queue=void 0;var a=i(n(12)),o=i(n(2)),s=i(n(3)),n=function(){function e(){(0,o.default)(this,e),this.items=[]}return(0,s.default)(e,[{key:"enqueue",value:function(e){this.items.push(e)}},{key:"dequeue",value:function(){return this.isEmpty()?"Underflow":this.items.shift()}},{key:"front",value:function(){return this.isEmpty()?"No elements in Queue":this.items[0]}},{key:"isEmpty",value:function(){return 0==this.items.length}},{key:"printQueue",value:function(){for(var e="",t=0;t<this.items.length;t++)e+=this.items[t]+" ";return e}}]),e}();function l(){var t=[],n=0;this.getLength=function(){return t.length-n},this.isEmpty=function(){return 0==t.length},this.enqueue=function(e){t.push(e)},this.dequeue=function(){if(0!=t.length){var e=t[n];return 2*++n>=t.length&&(t=(0,a.default)(t).call(t,n),n=0),e}},this.peek=function(){return 0<t.length?t[n]:void 0}}t.Queue=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0,n(271),n(439),n(441),n(462);var a=i(n(143)),o=i(n(242)),s=i(n(213)),l=i(n(36)),u=i(n(245)),h=i(n(221)),c=i(n(217)),d=i(n(219)),f=i(n(546)),p=i(n(246)),m=i(n(247)),v=i(n(156)),g=i(n(118)),y=i(n(550)),_=i(n(223)),x=i(n(241)),w=i(n(227)),b=i(n(225)),M=i(n(224)),T=i(n(554)),E=i(n(555)),S=i(n(251)),A=i(n(68)),I=i(n(565)),L=i(n(95)),R=i(n(566)),N=i(n(66)),k=i(n(206)),P=i(n(69)),C=i(n(157)),D=i(n(218)),O=i(n(215)),B=i(n(220)),F=i(n(214)),U=i(n(211)),z=i(n(17)),G=i(n(567)),V=i(n(568)),H=i(n(240)),j=i(n(154)),W=i(n(243)),Y=i(n(28)),q=i(n(152)),X=i(n(47)),Z=i(n(42)),J=i(n(55)),K=i(n(153)),Q=i(n(158)),r=i(n(569)),i=i(n(263));n(610);var $,ee={VERSION:H.default.VERSION,BUILD:H.default.BUILD,Map:a.default,FMMap:a.default,MapUtil:o.default,FMViewMode:R.default,FMDynamicModel:x.default,FMDynamicModelLayer:w.default,FMLanguageType:N.default,FMNodeType:l.default,FMImageMarker:u.default,FMTextMarker:f.default,FMLocationMarker:p.default,FMLineMarker:v.default,FMExtentLayer:s.default,FMSegment:g.default,FMPolygonMarker:y.default,FMPolygonMarkerLayer:_.default,FMImageMarkerLayer:h.default,FMLabelLayer:c.default,FMFacilityLayer:d.default,FMHeatMapLayer:b.default,FMHeatMap:T.default,FMSearchRequest:S.default,FMSearchAnalyser:E.default,FMLineType:m.default,FMNaviModule:A.default,FMNaviMode:A.default,FMTextAlign:I.default,FMNaviPriority:L.default,FMRouteCalcuResult:P.default,FMMapCoord:C.default,FMGroup:U.default,FMLabel:D.default,FMStoreModel:O.default,FMElement:F.default,FMExternalModel:F.default,FMFacility:B.default,FMNode:z.default,FMDirection:k.default,FMScreenCoord:G.default,FMTextMarkerLayer:M.default,FMMapCoordTransformer:V.default,MapCoordTransform:V.default,FMMarkerAnchor:j.default,FMRenderer:W.default,inner:{Graphics:Y.default,FMSegment:g.default,FMNaviMode:A.default,FMNaviPriority:L.default,FMRouteCalcuResult:P.default,EventDispatcher:q.default,DataManager:X.default,FMUtil:Z.default,FMImageMarker:u.default,FMLocationMarker:p.default,FMLanguageType:N.default,NaviDataType:J.default,NaviService:K.default,FMMapCoord:C.default,BoundingBox:Q.default}},te={FMNaviAnalyser:i.default,FMNaviMode:A.default,FMNavigation:r.default,FMNaviPriority:L.default};for($ in te)te.hasOwnProperty($)&&(ee[$]=te[$]);L=ee,t.default=L},function(e,t,n){n=n(167),e.exports=n},function(e,t,n){var r=n(8),i=n(30),n=n(40);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n.f})},function(t,e,n){!function(e){t.exports=e.fm=n(272)}.call(this,n(49))},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.AmbientLight=gp,t.AmbientLightProbe=Gp,t.AnimationClip=vf,t.AnimationLoader=Ef,t.AnimationMixer=vm,t.AnimationObjectGroup=pm,t.ArcCurve=Pf,t.ArrayCamera=_h,t.ArrowHelper=av,t.Audio=Kp,t.AudioAnalyser=rm,t.AudioListener=Jp,t.AudioLoader=Bp,t.AxesHelper=ov,t.AxisHelper=fg,t.BinaryTextureLoader=yg,t.Bone=Kh,t.BooleanKeyframeTrack=uf,t.BoundingBoxHelper=pg,t.Box2=Em,t.Box3=Li,t.Box3Helper=ev,t.BoxHelper=$m,t.BufferAttribute=pa,t.BufferGeometry=Pa,t.BufferGeometryLoader=Mp,t.Camera=po,t.CameraHelper=Jm,t.CanvasRenderer=xg,t.CanvasTexture=Mc,t.CatmullRomCurve3=Uf,t.CircleBufferGeometry=Hd,t.CircleGeometry=Vd,t.Clock=Wp,t.ClosedSplineCurve3=hg,t.Color=aa,t.ColorKeyframeTrack=hf,t.CompressedTexture=bc,t.CompressedTextureLoader=Sf,t.ConeBufferGeometry=Gd,t.ConeGeometry=zd,t.CubeCamera=yo,t.CubeTexture=Tl,t.CubeTextureLoader=Lf,t.CubicBezierCurve=Jf,t.CubicBezierCurve3=Kf,t.CubicInterpolant=af,t.Curve=Nf,t.CurvePath=ip,t.CylinderBufferGeometry=Ud,t.CylinderGeometry=Fd,t.Cylindrical=Mm,t.DataTexture=xo,t.DataTexture2DArray=El,t.DataTexture3D=Sl,t.DataTextureLoader=Af,t.DepthTexture=Tc,t.DirectionalLight=vp,t.DirectionalLightHelper=qm,t.DirectionalLightShadow=mp,t.DiscreteInterpolant=sf,t.DodecahedronBufferGeometry=Bc,t.DodecahedronGeometry=Oc,t.DynamicBufferAttribute=eg,t.EdgesGeometry=Bd,t.EdgesHelper=mg,t.EllipseCurve=kf,t.Euler=$r,t.EventDispatcher=Sr,t.ExtrudeBufferGeometry=Md,t.ExtrudeGeometry=bd,t.Face3=ua,t.Face4=Vv,t.FileLoader=Tf,t.Float32Attribute=lg,t.Float32BufferAttribute=ba,t.Float64Attribute=ug,t.Float64BufferAttribute=Ma,t.Fog=Th,t.FogExp2=Mh,t.Font=kp,t.FontLoader=Dp,t.Frustum=Mo,t.Geometry=io,t.GridHelper=Vm,t.Group=xh,t.HemisphereLight=lp,t.HemisphereLightHelper=Gm,t.HemisphereLightProbe=zp,t.IcosahedronBufferGeometry=Dc,t.IcosahedronGeometry=Cc,t.ImageBitmapLoader=Rp,t.ImageLoader=If,t.ImmediateRenderObject=Lm,t.InstancedBufferAttribute=bp,t.InstancedBufferGeometry=wp,t.InstancedInterleavedBuffer=ym,t.InstancedMesh=nc,t.Int16Attribute=ig,t.Int16BufferAttribute=ya,t.Int32Attribute=og,t.Int32BufferAttribute=xa,t.Int8Attribute=tg,t.Int8BufferAttribute=ma,t.InterleavedBuffer=Eh,t.InterleavedBufferAttribute=Ih,t.Interpolant=rf,t.JSONLoader=wg,t.KeyframeTrack=lf,t.LOD=Yh,t.LatheBufferGeometry=Pd,t.LatheGeometry=kd,t.Layers=ei,t.LensFlare=bg,t.Light=sp,t.LightProbe=Up,t.LightShadow=up,t.Line=uc,t.Line3=Im,t.LineBasicMaterial=rc,t.LineCurve=Qf,t.LineCurve3=$f,t.LineDashedMaterial=ef,t.LineLoop=fc,t.LineSegments=dc,t.LinearInterpolant=of,t.Loader=bf,t.LoadingManager=xf,t.Material=ca,t.MaterialLoader=_p,t.Matrix3=kr,t.Matrix4=Jr,t.Mesh=Ka,t.MeshBasicMaterial=da,t.MeshDepthMaterial=ch,t.MeshDistanceMaterial=dh,t.MeshFaceMaterial=Wv,t.MeshLambertMaterial=Qd,t.MeshMatcapMaterial=$d,t.MeshNormalMaterial=Kd,t.MeshPhongMaterial=Zd,t.MeshPhysicalMaterial=Xd,t.MeshStandardMaterial=qd,t.MeshToonMaterial=Jd,t.MultiMaterial=Yv,t.NumberKeyframeTrack=cf,t.Object3D=pi,t.ObjectLoader=Ep,t.OctahedronBufferGeometry=Pc,t.OctahedronGeometry=kc,t.OrthographicCamera=pp,t.PMREMGenerator=Ev,t.ParametricBufferGeometry=Ac,t.ParametricGeometry=Sc,t.Particle=Xv,t.ParticleBasicMaterial=Kv,t.ParticleSystem=Zv,t.ParticleSystemMaterial=Qv,t.Path=ap,t.PerspectiveCamera=mo,t.Plane=ji,t.PlaneBufferGeometry=Io,t.PlaneGeometry=Ao,t.PlaneHelper=tv,t.PointCloud=qv,t.PointCloudMaterial=Jv,t.PointLight=fp,t.PointLightHelper=Bm,t.Points=_c,t.PointsMaterial=pc,t.PolarGridHelper=Hm,t.PolyhedronBufferGeometry=Lc,t.PolyhedronGeometry=Ic,t.PositionalAudio=nm,t.PropertyBinding=fm,t.PropertyMixer=im,t.QuadraticBezierCurve=ep,t.QuadraticBezierCurve3=tp,t.Quaternion=Ur,t.QuaternionKeyframeTrack=ff,t.QuaternionLinearInterpolant=df,t.RawShaderMaterial=Yd,t.Ray=zi,t.Raycaster=_m,t.RectAreaLight=yp,t.RingBufferGeometry=Nd,t.RingGeometry=Rd,t.Scene=mi,t.ShaderMaterial=fo,t.ShadowMaterial=Wd,t.Shape=op,t.ShapeBufferGeometry=Dd,t.ShapeGeometry=Cd,t.ShapePath=Np,t.Skeleton=Jh,t.SkeletonHelper=Om,t.SkinnedMesh=qh,t.Sphere=ki,t.SphereBufferGeometry=Ld,t.SphereGeometry=Id,t.Spherical=bm,t.SphericalHarmonics3=Fp,t.Spline=dg,t.SplineCurve=np,t.SplineCurve3=cg,t.SpotLight=cp,t.SpotLightHelper=Nm,t.SpotLightShadow=hp,t.Sprite=Vh,t.SpriteMaterial=Lh,t.StereoCamera=jp,t.StringKeyframeTrack=pf,t.TetrahedronBufferGeometry=Nc,t.TetrahedronGeometry=Rc,t.TextBufferGeometry=Ad,t.TextGeometry=Sd,t.Texture=Dr,t.TextureLoader=Rf,t.TorusBufferGeometry=Hc,t.TorusGeometry=Vc,t.TorusKnotBufferGeometry=Gc,t.TorusKnotGeometry=zc,t.Triangle=ta,t.TubeBufferGeometry=Uc,t.TubeGeometry=Fc,t.Uint16Attribute=ag,t.Uint16BufferAttribute=_a,t.Uint32Attribute=sg,t.Uint32BufferAttribute=wa,t.Uint8Attribute=ng,t.Uint8BufferAttribute=va,t.Uint8ClampedAttribute=rg,t.Uint8ClampedBufferAttribute=ga,t.Uniform=gm,t.Vector2=Nr,t.Vector3=Vr,t.Vector4=Or,t.VectorKeyframeTrack=mf,t.Vertex=$v,t.VideoTexture=wc,t.WebGLCubeRenderTarget=_o,t.WebGLMultisampleRenderTarget=Fr,t.WebGLRenderTarget=Br,t.WebGLRenderTargetCube=_g,t.WebGLRenderer=bh,t.WebGLUtils=yh,t.WireframeGeometry=Ec,t.WireframeHelper=vg,t.XHRLoader=gg,t.NeverDepth=t.NearestMipmapNearestFilter=t.NearestMipmapLinearFilter=t.NearestMipMapNearestFilter=t.NearestMipMapLinearFilter=t.NearestFilter=t.MultiplyOperation=t.MultiplyBlending=t.MixOperation=t.MirroredRepeatWrapping=t.MinEquation=t.MaxEquation=t.MathUtils=t.Math=t.MOUSE=t.LuminanceFormat=t.LuminanceAlphaFormat=t.LoopRepeat=t.LoopPingPong=t.LoopOnce=t.LogLuvEncoding=t.LoaderUtils=t.LinearToneMapping=t.LinearMipmapNearestFilter=t.LinearMipmapLinearFilter=t.LinearMipMapNearestFilter=t.LinearMipMapLinearFilter=t.LinearFilter=t.LinearEncoding=t.LineStrip=t.LinePieces=t.LessStencilFunc=t.LessEqualStencilFunc=t.LessEqualDepth=t.LessDepth=t.KeepStencilOp=t.InvertStencilOp=t.InterpolateSmooth=t.InterpolateLinear=t.InterpolateDiscrete=t.IntType=t.IncrementWrapStencilOp=t.IncrementStencilOp=t.ImageUtils=t.HalfFloatType=t.GreaterStencilFunc=t.GreaterEqualStencilFunc=t.GreaterEqualDepth=t.GreaterDepth=t.GeometryUtils=t.GammaEncoding=t.FrontSide=t.FrontFaceDirectionCW=t.FrontFaceDirectionCCW=t.FloatType=t.FlatShading=t.FaceColors=t.EquirectangularRefractionMapping=t.EquirectangularReflectionMapping=t.EqualStencilFunc=t.EqualDepth=t.DynamicReadUsage=t.DynamicDrawUsage=t.DynamicCopyUsage=t.DstColorFactor=t.DstAlphaFactor=t.DoubleSide=t.DepthStencilFormat=t.DepthFormat=t.DefaultLoadingManager=t.DecrementWrapStencilOp=t.DecrementStencilOp=t.CustomBlending=t.CullFaceNone=t.CullFaceFrontBack=t.CullFaceFront=t.CullFaceBack=t.CubeUVRefractionMapping=t.CubeUVReflectionMapping=t.CubeRefractionMapping=t.CubeReflectionMapping=t.ClampToEdgeWrapping=t.CineonToneMapping=t.Cache=t.ByteType=t.CubeGeometry=t.BoxGeometry=t.BoxBufferGeometry=t.BasicShadowMap=t.BasicDepthPacking=t.BackSide=t.AudioContext=t.AnimationUtils=t.AlwaysStencilFunc=t.AlwaysDepth=t.AlphaFormat=t.AdditiveBlending=t.AddOperation=t.AddEquation=t.ACESFilmicToneMapping=void 0,t.UniformsLib=t.Uncharted2ToneMapping=t.UVMapping=t.TrianglesDrawMode=t.TriangleStripDrawMode=t.TriangleFanDrawMode=t.TangentSpaceNormalMap=t.TOUCH=t.SubtractiveBlending=t.SubtractEquation=t.StreamReadUsage=t.StreamDrawUsage=t.StreamCopyUsage=t.StaticReadUsage=t.StaticDrawUsage=t.StaticCopyUsage=t.SrcColorFactor=t.SrcAlphaSaturateFactor=t.SrcAlphaFactor=t.SphericalReflectionMapping=t.SmoothShading=t.ShortType=t.ShapeUtils=t.ShaderLib=t.ShaderChunk=t.SceneUtils=t.SRGB8_ALPHA8_ASTC_8x8_Format=t.SRGB8_ALPHA8_ASTC_8x6_Format=t.SRGB8_ALPHA8_ASTC_8x5_Format=t.SRGB8_ALPHA8_ASTC_6x6_Format=t.SRGB8_ALPHA8_ASTC_6x5_Format=t.SRGB8_ALPHA8_ASTC_5x5_Format=t.SRGB8_ALPHA8_ASTC_5x4_Format=t.SRGB8_ALPHA8_ASTC_4x4_Format=t.SRGB8_ALPHA8_ASTC_12x12_Format=t.SRGB8_ALPHA8_ASTC_12x10_Format=t.SRGB8_ALPHA8_ASTC_10x8_Format=t.SRGB8_ALPHA8_ASTC_10x6_Format=t.SRGB8_ALPHA8_ASTC_10x5_Format=t.SRGB8_ALPHA8_ASTC_10x10_Format=t.ReverseSubtractEquation=t.ReplaceStencilOp=t.RepeatWrapping=t.ReinhardToneMapping=t.RedIntegerFormat=t.RedFormat=t.RGIntegerFormat=t.RGFormat=t.RGB_S3TC_DXT1_Format=t.RGB_PVRTC_4BPPV1_Format=t.RGB_PVRTC_2BPPV1_Format=t.RGB_ETC2_Format=t.RGB_ETC1_Format=t.RGBM7Encoding=t.RGBM16Encoding=t.RGBIntegerFormat=t.RGBFormat=t.RGBEFormat=t.RGBEEncoding=t.RGBDEncoding=t.RGBA_S3TC_DXT5_Format=t.RGBA_S3TC_DXT3_Format=t.RGBA_S3TC_DXT1_Format=t.RGBA_PVRTC_4BPPV1_Format=t.RGBA_PVRTC_2BPPV1_Format=t.RGBA_ETC2_EAC_Format=t.RGBA_BPTC_Format=t.RGBA_ASTC_8x8_Format=t.RGBA_ASTC_8x6_Format=t.RGBA_ASTC_8x5_Format=t.RGBA_ASTC_6x6_Format=t.RGBA_ASTC_6x5_Format=t.RGBA_ASTC_5x5_Format=t.RGBA_ASTC_5x4_Format=t.RGBA_ASTC_4x4_Format=t.RGBA_ASTC_12x12_Format=t.RGBA_ASTC_12x10_Format=t.RGBA_ASTC_10x8_Format=t.RGBA_ASTC_10x6_Format=t.RGBA_ASTC_10x5_Format=t.RGBA_ASTC_10x10_Format=t.RGBAIntegerFormat=t.RGBAFormat=t.RGBADepthPacking=t.REVISION=t.PCFSoftShadowMap=t.PCFShadowMap=t.OneMinusSrcColorFactor=t.OneMinusSrcAlphaFactor=t.OneMinusDstColorFactor=t.OneMinusDstAlphaFactor=t.OneFactor=t.ObjectSpaceNormalMap=t.NotEqualStencilFunc=t.NotEqualDepth=t.NormalBlending=t.NoToneMapping=t.NoColors=t.NoBlending=t.NeverStencilFunc=void 0,t.sRGBEncoding=t.ZeroStencilOp=t.ZeroSlopeEnding=t.ZeroFactor=t.ZeroCurvatureEnding=t.WrapAroundEnding=t.VertexColors=t.VSMShadowMap=t.UnsignedShortType=t.UnsignedShort565Type=t.UnsignedShort5551Type=t.UnsignedShort4444Type=t.UnsignedIntType=t.UnsignedInt248Type=t.UnsignedByteType=t.UniformsUtils=void 0;var te=a(n(56)),he=a(n(137)),h=a(n(89)),c=a(n(2)),o=a(n(5)),s=a(n(6)),l=a(n(7)),ne=a(n(189)),v=a(n(322)),re=a(n(327)),m=a(n(0)),je=a(n(13)),ce=a(n(9)),g=a(n(15)),y=a(n(12)),u=a(n(91)),d=a(n(60)),f=a(n(109)),We=a(n(14)),p=a(n(61)),de=a(n(27)),_=a(n(29)),Ye=a(n(10)),x=a(n(53)),qe=a(n(31)),ie=a(n(139)),w=a(n(384)),b=a(n(196)),S=a(n(197)),A=a(n(35)),ae=a(n(54)),oe=a(n(32)),M=a(n(410)),T=a(n(140)),E=a(n(63)),I=a(n(64)),L=a(n(421)),R=a(n(19)),N=a(n(50)),k=a(n(435));function P(n){var r=C();return function(){var e,t=(0,l.default)(n),t=r?(e=(0,l.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,s.default)(this,t)}}function C(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}void 0===ne.default&&(Number.EPSILON=Math.pow(2,-52)),void 0===v.default&&(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}),void 0===re.default&&(Math.sign=function(e){return e<0?-1:0<e?1:+e}),"name"in Function.prototype==0&&(0,m.default)(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===je.default&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t});var D="115";t.REVISION=D;var O={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2};t.MOUSE=O;var B={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};t.TOUCH=B;var fe=0;t.CullFaceNone=fe;var pe=1;t.CullFaceBack=pe;var me=2;t.CullFaceFront=me;var F=3;t.CullFaceFrontBack=F;var U=0;t.FrontFaceDirectionCW=U;var z=1;t.FrontFaceDirectionCCW=z;var G=0;t.BasicShadowMap=G;var V=1;t.PCFShadowMap=V;var H=2;t.PCFSoftShadowMap=H;var j=3;t.VSMShadowMap=j;var W=0;t.FrontSide=W;var Xe=1;t.BackSide=Xe;var ve=2;t.DoubleSide=ve;var Y=1;t.FlatShading=Y;var q=2;t.SmoothShading=q;var ge=0;t.NoBlending=ge;var ye=1;t.NormalBlending=ye;var _e=2;t.AdditiveBlending=_e;var xe=3;t.SubtractiveBlending=xe;var we=4;t.MultiplyBlending=we;var be=5;t.CustomBlending=be;var Me=100;t.AddEquation=Me;var Te=101;t.SubtractEquation=Te;var Ee=102;t.ReverseSubtractEquation=Ee;var Se=103;t.MinEquation=Se;var Ae=104;t.MaxEquation=Ae;var Ie=200;t.ZeroFactor=Ie;var Le=201;t.OneFactor=Le;var Re=202;t.SrcColorFactor=Re;var Ne=203;t.OneMinusSrcColorFactor=Ne;var ke=204;t.SrcAlphaFactor=ke;var Pe=205;t.OneMinusSrcAlphaFactor=Pe;var Ce=206;t.DstAlphaFactor=Ce;var De=207;t.OneMinusDstAlphaFactor=De;var Oe=208;t.DstColorFactor=Oe;var Be=209;t.OneMinusDstColorFactor=Be;var Fe=210;t.SrcAlphaSaturateFactor=Fe;var Ue=0;t.NeverDepth=Ue;var ze=1;t.AlwaysDepth=ze;var Ge=2;t.LessDepth=Ge;var Ve=3;t.LessEqualDepth=Ve;var He=4;t.EqualDepth=He;var Ze=5;t.GreaterEqualDepth=Ze;var Je=6;t.GreaterDepth=Je;var Ke=7;t.NotEqualDepth=Ke;var X=0;t.MultiplyOperation=X;var Z=1;t.MixOperation=Z;var J=2;t.AddOperation=J;var K=0;t.NoToneMapping=K;var Qe=1;t.LinearToneMapping=Qe;var Q=2;t.ReinhardToneMapping=Q;var $=3;t.Uncharted2ToneMapping=$;var ee=4;t.CineonToneMapping=ee;var se=5;t.ACESFilmicToneMapping=se;var le=300;t.UVMapping=le;var ue=301;t.CubeReflectionMapping=ue;var $e=302;t.CubeRefractionMapping=$e;var et=303;t.EquirectangularReflectionMapping=et;var tt=304;t.EquirectangularRefractionMapping=tt;var nt=305;t.SphericalReflectionMapping=nt;var rt=306;t.CubeUVReflectionMapping=rt;var it=307;t.CubeUVRefractionMapping=it;var at=1e3;t.RepeatWrapping=at;var ot=1001;t.ClampToEdgeWrapping=ot;var st=1002;t.MirroredRepeatWrapping=st;var lt=1003;t.NearestFilter=lt;var ut=1004;t.NearestMipmapNearestFilter=ut;var ht=1004;t.NearestMipMapNearestFilter=ht;var ct=1005;t.NearestMipmapLinearFilter=ct;var dt=1005;t.NearestMipMapLinearFilter=dt;var ft=1006;t.LinearFilter=ft;var pt=1007;t.LinearMipmapNearestFilter=pt;var mt=1007;t.LinearMipMapNearestFilter=mt;var vt=1008;t.LinearMipmapLinearFilter=vt;var gt=1008;t.LinearMipMapLinearFilter=gt;var yt=1009;t.UnsignedByteType=yt;var _t=1010;t.ByteType=_t;var xt=1011;t.ShortType=xt;var wt=1012;t.UnsignedShortType=wt;var bt=1013;t.IntType=bt;var Mt=1014;t.UnsignedIntType=Mt;var Tt=1015;t.FloatType=Tt;var Et=1016;t.HalfFloatType=Et;var St=1017;t.UnsignedShort4444Type=St;var At=1018;t.UnsignedShort5551Type=At;var It=1019;t.UnsignedShort565Type=It;var Lt=1020;t.UnsignedInt248Type=Lt;var Rt=1021;t.AlphaFormat=Rt;var Nt=1022;t.RGBFormat=Nt;var kt=1023;t.RGBAFormat=kt;var Pt=1024;t.LuminanceFormat=Pt;var Ct=1025;t.LuminanceAlphaFormat=Ct;var Dt=kt;t.RGBEFormat=Dt;var Ot=1026;t.DepthFormat=Ot;var Bt=1027;t.DepthStencilFormat=Bt;var Ft=1028;t.RedFormat=Ft;var Ut=1029;t.RedIntegerFormat=Ut;var zt=1030;t.RGFormat=zt;var Gt=1031;t.RGIntegerFormat=Gt;var Vt=1032;t.RGBIntegerFormat=Vt;var Ht=1033;t.RGBAIntegerFormat=Ht;var jt=33776;t.RGB_S3TC_DXT1_Format=jt;var Wt=33777;t.RGBA_S3TC_DXT1_Format=Wt;var Yt=33778;t.RGBA_S3TC_DXT3_Format=Yt;var qt=33779;t.RGBA_S3TC_DXT5_Format=qt;var Xt=35840;t.RGB_PVRTC_4BPPV1_Format=Xt;var Zt=35841;t.RGB_PVRTC_2BPPV1_Format=Zt;var Jt=35842;t.RGBA_PVRTC_4BPPV1_Format=Jt;var Kt=35843;t.RGBA_PVRTC_2BPPV1_Format=Kt;var Qt=36196;t.RGB_ETC1_Format=Qt;var $t=37492;t.RGB_ETC2_Format=$t;var en=37496;t.RGBA_ETC2_EAC_Format=en;var tn=37808;t.RGBA_ASTC_4x4_Format=tn;var nn=37809;t.RGBA_ASTC_5x4_Format=nn;var rn=37810;t.RGBA_ASTC_5x5_Format=rn;var an=37811;t.RGBA_ASTC_6x5_Format=an;var on=37812;t.RGBA_ASTC_6x6_Format=on;var sn=37813;t.RGBA_ASTC_8x5_Format=sn;var ln=37814;t.RGBA_ASTC_8x6_Format=ln;var un=37815;t.RGBA_ASTC_8x8_Format=un;var hn=37816;t.RGBA_ASTC_10x5_Format=hn;var cn=37817;t.RGBA_ASTC_10x6_Format=cn;var dn=37818;t.RGBA_ASTC_10x8_Format=dn;var fn=37819;t.RGBA_ASTC_10x10_Format=fn;var pn=37820;t.RGBA_ASTC_12x10_Format=pn;var mn=37821;t.RGBA_ASTC_12x12_Format=mn;var vn=36492;t.RGBA_BPTC_Format=vn;var gn=37840;t.SRGB8_ALPHA8_ASTC_4x4_Format=gn;var yn=37841;t.SRGB8_ALPHA8_ASTC_5x4_Format=yn;var _n=37842;t.SRGB8_ALPHA8_ASTC_5x5_Format=_n;var xn=37843;t.SRGB8_ALPHA8_ASTC_6x5_Format=xn;var wn=37844;t.SRGB8_ALPHA8_ASTC_6x6_Format=wn;var bn=37845;t.SRGB8_ALPHA8_ASTC_8x5_Format=bn;var Mn=37846;t.SRGB8_ALPHA8_ASTC_8x6_Format=Mn;var Tn=37847;t.SRGB8_ALPHA8_ASTC_8x8_Format=Tn;var En=37848;t.SRGB8_ALPHA8_ASTC_10x5_Format=En;var Sn=37849;t.SRGB8_ALPHA8_ASTC_10x6_Format=Sn;var An=37850;t.SRGB8_ALPHA8_ASTC_10x8_Format=An;var In=37851;t.SRGB8_ALPHA8_ASTC_10x10_Format=In;var Ln=37852;t.SRGB8_ALPHA8_ASTC_12x10_Format=Ln;var Rn=37853;t.SRGB8_ALPHA8_ASTC_12x12_Format=Rn;var Nn=2200;t.LoopOnce=Nn;var kn=2201;t.LoopRepeat=kn;var Pn=2202;t.LoopPingPong=Pn;var Cn=2300;t.InterpolateDiscrete=Cn;var Dn=2301;t.InterpolateLinear=Dn;var On=2302;t.InterpolateSmooth=On;var Bn=2400;t.ZeroCurvatureEnding=Bn;var Fn=2401;t.ZeroSlopeEnding=Fn;var Un=2402;t.WrapAroundEnding=Un;var zn=0;t.TrianglesDrawMode=zn;var Gn=1;t.TriangleStripDrawMode=Gn;var Vn=2;t.TriangleFanDrawMode=Vn;var Hn=3e3;t.LinearEncoding=Hn;var jn=3001;t.sRGBEncoding=jn;var Wn=3007;t.GammaEncoding=Wn;var Yn=3002;t.RGBEEncoding=Yn;var qn=3003;t.LogLuvEncoding=qn;var Xn=3004;t.RGBM7Encoding=Xn;var Zn=3005;t.RGBM16Encoding=Zn;var Jn=3006;t.RGBDEncoding=Jn;var Kn=3200;t.BasicDepthPacking=Kn;var Qn=3201;t.RGBADepthPacking=Qn;var $n=0;t.TangentSpaceNormalMap=$n;var er=1;t.ObjectSpaceNormalMap=er;var tr=0;t.ZeroStencilOp=tr;var nr=7680;t.KeepStencilOp=nr;var rr=7681;t.ReplaceStencilOp=rr;var ir=7682;t.IncrementStencilOp=ir;var ar=7683;t.DecrementStencilOp=ar;var or=34055;t.IncrementWrapStencilOp=or;var sr=34056;t.DecrementWrapStencilOp=sr;var lr=5386;t.InvertStencilOp=lr;var ur=512;t.NeverStencilFunc=ur;var hr=513;t.LessStencilFunc=hr;var cr=514;t.EqualStencilFunc=cr;var dr=515;t.LessEqualStencilFunc=dr;var fr=516;t.GreaterStencilFunc=fr;var pr=517;t.NotEqualStencilFunc=pr;var mr=518;t.GreaterEqualStencilFunc=mr;var vr=519;t.AlwaysStencilFunc=vr;var gr=35044;t.StaticDrawUsage=gr;var yr=35048;t.DynamicDrawUsage=yr;var _r=35040;t.StreamDrawUsage=_r;var xr=35045;t.StaticReadUsage=xr;var wr=35049;t.DynamicReadUsage=wr;var br=35041;t.StreamReadUsage=br;var Mr=35046;t.StaticCopyUsage=Mr;var Tr=35050;t.DynamicCopyUsage=Tr;var Er=35042;function Sr(){}t.StreamCopyUsage=Er,(0,je.default)(Sr.prototype,{addEventListener:function(e,t){var n;void 0===this._listeners&&(this._listeners={});var r=this._listeners;void 0===r[e]&&(r[e]=[]),-1===(0,ce.default)(n=r[e]).call(n,t)&&r[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[e]&&-1!==(0,ce.default)(e=n[e]).call(e,t)},removeEventListener:function(e,t){var n;void 0!==this._listeners&&(n=this._listeners,e=n[e],void 0!==e&&(t=(0,ce.default)(e).call(e,t),-1!==t&&(0,g.default)(e).call(e,t,1)))},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners,t=t[e.type];if(void 0!==t){e.target=this;for(var n=(0,y.default)(t).call(t,0),r=0,i=n.length;r<i;r++)n[r].call(this,e)}}}});for(var Ar=[],Ir=0;Ir<256;Ir++)Ar[Ir]=(Ir<16?"0":"")+Ir.toString(16);var Lr,Rr={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,r=Ar[255&e]+Ar[e>>8&255]+Ar[e>>16&255]+Ar[e>>24&255]+"-"+Ar[255&t]+Ar[t>>8&255]+"-"+Ar[t>>16&15|64]+Ar[t>>24&255]+"-"+Ar[63&n|128]+Ar[n>>8&255]+"-"+Ar[n>>16&255]+Ar[n>>24&255]+Ar[255&r]+Ar[r>>8&255]+Ar[r>>16&255]+Ar[r>>24&255];return r.toUpperCase()},clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:n<=e?1:(e=(e-t)/(n-t),e*e*(3-2*e))},smootherstep:function(e,t,n){return e<=t?0:n<=e?1:(e=(e-t)/(n-t),e*e*e*(e*(6*e-15)+10))},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*Rr.DEG2RAD},radToDeg:function(e){return e*Rr.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,n,r,i){var a=Math.cos,o=Math.sin,s=a(n/2),l=o(n/2),u=a((t+r)/2),h=o((t+r)/2),c=a((t-r)/2),n=o((t-r)/2),a=a((r-t)/2),t=o((r-t)/2);"XYX"===i?e.set(s*h,l*c,l*n,s*u):"YZY"===i?e.set(l*n,s*h,l*c,s*u):"ZXZ"===i?e.set(l*c,l*n,s*h,s*u):"XZX"===i?e.set(s*h,l*t,l*a,s*u):"YXY"===i?e.set(l*a,s*h,l*t,s*u):"ZYZ"===i?e.set(l*t,l*a,s*h,s*u):console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order.")}};function Nr(e,t){this.x=e||0,this.y=t||0}function kr(){this.elements=[1,0,0,0,1,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}t.MathUtils=t.Math=Rr,(0,u.default)(Nr.prototype,{width:{get:function(){return this.x},set:function(e){this.x=e}},height:{get:function(){return this.y},set:function(e){this.y=e}}}),(0,je.default)(Nr.prototype,{isVector2:!0,set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.x=e,this.y=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(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:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},applyMatrix3:function(e){var t=this.x,n=this.y,e=e.elements;return this.x=e[0]*t+e[3]*n+e[6],this.y=e[1]*t+e[4]*n+e[7],this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(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:function(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:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){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:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(e){return this.x*e.x+this.y*e.y},cross:function(e){return this.x*e.y-this.y*e.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var e=Math.atan2(-this.y,-this.x)+Math.PI;return e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,e=this.y-e.y;return t*t+e*e},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this},rotateAround:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,t=this.y-e.y;return this.x=i*n-t*r+e.x,this.y=i*r+t*n+e.y,this}}),(0,je.default)(kr.prototype,{isMatrix3:!0,set:function(e,t,n,r,i,a,o,s,l){var u=this.elements;return u[0]=e,u[1]=r,u[2]=o,u[3]=t,u[4]=i,u[5]=s,u[6]=n,u[7]=a,u[8]=l,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var t=this.elements,e=e.elements;return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],this},extractBasis:function(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this},setFromMatrix4:function(e){return e=e.elements,this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},multiply:function(e){return this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],l=n[1],u=n[4],h=n[7],c=n[2],d=n[5],f=n[8],p=r[0],m=r[3],v=r[6],g=r[1],y=r[4],e=r[7],t=r[2],n=r[5],r=r[8];return i[0]=a*p+o*g+s*t,i[3]=a*m+o*y+s*n,i[6]=a*v+o*e+s*r,i[1]=l*p+u*g+h*t,i[4]=l*m+u*y+h*n,i[7]=l*v+u*e+h*r,i[2]=c*p+d*g+f*t,i[5]=c*m+d*y+f*n,i[8]=c*v+d*e+f*r,this},multiplyScalar:function(e){var 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:function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],e=e[8];return t*a*e-t*o*l-n*i*e+n*o*s+r*i*l-r*a*s},getInverse:function(e,t){void 0!==t&&console.warn("THREE.Matrix3: .getInverse() can no longer be configured to throw on degenerate.");var n=e.elements,r=this.elements,i=n[0],a=n[1],o=n[2],s=n[3],l=n[4],u=n[5],h=n[6],c=n[7],d=n[8],f=d*l-u*c,t=u*h-d*s,e=c*s-l*h,n=i*f+a*t+o*e;return 0===n?this.set(0,0,0,0,0,0,0,0,0):(n=1/n,r[0]=f*n,r[1]=(o*c-d*a)*n,r[2]=(u*a-o*l)*n,r[3]=t*n,r[4]=(d*i-o*h)*n,r[5]=(o*s-u*i)*n,r[6]=e*n,r[7]=(a*h-c*i)*n,r[8]=(l*i-a*s)*n,this)},transpose:function(){var e=this.elements,t=e[1];return e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this},getNormalMatrix:function(e){return this.setFromMatrix4(e).getInverse(this).transpose()},transposeIntoArray:function(e){var 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:function(e,t,n,r,i,a,o){var s=Math.cos(i),i=Math.sin(i);this.set(n*s,n*i,-n*(s*a+i*o)+a+e,-r*i,r*s,-r*(-i*a+s*o)+o+t,0,0,1)},scale:function(e,t){var n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this},rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],a=r[3],o=r[6],s=r[1],l=r[4],e=r[7];return r[0]=t*i+n*s,r[3]=t*a+n*l,r[6]=t*o+n*e,r[1]=-n*i+t*s,r[4]=-n*a+t*l,r[7]=-n*o+t*e,this},translate:function(e,t){var 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:function(e){for(var t=this.elements,n=e.elements,r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<9;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var 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}});var Pr={getDataURL:function(e){if("undefined"==typeof HTMLCanvasElement)return e.src;var t,e=e instanceof HTMLCanvasElement?e:(void 0===Lr&&(Lr=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),Lr.width=e.width,Lr.height=e.height,t=Lr.getContext("2d"),e instanceof ImageData?t.putImageData(e,0,0):t.drawImage(e,0,0,e.width,e.height),Lr);return 2048<e.width||2048<e.height?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}};t.ImageUtils=Pr;var Cr=0;function Dr(e,t,n,r,i,a,o,s,l,u){(0,m.default)(this,"id",{value:Cr++}),this.uuid=Rr.generateUUID(),this.name="",this.image=void 0!==e?e:Dr.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:Dr.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:ot,this.wrapT=void 0!==r?r:ot,this.magFilter=void 0!==i?i:ft,this.minFilter=void 0!==a?a:vt,this.anisotropy=void 0!==l?l:1,this.format=void 0!==o?o:kt,this.internalFormat=null,this.type=void 0!==s?s:yt,this.offset=new Nr(0,0),this.repeat=new Nr(1,1),this.center=new Nr(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new kr,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Hn,this.version=0,this.onUpdate=null}function Or(e,t,n,r){this.x=e||0,this.y=t||0,this.z=n||0,this.w=void 0!==r?r:1}function Br(e,t,n){this.width=e,this.height=t,this.scissor=new Or(0,0,e,t),this.scissorTest=!1,this.viewport=new Or(0,0,e,t),n=n||{},this.texture=new Dr(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={},this.texture.image.width=e,this.texture.image.height=t,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:ft,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function Fr(e,t,n){Br.call(this,e,t,n),this.samples=4}function Ur(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._w=void 0!==r?r:1}Dr.DEFAULT_IMAGE=void 0,Dr.DEFAULT_MAPPING=le,Dr.prototype=(0,je.default)((0,d.default)(Sr.prototype),{constructor:Dr,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,(0,f.default)(this).x,(0,f.default)(this).y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){var t;return this.name=e.name,this.image=e.image,this.mipmaps=(0,y.default)(t=e.mipmaps).call(t,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),(0,f.default)(this).copy((0,f.default)(e)),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[(0,f.default)(this).x,(0,f.default)(this).y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){var r=this.image;if(void 0===r.uuid&&(r.uuid=Rr.generateUUID()),!t&&void 0===e.images[r.uuid]){if((0,We.default)(r))for(var i=[],a=0,o=r.length;a<o;a++)i.push(Pr.getDataURL(r[a]));else i=Pr.getDataURL(r);e.images[r.uuid]={uuid:r.uuid,url:i}}n.image=r.uuid}return t||(e.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(e){if(this.mapping!==le)return e;if(e.applyMatrix3(this.matrix),e.x<0||1<e.x)switch(this.wrapS){case at:e.x=e.x-Math.floor(e.x);break;case ot:e.x=e.x<0?0:1;break;case st:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||1<e.y)switch(this.wrapT){case at:e.y=e.y-Math.floor(e.y);break;case ot:e.y=e.y<0?0:1;break;case st:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}}),(0,m.default)(Dr.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),(0,u.default)(Or.prototype,{width:{get:function(){return this.z},set:function(e){this.z=e}},height:{get:function(){return this.w},set:function(e){this.w=e}}}),(0,je.default)(Or.prototype,{isVector4:!0,set:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(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:function(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:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(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:function(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:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(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},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=this.w,e=e.elements;return this.x=e[0]*t+e[4]*n+e[8]*r+e[12]*i,this.y=e[1]*t+e[5]*n+e[9]*r+e[13]*i,this.z=e[2]*t+e[6]*n+e[10]*r+e[14]*i,this.w=e[3]*t+e[7]*n+e[11]*r+e[15]*i,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var 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:function(e){var t,n,r,i=.01,a=.1,o=e.elements,s=o[0],l=o[4],u=o[8],h=o[1],c=o[5],d=o[9],f=o[2],p=o[6],m=o[10];if(Math.abs(l-h)<i&&Math.abs(u-f)<i&&Math.abs(d-p)<i){if(Math.abs(l+h)<a&&Math.abs(u+f)<a&&Math.abs(d+p)<a&&Math.abs(s+c+m-3)<a)return this.set(1,0,0,0),this;var v=Math.PI,g=(s+1)/2,y=(c+1)/2,_=(m+1)/2,e=(l+h)/4,o=(u+f)/4,a=(d+p)/4;return y<g&&_<g?r=g<i?(t=0,n=.707106781,.707106781):(t=Math.sqrt(g),n=e/t,o/t):_<y?r=y<i?(t=.707106781,n=0,.707106781):(n=Math.sqrt(y),t=e/n,a/n):_<i?(t=.707106781,n=.707106781,r=0):(r=Math.sqrt(_),t=o/r,n=a/r),this.set(t,n,r,v),this}return v=Math.sqrt((p-d)*(p-d)+(u-f)*(u-f)+(h-l)*(h-l)),Math.abs(v)<.001&&(v=1),this.x=(p-d)/v,this.y=(u-f)/v,this.z=(h-l)/v,this.w=Math.acos((s+c+m-1)/2),this},min:function(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:function(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:function(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:function(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:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){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:function(){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:function(){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:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(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:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}}),Br.prototype=(0,je.default)((0,d.default)(Sr.prototype),{constructor:Br,isWebGLRenderTarget:!0,setSize:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.texture.image.width=e,this.texture.image.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Fr.prototype=(0,je.default)((0,d.default)(Br.prototype),{constructor:Fr,isWebGLMultisampleRenderTarget:!0,copy:function(e){return Br.prototype.copy.call(this,e),this.samples=e.samples,this}}),(0,je.default)(Ur,{slerp:function(e,t,n,r){return n.copy(e).slerp(t,r)},slerpFlat:function(e,t,n,r,i,a,o){var s=n[r+0],l=n[r+1],u=n[r+2],h=n[r+3],c=i[a+0],d=i[a+1],f=i[a+2],p=i[a+3];h===p&&s===c&&l===d&&u===f||(n=1-o,r=s*c+l*d+u*f+h*p,i=0<=r?1:-1,a=1-r*r,a>ne.default&&(a=Math.sqrt(a),r=Math.atan2(a,r*i),n=Math.sin(n*r)/a,o=Math.sin(o*r)/a),i*=o,s=s*n+c*i,l=l*n+d*i,u=u*n+f*i,h=h*n+p*i,n===1-o&&(o=1/Math.sqrt(s*s+l*l+u*u+h*h),s*=o,l*=o,u*=o,h*=o)),e[t]=s,e[t+1]=l,e[t+2]=u,e[t+3]=h}}),(0,u.default)(Ur.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}}}),(0,je.default)(Ur.prototype,{isQuaternion:!0,set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,a=e.order,o=Math.cos,s=Math.sin,l=o(n/2),e=o(r/2),o=o(i/2),n=s(n/2),r=s(r/2),i=s(i/2);return"XYZ"===a?(this._x=n*e*o+l*r*i,this._y=l*r*o-n*e*i,this._z=l*e*i+n*r*o,this._w=l*e*o-n*r*i):"YXZ"===a?(this._x=n*e*o+l*r*i,this._y=l*r*o-n*e*i,this._z=l*e*i-n*r*o,this._w=l*e*o+n*r*i):"ZXY"===a?(this._x=n*e*o-l*r*i,this._y=l*r*o+n*e*i,this._z=l*e*i+n*r*o,this._w=l*e*o-n*r*i):"ZYX"===a?(this._x=n*e*o-l*r*i,this._y=l*r*o+n*e*i,this._z=l*e*i-n*r*o,this._w=l*e*o+n*r*i):"YZX"===a?(this._x=n*e*o+l*r*i,this._y=l*r*o+n*e*i,this._z=l*e*i-n*r*o,this._w=l*e*o-n*r*i):"XZY"===a&&(this._x=n*e*o-l*r*i,this._y=l*r*o-n*e*i,this._z=l*e*i+n*r*o,this._w=l*e*o+n*r*i),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,t=Math.sin(n);return this._x=e.x*t,this._y=e.y*t,this._z=e.z*t,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,r=n[0],i=n[4],a=n[8],o=n[1],s=n[5],l=n[9],u=n[2],h=n[6],e=n[10],n=r+s+e;return 0<n?(t=.5/Math.sqrt(n+1),this._w=.25/t,this._x=(h-l)*t,this._y=(a-u)*t,this._z=(o-i)*t):s<r&&e<r?(t=2*Math.sqrt(1+r-s-e),this._w=(h-l)/t,this._x=.25*t,this._y=(i+o)/t,this._z=(a+u)/t):e<s?(t=2*Math.sqrt(1+s-r-e),this._w=(a-u)/t,this._x=(i+o)/t,this._y=.25*t,this._z=(l+h)/t):(t=2*Math.sqrt(1+e-r-s),this._w=(o-i)/t,this._x=(a+u)/t,this._y=(l+h)/t,this._z=.25*t),this._onChangeCallback(),this},setFromUnitVectors:function(e,t){var n=1e-6,r=e.dot(t)+1;return r<n?(r=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0):(this._x=0,this._y=-e.z,this._z=e.y)):(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:function(e){return 2*Math.acos(Math.abs(Rr.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);return 0===n||(n=Math.min(1,t/n),this.slerp(e,n)),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,e=t._z,t=t._w;return this._x=n*t+a*o+r*e-i*s,this._y=r*t+a*s+i*o-n*e,this._z=i*t+a*e+n*s-r*o,this._w=a*t-n*o-r*s-i*e,this._onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,a=this._w,o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),1<=o)return this._w=a,this._x=n,this._y=r,this._z=i,this;if(e=1-o*o,e<=ne.default){var s=1-t;return this._w=s*a+t*this._w,this._x=s*n+t*this._x,this._y=s*r+t*this._y,this._z=s*i+t*this._z,this.normalize(),this._onChangeCallback(),this}return s=Math.sqrt(e),e=Math.atan2(s,o),o=Math.sin((1-t)*e)/s,s=Math.sin(t*e)/s,this._w=a*o+this._w*s,this._x=n*o+this._x*s,this._y=r*o+this._y*s,this._z=i*o+this._z*s,this._onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},fromBufferAttribute:function(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this},_onChange:function(e){return this._onChangeCallback=e,this},_onChangeCallback:function(){}});var zr=new Vr,Gr=new Ur;function Vr(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}(0,je.default)(Vr.prototype,{isVector3:!0,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(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:function(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:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Gr.setFromEuler(e))},applyAxisAngle:function(e,t){return this.applyQuaternion(Gr.setFromAxisAngle(e,t))},applyMatrix3:function(e){var t=this.x,n=this.y,r=this.z,e=e.elements;return this.x=e[0]*t+e[3]*n+e[6]*r,this.y=e[1]*t+e[4]*n+e[7]*r,this.z=e[2]*t+e[5]*n+e[8]*r,this},applyNormalMatrix:function(e){return this.applyMatrix3(e).normalize()},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,e=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*e,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*e,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*e,this},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,l=s*t+a*r-o*n,u=s*n+o*t-i*r,e=s*r+i*n-a*t,r=-i*t-a*n-o*r;return this.x=l*s+r*-i+u*-o-e*-a,this.y=u*s+r*-a+e*-i-l*-o,this.z=e*s+r*-o+l*-a-u*-i,this},project:function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)},unproject:function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)},transformDirection:function(e){var t=this.x,n=this.y,r=this.z,e=e.elements;return this.x=e[0]*t+e[4]*n+e[8]*r,this.y=e[1]*t+e[5]*n+e[9]*r,this.z=e[2]*t+e[6]*n+e[10]*r,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(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:function(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:function(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:function(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:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(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:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var n=e.x,r=e.y,i=e.z,a=t.x,e=t.y,t=t.z;return this.x=r*t-i*e,this.y=i*a-n*t,this.z=n*e-r*a,this},projectOnVector:function(e){var t=e.lengthSq();return 0===t?this.set(0,0,0):(t=e.dot(this)/t,this.copy(e).multiplyScalar(t))},projectOnPlane:function(e){return zr.copy(this).projectOnVector(e),this.sub(zr)},reflect:function(e){return this.sub(zr.copy(e).multiplyScalar(2*this.dot(e)))},angleTo:function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:(t=this.dot(e)/t,Math.acos(Rr.clamp(t,-1,1)))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y,e=this.z-e.z;return t*t+n*n+e*e},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)},setFromSphericalCoords:function(e,t,n){var r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this},setFromCylindrical:function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},setFromCylindricalCoords:function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this},setFromMatrixPosition:function(e){return e=e.elements,this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),e=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=e,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},setFromMatrix3Column:function(e,t){return this.fromArray(e.elements,3*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}});var Hr=new Vr,jr=new Jr,Wr=new Vr(0,0,0),Yr=new Vr(1,1,1),qr=new Vr,Xr=new Vr,Zr=new Vr;function Jr(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}(0,je.default)(Jr.prototype,{isMatrix4:!0,set:function(e,t,n,r,i,a,o,s,l,u,h,c,d,f,p,m){var v=this.elements;return v[0]=e,v[4]=t,v[8]=n,v[12]=r,v[1]=i,v[5]=a,v[9]=o,v[13]=s,v[2]=l,v[6]=u,v[10]=h,v[14]=c,v[3]=d,v[7]=f,v[11]=p,v[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new Jr).fromArray(this.elements)},copy:function(e){var t=this.elements,e=e.elements;return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],this},copyPosition:function(e){var t=this.elements,e=e.elements;return t[12]=e[12],t[13]=e[13],t[14]=e[14],this},extractBasis:function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this},extractRotation:function(e){var t=this.elements,n=e.elements,r=1/Hr.setFromMatrixColumn(e,0).length(),i=1/Hr.setFromMatrixColumn(e,1).length(),e=1/Hr.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromEuler:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t,n,r,i,a,o,s,l,u,h,c,d,f=this.elements,p=e.x,m=e.y,v=e.z,g=Math.cos(p),y=Math.sin(p),_=Math.cos(m),p=Math.sin(m),m=Math.cos(v),v=Math.sin(v);return"XYZ"===e.order?(a=g*m,o=g*v,s=y*m,l=y*v,f[0]=_*m,f[4]=-_*v,f[8]=p,f[1]=o+s*p,f[5]=a-l*p,f[9]=-y*_,f[2]=l-a*p,f[6]=s+o*p,f[10]=g*_):"YXZ"===e.order?(t=_*m,n=_*v,r=p*m,i=p*v,f[0]=t+i*y,f[4]=r*y-n,f[8]=g*p,f[1]=g*v,f[5]=g*m,f[9]=-y,f[2]=n*y-r,f[6]=i+t*y,f[10]=g*_):"ZXY"===e.order?(t=_*m,n=_*v,r=p*m,i=p*v,f[0]=t-i*y,f[4]=-g*v,f[8]=r+n*y,f[1]=n+r*y,f[5]=g*m,f[9]=i-t*y,f[2]=-g*p,f[6]=y,f[10]=g*_):"ZYX"===e.order?(a=g*m,o=g*v,s=y*m,l=y*v,f[0]=_*m,f[4]=s*p-o,f[8]=a*p+l,f[1]=_*v,f[5]=l*p+a,f[9]=o*p-s,f[2]=-p,f[6]=y*_,f[10]=g*_):"YZX"===e.order?(u=g*_,h=g*p,c=y*_,d=y*p,f[0]=_*m,f[4]=d-u*v,f[8]=c*v+h,f[1]=v,f[5]=g*m,f[9]=-y*m,f[2]=-p*m,f[6]=h*v+c,f[10]=u-d*v):"XZY"===e.order&&(u=g*_,h=g*p,c=y*_,d=y*p,f[0]=_*m,f[4]=-v,f[8]=p*m,f[1]=u*v+d,f[5]=g*m,f[9]=h*v-c,f[2]=c*v-h,f[6]=y*m,f[10]=d*v+u),f[3]=0,f[7]=0,f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,this},makeRotationFromQuaternion:function(e){return this.compose(Wr,e,Yr)},lookAt:function(e,t,n){var r=this.elements;return Zr.subVectors(e,t),0===Zr.lengthSq()&&(Zr.z=1),Zr.normalize(),qr.crossVectors(n,Zr),0===qr.lengthSq()&&(1===Math.abs(n.z)?Zr.x+=1e-4:Zr.z+=1e-4,Zr.normalize(),qr.crossVectors(n,Zr)),qr.normalize(),Xr.crossVectors(Zr,qr),r[0]=qr.x,r[4]=Xr.x,r[8]=Zr.x,r[1]=qr.y,r[5]=Xr.y,r[9]=Zr.y,r[2]=qr.z,r[6]=Xr.z,r[10]=Zr.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],l=n[12],u=n[1],h=n[5],c=n[9],d=n[13],f=n[2],p=n[6],m=n[10],v=n[14],g=n[3],y=n[7],_=n[11],x=n[15],w=r[0],b=r[4],M=r[8],T=r[12],E=r[1],S=r[5],A=r[9],I=r[13],L=r[2],R=r[6],N=r[10],k=r[14],e=r[3],t=r[7],n=r[11],r=r[15];return i[0]=a*w+o*E+s*L+l*e,i[4]=a*b+o*S+s*R+l*t,i[8]=a*M+o*A+s*N+l*n,i[12]=a*T+o*I+s*k+l*r,i[1]=u*w+h*E+c*L+d*e,i[5]=u*b+h*S+c*R+d*t,i[9]=u*M+h*A+c*N+d*n,i[13]=u*T+h*I+c*k+d*r,i[2]=f*w+p*E+m*L+v*e,i[6]=f*b+p*S+m*R+v*t,i[10]=f*M+p*A+m*N+v*n,i[14]=f*T+p*I+m*k+v*r,i[3]=g*w+y*E+_*L+x*e,i[7]=g*b+y*S+_*R+x*t,i[11]=g*M+y*A+_*N+x*n,i[15]=g*T+y*I+_*k+x*r,this},multiplyScalar:function(e){var 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:function(){var e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],o=e[5],s=e[9],l=e[13],u=e[2],h=e[6],c=e[10],d=e[14],f=e[3],p=e[7],m=e[11],e=e[15];return f*(+i*s*h-r*l*h-i*o*c+n*l*c+r*o*d-n*s*d)+p*(+t*s*d-t*l*c+i*a*c-r*a*d+r*l*u-i*s*u)+m*(+t*l*h-t*o*d-i*a*h+n*a*d+i*o*u-n*l*u)+e*(-r*o*u-t*s*h+t*o*c+r*a*h-n*a*c+n*s*u)},transpose:function(){var e=this.elements,t=e[1];return 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:function(e,t,n){var r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this},getInverse:function(e,t){void 0!==t&&console.warn("THREE.Matrix4: .getInverse() can no longer be configured to throw on degenerate.");var n=this.elements,r=e.elements,i=r[0],a=r[1],o=r[2],s=r[3],l=r[4],u=r[5],h=r[6],c=r[7],d=r[8],f=r[9],p=r[10],m=r[11],v=r[12],g=r[13],y=r[14],_=r[15],x=f*y*c-g*p*c+g*h*m-u*y*m-f*h*_+u*p*_,w=v*p*c-d*y*c-v*h*m+l*y*m+d*h*_-l*p*_,t=d*g*c-v*f*c+v*u*m-l*g*m-d*u*_+l*f*_,e=v*f*h-d*g*h-v*u*p+l*g*p+d*u*y-l*f*y,r=i*x+a*w+o*t+s*e;return 0===r?this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0):(r=1/r,n[0]=x*r,n[1]=(g*p*s-f*y*s-g*o*m+a*y*m+f*o*_-a*p*_)*r,n[2]=(u*y*s-g*h*s+g*o*c-a*y*c-u*o*_+a*h*_)*r,n[3]=(f*h*s-u*p*s-f*o*c+a*p*c+u*o*m-a*h*m)*r,n[4]=w*r,n[5]=(d*y*s-v*p*s+v*o*m-i*y*m-d*o*_+i*p*_)*r,n[6]=(v*h*s-l*y*s-v*o*c+i*y*c+l*o*_-i*h*_)*r,n[7]=(l*p*s-d*h*s+d*o*c-i*p*c-l*o*m+i*h*m)*r,n[8]=t*r,n[9]=(v*f*s-d*g*s-v*a*m+i*g*m+d*a*_-i*f*_)*r,n[10]=(l*g*s-v*u*s+v*a*c-i*g*c-l*a*_+i*u*_)*r,n[11]=(d*u*s-l*f*s-d*a*c+i*f*c+l*a*m-i*u*m)*r,n[12]=e*r,n[13]=(d*g*o-v*f*o+v*a*p-i*g*p-d*a*y+i*f*y)*r,n[14]=(v*u*o-l*g*o-v*a*h+i*g*h+l*a*y-i*u*y)*r,n[15]=(l*f*o-d*u*o+d*a*h-i*f*h-l*a*p+i*u*p)*r,this)},scale:function(e){var t=this.elements,n=e.x,r=e.y,e=e.z;return t[0]*=n,t[4]*=r,t[8]*=e,t[1]*=n,t[5]*=r,t[9]*=e,t[2]*=n,t[6]*=r,t[10]*=e,t[3]*=n,t[7]*=r,t[11]*=e,this},getMaxScaleOnAxis:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],e=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,e))},makeTranslation:function(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e),e=Math.sin(e);return this.set(1,0,0,0,0,t,-e,0,0,e,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e),e=Math.sin(e);return this.set(t,0,e,0,0,1,0,0,-e,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e),e=Math.sin(e);return this.set(t,-e,0,0,e,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,o=e.y,s=e.z,t=i*a,e=i*o;return this.set(t*a+n,t*o-r*s,t*s+r*o,0,t*o+r*s,e*o+n,e*s-r*a,0,t*s-r*o,e*s+r*a,i*s*s+n,0,0,0,0,1),this},makeScale:function(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(e,t,n){return this.set(1,t,n,0,e,1,n,0,e,t,1,0,0,0,0,1),this},compose:function(e,t,n){var r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,l=i+i,u=a+a,h=o+o,c=i*l,d=i*u,f=i*h,t=a*u,i=a*h,a=o*h,o=s*l,l=s*u,u=s*h,s=n.x,h=n.y,n=n.z;return r[0]=(1-(t+a))*s,r[1]=(d+u)*s,r[2]=(f-l)*s,r[3]=0,r[4]=(d-u)*h,r[5]=(1-(c+a))*h,r[6]=(i+o)*h,r[7]=0,r[8]=(f+l)*n,r[9]=(i-o)*n,r[10]=(1-(c+t))*n,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this},decompose:function(e,t,n){var r=this.elements,i=Hr.set(r[0],r[1],r[2]).length(),a=Hr.set(r[4],r[5],r[6]).length(),o=Hr.set(r[8],r[9],r[10]).length(),s=this.determinant();return s<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],jr.copy(this),s=1/i,e=1/a,r=1/o,jr.elements[0]*=s,jr.elements[1]*=s,jr.elements[2]*=s,jr.elements[4]*=e,jr.elements[5]*=e,jr.elements[6]*=e,jr.elements[8]*=r,jr.elements[9]*=r,jr.elements[10]*=r,t.setFromRotationMatrix(jr),n.x=i,n.y=a,n.z=o,this},makePerspective:function(e,t,n,r,i,a){void 0===a&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var o=this.elements,s=2*i/(t-e),l=2*i/(n-r),e=(t+e)/(t-e),n=(n+r)/(n-r),r=-(a+i)/(a-i),i=-2*a*i/(a-i);return o[0]=s,o[4]=0,o[8]=e,o[12]=0,o[1]=0,o[5]=l,o[9]=n,o[13]=0,o[2]=0,o[6]=0,o[10]=r,o[14]=i,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this},makeOrthographic:function(e,t,n,r,i,a){var o=this.elements,s=1/(t-e),l=1/(n-r),u=1/(a-i),e=(t+e)*s,r=(n+r)*l,i=(a+i)*u;return o[0]=2*s,o[4]=0,o[8]=0,o[12]=-e,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-r,o[2]=0,o[6]=0,o[10]=-2*u,o[14]=-i,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this},equals:function(e){for(var t=this.elements,n=e.elements,r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<16;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}});var Kr=new Jr,Qr=new Ur;function $r(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._order=r||$r.DefaultOrder}function ei(){this.mask=1}$r.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],$r.DefaultOrder="XYZ",(0,u.default)($r.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},order:{get:function(){return this._order},set:function(e){this._order=e,this._onChangeCallback()}}}),(0,je.default)($r.prototype,{isEuler:!0,set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._order=r||this._order,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this},setFromRotationMatrix:function(e,t,n){var r=Rr.clamp,i=e.elements,a=i[0],o=i[4],s=i[8],l=i[1],u=i[5],h=i[9],c=i[2],e=i[6],i=i[10];return t=t||this._order,"XYZ"===t?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-h,i),this._z=Math.atan2(-o,a)):(this._x=Math.atan2(e,u),this._z=0)):"YXZ"===t?(this._x=Math.asin(-r(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(s,i),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-c,a),this._z=0)):"ZXY"===t?(this._x=Math.asin(r(e,-1,1)),Math.abs(e)<.9999999?(this._y=Math.atan2(-c,i),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,a))):"ZYX"===t?(this._y=Math.asin(-r(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(e,i),this._z=Math.atan2(l,a)):(this._x=0,this._z=Math.atan2(-o,u))):"YZX"===t?(this._z=Math.asin(r(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-c,a)):(this._x=0,this._y=Math.atan2(s,i))):"XZY"===t?(this._z=Math.asin(-r(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(e,u),this._y=Math.atan2(s,a)):(this._x=Math.atan2(-h,i),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+t),this._order=t,!1!==n&&this._onChangeCallback(),this},setFromQuaternion:function(e,t,n){return Kr.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Kr,t,n)},setFromVector3:function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},reorder:function(e){return Qr.setFromEuler(this),this.setFromQuaternion(Qr,e)},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},fromArray:function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e},toVector3:function(e){return e?e.set(this._x,this._y,this._z):new Vr(this._x,this._y,this._z)},_onChange:function(e){return this._onChangeCallback=e,this},_onChangeCallback:function(){}}),(0,je.default)(ei.prototype,{set:function(e){this.mask=1<<e|0},enable:function(e){this.mask|=1<<e|0},enableAll:function(){this.mask=-1},toggle:function(e){this.mask^=1<<e|0},disable:function(e){this.mask&=~(1<<e|0)},disableAll:function(){this.mask=0},test:function(e){return 0!=(this.mask&e.mask)}});var ti=0,ni=new Vr,ri=new Ur,ii=new Jr,ai=new Vr,oi=new Vr,si=new Vr,li=new Ur,ui=new Vr(1,0,0),hi=new Vr(0,1,0),ci=new Vr(0,0,1),di={type:"added"},fi={type:"removed"};function pi(){(0,m.default)(this,"id",{value:ti++}),this.uuid=Rr.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=pi.DefaultUp.clone();var e=new Vr,t=new $r,n=new Ur,r=new Vr(1,1,1);function i(){n.setFromEuler(t,!1)}function a(){t.setFromQuaternion(n,void 0,!1)}t._onChange(i),n._onChange(a),(0,u.default)(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new Jr},normalMatrix:{value:new kr}}),this.matrix=new Jr,this.matrixWorld=new Jr,this.matrixAutoUpdate=pi.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new ei,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function mi(){pi.call(this),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}pi.DefaultUp=new Vr(0,1,0),pi.DefaultMatrixAutoUpdate=!0,pi.prototype=(0,je.default)((0,d.default)(Sr.prototype),{constructor:pi,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix4:function(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(e){return this.quaternion.premultiply(e),this},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)},setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:function(e,t){return ri.setFromAxisAngle(e,t),this.quaternion.multiply(ri),this},rotateOnWorldAxis:function(e,t){return ri.setFromAxisAngle(e,t),this.quaternion.premultiply(ri),this},rotateX:function(e){return this.rotateOnAxis(ui,e)},rotateY:function(e){return this.rotateOnAxis(hi,e)},rotateZ:function(e){return this.rotateOnAxis(ci,e)},translateOnAxis:function(e,t){return ni.copy(e).applyQuaternion(this.quaternion),this.position.add(ni.multiplyScalar(t)),this},translateX:function(e){return this.translateOnAxis(ui,e)},translateY:function(e){return this.translateOnAxis(hi,e)},translateZ:function(e){return this.translateOnAxis(ci,e)},localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:function(e){return e.applyMatrix4(ii.getInverse(this.matrixWorld))},lookAt:function(e,t,n){e.isVector3?ai.copy(e):ai.set(e,t,n),n=this.parent,this.updateWorldMatrix(!0,!1),oi.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ii.lookAt(oi,ai,this.up):ii.lookAt(ai,oi,this.up),this.quaternion.setFromRotationMatrix(ii),n&&(ii.extractRotation(n.matrixWorld),ri.setFromRotationMatrix(ii),this.quaternion.premultiply(ri.inverse()))},add:function(e){if(1<arguments.length){for(var 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):e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(di)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this},remove:function(e){if(1<arguments.length){for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}var n,r=(0,ce.default)(n=this.children).call(n,e);return-1!==r&&(e.parent=null,(0,g.default)(n=this.children).call(n,r,1),e.dispatchEvent(fi)),this},attach:function(e){return this.updateWorldMatrix(!0,!1),ii.getInverse(this.matrixWorld),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),ii.multiply(e.parent.matrixWorld)),e.applyMatrix4(ii),e.updateWorldMatrix(!1,!1),this.add(e),this},getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n],i=i.getObjectByProperty(e,t);if(void 0!==i)return i}},getWorldPosition:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),e=new Vr),this.updateMatrixWorld(!0),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),e=new Ur),this.updateMatrixWorld(!0),this.matrixWorld.decompose(oi,e,si),e},getWorldScale:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),e=new Vr),this.updateMatrixWorld(!0),this.matrixWorld.decompose(oi,li,e),e},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Vr),this.updateMatrixWorld(!0);var t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()},raycast:function(){},traverse:function(e){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverse(e)},traverseVisible:function(e){if(!1!==this.visible){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)},updateWorldMatrix:function(e,t){var n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t)for(var r=this.children,i=0,a=r.length;i<a;i++)r[i].updateWorldMatrix(!1,!0)},toJSON:function(n){var e=void 0===n||"string"==typeof n,t={};e&&(n={geometries:{},materials:{},textures:{},images:{},shapes:{}},t.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r,i,a={};function o(e,t){return void 0===e[t.uuid]&&(e[t.uuid]=t.toJSON(n)),t.uuid}if(a.uuid=this.uuid,a.type=this.type,""!==this.name&&(a.name=this.name),!0===this.castShadow&&(a.castShadow=!0),!0===this.receiveShadow&&(a.receiveShadow=!0),!1===this.visible&&(a.visible=!1),!1===this.frustumCulled&&(a.frustumCulled=!1),0!==this.renderOrder&&(a.renderOrder=this.renderOrder),"{}"!==(0,p.default)(this.userData)&&(a.userData=this.userData),a.layers=this.layers.mask,a.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(a.matrixAutoUpdate=!1),this.isInstancedMesh&&(a.type="InstancedMesh",a.count=this.count,a.instanceMatrix=this.instanceMatrix.toJSON()),this.isMesh||this.isLine||this.isPoints){a.geometry=o(n.geometries,this.geometry);var s=this.geometry.parameters;if(void 0!==s&&void 0!==s.shapes){var l=s.shapes;if((0,We.default)(l))for(var u=0,h=l.length;u<h;u++){var c=l[u];o(n.shapes,c)}else o(n.shapes,l)}}if(void 0!==this.material)if((0,We.default)(this.material)){for(var d=[],u=0,h=this.material.length;u<h;u++)d.push(o(n.materials,this.material[u]));a.material=d}else a.material=o(n.materials,this.material);if(0<this.children.length)for(a.children=[],u=0;u<this.children.length;u++)a.children.push(this.children[u].toJSON(n).object);return e&&(r=f(n.geometries),i=f(n.materials),s=f(n.textures),e=f(n.images),l=f(n.shapes),0<r.length&&(t.geometries=r),0<i.length&&(t.materials=i),0<s.length&&(t.textures=s),0<e.length&&(t.images=e),0<l.length&&(t.shapes=l)),t.object=a,t;function f(e){var t,n=[];for(t in e){var r=e[t];delete r.metadata,n.push(r)}return n}},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse((0,p.default)(e.userData)),!0===t)for(var n=0;n<e.children.length;n++){var r=e.children[n];this.add(r.clone())}return this}}),mi.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:mi,isScene:!0,copy:function(e,t){return pi.prototype.copy.call(this,e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this},toJSON:function(e){var t=pi.prototype.toJSON.call(this,e);return null!==this.background&&(t.object.background=this.background.toJSON(e)),null!==this.environment&&(t.object.environment=this.environment.toJSON(e)),null!==this.fog&&(t.object.fog=this.fog.toJSON()),t},dispose:function(){this.dispatchEvent({type:"dispose"})}});var vi=[new Vr,new Vr,new Vr,new Vr,new Vr,new Vr,new Vr,new Vr],gi=new Vr,yi=new Li,_i=new Vr,xi=new Vr,wi=new Vr,bi=new Vr,Mi=new Vr,Ti=new Vr,Ei=new Vr,Si=new Vr,Ai=new Vr,Ii=new Vr;function Li(e,t){this.min=void 0!==e?e:new Vr(Infinity,Infinity,Infinity),this.max=void 0!==t?t:new Vr(-Infinity,-Infinity,-Infinity)}function Ri(e,t,n,r,i){for(var a=0,o=e.length-3;a<=o;a+=3){Ii.fromArray(e,a);var s=i.x*Math.abs(Ii.x)+i.y*Math.abs(Ii.y)+i.z*Math.abs(Ii.z),l=t.dot(Ii),u=n.dot(Ii),h=r.dot(Ii);if(Math.max(-Math.max(l,u,h),Math.min(l,u,h))>s)return!1}return!0}(0,je.default)(Li.prototype,{isBox3:!0,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){for(var t=Infinity,n=Infinity,r=Infinity,i=-Infinity,a=-Infinity,o=-Infinity,s=0,l=e.length;s<l;s+=3){var u=e[s],h=e[s+1],c=e[s+2];u<t&&(t=u),h<n&&(n=h),c<r&&(r=c),i<u&&(i=u),a<h&&(a=h),o<c&&(o=c)}return this.min.set(t,n,r),this.max.set(i,a,o),this},setFromBufferAttribute:function(e){for(var t=Infinity,n=Infinity,r=Infinity,i=-Infinity,a=-Infinity,o=-Infinity,s=0,l=e.count;s<l;s++){var u=e.getX(s),h=e.getY(s),c=e.getZ(s);u<t&&(t=u),h<n&&(n=h),c<r&&(r=c),i<u&&(i=u),a<h&&(a=h),o<c&&(o=c)}return this.min.set(t,n,r),this.max.set(i,a,o),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(e,t){return t=gi.copy(t).multiplyScalar(.5),this.min.copy(e).sub(t),this.max.copy(e).add(t),this},setFromObject:function(e){return this.makeEmpty(),this.expandByObject(e)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=Infinity,this.max.x=this.max.y=this.max.z=-Infinity,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box3: .getCenter() target is now required"),e=new Vr),this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box3: .getSize() target is now required"),e=new Vr),this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},expandByObject:function(e){e.updateWorldMatrix(!1,!1);var t=e.geometry;void 0!==t&&(null===t.boundingBox&&t.computeBoundingBox(),yi.copy(t.boundingBox),yi.applyMatrix4(e.matrixWorld),this.union(yi));for(var n=e.children,r=0,i=n.length;r<i;r++)this.expandByObject(n[r]);return this},containsPoint:function(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:function(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:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new Vr),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:function(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:function(e){return this.clampPoint(e.center,gi),gi.distanceToSquared(e.center)<=e.radius*e.radius},intersectsPlane:function(e){var t,n=0<e.normal.x?(t=e.normal.x*this.min.x,e.normal.x*this.max.x):(t=e.normal.x*this.max.x,e.normal.x*this.min.x);return 0<e.normal.y?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),0<e.normal.z?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant},intersectsTriangle:function(e){return!this.isEmpty()&&(this.getCenter(Ei),Si.subVectors(this.max,Ei),_i.subVectors(e.a,Ei),xi.subVectors(e.b,Ei),wi.subVectors(e.c,Ei),bi.subVectors(xi,_i),Mi.subVectors(wi,xi),Ti.subVectors(_i,wi),e=[0,-bi.z,bi.y,0,-Mi.z,Mi.y,0,-Ti.z,Ti.y,bi.z,0,-bi.x,Mi.z,0,-Mi.x,Ti.z,0,-Ti.x,-bi.y,bi.x,0,-Mi.y,Mi.x,0,-Ti.y,Ti.x,0],!!Ri(e,_i,xi,wi,Si)&&(e=[1,0,0,0,1,0,0,0,1],!!Ri(e,_i,xi,wi,Si)&&(Ai.crossVectors(bi,Mi),e=[Ai.x,Ai.y,Ai.z],Ri(e,_i,xi,wi,Si))))},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new Vr),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){var t=gi.copy(e).clamp(this.min,this.max);return t.sub(e).length()},getBoundingSphere:function(e){return void 0===e&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=.5*this.getSize(gi).length(),e},intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:function(e){return this.isEmpty()||(vi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),vi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),vi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),vi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),vi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),vi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),vi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),vi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(vi)),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}});var Ni=new Li;function ki(e,t){this.center=void 0!==e?e:new Vr,this.radius=void 0!==t?t:0}(0,je.default)(ki.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:function(e,t){var n=this.center;void 0!==t?n.copy(t):Ni.setFromPoints(e).getCenter(n);for(var r=0,i=0,a=e.length;i<a;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.center.copy(e.center),this.radius=e.radius,this},empty:function(){return this.radius<=0},containsPoint:function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(e){return e.distanceTo(this.center)-this.radius},intersectsSphere:function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},intersectsBox:function(e){return e.intersectsSphere(this)},intersectsPlane:function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius},clampPoint:function(e,t){var n=this.center.distanceToSquared(e);return void 0===t&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),t=new Vr),t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},getBoundingBox:function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new Li),e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}});var Pi=new Vr,Ci=new Vr,Di=new Vr,Oi=new Vr,Bi=new Vr,Fi=new Vr,Ui=new Vr;function zi(e,t){this.origin=void 0!==e?e:new Vr,this.direction=void 0!==t?t:new Vr(0,0,-1)}(0,je.default)(zi.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new Vr),t.copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:function(e){return this.origin.copy(this.at(e,Pi)),this},closestPointToPoint:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new Vr),t.subVectors(e,this.origin),e=t.dot(this.direction),e<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(e).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(e){var t=Pi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Pi.copy(this.direction).multiplyScalar(t).add(this.origin),Pi.distanceToSquared(e))},distanceSqToSegment:function(e,t,n,r){Ci.copy(e).add(t).multiplyScalar(.5),Di.copy(t).sub(e).normalize(),Oi.copy(this.origin).sub(Ci);var i,a,o=.5*e.distanceTo(t),s=-this.direction.dot(Di),l=Oi.dot(this.direction),u=-Oi.dot(Di),h=Oi.lengthSq(),e=Math.abs(1-s*s),h=0<e?(i=s*u-l,a=s*l-u,t=o*e,0<=i?-t<=a?a<=t?(e=1/e,i*=e,a*=e,i*(i+s*a+2*l)+a*(s*i+a+2*u)+h):(a=o,i=Math.max(0,-(s*a+l)),-i*i+a*(a+2*u)+h):(a=-o,i=Math.max(0,-(s*a+l)),-i*i+a*(a+2*u)+h):a<=-t?(i=Math.max(0,-(-s*o+l)),a=0<i?-o:Math.min(Math.max(-o,-u),o),-i*i+a*(a+2*u)+h):a<=t?(i=0,a=Math.min(Math.max(-o,-u),o),a*(a+2*u)+h):(i=Math.max(0,-(s*o+l)),a=0<i?o:Math.min(Math.max(-o,-u),o),-i*i+a*(a+2*u)+h)):(a=0<s?-o:o,i=Math.max(0,-(s*a+l)),-i*i+a*(a+2*u)+h);return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(Di).multiplyScalar(a).add(Ci),h},intersectSphere:function(e,t){Pi.subVectors(e.center,this.origin);var n=Pi.dot(this.direction),r=Pi.dot(Pi)-n*n,e=e.radius*e.radius;return e<r?null:(e=Math.sqrt(e-r),r=n-e,e=n+e,r<0&&e<0?null:r<0?this.at(e,t):this.at(r,t))},intersectsSphere:function(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);return 0===t?0===e.distanceToPoint(this.origin)?0:null:(t=-(this.origin.dot(e.normal)+e.constant)/t,0<=t?t:null)},intersectPlane:function(e,t){return e=this.distanceToPlane(e),null===e?null:this.at(e,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);return 0===t||(e=e.normal.dot(this.direction),e*t<0)},intersectBox:function(e,t){var n,r,i,a=1/this.direction.x,o=1/this.direction.y,s=1/this.direction.z,l=this.origin,a=0<=a?(n=(e.min.x-l.x)*a,(e.max.x-l.x)*a):(n=(e.max.x-l.x)*a,(e.min.x-l.x)*a),o=0<=o?(r=(e.min.y-l.y)*o,(e.max.y-l.y)*o):(r=(e.max.y-l.y)*o,(e.min.y-l.y)*o);return o<n||a<r?null:((n<r||n!=n)&&(n=r),(o<a||a!=a)&&(a=o),s=0<=s?(i=(e.min.z-l.z)*s,(e.max.z-l.z)*s):(i=(e.max.z-l.z)*s,(e.min.z-l.z)*s),s<n||a<i?null:((n<i||n!=n)&&(n=i),(s<a||a!=a)&&(a=s),a<0?null:this.at(0<=n?n:a,t)))},intersectsBox:function(e){return null!==this.intersectBox(e,Pi)},intersectTriangle:function(e,t,n,r,i){if(Bi.subVectors(t,e),Fi.subVectors(n,e),Ui.crossVectors(Bi,Fi),n=this.direction.dot(Ui),0<n){if(r)return null;a=1}else{if(!(n<0))return null;a=-1,n=-n}if(Oi.subVectors(this.origin,e),r=a*this.direction.dot(Fi.crossVectors(Oi,Fi)),r<0)return null;if(e=a*this.direction.dot(Bi.cross(Oi)),e<0)return null;if(n<r+e)return null;var a=-a*Oi.dot(Ui);return a<0?null:this.at(a/n,i)},applyMatrix4:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}});var Gi=new Vr,Vi=new Vr,Hi=new kr;function ji(e,t){this.normal=void 0!==e?e:new Vr(1,0,0),this.constant=void 0!==t?t:0}(0,je.default)(ji.prototype,{isPlane:!0,set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(e,t,n){return t=Gi.subVectors(n,t).cross(Vi.subVectors(e,t)).normalize(),this.setFromNormalAndCoplanarPoint(t,e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new Vr),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},intersectLine:function(e,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new Vr);var n=e.delta(Gi),r=this.normal.dot(n);return 0===r?0===this.distanceToPoint(e.start)?t.copy(e.start):void 0:(r=-(e.start.dot(this.normal)+this.constant)/r,r<0||1<r?void 0:t.copy(n).multiplyScalar(r).add(e.start))},intersectsLine:function(e){var t=this.distanceToPoint(e.start),e=this.distanceToPoint(e.end);return t<0&&0<e||e<0&&0<t},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new Vr),e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(e,t){return t=t||Hi.getNormalMatrix(e),e=this.coplanarPoint(Gi).applyMatrix4(e),t=this.normal.applyMatrix3(t).normalize(),this.constant=-e.dot(t),this},translate:function(e){return this.constant-=e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}});var Wi=new Vr,Yi=new Vr,qi=new Vr,Xi=new Vr,Zi=new Vr,Ji=new Vr,Ki=new Vr,Qi=new Vr,$i=new Vr,ea=new Vr;function ta(e,t,n){this.a=void 0!==e?e:new Vr,this.b=void 0!==t?t:new Vr,this.c=void 0!==n?n:new Vr}(0,je.default)(ta,{getNormal:function(e,t,n,r){return void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Vr),r.subVectors(n,t),Wi.subVectors(e,t),r.cross(Wi),t=r.lengthSq(),0<t?r.multiplyScalar(1/Math.sqrt(t)):r.set(0,0,0)},getBarycoord:function(e,t,n,r,i){Wi.subVectors(r,t),Yi.subVectors(n,t),qi.subVectors(e,t);var a=Wi.dot(Wi),o=Wi.dot(Yi),r=Wi.dot(qi),n=Yi.dot(Yi),e=Yi.dot(qi),t=a*n-o*o;return void 0===i&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),i=new Vr),0===t?i.set(-2,-1,-1):(t=1/t,n=(n*r-o*e)*t,t*=a*e-o*r,i.set(1-n-t,t,n))},containsPoint:function(e,t,n,r){return ta.getBarycoord(e,t,n,r,Xi),0<=Xi.x&&0<=Xi.y&&Xi.x+Xi.y<=1},getUV:function(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,Xi),s.set(0,0),s.addScaledVector(i,Xi.x),s.addScaledVector(a,Xi.y),s.addScaledVector(o,Xi.z),s},isFrontFacing:function(e,t,n,r){return Wi.subVectors(n,t),Yi.subVectors(e,t),Wi.cross(Yi).dot(r)<0}}),(0,je.default)(ta.prototype,{set:function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this},setFromPointsAndIndices:function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},getArea:function(){return Wi.subVectors(this.c,this.b),Yi.subVectors(this.a,this.b),.5*Wi.cross(Yi).length()},getMidpoint:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new Vr),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(e){return ta.getNormal(this.a,this.b,this.c,e)},getPlane:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new ji),e.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(e,t){return ta.getBarycoord(e,this.a,this.b,this.c,t)},getUV:function(e,t,n,r,i){return ta.getUV(e,this.a,this.b,this.c,t,n,r,i)},containsPoint:function(e){return ta.containsPoint(e,this.a,this.b,this.c)},isFrontFacing:function(e){return ta.isFrontFacing(this.a,this.b,this.c,e)},intersectsBox:function(e){return e.intersectsTriangle(this)},closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new Vr);var n=this.a,r=this.b,i=this.c;Zi.subVectors(r,n),Ji.subVectors(i,n),Qi.subVectors(e,n);var a=Zi.dot(Qi),o=Ji.dot(Qi);if(a<=0&&o<=0)return t.copy(n);$i.subVectors(e,r);var s=Zi.dot($i),l=Ji.dot($i);if(0<=s&&l<=s)return t.copy(r);var u=a*l-s*o;if(u<=0&&0<=a&&s<=0)return c=a/(a-s),t.copy(n).addScaledVector(Zi,c);ea.subVectors(e,i);var h=Zi.dot(ea),e=Ji.dot(ea);if(0<=e&&h<=e)return t.copy(i);if(a=h*o-a*e,a<=0&&0<=o&&e<=0)return d=o/(o-e),t.copy(n).addScaledVector(Ji,d);if(o=s*e-h*l,o<=0&&0<=l-s&&0<=h-e)return Ki.subVectors(i,r),d=(l-s)/(l-s+(h-e)),t.copy(r).addScaledVector(Ki,d);var o=1/(o+a+u),c=a*o,d=u*o;return t.copy(n).addScaledVector(Zi,c).addScaledVector(Ji,d)},equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}});var na={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},ra={h:0,s:0,l:0},ia={h:0,s:0,l:0};function aa(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}function oa(e,t,n){return n<0&&(n+=1),1<n&&--n,n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function sa(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function la(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}function ua(e,t,n,r,i,a){this.a=e,this.b=t,this.c=n,this.normal=r&&r.isVector3?r:new Vr,this.vertexNormals=(0,We.default)(r)?r:[],this.color=i&&i.isColor?i:new aa,this.vertexColors=(0,We.default)(i)?i:[],this.materialIndex=void 0!==a?a:0}(0,je.default)(aa.prototype,{isColor:!0,r:1,g:1,b:1,set:function(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this},setScalar:function(e){return this.r=e,this.g=e,this.b=e,this},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,n){return this.r=e,this.g=t,this.b=n,this},setHSL:function(e,t,n){return e=Rr.euclideanModulo(e,1),t=Rr.clamp(t,0,1),n=Rr.clamp(n,0,1),0===t?this.r=this.g=this.b=n:(t=n<=.5?n*(1+t):n+t-n*t,n=2*n-t,this.r=oa(n,t,e+1/3),this.g=oa(n,t,e),this.b=oa(n,t,e-1/3)),this},setStyle:function(t){function e(e){void 0!==e&&(0,de.default)(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}if(l=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n,r=l[1],i=l[2];switch(r){case"rgb":case"rgba":if(n=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(i))return this.r=Math.min(255,(0,_.default)(n[1],10))/255,this.g=Math.min(255,(0,_.default)(n[2],10))/255,this.b=Math.min(255,(0,_.default)(n[3],10))/255,e(n[5]),this;if(n=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(i))return this.r=Math.min(100,(0,_.default)(n[1],10))/100,this.g=Math.min(100,(0,_.default)(n[2],10))/100,this.b=Math.min(100,(0,_.default)(n[3],10))/100,e(n[5]),this;break;case"hsl":case"hsla":if(n=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(i)){var a=(0,de.default)(n[1])/360,o=(0,_.default)(n[2],10)/100,s=(0,_.default)(n[3],10)/100;return e(n[5]),this.setHSL(a,o,s)}}}else if(l=/^\#([A-Fa-f0-9]+)$/.exec(t)){var r=l[1],l=r.length;if(3===l)return this.r=(0,_.default)(r.charAt(0)+r.charAt(0),16)/255,this.g=(0,_.default)(r.charAt(1)+r.charAt(1),16)/255,this.b=(0,_.default)(r.charAt(2)+r.charAt(2),16)/255,this;if(6===l)return this.r=(0,_.default)(r.charAt(0)+r.charAt(1),16)/255,this.g=(0,_.default)(r.charAt(2)+r.charAt(3),16)/255,this.b=(0,_.default)(r.charAt(4)+r.charAt(5),16)/255,this}return t&&0<t.length?this.setColorName(t):this},setColorName:function(e){var t=na[e];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},copyLinearToGamma:function(e,t){return void 0===t&&(t=2),t=0<t?1/t:1,this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},convertGammaToLinear:function(e){return this.copyGammaToLinear(this,e),this},convertLinearToGamma:function(e){return this.copyLinearToGamma(this,e),this},copySRGBToLinear:function(e){return this.r=sa(e.r),this.g=sa(e.g),this.b=sa(e.b),this},copyLinearToSRGB:function(e){return this.r=la(e.r),this.g=la(e.g),this.b=la(e.b),this},convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){var e;return(0,y.default)(e="000000"+this.getHex().toString(16)).call(e,-6)},getHSL:function(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});var t,n=this.r,r=this.g,i=this.b,a=Math.max(n,r,i),o=Math.min(n,r,i),s=(o+a)/2;if(o===a)t=0,u=0;else{var l=a-o,u=s<=.5?l/(a+o):l/(2-a-o);switch(a){case n:t=(r-i)/l+(r<i?6:0);break;case r:t=(i-n)/l+2;break;case i:t=(n-r)/l+4}t/=6}return e.h=t,e.s=u,e.l=s,e},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(e,t,n){return this.getHSL(ra),ra.h+=e,ra.s+=t,ra.l+=n,this.setHSL(ra.h,ra.s,ra.l),this},add:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},addColors:function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},addScalar:function(e){return this.r+=e,this.g+=e,this.b+=e,this},sub:function(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:function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},multiplyScalar:function(e){return this.r*=e,this.g*=e,this.b*=e,this},lerp:function(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},lerpHSL:function(e,t){this.getHSL(ra),e.getHSL(ia);var n=Rr.lerp(ra.h,ia.h,t),e=Rr.lerp(ra.s,ia.s,t),t=Rr.lerp(ra.l,ia.l,t);return this.setHSL(n,e,t),this},equals:function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},fromArray:function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e},toJSON:function(){return this.getHex()}}),aa.NAMES=na,(0,je.default)(ua.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.a=e.a,this.b=e.b,this.c=e.c,this.normal.copy(e.normal),this.color.copy(e.color),this.materialIndex=e.materialIndex;for(var t=0,n=e.vertexNormals.length;t<n;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(t=0,n=e.vertexColors.length;t<n;t++)this.vertexColors[t]=e.vertexColors[t].clone();return this}});var ha=0;function ca(){(0,m.default)(this,"id",{value:ha++}),this.uuid=Rr.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.blending=ye,this.side=W,this.flatShading=!1,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=ke,this.blendDst=Pe,this.blendEquation=Me,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Ve,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=vr,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=nr,this.stencilZFail=nr,this.stencilZPass=nr,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}function da(e){ca.call(this),this.type="MeshBasicMaterial",this.color=new aa(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=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.setValues(e)}ca.prototype=(0,je.default)((0,d.default)(Sr.prototype),{constructor:ca,isMaterial:!0,onBeforeCompile:function(){},setValues:function(e){if(void 0!==e)for(var t in e){var n,r=e[t];void 0!==r?"shading"!==t?(n=this[t],void 0!==n?n&&n.isColor?n.set(r):n&&n.isVector3&&r&&r.isVector3?n.copy(r):this[t]=r:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")):(console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=r===Y):console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){var t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){var t,n=[];for(t in e){var r=e[t];delete r.metadata,n.push(r)}return n}return n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),(0,Ye.default)(this)&&(0,Ye.default)(this).isTexture&&(n.map=(0,Ye.default)(this).toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,n.reflectivity=this.reflectivity,n.refractionRatio=this.refractionRatio,void 0!==this.combine&&(n.combine=this.combine),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==ye&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==W&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),0<this.alphaTest&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),1<this.wireframeLinewidth&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==(0,p.default)(this.userData)&&(n.userData=this.userData),t&&(t=r(e.textures),e=r(e.images),0<t.length&&(n.textures=t),0<e.length&&(n.images=e)),n},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.flatShading=e.flatShading,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;var t=e.clippingPlanes,n=null;if(null!==t)for(var r=t.length,n=new Array(r),i=0;i!==r;++i)n[i]=t[i].clone();return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse((0,p.default)(e.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),(0,m.default)(ca.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),da.prototype=(0,d.default)(ca.prototype),da.prototype.constructor=da,da.prototype.isMeshBasicMaterial=!0,da.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.color.copy(e.color),this.map=(0,Ye.default)(e),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.skinning=e.skinning,this.morphTargets=e.morphTargets,this};var fa=new Vr;function pa(e,t,n){if((0,We.default)(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=gr,this.updateRange={offset:0,count:-1},this.version=0}function ma(e,t,n){pa.call(this,new Int8Array(e),t,n)}function va(e,t,n){pa.call(this,new Uint8Array(e),t,n)}function ga(e,t,n){pa.call(this,new Uint8ClampedArray(e),t,n)}function ya(e,t,n){pa.call(this,new Int16Array(e),t,n)}function _a(e,t,n){pa.call(this,new Uint16Array(e),t,n)}function xa(e,t,n){pa.call(this,new Int32Array(e),t,n)}function wa(e,t,n){pa.call(this,new Uint32Array(e),t,n)}function ba(e,t,n){pa.call(this,new Float32Array(e),t,n)}function Ma(e,t,n){pa.call(this,new Float64Array(e),t,n)}function Ta(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Ea(e){if(0===e.length)return-Infinity;for(var t=e[0],n=1,r=e.length;n<r;++n)e[n]>t&&(t=e[n]);return t}(0,m.default)(pa.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),(0,je.default)(pa.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this},copyAt:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var a=e[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),a=new aa),t[n++]=a.r,t[n++]=a.g,t[n++]=a.b}return this},copyVector2sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var a=e[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),a=new Nr),t[n++]=a.x,t[n++]=a.y}return this},copyVector3sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var a=e[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),a=new Vr),t[n++]=a.x,t[n++]=a.y,t[n++]=a.z}return this},copyVector4sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var a=e[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),a=new Or),t[n++]=a.x,t[n++]=a.y,t[n++]=a.z,t[n++]=a.w}return this},applyMatrix3:function(e){for(var t=0,n=this.count;t<n;t++)fa.x=this.getX(t),fa.y=this.getY(t),fa.z=this.getZ(t),fa.applyMatrix3(e),this.setXYZ(t,fa.x,fa.y,fa.z);return this},applyMatrix4:function(e){for(var t=0,n=this.count;t<n;t++)fa.x=this.getX(t),fa.y=this.getY(t),fa.z=this.getZ(t),fa.applyMatrix4(e),this.setXYZ(t,fa.x,fa.y,fa.z);return this},applyNormalMatrix:function(e){for(var t=0,n=this.count;t<n;t++)fa.x=this.getX(t),fa.y=this.getY(t),fa.z=this.getZ(t),fa.applyNormalMatrix(e),this.setXYZ(t,fa.x,fa.y,fa.z);return this},transformDirection:function(e){for(var t=0,n=this.count;t<n;t++)fa.x=this.getX(t),fa.y=this.getY(t),fa.z=this.getZ(t),fa.transformDirection(e),this.setXYZ(t,fa.x,fa.y,fa.z);return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this},onUpload:function(e){return this.onUploadCallback=e,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:(0,y.default)(Array.prototype).call(this.array),normalized:this.normalized}}}),ma.prototype=(0,d.default)(pa.prototype),ma.prototype.constructor=ma,va.prototype=(0,d.default)(pa.prototype),va.prototype.constructor=va,ga.prototype=(0,d.default)(pa.prototype),ga.prototype.constructor=ga,ya.prototype=(0,d.default)(pa.prototype),ya.prototype.constructor=ya,_a.prototype=(0,d.default)(pa.prototype),_a.prototype.constructor=_a,xa.prototype=(0,d.default)(pa.prototype),xa.prototype.constructor=xa,wa.prototype=(0,d.default)(pa.prototype),wa.prototype.constructor=wa,ba.prototype=(0,d.default)(pa.prototype),ba.prototype.constructor=ba,Ma.prototype=(0,d.default)(pa.prototype),Ma.prototype.constructor=Ma,(0,je.default)(Ta.prototype,{computeGroups:function(e){for(var t,n=[],r=void 0,i=e.faces,a=0;a<i.length;a++){var o=i[a];o.materialIndex!==r&&(r=o.materialIndex,void 0!==t&&(t.count=3*a-t.start,n.push(t)),t={start:3*a,materialIndex:r})}void 0!==t&&(t.count=3*a-t.start,n.push(t)),this.groups=n},fromGeometry:function(e){var t=e.faces,n=e.vertices,r=e.faceVertexUvs,i=r[0]&&0<r[0].length,a=r[1]&&0<r[1].length,o=e.morphTargets,s=o.length;if(0<s){for(var l=[],u=0;u<s;u++)l[u]={name:o[u].name,data:[]};this.morphTargets.position=l}var h=e.morphNormals,c=h.length;if(0<c){for(var d=[],u=0;u<c;u++)d[u]={name:h[u].name,data:[]};this.morphTargets.normal=d}var f=e.skinIndices,p=e.skinWeights,m=f.length===n.length,v=p.length===n.length;for(0<n.length&&0===t.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),u=0;u<t.length;u++){var g=t[u];this.vertices.push(n[g.a],n[g.b],n[g.c]);var y=g.vertexNormals;3===y.length?this.normals.push(y[0],y[1],y[2]):(x=g.normal,this.normals.push(x,x,x));var _,x=g.vertexColors;3===x.length?this.colors.push(x[0],x[1],x[2]):(x=g.color,this.colors.push(x,x,x)),!0===i&&(_=r[0][u],void 0!==_?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new Nr,new Nr,new Nr))),!0===a&&(_=r[1][u],void 0!==_?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new Nr,new Nr,new Nr)));for(var w=0;w<s;w++){var b=o[w].vertices;l[w].data.push(b[g.a],b[g.b],b[g.c])}for(w=0;w<c;w++){var M=h[w].vertexNormals[u];d[w].data.push(M.a,M.b,M.c)}m&&this.skinIndices.push(f[g.a],f[g.b],f[g.c]),v&&this.skinWeights.push(p[g.a],p[g.b],p[g.c])}return this.computeGroups(e),this.verticesNeedUpdate=e.verticesNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this}});var Sa=1,Aa=new Jr,Ia=new pi,La=new Vr,Ra=new Li,Na=new Li,ka=new Vr;function Pa(){(0,m.default)(this,"id",{value:Sa+=2}),this.uuid=Rr.generateUUID(),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:Infinity},this.userData={}}Pa.prototype=(0,je.default)((0,d.default)(Sr.prototype),{constructor:Pa,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){(0,We.default)(e)?this.index=new(65535<Ea(e)?wa:_a)(e,1):this.index=e},getAttribute:function(e){return this.attributes[e]},setAttribute:function(e,t){return this.attributes[e]=t,this},deleteAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,n){this.groups.push({start:e,count:t,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix4:function(e){var t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);var n=this.attributes.normal;return void 0!==n&&(t=(new kr).getNormalMatrix(e),n.applyNormalMatrix(t),n.needsUpdate=!0),n=this.attributes.tangent,void 0!==n&&(n.transformDirection(e),n.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(e){return Aa.makeRotationX(e),this.applyMatrix4(Aa),this},rotateY:function(e){return Aa.makeRotationY(e),this.applyMatrix4(Aa),this},rotateZ:function(e){return Aa.makeRotationZ(e),this.applyMatrix4(Aa),this},translate:function(e,t,n){return Aa.makeTranslation(e,t,n),this.applyMatrix4(Aa),this},scale:function(e,t,n){return Aa.makeScale(e,t,n),this.applyMatrix4(Aa),this},lookAt:function(e){return Ia.lookAt(e),Ia.updateMatrix(),this.applyMatrix4(Ia.matrix),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(La).negate(),this.translate(La.x,La.y,La.z),this},setFromObject:function(e){var t,n,r=e.geometry;return e.isPoints||e.isLine?(t=new ba(3*r.vertices.length,3),n=new ba(3*r.colors.length,3),this.setAttribute("position",t.copyVector3sArray(r.vertices)),this.setAttribute("color",n.copyColorsArray(r.colors)),r.lineDistances&&r.lineDistances.length===r.vertices.length&&(n=new ba(r.lineDistances.length,1),this.setAttribute("lineDistance",n.copyArray(r.lineDistances))),null!==r.boundingSphere&&(this.boundingSphere=r.boundingSphere.clone()),null!==r.boundingBox&&(this.boundingBox=r.boundingBox.clone())):e.isMesh&&r&&r.isGeometry&&this.fromGeometry(r),this},setFromPoints:function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];t.push(i.x,i.y,i.z||0)}return this.setAttribute("position",new ba(t,3)),this},updateFromObject:function(e){var t,n=e.geometry;if(e.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(t=this.attributes.position,void 0!==t&&(t.copyVector3sArray(n.vertices),t.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(t=this.attributes.normal,void 0!==t&&(t.copyVector3sArray(n.normals),t.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(t=this.attributes.color,void 0!==t&&(t.copyColorsArray(n.colors),t.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(t=this.attributes.uv,void 0!==t&&(t.copyVector2sArray(n.uvs),t.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(t=this.attributes.lineDistance,void 0!==t&&(t.copyArray(n.lineDistances),t.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(e.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(e){return e.__directGeometry=(new Ta).fromGeometry(e),this.fromDirectGeometry(e.__directGeometry)},fromDirectGeometry:function(e){var t,n,r,i,a=new Float32Array(3*e.vertices.length);for(r in this.setAttribute("position",new pa(a,3).copyVector3sArray(e.vertices)),0<e.normals.length&&(t=new Float32Array(3*e.normals.length),this.setAttribute("normal",new pa(t,3).copyVector3sArray(e.normals))),0<e.colors.length&&(t=new Float32Array(3*e.colors.length),this.setAttribute("color",new pa(t,3).copyColorsArray(e.colors))),0<e.uvs.length&&(n=new Float32Array(2*e.uvs.length),this.setAttribute("uv",new pa(n,2).copyVector2sArray(e.uvs))),0<e.uvs2.length&&(n=new Float32Array(2*e.uvs2.length),this.setAttribute("uv2",new pa(n,2).copyVector2sArray(e.uvs2))),this.groups=e.groups,e.morphTargets){for(var o=[],s=e.morphTargets[r],l=0,u=s.length;l<u;l++){var h=s[l],c=new ba(3*h.data.length,3);c.name=h.name,o.push(c.copyVector3sArray(h.data))}this.morphAttributes[r]=o}return 0<e.skinIndices.length&&(i=new ba(4*e.skinIndices.length,4),this.setAttribute("skinIndex",i.copyVector4sArray(e.skinIndices))),0<e.skinWeights.length&&(i=new ba(4*e.skinWeights.length,4),this.setAttribute("skinWeight",i.copyVector4sArray(e.skinWeights))),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Li);var e=this.attributes.position,t=this.morphAttributes.position;if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(var n=0,r=t.length;n<r;n++){var i=t[n];Ra.setFromBufferAttribute(i),this.morphTargetsRelative?(ka.addVectors(this.boundingBox.min,Ra.min),this.boundingBox.expandByPoint(ka),ka.addVectors(this.boundingBox.max,Ra.max),this.boundingBox.expandByPoint(ka)):(this.boundingBox.expandByPoint(Ra.min),this.boundingBox.expandByPoint(Ra.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:function(){null===this.boundingSphere&&(this.boundingSphere=new ki);var e=this.attributes.position,t=this.morphAttributes.position;if(e){var n=this.boundingSphere.center;if(Ra.setFromBufferAttribute(e),t)for(var r=0,i=t.length;r<i;r++){var a=t[r];Na.setFromBufferAttribute(a),this.morphTargetsRelative?(ka.addVectors(Ra.min,Na.min),Ra.expandByPoint(ka),ka.addVectors(Ra.max,Na.max),Ra.expandByPoint(ka)):(Ra.expandByPoint(Na.min),Ra.expandByPoint(Na.max))}Ra.getCenter(n);for(var o=0,r=0,i=e.count;r<i;r++)ka.fromBufferAttribute(e,r),o=Math.max(o,n.distanceToSquared(ka));if(t)for(r=0,i=t.length;r<i;r++)for(var a=t[r],s=this.morphTargetsRelative,l=0,u=a.count;l<u;l++)ka.fromBufferAttribute(a,l),s&&(La.fromBufferAttribute(e,l),ka.add(La)),o=Math.max(o,n.distanceToSquared(ka));this.boundingSphere.radius=Math.sqrt(o),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}},computeFaceNormals:function(){},computeVertexNormals:function(){var e=this.index,t=this.attributes;if(t.position){var n=t.position.array;if(void 0===t.normal)this.setAttribute("normal",new pa(new Float32Array(n.length),3));else for(var r=t.normal.array,i=0,a=r.length;i<a;i++)r[i]=0;var o,s,l,u=t.normal.array,h=new Vr,c=new Vr,d=new Vr,f=new Vr,p=new Vr;if(e)for(var m=e.array,i=0,a=e.count;i<a;i+=3)o=3*m[i+0],s=3*m[i+1],l=3*m[i+2],h.fromArray(n,o),c.fromArray(n,s),d.fromArray(n,l),f.subVectors(d,c),p.subVectors(h,c),f.cross(p),u[o]+=f.x,u[o+1]+=f.y,u[o+2]+=f.z,u[s]+=f.x,u[s+1]+=f.y,u[s+2]+=f.z,u[l]+=f.x,u[l+1]+=f.y,u[l+2]+=f.z;else for(i=0,a=n.length;i<a;i+=9)h.fromArray(n,i),c.fromArray(n,i+3),d.fromArray(n,i+6),f.subVectors(d,c),p.subVectors(h,c),f.cross(p),u[i]=f.x,u[i+1]=f.y,u[i+2]=f.z,u[i+3]=f.x,u[i+4]=f.y,u[i+5]=f.z,u[i+6]=f.x,u[i+7]=f.y,u[i+8]=f.z;this.normalizeNormals(),t.normal.needsUpdate=!0}},merge:function(e,t){if(e&&e.isBufferGeometry){void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n,r=this.attributes;for(n in r)if(void 0!==e.attributes[n])for(var i=r[n],a=i.array,i=e.attributes[n],o=i.array,i=i.itemSize*t,s=Math.min(o.length,a.length-i),l=0,u=i;l<s;l++,u++)a[u]=o[l];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e)},normalizeNormals:function(){for(var e=this.attributes.normal,t=0,n=e.count;t<n;t++)ka.x=e.getX(t),ka.y=e.getY(t),ka.z=e.getZ(t),ka.normalize(),e.setXYZ(t,ka.x,ka.y,ka.z)},toNonIndexed:function(){function e(e,t){for(var n=e.array,r=e.itemSize,i=new n.constructor(t.length*r),a=0,o=0,s=0,l=t.length;s<l;s++)for(var a=t[s]*r,u=0;u<r;u++)i[o++]=n[a++];return new pa(i,r)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t,n=new Pa,r=this.index.array,i=this.attributes;for(t in i){var a=i[t],o=e(a,r);n.setAttribute(t,o)}var s=this.morphAttributes;for(t in s){for(var l=[],u=s[t],h=0,c=u.length;h<c;h++)a=u[h],o=e(a,r),l.push(o);n.morphAttributes[t]=l}n.morphTargetsRelative=this.morphTargetsRelative;for(var d=this.groups,h=0,f=d.length;h<f;h++){var p=d[h];n.addGroup(p.start,p.count,p.materialIndex)}return n},toJSON:function(){var e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),0<(0,x.default)(this.userData).length&&(e.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(o in t)void 0!==t[o]&&(e[o]=t[o]);return e}e.data={attributes:{}};var n=this.index;null!==n&&(e.data.index={type:n.array.constructor.name,array:(0,y.default)(Array.prototype).call(n.array)});var r=this.attributes;for(o in r){var i=r[o],a=i.toJSON();""!==i.name&&(a.name=i.name),e.data.attributes[o]=a}var o,s={},l=!1;for(o in this.morphAttributes){for(var u=this.morphAttributes[o],h=[],c=0,d=u.length;c<d;c++)i=u[c],a=i.toJSON(),""!==i.name&&(a.name=i.name),h.push(a);0<h.length&&(s[o]=h,l=!0)}return l&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative),n=this.groups,0<n.length&&(e.data.groups=JSON.parse((0,p.default)(n))),n=this.boundingSphere,null!==n&&(e.data.boundingSphere={center:n.center.toArray(),radius:n.radius}),e},clone:function(){return(new Pa).copy(this)},copy:function(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var t=e.index;null!==t&&this.setIndex(t.clone());var n,r=e.attributes;for(n in r){var i=r[n];this.setAttribute(n,i.clone())}var a=e.morphAttributes;for(n in a){for(var o=[],s=a[n],l=0,u=s.length;l<u;l++)o.push(s[l].clone());this.morphAttributes[n]=o}this.morphTargetsRelative=e.morphTargetsRelative;for(var h=e.groups,l=0,u=h.length;l<u;l++){var c=h[l];this.addGroup(c.start,c.count,c.materialIndex)}return t=e.boundingBox,null!==t&&(this.boundingBox=t.clone()),t=e.boundingSphere,null!==t&&(this.boundingSphere=t.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var Ca=new Jr,Da=new zi,Oa=new ki,Ba=new Vr,Fa=new Vr,Ua=new Vr,za=new Vr,Ga=new Vr,Va=new Vr,Ha=new Vr,ja=new Vr,Wa=new Vr,Ya=new Nr,qa=new Nr,Xa=new Nr,Za=new Vr,Ja=new Vr;function Ka(e,t){pi.call(this),this.type="Mesh",this.geometry=void 0!==e?e:new Pa,this.material=void 0!==t?t:new da,this.updateMorphTargets()}function Qa(e,t,n,r,i,a,o,s){return t=t.side===Xe?r.intersectTriangle(o,a,i,!0,s):r.intersectTriangle(i,a,o,t.side!==ve,s),null===t?null:(Ja.copy(s),Ja.applyMatrix4(e.matrixWorld),s=n.ray.origin.distanceTo(Ja),s<n.near||s>n.far?null:{distance:s,point:Ja.clone(),object:e})}function $a(e,t,n,r,i,a,o,s,l,u,h,c){Ba.fromBufferAttribute(i,u),Fa.fromBufferAttribute(i,h),Ua.fromBufferAttribute(i,c);var d=e.morphTargetInfluences;if(t.morphTargets&&a&&d){Ha.set(0,0,0),ja.set(0,0,0),Wa.set(0,0,0);for(var f=0,p=a.length;f<p;f++){var m=d[f],v=a[f];0!==m&&(za.fromBufferAttribute(v,u),Ga.fromBufferAttribute(v,h),Va.fromBufferAttribute(v,c),o?(Ha.addScaledVector(za,m),ja.addScaledVector(Ga,m),Wa.addScaledVector(Va,m)):(Ha.addScaledVector(za.sub(Ba),m),ja.addScaledVector(Ga.sub(Fa),m),Wa.addScaledVector(Va.sub(Ua),m)))}Ba.add(Ha),Fa.add(ja),Ua.add(Wa)}return r=Qa(e,t,n,r,Ba,Fa,Ua,Za),r&&(s&&(Ya.fromBufferAttribute(s,u),qa.fromBufferAttribute(s,h),Xa.fromBufferAttribute(s,c),r.uv=ta.getUV(Za,Ba,Fa,Ua,Ya,qa,Xa,new Nr)),l&&(Ya.fromBufferAttribute(l,u),qa.fromBufferAttribute(l,h),Xa.fromBufferAttribute(l,c),r.uv2=ta.getUV(Za,Ba,Fa,Ua,Ya,qa,Xa,new Nr)),l=new ua(u,h,c),ta.getNormal(Ba,Fa,Ua,l.normal),r.face=l),r}Ka.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:Ka,isMesh:!0,copy:function(e){var t;return pi.prototype.copy.call(this,e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=(0,y.default)(t=e.morphTargetInfluences).call(t)),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=(0,je.default)({},e.morphTargetDictionary)),this},updateMorphTargets:function(){var e,t,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,a=(0,x.default)(i);if(0<a.length){var o=i[a[0]];if(void 0!==o)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=o.length;e<t;e++)n=o[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}else r=r.morphTargets,void 0!==r&&0<r.length&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")},raycast:function(e,t){var n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0!==r&&(null===n.boundingSphere&&n.computeBoundingSphere(),Oa.copy(n.boundingSphere),Oa.applyMatrix4(i),!1!==e.ray.intersectsSphere(Oa)&&(Ca.getInverse(i),Da.copy(e.ray).applyMatrix4(Ca),null===n.boundingBox||!1!==Da.intersectsBox(n.boundingBox))))if(n.isBufferGeometry){var a,o,s,l,u,h,c,d,f,p,m,v=n.index,g=n.attributes.position,y=n.morphAttributes.position,_=n.morphTargetsRelative,x=n.attributes.uv,w=n.attributes.uv2,b=n.groups,M=n.drawRange;if(null!==v)if((0,We.default)(r))for(l=0,h=b.length;l<h;l++)for(d=b[l],f=r[d.materialIndex],p=Math.max(d.start,M.start),m=Math.min(d.start+d.count,M.start+M.count),u=p,c=m;u<c;u+=3)a=v.getX(u),o=v.getX(u+1),s=v.getX(u+2),P=$a(this,f,e,Da,g,y,_,x,w,a,o,s),P&&(P.faceIndex=Math.floor(u/3),P.face.materialIndex=d.materialIndex,t.push(P));else for(p=Math.max(0,M.start),m=Math.min(v.count,M.start+M.count),l=p,h=m;l<h;l+=3)a=v.getX(l),o=v.getX(l+1),s=v.getX(l+2),P=$a(this,r,e,Da,g,y,_,x,w,a,o,s),P&&(P.faceIndex=Math.floor(l/3),t.push(P));else if(void 0!==g)if((0,We.default)(r))for(l=0,h=b.length;l<h;l++)for(d=b[l],f=r[d.materialIndex],p=Math.max(d.start,M.start),m=Math.min(d.start+d.count,M.start+M.count),u=p,c=m;u<c;u+=3)a=u,o=u+1,s=u+2,P=$a(this,f,e,Da,g,y,_,x,w,a,o,s),P&&(P.faceIndex=Math.floor(u/3),P.face.materialIndex=d.materialIndex,t.push(P));else for(p=Math.max(0,M.start),m=Math.min(g.count,M.start+M.count),l=p,h=m;l<h;l+=3)a=l,o=l+1,s=l+2,P=$a(this,r,e,Da,g,y,_,x,w,a,o,s),P&&(P.faceIndex=Math.floor(l/3),t.push(P))}else if(n.isGeometry){var T,E=(0,We.default)(r),S=n.vertices,A=n.faces,n=n.faceVertexUvs[0];0<n.length&&(T=n);for(var I=0,L=A.length;I<L;I++){var R,N,k,P,C=A[I],D=E?r[C.materialIndex]:r;void 0!==D&&(R=S[C.a],N=S[C.b],k=S[C.c],P=Qa(this,D,e,Da,R,N,k,Za),P&&(T&&T[I]&&(D=T[I],Ya.copy(D[0]),qa.copy(D[1]),Xa.copy(D[2]),P.uv=ta.getUV(Za,R,N,k,Ya,qa,Xa,new Nr)),P.face=C,P.faceIndex=I,t.push(P)))}}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var eo=0,to=new Jr,no=new pi,ro=new Vr;function io(){(0,m.default)(this,"id",{value:eo+=2}),this.uuid=Rr.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}io.prototype=(0,je.default)((0,d.default)(Sr.prototype),{constructor:io,isGeometry:!0,applyMatrix4:function(e){for(var t=(new kr).getNormalMatrix(e),n=0,r=this.vertices.length;n<r;n++){var i=this.vertices[n];i.applyMatrix4(e)}for(n=0,r=this.faces.length;n<r;n++){var a=this.faces[n];a.normal.applyMatrix3(t).normalize();for(var o=0,s=a.vertexNormals.length;o<s;o++)a.vertexNormals[o].applyMatrix3(t).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(e){return to.makeRotationX(e),this.applyMatrix4(to),this},rotateY:function(e){return to.makeRotationY(e),this.applyMatrix4(to),this},rotateZ:function(e){return to.makeRotationZ(e),this.applyMatrix4(to),this},translate:function(e,t,n){return to.makeTranslation(e,t,n),this.applyMatrix4(to),this},scale:function(e,t,n){return to.makeScale(e,t,n),this.applyMatrix4(to),this},lookAt:function(e){return no.lookAt(e),no.updateMatrix(),this.applyMatrix4(no.matrix),this},fromBufferGeometry:function(e){var o=this,t=null!==e.index?e.index.array:void 0,n=e.attributes;if(void 0===n.position)return console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion."),this;var r=n.position.array,s=void 0!==n.normal?n.normal.array:void 0,l=void 0!==n.color?n.color.array:void 0,u=void 0!==n.uv?n.uv.array:void 0,h=void 0!==n.uv2?n.uv2.array:void 0;void 0!==h&&(this.faceVertexUvs[1]=[]);for(var i=0;i<r.length;i+=3)o.vertices.push((new Vr).fromArray(r,i)),void 0!==l&&o.colors.push((new aa).fromArray(l,i));function a(e,t,n,r){var i=void 0===l?[]:[o.colors[e].clone(),o.colors[t].clone(),o.colors[n].clone()],a=void 0===s?[]:[(new Vr).fromArray(s,3*e),(new Vr).fromArray(s,3*t),(new Vr).fromArray(s,3*n)],r=new ua(e,t,n,a,i,r);o.faces.push(r),void 0!==u&&o.faceVertexUvs[0].push([(new Nr).fromArray(u,2*e),(new Nr).fromArray(u,2*t),(new Nr).fromArray(u,2*n)]),void 0!==h&&o.faceVertexUvs[1].push([(new Nr).fromArray(h,2*e),(new Nr).fromArray(h,2*t),(new Nr).fromArray(h,2*n)])}var c=e.groups;if(0<c.length)for(i=0;i<c.length;i++)for(var d=c[i],f=d.start,p=d.count,m=f,v=f+p;m<v;m+=3)void 0!==t?a(t[m],t[m+1],t[m+2],d.materialIndex):a(m,m+1,m+2,d.materialIndex);else if(void 0!==t)for(i=0;i<t.length;i+=3)a(t[i],t[i+1],t[i+2]);else for(i=0;i<r.length/3;i+=3)a(i,i+1,i+2);return this.computeFaceNormals(),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(ro).negate(),this.translate(ro.x,ro.y,ro.z),this},normalize:function(){this.computeBoundingSphere();var e=this.boundingSphere.center,t=this.boundingSphere.radius,n=0===t?1:1/t,t=new Jr;return t.set(n,0,0,-n*e.x,0,n,0,-n*e.y,0,0,n,-n*e.z,0,0,0,1),this.applyMatrix4(t),this},computeFaceNormals:function(){for(var e=new Vr,t=new Vr,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],a=this.vertices[i.a],o=this.vertices[i.b],s=this.vertices[i.c];e.subVectors(s,o),t.subVectors(a,o),e.cross(t),e.normalize(),i.normal.copy(e)}},computeVertexNormals:function(e){var t,n,r;for(void 0===e&&(e=!0),r=new Array(this.vertices.length),t=0,n=this.vertices.length;t<n;t++)r[t]=new Vr;if(e)for(var i,a,o,s=new Vr,l=new Vr,u=0,h=this.faces.length;u<h;u++)c=this.faces[u],i=this.vertices[c.a],a=this.vertices[c.b],o=this.vertices[c.c],s.subVectors(o,a),l.subVectors(i,a),s.cross(l),r[c.a].add(s),r[c.b].add(s),r[c.c].add(s);else for(this.computeFaceNormals(),u=0,h=this.faces.length;u<h;u++)c=this.faces[u],r[c.a].add(c.normal),r[c.b].add(c.normal),r[c.c].add(c.normal);for(t=0,n=this.vertices.length;t<n;t++)r[t].normalize();for(u=0,h=this.faces.length;u<h;u++){var c=this.faces[u],d=c.vertexNormals;3===d.length?(d[0].copy(r[c.a]),d[1].copy(r[c.b]),d[2].copy(r[c.c])):(d[0]=r[c.a].clone(),d[1]=r[c.b].clone(),d[2]=r[c.c].clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var e,t;for(this.computeFaceNormals(),e=0,t=this.faces.length;e<t;e++){var n=this.faces[e],r=n.vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){for(var e,t,n,r=0,i=this.faces.length;r<i;r++)for(n=this.faces[r],n.__originalFaceNormal?n.__originalFaceNormal.copy(n.normal):n.__originalFaceNormal=n.normal.clone(),n.__originalVertexNormals||(n.__originalVertexNormals=[]),e=0,t=n.vertexNormals.length;e<t;e++)n.__originalVertexNormals[e]?n.__originalVertexNormals[e].copy(n.vertexNormals[e]):n.__originalVertexNormals[e]=n.vertexNormals[e].clone();var a=new io;for(a.faces=this.faces,e=0,t=this.morphTargets.length;e<t;e++){if(!this.morphNormals[e]){this.morphNormals[e]={},this.morphNormals[e].faceNormals=[],this.morphNormals[e].vertexNormals=[];for(var o=this.morphNormals[e].faceNormals,s=this.morphNormals[e].vertexNormals,r=0,i=this.faces.length;r<i;r++)l=new Vr,u={a:new Vr,b:new Vr,c:new Vr},o.push(l),s.push(u)}var l,u,h=this.morphNormals[e];for(a.vertices=this.morphTargets[e].vertices,a.computeFaceNormals(),a.computeVertexNormals(),r=0,i=this.faces.length;r<i;r++)n=this.faces[r],l=h.faceNormals[r],u=h.vertexNormals[r],l.copy(n.normal),u.a.copy(n.vertexNormals[0]),u.b.copy(n.vertexNormals[1]),u.c.copy(n.vertexNormals[2])}for(r=0,i=this.faces.length;r<i;r++)n=this.faces[r],n.normal=n.__originalFaceNormal,n.vertexNormals=n.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Li),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ki),this.boundingSphere.setFromPoints(this.vertices)},merge:function(e,t,n){if(e&&e.isGeometry){var r,i=this.vertices.length,a=this.vertices,o=e.vertices,s=this.faces,l=e.faces,u=this.colors,h=e.colors;void 0===n&&(n=0),void 0!==t&&(r=(new kr).getNormalMatrix(t));for(var c=0,d=o.length;c<d;c++){var f=o[c],f=f.clone();void 0!==t&&f.applyMatrix4(t),a.push(f)}for(c=0,d=h.length;c<d;c++)u.push(h[c].clone());for(c=0,d=l.length;c<d;c++){var p,m,v=l[c],g=v.vertexNormals,y=v.vertexColors,_=new ua(v.a+i,v.b+i,v.c+i);_.normal.copy(v.normal),void 0!==r&&_.normal.applyMatrix3(r).normalize();for(var x=0,w=g.length;x<w;x++)p=g[x].clone(),void 0!==r&&p.applyMatrix3(r).normalize(),_.vertexNormals.push(p);for(_.color.copy(v.color),x=0,w=y.length;x<w;x++)m=y[x],_.vertexColors.push(m.clone());_.materialIndex=v.materialIndex+n,s.push(_)}for(c=0,d=e.faceVertexUvs.length;c<d;c++){var b=e.faceVertexUvs[c];for(void 0===this.faceVertexUvs[c]&&(this.faceVertexUvs[c]=[]),x=0,w=b.length;x<w;x++){for(var M=b[x],T=[],E=0,S=M.length;E<S;E++)T.push(M[E].clone());this.faceVertexUvs[c].push(T)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",e)},mergeMesh:function(e){e&&e.isMesh?(e.matrixAutoUpdate&&e.updateMatrix(),this.merge(e.geometry,e.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",e)},mergeVertices:function(){for(var e,t,n,r,i={},a=[],o=[],s=4,l=Math.pow(10,s),u=0,h=this.vertices.length;u<h;u++)e=this.vertices[u],e=Math.round(e.x*l)+"_"+Math.round(e.y*l)+"_"+Math.round(e.z*l),void 0===i[e]?(i[e]=u,a.push(this.vertices[u]),o[u]=a.length-1):o[u]=o[i[e]];for(var c=[],u=0,h=this.faces.length;u<h;u++){t=this.faces[u],t.a=o[t.a],t.b=o[t.b],t.c=o[t.c];for(var d=[t.a,t.b,t.c],f=0;f<3;f++)if(d[f]===d[(f+1)%3]){c.push(u);break}}for(u=c.length-1;0<=u;u--){var p,m,v=c[u];for((0,g.default)(p=this.faces).call(p,v,1),n=0,r=this.faceVertexUvs.length;n<r;n++)(0,g.default)(m=this.faceVertexUvs[n]).call(m,v,1)}return s=this.vertices.length-a.length,this.vertices=a,s},setFromPoints:function(e){this.vertices=[];for(var t=0,n=e.length;t<n;t++){var r=e[t];this.vertices.push(new Vr(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var e=this.faces,t=e.length,n=0;n<t;n++)e[n]._id=n;function r(e,t){return e.materialIndex-t.materialIndex}(0,qe.default)(e).call(e,r);var i,a,o=this.faceVertexUvs[0],s=this.faceVertexUvs[1];for(o&&o.length===t&&(i=[]),s&&s.length===t&&(a=[]),n=0;n<t;n++){var l=e[n]._id;i&&i.push(o[l]),a&&a.push(s[l])}i&&(this.faceVertexUvs[0]=i),a&&(this.faceVertexUvs[1]=a)},toJSON:function(){var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t,n=this.parameters;for(t in n)void 0!==n[t]&&(e[t]=n[t]);return e}for(var r=[],i=0;i<this.vertices.length;i++){var a=this.vertices[i];r.push(a.x,a.y,a.z)}for(var o=[],s=[],l={},u=[],h={},c=[],d={},i=0;i<this.faces.length;i++){var f=this.faces[i],p=!0,m=!1,v=void 0!==this.faceVertexUvs[0][i],g=0<f.normal.length(),y=0<f.vertexNormals.length,_=1!==f.color.r||1!==f.color.g||1!==f.color.b,x=0<f.vertexColors.length,w=0,w=b(w,0,0);w=b(w,1,p),w=b(w,2,m),w=b(w,3,v),w=b(w,4,g),w=b(w,5,y),w=b(w,6,_),w=b(w,7,x),o.push(w),o.push(f.a,f.b,f.c),o.push(f.materialIndex),v&&(v=this.faceVertexUvs[0][i],o.push(E(v[0]),E(v[1]),E(v[2]))),g&&o.push(M(f.normal)),y&&(y=f.vertexNormals,o.push(M(y[0]),M(y[1]),M(y[2]))),_&&o.push(T(f.color)),x&&(f=f.vertexColors,o.push(T(f[0]),T(f[1]),T(f[2])))}function b(e,t,n){return n?e|1<<t:e&~(1<<t)}function M(e){var t=e.x.toString()+e.y.toString()+e.z.toString();return void 0!==l[t]||(l[t]=s.length/3,s.push(e.x,e.y,e.z)),l[t]}function T(e){var t=e.r.toString()+e.g.toString()+e.b.toString();return void 0!==h[t]||(h[t]=u.length,u.push(e.getHex())),h[t]}function E(e){var t=e.x.toString()+e.y.toString();return void 0!==d[t]||(d[t]=c.length/2,c.push(e.x,e.y)),d[t]}return e.data={},e.data.vertices=r,e.data.normals=s,0<u.length&&(e.data.colors=u),0<c.length&&(e.data.uvs=[c]),e.data.faces=o,e},clone:function(){return(new io).copy(this)},copy:function(e){var t,n;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;for(var r=e.vertices,i=0,a=r.length;i<a;i++)this.vertices.push(r[i].clone());for(var o=e.colors,i=0,a=o.length;i<a;i++)this.colors.push(o[i].clone());var s=e.faces;for(i=0,a=s.length;i<a;i++)this.faces.push(s[i].clone());for(i=0,a=e.faceVertexUvs.length;i<a;i++){var l=e.faceVertexUvs[i];for(void 0===this.faceVertexUvs[i]&&(this.faceVertexUvs[i]=[]),t=0,n=l.length;t<n;t++){for(var u=l[t],h=[],c=0,d=u.length;c<d;c++){var f=u[c];h.push(f.clone())}this.faceVertexUvs[i].push(h)}}var p=e.morphTargets;for(i=0,a=p.length;i<a;i++){var m={};if(m.name=p[i].name,void 0!==p[i].vertices)for(m.vertices=[],t=0,n=p[i].vertices.length;t<n;t++)m.vertices.push(p[i].vertices[t].clone());if(void 0!==p[i].normals)for(m.normals=[],t=0,n=p[i].normals.length;t<n;t++)m.normals.push(p[i].normals[t].clone());this.morphTargets.push(m)}var v=e.morphNormals;for(i=0,a=v.length;i<a;i++){var g={};if(void 0!==v[i].vertexNormals)for(g.vertexNormals=[],t=0,n=v[i].vertexNormals.length;t<n;t++){var y=v[i].vertexNormals[t],_={};_.a=y.a.clone(),_.b=y.b.clone(),_.c=y.c.clone(),g.vertexNormals.push(_)}if(void 0!==v[i].faceNormals)for(g.faceNormals=[],t=0,n=v[i].faceNormals.length;t<n;t++)g.faceNormals.push(v[i].faceNormals[t].clone());this.morphNormals.push(g)}var x=e.skinWeights;for(i=0,a=x.length;i<a;i++)this.skinWeights.push(x[i].clone());var w=e.skinIndices;for(i=0,a=w.length;i<a;i++)this.skinIndices.push(w[i].clone());var b=e.lineDistances;for(i=0,a=b.length;i<a;i++)this.lineDistances.push(b[i]);var M=e.boundingBox;return null!==M&&(this.boundingBox=M.clone()),M=e.boundingSphere,null!==M&&(this.boundingSphere=M.clone()),this.elementsNeedUpdate=e.elementsNeedUpdate,this.verticesNeedUpdate=e.verticesNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.lineDistancesNeedUpdate=e.lineDistancesNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var ao=function(e){(0,o.default)(l,e);var s=P(l);function l(e,t,n,r,i,a){var o;return(0,c.default)(this,l),o=s.call(this),o.type="BoxGeometry",o.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a},o.fromBufferGeometry(new oo(e,t,n,r,i,a)),o.mergeVertices(),o}return l}(io);t.CubeGeometry=t.BoxGeometry=ao;var oo=function(e){(0,o.default)(u,e);var l=P(u);function u(e,t,n,r,i,a){var o;(0,c.default)(this,u),o=l.call(this),o.type="BoxBufferGeometry",o.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};var L=(0,h.default)(o);e=e||1,t=t||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1,a=Math.floor(a)||1;var R=[],N=[],k=[],P=[],C=0,D=0;function s(e,t,n,r,i,a,o,s,l,u,h){for(var c=a/l,d=o/u,f=a/2,p=o/2,m=s/2,v=l+1,g=u+1,y=0,_=0,x=new Vr,w=0;w<g;w++)for(var b=w*d-p,M=0;M<v;M++){var T=M*c-f;x[e]=T*r,x[t]=b*i,x[n]=m,N.push(x.x,x.y,x.z),x[e]=0,x[t]=0,x[n]=0<s?1:-1,k.push(x.x,x.y,x.z),P.push(M/l),P.push(1-w/u),y+=1}for(w=0;w<u;w++)for(M=0;M<l;M++){var E=C+M+v*w,S=C+M+v*(w+1),A=C+(M+1)+v*(w+1),I=C+(M+1)+v*w;R.push(E,S,I),R.push(S,A,I),_+=6}L.addGroup(D,_,h),D+=_,C+=y}return s("z","y","x",-1,-1,n,t,e,a,i,0),s("z","y","x",1,-1,n,t,-e,a,i,1),s("x","z","y",1,1,e,n,t,r,a,2),s("x","z","y",1,-1,e,n,-t,r,a,3),s("x","y","z",1,-1,e,t,n,r,i,4),s("x","y","z",-1,-1,e,t,-n,r,i,5),o.setIndex(R),o.setAttribute("position",new ba(N,3)),o.setAttribute("normal",new ba(k,3)),o.setAttribute("uv",new ba(P,2)),o}return u}(Pa);function so(e){var t,n={};for(t in e)for(var r in n[t]={},e[t]){var i=e[t][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?n[t][r]=i.clone():(0,We.default)(i)?n[t][r]=(0,y.default)(i).call(i):n[t][r]=i}return n}function lo(e){for(var t={},n=0;n<e.length;n++){var r,i=so(e[n]);for(r in i)t[r]=i[r]}return t}t.BoxBufferGeometry=oo;var uo={clone:so,merge:lo};t.UniformsUtils=uo;var ho="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",co="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";function fo(e){ca.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=ho,this.fragmentShader=co,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function po(){pi.call(this),this.type="Camera",this.matrixWorldInverse=new Jr,this.projectionMatrix=new Jr,this.projectionMatrixInverse=new Jr}function mo(e,t,n,r){po.call(this),this.type="PerspectiveCamera",this.fov=void 0!==e?e:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==t?t:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}fo.prototype=(0,d.default)(ca.prototype),fo.prototype.constructor=fo,fo.prototype.isShaderMaterial=!0,fo.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=so(e.uniforms),this.defines=(0,je.default)({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=e.extensions,this},fo.prototype.toJSON=function(e){var t,n=ca.prototype.toJSON.call(this,e);for(t in n.uniforms={},this.uniforms){var r=this.uniforms[t],r=r.value;r&&r.isTexture?n.uniforms[t]={type:"t",value:r.toJSON(e).uuid}:r&&r.isColor?n.uniforms[t]={type:"c",value:r.getHex()}:r&&r.isVector2?n.uniforms[t]={type:"v2",value:r.toArray()}:r&&r.isVector3?n.uniforms[t]={type:"v3",value:r.toArray()}:r&&r.isVector4?n.uniforms[t]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?n.uniforms[t]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?n.uniforms[t]={type:"m4",value:r.toArray()}:n.uniforms[t]={value:r}}0<(0,x.default)(this.defines).length&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader;var i,a={};for(i in this.extensions)!0===this.extensions[i]&&(a[i]=!0);return 0<(0,x.default)(a).length&&(n.extensions=a),n},po.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:po,isCamera:!0,copy:function(e,t){return pi.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Vr),this.updateMatrixWorld(!0);var t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()},updateMatrixWorld:function(e){pi.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},updateWorldMatrix:function(e,t){pi.prototype.updateWorldMatrix.call(this,e,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),mo.prototype=(0,je.default)((0,d.default)(po.prototype),{constructor:mo,isPerspectiveCamera:!0,copy:function(e,t){return po.prototype.copy.call(this,e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:(0,je.default)({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},setFocalLength:function(e){e=.5*this.getFilmHeight()/e,this.fov=2*Rr.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*Rr.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*Rr.RAD2DEG*Math.atan(Math.tan(.5*Rr.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e,t=this.near,n=t*Math.tan(.5*Rr.DEG2RAD*this.fov)/this.zoom,r=2*n,i=this.aspect*r,a=-.5*i,o=this.view;null!==this.view&&this.view.enabled&&(e=o.fullWidth,s=o.fullHeight,a+=o.offsetX*i/e,n-=o.offsetY*r/s,i*=o.width/e,r*=o.height/s);var s=this.filmOffset;0!==s&&(a+=t*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(a,a+i,n,n-r,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(e){return e=pi.prototype.toJSON.call(this,e),e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=(0,je.default)({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}});var vo=90,go=1;function yo(e,t,n,r){pi.call(this),this.type="CubeCamera";var a=new mo(vo,go,e,t);a.up.set(0,-1,0),a.lookAt(new Vr(1,0,0)),this.add(a);var o=new mo(vo,go,e,t);o.up.set(0,-1,0),o.lookAt(new Vr(-1,0,0)),this.add(o);var s=new mo(vo,go,e,t);s.up.set(0,0,1),s.lookAt(new Vr(0,1,0)),this.add(s);var l=new mo(vo,go,e,t);l.up.set(0,0,-1),l.lookAt(new Vr(0,-1,0)),this.add(l);var u=new mo(vo,go,e,t);u.up.set(0,-1,0),u.lookAt(new Vr(0,0,1)),this.add(u);var h=new mo(vo,go,e,t);h.up.set(0,-1,0),h.lookAt(new Vr(0,0,-1)),this.add(h),r=r||{format:Nt,magFilter:ft,minFilter:ft},this.renderTarget=new _o(n,r),this.renderTarget.texture.name="CubeCamera",this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var n=e.getRenderTarget(),r=this.renderTarget,i=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0),e.render(t,a),e.setRenderTarget(r,1),e.render(t,o),e.setRenderTarget(r,2),e.render(t,s),e.setRenderTarget(r,3),e.render(t,l),e.setRenderTarget(r,4),e.render(t,u),r.texture.generateMipmaps=i,e.setRenderTarget(r,5),e.render(t,h),e.setRenderTarget(n)},this.clear=function(e,t,n,r){for(var i=e.getRenderTarget(),a=this.renderTarget,o=0;o<6;o++)e.setRenderTarget(a,o),e.clear(t,n,r);e.setRenderTarget(i)}}function _o(e,t,n){(0,v.default)(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=n),Br.call(this,e,e,t)}function xo(e,t,n,r,i,a,o,s,l,u,h,c){Dr.call(this,null,a,o,s,l,u,r,i,h,c),this.image={data:e||null,width:t||1,height:n||1},this.magFilter=void 0!==l?l:lt,this.minFilter=void 0!==u?u:lt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}yo.prototype=(0,d.default)(pi.prototype),yo.prototype.constructor=yo,_o.prototype=(0,d.default)(Br.prototype),_o.prototype.constructor=_o,_o.prototype.isWebGLCubeRenderTarget=!0,_o.prototype.fromEquirectangularTexture=function(e,t){this.texture.type=t.type,this.texture.format=t.format,this.texture.encoding=t.encoding;var n=new mi,r={uniforms:{tEquirect:{value:null}},vertexShader:["varying vec3 vWorldDirection;","vec3 transformDirection( in vec3 dir, in mat4 matrix ) {","\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );","}","void main() {","\tvWorldDirection = transformDirection( position, modelMatrix );","\t#include <begin_vertex>","\t#include <project_vertex>","}"].join("\n"),fragmentShader:["uniform sampler2D tEquirect;","varying vec3 vWorldDirection;","#define RECIPROCAL_PI 0.31830988618","#define RECIPROCAL_PI2 0.15915494","void main() {","\tvec3 direction = normalize( vWorldDirection );","\tvec2 sampleUV;","\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;","\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;","\tgl_FragColor = texture2D( tEquirect, sampleUV );","}"].join("\n")},r=new fo({type:"CubemapFromEquirect",uniforms:so(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:Xe,blending:ge});return r.uniforms.tEquirect.value=t,t=new Ka(new oo(5,5,5),r),n.add(t),r=new yo(1,10,1),r.renderTarget=this,r.renderTarget.texture.name="CubeCameraTexture",r.update(e,n),t.geometry.dispose(),t.material.dispose(),this},xo.prototype=(0,d.default)(Dr.prototype),xo.prototype.constructor=xo,xo.prototype.isDataTexture=!0;var wo=new ki,bo=new Vr;function Mo(e,t,n,r,i,a){this.planes=[void 0!==e?e:new ji,void 0!==t?t:new ji,void 0!==n?n:new ji,void 0!==r?r:new ji,void 0!==i?i:new ji,void 0!==a?a:new ji]}(0,je.default)(Mo.prototype,{set:function(e,t,n,r,i,a){var o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},setFromProjectionMatrix:function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],u=n[6],h=n[7],c=n[8],d=n[9],f=n[10],p=n[11],m=n[12],v=n[13],e=n[14],n=n[15];return t[0].setComponents(o-r,h-s,p-c,n-m).normalize(),t[1].setComponents(o+r,h+s,p+c,n+m).normalize(),t[2].setComponents(o+i,h+l,p+d,n+v).normalize(),t[3].setComponents(o-i,h-l,p-d,n-v).normalize(),t[4].setComponents(o-a,h-u,p-f,n-e).normalize(),t[5].setComponents(o+a,h+u,p+f,n+e).normalize(),this},intersectsObject:function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),wo.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(wo)},intersectsSprite:function(e){return wo.center.set(0,0,0),wo.radius=.7071067811865476,wo.applyMatrix4(e.matrixWorld),this.intersectsSphere(wo)},intersectsSphere:function(e){for(var t=this.planes,n=e.center,r=-e.radius,i=0;i<6;i++){var a=t[i].distanceToPoint(n);if(a<r)return!1}return!0},intersectsBox:function(e){for(var t=this.planes,n=0;n<6;n++){var r=t[n];if(bo.x=(0<r.normal.x?e.max:e.min).x,bo.y=(0<r.normal.y?e.max:e.min).y,bo.z=(0<r.normal.z?e.max:e.min).z,r.distanceToPoint(bo)<0)return!1}return!0},containsPoint:function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}});var To={common:{diffuse:{value:new aa(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new kr},uv2Transform:{value:new kr},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Nr(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new aa(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new aa(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new kr}},sprite:{diffuse:{value:new aa(15658734)},opacity:{value:1},center:{value:new Nr(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new kr}}};function Eo(){var n=null,r=!1,i=null;function a(e,t){!1!==r&&(i(e,t),n.requestAnimationFrame(a))}return{start:function(){!0!==r&&null!==i&&(n.requestAnimationFrame(a),r=!0)},stop:function(){r=!1},setAnimationLoop:function(e){i=e},setContext:function(e){n=e}}}function So(a,e){var i=e.isWebGL2,r=new ie.default;function o(e,t){var n=e.array,r=e.usage,i=a.createBuffer();return a.bindBuffer(t,i),a.bufferData(t,n,r),e.onUploadCallback(),r=5126,n instanceof Float32Array?r=5126:n instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):n instanceof Uint16Array?r=5123:n instanceof Int16Array?r=5122:n instanceof Uint32Array?r=5125:n instanceof Int32Array?r=5124:n instanceof Int8Array?r=5120:n instanceof Uint8Array&&(r=5121),{buffer:i,type:r,bytesPerElement:n.BYTES_PER_ELEMENT,version:e.version}}function s(e,t,n){var r=t.array,t=t.updateRange;a.bindBuffer(n,e),-1===t.count?a.bufferSubData(n,0,r):(i?a.bufferSubData(n,t.offset*r.BYTES_PER_ELEMENT,r,t.offset,t.count):a.bufferSubData(n,t.offset*r.BYTES_PER_ELEMENT,r.subarray(t.offset,t.offset+t.count)),t.count=-1)}function t(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)}function n(e){e.isInterleavedBufferAttribute&&(e=e.data);var t=r.get(e);t&&(a.deleteBuffer(t.buffer),r.delete(e))}function l(e,t){e.isInterleavedBufferAttribute&&(e=e.data);var n=r.get(e);void 0===n?r.set(e,o(e,t)):n.version<e.version&&(s(n.buffer,e,t),n.version=e.version)}return{get:t,remove:n,update:l}}function Ao(e,t,n,r){io.call(this),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new Io(e,t,n,r)),this.mergeVertices()}function Io(e,t,n,r){Pa.call(this),this.type="PlaneBufferGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r},e=e||1,t=t||1;for(var i=e/2,a=t/2,o=Math.floor(n)||1,s=Math.floor(r)||1,l=o+1,u=s+1,h=e/o,c=t/s,d=[],f=[],p=[],m=[],v=0;v<u;v++)for(var g=v*c-a,y=0;y<l;y++){var _=y*h-i;f.push(_,-g,0),p.push(0,0,1),m.push(y/o),m.push(1-v/s)}for(v=0;v<s;v++)for(y=0;y<o;y++){var x=y+l*v,w=y+l*(v+1),b=y+1+l*(v+1),M=y+1+l*v;d.push(x,w,M),d.push(w,b,M)}this.setIndex(d),this.setAttribute("position",new ba(f,3)),this.setAttribute("normal",new ba(p,3)),this.setAttribute("uv",new ba(m,2))}t.UniformsLib=To,Ao.prototype=(0,d.default)(io.prototype),Ao.prototype.constructor=Ao,Io.prototype=(0,d.default)(Pa.prototype),Io.prototype.constructor=Io;var Lo="#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",Ro="#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",No="#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",ko="#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",Po="#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",Co="vec3 transformed = vec3( position );",Do="vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",Oo="vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",Bo="#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",Fo="#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",Uo="#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",zo="#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",Go="#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",Vo="#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",Ho="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",jo="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",Wo="#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",Yo="#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}",qo="#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_maxMipLevel 8.0\n#define cubeUV_minMipLevel 4.0\n#define cubeUV_maxTileSize 256.0\n#define cubeUV_minTileSize 16.0\nfloat getFace(vec3 direction) {\n vec3 absDirection = abs(direction);\n float face = -1.0;\n if (absDirection.x > absDirection.z) {\n if (absDirection.x > absDirection.y)\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if (absDirection.z > absDirection.y)\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n}\nvec2 getUV(vec3 direction, float face) {\n vec2 uv;\n if (face == 0.0) {\n uv = vec2(-direction.z, direction.y) / abs(direction.x);\n } else if (face == 1.0) {\n uv = vec2(direction.x, -direction.z) / abs(direction.y);\n } else if (face == 2.0) {\n uv = direction.xy / abs(direction.z);\n } else if (face == 3.0) {\n uv = vec2(direction.z, direction.y) / abs(direction.x);\n } else if (face == 4.0) {\n uv = direction.xz / abs(direction.y);\n } else {\n uv = vec2(-direction.x, direction.y) / abs(direction.z);\n }\n return 0.5 * (uv + 1.0);\n}\nvec3 bilinearCubeUV(sampler2D envMap, vec3 direction, float mipInt) {\n float face = getFace(direction);\n float filterInt = max(cubeUV_minMipLevel - mipInt, 0.0);\n mipInt = max(mipInt, cubeUV_minMipLevel);\n float faceSize = exp2(mipInt);\n float texelSize = 1.0 / (3.0 * cubeUV_maxTileSize);\n vec2 uv = getUV(direction, face) * (faceSize - 1.0);\n vec2 f = fract(uv);\n uv += 0.5 - f;\n if (face > 2.0) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n if(mipInt < cubeUV_maxMipLevel){\n uv.y += 2.0 * cubeUV_maxTileSize;\n }\n uv.y += filterInt * 2.0 * cubeUV_minTileSize;\n uv.x += 3.0 * max(0.0, cubeUV_maxTileSize - 2.0 * faceSize);\n uv *= texelSize;\n vec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n uv.x += texelSize;\n vec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n uv.y += texelSize;\n vec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n uv.x -= texelSize;\n vec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n vec3 tm = mix(tl, tr, f.x);\n vec3 bm = mix(bl, br, f.x);\n return mix(tm, bm, f.y);\n}\n#define r0 1.0\n#define v0 0.339\n#define m0 -2.0\n#define r1 0.8\n#define v1 0.276\n#define m1 -1.0\n#define r4 0.4\n#define v4 0.046\n#define m4 2.0\n#define r5 0.305\n#define v5 0.016\n#define m5 3.0\n#define r6 0.21\n#define v6 0.0038\n#define m6 4.0\nfloat roughnessToMip(float roughness) {\n float mip = 0.0;\n if (roughness >= r1) {\n mip = (r0 - roughness) * (m1 - m0) / (r0 - r1) + m0;\n } else if (roughness >= r4) {\n mip = (r1 - roughness) * (m4 - m1) / (r1 - r4) + m1;\n } else if (roughness >= r5) {\n mip = (r4 - roughness) * (m5 - m4) / (r4 - r5) + m4;\n } else if (roughness >= r6) {\n mip = (r5 - roughness) * (m6 - m5) / (r5 - r6) + m5;\n } else {\n mip = -2.0 * log2(1.16 * roughness); }\n return mip;\n}\nvec4 textureCubeUV(sampler2D envMap, vec3 sampleDir, float roughness) {\n float mip = clamp(roughnessToMip(roughness), m0, cubeUV_maxMipLevel);\n float mipF = fract(mip);\n float mipInt = floor(mip);\n vec3 color0 = bilinearCubeUV(envMap, sampleDir, mipInt);\n if (mipF == 0.0) {\n return vec4(color0, 1.0);\n } else {\n vec3 color1 = bilinearCubeUV(envMap, sampleDir, mipInt + 1.0);\n return vec4(mix(color0, color1, mipF), 1.0);\n }\n}\n#endif",Xo="vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",Zo="#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",Jo="#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",Ko="#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",Qo="#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",$o="gl_FragColor = linearToOutputTexel( gl_FragColor );",es="\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",ts="#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\t\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",ns="#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",rs="#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",is="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",as="#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) { \n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",os="#ifdef USE_FOG\n\tfogDepth = -mvPosition.z;\n#endif",ss="#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",ls="#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",us="#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",hs="#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",cs="#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",ds="#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",fs="vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",ps="uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",ms="#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t vec3 reflectVec = reflect( -viewDir, normal );\n\t\t reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t vec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",vs="ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",gs="varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",ys="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",_s="varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",xs="PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",ws="struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",bs="\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",Ms="#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",Ts="#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",Es="#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",Ss="#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",As="#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",Is="#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",Ls="#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\t#ifdef USE_MAP_MIXCOLOR\n diffuseColor = texelColor*texelColor.a + diffuseColor*(1.0-texelColor.a);\n #else\n diffuseColor *= texelColor;\n #endif\n #endif\n",Rs="#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",Ns="#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",ks="#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",Ps="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",Cs="#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",Ds="#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",Os="#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",Bs="#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",Fs="#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",Us="#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif",zs="#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif",Gs="#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",Vs="#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\n\t#endif\n#endif",Hs="#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",js="vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",Ws="#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",Ys="vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",qs="#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",Xs="#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",Zs="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",Js="#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",Ks="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",Qs="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",$s="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",el="float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",tl="#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",nl="#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",rl="#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",il="#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",al="float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",ol="#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",sl="#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",ll="#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n}",ul="#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",hl="#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",r="#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",a="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",n="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",O="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",B="#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",F="uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",U="varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",z="#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",G="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",q="#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",ht="#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",dt="#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",mt="#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",gt="uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",Gn="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",Vn="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",tr="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",rr="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",ir="#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",ar="uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",or="#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",sr="#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",lr="#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",ur="#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",hr="#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",cr="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\tgl_FragColor =vec4(1.0,0.2,0.3,1.0);\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",dr="#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",fr="#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSPARENCY\n#endif\nuniform vec3 diffuse;\nuniform float test;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSPARENCY\n\tuniform float transparency;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSPARENCY\n\t\tdiffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\tif(test == 1.0){\n\tgl_FragColor = vec4( 1.0,1.0,0.2,1.0 );\n\t}\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",pr="#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",mr="#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",_r="#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",xr="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",wr="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",br="uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",Mr="#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",Tr="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",Er="uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",cl={alphamap_fragment:Lo,alphamap_pars_fragment:Ro,alphatest_fragment:No,aomap_fragment:ko,aomap_pars_fragment:Po,begin_vertex:Co,beginnormal_vertex:Do,bsdfs:Oo,bumpmap_pars_fragment:Bo,clipping_planes_fragment:Fo,clipping_planes_pars_fragment:Uo,clipping_planes_pars_vertex:zo,clipping_planes_vertex:Go,color_fragment:Vo,color_pars_fragment:Ho,color_pars_vertex:jo,color_vertex:Wo,common:Yo,cube_uv_reflection_fragment:qo,defaultnormal_vertex:Xo,displacementmap_pars_vertex:Zo,displacementmap_vertex:Jo,emissivemap_fragment:Ko,emissivemap_pars_fragment:Qo,encodings_fragment:$o,encodings_pars_fragment:es,envmap_fragment:ts,envmap_common_pars_fragment:ns,envmap_pars_fragment:rs,envmap_pars_vertex:is,envmap_physical_pars_fragment:ms,envmap_vertex:as,fog_vertex:os,fog_pars_vertex:ss,fog_fragment:ls,fog_pars_fragment:us,gradientmap_pars_fragment:hs,lightmap_fragment:cs,lightmap_pars_fragment:ds,lights_lambert_vertex:fs,lights_pars_begin:ps,lights_toon_fragment:vs,lights_toon_pars_fragment:gs,lights_phong_fragment:ys,lights_phong_pars_fragment:_s,lights_physical_fragment:xs,lights_physical_pars_fragment:ws,lights_fragment_begin:bs,lights_fragment_maps:Ms,lights_fragment_end:Ts,logdepthbuf_fragment:Es,logdepthbuf_pars_fragment:Ss,logdepthbuf_pars_vertex:As,logdepthbuf_vertex:Is,map_fragment:Ls,map_pars_fragment:Rs,map_particle_fragment:Ns,map_particle_pars_fragment:ks,metalnessmap_fragment:Ps,metalnessmap_pars_fragment:Cs,morphnormal_vertex:Ds,morphtarget_pars_vertex:Os,morphtarget_vertex:Bs,normal_fragment_begin:Fs,normal_fragment_maps:Us,normalmap_pars_fragment:zs,clearcoat_normal_fragment_begin:Gs,clearcoat_normal_fragment_maps:Vs,clearcoat_pars_fragment:Hs,packing:js,premultiplied_alpha_fragment:Ws,project_vertex:Ys,dithering_fragment:qs,dithering_pars_fragment:Xs,roughnessmap_fragment:Zs,roughnessmap_pars_fragment:Js,shadowmap_pars_fragment:Ks,shadowmap_pars_vertex:Qs,shadowmap_vertex:$s,shadowmask_pars_fragment:el,skinbase_vertex:tl,skinning_pars_vertex:nl,skinning_vertex:rl,skinnormal_vertex:il,specularmap_fragment:al,specularmap_pars_fragment:ol,tonemapping_fragment:sl,tonemapping_pars_fragment:ll,uv_pars_fragment:ul,uv_pars_vertex:hl,uv_vertex:r,uv2_pars_fragment:a,uv2_pars_vertex:n,uv2_vertex:O,worldpos_vertex:B,background_frag:F,background_vert:U,cube_frag:z,cube_vert:G,depth_frag:q,depth_vert:ht,distanceRGBA_frag:dt,distanceRGBA_vert:mt,equirect_frag:gt,equirect_vert:Gn,linedashed_frag:Vn,linedashed_vert:tr,meshbasic_frag:rr,meshbasic_vert:ir,meshlambert_frag:ar,meshlambert_vert:or,meshmatcap_frag:sr,meshmatcap_vert:lr,meshtoon_frag:ur,meshtoon_vert:hr,meshphong_frag:cr,meshphong_vert:dr,meshphysical_frag:fr,meshphysical_vert:pr,normal_frag:mr,normal_vert:_r,points_frag:xr,points_vert:wr,shadow_frag:br,shadow_vert:Mr,sprite_frag:Tr,sprite_vert:Er};t.ShaderChunk=cl;var dl={basic:{uniforms:lo([To.common,To.specularmap,To.envmap,To.aomap,To.lightmap,To.fog]),vertexShader:cl.meshbasic_vert,fragmentShader:cl.meshbasic_frag},lambert:{uniforms:lo([To.common,To.specularmap,To.envmap,To.aomap,To.lightmap,To.emissivemap,To.fog,To.lights,{emissive:{value:new aa(0)}}]),vertexShader:cl.meshlambert_vert,fragmentShader:cl.meshlambert_frag},phong:{uniforms:lo([To.common,To.specularmap,To.envmap,To.aomap,To.lightmap,To.emissivemap,To.bumpmap,To.normalmap,To.displacementmap,To.fog,To.lights,{emissive:{value:new aa(0)},specular:{value:new aa(1118481)},shininess:{value:30}}]),vertexShader:cl.meshphong_vert,fragmentShader:cl.meshphong_frag},standard:{uniforms:lo([To.common,To.envmap,To.aomap,To.lightmap,To.emissivemap,To.bumpmap,To.normalmap,To.displacementmap,To.roughnessmap,To.metalnessmap,To.fog,To.lights,{emissive:{value:new aa(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:cl.meshphysical_vert,fragmentShader:cl.meshphysical_frag},toon:{uniforms:lo([To.common,To.specularmap,To.aomap,To.lightmap,To.emissivemap,To.bumpmap,To.normalmap,To.displacementmap,To.gradientmap,To.fog,To.lights,{emissive:{value:new aa(0)},specular:{value:new aa(1118481)},shininess:{value:30}}]),vertexShader:cl.meshtoon_vert,fragmentShader:cl.meshtoon_frag},matcap:{uniforms:lo([To.common,To.bumpmap,To.normalmap,To.displacementmap,To.fog,{matcap:{value:null}}]),vertexShader:cl.meshmatcap_vert,fragmentShader:cl.meshmatcap_frag},points:{uniforms:lo([To.points,To.fog]),vertexShader:cl.points_vert,fragmentShader:cl.points_frag},dashed:{uniforms:lo([To.common,To.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:cl.linedashed_vert,fragmentShader:cl.linedashed_frag},depth:{uniforms:lo([To.common,To.displacementmap]),vertexShader:cl.depth_vert,fragmentShader:cl.depth_frag},normal:{uniforms:lo([To.common,To.bumpmap,To.normalmap,To.displacementmap,{opacity:{value:1}}]),vertexShader:cl.normal_vert,fragmentShader:cl.normal_frag},sprite:{uniforms:lo([To.sprite,To.fog]),vertexShader:cl.sprite_vert,fragmentShader:cl.sprite_frag},background:{uniforms:{uvTransform:{value:new kr},t2D:{value:null}},vertexShader:cl.background_vert,fragmentShader:cl.background_frag},cube:{uniforms:lo([To.envmap,{opacity:{value:1}}]),vertexShader:cl.cube_vert,fragmentShader:cl.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:cl.equirect_vert,fragmentShader:cl.equirect_frag},distanceRGBA:{uniforms:lo([To.common,To.displacementmap,{referencePosition:{value:new Vr},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:cl.distanceRGBA_vert,fragmentShader:cl.distanceRGBA_frag},shadow:{uniforms:lo([To.lights,To.fog,{color:{value:new aa(0)},opacity:{value:1}}]),vertexShader:cl.shadow_vert,fragmentShader:cl.shadow_frag}};function fl(a,n,o,r){var s,l,u=new aa(0),h=0,c=null,d=0,f=null;function e(e,t,n,r){var i=t.background,t=a.xr,t=t.getSession&&t.getSession();t&&"additive"===t.environmentBlendMode&&(i=null),null===i?p(u,h):i&&i.isColor&&(p(i,1),r=!0),(a.autoClear||r)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil),i&&(i.isCubeTexture||i.isWebGLCubeRenderTarget||i.mapping===rt)?(void 0===l&&(l=new Ka(new oo(1,1,1),new fo({type:"BackgroundCubeMaterial",uniforms:so(dl.cube.uniforms),vertexShader:dl.cube.vertexShader,fragmentShader:dl.cube.fragmentShader,side:Xe,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},(0,m.default)(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),o.update(l)),r=i.isWebGLCubeRenderTarget?i.texture:i,l.material.uniforms.envMap.value=r,l.material.uniforms.flipEnvMap.value=r.isCubeTexture?-1:1,c===i&&d===r.version&&f===a.toneMapping||(l.material.needsUpdate=!0,c=i,d=r.version,f=a.toneMapping),e.unshift(l,l.geometry,l.material,0,0,null)):i&&i.isTexture&&(void 0===s&&(s=new Ka(new Io(2,2),new fo({type:"BackgroundMaterial",uniforms:so(dl.background.uniforms),vertexShader:dl.background.vertexShader,fragmentShader:dl.background.fragmentShader,side:W,depthTest:!1,depthWrite:!1,fog:!1})),s.geometry.deleteAttribute("normal"),(0,m.default)(s.material,"map",{get:function(){return this.uniforms.t2D.value}}),o.update(s)),s.material.uniforms.t2D.value=i,!0===i.matrixAutoUpdate&&i.updateMatrix(),s.material.uniforms.uvTransform.value.copy(i.matrix),c===i&&d===i.version&&f===a.toneMapping||(s.material.needsUpdate=!0,c=i,d=i.version,f=a.toneMapping),e.unshift(s,s.geometry,s.material,0,0,null))}function p(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,r)}return{getClearColor:function(){return u},setClearColor:function(e,t){u.set(e),h=void 0!==t?t:1,p(u,h)},getClearAlpha:function(){return h},setClearAlpha:function(e){h=e,p(u,h)},render:e}}function pl(o,s,l,e){var u,h=e.isWebGL2;function t(e){u=e}function n(e,t){o.drawArrays(u,e,t),l.update(t,u)}function r(e,t,n,r){if(0!==r){var i,a;if(h)i=o,a="drawArraysInstanced";else if(i=s.get("ANGLE_instanced_arrays"),a="drawArraysInstancedANGLE",null===i)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");i[a](u,t,n,r),l.update(n,u,r)}}this.setMode=t,this.render=n,this.renderInstances=r}function ml(t,n,e){var r;function i(){if(void 0!==r)return r;var e=n.get("EXT_texture_filter_anisotropic");return r=null!==e?t.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,r}function a(e){if("highp"===e){if(0<t.getShaderPrecisionFormat(35633,36338).precision&&0<t.getShaderPrecisionFormat(35632,36338).precision)return"highp";e="mediump"}return"mediump"===e&&0<t.getShaderPrecisionFormat(35633,36337).precision&&0<t.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var o="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&t instanceof WebGL2ComputeRenderingContext,s=void 0!==e.precision?e.precision:"highp",l=a(s);l!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",l,"instead."),s=l);var u=!0===e.logarithmicDepthBuffer,h=t.getParameter(34930),c=t.getParameter(35660),d=t.getParameter(3379),f=t.getParameter(34076),p=t.getParameter(34921),m=t.getParameter(36347),v=t.getParameter(36348),g=t.getParameter(36349),y=0<c,_=o||!!n.get("OES_texture_float"),l=y&&_,e=o?t.getParameter(36183):0;return{isWebGL2:o,getMaxAnisotropy:i,getMaxPrecision:a,precision:s,logarithmicDepthBuffer:u,maxTextures:h,maxVertexTextures:c,maxTextureSize:d,maxCubemapSize:f,maxAttributes:p,maxVertexUniforms:m,maxVaryings:v,maxFragmentUniforms:g,vertexTextures:y,floatFragmentTextures:_,floatVertexTextures:l,maxSamples:e}}function vl(){var u=this,h=null,c=0,d=!1,f=!1,p=new ji,m=new kr,v={value:null,needsUpdate:!1};function g(){v.value!==h&&(v.value=h,v.needsUpdate=0<c),u.numPlanes=c,u.numIntersection=0}function y(e,t,n,r){var i=null!==e?e.length:0,a=null;if(0!==i){if(a=v.value,!0!==r||null===a){var r=n+4*i,o=t.matrixWorldInverse;m.getNormalMatrix(o),(null===a||a.length<r)&&(a=new Float32Array(r));for(var s=0,l=n;s!==i;++s,l+=4)p.copy(e[s]).applyMatrix4(o,m),p.normal.toArray(a,l),a[l+3]=p.constant}v.value=a,v.needsUpdate=!0}return u.numPlanes=i,u.numIntersection=0,a}this.uniform=v,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,n){var r=0!==e.length||t||0!==c||d;return d=t,h=y(e,n,0),c=e.length,r},this.beginShadows=function(){f=!0,y(null)},this.endShadows=function(){f=!1,g()},this.setState=function(e,t,n,r,i,a){if(!d||null===e||0===e.length||f&&!n)f?y(null):g();else{var n=f?0:c,o=4*n,s=i.clippingState||null;v.value=s;for(var s=y(e,r,o,a),l=0;l!==o;++l)s[l]=h[l];i.clippingState=s,this.numIntersection=t?this.numPlanes:0,this.numPlanes+=n}}}function gl(n){var r={};return{get:function(e){if(void 0!==r[e])return r[e];var t;switch(e){case"WEBGL_depth_texture":t=n.getExtension("WEBGL_depth_texture")||n.getExtension("MOZ_WEBGL_depth_texture")||n.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":t=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":t=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":t=n.getExtension("WEBGL_compressed_texture_pvrtc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:t=n.getExtension(e)}return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),r[e]=t,t}}}function yl(e,c,r){var i=new ie.default,d=new ie.default;function a(e){var t,e=e.target,n=i.get(e);for(t in null!==n.index&&c.remove(n.index),n.attributes)c.remove(n.attributes[t]);e.removeEventListener("dispose",a),i.delete(e),e=d.get(n),e&&(c.remove(e),d.delete(n)),r.memory.geometries--}function t(e,t){var n=i.get(t);return n||(t.addEventListener("dispose",a),t.isBufferGeometry?n=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new Pa).setFromObject(e)),n=t._bufferGeometry),i.set(t,n),r.memory.geometries++,n)}function n(e){var t=e.index,n=e.attributes;for(r in null!==t&&c.update(t,34963),n)c.update(n[r],34962);var r,i=e.morphAttributes;for(r in i)for(var a=i[r],o=0,s=a.length;o<s;o++)c.update(a[o],34962)}function o(e){var t=[],n=e.index,r=e.attributes.position,i=0;if(null!==n)for(var a=n.array,i=n.version,o=0,s=a.length;o<s;o+=3){var l=a[o+0],u=a[o+1],h=a[o+2];t.push(l,u,u,h,h,l)}else for(a=r.array,i=r.version,o=0,s=a.length/3-1;o<s;o+=3)l=o+0,u=o+1,h=o+2,t.push(l,u,u,h,h,l);r=new(65535<Ea(t)?wa:_a)(t,1),r.version=i,c.update(r,34963),i=d.get(e),i&&c.remove(i),d.set(e,r)}function s(e){var t,n=d.get(e);return n?(t=e.index,null!==t&&n.version<t.version&&o(e)):o(e),d.get(e)}return{get:t,update:n,getWireframeAttribute:s}}function _l(o,s,l,e){var u,h,c,d=e.isWebGL2;function t(e){u=e}function n(e){h=e.type,c=e.bytesPerElement}function r(e,t){o.drawElements(u,t,h,e*c),l.update(t,u)}function i(e,t,n,r){if(0!==r){var i,a;if(d)i=o,a="drawElementsInstanced";else if(i=s.get("ANGLE_instanced_arrays"),a="drawElementsInstancedANGLE",null===i)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");i[a](u,n,h,t*c,r),l.update(n,u,r)}}this.setMode=t,this.setIndex=n,this.render=r,this.renderInstances=i}function xl(e){var t={geometries:0,textures:0},r={frame:0,calls:0,triangles:0,points:0,lines:0};function n(e,t,n){switch(n=n||1,r.calls++,t){case 4:r.triangles+=n*(e/3);break;case 1:r.lines+=n*(e/2);break;case 3:r.lines+=n*(e-1);break;case 2:r.lines+=n*e;break;case 0:r.points+=n*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",t)}}function i(){r.frame++,r.calls=0,r.triangles=0,r.points=0,r.lines=0}return{memory:t,render:r,programs:null,autoReset:!0,reset:i,update:n}}function wl(e,t){return Math.abs(t[1])-Math.abs(e[1])}function bl(p){var m={},v=new Float32Array(8);function e(e,t,n,r){var i=e.morphTargetInfluences,a=void 0===i?0:i.length,o=m[t.id];if(void 0===o){for(var o=[],s=0;s<a;s++)o[s]=[s,0];m[t.id]=o}for(var l=n.morphTargets&&t.morphAttributes.position,u=n.morphNormals&&t.morphAttributes.normal,s=0;s<a;s++){var h=o[s];0!==h[1]&&(l&&t.deleteAttribute("morphTarget"+s),u&&t.deleteAttribute("morphNormal"+s))}for(s=0;s<a;s++)h=o[s],h[0]=s,h[1]=i[s];(0,qe.default)(o).call(o,wl);for(var c=0,s=0;s<8;s++){if(h=o[s],h){var d=h[0],f=h[1];if(f){l&&t.setAttribute("morphTarget"+s,l[d]),u&&t.setAttribute("morphNormal"+s,u[d]),v[s]=f,c+=f;continue}}v[s]=0}n=t.morphTargetsRelative?1:1-c,r.getUniforms().setValue(p,"morphTargetBaseInfluence",n),r.getUniforms().setValue(p,"morphTargetInfluences",v)}return{update:e}}function Ml(e,i,a,o){var s=new ie.default;function t(e){var t=o.render.frame,n=e.geometry,r=i.get(e,n);return s.get(r)!==t&&(n.isGeometry&&r.updateFromObject(e),i.update(r),s.set(r,t)),e.isInstancedMesh&&a.update(e.instanceMatrix,34962),r}function n(){s=new ie.default}return{update:t,dispose:n}}function Tl(e,t,n,r,i,a,o,s,l,u){e=void 0!==e?e:[],t=void 0!==t?t:ue,o=void 0!==o?o:Nt,Dr.call(this,e,t,n,r,i,a,o,s,l,u),this.flipY=!1}function El(e,t,n,r){Dr.call(this,null),this.image={data:e||null,width:t||1,height:n||1,depth:r||1},this.magFilter=lt,this.minFilter=lt,this.wrapR=ot,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}function Sl(e,t,n,r){Dr.call(this,null),this.image={data:e||null,width:t||1,height:n||1,depth:r||1},this.magFilter=lt,this.minFilter=lt,this.wrapR=ot,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}t.ShaderLib=dl,dl.physical={uniforms:lo([dl.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Nr(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new aa(0)},transparency:{value:0}}]),vertexShader:cl.meshphysical_vert,fragmentShader:cl.meshphysical_frag},Tl.prototype=(0,d.default)(Dr.prototype),Tl.prototype.constructor=Tl,Tl.prototype.isCubeTexture=!0,(0,m.default)(Tl.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}}),El.prototype=(0,d.default)(Dr.prototype),El.prototype.constructor=El,El.prototype.isDataTexture2DArray=!0,Sl.prototype=(0,d.default)(Dr.prototype),Sl.prototype.constructor=Sl,Sl.prototype.isDataTexture3D=!0;var Al=new Dr,Il=new El,Ll=new Sl,Rl=new Tl,Nl=[],kl=[],Pl=new Float32Array(16),Cl=new Float32Array(9),Dl=new Float32Array(4);function Ol(e,t,n){var r=e[0];if(r<=0||0<r)return e;var i=t*n,a=Nl[i];if(void 0===a&&(a=new Float32Array(i),Nl[i]=a),0!==t){r.toArray(a,0);for(var o=1,s=0;o!==t;++o)s+=n,e[o].toArray(a,s)}return a}function Bl(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function Fl(e,t){for(var n=0,r=t.length;n<r;n++)e[n]=t[n]}function Ul(e,t){var n=kl[t];void 0===n&&(n=new Int32Array(t),kl[t]=n);for(var r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function zl(e,t){var n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function Gl(e,t){var n=this.cache;void 0!==t.x?n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y):Bl(n,t)||(e.uniform2fv(this.addr,t),Fl(n,t))}function Vl(e,t){var n=this.cache;void 0!==t.x?n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z):void 0!==t.r?n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b):Bl(n,t)||(e.uniform3fv(this.addr,t),Fl(n,t))}function Hl(e,t){var n=this.cache;void 0!==t.x?n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w):Bl(n,t)||(e.uniform4fv(this.addr,t),Fl(n,t))}function jl(e,t){var n=this.cache,r=t.elements;void 0===r?Bl(n,t)||(e.uniformMatrix2fv(this.addr,!1,t),Fl(n,t)):Bl(n,r)||(Dl.set(r),e.uniformMatrix2fv(this.addr,!1,Dl),Fl(n,r))}function Wl(e,t){var n=this.cache,r=t.elements;void 0===r?Bl(n,t)||(e.uniformMatrix3fv(this.addr,!1,t),Fl(n,t)):Bl(n,r)||(Cl.set(r),e.uniformMatrix3fv(this.addr,!1,Cl),Fl(n,r))}function Yl(e,t){var n=this.cache,r=t.elements;void 0===r?Bl(n,t)||(e.uniformMatrix4fv(this.addr,!1,t),Fl(n,t)):Bl(n,r)||(Pl.set(r),e.uniformMatrix4fv(this.addr,!1,Pl),Fl(n,r))}function ql(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTexture2D(t||Al,i)}function Xl(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||Il,i)}function Zl(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||Ll,i)}function Jl(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTextureCube(t||Rl,i)}function Kl(e,t){var n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Ql(e,t){var n=this.cache;Bl(n,t)||(e.uniform2iv(this.addr,t),Fl(n,t))}function $l(e,t){var n=this.cache;Bl(n,t)||(e.uniform3iv(this.addr,t),Fl(n,t))}function eu(e,t){var n=this.cache;Bl(n,t)||(e.uniform4iv(this.addr,t),Fl(n,t))}function tu(e,t){var n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function nu(e){switch(e){case 5126:return zl;case 35664:return Gl;case 35665:return Vl;case 35666:return Hl;case 35674:return jl;case 35675:return Wl;case 35676:return Yl;case 5124:case 35670:return Kl;case 35667:case 35671:return Ql;case 35668:case 35672:return $l;case 35669:case 35673:return eu;case 5125:return tu;case 35678:case 36198:case 36298:case 36306:case 35682:return ql;case 35679:case 36299:case 36307:return Zl;case 35680:case 36300:case 36308:case 36293:return Jl;case 36289:case 36303:case 36311:case 36292:return Xl}}function ru(e,t){e.uniform1fv(this.addr,t)}function iu(e,t){e.uniform1iv(this.addr,t)}function au(e,t){e.uniform2iv(this.addr,t)}function ou(e,t){e.uniform3iv(this.addr,t)}function su(e,t){e.uniform4iv(this.addr,t)}function lu(e,t){t=Ol(t,this.size,2),e.uniform2fv(this.addr,t)}function uu(e,t){t=Ol(t,this.size,3),e.uniform3fv(this.addr,t)}function hu(e,t){t=Ol(t,this.size,4),e.uniform4fv(this.addr,t)}function cu(e,t){t=Ol(t,this.size,4),e.uniformMatrix2fv(this.addr,!1,t)}function du(e,t){t=Ol(t,this.size,9),e.uniformMatrix3fv(this.addr,!1,t)}function fu(e,t){t=Ol(t,this.size,16),e.uniformMatrix4fv(this.addr,!1,t)}function pu(e,t,n){var r=t.length,i=Ul(n,r);e.uniform1iv(this.addr,i);for(var a=0;a!==r;++a)n.safeSetTexture2D(t[a]||Al,i[a])}function mu(e,t,n){var r=t.length,i=Ul(n,r);e.uniform1iv(this.addr,i);for(var a=0;a!==r;++a)n.safeSetTextureCube(t[a]||Rl,i[a])}function vu(e){switch(e){case 5126:return ru;case 35664:return lu;case 35665:return uu;case 35666:return hu;case 35674:return cu;case 35675:return du;case 35676:return fu;case 5124:case 35670:return iu;case 35667:case 35671:return au;case 35668:case 35672:return ou;case 35669:case 35673:return su;case 35678:case 36198:case 36298:case 36306:case 35682:return pu;case 35680:case 36300:case 36308:case 36293:return mu}}function gu(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=nu(t.type)}function yu(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=vu(t.type)}function _u(e){this.id=e,this.seq=[],this.map={}}yu.prototype.updateCache=function(e){var t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),Fl(t,e)},_u.prototype.setValue=function(e,t,n){for(var r=this.seq,i=0,a=r.length;i!==a;++i){var o=r[i];o.setValue(e,t[o.id],n)}};var xu=/([\w\d_]+)(\])?(\[|\.)?/g;function wu(e,t){e.seq.push(t),(0,Ye.default)(e)[t.id]=t}function bu(e,t,n){var r=e.name,i=r.length;for(xu.lastIndex=0;;){var a=xu.exec(r),o=xu.lastIndex,s=a[1],l="]"===a[2],a=a[3];if(l&&(s|=0),void 0===a||"["===a&&o+2===i){wu(n,new(void 0===a?gu:yu)(s,e,t));break}a=(0,Ye.default)(n),a=a[s],void 0===a&&(a=new _u(s),wu(n,a)),n=a}}function Mu(e,t){this.seq=[],this.map={};for(var n=e.getProgramParameter(t,35718),r=0;r<n;++r){var i=e.getActiveUniform(t,r),a=e.getUniformLocation(t,i.name);bu(i,a,this)}}function Tu(e,t,n){return t=e.createShader(t),e.shaderSource(t,n),e.compileShader(t),t}Mu.prototype.setValue=function(e,t,n,r){t=(0,Ye.default)(this)[t],void 0!==t&&t.setValue(e,n,r)},Mu.prototype.setOptional=function(e,t,n){t=t[n],void 0!==t&&this.setValue(e,n,t)},Mu.upload=function(e,t,n,r){for(var i=0,a=t.length;i!==a;++i){var o=t[i],s=n[o.id];!1!==s.needsUpdate&&o.setValue(e,s.value,r)}},Mu.seqWithValue=function(e,t){for(var n=[],r=0,i=e.length;r!==i;++r){var a=e[r];a.id in t&&n.push(a)}return n};var Eu=0;function Su(e){for(var t=e.split("\n"),n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}function Au(e){switch(e){case Hn:return["Linear","( value )"];case jn:return["sRGB","( value )"];case Yn:return["RGBE","( value )"];case Xn:return["RGBM","( value, 7.0 )"];case Zn:return["RGBM","( value, 16.0 )"];case Jn:return["RGBD","( value, 256.0 )"];case Wn:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case qn:return["LogLuv","( value )"];default:throw new Error("unsupported encoding: "+e)}}function Iu(e,t,n){var r=e.getShaderParameter(t,35713),i=(0,w.default)(i=e.getShaderInfoLog(t)).call(i);return r&&""===i?"":(t=e.getShaderSource(t),"THREE.WebGLShader: gl.getShaderInfoLog() "+n+"\n"+i+Su(t))}function Lu(e,t){return t=Au(t),"vec4 "+e+"( vec4 value ) { return "+t[0]+"ToLinear"+t[1]+"; }"}function Ru(e,t){return t=Au(t),"vec4 "+e+"( vec4 value ) { return LinearTo"+t[0]+t[1]+"; }"}function Nu(e,t){var n;switch(t){case Qe:n="Linear";break;case Q:n="Reinhard";break;case $:n="Uncharted2";break;case ee:n="OptimizedCineon";break;case se:n="ACESFilmic";break;default:throw new Error("unsupported toneMapping: "+t)}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function ku(e){return e=[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""],(0,b.default)(e).call(e,Du).join("\n")}function Pu(e){var t,n=[];for(t in e){var r=e[t];!1!==r&&n.push("#define "+t+" "+r)}return n.join("\n")}function Cu(e,t){for(var n={},r=e.getProgramParameter(t,35721),i=0;i<r;i++){var a=e.getActiveAttrib(t,i),a=a.name;n[a]=e.getAttribLocation(t,a)}return n}function Du(e){return""!==e}function Ou(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function Bu(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var Fu=/^[ \t]*#include +<([\w\d./]+)>/gm;function Uu(e){return e.replace(Fu,zu)}function zu(e,t){var n=cl[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Uu(n)}var Gu=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Vu=/#pragma unroll_loop_start[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g;function Hu(e){return e.replace(Vu,Wu).replace(Gu,ju)}function ju(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Wu(e,t,n,r)}function Wu(e,t,n,r){for(var i="",a=(0,_.default)(t);a<(0,_.default)(n);a++)i+=r.replace(/\[ i \]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return i}function Yu(e){var t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function qu(e){var t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===V?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===H?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===j&&(t="SHADOWMAP_TYPE_VSM"),t}function Xu(e){var t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case ue:case $e:t="ENVMAP_TYPE_CUBE";break;case rt:case it:t="ENVMAP_TYPE_CUBE_UV";break;case et:case tt:t="ENVMAP_TYPE_EQUIREC";break;case nt:t="ENVMAP_TYPE_SPHERE"}return t}function Zu(e){var t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case $e:case tt:t="ENVMAP_MODE_REFRACTION"}return t}function Ju(e){var t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case X:t="ENVMAP_BLENDING_MULTIPLY";break;case Z:t="ENVMAP_BLENDING_MIX";break;case J:t="ENVMAP_BLENDING_ADD"}return t}function Ku(e,t,n){var r,i,a=e.getContext(),o=n.defines,s=n.vertexShader,l=n.fragmentShader,u=qu(n),h=Xu(n),c=Zu(n),d=Ju(n),f=0<e.gammaFactor?e.gammaFactor:1,p=n.isWebGL2?"":ku(n),o=Pu(o),m=a.createProgram();n.isRawShaderMaterial?(i=(0,b.default)(r=[o]).call(r,Du).join("\n"),0<i.length&&(i+="\n"),r=(0,b.default)(r=[p,o]).call(r,Du).join("\n"),0<r.length&&(r+="\n")):(i=(0,b.default)(x=[Yu(n),"#define SHADER_NAME "+n.shaderName,o,n.instancing?"#define USE_INSTANCING":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+f,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",(0,Ye.default)(n)?"#define USE_MAP":"",n.mapMixColor?"#define USE_MAP_MIXCOLOR":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+u:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"]).call(x,Du).join("\n"),r=(0,b.default)(x=[p,Yu(n),"#define SHADER_NAME "+n.shaderName,o,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+f,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",(0,Ye.default)(n)?"#define USE_MAP":"",n.mapMixColor?"#define USE_MAP_MIXCOLOR":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+h:"",n.envMap?"#define "+c:"",n.envMap?"#define "+d:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+u:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==K?"#define TONE_MAPPING":"",n.toneMapping!==K?cl.tonemapping_pars_fragment:"",n.toneMapping!==K?Nu("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.outputEncoding||n.mapEncoding||n.matcapEncoding||n.envMapEncoding||n.emissiveMapEncoding||n.lightMapEncoding?cl.encodings_pars_fragment:"",n.mapEncoding?Lu("mapTexelToLinear",n.mapEncoding):"",n.matcapEncoding?Lu("matcapTexelToLinear",n.matcapEncoding):"",n.envMapEncoding?Lu("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMapEncoding?Lu("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMapEncoding?Lu("lightMapTexelToLinear",n.lightMapEncoding):"",n.outputEncoding?Ru("linearToOutputTexel",n.outputEncoding):"",n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"]).call(x,Du).join("\n")),s=Uu(s),s=Ou(s,n),s=Bu(s,n),l=Uu(l),l=Ou(l,n),l=Bu(l,n),s=Hu(s),l=Hu(l),n.isWebGL2&&!n.isRawShaderMaterial&&(v=!1,g=/^\s*#version\s+300\s+es\s*\n/,n.isShaderMaterial&&null!==s.match(g)&&null!==l.match(g)&&(v=!0,s=s.replace(g,""),l=l.replace(g,"")),i=["#version 300 es\n","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+i,r=["#version 300 es\n","#define varying in",v?"":"out highp vec4 pc_fragColor;",v?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+r);var v,g,y,_,c=i+s,d=r+l,u=Tu(a,35633,c),x=Tu(a,35632,d);return a.attachShader(m,u),a.attachShader(m,x),void 0!==n.index0AttributeName?a.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&a.bindAttribLocation(m,0,"position"),a.linkProgram(m),e.debug.checkShaderErrors&&(v=(0,w.default)(g=a.getProgramInfoLog(m)).call(g),l=(0,w.default)(s=a.getShaderInfoLog(u)).call(s),d=(0,w.default)(c=a.getShaderInfoLog(x)).call(c),e=!0,g=!0,!1===a.getProgramParameter(m,35714)?(e=!1,s=Iu(a,u,"vertex"),c=Iu(a,x,"fragment"),console.error("THREE.WebGLProgram: shader error: ",a.getError(),"35715",a.getProgramParameter(m,35715),"gl.getProgramInfoLog",v,s,c)):""!==v?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",v):""!==l&&""!==d||(g=!1),g&&(this.diagnostics={runnable:e,programLog:v,vertexShader:{log:l,prefix:i},fragmentShader:{log:d,prefix:r}})),a.detachShader(m,u),a.detachShader(m,x),a.deleteShader(u),a.deleteShader(x),this.getUniforms=function(){return void 0===y&&(y=new Mu(a,m)),y},this.getAttributes=function(){return void 0===_&&(_=Cu(a,m)),_},this.destroy=function(){a.deleteProgram(m),this.program=void 0},this.name=n.shaderName,this.id=Eu++,this.cacheKey=t,this.usedTimes=1,this.program=m,this.vertexShader=u,this.fragmentShader=x,this}function Qu(d,f,p){var o=[],m=p.isWebGL2,v=p.logarithmicDepthBuffer,g=p.floatVertexTextures,y=p.precision,n=p.maxVertexUniforms,_=p.vertexTextures,x={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"},i=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","map","mapMixColor","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen"];function w(e,t){return e=t?(t=dl[t],{name:e.type,uniforms:uo.clone(t.uniforms),vertexShader:t.vertexShader,fragmentShader:t.fragmentShader}):{name:e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader},e}function b(e){var t=e.skeleton,e=t.bones;return g?1024:(t=n,t=Math.floor((t-20)/4),t=Math.min(t,e.length),t<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+t+"."),0):t)}function M(e){var t;return e?e.isTexture?t=e.encoding:e.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),t=e.texture.encoding):t=Hn,t}this.getParameters=function(e,t,n,r,i,a,o){var s=r.fog,l=e.isMeshStandardMaterial?r.environment:null,u=e.envMap||l,h=x[e.type],c=o.isSkinnedMesh?b(o):0;return null!==e.precision&&(y=p.getMaxPrecision(e.precision),y!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",y,"instead.")),r=w(e,h),e.onBeforeCompile(r,d),l=d.getRenderTarget(),e={isWebGL2:m,shaderID:h,shaderName:r.name,uniforms:r.uniforms,vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,defines:e.defines,isRawShaderMaterial:e.isRawShaderMaterial,isShaderMaterial:e.isShaderMaterial,precision:y,instancing:!0===o.isInstancedMesh,supportsVertexTextures:_,outputEncoding:null!==l?M(l.texture):d.outputEncoding,map:!!(0,Ye.default)(e),mapMixColor:!!e.mapMixColor,mapEncoding:M((0,Ye.default)(e)),matcap:!!e.matcap,matcapEncoding:M(e.matcap),envMap:!!u,envMapMode:u&&u.mapping,envMapEncoding:M(u),envMapCubeUV:!!u&&(u.mapping===rt||u.mapping===it),lightMap:!!e.lightMap,lightMapEncoding:M(e.lightMap),aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:M(e.emissiveMap),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,objectSpaceNormalMap:e.normalMapType===er,tangentSpaceNormalMap:e.normalMapType===$n,clearcoatMap:!!e.clearcoatMap,clearcoatRoughnessMap:!!e.clearcoatRoughnessMap,clearcoatNormalMap:!!e.clearcoatNormalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,sheen:!!e.sheen,combine:e.combine,vertexTangents:e.normalMap&&e.vertexTangents,vertexColors:e.vertexColors,vertexUvs:!!((0,Ye.default)(e)||e.bumpMap||e.normalMap||e.specularMap||e.alphaMap||e.emissiveMap||e.roughnessMap||e.metalnessMap||e.clearcoatMap||e.clearcoatRoughnessMap||e.clearcoatNormalMap||e.displacementMap),uvsVertexOnly:!((0,Ye.default)(e)||e.bumpMap||e.normalMap||e.specularMap||e.alphaMap||e.emissiveMap||e.roughnessMap||e.metalnessMap||e.clearcoatNormalMap||!e.displacementMap),fog:!!s,useFog:e.fog,fogExp2:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:v,skinning:e.skinning&&0<c,maxBones:c,useVertexTexture:g,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:d.maxMorphTargets,maxMorphNormals:d.maxMorphNormals,numDirLights:t.directional.length,numPointLights:t.point.length,numSpotLights:t.spot.length,numRectAreaLights:t.rectArea.length,numHemiLights:t.hemi.length,numDirLightShadows:t.directionalShadowMap.length,numPointLightShadows:t.pointShadowMap.length,numSpotLightShadows:t.spotShadowMap.length,numClippingPlanes:i,numClipIntersection:a,dithering:e.dithering,shadowMapEnabled:d.shadowMap.enabled&&0<n.length,shadowMapType:d.shadowMap.type,toneMapping:e.toneMapped?d.toneMapping:K,physicallyCorrectLights:d.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===ve,flipSided:e.side===Xe,depthPacking:void 0!==e.depthPacking&&e.depthPacking,index0AttributeName:e.index0AttributeName,extensionDerivatives:e.extensions&&e.extensions.derivatives,extensionFragDepth:e.extensions&&e.extensions.fragDepth,extensionDrawBuffers:e.extensions&&e.extensions.drawBuffers,extensionShaderTextureLOD:e.extensions&&e.extensions.shaderTextureLOD,rendererExtensionFragDepth:m||null!==f.get("EXT_frag_depth"),rendererExtensionDrawBuffers:m||null!==f.get("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:m||null!==f.get("EXT_shader_texture_lod"),onBeforeCompile:e.onBeforeCompile},e},this.getProgramCacheKey=function(e){var t=[];if(e.shaderID?t.push(e.shaderID):(t.push(e.fragmentShader),t.push(e.vertexShader)),void 0!==e.defines)for(var n in e.defines)t.push(n),t.push(e.defines[n]);if(void 0===e.isRawShaderMaterial){for(var r=0;r<i.length;r++)t.push(e[i[r]]);t.push(d.outputEncoding),t.push(d.gammaFactor)}return t.push(e.onBeforeCompile.toString()),t.join()},this.acquireProgram=function(e,t){for(var n,r=0,i=o.length;r<i;r++){var a=o[r];if(a.cacheKey===t){n=a,++n.usedTimes;break}}return void 0===n&&(n=new Ku(d,t,e),o.push(n)),n},this.releaseProgram=function(e){var t;0==--e.usedTimes&&(t=(0,ce.default)(o).call(o,e),o[t]=o[o.length-1],o.pop(),e.destroy())},this.programs=o}function $u(){var r=new ie.default;function e(e){var t=r.get(e);return void 0===t&&(t={},r.set(e,t)),t}function t(e){r.delete(e)}function n(e,t,n){r.get(e)[t]=n}function i(){r=new ie.default}return{get:e,remove:t,update:n,dispose:i}}function eh(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program!==t.program?e.program.id-t.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function th(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function nh(){var s=[],l=0,o=[],u=[],h={id:-1};function e(){l=0,o.length=0,u.length=0}function c(e,t,n,r,i,a){var o=s[l];return void 0===o?(o={id:e.id,object:e,geometry:t,material:n,program:n.program||h,groupOrder:r,renderOrder:e.renderOrder,z:i,group:a},s[l]=o):(o.id=e.id,o.object=e,o.geometry=t,o.material=n,o.program=n.program||h,o.groupOrder=r,o.renderOrder=e.renderOrder,o.z=i,o.group=a),l++,o}function t(e,t,n,r,i,a){a=c(e,t,n,r,i,a),(!0===n.transparent?u:o).push(a)}function n(e,t,n,r,i,a){a=c(e,t,n,r,i,a),(!0===n.transparent?u:o).unshift(a)}function r(e,t){1<o.length&&(0,qe.default)(o).call(o,e||eh),1<u.length&&(0,qe.default)(u).call(u,t||th)}function i(){for(var e=l,t=s.length;e<t;e++){var n=s[e];if(null===n.id)break;n.id=null,n.object=null,n.geometry=null,n.material=null,n.program=null,n.group=null}}return{opaque:o,transparent:u,init:e,push:t,unshift:n,finish:i,sort:r}}function rh(){var i=new ie.default;function a(e){e=e.target,e.removeEventListener("dispose",a),i.delete(e)}function e(e,t){var n,r=i.get(e);return void 0===r?(n=new nh,i.set(e,new ie.default),i.get(e).set(t,n),e.addEventListener("dispose",a)):(n=r.get(t),void 0===n&&(n=new nh,r.set(t,n))),n}function t(){i=new ie.default}return{get:e,dispose:t}}function ih(){var n={};return{get:function(e){if(void 0!==n[e.id])return n[e.id];var t;switch(e.type){case"DirectionalLight":t={direction:new Vr,color:new aa};break;case"SpotLight":t={position:new Vr,direction:new Vr,color:new aa,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new Vr,color:new aa,distance:0,decay:0};break;case"HemisphereLight":t={direction:new Vr,skyColor:new aa,groundColor:new aa};break;case"RectAreaLight":t={color:new aa,position:new Vr,halfWidth:new Vr,halfHeight:new Vr}}return n[e.id]=t,t}}}function ah(){var n={};return{get:function(e){if(void 0!==n[e.id])return n[e.id];var t;switch(e.type){case"DirectionalLight":case"SpotLight":t={shadowBias:0,shadowRadius:1,shadowMapSize:new Nr};break;case"PointLight":t={shadowBias:0,shadowRadius:1,shadowMapSize:new Nr,shadowCameraNear:1,shadowCameraFar:1e3}}return n[e.id]=t,t}}}var oh=0;function sh(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function lh(){for(var S=new ih,A=ah(),I={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},e=0;e<9;e++)I.probe.push(new Vr);var L=new Vr,R=new Jr,N=new Jr;function t(e,t,n){for(var r=0,i=0,a=0,o=0;o<9;o++)I.probe[o].set(0,0,0);var s=0,l=0,u=0,h=0,c=0,d=0,f=0,p=0,m=n.matrixWorldInverse;(0,qe.default)(e).call(e,sh);for(var o=0,v=e.length;o<v;o++){var g,y,_,x=e[o],w=x.color,b=x.intensity,M=x.distance,T=x.shadow&&(0,Ye.default)(x.shadow)?(0,Ye.default)(x.shadow).texture:null;if(x.isAmbientLight)r+=w.r*b,i+=w.g*b,a+=w.b*b;else if(x.isLightProbe)for(var E=0;E<9;E++)I.probe[E].addScaledVector(x.sh.coefficients[E],b);else x.isDirectionalLight?(_=S.get(x),_.color.copy(x.color).multiplyScalar(x.intensity),_.direction.setFromMatrixPosition(x.matrixWorld),L.setFromMatrixPosition(x.target.matrixWorld),_.direction.sub(L),_.direction.transformDirection(m),x.castShadow&&(g=x.shadow,y=A.get(x),y.shadowBias=g.bias,y.shadowRadius=g.radius,y.shadowMapSize=g.mapSize,I.directionalShadow[s]=y,I.directionalShadowMap[s]=T,I.directionalShadowMatrix[s]=x.shadow.matrix,d++),I.directional[s]=_,s++):x.isSpotLight?(_=S.get(x),_.position.setFromMatrixPosition(x.matrixWorld),_.position.applyMatrix4(m),_.color.copy(w).multiplyScalar(b),_.distance=M,_.direction.setFromMatrixPosition(x.matrixWorld),L.setFromMatrixPosition(x.target.matrixWorld),_.direction.sub(L),_.direction.transformDirection(m),_.coneCos=Math.cos(x.angle),_.penumbraCos=Math.cos(x.angle*(1-x.penumbra)),_.decay=x.decay,x.castShadow&&(g=x.shadow,y=A.get(x),y.shadowBias=g.bias,y.shadowRadius=g.radius,y.shadowMapSize=g.mapSize,I.spotShadow[u]=y,I.spotShadowMap[u]=T,I.spotShadowMatrix[u]=x.shadow.matrix,p++),I.spot[u]=_,u++):x.isRectAreaLight?(_=S.get(x),_.color.copy(w).multiplyScalar(b),_.position.setFromMatrixPosition(x.matrixWorld),_.position.applyMatrix4(m),N.identity(),R.copy(x.matrixWorld),R.premultiply(m),N.extractRotation(R),_.halfWidth.set(.5*x.width,0,0),_.halfHeight.set(0,.5*x.height,0),_.halfWidth.applyMatrix4(N),_.halfHeight.applyMatrix4(N),I.rectArea[h]=_,h++):x.isPointLight?(_=S.get(x),_.position.setFromMatrixPosition(x.matrixWorld),_.position.applyMatrix4(m),_.color.copy(x.color).multiplyScalar(x.intensity),_.distance=x.distance,_.decay=x.decay,x.castShadow&&(g=x.shadow,y=A.get(x),y.shadowBias=g.bias,y.shadowRadius=g.radius,y.shadowMapSize=g.mapSize,y.shadowCameraNear=g.camera.near,y.shadowCameraFar=g.camera.far,I.pointShadow[l]=y,I.pointShadowMap[l]=T,I.pointShadowMatrix[l]=x.shadow.matrix,f++),I.point[l]=_,l++):x.isHemisphereLight&&(_=S.get(x),_.direction.setFromMatrixPosition(x.matrixWorld),_.direction.transformDirection(m),_.direction.normalize(),_.skyColor.copy(x.color).multiplyScalar(b),_.groundColor.copy(x.groundColor).multiplyScalar(b),I.hemi[c]=_,c++)}I.ambient[0]=r,I.ambient[1]=i,I.ambient[2]=a,n=I.hash,n.directionalLength===s&&n.pointLength===l&&n.spotLength===u&&n.rectAreaLength===h&&n.hemiLength===c&&n.numDirectionalShadows===d&&n.numPointShadows===f&&n.numSpotShadows===p||(I.directional.length=s,I.spot.length=u,I.rectArea.length=h,I.point.length=l,I.hemi.length=c,I.directionalShadow.length=d,I.directionalShadowMap.length=d,I.pointShadow.length=f,I.pointShadowMap.length=f,I.spotShadow.length=p,I.spotShadowMap.length=p,I.directionalShadowMatrix.length=d,I.pointShadowMatrix.length=f,I.spotShadowMatrix.length=p,n.directionalLength=s,n.pointLength=l,n.spotLength=u,n.rectAreaLength=h,n.hemiLength=c,n.numDirectionalShadows=d,n.numPointShadows=f,n.numSpotShadows=p,I.version=oh++)}return{setup:t,state:I}}function uh(){var t=new lh,n=[],r=[];function e(){n.length=0,r.length=0}function i(e){n.push(e)}function a(e){r.push(e)}function o(e){t.setup(n,r,e)}var s={lightsArray:n,shadowsArray:r,lights:t};return{init:e,state:s,setupLights:o,pushLight:i,pushShadow:a}}function hh(){var r=new ie.default;function i(e){e=e.target,e.removeEventListener("dispose",i),r.delete(e)}function e(e,t){var n;return!1===r.has(e)?(n=new uh,r.set(e,new ie.default),r.get(e).set(t,n),e.addEventListener("dispose",i)):!1===r.get(e).has(t)?(n=new uh,r.get(e).set(t,n)):n=r.get(e).get(t),n}function t(){r=new ie.default}return{get:e,dispose:t}}function ch(e){ca.call(this),this.type="MeshDepthMaterial",this.depthPacking=Kn,this.skinning=!1,this.morphTargets=!1,this.map=null,this.mapMixColor=!1,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}function dh(e){ca.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Vr,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}ch.prototype=(0,d.default)(ca.prototype),ch.prototype.constructor=ch,ch.prototype.isMeshDepthMaterial=!0,ch.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=(0,Ye.default)(e),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},dh.prototype=(0,d.default)(ca.prototype),dh.prototype.constructor=dh,dh.prototype.isMeshDistanceMaterial=!0,dh.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=(0,Ye.default)(e),this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this};var fh="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}",ph="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}";function mh(g,y,v){var _=new Mo,x=new Nr,w=new Nr,b=new Or,i=[],a=[],f={},p={0:Xe,1:W,2:ve},r=new fo({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new Nr},radius:{value:4}},vertexShader:ph,fragmentShader:fh}),o=r.clone();o.defines.HORIZONAL_PASS=1;var e=new Pa;e.setAttribute("position",new pa(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var s=new Ka(e,r),M=this;function T(e,t){var n=y.update(s);r.uniforms.shadow_pass.value=(0,Ye.default)(e).texture,r.uniforms.resolution.value=e.mapSize,r.uniforms.radius.value=e.radius,g.setRenderTarget(e.mapPass),g.clear(),g.renderBufferDirect(t,null,n,r,s,null),o.uniforms.shadow_pass.value=e.mapPass.texture,o.uniforms.resolution.value=e.mapSize,o.uniforms.radius.value=e.radius,g.setRenderTarget((0,Ye.default)(e)),g.clear(),g.renderBufferDirect(t,null,n,o,s,null)}function m(e,t,n){var r=e<<0|t<<1|n<<2,n=i[r];return void 0===n&&(n=new ch({depthPacking:Qn,morphTargets:e,skinning:t}),i[r]=n),n}function E(e,t,n){var r=e<<0|t<<1|n<<2,n=a[r];return void 0===n&&(n=new dh({morphTargets:e,skinning:t}),a[r]=n),n}function S(e,t,n,r,i,a){var o,s,l,u=e.geometry,h=null,c=m,d=e.customDepthMaterial;return!0===n.isPointLight&&(c=E,d=e.customDistanceMaterial),h=void 0===d?(o=!1,!0===t.morphTargets&&(!0===u.isBufferGeometry?o=u.morphAttributes&&u.morphAttributes.position&&0<u.morphAttributes.position.length:!0===u.isGeometry&&(o=u.morphTargets&&0<u.morphTargets.length)),l=!1,!0===e.isSkinnedMesh&&(!0===t.skinning?l=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e)),s=!0===e.isInstancedMesh,c(o,l,s)):d,g.localClippingEnabled&&!0===t.clipShadows&&0!==t.clippingPlanes.length&&(l=h.uuid,s=t.uuid,d=f[l],void 0===d&&(d={},f[l]=d),l=d[s],void 0===l&&(l=h.clone(),d[s]=l),h=l),h.visible=t.visible,h.wireframe=t.wireframe,h.side=a===j?null!==t.shadowSide?t.shadowSide:t.side:null!==t.shadowSide?t.shadowSide:p[t.side],h.clipShadows=t.clipShadows,h.clippingPlanes=t.clippingPlanes,h.clipIntersection=t.clipIntersection,h.wireframeLinewidth=t.wireframeLinewidth,h.linewidth=t.linewidth,!0===n.isPointLight&&!0===h.isMeshDistanceMaterial&&(h.referencePosition.setFromMatrixPosition(n.matrixWorld),h.nearDistance=r,h.farDistance=i),h}function A(e,t,n,r,i){if(!1!==e.visible){var a=e.layers.test(t.layers);if(a&&(e.isMesh||e.isLine||e.isPoints)&&(e.castShadow||e.receiveShadow&&i===j)&&(!e.frustumCulled||_.intersectsObject(e))){e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld);var o=y.update(e),s=e.material;if((0,We.default)(s))for(var l=o.groups,u=0,h=l.length;u<h;u++){var c,d=l[u],f=s[d.materialIndex];f&&f.visible&&(c=S(e,f,r,n.near,n.far,i),g.renderBufferDirect(n,null,o,c,e,d))}else s.visible&&(c=S(e,s,r,n.near,n.far,i),g.renderBufferDirect(n,null,o,c,e,null))}for(var p=e.children,m=0,v=p.length;m<v;m++)A(p[m],t,n,r,i)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=V,this.render=function(e,t,n){if(!1!==M.enabled&&(!1!==M.autoUpdate||!1!==M.needsUpdate)&&0!==e.length){var r=g.getRenderTarget(),i=g.getActiveCubeFace(),a=g.getActiveMipmapLevel(),o=g.state;o.setBlending(ge),o.buffers.color.setClear(1,1,1,1),o.buffers.depth.setTest(!0),o.setScissorTest(!1);for(var s=0,l=e.length;s<l;s++){var u=e[s],h=u.shadow;if(void 0!==h){x.copy(h.mapSize);var c,d=h.getFrameExtents();x.multiply(d),w.copy(h.mapSize),(x.x>v||x.y>v)&&(console.warn("THREE.WebGLShadowMap:",u,"has shadow exceeding max texture size, reducing"),x.x>v&&(w.x=Math.floor(v/d.x),x.x=w.x*d.x,h.mapSize.x=w.x),x.y>v&&(w.y=Math.floor(v/d.y),x.y=w.y*d.y,h.mapSize.y=w.y)),null!==(0,Ye.default)(h)||h.isPointLightShadow||this.type!==j||(c={minFilter:ft,magFilter:ft,format:kt},h.map=new Br(x.x,x.y,c),(0,Ye.default)(h).texture.name=u.name+".shadowMap",h.mapPass=new Br(x.x,x.y,c),h.camera.updateProjectionMatrix()),null===(0,Ye.default)(h)&&(c={minFilter:lt,magFilter:lt,format:kt},h.map=new Br(x.x,x.y,c),(0,Ye.default)(h).texture.name=u.name+".shadowMap",h.camera.updateProjectionMatrix()),g.setRenderTarget((0,Ye.default)(h)),g.clear();for(var f=h.getViewportCount(),p=0;p<f;p++){var m=h.getViewport(p);b.set(w.x*m.x,w.y*m.y,w.x*m.z,w.y*m.w),o.viewport(b),h.updateMatrices(u,p),_=h.getFrustum(),A(t,n,h.camera,u,this.type)}h.isPointLightShadow||this.type!==j||T(h,n)}else console.warn("THREE.WebGLShadowMap:",u,"has no shadow.")}M.needsUpdate=!1,g.setRenderTarget(r,i,a)}}}function vh(h,r,e){var i=e.isWebGL2;function t(){var t=!1,a=new Or,n=null,o=new Or(0,0,0,0);return{setMask:function(e){n===e||t||(h.colorMask(e,e,e,e),n=e)},setLocked:function(e){t=e},setClear:function(e,t,n,r,i){!0===i&&(e*=r,t*=r,n*=r),a.set(e,t,n,r),!1===o.equals(a)&&(h.clearColor(e,t,n,r),o.copy(a))},reset:function(){t=!1,n=null,o.set(-1,0,0,0)}}}function n(){var t=!1,n=null,r=null,i=null;return{setTest:function(e){(e?V:H)(2929)},setMask:function(e){n===e||t||(h.depthMask(e),n=e)},setFunc:function(e){if(r!==e){if(e)switch(e){case Ue:h.depthFunc(512);break;case ze:h.depthFunc(519);break;case Ge:h.depthFunc(513);break;case Ve:h.depthFunc(515);break;case He:h.depthFunc(514);break;case Ze:h.depthFunc(518);break;case Je:h.depthFunc(516);break;case Ke:h.depthFunc(517);break;default:h.depthFunc(515)}else h.depthFunc(515);r=e}},setLocked:function(e){t=e},setClear:function(e){i!==e&&(h.clearDepth(e),i=e)},reset:function(){t=!1,n=null,r=null,i=null}}}function a(){var t=!1,n=null,r=null,i=null,a=null,o=null,s=null,l=null,u=null;return{setTest:function(e){t||(e?V:H)(2960)},setMask:function(e){n===e||t||(h.stencilMask(e),n=e)},setFunc:function(e,t,n){r===e&&i===t&&a===n||(h.stencilFunc(e,t,n),r=e,i=t,a=n)},setOp:function(e,t,n){o===e&&s===t&&l===n||(h.stencilOp(e,t,n),o=e,s=t,l=n)},setLocked:function(e){t=e},setClear:function(e){u!==e&&(h.clearStencil(e),u=e)},reset:function(){t=!1,n=null,r=null,i=null,a=null,o=null,s=null,l=null,u=null}}}var o=new t,s=new n,l=new a,u=h.getParameter(34921),c=new Uint8Array(u),d=new Uint8Array(u),f=new Uint8Array(u),p={},m=null,v=null,g=null,y=null,_=null,x=null,w=null,b=null,M=null,T=!1,E=null,S=null,A=null,I=null,L=null,R=h.getParameter(35661),N=!1,e=0,u=h.getParameter(7938);-1!==(0,ce.default)(u).call(u,"WebGL")?(e=(0,de.default)(/^WebGL\ ([0-9])/.exec(u)[1]),N=1<=e):-1!==(0,ce.default)(u).call(u,"OpenGL ES")&&(e=(0,de.default)(/^OpenGL\ ES\ ([0-9])/.exec(u)[1]),N=2<=e);var k=null,P={},C=new Or,D=new Or;function O(e,t,n){var r=new Uint8Array(4),i=h.createTexture();h.bindTexture(e,i),h.texParameteri(e,10241,9728),h.texParameteri(e,10240,9728);for(var a=0;a<n;a++)h.texImage2D(t+a,0,6408,1,1,0,6408,5121,r);return i}var B={};function F(){for(var e=0,t=c.length;e<t;e++)c[e]=0}function U(e){z(e,0)}function z(e,t){var n;c[e]=1,0===d[e]&&(h.enableVertexAttribArray(e),d[e]=1),f[e]!==t&&(n=i?h:r.get("ANGLE_instanced_arrays"),n[i?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](e,t),f[e]=t)}function G(){for(var e=0,t=d.length;e!==t;++e)d[e]!==c[e]&&(h.disableVertexAttribArray(e),d[e]=0)}function V(e){!0!==p[e]&&(h.enable(e),p[e]=!0)}function H(e){!1!==p[e]&&(h.disable(e),p[e]=!1)}function j(e){return m!==e&&(h.useProgram(e),m=e,!0)}B[3553]=O(3553,3553,1),B[34067]=O(34067,34069,6),o.setClear(0,0,0,1),s.setClear(1),l.setClear(0),V(2929),s.setFunc(Ve),J(!1),K(pe),V(2884),X(ge);var W,Y=(e={},(0,he.default)(e,Me,32774),(0,he.default)(e,Te,32778),(0,he.default)(e,Ee,32779),e);i?(Y[Se]=32775,Y[Ae]=32776):(W=r.get("EXT_blend_minmax"),null!==W&&(Y[Se]=W.MIN_EXT,Y[Ae]=W.MAX_EXT));var q=(W={},(0,he.default)(W,Ie,0),(0,he.default)(W,Le,1),(0,he.default)(W,Re,768),(0,he.default)(W,ke,770),(0,he.default)(W,Fe,776),(0,he.default)(W,Oe,774),(0,he.default)(W,Ce,772),(0,he.default)(W,Ne,769),(0,he.default)(W,Pe,771),(0,he.default)(W,Be,775),(0,he.default)(W,De,773),W);function X(e,t,n,r,i,a,o,s){if(e!==ge){if(v||(V(3042),v=!0),e===be)i=i||t,a=a||n,o=o||r,t===y&&i===w||(h.blendEquationSeparate(Y[t],Y[i]),y=t,w=i),n===_&&r===x&&a===b&&o===M||(h.blendFuncSeparate(q[n],q[r],q[a],q[o]),_=n,x=r,b=a,M=o),g=e,T=null;else if(e!==g||s!==T){if(y===Me&&w===Me||(h.blendEquation(32774),y=Me,w=Me),s)switch(e){case ye:h.blendFuncSeparate(1,771,1,771);break;case _e:h.blendFunc(1,1);break;case xe:h.blendFuncSeparate(0,0,769,771);break;case we:h.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}else switch(e){case ye:h.blendFuncSeparate(770,771,1,771);break;case _e:h.blendFunc(770,1);break;case xe:h.blendFunc(0,769);break;case we:h.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}_=null,x=null,b=null,M=null,g=e,T=s}}else v&&(H(3042),v=!1)}function Z(e,t){(e.side===ve?H:V)(2884);var n=e.side===Xe;t&&(n=!n),J(n),e.blending===ye&&!1===e.transparent?X(ge):X(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),s.setFunc(e.depthFunc),s.setTest(e.depthTest),s.setMask(e.depthWrite),o.setMask(e.colorWrite),n=e.stencilWrite,l.setTest(n),n&&(l.setMask(e.stencilWriteMask),l.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),l.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),$(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)}function J(e){E!==e&&(e?h.frontFace(2304):h.frontFace(2305),E=e)}function K(e){e!==fe?(V(2884),e!==S&&(e===pe?h.cullFace(1029):e===me?h.cullFace(1028):h.cullFace(1032))):H(2884),S=e}function Q(e){e!==A&&(N&&h.lineWidth(e),A=e)}function $(e,t,n){e?(V(32823),I===t&&L===n||(h.polygonOffset(t,n),I=t,L=n)):H(32823)}function ee(e){(e?V:H)(3089)}function te(e){void 0===e&&(e=33984+R-1),k!==e&&(h.activeTexture(e),k=e)}function ne(e,t){null===k&&te();var n=P[k];void 0===n&&(n={type:void 0,texture:void 0},P[k]=n),n.type===e&&n.texture===t||(h.bindTexture(e,t||B[e]),n.type=e,n.texture=t)}function re(){var e=P[k];void 0!==e&&void 0!==e.type&&(h.bindTexture(e.type,null),e.type=void 0,e.texture=void 0)}function ie(){try{h.compressedTexImage2D.apply(h,arguments)}catch(e){console.error("THREE.WebGLState:",e)}}function ae(){try{h.texImage2D.apply(h,arguments)}catch(e){console.error("THREE.WebGLState:",e)}}function oe(){try{h.texImage3D.apply(h,arguments)}catch(e){console.error("THREE.WebGLState:",e)}}function se(e){!1===C.equals(e)&&(h.scissor(e.x,e.y,e.z,e.w),C.copy(e))}function le(e){!1===D.equals(e)&&(h.viewport(e.x,e.y,e.z,e.w),D.copy(e))}function ue(){for(var e=0;e<d.length;e++)1===d[e]&&(h.disableVertexAttribArray(e),d[e]=0);p={},k=null,P={},m=null,g=null,E=null,S=null,o.reset(),s.reset(),l.reset()}return{buffers:{color:o,depth:s,stencil:l},initAttributes:F,enableAttribute:U,enableAttributeAndDivisor:z,disableUnusedAttributes:G,enable:V,disable:H,useProgram:j,setBlending:X,setMaterial:Z,setFlipSided:J,setCullFace:K,setLineWidth:Q,setPolygonOffset:$,setScissorTest:ee,activeTexture:te,bindTexture:ne,unbindTexture:re,compressedTexImage2D:ie,texImage2D:ae,texImage3D:oe,scissor:se,viewport:le,reset:ue}}function gh(v,r,g,y,i,_,l,n){var e,a,x=i.isWebGL2,t=i.maxTextures,w=i.maxCubemapSize,d=i.maxTextureSize,o=i.maxSamples,s=new ie.default,u=!1;try{u="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function h(e,t){return u?new OffscreenCanvas(e,t):n}function b(e,t,n,r){var i=1;return(e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),(i<1||!0===t)&&("object"!==(0,te.default)(e)?"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."):(r=t?Rr.floorPowerOfTwo:Math.floor,t=r(i*e.width),r=r(i*e.height),void 0===a&&(a=h(t,r)),i=n?h(t,r):a,i.width=t,i.height=r,n=i.getContext("2d"),n.drawImage(e,0,0,t,r),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+t+"x"+r+")."),e.src=i.toDataURL("image/png"))),e}function M(e){return Rr.isPowerOfTwo(e.width)&&Rr.isPowerOfTwo(e.height)}function f(e){return!x&&(e.wrapS!==ot||e.wrapT!==ot||e.minFilter!==lt&&e.minFilter!==ft)}function T(e,t){return e.generateMipmaps&&t&&e.minFilter!==lt&&e.minFilter!==ft}function E(e,t,n,r){v.generateMipmap(e),t=y.get(t),t.__maxMipLevel=Math.log(Math.max(n,r))*Math.LOG2E}function S(e,t,n){if(!1===x)return t;if(null!==e){if(void 0!==v[e])return v[e];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+e+"'")}return e=t,6403===t&&(5126===n&&(e=33326),5131===n&&(e=33325),5121===n&&(e=33321)),6407===t&&(5126===n&&(e=34837),5131===n&&(e=34843),5121===n&&(e=32849)),6408===t&&(5126===n&&(e=34836),5131===n&&(e=34842),5121===n&&(e=32856)),33325!==e&&33326!==e&&34842!==e&&34836!==e||r.get("EXT_color_buffer_float"),e}function c(e){return e===lt||e===ut||e===ct?9728:9729}function p(e){e=e.target,e.removeEventListener("dispose",p),A(e),e.isVideoTexture&&s.delete(e),l.memory.textures--}function m(e){e=e.target,e.removeEventListener("dispose",m),I(e),l.memory.textures--}function A(e){var t=y.get(e);void 0!==t.__webglInit&&(v.deleteTexture(t.__webglTexture),y.remove(e))}function I(e){var t=y.get(e),n=y.get(e.texture);if(e){if(void 0!==n.__webglTexture&&v.deleteTexture(n.__webglTexture),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLCubeRenderTarget)for(var r=0;r<6;r++)v.deleteFramebuffer(t.__webglFramebuffer[r]),t.__webglDepthbuffer&&v.deleteRenderbuffer(t.__webglDepthbuffer[r]);else v.deleteFramebuffer(t.__webglFramebuffer),t.__webglDepthbuffer&&v.deleteRenderbuffer(t.__webglDepthbuffer),t.__webglMultisampledFramebuffer&&v.deleteFramebuffer(t.__webglMultisampledFramebuffer),t.__webglColorRenderbuffer&&v.deleteRenderbuffer(t.__webglColorRenderbuffer),t.__webglDepthRenderbuffer&&v.deleteRenderbuffer(t.__webglDepthRenderbuffer);y.remove(e.texture),y.remove(e)}}var L=0;function R(){L=0}function N(){var e=L;return t<=e&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+t),L+=1,e}function k(e,t){var n=y.get(e);if(e.isVideoTexture&&J(e),0<e.version&&n.__version!==e.version){var r=e.image;if(void 0===r)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==r.complete)return void G(n,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}g.activeTexture(33984+t),g.bindTexture(3553,n.__webglTexture)}function P(e,t){var n=y.get(e);0<e.version&&n.__version!==e.version?G(n,e,t):(g.activeTexture(33984+t),g.bindTexture(35866,n.__webglTexture))}function C(e,t){var n=y.get(e);0<e.version&&n.__version!==e.version?G(n,e,t):(g.activeTexture(33984+t),g.bindTexture(32879,n.__webglTexture))}function D(e,t){if(6===e.image.length){var n=y.get(e);if(0<e.version&&n.__version!==e.version){z(n,e),g.activeTexture(33984+t),g.bindTexture(34067,n.__webglTexture),v.pixelStorei(37440,e.flipY);for(var r=e&&(e.isCompressedTexture||e.image[0].isCompressedTexture),i=e.image[0]&&e.image[0].isDataTexture,a=[],o=0;o<6;o++)a[o]=r||i?i?e.image[o].image:e.image[o]:b(e.image[o],!1,!0,w);var s=a[0],l=M(s)||x,u=_.convert(e.format),h=_.convert(e.type),c=S(e.internalFormat,u,h);if(U(34067,e,l),r){for(o=0;o<6;o++)for(var d=a[o].mipmaps,f=0;f<d.length;f++){var p=d[f];e.format!==kt&&e.format!==Nt?null!==u?g.compressedTexImage2D(34069+o,f,c,p.width,p.height,0,p.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):g.texImage2D(34069+o,f,c,p.width,p.height,0,u,h,p.data)}n.__maxMipLevel=d.length-1}else{for(d=e.mipmaps,o=0;o<6;o++)if(i)for(g.texImage2D(34069+o,0,c,a[o].width,a[o].height,0,u,h,a[o].data),f=0;f<d.length;f++){var p=d[f],m=p.image[o].image;g.texImage2D(34069+o,f+1,c,m.width,m.height,0,u,h,m.data)}else for(g.texImage2D(34069+o,0,c,u,h,a[o]),f=0;f<d.length;f++)p=d[f],g.texImage2D(34069+o,f+1,c,u,h,p.image[o]);n.__maxMipLevel=d.length}T(e,l)&&E(34067,e,s.width,s.height),n.__version=e.version,e.onUpdate&&e.onUpdate(e)}else g.activeTexture(33984+t),g.bindTexture(34067,n.__webglTexture)}}function O(e,t){g.activeTexture(33984+t),g.bindTexture(34067,y.get(e).__webglTexture)}var B=(e={},(0,he.default)(e,at,10497),(0,he.default)(e,ot,33071),(0,he.default)(e,st,33648),e),F=(e={},(0,he.default)(e,lt,9728),(0,he.default)(e,ut,9984),(0,he.default)(e,ct,9986),(0,he.default)(e,ft,9729),(0,he.default)(e,pt,9985),(0,he.default)(e,vt,9987),e);function U(e,t,n){n?(v.texParameteri(e,10242,B[t.wrapS]),v.texParameteri(e,10243,B[t.wrapT]),32879!==e&&35866!==e||v.texParameteri(e,32882,B[t.wrapR]),v.texParameteri(e,10240,F[t.magFilter]),v.texParameteri(e,10241,F[t.minFilter])):(v.texParameteri(e,10242,33071),v.texParameteri(e,10243,33071),32879!==e&&35866!==e||v.texParameteri(e,32882,33071),t.wrapS===ot&&t.wrapT===ot||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),v.texParameteri(e,10240,c(t.magFilter)),v.texParameteri(e,10241,c(t.minFilter)),t.minFilter!==lt&&t.minFilter!==ft&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),n=r.get("EXT_texture_filter_anisotropic"),n&&(t.type===Tt&&null===r.get("OES_texture_float_linear")||t.type===Et&&null===(x||r.get("OES_texture_half_float_linear"))||(1<t.anisotropy||y.get(t).__currentAnisotropy)&&(v.texParameterf(e,n.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(t.anisotropy,i.getMaxAnisotropy())),y.get(t).__currentAnisotropy=t.anisotropy))}function z(e,t){void 0===e.__webglInit&&(e.__webglInit=!0,t.addEventListener("dispose",p),e.__webglTexture=v.createTexture(),l.memory.textures++)}function G(e,t,n){var r=3553;t.isDataTexture2DArray&&(r=35866),t.isDataTexture3D&&(r=32879),z(e,t),g.activeTexture(33984+n),g.bindTexture(r,e.__webglTexture),v.pixelStorei(37440,t.flipY),v.pixelStorei(37441,t.premultiplyAlpha),v.pixelStorei(3317,t.unpackAlignment);var i=f(t)&&!1===M(t.image),n=b(t.image,i,!1,d),i=M(n)||x,a=_.convert(t.format),o=_.convert(t.type),s=S(t.internalFormat,a,o);0===n.width&&0===n.height&&(i=!0),U(r,t,i);var l,u=t.mipmaps;if(t.isDepthTexture)s=6402,x?s=t.type===Tt?36012:t.type===Mt?33190:t.type===Lt?35056:33189:t.type===Tt&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),t.format===Ot&&6402===s&&t.type!==wt&&t.type!==Mt&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),t.type=wt,o=_.convert(t.type)),t.format===Bt&&6402===s&&(s=34041,t.type!==Lt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),t.type=Lt,o=_.convert(t.type))),g.texImage2D(3553,0,s,n.width,n.height,0,a,o,null);else if(t.isDataTexture)if(0<u.length&&i){for(var h=0,c=u.length;h<c;h++)l=u[h],g.texImage2D(3553,h,s,l.width,l.height,0,a,o,l.data);t.generateMipmaps=!1,e.__maxMipLevel=u.length-1}else g.texImage2D(3553,0,s,n.width,n.height,0,a,o,n.data),e.__maxMipLevel=0;else if(t.isCompressedTexture){for(h=0,c=u.length;h<c;h++)l=u[h],t.format!==kt&&t.format!==Nt?null!==a?g.compressedTexImage2D(3553,h,s,l.width,l.height,0,l.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):g.texImage2D(3553,h,s,l.width,l.height,0,a,o,l.data);e.__maxMipLevel=u.length-1}else if(t.isDataTexture2DArray)g.texImage3D(35866,0,s,n.width,n.height,n.depth,0,a,o,n.data),e.__maxMipLevel=0;else if(t.isDataTexture3D)g.texImage3D(32879,0,s,n.width,n.height,n.depth,0,a,o,n.data),e.__maxMipLevel=0;else if(0<u.length&&i){for(h=0,c=u.length;h<c;h++)l=u[h],g.texImage2D(3553,h,s,a,o,l);t.generateMipmaps=!1,e.__maxMipLevel=u.length-1}else g.texImage2D(3553,0,s,a,o,n),e.__maxMipLevel=0;T(t,i)&&E(r,t,n.width,n.height),e.__version=t.version,t.onUpdate&&t.onUpdate(t)}function V(e,t,n,r){var i=_.convert(t.texture.format),a=_.convert(t.texture.type),o=S(t.texture.internalFormat,i,a);g.texImage2D(r,0,o,t.width,t.height,0,i,a,null),v.bindFramebuffer(36160,e),v.framebufferTexture2D(36160,n,r,y.get(t.texture).__webglTexture,0),v.bindFramebuffer(36160,null)}function H(e,t,n){var r,i,a;v.bindRenderbuffer(36161,e),t.depthBuffer&&!t.stencilBuffer?(i=33189,n?(r=t.depthTexture,r&&r.isDepthTexture&&(r.type===Tt?i=36012:r.type===Mt&&(i=33190)),a=Z(t),v.renderbufferStorageMultisample(36161,a,i,t.width,t.height)):v.renderbufferStorage(36161,i,t.width,t.height),v.framebufferRenderbuffer(36160,36096,36161,e)):t.depthBuffer&&t.stencilBuffer?(n?(a=Z(t),v.renderbufferStorageMultisample(36161,a,35056,t.width,t.height)):v.renderbufferStorage(36161,34041,t.width,t.height),v.framebufferRenderbuffer(36160,33306,36161,e)):(r=_.convert(t.texture.format),e=_.convert(t.texture.type),i=S(t.texture.internalFormat,r,e),n?(a=Z(t),v.renderbufferStorageMultisample(36161,a,i,t.width,t.height)):v.renderbufferStorage(36161,i,t.width,t.height)),v.bindRenderbuffer(36161,null)}function j(e,t){var n=t&&t.isWebGLCubeRenderTarget;if(n)throw new Error("Depth Texture with cube render targets is not supported");if(v.bindFramebuffer(36160,e),!t.depthTexture||!t.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");if(y.get(t.depthTexture).__webglTexture&&t.depthTexture.image.width===t.width&&t.depthTexture.image.height===t.height||(t.depthTexture.image.width=t.width,t.depthTexture.image.height=t.height,t.depthTexture.needsUpdate=!0),k(t.depthTexture,0),e=y.get(t.depthTexture).__webglTexture,t.depthTexture.format===Ot)v.framebufferTexture2D(36160,36096,3553,e,0);else{if(t.depthTexture.format!==Bt)throw new Error("Unknown depthTexture format");v.framebufferTexture2D(36160,33306,3553,e,0)}}function W(e){var t=y.get(e),n=!0===e.isWebGLCubeRenderTarget;if(e.depthTexture){if(n)throw new Error("target.depthTexture not supported in Cube render targets");j(t.__webglFramebuffer,e)}else if(n){t.__webglDepthbuffer=[];for(var r=0;r<6;r++)v.bindFramebuffer(36160,t.__webglFramebuffer[r]),t.__webglDepthbuffer[r]=v.createRenderbuffer(),H(t.__webglDepthbuffer[r],e,!1)}else v.bindFramebuffer(36160,t.__webglFramebuffer),t.__webglDepthbuffer=v.createRenderbuffer(),H(t.__webglDepthbuffer,e,!1);v.bindFramebuffer(36160,null)}function Y(e){var t=y.get(e),n=y.get(e.texture);e.addEventListener("dispose",m),n.__webglTexture=v.createTexture(),l.memory.textures++;var r,i=!0===e.isWebGLCubeRenderTarget,a=!0===e.isWebGLMultisampleRenderTarget,o=M(e)||x;if(!x||e.texture.format!==Nt||e.texture.type!==Tt&&e.texture.type!==Et||(e.texture.format=kt,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),i){t.__webglFramebuffer=[];for(var s=0;s<6;s++)t.__webglFramebuffer[s]=v.createFramebuffer()}else t.__webglFramebuffer=v.createFramebuffer(),a&&(x?(t.__webglMultisampledFramebuffer=v.createFramebuffer(),t.__webglColorRenderbuffer=v.createRenderbuffer(),v.bindRenderbuffer(36161,t.__webglColorRenderbuffer),r=_.convert(e.texture.format),a=_.convert(e.texture.type),r=S(e.texture.internalFormat,r,a),a=Z(e),v.renderbufferStorageMultisample(36161,a,r,e.width,e.height),v.bindFramebuffer(36160,t.__webglMultisampledFramebuffer),v.framebufferRenderbuffer(36160,36064,36161,t.__webglColorRenderbuffer),v.bindRenderbuffer(36161,null),e.depthBuffer&&(t.__webglDepthRenderbuffer=v.createRenderbuffer(),H(t.__webglDepthRenderbuffer,e,!0)),v.bindFramebuffer(36160,null)):console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2."));if(i){for(g.bindTexture(34067,n.__webglTexture),U(34067,e.texture,o),s=0;s<6;s++)V(t.__webglFramebuffer[s],e,36064,34069+s);T(e.texture,o)&&E(34067,e.texture,e.width,e.height),g.bindTexture(34067,null)}else g.bindTexture(3553,n.__webglTexture),U(3553,e.texture,o),V(t.__webglFramebuffer,e,36064,3553),T(e.texture,o)&&E(3553,e.texture,e.width,e.height),g.bindTexture(3553,null);e.depthBuffer&&W(e)}function q(e){var t,n=e.texture,r=M(e)||x;T(n,r)&&(t=e.isWebGLCubeRenderTarget?34067:3553,r=y.get(n).__webglTexture,g.bindTexture(t,r),E(t,n,e.width,e.height),g.bindTexture(t,null))}function X(e){var t,n,r,i;e.isWebGLMultisampleRenderTarget&&(x?(t=y.get(e),v.bindFramebuffer(36008,t.__webglMultisampledFramebuffer),v.bindFramebuffer(36009,t.__webglFramebuffer),n=e.width,r=e.height,i=16384,e.depthBuffer&&(i|=256),e.stencilBuffer&&(i|=1024),v.blitFramebuffer(0,0,n,r,0,0,n,r,i,9728),v.bindFramebuffer(36160,t.__webglMultisampledFramebuffer)):console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2."))}function Z(e){return x&&e.isWebGLMultisampleRenderTarget?Math.min(o,e.samples):0}function J(e){var t=l.render.frame;s.get(e)!==t&&(s.set(e,t),e.update())}var K=!1,Q=!1;function $(e,t){e&&e.isWebGLRenderTarget&&(!1===K&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),K=!0),e=e.texture),k(e,t)}function ee(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===Q&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),Q=!0),e=e.texture),(e&&e.isCubeTexture||(0,We.default)(e.image)&&6===e.image.length?D:O)(e,t)}this.allocateTextureUnit=N,this.resetTextureUnits=R,this.setTexture2D=k,this.setTexture2DArray=P,this.setTexture3D=C,this.setTextureCube=D,this.setTextureCubeDynamic=O,this.setupRenderTarget=Y,this.updateRenderTargetMipmap=q,this.updateMultisampleRenderTarget=X,this.safeSetTexture2D=$,this.safeSetTextureCube=ee}function yh(e,n,t){var r=t.isWebGL2;function i(e){var t;if(e===yt)return 5121;if(e===St)return 32819;if(e===At)return 32820;if(e===It)return 33635;if(e===_t)return 5120;if(e===xt)return 5122;if(e===wt)return 5123;if(e===bt)return 5124;if(e===Mt)return 5125;if(e===Tt)return 5126;if(e===Et)return r?5131:(t=n.get("OES_texture_half_float"),null!==t?t.HALF_FLOAT_OES:null);if(e===Rt)return 6406;if(e===Nt)return 6407;if(e===kt)return 6408;if(e===Pt)return 6409;if(e===Ct)return 6410;if(e===Ot)return 6402;if(e===Bt)return 34041;if(e===Ft)return 6403;if(e===Ut)return 36244;if(e===zt)return 33319;if(e===Gt)return 33320;if(e===Vt)return 36248;if(e===Ht)return 36249;if(e===jt||e===Wt||e===Yt||e===qt){if(t=n.get("WEBGL_compressed_texture_s3tc"),null===t)return null;if(e===jt)return t.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===Wt)return t.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===Yt)return t.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===qt)return t.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(e===Xt||e===Zt||e===Jt||e===Kt){if(t=n.get("WEBGL_compressed_texture_pvrtc"),null===t)return null;if(e===Xt)return t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(e===Zt)return t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(e===Jt)return t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(e===Kt)return t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(e===Qt)return t=n.get("WEBGL_compressed_texture_etc1"),null!==t?t.COMPRESSED_RGB_ETC1_WEBGL:null;if((e===$t||e===en)&&(t=n.get("WEBGL_compressed_texture_etc"),null!==t)){if(e===$t)return t.COMPRESSED_RGB8_ETC2;if(e===en)return t.COMPRESSED_RGBA8_ETC2_EAC}return e===tn||e===nn||e===rn||e===an||e===on||e===sn||e===ln||e===un||e===hn||e===cn||e===dn||e===fn||e===pn||e===mn||e===gn||e===yn||e===_n||e===xn||e===wn||e===bn||e===Mn||e===Tn||e===En||e===Sn||e===An||e===In||e===Ln||e===Rn?(t=n.get("WEBGL_compressed_texture_astc"),null!==t?e:null):e===vn?(t=n.get("EXT_texture_compression_bptc"),null!==t?e:null):e===Lt?r?34042:(t=n.get("WEBGL_depth_texture"),null!==t?t.UNSIGNED_INT_24_8_WEBGL:null):void 0}return{convert:i}}function _h(e){mo.call(this),this.cameras=e||[]}function xh(){pi.call(this),this.type="Group"}function wh(f,t){var n=this,p=null,r=1,m=null,i="local-floor",v=null,g=[],a=new S.default,o=new mo;o.layers.enable(1),o.viewport=new Or;var s=new mo;s.layers.enable(2),s.viewport=new Or;var y=new _h([o,s]);y.layers.enable(1),y.layers.enable(2);var l=null,u=null;function h(e){var t=a.get(e.inputSource);t&&(t.targetRay&&t.targetRay.dispatchEvent({type:e.type}),t.grip&&t.grip.dispatchEvent({type:e.type}))}function c(){(0,A.default)(a).call(a,function(e,t){e.targetRay&&(e.targetRay.dispatchEvent({type:"disconnected",data:t}),e.targetRay.visible=!1),e.grip&&(e.grip.dispatchEvent({type:"disconnected",data:t}),e.grip.visible=!1)}),a.clear(),f.setFramebuffer(null),f.setRenderTarget(f.getRenderTarget()),E.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function d(e){m=e,E.setContext(p),E.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}function _(e){for(var t=p.inputSources,n=0;n<g.length;n++)a.set(t[n],g[n]);for(n=0;n<e.removed.length;n++){var r=e.removed[n],i=a.get(r);i&&(i.targetRay&&i.targetRay.dispatchEvent({type:"disconnected",data:r}),i.grip&&i.grip.dispatchEvent({type:"disconnected",data:r}),a.delete(r))}for(n=0;n<e.added.length;n++)r=e.added[n],i=a.get(r),i&&(i.targetRay&&i.targetRay.dispatchEvent({type:"connected",data:r}),i.grip&&i.grip.dispatchEvent({type:"connected",data:r}))}this.enabled=!1,this.isPresenting=!1,this.getController=function(e){var t=g[e];return void 0===t&&(t={},g[e]=t),void 0===t.targetRay&&(t.targetRay=new xh,t.targetRay.matrixAutoUpdate=!1,t.targetRay.visible=!1),t.targetRay},this.getControllerGrip=function(e){var t=g[e];return void 0===t&&(t={},g[e]=t),void 0===t.grip&&(t.grip=new xh,t.grip.matrixAutoUpdate=!1,t.grip.visible=!1),t.grip},this.setFramebufferScaleFactor=function(e){r=e,1==n.isPresenting&&console.warn("WebXRManager: Cannot change framebuffer scale while presenting VR content")},this.setReferenceSpaceType=function(e){i=e},this.getReferenceSpace=function(){return m},this.getSession=function(){return p},this.setSession=function(e){p=e,null!==p&&(p.addEventListener("select",h),p.addEventListener("selectstart",h),p.addEventListener("selectend",h),p.addEventListener("squeeze",h),p.addEventListener("squeezestart",h),p.addEventListener("squeezeend",h),p.addEventListener("end",c),e=t.getContextAttributes(),e={antialias:e.antialias,alpha:e.alpha,depth:e.depth,stencil:e.stencil,framebufferScaleFactor:r},e=new XRWebGLLayer(p,t,e),p.updateRenderState({baseLayer:e}),p.requestReferenceSpace(i).then(d),p.addEventListener("inputsourceschange",_))};var x=new Vr,w=new Vr;function b(e,t,n){x.setFromMatrixPosition(t.matrixWorld),w.setFromMatrixPosition(n.matrixWorld);var r=x.distanceTo(w),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,o=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],u=(i[9]-1)/i[5],h=(i[8]-1)/i[0],n=(a[8]+1)/a[0],i=o*h,a=o*n,n=r/(-h+n),h=n*-h;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(h),e.translateZ(n),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.getInverse(e.matrixWorld),o+=n,n=s+n,i-=h,h=a+(r-h),l=l*s/n*o,s=u*s/n*o,e.projectionMatrix.makePerspective(i,h,l,s,o,n)}function M(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.getInverse(e.matrixWorld)}this.getCamera=function(e){y.near=s.near=o.near=e.near,y.far=s.far=o.far=e.far,l===y.near&&u===y.far||(p.updateRenderState({depthNear:y.near,depthFar:y.far}),l=y.near,u=y.far);var t=e.parent,n=y.cameras;M(y,t);for(var r=0;r<n.length;r++)M(n[r],t);e.matrixWorld.copy(y.matrixWorld);for(var i=e.children,r=0,a=i.length;r<a;r++)i[r].updateMatrixWorld(!0);return b(y,o,s),y};var T=null;function e(e,t){if(v=t.getViewerPose(m),null!==v){var n=v.views,r=p.renderState.baseLayer;f.setFramebuffer(r.framebuffer);for(var i=0;i<n.length;i++){var a=n[i],o=r.getViewport(a),s=y.cameras[i];s.matrix.fromArray(a.transform.matrix),s.projectionMatrix.fromArray(a.projectionMatrix),s.viewport.set(o.x,o.y,o.width,o.height),0===i&&y.matrix.copy(s.matrix)}}for(var l=p.inputSources,i=0;i<g.length;i++){var u=g[i],h=l[i],c=null,d=null;h&&(u.targetRay&&(c=t.getPose(h.targetRaySpace,m),null!==c&&(u.targetRay.matrix.fromArray(c.transform.matrix),u.targetRay.matrix.decompose(u.targetRay.position,u.targetRay.rotation,u.targetRay.scale))),u.grip&&h.gripSpace&&(d=t.getPose(h.gripSpace,m),null!==d&&(u.grip.matrix.fromArray(d.transform.matrix),u.grip.matrix.decompose(u.grip.position,u.grip.rotation,u.grip.scale)))),u.targetRay&&(u.targetRay.visible=null!==c),u.grip&&(u.grip.visible=null!==d)}T&&T(e,t)}var E=new Eo;E.setAnimationLoop(e),this.setAnimationLoop=function(e){T=e},this.dispose=function(){}}function bh(e){e=e||{};var r=e.canvas,t=e.tempCanvas,n=void 0!==e.context?e.context:null,i=void 0!==e.alpha&&e.alpha,a=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,s=void 0!==e.antialias&&e.antialias,l=void 0===e.premultipliedAlpha||e.premultipliedAlpha,u=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,h=void 0!==e.powerPreference?e.powerPreference:"default",c=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat,f=null,m=null;this.domElement=r,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=Hn,this.physicallyCorrectLights=!1,this.toneMapping=Qe,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var x,w,b,M,p,v,g,T,d,y,_,E,S,A,I,L,R,N,k=this,P=!1,C=null,D=0,O=0,B=null,F=null,U=-1,z={geometry:null,program:null,wireframe:!1},G=null,V=null,H=new Or,j=new Or,W=null,Y=r.width,q=r.height,X=1,Z=null,J=null,K=new Or(0,0,Y,q),Q=new Or(0,0,Y,q),$=!1,ee=new Mo,te=new vl,ne=!1,re=!1,ie=new Jr,ae=new Vr;function oe(){return null===B?X:1}try{var se={alpha:i,depth:a,stencil:o,antialias:s,premultipliedAlpha:l,preserveDrawingBuffer:u,powerPreference:h,failIfMajorPerformanceCaveat:c,xrCompatible:!0};if(r.addEventListener("webglcontextlost",ce,!1),r.addEventListener("webglcontextrestored",de,!1),x=n||r.getContext("webgl",se)||r.getContext("experimental-webgl",se),null===x)throw null!==r.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===x.getShaderPrecisionFormat&&(x.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function le(){w=new gl(x),b=new ml(x,w,e),!1===b.isWebGL2&&(w.get("WEBGL_depth_texture"),w.get("OES_texture_float"),w.get("OES_texture_half_float"),w.get("OES_texture_half_float_linear"),w.get("OES_standard_derivatives"),w.get("OES_element_index_uint"),w.get("ANGLE_instanced_arrays")),w.get("OES_texture_float_linear"),N=new yh(x,w,b),M=new vh(x,w,b),M.scissor(j.copy(Q).multiplyScalar(X).floor()),M.viewport(H.copy(K).multiplyScalar(X).floor()),p=new xl(x),v=new $u,g=new gh(x,w,M,v,b,N,p,t),T=new So(x,b),d=new yl(x,T,p),y=new Ml(x,d,T,p),I=new bl(x),_=new Qu(k,w,b),E=new rh,S=new hh,A=new fl(k,M,y,l),L=new pl(x,w,p,b),R=new _l(x,w,p,b),p.programs=_.programs,k.capabilities=b,k.extensions=w,k.properties=v,k.renderLists=E,k.state=M,k.info=p}le();var ue=new wh(k,x);this.xr=ue;var he=new mh(k,y,b.maxTextureSize);function ce(e){e.preventDefault(),P=!0}function de(){P=!1,le()}function fe(e){e=e.target,e.removeEventListener("dispose",fe),pe(e)}function pe(e){me(e),v.remove(e)}function me(e){var t=v.get(e).program;e.program=void 0,void 0!==t&&_.releaseProgram(t)}function ve(e,t){e.render(function(e){k.renderBufferImmediate(e,t)})}this.shadowMap=he,this.getContext=function(){return x},this.getContextAttributes=function(){return x.getContextAttributes()},this.forceContextLoss=function(){var e=w.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=w.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return X},this.setPixelRatio=function(e){void 0!==e&&(X=e,this.setSize(Y,q,!1))},this.getSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),e=new Nr),e.set(Y,q)},this.setSize=function(e,t,n){ue.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(Y=e,q=t,r.width=Math.floor(e*X),r.height=Math.floor(t*X),!1!==n&&(r.style.width=e+"px",r.style.height=t+"px"),this.setViewport(0,0,e,t))},this.getDrawingBufferSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),e=new Nr),e.set(Y*X,q*X).floor()},this.setDrawingBufferSize=function(e,t,n){Y=e,q=t,X=n,r.width=Math.floor(e*n),r.height=Math.floor(t*n),this.setViewport(0,0,e,t)},this.getCurrentViewport=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),e=new Or),e.copy(H)},this.getViewport=function(e){return e.copy(K)},this.setViewport=function(e,t,n,r){e.isVector4?K.set(e.x,e.y,e.z,e.w):K.set(e,t,n,r),M.viewport(H.copy(K).multiplyScalar(X).floor())},this.getScissor=function(e){return e.copy(Q)},this.setScissor=function(e,t,n,r){e.isVector4?Q.set(e.x,e.y,e.z,e.w):Q.set(e,t,n,r),M.scissor(j.copy(Q).multiplyScalar(X).floor())},this.getScissorTest=function(){return $},this.setScissorTest=function(e){M.setScissorTest($=e)},this.setOpaqueSort=function(e){Z=e},this.setTransparentSort=function(e){J=e},this.getClearColor=function(){return A.getClearColor()},this.setClearColor=function(){A.setClearColor.apply(A,arguments)},this.getClearAlpha=function(){return A.getClearAlpha()},this.setClearAlpha=function(){A.setClearAlpha.apply(A,arguments)},this.clear=function(e,t,n){var r=0;void 0!==e&&!e||(r|=16384),void 0!==t&&!t||(r|=256),void 0!==n&&!n||(r|=1024),x.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){r.removeEventListener("webglcontextlost",ce,!1),r.removeEventListener("webglcontextrestored",de,!1),E.dispose(),S.dispose(),v.dispose(),y.dispose(),ue.dispose(),we.stop(),this.forceContextLoss()},this.renderBufferImmediate=function(e,t){M.initAttributes();var n=v.get(e);e.hasPositions&&!n.position&&(n.position=x.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=x.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=x.createBuffer()),e.hasColors&&!n.color&&(n.color=x.createBuffer()),t=t.getAttributes(),e.hasPositions&&(x.bindBuffer(34962,n.position),x.bufferData(34962,e.positionArray,35048),M.enableAttribute(t.position),x.vertexAttribPointer(t.position,3,5126,!1,0,0)),e.hasNormals&&(x.bindBuffer(34962,n.normal),x.bufferData(34962,e.normalArray,35048),M.enableAttribute(t.normal),x.vertexAttribPointer(t.normal,3,5126,!1,0,0)),e.hasUvs&&(x.bindBuffer(34962,n.uv),x.bufferData(34962,e.uvArray,35048),M.enableAttribute(t.uv),x.vertexAttribPointer(t.uv,2,5126,!1,0,0)),e.hasColors&&(x.bindBuffer(34962,n.color),x.bufferData(34962,e.colorArray,35048),M.enableAttribute(t.color),x.vertexAttribPointer(t.color,3,5126,!1,0,0)),M.disableUnusedAttributes(),x.drawArrays(4,0,e.count),e.count=0};var ge=new mi;function ye(e,t,n,r){if(!1!==b.isWebGL2||!e.isInstancedMesh&&!t.isInstancedBufferGeometry||null!==w.get("ANGLE_instanced_arrays")){M.initAttributes();var i,a=t.attributes,o=r.getAttributes(),s=n.defaultAttributeValues;for(i in o){var l=o[i];if(0<=l){var u=a[i];if(void 0!==u){var h,c,d,f,p=u.normalized,m=u.itemSize,v=T.get(u);void 0!==v&&(g=v.buffer,y=v.type,h=v.bytesPerElement,u.isInterleavedBufferAttribute?(c=u.data,d=c.stride,f=u.offset,c&&c.isInstancedInterleavedBuffer?(M.enableAttributeAndDivisor(l,c.meshPerAttribute),void 0===t.maxInstancedCount&&(t.maxInstancedCount=c.meshPerAttribute*c.count)):M.enableAttribute(l),x.bindBuffer(34962,g),x.vertexAttribPointer(l,m,y,p,d*h,f*h)):(u.isInstancedBufferAttribute?(M.enableAttributeAndDivisor(l,u.meshPerAttribute),void 0===t.maxInstancedCount&&(t.maxInstancedCount=u.meshPerAttribute*u.count)):M.enableAttribute(l),x.bindBuffer(34962,g),x.vertexAttribPointer(l,m,y,p,0,0)))}else if("instanceMatrix"===i){var g,y,v=T.get(e.instanceMatrix);void 0!==v&&(g=v.buffer,y=v.type,M.enableAttributeAndDivisor(l+0,1),M.enableAttributeAndDivisor(l+1,1),M.enableAttributeAndDivisor(l+2,1),M.enableAttributeAndDivisor(l+3,1),x.bindBuffer(34962,g),x.vertexAttribPointer(l+0,4,y,!1,64,0),x.vertexAttribPointer(l+1,4,y,!1,64,16),x.vertexAttribPointer(l+2,4,y,!1,64,32),x.vertexAttribPointer(l+3,4,y,!1,64,48))}else if(void 0!==s){var _=s[i];if(void 0!==_)switch(_.length){case 2:x.vertexAttrib2fv(l,_);break;case 3:x.vertexAttrib3fv(l,_);break;case 4:x.vertexAttrib4fv(l,_);break;default:x.vertexAttrib1fv(l,_)}}}}M.disableUnusedAttributes()}}this.renderBufferDirect=function(e,t,n,r,i,a){null===t&&(t=ge);var o=i.isMesh&&i.matrixWorld.determinant()<0,s=Se(e,t,r,i);M.setMaterial(r,o);var l=!1;z.geometry===n.id&&z.program===s.id&&z.wireframe===(!0===r.wireframe)||(z.geometry=n.id,z.program=s.id,z.wireframe=!0===r.wireframe,l=!0),(r.morphTargets||r.morphNormals)&&(I.update(i,n,r,s),l=!0);var u=n.index,e=n.attributes.position;if(null===u){if(void 0===e||0===e.count)return}else if(0===u.count)return;t=1,!0===r.wireframe&&(u=d.getWireframeAttribute(n),t=2),o=L,null!==u&&(h=T.get(u),o=R,o.setIndex(h)),l&&(ye(i,n,r,s),null!==u&&x.bindBuffer(34963,h.buffer));var s=(null!==u?u:e).count,h=n.drawRange.start*t,u=n.drawRange.count*t,e=null!==a?a.start*t:0,a=null!==a?a.count*t:Infinity,t=Math.max(h,e),a=Math.min(s,h+u,e+a)-1,a=Math.max(0,a-t+1);0!==a&&(i.isMesh?!0===r.wireframe?(M.setLineWidth(r.wireframeLinewidth*oe()),o.setMode(1)):o.setMode(4):i.isLine?(r=r.linewidth,void 0===r&&(r=1),M.setLineWidth(r*oe()),i.isLineSegments?o.setMode(1):i.isLineLoop?o.setMode(2):o.setMode(3)):i.isPoints?o.setMode(0):i.isSprite&&o.setMode(4),i.isInstancedMesh?o.renderInstances(n,t,a,i.count):n.isInstancedBufferGeometry?o.renderInstances(n,t,a,n.maxInstancedCount):o.render(t,a))},this.compile=function(n,e){m=S.get(n,e),m.init(),n.traverse(function(e){e.isLight&&(m.pushLight(e),e.castShadow&&m.pushShadow(e))}),m.setupLights(e);var r={};n.traverse(function(e){if(e.material)if((0,We.default)(e.material))for(var t=0;t<e.material.length;t++)e.material[t].uuid in r==0&&(Ee(e.material[t],n,e),r[e.material[t].uuid]=!0);else e.material.uuid in r==0&&(Ee(e.material,n,e),r[e.material.uuid]=!0)})};var _e=null;function xe(e){ue.isPresenting||_e&&_e(e)}var we=new Eo;function be(e,t,n,r){if(!1!==e.visible){var i=e.layers.test(t.layers);if(i)if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)m.pushLight(e),e.castShadow&&m.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!ee.intersectsSprite(e)||(r&&ae.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ie),a=y.update(e),o=e.material,o.visible&&f.push(e,a,o,n,ae.z,null));else if(e.isImmediateRenderObject)r&&ae.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ie),f.push(e,null,e.material,n,ae.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==p.render.frame&&(e.skeleton.update(),e.skeleton.frame=p.render.frame),!e.frustumCulled||ee.intersectsObject(e))){r&&ae.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ie);var a=y.update(e),o=e.material;if((0,We.default)(o))for(var s=a.groups,l=0,u=s.length;l<u;l++){var h=s[l],c=o[h.materialIndex];c&&c.visible&&f.push(e,a,c,n,ae.z,h)}else o.visible&&f.push(e,a,o,n,ae.z,null)}for(var d=e.children,l=0,u=d.length;l<u;l++)be(d[l],t,n,r)}}function Me(e,t,n,r){for(var i=0,a=e.length;i<a;i++){var o=e[i],s=o.object,l=o.geometry,u=void 0===r?o.material:r,h=o.group;if(n.isArrayCamera){V=n;for(var c=n.cameras,d=0,f=c.length;d<f;d++){var p=c[d];s.layers.test(p.layers)&&(M.viewport(H.copy(p.viewport)),m.setupLights(p),Te(s,t,p,l,u,h))}}else V=null,Te(s,t,n,l,u,h)}}function Te(e,t,n,r,i,a){var o;e.onBeforeRender(k,t,n,r,i,a),m=S.get(t,V||n),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject?(o=Se(n,t,i,e),M.setMaterial(i),z.geometry=null,z.program=null,z.wireframe=!1,ve(e,o)):k.renderBufferDirect(n,t,r,i,e,a),e.onAfterRender(k,t,n,r,i,a),m=S.get(t,V||n)}function Ee(e,t,n){var r=v.get(e),i=m.state.lights,a=m.state.shadowsArray,o=i.state.version,s=_.getParameters(e,i.state,a,t,te.numPlanes,te.numIntersection,n),l=_.getProgramCacheKey(s),a=r.program,n=!0;if(void 0===a)e.addEventListener("dispose",fe);else if(a.cacheKey!==l)me(e);else if(r.lightsStateVersion!==o)r.lightsStateVersion=o,n=!1;else{if(void 0!==s.shaderID)return;n=!1}n&&(a=_.acquireProgram(s,l),r.program=a,r.uniforms=s.uniforms,r.environment=e.isMeshStandardMaterial?t.environment:null,r.outputEncoding=k.outputEncoding,e.program=a);var u=a.getAttributes();if(e.morphTargets){e.numSupportedMorphTargets=0;for(var h=0;h<k.maxMorphTargets;h++)0<=u["morphTarget"+h]&&e.numSupportedMorphTargets++}if(e.morphNormals)for(e.numSupportedMorphNormals=0,h=0;h<k.maxMorphNormals;h++)0<=u["morphNormal"+h]&&e.numSupportedMorphNormals++;a=r.uniforms,(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(r.numClippingPlanes=te.numPlanes,r.numIntersection=te.numIntersection,a.clippingPlanes=te.uniform),r.fog=t.fog,r.needsLights=He(e),r.lightsStateVersion=o,r.needsLights&&(a.ambientLightColor.value=i.state.ambient,a.lightProbe.value=i.state.probe,a.directionalLights.value=i.state.directional,a.directionalLightShadows.value=i.state.directionalShadow,a.spotLights.value=i.state.spot,a.spotLightShadows.value=i.state.spotShadow,a.rectAreaLights.value=i.state.rectArea,a.pointLights.value=i.state.point,a.pointLightShadows.value=i.state.pointShadow,a.hemisphereLights.value=i.state.hemi,a.directionalShadowMap.value=i.state.directionalShadowMap,a.directionalShadowMatrix.value=i.state.directionalShadowMatrix,a.spotShadowMap.value=i.state.spotShadowMap,a.spotShadowMatrix.value=i.state.spotShadowMatrix,a.pointShadowMap.value=i.state.pointShadowMap,a.pointShadowMatrix.value=i.state.pointShadowMatrix),i=r.program.getUniforms(),a=Mu.seqWithValue(i.seq,a),r.uniformsList=a}function Se(e,t,n,r){g.resetTextureUnits();var i=t.fog,a=n.isMeshStandardMaterial?t.environment:null,o=v.get(n),s=m.state.lights;ne&&(!re&&e===G||(f=e===G&&n.id===U,te.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,e,o,f))),n.version===o.__version?(void 0===o.program||n.fog&&o.fog!==i||o.environment!==a||o.needsLights&&o.lightsStateVersion!==s.state.version||void 0!==o.numClippingPlanes&&(o.numClippingPlanes!==te.numPlanes||o.numIntersection!==te.numIntersection)||o.outputEncoding!==k.outputEncoding)&&Ee(n,t,r):(Ee(n,t,r),o.__version=n.version);var l,u=!1,h=!1,c=!1,d=o.program,f=d.getUniforms(),s=o.uniforms;return M.useProgram(d.program)&&(u=!0,h=!0,c=!0),n.id!==U&&(U=n.id,h=!0),!u&&G===e||(f.setValue(x,"projectionMatrix",e.projectionMatrix),b.logarithmicDepthBuffer&&f.setValue(x,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),G!==e&&(G=e,h=!0,c=!0),(n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap)&&(l=(0,Ye.default)(f).cameraPosition,void 0!==l&&l.setValue(x,ae.setFromMatrixPosition(e.matrixWorld))),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&f.setValue(x,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&f.setValue(x,"viewMatrix",e.matrixWorldInverse)),n.skinning&&(f.setOptional(x,r,"bindMatrix"),f.setOptional(x,r,"bindMatrixInverse"),t=r.skeleton,t&&(u=t.bones,b.floatVertexTextures?(void 0===t.boneTexture&&(l=Math.sqrt(4*u.length),l=Rr.ceilPowerOfTwo(l),l=Math.max(l,4),e=new Float32Array(l*l*4),e.set(t.boneMatrices),u=new xo(e,l,l,kt,Tt),t.boneMatrices=e,t.boneTexture=u,t.boneTextureSize=l),f.setValue(x,"boneTexture",t.boneTexture,g),f.setValue(x,"boneTextureSize",t.boneTextureSize)):f.setOptional(x,t,"boneMatrices"))),!h&&o.receiveShadow===r.receiveShadow||(o.receiveShadow=r.receiveShadow,f.setValue(x,"receiveShadow",r.receiveShadow)),h&&(f.setValue(x,"toneMappingExposure",k.toneMappingExposure),f.setValue(x,"toneMappingWhitePoint",k.toneMappingWhitePoint),o.needsLights&&Ve(s,c),i&&n.fog&&ke(s,i),n.isMeshBasicMaterial?Ae(s,n):n.isMeshLambertMaterial?(Ae(s,n),Pe(s,n)):n.isMeshToonMaterial?(Ae(s,n),De(s,n)):n.isMeshPhongMaterial?(Ae(s,n),Ce(s,n)):n.isMeshStandardMaterial?(Ae(s,n,a),(n.isMeshPhysicalMaterial?Be:Oe)(s,n,a)):n.isMeshMatcapMaterial?(Ae(s,n),Fe(s,n)):n.isMeshDepthMaterial?(Ae(s,n),Ue(s,n)):n.isMeshDistanceMaterial?(Ae(s,n),ze(s,n)):n.isMeshNormalMaterial?(Ae(s,n),Ge(s,n)):n.isLineBasicMaterial?(Ie(s,n),n.isLineDashedMaterial&&Le(s,n)):n.isPointsMaterial?Re(s,n):n.isSpriteMaterial?Ne(s,n):n.isShadowMaterial&&(s.color.value.copy(n.color),s.opacity.value=n.opacity),void 0!==s.ltc_1&&(s.ltc_1.value=To.LTC_1),void 0!==s.ltc_2&&(s.ltc_2.value=To.LTC_2),Mu.upload(x,o.uniformsList,s,g),n.isShaderMaterial&&(n.uniformsNeedUpdate=!1)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(Mu.upload(x,o.uniformsList,s,g),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&f.setValue(x,"center",r.center),f.setValue(x,"modelViewMatrix",r.modelViewMatrix),f.setValue(x,"normalMatrix",r.normalMatrix),f.setValue(x,"modelMatrix",r.matrixWorld),d}function Ae(e,t,n){e.opacity.value=t.opacity,(0,je.default)(e,t.uniforms),t.color&&e.diffuse.value.copy(t.color),t.emissive&&e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity),(0,Ye.default)(t)&&((0,Ye.default)(e).value=(0,Ye.default)(t)),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.specularMap&&(e.specularMap.value=t.specularMap);var r,i,n=t.envMap||n;n&&(e.envMap.value=n,e.flipEnvMap.value=n.isCubeTexture?-1:1,e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio,e.maxMipLevel.value=v.get(n).__maxMipLevel),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.aoMap&&(e.aoMap.value=t.aoMap,e.aoMapIntensity.value=t.aoMapIntensity),(0,Ye.default)(t)?r=(0,Ye.default)(t):t.specularMap?r=t.specularMap:t.displacementMap?r=t.displacementMap:t.normalMap?r=t.normalMap:t.bumpMap?r=t.bumpMap:t.roughnessMap?r=t.roughnessMap:t.metalnessMap?r=t.metalnessMap:t.alphaMap?r=t.alphaMap:t.emissiveMap&&(r=t.emissiveMap),void 0!==r&&(r.isWebGLRenderTarget&&(r=r.texture),!0===r.matrixAutoUpdate&&r.updateMatrix(),e.uvTransform.value.copy(r.matrix)),t.aoMap?i=t.aoMap:t.lightMap&&(i=t.lightMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uv2Transform.value.copy(i.matrix))}function Ie(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}function Le(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function Re(e,t){var n;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*X,e.scale.value=.5*q,(0,Ye.default)(t)&&((0,Ye.default)(e).value=(0,Ye.default)(t)),t.alphaMap&&(e.alphaMap.value=t.alphaMap),(0,Ye.default)(t)?n=(0,Ye.default)(t):t.alphaMap&&(n=t.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}function Ne(e,t){var n;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,(0,Ye.default)(t)&&((0,Ye.default)(e).value=(0,Ye.default)(t)),t.alphaMap&&(e.alphaMap.value=t.alphaMap),(0,Ye.default)(t)?n=(0,Ye.default)(t):t.alphaMap&&(n=t.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}function ke(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)}function Pe(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}function Ce(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Xe&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Xe&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function De(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.gradientMap&&(e.gradientMap.value=t.gradientMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Xe&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Xe&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function Oe(e,t,n){e.roughness.value=t.roughness,e.metalness.value=t.metalness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap),t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Xe&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Xe&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),(t.envMap||n)&&(e.envMapIntensity.value=t.envMapIntensity)}function Be(e,t,n){Oe(e,t,n),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen),t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===Xe&&e.clearcoatNormalScale.value.negate()),e.transparency.value=t.transparency}function Fe(e,t){t.matcap&&(e.matcap.value=t.matcap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Xe&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Xe&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function Ue(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function ze(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}function Ge(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Xe&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Xe&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function Ve(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}function He(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}we.setAnimationLoop(xe),"undefined"!=typeof window&&we.setContext(window),this.setAnimationLoop=function(e){_e=e,ue.setAnimationLoop(e),we.start()},this.render=function(e,t){var n,r,i;void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),r=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),i=arguments[3]),t&&t.isCamera?P||(z.geometry=null,z.program=null,z.wireframe=!1,U=-1,G=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),ue.enabled&&ue.isPresenting&&(t=ue.getCamera(t)),m=S.get(e,t),m.init(),e.onBeforeRender(k,e,t,r||B),ie.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),ee.setFromProjectionMatrix(ie),re=this.localClippingEnabled,ne=te.init(this.clippingPlanes,re,t),f=E.get(e,t),f.init(),be(e,t,0,k.sortObjects),f.finish(),!0===k.sortObjects&&(0,qe.default)(f).call(f,Z,J),ne&&te.beginShadows(),n=m.state.shadowsArray,he.render(n,e,t),m.setupLights(t),ne&&te.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==r&&this.setRenderTarget(r),A.render(f,e,t,i),n=f.opaque,r=f.transparent,e.overrideMaterial?(i=e.overrideMaterial,n.length&&Me(n,e,t,i),r.length&&Me(r,e,t,i)):(n.length&&Me(n,e,t),r.length&&Me(r,e,t)),e.onAfterRender(k,e,t),null!==B&&(g.updateRenderTargetMipmap(B),g.updateMultisampleRenderTarget(B)),M.buffers.depth.setTest(!0),M.buffers.depth.setMask(!0),M.buffers.color.setMask(!0),M.setPolygonOffset(!1),f=null,m=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.setFramebuffer=function(e){C!==e&&null===B&&x.bindFramebuffer(36160,e),C=e},this.getActiveCubeFace=function(){return D},this.getActiveMipmapLevel=function(){return O},this.getRenderTarget=function(){return B},this.setRenderTarget=function(e,t,n){B=e,D=t,O=n,e&&void 0===v.get(e).__webglFramebuffer&&g.setupRenderTarget(e);var r,i=C,a=!1;W=e?(r=v.get(e).__webglFramebuffer,e.isWebGLCubeRenderTarget?(i=r[t||0],a=!0):i=e.isWebGLMultisampleRenderTarget?v.get(e).__webglMultisampledFramebuffer:r,H.copy(e.viewport),j.copy(e.scissor),e.scissorTest):(H.copy(K).multiplyScalar(X).floor(),j.copy(Q).multiplyScalar(X).floor(),$),F!==i&&(x.bindFramebuffer(36160,i),F=i),M.viewport(H),M.scissor(j),M.setScissorTest(W),a&&(e=v.get(e.texture),x.framebufferTexture2D(36160,36064,34069+(t||0),e.__webglTexture,n||0))},this.readRenderTargetPixels=function(e,t,n,r,i,a,o){if(e&&e.isWebGLRenderTarget){var s=v.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(s=s[o]),s){o=!1,s!==F&&(x.bindFramebuffer(36160,s),o=!0);try{var l=e.texture,u=l.format,h=l.type;if(u!==kt&&N.convert(u)!==x.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(h===yt||N.convert(h)===x.getParameter(35738)||h===Tt&&(b.isWebGL2||w.get("OES_texture_float")||w.get("WEBGL_color_buffer_float"))||h===Et&&(b.isWebGL2?w.get("EXT_color_buffer_float"):w.get("EXT_color_buffer_half_float"))))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===x.checkFramebufferStatus(36160)?0<=t&&t<=e.width-r&&0<=n&&n<=e.height-i&&x.readPixels(t,n,r,i,N.convert(u),N.convert(h),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{o&&x.bindFramebuffer(36160,F)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,n){void 0===n&&(n=0);var r=Math.pow(2,-n),i=Math.floor(t.image.width*r),a=Math.floor(t.image.height*r),r=N.convert(t.format);g.setTexture2D(t,0),x.copyTexImage2D(3553,n,r,e.x,e.y,i,a,0),M.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r){var i=t.image.width,a=t.image.height,o=N.convert(n.format),s=N.convert(n.type);g.setTexture2D(n,0),t.isDataTexture?x.texSubImage2D(3553,r||0,e.x,e.y,i,a,o,s,t.image.data):x.texSubImage2D(3553,r||0,e.x,e.y,o,s,t.image),M.unbindTexture()},this.initTexture=function(e){g.setTexture2D(e,0),M.unbindTexture()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Mh(e,t){this.name="",this.color=new aa(e),this.density=void 0!==t?t:25e-5}function Th(e,t,n){this.name="",this.color=new aa(e),this.near=void 0!==t?t:1,this.far=void 0!==n?n:1e3}function Eh(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=gr,this.updateRange={offset:0,count:-1},this.version=0}_h.prototype=(0,je.default)((0,d.default)(mo.prototype),{constructor:_h,isArrayCamera:!0}),xh.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:xh,isGroup:!0}),(0,je.default)(wh.prototype,Sr.prototype),(0,je.default)(Mh.prototype,{isFogExp2:!0,clone:function(){return new Mh(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}),(0,je.default)(Th.prototype,{isFog:!0,clone:function(){return new Th(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}),(0,m.default)(Eh.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),(0,je.default)(Eh.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this},copyAt:function(e,t,n){e*=this.stride,n*=t.stride;for(var r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(e){return this.onUploadCallback=e,this}});var Sh,Ah=new Vr;function Ih(e,t,n,r){this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}function Lh(e){ca.call(this),this.type="SpriteMaterial",this.color=new aa(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}(0,u.default)(Ih.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),(0,je.default)(Ih.prototype,{isInterleavedBufferAttribute:!0,applyMatrix4:function(e){for(var t=0,n=this.data.count;t<n;t++)Ah.x=this.getX(t),Ah.y=this.getY(t),Ah.z=this.getZ(t),Ah.applyMatrix4(e),this.setXYZ(t,Ah.x,Ah.y,Ah.z);return this},setX:function(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this},setY:function(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this},setZ:function(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this},setW:function(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this},getX:function(e){return this.data.array[e*this.data.stride+this.offset]},getY:function(e){return this.data.array[e*this.data.stride+this.offset+1]},getZ:function(e){return this.data.array[e*this.data.stride+this.offset+2]},getW:function(e){return this.data.array[e*this.data.stride+this.offset+3]},setXY:function(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}}),Lh.prototype=(0,d.default)(ca.prototype),Lh.prototype.constructor=Lh,Lh.prototype.isSpriteMaterial=!0,Lh.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.color.copy(e.color),this.map=(0,Ye.default)(e),this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this};var Rh=new Vr,Nh=new Vr,kh=new Vr,Ph=new Nr,Ch=new Nr,Dh=new Jr,Oh=new Vr,Bh=new Vr,Fh=new Vr,Uh=new Nr,zh=new Nr,Gh=new Nr;function Vh(e){var t;pi.call(this),this.type="Sprite",void 0===Sh&&(Sh=new Pa,t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new Eh(t,5),Sh.setIndex([0,1,2,0,2,3]),Sh.setAttribute("position",new Ih(t,3,0,!1)),Sh.setAttribute("uv",new Ih(t,2,3,!1))),this.geometry=Sh,this.material=void 0!==e?e:new Lh,this.center=new Nr(.5,.5)}function Hh(e,t,n,r,i,a){Ph.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(Ch.x=a*Ph.x-i*Ph.y,Ch.y=i*Ph.x+a*Ph.y):Ch.copy(Ph),e.copy(t),e.x+=Ch.x,e.y+=Ch.y,e.applyMatrix4(Dh)}Vh.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:Vh,isSprite:!0,raycast:function(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Nh.setFromMatrixScale(this.matrixWorld),Dh.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),kh.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Nh.multiplyScalar(-kh.z);var n,r,i=this.material.rotation;0!==i&&(r=Math.cos(i),n=Math.sin(i));var a=this.center;Hh(Oh.set(-.5,-.5,0),kh,a,Nh,n,r),Hh(Bh.set(.5,-.5,0),kh,a,Nh,n,r),Hh(Fh.set(.5,.5,0),kh,a,Nh,n,r),Uh.set(0,0),zh.set(1,0),Gh.set(1,1),i=e.ray.intersectTriangle(Oh,Bh,Fh,!1,Rh),null===i&&(Hh(Bh.set(-.5,.5,0),kh,a,Nh,n,r),zh.set(0,1),i=e.ray.intersectTriangle(Oh,Fh,Bh,!1,Rh),null===i)||(i=e.ray.origin.distanceTo(Rh),i<e.near||i>e.far||t.push({distance:i,point:Rh.clone(),uv:ta.getUV(Rh,Oh,Bh,Fh,Uh,zh,Gh,new Nr),face:null,object:this}))},clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return pi.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}});var jh=new Vr,Wh=new Vr;function Yh(){pi.call(this),this._currentLevel=0,this.type="LOD",(0,u.default)(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function qh(e,t){e&&e.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),Ka.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Jr,this.bindMatrixInverse=new Jr}Yh.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:Yh,isLOD:!0,copy:function(e){pi.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,r=t.length;n<r;n++){var i=t[n];this.addLevel(i.object.clone(),i.distance)}return this.autoUpdate=e.autoUpdate,this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);for(var n=this.levels,r=0;r<n.length&&!(t<n[r].distance);r++);return(0,g.default)(n).call(n,r,0,{distance:t,object:e}),this.add(e),this},getCurrentLevel:function(){return this._currentLevel},getObjectForDistance:function(e){var t=this.levels;if(0<t.length){for(var n=1,r=t.length;n<r&&!(e<t[n].distance);n++);return t[n-1].object}return null},raycast:function(e,t){var n=this.levels;0<n.length&&(jh.setFromMatrixPosition(this.matrixWorld),n=e.ray.origin.distanceTo(jh),this.getObjectForDistance(n).raycast(e,t))},update:function(e){var t=this.levels;if(1<t.length){jh.setFromMatrixPosition(e.matrixWorld),Wh.setFromMatrixPosition(this.matrixWorld);var n=jh.distanceTo(Wh)/e.zoom;t[0].object.visible=!0;for(var r=1,i=t.length;r<i&&n>=t[r].distance;r++)t[r-1].object.visible=!1,t[r].object.visible=!0;for(this._currentLevel=r-1;r<i;r++)t[r].object.visible=!1}},toJSON:function(e){var t=pi.prototype.toJSON.call(this,e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var a=n[r];t.object.levels.push({object:a.object.uuid,distance:a.distance})}return t}}),qh.prototype=(0,je.default)((0,d.default)(Ka.prototype),{constructor:qh,isSkinnedMesh:!0,bind:function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.getInverse(t)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){for(var e=new Or,t=this.geometry.attributes.skinWeight,n=0,r=t.count;n<r;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);var i=1/e.manhattanLength();Infinity!==i?e.multiplyScalar(i):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(e){Ka.prototype.updateMatrixWorld.call(this,e),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var Xh=new Jr,Zh=new Jr;function Jh(e,t){if(e=e||[],this.bones=(0,y.default)(e).call(e,0),this.boneMatrices=new Float32Array(16*this.bones.length),this.frame=-1,void 0===t)this.calculateInverses();else if(this.bones.length===t.length)this.boneInverses=(0,y.default)(t).call(t,0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Jr)}}function Kh(){pi.call(this),this.type="Bone"}(0,je.default)(Jh.prototype,{calculateInverses:function(){this.boneInverses=[];for(var e=0,t=this.bones.length;e<t;e++){var n=new Jr;this.bones[e]&&n.getInverse(this.bones[e].matrixWorld),this.boneInverses.push(n)}},pose:function(){for(var e,t=0,n=this.bones.length;t<n;t++)e=this.bones[t],e&&e.matrixWorld.getInverse(this.boneInverses[t]);for(t=0,n=this.bones.length;t<n;t++)e=this.bones[t],e&&(e.parent&&e.parent.isBone?(e.matrix.getInverse(e.parent.matrixWorld),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))},update:function(){for(var e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,a=e.length;i<a;i++){var o=e[i]?e[i].matrixWorld:Zh;Xh.multiplyMatrices(o,t[i]),Xh.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)},clone:function(){return new Jh(this.bones,this.boneInverses)},getBoneByName:function(e){for(var t=0,n=this.bones.length;t<n;t++){var r=this.bones[t];if(r.name===e)return r}},dispose:function(){this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=void 0)}}),Kh.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:Kh,isBone:!0});var Qh=new Jr,$h=new Jr,ec=[],tc=new Ka;function nc(e,t,n){Ka.call(this,e,t),this.instanceMatrix=new pa(new Float32Array(16*n),16),this.count=n,this.frustumCulled=!1}function rc(e){ca.call(this),this.type="LineBasicMaterial",this.color=new aa(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.setValues(e)}nc.prototype=(0,je.default)((0,d.default)(Ka.prototype),{constructor:nc,isInstancedMesh:!0,getMatrixAt:function(e,t){t.fromArray(this.instanceMatrix.array,16*e)},raycast:function(e,t){var n=this.matrixWorld,r=this.count;if(tc.geometry=this.geometry,tc.material=this.material,void 0!==tc.material)for(var i=0;i<r;i++)this.getMatrixAt(i,Qh),$h.multiplyMatrices(n,Qh),tc.matrixWorld=$h,tc.raycast(e,ec),0<ec.length&&(ec[0].instanceId=i,ec[0].object=this,t.push(ec[0]),ec.length=0)},setMatrixAt:function(e,t){t.toArray(this.instanceMatrix.array,16*e)},updateMorphTargets:function(){}}),rc.prototype=(0,d.default)(ca.prototype),rc.prototype.constructor=rc,rc.prototype.isLineBasicMaterial=!0,rc.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this};var ic=new Vr,ac=new Vr,oc=new Jr,sc=new zi,lc=new ki;function uc(e,t,n){1===n&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),pi.call(this),this.type="Line",this.geometry=void 0!==e?e:new Pa,this.material=void 0!==t?t:new rc}uc.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:uc,isLine:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[0],r=1,i=t.count;r<i;r++)ic.fromBufferAttribute(t,r-1),ac.fromBufferAttribute(t,r),n[r]=n[r-1],n[r]+=ic.distanceTo(ac);e.setAttribute("lineDistance",new ba(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry){var a=e.vertices,n=e.lineDistances;for(n[0]=0,r=1,i=a.length;r<i;r++)n[r]=n[r-1],n[r]+=a[r-1].distanceTo(a[r])}return this},raycast:function(e,t){var n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold;if(null===n.boundingSphere&&n.computeBoundingSphere(),lc.copy(n.boundingSphere),lc.applyMatrix4(r),lc.radius+=i,!1!==e.ray.intersectsSphere(lc)){oc.getInverse(r),sc.copy(e.ray).applyMatrix4(oc);var r=i/((this.scale.x+this.scale.y+this.scale.z)/3),a=r*r,o=new Vr,s=new Vr,l=new Vr,u=new Vr,h=this&&this.isLineSegments?2:1;if(n.isBufferGeometry){var i=n.index,r=n.attributes,c=r.position.array;if(null!==i)for(var d=i.array,f=0,p=d.length-1;f<p;f+=h){var m=d[f],v=d[f+1];o.fromArray(c,3*m),s.fromArray(c,3*v);var g=sc.distanceSqToSegment(o,s,u,l);a<g||(u.applyMatrix4(this.matrixWorld),x=e.ray.origin.distanceTo(u),x<e.near||x>e.far||t.push({distance:x,point:l.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}else for(f=0,p=c.length/3-1;f<p;f+=h)o.fromArray(c,3*f),s.fromArray(c,3*f+3),g=sc.distanceSqToSegment(o,s,u,l),a<g||(u.applyMatrix4(this.matrixWorld),x=e.ray.origin.distanceTo(u),x<e.near||x>e.far||t.push({distance:x,point:l.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}else if(n.isGeometry)for(var y=n.vertices,_=y.length,f=0;f<_-1;f+=h){var x,g=sc.distanceSqToSegment(y[f],y[f+1],u,l);a<g||(u.applyMatrix4(this.matrixWorld),x=e.ray.origin.distanceTo(u),x<e.near||x>e.far||t.push({distance:x,point:l.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var hc=new Vr,cc=new Vr;function dc(e,t){uc.call(this,e,t),this.type="LineSegments"}function fc(e,t){uc.call(this,e,t),this.type="LineLoop"}function pc(e){ca.call(this),this.type="PointsMaterial",this.color=new aa(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}dc.prototype=(0,je.default)((0,d.default)(uc.prototype),{constructor:dc,isLineSegments:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[],r=0,i=t.count;r<i;r+=2)hc.fromBufferAttribute(t,r),cc.fromBufferAttribute(t,r+1),n[r]=0===r?0:n[r-1],n[r+1]=n[r]+hc.distanceTo(cc);e.setAttribute("lineDistance",new ba(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry)for(var a=e.vertices,n=e.lineDistances,r=0,i=a.length;r<i;r+=2)hc.copy(a[r]),cc.copy(a[r+1]),n[r]=0===r?0:n[r-1],n[r+1]=n[r]+hc.distanceTo(cc);return this}}),fc.prototype=(0,je.default)((0,d.default)(uc.prototype),{constructor:fc,isLineLoop:!0}),pc.prototype=(0,d.default)(ca.prototype),pc.prototype.constructor=pc,pc.prototype.isPointsMaterial=!0,pc.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.color.copy(e.color),this.map=(0,Ye.default)(e),this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this};var mc=new Jr,vc=new zi,gc=new ki,yc=new Vr;function _c(e,t){pi.call(this),this.type="Points",this.geometry=void 0!==e?e:new Pa,this.material=void 0!==t?t:new pc,this.updateMorphTargets()}function xc(e,t,n,r,i,a,o){var s=vc.distanceSqToPoint(e);s<n&&(n=new Vr,vc.closestPointToPoint(e,n),n.applyMatrix4(r),r=i.ray.origin.distanceTo(n),r<i.near||r>i.far||a.push({distance:r,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,object:o}))}function wc(e,t,n,r,i,a,o,s,l){Dr.call(this,e,t,n,r,i,a,o,s,l),this.format=void 0!==o?o:Nt,this.minFilter=void 0!==a?a:ft,this.magFilter=void 0!==i?i:ft,this.generateMipmaps=!1}function bc(e,t,n,r,i,a,o,s,l,u,h,c){Dr.call(this,null,a,o,s,l,u,r,i,h,c),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function Mc(e,t,n,r,i,a,o,s,l){Dr.call(this,e,t,n,r,i,a,o,s,l),this.needsUpdate=!0}function Tc(e,t,n,r,i,a,o,s,l,u){if(u=void 0!==u?u:Ot,u!==Ot&&u!==Bt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Ot&&(n=wt),void 0===n&&u===Bt&&(n=Lt),Dr.call(this,null,r,i,a,o,s,u,n,l),this.image={width:e,height:t},this.magFilter=void 0!==o?o:lt,this.minFilter=void 0!==s?s:lt,this.flipY=!1,this.generateMipmaps=!1}function Ec(e){Pa.call(this),this.type="WireframeGeometry";var t,n,r,i,a,o,s=[],l=[0,0],u={},h=["a","b","c"];if(e&&e.isGeometry){for(var c=e.faces,d=0,f=c.length;d<f;d++)for(var p=c[d],m=0;m<3;m++)i=p[h[m]],a=p[h[(m+1)%3]],l[0]=Math.min(i,a),l[1]=Math.max(i,a),o=l[0]+","+l[1],void 0===u[o]&&(u[o]={index1:l[0],index2:l[1]});for(o in u)r=u[o],b=e.vertices[r.index1],s.push(b.x,b.y,b.z),b=e.vertices[r.index2],s.push(b.x,b.y,b.z)}else if(e&&e.isBufferGeometry){var v,g,y,_,x,w,b=new Vr;if(null!==e.index){for(v=e.attributes.position,g=e.index,y=e.groups,0===y.length&&(y=[{start:0,count:g.count,materialIndex:0}]),t=0,n=y.length;t<n;++t)for(x=y[t],_=x.start,x=x.count,d=_,f=_+x;d<f;d+=3)for(m=0;m<3;m++)i=g.getX(d+m),a=g.getX(d+(m+1)%3),l[0]=Math.min(i,a),l[1]=Math.max(i,a),o=l[0]+","+l[1],void 0===u[o]&&(u[o]={index1:l[0],index2:l[1]});for(o in u)r=u[o],b.fromBufferAttribute(v,r.index1),s.push(b.x,b.y,b.z),b.fromBufferAttribute(v,r.index2),s.push(b.x,b.y,b.z)}else for(v=e.attributes.position,d=0,f=v.count/3;d<f;d++)for(m=0;m<3;m++)w=3*d+m,b.fromBufferAttribute(v,w),s.push(b.x,b.y,b.z),w=3*d+(m+1)%3,b.fromBufferAttribute(v,w),s.push(b.x,b.y,b.z)}this.setAttribute("position",new ba(s,3))}function Sc(e,t,n){io.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n},this.fromBufferGeometry(new Ac(e,t,n)),this.mergeVertices()}function Ac(e,t,n){Pa.call(this),this.type="ParametricBufferGeometry",this.parameters={func:e,slices:t,stacks:n};var r=[],i=[],a=[],o=[],s=1e-5,l=new Vr,u=new Vr,h=new Vr,c=new Vr,d=new Vr;e.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");for(var f=t+1,p=0;p<=n;p++)for(var m=p/n,v=0;v<=t;v++){var g=v/t;e(g,m,u),i.push(u.x,u.y,u.z),0<=g-s?(e(g-s,m,h),c.subVectors(u,h)):(e(g+s,m,h),c.subVectors(h,u)),0<=m-s?(e(g,m-s,h),d.subVectors(u,h)):(e(g,m+s,h),d.subVectors(h,u)),l.crossVectors(c,d).normalize(),a.push(l.x,l.y,l.z),o.push(g,m)}for(p=0;p<n;p++)for(v=0;v<t;v++){var y=p*f+v,_=p*f+v+1,x=(p+1)*f+v+1,w=(p+1)*f+v;r.push(y,_,w),r.push(_,x,w)}this.setIndex(r),this.setAttribute("position",new ba(i,3)),this.setAttribute("normal",new ba(a,3)),this.setAttribute("uv",new ba(o,2))}function Ic(e,t,n,r){io.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r},this.fromBufferGeometry(new Lc(e,t,n,r)),this.mergeVertices()}function Lc(n,a,e,t){Pa.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:n,indices:a,radius:e,detail:t},e=e||1,t=t||0;var h=[],c=[];function r(e){for(var t=new Vr,n=new Vr,r=new Vr,i=0;i<a.length;i+=3)u(a[i+0],t),u(a[i+1],n),u(a[i+2],r),o(t,n,r,e)}function o(e,t,n,r){for(var i=Math.pow(2,r),a=[],o=0;o<=i;o++){a[o]=[];for(var s=e.clone().lerp(n,o/i),l=t.clone().lerp(n,o/i),u=i-o,h=0;h<=u;h++)a[o][h]=0===h&&o===i?s:s.clone().lerp(l,h/u)}for(o=0;o<i;o++)for(h=0;h<2*(i-o)-1;h++){var c=Math.floor(h/2);h%2==0?(d(a[o][c+1]),d(a[o+1][c]),d(a[o][c])):(d(a[o][c+1]),d(a[o+1][c+1]),d(a[o+1][c]))}}function i(e){for(var t=new Vr,n=0;n<h.length;n+=3)t.x=h[n+0],t.y=h[n+1],t.z=h[n+2],t.normalize().multiplyScalar(e),h[n+0]=t.x,h[n+1]=t.y,h[n+2]=t.z}function s(){for(var e=new Vr,t=0;t<h.length;t+=3){e.x=h[t+0],e.y=h[t+1],e.z=h[t+2];var n=m(e)/2/Math.PI+.5,r=v(e)/Math.PI+.5;c.push(n,1-r)}f(),l()}function l(){for(var e=0;e<c.length;e+=6){var t=c[e+0],n=c[e+2],r=c[e+4],i=Math.max(t,n,r),a=Math.min(t,n,r);.9<i&&a<.1&&(t<.2&&(c[e+0]+=1),n<.2&&(c[e+2]+=1),r<.2&&(c[e+4]+=1))}}function d(e){h.push(e.x,e.y,e.z)}function u(e,t){e*=3,t.x=n[e+0],t.y=n[e+1],t.z=n[e+2]}function f(){for(var e=new Vr,t=new Vr,n=new Vr,r=new Vr,i=new Nr,a=new Nr,o=new Nr,s=0,l=0;s<h.length;s+=9,l+=6){e.set(h[s+0],h[s+1],h[s+2]),t.set(h[s+3],h[s+4],h[s+5]),n.set(h[s+6],h[s+7],h[s+8]),i.set(c[l+0],c[l+1]),a.set(c[l+2],c[l+3]),o.set(c[l+4],c[l+5]),r.copy(e).add(t).add(n).divideScalar(3);var u=m(r);p(i,l+0,e,u),p(a,l+2,t,u),p(o,l+4,n,u)}}function p(e,t,n,r){r<0&&1===e.x&&(c[t]=e.x-1),0===n.x&&0===n.z&&(c[t]=r/2/Math.PI+.5)}function m(e){return Math.atan2(e.z,-e.x)}function v(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}r(t),i(e),s(),this.setAttribute("position",new ba(h,3)),this.setAttribute("normal",new ba((0,y.default)(h).call(h),3)),this.setAttribute("uv",new ba(c,2)),0===t?this.computeVertexNormals():this.normalizeNormals()}function Rc(e,t){io.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Nc(e,t)),this.mergeVertices()}function Nc(e,t){var n=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],r=[2,1,0,0,3,2,1,3,0,2,3,1];Lc.call(this,n,r,e,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:e,detail:t}}function kc(e,t){io.call(this),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Pc(e,t)),this.mergeVertices()}function Pc(e,t){var n=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],r=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];Lc.call(this,n,r,e,t),this.type="OctahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Cc(e,t){io.call(this),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Dc(e,t)),this.mergeVertices()}function Dc(e,t){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],n=[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];Lc.call(this,r,n,e,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Oc(e,t){io.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Bc(e,t)),this.mergeVertices()}function Bc(e,t){var n=(1+Math.sqrt(5))/2,r=1/n,n=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],r=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];Lc.call(this,n,r,e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Fc(e,t,n,r,i,a){io.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i},void 0!==a&&console.warn("THREE.TubeGeometry: taper has been removed."),i=new Uc(e,t,n,r,i),this.tangents=i.tangents,this.normals=i.normals,this.binormals=i.binormals,this.fromBufferGeometry(i),this.mergeVertices()}function Uc(a,o,s,l,e){Pa.call(this),this.type="TubeBufferGeometry",this.parameters={path:a,tubularSegments:o,radius:s,radialSegments:l,closed:e},o=o||64,s=s||1,l=l||8,e=e||!1;var u=a.computeFrenetFrames(o,e);this.tangents=u.tangents,this.normals=u.normals,this.binormals=u.binormals;var i,h,c=new Vr,d=new Vr,t=new Nr,f=new Vr,p=[],m=[],n=[],v=[];function r(){for(i=0;i<o;i++)g(i);g(!1===e?o:0),_(),y()}function g(e){f=a.getPointAt(e/o,f);var t=u.normals[e],n=u.binormals[e];for(h=0;h<=l;h++){var r=h/l*Math.PI*2,i=Math.sin(r),r=-Math.cos(r);d.x=r*t.x+i*n.x,d.y=r*t.y+i*n.y,d.z=r*t.z+i*n.z,d.normalize(),m.push(d.x,d.y,d.z),c.x=f.x+s*d.x,c.y=f.y+s*d.y,c.z=f.z+s*d.z,p.push(c.x,c.y,c.z)}}function y(){for(h=1;h<=o;h++)for(i=1;i<=l;i++){var e=(l+1)*(h-1)+(i-1),t=(l+1)*h+(i-1),n=(l+1)*h+i,r=(l+1)*(h-1)+i;v.push(e,t,r),v.push(t,n,r)}}function _(){for(i=0;i<=o;i++)for(h=0;h<=l;h++)t.x=i/o,t.y=h/l,n.push(t.x,t.y)}r(),this.setIndex(v),this.setAttribute("position",new ba(p,3)),this.setAttribute("normal",new ba(m,3)),this.setAttribute("uv",new ba(n,2))}function zc(e,t,n,r,i,a,o){io.call(this),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:a},void 0!==o&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new Gc(e,t,n,r,i,a)),this.mergeVertices()}function Gc(e,t,n,r,i,a){Pa.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:a},e=e||1,t=t||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,a=a||3;for(var o,s=[],l=[],u=[],h=[],c=new Vr,d=new Vr,f=new Vr,p=new Vr,m=new Vr,v=new Vr,g=new Vr,y=0;y<=n;++y){var _=y/n*i*Math.PI*2;for(S(_,i,a,e,f),S(_+.01,i,a,e,p),v.subVectors(p,f),g.addVectors(p,f),m.crossVectors(v,g),g.crossVectors(m,v),m.normalize(),g.normalize(),o=0;o<=r;++o){var x=o/r*Math.PI*2,w=-t*Math.cos(x),x=t*Math.sin(x);c.x=f.x+(w*g.x+x*m.x),c.y=f.y+(w*g.y+x*m.y),c.z=f.z+(w*g.z+x*m.z),l.push(c.x,c.y,c.z),d.subVectors(c,f).normalize(),u.push(d.x,d.y,d.z),h.push(y/n),h.push(o/r)}}for(o=1;o<=n;o++)for(y=1;y<=r;y++){var b=(r+1)*(o-1)+(y-1),M=(r+1)*o+(y-1),T=(r+1)*o+y,E=(r+1)*(o-1)+y;s.push(b,M,E),s.push(M,T,E)}function S(e,t,n,r,i){var a=Math.cos(e),o=Math.sin(e),t=n/t*e,e=Math.cos(t);i.x=r*(2+e)*.5*a,i.y=r*(2+e)*o*.5,i.z=r*Math.sin(t)*.5}this.setIndex(s),this.setAttribute("position",new ba(l,3)),this.setAttribute("normal",new ba(u,3)),this.setAttribute("uv",new ba(h,2))}function Vc(e,t,n,r,i){io.call(this),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Hc(e,t,n,r,i)),this.mergeVertices()}function Hc(e,t,n,r,i){Pa.call(this),this.type="TorusBufferGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},e=e||1,t=t||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;for(var a,o=[],s=[],l=[],u=[],h=new Vr,c=new Vr,d=new Vr,f=0;f<=n;f++)for(a=0;a<=r;a++){var p=a/r*i,m=f/n*Math.PI*2;c.x=(e+t*Math.cos(m))*Math.cos(p),c.y=(e+t*Math.cos(m))*Math.sin(p),c.z=t*Math.sin(m),s.push(c.x,c.y,c.z),h.x=e*Math.cos(p),h.y=e*Math.sin(p),d.subVectors(c,h).normalize(),l.push(d.x,d.y,d.z),u.push(a/r),u.push(f/n)}for(f=1;f<=n;f++)for(a=1;a<=r;a++){var v=(r+1)*f+a-1,g=(r+1)*(f-1)+a-1,y=(r+1)*(f-1)+a,_=(r+1)*f+a;o.push(v,g,_),o.push(g,y,_)}this.setIndex(o),this.setAttribute("position",new ba(s,3)),this.setAttribute("normal",new ba(l,3)),this.setAttribute("uv",new ba(u,2))}_c.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:_c,isPoints:!0,raycast:function(e,t){var n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold;if(null===n.boundingSphere&&n.computeBoundingSphere(),gc.copy(n.boundingSphere),gc.applyMatrix4(r),gc.radius+=i,!1!==e.ray.intersectsSphere(gc)){mc.getInverse(r),vc.copy(e.ray).applyMatrix4(mc);var a=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=a*a;if(n.isBufferGeometry){var i=n.index,a=n.attributes,s=a.position.array;if(null!==i)for(var l=i.array,u=0,h=l.length;u<h;u++){var c=l[u];yc.fromArray(s,3*c),xc(yc,c,o,r,e,t,this)}else for(var u=0,d=s.length/3;u<d;u++)yc.fromArray(s,3*u),xc(yc,u,o,r,e,t,this)}else for(var f=n.vertices,u=0,d=f.length;u<d;u++)xc(f[u],u,o,r,e,t,this)}},updateMorphTargets:function(){var e,t,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,a=(0,x.default)(i);if(0<a.length){var o=i[a[0]];if(void 0!==o)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=o.length;e<t;e++)n=o[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}else r=r.morphTargets,void 0!==r&&0<r.length&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),wc.prototype=(0,je.default)((0,d.default)(Dr.prototype),{constructor:wc,isVideoTexture:!0,update:function(){var e=this.image;e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),bc.prototype=(0,d.default)(Dr.prototype),bc.prototype.constructor=bc,bc.prototype.isCompressedTexture=!0,Mc.prototype=(0,d.default)(Dr.prototype),Mc.prototype.constructor=Mc,Mc.prototype.isCanvasTexture=!0,Tc.prototype=(0,d.default)(Dr.prototype),Tc.prototype.constructor=Tc,Tc.prototype.isDepthTexture=!0,Ec.prototype=(0,d.default)(Pa.prototype),Ec.prototype.constructor=Ec,Sc.prototype=(0,d.default)(io.prototype),Sc.prototype.constructor=Sc,Ac.prototype=(0,d.default)(Pa.prototype),Ac.prototype.constructor=Ac,Ic.prototype=(0,d.default)(io.prototype),Ic.prototype.constructor=Ic,Lc.prototype=(0,d.default)(Pa.prototype),Lc.prototype.constructor=Lc,Rc.prototype=(0,d.default)(io.prototype),Rc.prototype.constructor=Rc,Nc.prototype=(0,d.default)(Lc.prototype),Nc.prototype.constructor=Nc,kc.prototype=(0,d.default)(io.prototype),kc.prototype.constructor=kc,Pc.prototype=(0,d.default)(Lc.prototype),Pc.prototype.constructor=Pc,Cc.prototype=(0,d.default)(io.prototype),Cc.prototype.constructor=Cc,Dc.prototype=(0,d.default)(Lc.prototype),Dc.prototype.constructor=Dc,Oc.prototype=(0,d.default)(io.prototype),Oc.prototype.constructor=Oc,Bc.prototype=(0,d.default)(Lc.prototype),Bc.prototype.constructor=Bc,Fc.prototype=(0,d.default)(io.prototype),Fc.prototype.constructor=Fc,Uc.prototype=(0,d.default)(Pa.prototype),Uc.prototype.constructor=Uc,Uc.prototype.toJSON=function(){var e=Pa.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},zc.prototype=(0,d.default)(io.prototype),zc.prototype.constructor=zc,Gc.prototype=(0,d.default)(Pa.prototype),Gc.prototype.constructor=Gc,Vc.prototype=(0,d.default)(io.prototype),Vc.prototype.constructor=Vc,Hc.prototype=(0,d.default)(Pa.prototype),Hc.prototype.constructor=Hc;var jc={triangulate:function(e,t,n){n=n||2;var r,i,a,o,s,l=t&&t.length,u=l?t[0]*n:e.length,h=Wc(e,0,u,n,!0),c=[];if(!h||h.next===h.prev)return c;if(l&&(h=Qc(e,t,h,n)),e.length>80*n){for(var d=r=e[0],f=i=e[1],p=n;p<u;p+=n)a=e[p],o=e[p+1],a<d&&(d=a),o<f&&(f=o),r<a&&(r=a),i<o&&(i=o);s=Math.max(r-d,i-f),s=0!==s?1/s:0}return qc(h,c,n,d,f,s),c}};function Wc(e,t,n,r,i){var a,o;if(i===0<yd(e,t,n,r))for(a=t;a<n;a+=r)o=md(a,e[a],e[a+1],o);else for(a=n-r;t<=a;a-=r)o=md(a,e[a],e[a+1],o);return o&&ud(o,o.next)&&(vd(o),o=o.next),o}function Yc(e,t){if(!e)return e;t=t||e;var n,r=e;do{if(n=!1,r.steiner||!ud(r,r.next)&&0!==ld(r.prev,r,r.next))r=r.next;else{if(vd(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function qc(e,t,n,r,i,a,o){if(e){!o&&a&&nd(e,r,i,a);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,a?Zc(e,r,i,a):Xc(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),vd(e),e=l.next,u=l.next;else if(e=l,e===u){o?1===o?(e=Jc(e,t,n),qc(e,t,n,r,i,a,2)):2===o&&Kc(e,t,n,r,i,a):qc(Yc(e),t,n,r,i,a,1);break}}}function Xc(e){var t=e.prev,n=e,r=e.next;if(0<=ld(t,n,r))return!1;for(var i=e.next.next;i!==e.prev;){if(od(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&0<=ld(i.prev,i,i.next))return!1;i=i.next}return!0}function Zc(e,t,n,r){var i=e.prev,a=e,o=e.next;if(0<=ld(i,a,o))return!1;for(var s=(i.x<a.x?i.x<o.x?i:o:a.x<o.x?a:o).x,l=(i.y<a.y?i.y<o.y?i:o:a.y<o.y?a:o).y,u=(i.x>a.x?i.x>o.x?i:o:a.x>o.x?a:o).x,h=(i.y>a.y?i.y>o.y?i:o:a.y>o.y?a:o).y,c=id(s,l,t,n,r),d=id(u,h,t,n,r),f=e.prevZ,p=e.nextZ;f&&f.z>=c&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&od(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=ld(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&od(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=ld(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==e.prev&&f!==e.next&&od(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=ld(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&od(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=ld(p.prev,p,p.next))return!1;p=p.nextZ}return!0}function Jc(e,t,n){var r=e;do{var i=r.prev,a=r.next.next}while(!ud(i,a)&&hd(i,r,r.next,a)&&dd(i,a)&&dd(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),vd(r),vd(r.next),r=e=a),r=r.next,r!==e);return r}function Kc(e,t,n,r,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&sd(o,s)){var l=pd(o,s),o=Yc(o,o.next),l=Yc(l,l.next);return qc(o,t,n,r,i,a),void qc(l,t,n,r,i,a)}s=s.next}}while(o=o.next,o!==e)}function Qc(e,t,n,r){for(var i,a,o=[],s=0,l=t.length;s<l;s++)i=t[s]*r,a=s<l-1?t[s+1]*r:e.length,a=Wc(e,i,a,r,!1),a===a.next&&(a.steiner=!0),o.push(ad(a));for((0,qe.default)(o).call(o,$c),s=0;s<o.length;s++)ed(o[s],n),n=Yc(n,n.next);return n}function $c(e,t){return e.x-t.x}function ed(e,t){t=td(e,t),t&&(e=pd(t,e),Yc(e,e.next))}function td(e,t){var n,r=t,i=e.x,a=e.y,o=-Infinity;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&o<s){if(o=s,s===i){if(a===r.y)return r;if(a===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}}while(r=r.next,r!==t);if(!n)return null;if(i===o)return n.prev;for(var l,u=n,h=n.x,c=n.y,d=Infinity,r=n.next;r!==u;)i>=r.x&&r.x>=h&&i!==r.x&&od(a<c?i:o,a,h,c,a<c?o:i,a,r.x,r.y)&&(l=Math.abs(a-r.y)/(i-r.x),(l<d||l===d&&r.x>n.x)&&dd(r,e)&&(n=r,d=l)),r=r.next;return n}function nd(e,t,n,r){for(var i=e;null===i.z&&(i.z=id(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next,i!==e;);i.prevZ.nextZ=null,i.prevZ=null,rd(i)}function rd(e){var t,n,r,i,a,o,s,l,u=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t<u&&(s++,r=r.nextZ,r);t++);for(l=u;0<s||0<l&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}}while(a.nextZ=null,u*=2,1<o);return e}function id(e,t,n,r,i){return e=32767*(e-n)*i,t=32767*(t-r)*i,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1}function ad(e){for(var t=e,n=e;(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next,t!==e;);return n}function od(e,t,n,r,i,a,o,s){return 0<=(i-o)*(t-s)-(e-o)*(a-s)&&0<=(e-o)*(r-s)-(n-o)*(t-s)&&0<=(n-o)*(a-s)-(i-o)*(r-s)}function sd(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!cd(e,t)&&dd(e,t)&&dd(t,e)&&fd(e,t)}function ld(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function ud(e,t){return e.x===t.x&&e.y===t.y}function hd(e,t,n,r){return!!(ud(e,n)&&ud(t,r)||ud(e,r)&&ud(n,t))||0<ld(e,t,n)!=0<ld(e,t,r)&&0<ld(n,r,e)!=0<ld(n,r,t)}function cd(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&hd(n,n.next,e,t))return!0}while(n=n.next,n!==e);return!1}function dd(e,t){return ld(e.prev,e,e.next)<0?0<=ld(e,t,e.next)&&0<=ld(e,e.prev,t):ld(e,t,e.prev)<0||ld(e,e.next,t)<0}function fd(e,t){for(var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next,n!==e;);return r}function pd(e,t){var n=new gd(e.i,e.x,e.y),r=new gd(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function md(e,t,n,r){return n=new gd(e,t,n),r?(n.next=r.next,n.prev=r,r.next.prev=n,r.next=n):(n.prev=n,n.next=n),n}function vd(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function gd(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function yd(e,t,n,r){for(var i=0,a=t,o=n-r;a<n;a+=r)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}var _d={area:function(e){for(var t=e.length,n=0,r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n},isClockWise:function(e){return _d.area(e)<0},triangulateShape:function(e,t){var n=[],r=[],i=[];xd(e),wd(n,e);var a=e.length;(0,A.default)(t).call(t,xd);for(var o=0;o<t.length;o++)r.push(a),a+=t[o].length,wd(n,t[o]);for(var s=jc.triangulate(n,r),o=0;o<s.length;o+=3)i.push((0,y.default)(s).call(s,o,o+3));return i}};function xd(e){var t=e.length;2<t&&e[t-1].equals(e[0])&&e.pop()}function wd(e,t){for(var n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}function bd(e,t){io.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},this.fromBufferGeometry(new Md(e,t)),this.mergeVertices()}function Md(e,Q){Pa.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:e,options:Q},e=(0,We.default)(e)?e:[e];for(var $=this,ee=[],te=[],t=0,n=e.length;t<n;t++){var r=e[t];i(r)}function i(e){var r=[],t=void 0!==Q.curveSegments?Q.curveSegments:12,h=void 0!==Q.steps?Q.steps:1,n=void 0!==Q.depth?Q.depth:100,i=void 0===Q.bevelEnabled||Q.bevelEnabled,a=void 0!==Q.bevelThickness?Q.bevelThickness:6,o=void 0!==Q.bevelSize?Q.bevelSize:a-2,s=void 0!==Q.bevelOffset?Q.bevelOffset:0,c=void 0!==Q.bevelSegments?Q.bevelSegments:3,l=Q.extrudePath,u=void 0!==Q.UVGenerator?Q.UVGenerator:Td;void 0!==Q.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),n=Q.amount);var d,f,p,m,v,g,y=!1;l&&(d=l.getSpacedPoints(h),y=!0,i=!1,f=l.computeFrenetFrames(h,!1),p=new Vr,m=new Vr,v=new Vr),i||(c=0,a=0,o=0,s=0);var t=e.extractPoints(t),_=t.shape,x=t.holes,t=!_d.isClockWise(_);if(t)for(_=(0,ae.default)(_).call(_),M=0,T=x.length;M<T;M++)g=x[M],_d.isClockWise(g)&&(x[M]=(0,ae.default)(g).call(g));for(var w=_d.triangulateShape(_,x),b=_,M=0,T=x.length;M<T;M++)g=x[M],_=(0,oe.default)(_).call(_,g);function E(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}var S,A,I,L,R,N,k=_.length,P=w.length;function C(e,t,n){var r=e.x-t.x,i=e.y-t.y,a=n.x-e.x,o=n.y-e.y,s=r*r+i*i,l=r*o-i*a;if(Math.abs(l)>ne.default){var u=Math.sqrt(s),h=Math.sqrt(a*a+o*o),c=t.x-i/u,d=t.y+r/u,u=n.x-o/h,h=n.y+a/h,u=((u-c)*o-(h-d)*a)/(r*o-i*a),h=c+r*u-e.x,c=d+i*u-e.y,d=h*h+c*c;if(d<=2)return new Nr(h,c);u=Math.sqrt(d/2)}else d=!1,r>ne.default?a>ne.default&&(d=!0):r<-ne.default?a<-ne.default&&(d=!0):(0,re.default)(i)===(0,re.default)(o)&&(d=!0),u=d?(h=-i,c=r,Math.sqrt(s)):(h=r,c=i,Math.sqrt(s/2));return new Nr(h/u,c/u)}for(var D=[],O=0,B=b.length,F=B-1,U=O+1;O<B;O++,F++,U++)F===B&&(F=0),U===B&&(U=0),D[O]=C(b[O],b[F],b[U]);for(var z,G,V=[],H=(0,oe.default)(D).call(D),M=0,T=x.length;M<T;M++){for(g=x[M],z=[],O=0,B=g.length,F=B-1,U=O+1;O<B;O++,F++,U++)F===B&&(F=0),U===B&&(U=0),z[O]=C(g[O],g[F],g[U]);V.push(z),H=(0,oe.default)(H).call(H,z)}for(S=0;S<c;S++){for(I=S/c,L=a*Math.cos(I*Math.PI/2),A=o*Math.sin(I*Math.PI/2)+s,O=0,B=b.length;O<B;O++)R=E(b[O],D[O],A),q(R.x,R.y,-L);for(M=0,T=x.length;M<T;M++)for(g=x[M],z=V[M],O=0,B=g.length;O<B;O++)R=E(g[O],z[O],A),q(R.x,R.y,-L)}for(A=o+s,O=0;O<k;O++)R=i?E(_[O],H[O],A):_[O],y?(m.copy(f.normals[0]).multiplyScalar(R.x),p.copy(f.binormals[0]).multiplyScalar(R.y),v.copy(d[0]).add(m).add(p),q(v.x,v.y,v.z)):q(R.x,R.y,0);for(G=1;G<=h;G++)for(O=0;O<k;O++)R=i?E(_[O],H[O],A):_[O],y?(m.copy(f.normals[G]).multiplyScalar(R.x),p.copy(f.binormals[G]).multiplyScalar(R.y),v.copy(d[G]).add(m).add(p),q(v.x,v.y,v.z)):q(R.x,R.y,n/h*G);for(S=c-1;0<=S;S--){for(I=S/c,L=a*Math.cos(I*Math.PI/2),A=o*Math.sin(I*Math.PI/2)+s,O=0,B=b.length;O<B;O++)R=E(b[O],D[O],A),q(R.x,R.y,n+L);for(M=0,T=x.length;M<T;M++)for(g=x[M],z=V[M],O=0,B=g.length;O<B;O++)R=E(g[O],z[O],A),y?q(R.x,R.y+d[h-1].y,d[h-1].x+L):q(R.x,R.y,n+L)}function j(){var e=ee.length/3;if(i){var t=0,n=k*t;for(O=0;O<P;O++)N=w[O],X(N[2]+n,N[1]+n,N[0]+n);for(t=h+2*c,n=k*t,O=0;O<P;O++)N=w[O],X(N[0]+n,N[1]+n,N[2]+n)}else{for(O=0;O<P;O++)N=w[O],X(N[2],N[1],N[0]);for(O=0;O<P;O++)N=w[O],X(N[0]+k*h,N[1]+k*h,N[2]+k*h)}$.addGroup(e,ee.length/3-e,0)}function W(){var e=ee.length/3,t=0;for(Y(b,t),t+=b.length,M=0,T=x.length;M<T;M++)g=x[M],Y(g,t),t+=g.length;$.addGroup(e,ee.length/3-e,1)}function Y(e,t){var n,r;for(O=e.length;0<=--O;){n=O,r=O-1,r<0&&(r=e.length-1);for(var i=0,a=h+2*c,i=0;i<a;i++){var o=k*i,s=k*(i+1),l=t+n+o,u=t+r+o,o=t+r+s,s=t+n+s;Z(l,u,o,s)}}}function q(e,t,n){r.push(e),r.push(t),r.push(n)}function X(e,t,n){J(e),J(t),J(n),n=ee.length/3,n=u.generateTopUV($,ee,n-3,n-2,n-1),K(n[0]),K(n[1]),K(n[2])}function Z(e,t,n,r){J(e),J(t),J(r),J(t),J(n),J(r),r=ee.length/3,r=u.generateSideWallUV($,ee,r-6,r-3,r-2,r-1),K(r[0]),K(r[1]),K(r[3]),K(r[1]),K(r[2]),K(r[3])}function J(e){ee.push(r[3*e+0]),ee.push(r[3*e+1]),ee.push(r[3*e+2])}function K(e){te.push(e.x),te.push(e.y)}j(),W()}this.setAttribute("position",new ba(ee,3)),this.setAttribute("uv",new ba(te,2)),this.computeVertexNormals()}t.ShapeUtils=_d,bd.prototype=(0,d.default)(io.prototype),bd.prototype.constructor=bd,bd.prototype.toJSON=function(){var e=io.prototype.toJSON.call(this),t=this.parameters.shapes,n=this.parameters.options;return Ed(t,n,e)},Md.prototype=(0,d.default)(Pa.prototype),Md.prototype.constructor=Md,Md.prototype.toJSON=function(){var e=Pa.prototype.toJSON.call(this),t=this.parameters.shapes,n=this.parameters.options;return Ed(t,n,e)};var Td={generateTopUV:function(e,t,n,r,i){var a=t[3*n],o=t[3*n+1],s=t[3*r],n=t[3*r+1],r=t[3*i],i=t[3*i+1];return[new Nr(a,o),new Nr(s,n),new Nr(r,i)]},generateSideWallUV:function(e,t,n,r,i,a){var o=t[3*n],s=t[3*n+1],l=t[3*n+2],u=t[3*r],h=t[3*r+1],c=t[3*r+2],d=t[3*i],f=t[3*i+1],n=t[3*i+2],r=t[3*a],i=t[3*a+1],a=t[3*a+2];return Math.abs(s-h)<.01?[new Nr(o,1-l),new Nr(u,1-c),new Nr(d,1-n),new Nr(r,1-a)]:[new Nr(s,1-l),new Nr(h,1-c),new Nr(f,1-n),new Nr(i,1-a)]}};function Ed(e,t,n){if(n.shapes=[],(0,We.default)(e))for(var r=0,i=e.length;r<i;r++){var a=e[r];n.shapes.push(a.uuid)}else n.shapes.push(e.uuid);return void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON()),n}function Sd(e,t){io.call(this),this.type="TextGeometry",this.parameters={text:e,parameters:t},this.fromBufferGeometry(new Ad(e,t)),this.mergeVertices()}function Ad(e,t){t=t||{};var n=t.font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new io;e=n.generateShapes(e,t.size),t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),Md.call(this,e,t),this.type="TextBufferGeometry"}function Id(e,t,n,r,i,a,o){io.call(this),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:a,thetaLength:o},this.fromBufferGeometry(new Ld(e,t,n,r,i,a,o)),this.mergeVertices()}function Ld(e,t,n,r,i,a,o){Pa.call(this),this.type="SphereBufferGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:a,thetaLength:o},e=e||1,t=Math.max(3,Math.floor(t)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI,a=void 0!==a?a:0,o=void 0!==o?o:Math.PI;for(var s,l=Math.min(a+o,Math.PI),u=0,h=[],c=new Vr,d=new Vr,f=[],p=[],m=[],v=[],g=0;g<=n;g++){var y=[],_=g/n,x=0;for(0==g&&0==a?x=.5/t:g==n&&l==Math.PI&&(x=-.5/t),s=0;s<=t;s++){var w=s/t;c.x=-e*Math.cos(r+w*i)*Math.sin(a+_*o),c.y=e*Math.cos(a+_*o),c.z=e*Math.sin(r+w*i)*Math.sin(a+_*o),p.push(c.x,c.y,c.z),d.copy(c).normalize(),m.push(d.x,d.y,d.z),v.push(w+x,1-_),y.push(u++)}h.push(y)}for(g=0;g<n;g++)for(s=0;s<t;s++){var b=h[g][s+1],M=h[g][s],T=h[g+1][s],E=h[g+1][s+1];(0!==g||0<a)&&f.push(b,M,E),(g!==n-1||l<Math.PI)&&f.push(M,T,E)}this.setIndex(f),this.setAttribute("position",new ba(p,3)),this.setAttribute("normal",new ba(m,3)),this.setAttribute("uv",new ba(v,2))}function Rd(e,t,n,r,i,a){io.call(this),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:a},this.fromBufferGeometry(new Nd(e,t,n,r,i,a)),this.mergeVertices()}function Nd(e,t,n,r,i,a){Pa.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:a},e=e||.5,t=t||1,i=void 0!==i?i:0,a=void 0!==a?a:2*Math.PI,n=void 0!==n?Math.max(3,n):8,r=void 0!==r?Math.max(1,r):1;for(var o=[],s=[],l=[],u=[],h=e,c=(t-e)/r,d=new Vr,f=new Nr,p=0;p<=r;p++){for(v=0;v<=n;v++)g=i+v/n*a,d.x=h*Math.cos(g),d.y=h*Math.sin(g),s.push(d.x,d.y,d.z),l.push(0,0,1),f.x=(d.x/t+1)/2,f.y=(d.y/t+1)/2,u.push(f.x,f.y);h+=c}for(p=0;p<r;p++)for(var m=p*(n+1),v=0;v<n;v++){var g=v+m,y=g,_=g+n+1,x=g+n+2,w=g+1;o.push(y,_,w),o.push(_,x,w)}this.setIndex(o),this.setAttribute("position",new ba(s,3)),this.setAttribute("normal",new ba(l,3)),this.setAttribute("uv",new ba(u,2))}function kd(e,t,n,r){io.call(this),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},this.fromBufferGeometry(new Pd(e,t,n,r)),this.mergeVertices()}function Pd(e,t,n,r){Pa.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t)||12,n=n||0,r=r||2*Math.PI,r=Rr.clamp(r,0,2*Math.PI);for(var i=[],a=[],o=[],s=1/t,l=new Vr,u=new Nr,h=0;h<=t;h++)for(var c=n+h*s*r,d=Math.sin(c),f=Math.cos(c),p=0;p<=e.length-1;p++)l.x=e[p].x*d,l.y=e[p].y,l.z=e[p].x*f,a.push(l.x,l.y,l.z),u.x=h/t,u.y=p/(e.length-1),o.push(u.x,u.y);for(h=0;h<t;h++)for(p=0;p<e.length-1;p++){var m=p+h*e.length,v=m,g=m+e.length,y=m+e.length+1,_=m+1;i.push(v,g,_),i.push(g,y,_)}if(this.setIndex(i),this.setAttribute("position",new ba(a,3)),this.setAttribute("uv",new ba(o,2)),this.computeVertexNormals(),r===2*Math.PI)for(var x=this.attributes.normal.array,w=new Vr,b=new Vr,M=new Vr,m=t*e.length*3,h=0,p=0;h<e.length;h++,p+=3)w.x=x[p+0],w.y=x[p+1],w.z=x[p+2],b.x=x[m+p+0],b.y=x[m+p+1],b.z=x[m+p+2],M.addVectors(w,b).normalize(),x[p+0]=x[m+p+0]=M.x,x[p+1]=x[m+p+1]=M.y,x[p+2]=x[m+p+2]=M.z}function Cd(e,t){io.call(this),this.type="ShapeGeometry","object"===(0,te.default)(t)&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),t=t.curveSegments),this.parameters={shapes:e,curveSegments:t},this.fromBufferGeometry(new Dd(e,t)),this.mergeVertices()}function Dd(e,d){Pa.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:e,curveSegments:d},d=d||12;var f=[],p=[],m=[],v=[],t=0,g=0;if(!1===(0,We.default)(e))r(e);else for(var n=0;n<e.length;n++)r(e[n]),this.addGroup(t,g,n),t+=g,g=0;function r(e){var t,n=p.length/3,e=e.extractPoints(d),r=e.shape,i=e.holes;for(!1===_d.isClockWise(r)&&(r=(0,ae.default)(r).call(r)),o=0,s=i.length;o<s;o++)t=i[o],!0===_d.isClockWise(t)&&(i[o]=(0,ae.default)(t).call(t));for(var a=_d.triangulateShape(r,i),o=0,s=i.length;o<s;o++)t=i[o],r=(0,oe.default)(r).call(r,t);for(o=0,s=r.length;o<s;o++){var l=r[o];p.push(l.x,l.y,0),m.push(0,0,1),v.push(l.x,l.y)}for(o=0,s=a.length;o<s;o++){var u=a[o],h=u[0]+n,c=u[1]+n,u=u[2]+n;f.push(h,c,u),g+=3}}this.setIndex(f),this.setAttribute("position",new ba(p,3)),this.setAttribute("normal",new ba(m,3)),this.setAttribute("uv",new ba(v,2))}function Od(e,t){if(t.shapes=[],(0,We.default)(e))for(var n=0,r=e.length;n<r;n++){var i=e[n];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}function Bd(e,t){Pa.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:t},t=void 0!==t?t:1;var n,r,i,a,o=[],s=Math.cos(Rr.DEG2RAD*t),l=[0,0],u={},h=["a","b","c"];e.isBufferGeometry?(a=new io,a.fromBufferGeometry(e)):a=e.clone(),a.mergeVertices(),a.computeFaceNormals();for(var c=a.vertices,d=a.faces,f=0,p=d.length;f<p;f++)for(var m=d[f],v=0;v<3;v++)n=m[h[v]],r=m[h[(v+1)%3]],l[0]=Math.min(n,r),l[1]=Math.max(n,r),i=l[0]+","+l[1],void 0===u[i]?u[i]={index1:l[0],index2:l[1],face1:f,face2:void 0}:u[i].face2=f;for(i in u){var g,y=u[i];(void 0===y.face2||d[y.face1].normal.dot(d[y.face2].normal)<=s)&&(g=c[y.index1],o.push(g.x,g.y,g.z),g=c[y.index2],o.push(g.x,g.y,g.z))}this.setAttribute("position",new ba(o,3))}function Fd(e,t,n,r,i,a,o,s){io.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:a,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new Ud(e,t,n,r,i,a,o,s)),this.mergeVertices()}function Ud(v,g,y,_,x,e,w,b){Pa.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:v,radiusBottom:g,height:y,radialSegments:_,heightSegments:x,openEnded:e,thetaStart:w,thetaLength:b};var M=this;v=void 0!==v?v:1,g=void 0!==g?g:1,y=y||1,_=Math.floor(_)||8,x=Math.floor(x)||1,e=void 0!==e&&e,w=void 0!==w?w:0,b=void 0!==b?b:2*Math.PI;var T=[],E=[],S=[],A=[],I=0,L=[],R=y/2,N=0;function t(){for(var e=new Vr,t=new Vr,n=0,r=(g-v)/y,i=0;i<=x;i++){for(var a=[],o=i/x,s=o*(g-v)+v,l=0;l<=_;l++){var u=l/_,h=u*b+w,c=Math.sin(h),h=Math.cos(h);t.x=s*c,t.y=-o*y+R,t.z=s*h,E.push(t.x,t.y,t.z),e.set(c,r,h).normalize(),S.push(e.x,e.y,e.z),A.push(u,1-o),a.push(I++)}L.push(a)}for(l=0;l<_;l++)for(i=0;i<x;i++){var d=L[i][l],f=L[i+1][l],p=L[i+1][l+1],m=L[i][l+1];T.push(d,f,m),T.push(f,p,m),n+=6}M.addGroup(N,n,0),N+=n}function n(e){for(var t,n=new Nr,r=new Vr,i=0,a=!0===e?v:g,o=!0===e?1:-1,s=I,l=1;l<=_;l++)E.push(0,R*o,0),S.push(0,o,0),A.push(.5,.5),I++;for(t=I,l=0;l<=_;l++){var u=l/_,h=u*b+w,u=Math.cos(h),h=Math.sin(h);r.x=a*h,r.y=R*o,r.z=a*u,E.push(r.x,r.y,r.z),S.push(0,o,0),n.x=.5*u+.5,n.y=.5*h*o+.5,A.push(n.x,n.y),I++}for(l=0;l<_;l++){var c=s+l,d=t+l;!0===e?T.push(d,d+1,c):T.push(d+1,d,c),i+=3}M.addGroup(N,i,!0===e?1:2),N+=i}t(),!1===e&&(0<v&&n(!0),0<g&&n(!1)),this.setIndex(T),this.setAttribute("position",new ba(E,3)),this.setAttribute("normal",new ba(S,3)),this.setAttribute("uv",new ba(A,2))}function zd(e,t,n,r,i,a,o){Fd.call(this,0,e,t,n,r,i,a,o),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:o}}function Gd(e,t,n,r,i,a,o){Ud.call(this,0,e,t,n,r,i,a,o),this.type="ConeBufferGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:o}}function Vd(e,t,n,r){io.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new Hd(e,t,n,r)),this.mergeVertices()}function Hd(e,t,n,r){Pa.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},e=e||1,t=void 0!==t?Math.max(3,t):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,a,o=[],s=[],l=[],u=[],h=new Vr,c=new Nr;for(s.push(0,0,0),l.push(0,0,1),u.push(.5,.5),a=0,i=3;a<=t;a++,i+=3){var d=n+a/t*r;h.x=e*Math.cos(d),h.y=e*Math.sin(d),s.push(h.x,h.y,h.z),l.push(0,0,1),c.x=(s[i]/e+1)/2,c.y=(s[i+1]/e+1)/2,u.push(c.x,c.y)}for(i=1;i<=t;i++)o.push(i,i+1,0);this.setIndex(o),this.setAttribute("position",new ba(s,3)),this.setAttribute("normal",new ba(l,3)),this.setAttribute("uv",new ba(u,2))}Sd.prototype=(0,d.default)(io.prototype),Sd.prototype.constructor=Sd,Ad.prototype=(0,d.default)(Md.prototype),Ad.prototype.constructor=Ad,Id.prototype=(0,d.default)(io.prototype),Id.prototype.constructor=Id,Ld.prototype=(0,d.default)(Pa.prototype),Ld.prototype.constructor=Ld,Rd.prototype=(0,d.default)(io.prototype),Rd.prototype.constructor=Rd,Nd.prototype=(0,d.default)(Pa.prototype),Nd.prototype.constructor=Nd,kd.prototype=(0,d.default)(io.prototype),kd.prototype.constructor=kd,Pd.prototype=(0,d.default)(Pa.prototype),Pd.prototype.constructor=Pd,Cd.prototype=(0,d.default)(io.prototype),Cd.prototype.constructor=Cd,Cd.prototype.toJSON=function(){var e=io.prototype.toJSON.call(this),t=this.parameters.shapes;return Od(t,e)},Dd.prototype=(0,d.default)(Pa.prototype),Dd.prototype.constructor=Dd,Dd.prototype.toJSON=function(){var e=Pa.prototype.toJSON.call(this),t=this.parameters.shapes;return Od(t,e)},Bd.prototype=(0,d.default)(Pa.prototype),Bd.prototype.constructor=Bd,Fd.prototype=(0,d.default)(io.prototype),Fd.prototype.constructor=Fd,Ud.prototype=(0,d.default)(Pa.prototype),Ud.prototype.constructor=Ud,zd.prototype=(0,d.default)(Fd.prototype),zd.prototype.constructor=zd,Gd.prototype=(0,d.default)(Ud.prototype),Gd.prototype.constructor=Gd,Vd.prototype=(0,d.default)(io.prototype),Vd.prototype.constructor=Vd,Hd.prototype=(0,d.default)(Pa.prototype),Hd.prototype.constructor=Hd;var jd=(0,M.default)({__proto__:null,WireframeGeometry:Ec,ParametricGeometry:Sc,ParametricBufferGeometry:Ac,TetrahedronGeometry:Rc,TetrahedronBufferGeometry:Nc,OctahedronGeometry:kc,OctahedronBufferGeometry:Pc,IcosahedronGeometry:Cc,IcosahedronBufferGeometry:Dc,DodecahedronGeometry:Oc,DodecahedronBufferGeometry:Bc,PolyhedronGeometry:Ic,PolyhedronBufferGeometry:Lc,TubeGeometry:Fc,TubeBufferGeometry:Uc,TorusKnotGeometry:zc,TorusKnotBufferGeometry:Gc,TorusGeometry:Vc,TorusBufferGeometry:Hc,TextGeometry:Sd,TextBufferGeometry:Ad,SphereGeometry:Id,SphereBufferGeometry:Ld,RingGeometry:Rd,RingBufferGeometry:Nd,PlaneGeometry:Ao,PlaneBufferGeometry:Io,LatheGeometry:kd,LatheBufferGeometry:Pd,ShapeGeometry:Cd,ShapeBufferGeometry:Dd,ExtrudeGeometry:bd,ExtrudeBufferGeometry:Md,EdgesGeometry:Bd,ConeGeometry:zd,ConeBufferGeometry:Gd,CylinderGeometry:Fd,CylinderBufferGeometry:Ud,CircleGeometry:Vd,CircleBufferGeometry:Hd,BoxGeometry:ao,BoxBufferGeometry:oo});function Wd(e){ca.call(this),this.type="ShadowMaterial",this.color=new aa(0),this.transparent=!0,this.setValues(e)}function Yd(e){fo.call(this,e),this.type="RawShaderMaterial"}function qd(e){ca.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new aa(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 aa(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=$n,this.normalScale=new Nr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.vertexTangents=!1,this.setValues(e)}function Xd(e){qd.call(this),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Nr(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,this.sheen=null,this.transparency=0,this.setValues(e)}function Zd(e){ca.call(this),this.type="MeshPhongMaterial",this.color=new aa(16777215),this.specular=new aa(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new aa(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=$n,this.normalScale=new Nr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Jd(e){ca.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new aa(16777215),this.specular=new aa(1118481),this.shininess=30,this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new aa(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=$n,this.normalScale=new Nr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Kd(e){ca.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=$n,this.normalScale=new Nr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Qd(e){ca.call(this),this.type="MeshLambertMaterial",this.color=new aa(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new aa(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function $d(e){ca.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new aa(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=$n,this.normalScale=new Nr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function ef(e){rc.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}Wd.prototype=(0,d.default)(ca.prototype),Wd.prototype.constructor=Wd,Wd.prototype.isShadowMaterial=!0,Wd.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.color.copy(e.color),this},Yd.prototype=(0,d.default)(fo.prototype),Yd.prototype.constructor=Yd,Yd.prototype.isRawShaderMaterial=!0,qd.prototype=(0,d.default)(ca.prototype),qd.prototype.constructor=qd,qd.prototype.isMeshStandardMaterial=!0,qd.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=(0,Ye.default)(e),this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.vertexTangents=e.vertexTangents,this},Xd.prototype=(0,d.default)(qd.prototype),Xd.prototype.constructor=Xd,Xd.prototype.isMeshPhysicalMaterial=!0,Xd.prototype.copy=function(e){return qd.prototype.copy.call(this,e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.reflectivity=e.reflectivity,e.sheen?this.sheen=(this.sheen||new aa).copy(e.sheen):this.sheen=null,this.transparency=e.transparency,this},Zd.prototype=(0,d.default)(ca.prototype),Zd.prototype.constructor=Zd,Zd.prototype.isMeshPhongMaterial=!0,Zd.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=(0,Ye.default)(e),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.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Jd.prototype=(0,d.default)(ca.prototype),Jd.prototype.constructor=Jd,Jd.prototype.isMeshToonMaterial=!0,Jd.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=(0,Ye.default)(e),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.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Kd.prototype=(0,d.default)(ca.prototype),Kd.prototype.constructor=Kd,Kd.prototype.isMeshNormalMaterial=!0,Kd.prototype.copy=function(e){return ca.prototype.copy.call(this,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.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Qd.prototype=(0,d.default)(ca.prototype),Qd.prototype.constructor=Qd,Qd.prototype.isMeshLambertMaterial=!0,Qd.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.color.copy(e.color),this.map=(0,Ye.default)(e),this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},$d.prototype=(0,d.default)(ca.prototype),$d.prototype.constructor=$d,$d.prototype.isMeshMatcapMaterial=!0,$d.prototype.copy=function(e){return ca.prototype.copy.call(this,e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=(0,Ye.default)(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.alphaMap=e.alphaMap,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},ef.prototype=(0,d.default)(rc.prototype),ef.prototype.constructor=ef,ef.prototype.isLineDashedMaterial=!0,ef.prototype.copy=function(e){return rc.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var tf=(0,M.default)({__proto__:null,ShadowMaterial:Wd,SpriteMaterial:Lh,RawShaderMaterial:Yd,ShaderMaterial:fo,PointsMaterial:pc,MeshPhysicalMaterial:Xd,MeshStandardMaterial:qd,MeshPhongMaterial:Zd,MeshToonMaterial:Jd,MeshNormalMaterial:Kd,MeshLambertMaterial:Qd,MeshDepthMaterial:ch,MeshDistanceMaterial:dh,MeshBasicMaterial:da,MeshMatcapMaterial:$d,LineDashedMaterial:ef,LineBasicMaterial:rc,Material:ca}),nf={arraySlice:function(e,t,n){return nf.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):(0,y.default)(e).call(e,t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):(0,y.default)(Array.prototype).call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(n){function e(e,t){return n[e]-n[t]}for(var t=n.length,r=new Array(t),i=0;i!==t;++i)r[i]=i;return(0,qe.default)(r).call(r,e),r},sortedArray:function(e,t,n){for(var r=e.length,i=new e.constructor(r),a=0,o=0;o!==r;++a)for(var s=n[a]*t,l=0;l!==t;++l)i[o++]=e[s+l];return i},flattenJSON:function(e,t,n,r){for(var i=1,a=e[0];void 0!==a&&void 0===a[r];)a=e[i++];if(void 0!==a){var o=a[r];if(void 0!==o)if((0,We.default)(o))for(;o=a[r],void 0!==o&&(t.push(a.time),n.push.apply(n,o)),a=e[i++],void 0!==a;);else if(void 0!==o.toArray)for(;o=a[r],void 0!==o&&(t.push(a.time),o.toArray(n,n.length)),a=e[i++],void 0!==a;);else for(;o=a[r],void 0!==o&&(t.push(a.time),n.push(o)),a=e[i++],void 0!==a;);}},subclip:function(e,t,n,r,i){i=i||30;var a=e.clone();a.name=t;for(var o=[],s=0;s<a.tracks.length;++s){for(var l=a.tracks[s],u=l.getValueSize(),h=[],c=[],d=0;d<l.times.length;++d){var f=l.times[d]*i;if(!(f<n||r<=f)){h.push(l.times[d]);for(var p=0;p<u;++p)c.push((0,T.default)(l)[d*u+p])}}0!==h.length&&(l.times=nf.convertArray(h,l.times.constructor),l.values=nf.convertArray(c,(0,T.default)(l).constructor),o.push(l))}a.tracks=o;for(var m=Infinity,s=0;s<a.tracks.length;++s)m>a.tracks[s].times[0]&&(m=a.tracks[s].times[0]);for(s=0;s<a.tracks.length;++s)a.tracks[s].shift(-1*m);return a.resetDuration(),a}};function rf(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n}function af(e,t,n,r){rf.call(this,e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function of(e,t,n,r){rf.call(this,e,t,n,r)}function sf(e,t,n,r){rf.call(this,e,t,n,r)}function lf(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=nf.convertArray(t,this.TimeBufferType),this.values=nf.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}function uf(e,t,n){lf.call(this,e,t,n)}function hf(e,t,n,r){lf.call(this,e,t,n,r)}function cf(e,t,n,r){lf.call(this,e,t,n,r)}function df(e,t,n,r){rf.call(this,e,t,n,r)}function ff(e,t,n,r){lf.call(this,e,t,n,r)}function pf(e,t,n,r){lf.call(this,e,t,n,r)}function mf(e,t,n,r){lf.call(this,e,t,n,r)}function vf(e,t,n){this.name=e,this.tracks=n,this.duration=void 0!==t?t:-1,this.uuid=Rr.generateUUID(),this.duration<0&&this.resetDuration()}function gf(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return cf;case"vector":case"vector2":case"vector3":case"vector4":return mf;case"color":return hf;case"quaternion":return ff;case"bool":case"boolean":return uf;case"string":return pf}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}function yf(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var t,n,r=gf(e.type);return void 0===e.times&&(t=[],n=[],nf.flattenJSON((0,E.default)(e),t,n,"value"),e.times=t,e.values=n),void 0!==r.parse?r.parse(e):new r(e.name,e.times,(0,T.default)(e),e.interpolation)}t.AnimationUtils=nf,(0,je.default)(rf.prototype,{evaluate:function(e){var t,n=this.parameterPositions,r=this._cachedIndex,i=n[r],a=n[r-1];e:{t:{n:{r:if(!(e<i)){for(var o=r+2;;){if(void 0===i){if(e<a)break r;return r=n.length,this._cachedIndex=r,this.afterEnd_(r-1,e,a)}if(r===o)break;if(a=i,i=n[++r],e<i)break t}t=n.length;break n}if(a<=e)break e;var s=n[1];for(e<s&&(r=2,a=s),o=r-2;;){if(void 0===a)return this._cachedIndex=0,this.beforeStart_(0,e,i);if(r===o)break;if(i=a,a=n[--r-1],a<=e)break t}t=r,r=0}for(;r<t;){var l=r+t>>>1;e<n[l]?t=l:r=l+1}if(i=n[r],a=n[r-1],void 0===a)return this._cachedIndex=0,this.beforeStart_(0,e,i);if(void 0===i)return r=n.length,this._cachedIndex=r,this.afterEnd_(r-1,a,e)}this._cachedIndex=r,this.intervalChanged_(r,a,i)}return this.interpolate_(r,a,e,i)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r,a=0;a!==r;++a)t[a]=n[i+a];return t},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),(0,je.default)(rf.prototype,{beforeStart_:rf.prototype.copySampleValue_,afterEnd_:rf.prototype.copySampleValue_}),af.prototype=(0,je.default)((0,d.default)(rf.prototype),{constructor:af,DefaultSettings_:{endingStart:Bn,endingEnd:Bn},intervalChanged_:function(e,t,n){var r=this.parameterPositions,i=e-2,a=e+1,o=r[i],s=r[a];if(void 0===o)switch(this.getSettings_().endingStart){case Fn:i=e,o=2*t-n;break;case Un:i=r.length-2,o=t+r[i]-r[i+1];break;default:i=e,o=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Fn:a=e,s=2*n-t;break;case Un:a=1,s=n+r[1]-r[0];break;default:a=e-1,s=t}var l=.5*(n-t),u=this.valueSize;this._weightPrev=l/(t-o),this._weightNext=l/(s-n),this._offsetPrev=i*u,this._offsetNext=a*u},interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,l=s-o,u=this._offsetPrev,h=this._offsetNext,c=this._weightPrev,e=this._weightNext,n=(n-t)/(r-t),r=n*n,t=r*n,d=-c*t+2*c*r-c*n,f=(1+c)*t+(-1.5-2*c)*r+(-.5+c)*n+1,p=(-1-e)*t+(1.5+e)*r+.5*n,m=e*t-e*r,v=0;v!==o;++v)i[v]=d*a[u+v]+f*a[l+v]+p*a[s+v]+m*a[h+v];return i}}),of.prototype=(0,je.default)((0,d.default)(rf.prototype),{constructor:of,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,l=s-o,u=(n-t)/(r-t),h=1-u,c=0;c!==o;++c)i[c]=a[l+c]*h+a[s+c]*u;return i}}),sf.prototype=(0,je.default)((0,d.default)(rf.prototype),{constructor:sf,interpolate_:function(e){return this.copySampleValue_(e-1)}}),(0,je.default)(lf,{toJSON:function(e){var t,n=e.constructor;return void 0!==n.toJSON?t=n.toJSON(e):(t={name:e.name,times:nf.convertArray(e.times,Array),values:nf.convertArray((0,T.default)(e),Array)},n=e.getInterpolation(),n!==e.DefaultInterpolation&&(t.interpolation=n)),t.type=e.ValueTypeName,t}}),(0,je.default)(lf.prototype,{constructor:lf,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Dn,InterpolantFactoryMethodDiscrete:function(e){return new sf(this.times,(0,T.default)(this),this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new of(this.times,(0,T.default)(this),this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new af(this.times,(0,T.default)(this),this.getValueSize(),e)},setInterpolation:function(e){var t;switch(e){case Cn:t=this.InterpolantFactoryMethodDiscrete;break;case Dn:t=this.InterpolantFactoryMethodLinear;break;case On:t=this.InterpolantFactoryMethodSmooth}if(void 0!==t)return this.createInterpolant=t,this;var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",n),this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Cn;case this.InterpolantFactoryMethodLinear:return Dn;case this.InterpolantFactoryMethodSmooth:return On}},getValueSize:function(){return(0,T.default)(this).length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]*=e;return this},trim:function(e,t){for(var n,r=this.times,i=r.length,a=0,o=i-1;a!==i&&r[a]<e;)++a;for(;-1!==o&&r[o]>t;)--o;return++o,0===a&&o===i||(o<=a&&(o=Math.max(o,1),a=o-1),n=this.getValueSize(),this.times=nf.arraySlice(r,a,o),this.values=nf.arraySlice((0,T.default)(this),a*n,o*n)),this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,r=(0,T.default)(this),i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,o=0;o!==i;o++){var s=n[o];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),e=!1;break}if(null!==a&&s<a){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,a),e=!1;break}a=s}if(void 0!==r&&nf.isTypedArray(r))for(var o=0,l=r.length;o!==l;++o){var u=r[o];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,u),e=!1;break}}return e},optimize:function(){for(var e=nf.arraySlice(this.times),t=nf.arraySlice((0,T.default)(this)),n=this.getValueSize(),r=this.getInterpolation()===On,i=1,a=e.length-1,o=1;o<a;++o){var s=!1,l=e[o],u=e[o+1];if(l!==u&&(1!==o||l!==l[0]))if(r)s=!0;else for(var h=o*n,c=h-n,d=h+n,f=0;f!==n;++f){var p=t[h+f];if(p!==t[c+f]||p!==t[d+f]){s=!0;break}}if(s){if(o!==i){e[i]=e[o];for(var m=o*n,v=i*n,f=0;f!==n;++f)t[v+f]=t[m+f]}++i}}if(0<a){for(e[i]=e[a],m=a*n,v=i*n,f=0;f!==n;++f)t[v+f]=t[m+f];++i}return i!==e.length?(this.times=nf.arraySlice(e,0,i),this.values=nf.arraySlice(t,0,i*n)):(this.times=e,this.values=t),this},clone:function(){var e=nf.arraySlice(this.times,0),t=nf.arraySlice((0,T.default)(this),0),n=this.constructor,t=new n(this.name,e,t);return t.createInterpolant=this.createInterpolant,t}}),uf.prototype=(0,je.default)((0,d.default)(lf.prototype),{constructor:uf,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Cn,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),hf.prototype=(0,je.default)((0,d.default)(lf.prototype),{constructor:hf,ValueTypeName:"color"}),cf.prototype=(0,je.default)((0,d.default)(lf.prototype),{constructor:cf,ValueTypeName:"number"}),df.prototype=(0,je.default)((0,d.default)(rf.prototype),{constructor:df,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,l=(n-t)/(r-t),u=s+o;s!==u;s+=4)Ur.slerpFlat(i,0,a,s-o,a,s,l);return i}}),ff.prototype=(0,je.default)((0,d.default)(lf.prototype),{constructor:ff,ValueTypeName:"quaternion",DefaultInterpolation:Dn,InterpolantFactoryMethodLinear:function(e){return new df(this.times,(0,T.default)(this),this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),pf.prototype=(0,je.default)((0,d.default)(lf.prototype),{constructor:pf,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Cn,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),mf.prototype=(0,je.default)((0,d.default)(lf.prototype),{constructor:mf,ValueTypeName:"vector"}),(0,je.default)(vf,{parse:function(e){for(var t=[],n=e.tracks,r=1/(e.fps||1),i=0,a=n.length;i!==a;++i)t.push(yf(n[i]).scale(r));return new vf(e.name,e.duration,t)},toJSON:function(e){for(var t=[],n=e.tracks,e={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid},r=0,i=n.length;r!==i;++r)t.push(lf.toJSON(n[r]));return e},CreateFromMorphTargetSequence:function(e,t,n,r){for(var i=t.length,a=[],o=0;o<i;o++){var s=[],l=[];s.push((o+i-1)%i,o,(o+1)%i),l.push(0,1,0);var u=nf.getKeyframeOrder(s),s=nf.sortedArray(s,1,u),l=nf.sortedArray(l,1,u);r||0!==s[0]||(s.push(i),l.push(l[0])),a.push(new cf(".morphTargetInfluences["+t[o].name+"]",s,l).scale(1/n))}return new vf(e,-1,a)},findByName:function(e,t){var n=e;(0,We.default)(e)||(n=e.geometry&&e.geometry.animations||e.animations);for(var r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null},CreateClipsFromMorphTargetSequences:function(e,t,n){for(var r={},i=/^([\w-]*?)([\d]+)$/,a=0,o=e.length;a<o;a++){var s=e[a],l=s.name.match(i);l&&1<l.length&&(u=l[1],l=r[u],l||(r[u]=l=[]),l.push(s))}var u,h=[];for(u in r)h.push(vf.CreateFromMorphTargetSequence(u,r[u],t,n));return h},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(e,t,n,r,i){var a,o;0!==n.length&&(a=[],o=[],nf.flattenJSON(n,a,o,r),0!==a.length&&i.push(new e(t,a,o)))},r=[],i=e.name||"default",a=e.length||-1,o=e.fps||30,s=e.hierarchy||[],l=0;l<s.length;l++){var u=(0,E.default)(s[l]);if(u&&0!==u.length)if(u[0].morphTargets){for(var h,c={},d=0;d<u.length;d++)if(u[d].morphTargets)for(var f=0;f<u[d].morphTargets.length;f++)c[u[d].morphTargets[f]]=-1;for(h in c){for(var p=[],m=[],f=0;f!==u[d].morphTargets.length;++f){var v=u[d];p.push(v.time),m.push(v.morphTarget===h?1:0)}r.push(new cf(".morphTargetInfluence["+h+"]",p,m))}a=c.length*(o||1)}else{var g=".bones["+t[l].name+"]";n(mf,g+".position",u,"pos",r),n(ff,g+".quaternion",u,"rot",r),n(mf,g+".scale",u,"scl",r)}}return 0===r.length?null:(i=new vf(i,a,r),i)}}),(0,je.default)(vf.prototype,{resetDuration:function(){for(var e=this.tracks,t=0,n=0,r=e.length;n!==r;++n)var i=this.tracks[n],t=Math.max(t,i.times[i.times.length-1]);return this.duration=t,this},trim:function(){for(var e,t=0;t<this.tracks.length;t++)(0,w.default)(e=this.tracks[t]).call(e,0,this.duration);return this},validate:function(){for(var e=!0,t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this},clone:function(){for(var e=[],t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new vf(this.name,this.duration,e)}});var _f={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function xf(e,t,n){var r=this,i=!1,a=0,o=0,s=void 0,l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){o++,!1===i&&void 0!==r.onStart&&r.onStart(e,a,o),i=!0},this.itemEnd=function(e){a++,void 0!==r.onProgress&&r.onProgress(e,a,o),a===o&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){return e=(0,ce.default)(l).call(l,e),-1!==e&&(0,g.default)(l).call(l,e,2),this},this.getHandler=function(e){for(var t=0,n=l.length;t<n;t+=2){var r=l[t],i=l[t+1];if(r.global&&(r.lastIndex=0),r.test(e))return i}return null}}t.Cache=_f;var wf=new xf;function bf(e){this.manager=void 0!==e?e:wf,this.crossOrigin="anonymous",this.path="",this.resourcePath=""}t.DefaultLoadingManager=wf,(0,je.default)(bf.prototype,{load:function(){},parse:function(){},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this},setResourcePath:function(e){return this.resourcePath=e,this}});var Mf={};function Tf(e){bf.call(this,e)}function Ef(e){bf.call(this,e)}function Sf(e){bf.call(this,e)}function Af(e){bf.call(this,e)}function If(e){bf.call(this,e)}function Lf(e){bf.call(this,e)}function Rf(e){bf.call(this,e)}function Nf(){this.type="Curve",this.arcLengthDivisions=200}function kf(e,t,n,r,i,a,o,s){Nf.call(this),this.type="EllipseCurve",this.aX=e||0,this.aY=t||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=a||2*Math.PI,this.aClockwise=o||!1,this.aRotation=s||0}function Pf(e,t,n,r,i,a){kf.call(this,e,t,n,n,r,i,a),this.type="ArcCurve"}function Cf(){var i=0,a=0,o=0,s=0;function l(e,t,n,r){i=e,a=n,o=-3*e+3*t-2*n-r,s=2*e-2*t+n+r}return{initCatmullRom:function(e,t,n,r,i){l(t,n,i*(n-e),i*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,i,a,o){i=(t-e)/i-(n-e)/(i+a)+(n-t)/a,o=(n-t)/a-(r-t)/(a+o)+(r-n)/o,i*=a,o*=a,l(t,n,i,o)},calc:function(e){var t=e*e,n=t*e;return i+a*e+o*t+s*n}}}Tf.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:Tf,load:function(o,e,t,n){void 0===o&&(o=""),void 0!==this.path&&(o=this.path+o),o=this.manager.resolveURL(o);var s=this,r=_f.get(o);if(void 0!==r)return s.manager.itemStart(o),(0,I.default)(function(){e&&e(r),s.manager.itemEnd(o)},0),r;if(void 0===Mf[o]){var i=/^data:(.*?)(;base64)?,(.*)$/,a=o.match(i);if(a){var l=a[1],i=!!a[2],u=a[3],u=decodeURIComponent(u);i&&(u=atob(u));try{var h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var c=new Uint8Array(u.length),d=0;d<u.length;d++)c[d]=u.charCodeAt(d);p="blob"===h?new Blob([c.buffer],{type:l}):c.buffer;break;case"document":var f=new DOMParser,p=f.parseFromString(u,l);break;case"json":p=JSON.parse(u);break;default:p=u}(0,I.default)(function(){e&&e(p),s.manager.itemEnd(o)},0)}catch(e){(0,I.default)(function(){n&&n(e),s.manager.itemError(o),s.manager.itemEnd(o)},0)}}else{Mf[o]=[],Mf[o].push({onLoad:e,onProgress:t,onError:n});var m,v=new XMLHttpRequest;for(m in v.open("GET",o,!0),v.addEventListener("load",function(e){var t=this.response,n=Mf[o];if(delete Mf[o],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),_f.add(o,t);for(var r=0,i=n.length;r<i;r++){var a=n[r];a.onLoad&&a.onLoad(t)}s.manager.itemEnd(o)}else{for(r=0,i=n.length;r<i;r++)a=n[r],a.onError&&a.onError(e);s.manager.itemError(o),s.manager.itemEnd(o)}},!1),v.addEventListener("progress",function(e){for(var t=Mf[o],n=0,r=t.length;n<r;n++){var i=t[n];i.onProgress&&i.onProgress(e)}},!1),v.addEventListener("error",function(e){var t=Mf[o];delete Mf[o];for(var n=0,r=t.length;n<r;n++){var i=t[n];i.onError&&i.onError(e)}s.manager.itemError(o),s.manager.itemEnd(o)},!1),v.addEventListener("abort",function(e){var t=Mf[o];delete Mf[o];for(var n=0,r=t.length;n<r;n++){var i=t[n];i.onError&&i.onError(e)}s.manager.itemError(o),s.manager.itemEnd(o)},!1),void 0!==this.responseType&&(v.responseType=this.responseType),void 0!==this.withCredentials&&(v.withCredentials=this.withCredentials),v.overrideMimeType&&v.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)v.setRequestHeader(m,this.requestHeader[m]);v.send(null)}return s.manager.itemStart(o),v}Mf[o].push({onLoad:e,onProgress:t,onError:n})},setResponseType:function(e){return this.responseType=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setMimeType:function(e){return this.mimeType=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}}),Ef.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:Ef,load:function(e,t,n,r){var i=this,a=new Tf(i.manager);a.setPath(i.path),a.load(e,function(e){t(i.parse(JSON.parse(e)))},n,r)},parse:function(e){for(var t=[],n=0;n<e.length;n++){var r=vf.parse(e[n]);t.push(r)}return t}}),Sf.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:Sf,load:function(e,a,n,r){var o=this,s=[],l=new bc;l.image=s;var i=new Tf(this.manager);function t(t){i.load(e[t],function(e){e=o.parse(e,!0),s[t]={width:e.width,height:e.height,format:e.format,mipmaps:e.mipmaps},u+=1,6===u&&(1===e.mipmapCount&&(l.minFilter=ft),l.format=e.format,l.needsUpdate=!0,a&&a(l))},n,r)}if(i.setPath(this.path),i.setResponseType("arraybuffer"),(0,We.default)(e))for(var u=0,h=0,c=e.length;h<c;++h)t(h);else i.load(e,function(e){var t=o.parse(e,!0);if(t.isCubemap)for(var n=t.mipmaps.length/t.mipmapCount,r=0;r<n;r++){s[r]={mipmaps:[]};for(var i=0;i<t.mipmapCount;i++)s[r].mipmaps.push(t.mipmaps[r*t.mipmapCount+i]),s[r].format=t.format,s[r].width=t.width,s[r].height=t.height}else l.image.width=t.width,l.image.height=t.height,l.mipmaps=t.mipmaps;1===t.mipmapCount&&(l.minFilter=ft),l.format=t.format,l.needsUpdate=!0,a&&a(l)},n,r);return l}}),Af.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:Af,load:function(e,t,n,r){var i=this,a=new xo,o=new Tf(this.manager);return o.setResponseType("arraybuffer"),o.setPath(this.path),o.load(e,function(e){e=i.parse(e),e&&(void 0!==e.image?a.image=e.image:void 0!==e.data&&(a.image.width=e.width,a.image.height=e.height,a.image.data=e.data),a.wrapS=void 0!==e.wrapS?e.wrapS:ot,a.wrapT=void 0!==e.wrapT?e.wrapT:ot,a.magFilter=void 0!==e.magFilter?e.magFilter:ft,a.minFilter=void 0!==e.minFilter?e.minFilter:ft,a.anisotropy=void 0!==e.anisotropy?e.anisotropy:1,void 0!==e.format&&(a.format=e.format),void 0!==e.type&&(a.type=e.type),void 0!==e.mipmaps&&(a.mipmaps=e.mipmaps,a.minFilter=vt),1===e.mipmapCount&&(a.minFilter=ft),a.needsUpdate=!0,t&&t(a,e))},n,r),a}}),If.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:If,load:function(t,e,n,r){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,a=_f.get(t);if(void 0!==a)return i.manager.itemStart(t),(0,I.default)(function(){e&&e(a),i.manager.itemEnd(t)},0),a;var o=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){o.removeEventListener("load",s,!1),o.removeEventListener("error",l,!1),_f.add(t,this),e&&e(this),i.manager.itemEnd(t)}function l(e){o.removeEventListener("load",s,!1),o.removeEventListener("error",l,!1),r&&r(e),i.manager.itemError(t),i.manager.itemEnd(t)}return o.addEventListener("load",s,!1),o.addEventListener("error",l,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),i.manager.itemStart(t),o.src=t,o}}),Lf.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:Lf,load:function(e,n,t,r){var i=new Tl,a=new If(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);var o=0;function s(t){a.load(e[t],function(e){i.images[t]=e,o++,6===o&&(i.needsUpdate=!0,n&&n(i))},void 0,r)}for(var l=0;l<e.length;++l)s(l);return i}}),Rf.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:Rf,load:function(t,n,e,r){var i=new Dr,a=new If(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(t,function(e){i.image=e,e=0<t.search(/\.jpe?g($|\?)/i)||0===t.search(/^data\:image\/jpeg/),i.format=e?Nt:kt,i.needsUpdate=!0,void 0!==n&&n(i)},e,r),i}}),(0,je.default)(Nf.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){return e=this.getUtoTmapping(e),this.getPoint(e,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n,r=[],i=this.getPoint(0),a=0;for(r.push(0),n=1;n<=e;n++)t=this.getPoint(n/e),a+=t.distanceTo(i),r.push(a),i=t;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){for(var n,r=this.getLengths(),i=0,a=r.length,o=t||e*r[a-1],s=0,l=a-1;s<=l;)if(i=Math.floor(s+(l-s)/2),n=r[i]-o,n<0)s=i+1;else{if(!(0<n)){l=i;break}l=i-1}return i=l,r[i]===o?i/(a-1):(t=r[i],e=r[i+1],e-=t,e=(o-t)/e,a=(i+e)/(a-1),a)},getTangent:function(e){var t=1e-4,n=e-t,t=e+t;return n<0&&(n=0),1<t&&(t=1),n=this.getPoint(n),t=this.getPoint(t),n=t.clone().sub(n),n.normalize()},getTangentAt:function(e){return e=this.getUtoTmapping(e),this.getTangent(e)},computeFrenetFrames:function(e,t){for(var n,r,i=new Vr,a=[],o=[],s=[],l=new Vr,u=new Jr,h=0;h<=e;h++)n=h/e,a[h]=this.getTangentAt(n),a[h].normalize();o[0]=new Vr,s[0]=new Vr;var c=Number.MAX_VALUE,d=Math.abs(a[0].x),f=Math.abs(a[0].y),p=Math.abs(a[0].z);for(d<=c&&(c=d,i.set(1,0,0)),f<=c&&(c=f,i.set(0,1,0)),p<=c&&i.set(0,0,1),l.crossVectors(a[0],i).normalize(),o[0].crossVectors(a[0],l),s[0].crossVectors(a[0],o[0]),h=1;h<=e;h++)o[h]=o[h-1].clone(),s[h]=s[h-1].clone(),l.crossVectors(a[h-1],a[h]),l.length()>ne.default&&(l.normalize(),r=Math.acos(Rr.clamp(a[h-1].dot(a[h]),-1,1)),o[h].applyMatrix4(u.makeRotationAxis(l,r))),s[h].crossVectors(a[h],o[h]);if(!0===t)for(r=Math.acos(Rr.clamp(o[0].dot(o[e]),-1,1)),r/=e,0<a[0].dot(l.crossVectors(o[0],o[e]))&&(r=-r),h=1;h<=e;h++)o[h].applyMatrix4(u.makeRotationAxis(a[h],r*h)),s[h].crossVectors(a[h],o[h]);return{tangents:a,normals:o,binormals:s}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),kf.prototype=(0,d.default)(Nf.prototype),kf.prototype.constructor=kf,kf.prototype.isEllipseCurve=!0,kf.prototype.getPoint=function(e,t){for(var n=t||new Nr,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,a=Math.abs(i)<ne.default;i<0;)i+=r;for(;r<i;)i-=r;i<ne.default&&(i=a?0:r),!0!==this.aClockwise||a||(i===r?i=-r:i-=r);var o=this.aStartAngle+e*i,s=this.aX+this.xRadius*Math.cos(o),l=this.aY+this.yRadius*Math.sin(o);return 0!==this.aRotation&&(t=Math.cos(this.aRotation),a=Math.sin(this.aRotation),e=s-this.aX,o=l-this.aY,s=e*t-o*a+this.aX,l=e*a+o*t+this.aY),n.set(s,l)},kf.prototype.copy=function(e){return Nf.prototype.copy.call(this,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},kf.prototype.toJSON=function(){var e=Nf.prototype.toJSON.call(this);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},kf.prototype.fromJSON=function(e){return Nf.prototype.fromJSON.call(this,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},Pf.prototype=(0,d.default)(kf.prototype),Pf.prototype.constructor=Pf,Pf.prototype.isArcCurve=!0;var Df=new Vr,Of=new Cf,Bf=new Cf,Ff=new Cf;function Uf(e,t,n,r){Nf.call(this),this.type="CatmullRomCurve3",this.points=e||[],this.closed=t||!1,this.curveType=n||"centripetal",this.tension=r||.5}function zf(e,t,n,r,i){var a=.5*(r-t),o=.5*(i-n),t=e*e,i=e*t;return(2*n-2*r+a+o)*i+(-3*n+3*r-2*a-o)*t+a*e+n}function Gf(e,t){return e=1-e,e*e*t}function Vf(e,t){return 2*(1-e)*e*t}function Hf(e,t){return e*e*t}function jf(e,t,n,r){return Gf(e,t)+Vf(e,n)+Hf(e,r)}function Wf(e,t){return e=1-e,e*e*e*t}function Yf(e,t){var n=1-e;return 3*n*n*e*t}function qf(e,t){return 3*(1-e)*e*e*t}function Xf(e,t){return e*e*e*t}function Zf(e,t,n,r,i){return Wf(e,t)+Yf(e,n)+qf(e,r)+Xf(e,i)}function Jf(e,t,n,r){Nf.call(this),this.type="CubicBezierCurve",this.v0=e||new Nr,this.v1=t||new Nr,this.v2=n||new Nr,this.v3=r||new Nr}function Kf(e,t,n,r){Nf.call(this),this.type="CubicBezierCurve3",this.v0=e||new Vr,this.v1=t||new Vr,this.v2=n||new Vr,this.v3=r||new Vr}function Qf(e,t){Nf.call(this),this.type="LineCurve",this.v1=e||new Nr,this.v2=t||new Nr}function $f(e,t){Nf.call(this),this.type="LineCurve3",this.v1=e||new Vr,this.v2=t||new Vr}function ep(e,t,n){Nf.call(this),this.type="QuadraticBezierCurve",this.v0=e||new Nr,this.v1=t||new Nr,this.v2=n||new Nr}function tp(e,t,n){Nf.call(this),this.type="QuadraticBezierCurve3",this.v0=e||new Vr,this.v1=t||new Vr,this.v2=n||new Vr}function np(e){Nf.call(this),this.type="SplineCurve",this.points=e||[]}Uf.prototype=(0,d.default)(Nf.prototype),Uf.prototype.constructor=Uf,Uf.prototype.isCatmullRomCurve3=!0,Uf.prototype.getPoint=function(e,t){var n,r=t||new Vr,i=this.points,a=i.length,o=(a-(this.closed?0:1))*e,s=Math.floor(o),l=o-s;return this.closed?s+=0<s?0:(Math.floor(Math.abs(s)/a)+1)*a:0===l&&s===a-1&&(s=a-2,l=1),n=this.closed||0<s?i[(s-1)%a]:(Df.subVectors(i[0],i[1]).add(i[0]),Df),t=i[s%a],e=i[(s+1)%a],o=this.closed||s+2<a?i[(s+2)%a]:(Df.subVectors(i[a-1],i[a-2]).add(i[a-1]),Df),"centripetal"===this.curveType||"chordal"===this.curveType?(s="chordal"===this.curveType?.5:.25,i=Math.pow(n.distanceToSquared(t),s),a=Math.pow(t.distanceToSquared(e),s),s=Math.pow(e.distanceToSquared(o),s),a<1e-4&&(a=1),i<1e-4&&(i=a),s<1e-4&&(s=a),Of.initNonuniformCatmullRom(n.x,t.x,e.x,o.x,i,a,s),Bf.initNonuniformCatmullRom(n.y,t.y,e.y,o.y,i,a,s),Ff.initNonuniformCatmullRom(n.z,t.z,e.z,o.z,i,a,s)):"catmullrom"===this.curveType&&(Of.initCatmullRom(n.x,t.x,e.x,o.x,this.tension),Bf.initCatmullRom(n.y,t.y,e.y,o.y,this.tension),Ff.initCatmullRom(n.z,t.z,e.z,o.z,this.tension)),r.set(Of.calc(l),Bf.calc(l),Ff.calc(l)),r},Uf.prototype.copy=function(e){Nf.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push(r.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},Uf.prototype.toJSON=function(){var e=Nf.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var r=this.points[t];e.points.push(r.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},Uf.prototype.fromJSON=function(e){Nf.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push((new Vr).fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},Jf.prototype=(0,d.default)(Nf.prototype),Jf.prototype.constructor=Jf,Jf.prototype.isCubicBezierCurve=!0,Jf.prototype.getPoint=function(e,t){var n=t||new Nr,r=this.v0,i=this.v1,a=this.v2,t=this.v3;return n.set(Zf(e,r.x,i.x,a.x,t.x),Zf(e,r.y,i.y,a.y,t.y)),n},Jf.prototype.copy=function(e){return Nf.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},Jf.prototype.toJSON=function(){var e=Nf.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},Jf.prototype.fromJSON=function(e){return Nf.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Kf.prototype=(0,d.default)(Nf.prototype),Kf.prototype.constructor=Kf,Kf.prototype.isCubicBezierCurve3=!0,Kf.prototype.getPoint=function(e,t){var n=t||new Vr,r=this.v0,i=this.v1,a=this.v2,t=this.v3;return n.set(Zf(e,r.x,i.x,a.x,t.x),Zf(e,r.y,i.y,a.y,t.y),Zf(e,r.z,i.z,a.z,t.z)),n},Kf.prototype.copy=function(e){return Nf.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},Kf.prototype.toJSON=function(){var e=Nf.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},Kf.prototype.fromJSON=function(e){return Nf.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Qf.prototype=(0,d.default)(Nf.prototype),Qf.prototype.constructor=Qf,Qf.prototype.isLineCurve=!0,Qf.prototype.getPoint=function(e,t){return t=t||new Nr,1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t},Qf.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},Qf.prototype.getTangent=function(){var e=this.v2.clone().sub(this.v1);return e.normalize()},Qf.prototype.copy=function(e){return Nf.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Qf.prototype.toJSON=function(){var e=Nf.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Qf.prototype.fromJSON=function(e){return Nf.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},$f.prototype=(0,d.default)(Nf.prototype),$f.prototype.constructor=$f,$f.prototype.isLineCurve3=!0,$f.prototype.getPoint=function(e,t){return t=t||new Vr,1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t},$f.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},$f.prototype.copy=function(e){return Nf.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},$f.prototype.toJSON=function(){var e=Nf.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},$f.prototype.fromJSON=function(e){return Nf.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},ep.prototype=(0,d.default)(Nf.prototype),ep.prototype.constructor=ep,ep.prototype.isQuadraticBezierCurve=!0,ep.prototype.getPoint=function(e,t){var n=t||new Nr,r=this.v0,i=this.v1,t=this.v2;return n.set(jf(e,r.x,i.x,t.x),jf(e,r.y,i.y,t.y)),n},ep.prototype.copy=function(e){return Nf.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},ep.prototype.toJSON=function(){var e=Nf.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},ep.prototype.fromJSON=function(e){return Nf.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},tp.prototype=(0,d.default)(Nf.prototype),tp.prototype.constructor=tp,tp.prototype.isQuadraticBezierCurve3=!0,tp.prototype.getPoint=function(e,t){var n=t||new Vr,r=this.v0,i=this.v1,t=this.v2;return n.set(jf(e,r.x,i.x,t.x),jf(e,r.y,i.y,t.y),jf(e,r.z,i.z,t.z)),n},tp.prototype.copy=function(e){return Nf.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},tp.prototype.toJSON=function(){var e=Nf.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},tp.prototype.fromJSON=function(e){return Nf.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},np.prototype=(0,d.default)(Nf.prototype),np.prototype.constructor=np,np.prototype.isSplineCurve=!0,np.prototype.getPoint=function(e,t){var n=t||new Nr,r=this.points,i=(r.length-1)*e,a=Math.floor(i),o=i-a,t=r[0===a?a:a-1],e=r[a],i=r[a>r.length-2?r.length-1:a+1],a=r[a>r.length-3?r.length-1:a+2];return n.set(zf(o,t.x,e.x,i.x,a.x),zf(o,t.y,e.y,i.y,a.y)),n},np.prototype.copy=function(e){Nf.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push(r.clone())}return this},np.prototype.toJSON=function(){var e=Nf.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var r=this.points[t];e.points.push(r.toArray())}return e},np.prototype.fromJSON=function(e){Nf.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push((new Nr).fromArray(r))}return this};var rp=(0,M.default)({__proto__:null,ArcCurve:Pf,CatmullRomCurve3:Uf,CubicBezierCurve:Jf,CubicBezierCurve3:Kf,EllipseCurve:kf,LineCurve:Qf,LineCurve3:$f,QuadraticBezierCurve:ep,QuadraticBezierCurve3:tp,SplineCurve:np});function ip(){Nf.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function ap(e){ip.call(this),this.type="Path",this.currentPoint=new Nr,e&&this.setFromPoints(e)}function op(e){ap.call(this,e),this.uuid=Rr.generateUUID(),this.type="Shape",this.holes=[]}function sp(e,t){pi.call(this),this.type="Light",this.color=new aa(e),this.intensity=void 0!==t?t:1,this.receiveShadow=void 0}function lp(e,t,n){sp.call(this,e,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(pi.DefaultUp),this.updateMatrix(),this.groundColor=new aa(t)}function up(e){this.camera=e,this.bias=0,this.radius=1,this.mapSize=new Nr(512,512),this.map=null,this.mapPass=null,this.matrix=new Jr,this._frustum=new Mo,this._frameExtents=new Nr(1,1),this._viewportCount=1,this._viewports=[new Or(0,0,1,1)]}function hp(){up.call(this,new mo(50,1,.5,500))}function cp(e,t,n,r,i,a){sp.call(this,e,t),this.type="SpotLight",this.position.copy(pi.DefaultUp),this.updateMatrix(),this.target=new pi,(0,m.default)(this,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==a?a:1,this.shadow=new hp}function dp(){up.call(this,new mo(90,1,.5,500)),this._frameExtents=new Nr(4,2),this._viewportCount=6,this._viewports=[new Or(2,1,1,1),new Or(0,1,1,1),new Or(3,1,1,1),new Or(1,1,1,1),new Or(3,0,1,1),new Or(1,0,1,1)],this._cubeDirections=[new Vr(1,0,0),new Vr(-1,0,0),new Vr(0,0,1),new Vr(0,0,-1),new Vr(0,1,0),new Vr(0,-1,0)],this._cubeUps=[new Vr(0,1,0),new Vr(0,1,0),new Vr(0,1,0),new Vr(0,1,0),new Vr(0,0,1),new Vr(0,0,-1)]}function fp(e,t,n,r){sp.call(this,e,t),this.type="PointLight",(0,m.default)(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new dp}function pp(e,t,n,r,i,a){po.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=void 0!==e?e:-1,this.right=void 0!==t?t:1,this.top=void 0!==n?n:1,this.bottom=void 0!==r?r:-1,this.near=void 0!==i?i:.1,this.far=void 0!==a?a:2e3,this.updateProjectionMatrix()}function mp(){up.call(this,new pp(-5,5,5,-5,.5,500))}function vp(e,t){sp.call(this,e,t),this.type="DirectionalLight",this.position.copy(pi.DefaultUp),this.updateMatrix(),this.target=new pi,this.shadow=new mp}function gp(e,t){sp.call(this,e,t),this.type="AmbientLight",this.castShadow=void 0}function yp(e,t,n,r){sp.call(this,e,t),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function _p(e){bf.call(this,e),this.textures={}}ip.prototype=(0,je.default)((0,d.default)(Nf.prototype),{constructor:ip,add:function(e){this.curves.push(e)},closePath:function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Qf(t,e))},getPoint:function(e){for(var t=e*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=t){var i=n[r]-t,a=this.curves[r],o=a.getLength(),o=0===o?0:1-i/o;return a.getPointAt(o)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e},getSpacedPoints:function(e){void 0===e&&(e=40);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t},getPoints:function(e){e=e||12;for(var t,n=[],r=0,i=this.curves;r<i.length;r++)for(var a=i[r],o=a&&a.isEllipseCurve?2*e:a&&(a.isLineCurve||a.isLineCurve3)?1:a&&a.isSplineCurve?e*a.points.length:e,s=a.getPoints(o),l=0;l<s.length;l++){var u=s[l];t&&t.equals(u)||(n.push(u),t=u)}return this.autoClose&&1<n.length&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(e){Nf.prototype.copy.call(this,e),this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var r=e.curves[t];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this},toJSON:function(){var e=Nf.prototype.toJSON.call(this);e.autoClose=this.autoClose,e.curves=[];for(var t=0,n=this.curves.length;t<n;t++){var r=this.curves[t];e.curves.push(r.toJSON())}return e},fromJSON:function(e){Nf.prototype.fromJSON.call(this,e),this.autoClose=e.autoClose,this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var r=e.curves[t];this.curves.push((new rp[r.type]).fromJSON(r))}return this}}),ap.prototype=(0,je.default)((0,d.default)(ip.prototype),{constructor:ap,setFromPoints:function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this},moveTo:function(e,t){return this.currentPoint.set(e,t),this},lineTo:function(e,t){var n=new Qf(this.currentPoint.clone(),new Nr(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this},quadraticCurveTo:function(e,t,n,r){return t=new ep(this.currentPoint.clone(),new Nr(e,t),new Nr(n,r)),this.curves.push(t),this.currentPoint.set(n,r),this},bezierCurveTo:function(e,t,n,r,i,a){return r=new Jf(this.currentPoint.clone(),new Nr(e,t),new Nr(n,r),new Nr(i,a)),this.curves.push(r),this.currentPoint.set(i,a),this},splineThru:function(e){var t=(0,oe.default)(t=[this.currentPoint.clone()]).call(t,e),t=new np(t);return this.curves.push(t),this.currentPoint.copy(e[e.length-1]),this},arc:function(e,t,n,r,i,a){var o=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+o,t+s,n,r,i,a),this},absarc:function(e,t,n,r,i,a){return this.absellipse(e,t,n,n,r,i,a),this},ellipse:function(e,t,n,r,i,a,o,s){var l=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+l,t+u,n,r,i,a,o,s),this},absellipse:function(e,t,n,r,i,a,o,s){return o=new kf(e,t,n,r,i,a,o,s),0<this.curves.length&&(s=o.getPoint(0),s.equals(this.currentPoint)||this.lineTo(s.x,s.y)),this.curves.push(o),o=o.getPoint(1),this.currentPoint.copy(o),this},copy:function(e){return ip.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=ip.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return ip.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),op.prototype=(0,je.default)((0,d.default)(ap.prototype),{constructor:op,getPointsHoles:function(e){for(var t=[],n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t},extractPoints:function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},copy:function(e){ap.prototype.copy.call(this,e),this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var r=e.holes[t];this.holes.push(r.clone())}return this},toJSON:function(){var e=ap.prototype.toJSON.call(this);e.uuid=this.uuid,e.holes=[];for(var t=0,n=this.holes.length;t<n;t++){var r=this.holes[t];e.holes.push(r.toJSON())}return e},fromJSON:function(e){ap.prototype.fromJSON.call(this,e),this.uuid=e.uuid,this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var r=e.holes[t];this.holes.push((new ap).fromJSON(r))}return this}}),sp.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:sp,isLight:!0,copy:function(e){return pi.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){return e=pi.prototype.toJSON.call(this,e),e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),lp.prototype=(0,je.default)((0,d.default)(sp.prototype),{constructor:lp,isHemisphereLight:!0,copy:function(e){return sp.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),(0,je.default)(up.prototype,{_projScreenMatrix:new Jr,_lightPositionWorld:new Vr,_lookTarget:new Vr,getViewportCount:function(){return this._viewportCount},getFrustum:function(){return this._frustum},updateMatrices:function(e){var t=this.camera,n=this.matrix,r=this._projScreenMatrix,i=this._lookTarget,a=this._lightPositionWorld;a.setFromMatrixPosition(e.matrixWorld),t.position.copy(a),i.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(i),t.updateMatrixWorld(),r.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(r),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)},getViewport:function(e){return this._viewports[e]},getFrameExtents:function(){return this._frameExtents},copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}),hp.prototype=(0,je.default)((0,d.default)(up.prototype),{constructor:hp,isSpotLightShadow:!0,updateMatrices:function(e){var t=this.camera,n=2*Rr.RAD2DEG*e.angle,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),up.prototype.updateMatrices.call(this,e)}}),cp.prototype=(0,je.default)((0,d.default)(sp.prototype),{constructor:cp,isSpotLight:!0,copy:function(e){return sp.prototype.copy.call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),dp.prototype=(0,je.default)((0,d.default)(up.prototype),{constructor:dp,isPointLightShadow:!0,updateMatrices:function(e,t){void 0===t&&(t=0);var n=this.camera,r=this.matrix,i=this._lightPositionWorld,a=this._lookTarget,o=this._projScreenMatrix;i.setFromMatrixPosition(e.matrixWorld),n.position.copy(i),a.copy(n.position),a.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(a),n.updateMatrixWorld(),r.makeTranslation(-i.x,-i.y,-i.z),o.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(o)}}),fp.prototype=(0,je.default)((0,d.default)(sp.prototype),{constructor:fp,isPointLight:!0,copy:function(e){return sp.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),pp.prototype=(0,je.default)((0,d.default)(po.prototype),{constructor:pp,isOrthographicCamera:!0,copy:function(e,t){return po.prototype.copy.call(this,e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:(0,je.default)({},e.view),this},setViewOffset:function(e,t,n,r,i,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,a=n+e,n=r+t,e=r-t;null!==this.view&&this.view.enabled&&(r=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom,i+=r*this.view.offsetX,a=i+r*this.view.width,n-=t*this.view.offsetY,e=n-t*this.view.height),this.projectionMatrix.makeOrthographic(i,a,n,e,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(e){return e=pi.prototype.toJSON.call(this,e),e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=(0,je.default)({},this.view)),e}}),mp.prototype=(0,je.default)((0,d.default)(up.prototype),{constructor:mp,isDirectionalLightShadow:!0,updateMatrices:function(e){up.prototype.updateMatrices.call(this,e)}}),vp.prototype=(0,je.default)((0,d.default)(sp.prototype),{constructor:vp,isDirectionalLight:!0,copy:function(e){return sp.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),gp.prototype=(0,je.default)((0,d.default)(sp.prototype),{constructor:gp,isAmbientLight:!0}),yp.prototype=(0,je.default)((0,d.default)(sp.prototype),{constructor:yp,isRectAreaLight:!0,copy:function(e){return sp.prototype.copy.call(this,e),this.width=e.width,this.height=e.height,this},toJSON:function(e){return e=sp.prototype.toJSON.call(this,e),e.object.width=this.width,e.object.height=this.height,e}}),_p.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:_p,load:function(e,t,n,r){var i=this,a=new Tf(i.manager);a.setPath(i.path),a.load(e,function(e){t(i.parse(JSON.parse(e)))},n,r)},parse:function(e){var t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}var r,i=new tf[e.type];if(void 0!==e.uuid&&(i.uuid=e.uuid),void 0!==e.name&&(i.name=e.name),void 0!==e.color&&i.color.setHex(e.color),void 0!==e.roughness&&(i.roughness=e.roughness),void 0!==e.metalness&&(i.metalness=e.metalness),void 0!==e.sheen&&(i.sheen=(new aa).setHex(e.sheen)),void 0!==e.emissive&&i.emissive.setHex(e.emissive),void 0!==e.specular&&i.specular.setHex(e.specular),void 0!==e.shininess&&(i.shininess=e.shininess),void 0!==e.clearcoat&&(i.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(i.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.fog&&(i.fog=e.fog),void 0!==e.flatShading&&(i.flatShading=e.flatShading),void 0!==e.blending&&(i.blending=e.blending),void 0!==e.combine&&(i.combine=e.combine),void 0!==e.side&&(i.side=e.side),void 0!==e.opacity&&(i.opacity=e.opacity),void 0!==e.transparent&&(i.transparent=e.transparent),void 0!==e.alphaTest&&(i.alphaTest=e.alphaTest),void 0!==e.depthTest&&(i.depthTest=e.depthTest),void 0!==e.depthWrite&&(i.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(i.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(i.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(i.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(i.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(i.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(i.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(i.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(i.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(i.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(i.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(i.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(i.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(i.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(i.rotation=e.rotation),1!==e.linewidth&&(i.linewidth=e.linewidth),void 0!==e.dashSize&&(i.dashSize=e.dashSize),void 0!==e.gapSize&&(i.gapSize=e.gapSize),void 0!==e.scale&&(i.scale=e.scale),void 0!==e.polygonOffset&&(i.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(i.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(i.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.skinning&&(i.skinning=e.skinning),void 0!==e.morphTargets&&(i.morphTargets=e.morphTargets),void 0!==e.morphNormals&&(i.morphNormals=e.morphNormals),void 0!==e.dithering&&(i.dithering=e.dithering),void 0!==e.vertexTangents&&(i.vertexTangents=e.vertexTangents),void 0!==e.visible&&(i.visible=e.visible),void 0!==e.toneMapped&&(i.toneMapped=e.toneMapped),void 0!==e.userData&&(i.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?i.vertexColors=0<e.vertexColors:i.vertexColors=e.vertexColors),void 0!==e.uniforms)for(var a in e.uniforms){var o=e.uniforms[a];switch(i.uniforms[a]={},o.type){case"t":i.uniforms[a].value=n(o.value);break;case"c":i.uniforms[a].value=(new aa).setHex(o.value);break;case"v2":i.uniforms[a].value=(new Nr).fromArray(o.value);break;case"v3":i.uniforms[a].value=(new Vr).fromArray(o.value);break;case"v4":i.uniforms[a].value=(new Or).fromArray(o.value);break;case"m3":i.uniforms[a].value=(new kr).fromArray(o.value);case"m4":i.uniforms[a].value=(new Jr).fromArray(o.value);break;default:i.uniforms[a].value=o.value}}if(void 0!==e.defines&&(i.defines=e.defines),void 0!==e.vertexShader&&(i.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(i.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(var s in e.extensions)i.extensions[s]=e.extensions[s];return void 0!==e.shading&&(i.flatShading=1===e.shading),void 0!==e.size&&(i.size=e.size),void 0!==e.sizeAttenuation&&(i.sizeAttenuation=e.sizeAttenuation),void 0!==(0,Ye.default)(e)&&(i.map=n((0,Ye.default)(e))),void 0!==e.matcap&&(i.matcap=n(e.matcap)),void 0!==e.alphaMap&&(i.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(i.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(i.bumpScale=e.bumpScale),void 0!==e.normalMap&&(i.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(i.normalMapType=e.normalMapType),void 0!==e.normalScale&&(r=e.normalScale,!1===(0,We.default)(r)&&(r=[r,r]),i.normalScale=(new Nr).fromArray(r)),void 0!==e.displacementMap&&(i.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(i.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(i.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(i.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(i.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(i.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(i.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(i.specularMap=n(e.specularMap)),void 0!==e.envMap&&(i.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(i.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(i.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(i.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(i.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(i.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(i.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(i.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(i.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(i.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(i.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(i.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(i.clearcoatNormalScale=(new Nr).fromArray(e.clearcoatNormalScale)),i},setTextures:function(e){return this.textures=e,this}});var xp={decodeText:function(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t="",n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(e){return t}},extractUrlBase:function(e){var t=(0,L.default)(e).call(e,"/");return-1===t?"./":e.substr(0,t+1)}};function wp(){Pa.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function bp(e,t,n,r){"number"==typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),pa.call(this,e,t,n),this.meshPerAttribute=r||1}function Mp(e){bf.call(this,e)}t.LoaderUtils=xp,wp.prototype=(0,je.default)((0,d.default)(Pa.prototype),{constructor:wp,isInstancedBufferGeometry:!0,copy:function(e){return Pa.prototype.copy.call(this,e),this.maxInstancedCount=e.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e=Pa.prototype.toJSON.call(this);return e.maxInstancedCount=this.maxInstancedCount,e.isInstancedBufferGeometry=!0,e}}),bp.prototype=(0,je.default)((0,d.default)(pa.prototype),{constructor:bp,isInstancedBufferAttribute:!0,copy:function(e){return pa.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},toJSON:function(){var e=pa.prototype.toJSON.call(this);return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}),Mp.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:Mp,load:function(e,t,n,r){var i=this,a=new Tf(i.manager);a.setPath(i.path),a.load(e,function(e){t(i.parse(JSON.parse(e)))},n,r)},parse:function(e){var t=new(e.isInstancedBufferGeometry?wp:Pa),n=e.data.index;void 0!==n&&(a=new Tp[n.type](n.array),t.setIndex(new pa(a,1)));var r=e.data.attributes;for(u in r){var i=r[u],a=new Tp[i.type](i.array),o=i.isInstancedBufferAttribute?bp:pa,s=new o(a,i.itemSize,i.normalized);void 0!==i.name&&(s.name=i.name),t.setAttribute(u,s)}var l=e.data.morphAttributes;if(l)for(var u in l){for(var h=l[u],c=[],d=0,f=h.length;d<f;d++)i=h[d],a=new Tp[i.type](i.array),s=new pa(a,i.itemSize,i.normalized),void 0!==i.name&&(s.name=i.name),c.push(s);t.morphAttributes[u]=c}var p=e.data.morphTargetsRelative;p&&(t.morphTargetsRelative=!0);var m=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==m)for(var d=0,v=m.length;d!==v;++d){var g=m[d];t.addGroup(g.start,g.count,g.materialIndex)}return n=e.data.boundingSphere,void 0!==n&&(p=new Vr,void 0!==n.center&&p.fromArray(n.center),t.boundingSphere=new ki(p,n.radius)),e.name&&(t.name=e.name),e.userData&&(t.userData=e.userData),t}});var Tp={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Ep(e){bf.call(this,e)}Ep.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:Ep,load:function(n,r,e,i){var a=this,t=""===this.path?xp.extractUrlBase(n):this.path;this.resourcePath=this.resourcePath||t,t=new Tf(a.manager),t.setPath(this.path),t.load(n,function(e){var t=null;try{t=JSON.parse(e)}catch(e){return void 0!==i&&i(e),void console.error("THREE:ObjectLoader: Can't parse "+n+".",e.message)}e=t.metadata,void 0!==e&&void 0!==e.type&&"geometry"!==e.type.toLowerCase()?a.parse(t,r):console.error("THREE.ObjectLoader: Can't load "+n)},e,i)},parse:function(e,t){var n=this.parseShape(e.shapes),r=this.parseGeometries(e.geometries,n),n=this.parseImages(e.images,function(){void 0!==t&&t(i)}),n=this.parseTextures(e.textures,n),n=this.parseMaterials(e.materials,n),i=this.parseObject(e.object,r,n);return e.animations&&(i.animations=this.parseAnimations(e.animations)),void 0!==e.images&&0!==e.images.length||void 0!==t&&t(i),i},parseShape:function(e){var t={};if(void 0!==e)for(var n=0,r=e.length;n<r;n++){var i=(new op).fromJSON(e[n]);t[i.uuid]=i}return t},parseGeometries:function(e,t){var n={};if(void 0!==e)for(var r=new Mp,i=0,a=e.length;i<a;i++){var o,s=e[i];switch(s.type){case"PlaneGeometry":case"PlaneBufferGeometry":o=new jd[s.type](s.width,s.height,s.widthSegments,s.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":o=new jd[s.type](s.width,s.height,s.depth,s.widthSegments,s.heightSegments,s.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":o=new jd[s.type](s.radius,s.segments,s.thetaStart,s.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":o=new jd[s.type](s.radiusTop,s.radiusBottom,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":o=new jd[s.type](s.radius,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":o=new jd[s.type](s.radius,s.widthSegments,s.heightSegments,s.phiStart,s.phiLength,s.thetaStart,s.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":o=new jd[s.type](s.radius,s.detail);break;case"RingGeometry":case"RingBufferGeometry":o=new jd[s.type](s.innerRadius,s.outerRadius,s.thetaSegments,s.phiSegments,s.thetaStart,s.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":o=new jd[s.type](s.radius,s.tube,s.radialSegments,s.tubularSegments,s.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":o=new jd[s.type](s.radius,s.tube,s.tubularSegments,s.radialSegments,s.p,s.q);break;case"TubeGeometry":case"TubeBufferGeometry":o=new jd[s.type]((new rp[s.path.type]).fromJSON(s.path),s.tubularSegments,s.radius,s.radialSegments,s.closed);break;case"LatheGeometry":case"LatheBufferGeometry":o=new jd[s.type](s.points,s.segments,s.phiStart,s.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":o=new jd[s.type](s.vertices,s.indices,s.radius,s.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var l=[],u=0,h=s.shapes.length;u<h;u++){var c=t[s.shapes[u]];l.push(c)}o=new jd[s.type](l,s.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(l=[],u=0,h=s.shapes.length;u<h;u++)c=t[s.shapes[u]],l.push(c);var d=s.options.extrudePath;void 0!==d&&(s.options.extrudePath=(new rp[d.type]).fromJSON(d)),o=new jd[s.type](l,s.options);break;case"BufferGeometry":case"InstancedBufferGeometry":o=r.parse(s);break;case"Geometry":console.error('THREE.ObjectLoader: Loading "Geometry" is not supported anymore.');break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+s.type+'"');continue}o.uuid=s.uuid,void 0!==s.name&&(o.name=s.name),!0===o.isBufferGeometry&&void 0!==s.userData&&(o.userData=s.userData),n[s.uuid]=o}return n},parseMaterials:function(e,t){var n={},r={};if(void 0!==e){var i=new _p;i.setTextures(t);for(var a=0,o=e.length;a<o;a++){var s=e[a];if("MultiMaterial"===s.type){for(var l=[],u=0;u<s.materials.length;u++){var h=s.materials[u];void 0===n[h.uuid]&&(n[h.uuid]=i.parse(h)),l.push(n[h.uuid])}r[s.uuid]=l}else void 0===n[s.uuid]&&(n[s.uuid]=i.parse(s)),r[s.uuid]=n[s.uuid]}}return r},parseAnimations:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=vf.parse(r);void 0!==r.uuid&&(i.uuid=r.uuid),t.push(i)}return t},parseImages:function(e,t){var n=this,r={};function i(e){return n.manager.itemStart(e),a.load(e,function(){n.manager.itemEnd(e)},void 0,function(){n.manager.itemError(e),n.manager.itemEnd(e)})}if(void 0!==e&&0<e.length){var t=new xf(t),a=new If(t);a.setCrossOrigin(this.crossOrigin);for(var o=0,s=e.length;o<s;o++){var l=e[o],u=l.url;if((0,We.default)(u)){r[l.uuid]=[];for(var h=0,c=u.length;h<c;h++){var d=u[h],f=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(d)?d:n.resourcePath+d;r[l.uuid].push(i(f))}}else f=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(l.url)?l.url:n.resourcePath+l.url,r[l.uuid]=i(f)}}return r},parseTextures:function(e,t){function n(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}var r={};if(void 0!==e)for(var i=0,a=e.length;i<a;i++){var o,s=e[i];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===t[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image),o=new((0,We.default)(t[s.image])?Tl:Dr)(t[s.image]),o.needsUpdate=!0,o.uuid=s.uuid,void 0!==s.name&&(o.name=s.name),void 0!==s.mapping&&(o.mapping=n(s.mapping,Ap)),void 0!==s.offset&&o.offset.fromArray(s.offset),void 0!==(0,f.default)(s)&&(0,f.default)(o).fromArray((0,f.default)(s)),void 0!==s.center&&o.center.fromArray(s.center),void 0!==s.rotation&&(o.rotation=s.rotation),void 0!==s.wrap&&(o.wrapS=n(s.wrap[0],Ip),o.wrapT=n(s.wrap[1],Ip)),void 0!==s.format&&(o.format=s.format),void 0!==s.type&&(o.type=s.type),void 0!==s.encoding&&(o.encoding=s.encoding),void 0!==s.minFilter&&(o.minFilter=n(s.minFilter,Lp)),void 0!==s.magFilter&&(o.magFilter=n(s.magFilter,Lp)),void 0!==s.anisotropy&&(o.anisotropy=s.anisotropy),void 0!==s.flipY&&(o.flipY=s.flipY),void 0!==s.premultiplyAlpha&&(o.premultiplyAlpha=s.premultiplyAlpha),void 0!==s.unpackAlignment&&(o.unpackAlignment=s.unpackAlignment),r[s.uuid]=o}return r},parseObject:function(e,t,a){function n(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function r(e){if(void 0!==e){if((0,We.default)(e)){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];void 0===a[i]&&console.warn("THREE.ObjectLoader: Undefined material",i),t.push(a[i])}return t}return void 0===a[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),a[e]}}switch(e.type){case"Scene":s=new mi,void 0!==e.background&&(0,v.default)(e.background)&&(s.background=new aa(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?s.fog=new Th(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(s.fog=new Mh(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":s=new mo(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(s.focus=e.focus),void 0!==e.zoom&&(s.zoom=e.zoom),void 0!==e.filmGauge&&(s.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(s.filmOffset=e.filmOffset),void 0!==e.view&&(s.view=(0,je.default)({},e.view));break;case"OrthographicCamera":s=new pp(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(s.zoom=e.zoom),void 0!==e.view&&(s.view=(0,je.default)({},e.view));break;case"AmbientLight":s=new gp(e.color,e.intensity);break;case"DirectionalLight":s=new vp(e.color,e.intensity);break;case"PointLight":s=new fp(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":s=new yp(e.color,e.intensity,e.width,e.height);break;case"SpotLight":s=new cp(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":s=new lp(e.color,e.groundColor,e.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var i=n(e.geometry),o=r(e.material),s=new Ka(i,o);break;case"InstancedMesh":var i=n(e.geometry),o=r(e.material),l=e.count,u=e.instanceMatrix,s=new nc(i,o,l);s.instanceMatrix=new pa(new Float32Array(u.array),16);break;case"LOD":s=new Yh;break;case"Line":s=new uc(n(e.geometry),r(e.material),e.mode);break;case"LineLoop":s=new fc(n(e.geometry),r(e.material));break;case"LineSegments":s=new dc(n(e.geometry),r(e.material));break;case"PointCloud":case"Points":s=new _c(n(e.geometry),r(e.material));break;case"Sprite":s=new Vh(r(e.material));break;case"Group":s=new xh;break;default:s=new pi}if(s.uuid=e.uuid,void 0!==e.name&&(s.name=e.name),void 0!==e.matrix?(s.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(s.matrixAutoUpdate=e.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(void 0!==e.position&&s.position.fromArray(e.position),void 0!==e.rotation&&s.rotation.fromArray(e.rotation),void 0!==e.quaternion&&s.quaternion.fromArray(e.quaternion),void 0!==e.scale&&s.scale.fromArray(e.scale)),void 0!==e.castShadow&&(s.castShadow=e.castShadow),void 0!==e.receiveShadow&&(s.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(s.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(s.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&s.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(s.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(s.visible=e.visible),void 0!==e.frustumCulled&&(s.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(s.renderOrder=e.renderOrder),void 0!==e.userData&&(s.userData=e.userData),void 0!==e.layers&&(s.layers.mask=e.layers),void 0!==e.children)for(var h=e.children,c=0;c<h.length;c++)s.add(this.parseObject(h[c],t,a));if("LOD"===e.type){void 0!==e.autoUpdate&&(s.autoUpdate=e.autoUpdate);for(var d=e.levels,f=0;f<d.length;f++){var p=d[f],m=s.getObjectByProperty("uuid",p.object);void 0!==m&&s.addLevel(m,p.distance)}}return s}});var Sp,Ap={UVMapping:le,CubeReflectionMapping:ue,CubeRefractionMapping:$e,EquirectangularReflectionMapping:et,EquirectangularRefractionMapping:tt,SphericalReflectionMapping:nt,CubeUVReflectionMapping:rt,CubeUVRefractionMapping:it},Ip={RepeatWrapping:at,ClampToEdgeWrapping:ot,MirroredRepeatWrapping:st},Lp={NearestFilter:lt,NearestMipmapNearestFilter:ut,NearestMipmapLinearFilter:ct,LinearFilter:ft,LinearMipmapNearestFilter:pt,LinearMipmapLinearFilter:vt};function Rp(e){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),bf.call(this,e),this.options=void 0}function Np(){this.type="ShapePath",this.color=new aa,this.subPaths=[],this.currentPath=null}function kp(e){this.type="Font",this.data=e}function Pp(e,t,n){for(var r=R.default?(0,R.default)(e):String(e).split(""),i=t/n.resolution,a=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,o=[],s=0,l=0,u=0;u<r.length;u++){var h=r[u];"\n"===h?(s=0,l-=a):(h=Cp(h,i,s,l,n),s+=h.offsetX,o.push(h.path))}return o}function Cp(e,t,n,r,i){var a=i.glyphs[e]||i.glyphs["?"];if(a){var o,s,l,u,h,c,d,f,p=new Np;if(a.o)for(var m=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),v=0,g=m.length;v<g;){var y=m[v++];switch(y){case"m":o=m[v++]*t+n,s=m[v++]*t+r,p.moveTo(o,s);break;case"l":o=m[v++]*t+n,s=m[v++]*t+r,p.lineTo(o,s);break;case"q":l=m[v++]*t+n,u=m[v++]*t+r,h=m[v++]*t+n,c=m[v++]*t+r,p.quadraticCurveTo(h,c,l,u);break;case"b":l=m[v++]*t+n,u=m[v++]*t+r,h=m[v++]*t+n,c=m[v++]*t+r,d=m[v++]*t+n,f=m[v++]*t+r,p.bezierCurveTo(h,c,d,f,l,u)}}return{offsetX:a.ha*t,path:p}}console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".")}function Dp(e){bf.call(this,e)}Rp.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:Rp,setOptions:function(e){return this.options=e,this},load:function(t,n,e,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,a=_f.get(t);if(void 0!==a)return i.manager.itemStart(t),(0,I.default)(function(){n&&n(a),i.manager.itemEnd(t)},0),a;fetch(t).then(function(e){return e.blob()}).then(function(e){return void 0===i.options?createImageBitmap(e):createImageBitmap(e,i.options)}).then(function(e){_f.add(t,e),n&&n(e),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemError(t),i.manager.itemEnd(t)}),i.manager.itemStart(t)}}),(0,je.default)(Np.prototype,{moveTo:function(e,t){return this.currentPath=new ap,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this},lineTo:function(e,t){return this.currentPath.lineTo(e,t),this},quadraticCurveTo:function(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this},bezierCurveTo:function(e,t,n,r,i,a){return this.currentPath.bezierCurveTo(e,t,n,r,i,a),this},splineThru:function(e){return this.currentPath.splineThru(e),this},toShapes:function(e,t){function n(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n],a=new op;a.curves=i.curves,t.push(a)}return t}function r(e,t){for(var n=t.length,r=!1,i=n-1,a=0;a<n;i=a++){var o=t[i],s=t[a],l=s.x-o.x,u=s.y-o.y;if(Math.abs(u)>ne.default){if(u<0&&(o=t[a],l=-l,s=t[i],u=-u),!(e.y<o.y||e.y>s.y))if(e.y===o.y){if(e.x===o.x)return!0}else{if(l=u*(e.x-o.x)-l*(e.y-o.y),0===l)return!0;l<0||(r=!r)}}else if(e.y===o.y&&(s.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=s.x))return!0}return r}var i=_d.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===t)return n(a);var o,s,l,u=[];if(1===a.length)return s=a[0],l=new op,l.curves=s.curves,u.push(l),u;var h,c=!i(a[0].getPoints()),c=e?!c:c,d=[],f=[],p=[],m=0;f[m]=void 0,p[m]=[];for(var v=0,g=a.length;v<g;v++)s=a[v],h=s.getPoints(),o=i(h),o=e?!o:o,o?(!c&&f[m]&&m++,f[m]={s:new op,p:h},f[m].s.curves=s.curves,c&&m++,p[m]=[]):p[m].push({h:s,p:h[0]});if(!f[0])return n(a);if(1<f.length){for(var y=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var b=p[x],M=0;M<b.length;M++){for(var T=b[M],E=!0,S=0;S<f.length;S++)r(T.p,f[S].p)&&(x!==S&&_.push({froms:x,tos:S,hole:M}),E?(E=!1,d[S].push(T)):y=!0);E&&d[x].push(T)}0<_.length&&(y||(p=d))}for(var v=0,A=f.length;v<A;v++){l=f[v].s,u.push(l);for(var I=p[v],L=0,R=I.length;L<R;L++)l.holes.push(I[L].h)}return u}}),(0,je.default)(kp.prototype,{isFont:!0,generateShapes:function(e,t){void 0===t&&(t=100);for(var n=[],r=Pp(e,t,this.data),i=0,a=r.length;i<a;i++)Array.prototype.push.apply(n,r[i].toShapes());return n}}),Dp.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:Dp,load:function(e,r,t,n){var i=this,a=new Tf(this.manager);a.setPath(this.path),a.load(e,function(t){try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var n=i.parse(n);r&&r(n)},t,n)},parse:function(e){return new kp(e)}});var Op={getContext:function(){return void 0===Sp&&(Sp=new(window.AudioContext||window.webkitAudioContext)),Sp},setContext:function(e){Sp=e}};function Bp(e){bf.call(this,e)}function Fp(){this.coefficients=[];for(var e=0;e<9;e++)this.coefficients.push(new Vr)}function Up(e,t){sp.call(this,void 0,t),this.sh=void 0!==e?e:new Fp}function zp(e,t,n){Up.call(this,void 0,n);var r=(new aa).set(e),n=(new aa).set(t),e=new Vr(r.r,r.g,r.b),t=new Vr(n.r,n.g,n.b),r=Math.sqrt(Math.PI),n=r*Math.sqrt(.75);this.sh.coefficients[0].copy(e).add(t).multiplyScalar(r),this.sh.coefficients[1].copy(e).sub(t).multiplyScalar(n)}function Gp(e,t){Up.call(this,void 0,t),e=(new aa).set(e),this.sh.coefficients[0].set(e.r,e.g,e.b).multiplyScalar(2*Math.sqrt(Math.PI))}t.AudioContext=Op,Bp.prototype=(0,je.default)((0,d.default)(bf.prototype),{constructor:Bp,load:function(e,n,t,r){var i=new Tf(this.manager);i.setResponseType("arraybuffer"),i.setPath(this.path),i.load(e,function(e){var t=(0,y.default)(e).call(e,0),e=Op.getContext();e.decodeAudioData(t,function(e){n(e)})},t,r)}}),(0,je.default)(Fp.prototype,{isSphericalHarmonics3:!0,set:function(e){for(var t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this},zero:function(){for(var e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this},getAt:function(e,t){var n=e.x,r=e.y,i=e.z,e=this.coefficients;return t.copy(e[0]).multiplyScalar(.282095),t.addScaledVector(e[1],.488603*r),t.addScaledVector(e[2],.488603*i),t.addScaledVector(e[3],.488603*n),t.addScaledVector(e[4],n*r*1.092548),t.addScaledVector(e[5],r*i*1.092548),t.addScaledVector(e[6],.315392*(3*i*i-1)),t.addScaledVector(e[7],n*i*1.092548),t.addScaledVector(e[8],.546274*(n*n-r*r)),t},getIrradianceAt:function(e,t){var n=e.x,r=e.y,i=e.z,e=this.coefficients;return t.copy(e[0]).multiplyScalar(.886227),t.addScaledVector(e[1],1.023328*r),t.addScaledVector(e[2],1.023328*i),t.addScaledVector(e[3],1.023328*n),t.addScaledVector(e[4],.858086*n*r),t.addScaledVector(e[5],.858086*r*i),t.addScaledVector(e[6],.743125*i*i-.247708),t.addScaledVector(e[7],.858086*n*i),t.addScaledVector(e[8],.429043*(n*n-r*r)),t},add:function(e){for(var t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this},addScaledSH:function(e,t){for(var n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this},scale:function(e){for(var t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this},lerp:function(e,t){for(var n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this},equals:function(e){for(var t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0},copy:function(e){return this.set(e.coefficients)},clone:function(){return(new this.constructor).copy(this)},fromArray:function(e,t){void 0===t&&(t=0);for(var n=this.coefficients,r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);for(var n=this.coefficients,r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}}),(0,je.default)(Fp,{getBasisAt:function(e,t){var n=e.x,r=e.y,e=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*e,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*e,t[6]=.315392*(3*e*e-1),t[7]=1.092548*n*e,t[8]=.546274*(n*n-r*r)}}),Up.prototype=(0,je.default)((0,d.default)(sp.prototype),{constructor:Up,isLightProbe:!0,copy:function(e){return sp.prototype.copy.call(this,e),this.sh.copy(e.sh),this.intensity=e.intensity,this},toJSON:function(e){return e=sp.prototype.toJSON.call(this,e),e}}),zp.prototype=(0,je.default)((0,d.default)(Up.prototype),{constructor:zp,isHemisphereLightProbe:!0,copy:function(e){return Up.prototype.copy.call(this,e),this},toJSON:function(e){return e=Up.prototype.toJSON.call(this,e),e}}),Gp.prototype=(0,je.default)((0,d.default)(Up.prototype),{constructor:Gp,isAmbientLightProbe:!0,copy:function(e){return Up.prototype.copy.call(this,e),this},toJSON:function(e){return e=Up.prototype.toJSON.call(this,e),e}});var Vp=new Jr,Hp=new Jr;function jp(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new mo,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new mo,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}}function Wp(e){this.autoStart=void 0===e||e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}(0,je.default)(jp.prototype,{update:function(e){var t,n,r,i,a=this._cache,o=a.focus!==e.focus||a.fov!==e.fov||a.aspect!==e.aspect*this.aspect||a.near!==e.near||a.far!==e.far||a.zoom!==e.zoom||a.eyeSep!==this.eyeSep;o&&(a.focus=e.focus,a.fov=e.fov,a.aspect=e.aspect*this.aspect,a.near=e.near,a.far=e.far,a.zoom=e.zoom,a.eyeSep=this.eyeSep,t=e.projectionMatrix.clone(),i=a.eyeSep/2,n=i*a.near/a.focus,r=a.near*Math.tan(Rr.DEG2RAD*a.fov*.5)/a.zoom,Hp.elements[12]=-i,Vp.elements[12]=i,o=-r*a.aspect+n,i=r*a.aspect+n,t.elements[0]=2*a.near/(i-o),t.elements[8]=(i+o)/(i-o),this.cameraL.projectionMatrix.copy(t),o=-r*a.aspect-n,i=r*a.aspect-n,t.elements[0]=2*a.near/(i-o),t.elements[8]=(i+o)/(i-o),this.cameraR.projectionMatrix.copy(t)),this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Hp),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(Vp)}}),(0,je.default)(Wp.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var e,t=0;return this.autoStart&&!this.running?(this.start(),0):(this.running&&(e=("undefined"==typeof performance?Date:performance).now(),t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t),t)}});var Yp=new Vr,qp=new Ur,Xp=new Vr,Zp=new Vr;function Jp(){pi.call(this),this.type="AudioListener",this.context=Op.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Wp}function Kp(e){pi.call(this),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.sourceType="empty",this._startedAt=0,this._pausedAt=0,this.filters=[]}Jp.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:Jp,getInput:function(){return this.gain},removeFilter:function(){return null!==(0,b.default)(this)&&(this.gain.disconnect((0,b.default)(this)),(0,b.default)(this).disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},getFilter:function(){return(0,b.default)(this)},setFilter:function(e){return null!==(0,b.default)(this)?(this.gain.disconnect((0,b.default)(this)),(0,b.default)(this).disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect((0,b.default)(this)),(0,b.default)(this).connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this},updateMatrixWorld:function(e){pi.prototype.updateMatrixWorld.call(this,e);var t=this.context.listener,n=this.up;this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Yp,qp,Xp),Zp.set(0,0,-1).applyQuaternion(qp),t.positionX?(e=this.context.currentTime+this.timeDelta,t.positionX.linearRampToValueAtTime(Yp.x,e),t.positionY.linearRampToValueAtTime(Yp.y,e),t.positionZ.linearRampToValueAtTime(Yp.z,e),t.forwardX.linearRampToValueAtTime(Zp.x,e),t.forwardY.linearRampToValueAtTime(Zp.y,e),t.forwardZ.linearRampToValueAtTime(Zp.z,e),t.upX.linearRampToValueAtTime(n.x,e),t.upY.linearRampToValueAtTime(n.y,e),t.upZ.linearRampToValueAtTime(n.z,e)):(t.setPosition(Yp.x,Yp.y,Yp.z),t.setOrientation(Zp.x,Zp.y,Zp.z,n.x,n.y,n.z))}}),Kp.prototype=(0,je.default)((0,d.default)(pi.prototype),{constructor:Kp,getOutput:function(){return this.gain},setNodeSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},setMediaElementSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this},setMediaStreamSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this},setBuffer:function(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(e){if(void 0===e&&(e=0),!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){this._startedAt=this.context.currentTime+e;var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=(0,N.default)(e=this.onEnded).call(e,this),t.start(this._startedAt,this._pausedAt+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._pausedAt+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this._pausedAt=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var 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},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var 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},getFilters:function(){return this.filters},setFilters:function(e){return e=e||[],!0===this.isPlaying?(this.disconnect(),this.filters=e,this.connect()):this.filters=e,this},setDetune:function(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this},getDetune:function(){return this.detune},getFilter:function(){return this.getFilters()[0]},setFilter:function(e){return this.setFilters(e?[e]:[])},setPlaybackRate:function(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},setLoopStart:function(e){return this.loopStart=e,this},setLoopEnd:function(e){return this.loopEnd=e,this},getVolume:function(){return this.gain.gain.value},setVolume:function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}});var Qp=new Vr,$p=new Ur,em=new Vr,tm=new Vr;function nm(e){Kp.call(this,e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}function rm(e,t){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=void 0!==t?t:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}function im(e,t,n){this.binding=e,this.valueSize=n;var r,i=Float64Array;switch(t){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}nm.prototype=(0,je.default)((0,d.default)(Kp.prototype),{constructor:nm,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(e){return this.panner.refDistance=e,this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(e){return this.panner.rolloffFactor=e,this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(e){return this.panner.distanceModel=e,this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(e){return this.panner.maxDistance=e,this},setDirectionalCone:function(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this},updateMatrixWorld:function(e){var t;pi.prototype.updateMatrixWorld.call(this,e),!0===this.hasPlaybackControl&&!1===this.isPlaying||(this.matrixWorld.decompose(Qp,$p,em),tm.set(0,0,1).applyQuaternion($p),t=this.panner,t.positionX?(e=this.context.currentTime+this.listener.timeDelta,t.positionX.linearRampToValueAtTime(Qp.x,e),t.positionY.linearRampToValueAtTime(Qp.y,e),t.positionZ.linearRampToValueAtTime(Qp.z,e),t.orientationX.linearRampToValueAtTime(tm.x,e),t.orientationY.linearRampToValueAtTime(tm.y,e),t.orientationZ.linearRampToValueAtTime(tm.z,e)):(t.setPosition(Qp.x,Qp.y,Qp.z),t.setOrientation(tm.x,tm.y,tm.z)))}}),(0,je.default)(rm.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var e=0,t=this.getFrequencyData(),n=0;n<t.length;n++)e+=t[n];return e/t.length}}),(0,je.default)(im.prototype,{accumulate:function(e,t){var n=this.buffer,r=this.valueSize,i=e*r+r,e=this.cumulativeWeight;if(0===e){for(var a=0;a!==r;++a)n[i+a]=n[a];e=t}else e+=t,t/=e,this._mixBufferRegion(n,i,0,t,r);this.cumulativeWeight=e},apply:function(e){var t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,a=this.binding;this.cumulativeWeight=0,i<1&&(e=3*t,this._mixBufferRegion(n,r,e,1-i,t));for(var o=t,s=t+t;o!==s;++o)if(n[o]!==n[o+t]){a.setValue(n,r);break}},saveOriginalState:function(){var e=this.binding,t=this.buffer,n=this.valueSize,r=3*n;e.getValue(t,r);for(var i=n,a=r;i!==a;++i)t[i]=t[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)},_select:function(e,t,n,r,i){if(.5<=r)for(var a=0;a!==i;++a)e[t+a]=e[n+a]},_slerp:function(e,t,n,r){Ur.slerpFlat(e,t,e,t,e,n,r)},_lerp:function(e,t,n,r,i){for(var a=1-r,o=0;o!==i;++o){var s=t+o;e[s]=e[s]*a+e[n+o]*r}}});var am,om,sm,lm,Tr="\\[\\]\\.:\\/",um=new RegExp("["+Tr+"]","g"),Er="[^"+Tr+"]",ao="[^"+Tr.replace("\\.","")+"]",M=/((?:WC+[\/:])*)/.source.replace("WC",Er),Tr=/(WCOD+)?/.source.replace("WCOD",ao),ao=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Er),Er=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Er),hm=new RegExp("^"+M+Tr+ao+Er+"$"),cm=["material","materials","bones"];function dm(e,t,n){n=n||fm.parseTrackName(t),this._targetGroup=e,this._bindings=e.subscribe_(t,n)}function fm(e,t,n){this.path=t,this.parsedPath=n||fm.parseTrackName(t),this.node=fm.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function pm(){this.uuid=Rr.generateUUID(),this._objects=(0,y.default)(Array.prototype).call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function mm(e,t,n){this._mixer=e,this._clip=t,this._localRoot=n||null;for(var r=t.tracks,i=r.length,a=new Array(i),o={endingStart:Bn,endingEnd:Bn},s=0;s!==i;++s){var l=r[s].createInterpolant(null);a[s]=l,l.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=kn,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=Infinity,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function vm(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function gm(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}function ym(e,t,n){Eh.call(this,e,t),this.meshPerAttribute=n||1}function _m(e,t,n,r){this.ray=new zi(e,t),this.near=n||0,this.far=r||Infinity,this.camera=null,this.layers=new ei,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}},(0,u.default)(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function xm(e,t){return e.distance-t.distance}function wm(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r)for(var i=e.children,a=0,o=i.length;a<o;a++)wm(i[a],t,n,!0)}function bm(e,t,n){return this.radius=void 0!==e?e:1,this.phi=void 0!==t?t:0,this.theta=void 0!==n?n:0,this}function Mm(e,t,n){return this.radius=void 0!==e?e:1,this.theta=void 0!==t?t:0,this.y=void 0!==n?n:0,this}(0,je.default)(dm.prototype,{getValue:function(e,t){(0,N.default)(n=this).call(n);var n=this._targetGroup.nCachedObjects_,n=this._bindings[n];void 0!==n&&n.getValue(e,t)},setValue:function(e,t){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)},bind:function(){for(var e,t=this._bindings,n=this._targetGroup.nCachedObjects_,r=t.length;n!==r;++n)(0,N.default)(e=t[n]).call(e)},unbind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}),(0,je.default)(fm,{Composite:dm,create:function(e,t,n){return new(e&&e.isAnimationObjectGroup?fm.Composite:fm)(e,t,n)},sanitizeNodeName:function(e){return e.replace(/\s/g,"_").replace(um,"")},parseTrackName:function(e){var t=hm.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);var n,r={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},t=r.nodeName&&(0,L.default)(n=r.nodeName).call(n,".");if(void 0!==t&&-1!==t&&(n=r.nodeName.substring(t+1),-1!==(0,ce.default)(cm).call(cm,n)&&(r.nodeName=r.nodeName.substring(0,t),r.objectName=n)),null===r.propertyName||0===r.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r},findNode:function(e,i){if(!i||""===i||"."===i||-1===i||i===e.name||i===e.uuid)return e;if(e.skeleton){var t=e.skeleton.getBoneByName(i);if(void 0!==t)return t}return e.children&&(t=function e(t){for(var n=0;n<t.length;n++){var r=t[n];if(r.name===i||r.uuid===i)return r;if(r=e(r.children),r)return r}return null},e=t(e.children),e)?e:null}}),(0,je.default)(fm.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(e,t){e[t]=this.node[this.propertyName]},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)e[t++]=n[r]},function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]},function(e,t){this.resolvedProperty.toArray(e,t)}],SetterByBindingTypeAndVersioning:[[function(e,t){this.targetObject[this.propertyName]=e[t]},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++]},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty.fromArray(e,t)},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(e,t){var n;(0,N.default)(n=this).call(n),this.getValue(e,t)},setValue:function(e,t){var n;(0,N.default)(n=this).call(n),this.setValue(e,t)},bind:function(){var e=this.node,t=this.parsedPath,n=t.objectName,r=t.propertyName,i=t.propertyIndex;if(e||(e=fm.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,e){if(n){var a=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);for(var e=e.skeleton.bones,o=0;o<e.length;o++)if(e[o].name===a){a=o;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==a){if(void 0===e[a])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[a]}}var s=e[r];if(void 0!==s){var l=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?l=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(l=this.Versioning.MatrixWorldNeedsUpdate);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(e.geometry.isBufferGeometry){if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(o=0;o<this.node.geometry.morphAttributes.position.length;o++)if(e.geometry.morphAttributes.position[o].name===i){i=o;break}}else{if(!e.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(o=0;o<this.node.geometry.morphTargets.length;o++)if(e.geometry.morphTargets[o].name===i){i=o;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):(0,We.default)(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][l]}else t=t.nodeName,console.error("THREE.PropertyBinding: Trying to update property for track: "+t+"."+r+" but it wasn't found.",e)}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),(0,je.default)(fm.prototype,{_getValue_unbound:fm.prototype.getValue,_setValue_unbound:fm.prototype.setValue}),(0,je.default)(bf.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(e,t,n){for(var r=[],i=0;i<e.length;++i)r[i]=this.createMaterial(e[i],t,n);return r},createMaterial:(am={NoBlending:ge,NormalBlending:ye,AdditiveBlending:_e,SubtractiveBlending:xe,MultiplyBlending:we,CustomBlending:be},om=new aa,sm=new Rf,lm=new _p,function(e,o,s){var l={};function t(e,t,n,r,i){var a=o+e,e=new xf,e=e.getHandler(a),a=null!==e?e.load(a):(sm.setCrossOrigin(s),sm.load(a));return void 0!==t&&((0,f.default)(a).fromArray(t),1!==t[0]&&(a.wrapS=at),1!==t[1]&&(a.wrapT=at)),void 0!==n&&a.offset.fromArray(n),void 0!==r&&("repeat"===r[0]&&(a.wrapS=at),"mirror"===r[0]&&(a.wrapS=st),"repeat"===r[1]&&(a.wrapT=at),"mirror"===r[1]&&(a.wrapT=st)),void 0!==i&&(a.anisotropy=i),i=Rr.generateUUID(),l[i]=a,i}var n,r={uuid:Rr.generateUUID(),type:"MeshLambertMaterial"};for(n in e){var i=e[n];switch(n){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":r.name=i;break;case"blending":r.blending=am[i];break;case"colorAmbient":case"mapAmbient":break;case"colorDiffuse":r.color=om.fromArray(i).getHex();break;case"colorSpecular":r.specular=om.fromArray(i).getHex();break;case"colorEmissive":r.emissive=om.fromArray(i).getHex();break;case"specularCoef":r.shininess=i;break;case"shading":"basic"===i.toLowerCase()&&(r.type="MeshBasicMaterial"),"phong"===i.toLowerCase()&&(r.type="MeshPhongMaterial"),"standard"===i.toLowerCase()&&(r.type="MeshStandardMaterial");break;case"mapDiffuse":r.map=t(i,e.mapDiffuseRepeat,e.mapDiffuseOffset,e.mapDiffuseWrap,e.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":r.emissiveMap=t(i,e.mapEmissiveRepeat,e.mapEmissiveOffset,e.mapEmissiveWrap,e.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":r.lightMap=t(i,e.mapLightRepeat,e.mapLightOffset,e.mapLightWrap,e.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":r.aoMap=t(i,e.mapAORepeat,e.mapAOOffset,e.mapAOWrap,e.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":r.bumpMap=t(i,e.mapBumpRepeat,e.mapBumpOffset,e.mapBumpWrap,e.mapBumpAnisotropy);break;case"mapBumpScale":r.bumpScale=i;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":r.normalMap=t(i,e.mapNormalRepeat,e.mapNormalOffset,e.mapNormalWrap,e.mapNormalAnisotropy);break;case"mapNormalFactor":r.normalScale=i;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":r.specularMap=t(i,e.mapSpecularRepeat,e.mapSpecularOffset,e.mapSpecularWrap,e.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":r.metalnessMap=t(i,e.mapMetalnessRepeat,e.mapMetalnessOffset,e.mapMetalnessWrap,e.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":r.roughnessMap=t(i,e.mapRoughnessRepeat,e.mapRoughnessOffset,e.mapRoughnessWrap,e.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":r.alphaMap=t(i,e.mapAlphaRepeat,e.mapAlphaOffset,e.mapAlphaWrap,e.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":r.side=Xe;break;case"doubleSided":r.side=ve;break;case"transparency":r.opacity=i;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":r[n]=i;break;case"vertexColors":!0===i&&(r.vertexColors=jv),"face"===i&&(r.vertexColors=Hv)}}return"MeshBasicMaterial"===r.type&&delete r.emissive,"MeshPhongMaterial"!==r.type&&delete r.specular,r.opacity<1&&(r.transparent=!0),lm.setTextures(l),lm.parse(r)})}),(0,je.default)(pm.prototype,{isAnimationObjectGroup:!0,add:function(){for(var e=this._objects,t=e.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,a=this._parsedPaths,o=this._bindings,s=o.length,l=void 0,u=0,h=arguments.length;u!==h;++u){var c=arguments[u],d=c.uuid,f=r[d];if(void 0===f){f=t++,r[d]=f,e.push(c);for(var p=0,m=s;p!==m;++p)o[p].push(new fm(c,i[p],a[p]))}else if(f<n){var l=e[f],v=--n,g=e[v];for(r[g.uuid]=f,e[f]=g,r[d]=v,e[v]=c,p=0,m=s;p!==m;++p){var y=o[p],_=y[v],x=y[f];y[f]=_,void 0===x&&(x=new fm(c,i[p],a[p])),y[v]=x}}else e[f]!==l&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var e=this._objects,t=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,a=0,o=arguments.length;a!==o;++a){var s=arguments[a],l=s.uuid,u=n[l];if(void 0!==u&&t<=u){var h=t++,c=e[h];n[c.uuid]=u,e[u]=c,n[l]=h,e[h]=s;for(var d=0,f=i;d!==f;++d){var p=r[d],m=p[h],v=p[u];p[u]=m,p[h]=v}}}this.nCachedObjects_=t},uncache:function(){for(var e=this._objects,t=e.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,a=i.length,o=0,s=arguments.length;o!==s;++o){var l=arguments[o],l=l.uuid,u=r[l];if(void 0!==u)if(delete r[l],u<n){var h=--n,l=e[h],c=--t,d=e[c];r[l.uuid]=u,e[u]=l,r[d.uuid]=h,e[h]=d,e.pop();for(var f=0,p=a;f!==p;++f){var m=i[f],v=m[h],g=m[c];m[u]=v,m[h]=g,m.pop()}}else for(c=--t,d=e[c],r[d.uuid]=u,e[u]=d,e.pop(),f=0,p=a;f!==p;++f)m=i[f],m[u]=m[c],m.pop()}this.nCachedObjects_=n},subscribe_:function(e,t){var n=this._bindingsIndicesByPath,r=n[e],i=this._bindings;if(void 0!==r)return i[r];var a=this._paths,o=this._parsedPaths,s=this._objects,l=s.length,u=this.nCachedObjects_,h=new Array(l),r=i.length;n[e]=r,a.push(e),o.push(t),i.push(h);for(var c=u,d=s.length;c!==d;++c){var f=s[c];h[c]=new fm(f,e,t)}return h},unsubscribe_:function(e){var t,n,r,i,a,o=this._bindingsIndicesByPath,s=o[e];void 0!==s&&(t=this._paths,n=this._parsedPaths,r=this._bindings,i=r.length-1,a=r[i],e=e[i],o[e]=s,r[s]=a,r.pop(),n[s]=n[i],n.pop(),t[s]=t[i],t.pop())}}),(0,je.default)(mm.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(e){return this._startTime=e,this},setLoop:function(e,t){return this.loop=e,this.repetitions=t,this},setEffectiveWeight:function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(e){return this._scheduleFading(e,0,1)},fadeOut:function(e){return this._scheduleFading(e,1,0)},crossFadeFrom:function(e,t,n){var r,i;return e.fadeOut(t),this.fadeIn(t),n&&(r=this._clip.duration,i=e._clip.duration,n=i/r,i=r/i,e.warp(1,n,t),this.warp(i,1,t)),this},crossFadeTo:function(e,t,n){return e.crossFadeFrom(this,t,n)},stopFading:function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},setEffectiveTimeScale:function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()},syncWith:function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()},halt:function(e){return this.warp(this._effectiveTimeScale,0,e)},warp:function(e,t,n){var r=this._mixer,i=r.time,a=this._timeScaleInterpolant,o=this.timeScale;return null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a),r=a.parameterPositions,a=a.sampleValues,r[0]=i,r[1]=i+n,a[0]=e/o,a[1]=t/o,this},stopWarping:function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(e,t,n,r){if(this.enabled){var i=this._startTime;if(null!==i){if(i=(e-i)*n,i<0||0===n)return;this._startTime=null,t=n*i}t*=this._updateTimeScale(e);var a=this._updateTime(t),o=this._updateWeight(e);if(0<o)for(var s=this._interpolants,l=this._propertyBindings,u=0,h=s.length;u!==h;++u)s[u].evaluate(a),l[u].accumulate(r,o)}else this._updateWeight(e)},_updateWeight:function(e){var t,n,r=0;return this.enabled&&(r=this.weight,t=this._weightInterpolant,null!==t&&(n=t.evaluate(e)[0],r*=n,e>t.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1)))),this._effectiveWeight=r,r},_updateTimeScale:function(e){var t,n,r=0;return this.paused||(r=this.timeScale,t=this._timeScaleInterpolant,null!==t&&(n=t.evaluate(e)[0],r*=n,e>t.parameterPositions[1]&&(this.stopWarping(),0===r?this.paused=!0:this.timeScale=r))),this._effectiveTimeScale=r,r},_updateTime:function(e){var t,n=this.time+e,r=this._clip.duration,i=this.loop,a=this._loopCount,o=i===Pn;if(0===e)return-1!==a&&o&&1==(1&a)?r-n:n;if(i===Nn){-1===a&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r<=n)n=r;else{if(!(n<0)){this.time=n;break e}n=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else if(-1===a&&(0<=e?(a=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r<=n||n<0?(t=Math.floor(n/r),n-=r*t,a+=Math.abs(t),i=this.repetitions-a,i<=0?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=0<e?r:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<e?1:-1})):(1===i?(i=e<0,this._setEndings(i,!i,o)):this._setEndings(!1,!1,o),this._loopCount=a,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:t}))):this.time=n,o&&1==(1&a))return r-n;return n},_setEndings:function(e,t,n){var r=this._interpolantSettings;n?(r.endingStart=Fn,r.endingEnd=Fn):(r.endingStart=e?this.zeroSlopeAtStart?Fn:Bn:Un,r.endingEnd=t?this.zeroSlopeAtEnd?Fn:Bn:Un)},_scheduleFading:function(e,t,n){var r=this._mixer,i=r.time,a=this._weightInterpolant;return null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a),r=a.parameterPositions,a=a.sampleValues,r[0]=i,a[0]=t,r[1]=i+e,a[1]=n,this}}),vm.prototype=(0,je.default)((0,d.default)(Sr.prototype),{constructor:vm,_bindAction:function(e,t){var n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,o=e._interpolants,s=n.uuid,e=this._bindingsByRootAndName,l=e[s];void 0===l&&(l={},e[s]=l);for(var u=0;u!==i;++u){var h=r[u],c=h.name,d=l[c];if(void 0!==d)a[u]=d;else{if(d=a[u],void 0!==d){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,c));continue}var f=t&&t._propertyBindings[u].binding.parsedPath,d=new im(fm.create(n,c,f),h.ValueTypeName,h.getValueSize());++d.referenceCount,this._addInactiveBinding(d,s,c),a[u]=d}o[u].resultBuffer=d.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){var t,n,r;null===e._cacheIndex&&(t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n],this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t));for(var i=e._propertyBindings,a=0,o=i.length;a!==o;++a){var s=i[a];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var 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:function(e){return e=e._cacheIndex,null!==e&&e<this._nActiveActions},_addInactiveAction:function(e,t,n){var r=this._actions,i=this._actionsByClip,a=i[t];void 0===a?(a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=a):(t=a.knownActions,e._byClipCacheIndex=t.length,t.push(e)),e._cacheIndex=r.length,r.push(e),a.actionByRoot[n]=e},_removeInactiveAction:function(e){var t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;var i=e._clip.uuid,a=this._actionsByClip,o=a[i],r=o.knownActions,n=r[r.length-1],t=e._byClipCacheIndex;n._byClipCacheIndex=t,r[t]=n,r.pop(),e._byClipCacheIndex=null,n=o.actionByRoot,o=(e._localRoot||this._root).uuid,delete n[o],0===r.length&&delete a[i],this._removeInactiveBindingsForAction(e)},_removeInactiveBindingsForAction:function(e){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(e){var t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_takeBackAction:function(e){var t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_addInactiveBinding:function(e,t,n){var r=this._bindingsByRootAndName,i=r[t],a=this._bindings;void 0===i&&(i={},r[t]=i),i[n]=e,e._cacheIndex=a.length,a.push(e)},_removeInactiveBinding:function(e){var t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,a=this._bindingsByRootAndName,o=a[r],n=t[t.length-1],e=e._cacheIndex;n._cacheIndex=e,t[e]=n,t.pop(),delete o[i],0===(0,x.default)(o).length&&delete a[r]},_lendBinding:function(e){var t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_takeBackBinding:function(e){var t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_lendControlInterpolant:function(){var e=this._controlInterpolants,t=this._nActiveControlInterpolants++,n=e[t];return void 0===n&&(n=new of(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n},_takeBackControlInterpolant:function(e){var t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(e,t){var n=t||this._root,r=n.uuid,i="string"==typeof e?vf.findByName(n,e):e,a=null!==i?i.uuid:e,o=this._actionsByClip[a],n=null;if(void 0!==o){if(e=o.actionByRoot[r],void 0!==e)return e;n=o.knownActions[0],null===i&&(i=n._clip)}return null===i?null:(t=new mm(this,i,t),this._bindAction(t,n),this._addInactiveAction(t,a,r),t)},existingAction:function(e,t){var n=t||this._root,t=n.uuid,n="string"==typeof e?vf.findByName(n,e):e,e=n?n.uuid:e,e=this._actionsByClip[e];return void 0!==e&&e.actionByRoot[t]||null},stopAllAction:function(){var e=this._actions,t=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==t;++i)e[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(e){e*=this.timeScale;for(var t=this._actions,n=this._nActiveActions,r=this.time+=e,i=(0,re.default)(e),a=this._accuIndex^=1,o=0;o!==n;++o){var s=t[o];s._update(r,e,i,a)}for(var l=this._bindings,u=this._nActiveBindings,o=0;o!==u;++o)l[o].apply(a);return this},setTime:function(e){this.time=0;for(var t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)},getRoot:function(){return this._root},uncacheClip:function(e){var t=this._actions,n=e.uuid,r=this._actionsByClip,e=r[n];if(void 0!==e){for(var i=e.knownActions,a=0,o=i.length;a!==o;++a){var s=i[a];this._deactivateAction(s);var l=s._cacheIndex,u=t[t.length-1];s._cacheIndex=null,s._byClipCacheIndex=null,u._cacheIndex=l,t[l]=u,t.pop(),this._removeInactiveBindingsForAction(s)}delete r[n]}},uncacheRoot:function(e){var t,n=e.uuid,r=this._actionsByClip;for(t in r){var i=r[t].actionByRoot,i=i[n];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var e=this._bindingsByRootAndName,a=e[n];if(void 0!==a)for(var o in a)o=a[o],o.restoreOriginalState(),this._removeInactiveBinding(o)},uncacheAction:function(e,t){t=this.existingAction(e,t),null!==t&&(this._deactivateAction(t),this._removeInactiveAction(t))}}),gm.prototype.clone=function(){return new gm(void 0===this.value.clone?this.value:this.value.clone())},ym.prototype=(0,je.default)((0,d.default)(Eh.prototype),{constructor:ym,isInstancedInterleavedBuffer:!0,copy:function(e){return Eh.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this}}),(0,je.default)(_m.prototype,{set:function(e,t){this.ray.set(e,t)},setFromCamera:function(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(e,t,n){return n=n||[],wm(e,this,n,t),(0,qe.default)(n).call(n,xm),n},intersectObjects:function(e,t,n){var r=n||[];if(!1===(0,We.default)(e))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,a=e.length;i<a;i++)wm(e[i],this,r,t);return(0,qe.default)(r).call(r,xm),r}}),(0,je.default)(bm.prototype,{set:function(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this},makeSafe:function(){var e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this},setFromVector3:function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},setFromCartesianCoords:function(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Rr.clamp(t/this.radius,-1,1))),this}}),(0,je.default)(Mm.prototype,{set:function(e,t,n){return this.radius=e,this.theta=t,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this},setFromVector3:function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},setFromCartesianCoords:function(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}});var Tm=new Nr;function Em(e,t){this.min=void 0!==e?e:new Nr(Infinity,Infinity),this.max=void 0!==t?t:new Nr(-Infinity,-Infinity)}(0,je.default)(Em.prototype,{set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(e,t){return t=Tm.copy(t).multiplyScalar(.5),this.min.copy(e).sub(t),this.max.copy(e).add(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=Infinity,this.max.x=this.max.y=-Infinity,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box2: .getCenter() target is now required"),e=new Nr),this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box2: .getSize() target is now required"),e=new Nr),this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)},containsBox:function(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:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new Nr),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:function(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:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new Nr),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){var t=Tm.copy(e).clamp(this.min,this.max);return t.sub(e).length()},intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}});var Sm=new Vr,Am=new Vr;function Im(e,t){this.start=void 0!==e?e:new Vr,this.end=void 0!==t?t:new Vr}function Lm(e){pi.call(this),this.material=e,this.render=function(){}}(0,je.default)(Im.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new Vr),e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new Vr),e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new Vr),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(e,t){Sm.subVectors(e,this.start),Am.subVectors(this.end,this.start);var n=Am.dot(Am),e=Am.dot(Sm),n=e/n;return t&&(n=Rr.clamp(n,0,1)),n},closestPointToPoint:function(e,t,n){return t=this.closestPointToPointParameter(e,t),void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Vr),this.delta(n).multiplyScalar(t).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),Lm.prototype=(0,d.default)(pi.prototype),Lm.prototype.constructor=Lm,Lm.prototype.isImmediateRenderObject=!0;var Rm=new Vr;function Nm(e,t){pi.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;for(var e=new Pa,n=[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],r=0,i=1,a=32;r<a;r++,i++){var o=r/a*Math.PI*2,s=i/a*Math.PI*2;n.push(Math.cos(o),Math.sin(o),1,Math.cos(s),Math.sin(s),1)}e.setAttribute("position",new ba(n,3)),t=new rc({fog:!1,toneMapped:!1}),this.cone=new dc(e,t),this.add(this.cone),this.update()}Nm.prototype=(0,d.default)(pi.prototype),Nm.prototype.constructor=Nm,Nm.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Nm.prototype.update=function(){this.light.updateMatrixWorld();var e=this.light.distance||1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),Rm.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Rm),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var km=new Vr,Pm=new Jr,Cm=new Jr;function Dm(e){var t=[];e&&e.isBone&&t.push(e);for(var n=0;n<e.children.length;n++)t.push.apply(t,Dm(e.children[n]));return t}function Om(e){for(var t=Dm(e),n=new Pa,r=[],i=[],a=new aa(0,0,1),o=new aa(0,1,0),s=0;s<t.length;s++){var l=t[s];l.parent&&l.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(a.r,a.g,a.b),i.push(o.r,o.g,o.b))}n.setAttribute("position",new ba(r,3)),n.setAttribute("color",new ba(i,3));var u=new rc({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});dc.call(this,n,u),this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}function Bm(e,t,n){this.light=e,this.light.updateMatrixWorld(),this.color=n,n=new Ld(t,4,2),t=new da({wireframe:!0,fog:!1,toneMapped:!1}),Ka.call(this,n,t),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}Om.prototype=(0,d.default)(dc.prototype),Om.prototype.constructor=Om,Om.prototype.isSkeletonHelper=!0,Om.prototype.updateMatrixWorld=function(e){var t=this.bones,n=this.geometry,r=n.getAttribute("position");Cm.getInverse(this.root.matrixWorld);for(var i=0,a=0;i<t.length;i++){var o=t[i];o.parent&&o.parent.isBone&&(Pm.multiplyMatrices(Cm,o.matrixWorld),km.setFromMatrixPosition(Pm),r.setXYZ(a,km.x,km.y,km.z),Pm.multiplyMatrices(Cm,o.parent.matrixWorld),km.setFromMatrixPosition(Pm),r.setXYZ(a+1,km.x,km.y,km.z),a+=2)}n.getAttribute("position").needsUpdate=!0,pi.prototype.updateMatrixWorld.call(this,e)},Bm.prototype=(0,d.default)(Ka.prototype),Bm.prototype.constructor=Bm,Bm.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Bm.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)};var Fm=new Vr,Um=new aa,zm=new aa;function Gm(e,t,n){pi.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,n=new Pc(t),n.rotateY(.5*Math.PI),this.material=new da({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0),t=n.getAttribute("position"),t=new Float32Array(3*t.count),n.setAttribute("color",new pa(t,3)),this.add(new Ka(n,this.material)),this.update()}function Vm(e,t,n,r){e=e||10,t=t||10,n=new aa(void 0!==n?n:4473924),r=new aa(void 0!==r?r:8947848);for(var i=t/2,a=e/t,o=e/2,s=[],l=[],u=0,h=0,c=-o;u<=t;u++,c+=a){s.push(-o,0,c,o,0,c),s.push(c,0,-o,c,0,o);var d=u===i?n:r;d.toArray(l,h),h+=3,d.toArray(l,h),h+=3,d.toArray(l,h),h+=3,d.toArray(l,h),h+=3}var f=new Pa;f.setAttribute("position",new ba(s,3)),f.setAttribute("color",new ba(l,3)),e=new rc({vertexColors:!0,toneMapped:!1}),dc.call(this,f,e)}function Hm(e,t,n,r,i,a){e=e||10,t=t||16,n=n||8,r=r||64,i=new aa(void 0!==i?i:4473924),a=new aa(void 0!==a?a:8947848);for(var o,s,l,u,h,c,d=[],f=[],p=0;p<=t;p++)l=p/t*(2*Math.PI),o=Math.sin(l)*e,s=Math.cos(l)*e,d.push(0,0,0),d.push(o,0,s),c=1&p?i:a,f.push(c.r,c.g,c.b),f.push(c.r,c.g,c.b);for(p=0;p<=n;p++)for(c=1&p?i:a,h=e-e/n*p,u=0;u<r;u++)l=u/r*(2*Math.PI),o=Math.sin(l)*h,s=Math.cos(l)*h,d.push(o,0,s),f.push(c.r,c.g,c.b),l=(u+1)/r*(2*Math.PI),o=Math.sin(l)*h,s=Math.cos(l)*h,d.push(o,0,s),f.push(c.r,c.g,c.b);var m=new Pa;m.setAttribute("position",new ba(d,3)),m.setAttribute("color",new ba(f,3));var v=new rc({vertexColors:!0,toneMapped:!1});dc.call(this,m,v)}Gm.prototype=(0,d.default)(pi.prototype),Gm.prototype.constructor=Gm,Gm.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Gm.prototype.update=function(){var e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var t=e.geometry.getAttribute("color");Um.copy(this.light.color),zm.copy(this.light.groundColor);for(var n=0,r=t.count;n<r;n++){var i=n<r/2?Um:zm;t.setXYZ(n,i.r,i.g,i.b)}t.needsUpdate=!0}e.lookAt(Fm.setFromMatrixPosition(this.light.matrixWorld).negate())},Vm.prototype=(0,je.default)((0,d.default)(dc.prototype),{constructor:Vm,copy:function(e){return dc.prototype.copy.call(this,e),this.geometry.copy(e.geometry),this.material.copy(e.material),this},clone:function(){return(new this.constructor).copy(this)}}),Hm.prototype=(0,d.default)(dc.prototype),Hm.prototype.constructor=Hm;var jm=new Vr,Wm=new Vr,Ym=new Vr;function qm(e,t,n){pi.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===t&&(t=1),n=new Pa,n.setAttribute("position",new ba([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3)),t=new rc({fog:!1,toneMapped:!1}),this.lightPlane=new uc(n,t),this.add(this.lightPlane),n=new Pa,n.setAttribute("position",new ba([0,0,0,0,0,1],3)),this.targetLine=new uc(n,t),this.add(this.targetLine),this.update()}qm.prototype=(0,d.default)(pi.prototype),qm.prototype.constructor=qm,qm.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},qm.prototype.update=function(){jm.setFromMatrixPosition(this.light.matrixWorld),Wm.setFromMatrixPosition(this.light.target.matrixWorld),Ym.subVectors(Wm,jm),this.lightPlane.lookAt(Wm),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(Wm),this.targetLine.scale.z=Ym.length()};var Xm=new Vr,Zm=new po;function Jm(e){var t=new Pa,n=new rc({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],i=[],a={},o=new aa(16755200),s=new aa(16711680),l=new aa(43775),u=new aa(16777215),h=new aa(3355443);function c(e,t,n){d(e,n),d(t,n)}function d(e,t){r.push(0,0,0),i.push(t.r,t.g,t.b),void 0===a[e]&&(a[e]=[]),a[e].push(r.length/3-1)}c("n1","n2",o),c("n2","n4",o),c("n4","n3",o),c("n3","n1",o),c("f1","f2",o),c("f2","f4",o),c("f4","f3",o),c("f3","f1",o),c("n1","f1",o),c("n2","f2",o),c("n3","f3",o),c("n4","f4",o),c("p","n1",s),c("p","n2",s),c("p","n3",s),c("p","n4",s),c("u1","u2",l),c("u2","u3",l),c("u3","u1",l),c("c","t",u),c("p","c",h),c("cn1","cn2",h),c("cn3","cn4",h),c("cf1","cf2",h),c("cf3","cf4",h),t.setAttribute("position",new ba(r,3)),t.setAttribute("color",new ba(i,3)),dc.call(this,t,n),this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}function Km(e,t,n,r,i,a,o){Xm.set(i,a,o).unproject(r);var s=t[e];if(void 0!==s)for(var l=n.getAttribute("position"),u=0,h=s.length;u<h;u++)l.setXYZ(s[u],Xm.x,Xm.y,Xm.z)}Jm.prototype=(0,d.default)(dc.prototype),Jm.prototype.constructor=Jm,Jm.prototype.update=function(){var e=this.geometry,t=this.pointMap,n=1,r=1;Zm.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),Km("c",t,e,Zm,0,0,-1),Km("t",t,e,Zm,0,0,1),Km("n1",t,e,Zm,-n,-r,-1),Km("n2",t,e,Zm,n,-r,-1),Km("n3",t,e,Zm,-n,r,-1),Km("n4",t,e,Zm,n,r,-1),Km("f1",t,e,Zm,-n,-r,1),Km("f2",t,e,Zm,n,-r,1),Km("f3",t,e,Zm,-n,r,1),Km("f4",t,e,Zm,n,r,1),Km("u1",t,e,Zm,.7*n,1.1*r,-1),Km("u2",t,e,Zm,.7*-n,1.1*r,-1),Km("u3",t,e,Zm,0,2*r,-1),Km("cf1",t,e,Zm,-n,0,1),Km("cf2",t,e,Zm,n,0,1),Km("cf3",t,e,Zm,0,-r,1),Km("cf4",t,e,Zm,0,r,1),Km("cn1",t,e,Zm,-n,0,-1),Km("cn2",t,e,Zm,n,0,-1),Km("cn3",t,e,Zm,0,-r,-1),Km("cn4",t,e,Zm,0,r,-1),e.getAttribute("position").needsUpdate=!0};var Qm=new Li;function $m(e,t){this.object=e,void 0===t&&(t=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),e=new Pa;e.setIndex(new pa(n,1)),e.setAttribute("position",new pa(r,3)),dc.call(this,e,new rc({color:t,toneMapped:!1})),this.matrixAutoUpdate=!1,this.update()}function ev(e,t){this.type="Box3Helper",this.box=e,t=t||16776960;var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],e=new Pa;e.setIndex(new pa(n,1)),e.setAttribute("position",new ba(r,3)),dc.call(this,e,new rc({color:t,toneMapped:!1})),this.geometry.computeBoundingSphere()}function tv(e,t,n){this.type="PlaneHelper",this.plane=e,this.size=void 0===t?1:t,e=void 0!==n?n:16776960,t=[1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],n=new Pa,n.setAttribute("position",new ba(t,3)),n.computeBoundingSphere(),uc.call(this,n,new rc({color:e,toneMapped:!1})),t=[1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],n=new Pa,n.setAttribute("position",new ba(t,3)),n.computeBoundingSphere(),this.add(new Ka(n,new da({color:e,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}$m.prototype=(0,d.default)(dc.prototype),$m.prototype.constructor=$m,$m.prototype.update=function(e){var t,n,r;void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&Qm.setFromObject(this.object),Qm.isEmpty()||(t=Qm.min,n=Qm.max,r=this.geometry.attributes.position,e=r.array,e[0]=n.x,e[1]=n.y,e[2]=n.z,e[3]=t.x,e[4]=n.y,e[5]=n.z,e[6]=t.x,e[7]=t.y,e[8]=n.z,e[9]=n.x,e[10]=t.y,e[11]=n.z,e[12]=n.x,e[13]=n.y,e[14]=t.z,e[15]=t.x,e[16]=n.y,e[17]=t.z,e[18]=t.x,e[19]=t.y,e[20]=t.z,e[21]=n.x,e[22]=t.y,e[23]=t.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere())},$m.prototype.setFromObject=function(e){return this.object=e,this.update(),this},$m.prototype.copy=function(e){return dc.prototype.copy.call(this,e),this.object=e.object,this},$m.prototype.clone=function(){return(new this.constructor).copy(this)},ev.prototype=(0,d.default)(dc.prototype),ev.prototype.constructor=ev,ev.prototype.updateMatrixWorld=function(e){var t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),pi.prototype.updateMatrixWorld.call(this,e))},tv.prototype=(0,d.default)(uc.prototype),tv.prototype.constructor=tv,tv.prototype.updateMatrixWorld=function(e){var t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.children[0].material.side=t<0?Xe:W,this.lookAt(this.plane.normal),pi.prototype.updateMatrixWorld.call(this,e)};var nv,rv,iv=new Vr;function av(e,t,n,r,i,a){pi.call(this),void 0===e&&(e=new Vr(0,0,1)),void 0===t&&(t=new Vr(0,0,0)),void 0===n&&(n=1),void 0===r&&(r=16776960),void 0===i&&(i=.2*n),void 0===a&&(a=.2*i),void 0===nv&&(nv=new Pa,nv.setAttribute("position",new ba([0,0,0,0,1,0],3)),rv=new Ud(0,.5,1,5,1),rv.translate(0,-.5,0)),this.position.copy(t),this.line=new uc(nv,new rc({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Ka(rv,new da({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,i,a)}function ov(e){e=e||1;var t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],e=new Pa;e.setAttribute("position",new ba(t,3)),e.setAttribute("color",new ba(n,3)),n=new rc({vertexColors:!0,toneMapped:!1}),dc.call(this,e,n)}av.prototype=(0,d.default)(pi.prototype),av.prototype.constructor=av,av.prototype.setDirection=function(e){.99999<e.y?this.quaternion.set(0,0,0,1):e.y<-.99999?this.quaternion.set(1,0,0,0):(iv.set(e.z,0,-e.x).normalize(),e=Math.acos(e.y),this.quaternion.setFromAxisAngle(iv,e))},av.prototype.setLength=function(e,t,n){void 0===t&&(t=.2*e),void 0===n&&(n=.2*t),this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()},av.prototype.setColor=function(e){this.line.material.color.set(e),this.cone.material.color.set(e)},av.prototype.copy=function(e){return pi.prototype.copy.call(this,e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this},av.prototype.clone=function(){return(new this.constructor).copy(this)},ov.prototype=(0,d.default)(dc.prototype),ov.prototype.constructor=ov;var sv=4,lv=8,uv=Math.pow(2,lv),hv=[.125,.215,.35,.446,.526,.582],cv=lv-sv+1+hv.length,dv=20,fv=(ao={},(0,he.default)(ao,Hn,0),(0,he.default)(ao,jn,1),(0,he.default)(ao,Yn,2),(0,he.default)(ao,Xn,3),(0,he.default)(ao,Zn,4),(0,he.default)(ao,Jn,5),(0,he.default)(ao,Wn,6),ao),pv=new pp,mv=Bv(dv),vv=null,gv=null,Er=Sv(),yv=Er._lodPlanes,_v=Er._sizeLods,xv=Er._sigmas,wv=null,bv=null,Mv=null,ao=(1+Math.sqrt(5))/2,Er=1/ao,Tv=[new Vr(1,1,1),new Vr(-1,1,1),new Vr(1,1,-1),new Vr(-1,1,-1),new Vr(0,ao,Er),new Vr(0,ao,-Er),new Vr(Er,0,ao),new Vr(-Er,0,ao),new Vr(ao,Er,0),new Vr(-ao,Er,0)];function Ev(e){bv=e,Nv(mv)}function Sv(){for(var e=[],t=[],n=[],r=lv,i=0;i<cv;i++){var a=Math.pow(2,r);t.push(a);var o=1/a;lv-sv<i?o=hv[i-lv+sv-1]:0==i&&(o=0),n.push(o);for(var o=1/(a-1),a=-o/2,o=1+o/2,s=[a,a,o,a,o,o,a,a,o,o,a,o],l=6,u=6,h=3,c=2,d=1,f=new Float32Array(h*u*l),p=new Float32Array(c*u*l),m=new Float32Array(d*u*l),v=0;v<l;v++){var g=v%3*2/3-1,y=2<v?0:-1,y=[g,y,0,g+2/3,y,0,g+2/3,y+1,0,g,y,0,g+2/3,y+1,0,g,y+1,0];f.set(y,h*u*v),p.set(s,c*u*v),y=[v,v,v,v,v,v],m.set(y,d*u*v)}o=new Pa,o.setAttribute("position",new pa(f,h)),o.setAttribute("uv",new pa(p,c)),o.setAttribute("faceIndex",new pa(m,d)),e.push(o),sv<r&&r--}return{_lodPlanes:e,_sizeLods:t,_sigmas:n}}function Av(e){var t={magFilter:lt,minFilter:lt,generateMipmaps:!1,type:e?e.type:yt,format:e?e.format:Dt,encoding:e?e.encoding:Yn,depthBuffer:!1,stencilBuffer:!1},n=kv(t);return n.depthBuffer=!e,wv=kv(t),n}function Iv(e){wv.dispose(),bv.setRenderTarget(Mv),e.scissorTest=!1,e.setSize(e.width,e.height)}function Lv(e,t,n,r){var i=90,a=1,o=new mo(i,a,t,n),s=[1,1,1,1,-1,1],l=[1,1,-1,-1,-1,1],u=bv.outputEncoding,h=bv.toneMapping,c=bv.toneMappingExposure,i=bv.getClearColor(),a=bv.getClearAlpha();bv.toneMapping=Qe,bv.toneMappingExposure=1,bv.outputEncoding=Hn,e.scale.z*=-1,t=e.background,t&&t.isColor&&(t.convertSRGBToLinear(),n=Math.max(t.r,t.g,t.b),n=Math.min(Math.max(Math.ceil((0,k.default)(n)),-128),127),t=t.multiplyScalar(Math.pow(2,-n)),n=(n+128)/255,bv.setClearColor(t,n),e.background=null);for(var d=0;d<6;d++){var f=d%3;0==f?(o.up.set(0,s[d],0),o.lookAt(l[d],0,0)):1==f?(o.up.set(0,0,s[d]),o.lookAt(0,l[d],0)):(o.up.set(0,s[d],0),o.lookAt(0,0,l[d])),Pv(r,f*uv,2<d?uv:0,uv,uv),bv.setRenderTarget(r),bv.render(e,o)}bv.toneMapping=h,bv.toneMappingExposure=c,bv.outputEncoding=u,bv.setClearColor(i,a),e.scale.z*=-1}function Rv(e,t){var n=new mi;e.isCubeTexture?null==gv&&(gv=Uv()):null==vv&&(vv=Fv());var r=e.isCubeTexture?gv:vv;n.add(new Ka(yv[0],r)),r=r.uniforms,r.envMap.value=e,e.isCubeTexture||r.texelSize.value.set(1/e.image.width,1/e.image.height),r.inputEncoding.value=fv[e.encoding],r.outputEncoding.value=fv[e.encoding],Pv(t,0,0,3*uv,2*uv),bv.setRenderTarget(t),bv.render(n,pv)}function Nv(e){var t=new mi;t.add(new Ka(yv[0],e)),bv.compile(t,pv)}function kv(e){return e=new Br(3*uv,3*uv,e),e.texture.mapping=rt,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function Pv(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function Cv(e){var t=bv.autoClear;bv.autoClear=!1;for(var n=1;n<cv;n++){var r=Math.sqrt(xv[n]*xv[n]-xv[n-1]*xv[n-1]),i=Tv[(n-1)%Tv.length];Dv(e,n-1,n,r,i)}bv.autoClear=t}function Dv(e,t,n,r,i){Ov(e,wv,t,n,r,"latitudinal",i),Ov(wv,e,n,n,r,"longitudinal",i)}function Ov(e,t,n,r,i,a,o){"latitudinal"!==a&&"longitudinal"!==a&&console.error("blur direction must be either latitudinal or longitudinal!");var s=3,l=new mi;l.add(new Ka(yv[r],mv));var u=mv.uniforms,h=_v[n]-1,h=isFinite(i)?Math.PI/(2*h):2*Math.PI/(2*dv-1),c=i/h,d=isFinite(i)?1+Math.floor(s*c):dv;dv<d&&console.warn((0,oe.default)(i=(0,oe.default)(i="sigmaRadians, ".concat(i,", is too large and will clip, as it requested ")).call(i,d," samples when the maximum is set to ")).call(i,dv));for(var f=[],p=0,m=0;m<dv;++m){var v=m/c,g=Math.exp(-v*v/2);f.push(g),0==m?p+=g:m<d&&(p+=2*g)}for(m=0;m<f.length;m++)f[m]=f[m]/p;u.envMap.value=e.texture,u.samples.value=d,u.weights.value=f,u.latitudinal.value="latitudinal"===a,o&&(u.poleAxis.value=o),u.dTheta.value=h,u.mipInt.value=lv-n,u.inputEncoding.value=fv[e.texture.encoding],u.outputEncoding.value=fv[e.texture.encoding],e=_v[r],v=3*Math.max(0,uv-2*e),r=(0===r?0:2*uv)+2*e*(lv-sv<r?r-lv+sv:0),Pv(t,v,r,3*e,2*e),bv.setRenderTarget(t),bv.render(l,pv)}function Bv(e){var t=new Float32Array(e),n=new Vr(0,1,0),n=new Yd({defines:{n:e},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n},inputEncoding:{value:fv[Hn]},outputEncoding:{value:fv[Hn]}},vertexShader:zv(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n".concat(Gv(),"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include <cube_uv_reflection_fragment>\n\nvec3 getSample(float theta, vec3 axis) {\n\tfloat cosTheta = cos(theta);\n\t// Rodrigues' axis-angle rotation\n\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\treturn bilinearCubeUV(envMap, sampleDirection, mipInt);\n}\n\nvoid main() {\n\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\tif (all(equal(axis, vec3(0.0))))\n\t\taxis = vec3(vOutputDirection.z, 0.0, - vOutputDirection.x);\n\taxis = normalize(axis);\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb += weights[0] * getSample(0.0, axis);\n\tfor (int i = 1; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfloat theta = dTheta * float(i);\n\t\tgl_FragColor.rgb += weights[i] * getSample(-1.0 * theta, axis);\n\t\tgl_FragColor.rgb += weights[i] * getSample(theta, axis);\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t"),blending:ge,depthTest:!1,depthWrite:!1});return n.type="SphericalGaussianBlur",n}function Fv(){var e=new Nr(1,1),e=new Yd({uniforms:{envMap:{value:null},texelSize:{value:e},inputEncoding:{value:fv[Hn]},outputEncoding:{value:fv[Hn]}},vertexShader:zv(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n".concat(Gv(),"\n\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tvec3 outputDirection = normalize(vOutputDirection);\n\tvec2 uv;\n\tuv.y = asin(clamp(outputDirection.y, -1.0, 1.0)) * RECIPROCAL_PI + 0.5;\n\tuv.x = atan(outputDirection.z, outputDirection.x) * RECIPROCAL_PI2 + 0.5;\n\tvec2 f = fract(uv / texelSize - 0.5);\n\tuv -= f * texelSize;\n\tvec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x += texelSize.x;\n\tvec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.y += texelSize.y;\n\tvec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x -= texelSize.x;\n\tvec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tvec3 tm = mix(tl, tr, f.x);\n\tvec3 bm = mix(bl, br, f.x);\n\tgl_FragColor.rgb = mix(tm, bm, f.y);\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t"),blending:ge,depthTest:!1,depthWrite:!1});return e.type="EquirectangularToCubeUV",e}function Uv(){var e=new Yd({uniforms:{envMap:{value:null},inputEncoding:{value:fv[Hn]},outputEncoding:{value:fv[Hn]}},vertexShader:zv(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform samplerCube envMap;\n\n".concat(Gv(),"\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb;\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t"),blending:ge,depthTest:!1,depthWrite:!1});return e.type="CubemapToCubeUV",e}function zv(){return"\nprecision mediump float;\nprecision mediump int;\nattribute vec3 position;\nattribute vec2 uv;\nattribute float faceIndex;\nvarying vec3 vOutputDirection;\nvec3 getDirection(vec2 uv, float face) {\n\tuv = 2.0 * uv - 1.0;\n\tvec3 direction = vec3(uv, 1.0);\n\tif (face == 0.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 1.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 3.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.x *= -1.0;\n\t} else if (face == 4.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.y *= -1.0;\n\t} else if (face == 5.0) {\n\t\tdirection.xz *= -1.0;\n\t}\n\treturn direction;\n}\nvoid main() {\n\tvOutputDirection = getDirection(uv, faceIndex);\n\tgl_Position = vec4( position, 1.0 );\n}\n\t"}function Gv(){return"\nuniform int inputEncoding;\nuniform int outputEncoding;\n\n#include <encodings_pars_fragment>\n\nvec4 inputTexelToLinear(vec4 value){\n\tif(inputEncoding == 0){\n\t\treturn value;\n\t}else if(inputEncoding == 1){\n\t\treturn sRGBToLinear(value);\n\t}else if(inputEncoding == 2){\n\t\treturn RGBEToLinear(value);\n\t}else if(inputEncoding == 3){\n\t\treturn RGBMToLinear(value, 7.0);\n\t}else if(inputEncoding == 4){\n\t\treturn RGBMToLinear(value, 16.0);\n\t}else if(inputEncoding == 5){\n\t\treturn RGBDToLinear(value, 256.0);\n\t}else{\n\t\treturn GammaToLinear(value, 2.2);\n\t}\n}\n\nvec4 linearToOutputTexel(vec4 value){\n\tif(outputEncoding == 0){\n\t\treturn value;\n\t}else if(outputEncoding == 1){\n\t\treturn LinearTosRGB(value);\n\t}else if(outputEncoding == 2){\n\t\treturn LinearToRGBE(value);\n\t}else if(outputEncoding == 3){\n\t\treturn LinearToRGBM(value, 7.0);\n\t}else if(outputEncoding == 4){\n\t\treturn LinearToRGBM(value, 16.0);\n\t}else if(outputEncoding == 5){\n\t\treturn LinearToRGBD(value, 256.0);\n\t}else{\n\t\treturn LinearToGamma(value, 2.2);\n\t}\n}\n\nvec4 envMapTexelToLinear(vec4 color) {\n\treturn inputTexelToLinear(color);\n}\n\t"}function Vv(e,t,n,r,i,a,o){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new ua(e,t,n,i,a,o)}Ev.prototype={constructor:Ev,fromScene:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:.1,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:100;Mv=bv.getRenderTarget();var i=Av();return Lv(e,n,r,i),0<t&&Dv(i,0,0,t),Cv(i),Iv(i),i},fromEquirectangular:function(e){return e.magFilter=lt,e.minFilter=lt,e.generateMipmaps=!1,this.fromCubemap(e)},fromCubemap:function(e){Mv=bv.getRenderTarget();var t=Av(e);return Rv(e,t),Cv(t),Iv(t),t},compileCubemapShader:function(){null==gv&&(gv=Uv(),Nv(gv))},compileEquirectangularShader:function(){null==vv&&(vv=Fv(),Nv(vv))},dispose:function(){mv.dispose(),null!=gv&&gv.dispose(),null!=vv&&vv.dispose();for(var e=0;e<yv.length;e++)yv[e].dispose()}},Er=0,t.LineStrip=Er,Er=1,t.LinePieces=Er,Er=0,t.NoColors=Er;var Hv=1;t.FaceColors=Hv;var jv=2;function Wv(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e}function Yv(e){return void 0===e&&(e=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return(0,y.default)(e).call(e)},e}function qv(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new _c(e,t)}function Xv(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Vh(e)}function Zv(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new _c(e,t)}function Jv(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new pc(e)}function Kv(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new pc(e)}function Qv(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new pc(e)}function $v(e,t,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Vr(e,t,n)}function eg(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new pa(e,t).setUsage(yr)}function tg(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new ma(e,t)}function ng(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new va(e,t)}function rg(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new ga(e,t)}function ig(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new ya(e,t)}function ag(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new _a(e,t)}function og(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new xa(e,t)}function sg(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new wa(e,t)}function lg(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new ba(e,t)}function ug(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Ma(e,t)}function hg(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Uf.call(this,e),this.type="catmullrom",this.closed=!0}function cg(e){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Uf.call(this,e),this.type="catmullrom"}function dg(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Uf.call(this,e),this.type="catmullrom"}function fg(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new ov(e)}function pg(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new $m(e,t)}function mg(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new dc(new Bd(e.geometry),new rc({color:void 0!==t?t:16777215}))}function vg(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new dc(new Ec(e.geometry),new rc({color:void 0!==t?t:16777215}))}function gg(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Tf(e)}function yg(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Af(e)}function _g(e,t,n){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new _o(e,n)}function xg(){console.error("THREE.CanvasRenderer has been removed")}function wg(){console.error("THREE.JSONLoader has been removed.")}function bg(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}t.VertexColors=jv,Nf.create=function(e,t){return e.prototype=(0,d.default)(Nf.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},(0,je.default)(ip.prototype,{createPointsGeometry:function(e){return console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),e=this.getPoints(e),this.createGeometry(e)},createSpacedPointsGeometry:function(e){return console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),e=this.getSpacedPoints(e),this.createGeometry(e)},createGeometry:function(e){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var t=new io,n=0,r=e.length;n<r;n++){var i=e[n];t.vertices.push(new Vr(i.x,i.y,i.z||0))}return t}}),(0,je.default)(ap.prototype,{fromPoints:function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)}}),hg.prototype=(0,d.default)(Uf.prototype),cg.prototype=(0,d.default)(Uf.prototype),dg.prototype=(0,d.default)(Uf.prototype),(0,je.default)(dg.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),Vm.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Om.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},(0,je.default)(bf.prototype,{extractUrlBase:function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),xp.extractUrlBase(e)}}),bf.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},(0,je.default)(Ep.prototype,{setTexturePath:function(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)}}),(0,je.default)(Em.prototype,{center:function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},size:function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)}}),(0,je.default)(Li.prototype,{center:function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionSphere:function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},size:function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)}}),Mo.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},Im.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},(0,je.default)(Rr,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(e){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Rr.floorPowerOfTwo(e)},nextPowerOfTwo:function(e){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Rr.ceilPowerOfTwo(e)}}),(0,je.default)(kr.prototype,{flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},multiplyVector3:function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBufferAttribute:function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),(0,je.default)(Jr.prototype,{extractPosition:function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},getPosition:function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new Vr).setFromMatrixColumn(this,3)},setRotationFromQuaternion:function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector4:function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},crossVector:function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBufferAttribute:function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(e,t,n,r,i,a){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,a)}}),ji.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},Ur.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},(0,je.default)(zi.prototype,{isIntersectionBox:function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionPlane:function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},isIntersectionSphere:function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}),(0,je.default)(ta.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},midpoint:function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},normal:function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},plane:function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)}}),(0,je.default)(ta,{barycoordFromPoint:function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),ta.getBarycoord(e,t,n,r,i)},normal:function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),ta.getNormal(e,t,n,r)}}),(0,je.default)(op.prototype,{extractAllPoints:function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},extrude:function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new bd(this,e)},makeGeometry:function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Cd(this,e)}}),(0,je.default)(Nr.prototype,{fromAttribute:function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},distanceToManhattan:function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),(0,je.default)(Vr.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},getScaleFromMatrix:function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},getColumnFromMatrix:function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},applyProjection:function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},fromAttribute:function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},distanceToManhattan:function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),(0,je.default)(Or.prototype,{fromAttribute:function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),(0,je.default)(io.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")},applyMatrix:function(e){return console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),(0,je.default)(pi.prototype,{getChildByName:function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},applyMatrix:function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),(0,u.default)(pi.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),(0,je.default)(Ka.prototype,{setDrawMode:function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}),(0,u.default)(Ka.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),zn},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),(0,u.default)(Yh.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),(0,m.default)(Jh.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),qh.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},(0,m.default)(Nf.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(e){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=e}}),mo.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},(0,u.default)(sp.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),(0,u.default)(pa.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===yr},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(yr)}}}),(0,je.default)(pa.prototype,{setDynamic:function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?yr:gr),this},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},setArray:function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),(0,je.default)(Pa.prototype,{addIndex:function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},addAttribute:function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new pa(arguments[1],arguments[2])))},addDrawCall:function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},removeAttribute:function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},applyMatrix:function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),(0,u.default)(Pa.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),(0,u.default)(_m.prototype,{linePrecision:{get:function(){return console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold},set:function(e){console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold=e}}}),(0,u.default)(Eh.prototype,{dynamic:{get:function(){return console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),this.usage===yr},set:function(e){console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),this.setUsage(e)}}}),(0,je.default)(Eh.prototype,{setDynamic:function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?yr:gr),this},setArray:function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),(0,je.default)(Md.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),(0,u.default)(gm.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),(0,u.default)(ca.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new aa}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=e===Y}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}}}),(0,u.default)(Zd.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),(0,u.default)(fo.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),(0,je.default)(bh.prototype,{clearTarget:function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},animate:function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},allocTextureUnit:function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},setTexture:function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},setTexture2D:function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},setTextureCube:function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},getActiveMipMapLevel:function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()}}),(0,u.default)(bh.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?jn:Hn}}}),(0,u.default)(mh.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),(0,u.default)(Br.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),(0,f.default)(this.texture)},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),(0,u.default)(Kp.prototype,{load:{value:function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var t=this,n=new Bp;return n.load(e,function(e){t.setBuffer(e)}),this}},startTime:{set:function(){console.warn("THREE.Audio: .startTime is now .play( delay ).")}}}),rm.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},yo.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},Er={merge:function(e,t,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),t.isMesh&&(t.matrixAutoUpdate&&t.updateMatrix(),r=t.matrix,t=t.geometry),e.merge(t,r,n)},center:function(e){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),e.center()}},t.GeometryUtils=Er,Pr.crossOrigin=void 0,Pr.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Rf;return i.setCrossOrigin(this.crossOrigin),r=i.load(e,n,void 0,r),t&&(r.mapping=t),r},Pr.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Lf;return i.setCrossOrigin(this.crossOrigin),r=i.load(e,n,void 0,r),t&&(r.mapping=t),r},Pr.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},Pr.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},Er={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}},t.SceneUtils=Er,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:D}}))},function(e,t,n){n=n(274),e.exports=n},function(e,t,n){n(275),n=n(11),e.exports=n.Reflect.construct},function(e,t,n){var r=n(8),i=n(45),a=n(44),o=n(33),s=n(23),l=n(73),u=n(174),n=n(16),h=i("Reflect","construct"),c=n(function(){function e(){}return!(h(function(){},[],e)instanceof e)}),d=!n(function(){h(function(){})}),n=c||d;r({target:"Reflect",stat:!0,forced:n,sham:n},{construct:function(e,t){a(e),o(t);var n=arguments.length<3?e:a(arguments[2]);if(d&&!c)return h(e,t,n);if(e!=n)return r=n.prototype,n=l(s(r)?r:Object.prototype),r=Function.apply.call(e,n,t),s(r)?r:n;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(u.apply(e,r))}})},function(e,t,n){var r=n(18),i=n(39);e.exports=function(t,n){try{i(r,t,n)}catch(e){r[t]=n}return n}},function(e,t,n){var r=n(176);n(295),n(296),n(297),n(298),n(299),e.exports=r},function(e,t,n){"use strict";var r=n(133),i=n(51);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},function(e,t,n){n=n(25),n("asyncIterator")},function(e,t){},function(e,t,n){n=n(25),n("hasInstance")},function(e,t,n){n=n(25),n("isConcatSpreadable")},function(e,t,n){n=n(25),n("match")},function(e,t,n){n=n(25),n("matchAll")},function(e,t,n){n=n(25),n("replace")},function(e,t,n){n=n(25),n("search")},function(e,t,n){n=n(25),n("species")},function(e,t,n){n=n(25),n("split")},function(e,t,n){n=n(25),n("toPrimitive")},function(e,t,n){n=n(25),n("toStringTag")},function(e,t,n){n=n(25),n("unscopables")},function(e,t,n){var r=n(18),n=n(77);n(r.JSON,"JSON",!0)},function(e,t){},function(e,t){},function(e,t,n){n=n(25),n("asyncDispose")},function(e,t,n){n=n(25),n("dispose")},function(e,t,n){n=n(25),n("observable")},function(e,t,n){n=n(25),n("patternMatch")},function(e,t,n){n=n(25),n("replaceAll")},function(e,t,n){e.exports=n(301)},function(e,t,n){n=n(302),e.exports=n},function(e,t,n){n(183),n(58),n(41),n=n(132),e.exports=n.f("iterator")},function(e,t,n){var o=n(74),s=n(82),n=function(a){return function(e,t){var n,r=String(s(e)),i=o(t),e=r.length;return i<0||e<=i?a?"":void 0:(t=r.charCodeAt(i),t<55296||56319<t||i+1===e||(n=r.charCodeAt(i+1))<56320||57343<n?a?r.charAt(i):t:a?r.slice(i,i+2):n-56320+(t-55296<<10)+65536)}};e.exports={codeAt:n(!1),charAt:n(!0)}},function(e,t,n){"use strict";var r=n(184).IteratorPrototype,i=n(73),a=n(71),o=n(77),s=n(59),l=function(){return this};e.exports=function(e,t,n){return t+=" Iterator",e.prototype=i(r,{next:a(1,n)}),o(e,t,!1,!0),s[t]=l,e}},function(e,t,n){var r=n(23);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){n=n(167),e.exports=n},function(e,t,n){e.exports=n(309)},function(e,t,n){n=n(187),e.exports=n},function(e,t,n){var r=n(8),i=n(30),n=n(73);r({target:"Object",stat:!0,sham:!i},{create:n})},function(n,e,t){var r=t(188);function i(e,t){return n.exports=i=r||function(e,t){return e.__proto__=t,e},n.exports.default=n.exports,n.exports.__esModule=!0,i(e,t)}n.exports=i,n.exports.default=n.exports,n.exports.__esModule=!0},function(e,t,n){n=n(313),e.exports=n},function(e,t,n){n(314),n=n(11),e.exports=n.Object.setPrototypeOf},function(e,t,n){var r=n(8),n=n(135);r({target:"Object",stat:!0},{setPrototypeOf:n})},function(e,t,n){e.exports=n(316)},function(e,t,n){n=n(317),e.exports=n},function(e,t,n){n(318),n=n(11),e.exports=n.Object.getPrototypeOf},function(e,t,n){var r=n(8),i=n(16),a=n(38),o=n(107),n=n(185),i=i(function(){o(1)});r({target:"Object",stat:!0,forced:i,sham:!n},{getPrototypeOf:function(e){return o(a(e))}})},function(e,t,n){n=n(320),e.exports=n},function(e,t,n){n(321),e.exports=Math.pow(2,-52)},function(e,t,n){n=n(8),n({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(e,t,n){e.exports=n(323)},function(e,t,n){n=n(324),e.exports=n},function(e,t,n){n(325),n=n(11),e.exports=n.Number.isInteger},function(e,t,n){var r=n(8),n=n(326);r({target:"Number",stat:!0},{isInteger:n})},function(e,t,n){var r=n(23),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){e.exports=n(328)},function(e,t,n){n=n(329),e.exports=n},function(e,t,n){n(330),n=n(11),e.exports=n.Math.sign},function(e,t,n){var r=n(8),n=n(331);r({target:"Math",stat:!0},{sign:n})},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){n=n(333),e.exports=n},function(e,t,n){n(334),n=n(11),e.exports=n.Object.assign},function(e,t,n){var r=n(8),n=n(335);r({target:"Object",stat:!0,forced:Object.assign!==n},{assign:n})},function(e,t,n){"use strict";var d=n(30),r=n(16),f=n(101),p=n(131),m=n(123),v=n(38),g=n(98),i=Object.assign,a=Object.defineProperty;e.exports=!i||r(function(){if(d&&1!==i({b:1},i(a({},"a",{enumerable:!0,get:function(){a(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=i({},e)[n]||f(i({},t)).join("")!=r})?function(e,t){for(var n=v(e),r=arguments.length,i=1,a=p.f,o=m.f;i<r;)for(var s,l=g(arguments[i++]),u=a?f(l).concat(a(l)):f(l),h=u.length,c=0;c<h;)s=u[c++],d&&!o.call(l,s)||(n[s]=l[s]);return n}:i},function(e,t,n){n=n(337),e.exports=n},function(e,t,n){var r=n(338),i=Array.prototype;e.exports=function(e){var t=e.indexOf;return e===i||e instanceof Array&&t===i.indexOf?r:t}},function(e,t,n){n(339),n=n(26),e.exports=n("Array").indexOf},function(e,t,n){"use strict";var r=n(8),i=n(172).indexOf,n=n(90),a=[].indexOf,o=!!a&&1/[1].indexOf(1,-0)<0,n=n("indexOf");r({target:"Array",proto:!0,forced:o||!n},{indexOf:function(e){return o?a.apply(this,arguments)||0:i(this,e,1<arguments.length?arguments[1]:void 0)}})},function(e,t,n){n=n(341),e.exports=n},function(e,t,n){var r=n(342),i=Array.prototype;e.exports=function(e){var t=e.splice;return e===i||e instanceof Array&&t===i.splice?r:t}},function(e,t,n){n(343),n=n(26),e.exports=n("Array").splice},function(e,t,n){"use strict";var r=n(8),c=n(102),d=n(74),f=n(46),p=n(38),m=n(128),v=n(84),n=n(87),n=n("splice"),g=Math.max,y=Math.min,_=9007199254740991,x="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!n},{splice:function(e,t){var n,r,i,a,o,s,l=p(this),u=f(l.length),h=c(e,u),e=arguments.length;if(0===e?n=r=0:r=1===e?(n=0,u-h):(n=e-2,y(g(d(t),0),u-h)),_<u+n-r)throw TypeError(x);for(i=m(l,r),a=0;a<r;a++)o=h+a,o in l&&v(i,a,l[o]);if(i.length=r,n<r){for(a=h;a<u-r;a++)o=a+r,s=a+n,o in l?l[s]=l[o]:delete l[s];for(a=u;u-r+n<a;a--)delete l[a-1]}else if(r<n)for(a=u-r;h<a;a--)o=a+r-1,s=a+n-1,o in l?l[s]=l[o]:delete l[s];for(a=0;a<n;a++)l[a+h]=arguments[a+2];return l.length=u-r+n,i}})},function(e,t,n){n=n(190),e.exports=n},function(e,t,n){n(346),n=n(26),e.exports=n("Array").slice},function(e,t,n){"use strict";var r=n(8),u=n(23),h=n(76),c=n(102),d=n(46),f=n(43),p=n(84),i=n(24),n=n(87),n=n("slice"),m=i("species"),v=[].slice,g=Math.max;r({target:"Array",proto:!0,forced:!n},{slice:function(e,t){var n,r,i,a=f(this),o=d(a.length),s=c(e,o),l=c(void 0===t?o:t,o);if(h(a)&&(n=a.constructor,"function"!=typeof n||n!==Array&&!h(n.prototype)?u(n)&&(n=n[m],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return v.call(a,s,l);for(r=new(void 0===n?Array:n)(g(l-s,0)),i=0;s<l;s++,i++)s in a&&p(r,i,a[s]);return r.length=i,r}})},function(e,t,n){n=n(348),e.exports=n},function(e,t,n){n(349);var n=n(11),r=n.Object,e=e.exports=function(e,t){return r.defineProperties(e,t)};r.defineProperties.sham&&(e.sham=!0)},function(e,t,n){var r=n(8),i=n(30),n=n(170);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:n})},function(e,t,n){n=n(187),e.exports=n},function(e,t,n){n=n(352),e.exports=n},function(e,t,n){var r=n(353),i=String.prototype;e.exports=function(e){var t=e.repeat;return"string"==typeof e||e===i||e instanceof String&&t===i.repeat?r:t}},function(e,t,n){n(354),n=n(26),e.exports=n("String").repeat},function(e,t,n){var r=n(8),n=n(355);r({target:"String",proto:!0},{repeat:n})},function(e,t,n){"use strict";var i=n(74),a=n(82);e.exports=function(e){var t=String(a(this)),n="",r=i(e);if(r<0||Infinity==r)throw RangeError("Wrong number of repetitions");for(;0<r;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}},function(e,t,n){n=n(191),e.exports=n},function(e,t,n){var r=n(8),n=n(76);r({target:"Array",stat:!0},{isArray:n})},function(e,t,n){n=n(359),e.exports=n},function(e,t,n){n(360);var r=n(11);r.JSON||(r.JSON={stringify:JSON.stringify}),e.exports=function(e,t,n){return r.JSON.stringify.apply(null,arguments)}},function(e,t,n){var r=n(8),i=n(45),n=n(16),a=i("JSON","stringify"),o=/[\uD800-\uDFFF]/g,s=/^[\uD800-\uDBFF]$/,l=/^[\uDC00-\uDFFF]$/,u=function(e,t,n){var r=n.charAt(t-1),t=n.charAt(t+1);return s.test(e)&&!l.test(t)||l.test(e)&&!s.test(r)?"\\u"+e.charCodeAt(0).toString(16):e},n=n(function(){return'"\\udf06\\ud834"'!==a("\udf06\ud834")||'"\\udead"'!==a("\udead")});a&&r({target:"JSON",stat:!0,forced:n},{stringify:function(e,t,n){var r=a.apply(null,arguments);return"string"==typeof r?r.replace(o,u):r}})},function(e,t,n){n=n(362),e.exports=n},function(e,t,n){n(363),n=n(11),e.exports=n.parseFloat},function(e,t,n){var r=n(8),n=n(364);r({global:!0,forced:parseFloat!=n},{parseFloat:n})},function(e,t,n){var r=n(18),i=n(138).trim,n=n(110),a=r.parseFloat,n=1/a(n+"-0")!=-Infinity;e.exports=n?function(e){var t=i(String(e)),e=a(t);return 0===e&&"-"==t.charAt(0)?-0:e}:a},function(e,t,n){n=n(366),e.exports=n},function(e,t,n){n(367),n=n(11),e.exports=n.parseInt},function(e,t,n){var r=n(8),n=n(368);r({global:!0,forced:parseInt!=n},{parseInt:n})},function(e,t,n){var r=n(18),i=n(138).trim,n=n(110),a=r.parseInt,o=/^[+-]?0[Xx]/,n=8!==a(n+"08")||22!==a(n+"0x16");e.exports=n?function(e,t){return e=i(String(e)),a(e,t>>>0||(o.test(e)?16:10))}:a},function(e,t,n){n=n(370),e.exports=n},function(e,t,n){var r=n(371),i=Array.prototype;e.exports=function(e){var t=e.map;return e===i||e instanceof Array&&t===i.map?r:t}},function(e,t,n){n(372),n=n(26),e.exports=n("Array").map},function(e,t,n){"use strict";var r=n(8),i=n(57).map,n=n(87),n=n("map");r({target:"Array",proto:!0,forced:!n},{map:function(e){return i(this,e,1<arguments.length?arguments[1]:void 0)}})},function(e,t,n){n=n(374),e.exports=n},function(e,t,n){n(375),n=n(11),e.exports=n.Object.keys},function(e,t,n){var r=n(8),i=n(38),a=n(101),n=n(16),n=n(function(){a(1)});r({target:"Object",stat:!0,forced:n},{keys:function(e){return a(i(e))}})},function(e,t,n){n=n(377),e.exports=n},function(e,t,n){var r=n(378),i=Array.prototype;e.exports=function(e){var t=e.sort;return e===i||e instanceof Array&&t===i.sort?r:t}},function(e,t,n){n(379),n=n(26),e.exports=n("Array").sort},function(e,t,n){"use strict";var r=n(8),i=n(44),a=n(38),o=n(16),s=n(90),l=[],u=l.sort,n=o(function(){l.sort(void 0)}),o=o(function(){l.sort(null)}),s=s("sort"),s=n||!o||!s;r({target:"Array",proto:!0,forced:s},{sort:function(e){return void 0===e?u.call(a(this)):u.call(a(this),i(e))}})},function(e,t,n){n=n(381),e.exports=n},function(e,t,n){n(106),n(382),n(41),n=n(11),e.exports=n.WeakMap},function(e,t,n){"use strict";var r,i,a,o,s,l=n(18),u=n(111),h=n(92),c=n(193),d=n(383),f=n(23),p=n(52).enforce,m=n(181),n=!l.ActiveXObject&&"ActiveXObject"in l,v=Object.isExtensible,l=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},c=e.exports=c("WeakMap",l,d);m&&n&&(r=d.getConstructor(l,"WeakMap",!0),h.REQUIRED=!0,c=c.prototype,i=c.delete,a=c.has,o=c.get,s=c.set,u(c,{delete:function(e){if(!f(e)||v(e))return i.call(this,e);var t=p(this);return t.frozen||(t.frozen=new r),i.call(this,e)||t.frozen.delete(e)},has:function(e){if(!f(e)||v(e))return a.call(this,e);var t=p(this);return t.frozen||(t.frozen=new r),a.call(this,e)||t.frozen.has(e)},get:function(e){if(!f(e)||v(e))return o.call(this,e);var t=p(this);return t.frozen||(t.frozen=new r),a.call(this,e)?o.call(this,e):t.frozen.get(e)},set:function(e,t){var n;return f(e)&&!v(e)?(n=p(this),n.frozen||(n.frozen=new r),a.call(this,e)?s.call(this,e,t):n.frozen.set(e,t)):s.call(this,e,t),this}}))},function(e,t,n){"use strict";var l=n(111),u=n(92).getWeakData,h=n(33),c=n(23),d=n(113),f=n(62),r=n(57),p=n(37),n=n(52),m=n.set,v=n.getterFor,i=r.find,a=r.findIndex,g=0,y=function(e){return e.frozen||(e.frozen=new o)},o=function(){this.entries=[]},s=function(e,t){return i(e.entries,function(e){return e[0]===t})};o.prototype={get:function(e){if(e=s(this,e),e)return e[1]},has:function(e){return!!s(this,e)},set:function(e,t){var n=s(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(t){var e=a(this.entries,function(e){return e[0]===t});return~e&&this.entries.splice(e,1),!!~e}},e.exports={getConstructor:function(e,n,r,i){var a=e(function(e,t){d(e,a,n),m(e,{type:n,id:g++,frozen:void 0}),null!=t&&f(t,e[i],{that:e,AS_ENTRIES:r})}),o=v(n),s=function(e,t,n){var r=o(e),i=u(h(t),!0);return!0===i?y(r).set(t,n):i[r.id]=n,e};return l(a.prototype,{delete:function(e){var t=o(this);if(!c(e))return!1;var n=u(e);return!0===n?y(t).delete(e):n&&p(n,t.id)&&delete n[t.id]},has:function(e){var t=o(this);if(!c(e))return!1;var n=u(e);return!0===n?y(t).has(e):n&&p(n,t.id)}}),l(a.prototype,r?{get:function(e){var t=o(this);if(c(e)){var n=u(e);return!0===n?y(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),a}}},function(e,t,n){e.exports=n(385)},function(e,t,n){n=n(386),e.exports=n},function(e,t,n){var r=n(387),i=String.prototype;e.exports=function(e){var t=e.trim;return"string"==typeof e||e===i||e instanceof String&&t===i.trim?r:t}},function(e,t,n){n(388),n=n(26),e.exports=n("String").trim},function(e,t,n){"use strict";var r=n(8),i=n(138).trim,n=n(389);r({target:"String",proto:!0,forced:n("trim")},{trim:function(){return i(this)}})},function(e,t,n){var r=n(16),i=n(110),a="​…᠎";e.exports=function(e){return r(function(){return!!i[e]()||a[e]()!=a||i[e].name!==e})}},function(e,t,n){n=n(391),e.exports=n},function(e,t,n){var r=n(392),i=Array.prototype;e.exports=function(e){var t=e.filter;return e===i||e instanceof Array&&t===i.filter?r:t}},function(e,t,n){n(393),n=n(26),e.exports=n("Array").filter},function(e,t,n){"use strict";var r=n(8),i=n(57).filter,n=n(87),n=n("filter");r({target:"Array",proto:!0,forced:!n},{filter:function(e){return i(this,e,1<arguments.length?arguments[1]:void 0)}})},function(e,t,n){n=n(395),e.exports=n},function(e,t,n){n(396),n(106),n(58),n(41),n=n(11),e.exports=n.Map},function(e,t,n){"use strict";var r=n(193),n=n(397);e.exports=r("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},n)},function(e,t,n){"use strict";var u=n(40).f,h=n(73),c=n(111),d=n(72),f=n(113),p=n(62),o=n(134),s=n(198),m=n(30),v=n(92).fastKey,n=n(52),g=n.set,y=n.getterFor;e.exports={getConstructor:function(e,n,r,i){var a=e(function(e,t){f(e,a,n),g(e,{type:n,index:h(null),first:void 0,last:void 0,size:0}),m||(e.size=0),null!=t&&p(t,e[i],{that:e,AS_ENTRIES:r})}),o=y(n),s=function(e,t,n){var r,i=o(e),a=l(e,t);return a?a.value=n:(i.last=a={index:r=v(t,!0),key:t,value:n,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=a),n&&(n.next=a),m?i.size++:e.size++,"F"!==r&&(i.index[r]=a)),e},l=function(e,t){var n,r=o(e),e=v(t);if("F"!==e)return r.index[e];for(n=r.first;n;n=n.next)if(n.key==t)return n};return c(a.prototype,{clear:function(){for(var e=this,t=o(e),n=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete n[r.index],r=r.next;t.first=t.last=void 0,m?t.size=0:e.size=0},delete:function(e){var t,n=this,r=o(n),i=l(n,e);return i&&(t=i.next,e=i.previous,delete r.index[i.index],i.removed=!0,e&&(e.next=t),t&&(t.previous=e),r.first==i&&(r.first=t),r.last==i&&(r.last=e),m?r.size--:n.size--),!!i},forEach:function(e){for(var t,n=o(this),r=d(e,1<arguments.length?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),c(a.prototype,r?{get:function(e){return e=l(this,e),e&&e.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),m&&u(a.prototype,"size",{get:function(){return o(this).size}}),a},setStrong:function(e,t,n){var r=t+" Iterator",i=y(t),a=y(r);o(e,t,function(e,t){g(this,{type:r,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})},n?"entries":"values",!n,!0),s(t)}}},function(e,t,n){n(41);var r=n(399),i=n(51),a=Array.prototype,o={DOMTokenList:!0,NodeList:!0};e.exports=function(e){var t=e.forEach;return e===a||e instanceof Array&&t===a.forEach||o.hasOwnProperty(i(e))?r:t}},function(e,t,n){n=n(400),e.exports=n},function(e,t,n){n(401),n=n(26),e.exports=n("Array").forEach},function(e,t,n){"use strict";var r=n(8),n=n(402);r({target:"Array",proto:!0,forced:[].forEach!=n},{forEach:n})},function(e,t,n){"use strict";var r=n(57).forEach,n=n(90),n=n("forEach");e.exports=n?[].forEach:function(e){return r(this,e,1<arguments.length?arguments[1]:void 0)}},function(e,t,n){n=n(404),e.exports=n},function(e,t,n){var r=n(405),i=Array.prototype;e.exports=function(e){var t=e.reverse;return e===i||e instanceof Array&&t===i.reverse?r:t}},function(e,t,n){n(406),n=n(26),e.exports=n("Array").reverse},function(e,t,n){"use strict";var r=n(8),i=n(76),a=[].reverse,n=[1,2];r({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a.call(this)}})},function(e,t,n){n=n(408),e.exports=n},function(e,t,n){var r=n(409),i=Array.prototype;e.exports=function(e){var t=e.concat;return e===i||e instanceof Array&&t===i.concat?r:t}},function(e,t,n){n(177),n=n(26),e.exports=n("Array").concat},function(e,t,n){e.exports=n(411)},function(e,t,n){n=n(412),e.exports=n},function(e,t,n){n(413),n=n(11),e.exports=n.Object.freeze},function(e,t,n){var r=n(8),i=n(192),a=n(16),o=n(23),s=n(92).onFreeze,l=Object.freeze,a=a(function(){l(1)});r({target:"Object",stat:!0,forced:a,sham:!i},{freeze:function(e){return l&&o(e)?l(s(e)):e}})},function(e,t,n){n(41);var r=n(415),i=n(51),a=Array.prototype,o={DOMTokenList:!0,NodeList:!0};e.exports=function(e){var t=e.values;return e===a||e instanceof Array&&t===a.values||o.hasOwnProperty(i(e))?r:t}},function(e,t,n){n=n(416),e.exports=n},function(e,t,n){n(108),n=n(26),e.exports=n("Array").values},function(e,t,n){n(41);var r=n(418),i=n(51),a=Array.prototype,o={DOMTokenList:!0,NodeList:!0};e.exports=function(e){var t=e.keys;return e===a||e instanceof Array&&t===a.keys||o.hasOwnProperty(i(e))?r:t}},function(e,t,n){n=n(419),e.exports=n},function(e,t,n){n(108),n=n(26),e.exports=n("Array").keys},function(e,t,n){n(199),n=n(11),e.exports=n.setTimeout},function(e,t,n){e.exports=n(422)},function(e,t,n){n=n(423),e.exports=n},function(e,t,n){var r=n(424),i=Array.prototype;e.exports=function(e){var t=e.lastIndexOf;return e===i||e instanceof Array&&t===i.lastIndexOf?r:t}},function(e,t,n){n(425),n=n(26),e.exports=n("Array").lastIndexOf},function(e,t,n){var r=n(8),n=n(426);r({target:"Array",proto:!0,forced:n!==[].lastIndexOf},{lastIndexOf:n})},function(e,t,n){"use strict";var i=n(43),a=n(74),o=n(46),n=n(90),s=Math.min,l=[].lastIndexOf,u=!!l&&1/[1].lastIndexOf(1,-0)<0,n=n("lastIndexOf"),n=u||!n;e.exports=n?function(e){if(u)return l.apply(this,arguments)||0;var t=i(this),n=o(t.length),r=n-1;for(1<arguments.length&&(r=s(r,a(arguments[1]))),r<0&&(r=n+r);0<=r;r--)if(r in t&&t[r]===e)return r||0;return-1}:l},function(e,t,n){n=n(200),e.exports=n},function(e,t,n){var r=n(8),i=n(429),n=n(201),n=!n(function(e){Array.from(e)});r({target:"Array",stat:!0,forced:n},{from:i})},function(e,t,n){"use strict";var f=n(72),p=n(38),m=n(430),v=n(194),g=n(46),y=n(84),_=n(112);e.exports=function(e){var t,n,r,i,a,o,s=p(e),l="function"==typeof this?this:Array,u=arguments.length,h=1<u?arguments[1]:void 0,c=void 0!==h,e=_(s),d=0;if(c&&(h=f(h,2<u?arguments[2]:void 0,2)),null==e||l==Array&&v(e))for(t=g(s.length),n=new l(t);d<t;d++)o=c?h(s[d],d):s[d],y(n,d,o);else for(i=e.call(s),a=i.next,n=new l;!(r=a.call(i)).done;d++)o=c?m(i,h,[r.value,d],!0):r.value,y(n,d,o);return n.length=d,n}},function(e,t,n){var i=n(33),a=n(195);e.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){throw a(t),e}}},function(e,t,n){n=n(432),e.exports=n},function(e,t,n){var r=n(433),i=Function.prototype;e.exports=function(e){var t=e.bind;return e===i||e instanceof Function&&t===i.bind?r:t}},function(e,t,n){n(434),n=n(26),e.exports=n("Function").bind},function(e,t,n){var r=n(8),n=n(174);r({target:"Function",proto:!0},{bind:n})},function(e,t,n){e.exports=n(436)},function(e,t,n){n=n(437),e.exports=n},function(e,t,n){n(438),n=n(11),e.exports=n.Math.log2},function(e,t,n){var n=n(8),r=Math.log,i=Math.LN2;n({target:"Math",stat:!0},{log2:function(e){return r(e)/i}})},function(t,e,n){!function(e){t.exports=e.TWEEN=n(440)}.call(this,n(49))},function(n,i,e){!function(t){var e=function(){this._tweens={},this._tweensAddedDuringUpdate={}};e.prototype={getAll:function(){return Object.keys(this._tweens).map(function(e){return this._tweens[e]}.bind(this))},removeAll:function(){this._tweens={}},add:function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},remove:function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},update:function(e,t){var n=Object.keys(this._tweens);if(0===n.length)return!1;for(e=void 0!==e?e:s.now();0<n.length;){this._tweensAddedDuringUpdate={};for(var r=0;r<n.length;r++){var i=this._tweens[n[r]];i&&!1===i.update(e)&&(i._isPlaying=!1,t||delete this._tweens[n[r]])}n=Object.keys(this._tweensAddedDuringUpdate)}return!0}};var r,s=new e;s.Group=e,s._nextId=0,s.nextId=function(){return s._nextId++},"undefined"==typeof self&&void 0!==t&&t.hrtime?s.now=function(){var e=t.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?s.now=self.performance.now.bind(self.performance):void 0!==Date.now?s.now=Date.now:s.now=function(){return(new Date).getTime()},s.Tween=function(e,t){this._object=e,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._repeatDelayTime=void 0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=s.Easing.Linear.None,this._interpolationFunction=s.Interpolation.Linear,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onRepeatCallback=null,this._onCompleteCallback=null,this._onStopCallback=null,this._group=t||s,this._id=s.nextId()},s.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(e,t){return this._valuesEnd=e,void 0!==t&&(this._duration=t),this},duration:function(e){return this._duration=e,this},start:function(e){for(var t in this._group.add(this),this._isPlaying=!0,this._onStartCallbackFired=!1,this._startTime=void 0!==e?"string"==typeof e?s.now()+parseFloat(e):e:s.now(),this._startTime+=this._delayTime,this._valuesEnd){if(this._valuesEnd[t]instanceof Array){if(0===this._valuesEnd[t].length)continue;this._valuesEnd[t]=[this._object[t]].concat(this._valuesEnd[t])}void 0!==this._object[t]&&(this._valuesStart[t]=this._object[t],this._valuesStart[t]instanceof Array==0&&(this._valuesStart[t]*=1),this._valuesStartRepeat[t]=this._valuesStart[t]||0)}return this},stop:function(){return this._isPlaying&&(this._group.remove(this),this._isPlaying=!1,null!==this._onStopCallback&&this._onStopCallback(this._object),this.stopChainedTweens()),this},end:function(){return this.update(Infinity),this},stopChainedTweens:function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop()},group:function(e){return this._group=e,this},delay:function(e){return this._delayTime=e,this},repeat:function(e){return this._repeat=e,this},repeatDelay:function(e){return this._repeatDelayTime=e,this},yoyo:function(e){return this._yoyo=e,this},easing:function(e){return this._easingFunction=e,this},interpolation:function(e){return this._interpolationFunction=e,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(e){return this._onStartCallback=e,this},onUpdate:function(e){return this._onUpdateCallback=e,this},onRepeat:function(e){return this._onRepeatCallback=e,this},onComplete:function(e){return this._onCompleteCallback=e,this},onStop:function(e){return this._onStopCallback=e,this},update:function(e){var t,n,r,i,a,o;if(e<this._startTime)return!0;for(t in!1===this._onStartCallbackFired&&(null!==this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(e-this._startTime)/this._duration,n=0===this._duration||1<n?1:n,r=this._easingFunction(n),this._valuesEnd)void 0!==this._valuesStart[t]&&(i=this._valuesStart[t]||0,a=this._valuesEnd[t],a instanceof Array?this._object[t]=this._interpolationFunction(a,r):("string"==typeof a&&(a="+"===a.charAt(0)||"-"===a.charAt(0)?i+parseFloat(a):parseFloat(a)),"number"==typeof a&&(this._object[t]=i+(a-i)*r)));if(null!==this._onUpdateCallback&&this._onUpdateCallback(this._object,n),1!==n)return!0;if(0<this._repeat){for(t in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)"string"==typeof this._valuesEnd[t]&&(this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(this._valuesEnd[t])),this._yoyo&&(o=this._valuesStartRepeat[t],this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=o),this._valuesStart[t]=this._valuesStartRepeat[t];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,null!==this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}null!==this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,l=this._chainedTweens.length;s<l;s++)this._chainedTweens[s].start(this._startTime+this._duration);return!1}},s.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1)}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-s.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*s.Easing.Bounce.In(2*e):.5*s.Easing.Bounce.Out(2*e-1)+.5}}},s.Interpolation={Linear:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),a=s.Interpolation.Utils.Linear;return t<0?a(e[0],e[1],r):1<t?a(e[n],e[n-1],n-r):a(e[i],e[n<i+1?n:i+1],r-i)},Bezier:function(e,t){for(var n=0,r=e.length-1,i=Math.pow,a=s.Interpolation.Utils.Bernstein,o=0;o<=r;o++)n+=i(1-t,r-o)*i(t,o)*e[o]*a(r,o);return n},CatmullRom:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),a=s.Interpolation.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(i=Math.floor(r=n*(1+t))),a(e[(i-1+n)%n],e[i],e[(i+1)%n],e[(i+2)%n],r-i)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-r)-e[0]):1<t?e[n]-(a(e[n],e[n],e[n-1],e[n-1],r-n)-e[n]):a(e[i?i-1:0],e[i],e[n<i+1?n:i+1],e[n<i+2?n:i+2],r-i)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=s.Interpolation.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(r=[1],function(e){var t=1;if(r[e])return r[e];for(var n=e;1<n;n--)t*=n;return r[e]=t,t}),CatmullRom:function(e,t,n,r,i){var a=.5*(n-e),o=.5*(r-t),e=i*i,r=i*e;return(2*t-2*n+a+o)*r+(-3*t+3*n-2*a-o)*e+a*i+t}}},e=[],e=function(){return s}.apply(i,e),void 0===e||(n.exports=e)}.call(this,e(65))},function(e,t,n){"use strict";var r=n(1),we=r(n(63)),be=r(n(10)),Me=r(n(15)),i=r(n(60)),a=r(n(91)),Te=(r(n(2)),r(n(3)),r(n(141))),Ee=r(n(461));fm.OrbitControls=function(e,t,n){var a,o,s,l,u,r,i,h,c,d;this.object=e,this.map=n,this.domElement=void 0!==t?t:Ee.default,this.enabled=!0,this.target=new fm.Vector3,this.minDistance=0,this.maxDistance=Infinity,this.minZoom=0,this.maxZoom=Infinity,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-Infinity,this.maxAzimuthAngle=Infinity,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!1,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={LEFT:fm.MOUSE.LEFT,MIDDLE:fm.MOUSE.MIDDLE,RIGHT:fm.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.rangeCenter=new fm.Vector3,this.rangeRadius=500,this.useRange=!1,this.enterCtrl=null,this.setEnterCtrl=function(e){this.enterCtrl=e},this.getPolarAngle=function(){return x.phi},this.getAzimuthalAngle=function(){return x.theta},this.setPolarAngle=function(e){x.phi=e},this.setAzimuthalAngle=function(e){x.theta=e},this.addPolarAngle=function(e){x.phi+=e},this.addAzimuthalAngle=function(e){x.theta+=e},this.panAdd=function(e){M.add(e)},this.saveState=function(){f.target0.copy(f.target),f.position0.copy(f.object.position),f.zoom0=f.object.zoom},this.reset=function(){f.target.copy(f.target0),f.object.position.copy(f.position0),f.object.zoom=f.zoom0,f.object.updateProjectionMatrix(),f.dispatchEvent(p),f.update(),y=g.NONE},this.setUpdate=function(e,t,n,r,i){a=e,o=t,s=n,l=r,u=i},this.update=(r=new fm.Vector3,i=(new fm.Quaternion).setFromUnitVectors(e.up,new fm.Vector3(0,1,0)),h=i.clone().inverse(),c=new fm.Vector3,d=new fm.Quaternion,function(){var e=f.object.position;r.copy(e).sub(f.target),r.applyQuaternion(i);var t,n=x.theta;return x.setFromVector3(r),x.theta=n,f.autoRotate&&y===g.NONE&&U(B()),x.theta+=w.theta,x.phi+=w.phi,"number"==typeof l&&(x.theta=l),"number"==typeof u&&(x.phi=u),"number"==typeof a&&(x.phi+=a),o&&"number"==typeof o&&(x.theta+=o),x.theta=Math.max(f.minAzimuthAngle,Math.min(f.maxAzimuthAngle,x.theta)),x.phi=Math.max(f.minPolarAngle,Math.min(f.maxPolarAngle,x.phi)),x.makeSafe(),x.radius*=b,x.radius=Math.max(f.minDistance,Math.min(f.maxDistance,x.radius)),this.useRange?(t=(new fm.Vector3).setFromMatrixPosition(f.object.matrixWorld),t.add(M),t=(new fm.Matrix4).copy(f.object.matrixWorld).setPosition(t),t=(new fm.Matrix4).getInverse(t),t=(new fm.Frustum).setFromMatrix((new fm.Matrix4).multiplyMatrices(f.object.projectionMatrix,t)),t.intersectsBox(f.viewBox)&&f.target.add(M)):f.target.add(M),r.setFromSpherical(x),r.applyQuaternion(h),s&&r.add(s),this.useRange?(t=(new fm.Vector3).setFromMatrixPosition(f.object.matrixWorld),t.add(r),t=(new fm.Matrix4).copy(f.object.matrixWorld).setPosition(t),t=(new fm.Matrix4).getInverse(t),t=(new fm.Frustum).setFromMatrix((new fm.Matrix4).multiplyMatrices(f.object.projectionMatrix,t)),t.intersectsBox(f.viewBox)&&e.copy(f.target).add(r)):e.copy(f.target).add(r),f.object.lookAt(f.target),!0===f.enableDamping?(w.theta*=1-f.dampingFactor,w.phi*=1-f.dampingFactor,M.multiplyScalar(1-f.dampingFactor)):(w.set(0,0,0),M.set(0,0,0)),a=void 0,o=void 0,s=void 0,l=void 0,u=void 0,b=1,!!(T||c.distanceToSquared(f.object.position)>_||8*(1-d.dot(f.object.quaternion))>_)&&(f.dispatchEvent(p),c.copy(f.object.position),d.copy(f.object.quaternion),T=!1,!0)}),this.dispose=function(){f.domElement.removeEventListener("contextmenu",me,!1),f.domElement.removeEventListener("mousedown",ae,!1),f.domElement.removeEventListener("wheel",he,!1),f.domElement.removeEventListener("touchstart",de,!1),f.domElement.removeEventListener("touchend",pe,!1),f.domElement.removeEventListener("touchmove",fe,!1),f.domElement.removeEventListener("mouseup",se,!1),f.domElement.removeEventListener("mousemove",le,!1),Te.default.PointerEvent&&!Te.default.TouchEvent&&(f.domElement.removeEventListener("pointerdown",ye,!1),f.domElement.removeEventListener("pointermove",_e,!1),f.domElement.removeEventListener("pointerup",xe,!1)),Ee.default.removeEventListener("mousemove",oe,!1),Ee.default.removeEventListener("mouseup",ue,!1),Te.default.removeEventListener("keydown",ce,!1),this.enterCtrl=void 0,this.domElement=void 0,this.object=void 0};var f=this,p={type:"change"},m={type:"start"},v={type:"end"},g={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4,TOUCH_PAN:5,TOUCH_DOLLY_ROTATE:6},y=g.NONE,_=1e-6,x=new fm.Spherical,w=new fm.Spherical,b=1,M=new fm.Vector3,T=!1,E=new fm.Vector2,S=new fm.Vector2,A=new fm.Vector2,I=new fm.Vector2,L=new fm.Vector2,R=(new fm.Vector2,new fm.Vector2),N=new fm.Vector2,k=new fm.Vector2,P=new fm.Vector2,C=new fm.Vector2,D=new fm.Vector2,O=new fm.Vector2;function B(){return 2*Math.PI/60/60*f.autoRotateSpeed}function F(){return Math.pow(.95,f.zoomSpeed)}function U(e){f.enterCtrl&&!f.enterCtrl.enableMapRotate||(w.theta-=e)}function z(e){f.enterCtrl&&!f.enterCtrl.enableMapIncline||(w.phi-=e)}this.rotateLeft=function(e){U(e)};var G,V,H=(G=new fm.Vector3,function(e,t){G.setFromMatrixColumn(t,0),G.multiplyScalar(-e),M.add(G)}),j=(V=new fm.Vector3,function(e,t){!0===f.screenSpacePanning?V.setFromMatrixColumn(t,1):(V.setFromMatrixColumn(t,0),V.crossVectors(f.object.up,V)),V.multiplyScalar(e),M.add(V)});this.panUp=function(e){var t=new fm.Vector3;t.y=1,t.multiplyScalar(e),M.add(t)};var W,Y=(W=new fm.Vector3,function(e,t){var n,r;f.enterCtrl&&!f.enterCtrl.enableMapPan||(n=f.domElement===Ee.default?f.domElement.body:f.domElement,f.object.isPerspectiveCamera?(r=f.object.position,W.copy(r).sub(f.target),r=W.length(),r*=Math.tan(f.object.fov/2*Math.PI/180),H(2*e*r/n.clientHeight,f.object.matrix),j(2*t*r/n.clientHeight,f.object.matrix)):f.object.isOrthographicCamera?(H(e*(f.object.right-f.object.left)/f.object.zoom/n.clientWidth,f.object.matrix),j(t*(f.object.top-f.object.bottom)/f.object.zoom/n.clientHeight,f.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),f.enablePan=!1))});function q(e){f.enterCtrl&&!f.enterCtrl.enableMapPinch||(f.object.isPerspectiveCamera?b/=e:f.object.isOrthographicCamera?(f.object.zoom=Math.max(f.minZoom,Math.min(f.maxZoom,f.object.zoom*e)),f.object.updateProjectionMatrix(),b/=e,T=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),f.enableZoom=!1))}function X(e){f.enterCtrl&&!f.enterCtrl.enableMapPinch||(f.object.isPerspectiveCamera?b*=e:f.object.isOrthographicCamera?(f.object.zoom=Math.max(f.minZoom,Math.min(f.maxZoom,f.object.zoom/e)),f.object.updateProjectionMatrix(),T=!0,b*=e):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),f.enableZoom=!1))}function Z(e){E.set(e.clientX,e.clientY)}function J(e){P.set(e.clientX,e.clientY)}function K(e){R.set(e.clientX,e.clientY)}function Q(e){S.set(e.clientX,e.clientY),A.subVectors(S,E).multiplyScalar(f.rotateSpeed),e=f.domElement===Ee.default?f.domElement.body:f.domElement,U(2*Math.PI*A.x/e.clientHeight),z(2*Math.PI*A.y/e.clientHeight),E.copy(S)}function $(e){C.set(e.clientX,e.clientY),D.subVectors(C,P),0<D.y?q(F()):D.y<0&&X(F()),P.copy(C)}function ee(e){N.set(e.clientX,e.clientY),k.subVectors(N,R).multiplyScalar(f.panSpeed),Y(k.x,k.y),R.copy(N)}function te(e){}function ne(e){e.deltaY<0?X(F()):0<e.deltaY&&q(F())}function re(e){switch(e.keyCode){case(0,we.default)(f).UP:Y(0,f.keyPanSpeed),f.update();break;case(0,we.default)(f).BOTTOM:Y(0,-f.keyPanSpeed),f.update();break;case(0,we.default)(f).LEFT:Y(f.keyPanSpeed,0),f.update();break;case(0,we.default)(f).RIGHT:Y(-f.keyPanSpeed,0),f.update()}}function ie(e){}function ae(e){if(O.set(e.clientX,e.clientY,f.enabled),!1!==f.enabled){switch(e.preventDefault(),e.button){case f.mouseButtons.LEFT:if(!1===f.enablePan)return;K(e),y=g.PAN;break;case f.mouseButtons.MIDDLE:if(!1===f.enableZoom)return;J(e),y=g.DOLLY;break;case f.mouseButtons.RIGHT:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===f.enablePan)return;K(e),y=g.PAN}else{if(!1===f.enableRotate)return;Z(e),y=g.ROTATE}}y!==g.NONE&&(Ee.default.addEventListener("mousemove",oe,!1),Ee.default.addEventListener("mouseup",ue,!1),f.dispatchEvent(m))}}function oe(e){if(!1!==f.enabled)switch(e.preventDefault(),y){case g.ROTATE:if(!1===f.enableRotate)return;Q(e);break;case g.DOLLY:if(!1===f.enableZoom)return;$(e);break;case g.PAN:if(!1===f.enablePan)return;ee(e)}}function se(e){var t=O.distanceTo(new fm.Vector2(e.clientX,e.clientY));t<5&&f.dispatchEvent({type:"mouseup",mousePoint:{x:e.offsetX,y:e.offsetY,w:f.domElement.clientWidth,h:f.domElement.clientHeight},event:e,mouseButton:e.button})}function le(e){f.dispatchEvent({type:"mousemove",mousePoint:{x:e.offsetX,y:e.offsetY,w:f.domElement.clientWidth,h:f.domElement.clientHeight},event:e})}function ue(e){!1!==f.enabled&&(te(e),Ee.default.removeEventListener("mousemove",oe,!1),Ee.default.removeEventListener("mouseup",ue,!1),f.dispatchEvent(v),y=g.NONE)}function he(e){!1===f.enabled||!1===f.enableZoom||y!==g.NONE&&y!==g.ROTATE||(e.preventDefault(),e.stopPropagation(),f.dispatchEvent(m),ne(e),f.dispatchEvent(v))}function ce(e){!1!==f.enabled&&!1!==f.enableKeys&&!1!==f.enablePan&&re(e)}function de(e){if(!1!==f.enabled){switch(e.preventDefault(),(0,be.default)(f)&&(0,be.default)(f).eventTransform&&(e=(0,be.default)(f).eventTransform(e)),O.set(e.changedTouches[0].pageX,e.changedTouches[0].pageY),e.touches.length){case 1:var t,n;f.enablePan&&(t=e.touches[0].pageX,n=e.touches[0].pageY,R.set(t,n)),y=g.TOUCH_PAN;break;case 2:if(!1===f.enableZoom&&!1===f.enableRotate)return;var r,i;y=g.TOUCH_DOLLY_ROTATE,f.enableZoom&&(i=e.touches[0].pageX-e.touches[1].pageX,r=e.touches[0].pageY-e.touches[1].pageY,i=Math.sqrt(i*i+r*r),P.set(0,i)),f.enableRotate&&(r=.5*(e.touches[0].pageX+e.touches[1].pageX),i=.5*(e.touches[0].pageY+e.touches[1].pageY),E.set(r,i),r=e.touches[0].pageX-e.touches[1].pageX,i=e.touches[0].pageY-e.touches[1].pageY,I.set(r,i));break;default:y=g.NONE}y!==g.NONE&&f.dispatchEvent(m)}}function fe(e){if(!1!==f.enabled)switch(e.preventDefault(),e.stopPropagation(),(0,be.default)(f)&&(0,be.default)(f).eventTransform&&(e=(0,be.default)(f).eventTransform(e)),e.touches.length){case 1:if(y!==g.TOUCH_PAN)return;var t,n;f.enablePan&&(t=e.touches[0].pageX,n=e.touches[0].pageY,N.set(t,n),k.subVectors(N,R).multiplyScalar(f.panSpeed),Y(k.x,k.y),R.copy(N));break;case 2:if(!1===f.enableRotate&&!1===f.enableZoom)return;if(y!==g.TOUCH_DOLLY_ROTATE)return;var r,i,a;f.enableZoom&&(i=e.touches[0].pageX-e.touches[1].pageX,a=e.touches[0].pageY-e.touches[1].pageY,r=Math.sqrt(i*i+a*a),C.set(0,r),D.set(0,Math.pow(C.y/P.y,f.zoomSpeed)),q(D.y),P.copy(C)),f.enableRotate&&(i=e.touches[0].pageX-e.touches[1].pageX,a=e.touches[0].pageY-e.touches[1].pageY,L.set(i,a),r=I.angle(),i=L.angle(),S.set(.5*(e.touches[0].pageX+e.touches[1].pageX),.5*(e.touches[0].pageY+e.touches[1].pageY)),A.subVectors(S,E).multiplyScalar(f.rotateSpeed),a=f.domElement===Ee.default?f.domElement.body:f.domElement,U((-i+r)*f.rotateSpeed),z(2*Math.PI*A.y/a.clientHeight),E.copy(S),I.copy(L));break;default:y=g.NONE}}function pe(e){var t,n;!1!==f.enabled&&((0,be.default)(f)&&(0,be.default)(f).eventTransform&&(e=(0,be.default)(f).eventTransform(e)),t=O.distanceTo(new fm.Vector2(e.changedTouches[0].pageX,e.changedTouches[0].pageY)),n={left:void 0!==f.domElement._left?f.domElement._left:0,top:void 0!==f.domElement._top?f.domElement._top:0},t<5&&f.dispatchEvent({type:"mouseup",mousePoint:{x:e.changedTouches[0].pageX-n.left,y:e.changedTouches[0].pageY-n.top,w:f.domElement._width,h:f.domElement._height},event:e,mouseButton:fm.MOUSE.LEFT}),ie(e),f.dispatchEvent(v),y=g.NONE)}function me(e){!1!==f.enabled&&e.preventDefault()}this.dollyIn=function(e){q(e)},this.dollyOut=function(e){X(e)},f.domElement.addEventListener("contextmenu",me,!1),f.domElement.addEventListener("mouseup",se,!1),f.domElement.addEventListener("mousemove",le,!1),f.domElement.addEventListener("mousedown",ae,!1),f.domElement.addEventListener("wheel",he,!1);var ve={touches:[],changedTouches:[],preventDefault:function(){},stopPropagation:function(){}};function ge(e){return{pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,pageX:e.clientX,pageY:e.clientY}}function ye(e){if("touch"==e.pointerType){switch(ve.touches.length){case 0:var t={startClientX:e.clientX,startClientY:e.clientY,clientX:e.clientX,clientY:e.clientY,pageY:e.clientY,pageX:e.clientX,pointerId:e.pointerId};ve.touches.push(ge(t)),ve.changedTouches.push(ge(t)),y=g.TOUCH_PAN;break;case 1:t={startClientX:e.clientX,startClientY:e.clientY,clientX:e.clientX,clientY:e.clientY,pageY:e.clientY,pageX:e.clientX,pointerId:e.pointerId},ve.touches.push(ge(t)),ve.changedTouches.push(ge(t)),y=g.TOUCH_DOLLY_ROTATE;break;default:y=g.NONE}1<ve.touches.length&&de(ve,!0)}else ve={touches:[],changedTouches:[],preventDefault:function(){},stopPropagation:function(){}}}function _e(e){if(!("touch"!=e.pointerType&&ve.touches.length<2)){for(var t=0,n=ve.touches.length;t<n;t++)ve.touches[t].pointerId==e.pointerId&&(ve.touches[t].clientX=e.clientX,ve.touches[t].clientY=e.clientY,ve.touches[t].pageY=e.clientY,ve.touches[t].pageX=e.clientX,ve.changedTouches[t].clientX=e.clientX,ve.changedTouches[t].clientY=e.clientY,ve.changedTouches[t].pageY=e.clientY,ve.changedTouches[t].pageX=e.clientX);1<ve.touches.length&&fe(ve)}}function xe(e){if("touch"==e.pointerType){1<ve.touches.length&&pe(ve);for(var t,n=ve.touches.length-1;-1<n;n--)ve.touches[n].pointerId==e.pointerId&&((0,Me.default)(t=ve.touches).call(t,n,1),(0,Me.default)(t=ve.changedTouches).call(t,n,1))}else ve={touches:[],changedTouches:[],preventDefault:function(){},stopPropagation:function(){}}}Te.default.PointerEvent&&!Te.default.TouchEvent&&(f.domElement.addEventListener("pointerdown",ye,!1),f.domElement.addEventListener("pointermove",_e,!1),f.domElement.addEventListener("pointerup",xe,!1)),f.domElement.addEventListener("touchstart",de,!1),f.domElement.addEventListener("touchend",pe,!1),f.domElement.addEventListener("touchmove",fe,!1),Te.default.addEventListener("keydown",ce,!1),this.update()},fm.OrbitControls.prototype=(0,i.default)(fm.EventDispatcher.prototype),fm.OrbitControls.prototype.constructor=fm.OrbitControls,(0,a.default)(fm.OrbitControls.prototype,{center:{get:function(){return console.warn("fm.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("fm.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(e){console.warn("fm.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!e}},noRotate:{get:function(){return console.warn("fm.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(e){console.warn("fm.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!e}},noPan:{get:function(){return console.warn("fm.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(e){console.warn("fm.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!e}},noKeys:{get:function(){return console.warn("fm.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(e){console.warn("fm.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!e}},staticMoving:{get:function(){return console.warn("fm.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(e){console.warn("fm.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!e}},dynamicDampingFactor:{get:function(){return console.warn("fm.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(e){console.warn("fm.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=e}}})},function(e,t,n){n=n(176),e.exports=n},function(e,t,n){n(41),n(58),n=n(112),e.exports=n},function(e,t,n){n(41),n(58),n=n(445),e.exports=n},function(e,t,n){var r=n(33),i=n(112);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},function(e,t,n){e.exports=n(447)},function(e,t,n){n=n(448),e.exports=n},function(e,t,n){n(449);var n=n(11),r=n.Object;e.exports=function(e){return r.getOwnPropertyNames(e)}},function(e,t,n){var r=n(8),i=n(16),n=n(180).f,i=i(function(){return!Object.getOwnPropertyNames(1)});r({target:"Object",stat:!0,forced:i},{getOwnPropertyNames:n})},function(e,t,n){n=n(451),e.exports=n},function(e,t,n){n(452);var n=n(11),r=n.Object,e=e.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)};r.getOwnPropertyDescriptor.sham&&(e.sham=!0)},function(e,t,n){var r=n(8),i=n(16),a=n(43),o=n(81).f,n=n(30),i=i(function(){o(1)}),i=!n||i;r({target:"Object",stat:!0,forced:i,sham:!n},{getOwnPropertyDescriptor:function(e,t){return o(a(e),t)}})},function(e,t,n){e.exports=n(454)},function(e,t,n){n=n(455),e.exports=n},function(e,t,n){n(179),n=n(11),e.exports=n.Object.getOwnPropertySymbols},function(e,t,n){e.exports=n(457)},function(e,t,n){n=n(458),e.exports=n},function(e,t,n){n(459),n=n(11),e.exports=n.Object.getOwnPropertyDescriptors},function(e,t,n){var r=n(8),i=n(30),l=n(460),u=n(43),h=n(81),c=n(84);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,r=u(e),i=h.f,a=l(r),o={},s=0;a.length>s;)n=i(r,t=a[s++]),void 0!==n&&c(o,t,n);return o}})},function(e,t,n){var r=n(45),i=n(130),a=n(131),o=n(33);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(o(e)),n=a.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0,r=i(n(142)),i=i(n(114)),n={createElement:function(e){return e=e.toLowerCase(),"canvas"===e?wx.createCanvas():"image"===e?wx.createImage():void 0}},(0,r.default)(n.constructor.prototype,i.default.prototype),t.default=n},function(e,t,n){"use strict";var r=n(1),o=r(n(15)),s=r(n(12));fm.Evento={convert:function(i,a){return a=a||{},i.on=function(e,t){return(a[e]=a[e]||[]).push(t),i},i.getHandlers=function(e){return a[e]},i.once=function(e,t){function n(){t.apply(i.off(e,n),arguments)}return n.h=t,i.on(e,n)},i.off=function(e,t){for(var n=a[e],r=0;t&&n&&n[r];r++)n[r]!=t&&n[r].h!=t||(0,o.default)(n).call(n,r--,1);return t||delete a[e],i},i.emit=function(e){for(var t=a[e],n=0;t&&t[n];)t[n++].apply(i,(0,s.default)(t).call(arguments,1));return i},i.offAll=function(){for(var e in a)a[e]=[],delete a[e];a=void 0},i}}},function(e,t,n){var r=n(464),i=n(203);function a(e){if(r(e))return i(e)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(465)},function(e,t,n){n=n(191),e.exports=n},function(e,t,n){var r=n(175),i=n(467),a=n(204);function o(e){if(void 0!==r&&i(Object(e)))return a(e)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(468)},function(e,t,n){n(41),n(58),n=n(469),e.exports=n},function(e,t,n){var r=n(51),i=n(24),a=n(59),o=i("iterator");e.exports=function(e){return e=Object(e),void 0!==e[o]||"@@iterator"in e||a.hasOwnProperty(r(e))}},function(e,t,n){n=n(200),e.exports=n},function(e,t,n){var r=n(472),i=n(204),a=n(203);function o(e,t){if(e){if("string"==typeof e)return a(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(473)},function(e,t,n){n=n(190),e.exports=n},function(e,t){function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){n(199),n=n(11),e.exports=n.setInterval},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(13)),o=i(n(0)),s=i(n(2)),l=i(n(3)),u=i(n(66)),h=i(n(206)),c=i(n(93)),d=i(n(142)),f=i(n(114)),n=function(){function n(e,t){(0,s.default)(this,n),this.wxInfo=t||{},t=location&&"http:"===location.protocol?"http://":"https://",t=c.default.replace("FMCloud/","").replace("www.fengmap.com","source.fengmap.com")+"webtheme",this._key=null,this._appName=null,this._mapServerURL="fengmap",this._mapThemeURL=t,this._container=null,this._canvas=null,this._tmpCanvas=null,this._tmpCanvas2=null,this._compassOffset=[28,20],this._compassSize=50,this.wxInfo.pixelRatio&&(this._compassSize*=this.wxInfo.pixelRatio),this._compassFg=null,this._compassBg=null,this.compassPosition=1,this._defaultThemeName="2001",this._focusAnimateMode=!0,this._focusAnimateTime=.3,this._focusAlphaMode=!0,this._focusAlpha=.1,this._viewModeAnimateMode=!0,this._viewModeAnimateTime=.3,this._moveToAnimateMode=!0,this._moveToAnimateTime=.3,this._scaleToAnimateMode=!0,this._modelSelectedEffect=!0,this._modelHoverEffect=!1,this._modelHoverTime=1e3,this.minScaleLevel=0,this.maxScaleLevel=6,this.defaultScaleLevel=3,this.mapScaleLevelRange=[16,23],this.mapScaleRange=null,this.defaultMapScaleLevel=20,this.defaultMapScale=null,this.minViewDistance=2e3,this.defaultVisibleGroups=[1],this.defaultFocusGroup=1,this.defaultViewMode="3d",this.shadowEnabled=!1,this.lightAngleX=45,this.lightAngleY=45,this.shadowSize=2048,this.shadowAlpha=.6,this.storeImageAngle=0,this.naviLineAnimation=!0,this.controlsRotateThreshold=.03,this.controlsScaleThreshold=.03,this.defaultGroupSpace=50,this.passiveMode=!1,this.themeVersion=null,this.themeFileType=null,this.cornerRoundLimit=1,this.stairsConfig={},this.defaultControlsPose=-15,this.defaultTiltAngle=30,this.defaultMaxTiltAngle=90,this.defaultMinTiltAngle=30,this.extentHeight=0,this.poiLabelFadeMode=!1,this.poiLabelFadeSpeed=5,this.defaultBackgroundColor=null,this.defaultBackgroundAlpha=null,this.storeImageDistanceEnabled=!1,this.storeImageDistance=500,this.useStoreApply=!0,this.frameRate=12,this.defaultViewCenter=null,this.pickCoordHeight=1,this.modelFileSuffix="js",this.enabledFXAA=!1,this.dynamicTextureScale=1,this.enabledPanRange=!1,this.tile=!1,this.levelShowOffset=0,this.lightEffects=!1,this.defaultLabelLanguage=u.default.ZH,this.font={family:'"Microsoft Yahei","微软雅黑",Tahoma,Arial'},(0,a.default)(this,e)}return(0,l.default)(n,[{key:"computePoseToAngle",value:function(){if("number"==typeof this.defaultControlsPose)return this.defaultControlsPose;if(this.defaultControlsPose){var e=h.default[this.defaultControlsPose];return e||-15}}},{key:"key",get:function(){return this._key},set:function(e){this._key=e}},{key:"appName",get:function(){return this._appName},set:function(e){this._appName=e}},{key:"mapServerURL",get:function(){return this._mapServerURL},set:function(e){this._mapServerURL=e}},{key:"mapThemeURL",get:function(){return this._mapThemeURL},set:function(e){this._mapThemeURL=e}},{key:"container",get:function(){return this._container},set:function(e){this._container=e,(0,o.default)(this._container,"style",{configurable:!0,get:function(){return{width:this.width+"px",height:this.height+"px"}}}),(0,o.default)(this._container,"clientHeight",{configurable:!0,get:function(){return this.height}}),(0,o.default)(this._container,"clientWidth",{configurable:!0,get:function(){return this.width}})}},{key:"canvas",get:function(){return this._canvas},set:function(e){this._canvas=e,this.wxInfo.pixelRatio&&(this._canvas.height*=this.wxInfo.pixelRatio,this._canvas.width*=this.wxInfo.pixelRatio);var n=this;(0,o.default)(this._canvas,"style",{configurable:!0,get:function(){var e=this.width,t=this.height;return n.wxInfo.pixelRatio&&(e/=n.wxInfo.pixelRatio,t/=n.wxInfo.pixelRatio),{width:e+"px",height:t+"px"}}}),(0,o.default)(this._canvas,"clientHeight",{configurable:!0,get:function(){return this.height}}),(0,o.default)(this._canvas,"clientWidth",{configurable:!0,get:function(){return this.width}}),(0,d.default)(this._canvas.constructor.prototype,f.default.prototype)}},{key:"tempCanvas",get:function(){return this._tmpCanvas},set:function(e){this._tmpCanvas=e,(0,o.default)(this._tmpCanvas,"style",{configurable:!0,get:function(){return{width:this.width+"px",height:this.height+"px"}}}),(0,o.default)(this._tmpCanvas,"clientHeight",{configurable:!0,get:function(){return this.height}}),(0,o.default)(this._tmpCanvas,"clientWidth",{configurable:!0,get:function(){return this.width}})}},{key:"tempCanvas2",get:function(){return this._tmpCanvas2},set:function(e){this._tmpCanvas2=e,(0,o.default)(this._tmpCanvas2,"style",{configurable:!0,get:function(){return{width:this.width+"px",height:this.height+"px"}}}),(0,o.default)(this._tmpCanvas2,"clientHeight",{configurable:!0,get:function(){return this.height}}),(0,o.default)(this._tmpCanvas2,"clientWidth",{configurable:!0,get:function(){return this.width}})}},{key:"getImage",value:function(){return this._canvas.createImage()}},{key:"compassOffset",get:function(){return this._compassOffset},set:function(e){this._compassOffset=e}},{key:"compassSize",get:function(){return this._compassSize},set:function(e){this._compassSize=e,this.wxInfo.pixelRatio&&(this._compassSize*=this.wxInfo.pixelRatio)}},{key:"compassFg",get:function(){return this._compassFg},set:function(e){this._compassFg=e}},{key:"compassBg",get:function(){return this._compassBg},set:function(e){this._compassBg=e}},{key:"defaultThemeName",get:function(){return this._defaultThemeName},set:function(e){this._defaultThemeName=e}},{key:"focusAnimateMode",get:function(){return this._focusAnimateMode},set:function(e){this._focusAnimateMode=e}},{key:"focusAnimateTime",get:function(){return this._focusAnimateTime},set:function(e){this._focusAnimateTime=e}},{key:"focusAlphaMode",get:function(){this._focusAlphaMode},set:function(e){this._focusAlphaMode=e}},{key:"focusAlpha",get:function(){return this._focusAlpha},set:function(e){this._focusAlpha=e}},{key:"viewModeAnimateMode",get:function(){return this._viewModeAnimateMode},set:function(e){this._viewModeAnimateMode=e}},{key:"moveToAnimateMode",get:function(){return this._moveToAnimateMode},set:function(e){this._moveToAnimateMode=e}},{key:"scaleToAnimateMode",get:function(){return this._scaleToAnimateMode},set:function(e){this._scaleToAnimateMode=e}},{key:"viewModeAnimateTime",get:function(){return this._viewModeAnimateTime},set:function(e){this._viewModeAnimateTime=e}},{key:"modelHoverTime",get:function(){return this._modelHoverTime},set:function(e){e<300&&(e=300),this._modelHoverTime=e}},{key:"modelHoverEffect",get:function(){return this._modelHoverEffect},set:function(e){this._modelHoverEffect=e}},{key:"modelSelectedEffect",get:function(){return this._modelSelectedEffect},set:function(e){this._modelSelectedEffect=e}}]),n}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=void 0;var m=o(n(12)),c=o(n(2)),d=o(n(3)),v=o(n(478)),g=o(n(484)),y=o(n(485)),_=o(n(148));function f(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function p(e,t){if(e){if("string"==typeof e)return x(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n=function(){function e(){(0,c.default)(this,e)}return(0,d.default)(e,[{key:"mapDecode",value:function(e,t,n){var r=v.default.build("Map").decode(e),e="%E8%AF%B7%E8%BE%93%E5%85%A5%E6%AD%A3%E7%A1%AE%E7%9A%84license.";if(_.default.ls&&!_.default.checkLicense(r.key,t,n))return console.warn(decodeURIComponent(e)),null;for(var i={scene:null,floors:[]},a=0,o=r.buffers.length;a<o;a++){var s,l,u,h=r.buffers[a],c=h.len,d=h.data.offset,f=h.data.offset+c.low,p=h.data.buffer;1==h.btype?(l=y.default.build("Scene").decode((0,m.default)(p).call(p,d,f)),i.scene=l):(s=h.gid,c=this.containsFloor(s,i.floors),l=c.floor,c.index<0&&(l.gid=s,l.biz=[],l.navi=[],l.geo=[]),2==h.btype&&(u=g.default.build("FloorGeo").decode((0,m.default)(p).call(p,d,f)),l.geo.push(u)),3==h.btype&&(u=g.default.build("FloorBiz").decode((0,m.default)(p).call(p,d,f)),l.biz.push(u)),4==h.btype&&(f=g.default.build("FloorNavi").decode((0,m.default)(p).call(p,d,f)),l.navi.push(f)),c.index<0?i.floors.push(l):i.floors[c.index]=l)}return i}},{key:"containsFloor",value:function(e,t){for(var n=0,r=t.length;n<r;n++)if(t[n].gid==e)return{index:n,floor:t[n]};return{index:-1,floor:{}}}},{key:"sceneDecode",value:function(e,t,n){var r=y.default.build("Scene").decode(e),e="%E8%AF%B7%E8%BE%93%E5%85%A5%E6%AD%A3%E7%A1%AE%E7%9A%84license.";return _.default.ls&&!_.default.checkLicense(r.key,t,n)?(console.warn(decodeURIComponent(e)),null):r}},{key:"floorGeoDecode",value:function(e){return e=g.default.build("FloorGeo").decode(e),e}},{key:"floorBizDecode",value:function(e){return e=g.default.build("FloorBiz").decode(e),e}},{key:"floorNaviDecode",value:function(e){return e=g.default.build("FloorNavi").decode(e),e}},{key:"disposeRoot",value:function(e){var t,n=e.ns,r=f(n.children);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.builder=void 0,i.parent=void 0,i.children.length=0,i._fields.length=0,i._fieldsById=void 0,i._fieldsByName=void 0}}catch(e){r.e(e)}finally{r.f()}n.children.length=0,e.ns=void 0,e.ptr=void 0}},{key:"dispose",value:function(){}}]),e}(),t.default=n},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0,n=n(147),n=n.ProtoBuf.newBuilder({}).import({messages:[{name:"Map",fields:[{rule:"required",type:"string",name:"mid",id:1},{rule:"required",type:"int32",name:"file_ver",id:2},{rule:"required",type:"uint64",name:"date_ver",id:3},{rule:"required",type:"string",name:"mname",id:4},{rule:"required",type:"string",name:"hash_code",id:5},{rule:"optional",type:"string",name:"key",id:6},{rule:"optional",type:"string",name:"file_date",id:7},{rule:"optional",type:"string",name:"desc",id:8},{rule:"optional",type:"bool",name:"read_only",id:9,options:{default:!1}},{rule:"repeated",type:"Buffer",name:"buffers",id:10}],messages:[{name:"Buffer",fields:[{rule:"required",type:"int32",name:"gid",id:1},{rule:"required",type:"int32",name:"file_ver",id:2},{rule:"required",type:"int32",name:"btype",id:3},{rule:"required",type:"uint64",name:"len",id:4},{rule:"required",type:"bytes",name:"data",id:5}]}]}]}),t.default=n},function(e,t,n){e.exports=n(480)},function(e,t,n){n(41);var r=n(481),i=n(51),a=Array.prototype,o={DOMTokenList:!0,NodeList:!0};e.exports=function(e){var t=e.entries;return e===a||e instanceof Array&&t===a.entries||o.hasOwnProperty(i(e))?r:t}},function(e,t,n){n=n(482),e.exports=n},function(e,t,n){n(108),n=n(26),e.exports=n("Array").entries},function(e,t){},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0,n=n(147),n=n.ProtoBuf.newBuilder({}).import({messages:[{name:"FloorGeo",syntax:"proto2",fields:[{rule:"required",type:"string",name:"mid",id:1},{rule:"required",type:"int32",name:"gid",id:2},{rule:"optional",type:"float",name:"height",id:3},{rule:"repeated",type:"GeneralGeoInfo",name:"extentLayer",id:4},{rule:"repeated",type:"GeneralGeoInfo",name:"modelLayer",id:5},{rule:"repeated",type:"GeneralGeoInfo",name:"labelLayer",id:6},{rule:"repeated",type:"GeneralGeoInfo",name:"poiLayer",id:7},{rule:"repeated",type:"GeneralGeoInfo",name:"polygonLayer",id:8},{rule:"repeated",type:"GeneralGeoInfo",name:"polygonLabelLayer",id:9},{rule:"repeated",type:"GeneralGeoInfo",name:"liftLayer",id:10},{rule:"repeated",type:"GeneralGeoInfo",name:"stairLayer",id:11},{rule:"repeated",type:"GeneralGeoInfo",name:"escalatorLayer",id:12},{rule:"repeated",type:"GeneralGeoInfo",name:"externalModelLayer",id:13}],messages:[{name:"GeneralGeoInfo",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"eid",id:1},{rule:"optional",type:"string",name:"geo",id:2},{rule:"optional",type:"float",name:"height",id:3},{rule:"optional",type:"float",name:"area",id:4},{rule:"repeated",type:"Indexinfo",name:"idxs",id:5},{rule:"repeated",type:"double",name:"pts",id:6}],messages:[{name:"Indexinfo",syntax:"proto2",fields:[{rule:"repeated",type:"int32",name:"idxs",id:1}]}]}]},{name:"FloorBiz",syntax:"proto2",fields:[{rule:"required",type:"string",name:"mid",id:1},{rule:"required",type:"int32",name:"gid",id:2},{rule:"repeated",type:"ExtentBizInfo",name:"extentLayer",id:3},{rule:"repeated",type:"ModelBizInfo",name:"modelLayer",id:4},{rule:"repeated",type:"LabelBizInfo",name:"labelLayer",id:5},{rule:"repeated",type:"POIBizInfo",name:"poiLayer",id:6},{rule:"repeated",type:"PolygonBizInfo",name:"polygonLayer",id:7},{rule:"repeated",type:"LiftBizInfo",name:"liftLayer",id:8},{rule:"repeated",type:"StairBizInfo",name:"stairLayer",id:9},{rule:"repeated",type:"PolygonLabelBizInfo",name:"polygonLabelLayer",id:10},{rule:"repeated",type:"ExternalModelBizInfo",name:"externalModelLayer",id:11}],messages:[{name:"ExtentBizInfo",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"eid",id:1},{rule:"optional",type:"string",name:"fid",id:2},{rule:"optional",type:"int32",name:"type",id:3},{rule:"optional",type:"string",name:"name",id:4},{rule:"optional",type:"string",name:"ename",id:5}]},{name:"ModelBizInfo",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"eid",id:1},{rule:"optional",type:"string",name:"fid",id:2},{rule:"optional",type:"int32",name:"type",id:3},{rule:"optional",type:"string",name:"name",id:4},{rule:"optional",type:"string",name:"ename",id:5},{rule:"optional",type:"int32",name:"minlevel",id:6},{rule:"optional",type:"int32",name:"maxlevel",id:7},{rule:"optional",type:"int32",name:"pass",id:8}]},{name:"LabelBizInfo",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"eid",id:1},{rule:"optional",type:"string",name:"fid",id:2},{rule:"optional",type:"int32",name:"type",id:3},{rule:"optional",type:"string",name:"name",id:4},{rule:"optional",type:"string",name:"ename",id:5},{rule:"optional",type:"int32",name:"minlevel",id:6},{rule:"optional",type:"int32",name:"maxlevel",id:7}]},{name:"PolygonBizInfo",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"eid",id:1},{rule:"optional",type:"string",name:"fid",id:2},{rule:"optional",type:"int32",name:"type",id:3},{rule:"optional",type:"string",name:"name",id:4},{rule:"optional",type:"string",name:"ename",id:5}]},{name:"POIBizInfo",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"eid",id:1},{rule:"optional",type:"string",name:"fid",id:2},{rule:"optional",type:"int32",name:"type",id:3},{rule:"optional",type:"string",name:"name",id:4},{rule:"optional",type:"string",name:"ename",id:5},{rule:"optional",type:"int32",name:"minlevel",id:6},{rule:"optional",type:"int32",name:"maxlevel",id:7}]},{name:"LiftBizInfo",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"eid",id:1},{rule:"optional",type:"string",name:"fid",id:2},{rule:"optional",type:"int32",name:"type",id:3},{rule:"optional",type:"int32",name:"flag",id:4},{rule:"optional",type:"string",name:"floor",id:5},{rule:"optional",type:"int32",name:"minlevel",id:6},{rule:"optional",type:"int32",name:"maxlevel",id:7}]},{name:"StairBizInfo",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"eid",id:1},{rule:"optional",type:"string",name:"fid",id:2},{rule:"optional",type:"int32",name:"type",id:3},{rule:"optional",type:"int32",name:"flag",id:4},{rule:"optional",type:"int32",name:"minlevel",id:5},{rule:"optional",type:"int32",name:"maxlevel",id:6}]},{name:"PolygonLabelBizInfo",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"eid",id:1},{rule:"optional",type:"string",name:"fid",id:2},{rule:"optional",type:"int32",name:"type",id:3},{rule:"optional",type:"float",name:"width",id:4},{rule:"optional",type:"string",name:"name",id:5},{rule:"optional",type:"string",name:"ename",id:6},{rule:"optional",type:"float",name:"angle",id:7}]},{name:"ExternalModelBizInfo",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"eid",id:1},{rule:"optional",type:"string",name:"fid",id:2},{rule:"optional",type:"int32",name:"type",id:3},{rule:"optional",type:"string",name:"name",id:4},{rule:"optional",type:"string",name:"ename",id:5}]}]},{name:"FloorNavi",syntax:"proto2",fields:[{rule:"required",type:"string",name:"mid",id:1},{rule:"required",type:"int32",name:"gid",id:2},{rule:"repeated",type:"NaviNode",name:"naviNodes",id:3},{rule:"repeated",type:"NaviSegment",name:"naviSegments",id:4},{rule:"repeated",type:"NaviZone",name:"naviZones",id:5},{rule:"repeated",type:"NaviModel",name:"naviModels",id:6},{rule:"repeated",type:"int32",name:"nextFloors",id:7}],messages:[{name:"NaviNode",syntax:"proto2",fields:[{rule:"optional",type:"int32",name:"nodeId",id:1},{rule:"optional",type:"int32",name:"nodeType",id:2},{rule:"optional",type:"int32",name:"liftType",id:3},{rule:"optional",type:"int32",name:"liftFlag",id:4},{rule:"optional",type:"int32",name:"liftEntry",id:5},{rule:"optional",type:"string",name:"liftFloor",id:6},{rule:"optional",type:"string",name:"linkSeg",id:7},{rule:"optional",type:"string",name:"geo",id:8},{rule:"optional",type:"int32",name:"entranceType",id:9},{rule:"optional",type:"string",name:"entranceFloor",id:10},{rule:"optional",type:"int32",name:"doortype",id:11},{rule:"repeated",type:"int32",name:"idxs",id:12},{rule:"repeated",type:"double",name:"pts",id:13}]},{name:"NaviSegment",syntax:"proto2",fields:[{rule:"optional",type:"int32",name:"segmentId",id:1},{rule:"optional",type:"int32",name:"snode",id:2},{rule:"optional",type:"int32",name:"enode",id:3},{rule:"optional",type:"double",name:"length",id:4},{rule:"optional",type:"int32",name:"rank",id:5},{rule:"optional",type:"string",name:"name",id:6},{rule:"optional",type:"int32",name:"entry",id:7},{rule:"optional",type:"string",name:"desc",id:8},{rule:"optional",type:"string",name:"geo",id:9},{rule:"optional",type:"int32",name:"through",id:10},{rule:"repeated",type:"int32",name:"idxs",id:11},{rule:"repeated",type:"double",name:"pts",id:12}]},{name:"NaviZone",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"id",id:1},{rule:"required",type:"int32",name:"type",id:2,options:{default:0}},{rule:"required",type:"string",name:"geo",id:3},{rule:"repeated",type:"int32",name:"rejects",id:4}]},{name:"NaviModel",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"id",id:1},{rule:"repeated",type:"int32",name:"doorids",id:2},{rule:"repeated",type:"int32",name:"nodetypes",id:3},{rule:"repeated",type:"int32",name:"entrytypes",id:4}]}]}]}),t.default=n},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0,n=n(147),n=n.ProtoBuf.newBuilder({}).import({messages:[{name:"Scene",fields:[{rule:"required",type:"string",name:"mid",id:19},{rule:"required",type:"int32",name:"file_ver",id:20},{rule:"required",type:"uint64",name:"date_ver",id:21},{rule:"required",type:"string",name:"mname",id:22},{rule:"required",type:"string",name:"hash_code",id:23},{rule:"optional",type:"string",name:"key",id:24},{rule:"optional",type:"string",name:"desc",id:25},{rule:"optional",type:"bool",name:"read_only",id:26,options:{default:!1}},{rule:"optional",type:"float",name:"x",id:1},{rule:"optional",type:"float",name:"y",id:2},{rule:"optional",type:"float",name:"z",id:3},{rule:"optional",type:"float",name:"minX",id:4},{rule:"optional",type:"float",name:"minY",id:5},{rule:"optional",type:"float",name:"maxX",id:6},{rule:"optional",type:"float",name:"maxY",id:7},{rule:"optional",type:"string",name:"defGid",id:8},{rule:"optional",type:"float",name:"defCenX",id:9},{rule:"optional",type:"float",name:"defCenY",id:10},{rule:"optional",type:"float",name:"defCenZ",id:11},{rule:"optional",type:"float",name:"height",id:12},{rule:"optional",type:"float",name:"rotateAngleX",id:13},{rule:"optional",type:"float",name:"rotateAngleY",id:14},{rule:"optional",type:"float",name:"rotateAngleZ",id:15},{rule:"optional",type:"float",name:"scale",id:16},{rule:"optional",type:"string",name:"scaleLevel",id:17},{rule:"repeated",type:"LayerGroup",name:"layerGroups",id:18}],messages:[{name:"Layer",fields:[{rule:"optional",type:"int32",name:"lid",id:1},{rule:"optional",type:"string",name:"lname",id:2},{rule:"optional",type:"string",name:"alias",id:3},{rule:"optional",type:"Type",name:"ltype",id:4},{rule:"optional",type:"float",name:"offsetX",id:5},{rule:"optional",type:"float",name:"offsetY",id:6},{rule:"optional",type:"float",name:"height",id:7},{rule:"optional",type:"float",name:"rotateAngleX",id:8},{rule:"optional",type:"float",name:"rotateAngleY",id:9},{rule:"optional",type:"float",name:"rotateAngleZ",id:10},{rule:"optional",type:"float",name:"minScaleLevel",id:11},{rule:"optional",type:"float",name:"maxScaleLevel",id:12},{rule:"optional",type:"bool",name:"isVisible",id:13},{rule:"optional",type:"bool",name:"isSelectable",id:14},{rule:"optional",type:"bool",name:"isEditable",id:15},{rule:"optional",type:"string",name:"desc",id:16}],enums:[{name:"Type",values:[{name:"GEOPOINT",id:1},{name:"GEOPOINT_ESCALATOR",id:2},{name:"GEOPOINT_LIFT",id:3},{name:"GEOPOINT_STAIR",id:4},{name:"GEOPOINT_PANORAMA",id:5},{name:"GEOPOINT_POI",id:6},{name:"GEOPOINT_STORELABEL",id:7},{name:"GEOPOINT_NAVINODE",id:8},{name:"GEOPOINT_MODEL",id:9},{name:"GEOLINE",id:20},{name:"GEOLINE_NAVISEGMENT",id:21},{name:"GEOLINE_BORDER",id:22},{name:"GEOPOLYGON",id:30},{name:"GEOPOLYGON_EXTENT",id:31},{name:"GEOPOLYGON_STORE",id:32},{name:"GEOPOLYGON_LABEL",id:33},{name:"RASTERATA",id:40},{name:"OVERLAYDATA",id:50}]}]},{name:"LayerGroup",fields:[{rule:"optional",type:"int32",name:"gid",id:1},{rule:"optional",type:"string",name:"gname",id:2},{rule:"optional",type:"string",name:"alias",id:3},{rule:"optional",type:"float",name:"height",id:4},{rule:"optional",type:"string",name:"desc",id:5},{rule:"repeated",type:"Layer",name:"layers",id:6}]}]}]}),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a,o=i(n(32)),n=(a=function(e){return E(e)},{encryption:function(e){return a(e)}});function c(e,t){var n=(65535&e)+(65535&t),t=(e>>16)+(t>>16)+(n>>16);return t<<16|65535&n}function s(e,t){return e<<t|e>>>32-t}function l(e,t,n,r,i,a){return c(s(c(c(t,e),c(r,a)),i),n)}function d(e,t,n,r,i,a,o){return l(t&n|~t&r,e,t,i,a,o)}function f(e,t,n,r,i,a,o){return l(t&r|n&~r,e,t,i,a,o)}function p(e,t,n,r,i,a,o){return l(t^n^r,e,t,i,a,o)}function m(e,t,n,r,i,a,o){return l(n^(t|~r),e,t,i,a,o)}function u(e,t){var n,r,i,a;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var o=1732584193,s=-271733879,l=-1732584194,u=271733878,h=0;h<e.length;h+=16)n=o,r=s,i=l,a=u,o=d(o,s,l,u,e[h],7,-680876936),u=d(u,o,s,l,e[h+1],12,-389564586),l=d(l,u,o,s,e[h+2],17,606105819),s=d(s,l,u,o,e[h+3],22,-1044525330),o=d(o,s,l,u,e[h+4],7,-176418897),u=d(u,o,s,l,e[h+5],12,1200080426),l=d(l,u,o,s,e[h+6],17,-1473231341),s=d(s,l,u,o,e[h+7],22,-45705983),o=d(o,s,l,u,e[h+8],7,1770035416),u=d(u,o,s,l,e[h+9],12,-1958414417),l=d(l,u,o,s,e[h+10],17,-42063),s=d(s,l,u,o,e[h+11],22,-1990404162),o=d(o,s,l,u,e[h+12],7,1804603682),u=d(u,o,s,l,e[h+13],12,-40341101),l=d(l,u,o,s,e[h+14],17,-1502002290),s=d(s,l,u,o,e[h+15],22,1236535329),o=f(o,s,l,u,e[h+1],5,-165796510),u=f(u,o,s,l,e[h+6],9,-1069501632),l=f(l,u,o,s,e[h+11],14,643717713),s=f(s,l,u,o,e[h],20,-373897302),o=f(o,s,l,u,e[h+5],5,-701558691),u=f(u,o,s,l,e[h+10],9,38016083),l=f(l,u,o,s,e[h+15],14,-660478335),s=f(s,l,u,o,e[h+4],20,-405537848),o=f(o,s,l,u,e[h+9],5,568446438),u=f(u,o,s,l,e[h+14],9,-1019803690),l=f(l,u,o,s,e[h+3],14,-187363961),s=f(s,l,u,o,e[h+8],20,1163531501),o=f(o,s,l,u,e[h+13],5,-1444681467),u=f(u,o,s,l,e[h+2],9,-51403784),l=f(l,u,o,s,e[h+7],14,1735328473),s=f(s,l,u,o,e[h+12],20,-1926607734),o=p(o,s,l,u,e[h+5],4,-378558),u=p(u,o,s,l,e[h+8],11,-2022574463),l=p(l,u,o,s,e[h+11],16,1839030562),s=p(s,l,u,o,e[h+14],23,-35309556),o=p(o,s,l,u,e[h+1],4,-1530992060),u=p(u,o,s,l,e[h+4],11,1272893353),l=p(l,u,o,s,e[h+7],16,-155497632),s=p(s,l,u,o,e[h+10],23,-1094730640),o=p(o,s,l,u,e[h+13],4,681279174),u=p(u,o,s,l,e[h],11,-358537222),l=p(l,u,o,s,e[h+3],16,-722521979),s=p(s,l,u,o,e[h+6],23,76029189),o=p(o,s,l,u,e[h+9],4,-640364487),u=p(u,o,s,l,e[h+12],11,-421815835),l=p(l,u,o,s,e[h+15],16,530742520),s=p(s,l,u,o,e[h+2],23,-995338651),o=m(o,s,l,u,e[h],6,-198630844),u=m(u,o,s,l,e[h+7],10,1126891415),l=m(l,u,o,s,e[h+14],15,-1416354905),s=m(s,l,u,o,e[h+5],21,-57434055),o=m(o,s,l,u,e[h+12],6,1700485571),u=m(u,o,s,l,e[h+3],10,-1894986606),l=m(l,u,o,s,e[h+10],15,-1051523),s=m(s,l,u,o,e[h+1],21,-2054922799),o=m(o,s,l,u,e[h+8],6,1873313359),u=m(u,o,s,l,e[h+15],10,-30611744),l=m(l,u,o,s,e[h+6],15,-1560198380),s=m(s,l,u,o,e[h+13],21,1309151649),o=m(o,s,l,u,e[h+4],6,-145523070),u=m(u,o,s,l,e[h+11],10,-1120210379),l=m(l,u,o,s,e[h+2],15,718787259),s=m(s,l,u,o,e[h+9],21,-343485551),o=c(o,n),s=c(s,r),l=c(l,i),u=c(u,a);return[o,s,l,u]}function h(e){for(var t="",n=32*e.length,r=0;r<n;r+=8)t+=String.fromCharCode(e[r>>5]>>>r%32&255);return t}function v(e){var t=[];for(t[(e.length>>2)-1]=void 0,r=0;r<t.length;r+=1)t[r]=0;for(var n=8*e.length,r=0;r<n;r+=8)t[r>>5]|=(255&e.charCodeAt(r/8))<<r%32;return t}function g(e){return h(u(v(e),8*e.length))}function y(e,t){var n,r=v(e),i=[],a=[];for(i[15]=a[15]=void 0,16<r.length&&(r=u(r,8*e.length)),n=0;n<16;n+=1)i[n]=909522486^r[n],a[n]=1549556828^r[n];return t=u((0,o.default)(i).call(i,v(t)),512+8*t.length),h(u((0,o.default)(a).call(a,t),640))}function _(e){for(var t,n="0123456789abcdef",r="",i=0;i<e.length;i+=1)t=e.charCodeAt(i),r+=n.charAt(t>>>4&15)+n.charAt(15&t);return r}function x(e){return unescape(encodeURIComponent(e))}function w(e){return g(x(e))}function b(e){return _(w(e))}function M(e,t){return y(x(e),x(t))}function T(e,t){return _(M(e,t))}function E(e,t,n){return t?(n?M:T)(t,e):(n?w:b)(e)}t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(27)),s=a(n(9)),l=a(n(2)),u=a(n(3)),h=a(n(5)),c=a(n(6)),d=a(n(7)),r=a(n(17)),f=a(n(36));function p(n){var r=m();return function(){var e,t=(0,d.default)(n),t=r?(e=(0,d.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,c.default)(this,t)}}function m(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,h.default)(i,e);var r=p(i);function i(e,t){var n;return(0,l.default)(this,i),n=r.call(this,t.eid,f.default.FLOOR),n.bdata=t,n.gdata=e,n._parseData=null,n._isInitMesh=!0,n._visible=!0,n._renderNode=null,n._geometry=void 0,n}return(0,u.default)(i,[{key:"initMesh",value:function(e,t,n,r){this._geometry&&(this._renderNode=new fm.Mesh(this._geometry.geometry,e),this._renderNode.mapNode=this,e.color=new fm.Color(n),e.opacity=(0,o.default)(r),e.userData.opacity=r,e.transparent=!0,this._renderNode.scale.set(1,-1,1),this._renderNode.rotation.set(Math.PI/2,0,0,"XYZ"),this._renderNode.position.copy(t),this._renderNode.frustumCulled=!1,this._renderNode.parent=this.parent.scene,this._renderNode.visible=this.show,this._renderNode.receiveShadow=!0,this.renderNodeInited=!0,this._geometry=null)}},{key:"setByTheme",value:function(e){this._renderNode&&(this._renderNode.material.color=new fm.Color(e.floorColor),this._renderNode.material.alpha=e.floorOpacity,this._renderNode.material.userData.opacity=e.floorOpacity)}},{key:"checkByFrustum",value:function(e){var t=!0;this._renderNode&&this._renderNode.updateMatrixWorld(!0),this.visible=t}},{key:"releaseGpuMemory",value:function(){this.renderNode&&(this._geometry=null,this.renderNodeInited=!1,this.renderNode.parent.remove(this.renderNode),this.dispose())}},{key:"restoreGpuMemeory",value:function(){}},{key:"getBbox",value:function(){}},{key:"dispose",value:function(){this._renderNode&&(this._renderNode.material.dispose(),this._renderNode.geometry.dispose(),this._renderNode.material=void 0,this._renderNode.geometry=void 0,this._geometry=void 0,this._renderNode.mapNode=void 0,this._renderNode=void 0)}},{key:"isInitMesh",get:function(){return this._isInitMesh},set:function(e){this._isInitMesh=e}},{key:"visible",get:function(){return this._visible},set:function(e){var t;e?(0,s.default)(t=this.parent.scene.children).call(t,this._renderNode)<0&&this._renderNode&&this.parent.scene.add(this._renderNode):(this._renderNode&&this.parent.scene.remove(this._renderNode),this._renderNode.parent=this.parent.scene),this._visible=e}},{key:"renderNode",get:function(){return this._renderNode},set:function(e){this._renderNode=e}}]),i}(r.default),t.default=r},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(10)),s=a(n(2)),l=a(n(3)),u=a(n(5)),h=a(n(6)),c=a(n(7)),r=a(n(17)),d=a(n(214)),f=a(n(94));function p(n){var r=m();return function(){var e,t=(0,c.default)(n),t=r?(e=(0,c.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,t)}}function m(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,u.default)(a,e);var i=p(a);function a(e,t,n){var r;return(0,s.default)(this,a),r=i.call(this,"externalModelLayer"),r._scene=new fm.Scene,r._scene.userData.type="externalModel",r.alias="externalModel",r._models={},r.initNode(e,t),r._visible=!0,r.initLight(),r.putLight(),r}return(0,l.default)(a,[{key:"initNode",value:function(e,t){for(var n=0;n<e.length;n++)this.createNode(e[n],t[n])}},{key:"createNode",value:function(e,t){t=new d.default(e,t),t.parent=this,this._models[""+t.eid]=t}},{key:"addNodes",value:function(e){e.parent=this,e.renderNode&&this._scene.add(e.renderNode),this._models[""+e.eid]=e}},{key:"traverse",value:function(e){for(var t in this._models)e&&e(this._models[t])}},{key:"initLight",value:function(){this._target=new fm.Object3D,this._mainLight=new fm.DirectionalLight(8947848,1.2),this._mainLight.position.set(-1,1,1).normalize(),this._mainLight.target=this._target,this._secondLight=new fm.DirectionalLight(3355443),this._secondLight.position.set(-.5,1,-1).normalize(),this._secondLight.target=this._target}},{key:"putLight",value:function(){f.default.light?this._ambientLight=new fm.AmbientLight(4210752):(this._ambientLight=new fm.AmbientLight(16777215,.46),this.scene.add(this._mainLight),this.scene.add(this._secondLight),this.scene.add(this._target)),this.scene.add(this._ambientLight),this.scene.removeLight=function(){}}},{key:"removeLight",value:function(){this.scene.remove(this._mainLight),this.scene.remove(this._ambientLight),this.scene.remove(this._secondLight),this.scene.add(this._target)}},{key:"disposeLight",value:function(){this._mainLight=void 0,this._ambientLight=void 0}},{key:"getNodeById",value:function(e){return this._models[""+e]}},{key:"checkSceneNode",value:function(){for(var e in this._scene.children.length=0,this._models)this._models[e].visible&&this._models[e].renderNode&&this._scene.add(this._models[e].renderNode);this.putLight()}},{key:"dispose",value:function(){for(var e in this._models)this._models[e].dispose(),this._scene.remove(this._models[e].renderNode),this._models[e].parent=void 0,this._models[e]=void 0;this.removeLight(),this.disposeLight(),this._scene.length=0,this._scene=void 0}},{key:"scene",get:function(){return this._scene}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.parent&&this.parent.parent&&this.parent.parent.parent&&(0,o.default)(this.parent.parent.parent).setRenderList()}},{key:"show",get:function(){return this.visible},set:function(e){this.visible=e}}]),a}(r.default),t.default=r},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(10)),s=a(n(2)),l=a(n(3)),u=a(n(5)),h=a(n(6)),c=a(n(7)),r=a(n(17)),d=a(n(215));function f(n){var r=p();return function(){var e,t=(0,c.default)(n),t=r?(e=(0,c.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,t)}}function p(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,u.default)(i,e);var r=f(i);function i(e,t){var n;return(0,s.default)(this,i),n=r.call(this,"modelLayer"),n._scene=new fm.Scene,n._scene.name="model",n._scene.userData.type="model",n.alias="model",n._models={},n.initNode(e,t),n._visible=!0,n.initLight(),n.putLight(),n}return(0,l.default)(i,[{key:"initNode",value:function(e,t){for(var n=0;n<e.length;n++)this.createNode(e[n],t[n])}},{key:"createNode",value:function(e,t){t=new d.default(e,t),t.parent=this,this._models[""+t.eid]=t}},{key:"addNodes",value:function(e){e.parent=this,e.renderNode&&this._scene.add(e.renderNode),this._models[""+e.eid]=e}},{key:"removeNode",value:function(e){e.renderNode&&this._scene.remove(e.renderNode)}},{key:"traverse",value:function(e){for(var t in this._models)e&&e(this._models[t])}},{key:"initLight",value:function(){this._ambientLight=new fm.AmbientLight(7631988),this._target=new fm.Object3D,this._mainLight=new fm.DirectionalLight(8947848,1.2),this._mainLight.name="directionalLight",this._mainLight.position.set(-1,1,1).normalize(),this._mainLight.target=this._target,this._secondLight=new fm.DirectionalLight(3355443),this._secondLight.position.set(-.5,1,-1).normalize(),this._secondLight.target=this._target}},{key:"putLight",value:function(){var e=this;this.scene.add(this._mainLight),this.scene.add(this._secondLight),this.scene.add(this._ambientLight),this.scene.add(this._target),this.scene.removeLight=function(){e.removeLight()}}},{key:"removeLight",value:function(){this.scene.remove(this._mainLight),this.scene.remove(this._ambientLight),this.scene.remove(this._secondLight)}},{key:"disposeLight",value:function(){this._mainLight=void 0,this._ambientLight=void 0}},{key:"getNodeById",value:function(e){return this._models[""+e]}},{key:"checkSceneNode",value:function(){for(var e in this._scene.children.length=0,this._models)this._models[e].visible&&this._models[e].renderNode&&this._scene.add(this._models[e].renderNode);this.putLight()}},{key:"getAllMesh",value:function(){var e,t=[];for(e in this._models)this._models[e].renderNode&&t.push(this._models[e].renderNode);return t}},{key:"getVideoMemoryAmount",value:function(){var t=null;return this.traverse(function(e){e._renderNode&&e._renderNode.geometry&&e._renderNode.geometry._bufferGeometry&&(t+=e._renderNode.geometry._bufferGeometry.attributes.position.array.byteLength,t+=e._renderNode.geometry._bufferGeometry.attributes.color.array.byteLength,t+=e._renderNode.geometry._bufferGeometry.attributes.normal.array.byteLength,t+=e._renderNode.geometry._bufferGeometry.attributes.uv.array.byteLength)}),t}},{key:"dispose",value:function(){for(var e in this._models)this._models[e].dispose(),this._scene.remove(this._models[e].renderNode),this._models[e].parent=void 0,this._models[e]=void 0;this.removeLight(),this.disposeLight(),this._scene.length=0,this._scene=void 0}},{key:"scene",get:function(){return this._scene}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this.parent&&this.parent.parent&&this.parent.parent.parent&&(0,o.default)(this.parent.parent.parent).setRenderList()}},{key:"show",get:function(){return this.visible},set:function(e){this.visible=e}}]),i}(r.default),t.default=r},function(e,t,n){n=n(491),e.exports=n},function(e,t,n){n(492),e.exports=9007199254740991},function(e,t,n){n=n(8),n({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),n=a(n(17));function c(n){var r=d();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,l.default)(n,e);var t=c(n);function n(){var e;return(0,o.default)(this,n),e=t.call(this),e._scene=new fm.Scene,e}return(0,s.default)(n,[{key:"scene",get:function(){return this._scene}},{key:"show",get:function(){return this.visible},set:function(e){this.visible=e}}]),n}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),n=a(n(17));function c(n){var r=d();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,l.default)(n,e);var t=c(n);function n(){var e;return(0,o.default)(this,n),e=t.call(this),e._scene=new fm.Scene,e}return(0,s.default)(n,[{key:"checkSceneNode",value:function(){}},{key:"scene",get:function(){return this._scene}},{key:"dispose",value:function(){}}]),n}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(5)),l=a(n(6)),u=a(n(7)),h=a(n(226));function c(n){var r=d();return function(){var e,t=(0,u.default)(n),t=r?(e=(0,u.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,l.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,s.default)(a,e);var i=c(a);function a(e,t,n){var r;return(0,o.default)(this,a),r=i.call(this,e,t),n&&(e=new h.default,t=e.createGeometry(1.5,20,24,.5),e=new fm.BufferGeometry,e.addAttribute("position",new fm.Float32BufferAttribute(t.vertice,3)),e.addAttribute("uv",new fm.Float32BufferAttribute(t.uv,2)),e.setIndex(new fm.Uint16BufferAttribute(t.index,1)),r.geometry=e,r.material=new fm.MeshBasicMaterial({map:n,depthTest:!1}),r.material.side=2,r.material.transparent=!0),r}return a}(fm.Mesh),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(5)),l=a(n(6)),u=a(n(7)),n=a(n(17));function h(n){var r=c();return function(){var e,t=(0,u.default)(n),t=r?(e=(0,u.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,l.default)(this,t)}}function c(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,s.default)(n,e);var t=h(n);function n(){return(0,o.default)(this,n),t.call(this)}return n}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(50)),s=a(n(2)),l=a(n(3)),u=a(n(5)),h=a(n(6)),c=a(n(7)),r=a(n(17)),d=a(n(48));function f(n){var r=p();return function(){var e,t=(0,c.default)(n),t=r?(e=(0,c.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,t)}}function p(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,u.default)(n,e);var t=f(n);function n(){var e;return(0,s.default)(this,n),e=t.call(this),e._scene=new fm.Scene,e._scene.userData.type="domMarker",e.alias="domMarker",e._visible=!0,e.domMarkers=[],e.anchor=9,e.temp=[],e}return(0,l.default)(n,[{key:"addMarker",value:function(e){e.parent=this,this.domMarkers.push(e);var t=new Date,n=t.getTime(),t=Math.random();e._param.id="domMarker"+n+t,e.initDom(e._param),t=this.findParent(d.default),t&&(t._map.on("mapViewChanged",(0,o.default)(e=this._moveMarker).call(e,this)),t._map.on("focusGroupIDChanged",(0,o.default)(e=this._displayMarker).call(e,this)),t._map.on("visibleGroupIDsChanged",(0,o.default)(t=this._displayMarker).call(t,this)))}},{key:"_moveMarker",value:function(){var e=this.findParent(d.default);if(e)for(var t=0;t<this.domMarkers.length;t++){var n,r=this.domMarkers[t],i=r.domNode;i&&(n=null,n=r.height?r.height+this.height:this.height,n=e._map.coordMapToScreen(r.x,r.y,n),i.style.left=this._anchor(r,n).left,i.style.top=this._anchor(r,n).top)}}},{key:"_anchor",value:function(e,t){var n=null,r=null;switch(e.anchor){case 9:n=t.x-e.domWidth/2+"px",r=t.y-e.domHeight/2+"px";break;case 5:n=t.x-e.domWidth+"px",r=t.y-e.domHeight+"px";break;case 6:n=t.x+"px",r=t.y-e.domHeight+"px";break;case 7:n=t.x-e.domWidth+"px",r=t.y+"px";break;case 8:n=t.x+"px",r=t.y+"px";break;case 1:n=t.x-e.domWidth+"px",r=t.y-e.domHeight/2+"px";break;case 2:n=t.x+"px",r=t.y-e.domHeight/2+"px";break;case 3:n=t.x-e.domWidth/2+"px",r=t.y-e.domHeight+"px";break;case 4:n=t.x-e.domWidth/2+"px",r=t.y+"px";break;default:n=t.x-e.domWidth/2+"px",r=t.y-e.domHeight/2+"px"}return{left:n,top:r}}},{key:"_displayMarker",value:function(){var e=this.findParent(d.default);if(e)if(1===e._map._visibleGroups.length)if(this.parent.eid===e._map.focusGroupID)for(var t=0;t<this.domMarkers.length;t++)this.domMarkers[t].domNode.style.display="block",this.domMarkers[t].domNode.style.opacity=1;else for(var n=0;n<this.domMarkers.length;n++)this.domMarkers[n].domNode.style.display="none",this.domMarkers[n].domNode.style.opacity=e._map.MapOptions.focusAlpha;else if(this.parent.eid===e._map.focusGroupID)for(var r=0;r<this.domMarkers.length;r++)this.domMarkers[r].domNode.style.display="block",this.domMarkers[r].domNode.style.opacity=1;else for(var i=0;i<this.domMarkers.length;i++)this.domMarkers[i].domNode.style.display="block",this.domMarkers[i].domNode.style.opacity=e._map.MapOptions.focusAlpha}},{key:"_displayMarker2",value:function(){var e=this.findParent(d.default);e&&e._map._visibleGroups.length}},{key:"removeMarker",value:function(e){void 0!==e&&(e.parent=null,e=document.getElementById(e._param.id),e&&(e.parentNode.removeChild(e),e=null))}},{key:"removeAll",value:function(){if(void 0!==this.domMarkers.length)for(var e=0;e<this.domMarkers.length;e++){var t=document.getElementById(this.domMarkers[e]._param.id);t&&(t.parentNode.removeChild(t),t=null)}}},{key:"dispose",value:function(){this.removeAll()}},{key:"scene",get:function(){return this._scene}},{key:"height",get:function(){return this.parent._height}},{key:"show",get:function(){return this.show},set:function(e){if(void 0!==this.domMarkers.length)for(var t=0;t<this.domMarkers.length;t++){var n=document.getElementById(this.domMarkers[t]._param.id);n&&(n.style.display=e?"block":"none")}}}]),n}(r.default),t.default=r},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),n=a(n(17));function c(n){var r=d();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,l.default)(n,e);var t=c(n);function n(){var e;return(0,o.default)(this,n),e=t.call(this),e._scene=new fm.Scene,e._scene.name="waterMarker",e._scene.userData.type="waterMarker",e._visible=!0,e.waters=[],e.initLight(),e.putLight(),e}return(0,s.default)(n,[{key:"addMarker",value:function(e){e.parent=this,e.isInitWater||(e.initWater(),e.renderNode&&(this.waters.push(e.renderNode),this._scene.add(e.renderNode)))}},{key:"checkSceneNode",value:function(){this._scene.children.length=0;for(var e=0;e<this.waters.length;e++)this.waters[e].visible&&this.waters[e].renderNode&&this._scene.add(this.waters[e].renderNode)}},{key:"initLight",value:function(){this._ambientLight=new fm.AmbientLight(7631988),this._target=new fm.Object3D,this._mainLight=new fm.DirectionalLight(8947848,1.2),this._mainLight.position.set(-1,1,1).normalize(),this._mainLight.target=this._target,this._secondLight=new fm.DirectionalLight(3355443),this._secondLight.position.set(-.5,1,-1).normalize(),this._secondLight.target=this._target}},{key:"putLight",value:function(){var e=this;this.scene.add(this._mainLight),this.scene.add(this._ambientLight),this.scene.add(this._secondLight),this.scene.add(this._target),this.scene.removeLight=function(){e.removeLight()}}},{key:"dispose",value:function(){for(var e=0;e<this.waters.length;e++)this._scene.remove(this.waters[e].renderNode),this.waters[e].parent=void 0,this.waters[e]=void 0;this._scene.length=0,this._scene=void 0}},{key:"scene",get:function(){return this._scene}},{key:"visible",get:function(){return this._visible}}]),n}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),n=a(n(17));function c(n){var r=d();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,l.default)(n,e);var t=c(n);function n(){var e;return(0,o.default)(this,n),e=t.call(this),e._scene=new fm.Scene,e._scene.userData.type="dynline",e._scene.name="dynline",e.alias="dynline",e.lines=[],e._visible=!0,e}return(0,s.default)(n,[{key:"addMarker",value:function(e){e.parent=this,e.initLine(),e.renderNode&&this._scene.add(e.renderNode),this.lines.push(e)}},{key:"dispose",value:function(){for(var e=0;e<this.lines.length;e++)this._scene.remove(this.lines[e].renderNode),this.lines[e].parent=void 0,this.lines[e]=void 0;this._scene.length=0,this._scene=void 0}},{key:"scene",get:function(){return this._scene}},{key:"visible",get:function(){return this._visible}}]),n}(n.default),t.default=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=void 0;var c=o(n(27)),k=o(n(9)),P=o(n(32)),C=o(n(29)),D=o(n(116)),d=o(n(2)),f=o(n(3)),O=o(n(42)),p=n(506),m=n(507),v=n(150),g=o(n(508)),y=o(n(228));function B(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=_(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function _(e,t){if(e){if("string"==typeof e)return x(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n=function(){function n(e,t){(0,d.default)(this,n),this._map=e,this.font=t.font,this._canvas=t.canvas,this._tmpCanvas=t.tempCanvas,this._data={},this._waitData={},this._textureData={},this._waitTextureDate={},this._textureArray=[],this._textData={},this.fmCanvasUtils=new g.default(this._tmpCanvas),this.extrudeMaterial={},this.poiMaterial={}}return(0,f.default)(n,[{key:"createBasicMaterial",value:function(e){var t=new fm.MeshBasicMaterial;return e?(t.color=new fm.Color(e.color),t.transparent=!0,t.depthWrite=!0,t.opacity=(0,c.default)(e.alpha),t.userData.opacity=(0,c.default)(e.alpha)):t.userData.opacity=1,t}},{key:"createNormalMaterial",value:function(e){var t=new fm.MeshLambertMaterial;return e?(t.color=new fm.Color(e.color),t.transparent=!0,t.depthWrite=!0,t.opacity=(0,c.default)(e.alpha),t.userData.opacity=(0,c.default)(e.alpha)):t.userData.opacity=1,t}},{key:"createPhysicMaterial",value:function(e){var t=new fm.MeshStandardMaterial({roughness:.5,metalness:.5});return e?(t.color=new fm.Color(e.color),t.transparent=!0,t.depthWrite=!0,t.opacity=(0,c.default)(e.alpha),t.userData.opacity=(0,c.default)(e.alpha)):t.userData.opacity=1,t}},{key:"createMeshPhongMaterial",value:function(e){var t=new fm.MeshPhongMaterial({shininess:50,specular:16777215});return e?(t.color=new fm.Color(e.color),t.transparent=!0,t.depthWrite=!0,t.opacity=(0,c.default)(e.alpha),t.userData.opacity=(0,c.default)(e.alpha)):t.userData.opacity=1,t}},{key:"createLineMaterial",value:function(e){if(!e)return new fm.LineBasicMaterial({color:"#ff0000",linewidth:1,transparent:!0,opacity:1});var t="#ff0000",t="number"==typeof e.strokeColor?e.strokeColor:e.strokeColor||"#ff0000",t={color:t,linewidth:1,transparent:!0,opacity:(0,c.default)(e.alpha)},t=new fm.LineBasicMaterial(t);return t.userData.opacity=(0,c.default)(e.alpha),t}},{key:"createPoiMaterial",value:function(e,t,n,r,i){var a,o=this,s=this.paramCode(r,i,e.imageUrl);return this.poiMaterial[s]?(a=this.poiMaterial[s],n&&n()):(a=new fm.SpriteMaterial,a.sizeAttenuation=!1,a.opacity=1,a.userData.opacity=1,a.depthTest=!!r,a.depthWrite=!!r,a.transparent=!0,a.side=2,a.priority=i,this.poiMaterial[s]=a,this._textureData[e.imageUrl]?this._textureData[e.imageUrl].image&&this._textureData[e.imageUrl].image.complete?(s=this._textureData[e.imageUrl],a.map=s,a.needsUpdate=!0,a.userData.scaleRatio=s.scaleRatio,n&&n()):this._pushWaitTextureDate(e.imageUrl,{material:a,node:t,callback:n}):(this._pushWaitTextureDate(e.imageUrl,{material:a,node:t,callback:n}),n=v.FMTextureUtil.createTexture(this._canvas,e.imageSrc,function(e){e.scaleRatio=e.image.width/e.image.height;for(var t=0;t<o._waitTextureDate[e.url].length;t++){var n=o._waitTextureDate[e.url][t];o._setMaterialMap(n.material,e,n.node,n.callback)}o._waitTextureDate[e.url]=[]}),n.url=e.imageUrl,this._textureData[e.imageUrl]=n,this._textureArray.push(n))),a}},{key:"paramCode",value:function(e,t,n){return[!!e,t,n].join()}},{key:"_setMaterialMap",value:function(e,t,n,r){e.map=t,e.needsUpdate=!0,e.userData.scaleRatio=t.scaleRatio,n&&n.setSize(),this._map.avoidMarkers(),r&&r()}},{key:"createLabelMaterial",value:function(e,t,n,r){var i=this,a=new fm.SpriteMaterial;return a.sizeAttenuation=!1,a.opacity=(0,c.default)(t.alpha),a.userData.opacity=(0,c.default)(t.alpha),a.depthTest=!!n,a.depthWrite=!!n,a.transparent=!0,a.side=2,a.opacity=1,n=!1,t.imageSrc?this._data[t.imageUrl]?this._data[t.imageUrl].complete?(n=this._data[t.imageUrl],this._createMaterialTexture(e,n,t,a)):this._pushWaitData(t.imageUrl,{name:e,theme:t,material:a,node:r}):(this._pushWaitData(t.imageUrl,{name:e,theme:t,material:a,node:r}),r=y.default.createImage(this._tmpCanvas,t.imageSrc,function(e){if(i._waitData[e.url]){for(var t=0;t<i._waitData[e.url].length;t++){var n=i._waitData[e.url][t];i._createMaterialTexture(n.name,e,n.theme,n.material,n.node)}i._waitData[e.url]=[]}}),r.url=t.imageUrl,i._data[t.imageUrl]=r):this._createMaterialTexture(e,n,t,a),a}},{key:"_pushWaitData",value:function(e,t){void 0===this._waitData[e]&&(this._waitData[e]=[]),this._waitData[e].push(t)}},{key:"_pushWaitTextureDate",value:function(e,t){void 0===this._waitTextureDate[e]&&(this._waitTextureDate[e]=[]),this._waitTextureDate[e].push(t)}},{key:"_createMaterialTexture",value:function(e,t,n,r,i){t=this.fmCanvasUtils.createIconTextCanvas(e,this.font.family,t,n),n=v.FMTextureUtil.createTexture(this._canvas,t.toDataURL("image/png"),function(e){r.map=e,r.needsUpdate=!0}),this._textureArray.push(n),r.userData.scaleRatio=t.height/t.width,r.userData.mspriteScale=t.spriteScale,i&&i.setSize(),this._map.avoidMarkers()}},{key:"excuteSDFLabelTexture",value:function(e,t,n,r){var i=1,a=1.5*i,o=12*i,s=2*i;t||(o=0,s=0);var l=2*i,u=3*i,h=3*i,c=14*i,d=1,f=2*i,p=this._tmpCanvas,m=p.getContext("2d"),v=this.font.family;m.font=c+"px "+v;var g=-1<(0,k.default)(e).call(e,"%rn%");if(g){var y,_=e.split("%rn%"),x=0,w=0,b=B(_);try{for(b.s();!(y=b.n()).done;){var M=y.value,x=Math.max(m.measureText(M).width,x);w+=c}}catch(e){b.e(e)}finally{b.f()}w+=(_.length-1)*l,d=_.length,E=x+s+o+2*h,S=Math.max(w,o)+2*u}else var T=m.measureText(e).width,E=T+s+o+2*h,S=Math.max(c,o)+2*u;if(r)return{scaleRatio:S/E,mspriteScale:d};p.width=E,p.height=S,p.style.width=E+"px",p.style.height=S+"px",(n.platecolor||n.platestrokecolor)&&(h=n.platecolor.split(","),n.platecolor&&(m.fillStyle=(0,P.default)(r=(0,P.default)(r="rgb(".concat((0,C.default)(h[0]),",")).call(r,(0,C.default)(h[1]),",")).call(r,(0,C.default)(h[2]),")")),m.lineWidth=i,this.drawRadiuRect(m,E,S,5*i,{x:0,y:0}),n.platecolor&&(0,D.default)(m).call(m),n.platestrokecolor&&(h=n.platestrokecolor.split(","),m.strokeStyle=(0,P.default)(E=(0,P.default)(E="rgb(".concat((0,C.default)(h[0]),",")).call(E,(0,C.default)(h[1]),",")).call(E,(0,C.default)(h[2]),")"),m.stroke()),m.beginPath());var A=o+s,s=(S-o)/2,S=(S-c)/2;if(m.font=c+"px "+v,m.textBaseline="top",m.strokeStyle=O.default.toRgba(n.strokecolor),m.lineWidth=f,f=0,f*=i,g)for(var I=u,L=0;L<_.length;L++)L&&(I+=c+l),m.strokeText(_[L],A,I);else m.strokeText(e,A,S+a+f);if(m.fillStyle=O.default.toRgba(n.fillcolor),g)for(var R=u,N=0;N<_.length;N++)N&&(R+=c+l),m.fillText(_[N],A,R);else m.fillText(e,A,S+a+f);return t&&m.drawImage(t,0,s,o,o),o=new fm.CanvasTexture(p),o.minFilter=fm.LinearFilter,o.generateMipmaps=!1,o.scaleRatio=p.height/p.width,o.mspriteScale=d,o}},{key:"excuteLabelTexture",value:function(r,i,a){var o=this,e=!1;i.imageSrc&&(this._data[i.imageUrl]?e=this._data[i.imageUrl]:y.default.createImage(this._tmpCanvas,i.imageSrc,function(e){var t=o.fmCanvasUtils.createIconTextCanvas(r,o.font.family,e,i),n=v.FMTextureUtil.createTexture(o._canvas,t.toDataURL("image/png"),a);return n.scaleRatio=t.height/t.width,n.mspriteScale=t.spriteScale,o._data[i.imageUrl]=e,n}));var t=this.fmCanvasUtils.createIconTextCanvas(r,this.font.family,e,i),e=v.FMTextureUtil.createTexture(this._canvas,t.toDataURL("image/png"),a);return e.scaleRatio=t.height/t.width,e.mspriteScale=t.spriteScale,e}},{key:"createTextMaterial",value:function(e,t){var n=new fm.SpriteMaterial;return n.sizeAttenuation=!1,n.opacity=(0,c.default)(1),n.userData.opacity=(0,c.default)(1),n.depthTest=!1,n.depthWrite=!1,n.transparent=!0,n.side=2,t=this.fmCanvasUtils.createTextCanvas(e,this.font.family,!1,t),v.FMTextureUtil.createTexture_canvas(this._canvas,t,function(e){n.map=e,n.needsUpdate=!0}),n.size=t.size,n.userData.scaleRatio=t.height/t.width,n.userData.mspriteScale=t.spriteScale,n.needsUpdate=!0,n}},{key:"drawRadiuRect",value:function(e,t,n,r,i){var a=i,o={x:i.x+t,y:i.y},s={x:i.x,y:i.y+n},l={x:i.x+t,y:i.y+n},u={x:a.x+r,y:a.y},h={x:o.x-r,y:o.y},c={x:o.x,y:o.y+r},d={x:l.x,y:l.y-r},f={x:l.x-r,y:l.y},t={x:s.x+r,y:s.y},i={x:s.x,y:s.y-r},n={x:a.x,y:a.y+r};e.beginPath(),e.moveTo(u.x,u.y),e.lineTo(h.x,h.y),e.arcTo(o.x,o.y,c.x,c.y,r),e.lineTo(d.x,d.y),e.arcTo(l.x,l.y,f.x,f.y,r),e.lineTo(t.x,t.y),e.arcTo(s.x,s.y,i.x,i.y,r),e.lineTo(n.x,n.y),e.arcTo(a.x,a.y,u.x,u.y,r),e.closePath()}},{key:"measureText",value:function(e,t,n){var r=document.createElement("div");return r.style.fontSize=n+"px",r.style.position="absolute",r.style.fontStyle=e,r.style.whiteSpace="nowrap",r.innerHTML=t,t={width:r.clientWidth,height:r.clientHeight},document.body.removeChild(r),t}},{key:"loadTexture",value:function(t,n){var r=this;if("string"==typeof t)return"data"!==t.substring(0,4)&&this._textureData[t]&&n&&n(this._textureData[t]),e=v.FMTextureUtil.createTexture(this._canvas,t,function(e){"data"!==t.substring(0,4)&&(r._textureData[t]=e),n&&n(e)}),this._textureArray.push(e),e;var e=new fm.Texture;return e.image=t,e.needsUpdate=!0,n(e),e}},{key:"getHeatMapGradient",value:function(e){var t=this._tmpCanvas,n=t.getContext("2d"),r=8,i=128;t.width=r,t.height=i,t.style.width=r+"px",t.style.height=i+"px";var a,o=n.createLinearGradient(0,0,8,128);for(a in e)o.addColorStop(a,e[a]);return n.fillStyle=o,n.fillRect(0,0,8,128),t=new fm.CanvasTexture(t),this._textureArray.push(t),t}},{key:"createNormalLineTexture",value:function(e){return e=this.fmCanvasUtils.createNormalLineImage(e),v.FMTextureUtil.createTexture(this._canvas,e)}},{key:"createArrowWidthBackTexture",value:function(e){return e=this.fmCanvasUtils.createFMArrowCanvasImage(e),v.FMTextureUtil.createTexture(this._canvas,e)}},{key:"createArrowLineTexture",value:function(e){return e=this.fmCanvasUtils.createArrowCanvasImage(e),v.FMTextureUtil.createTexture(this._canvas,e)}},{key:"rotateCanvas",value:function(e,t,n,r){var i=this._tmpCanvas,a=i.getContext("2d");i.width=n,i.height=r,i.style.width=n+"px",i.style.height=r+"px",a.drawImage(e,0,0,n,r)}},{key:"dispose",value:function(){var e,t,n,r,i=B(this._textureArray);try{for(i.s();!(e=i.n()).done;){var a=e.value;a.dispose()}}catch(e){i.e(e)}finally{i.f()}for(t in this._textureArray.length=0,this._textureData)this._textureData[t]=void 0;for(n in this.data)this._data[n]=void 0;for(r in this._waitData={},this._waitTextureDate={},this.extrudeMaterial)this.extrudeMaterial[r].dispose()}},{key:"data",get:function(){return this._data},set:function(e){this._data=e}},{key:"textureData",get:function(){return this._textureData},set:function(e){this._textureData=e}},{key:"textureArray",get:function(){return this._textureArray},set:function(e){this._textureArray=e}},{key:"getExtrudeMaterial",value:function(e,t){if(this.extrudeMaterial[e+t])return this.extrudeMaterial[e+t];var n=new fm.RawShaderMaterial({uniforms:{color:{value:new fm.Color(e)},alpha:{value:t}},vertexShader:p.RawExtrudeVertShader,fragmentShader:m.RawExtrudeFragShader});return n.transparent=!0,this.extrudeMaterial[e+t]=n,n}}]),n}(),t.default=n},function(e,t,n){n=n(502),e.exports=n},function(e,t,n){var r=n(503),i=Array.prototype;e.exports=function(e){var t=e.fill;return e===i||e instanceof Array&&t===i.fill?r:t}},function(e,t,n){n(504),n=n(26),e.exports=n("Array").fill},function(e,t,n){var r=n(8),i=n(505),n=n(136);r({target:"Array",proto:!0},{fill:i}),n("fill")},function(e,t,n){"use strict";var o=n(38),s=n(102),l=n(46);e.exports=function(e){for(var t=o(this),n=l(t.length),r=arguments.length,i=s(1<r?arguments[1]:void 0,n),r=2<r?arguments[2]:void 0,a=void 0===r?n:s(r,n);i<a;)t[i++]=e;return t}},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.RawExtrudeVertShader=void 0,n="\nprecision mediump float;\nprecision mediump int;\n\nattribute vec3 position;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvoid main() {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}\n ",t.RawExtrudeVertShader=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.RawExtrudeFragShader=void 0,n="\nprecision mediump float;\nprecision mediump int;\n\nuniform vec3 color;\nuniform float alpha;\n\nvoid main() {\n gl_FragColor = vec4(color,alpha);\n}\n ",t.RawExtrudeFragShader=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=void 0;var c=o(n(229)),d=o(n(35)),R=o(n(116)),N=o(n(13)),k=o(n(9)),P=o(n(27)),f=o(n(2)),p=o(n(3)),m=n(230),C=o(n(42));function D(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=v(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function v(e,t){if(e){if("string"==typeof e)return g(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n=function(){function t(e){(0,f.default)(this,t),this.canvas=e}return(0,p.default)(t,[{key:"createNormalLineImage",value:function(n){this._initCanvas(n);var e=this.canvas,r=e.getContext("2d");r.save();var t=n.dashArray,i=(0,c.default)(t).call(t,function(e,t){return e+t}),a=this._getArrowMatrix(n.width,n.height),a=a.elements;r.transform(a[0],a[3],a[1],a[4],a[2],a[6]);var o=0;return(0,d.default)(t).call(t,function(e,t){t%2==0&&(r.fillStyle=n.color,r.fillRect(o/i*n.width,0,e/i*n.width,n.height)),o+=e}),e=e.toDataURL("image/png"),r.restore(),e}},{key:"createFMArrowCanvasImage",value:function(e){this._initCanvas(e);var t=this.canvas,n=t.getContext("2d");n.save(),n.clearRect(0,0,e.width,e.height),n.fillStyle=e.godEdgeColor,n.fillRect(0,0,e.width,e.height);var r=e.width*(1-e.godEdgePercent);n.fillStyle=e.godColor,n.fillRect((e.width-r)/2,0,r,e.height),n.fillStyle="#ffffff",n.shadowOffsetX=-2,n.shadowOffsetY=2,n.shadowBlur=4,n.shadowColor="rgba(0,0,0,0.5)";var i={x:e.width/2,y:e.height/2},a=e.height*e.godArrowPercent,o=r*e.godArrowWidthPercent,s=e.arrowWidth,r=i.x-o/2,i=i.y+a/2;return n.beginPath(),n.moveTo(r,i),n.lineTo(r,i+s),n.lineTo(r+o/2,i-a+s),n.lineTo(r+o,i+s),n.lineTo(r+o,i),n.lineTo(r+o/2,i-a),n.closePath(),n.fillStyle=e.godArrowColor,(0,R.default)(n).call(n),t=t.toDataURL("image/png"),n.restore(),t}},{key:"createArrowCanvasImage",value:function(e){this._initCanvas(e);var t=this.canvas,n=t.getContext("2d");n.save();var r=(1-e.arrowHeightPercent)*e.height/2,i=e.height*e.arrowHeightPercent,a=this._getArrowMatrix(e.width,e.height),a=a.elements;return n.transform(a[0],a[3],a[1],a[4],a[2],a[6]),n.beginPath(),n.moveTo(0,r),a=e.width*(e.arrowWidthPercent-e.arrowPercent),n.lineTo(a,r),n.lineTo(e.width*e.arrowWidthPercent,r+i/2),n.lineTo(a,r+i),n.lineTo(0,r+i),n.lineTo(e.width*e.arrowPercent,r+i/2),n.closePath(),n.fillStyle=e.color,(0,R.default)(n).call(n),t=t.toDataURL("image/png"),n.restore(),t}},{key:"drawRadiusRect",value:function(e,t,n,r,i){var a=i,o={x:i.x+t,y:i.y},s={x:i.x,y:i.y+n},l={x:i.x+t,y:i.y+n},u={x:a.x+r,y:a.y},h={x:o.x-r,y:o.y},c={x:o.x,y:o.y+r},d={x:l.x,y:l.y-r},f={x:l.x-r,y:l.y},t={x:s.x+r,y:s.y},i={x:s.x,y:s.y-r},n={x:a.x,y:a.y+r};e.beginPath(),e.moveTo(u.x,u.y),e.lineTo(h.x,h.y),e.arcTo(o.x,o.y,c.x,c.y,r),e.lineTo(d.x,d.y),e.arcTo(l.x,l.y,f.x,f.y,r),e.lineTo(t.x,t.y),e.arcTo(s.x,s.y,i.x,i.y,r),e.lineTo(n.x,n.y),e.arcTo(a.x,a.y,u.x,u.y,r),e.closePath()}},{key:"createIconTextCanvas",value:function(e,t,n,r){r=(0,N.default)({},r);var i,a=2,o=3*a,s=3*a,l=2*a,u=2*a,h=0,c=0,d=1.5*r.fontsize*a,f=d+"px sans-serif",p=a,m=1.5*r.fontsize*a,v=1;n||(m=0,l=0);var g=this.canvas,y=g.getContext("2d");y.font=f;var _=-1<(0,k.default)(e).call(e,"%rn%");if(_){var x,w=e.split("%rn%"),b=D(w);try{for(b.s();!(x=b.n()).done;){var M=x.value,h=Math.max(y.measureText(M).width,h);c+=d}}catch(e){b.e(e)}finally{b.f()}c+=(w.length-1)*u,i=h+l+m+2*s,E=Math.max(c,m)+2*o,v=E/(d+2*o)}else h=y.measureText(e).width,i=2*s+m+l+h,E=2*o+Math.max(d,m);g.spriteScale=v,g.width=i,g.height=E,g.style.width=i+"px",g.style.height=E+"px",y.clearRect(0,0,g.width,g.height),(r.platecolor||r.platestrokecolor)&&(r.platecolor&&(y.fillStyle=C.default.toRgba(r.platecolor)),y.lineWidth=a,this.drawRadiusRect(y,i-m-l,E,5*a,{x:m,y:0}),r.platecolor&&(0,R.default)(y).call(y),r.platestrokecolor&&(y.strokeStyle=C.default.toRgba(r.platestrokecolor),y.stroke()),y.beginPath()),v=(E-m)/2,n&&y.drawImage(n,s,v,m,m);var T=s+m+l,s=(E-d)/2,m=1.5*a;y.font=f,y.textBaseline="top",l=1,r.strokewidth&&(l=(0,P.default)(r.strokewidth));var E=0;if(E*=a,r.strokecolor&&0!==l)if(y.lineWidth=3*p,y.font=f,y.strokeStyle=C.default.toRgba(r.strokecolor),_)for(var S=o,A=0;A<w.length;A++)A&&(S+=d+u),n?y.strokeText(w[A],T,S):"left"==r.textAlign?(y.textAlign="left",y.strokeText(w[A],0,S)):"right"==r.textAlign?(y.textAlign="right",y.strokeText(w[A],i,S)):(y.textAlign="center",y.strokeText(w[A],i/2,S));else n?y.strokeText(e,T,s+m+E):"left"===r.textAlign?y.strokeText(e,0,s+m+E):"right"===r.textAlign?(y.textAlign="right",y.strokeText(e,i,s+m+E)):"center"===r.textAlign?(y.textAlign="center",y.strokeText(e,i/2,s+m+E)):(y.textAlign="left",y.strokeText(e,T,s+m+E));if(y.lineWidth=p,y.font=f,y.fillStyle=C.default.toRgba(r.fillcolor),_)for(var I=o,L=0;L<w.length;L++)L&&(I+=d+u),n?y.fillText(w[L],T,I):"left"===r.textAlign?(y.textAlign="left",y.fillText(w[L],0,I)):"right"===r.textAlign?(y.textAlign="right",y.fillText(w[L],i,I)):(y.textAlign="center",y.fillText(w[L],i/2,I));else n?y.fillText(e,T,s+m+E):"left"===r.textAlign?(y.textAlign="left",y.fillText(e,0,s+m+E)):"right"===r.textAlign?(y.textAlign="right",y.fillText(e,i,s+m+E)):"center"===r.textAlign?(y.textAlign="center",y.fillText(e,i/2,s+m+E)):(y.textAlign="left",y.fillText(e,T,s+m+E));return g}},{key:"createTextCanvas",value:function(e,t,n,r){var i,a=2,o=3*a,s=3*a,l=2*a,u=2*a,h=0,c=0,d=r.fontsize*a,f=d+"px sans-serif",p=2*a,m=1.5*r.fontsize*a;n||(m=0,l=0);var v,n=this.canvas,g=n.getContext("2d"),y=D(e);try{for(y.s();!(v=y.n()).done;){var _=v.value,d=_.fontsize*a;g.font=f,h=Math.max(g.measureText(_.text).width,h),c+=d}}catch(e){y.e(e)}finally{y.f()}c+=(e.length-1)*u,i=h+l+m+2*s,m=Math.max(c,m)+2*o,n.spriteScale=e.length,n.width=i,n.height=m,n.style.width=i+"px",n.style.height=m+"px",g.clearRect(0,0,n.width,n.height),r.platecolor&&(g.fillStyle=C.default.toRgba(r.platecolor),g.lineWidth=a,this.drawRadiusRect(g,i,m,5*a,{x:0,y:0}),(0,R.default)(g).call(g),r.platestrokecolor&&(g.strokeStyle=C.default.toRgba(r.platestrokecolor),g.stroke()),g.beginPath()),g.textBaseline="top";for(var x=4,w=o,b=0;b<e.length;b++)e[b].strokecolor&&(g.lineWidth=p,d=e[b].fontsize*a,g.font=f,g.strokeStyle=C.default.toRgba(e[b].strokecolor),b&&(w+=e[b-1].fontsize*a+u),0===r.textAlign?(g.textAlign="left",g.strokeText(e[b].text,0,w+x)):2===r.textAlign?(g.textAlign="right",g.strokeText(e[b].text,i,w+x)):(g.textAlign="center",g.strokeText(e[b].text,i/2,w+x)));for(var w=o,M=0;M<e.length;M++)d=e[M].fontsize*a,g.font=f,g.fillStyle=C.default.toRgba(e[M].fontcolor),M&&(w+=e[M-1].fontsize*a+u),0===r.textAlign?(g.textAlign="left",g.fillText(e[M].text,0,w+x)):2===r.textAlign?(g.textAlign="right",g.fillText(e[M].text,i,w+x)):(g.textAlign="center",g.fillText(e[M].text,i/2,w+x));for(var c=0,m=null,T=0;T<e.length;T++)c+=e[T].fontsize;return m=1<e.length?(c+u*(e.length-1)+o)/e.length:c+o,n.size=m,n}},{key:"_initCanvas",value:function(e){e.width=m.FMMathUtils.findNearNthPowerOfTwo(e.width),e.height=m.FMMathUtils.findNearNthPowerOfTwo(e.height);var t=this.canvas;t.width=e.width,t.height=e.height,t.style.width=e.width+"px",t.style.height=e.height+"px"}},{key:"_getArrowMatrix",value:function(e,t){var n=new fm.Matrix3;n.set(Math.cos(Math.PI/2),-Math.sin(Math.PI/2),+e/2,Math.sin(Math.PI/2),Math.cos(Math.PI/2),+t/2,0,0,1);var r=new fm.Matrix3;return r.set(1,0,-e/2,0,1,-t/2,0,0,1),n.multiply(r),n}}]),t}(),t.default=n},function(e,t,n){n=n(510),e.exports=n},function(e,t,n){var r=n(511),i=Array.prototype;e.exports=function(e){var t=e.reduce;return e===i||e instanceof Array&&t===i.reduce?r:t}},function(e,t,n){n(512),n=n(26),e.exports=n("Array").reduce},function(e,t,n){"use strict";var r=n(8),i=n(513).left,a=n(90),o=n(86),n=n(85),a=a("reduce"),o=!n&&79<o&&o<83;r({target:"Array",proto:!0,forced:!a||o},{reduce:function(e){return i(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}})},function(e,t,n){var h=n(44),c=n(38),d=n(98),f=n(46),n=function(u){return function(e,t,n,r){h(t);var i=c(e),a=d(i),o=f(i.length),s=u?o-1:0,l=u?-1:1;if(n<2)for(;;){if(s in a){r=a[s],s+=l;break}if(s+=l,u?s<0:o<=s)throw TypeError("Reduce of empty array with no initial value")}for(;u?0<=s:s<o;s+=l)s in a&&(r=t(r,a[s],s,i));return r}};e.exports={left:n(!1),right:n(!0)}},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(5)),l=a(n(6)),u=a(n(7)),h=a(n(515));function c(n){var r=d();return function(){var e,t=(0,u.default)(n),t=r?(e=(0,u.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,l.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,s.default)(n,e);var t=c(n);function n(e){return(0,o.default)(this,n),e=t.call(this,e),e.uniforms.diffuse={value:new fm.Vector3(1,1,1)},e.uniforms.offset={value:new fm.Vector2},e.uniforms.rotation={value:0},e.uniforms.scale={value:1},e.depthTest=!1,e.vertexShader=h.default.vert,e.fragmentShader=h.default.frag,e}return n}(fm.ShaderMaterial),t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={vert:"\n \n uniform vec2 offset;\n uniform float rotation;\n uniform float scale;\n varying vec2 vUv;\n void main() {\n vUv = uv;\n \n \n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\n rotatedPosition.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\n \n \n rotatedPosition.x *= scale * abs(projectionMatrix[0][0] / projectionMatrix[1][1]);\n rotatedPosition.y *= scale;\n \n rotatedPosition.xy += offset;\n gl_Position = vec4(rotatedPosition,0.0,1.0);\n }\n ",frag:"\n uniform vec3 diffuse;\n uniform sampler2D mapBack;\n uniform sampler2D mapfront;\n #include <common>\n varying vec2 vUv;\n \n void main() {\n vec4 diffuseColor = vec4( diffuse, 1.0 );\n vec2 muv = vec2(vUv.x , 1.0 - vUv.y);\n diffuseColor = texture2D( mapfront, muv );\n \n vec4 backColor = vec4(1.0 , 0.0 ,0.0 ,1.0);\n backColor = texture2D( mapBack, muv );\n\n float alphacomp = backColor.a + diffuseColor.a * (1.0 -backColor.a);\n vec3 resultColor = diffuseColor.rgb * diffuseColor.a + backColor.rgb * (1.0 - diffuseColor.a);\n gl_FragColor = vec4(resultColor , alphacomp);\n }\n "},t.default=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=void 0;var c=o(n(10)),d=o(n(2)),f=o(n(3)),p=o(n(517)),m=o(n(234)),v=o(n(93));function g(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=y(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function y(e,t){if(e){if("string"==typeof e)return _(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n=function(){function i(e,t,n,r){(0,d.default)(this,i),this.map=e,this.preLoadModels={},this.waitingBacks={},this.waitingNodes=[],this._path=t,this.isRemote=n,this.key=r,this.externalLoadingCount=0}return(0,f.default)(i,[{key:"load",value:function(r){var e,i=this;this.externalLoadingCount++;var t=this.isRemote?v.default+"webmodel/":this._path,a=this.preLoadModels[r].modelUrl.split("."),n="js"===a[1]?(e=new p.default((0,c.default)(this)),a[0]+".js?keyValue="+this.key):(e=new m.default((0,c.default)(this)),a[0]+".glb?keyValue="+this.key);this.isRemote&&(n=a[0]+"/"+n),this.preLoadModels[r].isLoading=!0,e.setPath(t),e.load(n,function(e,t){for(var n in i.waitingBacks[r])n=i.waitingBacks[r][n],n(e,t,a[1]);i.externalLoadingCount--,i.externalLoadingCount<1&&i.loaded&&i.loaded(),i.preLoadModels[r].isGltf="js"!==a[1],i.preLoadModels[r].geometry=e,i.preLoadModels[r].material=t,i.waitingBacks[r].length=0,i.preLoadModels[r].isLoading=!1,i.preLoadModels[r].loaded=!0},function(e){},function(e){console.error("模型加载或解析失败!",e),i.externalLoadingCount--,i.externalLoadingCount<1&&i.loaded&&i.loaded(),i.preLoadModels[r].isLoading=!1})}},{key:"addWaitingBacks",value:function(e,t,n){this.waitingBacks[e]||(this.waitingBacks[e]={}),this.waitingBacks[e][n]||(this.waitingBacks[e][n]=t)}},{key:"setLoadedBack",value:function(e){this.loaded=e}},{key:"checkAndLoadwaiting",value:function(){var e,t=g(this.waitingNodes);try{for(t.s();!(e=t.n()).done;)e.value}catch(e){t.e(e)}finally{t.f()}}}]),i}(),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(13)),o=i(n(32)),a=i(n(10)),s=i(n(232)),l=n(518);function u(e,t){this.map=e,"boolean"==typeof t&&(console.warn("fm.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:fm.DefaultLoadingManager,this.withCredentials=!1}function h(e,t){function n(e,t){return e&1<<t}var r,i,a,o,s,l,u,h,c,d,f,p,m,v,g,y,_,x,w,b,M,T,E,S,A,I,L=e.faces,R=e.vertices,N=e.normals,k=e.colors,P=e.scale,C=0;if(void 0!==e.uvs){for(r=0;r<e.uvs.length;r++)e.uvs[r].length&&C++;for(r=0;r<C;r++)t.faceVertexUvs[r]=[]}for(o=0,s=R.length;o<s;)_=new fm.Vector3,_.x=R[o++]*P,_.y=R[o++]*P,_.z=R[o++]*P,t.vertices.push(_);for(o=0,s=L.length;o<s;)if(y=L[o++],d=n(y,0),f=n(y,1),p=n(y,3),m=n(y,4),v=n(y,5),g=n(y,6),y=n(y,7),d){if(w=new fm.Face3,w.a=L[o],w.b=L[o+1],w.c=L[o+3],b=new fm.Face3,b.a=L[o+1],b.b=L[o+2],b.c=L[o+3],o+=4,f&&(c=L[o++],w.materialIndex=c,b.materialIndex=c),a=t.faces.length,p)for(r=0;r<C;r++)for(E=e.uvs[r],t.faceVertexUvs[r][a]=[],t.faceVertexUvs[r][a+1]=[],i=0;i<4;i++)h=L[o++],A=E[2*h],I=E[2*h+1],S=new fm.Vector2(A,I),2!==i&&t.faceVertexUvs[r][a].push(S),0!==i&&t.faceVertexUvs[r][a+1].push(S);if(m&&(u=3*L[o++],w.normal.set(N[u++],N[u++],N[u]),b.normal.copy(w.normal)),v)for(r=0;r<4;r++)u=3*L[o++],T=new fm.Vector3(N[u++],N[u++],N[u]),2!==r&&w.vertexNormals.push(T),0!==r&&b.vertexNormals.push(T);if(g&&(l=L[o++],M=k[l],w.color.setHex(M),b.color.setHex(M)),y)for(r=0;r<4;r++)l=L[o++],M=k[l],2!==r&&w.vertexColors.push(new fm.Color(M)),0!==r&&b.vertexColors.push(new fm.Color(M));t.faces.push(w),t.faces.push(b)}else{if(x=new fm.Face3,x.a=L[o++],x.b=L[o++],x.c=L[o++],f&&(c=L[o++],x.materialIndex=c),a=t.faces.length,p)for(r=0;r<C;r++)for(E=e.uvs[r],t.faceVertexUvs[r][a]=[],i=0;i<3;i++)h=L[o++],A=E[2*h],I=E[2*h+1],S=new fm.Vector2(A,I),t.faceVertexUvs[r][a].push(S);if(m&&(u=3*L[o++],x.normal.set(N[u++],N[u++],N[u])),v)for(r=0;r<3;r++)u=3*L[o++],T=new fm.Vector3(N[u++],N[u++],N[u]),x.vertexNormals.push(T);if(g&&(l=L[o++],x.color.setHex(k[l])),y)for(r=0;r<3;r++)l=L[o++],x.vertexColors.push(new fm.Color(k[l]));t.faces.push(x)}}function c(e,t){var n=void 0!==e.influencesPerVertex?e.influencesPerVertex:2;if(e.skinWeights)for(var r=0,i=e.skinWeights.length;r<i;r+=n){var a=e.skinWeights[r],o=1<n?e.skinWeights[r+1]:0,s=2<n?e.skinWeights[r+2]:0,l=3<n?e.skinWeights[r+3]:0;t.skinWeights.push(new fm.Vector4(a,o,s,l))}if(e.skinIndices)for(r=0,i=e.skinIndices.length;r<i;r+=n){var u=e.skinIndices[r],h=1<n?e.skinIndices[r+1]:0,c=2<n?e.skinIndices[r+2]:0,d=3<n?e.skinIndices[r+3]:0;t.skinIndices.push(new fm.Vector4(u,h,c,d))}t.bones=e.bones,t.bones&&0<t.bones.length&&(t.skinWeights.length!==t.skinIndices.length||t.skinIndices.length!==t.vertices.length)&&console.warn("When skinning, number of vertices ("+t.vertices.length+"), skinIndices ("+t.skinIndices.length+"), and skinWeights ("+t.skinWeights.length+") should match.")}function d(e,t){var n=e.scale;if(void 0!==e.morphTargets)for(var r=0,i=e.morphTargets.length;r<i;r++){t.morphTargets[r]={},t.morphTargets[r].name=e.morphTargets[r].name,t.morphTargets[r].vertices=[];for(var a=t.morphTargets[r].vertices,o=e.morphTargets[r].vertices,s=0,l=o.length;s<l;s+=3){var u=new fm.Vector3;u.x=o[s]*n,u.y=o[s+1]*n,u.z=o[s+2]*n,a.push(u)}}if(void 0!==e.morphColors&&0<e.morphColors.length){console.warn('fm.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var h=t.faces,c=e.morphColors[0].colors,r=0,i=h.length;r<i;r++)h[r].color.fromArray(c,3*r)}}function f(e,t){var n=[],r=[];void 0!==e.animation&&r.push(e.animation),void 0!==e.animations&&(e.animations.length?r=(0,o.default)(r).call(r,e.animations):r.push(e.animations));for(var i=0;i<r.length;i++){var a=fm.AnimationClip.parseAnimation(r[i],t.bones);a&&n.push(a)}t.morphTargets&&(e=fm.AnimationClip.CreateClipsFromMorphTargetSequences(t.morphTargets,10),n=(0,o.default)(n).call(n,e)),0<n.length&&(t.animations=n)}(0,r.default)(u.prototype,{crossOrigin:"anonymous",load:function(n,r,e,t){var i=this,a=void 0===this.path?fm.LoaderUtils.extractUrlBase(n):this.path;this.resourcePath=a+"maps/";var o=new s.default(this.manager);o.setPath(this.path),o.setWithCredentials(this.withCredentials),o.load(n,function(e){var t=JSON.parse(e),e=t.metadata;void 0===e||(e=e.type,void 0===e||"object"!==e.toLowerCase())?(t=i.parse(t,a),r(t.geometry,t.materials)):console.error("fm.JSONLoader: "+n+" should be loaded with fm.ObjectLoader instead.")},e,t)},setPath:function(e){return this.path=e,this},setResourcePath:function(e){return this.resourcePath=e,this},setCrossOrigin:function(e){return this.crossOrigin=e,this},parse:function(e,t){void 0!==e.data&&(e=e.data),void 0!==e.scale?e.scale=1/e.scale:e.scale=1;var n=new fm.Geometry;return h(e,n),c(e,n),d(e,n),f(e,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===e.materials||0===e.materials.length?{geometry:n}:(t=l.Loader.prototype.initMaterials((0,a.default)(this),e.materials,this.resourcePath||t,this.crossOrigin),{geometry:n,materials:t})}}),r=u,t.default=r},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.Loader=m;var a,h,c,d,t=i(n(13)),f=i(n(109)),p=n(230),n=n(233);function m(){}m.Handlers={handlers:[],add:function(e,t){this.handlers.push(e,t)},get:function(e){for(var t=this.handlers,n=0,r=t.length;n<r;n+=2){var i=t[n],a=t[n+1];if(i.test(e))return a}return null}},(0,t.default)(m.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(e,t,n,r){for(var i=[],a=0;a<t.length;++a)i[a]=this.createMaterial(e,t[a],n,r);return i},createMaterial:(a={NoBlending:fm.NoBlending,NormalBlending:fm.NormalBlending,AdditiveBlending:fm.AdditiveBlending,SubtractiveBlending:fm.SubtractiveBlending,MultiplyBlending:fm.MultiplyBlending,CustomBlending:fm.CustomBlending},h=new fm.Color,c=new n.TextureLoader,d=new fm.MaterialLoader,function(o,e,s,l){var u={};function t(e,t,n,r,i){var a=s+e,e=m.Handlers.get(a),a=null!==e?e.load(a):(c._map=o,c.setCrossOrigin(l),c.load(a));return void 0!==t&&((0,f.default)(a).fromArray(t),1!==t[0]&&(a.wrapS=fm.RepeatWrapping),1!==t[1]&&(a.wrapT=fm.RepeatWrapping)),void 0!==n&&a.offset.fromArray(n),void 0!==r&&("repeat"===r[0]&&(a.wrapS=fm.RepeatWrapping),"mirror"===r[0]&&(a.wrapS=fm.MirroredRepeatWrapping),"repeat"===r[1]&&(a.wrapT=fm.RepeatWrapping),"mirror"===r[1]&&(a.wrapT=fm.MirroredRepeatWrapping)),void 0!==i&&(a.anisotropy=i),i=p.FMMathUtils.generateUUID(),u[i]=a,i}var n,r={uuid:p.FMMathUtils.generateUUID(),type:"MeshLambertMaterial"};for(n in e){var i=e[n];switch(n){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":r.name=i;break;case"blending":r.blending=a[i];break;case"colorAmbient":case"mapAmbient":break;case"colorDiffuse":r.color=h.fromArray(i).getHex();break;case"colorSpecular":r.specular=h.fromArray(i).getHex();break;case"colorEmissive":r.emissive=h.fromArray(i).getHex();break;case"specularCoef":r.shininess=i;break;case"shading":"basic"===i.toLowerCase()&&(r.type="MeshBasicMaterial"),"phong"===i.toLowerCase()&&(r.type="MeshPhongMaterial"),"standard"===i.toLowerCase()&&(r.type="MeshStandardMaterial");break;case"mapDiffuse":r.map=t(i,e.mapDiffuseRepeat,e.mapDiffuseOffset,e.mapDiffuseWrap,e.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":r.emissiveMap=t(i,e.mapEmissiveRepeat,e.mapEmissiveOffset,e.mapEmissiveWrap,e.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":r.lightMap=t(i,e.mapLightRepeat,e.mapLightOffset,e.mapLightWrap,e.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":r.aoMap=t(i,e.mapAORepeat,e.mapAOOffset,e.mapAOWrap,e.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":r.bumpMap=t(i,e.mapBumpRepeat,e.mapBumpOffset,e.mapBumpWrap,e.mapBumpAnisotropy);break;case"mapBumpScale":r.bumpScale=i;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":r.normalMap=t(i,e.mapNormalRepeat,e.mapNormalOffset,e.mapNormalWrap,e.mapNormalAnisotropy);break;case"mapNormalFactor":r.normalScale=i;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":r.specularMap=t(i,e.mapSpecularRepeat,e.mapSpecularOffset,e.mapSpecularWrap,e.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":r.metalnessMap=t(i,e.mapMetalnessRepeat,e.mapMetalnessOffset,e.mapMetalnessWrap,e.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":r.roughnessMap=t(i,e.mapRoughnessRepeat,e.mapRoughnessOffset,e.mapRoughnessWrap,e.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":r.alphaMap=t(i,e.mapAlphaRepeat,e.mapAlphaOffset,e.mapAlphaWrap,e.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":r.side=fm.BackSide;break;case"doubleSided":r.side=fm.DoubleSide;break;case"transparency":r.opacity=i;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":r[n]=i;break;case"vertexColors":!0===i&&(r.vertexColors=fm.VertexColors),"face"===i&&(r.vertexColors=fm.FaceColors);break;default:console.error("THREE.Loader.createMaterial: Unsupported",n,i)}}return"MeshBasicMaterial"===r.type&&delete r.emissive,"MeshPhongMaterial"!==r.type&&delete r.specular,r.opacity<1&&(r.transparent=!0),d.setTextures(u),d.parse(r)})})},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.ImageLoader=a;var r=i(n(13)),t=i(n(60)),s=i(n(64)),l=i(n(10));function a(e,t){fm.Loader.call(this,t),this.map=e}a.prototype=(0,r.default)((0,t.default)(fm.Loader.prototype),{constructor:a,load:function(t,e,n,r){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,a=fm.Cache.get(t);if(void 0!==a)return i.manager.itemStart(t),(0,s.default)(function(){e&&e(a),i.manager.itemEnd(t)},0),a;var o=(0,l.default)(this).canvas.createImage();return o.onload=function(){fm.Cache.add(t,this),e&&e(this),i.manager.itemEnd(t)},o.onerror=function(e){r&&r(e),i.manager.itemError(t),i.manager.itemEnd(t)},"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),i.manager.itemStart(t),o.src=t,o}})},function(e,t,n){e.exports=n(521)},function(e,t,n){n=n(522),e.exports=n},function(e,t,n){n(523),n(106),n(524),n(528),n(529),n(530),n(58),n(41),n=n(11),e.exports=n.Promise},function(e,t,n){"use strict";var r=n(8),i=n(107),a=n(135),o=n(73),s=n(39),l=n(71),u=n(62),h=function(e,t){var n=this;return n instanceof h?(a&&(n=a(new Error(void 0),i(n))),void 0!==t&&s(n,"message",String(t)),t=[],u(e,t.push,{that:t}),s(n,"errors",t),n):new h(e,t)};h.prototype=o(Error.prototype,{constructor:l(5,h),message:l(5,""),name:l(5,"AggregateError")}),r({global:!0},{AggregateError:h})},function(e,t,n){"use strict";var r,i,a,o,s=n(8),l=n(75),u=n(18),h=n(45),c=n(235),d=n(88),f=n(111),p=n(77),m=n(198),v=n(23),g=n(44),y=n(113),_=n(182),x=n(62),w=n(201),b=n(236),M=n(237).set,T=n(525),E=n(239),S=n(527),A=n(117),I=n(151),L=n(52),R=n(169),N=n(24),k=n(85),P=n(86),C=N("species"),D="Promise",O=L.get,B=L.set,F=L.getterFor(D),U=c,z=u.TypeError,G=u.document,V=u.process,H=h("fetch"),j=A.f,W=j,Y=!!(G&&G.createEvent&&u.dispatchEvent),q="function"==typeof PromiseRejectionEvent,X="unhandledrejection",Z="rejectionhandled",J=0,K=1,Q=2,$=1,ee=2,R=R(D,function(){var e=_(U)!==String(U);if(!e){if(66===P)return!0;if(!k&&!q)return!0}if(l&&!U.prototype.finally)return!0;if(51<=P&&/native code/.test(U))return!1;var t=U.resolve(1),n=function(e){e(function(){},function(){})},e=t.constructor={};return e[C]=n,!(t.then(function(){})instanceof n)}),w=R||!w(function(e){U.all(e).catch(function(){})}),te=function(e){var t;return!(!v(e)||"function"!=typeof(t=e.then))&&t},ne=function(c,d){var f;c.notified||(c.notified=!0,f=c.reactions,T(function(){for(var e=c.value,t=c.state==K,n=0;f.length>n;){var r,i,a,o=f[n++],s=t?o.ok:o.fail,l=o.resolve,u=o.reject,h=o.domain;try{s?(t||(c.rejection===ee&&oe(c),c.rejection=$),!0===s?r=e:(h&&h.enter(),r=s(e),h&&(h.exit(),a=!0)),r===o.promise?u(z("Promise-chain cycle")):(i=te(r))?i.call(r,l,u):l(r)):u(e)}catch(e){h&&!a&&h.exit(),u(e)}}c.reactions=[],c.notified=!1,d&&!c.rejection&&ie(c)}))},re=function(e,t,n){var r,i;Y?(r=G.createEvent("Event"),r.promise=t,r.reason=n,r.initEvent(e,!1,!0),u.dispatchEvent(r)):r={promise:t,reason:n},!q&&(i=u["on"+e])?i(r):e===X&&S("Unhandled promise rejection",n)},ie=function(i){M.call(u,function(){var e,t=i.facade,n=i.value,r=ae(i);if(r&&(e=I(function(){k?V.emit("unhandledRejection",n,t):re(X,t,n)}),i.rejection=k||ae(i)?ee:$,e.error))throw e.value})},ae=function(e){return e.rejection!==$&&!e.parent},oe=function(t){M.call(u,function(){var e=t.facade;k?V.emit("rejectionHandled",e):re(Z,e,t.value)})},se=function(t,n,r){return function(e){t(n,e,r)}},le=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=Q,ne(e,!0))},ue=function(n,e,t){if(!n.done){n.done=!0,t&&(n=t);try{if(n.facade===e)throw z("Promise can't be resolved itself");var r=te(e);r?T(function(){var t={done:!1};try{r.call(e,se(ue,t,n),se(le,t,n))}catch(e){le(t,e,n)}}):(n.value=e,n.state=K,ne(n,!1))}catch(e){le({done:!1},e,n)}}};R&&(U=function(e){y(this,U,D),g(e),r.call(this);var t=O(this);try{e(se(ue,t),se(le,t))}catch(e){le(t,e)}},r=function(e){B(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:J,value:void 0})},r.prototype=f(U.prototype,{then:function(e,t){var n=F(this),r=j(b(this,U));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=k?V.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=J&&ne(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=O(e);this.promise=e,this.resolve=se(ue,t),this.reject=se(le,t)},A.f=j=function(e){return e===U||e===a?new i(e):W(e)},l||"function"!=typeof c||(o=c.prototype.then,d(c.prototype,"then",function(e,t){var n=this;return new U(function(e,t){o.call(n,e,t)}).then(e,t)},{unsafe:!0}),"function"==typeof H&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return E(U,H.apply(u,arguments))}}))),s({global:!0,wrap:!0,forced:R},{Promise:U}),p(U,D,!1,!0),m(D),a=h(D),s({target:D,stat:!0,forced:R},{reject:function(e){var t=j(this);return t.reject.call(void 0,e),t.promise}}),s({target:D,stat:!0,forced:l||R},{resolve:function(e){return E(l&&this===a?U:this,e)}}),s({target:D,stat:!0,forced:w},{all:function(e){var s=this,t=j(s),l=t.resolve,u=t.reject,n=I(function(){var r=g(s.resolve),i=[],a=0,o=1;x(e,function(e){var t=a++,n=!1;i.push(void 0),o++,r.call(s,e).then(function(e){n||(n=!0,i[t]=e,--o||l(i))},u)}),--o||l(i)});return n.error&&u(n.value),t.promise},race:function(e){var n=this,r=j(n),i=r.reject,t=I(function(){var t=g(n.resolve);x(e,function(e){t.call(n,e).then(r.resolve,i)})});return t.error&&i(t.value),r.promise}})},function(e,t,n){var r,i,a,o,s,l,u,h,c=n(18),d=n(81).f,f=n(237).set,p=n(238),m=n(526),v=n(85),g=c.MutationObserver||c.WebKitMutationObserver,y=c.document,_=c.process,n=c.Promise,d=d(c,"queueMicrotask"),d=d&&d.value;d||(r=function(){var e,t;for(v&&(e=_.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?o():a=void 0,e}}a=void 0,e&&e.enter()},o=p||v||m||!g||!y?n&&n.resolve?(u=n.resolve(void 0),h=u.then,function(){h.call(u,r)}):v?function(){_.nextTick(r)}:function(){f.call(c,r)}:(s=!0,l=y.createTextNode(""),new g(r).observe(l,{characterData:!0}),function(){l.data=s=!s})),e.exports=d||function(e){e={fn:e,next:void 0},a&&(a.next=e),i||(i=e,o()),a=e}},function(e,t,n){n=n(105),e.exports=/web0s(?!.*chrome)/i.test(n)},function(e,t,n){var r=n(18);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";var r=n(8),u=n(44),i=n(117),a=n(151),h=n(62);r({target:"Promise",stat:!0},{allSettled:function(e){var s=this,t=i.f(s),l=t.resolve,n=t.reject,r=a(function(){var r=u(s.resolve),i=[],a=0,o=1;h(e,function(e){var t=a++,n=!1;i.push(void 0),o++,r.call(s,e).then(function(e){n||(n=!0,i[t]={status:"fulfilled",value:e},--o||l(i))},function(e){n||(n=!0,i[t]={status:"rejected",reason:e},--o||l(i))})}),--o||l(i)});return r.error&&n(r.value),t.promise}})},function(e,t,n){"use strict";var r=n(8),c=n(44),d=n(45),i=n(117),a=n(151),f=n(62),p="No one promise resolved";r({target:"Promise",stat:!0},{any:function(e){var l=this,t=i.f(l),u=t.resolve,h=t.reject,n=a(function(){var r=c(l.resolve),i=[],a=0,o=1,s=!1;f(e,function(e){var t=a++,n=!1;i.push(void 0),o++,r.call(l,e).then(function(e){n||s||(s=!0,u(e))},function(e){n||s||(n=!0,i[t]=e,--o||h(new(d("AggregateError"))(i,p)))})}),--o||h(new(d("AggregateError"))(i,p))});return n.error&&h(n.value),t.promise}})},function(e,t,n){"use strict";var r=n(8),i=n(75),a=n(235),o=n(16),s=n(45),l=n(236),u=n(239),n=n(88),o=!!a&&o(function(){a.prototype.finally.call({then:function(){}},function(){})});r({target:"Promise",proto:!0,real:!0,forced:o},{finally:function(t){var n=l(this,s("Promise")),e="function"==typeof t;return this.then(e?function(e){return u(n,t()).then(function(){return e})}:t,e?function(e){return u(n,t()).then(function(){throw e})}:t)}}),i||"function"!=typeof a||a.prototype.finally||n(a.prototype,"finally",s("Promise").prototype.finally)},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),s=i(n(234)),n=function(){function t(e){(0,a.default)(this,t),this._map=e,this.dynamicModel={},this.loader=new s.default(this._map)}return(0,o.default)(t,[{key:"load",value:function(i,t,e){var a=this;this.dynamicModel[i]?0==this.dynamicModel[i].loadComplete?(this.dynamicModel[i].scbs.push(t),this.dynamicModel[i].fcbs.push(e)):this.dynamicModel[i].error?e&&e(this.dynamicModel[i].error):t&&this.loader.parse(this.dynamicModel[i].data,fm.LoaderUtils.extractUrlBase(i),function(e){t(e)},function(){}):(this.dynamicModel[i]={gltf:null,loadComplete:!1,error:null,scbs:[],fcbs:[]},this.dynamicModel[i].scbs.push(t),this.dynamicModel[i].fcbs.push(e),this.loader.load(i,function(e,t){a.dynamicModel[i].gltf=e,a.dynamicModel[i].data=t,a.dynamicModel[i].loadComplete=!0;for(var n=a.dynamicModel[i].scbs,r=0;r<n.length;r++)n[r]&&n[r](e)},void 0,function(e){a.dynamicModel[i].error=e,a.dynamicModel[i].loadComplete=!0;for(var t=a.dynamicModel[i].fcbs,n=0;n<t.length;n++)t[n]&&t[n](e)}))}},{key:"dispose",value:function(){this.dynamicModel={},this.loader=null}}]),t}(),n=n;t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.vertexShader=void 0,n="\n varying vec4 v_position;\n// varying vec3 vReflect;\n uniform mat4 relativeModelMatrix;\n// uniform vec3 cameraPosition2;\n\n #define STANDARD\n varying vec3 vViewPosition;\n #ifndef FLAT_SHADED\n \tvarying vec3 vNormal;\n \t#ifdef USE_TANGENT\n \t\tvarying vec3 vTangent;\n \t\tvarying vec3 vBitangent;\n \t#endif\n #endif\n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define PI_HALF 1.5707963267949\n #define RECIPROCAL_PI 0.31830988618\n #define RECIPROCAL_PI2 0.15915494\n #define LOG2 1.442695\n #define EPSILON 1e-6\n #ifndef saturate\n #define saturate(a) clamp( a, 0.0, 1.0 )\n #endif\n #define whiteComplement(a) ( 1.0 - saturate( a ) )\n float pow2( const in float x ) { return x*x; }\n float pow3( const in float x ) { return x*x*x; }\n float pow4( const in float x ) { float x2 = x*x; return x2*x2; }\n float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\n highp float rand( const in vec2 uv ) {\n \tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n \thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n \treturn fract(sin(sn) * c);\n }\n #ifdef HIGH_PRECISION\n \tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n #else\n \tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n \tfloat precisionSafeLength( vec3 v ) {\n \t\tfloat maxComponent = max3( abs( v ) );\n \t\treturn length( v / maxComponent ) * maxComponent;\n \t}\n #endif\n struct IncidentLight {\n \tvec3 color;\n \tvec3 direction;\n \tbool visible;\n };\n struct ReflectedLight {\n \tvec3 directDiffuse;\n \tvec3 directSpecular;\n \tvec3 indirectDiffuse;\n \tvec3 indirectSpecular;\n };\n struct GeometricContext {\n \tvec3 position;\n \tvec3 normal;\n \tvec3 viewDir;\n #ifdef CLEARCOAT\n \tvec3 clearcoatNormal;\n #endif\n };\n vec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n \treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n }\n vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n \treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n }\n vec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n \tfloat distance = dot( planeNormal, point - pointOnPlane );\n \treturn - distance * planeNormal + point;\n }\n float sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n \treturn sign( dot( point - pointOnPlane, planeNormal ) );\n }\n vec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n \treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n }\n mat3 transposeMat3( const in mat3 m ) {\n \tmat3 tmp;\n \ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n \ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n \ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n \treturn tmp;\n }\n float linearToRelativeLuminance( const in vec3 color ) {\n \tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n \treturn dot( weights, color.rgb );\n }\n bool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n }\n #ifdef USE_UV\n \t#ifdef UVS_VERTEX_ONLY\n \t\tvec2 vUv;\n \t#else\n \t\tvarying vec2 vUv;\n \t#endif\n \tuniform mat3 uvTransform;\n #endif\n #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n \tattribute vec2 uv2;\n \tvarying vec2 vUv2;\n \tuniform mat3 uv2Transform;\n #endif\n #ifdef USE_DISPLACEMENTMAP\n \tuniform sampler2D displacementMap;\n \tuniform float displacementScale;\n \tuniform float displacementBias;\n #endif\n #ifdef USE_COLOR\n \tvarying vec3 vColor;\n #endif\n #ifdef USE_FOG\n \tvarying float fogDepth;\n #endif\n #ifdef USE_MORPHTARGETS\n \tuniform float morphTargetBaseInfluence;\n \t#ifndef USE_MORPHNORMALS\n \tuniform float morphTargetInfluences[ 8 ];\n \t#else\n \tuniform float morphTargetInfluences[ 4 ];\n \t#endif\n #endif\n #ifdef USE_SKINNING\n \tuniform mat4 bindMatrix;\n \tuniform mat4 bindMatrixInverse;\n \t#ifdef BONE_TEXTURE\n \t\tuniform highp sampler2D boneTexture;\n \t\tuniform int boneTextureSize;\n \t\tmat4 getBoneMatrix( const in float i ) {\n \t\t\tfloat j = i * 4.0;\n \t\t\tfloat x = mod( j, float( boneTextureSize ) );\n \t\t\tfloat y = floor( j / float( boneTextureSize ) );\n \t\t\tfloat dx = 1.0 / float( boneTextureSize );\n \t\t\tfloat dy = 1.0 / float( boneTextureSize );\n \t\t\ty = dy * ( y + 0.5 );\n \t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n \t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n \t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n \t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n \t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n \t\t\treturn bone;\n \t\t}\n \t#else\n \t\tuniform mat4 boneMatrices[ MAX_BONES ];\n \t\tmat4 getBoneMatrix( const in float i ) {\n \t\t\tmat4 bone = boneMatrices[ int(i) ];\n \t\t\treturn bone;\n \t\t}\n \t#endif\n #endif\n #ifdef USE_SHADOWMAP\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t/*\n\t#if NUM_RECT_AREA_LIGHTS > 0\n\n\t\t// TODO (abelnation): uniforms for area light shadows\n\n\t#endif\n\t*/\n\n#endif\n #ifdef USE_LOGDEPTHBUF\n \t#ifdef USE_LOGDEPTHBUF_EXT\n \t\tvarying float vFragDepth;\n \t\tvarying float vIsPerspective;\n \t#else\n \t\tuniform float logDepthBufFC;\n \t#endif\n #endif\n #if 0 > 0\n \tvarying vec3 vClipPosition;\n #endif\n void main() {\n // vec3 worldPosition2 = ( modelMatrix * vec4( position, 1.0 )).xyz;\n // vec3 cameraToVertex = normalize( worldPosition2 - cameraPosition2 );\n // vReflect = reflect( cameraToVertex, normal );\n \tvec4 pos = vec4(position, 1.0);\n \tv_position = relativeModelMatrix * pos;\n\n #ifdef USE_UV\n \tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n \tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n #endif\n #ifdef USE_COLOR\n \tvColor.xyz = color.xyz;\n #endif\n vec3 objectNormal = vec3( normal );\n #ifdef USE_TANGENT\n \tvec3 objectTangent = vec3( tangent.xyz );\n #endif\n #ifdef USE_MORPHNORMALS\n \tobjectNormal *= morphTargetBaseInfluence;\n \tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n \tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n \tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n \tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n #endif\n #ifdef USE_SKINNING\n \tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n \tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n \tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n \tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n #endif\n #ifdef USE_SKINNING\n \tmat4 skinMatrix = mat4( 0.0 );\n \tskinMatrix += skinWeight.x * boneMatX;\n \tskinMatrix += skinWeight.y * boneMatY;\n \tskinMatrix += skinWeight.z * boneMatZ;\n \tskinMatrix += skinWeight.w * boneMatW;\n \tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n \tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n \t#ifdef USE_TANGENT\n \t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n \t#endif\n #endif\n vec3 transformedNormal = objectNormal;\n #ifdef USE_INSTANCING\n \tmat3 m = mat3( instanceMatrix );\n \ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n \ttransformedNormal = m * transformedNormal;\n #endif\n transformedNormal = normalMatrix * transformedNormal;\n #ifdef FLIP_SIDED\n \ttransformedNormal = - transformedNormal;\n #endif\n #ifdef USE_TANGENT\n \tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n \t#ifdef FLIP_SIDED\n \t\ttransformedTangent = - transformedTangent;\n \t#endif\n #endif\n #ifndef FLAT_SHADED\n \tvNormal = normalize( transformedNormal );\n \t#ifdef USE_TANGENT\n \t\tvTangent = normalize( transformedTangent );\n \t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n \t#endif\n #endif\n vec3 transformed = vec3( position );\n #ifdef USE_MORPHTARGETS\n \ttransformed *= morphTargetBaseInfluence;\n \ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n \ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n \ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n \ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n \t#ifndef USE_MORPHNORMALS\n \ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n \ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n \ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n \ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n \t#endif\n #endif\n #ifdef USE_SKINNING\n \tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n \tvec4 skinned = vec4( 0.0 );\n \tskinned += boneMatX * skinVertex * skinWeight.x;\n \tskinned += boneMatY * skinVertex * skinWeight.y;\n \tskinned += boneMatZ * skinVertex * skinWeight.z;\n \tskinned += boneMatW * skinVertex * skinWeight.w;\n \ttransformed = ( bindMatrixInverse * skinned ).xyz;\n #endif\n #ifdef USE_DISPLACEMENTMAP\n \ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n #endif\n vec4 mvPosition = vec4( transformed, 1.0 );\n #ifdef USE_INSTANCING\n \tmvPosition = instanceMatrix * mvPosition;\n #endif\n mvPosition = modelViewMatrix * mvPosition;\n gl_Position = projectionMatrix * mvPosition;\n #ifdef USE_LOGDEPTHBUF\n \t#ifdef USE_LOGDEPTHBUF_EXT\n \t\tvFragDepth = 1.0 + gl_Position.w;\n \t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n \t#else\n \t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n \t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n \t\t\tgl_Position.z *= gl_Position.w;\n \t\t}\n \t#endif\n #endif\n #if 0 > 0\n \tvClipPosition = - mvPosition.xyz;\n #endif\n \tvViewPosition = - mvPosition.xyz;\n #if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n \tvec4 worldPosition = vec4( transformed, 1.0 );\n \t#ifdef USE_INSTANCING\n \t\tworldPosition = instanceMatrix * worldPosition;\n \t#endif\n \tworldPosition = modelMatrix * worldPosition;\n #endif\n #ifdef USE_SHADOWMAP\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\n\t}\n\n\t#endif\n\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\n\t}\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\n\t}\n\n\t#endif\n\n\t/*\n\t#if NUM_RECT_AREA_LIGHTS > 0\n\n\t\t// TODO (abelnation): update vAreaShadowCoord with area light info\n\n\t#endif\n\t*/\n\n#endif\n #ifdef USE_FOG\n \tfogDepth = -mvPosition.z;\n #endif\n }\n ",t.vertexShader=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.fragmentShader=void 0,n="\n \nuniform bool isNeedSweep;\nuniform bool isRect;\nuniform bool isAnnulus;\n\nuniform float sweepW;\nuniform float sweepH;\nuniform vec2 se2N;\nuniform vec2 se2RN;\nuniform vec2 moveP;\n\nbool isInRectW(vec2 v, vec2 a, float w){\n float a1 = abs(dot(v,a));\n return a1 < w;\n}\nbool isInRectH(vec2 v, vec2 a, float h){\n float a1 = abs(dot(v,a));\n return a1 < h;\n}\n\nvarying vec2 v_Uv;\nvarying vec4 v_position;\n\n\nuniform vec2 circleC;\nuniform float maxR;\nuniform float minR;\nbool isMaxCircle(vec3 a, vec2 b, float r){\n float c = sqrt(pow((a.x-b.x),2.0)+pow((a.z-b.y),2.0));\n return c <= r;\n}\n\nbool isMinCircle(vec3 a, vec2 b, float r){\n float c = sqrt(pow((a.x-b.x),2.0)+pow((a.z-b.y),2.0));\n return c > r;\n}\n\n#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSPARENCY\n#endif\nuniform vec3 diffuse;\n\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSPARENCY\n\tuniform float transparency;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSPARENCY\n\t\tdiffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t\n if(isRect){\n \n vec2 v = vec2(v_position.x-moveP.x,v_position.z-moveP.y);\n if(float(isInRectW(v,se2N,sweepW) && isInRectH(v,se2RN,sweepH)) != 0.0 && isNeedSweep){\n gl_FragColor = vec4(mix(vec3(1.0, 1.0, 0.36)*0.8, gl_FragColor.rgb, 0.5), 1.0);\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); \n }\n \n }\n \n if(isAnnulus){\n \n if(float(isMaxCircle(v_position.xyz,circleC,maxR) && isMinCircle(v_position.xyz,circleC,minR) ) != 0.0 && isNeedSweep){\n gl_FragColor = vec4(mix(vec3(0.3, 1.0, 0.86),gl_FragColor.rgb,0.91), 1.0);\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n }\n // gl_FragColor = vec4(1.0,0.1,0.1,1.0);\n }\n \n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",t.fragmentShader=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=void 0;var c=o(n(13)),d=o(n(27)),f=o(n(2)),p=o(n(3)),m=o(n(42));function x(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=v(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function v(e,t){if(e){if("string"==typeof e)return g(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}o(n(535)),n=function(){function n(e,t){(0,f.default)(this,n),this._themeName=t,this._themeUrl=e,this._data=null,this._type2theme={},this._poiimagetheme={},this._storePoiThemes={},this._storeLabelTypeDic={},this._storeLabelThemeDic={},this._storethemes={},this._externalModelTheme={},this._defaultTheme={color:16777215,alpha:1,strokeColor:16777215,strokeWidth:2},this._labelDefaultTheme={alpha:"0.9",fillcolor:"30,30,30",fontsize:"14.0",id:"109",image:!1,strokecolor:"255,255,255"},this.clearColor=16777215,this.clearAlpha=1,this._modelOpacity=.875,this._floorColor=16776960,this._floorOpacity=.875,this._selectedColor=16750950,this._labelStyle,this._labelSelectedStyle,this._facilitySize,this._poiMatClones={},this._storeApply={},this.navigateStyle_={color:16711680,lineWidth:8,alpha:.8,dash:{size:1,gap:1}}}return(0,p.default)(n,[{key:"initExteralModelTheme",value:function(){if(this._data.externalmodelapply){var e,t=x(this._data.externalmodelapply);try{for(t.s();!(e=t.n()).done;){var n,r=e.value,i=r.fids.split(","),a=x(i);try{for(a.s();!(n=a.n()).done;){var o,s=n.value,l=void 0,u=x(this._data.externalmodeltheme);try{for(u.s();!(o=u.n()).done;){var h=o.value;if(h.id===r.normalid){l=h;break}}}catch(e){u.e(e)}finally{u.f()}this._externalModelTheme[s]=(0,c.default)({color:l.color,model:l.model},r),this._externalModelTheme[s].fids=void 0}}catch(e){a.e(e)}finally{a.f()}}}catch(e){t.e(e)}finally{t.f()}}}},{key:"initStoreTheme",value:function(){var e={};this._defaultTheme=this._data.storetheme[0],this.storeThemes=e;for(var t=0;t<this._data.storetheme.length;t++){var n=this._data.storetheme[t];n.color=m.default.toColor(n.color),n.strokeColor=m.default.toColor(n.strokecolor),n.strokeWidth=n.strokewidth,n.alpha=n.alpha,e[n.id]=n}var r,i=this._data.floorapply;for(r in i){var a=i[r];if(a.typeapply)for(var o in a.typeapply){var s=a.typeapply[o];if(s.normalid){var l=e[s.normalid],o=e[s.selectedid];o&&(this._selectedColor=m.default.toColor(o.color));var u,h=s.type.split(",");for(u in h)this._type2theme[h[u]]=l}}}var c=this._data.extenttheme;this._floorColor=m.default.toColor(c[0].color),this._floorOpacity=(0,d.default)(c[0].alpha)}},{key:"initLabelTheme",value:function(){var e=this._data.storelabeltheme;if(this.storeLabelThemeDic={},this.storeLabelTypeDic={},e){0<e.length&&(this._labelStyle=e[0],1<e.length&&(this._labelSelectedStyle=e[1]));for(var t=0;t<e.length;t++)this.storeLabelThemeDic[e[t].id]=e[t];var n=this._data.floorstorelabelapply;if(n)for(t=0;t<n.length;t++){var r=n[t].typeapply;if("0"==n[t].floorid)for(var i=0;i<r.length;i++)for(var a=r[i],o=a.type.split(","),s=0;s<o.length;s++)this.storeLabelTypeDic[o[s]]=a}var l=this.data.storelabelapply;this._labelFidTheme={};var u,h=this._labelFidTheme,c=x(l);try{for(c.s();!(u=c.n()).done;){var d=u.value;if(d.fids){var f,p=d.fids.split(","),m=x(p);try{for(m.s();!(f=m.n()).done;){var v=f.value;h[v]=this.storeLabelThemeDic[d.normalid]}}catch(e){m.e(e)}finally{m.f()}}}}catch(e){c.e(e)}finally{c.f()}}}},{key:"initPoiTheme",value:function(){this._poiimagetheme={};var e,t=this._data.poiimagetheme,n={};for(e in this.storePoiThemes=n,t){var r=t[e];r.imagename&&(n[r.id]=r)}var i,a=this.data.floorpoiimageapply;for(i in a){var o=a[i];if(o.typeapply)for(var s in o.typeapply)if(s=o.typeapply[s],s.normalid){var l,u=n[s.normalid],h=s.type.split(",");for(l in h)this._poiimagetheme[h[l]]=u}}var c=this.data.poiimageapply;this._poiFidTheme={};var d,f=this._poiFidTheme,p=x(c);try{for(p.s();!(d=p.n()).done;){var m=d.value;if(m.fids){var v,g=m.fids.split(","),y=x(g);try{for(y.s();!(v=y.n()).done;){var _=v.value;f[_]=n[m.normalid]}}catch(e){y.e(e)}finally{y.f()}}}}catch(e){p.e(e)}finally{p.f()}}},{key:"getStoreApplyTheme",value:function(e){var t,n,r=x(this._data.storeapply);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.fids===e){var a,o=x(this._data.storetheme);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.id==i.normalid)return t=(0,c.default)({},s,i),t}}catch(e){o.e(e)}finally{o.f()}}}}catch(e){r.e(e)}finally{r.f()}return null}},{key:"themeName",get:function(){return this._themeName}},{key:"data",get:function(){return this._data},set:function(e){this._data=e,this.initStoreTheme(),this.initLabelTheme(),this.initPoiTheme(),this.initExteralModelTheme(),this.clearColor=m.default.toColor(this._data.viewtheme.clearcolor),this.clearAlpha=(0,d.default)(this._data.viewtheme.clearalpha)}},{key:"getRThemeTexture",value:function(e){if(this.rtheme)for(var t,n=0;n<this.rtheme.fmis.length;n++)if(t=this.rtheme.fmis[n],t.name==e)return t.content;return null}},{key:"getModelSelectColor",value:function(){var e=this._data.storetheme[1],t=e.color,e=(0,d.default)(e.alpha);return{r:(t>>16&255)/255,g:(t>>8&255)/255,b:(255&t)/255,a:e}}},{key:"getModelTheme",value:function(e){return e?(e=this._type2theme[e.type],e||this._defaultTheme):this._defaultTheme}},{key:"getPoiTheme",value:function(e){var t=e.type,e=e.fid,e=this._poiFidTheme[e];return e=e||this._poiimagetheme[t],e=(0,c.default)(e||this._poiimagetheme[0],{}),"rtheme"==this.fileType?e.imageSrc=this.getRThemeTexture(e.imagename):e.imageSrc=this._themeUrl+"/"+this.themeName+"/"+e.imagename,e.imageUrl=this._themeUrl+"/"+this.themeName+"/"+e.imagename,e.imagehead=this._themeUrl+"/"+this.themeName+"/",e}},{key:"getLabelTheme",value:function(e){var t,n=e.type,e=e.fid,n=this.storeLabelTypeDic[n];return e&&(t=this._labelFidTheme[e]),n||t?n&&(t=t||this.storeLabelThemeDic[n.normalid]||this._labelStyle):t=this._labelStyle,t=t||this._labelDefaultTheme,t.fillcolor&&t.alpha&&t.fontsize||(n={fillcolor:"0,0,0",alpha:"1.0",fontsize:"12.0"},t=(0,c.default)(t,n)),t.image?("rtheme"===this.fileType?t.imageSrc=this.getRThemeTexture(t.image):t.imageSrc=this._themeUrl+"/"+this.themeName+"/"+t.image,t.imageUrl=this._themeUrl+"/"+this.themeName+"/"+t.image):t.imageSrc=!1,t}},{key:"getExteralModelTheme",value:function(e){return this._externalModelTheme[e]}},{key:"dispose",value:function(){this._type2theme=void 0,this._poiimagetheme=void 0,this._storePoiThemes=void 0,this._storeLabelTypeDic=void 0,this._storeLabelThemeDic=void 0,this._storethemes=void 0,this._data=void 0}},{key:"storeLabelTypeDic",get:function(){return this._storeLabelTypeDic},set:function(e){this._storeLabelTypeDic=e}},{key:"storeLabelThemeDic",get:function(){return this._storeLabelThemeDic},set:function(e){this._storeLabelThemeDic=e}},{key:"storePoiThemes",get:function(){return this._storePoiThemes},set:function(e){this._storePoiThemes=e}},{key:"storethemes",get:function(){return this._storethemes},set:function(e){this._storethemes=e}},{key:"themeUrl",get:function(){return this._themeUrl},set:function(e){this.themeUrl=e}},{key:"floorColor",get:function(){return this._floorColor},set:function(e){this._floorColor=e}},{key:"floorOpacity",get:function(){return this._floorOpacity},set:function(e){this._floorOpacity=e}},{key:"selectedColor",get:function(){return this._selectedColor}}]),n}(),t.default=n},function(e,t,n){"use strict";var r=n(12),i=n(19),s=n(20),l=n(21),u=n(14),h=n(22),a=n(0),o=n(1);a(t,"__esModule",{value:!0}),t.default=void 0;var c=o(n(9)),d=o(n(15)),f=o(n(13)),p=o(n(2)),m=o(n(3));function v(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=g(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function g(e,t){if(e){if("string"==typeof e)return y(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?i(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n=function(){function t(e){(0,p.default)(this,t),this._data=e,this._Nodes=[]}return(0,m.default)(t,[{key:"updateNodes",value:function(){var e,t=v(this._Nodes);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.setByTheme(this._data)}}catch(e){t.e(e)}finally{t.f()}}},{key:"addNodes",value:function(e){this._Nodes.push(e)}},{key:"removeNodes",value:function(e){var t=(0,c.default)(t=this._Nodes).call(t,e);-1<t&&(0,d.default)(e=this._Nodes).call(e,t,1)}},{key:"changeData",value:function(e){(0,f.default)(this._data,e)}}]),t}(),t.default=n},function(e,t,n){"use strict";var r=n(1),c=r(n(537)),i=r(n(56)),y=r(n(141)),r=function(){var e=function e(){var n=0,r=document.createElement("div");function t(e){return r.appendChild(e.dom),e}function i(e){for(var t=0;t<r.children.length;t++)r.children[t].style.display=t===e?"block":"none";n=e}r.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",r.addEventListener("click",function(e){e.preventDefault(),i(++n%r.children.length)},!1);var a,o=(0,c.default)(),s=o,l=0,u=t(new e.Panel("FPS","#0ff","#002")),h=t(new e.Panel("MS","#0f0","#020"));return self.performance&&self.performance.memory&&(a=t(new e.Panel("MB","#f08","#201"))),i(0),{REVISION:16,dom:r,addPanel:t,showPanel:i,begin:function(){o=(0,c.default)()},end:function(){l++;var e,t=(0,c.default)();return h.update(t-o,200),s+1e3<=t&&(u.update(1e3*l/(t-s),100),s=t,l=0,a&&(e=performance.memory,a.update(e.usedJSHeapSize/1048576,e.jsHeapSizeLimit/1048576))),t},update:function(){o=this.end()},domElement:r,setMode:i}};return e.Panel=function(n,r,i){var a=Infinity,o=0,s=Math.round,l=s(y.default.devicePixelRatio||1),u=80*l,e=48*l,h=3*l,c=2*l,d=3*l,f=15*l,p=74*l,m=30*l,v=document.createElement("canvas");v.width=u,v.height=e,v.style.cssText="width:80px;height:48px";var g=v.getContext("2d");return g.font="bold "+9*l+"px Helvetica,Arial,sans-serif",g.textBaseline="top",g.fillStyle=i,g.fillRect(0,0,u,e),g.fillStyle=r,g.fillText(n,h,c),g.fillRect(d,f,p,m),g.fillStyle=i,g.globalAlpha=.9,g.fillRect(d,f,p,m),{dom:v,update:function(e,t){a=Math.min(a,e),o=Math.max(o,e),g.fillStyle=i,g.globalAlpha=1,g.fillRect(0,0,u,f),g.fillStyle=r,g.fillText(s(e)+" "+n+" ("+s(a)+"-"+s(o)+")",h,c),g.drawImage(v,d+l,f,p-l,m,d,f,p-l,m),g.fillRect(d+p-l,f,l,m),g.fillStyle=i,g.globalAlpha=.9,g.fillRect(d+p-l,f,l,s((1-e/t)*m))}}},e};"object"===(0,i.default)(t)&&void 0!==e?e.exports=r():(r="function"==typeof r?r.call(t,n,t,e):r,void 0===r||(e.exports=r))},function(e,t,n){e.exports=n(538)},function(e,t,n){n=n(539),e.exports=n},function(e,t,n){n(540),n=n(11),e.exports=n.Date.now},function(e,t,n){n=n(8),n({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),n=function e(){(0,a.default)(this,e),this.enableMapPan=!0,this.enableMapRotate=!0,this.enableMapIncline=!0,this.enableMapPinch=!0,this.enableMapSingleTap=!0,this.enableMapHover=!1},n=n;t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(5)),l=a(n(6)),u=a(n(7)),h=a(n(543));function c(n){var r=d();return function(){var e,t=(0,u.default)(n),t=r?(e=(0,u.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,l.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,s.default)(n,e);var t=c(n);function n(e){return(0,o.default)(this,n),e=t.call(this,e),e.uniforms.offset={value:new fm.Vector2},e.uniforms.rotation={value:0},e.uniforms.scale={value:new fm.Vector2(1,1)},e.depthTest=!1,e.vertexShader=h.default.vert,e.fragmentShader=h.default.frag,e}return n}(fm.ShaderMaterial),t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={vert:"\n \n uniform vec2 offset;\n uniform float rotation;\n uniform vec2 scale;\n varying vec2 vUv;\n void main() {\n vUv = uv;\n \n \n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\n rotatedPosition.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\n \n \n rotatedPosition.x *= scale.x * abs(projectionMatrix[0][0] / projectionMatrix[1][1]);\n rotatedPosition.y *= scale.y;\n \n rotatedPosition.xy += offset;\n gl_Position = vec4(rotatedPosition,0.0,1.0);\n }\n ",frag:"\n uniform vec3 diffuse;\n uniform sampler2D mmap;\n #include <common>\n varying vec2 vUv;\n \n void main() {\n \n // vec2 muv = vec2(vUv.x , 1.0 - vUv.y);\n vec4 diffuseColor = texture2D( mmap, vUv );\n \n \n gl_FragColor = diffuseColor;\n }\n "},t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function t(e){(0,a.default)(this,t),this.videoMemoryAmount=null,this._map=e}return(0,o.default)(t,[{key:"getVideoMemoryAmount",value:function(e){if(this._map.nodeManager){var t,n=this._map.nodeManager._scenes[""+e].groups;for(t in n)this.videoMemoryAmount+=n[""+t].layers.facility[0].getVideoMemoryAmount(),this.videoMemoryAmount+=n[""+t].layers.model[0].getVideoMemoryAmount(),this.videoMemoryAmount+=n[""+t].layers.extent[0].getVideoMemoryAmount(),this.videoMemoryAmount+=n[""+t].layers.label[0].getVideoMemoryAmount();return this.videoMemoryAmount}}},{key:"_addAmount",value:function(e){this.videoMemoryAmount+=e}},{key:"_subtractAmount",value:function(e){this.videoMemoryAmount-=e}}]),t}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),n=function e(){(0,a.default)(this,e);var t=wx.getSystemInfoSync();this.pixelRatio=t.pixelRatio,this.screenWidth=t.screenWidth,this.device=t.model,this.system=t.system,this.platform=t.platform,this.brand=t.brand},n=n;t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(13)),u=a(n(10)),h=a(n(9)),c=a(n(2)),d=a(n(3)),f=a(n(5)),s=a(n(6)),l=a(n(7)),p=a(n(48)),m=a(n(115)),v=a(n(149)),g=a(n(78)),y=a(n(36)),_=a(n(154)),x=n(67),n=a(n(155));function w(n){var r=b();return function(){var e,t=(0,l.default)(n),t=r?(e=(0,l.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,s.default)(this,t)}}function b(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,f.default)(l,e);var s=w(l);function l(e,t,n){var r;if((0,c.default)(this,l),r=s.call(this,0,y.default.TEXT_MARKER),r._map=e,r._map.wxInfo.pixelRatio&&(t.fontsize*=r._map.wxInfo.pixelRatio),r._text=t.name,r._param=t,r._opx=t.x||0,r._opy=t.y||0,r._height=t.height||0,r._isRuning=!1,r._size=1.4*t.fontsize,r._callBack=t.callback,r._fillcolor=t.fillcolor,r._platecolor=t.platecolor,r._platestrokecolor=t.platestrokecolor,r._fontsize=t.fontsize,r._strokecolor=t.strokecolor,r._content=t.content,r.needAvoid=!1,!r._content){r.needAvoid=!0;for(var i=r._text.split("%rn%"),a=[],o=0;o<i.length;o++)a.push({text:i[o],fontsize:r._fontsize,fontcolor:r._fillcolor,strokecolor:r._strokecolor});r._content=a}return r._scale=t.scale,r._target=n,r._moveAnimater,r.center=r.getCenterByAnchor(t.anchor),r.picLoading=!1,r}return(0,d.default)(l,[{key:"getCenterByAnchor",value:function(e){var t=new fm.Vector2(.5,.5);switch(e){case _.default.LEFT:t.setX(0);break;case _.default.RIGHT:t.setX(1);break;case _.default.TOP:t.setY(1);break;case _.default.BOTTOM:t.setY(0);break;case _.default.LEFT_TOP:t.set(0,1);break;case _.default.RIGHT_TOP:t.set(1,1);break;case _.default.LEFT_BOTTOM:t.set(0,0);break;case _.default.RIGHT_BOTTOM:t.set(1,0)}return t}},{key:"init",value:function(){var e=this.findParent(p.default);if(!e)return!1;var t=e.materialManager.createTextMaterial(this._content,(0,o.default)({alpha:1},this._param),this._param.depth);return this._size=t.size,t.userData.size=t.size,this._renderNode=new m.default(t),this._renderNode.mapNode=this,this._renderNode.frustumCulled=!1,this._target?this.setTsize():(0,u.default)(e).renderer.setLabelSize(this._renderNode,t.size),this._renderNode.center.set(this.center.x,this.center.y),this._isInit=!0,e=this.parent.parent.parent.mapcenter,this._target?(t=this._target.mapCoord,this._x=t.x,this._y=t.y):this._opx&&this._opy?(this._x=this._opx,this._y=this._opy):(this._x=e.x,this._y=e.y),this.setPosition(this.x,this.y,0,this._height),this._callBack&&this._callBack(),this._renderNode.visible=this.show,this._renderNode.name="spirit",!0}},{key:"setTsize",value:function(){var e=this._target,e=e.getNearestDis();this.renderNode&&(this.setSize(e*this._scale),this.renderNode.material.sizeAttenuation=!0)}},{key:"setSize",value:function(e){var t=this.findParent(p.default);this._size=e,(0,u.default)(t).renderer.setLabelSize(this._renderNode,e||this._size,!!e)}},{key:"setPosition",value:function(e,t,n,r){var i=this.findParent(v.default);i?("number"==typeof n&&0<n&&this.moveToGroup(n),i=i.mapcenter,this._height=r,this._x=e,this._y=t,this._renderNode.position.set(this._x-i.x,this._height,-this._y+i.y)):console.error("Can't change position before map init Marker")}},{key:"getPosition",value:function(){return{x:this._y,y:this._y,z:this._height,groupID:this.parent.parent.groupID}}},{key:"moveTo",value:function(t){var e,n,r,i,a=this;this._isRuning||(e=this.findParent(p.default),n=t.x,r=t.y,i=new g.default({x:this.x,y:this.y},{x:n,y:r},1e3*t.time,function(){(0,u.default)(e).removeAnimater(i),a._moveAnimater=null,a._isRuning=!1,t.callback()},function(e){a.setPosition(e.x,e.y,0,0),t.update(e)}).start(),this._isRuning=!0,(0,u.default)(e).addAnimater(i),this._moveAnimater=i)}},{key:"moveToGroup",value:function(e){var t=this.findParent(p.default),n=this.parent.parent.groupID;n!==e&&(this.parent.parent.parent.groups[""+e]?(n=this.parent.parent.parent.groups[""+e].getOrCreateLayer("textMarker"),this._groupId=e,this.parent.untiedMarker(this),n.addMarker(this),(0,u.default)(t).renderer.setLabelSize(this._renderNode)):console.warn(x.tileMessage.noGroup))}},{key:"stopMoveTo",value:function(){var e=this.findParent(p.default);this._moveAnimater&&this._moveAnimater.stop(),(0,u.default)(e).removeAnimater(this._moveAnimater)}},{key:"name",get:function(){return this._text},set:function(e){this._text=e,this.reDraw()}},{key:"redraw",value:function(){var e=this.findParent(p.default);if(!e)return!1;this.renderNode&&(e=e.materialManager.createTextMaterial(this._content,(0,o.default)({alpha:1},this._param)),(0,u.default)(this.renderNode.material).dispose(),this.renderNode.material.dispose(),this.renderNode.material=e)}},{key:"reDraw",value:function(){var e=this.findParent(p.default);if(!e)return!1;var t=e.materialManager.createLabelMaterial(this._text,(0,o.default)({alpha:1},this._param));t.userData.size=this._size,this._renderNode.material.dispose(),this._renderNode.material=void 0,this._renderNode.material=t,(0,u.default)(e).renderer.setLabelSize(this._renderNode,this._size)}},{key:"visible",get:function(){return this._visible},set:function(e){var t;e?(0,h.default)(t=this.parent.scene.children).call(t,this._renderNode)<0&&this._renderNode&&this.parent.scene.add(this._renderNode):this._renderNode&&this.parent.scene.remove(this._renderNode),this._visible=e}},{key:"size",get:function(){return this._size}},{key:"fillcolor",get:function(){return this._fillcolor},set:function(e){this._fillcolor=e,this._param.fillcolor=e,this.reDraw()}},{key:"fontsize",get:function(){return this._fontsize}},{key:"strokecolor",get:function(){return this._strokecolor},set:function(e){this._strokecolor=e,this._param.strokecolor=e,this.reDraw()}},{key:"content",set:function(e){this._content=e}}]),l}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(5)),l=a(n(6)),u=a(n(7));function h(n){var r=c();return function(){var e,t=(0,u.default)(n),t=r?(e=(0,u.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,l.default)(this,t)}}function c(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,s.default)(r,e);var n=h(r);function r(){(0,o.default)(this,r);var e=n.call(this),t=new Float32Array([-.5,0,-.5,0,0,.5,0,-.5,1,0,.5,0,.5,1,1,-.5,0,.5,0,1]),t=new fm.InterleavedBuffer(t,5);return e.setIndex([0,1,2,0,2,3]),e.addAttribute("position",new fm.InterleavedBufferAttribute(t,3,0,!1)),e.addAttribute("uv",new fm.InterleavedBufferAttribute(t,2,3,!1)),e}return r}(fm.BufferGeometry),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),r=a(n(549));function c(n){var r=d();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}a(n(249)),a(n(248)),r=function(e){(0,l.default)(r,e);var n=c(r);function r(e,t){return(0,o.default)(this,r),t=n.call(this,e,t),t.type="Line2",t.isLine2=!0,t}return(0,s.default)(r,[{key:"copy",value:function(){}}]),r}(r.default),t.default=r},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7));function c(n){var r=d();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}a(n(250)),n=function(e){(0,l.default)(r,e);var n=c(r);function r(e,t){return(0,o.default)(this,r),t=n.call(this,e,t),t.type="LineSegments2",t.isLineSegments2=!0,t}return(0,s.default)(r,[{key:"computeLineDistances",value:function(){for(var e=new fm.Vector3,t=new fm.Vector3,n=this.geometry,r=n.attributes.instanceStart,i=n.attributes.instanceEnd,a=new Float32Array(2*r.data.count),o=0,s=0,l=r.data.count;o<l;o++,s+=2)e.fromBufferAttribute(r,o),t.fromBufferAttribute(i,o),a[s]=0===s?0:a[s-1],a[s+1]=a[s]+e.distanceTo(t);var u=new fm.InstancedInterleavedBuffer(a,2,1);return n.setAttribute("instanceDistanceStart",new fm.InterleavedBufferAttribute(u,1,0)),n.setAttribute("instanceDistanceEnd",new fm.InterleavedBufferAttribute(u,1,1)),this}},{key:"copy",value:function(e){return this}}]),r}(fm.Mesh),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var d=a(n(10)),o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),c=a(n(36)),f=a(n(48)),p=a(n(156)),m=a(n(28)),v=a(n(551)),g=a(n(553)),n=a(n(155));function y(n){var r=_();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function _(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,l.default)(r,e);var n=y(r);function r(e){var t;return(0,o.default)(this,r),t=n.call(this,0,c.default.POLYGON_MARKER),t._alpha=void 0!==e.alpha?e.alpha:1,t._color=void 0!==e.color?e.color:"#FF0000",t._dheight=e.height||0,t._lineColor=e.lineColor||e.color||"#FF0000",t._lineWidth="number"==typeof e.lineWidth?e.lineWidth:2,t._points=void 0!==e.points?e.points:[],e.points.type&&("rectangle"===e.points.type&&e.points.startPoint&&e.points.startPoint.x&&e.points.startPoint.y?(t._x=e.points.startPoint.x+e.points.width/2,t._y=e.points.startPoint.y-e.points.height/2):(t._x=e.points.center.x,t._y=e.points.center.y)),t._line=null,t._linePoints=null,t}return(0,s.default)(r,[{key:"init",value:function(){if(!this._points)return!1;if(!this.parent)return!1;if(!this.parent.parent)return!1;var e=this.findParent(f.default);if(!e)return!1;var t={};t.resolution=new fm.Vector2((0,d.default)(e).renderer.canvas.clientWidth,(0,d.default)(e).renderer.canvas.clientHeight);var n=(0,d.default)(e).renderer.getCameraByViewMode((0,d.default)(e)._viewMode);t.near=n.near,t.far=n.far,t.color=this._lineColor,t.alpha=1,t.lineWidth=this._lineWidth,e=this.parent.parent,n=new fm.MeshBasicMaterial,n.transparent=!0,n.opacity=this._alpha,n.color=new fm.Color(this._color),n.side=2;var r=e.parent.mapcenter;switch(this._x||(this._x=r.x),this._y||(this._y=r.y),this._dheight?this._height=this._dheight:this._height=0,this._points.type){case"circle":for(var i=this.createCircleGeometry(this._points.radius,this._points.segments),a=new Float32Array(i.attributes.position.array.length-3),o=0;o<i.attributes.position.array.length;o++)2<o&&(a[o-3]=i.attributes.position.array[o]);break;case"rectangle":for(var i=this.createReactGeometry(this._points.width,this._points.height),s=i.attributes.position.array.length,l=i.attributes.position.array,a=new Float32Array(s+3),u=0;u<s;u++)a[u]=i.attributes.position.array[u];a[s-6]=l[s-3],a[s-5]=l[s-2],a[s-4]=l[s-1],a[s-3]=l[s-6],a[s-2]=l[s-5],a[s-1]=l[s-4],a[s]=l[0],a[s+1]=l[1],a[s+2]=l[2];break;default:i=g.default.createShapeBufferGeometryByCenter(this._points,r);var h=i.attributes.position.array.length;a=new Float32Array(h+3);for(var c=0;c<h;c++)a[c]=i.attributes.position.array[c];a[h]=i.attributes.position.array[0],a[h+1]=i.attributes.position.array[1],a[h+2]=i.attributes.position.array[2]}return this._linePoints=a,e=new p.default,e.initLinePoints(a,t),this._line=e,this._renderNode=new fm.Mesh(i,n),this._renderNode.mapNode=this,this._renderNode.add(e.renderNode),this._renderNode.rotation.set(Math.PI/2,0,0,"XYZ"),this._renderNode.position.set(this._x-r.x,this._height,-this._y+r.y),!0}},{key:"contain",value:function(e){if(!this._points)return!1;if(!this.parent)return!1;if(!this.parent.parent)return!1;if("circle"===this._points.type){var t=Math.sqrt((e.x-this._x)*(e.x-this._x)+(e.y-this._y)*(e.y-this._y));if(t<this._points.r)return!0}else{if("rectangle"!==this._points.type)return m.default.pointInPolygon2d(this._points,e,this._points.length);if(Math.abs(e.x-this._x)<this._points.width/2&&Math.abs(e.y-this._y)<this._points.height/2)return!0}return!1}},{key:"createReactGeometry",value:function(e,t){return new fm.PlaneBufferGeometry(e,t)}},{key:"createCircleGeometry",value:function(e,t){return new fm.CircleBufferGeometry(e,t)}},{key:"createPolygonGeometry",value:function(e,t){for(var n=new fm.Shape,r=0;r<e.length;r++)0===r?n.moveTo(e[r].x-t.x,-e[r].y+t.y):n.lineTo(e[r].x-t.x,-e[r].y+t.y);return n.lineTo(e[0].x-t.x,-e[0].y+t.y),new fm.ShapeBufferGeometry(n)}},{key:"setColor",value:function(e){this._renderNode.material.color=new fm.Color(e)}},{key:"setLineColor",value:function(e){this._line._renderNode.material.color=new fm.Color(e)}},{key:"setLineWidth",value:function(e){this._renderNode.children[0].material.linewidth=e}},{key:"setAlpha",value:function(e){this._renderNode.material.opacity=e}},{key:"center",get:function(){for(var e=this.parent.parent,t=(e.parent.mapcenter,[]),n=0;n<this._linePoints.length;n+=3)t.push([this._linePoints[n],this._linePoints[n+1]]);return e=null,e=(0,v.default)([t],.01),"circle"!=this._points.type&&"rectangle"!=this._points.type?{x:this._x+e[0],y:this._y-e[1],z:this._height}:{x:this._x+e[0],y:this._y+e[1],z:this._height}}},{key:"getPoints",value:function(){if("circle"===this._points.type){for(var e=null,t=[],e=this.createCircleGeometry(this._points.radius,this._points.segments),n=1;n<e.attributes.position.count;n++)t.push({x:e.attributes.position.array[3*n]+this._x,y:e.attributes.position.array[3*n+1]+this._y});return e.dispose(),t}if("rectangle"!==this._points.type)return this._points;var r=null,i=[],r=this.createReactGeometry(this._points.width,this._points.height);return i.push({x:r.attributes.position.array[0]+this._x,y:r.attributes.position.array[1]+this._y}),i.push({x:r.attributes.position.array[3]+this._x,y:r.attributes.position.array[4]+this._y}),i.push({x:r.attributes.position.array[9]+this._x,y:r.attributes.position.array[10]+this._y}),i.push({x:r.attributes.position.array[6]+this._x,y:r.attributes.position.array[7]+this._y}),r.dispose(),i}}]),r}(n.default),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var n=i(n(552)),g=n.default;function a(e,t){t=t||1;for(var n=Number.MAX_VALUE,r=Number.MAX_VALUE,i=Number.MIN_VALUE,a=Number.MIN_VALUE,o=0;o<e[0].length;o++){var s=e[0][o];s[0]<n&&(n=s[0]),s[1]<r&&(r=s[1]),s[0]>i&&(i=s[0]),s[1]>a&&(a=s[1])}var l=i-n,u=a-r,h=Math.min(l,u),c=h/2;if(0===h)return[n,r];for(var d=new g(void 0,y),f=n;f<i;f+=h)for(var p=r;p<a;p+=h)d.push(new _(f+c,p+c,c,e));var m=x(e),u=new _(n+l/2,r+u/2,0,e);for(u.d>m.d&&(m=u),d.length;0<d.length;){var v=d.pop();v.d>m.d&&(m=v),v.max-m.d<=t||(c=v.h/2,d.push(new _(v.x-c,v.y-c,c,e)),d.push(new _(v.x+c,v.y-c,c,e)),d.push(new _(v.x-c,v.y+c,c,e)),d.push(new _(v.x+c,v.y+c,c,e)))}return[m.x,m.y]}function y(e,t){return t.max-e.max}function _(e,t,n,r){this.x=e,this.y=t,this.h=n,this.d=o(e,t,r),this.max=this.d+this.h*Math.SQRT2}function o(e,t,n){for(var r=!1,i=Infinity,a=0;a<n.length;a++)for(var o=n[a],s=0,l=o.length,u=l-1;s<l;u=s++){var h=o[s],c=o[u];h[1]>t!=c[1]>t&&e<(c[0]-h[0])*(t-h[1])/(c[1]-h[1])+h[0]&&(r=!r),i=Math.min(i,d(e,t,h,c))}return(r?1:-1)*Math.sqrt(i)}function x(e){for(var t=0,n=0,r=0,i=e[0],a=0,o=i.length,s=o-1;a<o;s=a++){var l=i[a],u=i[s],h=l[0]*u[1]-u[0]*l[1];n+=(l[0]+u[0])*h,r+=(l[1]+u[1])*h,t+=3*h}return 0===t?new _(i[0][0],i[0][1],0,e):new _(n/t,r/t,0,e)}function d(e,t,n,r){var i=n[0],a=n[1],o=r[0]-i,s=r[1]-a,l=i,n=a;return 0===o&&0===s||(a=((e-i)*o+(t-a)*s)/(o*o+s*s),1<a?(l=r[0],n=r[1]):0<a&&(l+=o*a,n+=s*a)),o=e-l,s=t-n,o*o+s*s}n=a,t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function r(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:s;if((0,a.default)(this,r),this.data=e,this.length=this.data.length,this.compare=t,0<this.length)for(var n=(this.length>>1)-1;0<=n;n--)this._down(n)}return(0,o.default)(r,[{key:"push",value:function(e){this.data.push(e),this.length++,this._up(this.length-1)}},{key:"pop",value:function(){if(0!==this.length){var e=this.data[0],t=this.data.pop();return this.length--,0<this.length&&(this.data[0]=t,this._down(0)),e}}},{key:"peek",value:function(){return this.data[0]}},{key:"_up",value:function(e){for(var t=this.data,n=this.compare,r=t[e];0<e;){var i=e-1>>1,a=t[i];if(0<=n(r,a))break;t[e]=a,e=i}t[e]=r}},{key:"_down",value:function(e){for(var t=this.data,n=this.compare,r=this.length>>1,i=t[e];e<r;){var a=1+(e<<1),o=t[a],s=a+1;if(s<this.length&&n(t[s],o)<0&&(a=s,o=t[s]),0<=n(o,i))break;t[e]=o,e=a}t[e]=i}}]),r}();function s(e,t){return e<t?-1:t<e?1:0}t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function r(){(0,a.default)(this,r)}return(0,o.default)(r,null,[{key:"createShape",value:function(e,t){var n=new fm.Shape;n.moveTo(e[0].x,e[0].y);for(var r=1;r<e.length;r++)n.lineTo(e[r].x,e[r].y);return t&&n.lineTo(e[0].x,e[0].y),n}},{key:"createReactShape",value:function(e,t){var n=new fm.Shape,t=t/2,e=e/2;return n.moveTo(-e,-t),n.lineTo(-e,t),n.lineTo(e,t),n.lineTo(e,-t),n}},{key:"createCircleShape",value:function(e,t){var n=new fm.Shape;return n.absarc(0,0,e,0,2*Math.PI,!1),n}},{key:"createExtrudeBufferGeometry",value:function(e,t){return t={steps:1,depth:t.depth,bevelEnabled:!1,bevelThickness:0,bevelSize:0,bevelOffset:0,bevelSegments:1},new fm.ExtrudeBufferGeometry(e,t)}},{key:"createPointsExtrudeBufferGeometry",value:function(e,t){return e=r.createShape(e,!0),this.createExtrudeBufferGeometry(e,t)}},{key:"createReactExtrudeBufferGeometry",value:function(e,t,n){return t=r.createReactShape(e,t),this.createExtrudeBufferGeometry(t,n)}},{key:"createCircleExtrudeBufferGeometry",value:function(e,t,n){return t=r.createCircleShape(e,t),this.createExtrudeBufferGeometry(t,n)}},{key:"createShapeBufferGeometry",value:function(e){return e=r.createShape(e),new fm.ShapeBufferGeometry(e)}},{key:"createShapeBufferGeometryByCenter",value:function(e,t){var n=new fm.Shape;n.moveTo(e[0].x-t.x,-e[0].y+t.y);for(var r=1;r<e.length;r++)n.lineTo(e[r].x-t.x,-e[r].y+t.y);return n.lineTo(e[0].x-t.x,-e[0].y+t.y),new fm.ShapeBufferGeometry(n)}},{key:"createCenterBufferGeometry",value:function(e,t){for(var n=[],r=0;r<e.length-1;r++)for(var i=2;i<10;i+=2)n.push({x:e[r].x+(e[r+1].x-e[r].x)*i*.1,y:e[r].y+(e[r+1].y-e[r].y)*i*.1,z:e[r].z+(e[r+1].z-e[r].z)*i*.1});n.push({x:n[0].x,y:n[0].y,z:n[0].z});for(var a=new fm.BufferGeometry,o=[],s=[],l=0;l<n.length-1;l++)o.push(n[l].x),o.push(n[l].y),o.push(n[l].z),o.push(n[l+1].x),o.push(n[l+1].y),o.push(n[l+1].z),o.push(t.x),o.push(t.y),o.push(t.z),s.push(0,0,1);var u=new Float32Array(o);return a.setAttribute("position",new fm.Float32BufferAttribute(u,3)),a.setAttribute("gradientAlpha",new fm.Float32BufferAttribute(s,1)),a}},{key:"scalePoints",value:function(e,t,n){for(var r=[],i=0;i<e.length;i++){var a=e[i].x,o=e[i].y,s=e[i].z;r.push({x:a+(a-t.x)*(n-1),y:o+(o-t.y)*(n-1),z:s})}return r}},{key:"scaleValuePoints",value:function(e,t,n){for(var r=[],i=0;i<e.length;i++){var a={x:e[i].x,y:e[i].y,z:e[i].z};a.x-t.x<0?a.x-=n:a.x+=n,a.y-t.y<0?a.y-=n:a.y+=n,r.push(a)}return r}}]),r}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(29)),l=i(n(27)),u=i(n(116)),h=i(n(10)),o=i(n(35)),s=n(150);function c(e,t){this.map_=e,this.texture_=null,this.config(t)}c.create=function(e,t){return new c(e,t)},c.prototype={getDeviceDPI:function(){var e=[],t=wx.getSystemInfoSync();return e[0]=t.screenWidth/t.pixelRatio,e[1]=t.screenHeight/t.pixelRatio,e},getDeviceWH:function(e){e=e||{};var t=this.map_.maxX-this.map_.minX,n=this.map_.maxY-this.map_.minY,t={w:Math.round(t),h:Math.round(n)},n=this.getDeviceDPI();return t.w=(0,a.default)(t.w*n[0]/25.4),t.h=(0,a.default)(t.h*n[1]/25.4),n=1,e=e.maxSize||2048,(t.w>=e||t.h>=e)&&(t.w>=t.h?(n=t.h/t.w,t.w=e,t.h=(0,a.default)(e*n)):(n=t.w/t.h,t.h=e,t.w=(0,a.default)(e*n))),t},getPixXY:function(e,t){return e=(e-this.map_.minX)/(this.map_.maxX-this.map_.minX),t=(this.map_.maxY-t)/(this.map_.maxY-this.map_.minY),t={x:e,y:t},t.x=t.x*this.options.width,t.y=t.y*this.options.height,t},config:function(e){var t=this,n=t.getDeviceWH(e),r=n.w,i=n.h;t.options={width:r,height:i,opacity:e.opacity?255*e.opacity:25500,radius:e.radius||30,bshadow:e.radius?e.radius/20:1.5,maxSize:e.mapSize||2048,boundVal:15e3,shadowBlur:Math.ceil(.3*e.radius),points:{max:e.max||100,data:[]},gradient:e.gradient||{.45:"rgb(0,0,255)",.55:"rgb(0,255,255)",.65:"rgb(0,255,0)",.95:"yellow",1:"rgb(255,0,0)"},isHeatPlan:e.isHeatPlan,heatHeight:e.heatHeight,tempCanvas:e.tempCanvas},n=e.canvas,e=n.getContext("2d"),n.width=r,n.height=i,n.style.width=r+"rpx",n.style.height=i+"rpx",t.options.ctx=e,t.options.canvas=n},renderShadow:function(e,t,n,r){var i=this,a=i.options.ctx,o=(i.options.radius,i.options.boundVal),s=(0,l.default)(n/i.options.points.max,10);a.shadowColor="rgba(0, 0, 0, "+s+")",a.shadowOffsetX=o,a.shadowOffsetY=o,a.shadowBlur=i.options.shadowBlur,a.beginPath(),a.arc(e-o,t-o,i.options.radius,0,2*Math.PI,!0),a.closePath(),(0,u.default)(a).call(a),r||i.cachePoint(e,t,n)},colorize:function(){for(var e=this,t=e.options.width,n=e.options.height,r=e.options.ctx,n=r.getImageData(0,0,t,n),i=n.data,a=i.length,o=e.getPalette(),s=e.options.opacity,l=3;l<a;l+=4){var u=i[l],h=4*u;h&&(h=Math.floor(h),u=s<u?s:u,u<.8&&(u=.8),i[l-3]=o[h],i[l-2]=o[h+1],i[l-1]=o[h+2],i[l]=u)}r.putImageData(n,0,0)},renderToMap:function(e){var t=this,t=t.options.canvas,t=s.FMTextureUtil.createTexture_canvas(this.map_.canvas,t);this.setTexture(e,t)},disposeHeatMap:function(e){var t;e&&(t=this.map_.getFMGroup(e).getExtentMeshs()[0],t._hasHeatMap&&(t._hasHeatMap=!1,(0,h.default)(t.material)&&(0,h.default)(t.material).dispose(),this.options.isHeatPlan?(t.material.map=null,t.material.mapMixColor=!1,t.material.transparent=!0,t.material.needsUpdate=!0,this.map_.getFMGroup(e)._layers.model[0]._scene.getObjectByName("directionalLight").remove(this.map_.getFMGroup(e)._layers.model[0]._scene.getObjectByName("heatMap"))):(t=this.map_.getFMGroup(e).getModelMeshs(),this.map_.getFMGroup(e)._layers.model[0]._scene.traverse(function(e){"heatmap"==e.name&&e.parent.remove(e)}),(0,o.default)(t).call(t,function(e){if("MultiMaterial"==e.material.type)for(var t=e.material.materials.length,n=0,r=3;n<t;){var i=e.material.materials[n];i.map=null,i.mapMixColor=!1,i.transparent=!0,i.needsUpdate=!0,r=0==n?3:2,n+=r}else i=e.material,i.map=null,i.mapMixColor=!1,i.transparent=!0,i.needsUpdate=!0}))))},getPalette:function(){var e=this.options.tempCanvas,t=e.getContext("2d");e.width=1,e.height=256;var n,e=this,r=e.options.gradient,i=t.createLinearGradient(0,0,1,256);for(n in r)i.addColorStop(n,r[n]);return t.fillStyle=i,t.fillRect(0,0,1,256),t.getImageData(0,0,1,256).data}},c.prototype.cachePoint=function(e,t,n){var r=this,i=r.options.points,r=i.data;i.max,r.push([e,t,n])},c.prototype.clearPoints=function(){this.options.points.data=[],this.clear()},c.prototype.addPoint=function(e,t,n){if(e&&t&&n&&(t=this.getPixXY(e,t),t)){var r=this;r.clear();for(var i=r.options.points.data,a=i.length,o=0;o<a;o++)r.renderShadow(i[o][0],i[o][1],i[o][2],!0);r.renderShadow(t.x,t.y,n,!1),r.colorize()}},c.prototype.getTexture=function(e){return this.clearPoints(),this.addPoints(e),e=this.options.canvas.cloneNode(),e.getContext("2d").drawImage(this.options.canvas,0,0),new fm.CanvasTexture(e)},c.prototype.setTexture=function(e,s){var t=this.map_.getFMGroup(e).getExtentMeshs()[0];t._hasHeatMap&&this.disposeHeatMap(e);var n,r=t.material.color,i=t.material.opacity;this.options.isHeatPlan?(t._hasHeatMap=!0,t.material.map=s,(0,h.default)(t.material).needsUpdate=!0,t.material.needsUpdate=!0,n=t.clone(),n.name="heatMap",n.material.transparent=!0,n.material.opacity=1,n.material.color=new fm.Color(16777215),n.material.depthTest=!1,n.renderOrder=12,n.material.needsUpdate=!0,n.scale.z=.001,this.options.heatHeight?n.position.y+=this.options.heatHeight:n.position.y+=4,t.material=new fm.MeshLambertMaterial({color:r,opacity:i,transparent:!0}),this.map_.getFMGroup(e)._layers.model[0]._scene.getObjectByName("directionalLight").add(n)):(t._hasHeatMap=!0,t.material.mapMixColor=!0,t.material.map=s,(0,h.default)(t.material).needsUpdate=!0,t.material.needsUpdate=!0,t=this.map_.getFMGroup(e).getModelMeshs(),this.map_.getFMGroup(e)._layers.model[0]._scene.traverse(function(e){if(e instanceof fm.Mesh)for(var t=0;t<e.children.length;t++)if(null!==(0,h.default)(e.children[t].material)&&void 0!==(0,h.default)(e.children[t].material)){var n=e.geometry,r=e.material;r.opacity=.8,r.needsUpdate=!0;var i=new fm.MeshLambertMaterial({map:s,transparent:!0,blending:fm.CustomBlending,blendEquation:fm.AddEquation,blendSrc:fm.SrcAlphaFactor,blendDst:fm.OneMinusSrcAlphaFactor});i.opacity=.9;for(var a=[r,i],o=new fm.Group,t=0;t<a.length;t++)o.add(new fm.Mesh(n,a[t]));i=new fm.Mesh(n,i),i.name="heatmap",i.renderOrder=11,i.material.depthTest=!1,i.material.depthWrite=!1,e.add(i)}}),(0,o.default)(t).call(t,function(e){if("MultiMaterial"==e.material.type)for(var t=e.material.materials.length,n=0,r=3;n<t;)e.material.materials[n].map=s,e.material.mapMixColor=!0,e.material.materials[n]._color=e.material.materials[n].color.clone(),e.material.materials[n].color=new fm.Color(16777215),(0,h.default)(e.material.materials[n]).needsUpdate=!0,e.material.materials[n].needsUpdate=!0,r=0==n?3:2,n+=r;else e.material.mapMixColor=!0,e.material.map=s,e.material._color=e.material.color.clone(),1===e.material.opacity&&(e.material.transparent=!1),(0,h.default)(e.material).needsUpdate=!0,e.material.needsUpdate=!0}))},c.prototype.setModelMeshTexture=function(e){if(e&&texture_)if("MultiMaterial"==e.material.type)for(var t=e.material.materials.length,n=0,r=3;n<t;)e.material.materials[n].map=texture_,e.material.materials[n]._color=e.material.materials[n].color.clone(),e.material.materials[n].color=new fm.Color(16777215),e.material.materials[n].transparent=!1,(0,h.default)(e.material.materials[n]).needsUpdate=!0,e.material.materials[n].needsUpdate=!0,r=0==n?3:2,n+=r;else e.material.map=texture_,e.material._color=e.material.color.clone(),e.material.color=new fm.Color(16777215),e.material.transparent=!1,(0,h.default)(e.material).needsUpdate=!0,e.material.needsUpdate=!0},c.prototype.clear=function(){var e=this.options.ctx;e.clearRect(0,0,this.options.width,this.options.height)},c.prototype.addPoints=function(e){var t=this;t.clear();for(var n=t.options.points.data,r=n.length,i=0;i<r;i++)t.renderShadow(n[i][0],n[i][1],n[i][2],!0);for(var a=e.length,o=0;o<a;o++){var s=this.getPixXY(e[o].x,e[o].y);if(!s)return!0;t.renderShadow(s.x,s.y,e[o].value,!1)}t.colorize()},c.prototype.randomPoints=function(e){var t=this,n=t.options.width,r=t.options.height,i=t.options.points.max;t.clear();for(var a=0;a<e;a++){var o=Math.floor(Math.random()*n+1),s=Math.floor(Math.random()*r+1),l=Math.floor(Math.random()*i+1);t.renderShadow(o,s,l)}t.colorize()},n=c,t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),s=(i(n(251)),i(n(556))),l=i(n(557)),u=i(n(558)),h=i(n(561)),c=i(n(562)),d=i(n(28)),f=i(n(47)),n=function(){function n(e,t){(0,a.default)(this,n),this._data=t||e.getCurrDecodeData(),this._map=e,this.Graphics=d.default,this.DataManager=new f.default,this.singleAttrQuery=new s.default(this._data,this._map),this.bufferQuery=new u.default(this._data),this.multiAttrQuery=new l.default(this._data,this._map),this.circleQuery=new h.default(this._data),this.polygonQuery=new c.default(this._data)}return(0,o.default)(n,[{key:"query",value:function(e,t){var n=null,n=e.queryTypes?this.getQueryResult(e,e.queryTypes):e.circle?this.getQueryResult(e,["SINGLE","CIRCLE"]):this.getQueryResult(e,["SINGLE"]);return t(n),n}},{key:"getQueryResult",value:function(e,t){for(var n=[],r=null,i=0;i<t.length;i++)switch(t[i]){case"SINGLE":n.push(this.singleAttrQuery.query(e));break;case"MULTI":n.push(this.multiAttrQuery.query(e));break;case"BUFFER":n.push(this.bufferQuery.query(e,this._map));break;case"CIRCLE":r=this.circleQuery.query(n,e,this._map),n=[],n.push(r);break;case"POLYGON":r=this.polygonQuery.query(n,e,this._map),n=[],n.push(r);break;default:n.push(this.singleAttrQuery.query(e))}return n[0]}}]),n}(),n=n;t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(12),a=n(19),s=n(20),l=n(21),u=n(14),h=n(22),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d=c(n(9)),f=c(n(27)),p=c(n(34)),m=c(n(2)),v=c(n(3)),g=c(n(5)),y=c(n(6)),_=c(n(7)),o=c(n(252)),x=c(n(36));function w(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=b(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function b(e,t){if(e){if("string"==typeof e)return M(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T(n){var r=E();return function(){var e,t=(0,_.default)(n),t=r?(e=(0,_.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,y.default)(this,t)}}function E(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}o=function(e){(0,g.default)(r,e);var n=T(r);function r(e,t){return(0,m.default)(this,r),e=n.call(this,e),e._map=t,e}return(0,v.default)(r,[{key:"query",value:function(e){var t=[],n=e.groupID;n&&"number"==typeof n&&(n=[n]);var r,i=w(this._data.floors);try{for(i.s();!(r=i.n()).done;){var a=r.value;(!n||-1<(0,d.default)(n).call(n,a.gid))&&t.push.apply(t,(0,p.default)(this.queryGroup(a,e)))}}catch(e){i.e(e)}finally{i.f()}return t}},{key:"queryGroup",value:function(l,u){var h=this,c=this._data.scene.file_ver,e=u.nodeType||x.default.ALL;"all"==e&&(e=x.default.ALL);var d=[];return e!==x.default.EXTERNAL_MODEL&&e!==x.default.ALL||this.everyExternalModel(l,function(e,t,n,r){var i=null,a=.1,o=.1,o=1===c?(i=r.geo.substring(6,r.geo.length-1).split(" "),a=(0,f.default)(i[0]),(0,f.default)(i[1])):(i=r.pts,a=i[0],i[1]),s=t.height,i={};l.gid,h.check(e,t,u,n,r.geo,l.gid,i)&&d.push({ID:e.eid,name:e.name,ename:e.ename,groupID:l.gid,FID:e.fid,typeID:e.type,nodeType:x.default.MODEL,gdata:t,target:i.target||h._map.getFMGroup(l.gid).getNodeByLayerId("externalModel",e.eid),mapCoord:{x:a,y:o,z:s}})}),e!==x.default.MODEL&&e!==x.default.ALL||this.everyModel(l,function(e,t,n,r){var i=null,a=0,o=0,o=1===c?(i=r.geo.substring(6,r.geo.length-1).split(" "),a=(0,f.default)(i[0]),(0,f.default)(i[1])):(i=r.pts,a=i[0],i[1]),s=t.height,i={};h.check(e,t,u,n,r.geo,l.gid,i)&&d.push({ID:e.eid,name:e.name,ename:e.ename,groupID:l.gid,FID:e.fid,typeID:e.type,nodeType:x.default.MODEL,gdata:t,target:i.target||h._map.getFMGroup(l.gid).getNodeByLayerId("model",e.eid),mapCoord:{x:a,y:o,z:s}})}),e!==x.default.FACILITY&&e!==x.default.ALL||this.everyFacility(l,function(e,t,n){var r=null,i=0,a=0,a=1===c?(r=t.geo.substring(6,t.geo.length-1).split(" "),i=(0,f.default)(r[0]),(0,f.default)(r[1])):(r=t.pts,i=r[0],r[1]),r=t.height;h.check(e,t,u,n,null,l.gid)&&d.push({ID:e.eid,name:e.name,ename:e.ename,groupID:l.gid,FID:e.fid,typeID:e.type,nodeType:x.default.FACILITY,gdata:t,target:h._map.getFMGroup(l.gid).getNodeByLayerId("facility",e.eid),mapCoord:{x:i,y:a,z:r}})}),e!==x.default.LABEL&&e!==x.default.ALL||this.everyLabel(l,function(e,t,n){var r=null,i=0,a=0,a=1===c?(r=t.geo.substring(6,t.geo.length-1).split(" "),i=(0,f.default)(r[0]),(0,f.default)(r[1])):(r=t.pts,i=r[0],r[1]),r=t.height;h.check(e,t,u,n,null,l.gid)&&d.push({ID:e.eid,name:e.name,ename:e.ename,groupID:l.gid,FID:e.fid,typeID:e.type,nodeType:x.default.LABEL,gdata:t,target:h._map.getFMGroup(l.gid).getNodeByLayerId("label",e.eid),mapCoord:{x:i,y:a,z:r}})}),d}}]),r}(o.default),t.default=o},function(e,t,n){"use strict";var i=n(4),r=n(12),a=n(19),s=n(20),l=n(21),u=n(14),h=n(22),o=n(0),c=n(1);o(t,"__esModule",{value:!0}),t.default=void 0;var d=c(n(9)),f=c(n(27)),p=c(n(31)),m=c(n(34)),v=c(n(2)),g=c(n(3)),y=c(n(5)),_=c(n(6)),x=c(n(7)),n=c(n(252));function w(e,t){var n;if(void 0===s||null==l(e)){if(u(e)||(n=b(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,t=function(){};return{s:t,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=h(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function b(e,t){if(e){if("string"==typeof e)return M(e,t);var n=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?a(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T(n){var r=E();return function(){var e,t=(0,x.default)(n),t=r?(e=(0,x.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,_.default)(this,t)}}function E(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,y.default)(r,e);var n=T(r);function r(e,t){return(0,v.default)(this,r),e=n.call(this,e),e._map=t,e}return(0,g.default)(r,[{key:"query",value:function(e,t){if(e.pathPoints){var n=this.distanceSorting(e.groupID,e.pathPoints,e.startPoint,e.bufferRadius);return n}var r=[],i=e.groupID;i&&"number"==typeof i&&(i=[i]),this._data;var a,o=w(this._data.floors);try{for(o.s();!(a=o.n()).done;){var s=a.value;(!i||-1<(0,d.default)(i).call(i,s.gid))&&r.push.apply(r,(0,m.default)(this.queryGroup(s,e)))}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"queryGroup",value:function(l,u){var h=this,c=this._data.scene.file_ver,e=u.nodeType||fengmap.FMNodeType.ALL;"all"==e&&(e=fengmap.FMNodeType.ALL);var d=[];return e!==fengmap.FMNodeType.EXTERNAL_MODEL&&e!==fengmap.FMNodeType.ALL||this.everyExternalModel(l,function(e,t,n,r){var i=null,a=.1,o=.1,o=1===c?(i=r.geo.substring(6,r.geo.length-1).split(" "),a=(0,f.default)(i[0]),(0,f.default)(i[1])):(i=r.pts,a=i[0],i[1]),s=t.height,i={};h.check(e,t,u,n,r.geo,l.gid,i)&&d.push({ID:e.eid,name:e.name,ename:e.ename,groupID:l.gid,FID:e.fid,typeID:e.type,nodeType:fengmap.FMNodeType.MODEL,distance:"number"==typeof i.distance?i.distance:null,target:i.target||h._map.getFMGroup(l.gid).getNodeByLayerId("externalModel",e.eid),mapCoord:{x:a,y:o,z:s}})}),e!==fengmap.FMNodeType.MODEL&&e!==fengmap.FMNodeType.ALL||this.everyModel(l,function(e,t,n,r){var i=null,a=0,o=0,o=1===c?(i=r.geo.substring(6,r.geo.length-1).split(" "),a=(0,f.default)(i[0]),(0,f.default)(i[1])):(i=r.pts,a=i[0],i[1]),s=t.height,i={};h.check(e,t,u,n,r.geo,l.gid,i)&&d.push({ID:e.eid,name:e.name,ename:e.ename,groupID:l.gid,FID:e.fid,typeID:e.type,nodeType:fengmap.FMNodeType.MODEL,distance:"number"==typeof i.distance?i.distance:null,target:i.target||h._map.getFMGroup(l.gid).getNodeByLayerId("model",e.eid),mapCoord:{x:a,y:o,z:s}})}),e!==fengmap.FMNodeType.FACILITY&&e!==fengmap.FMNodeType.ALL||this.everyFacility(l,function(e,t,n){var r=null,i=0,a=0,a=1===c?(r=t.geo.substring(6,t.geo.length-1).split(" "),i=(0,f.default)(r[0]),(0,f.default)(r[1])):(r=t.pts,i=r[0],r[1]),o=t.height,r={};h.check(e,t,u,n,null,l.gid,r)&&d.push({ID:e.eid,name:e.name,ename:e.ename,groupID:l.gid,FID:e.fid,typeID:e.type,nodeType:fengmap.FMNodeType.FACILITY,distance:"number"==typeof r.distance?r.distance:null,target:h._map.getFMGroup(l.gid).getNodeByLayerId("facility",e.eid),mapCoord:{x:i,y:a,z:o}})}),e!==fengmap.FMNodeType.LABEL&&e!==fengmap.FMNodeType.ALL||this.everyLabel(l,function(e,t,n){var r=null,i=0,a=0,a=1===c?(r=t.geo.substring(6,t.geo.length-1).split(" "),i=(0,f.default)(r[0]),(0,f.default)(r[1])):(r=t.pts,i=r[0],r[1]),o=t.height,r={};h.check(e,t,u,n,null,l.gid,r)&&d.push({ID:e.eid,name:e.name,ename:e.ename,groupID:l.gid,FID:e.fid,typeID:e.type,nodeType:fengmap.FMNodeType.LABEL,distance:"number"==typeof r.distance?r.distance:null,target:h._map.getFMGroup(l.gid).getNodeByLayerId("label",e.eid),mapCoord:{x:i,y:a,z:o}})}),(u.circle||u.polygon)&&(0,p.default)(d).call(d,function(e,t){return"number"==typeof e.distance&&"number"==typeof t.distance?e.distance-t.distance:0}),d}}]),r}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(15)),T=a(n(32)),s=a(n(2)),l=a(n(3)),u=a(n(5)),h=a(n(6)),c=a(n(7)),a=a(n(559)),E=n(560);function d(n){var r=f();return function(){var e,t=(0,c.default)(n),t=r?(e=(0,c.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,h.default)(this,t)}}function f(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}a=function(e){(0,u.default)(n,e);var t=d(n);function n(e){return(0,s.default)(this,n),e=t.call(this,e),e._map=null,e}return(0,l.default)(n,[{key:"query",value:function(e,t){return this._map=t,e=this.distanceSorting(e.groupID,e.pathPoints,e.startPoint,e.bufferRadius),e}},{key:"_calcBuffer",value:function(e,t){for(var n=0;n<e.length;n++){var r=[];r.push(e[n].x),r.push(e[n].y),(0,o.default)(e).call(e,n,1,r)}var i=(0,E.straightenPoints)(e),t=(0,E.polylineSegBuffers)(i,t);return t}},{key:"_BMIntersect",value:function(e,t,n){for(var r=0;r<n.length;r++){var i=[];i.push(n[r].x+e.x),i.push(n[r].y+e.y),(0,o.default)(n).call(n,r,1,i)}return t=(0,E.isSegBuffersIntersecots)(t,n),t}},{key:"_BFIntersect",value:function(e,t,n){return e=[n.x+e.x,n.y+e.y],e=[e],e=(0,E.isSegBuffersIntersecots)(t,e),e}},{key:"distanceSorting",value:function(e,t,n,r){var i,a,o=this._map.getFMGroup(e).mapCoord,s=[],l=[],u=[],h=[],c=[],d=[],f=this._map.nodeManager._scenes[this._map._currentSceneId].groups[""+e]._layers.model[0]._models,p=this._map.nodeManager._scenes[this._map._currentSceneId].groups[""+e]._layers.facility[0]._facility,m=this._calcBuffer(t,r);for(i in f){var v=(0,T.default)(g=f[i]._renderNode.children[0].geometry.vertices).call(g),g=this._BMIntersect(o,m,v);g&&(u.push(f[i]),v={model:v,fid:f[i].FID,target:u[u.length-1]},s.push(v))}for(a in p){var y=p[a]._renderNode.position.clone(),_=this._BFIntersect(o,m,y);_&&(h.push(f[a]),y={facility:y,fid:p[a].FID,target:h[h.length-1]},l.push(y))}for(var x=0;x<s.length;x++){var w=s[x].model,w=(0,E.distPointToPolygon)([n.x,n.y],w),w={distance:w,fid:s[x].fid,target:u[x]};c.push(w)}for(var b=0;b<l.length;b++){var M=l[b].facility,M=Math.sqrt(Math.pow(n.x-M.x,2)+Math.pow(n.y-M.y,2)),M={distance:M,fid:l[b].fid,target:h[b]};d.push(M)}return this._quickSort(c,0,c.length-1),this._quickSort(d,0,d.length-1),s=null,l=null,u=null,h=null,{model:c,facility:d}}},{key:"_quickSort",value:function(e,t,n){for(var r=[[t,n]];0<r.length;){var i=r.pop();if(!(i[0]>=i[1])){for(var a=i[0],o=i[1],s=i[0];a<o;){for(;e[o].distance>=e[s].distance&&s<o;)o--;if(o<=a)break;for(;e[a].distance<=e[s].distance&&a<o;)a++;var l=e[s];e[s]=e[o],e[o]=e[a],e[a]=l,s=a}r.push([i[0],s-1]),r.push([s+1,i[1]])}}}}]),n}(a.default),t.default=a},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(5)),l=a(n(6)),u=a(n(7)),n=a(n(253));function h(n){var r=c();return function(){var e,t=(0,u.default)(n),t=r?(e=(0,u.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,l.default)(this,t)}}function c(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,s.default)(n,e);var t=h(n);function n(e){return(0,o.default)(this,n),t.call(this,e)}return n}(n.default),t.default=n},function(e,t,n){"use strict";var r=n(1),_=r(n(56)),r=function(e){Array.prototype.merge=function(e){for(var t=0;t<e.length;t++)this.push(e[t]);return this},Array.prototype.print=function(){for(var e=0;e<this.length;e++)this[e][0],this[e][1]};var o=999999999999,t=3.1415926;function a(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=e[(n+1)%e.length];t.push({x1:r[0],y1:r[1],x2:i[0],y2:i[1]})}return t}function i(e,t){var n=!1,n=s(e,t);if(0==n)return n;var r=a(e),i=a(t);return n=u(r,i),!!n||!!h(e[0],t)||!!h(t[0],e)}function s(e,t){for(var n=0;n<e.length;n++)var r=e[n],i=i>r.x?i:r.x,a=a<r.x?a:r.x,o=o>r.y?o:r.y,s=s<r.y?s:r.y;for(n=0;n<t.length;n++)var l=t[n],u=u>l.x?u:l.x,h=h<l.x?h:l.x,c=c>l.y?c:l.y,d=d<l.y?d:l.y;return!(i<=h||u<=a||c<=s||o<=d)}function l(e,t,n,r,i,a,o,s){if(!(Math.min(e,n)<=Math.max(i,o)&&Math.min(a,s)<=Math.max(t,r)&&Math.min(i,o)<=Math.max(e,n)&&Math.min(t,r)<=Math.max(a,s)))return!1;var l=(i-e)*(r-t)-(n-e)*(a-t),u=(o-e)*(r-t)-(n-e)*(s-t),t=(e-i)*(s-a)-(o-i)*(t-a),a=(n-i)*(s-a)-(o-i)*(r-a);return l*u<=1e-8&&t*a<=1e-8}function u(e,t){for(var n=0;n<e.length;n++)for(var r=e[n],i=0;i<t.length;i++){var a=t[i];if(l(r.x1,r.y1,r.x2,r.y2,a.x1,a.y1,a.x2,a.y2))return!0}return!1}function h(e,t){for(var n=e[0],r=e[1],i=!1,a=0,o=t.length-1;a<t.length;o=a++){var s=t[a][0],l=t[a][1],u=t[o][0],h=t[o][1],s=r<l!=r<h&&n<(u-s)*(r-l)/(h-l)+s;s&&(i=!i)}return i}var c=function(){1==arguments.length&&(this.x=arguments[0][0],this.y=arguments[0][1]),2==arguments.length&&(this.x=arguments[0],this.y=arguments[1])};c.prototype.plus=function(e){return new c(this.x+e.x,this.y+e.y)},c.prototype.minus=function(e){return new c(this.x-e.x,this.y-e.y)},c.prototype.div=function(e){return new c(this.x/e,this.y/e)},c.prototype.mul=function(e){return"object"==(0,_.default)(e)&&e instanceof c?this.x*e.x+this.y*e.y:"number"==typeof e?new c(this.x*e,this.y*e):this},c.prototype.crossMul=function(e){return this.x*e.y-e.x*this.y},c.prototype.len=function(){var e=this.x*this.x+this.y*this.y;return Math.sqrt(e)},c.prototype.toList=function(){return[this.x,this.y]};var d=function(e,t,n,r){this._row1=new c(e,t),this._row2=new c(n,r)};d.prototype.mul=function(e){if(e instanceof c)return new c(this._row1.mul(e),this._row2.mul(e))};var f=function(e){return e=e*t/180,new d(Math.cos(e),-Math.sin(e),Math.sin(e),Math.cos(e))},p=function(e,t,n){for(var t=new c(t),e=new c(e),r=t.minus(e),r=r.div(r.len()),r=r.mul(n),n=new d(0,-1,1,0),i=n.mul(r),a=(t.plus(r),e.minus(r),t.plus(i),t.minus(i),e.plus(i),e.minus(i),i.mul(-1)),o=[],s=[],l=0;l<=18;l++){var u=f(10*l),h=u.mul(i),h=e.plus(h);o.push(h.toList()),u=u.mul(a),u=t.plus(u),s.push(u.toList())}return o.merge(s)},n=function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];n.push(p([i.x1,i.y1],[i.x2,i.y2],t))}return n},r=function(e,t){return e=a(e),n(e,t)},m=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(i(r,t))return!0}return!1};function v(e,t,n,r,i,a){var o=(i-n)*(e-n)+(a-r)*(t-r);if(o<=0)return Math.sqrt((e-n)*(e-n)+(t-r)*(t-r));var s=(i-n)*(i-n)+(a-r)*(a-r);return s<=o?Math.sqrt((e-i)*(e-i)+(t-a)*(t-a)):(s=o/s,n+=(i-n)*s,s=r+(a-r)*s,Math.sqrt((e-n)*(e-n)+(s-t)*(s-t)))}var g=function(e,t){for(var n=o,r=0;r<t.length;r++){var i=t[r],a=t[(r+1)%t.length],a=v(e[0],e[1],i[0],i[1],a[0],a[1]);a<n&&(n=a)}return n},y=function(e){if(e.length<3)return e;var t=[];t.push(e[0]);for(var n=1;n<e.length-1;n++){var r=new c(t[t.length-1]),i=new c(e[n]).minus(r),r=new c(e[n+1]).minus(new c(e[n])),r=i.crossMul(r);Math.abs(r)<.001||t.push(e[n])}return t.push(e[e.length-1]),t};e.isPolygonIntersects=i,e.isPointInPolygon=h,e.polylineSegBuffers=r,e.isSegBuffersIntersecots=m,e.distPointToPolygon=g,e.straightenPoints=y};"object"===(0,_.default)(t)&&void 0!==e?r(t):(n=[t],r="function"==typeof r?r.apply(t,n):r,void 0===r||(e.exports=r))},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var _=a(n(27)),o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),n=a(n(254));function c(n){var r=d();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function d(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,l.default)(n,e);var t=c(n);function n(e){return(0,o.default)(this,n),t.call(this,e)}return(0,s.default)(n,[{key:"query",value:function(e,t,n){var r=t.circle,i=[],a=this._data.scene.file_ver;e:for(var o=0;o<e[0].length;o++){var s=e[0][o].gdata;e[0][o].nodeType;var l,u=null,h=0,c=0;c=1===a?(l=s.geo,u=l.substring(6,l.length-1).split(" "),h=(0,_.default)(u[0]),(0,_.default)(u[1])):(u=s.pts,h=u[0],u[1]);var d=r.center,f=Math.sqrt((h-d.x)*(h-d.x)+(c-d.y)*(c-d.y));if(f<r.radius)e[0][o].distance=f,i.push(e[0][o]);else if(5===e[0][o].nodeType){var p=0,m=null,c=n.getFMGroup(e[0][o].groupID).getNodeByLayerId("model",e[0][o].ID);c&&c._data&&(m=c._data.vertices),null==m&&(m=DataManager.convertGeo2Geometry(s.geo).vertices);for(var v=m.length/2,g=0;g<v-1;g++){var y=2*g,p=this.Graphics.pointDistanceToLine(d,{x:m[y],y:m[y+1]},{x:m[y+2],y:m[y+3]},{});if(p<r.radius){e[0][o].distance=f,i.push(e[0][o]);continue e}}this.Graphics.pointInPolygonVector2d(m,d,m.length)&&(e[0][o].distance=f,i.push(e[0][o]))}}return i}}]),n}(n.default),t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var c=a(n(27)),o=a(n(2)),s=a(n(3)),l=a(n(5)),u=a(n(6)),h=a(n(7)),d=a(n(563)),n=a(n(254));function f(n){var r=p();return function(){var e,t=(0,h.default)(n),t=r?(e=(0,h.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,u.default)(this,t)}}function p(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,l.default)(n,e);var t=f(n);function n(e){return(0,o.default)(this,n),t.call(this,e)}return(0,s.default)(n,[{key:"query",value:function(e,t,n){for(var r=this._data.scene.file_ver,i=2<t.polygon.length?new d.default(t.polygon,!0):null,a=[],o=0;o<e[0].length;o++){var s=e[0][o].gdata;e[0][o].nodeType;var l,u=null,h=null,u=1===r?(l=s.geo,l.substring(6,l.length-1).split(" ")):s.pts,h={x:(0,c.default)(u[0]),y:(0,c.default)(u[1])};i.contain(h)?(e[0][o].distance=i.distanceToPoint(h),a.push(e[0][o])):5===e[0][o].nodeType&&(l=null,u=n.getFMGroup(e[0][o].groupID).getNodeByLayerId("model",e[0][o].ID),u&&u._data&&(l=u._data.vertices),null==l&&(l=DataManager.convertGeo2Geometry(s.geo).vertices),i.containXYArray(l)&&(e[0][o].distance=i.distanceToPoint(h),a.push(e[0][o])))}return a}}]),n}(n.default),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),s=i(n(564)),n=function(){function l(e){(0,a.default)(this,l),this._points=e,this._bb=new s.default(e);var t=e.length;e[0].x==e[t-1].x&&e[0].y==e[t-1].y&&t--,this._count=t,this._center=fengmap.inner.Graphics.calcCenterOfGravityPoint(e,this._count)}return(0,o.default)(l,[{key:"contain",value:function(e){return!!this._bb.contain(e)&&fengmap.inner.Graphics.pointInPolygon2d(this._points,e,this._count)}},{key:"containXYArray",value:function(e){for(var t=e.length/2,n=[],r=!1,i=0;i<t;i++){var a=2*i,a={x:e[a],y:e[a+1]};if(this.contain(a)){r=!0;break}n.push(a)}if(r)return!0;var o=new l(n);if(fengmap.inner.Graphics.isRectCross(this._bb._min,this._bb._max,o._bb._min,o._bb._max))for(var s=0;s<this._count;s++)if(o.contain(this._points[s])){r=!0;break}return!!r}},{key:"distanceToPoint",value:function(e){return fengmap.inner.Graphics.distanceOfTwoPoints(this._center,e)}}]),l}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function r(e){if((0,a.default)(this,r),this._min={x:Number.MAX_VALUE,y:Number.MAX_VALUE},this._max={x:-Number.MAX_VALUE,y:-Number.MAX_VALUE},e)for(var t=e.length,n=0;n<t;n++)this.expandBy(e[n])}return(0,o.default)(r,[{key:"expandBy",value:function(e){e.x<this._min.x&&(this._min.x=e.x),e.y<this._min.y&&(this._min.y=e.y),e.x>this._max.x&&(this._max.x=e.x),e.y>this._max.y&&(this._max.y=e.y)}},{key:"contain",value:function(e){return!(e.x<this._min.x||e.x>this._max.x||e.y<this._min.y||e.y>this._max.y)}}]),r}(),n=n;t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={Left:0,Center:1,Right:2},t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={MODE_2D:"top",MODE_3D:"3d"},t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),n=function e(t,n){(0,a.default)(this,e),this.x=void 0===t?0:t,this.y=void 0===n?0:n},n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function r(e,t,n){(0,a.default)(this,r),this._locOrigion=null,this._locRange=null,this._mapOrigion=null,this._mapAxisX=null,this._mapAxisY=null,this._mapRange=null,e&&t&&n&&this.init(e,t,n)}return(0,o.default)(r,[{key:"init",value:function(e,t,n){if(4!=n.length)return!1;this._locOrigion=e,this._locRange=t,this._mapOrigion=n[0],this._mapAxisX={x:n[1].x-n[0].x,y:n[1].y-n[0].y},this._mapAxisY={x:n[3].x-n[0].x,y:n[3].y-n[0].y},this._mapRange={x:this._getVectorLen(this._mapAxisX),y:this._getVectorLen(this._mapAxisY)},this._mapAxisX.x/=this._mapRange.x,this._mapAxisX.y/=this._mapRange.x,this._mapAxisY.x/=this._mapRange.y,this._mapAxisY.y/=this._mapRange.y}},{key:"transform",value:function(e){return e={x:(e.x-this._locOrigion.x)/this._locRange.x,y:(e.y-this._locOrigion.y)/this._locRange.y},e={x:e.x*this._mapRange.x,y:e.y*this._mapRange.y},e={x:this._mapOrigion.x+this._mapAxisX.x*e.x+this._mapAxisY.x*e.y,y:this._mapOrigion.y+this._mapAxisX.y*e.x+this._mapAxisY.y*e.y},e}},{key:"_getVectorLen",value:function(e){return Math.sqrt(e.x*e.x+e.y*e.y)}}]),r}(),n=n;t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var k=a(n(10)),y=a(n(13)),s=a(n(29)),l=a(n(31)),u=a(n(15)),h=a(n(570)),c=a(n(32)),P=a(n(54)),o=a(n(35)),d=a(n(61)),f=a(n(50)),p=a(n(2)),m=a(n(3)),v=a(n(89)),g=a(n(5)),_=a(n(6)),x=a(n(7)),w=a(n(574)),b=a(n(576));n(577),n(591);var C=a(n(28)),M=a(n(118)),T=a(n(68)),E=a(n(95)),S=a(n(69)),r=a(n(152)),D=a(n(47)),A=a(n(42)),I=a(n(245)),L=a(n(156)),R=a(n(246)),N=a(n(66)),O=a(n(263)),B=n(244),F=n(159),U=n(119),z=n(609),G=n(255);function V(n){var r=H();return function(){var e,t=(0,x.default)(n),t=r?(e=(0,x.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,_.default)(this,t)}}function H(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,g.default)(r,e);var n=V(r);function r(e){var t;return(0,p.default)(this,r),t=n.call(this),(0,k.default)(e)&&e.scaleLevel&&!e.scale&&(e.scale=(0,k.default)(e).mapScaleLevels[e.scaleLevel]),(0,k.default)(e)&&e.offsetHeight&&!e.lineMarkerHeight&&(e.lineMarkerHeight=e.offsetHeight),t.map=null,t.sceneData=null,t.speed=5,t.followSpeed=.2,t.followPosition=!0,t.followAngle=!1,t.locationMarkerFollowAngle=!0,t.isMultiGroups=!1,t.inTime=1.2,t.tiltAngle=80,t.changeGroupTiltAngle=30,t.scale=282,t.changeTiltAngle=!0,t.minScale=141,t.extendScale=1.3,t.locationMarkerUrl="",t.locationMarkerSize=100,t.locationMarkerHeight=3,t.lineMarkerHeight=1,t.imageMarkerHeight=6,t.directionAssert=10,t.combineAsset=5,t.completeDistance=0,t.naviLanguage=N.default.ZH,t.naviMode=T.default.MODULE_SHORTEST,t.naviPriority=E.default.PRIORITY_DEFAULT,t.autoRoute=!0,t.autoClearNaviLine=!0,t.lineStyle={lineWidth:10,radius:.5,dash:{size:4,gap:2}},t._passingPts={},t._passPtsEpson=1,t._failedInsertedPts={},(0,y.default)((0,v.default)(t),e),t._init(),t}return(0,m.default)(r,[{key:"_init",value:function(){var e,t,n=this;(0,k.default)(this)&&(this.mapServerURL&&this.mapID?(e={key:(0,k.default)(this).MapOptions.key,appName:(0,k.default)(this).MapOptions.appName,tile:!1,mapServerURL:this.mapServerURL,mapID:this.mapID},t=new b.default(e),t.openMap(function(){var e=t.dataManager._sceneDecodeData[n.mapID];n._analyser=new O.default({}),n._analyser.initByScene(e),n.callback()})):(this._analyser=new O.default,this._analyser.init((0,k.default)(this))),this._analyser=new O.default,this._analyser.init((0,k.default)(this)),this._naviDescriptionsCalculator=new w.default({map:(0,k.default)(this),directionAssert:this.directionAssert,combineAsset:this.combineAsset,naviLanguage:this.naviLanguage,completeDistance:this.completeDistance})),this._simulateParams=null,this._startData=null,this._endData=null,this._startMarker=null,this._endMarker=null,this._startMarkerLayer=null,this._endMarkerLayer=null,this._locationMarker=null,this._naviLineMarkers=[],this._naviResults=[],this._naviDescriptions=[],this._naviDescriptionsData=[],this._naviDistance=0,this._naviGroupsDistance=null,this._naviEntracesDistance=[null,null],this._timer=new fm.Clock,this._pause=!1,this._toPos=null,this._toRot=null,this._allLen=0,this._preGid=0,this._locateLastGroupID=null,this._changeGrouping=!1,this._animateFun=null,this._isSimulating=!1,this._isEnd=!1,this._groupPointsIndex=0,this._gpsData=null,this._tiltToAnimater=null,this._scaleToAnimater=null,this._moveToAnimater=null,this._focusGroupToAnimater=null,this._passingPts={},this._failedInsertedPts={}}},{key:"naviToDoor",get:function(){return this._analyser.naviToDoor},set:function(e){this._analyser.naviToDoor=e}},{key:"locationMarker",get:function(){return this._locationMarker||(this._locationMarker=new R.default((0,k.default)(this),{id:"location",url:this.locationMarkerUrl||"",size:this.locationMarkerSize}),(0,k.default)(this).addLocationMarker(this._locationMarker)),this._locationMarker},set:function(e){e instanceof R.default&&(this._locationMarker=e,(0,k.default)(this).addLocationMarker(this._locationMarker))}},{key:"startMarker",get:function(){return this._startMarker},set:function(e){this._startMarker=e}},{key:"endMarker",get:function(){return this._endMarker},set:function(e){this._endMarker=e}},{key:"naviDescriptions",get:function(){return this._naviDescriptions}},{key:"naviDescriptionsData",get:function(){return this._naviDescriptionsData}},{key:"naviDistance",get:function(){return this._naviDistance}},{key:"naviGroupsDistance",get:function(){return this._naviGroupsDistance}},{key:"naviEntrancesDistance",get:function(){return this._naviEntracesDistance}},{key:"assignInfos",value:function(e){function t(e){var t,n=[];for(t in e){var r={gid:(0,s.default)(t),coords:e[t]};n.push(r)}(0,l.default)(n).call(n,function(e,t){return e.gid-t.gid});var i=n[n.length-1],a=n[0],o=i.coords.length;return{end:{groupID:i.gid,x:i.coords[o-1][0],y:i.coords[o-1][1]},start:{groupID:a.gid,x:a.coords[0][0],y:a.coords[0][1]}}}this._analyser.assignInfos(e),this._naviResults=this._analyser.getNaviResults(),this._addZeroResult(this._naviResults),this._getGroupsPoints();var n=this._naviDescriptionsCalculator.calculate(this._naviResults);this._naviDescriptions=n[0],this._naviDescriptionsData=n[1],this._naviDistance=n[2],this._naviGroupsDistance=n[3],e=t(e),this._startData=e.start,this._endData=e.end,this._naviEntracesDistance[1]=this._calcEntraceDistance(this._naviResults,this._endData,!0)}},{key:"on",value:function(e,t){this.addEventListener(e,t)}},{key:"off",value:function(e,t){this.removeEventListener(e,t)}},{key:"dispose",value:function(){this.stop(),this.map=null,this._analyser&&(this._analyser.dispose(),this._analyser=null),this._naviDescriptionsCalculator&&(this._naviDescriptionsCalculator.dispose(),this._naviDescriptionsCalculator=null)}},{key:"getRouteDescriptions",value:function(e,t){return e=e||this._naviResults,this._isNaviResultsValide(e)?(t=(0,y.default)({},t),(0,k.default)(t)||(t.map=this._map,t.analyser=this),t=new w.default(t),e=t.calculate(e),{naviDescriptions:e[0],naviDescriptionsData:e[1],naviDistance:e[2],naviGroupsDistance:e[3]}):{}}},{key:"setLineStyle",value:function(e){this._naviLineMarker&&this._naviLineMarker.updateStyle(e),this.lineStyle=e}},{key:"setNaviLanguage",value:function(e){return!(!e||"string"!=typeof e||(e=e.toLowerCase(),e!=N.default.ZH&&e!=N.default.EN||(this.naviLanguage!=e&&(this.naviLanguage=e,this._naviDescriptionsCalculator&&(this._naviDescriptionsCalculator.naviLanguage=e),0<this._naviResults.length&&(e=this._naviDescriptionsCalculator.calculate(this._naviResults),this._naviDescriptions=e[0],this._naviDescriptionsData=e[1])),0)))}},{key:"setStartPoint",value:function(e,t){this._startData=(0,y.default)({},this._startData,e,{x:e.x,y:e.y,groupID:e.groupID});var n=null;return e.url&&!t&&(n=this._createMarker(e,!0)),this.autoRoute&&(this._getNaviResult(),this._needDrawLines=!0),n}},{key:"setEndPoint",value:function(e,t){if(this._endData=(0,y.default)({},this._endData,e,{x:e.x,y:e.y,groupID:e.groupID}),this.naviToDoor)return this._endData=e,this.autoRoute&&(this._getNaviResult(),this._needDrawLines=!0),null;var n=null;return!e.url||e.noMarker||t||(n=this._createMarker(e,!1)),this.autoRoute&&(this._getNaviResult(),this._needDrawLines=!0),n}},{key:"route",value:function(e,t){this._getNaviResult(e,t),this._needDrawLines=!0}},{key:"nearDist",get:function(){return this._passPtsEpson},set:function(e){this._passPtsEpson=e}},{key:"passingPts",get:function(){return this._passingPts},set:function(e){this._passingPts=e}},{key:"naviConstraint",value:function(e){var t;if(this._startData&&this._endData){var n={index:-1,coord:{groupID:e.groupID},angle:null,distance:Number.MAX_VALUE,distanceToNext:Number.MAX_VALUE,remain:this._naviDistance},r=(0,k.default)(t=this._analyse()).call(t,function(e){return{x:e.x,y:e.z,z:0,groupID:e.gid,index:e._index}}),i=this._analyser._navi._graphs.get(e.groupID);if(i){for(var a=i.queryContainExtentId(e),o={},s=1;s<r.length;s++){var l,u=r[s-1],h=r[s];u.groupID===e.groupID&&h.groupID===e.groupID&&a==i.queryContainExtentId(u)&&(l=C.default.pointDistanceToLine(e,u,h,o),l<n.distance&&(n.distance=l,(0,y.default)(n.coord,o),n.angle=this._getRouteAngle(u,h),n.index=u.index,n.distanceToNext=C.default.distanceOfTwoPoints(o,h)))}if(-1==n.index)for(var c=0;c<r.length;c++){var d,f=r[c];f.groupID==e.groupID&&a==i.queryContainExtentId(f)&&(d=C.default.distanceOfTwoPoints(e,f),d<n.distance&&(n.distance=d,(0,y.default)(n.coord,f),n.index=f.index,n.distanceToNext=0,r[c+1]&&r[c+1].groupID==e.groupID&&(n.distanceToNext=C.default.distanceOfTwoPoints(e,r[c+1]))))}if(-1!=n.index){for(var p,m,v=0,g=r.length-1;g>n.index;g--)g-1>n.index&&(p=r[g],m=r[g-1],p.groupID==m.groupID&&(v+=C.default.distanceOfTwoPoints(p,m)));r[n.index+1]&&r[n.index+1].groupID==n.coord.groupID&&(v+=C.default.distanceOfTwoPoints(r[n.index+1],n.coord)),n.remain=v}return n}}}},{key:"pathConstraint",value:function(e,t){return this._analyser?this._analyser.pathConstraint(e,t):null}},{key:"locate",value:function(e,t){this._isSimulating&&this.stop(),e.groupID||e.groupId&&(e.groupID=e.groupId),e.groupID!=this._locateLastGroupID&&(this._locateLastGroupID=e.groupID),this.locateWalking(e,t)}},{key:"dropPtsByCicle",value:function(e){var t,n=[];for(t in this._passingPts)if(t==e.groupID)for(var r=0;r<this._passingPts[t].length;r++){var i=this._passingPts[t][r],a=Math.pow(i[0]-e.x,2),o=Math.pow(i[1]-e.y,2),o=Math.sqrt(a+o);o<this._passPtsEpson&&(n.push(i),(0,u.default)(i=this._passingPts[t]).call(i,r,1),r--)}return n}},{key:"locateWalking",value:function(e,t){var n=this.dropPtsByCicle(e),r=this.naviConstraint(e);if(r){if(this._naviLineMarker)if(this._naviLineMarker.passed)for(var i=0;i<this._naviLineMarker._lineNodes.length;i++)this._naviLineMarker._lineNodes[i].line.material.uniforms.miny.value=1-r.remain/this._naviDistance,this._naviLineMarker._lineNodes[i].line.material.uniforms.pcolor.value=new fm.Color(this._naviLineMarker.passedColor);else for(var a=0;a<this._naviLineMarker._lineNodes.length;a++)this._naviLineMarker._lineNodes[a].line.material.uniforms.miny.value=0;e={type:"walking",distance:r.distance,remain:r.remain,walk:this._naviDistance-r.remain,distanceToNext:r.distanceToNext,angle:r.angle,point:r.coord,groupID:e.groupID,index:r.index,isReal:!0,noArrivedPassingPts:this.passingPts},0<n.length&&(e.passing=n),this.dispatchEvent(e),this._locationMarker&&(r.coord.height=this.locationMarkerHeight,this._locationMarker.setPosition(r.coord),t?this._locationMarker.rotate(t):this._locationMarker.rotate(r.angle))}}},{key:"locateNoConstraint",value:function(e,t){this._isSimulating&&this.stop(),e.groupID||e.groupId&&(e.groupID=e.groupId),e.groupID!=this._locateLastGroupID&&(this._locateLastGroupID=e.groupID),this.locateWalkingNoConstraint(e,t)}},{key:"locateWalkingNoConstraint",value:function(e,t){var n=this.naviConstraint(e);n&&(this.dispatchEvent({type:"walking",distance:n.distance,remain:n.remain,walk:this._naviDistance-n.remain,distanceToNext:n.distanceToNext,angle:n.angle,point:n.coord,groupID:e.groupID,index:n.index,isReal:!0}),this._locationMarker&&(e.height=this.locationMarkerHeight,this._locationMarker.setPosition(e),t&&this._locationMarker.rotate(t)))}},{key:"clearLocationMarker",value:function(){this._locationMarker&&((0,k.default)(this).removeLocationMarker(this._locationMarker),this._locationMarker=null)}},{key:"clearMarkers",value:function(){this._startMarker&&(this._startMarkerLayer.removeMarker(this._startMarker),this._startMarkerLayer=null,this._startMarker=null,this._startData=null),this._endMarker&&(this._endMarkerLayer.removeMarker(this._endMarker),this._endMarkerLayer=null,this._endMarker=null,this._endData=null)}},{key:"drawNaviLine",value:function(){if(this._startData&&this._endData)return this._needDrawLines=!1,this.autoClearNaviLine&&this.clearNaviLines(),this._naviLineMarker=this._drawLines(this._naviResults),this._naviLineMarker}},{key:"clearNaviLine",value:function(){this._naviLineMarker&&((0,k.default)(this).removeLineMarker(this._naviLineMarker),this._naviLineMarker=null)}},{key:"clearNaviLines",value:function(){for(var e=0;e<this._naviLineMarkers.length;e++)(0,k.default)(this).removeLineMarker(this._naviLineMarkers[e]),this._naviLineMarkers[e]=null;this._naviLineMarkers=[]}},{key:"focusNaviLineSegment",value:function(e,t){var n,r=this,i=null,a=null,o=null;this._naviDescriptionsData&&e<this._naviDescriptionsData.length&&(n=this._naviDescriptionsData[e],a=n.startPoint,o=n.endPoint,o=o||a,e=n.startGID,n=n.endGID,a.z=(0,k.default)(this).getFMGroup(e).height,o.z=(0,k.default)(this).getFMGroup(n).height,i={x:(a.x+o.x)/2,y:(a.y+o.y)/2,z:o.z}),i&&(t=t||{},t.rawLevel=!0,this._moveTo({x:i.x,y:i.y,groupID:n},this._getValueOrDefault(t,"time","duration",this.inTime),null,function(){var e;a&&o&&(e=(0,k.default)(r).getScaleValueByVectics(a,o),!(0,h.default)(e)&&0<e&&(e*=t.extendScale||r.extendScale,r._scaleTo(e,r._getValueOrDefault(t,"time","duration",r.inTime),null,t.callback)))}))}},{key:"clearAll",value:function(){this.clearMarkers(),this.clearNaviLine(),this.clearLocationMarker()}},{key:"simulate",value:function(e){var t,n,r=this;this._startData&&this._endData&&0!=this._naviResults.length&&(t=e||{},this._simulateParams=(0,y.default)({},t),n=t.inTime||this.inTime,t.scale=t.scale||this.scale||0,this._locationMarker||this._initLocationMarker(),this._locationMarkerToStartPoint(),this._needDrawLines&&this.drawNaviLine(),this.followPosition?this._focusGroupToAnimater=this._focusGroupTo(this._startData.groupID,n,null,function(){r._moveToAnimater=r._moveTo(r._startData,n,null,function(){var e=t.scale<r.minScale?r.minScale:t.scale;r.changeTiltAngle?r._tiltToAnimater=r._tiltTo(r.tiltAngle,n,null,function(){r._scaleToAnimater=r._scaleTo(e,n,null,function(){r._works()})}):r._scaleToAnimater=r._scaleTo(e,n,null,function(){r._works()})})}):this._works())}},{key:"pause",value:function(){this._tiltToAnimater&&this._tiltToAnimater.pause(),this._scaleToAnimater&&this._scaleToAnimater.pause(),this._moveToAnimater&&this._moveToAnimater.pause(),this._focusGroupToAnimater&&this._focusGroupToAnimater.pause(),this._pause=!0}},{key:"resume",value:function(){this._tiltToAnimater&&this._tiltToAnimater.resume(),this._scaleToAnimater&&this._scaleToAnimater.resume(),this._moveToAnimater&&this._moveToAnimater.resume(),this._focusGroupToAnimater&&this._focusGroupToAnimater.resume(),this._pause=!1}},{key:"stop",value:function(){this._gpsStop=!0,this._timer.stop(),this._tiltToAnimater&&((0,k.default)(this).removeAnimater(this._tiltToAnimater),this._tiltToAnimater=null),this._scaleToAnimater&&((0,k.default)(this).removeAnimater(this._scaleToAnimater),this._scaleToAnimater=null),this._moveToAnimater&&((0,k.default)(this).removeAnimater(this._moveToAnimater),this._moveToAnimater=null),this._focusGroupToAnimater&&((0,k.default)(this).removeAnimater(this._focusGroupToAnimater),this._focusGroupToAnimater=null),this._animateFun&&(0,k.default)(this).off("update",this._animateFun),this._pause=!1,this._toPos=null,this._toRot=null,this._allLen=0,this._preGid=0,this._changeGrouping=!1,this._animateFun=null,this._isSimulating=!1,this._isEnd=!1,this._groupPointsIndex=0,this._gpsData=null}},{key:"_initLocationMarker",value:function(){this._locationMarker||(this._locationMarker=new R.default((0,k.default)(this),{id:"location",url:this.locationMarkerUrl||"",size:this.locationMarkerSize}),(0,k.default)(this).addLocationMarker(this._locationMarker))}},{key:"_getValueOrDefault",value:function(e){for(var t,n=arguments.length<=1?0:arguments.length-1,r=0;r<n;r++){var i=r+1<1||arguments.length<=r+1?void 0:arguments[r+1];if(e[i])return e[i]}return t=(arguments.length<=1?0:arguments.length-1)-1+1,t<1||arguments.length<=t?void 0:arguments[t]}},{key:"_isNaviGroup",value:function(e){if(this._startData&&this._endData)return e==this._startData.groupID||e==this._endData.groupID}},{key:"_createMarker",value:function(e,t){if(e.groupID){var n=e.url||(t?"image/small/marker/nav_location_start.png":"image/small/marker/nav_location_end.png"),r=t?this._startMarkerLayer:this._endMarkerLayer,i=t?this._startMarker:this._endMarker,a="number"==typeof e.height?e.height:this.imageMarkerHeight;return r&&i&&r.removeMarker(i),r&&r.groupID==e.groupID||(r=(0,k.default)(this).getFMGroup(e.groupID).getOrCreateLayer("imageMarker")),i=new I.default((0,k.default)(this),{x:e.x,y:e.y,map:(0,k.default)(this),url:n,height:a,size:e.size||64,anchor:e.anchor,callback:function(){e.callback&&e.callback(i)}}),r.addMarker(i),t?(this._startMarker=i,this._startMarkerLayer=r):(this._endMarker=i,this._endMarkerLayer=r),i}}},{key:"_getGroupsPoints",value:function(){for(var e=this._naviResults,t=[],n=null,r=null,i=0;i<e.length;i++){var a=e[i],o=n==a.groupId;0==a.length&&0!=i&&i!=e.length-1||(o||(n=a.groupId,r&&t.push(r),r={groupId:a.groupId,pointList:[]}),r.pointList=(0,c.default)(o=r.pointList).call(o,a.pointList))}return r&&t.push(r),this._groupsPoints=t,t}},{key:"_addZeroResult",value:function(e){for(var t=0;t<e.length-1;t++){var n,r,i=e[t];i.length&&(n=i.pointList[i.pointList.length-1],r=e[t+1].pointList[0],.2<C.default.distanceOfTwoPoints(n,r)&&i.pointList.push((0,y.default)({},r)))}}},{key:"_getNaviResult",value:function(e,t){this._startData&&this._endData&&(this._naviResults=this._caculateLines(this._startData,this._endData,this._startData.groupID,this._endData.groupID,e,t),this.naviToDoor&&this._analyser._endDoor&&((0,y.default)(this._endData,this._analyser._endDoor),this._createMarker(this._endData,!1)),this._addZeroResult(this._naviResults),this._getGroupsPoints(),t=this._naviDescriptionsCalculator.calculate(this._naviResults),this._naviDescriptions=t[0],this._naviDescriptionsData=t[1],this._naviDistance=t[2],this._naviGroupsDistance=t[3],this._naviEntracesDistance[1]=this._calcEntraceDistance(this._naviResults,this._endData,!0))}},{key:"_calcEntraceDistance",value:function(e,t,n){if(!(0,k.default)(this)||!e||!t.groupID)return null;if(!(0,k.default)(this).getCurrDecodeData().floors[t.groupID])return null;var r,i=(0,k.default)(this).getCurrDecodeData().floors[t.groupID].geo[0].modelLayer,a=(0,k.default)(this).getFMGroup(t.groupID).getLayer("model")._models,o=null;for(r in a){var s=a[r];if(s&&s._data&&(o=s._data.vertices),null==o&&(s=i[r-1],o=(s.geo?D.default.convertGeo2Geometry(s.geo):D.default.convertArr2Geometry(s.idxs,s.pts)).vertices),C.default.pointInPolygonVector2d(o,t,o.length))break}if(!o)return null;for(var l=[],u=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE],h=0;h<o.length/2;h++){var c=2*h,d=o[c],c=o[c+1];u[0]>d&&(u[0]=d),u[1]<d&&(u[1]=d),u[2]>c&&(u[2]=c),u[3]<c&&(u[3]=c),l.push({x:d,y:c})}for(var f=[],p=0;p<e.length;p++)if(e[p].groupId==t.groupID){for(var m=[],v=0;v<e[p].pointList.length;v++)m.push(e[p].pointList[v]);f.push(m)}if(n){for(var g,y=0;y<f.length;y++)(0,P.default)(g=f[y]).call(g);(0,P.default)(f).call(f)}for(var _=null,x=null,w=null,b=0;b<f.length;b++){for(var M=f[b],T=!1,E=0;E<M.length-1;E++){var S=M[E],A=M[E+1],A=C.default.calcLinePolygonCrossPoints2d(S,A,l,u);if(A){x=M,w=E,_=A.crossPoints[E],T=!0;break}}if(T)break}if(!x)return null;for(var I=0,L=0;L<=w;L++){var R=x[L],N=x[L+1];I+=L!=w?C.default.distanceOfTwoPoints(R,N):C.default.distanceOfTwoPoints(R,_)}return I}},{key:"_drawLines",value:function(r){var i=this;if(0==r.length)return null;for(var a=new L.default,e=function(e){var t=r[e],e=t.getPointList();if(0==e.length)return"continue";var t=t.groupId,n=[];(0,o.default)(e).call(e,function(e){n.push({x:e.x,y:e.y,z:i.lineMarkerHeight})}),e.length<2&&n.push({x:e[0].x,y:e[0].y,z:i.lineMarkerHeight}),e=new M.default,e.groupId=t,e.points=n,a.passed=i.passed,a.addSegment(e)},t=0;t<r.length;t++)e(t);return(0,k.default)(this).drawLineMark(a,this.lineStyle),this._naviLineMarkers.push(a),a}},{key:"_caculateLines",value:function(e,t,n,r,i,a){return"{}"==(0,d.default)(this._passingPts)?this._analyser.analyzeNavi(n,e,r,t,i||this.naviMode,a||this.naviPriority)!=S.default.ROUTE_SUCCESS?[]:(a=this._analyser.getNaviResults(),0==a.length?[]:a):(this._analyser.passPts=this._passingPts,this._analyser.routePassingPoints({x:e.x,y:e.y,groupID:n},{x:t.x,y:t.y,groupID:r}),r=this._analyser.getNaviResults(),this._failedInsertedPts=this._analyser.losedPoints,0==r.length?[]:r)}},{key:"losedPts",get:function(){return this._failedInsertedPts}},{key:"_locationMarkerToStartPoint",value:function(){this._startData&&this._locationMarker.setPosition({x:this._startData.x,y:this._startData.y,height:this.locationMarkerHeight,groupID:this._startData.groupID})}},{key:"_moveTo",value:function(e,t,n,r){return(0,k.default)(this)._moveTo({x:e.x,y:e.y,time:"number"==typeof t?t:0,groupID:e.groupID,update:n,callback:r},!0)}},{key:"_tiltTo",value:function(e,t,n,r){return(0,k.default)(this).tiltTo({to:e,duration:"number"==typeof t?t:0,update:n,callback:r})}},{key:"_rotateTo",value:function(e,t,n,r){return(0,k.default)(this).rotateTo({to:e,duration:"number"==typeof t?t:0,update:n,callback:r})}},{key:"_scaleTo",value:function(e,t,n,r){return(0,k.default)(this).scaleTo({scale:e,duration:"number"==typeof t?t:0,update:n,callback:r},!0)}},{key:"_focusGroupTo",value:function(e,t,n,r){return(0,k.default)(this).visibleGroupIDs=[e],n&&n(),(0,k.default)(this).focusGroupID==e?(r&&r(),null):(0,k.default)(this).changeFocusToGroup({gid:e,duration:"number"==typeof t?t:0,update:n,callback:function(){r&&r()}})}},{key:"_getRouteAngle",value:function(e,t){var n=new F.Vector3(0,1,0),e=new F.Vector3(e.x,e.y,0),t=new F.Vector3(t.x,t.y,0),t=t.clone().sub(e).normalize(),e=t.angleTo(n)*U._Math.RAD2DEG,n=t.cross(n).z<0;return n?360-e:e}},{key:"_getTransformByLength",value:function(e,t){if(0==t)return e[0];for(var n,r,i=0,a=0,o=e[0],s=1;s<e.length;s++)if(n=e[s],n.gid==o.gid){if(l=n.clone().sub(o),r=l.length(),i+=r,t<=i){l.normalize();var l=o.clone().add(l.clone().multiplyScalar(t-a));return l.gid=n.gid,l.index=n._index,l}o=n.clone(),o.gid=n.gid,o.index=n._index,a=i}else o=n;var u=e[e.length-1];return u.index=u._index,u}},{key:"_analyse",value:function(){if(!this._startData||!this._endData||!this._naviDescriptionsData||0==this._naviDescriptionsData.length)return[];var r=-1,e=(0,k.default)(n=this._naviDescriptionsData).call(n,function(e,t){var n=new F.Vector3(e.startPoint.x,0,e.startPoint.y);return n.gid=e.startGID,n._index=t,r=t,n}),t=this._naviDescriptionsData[this._naviDescriptionsData.length-1],n=new F.Vector3(t.endPoint.x,0,t.endPoint.y);return n.gid=t.endGID,n._index=r+1,e.push(n),e}},{key:"_follow",value:function(e,t){var n=this,r=this._simulateParams,i=r.inTime||this.inTime;r.scale=r.scale||this.scale||0;var a=r.scale<this.minScale?this.minScale:r.scale;this.isMultiGroups||(r={x:this._locationMarker.x,y:this._locationMarker.y,height:this._locationMarker.height,groupID:e.gid},e=this._groupsPoints[this._groupPointsIndex],e&&e.pointList&&0<e.pointList.length&&(r=(0,y.default)(r,e.pointList[0])),this._locationMarker.setPosition(r),this._locationMarker._renderNode.visible=!0),this.changeTiltAngle&&(this._tiltToAnimater=this._tiltTo(this.tiltAngle,i,null,null)),this._moveToAnimater=this._moveTo(t,i,null,function(){n._scaleToAnimater=n._scaleTo(a,i,null,function(){n._changeGrouping=!1})})}},{key:"_gpsAnimate",value:function(e){var t,n,r,i,a,o,s,l=this;this._gpsStop||(0,B.doAnimationFrame)((0,f.default)(o=this._gpsAnimate).call(o,this,e)),this._isEnd||(e.cnt++,e.cnt==e.step&&(e.cnt=0,n=this._timer.getDelta(),this._changeGrouping||this._pause||(this._allLen+=this.speed*n,0!=this._allLen&&(t=(0,y.default)({},this._getTransformByLength(e.ps,this._allLen)),o=this._naviDistance-this._allLen,n=t.y,t.y=t.z,t.z=n,t.groupID=t.gid,this._gpsData={distance:0,remain:o,walk:this._allLen,point:t,groupID:t.gid,index:t.index-1},this._toPos=(0,y.default)({},t),!t||o<=this._naviDescriptionsCalculator.tailLen?this._isEnd=!0:(this._preGid||(this._preGid=e.ps[0].gid),this._isSimulating&&(this._preGid!=t.gid&&(this._preGid=t.gid,this._groupPointsIndex++,r={x:t.x,y:t.y,groupID:t.gid},this.followPosition&&(s=this._simulateParams,i=s.inTime||this.inTime,s.scale=s.scale||this.scale||0,a=s.scale<this.minScale?this.minScale:s.scale,this._changeGrouping=!0,this.changeTiltAngle&&(this._tiltToAnimater=this._tiltTo(this.changeGroupTiltAngle,i,null,null)),this._focusGroupToAnimater=this._focusGroupTo(r.groupID,i,null,function(){l._scaleToAnimater=l._scaleTo(a,i,null,function(){l._locationMarker._renderNode.visible=!1,l.locationMarker.setPosition({x:r.x,y:r.y,height:l.locationMarkerHeight,groupID:r.groupID}),l._moveTo(r,i,null,function(){l.changeTiltAngle?l._tiltToAnimater=l._tiltTo(l.tiltAngle,i,null,function(){l._follow(t,r)}):l._follow(t,r)})})})),this.dispatchEvent({type:"crossGroup",groupId:t.gid})),o=A.default.toSceneCoord((0,k.default)(this),this._toPos),o.y=0,e=this._locationMarker._renderNode.position.clone(),e.y=0,s=new z.Matrix4,s.lookAt(e,o,this._locationMarker._renderNode.up),this._toRot=this.locationMarkerFollowAngle?(new G.Quaternion).setFromRotationMatrix(s):null))))))}},{key:"_gps",value:function(){this._gpsStop=!1;var e=this._analyse();this._timer.start(),this._isSimulating=!0,this._isEnd=!1,this._groupPointsIndex=0,e={step:2,cnt:0,ps:e},this._gpsAnimate(e)}},{key:"_animate",value:function(){if(!this._changeGrouping&&!this._pause){if(this._toPos){var e=new F.Vector3(this._locationMarker.x,this._locationMarker.y,0),t=e.lerp(this._toPos,this.followSpeed);t.groupID=this._toPos.gid;var n=C.default.distanceOfTwoPoints(t,this._toPos);this._locationMarker.setPosition({x:t.x,y:t.y,height:this.locationMarkerHeight,groupID:t.groupID});var r=this.naviConstraint(t);if(this._naviLineMarker)if(this._naviLineMarker.passed)for(var i=0;i<this._naviLineMarker._lineNodes.length;i++)this._naviLineMarker._lineNodes[i].line.material.uniforms.miny.value=1-r.remain/this._naviDistance,this._naviLineMarker._lineNodes[i].line.material.uniforms.pcolor.value=new fm.Color(this._naviLineMarker.passedColor);else for(var a=0;a<this._naviLineMarker._lineNodes.length;a++)this._naviLineMarker._lineNodes[a].line.material.uniforms.miny.value=0;if(this.dispatchEvent((0,y.default)({},this._gpsData,{type:"walking",distance:r.distance,remain:r.remain,walk:this._naviDistance-r.remain,distanceToNext:r.distanceToNext,angle:r.angle,point:r.coord,groupID:t.groupID,index:r.index,isReal:!1})),this.followPosition?(t.groupID=t.gid,this._moveToAnimater=this._moveTo(t)):(0,k.default)(this).updateCountDown_=0,this._isEnd&&n<.5)return this.stop(),void this.dispatchEvent({type:"complete"})}this._toRot&&(this._locationMarker._renderNode.quaternion.slerp(this._toRot,this.followSpeed),this.followAngle&&(e=new F.Vector3(1,0,0),t=e.clone(),n=this._locationMarker._renderNode.matrix.clone(),n.setPosition(new F.Vector3),t.applyMatrix4(n),n=t.clone().cross(e),n=n.y<0?-1:1,t=e.angleTo(t),n=Math.PI-t*n,n+=Math.PI,(0,k.default)(this).controls.setUpdate(null,null,null,n)))}}},{key:"_works",value:function(){var e;this._gps(),this._animateFun=(0,f.default)(e=this._animate).call(e,this),(0,k.default)(this).on("update",this._animateFun)}},{key:"AdaptiveLineOverview",value:function(){for(var e=(0,k.default)(this),t=e.nodeManager._scenes[e._currentSceneId].groups[e.focusGroupID]._lineScene,n=new fm.Vector2,r=new fm.Vector2,i=new fm.Vector2,a=!0,o=0;o<t.children.length;o++)t.children[o].visible&&(a?(r.x=t.children[o].geometry.boundingBox.max.x,r.y=t.children[o].geometry.boundingBox.max.z,i.x=t.children[o].geometry.boundingBox.min.x,i.y=t.children[o].geometry.boundingBox.min.z,a=!1):(r.x<t.children[o].geometry.boundingBox.max.x&&(r.x=t.children[o].geometry.boundingBox.max.x),r.z<t.children[o].geometry.boundingBox.max.z&&(r.z=t.children[o].geometry.boundingBox.max.z),i.x>t.children[o].geometry.boundingBox.min.x&&(i.x=t.children[o].geometry.boundingBox.min.x),i.z>t.children[o].geometry.boundingBox.min.z&&(i.z=t.children[o].geometry.boundingBox.min.z)));n.x=(r.x+i.x)/2+e.center.x,n.y=-(r.x+i.y)/2+e.center.y,e.moveTo(n),e.rotateTo({to:0}),e.nodeManager._scenes[e._currentSceneId].groups[1]._layers.extent[0]._scene.children[5].geometry.computeBoundingBox();var s=e.nodeManager._scenes[e._currentSceneId].groups[1]._layers.extent[0]._scene.children[5].geometry.boundingBox,n=new fm.Vector2(s.max.x-s.min.x,s.max.y-s.min.y),s=n.length(),n=new fm.Vector2(r.x-i.x,r.y-i.y),n=n.length();e.mapScale=564*n/s,e.controls.panAdd({x:0,y:e.groupSpace/2,z:0})}}]),r}(r.default),t.default=r},function(e,t,n){e.exports=n(571)},function(e,t,n){n=n(572),e.exports=n},function(e,t,n){n(573),n=n(11),e.exports=n.Number.isNaN},function(e,t,n){n=n(8),n({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(13)),_=i(n(32)),o=i(n(29)),u=i(n(10)),s=i(n(216)),x=i(n(229)),l=i(n(2)),h=i(n(3)),c=i(n(575)),d=i(n(66)),f=i(n(42)),p=n(159),m=n(119),n=function(){function t(e){(0,l.default)(this,t),this.directionAssert=10,this.combineAsset=5,this.naviLanguage=d.default.ZH,this.completeDistance=0,this.map=null,this.combinePoints=[],this.dirArr=["north","northeast","east","southeast","south","southwest","west","northwest","north"],this.dirArr2=["front_pure","right_front_pure","right_pure","right_back_pure","back_pure","left_back_pure","left_pure","left_front_pure","front_pure"],this.dirArr3=["still_go_straight","right_front","turn_right","turn_right_rear","back_to","turn_left_rear","turn_left","left_front","still_go_straight"],this._boo=!1,this._tailLen=0,(0,a.default)(this,e)}return(0,h.default)(t,[{key:"tailLen",get:function(){return this._tailLen}},{key:"dispose",value:function(){this.map=null}},{key:"calculate",value:function(e){return this._calculate(e)}},{key:"_getNs",value:function(e){for(var t=[],n=0;n<e.length;n++)t=(0,_.default)(t).call(t,e[n]._nodeList);return t}},{key:"_getField",value:function(e,t){var n=Math.PI/4,r=e/n,e=(0,o.default)(r),r=r%1*n;return e%2==0?t<r&&(e+=1):n-t<=r&&(e+=1),e}},{key:"_getAngle",value:function(e,t){var n=t.angleTo(e),e=new p.Vector3(t.x,t.z,t.y).cross(new p.Vector3(e.x,e.z,e.y));return e.z<0&&(n=2*Math.PI-n),n}},{key:"_getDirection",value:function(e,t){if(t==e.length-1)return{index:e[e.length-1].index};var n=new p.Vector3(0,0,1),r=n;0!=t&&(r=e[t].clone().sub(e[t-1]).normalize(),r.y=0,r.z*=-1);var i=e[t+1].clone().sub(e[t]);i.y=0;var a=i.length(),i=i.normalize();return i.z*=-1,n=this._getField(this._getAngle(n,i),22.5*m._Math.DEG2RAD),r=this._getAngle(r,i),i=this._getField(r,this.directionAssert*m._Math.DEG2RAD),{relField:i,relDesc:this._getDescribeWord(this.dirArr2[i]),relAngle:r*m._Math.RAD2DEG,absField:n,absDesc:this._getDescribeWord(this.dirArr[n]),distance:a,index:e[t].index}}},{key:"_regularPoints",value:function(e,t){for(var n=this,r=(0,u.default)(e).call(e,function(e,t){return e=(0,u.default)(n)?f.default.toSceneCoord((0,u.default)(n),e):f.default.toSceneCoord({center:{x:n.analyser.sceneData.scene.x,y:n.analyser.sceneData.scene.y}},e),e.index=t,e}),i=[],a=0;a<r.length;a++){var o=this._getDirection(r,a);o.point=e[a],o.groupID=t,i.push(o)}for(var s=[i[0]],l=1;l<i.length;l++)i[l].relAngle<=this.combineAsset||360-i[l].relAngle<=this.combineAsset?s[s.length-1].distance+=i[l].distance:s.push(i[l]);return s}},{key:"_getGroupDes",value:function(e){var t="";return null!=(0,u.default)(this).getFMGroup(e)&&(e=(0,u.default)(this).getFMGroup(e),t=this.naviLanguage==d.default.ZH?e._groupMessage.desc:e._groupMessage.gname.toUpperCase(),""+t!="null"&&""+t!=""&&""+t!="undefined"||(t=e._groupMessage.gname.toUpperCase())),t}},{key:"_getDesc",value:function(e,t,n,r,i){var a,o=e[t],s=e[t+1],l=this._getDescribeWord(this.dirArr3[s.relField]);return this._boo=t==e.length-3&&s.distance<this.completeDistance,l&&!this._boo||(r?(this._boo=!1,l||(a=this._getLadderType(e[t+1].point,n,i),i=n<r?this._getDescribeWord("up_to"):this._getDescribeWord("down_to"),n=this._getGroupDes(r),l=this._getDescribeWord("take")+a+" "+i+" "+n)):(this._boo&&(this._tailLen=s.distance),l=this._getDescribeWord("arrived"))),0==t?2==e.length?this._getDescribeWord("face_to")+" "+o.absDesc+" "+this._getDescribeWord("straight")+" "+Math.ceil(o.distance)+" "+this._getDescribeWord("meter")+" "+l:this._getDescribeWord("face_to")+" "+o.absDesc+" "+this._getDescribeWord("straight")+" "+Math.ceil(o.distance)+" "+this._getDescribeWord("meter")+" "+this._getDescribeWord(this.dirArr3[e[t+1].relField]):this._getDescribeWord("straight")+" "+Math.ceil(o.distance+(this._boo&&!r?s.distance:0))+" "+this._getDescribeWord("meter")+" "+l}},{key:"_getDescData",value:function(e,t,n,r){var i=e[t],a=e[t+1],t=this._getDescribeWord(this.dirArr3[e[t+1].relField]);return t&&!this._boo||(r?(n=n<r?this._getDescribeWord("up"):this._getDescribeWord("down"),this._getGroupDes(r),a.relDesc=n):a.relDesc="终"),{startPoint:i.point,startGID:i.groupID,startIndex:i.index,endPoint:a.point,endGID:a.groupID,endIndex:a.index,startDirection:i.absDesc,endDirection:a.relDesc,distance:i.distance+(this._boo&&!r?a.distance:0)}}},{key:"_getLadderType",value:function(e,t,n){e.z=(0,u.default)(this).getFMGroup(t).height;for(var r,i=s.default,a=-1,o=0;o<n.length;o++)n[o]&&(r=Math.pow(n[o].point.x-e.x,2)+Math.pow(n[o].point.y-e.y,2),r<i&&(i=r,a=n[o].liftType));if(-1!=a)switch(a){case 2:return" "+this._getDescribeWord("stair_pure");case 3:return" "+this._getDescribeWord("escalator_pure");case 1:return" "+this._getDescribeWord("lift_pure")}return this._getDescribeWord("stair")}},{key:"_getDescribeWord",value:function(e){return e=c.default[this.naviLanguage][e],e||""}},{key:"_calculate",value:function(e){this.combinePoints=[];for(var t=[],n=[],r=null,i=null,a=null,o=null,s=0,l=[],u=!1,h=null,c=null,d=this._getNs(e),f=0;f<e.length;f++){if(a=e[f],r=a.groupId,i=null,f<e.length-1)for(var p=f;p<e.length;p++)if(e[p].groupId!=r){i=e[p].groupId;break}var m,v,o=a.pointList,g=this._regularPoints(o,r);if(1<g.length&&(this.combinePoints=(0,_.default)(m=this.combinePoints).call(m,g)),1==g.length)(i||u)&&(u?n.length&&(f==e.length-1&&(t[t.length-1]+=" "+this._getDescribeWord("arrived"),n[n.length-1].endDirection=this._getDescribeWord("end")),n[n.length-1].endPoint=o[0],n[n.length-1].endGID=r):h!=r&&null!=h||(m=r<i?this._getDescribeWord("up_to"):this._getDescribeWord("down_to"),v=this._getGroupDes(i),c=this._getDescribeWord("take_stair")+" "+m+" "+v,t.push(c),n.push({startPoint:o[0],startDirection:r<i?this._getDescribeWord("up"):this._getDescribeWord("down"),startGID:r})),u=!u);else for(var h=r,y=0;y<g.length-1&&!this._boo;y++)t.push(this._getDesc(g,y,r,i,d)),n.push(this._getDescData(g,y,r,i));1<g.length&&(v=(0,x.default)(g).call(g,function(e,t){return e+(t.distance||0)},0),l.push({groupID:r,distance:v}),s+=v)}return[t,n,s,l]}}]),t}(),n=n;t.default=n},function(e,t,n){"use strict";n=n(0),n(t,"__esModule",{value:!0}),t.default=void 0,n={zh:{straight:"直行",still_go_straight:"继续直行",back_to:"后退",turn_right:"右转",turn_left:"左转",right_front:"右前方 继续直行",left_front:"左前方 继续直行",turn_right_rear:"右后方转",turn_left_rear:"左后方转",up:"上",down:"下",up_to:"上行到达",down_to:"下行到达",meter:"米",arrived:"到达目的地",front:"前方",stair:"楼梯",stair_pure:"楼梯",escalator_pure:"扶梯",lift_pure:"直梯",take:"乘",take_stair:"乘梯",front_pure:"前",right_front_pure:"右前",right_pure:"右",right_back_pure:"右后",back_pure:"后",left_back_pure:"左后",left_pure:"左",left_front_pure:"左前",east:"东",west:"西",south:"南",north:"北",southeast:"东南",northeast:"东北",southwest:"西南",northwest:"西北",face_to:"向",start:"起",end:"终"},en:{straight:"go straight",still_go_straight:"go straight",back_to:"back to",turn_right:"turn right",turn_left:"turn left",right_front:"go straight right front ",left_front:"go straight left front ",turn_right_rear:"turn right rear",turn_left_rear:"turn left rear",up:"up",down:"up",up_to:"up to",down_to:"down to",meter:"meter",arrived:"arrived",front:"front",stair:"stair",stair_pure:"stair",escalator_pure:"escalator",lift_pure:"lift",take:"take",take_stair:"take stair",front_pure:"front",right_front_pure:"right front",right_pure:"right",right_back_pure:"right back",back_pure:"back",left_back_pure:"left back",left_pure:"left",left_front_pure:"left front",east:"east",west:"west",south:"south",north:"north",southeast:"southeast",northeast:"northeast",southwest:"southwest",northwest:"northwest",face_to:"face to",start:"start",end:"end"}},t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var s,a=i(n(2)),o=i(n(3)),l=i(n(61)),u=i(n(148)),h=i(n(146)),c=i(n(47)),d=i(n(93)),f=n(67);function p(n,r){var e,i=this,t=null,a=this.MapOptions.mapServerURL,o="GET";"fengmap"===this.MapOptions.mapServerURL&&(a=d.default+"sdk/auth/downMaps",this.MapOptions.tile&&(a=d.default+"sdk/authLayered/downMaps"),e=u.default.getCerityData(this.MapOptions.key,this.MapOptions.appName,n),e={mapId:e.mapId,keyValue:e.appKey,appName:e.appName,webUrl:e.webURL,keyType:3,isSeparate:!1},t=(0,l.default)(e),o="POST"),this.fmServer.getScene(a,n,this.MapOptions.tile,t,o,function(e,t){i.dataManager.putRawScene(e,n),e=i.dataManager.parseScene(n,i.MapOptions.tile,i.MapOptions.license),e&&(i.dataManager.putDecodeScene(e,n),r(e))},function(e){s&&s(e)}),this._currentSceneId=n}n=function(){function t(e){(0,a.default)(this,t),this.MapOptions=e,this.fmServer=new h.default,this.dataManager=new c.default}return(0,o.default)(t,[{key:"openMap",value:function(t,n){var e,r,i=this.MapOptions.mapID;function a(){"fengmap"===r.MapOptions.mapServerURL?u.default.checkIsOnLine(function(){u.default.checkOnLine(r.MapOptions.key,r.MapOptions.appName,i,function(e){p.call(r,i,t)},function(e){e?(console.warn(e.error_code,e.error_message),n&&n({msg:"线上验证失败!",data:e})):(console.warn("offLine 2"),p.call(r,i))},"POST")},function(){console.warn("offLine 1"),p.call(r,i,t)},1e3):p.call(r,i,t)}function o(){p.call(r,i)}s=n,i?this.MapOptions.key?(e=/^[a-zA-z\d]{32}$/,e.test(this.MapOptions.key)?this.MapOptions.appName?(this._zopStep_=1,r=this,this.MapOptions.useCompatibleOnLineCheck?this.isOnLine(a,o):(navigator.onLine?a:o)()):console.warn(decodeURIComponent(f.cerityMessage.warn_noappname)):console.warn(decodeURIComponent(f.cerityMessage.warn_keynotright))):console.warn(decodeURIComponent(f.cerityMessage.warn_nokey)):console.warn(decodeURIComponent(f.cerityMessage.warn_nomapid))}}]),t}(),t.default=n},function(e,t,n){e.exports=r;var h=n(160).EventEmitter,e=n(79);function r(){h.call(this)}e(r,h),r.Readable=n(161),r.Writable=n(587),r.Duplex=n(588),r.Transform=n(589),r.PassThrough=n(590),r.Stream=r,r.prototype.pipe=function(t,e){var n=this;function r(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",r),t.on("drain",i),t._isStdio||e&&!1===e.end||(n.on("end",o),n.on("close",s));var a=!1;function o(){a||(a=!0,t.end())}function s(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function l(e){if(u(),0===h.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",r),t.removeListener("drain",i),n.removeListener("end",o),n.removeListener("close",s),n.removeListener("error",l),t.removeListener("error",l),n.removeListener("end",u),n.removeListener("close",u),t.removeListener("close",u)}return n.on("error",l),t.on("error",l),n.on("end",u),n.on("close",u),t.on("close",u),t.emit("pipe",n),t}},function(e,t,n){"use strict";t.byteLength=o,t.toByteArray=s,t.fromByteArray=m;for(var l=[],u=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=r.length;i<a;++i)l[i]=r[i],u[r.charCodeAt(i)]=i;function c(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");return e=e.indexOf("="),-1===e&&(e=t),t=e===t?0:4-e%4,[e,t]}function o(e){var t=c(e),e=t[0],t=t[1];return 3*(e+t)/4-t}function d(e,t,n){return 3*(t+n)/4-n}function s(e){for(var t,n=c(e),r=n[0],n=n[1],i=new h(d(e,r,n)),a=0,o=0<n?r-4:r,s=0;s<o;s+=4)t=u[e.charCodeAt(s)]<<18|u[e.charCodeAt(s+1)]<<12|u[e.charCodeAt(s+2)]<<6|u[e.charCodeAt(s+3)],i[a++]=t>>16&255,i[a++]=t>>8&255,i[a++]=255&t;return 2===n&&(t=u[e.charCodeAt(s)]<<2|u[e.charCodeAt(s+1)]>>4,i[a++]=255&t),1===n&&(t=u[e.charCodeAt(s)]<<10|u[e.charCodeAt(s+1)]<<4|u[e.charCodeAt(s+2)]>>2,i[a++]=t>>8&255,i[a++]=255&t),i}function f(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function p(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(f(r));return i.join("")}function m(e){for(var t,n=e.length,r=n%3,i=[],a=16383,o=0,s=n-r;o<s;o+=a)i.push(p(e,o,s<o+a?s:o+a));return 1===r?(t=e[n-1],i.push(l[t>>2]+l[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(l[t>>10]+l[t>>4&63]+l[t<<2&63]+"=")),i.join("")}u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,u=l>>1,h=-7,c=n?i-1:0,d=n?-1:1,n=e[t+c];for(c+=d,a=n&(1<<-h)-1,n>>=-h,h+=s;0<h;a=256*a+e[t+c],c+=d,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=r;0<h;o=256*o+e[t+c],c+=d,h-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:Infinity*(n?-1:1);o+=Math.pow(2,r),a-=u}return(n?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l=8*a-i-1,u=(1<<l)-1,h=u>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,f=r?1:-1,a=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||Infinity===t?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(r=Math.pow(2,-o))<1&&(o--,r*=2),t+=1<=o+h?c/r:c*Math.pow(2,1-h),2<=t*r&&(o++,r/=2),u<=o+h?(s=0,o=u):1<=o+h?(s=(t*r-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));8<=i;e[n+d]=255&s,d+=f,s/=256,i-=8);for(o=o<<i|s,l+=i;0<l;e[n+d]=255&o,d+=f,o/=256,l-=8);e[n+d-f]|=128*a}},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(121).Buffer,a=n(582);function o(e,t,n){e.copy(t,n)}function s(){r(this,s),this.head=null,this.tail=null,this.length=0}e.exports=(s.prototype.push=function(e){e={data:e,next:null},0<this.length?this.tail.next=e:this.head=e,this.tail=e,++this.length},s.prototype.unshift=function(e){e={data:e,next:this.head},0===this.length&&(this.tail=e),this.head=e,++this.length},s.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},s.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)o(n.data,t,r),r+=n.data.length,n=n.next;return t},s),a&&a.inspect&&a.inspect.custom&&(e.exports.prototype[a.inspect.custom]=function(){var e=a.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,i,a){!function(e){var t=void 0!==e&&e||"undefined"!=typeof self&&self||window,n=Function.prototype.apply;function r(e,t){this._id=e,this._clearFn=t}i.setTimeout=function(){return new r(n.call(setTimeout,t,arguments),clearTimeout)},i.setInterval=function(){return new r(n.call(setInterval,t,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(t,this._id)},i.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},i.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},i._unrefActive=i.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},a(584),i.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,i.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}.call(this,a(49))},function(e,t,n){!function(e,y){!function(n,r){"use strict";var i,a,o,s,l,e;function t(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];return e={callback:e,args:t},a[i]=e,l(i),i++}function u(e){delete a[e]}function h(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(r,n)}}function c(e){if(o)setTimeout(c,0,e);else{var t=a[e];if(t){o=!0;try{h(t)}finally{u(e),o=!1}}}}function d(){l=function(e){y.nextTick(function(){c(e)})}}function f(){if(n.postMessage&&!n.importScripts){var e=!0,t=n.onmessage;return n.onmessage=function(){e=!1},n.postMessage("","*"),n.onmessage=t,e}}function p(){var t="setImmediate$"+Math.random()+"$",e=function(e){e.source===n&&"string"==typeof e.data&&0===e.data.indexOf(t)&&c(+e.data.slice(t.length))};n.addEventListener?n.addEventListener("message",e,!1):n.attachEvent("onmessage",e),l=function(e){n.postMessage(t+e,"*")}}function m(){var t=new MessageChannel;t.port1.onmessage=function(e){e=e.data,c(e)},l=function(e){t.port2.postMessage(e)}}function v(){var n=s.documentElement;l=function(e){var t=s.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}}function g(){l=function(e){setTimeout(c,0,e)}}n.setImmediate||(i=1,a={},o=!1,s=n.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(n),e=e&&e.setTimeout?e:n,("[object process]"==={}.toString.call(n.process)?d:f()?p:n.MessageChannel?m:s&&"onreadystatechange"in s.createElement("script")?v:g)(),e.setImmediate=t,e.clearImmediate=u)}("undefined"==typeof self?void 0===e?this:e:self)}.call(this,n(49),n(65))},function(n,e,t){!function(t){function e(e,t){if(i("noDeprecation"))return e;var n=!1;function r(){if(!n){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return r}function i(e){try{if(!t.localStorage)return!1}catch(e){return!1}return e=t.localStorage[e],null!=e&&"true"===String(e).toLowerCase()}n.exports=e}.call(this,t(49))},function(e,t,n){"use strict";e.exports=i;var r=n(262),e=Object.create(n(96));function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}e.inherits=n(79),e.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(162)},function(e,t,n){e.exports=n(70)},function(e,t,n){e.exports=n(161).Transform},function(e,t,n){e.exports=n(161).PassThrough},function(e,t,n){"use strict";var r=n(0),i=n(1);function a(e){this.autoStart=void 0===e||e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}r(t,"__esModule",{value:!0}),t.default=void 0,n=i(n(13)),(0,n.default)(a.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var e,t=0;return this.autoStart&&!this.running?(this.start(),0):(this.running&&(e=("undefined"==typeof performance?Date:performance).now(),t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t),t)}}),n=a,t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var w=i(n(31)),s=i(n(29)),M=i(n(15)),T=i(n(54)),u=i(n(35)),h=i(n(13)),g=i(n(9)),c=i(n(32)),b=i(n(122)),E=i(n(34)),a=i(n(2)),o=i(n(3)),y=i(n(28)),l=i(n(68)),S=i(n(95)),A=i(n(69)),m=i(n(163)),d=i(n(597)),f=i(n(153)),p=i(n(97)),I=i(n(55)),v=i(n(80)),_=i(n(598)),x=i(n(164)),L=i(n(264)),R=i(n(599)),N=i(n(165)),k=i(n(600)),P=i(n(166)),C=i(n(601)),D=i(n(42)),O=i(n(603)),B=i(n(607)),n=function(){function t(e){(0,a.default)(this,t),this._options=new d.default(e),this._naviService=new f.default(this._options),this._startPoint=null,this._startGroupId=null,this._endPoint=null,this._endGroupId=null,this._startZone=null,this._mode=l.default.MODULE_SHORTEST,this._priority=S.default.PRIORITY_DEFAULT,this._graphs=new p.default,this._outlineAnalyseDijkstra=null,this._multiFloorDijkstraMap=new p.default,this._groupLiftNodes=new p.default,this._extentNodes=[],this._extentRoads=[],this._predictExtentNodes=[],this._predictLiftNodes=[],this._result=[],this._weightBias=1,this._liftLessWeightGain=1,this._liftWeightGain=1,this._liftGreaterWightGain=1,this._escalatorGreaterWightGain=1,this._escalatorWeightGain=1,this._escalatorLessWightGain=1,this._stairGreaterWeightGain=1,this._stairWeightGain=1,this._stairLessWeightGain=1,this._scene=null,this._eDijKCollection=null,this._naviToDoor=!1,this._startModel=null,this._endModel=null,this._endDoor=null,this._assignedInfos=[]}return(0,o.default)(t,[{key:"initByMap",value:function(e){e&&e._currentSceneId&&e.dataManager&&(e=e.dataManager._sceneDecodeData[e._currentSceneId],e&&(this._naviService.setScene(e),this._scene=e,e=e.floors,0!=e.length&&(this._initNaviGraphs(e),this._initDijkstras(),this._eDijKCollection=new O.default,this._eDijKCollection.loadGraphs(this._graphs))))}},{key:"initByOptions",value:function(e){}},{key:"initByScene",value:function(e){e&&(this._scene=e,this._naviService.setScene(e),e=e.floors,0!=e.length&&(this._initNaviGraphs(e),this._initDijkstras()))}},{key:"initByNaviGraphs",value:function(e){e&&(this._initNaviGraphs(e),this._initDijkstras())}},{key:"dispose",value:function(){this._options=null,this._naviService=null,this._graphs.each(function(e,t){t.dispose()}),this._graphs.clear(),this._graphs=null,this._outlineAnalyseDijkstra.dispose(),this._outlineAnalyseDijkstra=null,this._multiFloorDijkstraMap.each(function(e,t){t.dispose()}),this._multiFloorDijkstraMap.clear(),this._multiFloorDijkstraMap=null,this._groupLiftNodes.clear(),this._groupLiftNodes=null,this._extentNodes=null,this._extentRoads=null,this._predictExtentNodes=null,this._predictLiftNodes=null,this._result=null}},{key:"assginedInfos",get:function(){return this._assignedInfos},set:function(e){this._assignedInfos=e}},{key:"passPts",set:function(e){this._passPts=e}},{key:"routePassingPoints",value:function(e,t){return this.naviAdapter=new B.default(e,t,this._passPts,this._eDijKCollection),this.naviAdapter.executeCalculation(),this._result=this.naviAdapter.routes,this._failedInsertedPts=this.naviAdapter.failInsertedPts,A.default.ROUTE_SUCCESS}},{key:"failedInsertedPts",get:function(){return this._failedInsertedPts}},{key:"calc_outlines_dist",value:function(e){for(var t=0,n=0;n<e.length-1;n++)t+=Math.abs(e[n].groupId-e[n+1].groupId);return{dist:t,seq:e}}},{key:"calc_sort_outlines_dist",value:function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.calc_outlines_dist(e[n]));return(0,w.default)(t).call(t,function(e,t){return e.dist-t.dist}),t}},{key:"sort_outlineinfos_length",value:function(e){(0,w.default)(e).call(e,function(e,t){return e.seq.length-t.seq.length})}},{key:"naviToDoor",get:function(){return this._naviToDoor},set:function(e){this._naviToDoor=e}},{key:"routeAssigned",value:function(){for(var e in this._assignedInfos){var t=(0,s.default)(e),e=this._multiFloorDijkstraMap.get(t);e.assignedPts=this._assignedInfos[t],e.routeAssigned(),this._result.push({groupId:t,result:e.getRouteCalculateResult()})}}},{key:"route",value:function(e,d,t,f,p,n){var m=this;this.reset();var r=this._multiFloorDijkstraMap.get(e);if(!r)return A.default.ROUTE_FAILED_NO_DATA_START;var i=r._calcPointReachable(d);if(!i)return A.default.ROUTE_FAILED_NO_DATA_START;if(this._startModel=i.model,r=this._multiFloorDijkstraMap.get(t),!r)return A.default.ROUTE_FAILED_NO_DATA_END;if(r=r._calcPointReachable(f),!r)return A.default.ROUTE_FAILED_NO_DATA_END;this._endModel=r.model,this._result=[],this._startGroupId=e,this._startPoint=d,this._endGroupId=t,this._endPoint=f;var a=i.extentId,o=r.extentId,v=i.model,g=r.model;if(0==a||0==o)return A.default.ROUTE_FAILED_CANNOT_ARRIVE;var y=null;this._mode=p,this._switchToPriority(n);var s=function(){m._result=[];for(var e=[],t=[m._startPoint],n=0;n<m._predictExtentNodes.length-1;n++){var r=[],i=[];if(!m._calcPredictLiftNodes(m._predictExtentNodes[n],m._predictExtentNodes[n+1],t[t.length-1],r,i))return A.default.ROUTE_FAILED_CANNOT_ARRIVE;for(var a=!1,o=0;o<r.length;o++){var s,l=r[o]._wrappedNode,u=i[o]._wrappedNode,h=r[o].groupId,c=i[o].groupId;if(y=0==n?(s=m._multiFloorDijkstraMap.get(h),s._startModel=v,s.routeCalculate(d,l,p)):(s=m._multiFloorDijkstraMap.get(h),s.routeCalculate(e[e.length-1],l,p)),A.default.ROUTE_SUCCESS==y){if(l=m._multiFloorDijkstraMap.get(h),l=l.getRouteCalculateResult(),m._result.push({groupId:h,result:l}),e.push(u),t.push(u.point),a=!0,m._predictExtentNodes.length-2==n){if(l=m._multiFloorDijkstraMap.get(c),l._endModel=g,y=l.routeCalculate(u,f,p),A.default.ROUTE_SUCCESS!=y){(0,M.default)(u=m._result).call(u,m._result.length-1,1),a=!1,(0,M.default)(t).call(t,t.length-1,1),(0,M.default)(e).call(e,e.length-1,1);continue}l=l.getRouteCalculateResult(),m._result.push({groupId:c,result:l})}if(A.default.ROUTE_SUCCESS==y)break}}if(!a)return A.default.ROUTE_FAILED_CANNOT_ARRIVE}return A.default.ROUTE_SUCCESS};if(e==t&&a==o){var l=this._multiFloorDijkstraMap.get(e);if(l._startModel=v,l._endModel=g,y=l.routeCalculate(d,f,p),y!=A.default.ROUTE_SUCCESS){for(var u=[],h=0;h<this._extentNodes.length;h++)this._extentNodes[h].groupId==e&&this._extentNodes[h].extentId==a&&u.push(this._extentNodes[h]);var c=this._enlarge_connected_nodes_num(u,u[0],1);if(0==c.length)return A.default.ROUTE_FAILED_OUTLINE;for(var _=this.calc_sort_outlines_dist(c),h=0;h<_.length;h++){this._predictExtentNodes=_[h].seq;var x=s();if(x==A.default.ROUTE_SUCCESS)return x}return A.default.ROUTE_FAILED_CANNOT_ARRIVE}l=l.getRouteCalculateResult(),this._result.push({groupId:e,result:l})}else{if(l=this._calcPredictExtentNodes(e,a,t,o),l!=A.default.ROUTE_SUCCESS)return A.default.ROUTE_FAILED_OUTLINE;if((0,T.default)(l=this._predictExtentNodes).call(l),l=s(),A.default.ROUTE_SUCCESS!=l){for(var w=null,b=null,h=0;h<this._extentNodes.length;h++)this._extentNodes[h].groupId==e&&this._extentNodes[h].extentId==a&&(w=this._extentNodes[h]),this._extentNodes[h].groupId==t&&this._extentNodes[h].extentId==o&&(b=this._extentNodes[h]);if(c=[],c.push([w]),this._enlarge_connected_nodes_norepeat(w,b,c),0==c.length)return A.default.ROUTE_FAILED_OUTLINE;for(_=this.calc_sort_outlines_dist(c),this.sort_outlineinfos_length(_),h=0;h<_.length;h++)if(this._predictExtentNodes=_[h].seq,x=s(),x==A.default.ROUTE_SUCCESS)return x;return A.default.ROUTE_FAILED_CANNOT_ARRIVE}}return A.default.ROUTE_SUCCESS}},{key:"getRouteResult",value:function(){if(this._naviToDoor&&(this._endDoor=null,this._endModel&&0<this._result.length)){for(var e,t=this._result[this._result.length-1],n=t.result,r={x:-1,y:-1},i=n.length-1;0<i;i--){var a=n[i],o=n[i-1];if(y.default.segCrossPolygon(a.point,o.point,this._endModel.points,r)){e=i;break}}(0,M.default)(n).call(n,e),t=new v.default,t.Id=-1,t.point=r,n.push(t),this._endDoor=r}for(var s=[],l=0;l<this._result.length;l++){this._simplifyRouteResult(this._result[l]);for(var u=this._result[l],h=u.groupId,c=u.result,d=[],f=0,p=0;p<c.length;p++)d.push(c[p].point),p!=c.length-1&&(f+=y.default.distanceOfTwoPoints(c[p].point,c[p+1].point));u=new m.default,u._groupId=h,u._nodeList=c,u._pointList=d,u._length=f,s.push(u),l!=this._result.length-1&&(h=this._getBeginTransitionRoute(this._result[l]),u=this._getEndTransitionRoute(this._result[l+1]),s.push(h),s.push(u))}return s}},{key:"setBannedPoltyons",value:function(e){for(var t in e){var n=(0,s.default)(t),n=this._multiFloorDijkstraMap.get(n);n.setBannedPoltyons(e[t])}}},{key:"clearBannedAreas",value:function(){this._multiFloorDijkstraMap.each(function(e,t,n){n.clearBannedArea()})}},{key:"refreshBannedArea",value:function(){this._multiFloorDijkstraMap.each(function(e,t,n){t._zoneIdSimpleDijkstraMap.get(-1).refreshAdjList()})}},{key:"_simplifyRouteResult",value:function(e){if(e&&e.result){var t=e.result,n=t.length;if(n&&!(n<2)){var r=[];r.push(t[0]);var i=t[0],a=t[n-1];y.default.distanceOfTwoPoints(i.point,a.point),y.default.epsilon();for(var o=1;o<n-1;o++){var s=t[o];null!=i&&y.default.distanceOfTwoPoints(i.point,s.point)<y.default.epsilon()||null!=a&&y.default.distanceOfTwoPoints(a.point,s.point)<y.default.epsilon()||r.push(s)}r.push(a);for(var n=r.length,l=new Array(n),u=0;u<n;u++)l[u]=0;for(var h=1;h<n-1;h++){for(var c=r[h],d=h-1;0!=l[d];)d--;var f=r[d],p=r[h+1];y.default.isPointOnSegment(c.point,f.point,p.point)&&(l[h]=1)}for(var m=[],v=0;v<n;v++)0==l[v]&&m.push(r[v]);e.result=m}}}},{key:"resetBanned",value:function(){this._multiFloorDijkstraMap.each(function(e,t){t.resetBanned()})}},{key:"reset",value:function(){this._predictExtentNodes=[],this._predictLiftNodes=[],this._multiFloorDijkstraMap.each(function(e,t){t.reset()})}},{key:"pathConstraint",value:function(n,r){var i=this;if(this._multiFloorDijkstraMap.size()<=0)return null;var e=this._multiFloorDijkstraMap.get(n.groupID);if(!e)return null;var t=e._naviGraph;if(!t)return null;var a=[];a.push.apply(a,(0,E.default)(t.roadVector)),e._zoneIdGraph.each(function(e,t){a.push.apply(a,(0,E.default)(t.roadVector))});var o={},s=t.queryContainExtentId(n),l={distance:Number.MAX_VALUE,road:null,coord:{groupID:n.groupID}},t=null;return a.length&&((0,u.default)(a).call(a,function(e){var t;e.roadEntry!=I.default.NaviRoadEntry_FORBID&&(r?0<=(0,g.default)(r).call(r,e.roadRank)&&s==e.extentId&&(t=y.default.pointDistanceToLine(n,e.startPoint,e.endPoint,o),t<l.distance&&(l.distance=t,l.road=e,l.angle=i._getRouteAngle(e.startPoint,e.endPoint),(0,h.default)(l.coord,o))):s==e.extentId&&(t=y.default.pointDistanceToLine(n,e.startPoint,e.endPoint,o),t<l.distance&&(l.distance=t,l.road=e,l.angle=i._getRouteAngle(e.startPoint,e.endPoint),(0,h.default)(l.coord,o))))}),t=l),t}},{key:"_getRouteAngle",value:function(e,t){var n=new Geo.Vector3(0,0,1),e=new Geo.Vector3(e.x,0,e.y),t=new Geo.Vector3(t.x,0,t.y),t=t.clone().sub(e).normalize(),e=t.angleTo(n)*Geo._Math.RAD2DEG,n=0<t.clone().cross(n).y;return n?360-e:e}},{key:"_initNaviGraphs",value:function(e){for(var t in this._graphs=new p.default,e){var n=e[t].gid;if(null!=n){var r=e[t].geo[0],i=e[t].biz[0],a=e[t].navi[0],o=this._naviService.convertToGroup(n,r,i,a),s=new p.default,l=this._initNaviNodes(o,s),u=this._initNaviRoads(o),t=this._initNaviZones(o),r=this._initNaviObstructExtents(o),i=this._initNaviObstructModels(o);this._processNaviObstructModels(i,l,a,s);var h=new N.default(l,u,!0,1);h.groupId=n,0!=r.length&&(h.obstructExtents=r),0!=t.length&&(h.zones=t),0!=i.length&&(h.obstructModels=i);for(var c=0;c<u.length;c++)u[c].extentId=h.queryContainExtentId(u[c].startPoint);this._graphs.put(o.gid,h)}}}},{key:"_initNaviNodes",value:function(i,a){var e,o=[],t=function(e){var t,n=i.naviNodes[e];if(null==n.nodeId)return"continue";var r=new v.default;r.Id=n.nodeId,r.point=n.geoArr,r.nodeType=n.nodeType,r.liftType=n.liftType,r.liftFlag=n.liftFlag,r.liftEntry=n.liftEntry,(0,u.default)(t=n.linkSegArr).call(t,function(e){r.segLinks.push((0,s.default)(e))}),(0,u.default)(t=n.liftFloorArr).call(t,function(e){r.liftFloors.push((0,s.default)(e))}),o.push(r),a.put(n.nodeId,e)};for(e in i.naviNodes)t(e);return o}},{key:"_initNaviRoads",value:function(e){var t,n=[];for(t in e.naviSegments){var r,i=e.naviSegments[t],a=i.geoArr;a&&(r=new x.default,r.Id=i.segmentId,r.startId=i.snode,r.startPoint=a[0],r.endId=i.enode,r.endPoint=a[1],r.length=i.length,r.roadEntry=i.entry,r.roadRank=i.rank,n.push(r))}return n}},{key:"_initNaviObstructExtents",value:function(e){for(var t=[],n=0,r=e.extentLayer.length;n<r;n++){var i=e.extentLayer[n],a=i.geoArr,a=a||[],a=new R.default(i.eid,e.gid,0,a,i.center,i.holes);a.fid=i.fid,t.push(a)}return t}},{key:"_initNaviObstructModels",value:function(e){for(var t=[],n=0,r=e.modelLayer.length;n<r;n++){var i=e.modelLayer[n],a=i.geoArr,a=a||[],a=new R.default(i.eid,e.gid,0,a,i.center,i.holes);a.fid=i.fid,a.pass=i.pass,t.push(a)}return t}},{key:"_initNaviZones",value:function(e){for(var t=[],n=0,r=e.naviZones.length;n<r;n++){var i=e.naviZones[n],i=new L.default(i.id,e.gid,i.type,i.geoArr);t.push(i)}return t}},{key:"_processNaviObstructModels",value:function(e,t,n,r){for(var i=new p.default,a=0;a<e.length;a++){var o=e[a];i.put(o.Id,a)}for(var s=0;s<n.naviModels.length;s++)for(var l=n.naviModels[s],u=l.id,h=e[i.get(u)],c=0;c<l.doorids.length;c++){var d=l.doorids[c],f=t[r.get(d)];h.doors.push(f),d=l.nodetypes[c],f=l.entrytypes[c],h.doorTypes.push(d),h.doorEntrys.push(f)}}},{key:"_processLiftFloors",value:function(){var s;this._graphs.size()<=0||(s={},this._graphs.each(function(e,t){var n,r=[];for(n in t.queryLiftNodesByType(I.default.NaviLiftType_Escalator,r),r){var i,a,o=r[n];o.liftFlag&&(i=o.liftFlag,s[i]?s[i]=(0,c.default)(a=s[i]).call(a,o.liftFloors):s[i]=o.liftFloors)}}),this._graphs.each(function(e,t){var n,r=[];for(n in t.queryLiftNodesByType(I.default.NaviLiftType_Escalator,r),r){var i,a=r[n];a.liftFlag&&(i=a.liftFlag,s[i]&&(a.liftFloors=s[i]))}}))}},{key:"_initDijkstras",value:function(){var e,n=this;!this._graphs||!this._graphs instanceof p.default||(this._initExtentNodes(),this._initExtentRoads(),e=new N.default(this._extentNodes,this._extentRoads),this._outlineAnalyzeDijkstra=new P.default(e),this._graphs.each(function(e,t){n._multiFloorDijkstraMap.put(e,new C.default(t))}))}},{key:"_initExtentNodes",value:function(){var h=this;this._extentNodes=[];var c=0;this._graphs.each(function(e,t){for(var n=t.obstructExtents,r=0;r<n.length;r++){var i=n[r],a=new k.default;a.Id=c++,a.groupId=e,a.extentId=i.Id,a.extent=i;for(var o=0;o<t.nodeVector.length;o++){var s,l,u=t.nodeVector[o];u.liftType!=I.default.NaviLiftType_NULL&&y.default.pointInPolygon2d(i.points,u.point,i.pointCount)&&(s=new _.default,l=t.queryZoneByPoint(u.point),s.zone=l,s.setNode(u),s.groupId=e,s._wrappedNode=u,s._liftType=u.liftType,a.liftNodes.push(s))}h._extentNodes.push(a)}})}},{key:"_initExtentRoads",value:function(){this._extentRoads=[];for(var e=0;e<this._extentNodes.length;e++)for(var t=this._extentNodes[e],n=0;n<this._extentNodes.length;n++){var r,i,a=this._extentNodes[n];e!=n&&(r=this._checkConnection(t,a),null!=r&&(i=Math.abs(t.groupId-a.groupId),r*=0==i?1:i,i=new x.default,i.startId=t.Id,i.endId=a.Id,i.entryType=I.default.NaviRoadEntry_FORWARD,i.length=r,this._extentRoads.push(i)))}}},{key:"_checkConnection",value:function(e,t){for(var n=Number.MAX_VALUE,r=!1,i=e.groupId,a=t.groupId,o=i<a?I.default.NaviLiftEntry_DOWN:I.default.NaviLiftEntry_UP,s=0;s<e.liftNodes.length;s++){var l=e.liftNodes[s],u=l.liftEntry;if(u!=I.default.NaviLiftEntry_FORBID&&u!=o){var h=l.liftType;if(S.default.PRIORITY_LIFTONLY==this._priority){if(I.default.NaviLiftType_Lift!=h)continue}else if(S.default.PRIORITY_ESCALATORONLY==this._priority){if(I.default.NaviLiftType_Escalator!=h)continue}else if(S.default.PRIORITY_STAIRONLY==this._priority){if(I.default.NaviLiftType_Stair!=h)continue}else if(S.default.PRIORITY_ACCESSIBLEONLY==this._priority&&I.default.NaviLiftType_Accessible!=h)continue;if(h==I.default.NaviLiftType_Stair||-1!=(0,g.default)(u=l.liftFloors).call(u,a))for(var c=0;c<t.liftNodes.length;c++){var d=t.liftNodes[c];if(null!=d&&l.liftFlag==d.liftFlag)if(e.Id,t.Id,l.liftFlag,S.default.PRIORITY_LIFTFIRST==this._priority||S.default.PRIORITY_DEFAULT==this._priority){if(I.default.NaviLiftType_Lift==h||I.default.NaviLiftType_Accessible==h)return d=this._liftLessWeightGain,d;if(I.default.NaviLiftType_Escalator==h){var f=this._escalatorWeightGain;f<n&&(n=f),r=!0;break}if(I.default.NaviLiftType_Stair==h){f=this._stairGreaterWeightGain,f<n&&(n=f),r=!0;break}}else if(S.default.PRIORITY_ESCALATORFIRST==this._priority){if(I.default.NaviLiftType_Lift==h||I.default.NaviLiftType_Accessible==h){var p=this._liftWeightGain;p<n&&(n=p),r=!0;break}if(I.default.NaviLiftType_Escalator==h)return p=this._escalatorLessWightGain,p;if(I.default.NaviLiftType_Stair==h){var m=this._stairGreaterWeightGain;m<n&&(n=m),r=!0;break}}else if(S.default.PRIORITY_STAIRFIRST==this._priority){if(I.default.NaviLiftType_Lift==h){m=this._liftWeightGain,m<n&&(n=m),r=!0;break}if(I.default.NaviLiftType_Escalator==h||I.default.NaviLiftType_Accessible==h){var v=this._escalatorGreaterWeightGain;v<n&&(n=v),r=!0;break}if(I.default.NaviLiftType_Stair==h)return v=this._stairLessWeightGain,v}else{if(S.default.PRIORITY_LIFTFIRST1==this._priority||S.default.PRIORITY_STAIRFIRST1==this._priority||S.default.PRIORITY_ESCALATORFIRST1==this._priority)return this._weightBias;if(S.default.PRIORITY_LIFTONLY==this._priority||S.default.PRIORITY_ESCALATORONLY==this._priority||S.default.PRIORITY_STAIRONLY==this._priority||S.default.PRIORITY_ACCESSIBLEONLY==this._priority)return this._weightBias}}}}return r?n:null}},{key:"_getLiftNode",value:function(e,t){for(var n=0;n<t.length;n++)if(t[n].liftFlag==e)return t[n];return null}},{key:"_switchToPriority",value:function(e){this._priority==e&&this._outlineAnalyseDijkstra||(this._priority=e,this._initExtentRoads(),e=new N.default(this._extentNodes,this._extentRoads),this._outlineAnalyseDijkstra=new P.default(e))}},{key:"_getEndTransitionRoute",value:function(e){var t=e.result,n=new m.default;return n._groupId=e.groupId,n._nodeList.push(t[0]),n._pointList.push(t[0].point),n._length=0,n}},{key:"_getBeginTransitionRoute",value:function(e){var t=e.result,n=new m.default;return n._groupId=e.groupId,n._nodeList.push(t[t.length-1]),n._pointList.push(t[t.length-1].point),n._length=0,n}},{key:"_getExtentNode",value:function(e,t){for(var n=0;n<this._extentNodes.length;n++)if(this._extentNodes[n].groupId==e&&this._extentNodes[n].extentId==t)return this._extentNodes[n];return null}},{key:"_calcPredictExtentNodes",value:function(e,t,n,r){if(t=this._getExtentNode(e,t),r=this._getExtentNode(n,r),r=this._outlineAnalyseDijkstra.routeCalculate(t,r),r!=A.default.ROUTE_SUCCESS)return r;var i=this._outlineAnalyseDijkstra.getRouteCalculateResult();this._predictExtentNodes=[];for(var a=0;a<i.length;a++)this._predictExtentNodes.push(i[a]);return r}},{key:"_compareLiftFirstFunc",value:function(e,t){return e.liftType==I.default.NaviLiftType_Lift&&t.liftType==I.default.NaviLiftType_Lift?e._dist-t._dist:e.liftType==I.default.NaviLiftType_Lift?-1:t.liftType==I.default.NaviLiftType_Lift?1:e._dist-t._dist}},{key:"_compareEscalatorFirstFunc",value:function(e,t){return e.liftType==I.default.NaviLiftType_Escalator&&t.liftType==I.default.NaviLiftType_Escalator?e._dist-t._dist:e.liftType==I.default.NaviLiftType_Escalator?-1:t.liftType==I.default.NaviLiftType_Escalator?1:e._dist-t._dist}},{key:"_compareStairFirstFunc",value:function(e,t){return e.liftType==I.default.NaviLiftType_Stair&&t.liftType==I.default.NaviLiftType_Stair?e._dist-t._dist:e.liftType==I.default.NaviLiftType_Stair?-1:t.liftType==I.default.NaviLiftType_Stair?1:e._dist-t._dist}},{key:"_has_extent_node",value:function(e,t){if(null==e)return!1;for(var n=0;n<e.length;n++)if(e[n].Id==t.Id)return!0;return!1}},{key:"_has_adj_nodeId",value:function(e,t){if(null==e)return!1;for(var n=0;n<e.length;n++)if(e[n].nodeId==t.Id)return!0;return!1}},{key:"_enlarge_connected_nodes_num",value:function(e,t,n){var r=this._outlineAnalyseDijkstra._naviGraph.adjList;if(0==r.size())return[];var i=e.length-1,a=r.get(e[i].Id);if(null==a)return[];if(0==n)return this._has_adj_nodeId(a,t)?(e.push(t),e):[];for(var o=[],s=0;s<a.length;s++){var l,u=a[s];this._has_extent_node(e,u)||u.nodeId==t.Id||(l=(0,c.default)(e).call(e),u=this._outlineAnalyseDijkstra._naviGraph.getIndexByNodeID(u.nodeId),l.push(this._outlineAnalyseDijkstra._naviGraph.nodeVector[u]),l=this._enlarge_connected_nodes_num(l,t,n-1),0!=l.length&&o.push(l))}return o}},{key:"_enlarge_connected_nodes_norepeat",value:function(e,t,n){var r=this._outlineAnalyseDijkstra._naviGraph.adjList;if(0!=r.size()){for(var i,a=-1,o=0;o<n.length;o++)(0,g.default)(i=n[o]).call(i,e)==n[o].length-1&&(a=o);if(-1!=a){var s=n[a];(0,M.default)(n).call(n,a,1);var l=r.get(e.Id);if(null!=l)for(var u=0;u<l.length;u++){var h,c=this._extentNodes[l[u].nodeId];this._has_extent_node(s,c)||(h=[],h.push.apply(h,(0,E.default)(s)),h.push(c),n.push(h),c.Id!=t.Id&&this._enlarge_connected_nodes_norepeat(c,t,n))}}}}},{key:"_calcPredictConnectedLift",value:function(e,t,n){for(var r=e.liftNodes,i=n.liftNodes,a=0;a<r.length;a++){var o=r[a];o._dist=y.default.distanceOfTwoPoints(o.point,t)}S.default.PRIORITY_DEFAULT==this._priority||S.default.PRIORITY_LIFTONLY==this._priority||S.default.PRIORITY_LIFTONLY==this._priority?(0,w.default)(r).call(r,this._compareLiftFirstFunc):S.default.PRIORITY_ESCALATORFIRST==this._priority||S.default.PRIORITY_ESCALATORONLY==this._priority?(0,w.default)(r).call(r,this._compareEscalatorFirstFunc):S.default.PRIORITY_STAIRFIRST!=this._priority&&S.default.PRIORITY_STAIRONLY!=this._priority||(0,w.default)(r).call(r,this._compareLiftFirstFunc);for(var s=null,l=null,u=!1,h=0;h<r.length;h++){for(var c=r[h],d=c.liftFlag,f=(c.liftFloors,0);f<i.length;f++)if(i[f].liftFlag==d){s=c,l=i[f],u=!0;break}if(u)break}return null==s||null==l?null:{startLiftNodes:s,endLiftNodes:l}}},{key:"_calcPredictLiftNodesBak",value:function(e,t,n,r,i){this._startZone=this._multiFloorDijkstraMap.get(e.groupId)._naviGraph.queryZoneByPoint(n);for(var a=e.queryLiftNodes(this._startZone,n,this._endPoint,this._priority),o=0;o<a.length;o++){var s=a[o];if(I.default.NaviLiftType_Stair!=s.liftType){var l=s.liftFloors;if(-1==(0,g.default)(l).call(l,t.groupId))continue}for(var u=0;u<t.liftNodes.length;u++){var h=t.liftNodes[u];if(s.liftFlag==h.liftFlag){r.push(s),i.push(h);break}}}return 0==r.length}},{key:"_calcPredictLiftNodes",value:function(n,t,e,r,i){this._startZone=this._multiFloorDijkstraMap.get(n.groupId)._naviGraph.queryZoneByPoint(e);var a=[];function o(e,t){e=n.queryLifts(e,t),(t=a).push.apply(t,(0,E.default)(e))}for(var s=n.liftNodes,l=0;l<s.length;l++){var u=s[l],h=D.default.toVector(u.point),c=D.default.toVector(this._endPoint),d=D.default.toVector(e);u._dist=c.sub(h).length()+h.sub(d).length()}var f=n.extent.bb,p=f.maxX-f.minX+(f.maxY-f.minY);S.default.PRIORITY_LIFTONLY!=this._priority&&S.default.PRIORITY_ESCALATORONLY!=this._priority&&S.default.PRIORITY_STAIRONLY!=this._priority&&S.default.PRIORITY_ACCESSIBLEONLY!=this._priority||(f=null,S.default.PRIORITY_LIFTONLY==this._priority&&(f=I.default.NaviLiftType_Lift),S.default.PRIORITY_ESCALATORONLY==this._priority&&(f=I.default.NaviLiftType_Escalator),S.default.PRIORITY_STAIRONLY==this._priority&&(f=I.default.NaviLiftType_Stair),S.default.PRIORITY_ACCESSIBLEONLY==this._priority&&(f=I.default.NaviLiftType_Accessible),a=n.queryLifts(f)),S.default.PRIORITY_LIFTFIRST!=this._priority&&S.default.PRIORITY_ESCALATORFIRST!=this._priority&&S.default.PRIORITY_STAIRFIRST!=this._priority&&S.default.PRIORITY_DEFAULT!=this._priority||(S.default.PRIORITY_LIFTFIRST!=this._priority&&S.default.PRIORITY_DEFAULT!=this._priority||(o(I.default.NaviLiftType_Lift,-15),o(I.default.NaviLiftType_Escalator,-8),o(I.default.NaviLiftType_Stair,0)),S.default.PRIORITY_ESCALATORFIRST==this._priority&&(o(I.default.NaviLiftType_Lift,-8),o(I.default.NaviLiftType_Escalator,-15),o(I.default.NaviLiftType_Stair,0)),S.default.PRIORITY_STAIRFIRST==this._priority&&(o(I.default.NaviLiftType_Lift,-8),o(I.default.NaviLiftType_Escalator,0),o(I.default.NaviLiftType_Stair,-15))),S.default.PRIORITY_LIFTFIRST1!=this._priority&&S.default.PRIORITY_ESCALATORFIRST1!=this._priority&&S.default.PRIORITY_STAIRFIRST1!=this._priority||(S.default.PRIORITY_LIFTFIRST1==this._priority&&(o(I.default.NaviLiftType_Lift,-p),o(I.default.NaviLiftType_Escalator,0),o(I.default.NaviLiftType_Stair,0)),S.default.PRIORITY_ESCALATORFIRST1==this._priority&&(o(I.default.NaviLiftType_Lift,0),o(I.default.NaviLiftType_Escalator,-p),o(I.default.NaviLiftType_Stair,0)),S.default.PRIORITY_STAIRFIRST1==this._priority&&(o(I.default.NaviLiftType_Lift,0),o(I.default.NaviLiftType_Escalator,0),o(I.default.NaviLiftType_Stair,-p)));var m=this;(0,w.default)(a).call(a,function(e,t){if(e.zone!=t.zone){if(e.zone==m._startZone)return-1;if(t.zone==m._startZone)return 1}return e._dist-t._dist});for(var v=0;v<a.length;v++){var g,y=a[v];if(I.default.NaviLiftType_Stair!=y._liftType&&(g=y._wrappedNode.liftFloors,(0,b.default)(g).call(g,function(e){return e==t.groupId})),!(1==y.liftEntry&&t.groupId<n.groupId||2==y.liftEntry&&t.groupId>n.groupId))for(var _=0;_<t.liftNodes.length;_++){var x=t.liftNodes[_];if(y.liftFlag==x.liftFlag){r.push(y),i.push(x);break}}}return 0!=r.length}}]),t}(),n=n;t.default=n},function(e,t,n){n=n(594),e.exports=n},function(e,t,n){var r=n(595),i=Array.prototype;e.exports=function(e){var t=e.find;return e===i||e instanceof Array&&t===i.find?r:t}},function(e,t,n){n(596),n=n(26),e.exports=n("Array").find},function(e,t,n){"use strict";var r=n(8),i=n(57).find,a=n(136),n="find",o=!0;n in[]&&Array(1)[n](function(){o=!1}),r({target:"Array",proto:!0,forced:o},{find:function(e){return i(this,e,1<arguments.length?arguments[1]:void 0)}}),a(n)},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function t(e){(0,a.default)(this,t),this._options=e,this._options.hasOwnProperty("naviServerURL")&&null!=this._options.naviServerURL||(this._options.naviServerURL=".http://source.fengmap.com/newmap"),void 0===this._options.useStatic&&(this._options.useStatic=!1)}return(0,o.default)(t,[{key:"naviServerURL",get:function(){return this._options.naviServerURL}},{key:"useStatic",get:function(){return this._options.useStatic}}]),t}(),n=n;t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(2)),s=a(n(5)),l=a(n(6)),u=a(n(7)),n=a(n(80));function h(n){var r=c();return function(){var e,t=(0,u.default)(n),t=r?(e=(0,u.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,l.default)(this,t)}}function c(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}n=function(e){(0,s.default)(n,e);var t=h(n);function n(){var e;return(0,o.default)(this,n),e=t.call(this),e.liftId=0,e.groupId=0,e.zone=null,e._dist=0,e._wrappedNode=null,e._liftType=null,e}return n}(n.default),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var s=i(n(2)),a=i(n(3)),l=i(n(158)),u=i(n(28)),h=i(n(264)),n=function(){function o(e,t,n,r,i,a){(0,s.default)(this,o),this.Id=e,this.fid="",this.points=r,this.pointCount=r&&r.length?r.length:0,this.center=i,this.holes=a,this._type=n,this.groupID=t,this.doors=[],this.doorTypes=[],this.doorEntrys=[],this.parent=null,this.child=null,this.brothers=[],this.level=0,this.inId=0,this._area=null,this.isExtent=!1,this.bb=new l.default,this.refreshBB()}return(0,a.default)(o,[{key:"pass",get:function(){return 3&this._type},set:function(e){this._type|=e}},{key:"level",get:function(){return 31&_level},set:function(e){this._level=31&e}},{key:"area",get:function(){return null==this._area&&(this._area=u.default.calcPolygonArea2d(this.points)),this._area}},{key:"contain",value:function(e){return u.default.pointInPolygon2d(this.points,e,this.points.length-1)}},{key:"refreshBB",value:function(){this.bb.init();for(var e=0;e<this.pointCount;e++)this.bb.expandBy({x:this.points[e].x,y:this.points[e].y})}},{key:"toZone",value:function(){var e=new h.default(this.isExtent?-this.Id:this.Id,this.groupID,this._type,this.points);return e.pass=this.pass,e.level=this.level,e.inId=this.inId,pZone}}]),o}(),n=n;t.default=n},function(e,t,n){"use strict";var i=n(4),r=n(0),a=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(50)),s=a(n(31)),l=a(n(34)),u=a(n(2)),h=a(n(3)),c=a(n(5)),d=a(n(6)),f=a(n(7)),r=a(n(80)),p=a(n(55)),m=a(n(95)),v=a(n(28));function g(n){var r=y();return function(){var e,t=(0,f.default)(n),t=r?(e=(0,f.default)(this).constructor,i(t,arguments,e)):t.apply(this,arguments);return(0,d.default)(this,t)}}function y(){if("undefined"==typeof Reflect||!i)return!1;if(i.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(i(Boolean,[],function(){})),!0}catch(e){return!1}}r=function(e){(0,c.default)(n,e);var t=g(n);function n(){var e;return(0,u.default)(this,n),e=t.call(this),e.groupId=0,e.extentId=0,e.liftNodes=[],e._zone=null,e._firstPriorityOffset=15,e._secondPriorityOffset=8,e}return(0,h.default)(n,[{key:"queryLifts",value:function(){if(1==arguments.length){for(var e=arguments[0],t=[],n=0;n<this.liftNodes.length;n++)e==this.liftNodes[n]._liftType&&t.push(this.liftNodes[n]);return t}if(2!=arguments.length)return[];for(var e=arguments[0],r=arguments[1],i=[],n=0;n<this.liftNodes.length;n++){var a=this.liftNodes[n];e==a._liftType&&(a._dist=a._dist+r,i.push(a))}return i}},{key:"queryLiftNodes",value:function(e,t,n,r){this._zone=e;var i=[];i.push.apply(i,(0,l.default)(this.liftNodes));for(var a=0;a<i.length;a++){var o=i[a];o._dist=v.default.distanceOfTwoPoints(n,o.point)+v.default.distanceOfTwoPoints(o.point,t)}return this._liftNodeSort(i,r)}},{key:"_liftNodeSort",value:function(e,t){if(t==m.default.PRIORITY_LIFTFIRST1){var n=(0,o.default)(n=this._sortLiftFirst).call(n,this);(0,s.default)(e).call(e,n)}else if(t==m.default.PRIORITY_ESCALATORFIRST1){var r=(0,o.default)(r=this._sortEscalatorFirst).call(r,this);(0,s.default)(e).call(e,r)}else if(t!=m.default.PRIORITY_STAIRFIRST1)r=(0,o.default)(r=this._sortStairFirst).call(r,this),(0,s.default)(e).call(e,r);else{this._modifyDistance(e,t);for(var i=[],a=0;a<e.length;a++)e[a]._dist&&i.push(e[a]);e=[],(t=e).push.apply(t,i),t=(0,o.default)(t=this._sortDistFunc).call(t,this),(0,s.default)(e).call(e,t)}return e}},{key:"_sortLiftFirst",value:function(e,t){if(e.zone!=t.zone){if(this._zone==e.zone)return-1;if(this._zone==t.zone)return 1}return e.liftType!=p.default.NaviLiftType_Lift&&e.liftType!=p.default.NaviLiftType_Accessible||t.liftType!=p.default.NaviLiftType_Lift&&t.liftType!=p.default.NaviLiftType_Accessible?e.liftType==p.default.NaviLiftType_Lift||e.liftType==p.default.NaviLiftType_Accessible?-1:t.liftType==p.default.NaviLiftType_Lift||t.liftType==p.default.NaviLiftType_Accessible?1:e._dist-t._dist:e._dist<t._dist}},{key:"_sortEscalatorFirst",value:function(e,t){if(e.zone!=t.zone){if(this._zone==e.zone)return-1;if(this._zone==t.zone)return 1}return e.liftType==p.default.NaviLiftType_Escalator&&t.liftType==p.default.NaviLiftType_Escalator?e._dist<t._dist:e.liftType==p.default.NaviLiftType_Escalator?-1:t.liftType==p.default.NaviLiftType_Escalator?1:e._dist-t._dist}},{key:"_sortStairFirst",value:function(e,t){if(e.zone!=t.zone){if(this._zone==e.zone)return-1;if(this._zone==t.zone)return 1}return e.liftType==p.default.NaviLiftType_Stair&&t.liftType==p.default.NaviLiftType_Stair?e._dist<t._dist:e.liftType==p.default.NaviLiftType_Stair?-1:t.liftType==p.default.NaviLiftType_Stair?1:e._dist-t._dist}},{key:"_sortDistFunc",value:function(e,t){if(e.zone!=t.zone){if(this._zone==e.zone)return-1;if(this._zone==t.zone)return 1}return e._dist-t._dist}},{key:"_modifyDistance",value:function(e,t){if(t==m.default.PRIORITY_DEFAULT)for(var n=0;n<e.length;n++)e[n].liftType==p.default.NaviLiftType_Escalator?e[n]._dist-=this._firstPriorityOffset:e[n].liftType!=p.default.NaviLiftType_Lift&&e[n].liftType!=p.default.NaviLiftType_Accessible||(e[n]._dist-=this._secondPriorityOffset);else if(t==m.default.PRIORITY_STAIRFIRST)for(var r=0;r<e.length;r++)e[r].liftType==p.default.NaviLiftType_Stair?e[r]._dist-=this._firstPriorityOffset:e[r].liftType==p.default.NaviLiftType_Escalator&&(e[r]._dist-=this._secondPriorityOffset);else if(t==m.default.PRIORITY_ESCALATORFIRST)for(var i=0;i<e.length;i++)e[i].liftType==p.default.NaviLiftType_Escalator?e[i]._dist-=this._firstPriorityOffset:e[i].liftType!=p.default.NaviLiftType_Lift&&e[i].liftType!=p.default.NaviLiftType_Accessible||(e[i]._dist-=this._secondPriorityOffset);else if(t==m.default.PRIORITY_LIFTFIRST)for(var a=0;a<e.length;a++)e[a].liftType==p.default.NaviLiftType_Lift||e[a].liftType==p.default.NaviLiftType_Accessible?e[a]._dist-=this._firstPriorityOffset:e[a].liftType==p.default.NaviLiftType_Escalator&&(e[a]._dist-=this._secondPriorityOffset);else if(t==m.default.PRIORITY_STAIRONLY)for(var o=0;o<e.length;o++)e[o].liftType!=p.default.NaviLiftType_Stair&&(e[o]._dist=null);else if(t==m.default.PRIORITY_ESCALATORONLY)for(var s=0;s<e.length;s++)e[s].liftType!=p.default.NaviLiftType_Escalator&&(e[s]._dist=null);else if(t==m.default.PRIORITY_LIFTONLY)for(var l=0;l<e.length;l++)e[l].liftType!=p.default.NaviLiftType_Lift&&e[l].liftType!=p.default.NaviLiftType_Accessible&&(e[l]._dist=null);else if(t==m.default.PRIORITY_ACCESSIBLEONLY)for(var u=0;u<e.length;u++)e[u].liftType!=p.default.NaviLiftType_Accessible&&(e[u]._dist=null)}}]),n}(r.default),t.default=r},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var d=i(n(35)),c=i(n(54)),C=i(n(13)),D=i(n(15)),O=i(n(9)),f=i(n(122)),l=i(n(63)),g=i(n(31)),p=i(n(34)),a=i(n(2)),o=i(n(3)),R=i(n(28)),B=i(n(55)),s=i(n(68)),u=i(n(265)),F=i(n(80)),U=i(n(164)),h=i(n(97)),m=i(n(166)),z=i(n(165)),v=i(n(69));i(n(163)),i(n(602)),n=function(){function t(e){(0,a.default)(this,t),this._startModel=null,this._endModel=null,this._naviGraph=e,this._zoneMap=new h.default,this._zoneIdGraph=new h.default,this._originDijkstra=null,this._zoneIdSimpleDijkstraMap=new h.default,this._resultVector=[],this._startZoneId=Number.INT_MIN,this._endZoneId=Number.INT_MIN,this._tmpId=-1,this._startNode=null,this._endNode=null,this._mode=s.default.MODULE_SHORTEST,this._zonePNTModelsMap=new h.default,this._zoneNPModelsMap=new h.default,this._modelIdRoadsMap=new h.default,this._variableModelPairs=[],this._unattachedTempRoads=[],this._attachedTempRoads=[],this._unattachedTempRoadTrees=[],this._kScaleVariable=100,this._kRemainedZoneId=-1,this._kMinModelAngle=15,this._kDoorToler=.1,this._tmpAdjNodeIds=[],this._assignedPts=[],this._newTempRoads=[],this._bannedPolys=[],this._assignedNodes=[],this._segmentByZones(),this._assemblePassNotThroughModels(),this._assembleNotPassModels(),this._fitVariableRoadsToModel(),this._adjustNPModelRoads()}return(0,o.default)(t,[{key:"routeCalculate",value:function(e,t,n){if(this._startZoneId=e instanceof F.default?this._calcZoneIdByCoord(e.point):this._calcZoneIdByCoord(e),this._endZoneId=t instanceof F.default?this._calcZoneIdByCoord(t.point):this._calcZoneIdByCoord(t),n&&(this._mode=n),this._naviGraph.consoleNodeInfos(),this._naviGraph.consoleRoadInfos(),e instanceof F.default)this._startNode=e;else if(v.default.ROUTE_FAILED_NO_DATA_START==this._processStartPoint(e,e))return v.default.ROUTE_FAILED_NO_DATA_START;if(this._naviGraph.consoleNodeInfos(),this._naviGraph.consoleRoadInfos(),t instanceof F.default)this._endNode=t;else if(v.default.ROUTE_FAILED_NO_DATA_END==this._processEndPoint(t,e instanceof F.default?e.point:e))return v.default.ROUTE_FAILED_NO_DATA_END;return this._naviGraph.consoleNodeInfos(),this._naviGraph.consoleRoadInfos(),null==this._startNode?v.default.ROUTE_FAILED_NO_DATA_START:null==this._endNode?v.default.ROUTE_FAILED_NO_DATA_END:(this._naviGraph.consoleNodeInfos(),this._naviGraph.consoleRoadInfos(),this._naviGraph.consoleAdjInfos(),this._routeCalculate())}},{key:"routeAssigned",value:function(){var e;this._assignedNodes=[];for(var t=0;t<this._assignedPts.length;t++){var n=this._assignedPts[t],n={x:n[0],y:n[1]},r=this._calcZoneIdByCoord(n),n=this._insertTmpIsolatedNode(r,n);this._assignedNodes.push(n)}(e=this._resultVector).push.apply(e,(0,p.default)(this._assignedNodes))}},{key:"assignedPts",get:function(){return this._assignedPts},set:function(e){this._assignedPts=e}},{key:"getRouteCalculateResult",value:function(){return this._resultVector}},{key:"dispose",value:function(){this._startModel=null,this._endModel=null,this._naviGraph.dispose(),this._naviGraph=null,this._zoneMap.clear(),this._zoneMap=null,this._zoneIdGraph.each(function(e,t){t.dispose()}),this._zoneIdGraph.clear(),this._zoneIdGraph=null,null!=this._originDijkstra&&(this._originDijkstra.dispose(),this._originDijkstra=null),this._zoneIdSimpleDijkstraMap.each(function(e,t){t.dispose()}),this._zoneIdSimpleDijkstraMap.clear(),this._zoneIdSimpleDijkstraMap=null,this._resultVector=[],this._startNode=null,this._endNode=null,this._zonePNTModelsMap.clear(),this._zonePNTModelsMap=null,this._zoneNPModelsMap.clear(),this._zoneNPModelsMap=null,this._modelIdRoadsMap.clear(),this.__zoneNPModelsMap=null,this._variableModelPairs=[],this._unattachedTempRoads=[],this._attachedTempRoads=[],this._unattachedTempRoadTrees=[]}},{key:"reset",value:function(){this._resultVector=[],this._clearTempElements(-1),this._clearTempElements(this._startZoneId),this._startZoneId=Number.INT_MIN,this._clearTempElements(this._endZoneId),this._endZoneId=Number.INT_MIN,this._clearTempAdjList(),this._tmpAdjNodeIds=[];var e=this._naviGraph.roadVector.length;this._tmpId<-2*e&&(this._tmpId=-1);for(var t=0;t<this._variableModelPairs.length;t++){var n=this._variableModelPairs[t];this._switchVariableHinderTo(n.zoneId,n.model,B.default.NaviRoadHinderType_HINDER_HIGH)}this._variableModelPairs=[],this._unattachedTempRoads=[],this._attachedTempRoads=[],this._unattachedTempRoadTrees=[]}},{key:"resetBanned",value:function(){this._newTempRoads=[];for(var e=0;e<this._noEntryRoads.length;e++){var t=this._noEntryRoads[e];t.road.roadEntry=t.originEntry}this._noEntryRoads=[],this._clearTempElements(-1);var n=this._zoneIdSimpleDijkstraMap.get(-1)._naviGraph;n.makeUpAdjList()}},{key:"setBannedPoltyons",value:function(e){this.resetBanned(),0!=e.length&&(this._bannedPolys=e,this._dealBannedAreas())}},{key:"clearBannedArea",value:function(){}},{key:"_dealBannedAreas",value:function(){for(var e=0;e<this._bannedPolys.length;e++)this._banBySinglePolygon(this._bannedPolys[e])}},{key:"_insertNewTempRoad",value:function(e,t,n,r,i){var a,o;e instanceof F.default?a=e:(a=new F.default,a.Id=t,a.point=e,this._naviGraph.nodeVector.push(a)),n instanceof F.default?o=n:(o=new F.default,o.Id=r,o.point=n,this._naviGraph.nodeVector.push(o)),n=new U.default,n.Id=this._tmpId--,n.startId=a.Id,n.startPoint=a.point,n.endId=o.Id,n.endPoint=o.point,n.roadEntry=i,this._naviGraph.roadVector.push(n)}},{key:"_banBySinglePolygon",value:function(e){for(var t=this._naviGraph.queryRoadsByPolygon(e),n=0;n<t.length;n++){var r=t[n],i=r.road,a=i.roadEntry;this._noEntryRoads.push({road:i,originEntry:a}),i.roadEntry=B.default.NaviRoadEntry_FORBID,1==r.crss.length&&(1==R.default.pointInPolygon2d(e,i.startPoint,e.length)?this._insertNewTempRoad(r.crss[0],this._tmpId--,i.endPoint,this._tmpId--,a):this._insertNewTempRoad(i.startPoint,this._tmpId--,r.crss[0],this._tmpId--,a)),2==r.crss.length&&(this._insertNewTempRoad(i.startPoint,this._newTempId(),r.crss[0],this._newTempId(),a),this._insertNewTempRoad(r.crss[1],this._newTempId(),i.endPoint,this._newTempId(),a))}var o=new NaviModel;o.Id=this._tmpId--,o.points=e,o.points.push(e[0]),o.pass=B.default.NaviModelPassType_NOT_PASS,this._naviGraph.obstructModels.push(o)}},{key:"_newTempId",value:function(){return this._tmpId--}},{key:"_calcPointReachable",value:function(e){var t=this._naviGraph.queryContainExtentId(e);if(-1==t)return null;var n=this._calcZoneIdByCoord(e),r=-0,i=this._zoneIdGraph.get(n).findModel(e,r);if(null==i)return{extentId:t,model:null};if(i.pass==B.default.NaviModelPassType_PASS_THROUGH||i.pass==B.default.NaviModelPassType_PASS_NOT_THROUGH){if(0<i.doors.length)return{extentId:t,model:i};for(var a={},o=[],s=[],r=this._zoneIdGraph.get(n),l=r.roadVector,u=!0,h=i.points.length,c=0;c<h-1;c++)for(var d=i.points[c],f=i.points[c+1],p=0;p<l.length;p++){var m=l[p];1==R.default.calcCrossPoint(d,f,m.startPoint,m.endPoint,a)&&(u=!1,B.default.NaviRoadEntry_FORBID!=m.roadEntry&&(m=new Object,m.x=a.x,m.y=a.y,o.push(m),s.push(l[p])))}if(u)return{extentId:t,model:i};if(0==o.length)return null;i.doors=[],i.doorEntrys=[],i.doorTypes=[];for(var v=0;v<o.length;v++){var g=o[v],y=s[v],g=this._insertNodeToRoad(n,g,y);g.nodeType=B.default.NaviNodeType_COMMON,y.roadEntry==B.default.NaviRoadEntry_BOTH?g.entranceType=B.default.NaviEntranceType_ACCESS:R.default.pointInPolygon2d(i.points,y.startPoint,i.points.length-1)?(y.roadEntry==B.default.NaviRoadEntry_FORWARD&&(g.entranceType=B.default.NaviEntranceType_EXIT),y.roadEntry==B.default.NaviRoadEntry_BACK&&(g.entranceType=B.default.NaviEntranceType_ENTRANCE)):(y.roadEntry==B.default.NaviRoadEntry_FORWARD&&(g.entranceType=B.default.NaviEntranceType_ENTRANCE),y.roadEntry==B.default.NaviRoadEntry_BACK&&(g.entranceType=B.default.NaviEntranceType_EXIT)),i.doors.push(g),i.doorEntrys.push(g.entranceType),i.doorTypes.push(g.nodeType)}}return i.pass!=B.default.NaviModelPassType_NOT_PASS?{extentId:t,model:i}:null}},{key:"_processStartPoint",value:function(r,e){var i=this;this._startNode=this._insertTmpIsolatedNode(this._startZoneId,r);var t=null,a=!0,t=null!=this._startModel&&this._startModel.pass==B.default.NaviModelPassType_PASS_THROUGH&&0==this._startModel.doors.length?this._seekNearRoads(this._startZoneId,r,e,30,this._startModel):this._seekNearRoads(this._startZoneId,r,e);if(null==this._startModel&&(a=!1),0<t.size()){a=!1,t.each(function(e,t,n){for(n=0;n<t.length;n++)0!=t[n].road.roadEntry&&(a=!0)});var o=0,s=!1,l=[];if(t.each(function(e,t){var n=t[0].road,t=i._exploreUprightLikelyJoints(i._startZoneId,r,n,t,i._startModel);0==t.length?o++:Math.abs(t[0].rotateAngle)>R.default.epsilon()?l.push.apply(l,(0,p.default)(t)):(s=!0,t=i._insertTempNodeToRoad(i._startZoneId,t[0].cross,t[0].road),i._joinTwoNodes(i._startZoneId,i._startNode,t))}),s||(0,d.default)(l).call(l,function(e){e=i._insertTempNodeToRoad(i._startZoneId,e.cross,e.road),i._joinTwoNodes(i._startZoneId,i._startNode,e)}),o==t.size())return v.default.ROUTE_FAILED_NO_DATA_START}if(a&&null!=this._startModel&&0<this._startModel.doors.length){for(var n=null,u=!1,h=0;h<this._startModel.doors.length;h++){var n=this._startModel.doors[h],c=this._startModel.doorEntrys[h];c!=B.default.NaviEntranceType_EXIT&&c!=B.default.NaviEntranceType_ACCESS||(this._joinTwoNodes(this._startZoneId,this._startNode,n),u=!0)}if(!u)return v.default.ROUTE_FAILED_NO_DATA_START}}},{key:"_processEndPoint",value:function(r,e){var i=this;this._endNode=this._insertTmpIsolatedNode(this._endZoneId,r);var t=null,a=!0,t=null!=this._endModel&&this._endModel.pass==B.default.NaviModelPassType_PASS_THROUGH&&0==this._endModel.doors.length?this._seekNearRoads(this._endZoneId,r,e,30,this._endModel):this._seekNearRoads(this._endZoneId,r,e);if(null==this._endModel&&(a=!1),0<t.size()){a=!1,t.each(function(e,t,n){for(n=0;n<t.length;n++)0!=t[n].road.roadEntry&&(a=!0)});var o=0,s=!1,l=[];if(t.each(function(e,t){var n=t[0].road,t=i._exploreUprightLikelyJoints(i._endZoneId,r,n,t,i._endModel);0==t.length?o++:Math.abs(t[0].rotateAngle)>R.default.epsilon()?l.push.apply(l,(0,p.default)(t)):(s=!0,t=i._insertTempNodeToRoad(i._endZoneId,t[0].cross,t[0].road),i._joinTwoNodes(i._endZoneId,i._endNode,t))}),s||(0,d.default)(l).call(l,function(e){e=i._insertTempNodeToRoad(i._endZoneId,e.cross,e.road),i._joinTwoNodes(i._endZoneId,i._endNode,e)}),o==t.size())return v.default.ROUTE_FAILED_NO_DATA_END}if(a&&null!=this._endModel&&0<this._endModel.doors.length){for(var n=null,u=!1,h=0;h<this._endModel.doors.length;h++){var n=this._endModel.doors[h],c=this._endModel.doorEntrys[h];c!=B.default.NaviEntranceType_ENTRANCE&&c!=B.default.NaviEntranceType_ACCESS||(this._joinTwoNodes(this._endZoneId,this._endNode,n),u=!0)}if(!u)return v.default.ROUTE_FAILED_NO_DATA_END}}},{key:"_routeCalculate",value:function(){var e=this._isPointInPNTModel(this._startNode.point);if(e&&(this._switchVariableHinderTo(this._startZoneId,e,B.default.NaviRoadHinderType_HINDER_GENERAL),this._variableModelPairs.push({zoneId:this._startZoneId,model:e})),e=this._isPointInPNTModel(this._endNode.point),e&&(this._switchVariableHinderTo(this._endZoneId,e,B.default.NaviRoadHinderType_HINDER_GENERAL),this._variableModelPairs.push({zoneId:this._endZoneId,model:e})),this._resultVector=[],this._startZoneId==this._endZoneId){var t=this._zoneIdSimpleDijkstraMap.get(this._startZoneId),n=t.routeCalculate(this._startNode,this._endNode,this._mode);if(n!=v.default.ROUTE_SUCCESS)return n;var r=t.getRouteCalculateResult();this._resultVector=[],(0,c.default)(r).call(r),(n=this._resultVector).push.apply(n,(0,p.default)(r))}else{if(-1!=this._startZoneId&&-1==this._endZoneId){if(t=this._findNearZoneDoor(this._startNode.point,this._startZoneId,B.default.NaviEntranceType_EXIT),n=this._zoneIdSimpleDijkstraMap.get(this._startZoneId),r=n.routeCalculate(this._startNode,t,this._mode),r!=v.default.ROUTE_SUCCESS)return r;var i=n.getRouteCalculateResult(i),n=this._zoneIdSimpleDijkstraMap.get(-1),r=n.routeCalculate(t,this._endNode,this._mode);if(r!=v.default.ROUTE_SUCCESS)return r;r=n.getRouteCalculateResult(),(0,c.default)(i).call(i),(0,c.default)(r).call(r),(n=this._resultVector).push.apply(n,(0,p.default)(i)),(i=this._resultVector).push.apply(i,(0,p.default)(r))}if(-1==this._startZoneId&&-1!=this._endZoneId){var a=this._findNearZoneDoor(this._endNode.point,this._endZoneId,B.default.NaviEntranceType_ENTRANCE),o=this._zoneIdSimpleDijkstraMap.get(this._endZoneId),s=o.routeCalculate(a,this._endNode,this._mode);if(s!=v.default.ROUTE_SUCCESS)return s;var l=o.getRouteCalculateResult(),o=this._zoneIdSimpleDijkstraMap.get(-1),s=o.routeCalculate(this._startNode,a,this._mode);if(s!=v.default.ROUTE_SUCCESS)return s;a=o.getRouteCalculateResult(),(0,c.default)(a).call(a),(0,c.default)(l).call(l),(s=this._resultVector).push.apply(s,(0,p.default)(a)),(o=this._resultVector).push.apply(o,(0,p.default)(l))}if(-1!=this._startZoneId&&-1!=this._endZoneId){if(s=this._findNearZoneDoor(this._startNode.point,this._startZoneId,B.default.NaviEntranceType_EXIT),a=this._zoneIdSimpleDijkstraMap.get(this._startZoneId),o=a.routeCalculate(this._startNode,s,this._mode),o!=v.default.ROUTE_SUCCESS)return o;var u=a.getRouteCalculateResult(u),l=this._findNearZoneDoor(this._endNode.point,this._endZoneId,B.default.NaviEntranceType_ENTRANCE),a=this._zoneIdSimpleDijkstraMap.get(this._endZoneId),o=a.routeCalculate(l,this._endNode,this._mode);if(o!=v.default.ROUTE_SUCCESS)return o;var h=a.getRouteCalculateResult(h),a=this._zoneIdSimpleDijkstraMap.get(-1);if(o=a.routeCalculate(s,l,this._mode),o!=v.default.ROUTE_SUCCESS)return o;o=a.getRouteCalculateResult(),(0,c.default)(u).call(u),(0,c.default)(o).call(o),(0,c.default)(h).call(h),(a=this._resultVector).push.apply(a,(0,p.default)(u)),(u=this._resultVector).push.apply(u,(0,p.default)(o)),(o=this._resultVector).push.apply(o,(0,p.default)(h))}}return v.default.ROUTE_SUCCESS}},{key:"_getIndexFormID",value:function(e,t,n){for(var r=0;r<t;r++)if(null!=e[r]&&e[r].Id==n)return r;return-1}},{key:"_calcZoneIdByCoord",value:function(e){for(var t=this._naviGraph.zones,n=0;n<t.length;n++){var r=t[n];if(r.contain(e))return r.Id}return-1}},{key:"_segmentByZones",value:function(){for(var n=this,e=this._naviGraph.zones,t=0;t<e.length;t++){var r=e[t],i=this._sliceGraph(this._naviGraph,r);this._zoneIdGraph.put(r.Id,i)}this._zoneIdGraph.put(-1,this._naviGraph),this._zoneIdGraph.each(function(e,t){t.simplify(),n._zoneIdSimpleDijkstraMap.put(e,new m.default(t))}),this._zoneIdGraph.each(function(e,t){t.consoleNodeInfos(),t.consoleRoadInfos()})}},{key:"_sliceGraph",value:function(e,t){if(e&&t){for(var n,r=0,i=0,a=e.roadVector.length,o=e.nodeVector.length,s=e.roadVector,l=e.nodeVector,u=0,h=new Int8Array(a),c=0;c<a;c++)s[c]&&s[c].roadEntry!=B.default.NaviRoadEntry_FORBID&&(n=s[c],r=t.contain(n.startPoint),i=t.contain(n.endPoint),0==r&&0==i||(u=!0),1==r&&1==i&&(h[c]=1),1==r&&0==i&&(h[c]=2),0==r&&1==i&&(h[c]=3),0==r&&0==i&&(h[c]=4),2==r&&0==i&&(h[c]=6),2==r&&1==i&&(h[c]=7),0==r&&2==i&&(h[c]=8),1==r&&2==i&&(h[c]=9));if(0==u)return null;for(var d,f,p,m,v,g,y=new Array(o),_=new Array(a),x=0,w=new Int8Array(o),b=h.length,M=0,T=b;M<T;M++)0!=h[M]&&6!=h[M]&&8!=h[M]&&1!=h[M]&&s[M]&&(d=s[M],f=d.roadEntry,v=[d.Id],2==h[M]||9==h[M]?(p=null,p=2==h[M]?t.calcCrossPoint(d.startPoint,d.endPoint):(0,C.default)({},d.endPoint),g=new F.default,g.Id=this._naviGraph.generateNodeId(),g.nodeType=B.default.NaviNodeType_COMMON,g.liftType=B.default.NaviLiftType_NULL,g.entranceType=B.default.NaviEntranceType_ACCESS,g.point=(0,C.default)({},p),m=new U.default,m.setRoad(d),m.Id=this._naviGraph.generateRoadId(),v.push(m.Id),g.segLinks=v,p=new F.default,p.setNode(g),f==B.default.NaviRoadEntry_FORWARD?p.entranceType=B.default.NaviEntranceType_EXIT:f==B.default.NaviRoadEntry_BACK&&(p.entranceType=B.default.NaviEntranceType_ENTRANCE),t._linkAccessNodes.push(p),x=this._getIndexFormID(l,o,m.endId),m.endPoint=(0,C.default)({},p.point),m.pointVector[1]=(0,C.default)({},p.point),m.endId=p.Id,m.calcLength(),_[M]=m,y[x]=p,x=this._getIndexFormID(l,o,m.startId),y[x]=l[x],(0,D.default)(p=y[x].segLinks).call(p,(0,O.default)(p=y[x].segLinks).call(p,d.Id),1,m.Id),m=new F.default,m.setNode(g),d.startId=m.Id,d.startPoint=(0,C.default)({},m.point),d.pointVector[0]=(0,C.default)({},m.point),d.calcLength(),(0,D.default)(g=l[x].segLinks).call(g,(0,O.default)(g=l[x].segLinks).call(g,d.Id),1),l.push(m),w[x]=2):3!=h[M]&&7!=h[M]||(g=null,g=3==h[M]?t.calcCrossPoint(d.startPoint,d.endPoint):(0,C.default)({},d.startPoint),m=new F.default,m.Id=this._naviGraph.generateNodeId(),m.nodeType=B.default.NaviNodeType_COMMON,m.liftType=B.default.NaviLiftType_NULL,m.entranceType=B.default.NaviEntranceType_ACCESS,m.point=(0,C.default)({},g),g=new U.default,g.setRoad(d),g.Id=this._naviGraph.generateRoadId(),v.push(g.Id),m.segLinks=v,v=new F.default,v.setNode(m),f==B.default.NaviRoadEntry_FORWARD?v.entranceType=B.default.NaviEntranceType_ENTRANCE:f==B.default.NaviRoadEntry_BACK&&(v.entranceType=B.default.NaviEntranceType_EXIT),t._linkAccessNodes.push(v),x=this._getIndexFormID(l,o,g.startId),g.startPoint=(0,C.default)({},v.point),g.pointVector[0]=(0,C.default)({},v.point),g.startId=v.Id,g.calcLength(),_[M]=g,y[x]=v,x=this._getIndexFormID(l,o,g.endId),y[x]=l[x],(0,D.default)(v=y[x].segLinks).call(v,(0,O.default)(v=y[x].segLinks).call(v,d.Id),1,g.Id),g=new F.default,g.setNode(m),d.endId=g.Id,d.endPoint=(0,C.default)({},g.point),d.pointVector[1]=(0,C.default)({},g.point),d.calcLength(),(0,D.default)(m=l[x].segLinks).call(m,(0,O.default)(m=l[x].segLinks).call(m,d.Id),1),l.push(g),w[x]=2));for(var E,S=0,A=b;S<A;S++)1==h[S]&&(E=s[S],E&&(_[S]=E,x=this._getIndexFormID(l,o,E.startId),2!=w[x]&&(y[x]=l[x],w[x]=1),x=this._getIndexFormID(l,o,E.endId),2!=w[x]&&(y[x]=l[x],w[x]=1),s[S]=null));for(var I=0;I<o;I++)1==w[I]&&(l[I]=null);for(var b=new z.default(y,_,!0,1),L=[],R=e.obstructModels,N=0;N<R.length;N++){var k,P=R[N];P&&(k=this._modelInZone(P,t),k&&L.push(P))}return(e=b.obstructModels).push.apply(e,L),b}}},{key:"_assemblePassNotThroughModels",value:function(){var o=this;this._zoneIdGraph.each(function(e,t){for(var n=t.obstructModels,r=0;r<n.length;r++){var i,a=n[r];B.default.NaviModelPassType_PASS_NOT_THROUGH==a.pass&&(i=o._zonePNTModelsMap.get(e),i||(i=[],o._zonePNTModelsMap.put(e,i)),i.push(a))}}),this._zonePNTModelsMap.each(function(e,t){for(var n=0;n<t.length;n++)t[n].fid})}},{key:"_assembleNotPassModels",value:function(){var o=this;this._zoneIdGraph.each(function(e,t){for(var n=t.obstructModels,r=0;r<n.length;r++){var i,a=n[r];B.default.NaviModelPassType_NOT_PASS==a.pass&&(i=o._zoneNPModelsMap.get(e),i||(i=[],o._zoneNPModelsMap.put(e,i)),i.push(a))}}),this._zoneNPModelsMap.each(function(e,t){for(var n=0;n<t.length;n++)t[n].fid})}},{key:"_fitVariableRoadsToModel",value:function(){var s=this;this._zonePNTModelsMap.each(function(e,t){for(var n=s._zoneIdGraph.get(e).roadVector,r=0;r<t.length;r++){for(var i=t[r],a=0;a<n.length;a++){var o=n[a].calcMiddlePoint();R.default.pointInPolygon2d(i.points,o,i.pointCount)&&(n[a].length=n[a].length*s._kScaleVariable,o=s._modelIdRoadsMap.get(i.Id),o||(o=[],s._modelIdRoadsMap.put(i.Id,o)),o.push(n[a]))}s._switchVariableHinderTo(e,i,B.default.NaviRoadHinderType_HINDER_HIGH)}})}},{key:"_adjustNPModelRoads",value:function(){var p=this;this._zoneNPModelsMap.each(function(e,t){for(var n=p._zoneIdGraph.get(e),r=n.roadVector,i=0;i<t.length;i++)for(var a=t[i],o=0;o<r.length;o++){var s=r[o],l=s.roadEntry,u=s.calcMiddlePoint();if(R.default.pointInPolygon2d(a.points,u,a.pointCount-1)){if(s.length=Number.MAX_VALUE,l==B.default.NaviRoadEntry_BOTH||l==B.default.NaviRoadEntry_FORWARD){var h=p._zoneIdGraph.get(e).adjList.get(s.startId);if(h)for(var c=0;c<h.length;c++)h[c].nodeId==s.endId&&(h[c].length=s.length)}if(s.roadEntry==B.default.NaviRoadEntry_BOTH||s.roadEntry==B.default.NaviRoadEntry_BACK){var d=p._zoneIdGraph.get(e).adjList.get(s.endId);if(d)for(var f=0;f<d.length;f++)d[f].nodeId==s.startId&&(d[f].length=s.length)}}}})}},{key:"_switchVariableHinderTo",value:function(e,t,n){var r=this._modelIdRoadsMap.get(t.Id);if(r){if(B.default.NaviRoadHinderType_HINDER_HIGH==n)for(var i=0;i<r.length;i++){var a=r[i];if(a.calcLength(),a.length=r.length*this._kScaleVariable,a.roadEntry==B.default.NaviRoadEntry_BOTH||a.roadEntry==B.default.NaviRoadEntry_FORWARD){var o=this._zoneIdGraph.get(e).adjList.get(a.startId);if(o)for(var s=0;s<o.length;s++)o[s].nodeId==a.endId&&(o[s].length=a.length)}if(a.roadEntry==B.default.NaviRoadEntry_BOTH||a.roadEntry==B.default.NaviRoadEntry_BACK){var l=this._zoneIdGraph.get(e).adjList.get(a.endId);if(l)for(var u=0;u<l.length;u++)l[u].nodeId==a.startId&&(l[u].length=a.length)}}if(B.default.NaviRoadHinderType_HINDER_GENERAL==n)for(var h=0;h<r.length;h++){var c=r[h];if(c.calcLength(),c.roadEntry==B.default.NaviRoadEntry_BOTH||c.roadEntry==B.default.NaviRoadEntry_FORWARD){var d=this._zoneIdGraph.get(e).adjList.get(c.startId);if(d)for(var f=0;f<d.length;f++)d[f].nodeId==c.endId&&(d[f].length=c.length)}if(c.roadEntry==B.default.NaviRoadEntry_BOTH||c.roadEntry==B.default.NaviRoadEntry_BACK){var p=this._zoneIdGraph.get(e).adjList.get(c.endId);if(p)for(var m=0;m<p.length;m++)p[m].nodeId==c.startId&&(p[m].length=c.length)}}}}},{key:"_findNearZoneDoor",value:function(e,t,n){var r=this._naviGraph.getZone(t);if(null==r)return null;for(var i=this._zoneIdGraph.get(t).findModel(e,a),a=i.area,o=Number.MAX_VALUE,s=null,l=0;l<r._linkAccessNodes.length;l++){var u,h=r._linkAccessNodes[l],c=R.default.distanceOfTwoPoints(h.point,e);h.entranceType!=B.default.NaviEntranceType_ACCESS&&h.entranceType!=n||c<o&&(u=this._findMinAreaNearestObstructModel(t,h.point),u!=i&&u.pass==B.default.NaviModelPassType_PASS_NOT_THROUGH||(o=c,s=h))}return s}},{key:"_findMinAreaNearestObstructModel",value:function(e,t){for(var n=null,e=this._zoneIdGraph.get(e),r=Number.MAX_VALUE,i=Number.MAX_VALUE,a=null,o=e.obstructModels,s=0;s<o.length;s++){var l=o[s],u=R.default.pointToPolygon2d(l.points,t,l.points.length-1);u<i&&(i=u,a=l),this._kDoorToler>u&&(u=l.area,u<r&&(r=u,n=l))}return null==n?a:n}},{key:"_modelInZone",value:function(e,t){return!e.bb.isSeparate(t.bb)&&(e=e.center,!!R.default.pointInPolygon2d(t.points,e,t.pointCount))}},{key:"_insertTempNodeToRoad",value:function(e,t,n){var r=(0,f.default)(h=this._tmpAdjNodeIds).call(h,function(e){return e==n.startId}),i=(0,f.default)(c=this._tmpAdjNodeIds).call(c,function(e){return e==n.endId});null==r&&this._tmpAdjNodeIds.push(n.startId),null==i&&this._tmpAdjNodeIds.push(n.endId);for(var a=this._unattachedTempRoadTrees,o=null,s=0;s<a.length;s++)if(a[s]._wrappedRoad==n){o=a[s];break}if(null==o)o={},o._wrappedRoad=n,a.push(o);else for(;null!=o._fromChild;)var l=o._fromChild._wrappedRoad,o=R.default.pointIsInRect1(t,l.startPoint,l.endPoint)?o._fromChild:o._toChild;n=o._wrappedRoad;var u=new F.default;u.Id=this._newTmpId(),u.point=t;var h=new U.default;h.Id=this._newTmpId(),h.startId=n.startId,h.startPoint=n.startPoint,h.endId=u.Id,h.endPoint=u.point,h.pointVector=[n.startPoint,u.point],h.roadRank=n.roadRank;var c=new U.default;c.Id=this._newTmpId(),c.startId=u.Id,c.startPoint=u.point,c.endId=n.endId,c.endPoint=n.endPoint,c.pointVector=[u.point,n.endPoint],c.roadRank=n.roadRank,this._unattachedTempRoads.push(h),this._unattachedTempRoads.push(c),r={},r._wrappedRoad=h,i={},i._wrappedRoad=c,o._fromChild=r,o._toChild=i,u.tempType=1,h.tempType=1,c.tempType=1,h.calcLength(),c.calcLength(),h.roadEntry=n.roadEntry,c.roadEntry=n.roadEntry,i=this._zoneIdGraph.get(e),i.nodeVector.push(u),i.roadVector.push(h),i.roadVector.push(c);var d,e=this._zoneIdSimpleDijkstraMap.get(e)._naviGraph;return e._nodeMap.put(u.Id,i.nodeVector.length-1),n.roadEntry==B.default.NaviRoadEntry_BOTH&&(i=[],i.push({nodeId:n.startId,length:h.length}),i.push({nodeId:n.endId,length:c.length}),e.adjList.put(u.Id,i),i=e.adjList.get(n.startId),i||(i=[],e.adjList.put(n.startId,i)),i.push({nodeId:u.Id,length:h.length}),i=e.adjList.get(n.endId),i||(i=[],e.adjList.put(n.endId,i)),i.push({nodeId:u.Id,length:c.length})),n.roadEntry==B.default.NaviRoadEntry_FORWARD&&(d=[],d.push({nodeId:n.endId,length:c.length}),e.adjList.put(u.Id,d),d=e.adjList.get(n.startId),d||(d=[],e.adjList.put(n.startId,d)),d.push({nodeId:u.Id,length:h.length})),n.roadEntry==B.default.NaviRoadEntry_BACK&&(d=[],d.push({nodeId:n.startId,length:h.length}),e.adjList.put(u.Id,d),d=e.adjList.get(n.endId),d||(d=[],e.adjList.put(n.endId,d)),d.push({nodeId:u.Id,length:c.length})),u}},{key:"_insertItemToVector",value:function(e,t){for(var n=t.length-1;0<=n;n--)if(t[n].Id&&0<t[n].Id)return(0,D.default)(t).call(t,n+1,0,e),n+1;return-1}},{key:"_insertNodeToRoad",value:function(e,t,n,r){if(r)return this._insertTempNodeToRoad(e,t,n);var i=this._zoneIdGraph.get(e),a=new F.default;a.Id=i.generateNodeId(),a.point=t;var o=new U.default;o.Id=i.generateRoadId(),o.startId=n.startId,o.startPoint=n.startPoint,o.endId=a.Id,o.endPoint=a.point,o.pointVector=[n.startPoint,a.point],r=new U.default,r.Id=i.generateRoadId(),r.startId=a.Id,r.startPoint=a.point,r.endId=n.endId,r.endPoint=n.endPoint,r.pointVector=[a.point,n.endPoint],e=[],e.push(o.Id),e.push(r.Id),a.segLinks=e,o.calcLength(),r.calcLength(),o.roadEntry=n.roadEntry,r.roadEntry=n.roadEntry;var s,t=i.nodeVector,e=i.roadVector,t=this._insertItemToVector(a,t);return this._insertItemToVector(o,e),this._insertItemToVector(r,e),i._nodeMap.put(a.Id,t),n.roadEntry==B.default.NaviRoadEntry_BOTH&&(t=[],t.push({nodeId:n.startId,length:o.length}),t.push({nodeId:n.endId,length:r.length}),i.adjList.put(a.Id,t),t=i.adjList.get(n.startId),t||(t=[],i.adjList.put(n.startId,t)),t.push({nodeId:a.Id,length:o.length}),t=i.adjList.get(n.endId),t||(t=[],i.adjList.put(n.endId,t)),t.push({nodeId:a.Id,length:r.length})),n.roadEntry==B.default.NaviRoadEntry_FORWARD&&(s=[],s.push({nodeId:n.endId,length:r.length}),i.adjList.put(a.Id,s),s=i.adjList.get(n.startId),s||(s=[],i.adjList.put(n.startId,s)),s.push({nodeId:a.Id,length:o.length})),n.roadEntry==B.default.NaviRoadEntry_BACK&&(s=[],s.push({nodeId:n.startId,length:o.length}),i.adjList.put(a.Id,s),s=i.adjList.get(n.endId),s||(s=[],i.adjList.put(n.endId,s)),s.push({nodeId:a.Id,length:r.length})),a}},{key:"_clearTmpPoint",value:function(e){if(null!=e){for(var t=this._zoneIdGraph.get(e),n=t.nodeVector.length-1;0<=n;n--){var r=t.nodeVector[n];if(null==r||0<=r.Id)break;(0,D.default)(r=t.nodeVector).call(r,n,1)}for(var i=t.roadVector.length-1;0<=i;i--){var a=t.roadVector[i];if(null==a||0<=a.Id)break;(0,D.default)(a=t.roadVector).call(a,i,1)}}}},{key:"_deleteTmpConnectionEntirely",value:function(e,t){var n=e.get(t);if(n)for(var r=0;r<n.length;r++)n[r].nodeId<0&&((0,D.default)(n).call(n,r,1),r--)}},{key:"_removeConnection",value:function(e,t){for(var n=e.get(t),r=0;r<n.length;r++)this._deleteTmpConnectionEntirely(e,n[r].nodeId);e.remove(t)}},{key:"_calcAdherenceAtOneAngle",value:function(e,t,n,r,i,a){i.toDistance=Number.MAX_VALUE,i.stickToRoad=!1,i.rotateAngle=0;for(var o=Number.MAX_VALUE,s={},l=this._zoneIdGraph.get(e),u=0;u<l.roadVector.length;u++){var h,c=l.roadVector[u];null!=c&&c.roadEntry!=B.default.NaviRoadEntry_FORBID&&(h=R.default.quickRayIntersect(t,n,c.startPoint,c.endPoint,s),h&&(h=R.default.distanceOfTwoPoints(t,s),(h<o||Math.abs(h-o)<.1&&c.Id<0)&&(o=h,i.cross=(0,C.default)({},s),i.distance=o,i.road=c,i.stickToRoad=!0)))}for(var l=this._zoneIdGraph.get(-1),d={},f=0;f<l.obstructModels.length;f++){var p=l.obstructModels[f];if(null!=p&&p!=a&&B.default.NaviModelPassType_DECORATE!=p.pass&&(null==a||!R.default.pointInPolygon2d(p.points,a.center,p.points.length-1)))for(var m=p.points.length,v=0;v<m-1;v++){var g=R.default.quickRayIntersect(t,n,p.points[v],p.points[v+1],d);if(g&&(g=R.default.distanceOfTwoPoints(t,d),g<o))return o=g,i.model=p,i.distance=Number.MAX_VALUE,i.stickToRoad=!1,i.obstructType=B.default.NaviObstructType_MODEL,!1}}for(var y={},_=l.obstructExtents,x=0;x<_.length;x++){for(var w=_[x],b=_[x].holes,M=0;M<b.length;M++)for(var T=b[M],E=0;E<T.length-1;E++){var S=R.default.quickRayIntersect(t,n,T[E],T[E+1],y);if(S&&(S=R.default.distanceOfTwoPoints(t,y),S<o))return o=S,i.model=w,i.distance=Number.MAX_VALUE,i.stickToRoad=!1,i.obstructType=B.default.NaviObstructType_EXTENT,!1}for(var A=_[x].points,I=0;I<A.length-1;I++){var L=R.default.quickRayIntersect(t,n,A[I],A[I+1],y);if(L&&(L=R.default.distanceOfTwoPoints(t,y),L<o))return o=L,i.model=w,i.distance=Number.MAX_VALUE,i.stickToRoad=!1,i.obstructType=B.default.NaviObstructType_EXTENT,!1}}return i.toDistance=R.default.distanceOfTwoPoints(i.cross,r),!0}},{key:"_adherenceCompare",value:function(e,t){return e.toDistance-t.toDistance}},{key:"_adherenceAngleCompare",value:function(e,t){return t.rotateAngle-e.rotateAngle}},{key:"_clearTempElements",value:function(e){if(e=this._zoneIdGraph.get(e),e){for(var t=e.nodeVector,n=t.length-1;0<=n;n--){var r=t[n];if(null==r||0<=r.Id)break;(0,D.default)(t).call(t,n,1)}for(var i=e.roadVector,a=i.length-1;0<=a;a--){var o=i[a];if(null==o||0<=o.Id)break;(0,D.default)(i).call(i,a,1)}}}},{key:"_clearTempAdjList",value:function(){var s=this;this._zoneIdSimpleDijkstraMap.each(function(e,t){for(var n=[],r=t._naviGraph.adjList,i=0;i<(0,l.default)(r).length;i++)(0,l.default)(r)[i]<0&&n.push((0,l.default)(r)[i]);for(var a=0;a<n.length;a++)s._removeConnection(t._naviGraph.adjList,n[a]);for(var o=0;o<s._tmpAdjNodeIds.length;o++)s._deleteTmpConnectionEntirely(r,s._tmpAdjNodeIds[o])})}},{key:"_exploreUprightLikelyJoints",value:function(e,t,n,r,i){for(var a=[],o=0;o<r.length;o++)if(r[o].distance<R.default.epsilon())return a.push(r[o]),a;var s={x:0,y:0},l=R.default.calcFootOfUpright(t,n.startPoint,n.endPoint,s),u={};if(l&&this._isTwoPointsConnectedDirectly(t,s,u,i))return i={},i.cross=s,i.stickToRoad=!0,i.road=n,i.rotateAngle=0,i.dist=R.default.distanceOfTwoPoints(t,s),a.push(i),a;for(var h={x:s.x-t.x,y:s.y-t.y},c=0;c<r.length;c++){var d=r[c],f={x:d.cross.x-t.x,y:d.cross.y-t.y},f=R.default.calcRotateAngle(f,h),f=270<f?f-360:f;d.rotateAngle=f}(0,g.default)(r).call(r,this._adherenceAngleCompare);var p=null,m=null;if(r[r.length-1].rotateAngle<0)return p=r[r.length-1],a.push(p),a;for(var v=0;v<r.length;v++)if(0<r[v].rotateAngle)return p=r[v],0==v?a.push(p):(m=r[v-1],R.default.distanceOfTwoPoints(p.cross,n.startPoint)>R.default.distanceOfTwoPoints(m.cross,n.startPoint)?(a.push(m),a.push(p)):(a.push(p),a.push(m))),a;return a}},{key:"_calcAllAdherance",value:function(e,t,n,r,i,a){for(var o=i||30,s=0;s<360;s+=o){var l=new u.default;this._calcAdherenceAtOneAngle(e,t,s,n,l,a),1==l.stickToRoad&&r.push(l)}(0,g.default)(r).call(r,this._adherenceCompare)}},{key:"_seekNearRoads",value:function(e,t,n,r,i){var a=new h.default,o=[];for(this._calcAllAdherance(e,t,n,o,r,i);0!=o.length;){var s=o[0],l=a.get(s.road.Id);l?l.push(s):(l=[],l.push(s),a.put(s.road.Id,l)),(0,D.default)(o).call(o,0,1)}return a}},{key:"_insertTmpIsolatedNode",value:function(e,t){var n=new F.default;return n.Id=this._newTmpId(),n.point=(0,C.default)({},t),t=this._zoneIdGraph.get(e),t.nodeVector.push(n),e=this._zoneIdSimpleDijkstraMap.get(e),e._naviGraph._nodeMap.put(n.Id,t.nodeVector.length-1),n}},{key:"_insertIsolatedNode",value:function(e,t,n){return n?this._insertTmpIsolatedNode(e,t):(n=new F.default,n.Id=this._naviGraph.generateNodeId(),n.point=(0,C.default)({},t),t=this.zoneIdGraph.get(e),e=t.nodeVector,e=this._insertItemToVector(n,e),t._nodeMap.put(n.Id,e),n)}},{key:"_isTwoPointsConnectedDirectly",value:function(e,t,n,r){for(var i=this._zoneIdGraph.get(-1),a=null,o=0;o<i.obstructModels.length;o++)if(a=i.obstructModels[o],null!=a&&a!=r&&B.default.NaviModelPassType_DECORATE!=a.pass)for(var s=a.points,l=0;l<s.length-1;l++)if(R.default.calcCrossPoint(e,t,s[l],s[l+1],n)){var u=R.default.distanceOfTwoPoints(e,n),h=R.default.distanceOfTwoPoints(t,n);if(!(u<=R.default.epsilon()||h<=R.default.epsilon()))return!1}for(var c=i.obstructExtents,d=0;d<c.length;d++){for(var f=c[d],p=f.holes,m=0;m<p.length;m++)for(var v=p[m],g=0;g<v.length-1;g++)if(R.default.calcCrossPoint(e,t,v[g],v[g+1],n))return!1;for(var y=f.points,_=0;_<y.length-1;_++)if(R.default.calcCrossPoint(e,t,y[_],y[_+1],n))return!1}return!0}},{key:"_joinTwoNodes",value:function(e,t,n,r,i,a){for(var o=0;o<this._attachedTempRoads.length;o++){var s=this._attachedTempRoads[o],l={};if(1==R.default.calcCrossPoint(s.startPoint,s.endPoint,t.point,n.point,l)&&R.default.distanceOfTwoPoints(t.point,l)>R.default.epsilon())return null}void 0===r&&(r=B.default.NaviRoadEntry_BOTH),void 0===i&&(i=!0),void 0===a&&(a=!0);var u=new U.default;u.startId=t.Id,u.startPoint=t.point,u.endId=n.Id,u.endPoint=n.point,u.pointVector=[t.point,n.point],u.roadRank=1,this._tmpAdjNodeIds.push(t.Id),this._tmpAdjNodeIds.push(n.Id),u.Id=i?this._newTmpId():this._naviGraph.generateRoadId(),u.roadEntry=r,u.calcLength(),a&&this._attachedTempRoads.push(u),a=this._zoneIdGraph.get(e),a.roadVector.push(u);var h,c,a=this._zoneIdSimpleDijkstraMap.get(e);return B.default.NaviRoadEntry_BOTH==r&&(e={nodeId:n.Id,length:u.length},h=a._naviGraph.adjList.get(t.Id),h?h.push(e):(h=[],h.push(e),a._naviGraph.adjList.put(t.Id,h)),e={nodeId:t.Id,length:u.length},h=a._naviGraph.adjList.get(n.Id),h?h.push(e):(h=[],h.push(e),a._naviGraph.adjList.put(n.Id,h))),B.default.NaviRoadEntry_FORWARD==r&&(h={nodeId:n.Id,length:u.length},c=a._naviGraph.adjList.get(t.Id),c?c.push(h):(c=[],c.push(h),a._naviGraph.adjList(t.Id,c))),B.default.NaviRoadEntry_BACK==r&&(r={nodeId:t.Id,length:u.length},c=a._naviGraph.adjList.get(n.Id),c?c.push(r):(c=[],c.push(r),a._naviGraph.adjList.put(n.Id,c))),u}},{key:"_isPointInPNTModel",value:function(e){var t=this._calcZoneIdByCoord(e),n=this._zonePNTModelsMap.get(t);if(n)for(var r=0;r<n.length;r++){var i=n[r];if(R.default.pointInPolygon2d(i.points,e,i.points.length))return i}return null}},{key:"_newTmpId",value:function(){return this._tmpId--}}]),t}(),t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function e(){(0,a.default)(this,e)}return(0,o.default)(e,null,[{key:"printRoads",value:function(e){}}]),e}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),l=i(n(604)),n=function(){function e(){(0,a.default)(this,e),this._dijkCollection=[]}return(0,o.default)(e,[{key:"loadGraphs",value:function(e){var o=0,s=this;e.each(function(e,t,n){for(var r=t.obstructExtents,i=0;i<r.length;i++){var a=r[i].Id,a=t.getGraphByEid(a),a=new l.default(o++,a);a.gid=e,s._dijkCollection.push(a)}})}},{key:"each",value:function(e){for(var t=0;t<this._dijkCollection.length;t++)e(this._dijkCollection[t])}},{key:"len",value:function(){return this._dijkCollection.length}},{key:"get",value:function(e){return this._dijkCollection[e]}},{key:"getDijkByPoint",value:function(e,t){var n,r=this._dijkCollection;for(n in r){var i=r[n];if(e==i.gid&&i.containsPt(t))return i}return null}},{key:"getDijkById",value:function(e){var t,n=this._dijkCollection;for(t in n){var r=n[t];if(r.Id==e)return r}return null}}]),e}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var g=i(n(31)),C=i(n(9)),v=i(n(35)),D=i(n(13)),c=i(n(54)),O=i(n(15)),f=i(n(122)),l=i(n(63)),y=i(n(34)),a=i(n(2)),o=i(n(3)),R=i(n(28)),B=i(n(55)),s=i(n(68)),u=i(n(265)),F=i(n(80)),U=i(n(164)),h=i(n(97)),d=i(n(166)),z=i(n(165)),p=i(n(69)),m=i(n(266)),_=i(n(606)),x=n(267),n=function(){function n(e,t){(0,a.default)(this,n),this.Id=e,this._startModel=null,this._endModel=null,this._naviGraph=t,this._zoneMap=new h.default,this._zoneIdGraph=new h.default,this._originDijkstra=null,this._zoneIdDijkstras=new h.default,this._resultVector=[],this._startZoneId=Number.INT_MIN,this._endZoneId=Number.INT_MIN,this._tmpId=-1,this._startNode=null,this._endNode=null,this._mode=s.default.MODULE_SHORTEST,this._zonePNTModelsMap=new h.default,this._zoneNPModelsMap=new h.default,this._modelIdRoadsMap=new h.default,this._variableModelPairs=[],this._unattachedTempRoads=[],this._attachedTempRoads=[],this._unattachedTempRoadTrees=[],this._kScaleVariable=100,this._kRemainedZoneId=-1,this._kMinModelAngle=15,this._kDoorToler=.1,this._tmp_adj_node_ids=[],this._failedInsertPts=[],this._transitNodes=[],this._segmentByZones(),this._assemblePassNotThroughModels(),this._assembleNotPassModels(),this._fitVariableRoadsToModel(),this._adjustNPModelRoads(),this._KeyNodes=new _.default(["num","id","idx","node"]),this._NtoNRoutesGraph=new h.default,this._next=new x.SmallQueue,this._visited=!1,this._lifts=[]}return(0,o.default)(n,[{key:"gid",get:function(){return this._gid},set:function(e){this._gid=e}},{key:"setWayPoints",value:function(e){this._wayPts=null==e?[]:e,this._insertWayPoints()}},{key:"setStart",value:function(e){var t;e instanceof F.default?(this._startNode=e,this._KeyNodes.append({num:this._KeyNodes.size(),id:e.Id,idx:this._naviGraph.getIdxByNodeId(e.Id),node:e})):(t=new F.default,this._insertPoint(e,t)||this._failedInsertPts.push(e),this._startNode=t,this._KeyNodes.append({num:this._KeyNodes.size(),id:t.Id,idx:this._naviGraph.getIdxByNodeId(t.Id),node:t}))}},{key:"setEnd",value:function(e){var t;e instanceof F.default?(this._endNode=e,this._KeyNodes.append({num:this._KeyNodes.size(),id:e.Id,idx:this._naviGraph.getIdxByNodeId(e.Id),node:e})):(t=new F.default,this._insertPoint(e,t)||this._failedInsertPts.push(e),this._endNode=t,this._KeyNodes.append({num:this._KeyNodes.size(),id:t.Id,idx:this._naviGraph.getIdxByNodeId(t.Id),node:t}))}},{key:"predictLift",value:function(){function e(e,t){for(var n=0,r=0;r<t.length;r++){var i=(e.x-t[r][0])*(e.x-t[r][0])+(e.y-t[r][1])*(e.y-t[r][1]);n+=Math.sqrt(i)}return n}for(var t=this._naviGraph.getAllLifts(),n=0;n<t.length;n++)t[n].dist=e(t[n].point,this.getNext()._wayPts),t[n].dist+=e(t[n].point,this._wayPts),t[n].dist=t[n].dist/(0==this.getNext()._wayPts.length?1:this.getNext()._wayPts.length),t[n].liftType==B.default.NaviLiftType_Escalator&&(t[n].dist-=25),t[n].liftType==B.default.NaviLiftType_Lift&&(t[n].dist-=25);for((0,g.default)(t).call(t,function(e,t){return e.dist-t.dist}),n=0;n<t.length;n++){var r,i=t[n];if(-1!=(0,C.default)(r=i.liftFloors).call(r,this.getNext().gid)&&this.getNext().getLiftByFlag(i.liftFlag))return i}return null}},{key:"hasRelationTo",value:function(e){for(var t=this._naviGraph.getAllLifts(),n=e.gid,r=this.gid,i=0;i<t.length;i++){var a,o=t[i];if((B.default.NaviLiftType_Stair==o.liftType||-1!=(0,C.default)(a=o.liftFloors).call(a,n))&&null!=e.getLiftByFlag(o.liftFlag))if(o.liftEntry!=B.default.NaviLiftEntry_UP){if(o.liftEntry!=B.default.NaviLiftEntry_DOWN){if(o.liftEntry==B.default.NaviLiftEntry_BOTH)return{related:!0,dist:Math.abs(r-n)}}else if(n<r)return{related:!0,dist:Math.abs(r-n)}}else if(r<n)return{related:!0,dist:Math.abs(r-n)}}return{related:!1,dist:Infinity}}},{key:"getLiftByFlag",value:function(e){0==this._lifts.length&&(this._lifts=this._naviGraph.getAllLifts());for(var t=0;t<this._lifts.length;t++)if(this._lifts[t].liftFlag==e)return this._lifts[t];return null}},{key:"containsPt",value:function(e){var t=this._naviGraph.obstructExtents[0].points;return!!R.default.pointInPolygon2d(t,e,t.length)}},{key:"getRouteCalculateResult",value:function(){return this._resultVector}},{key:"dispose",value:function(){this._startModel=null,this._endModel=null,this._naviGraph.dispose(),this._naviGraph=null,this._zoneMap.clear(),this._zoneMap=null,this._zoneIdGraph.each(function(e,t){t.dispose()}),this._zoneIdGraph.clear(),this._zoneIdGraph=null,null!=this._originDijkstra&&(this._originDijkstra.dispose(),this._originDijkstra=null),this._zoneIdDijkstras.each(function(e,t){t.dispose()}),this._zoneIdDijkstras.clear(),this._zoneIdDijkstras=null,this._resultVector=[],this._startNode=null,this._endNode=null,this._zonePNTModelsMap.clear(),this._zonePNTModelsMap=null,this._zoneNPModelsMap.clear(),this._zoneNPModelsMap=null,this._modelIdRoadsMap.clear(),this._zoneNPModelsMap=null,this._variableModelPairs=[],this._unattachedTempRoads=[],this._attachedTempRoads=[],this._unattachedTempRoadTrees=[]}},{key:"reset",value:function(){this._resultVector=[],this._clearTempPoint(this._startZoneId),this._startZoneId=Number.INT_MIN,this._clearTempPoint(this._endZoneId),this._endZoneId=Number.INT_MIN,this._clearTempAdjList(),this._tmp_adj_node_ids=[],this._tmpId=-1;for(var e=0;e<this._variableModelPairs.length;e++){var t=this._variableModelPairs[e];this._switchVariableHinderTo(t.zoneId,t.model,B.default.NaviRoadHinderType_HINDER_HIGH)}this._variableModelPairs=[],this._unattachedTempRoads=[],this._attachedTempRoads=[],this._unattachedTempRoadTrees=[]}},{key:"pushNext",value:function(e){this._next.enqueue(e)}},{key:"getNext",value:function(){return this._next.peek()}},{key:"popNext",value:function(){return this._next.dequeue()}},{key:"_createGraph",value:function(){function o(e){for(var t=0,n=0;n<e.length-1;n++){var r=e[n].point.x-e[n+1].point.x,i=e[n].point.y-e[n+1].point.y;t+=Math.sqrt(r*r+i*i)}return t}this.keyGraph=[];var s=this;this._KeyNodes.foreach(function(e){var t=e.get("node"),e=s._KeyNodes.clone();e.dropLines({node:t});var n=[];e.foreach(function(e){n.push(e.get("id"))}),s._zoneIdDijkstras.get(-1).routeMultiDestinations(t.Id,n,s._mode);var r=[];s._zoneIdDijkstras.get(-1).getMultiRoute(r);for(var i=0;i<r.length;i++){var a=r[i];s.keyGraph.push([t.Id,a[a.length-1].Id,o(a),a])}})}},{key:"computeKeyRoutes",value:function(){if(this.getNext()){var e=this.predictLift();if(!e)return!1;this.setEnd(e)}var t=[];if(this._visited){var n=this._KeyNodes.query("node",this._endNode),r=this._KeyNodes.query("node",this._startNode);this._KeyNodes.clear(),this._KeyNodes.append(n),this._KeyNodes.append(r)}else for(var i=0;i<this._transitNodes.length;i++)t.push(this._transitNodes[i].Id);return this._createGraph(),r=new m.default(this.keyGraph),r.setSId(this._startNode.Id).setEId(this._endNode.Id).setWayNodes(t),r.route(),this._route=r.getResult(),this.convertRoute(),this.getNext()&&this.getNext().setStart(this.getNext()._naviGraph.getNodeByFlag(e.liftFlag)),this._KeyNodes=new _.default(["num","id","idx","node"]),this._visited=!0,!0}},{key:"convertRoute",value:function(){this._result=[];for(var e=function(e,t){for(var n=0;n<this.length;n++)if(this[n][0]==e&&this[n][1]==t)return this[n]},t=0;t<this._route.route.length-1;t++)for(var n=this._route.route[t],r=this._route.route[t+1],i=e.apply(this.keyGraph,[n,r]),a=0;a<i[3].length;a++)this._result.push(i[3][a])}},{key:"getResult",value:function(){return this._result}},{key:"route",get:function(){this._route}},{key:"_calcPointReachable",value:function(e){var t=this._naviGraph.queryContainExtentId(e);if(-1==t)return null;var n=this._calcZoneIdByCoord(e),r=-0,i=this._zoneIdGraph.get(n).findModel(e,r);if(null==i)return{extentId:t,model:null};if(i.pass==B.default.NaviModelPassType_PASS_THROUGH||i.pass==B.default.NaviModelPassType_PASS_NOT_THROUGH){if(0<i.doors.length)return{extentId:t,model:i};for(var a={},o=[],s=[],r=this._zoneIdGraph.get(n),l=r.roadVector,u=!0,h=i.points.length,c=0;c<h-1;c++)for(var d=i.points[c],f=i.points[c+1],p=0;p<l.length;p++){var m=l[p];1==R.default.calcCrossPoint(d,f,m.startPoint,m.endPoint,a)&&(u=!1,B.default.NaviRoadEntry_FORBID!=m.roadEntry&&(m=new Object,m.x=a.x,m.y=a.y,o.push(m),s.push(l[p])))}if(u)return{extentId:t,model:i};if(0==o.length)return null;i.doors=[],i.doorEntrys=[],i.doorTypes=[];for(var v=0;v<o.length;v++){var g=o[v],y=s[v],g=this._insertNodeToRoad(n,g,y);g.nodeType=B.default.NaviNodeType_COMMON,y.roadEntry==B.default.NaviRoadEntry_BOTH?g.entranceType=B.default.NaviEntranceType_ACCESS:R.default.pointInPolygon2d(i.points,y.startPoint,i.points.length-1)?(y.roadEntry==B.default.NaviRoadEntry_FORWARD&&(g.entranceType=B.default.NaviEntranceType_EXIT),y.roadEntry==B.default.NaviRoadEntry_BACK&&(g.entranceType=B.default.NaviEntranceType_ENTRANCE)):(y.roadEntry==B.default.NaviRoadEntry_FORWARD&&(g.entranceType=B.default.NaviEntranceType_ENTRANCE),y.roadEntry==B.default.NaviRoadEntry_BACK&&(g.entranceType=B.default.NaviEntranceType_EXIT)),i.doors.push(g),i.doorEntrys.push(g.entranceType),i.doorTypes.push(g.nodeType)}}return i.pass!=B.default.NaviModelPassType_NOT_PASS?{extentId:t,model:i}:null}},{key:"_processStartPoint",value:function(r,e){var i=this;this._startNode=this._insertTmpIsolatedNode(this._startZoneId,r);var t=null,a=!0,t=null!=this._startModel&&this._startModel.pass==B.default.NaviModelPassType_PASS_THROUGH&&0==this._startModel.doors.length?this._seekNearRoads(this._startZoneId,r,e,30,this._startModel):this._seekNearRoads(this._startZoneId,r,e);if(null==this._startModel&&(a=!1),0<t.size()){a=!1,t.each(function(e,t,n){for(n=0;n<t.length;n++)0!=t[n].road.roadEntry&&(a=!0)});var o=0,s=!1,l=[];if(t.each(function(e,t){var n=t[0].road,t=i._exploreUprightLikelyJoints(i._startZoneId,r,n,t,i._startModel);0==t.length?o++:Math.abs(t[0].rotateAngle)>R.default.epsilon()?l.push.apply(l,(0,y.default)(t)):(s=!0,t=i._insertTempNodeToRoad(i._startZoneId,t[0].cross,t[0].road),i._joinTwoNodes(i._startZoneId,i._startNode,t))}),s||(0,v.default)(l).call(l,function(e){e=i._insertTempNodeToRoad(i._startZoneId,e.cross,e.road),i._joinTwoNodes(i._startZoneId,i._startNode,e)}),o==t.size())return p.default.ROUTE_FAILED_NO_DATA_START}if(a){for(var n=null,u=!1,h=0;h<this._startModel.doors.length;h++){var n=this._startModel.doors[h],c=this._startModel.doorEntrys[h];c!=B.default.NaviEntranceType_EXIT&&c!=B.default.NaviEntranceType_ACCESS||(this._joinTwoNodes(this._startZoneId,this._startNode,n),u=!0)}if(!u)return p.default.ROUTE_FAILED_NO_DATA_START}}},{key:"_processEndPoint",value:function(r,e){var i=this;this._endNode=this._insertTmpIsolatedNode(this._endZoneId,r);var t=null,a=!0,t=null!=this._endModel&&this._endModel.pass==B.default.NaviModelPassType_PASS_THROUGH&&0==this._endModel.doors.length?this._seekNearRoads(this._endZoneId,r,e,30,this._endModel):this._seekNearRoads(this._endZoneId,r,e);if(null==this._endModel&&(a=!1),0<t.size()){a=!1,t.each(function(e,t,n){for(n=0;n<t.length;n++)0!=t[n].road.roadEntry&&(a=!0)});var o=0,s=!1,l=[];if(t.each(function(e,t){var n=t[0].road,t=i._exploreUprightLikelyJoints(i._endZoneId,r,n,t,i._endModel);0==t.length?o++:Math.abs(t[0].rotateAngle)>R.default.epsilon()?l.push.apply(l,(0,y.default)(t)):(s=!0,t=i._insertTempNodeToRoad(i._endZoneId,t[0].cross,t[0].road),i._joinTwoNodes(i._endZoneId,i._endNode,t))}),s||(0,v.default)(l).call(l,function(e){e=i._insertTempNodeToRoad(i._endZoneId,e.cross,e.road),i._joinTwoNodes(i._endZoneId,i._endNode,e)}),o==t.size())return p.default.ROUTE_FAILED_NO_DATA_END}if(a){for(var n=null,u=!1,h=0;h<this._endModel.doors.length;h++){var n=this._endModel.doors[h],c=this._endModel.doorEntrys[h];c!=B.default.NaviEntranceType_EXIT&&c!=B.default.NaviEntranceType_ACCESS||(this._joinTwoNodes(this._endZoneId,this._endNode,n),u=!0)}if(!u)return p.default.ROUTE_FAILED_NO_DATA_END}}},{key:"_insertPoint",value:function(r,i){var a=this;r instanceof Array&&2==r.length&&(r={x:r[0],y:r[1]});var e=null,o=!0,t={x:0,y:0},s=this._naviGraph.getModelByPoint(r),l=this._naviGraph.getZoneIdByPoint(r),n=this._insertTmpIsolatedNode(l,r);if((0,D.default)(i,n),e=null!=s&&s.pass==B.default.NaviModelPassType_PASS_THROUGH&&0==s.doors.length?this._seekNearRoads(l,r,t,30,s):this._seekNearRoads(l,r,t),null==s&&(o=!1),0<e.size()){o=!1,e.each(function(e,t,n){for(n=0;n<t.length;n++)0!=t[n].road.roadEntry&&(o=!0)});var u=0,h=!1,c=[];if(e.each(function(e,t){var n=t[0].road,t=a._exploreUprightLikelyJoints(l,r,n,t,s);0==t.length?u++:Math.abs(t[0].rotateAngle)>R.default.epsilon()?c.push.apply(c,(0,y.default)(t)):(h=!0,t=a._insertTempNodeToRoad(l,t[0].cross,t[0].road),a._joinTwoNodes(l,i,t))}),h||(0,v.default)(c).call(c,function(e){e=a._insertTempNodeToRoad(l,e.cross,e.road),a._joinTwoNodes(l,i,e)}),u==e.size())return!1}if(o){for(var d=null,f=!1,p=0;p<s.doors.length;p++){var d=s.doors[p],m=s.doorEntrys[p];m!=B.default.NaviEntranceType_EXIT&&m!=B.default.NaviEntranceType_ACCESS||(this._joinTwoNodes(l,i,d),f=!0)}if(!f)return!1}return!0}},{key:"_routeCalculate",value:function(){var e=this._isPointInPNTModel(this._startNode.point);if(e&&(this._switchVariableHinderTo(this._startZoneId,e,B.default.NaviRoadHinderType_HINDER_GENERAL),this._variableModelPairs.push({zoneId:this._startZoneId,model:e})),e=this._isPointInPNTModel(this._endNode.point),e&&(this._switchVariableHinderTo(this._endZoneId,e,B.default.NaviRoadHinderType_HINDER_GENERAL),this._variableModelPairs.push({zoneId:this._endZoneId,model:e})),this._resultVector=[],this._startZoneId==this._endZoneId){var t=this._zoneIdDijkstras.get(this._startZoneId),n=t.routeCalculate(this._startNode,this._endNode,this._mode);if(n!=p.default.ROUTE_SUCCESS)return n;var r=t.getRouteCalculateResult();this._resultVector=[],(0,c.default)(r).call(r),(n=this._resultVector).push.apply(n,(0,y.default)(r))}else{if(-1!=this._startZoneId&&-1==this._endZoneId){if(t=this._findNearZoneDoor(this._startNode.point,this._startZoneId,B.default.NaviEntranceType_EXIT),n=this._zoneIdDijkstras.get(this._startZoneId),r=n.routeCalculate(this._startNode,t,this._mode),r!=p.default.ROUTE_SUCCESS)return r;var i=n.getRouteCalculateResult(i),n=this._zoneIdDijkstras.get(-1),r=n.routeCalculate(t,this._endNode,this._mode);if(r!=p.default.ROUTE_SUCCESS)return r;r=n.getRouteCalculateResult(),(0,c.default)(i).call(i),(0,c.default)(r).call(r),(n=this._resultVector).push.apply(n,(0,y.default)(i)),(i=this._resultVector).push.apply(i,(0,y.default)(r))}if(-1==this._startZoneId&&-1!=this._endZoneId){var a=this._findNearZoneDoor(this._endNode.point,this._endZoneId,B.default.NaviEntranceType_ENTRANCE),o=this._zoneIdDijkstras.get(this._endZoneId),s=o.routeCalculate(a,this._endNode,this._mode);if(s!=p.default.ROUTE_SUCCESS)return s;var l=o.getRouteCalculateResult(),o=this._zoneIdDijkstras.get(-1),s=o.routeCalculate(this._startNode,a,this._mode);if(s!=p.default.ROUTE_SUCCESS)return s;a=o.getRouteCalculateResult(),(0,c.default)(a).call(a),(0,c.default)(l).call(l),(s=this._resultVector).push.apply(s,(0,y.default)(a)),(o=this._resultVector).push.apply(o,(0,y.default)(l))}if(-1!=this._startZoneId&&-1!=this._endZoneId){if(s=this._findNearZoneDoor(this._startNode.point,this._startZoneId,B.default.NaviEntranceType_EXIT),a=this._zoneIdDijkstras.get(this._startZoneId),o=a.routeCalculate(this._startNode,s,this._mode),o!=p.default.ROUTE_SUCCESS)return o;var u=a.getRouteCalculateResult(u),l=this._findNearZoneDoor(this._endNode.point,this._endZoneId,B.default.NaviEntranceType_ENTRANCE),a=this._zoneIdDijkstras.get(this._endZoneId),o=a.routeCalculate(l,this._endNode,this._mode);if(o!=p.default.ROUTE_SUCCESS)return o;var h=a.getRouteCalculateResult(h),a=this._zoneIdDijkstras.get(-1);if(o=a.routeCalculate(s,l,this._mode),o!=p.default.ROUTE_SUCCESS)return o;o=a.getRouteCalculateResult(),(0,c.default)(u).call(u),(0,c.default)(o).call(o),(0,c.default)(h).call(h),(a=this._resultVector).push.apply(a,(0,y.default)(u)),(u=this._resultVector).push.apply(u,(0,y.default)(o)),(o=this._resultVector).push.apply(o,(0,y.default)(h))}}return p.default.ROUTE_SUCCESS}},{key:"_getIndexFormID",value:function(e,t,n){for(var r=0;r<t;r++)if(null!=e[r]&&e[r].Id==n)return r;return-1}},{key:"_calcZoneIdByCoord",value:function(e){for(var t=this._naviGraph.zones,n=0;n<t.length;n++){var r=t[n];if(r.contain(e))return r.Id}return-1}},{key:"_segmentByZones",value:function(){for(var n=this,e=this._naviGraph.zones,t=0;t<e.length;t++){var r=e[t],i=this._sliceGraph(this._naviGraph,r);this._zoneIdGraph.put(r.Id,i)}this._zoneIdGraph.put(-1,this._naviGraph),this._zoneIdGraph.each(function(e,t){t.simplify(),n._zoneIdDijkstras.put(e,new d.default(t))}),this._zoneIdGraph.each(function(e,t){t.consoleNodeInfos(),t.consoleRoadInfos()})}},{key:"_sliceGraph",value:function(e,t){if(e&&t){for(var n,r=0,i=0,a=e.roadVector.length,o=e.nodeVector.length,s=e.roadVector,l=e.nodeVector,u=0,h=new Int8Array(a),c=0;c<a;c++)s[c]&&s[c].roadEntry!=B.default.NaviRoadEntry_FORBID&&(n=s[c],r=t.contain(n.startPoint),i=t.contain(n.endPoint),0==r&&0==i||(u=!0),1==r&&1==i&&(h[c]=1),1==r&&0==i&&(h[c]=2),0==r&&1==i&&(h[c]=3),0==r&&0==i&&(h[c]=4),2==r&&0==i&&(h[c]=6),2==r&&1==i&&(h[c]=7),0==r&&2==i&&(h[c]=8),1==r&&2==i&&(h[c]=9));if(0==u)return null;for(var d,f,p,m,v,g,y=new Array(o),_=new Array(a),x=0,w=new Int8Array(o),b=h.length,M=0,T=b;M<T;M++)0!=h[M]&&6!=h[M]&&8!=h[M]&&1!=h[M]&&s[M]&&(d=s[M],f=d.roadEntry,v=[d.Id],2==h[M]||9==h[M]?(p=null,p=2==h[M]?t.calcCrossPoint(d.startPoint,d.endPoint):(0,D.default)({},d.endPoint),g=new F.default,g.Id=this._naviGraph.generateNodeId(),g.nodeType=B.default.NaviNodeType_COMMON,g.liftType=B.default.NaviLiftType_NULL,g.entranceType=B.default.NaviEntranceType_ACCESS,g.point=(0,D.default)({},p),m=new U.default,m.setRoad(d),m.Id=this._naviGraph.generateRoadId(),v.push(m.Id),g.segLinks=v,p=new F.default,p.setNode(g),f==B.default.NaviRoadEntry_FORWARD?p.entranceType=B.default.NaviEntranceType_EXIT:f==B.default.NaviRoadEntry_BACK&&(p.entranceType=B.default.NaviEntranceType_ENTRANCE),t._linkAccessNodes.push(p),x=this._getIndexFormID(l,o,m.endId),m.endPoint=(0,D.default)({},p.point),m.pointVector[1]=(0,D.default)({},p.point),m.endId=p.Id,m.calcLength(),_[M]=m,y[x]=p,x=this._getIndexFormID(l,o,m.startId),y[x]=l[x],(0,O.default)(p=y[x].segLinks).call(p,(0,C.default)(p=y[x].segLinks).call(p,d.Id),1,m.Id),m=new F.default,m.setNode(g),d.startId=m.Id,d.startPoint=(0,D.default)({},m.point),d.pointVector[0]=(0,D.default)({},m.point),d.calcLength(),(0,O.default)(g=l[x].segLinks).call(g,(0,C.default)(g=l[x].segLinks).call(g,d.Id),1),l.push(m),w[x]=2):3!=h[M]&&7!=h[M]||(g=null,g=3==h[M]?t.calcCrossPoint(d.startPoint,d.endPoint):(0,D.default)({},d.startPoint),m=new F.default,m.Id=this._naviGraph.generateNodeId(),m.nodeType=B.default.NaviNodeType_COMMON,m.liftType=B.default.NaviLiftType_NULL,m.entranceType=B.default.NaviEntranceType_ACCESS,m.point=(0,D.default)({},g),g=new U.default,g.setRoad(d),g.Id=this._naviGraph.generateRoadId(),v.push(g.Id),m.segLinks=v,v=new F.default,v.setNode(m),f==B.default.NaviRoadEntry_FORWARD?v.entranceType=B.default.NaviEntranceType_ENTRANCE:f==B.default.NaviRoadEntry_BACK&&(v.entranceType=B.default.NaviEntranceType_EXIT),t._linkAccessNodes.push(v),x=this._getIndexFormID(l,o,g.startId),g.startPoint=(0,D.default)({},v.point),g.pointVector[0]=(0,D.default)({},v.point),g.startId=v.Id,g.calcLength(),_[M]=g,y[x]=v,x=this._getIndexFormID(l,o,g.endId),y[x]=l[x],(0,O.default)(v=y[x].segLinks).call(v,(0,C.default)(v=y[x].segLinks).call(v,d.Id),1,g.Id),g=new F.default,g.setNode(m),d.endId=g.Id,d.endPoint=(0,D.default)({},g.point),d.pointVector[1]=(0,D.default)({},g.point),d.calcLength(),(0,O.default)(m=l[x].segLinks).call(m,(0,C.default)(m=l[x].segLinks).call(m,d.Id),1),l.push(g),w[x]=2));for(var E,S=0,A=b;S<A;S++)1==h[S]&&(E=s[S],E&&(_[S]=E,x=this._getIndexFormID(l,o,E.startId),2!=w[x]&&(y[x]=l[x],w[x]=1),x=this._getIndexFormID(l,o,E.endId),2!=w[x]&&(y[x]=l[x],w[x]=1),s[S]=null));for(var I=0;I<o;I++)1==w[I]&&(l[I]=null);for(var b=new z.default(y,_,!0,1),L=[],R=e.obstructModels,N=0;N<R.length;N++){var k,P=R[N];P&&(k=this._modelInZone(P,t),k&&L.push(P))}return(e=b.obstructModels).push.apply(e,L),b}}},{key:"_assemblePassNotThroughModels",value:function(){var o=this;this._zoneIdGraph.each(function(e,t){for(var n=t.obstructModels,r=0;r<n.length;r++){var i,a=n[r];B.default.NaviModelPassType_PASS_NOT_THROUGH==a.pass&&(i=o._zonePNTModelsMap.get(e),i||(i=[],o._zonePNTModelsMap.put(e,i)),i.push(a))}}),this._zonePNTModelsMap.each(function(e,t){for(var n=0;n<t.length;n++)t[n].fid})}},{key:"_assembleNotPassModels",value:function(){var o=this;this._zoneIdGraph.each(function(e,t){for(var n=t.obstructModels,r=0;r<n.length;r++){var i,a=n[r];B.default.NaviModelPassType_NOT_PASS==a.pass&&(i=o._zoneNPModelsMap.get(e),i||(i=[],o._zoneNPModelsMap.put(e,i)),i.push(a))}}),this._zoneNPModelsMap.each(function(e,t){for(var n=0;n<t.length;n++)t[n].fid})}},{key:"_fitVariableRoadsToModel",value:function(){var s=this;this._zonePNTModelsMap.each(function(e,t){for(var n=s._zoneIdGraph.get(e).roadVector,r=0;r<t.length;r++){for(var i=t[r],a=0;a<n.length;a++){var o=n[a].calcMiddlePoint();R.default.pointInPolygon2d(i.points,o,i.pointCount)&&(n[a].length=n[a].length*s._kScaleVariable,o=s._modelIdRoadsMap.get(i.Id),o||(o=[],s._modelIdRoadsMap.put(i.Id,o)),o.push(n[a]))}s._switchVariableHinderTo(e,i,B.default.NaviRoadHinderType_HINDER_HIGH)}})}},{key:"_insertWayPoints",value:function(){for(var e=0;e<this._wayPts.length;e++){var t=new F.default;this._insertPoint(this._wayPts[e],t)?(this._transitNodes.push(t),this._KeyNodes.append({num:this._KeyNodes.size(),id:t.Id,idx:this._naviGraph.getIdxByNodeId(t.Id),node:t})):this._failedInsertPts.push(this._wayPts[e])}}},{key:"_adjustNPModelRoads",value:function(){var p=this;this._zoneNPModelsMap.each(function(e,t){for(var n=p._zoneIdGraph.get(e),r=n.roadVector,i=0;i<t.length;i++)for(var a=t[i],o=0;o<r.length;o++){var s=r[o],l=s.roadEntry,u=s.calcMiddlePoint();if(R.default.pointInPolygon2d(a.points,u,a.pointCount-1)){if(s.length=Number.MAX_VALUE,l==B.default.NaviRoadEntry_BOTH||l==B.default.NaviRoadEntry_FORWARD){var h=p._zoneIdGraph.get(e).adjList.get(s.startId);if(h)for(var c=0;c<h.length;c++)h[c].nodeId==s.endId&&(h[c].length=s.length)}if(s.roadEntry==B.default.NaviRoadEntry_BOTH||s.roadEntry==B.default.NaviRoadEntry_BACK){var d=p._zoneIdGraph.get(e).adjList.get(s.endId);if(d)for(var f=0;f<d.length;f++)d[f].nodeId==s.startId&&(d[f].length=s.length)}}}})}},{key:"_switchVariableHinderTo",value:function(e,t,n){var r=this._modelIdRoadsMap.get(t.Id);if(r){if(B.default.NaviRoadHinderType_HINDER_HIGH==n)for(var i=0;i<r.length;i++){var a=r[i];if(a.calcLength(),a.length=r.length*this._kScaleVariable,a.roadEntry==B.default.NaviRoadEntry_BOTH||a.roadEntry==B.default.NaviRoadEntry_FORWARD){var o=this._zoneIdGraph.get(e).adjList.get(a.startId);if(o)for(var s=0;s<o.length;s++)o[s].nodeId==a.endId&&(o[s].length=a.length)}if(a.roadEntry==B.default.NaviRoadEntry_BOTH||a.roadEntry==B.default.NaviRoadEntry_BACK){var l=this._zoneIdGraph.get(e).adjList.get(a.endId);if(l)for(var u=0;u<l.length;u++)l[u].nodeId==a.startId&&(l[u].length=a.length)}}if(B.default.NaviRoadHinderType_HINDER_GENERAL==n)for(var h=0;h<r.length;h++){var c=r[h];if(c.calcLength(),c.roadEntry==B.default.NaviRoadEntry_BOTH||c.roadEntry==B.default.NaviRoadEntry_FORWARD){var d=this._zoneIdGraph.get(e).adjList.get(c.startId);if(d)for(var f=0;f<d.length;f++)d[f].nodeId==c.endId&&(d[f].length=c.length)}if(c.roadEntry==B.default.NaviRoadEntry_BOTH||c.roadEntry==B.default.NaviRoadEntry_BACK){var p=this._zoneIdGraph.get(e).adjList.get(c.endId);if(p)for(var m=0;m<p.length;m++)p[m].nodeId==c.startId&&(p[m].length=c.length)}}}}},{key:"_findNearZoneDoor",value:function(e,t,n){var r=this._naviGraph.getZone(t);if(null==r)return null;for(var i=this._zoneIdGraph.get(t).findModel(e,a),a=i.area,o=Number.MAX_VALUE,s=null,l=0;l<r._linkAccessNodes.length;l++){var u,h=r._linkAccessNodes[l],c=R.default.distanceOfTwoPoints(h.point,e);h.entranceType!=B.default.NaviEntranceType_ACCESS&&h.entranceType!=n||c<o&&(u=this._findMinAreaNearestObstructModel(t,h.point),u!=i&&u.pass==B.default.NaviModelPassType_PASS_NOT_THROUGH||(o=c,s=h))}return s}},{key:"_findMinAreaNearestObstructModel",value:function(e,t){for(var n=null,e=this._zoneIdGraph.get(e),r=Number.MAX_VALUE,i=Number.MAX_VALUE,a=null,o=e.obstructModels,s=0;s<o.length;s++){var l=o[s],u=R.default.pointToPolygon2d(l.points,t,l.points.length-1);u<i&&(i=u,a=l),this._kDoorToler>u&&(u=l.area,u<r&&(r=u,n=l))}return null==n?a:n}},{key:"_modelInZone",value:function(e,t){return!e.bb.isSeparate(t.bb)&&(e=e.center,!!R.default.pointInPolygon2d(t.points,e,t.pointCount))}},{key:"_insertTempNodeToRoad",value:function(e,t,n){var r=(0,f.default)(h=this._tmp_adj_node_ids).call(h,function(e){return e==n.startId}),i=(0,f.default)(c=this._tmp_adj_node_ids).call(c,function(e){return e==n.endId});null==r&&this._tmp_adj_node_ids.push(n.startId),null==i&&this._tmp_adj_node_ids.push(n.endId);for(var a=this._unattachedTempRoadTrees,o=null,s=0;s<a.length;s++)if(a[s]._wrappedRoad==n){o=a[s];break}if(null==o)o={},o._wrappedRoad=n,a.push(o);else for(;null!=o._fromChild;)var l=o._fromChild._wrappedRoad,o=R.default.pointIsInRect1(t,l.startPoint,l.endPoint)?o._fromChild:o._toChild;n=o._wrappedRoad;var u=new F.default;u.Id=this._newTmpId(),u.point=t;var h=new U.default;h.Id=this._newTmpId(),h.startId=n.startId,h.startPoint=n.startPoint,h.endId=u.Id,h.endPoint=u.point,h.pointVector=[n.startPoint,u.point];var c=new U.default;c.Id=this._newTmpId(),c.startId=u.Id,c.startPoint=u.point,c.endId=n.endId,c.endPoint=n.endPoint,c.pointVector=[u.point,n.endPoint],this._unattachedTempRoads.push(h),this._unattachedTempRoads.push(c),r={},r._wrappedRoad=h,i={},i._wrappedRoad=c,o._fromChild=r,o._toChild=i,u.tempType=1,h.tempType=1,c.tempType=1,h.calcLength(),c.calcLength(),h.roadEntry=n.roadEntry,c.roadEntry=n.roadEntry,i=this._zoneIdGraph.get(e),i.nodeVector.push(u),i.roadVector.push(h),i.roadVector.push(c);var d,e=this._zoneIdDijkstras.get(e)._naviGraph;return e._nodeMap.put(u.Id,i.nodeVector.length-1),n.roadEntry==B.default.NaviRoadEntry_BOTH&&(i=[],i.push({nodeId:n.startId,length:h.length}),i.push({nodeId:n.endId,length:c.length}),e.adjList.put(u.Id,i),i=e.adjList.get(n.startId),i||(i=[],e.adjList.put(n.startId,i)),i.push({nodeId:u.Id,length:h.length}),i=e.adjList.get(n.endId),i||(i=[],e.adjList.put(n.endId,i)),i.push({nodeId:u.Id,length:c.length})),n.roadEntry==B.default.NaviRoadEntry_FORWARD&&(d=[],d.push({nodeId:n.endId,length:c.length}),e.adjList.put(u.Id,d),d=e.adjList.get(n.startId),d||(d=[],e.adjList.put(n.startId,d)),d.push({nodeId:u.Id,length:h.length})),n.roadEntry==B.default.NaviRoadEntry_BACK&&(d=[],d.push({nodeId:n.startId,length:h.length}),e.adjList.put(u.Id,d),d=e.adjList.get(n.endId),d||(d=[],e.adjList.put(n.endId,d)),d.push({nodeId:u.Id,length:c.length})),u}},{key:"_insertItemToVector",value:function(e,t){for(var n=t.length-1;0<=n;n--)if(t[n].Id&&0<t[n].Id)return(0,O.default)(t).call(t,n+1,0,e),n+1;return-1}},{key:"_insertNodeToRoad",value:function(e,t,n,r){if(r)return this._insertTempNodeToRoad(e,t,n);var i=this._zoneIdGraph.get(e),a=new F.default;a.Id=i.generateNodeId(),a.point=t;var o=new U.default;o.Id=i.generateRoadId(),o.startId=n.startId,o.startPoint=n.startPoint,o.endId=a.Id,o.endPoint=a.point,o.pointVector=[n.startPoint,a.point],r=new U.default,r.Id=i.generateRoadId(),r.startId=a.Id,r.startPoint=a.point,r.endId=n.endId,r.endPoint=n.endPoint,r.pointVector=[a.point,n.endPoint],e=[],e.push(o.Id),e.push(r.Id),a.segLinks=e,o.calcLength(),r.calcLength(),o.roadEntry=n.roadEntry,r.roadEntry=n.roadEntry;var s,t=i.nodeVector,e=i.roadVector,t=this._insertItemToVector(a,t);return this._insertItemToVector(o,e),this._insertItemToVector(r,e),i._nodeMap.put(a.Id,t),n.roadEntry==B.default.NaviRoadEntry_BOTH&&(t=[],t.push({nodeId:n.startId,length:o.length}),t.push({nodeId:n.endId,length:r.length}),i.adjList.put(a.Id,t),t=i.adjList.get(n.startId),t||(t=[],i.adjList.put(n.startId,t)),t.push({nodeId:a.Id,length:o.length}),t=i.adjList.get(n.endId),t||(t=[],i.adjList.put(n.endId,t)),t.push({nodeId:a.Id,length:r.length})),n.roadEntry==B.default.NaviRoadEntry_FORWARD&&(s=[],s.push({nodeId:n.endId,length:r.length}),i.adjList.put(a.Id,s),s=i.adjList.get(n.startId),s||(s=[],i.adjList.put(n.startId,s)),s.push({nodeId:a.Id,length:o.length})),n.roadEntry==B.default.NaviRoadEntry_BACK&&(s=[],s.push({nodeId:n.startId,length:o.length}),i.adjList.put(a.Id,s),s=i.adjList.get(n.endId),s||(s=[],i.adjList.put(n.endId,s)),s.push({nodeId:a.Id,length:r.length})),a}},{key:"_clearTmpPoint",value:function(e){if(null!=e){for(var t=this._zoneIdGraph.get(e),n=t.nodeVector.length-1;0<=n;n--){var r=t.nodeVector[n];if(null==r||0<=r.Id)break;(0,O.default)(r=t.nodeVector).call(r,n,1)}for(var i=t.roadVector.length-1;0<=i;i--){var a=t.roadVector[i];if(null==a||0<=a.Id)break;(0,O.default)(a=t.roadVector).call(a,i,1)}}}},{key:"_deleteTmpConnectionEntirely",value:function(e,t){var n=e.get(t);if(n)for(var r=0;r<n.length;r++)n[r].nodeId<0&&((0,O.default)(n).call(n,r,1),r--)}},{key:"_removeConnection",value:function(e,t){for(var n=e.get(t),r=0;r<n.length;r++)this._deleteTmpConnectionEntirely(e,n[r].nodeId);e.remove(t)}},{key:"_calcAdherenceAtAngle",value:function(e,t,n,r,i,a){i.toDistance=Number.MAX_VALUE,i.stickToRoad=!1,i.rotateAngle=0;for(var o=Number.MAX_VALUE,s={},l=this._zoneIdGraph.get(e),u=0;u<l.roadVector.length;u++){var h,c=l.roadVector[u];null!=c&&(h=R.default.rayCrossSegment(t,n,c.startPoint,c.endPoint,s),h&&(h=R.default.distanceOfTwoPoints(t,s),h<o&&(o=h,i.cross=(0,D.default)({},s),i.distance=o,i.road=c,i.stickToRoad=!0)))}for(var l=this._zoneIdGraph.get(-1),d={},f=0;f<l.obstructModels.length;f++){var p=l.obstructModels[f];if(null!=p&&p!=a&&B.default.NaviModelPassType_DECORATE!=p.pass&&(null==a||!R.default.pointInPolygon2d(p.points,a.center,p.points.length-1)))for(var m=p.points.length,v=0;v<m-1;v++){var g=R.default.rayCrossSegment(t,n,p.points[v],p.points[v+1],d);if(g&&(g=R.default.distanceOfTwoPoints(t,d),g<o))return o=g,i.model=p,i.distance=Number.MAX_VALUE,i.stickToRoad=!1,i.obstructType=B.default.NaviObstructType_MODEL,!1}}for(var y={},_=l.obstructExtents,x=0;x<_.length;x++){for(var w=_[x],b=_[x].holes,M=0;M<b.length;M++)for(var T=b[M],E=0;E<T.length-1;E++){var S=R.default.rayCrossSegment(t,n,T[E],T[E+1],y);if(S&&(S=R.default.distanceOfTwoPoints(t,y),S<o))return o=S,i.model=w,i.distance=Number.MAX_VALUE,i.stickToRoad=!1,i.obstructType=B.default.NaviObstructType_EXTENT,!1}for(var A=_[x].points,I=0;I<A.length-1;I++){var L=R.default.rayCrossSegment(t,n,A[I],A[I+1],y);if(L&&(L=R.default.distanceOfTwoPoints(t,y),L<o))return o=L,i.model=w,i.distance=Number.MAX_VALUE,i.stickToRoad=!1,i.obstructType=B.default.NaviObstructType_EXTENT,!1}}return i.toDistance=R.default.distanceOfTwoPoints(i.cross,r),!0}},{key:"_adherenceCompare",value:function(e,t){return e.toDistance-t.toDistance}},{key:"_adherenceAngleCompare",value:function(e,t){return t.rotateAngle-e.rotateAngle}},{key:"_clearTempPoint",value:function(e){if(e=this._zoneIdGraph.get(e),e){for(var t=e.nodeVector,n=t.length-1;0<=n;n--){var r=t[n];if(null==r||0<=r.Id)break;(0,O.default)(t).call(t,n,1)}for(var i=e.roadVector,a=i.length-1;0<=a;a--){var o=i[a];if(null==o||0<=o.Id)break;(0,O.default)(i).call(i,a,1)}}}},{key:"_clearTempAdjList",value:function(){var s=this;this._zoneIdDijkstras.each(function(e,t){for(var n=[],r=t._naviGraph.adjList,i=0;i<(0,l.default)(r).length;i++)(0,l.default)(r)[i]<0&&n.push((0,l.default)(r)[i]);for(var a=0;a<n.length;a++)s._removeConnection(t._naviGraph.adjList,n[a]);for(var o=0;o<s._tmp_adj_node_ids.length;o++)s._deleteTmpConnectionEntirely(r,s._tmp_adj_node_ids[o])})}},{key:"_exploreUprightLikelyJoints",value:function(e,t,n,r,i){for(var a=[],o=0;o<r.length;o++)if(r[o].distance<R.default.epsilon())return a.push(r[o]),a;var s={x:0,y:0},l=R.default.calcFootOfUpright(t,n.startPoint,n.endPoint,s),u={};if(l&&this._isTwoPointsConnectedDirectly(t,s,u,i))return i={},i.cross=s,i.stickToRoad=!0,i.road=n,i.rotateAngle=0,i.dist=R.default.distanceOfTwoPoints(t,s),a.push(i),a;for(var h={x:s.x-t.x,y:s.y-t.y},c=0;c<r.length;c++){var d=r[c],f={x:d.cross.x-t.x,y:d.cross.y-t.y},f=R.default.calcRotateAngle(f,h),f=270<f?f-360:f;d.rotateAngle=f}(0,g.default)(r).call(r,this._adherenceAngleCompare);var p=null,m=null;if(r[r.length-1].rotateAngle<0)return p=r[r.length-1],a.push(p),a;for(var v=0;v<r.length;v++)if(0<r[v].rotateAngle)return p=r[v],0==v?a.push(p):(m=r[v-1],R.default.distanceOfTwoPoints(p.cross,n.startPoint)>R.default.distanceOfTwoPoints(m.cross,n.startPoint)?(a.push(m),a.push(p)):(a.push(p),a.push(m))),a;return a}},{key:"_calcAllAdherance",value:function(e,t,n,r,i,a){for(var o=i||30,s=0;s<360;s+=o){var l=new u.default;this._calcAdherenceAtAngle(e,t,s,n,l,a),1==l.stickToRoad&&r.push(l)}(0,g.default)(r).call(r,this._adherenceCompare)}},{key:"_seekNearRoads",value:function(e,t,n,r,i){var a=new h.default,o=[];for(this._calcAllAdherance(e,t,n,o,r,i);0!=o.length;){var s=o[0],l=a.get(s.road.Id);l?l.push(s):(l=[],l.push(s),a.put(s.road.Id,l)),(0,O.default)(o).call(o,0,1)}return a}},{key:"_insertTmpIsolatedNode",value:function(e,t){var n=new F.default;return n.Id=this._newTmpId(),n.point=(0,D.default)({},t),t=this._zoneIdGraph.get(e),t.nodeVector.push(n),e=this._zoneIdDijkstras.get(e),e._naviGraph._nodeMap.put(n.Id,t.nodeVector.length-1),n}},{key:"_insertIsolatedNode",value:function(e,t,n){return n?this._insertTmpIsolatedNode(e,t):(n=new F.default,n.Id=this._naviGraph.generateNodeId(),n.point=(0,D.default)({},t),t=this.zoneIdGraph.get(e),e=t.nodeVector,e=this._insertItemToVector(n,e),t._nodeMap.put(n.Id,e),n)}},{key:"_isTwoPointsConnectedDirectly",value:function(e,t,n,r){for(var i=this._zoneIdGraph.get(-1),a=null,o=0;o<i.obstructModels.length;o++)if(a=i.obstructModels[o],null!=a&&a!=r&&B.default.NaviModelPassType_DECORATE!=a.pass)for(var s=a.points,l=0;l<s.length-1;l++)if(R.default.calcCrossPoint(e,t,s[l],s[l+1],n)){var u=R.default.distanceOfTwoPoints(e,n),h=R.default.distanceOfTwoPoints(t,n);if(!(u<=R.default.epsilon()||h<=R.default.epsilon()))return!1}for(var c=i.obstructExtents,d=0;d<c.length;d++){for(var f=c[d],p=f.holes,m=0;m<p.length;m++)for(var v=p[m],g=0;g<v.length-1;g++)if(R.default.calcCrossPoint(e,t,v[g],v[g+1],n))return!1;for(var y=f.points,_=0;_<y.length-1;_++)if(R.default.calcCrossPoint(e,t,y[_],y[_+1],n))return!1}return!0}},{key:"_joinTwoNodes",value:function(e,t,n,r,i,a){for(var o=0;o<this._attachedTempRoads.length;o++){var s=this._attachedTempRoads[o],l={};if(1==R.default.calcCrossPoint(s.startPoint,s.endPoint,t.point,n.point,l)&&R.default.distanceOfTwoPoints(t.point,l)>R.default.epsilon())return null}void 0===r&&(r=B.default.NaviRoadEntry_BOTH),void 0===i&&(i=!0),void 0===a&&(a=!0);var u=new U.default;u.startId=t.Id,u.startPoint=t.point,u.endId=n.Id,u.endPoint=n.point,u.pointVector=[t.point,n.point],this._tmp_adj_node_ids.push(t.Id),this._tmp_adj_node_ids.push(n.Id),u.Id=i?this._newTmpId():this._naviGraph.generateRoadId(),u.roadEntry=r,u.calcLength(),a&&this._attachedTempRoads.push(u),a=this._zoneIdGraph.get(e),a.roadVector.push(u);var h,c,a=this._zoneIdDijkstras.get(e);return B.default.NaviRoadEntry_BOTH==r&&(e={nodeId:n.Id,length:u.length},h=a._naviGraph.adjList.get(t.Id),h?h.push(e):(h=[],h.push(e),a._naviGraph.adjList.put(t.Id,h)),e={nodeId:t.Id,length:u.length},h=a._naviGraph.adjList.get(n.Id),h?h.push(e):(h=[],h.push(e),a._naviGraph.adjList.put(n.Id,h))),B.default.NaviRoadEntry_FORWARD==r&&(h={nodeId:n.Id,length:u.length},c=a._naviGraph.adjList.get(t.Id),c?c.push(h):(c=[],c.push(h),a._naviGraph.adjList(t.Id,c))),B.default.NaviRoadEntry_BACK==r&&(r={nodeId:t.Id,length:u.length},c=a._naviGraph.adjList.get(n.Id),c?c.push(r):(c=[],c.push(r),a._naviGraph.adjList.put(n.Id,c))),u}},{key:"_isPointInPNTModel",value:function(e){var t=this._calcZoneIdByCoord(e),n=this._zonePNTModelsMap.get(t);if(n)for(var r=0;r<n.length;r++){var i=n[r];if(R.default.pointInPolygon2d(i.points,e,i.points.length))return i}return null}},{key:"_newTmpId",value:function(){return this._tmpId--}}]),n}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var h=i(n(63)),c=i(n(9)),o=i(n(2)),s=i(n(3)),l=i(n(97)),u=function(){function t(e){(0,o.default)(this,t),this.adj=e||[]}return(0,s.default)(t,[{key:"has",value:function(e){for(var t in this.adj)if(e==t[0])return!0;return!1}},{key:"weight",value:function(e){if(null==e)return null;for(var t in this.adj)if(e==this.adj[t][0])return this.adj[t][1];return null}},{key:"append",value:function(e){this.adj.push(e)}}]),t}(),n=function(){function a(e){for(var t in(0,o.default)(this,a),this._adjTable=new l.default,e){var n=e[t][0];e[t][1],e[t][2],this._adjTable.has(n)||this._adjTable.put(n,new u);for(var r=[],i=1;i<e[t].length;i++)r.push(e[t][i]);this._adjTable.get(n).append(r)}}return(0,s.default)(a,[{key:"get",value:function(e){return this._adjTable.has(e)?this._adjTable.get(e):null}},{key:"lookup",value:function(e,t){return this._adjTable.has(e)?(e=this._adjTable.get(e),e.weight(t)):null}},{key:"keys",value:function(){return(0,h.default)(this._adjTable)}},{key:"enhance",value:function(e,t,n){var r;n=n||[];for(var i,a,o=(0,h.default)(r=this).call(r),s=Infinity,l={dist:Infinity,transit:null},u=0;u<o.length;u++)-1==(0,c.default)(n).call(n,o[u])&&(i=this.lookup(e,o[u]),a=this.lookup(o[u],t),null!=i&&null!=a&&i+a<s&&(l={dist:i+a,transit:o[u]},s=i+a));return l}}]),a}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(9)),o=i(n(15)),s=i(n(2)),l=i(n(3)),u=function(){function n(e){if((0,s.default)(this,n),e instanceof Number){this._num=e,this._array=[];for(var t=0;t<e;t++)this._array.push(null)}if(e instanceof Array)for(this._names=e,this._array=[],t=0;t<e.length;t++)this._array.push(null)}return(0,l.default)(n,[{key:"size",value:function(){return this._array.length}},{key:"set",value:function(e,t){if(e<0||e>=this.size())throw"positon is out of bounder";this._array[e]=t}},{key:"get",value:function(e){var t,n=e;return"string"==typeof e&&(n=(0,a.default)(t=this._names).call(t,e)),this._array[n]}},{key:"toArray",value:function(){for(var e=[],t=0;t<this._array.length;t++)e.push(this._array[t]);return e}},{key:"equals",value:function(e){if(this._array.length!=e._array.length)return!1;if(this._names.length!=e._names.length)return!1;for(var t=0;t<this._names.length;t++)if(this._names[t]!=e._names[t])return!1;return!0}},{key:"clone",value:function(){for(var e=0==this._names.length?new n(this._array.length):new n(this._names),t=0;t<this._array.length;t++)e._array[t]=this._array[t];return e}}]),n}(),n=function(){function n(e){(0,s.default)(this,n),this._names=e,this._table=[]}return(0,l.default)(n,[{key:"append",value:function(e){if(e instanceof u){var t=new u(e._names);if(!t.equals(e))throw"the appended item is not compatible to the TupleTable";this._table.push(e)}else{var n,r=new u(this._names);for(n in e){var i=(0,a.default)(i=this._names).call(i,n);0<=i&&r.set(i,e[n])}this._table.push(r)}}},{key:"query",value:function(e,t){for(var n=0;n<this._table.length;n++){var r=this._table[n];if(r.get(e)==t)return r}return null}},{key:"foreach",value:function(e,t){t=t||-1;for(var n=0;n<this._table.length;n++)e(t<0?this._table[n]:this._table[n].get(t))}},{key:"size",value:function(){return this._table.length}},{key:"clone",value:function(){for(var e=new n(this._names),t=0;t<this._table.length;t++)e.append(this._table[t].clone());return e}},{key:"dropLines",value:function(e){for(var t=0;t<this._table.length;t++){var n,r,i=!0;for(n in e){var a=this._table[t].get(n);if(a!=e[n]){i=!1;break}}i&&((0,o.default)(r=this._table).call(r,t,1),t--)}}},{key:"clear",value:function(){this._table=[]}}]),n}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var h=i(n(29)),c=i(n(9)),d=i(n(15)),a=i(n(2)),o=i(n(3)),f=i(n(266)),p=i(n(608)),n=n(267),s=n.SmallQueue,n=function(){function i(e,t,n,r){(0,a.default)(this,i),this._startPt=e,this._endPt=t,this._passPts=n,this._dijkCollection=r,this._failedInsertedPts={}}return(0,o.default)(i,[{key:"_refreshPts",value:function(){var e,t={};for(e in this._passPts)for(var n=this._passPts[e],r=0;r<n.length;r++){var i=n[r],a=this._dijkCollection.getDijkByPoint(e,{x:i[0],y:i[1]});a?(t[a.Id]||(t[a.Id]=[]),t[a.Id].push(i)):(a=this._failedInsertedPts[e],null==a&&(this._failedInsertedPts[e]=[]),this._failedInsertedPts[e].push(i))}this._passPts=t}},{key:"_buildGraph",value:function(){this._graph=[];for(var e=0;e<this._dijkCollection.len();e++)for(var t,n,r=this._dijkCollection.get(e),i=0;i<this._dijkCollection.len();i++)e!=i&&(t=this._dijkCollection.get(i),n=r.hasRelationTo(t),n.related&&this._graph.push([r.Id,t.Id,n.dist]))}},{key:"executeCalculation",value:function(){this.reset(),this._buildGraph(),this._refreshPts();var e,t=[];for(e in this._passPts)t.push((0,h.default)(e));var n=this._dijkCollection.getDijkByPoint(this._startPt.groupID,this._startPt).Id,r=this._dijkCollection.getDijkByPoint(this._endPt.groupID,this._endPt).Id,i=new f.default(this._graph);i.setSId(n),i.setEId(r),n=(0,c.default)(t).call(t,n),-1!=n&&(0,d.default)(t).call(t,n,1),n=(0,c.default)(t).call(t,r),-1!=n&&(0,d.default)(t).call(t,n,1),i.setWayNodes(t),i.route();var a=i.getResult();if(2==a.route.length&&a.route[0]==a.route[1]&&(a.route=[a.route[0]]),Infinity!=a.dist){for(var o=[],s=0;s<a.route.length;s++){var l=this._dijkCollection.getDijkById(a.route[s]);if(l.setWayPoints(this._passPts[a.route[s]]),o.push(l),0<l._failedInsertPts.length){var u=this._failedInsertedPts[l.fid];for(null==u&&(this._failedInsertedPts[l.fid]=[]),s=0;s<l._failedInsertPts.length;s++)this._failedInsertedPts[l.fid].push(l._failedInsertPts[s])}}this._dijkList=new p.default,this._dijkList.load(o),this._dijkList.compute(this._startPt,this._endPt),this._routes=this._dijkList.routes}}},{key:"routes",get:function(){return this._routes},set:function(e){this._routes=e}},{key:"reset",value:function(){this._dijkCollection.each(function(e){e._next=new s,e._startNode=null,e._endNode=null,e._visited=!1,e._transitNodes=[],e._failedInsertPts=[]})}},{key:"failInsertedPts",get:function(){return this._failedInsertedPts}}]),i}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),n=function(){function e(){(0,a.default)(this,e),this._head=null,this.routes=[]}return(0,o.default)(e,[{key:"load",value:function(e){if(0!=e.length){this._head=e[0];for(var t=this._head,n=1;n<e.length;n++)t.pushNext(e[n]),t=e[n];t.pushNext(null)}}},{key:"compute",value:function(e,t){var n=this._head;for(n.setStart(e);n.getNext();){if(n.Id,!n.computeKeyRoutes())return!1;this.routes.push({groupId:n.gid,result:n.getResult()}),n=n.popNext()}n.setEnd(t),n.computeKeyRoutes(),this.routes.push({groupId:n.gid,result:n.getResult()})}}]),e}(),n=n;t.default=n},function(e,t,n){"use strict";var r=n(0),i=n(1);r(t,"__esModule",{value:!0}),t.Matrix4=p;var l,u,a,o,s,h,c,d,f,i=i(n(13)),n=n(159);function p(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}(0,i.default)(p.prototype,{isMatrix4:!0,set:function(e,t,n,r,i,a,o,s,l,u,h,c,d,f,p,m){var v=this.elements;return v[0]=e,v[4]=t,v[8]=n,v[12]=r,v[1]=i,v[5]=a,v[9]=o,v[13]=s,v[2]=l,v[6]=u,v[10]=h,v[14]=c,v[3]=d,v[7]=f,v[11]=p,v[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new p).fromArray(this.elements)},copy:function(e){var t=this.elements,e=e.elements;return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],this},copyPosition:function(e){var t=this.elements,e=e.elements;return t[12]=e[12],t[13]=e[13],t[14]=e[14],this},extractBasis:function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this},extractRotation:(f=new n.Vector3,function(e){var t=this.elements,n=e.elements,r=1/f.setFromMatrixColumn(e,0).length(),i=1/f.setFromMatrixColumn(e,1).length(),e=1/f.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}),makeRotationFromEuler:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t,n,r,i,a,o,s,l,u,h,c,d,f=this.elements,p=e.x,m=e.y,v=e.z,g=Math.cos(p),y=Math.sin(p),_=Math.cos(m),p=Math.sin(m),m=Math.cos(v),v=Math.sin(v);return"XYZ"===e.order?(a=g*m,o=g*v,s=y*m,l=y*v,f[0]=_*m,f[4]=-_*v,f[8]=p,f[1]=o+s*p,f[5]=a-l*p,f[9]=-y*_,f[2]=l-a*p,f[6]=s+o*p,f[10]=g*_):"YXZ"===e.order?(t=_*m,n=_*v,r=p*m,i=p*v,f[0]=t+i*y,f[4]=r*y-n,f[8]=g*p,f[1]=g*v,f[5]=g*m,f[9]=-y,f[2]=n*y-r,f[6]=i+t*y,f[10]=g*_):"ZXY"===e.order?(t=_*m,n=_*v,r=p*m,i=p*v,f[0]=t-i*y,f[4]=-g*v,f[8]=r+n*y,f[1]=n+r*y,f[5]=g*m,f[9]=i-t*y,f[2]=-g*p,f[6]=y,f[10]=g*_):"ZYX"===e.order?(a=g*m,o=g*v,s=y*m,l=y*v,f[0]=_*m,f[4]=s*p-o,f[8]=a*p+l,f[1]=_*v,f[5]=l*p+a,f[9]=o*p-s,f[2]=-p,f[6]=y*_,f[10]=g*_):"YZX"===e.order?(u=g*_,h=g*p,c=y*_,d=y*p,f[0]=_*m,f[4]=d-u*v,f[8]=c*v+h,f[1]=v,f[5]=g*m,f[9]=-y*m,f[2]=-p*m,f[6]=h*v+c,f[10]=u-d*v):"XZY"===e.order&&(u=g*_,h=g*p,c=y*_,d=y*p,f[0]=_*m,f[4]=-v,f[8]=p*m,f[1]=u*v+d,f[5]=g*m,f[9]=h*v-c,f[2]=c*v-h,f[6]=y*m,f[10]=d*v+u),f[3]=0,f[7]=0,f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,this},makeRotationFromQuaternion:(c=new n.Vector3(0,0,0),d=new n.Vector3(1,1,1),function(e){return this.compose(c,e,d)}),lookAt:(o=new n.Vector3,s=new n.Vector3,h=new n.Vector3,function(e,t,n){var r=this.elements;return h.subVectors(e,t),0===h.lengthSq()&&(h.z=1),h.normalize(),o.crossVectors(n,h),0===o.lengthSq()&&(1===Math.abs(n.z)?h.x+=1e-4:h.z+=1e-4,h.normalize(),o.crossVectors(n,h)),o.normalize(),s.crossVectors(h,o),r[0]=o.x,r[4]=s.x,r[8]=h.x,r[1]=o.y,r[5]=s.y,r[9]=h.y,r[2]=o.z,r[6]=s.z,r[10]=h.z,this}),multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],l=n[12],u=n[1],h=n[5],c=n[9],d=n[13],f=n[2],p=n[6],m=n[10],v=n[14],g=n[3],y=n[7],_=n[11],x=n[15],w=r[0],b=r[4],M=r[8],T=r[12],E=r[1],S=r[5],A=r[9],I=r[13],L=r[2],R=r[6],N=r[10],k=r[14],e=r[3],t=r[7],n=r[11],r=r[15];return i[0]=a*w+o*E+s*L+l*e,i[4]=a*b+o*S+s*R+l*t,i[8]=a*M+o*A+s*N+l*n,i[12]=a*T+o*I+s*k+l*r,i[1]=u*w+h*E+c*L+d*e,i[5]=u*b+h*S+c*R+d*t,i[9]=u*M+h*A+c*N+d*n,i[13]=u*T+h*I+c*k+d*r,i[2]=f*w+p*E+m*L+v*e,i[6]=f*b+p*S+m*R+v*t,i[10]=f*M+p*A+m*N+v*n,i[14]=f*T+p*I+m*k+v*r,i[3]=g*w+y*E+_*L+x*e,i[7]=g*b+y*S+_*R+x*t,i[11]=g*M+y*A+_*N+x*n,i[15]=g*T+y*I+_*k+x*r,this},multiplyScalar:function(e){var 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},applyToBufferAttribute:(a=new n.Vector3,function(e){for(var t=0,n=e.count;t<n;t++)a.x=e.getX(t),a.y=e.getY(t),a.z=e.getZ(t),a.applyMatrix4(this),e.setXYZ(t,a.x,a.y,a.z);return e}),determinant:function(){var e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],o=e[5],s=e[9],l=e[13],u=e[2],h=e[6],c=e[10],d=e[14],f=e[3],p=e[7],m=e[11],e=e[15];return f*(+i*s*h-r*l*h-i*o*c+n*l*c+r*o*d-n*s*d)+p*(+t*s*d-t*l*c+i*a*c-r*a*d+r*l*u-i*s*u)+m*(+t*l*h-t*o*d-i*a*h+n*a*d+i*o*u-n*l*u)+e*(-r*o*u-t*s*h+t*o*c+r*a*h-n*a*c+n*s*u)},transpose:function(){var e=this.elements,t=e[1];return 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:function(e,t,n){var r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this},getInverse:function(e,t){var n=this.elements,r=e.elements,i=r[0],a=r[1],o=r[2],s=r[3],l=r[4],u=r[5],h=r[6],c=r[7],d=r[8],f=r[9],p=r[10],m=r[11],v=r[12],g=r[13],y=r[14],_=r[15],x=f*y*c-g*p*c+g*h*m-u*y*m-f*h*_+u*p*_,w=v*p*c-d*y*c-v*h*m+l*y*m+d*h*_-l*p*_,b=d*g*c-v*f*c+v*u*m-l*g*m-d*u*_+l*f*_,M=v*f*h-d*g*h-v*u*p+l*g*p+d*u*y-l*f*y,e=i*x+a*w+o*b+s*M;if(0!==e)return e=1/e,n[0]=x*e,n[1]=(g*p*s-f*y*s-g*o*m+a*y*m+f*o*_-a*p*_)*e,n[2]=(u*y*s-g*h*s+g*o*c-a*y*c-u*o*_+a*h*_)*e,n[3]=(f*h*s-u*p*s-f*o*c+a*p*c+u*o*m-a*h*m)*e,n[4]=w*e,n[5]=(d*y*s-v*p*s+v*o*m-i*y*m-d*o*_+i*p*_)*e,n[6]=(v*h*s-l*y*s-v*o*c+i*y*c+l*o*_-i*h*_)*e,n[7]=(l*p*s-d*h*s+d*o*c-i*p*c-l*o*m+i*h*m)*e,n[8]=b*e,n[9]=(v*f*s-d*g*s-v*a*m+i*g*m+d*a*_-i*f*_)*e,n[10]=(l*g*s-v*u*s+v*a*c-i*g*c-l*a*_+i*u*_)*e,n[11]=(d*u*s-l*f*s-d*a*c+i*f*c+l*a*m-i*u*m)*e,n[12]=M*e,n[13]=(d*g*o-v*f*o+v*a*p-i*g*p-d*a*y+i*f*y)*e,n[14]=(v*u*o-l*g*o-v*a*h+i*g*h+l*a*y-i*u*y)*e,n[15]=(l*f*o-d*u*o+d*a*h-i*f*h-l*a*p+i*u*p)*e,this;if(r="THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0",!0===t)throw new Error(r);return console.warn(r),this.identity()},scale:function(e){var t=this.elements,n=e.x,r=e.y,e=e.z;return t[0]*=n,t[4]*=r,t[8]*=e,t[1]*=n,t[5]*=r,t[9]*=e,t[2]*=n,t[6]*=r,t[10]*=e,t[3]*=n,t[7]*=r,t[11]*=e,this},getMaxScaleOnAxis:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],e=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,e))},makeTranslation:function(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e),e=Math.sin(e);return this.set(1,0,0,0,0,t,-e,0,0,e,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e),e=Math.sin(e);return this.set(t,0,e,0,0,1,0,0,-e,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e),e=Math.sin(e);return this.set(t,-e,0,0,e,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,o=e.y,s=e.z,t=i*a,e=i*o;return this.set(t*a+n,t*o-r*s,t*s+r*o,0,t*o+r*s,e*o+n,e*s-r*a,0,t*s-r*o,e*s+r*a,i*s*s+n,0,0,0,0,1),this},makeScale:function(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(e,t,n){return this.set(1,t,n,0,e,1,n,0,e,t,1,0,0,0,0,1),this},compose:function(e,t,n){var r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,l=i+i,u=a+a,h=o+o,c=i*l,d=i*u,f=i*h,t=a*u,i=a*h,a=o*h,o=s*l,l=s*u,u=s*h,s=n.x,h=n.y,n=n.z;return r[0]=(1-(t+a))*s,r[1]=(d+u)*s,r[2]=(f-l)*s,r[3]=0,r[4]=(d-u)*h,r[5]=(1-(c+a))*h,r[6]=(i+o)*h,r[7]=0,r[8]=(f+l)*n,r[9]=(i-o)*n,r[10]=(1-(c+t))*n,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this},decompose:(l=new n.Vector3,u=new p,function(e,t,n){var r=this.elements,i=l.set(r[0],r[1],r[2]).length(),a=l.set(r[4],r[5],r[6]).length(),o=l.set(r[8],r[9],r[10]).length(),s=this.determinant();return s<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],u.copy(this),s=1/i,e=1/a,r=1/o,u.elements[0]*=s,u.elements[1]*=s,u.elements[2]*=s,u.elements[4]*=e,u.elements[5]*=e,u.elements[6]*=e,u.elements[8]*=r,u.elements[9]*=r,u.elements[10]*=r,t.setFromRotationMatrix(u),n.x=i,n.y=a,n.z=o,this}),makePerspective:function(e,t,n,r,i,a){void 0===a&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var o=this.elements,s=2*i/(t-e),l=2*i/(n-r),e=(t+e)/(t-e),n=(n+r)/(n-r),r=-(a+i)/(a-i),i=-2*a*i/(a-i);return o[0]=s,o[4]=0,o[8]=e,o[12]=0,o[1]=0,o[5]=l,o[9]=n,o[13]=0,o[2]=0,o[6]=0,o[10]=r,o[14]=i,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this},makeOrthographic:function(e,t,n,r,i,a){var o=this.elements,s=1/(t-e),l=1/(n-r),u=1/(a-i),e=(t+e)*s,r=(n+r)*l,i=(a+i)*u;return o[0]=2*s,o[4]=0,o[8]=0,o[12]=-e,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-r,o[2]=0,o[6]=0,o[10]=-2*u,o[14]=-i,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this},equals:function(e){for(var t=this.elements,n=e.elements,r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<16;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}})},function(e,t,n){"use strict";var r=n(1),f=r(n(27)),o=r(n(116)),r=r(n(94)),s=n(150);function p(e,t,n,r,i,a){var o=(e+n)/2,s=(t+r)/2,l=((e-n)*(e-n)+(t-r)*(t-r))/4,u=Math.sqrt(l),h=Math.sqrt(i*i-l),c=u/h,d=u*c,f=Math.PI/2,p=1,i=(n-e)/(t-r),l=-1,h=(e-n)/(t-r),u=Math.sqrt(p*p+i*i),c=Math.sqrt(l*l+h*h),p=p/u,u=i/u,l=l/c,c=h/c,u={x:o+d*p,y:s+d*u,theta:f},f={x:o+d*l,y:s+d*c,theta:f};return 0<(n-e)*(u.y-t)-(r-t)*(u.x-e)?0===a?u:f:0===a?f:u}function l(e,t,n,r){for(var i=0;i<e.length;i++)switch(e[i]){case"m":t.moveTo(r.x+(0,f.default)(e[i+1]),r.y+(0,f.default)(e[i+2])),n.x=r.x+(0,f.default)(e[i+1]),n.y=r.y+(0,f.default)(e[i+2]),r.x=n.x,r.y=n.y,i+=2;break;case"M":t.moveTo((0,f.default)(e[i+1]),(0,f.default)(e[i+2])),n.x=(0,f.default)(e[i+1]),n.y=(0,f.default)(e[i+2]),r.x=n.x,r.y=n.y,i+=2;break;case"l":t.lineTo(n.x+(0,f.default)(e[i+1]),n.y+(0,f.default)(e[i+2])),n.x=n.x+(0,f.default)(e[i+1]),n.y=n.y+(0,f.default)(e[i+2]),i+=2;break;case"L":t.lineTo((0,f.default)(e[i+1]),(0,f.default)(e[i+2])),n.x=(0,f.default)(e[i+1]),n.y=(0,f.default)(e[i+2]),i+=2;break;case"A":var a=(0,f.default)(e[i+1]),o=(0,f.default)(e[i+2]),s=((0,f.default)(e[i+3]),Math.PI,(0,f.default)(e[i+4]),(0,f.default)(e[i+5])),l=n.x,u=n.y,h=(0,f.default)(e[i+6]),c=(0,f.default)(e[i+7]);a===o&&(d=p(l,u,h,c,a,s),t.arcTo(d.x,d.y,h,c,d.theta),n.x=h,n.y=c),i+=7;break;case"a":var d,a=(0,f.default)(e[i+1]),o=(0,f.default)(e[i+2]),s=((0,f.default)(e[i+3]),Math.PI,(0,f.default)(e[i+4]),(0,f.default)(e[i+5])),l=n.x,u=n.y,h=l+(0,f.default)(e[i+6]),c=u+(0,f.default)(e[i+7]);a===o&&(d=p(l,u,h,c,a,s),t.arcTo(d.x,d.y,h,c,d.theta),n.x=h,n.y=c),i+=7;break;case"h":t.lineTo(n.x+(0,f.default)(e[i+1]),n.y),n.x=n.x+(0,f.default)(e[i+1]),i+=1;break;case"H":t.lineTo((0,f.default)(e[i+1]),n.y),n.x=(0,f.default)(e[i+1]),i+=1;break;case"z":case"Z":t.lineTo(r.x,r.y)}}var u=["M","0","15.07","L","0.69","1.92","A","2","2","0","0","1","2.66","0","L","11.8","0","l","-0.07","1.37","H","3.09","A","1.09","1.09","0","0","0","2","2.44","l","-0.2","4.44","h","9.37","l","-0.07","1.37","H","1.72","l","-0.36","6.82","Z"],h=["M","13.79","11","l","-0.08","1.63","a","1","1","0","0","0","1","1.08","h","8.53","l","-0.07","1.36","h","-9","A","1.84","1.84","0","0","1","12.31","13","l","0.48","-9.16","h","8.9","a","2","2","0","0","1","2","2","L","23.53","9","A","2.11","2.11","0","0","1","21.47","11","Z","m","8.4","-2.49","l","0.08","-2.16","a","1.07","1.07","0","0","0","-1.09","-1.09","H","14.09","l","-0.22","4.33","H","21","A","1.15","1.15","0","0","0","22.19","8.51","Z"],c=["M","33.94","3.86","a","1.93","1.93","0","0","1","2","1.95","l","-0.47","9.27","H","34.07","l","0.45","-8.72","a","1.09","1.09","0","0","0","-1.09","-1.1","H","26.3","l","-0.51","9.82","H","24.41","L","25","3.85","Z"],d=["M","36.48","17.72","H","45","a","1.16","1.16","0","0","0","1.16","-1.22","l","0.07","-1.43","H","38.72","a","2","2","0","0","1","-2","-2.06","l","0.37","-7.19","a","2","2","0","0","1","2.15","-2","H","48.2","l","-0.69","13.28","a","2.09","2.09","0","0","1","-2.06","2","h","-9","Z","m","9.85","-4.05","l","0.44","-8.45","H","39.53","a","1.07","1.07","0","0","0","-1.08","1.1","l","-0.32","6.27","a","1.16","1.16","0","0","0","1.1","1.1","Z"],m=["M","57.43","11.59","L","63.48","0","h","1.83","l","-0.79","15.05","H","63.15","l","0.67","-12.79","L","57.67","14","h","-0.75","L","52.07","2.34","l","-0.64","12.72","H","50","L","50.83","0","H","52.6","Z"],v=["M","69.6","10.2","l","-2.37","4.87","h","-1.5","L","73.09","0","h","1.49","l","5.77","15.05","h","-1.5","L","77","10.2","Z","m","6.86","-1.39","L","73.74","1.73","L","70.28","8.81","Z"],g=["M","82.95","15.07","H","81.57","L","82.35","0","h","10","a","1.94","1.94","0","0","1","1.85","2","L","93.89","7.4","a","2","2","0","0","1","-2","1.92","H","83.25","Z","m","8.43","-7.15","a","1.13","1.13","0","0","0","1.09","-1.09","l","0.35","-4.37","a","1.1","1.1","0","0","0","-1.08","-1.06","H","83.66","l","-0.34","6.53","Z"];function i(e){var t=e.MapOptions.tempCanvas,n=t.getContext("2d");n.save(),t.width=500,t.height=120,t.style.width="500px",t.style.height="120px";var r={x:0,y:0},i={x:0,y:0};n.transform(5,0,0,5,10,10);var a=n.createLinearGradient(5.9,15.07,5.9,0);return a.addColorStop(0,"#232323"),a.addColorStop(1,"#585858"),n.fillStyle=a,n.beginPath(),l(u,n,i,r),n.closePath(),(0,o.default)(n).call(n),n.beginPath(),l(h,n,i,r),n.closePath(),(0,o.default)(n).call(n),n.beginPath(),l(c,n,i,r),n.closePath(),(0,o.default)(n).call(n),n.beginPath(),l(d,n,i,r),n.closePath(),(0,o.default)(n).call(n),a=n.createLinearGradient(57.68,15.07,57.68,0),a.addColorStop(0,"#77bf00"),a.addColorStop(1,"#addc0c"),n.fillStyle=a,n.beginPath(),l(m,n,i,r),n.closePath(),(0,o.default)(n).call(n),n.beginPath(),l(v,n,i,r),n.closePath(),(0,o.default)(n).call(n),n.beginPath(),l(g,n,i,r),n.closePath(),(0,o.default)(n).call(n),t=t.toDataURL("image/png"),n.restore(),s.FMTextureUtil.createTexture(e.canvas,t)}r.default.f=u,r.default.e=h,r.default.n=c,r.default.g=d,r.default.m=m,r.default.a=v,r.default.p=g,r.default.d=i}],b={},c.m=a,c.c=b,c.d=function(e,t,n){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(t,e){if(1&e&&(t=c(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)c.d(n,r,function(e){return t[e]}.bind(null,r));return n},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="",c(c.s=268).default);