/*! Released Version 2.5.0,BUILD 39. Fengmap Javascript SDK, see: https://www.fengmap.com for details */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.fengmap=t():e.fengmap=t()}(this,function(){return n=[function(e,t,n){e.exports=n(284)},function(e){function t(e){return e&&e.__esModule?e:{default:e}}e.exports=t},function(e){function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}e.exports=t},function(e,t,n){var r=n(0);function i(e,t){for(var n=0;n>>0,h=new RegExp(e.source,s+"g");(i=d.call(h,n))&&(r=h[m],!(l=u)));)h[m]===i.index&&h[m]++;return l===n[p]?!a&&h.test("")||o.push(""):o.push(n.slice(l)),o[p]>u?o.slice(0,u):o}:"0"[o](void 0,0)[p]?function(e,t){return void 0===e&&0===t?[]:v.call(this,e,t)}:v,[function(e,t){var n=r(this),i=null==e?void 0:e[a];return void 0!==i?i.call(e,n,t):y.call(String(n),e,t)},function(e,t){var n=g(y,e,this,t,y!==v);if(n.done)return n.value;var i=_(e),r=String(this),a=x(i,RegExp),o=i.unicode,s=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(S?"y":"g"),l=new a(S?i:"^(?:"+i.source+")",s),u=void 0===t?E:t>>>0;if(0===u)return[];if(0===r.length)return null===M(l,r)?[r]:[];for(var h=0,c=0,d=[];c=e.y||s>=e.y&&ue.x&&(n=!n)}}return n}},{key:"isInCircle",value:function(e,t,n,i){if(e.xi[1])return!1;if(e.yi[3])return!1;var r=n*n,a=e.x,o=e.y,s=t.x,l=t.y,u=s-a,h=l-o,c=u*u+h*h;return cr||e.yo)}},{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,i){return!(Math.max(e.x,t.x)=t.y||a.y=t.y)&&(r.x<=t.x||a.x<=t.x)&&r.x+(t.y-r.y)/(a.y-r.y)*(a.x-r.x)=t.y||a.y=t.y)&&(r.x<=t.x||a.x<=t.x)){if(o=r.x+(t.y-r.y)/(a.y-r.y)*(a.x-r.x),Math.abs(o-t.x)<=V)return 2;o=t.y||a.y=t.y)&&(r.x<=t.x||a.x<=t.x)&&r.x+(t.y-r.y)/(a.y-r.y)*(a.x-r.x)r[1]&&t.x>r[1])return!1;if(e.yr[3]&&t.y>r[3])return!1;var a=i*i,o=e.x,s=e.y,l=t.x,u=t.y,h=n.x,c=n.y,d=l-o,f=u-s,p=d*d+f*f,m=h-o,v=c-s,g=m*m+v*v;if(U.isZero(p))return!!U.isZero(g)||gi[1]&&t.x>i[1])return!1;if(e.yi[3]&&t.y>i[3])return!1;var r=n.length;if(U.pointInPolygon2d(n,e,r))return!0;if(U.pointInPolygon2d(n,t,r))return!0;for(var a=0;ar[1]&&t.x>r[1])return null;if(e.yr[3]&&t.y>r[3])return null;var a={isContain:!1,crossPoints:[]},o=i*i,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,v=c-s,g=d-l,y=v*v+g*g,_=c-u,x=d-h,b=_*_+x*x;if(U.isZero(m))return(U.isZero(y)||yi[1]&&t.x>i[1])return null;if(e.yi[3]&&t.y>i[3])return null;var r={containType:0,crossPoints:[]},a=n.length;U.pointInPolygon2d(n,e,a)&&(r.containType|=1),U.pointInPolygon2d(n,t,a)&&(r.containType|=2);for(var o=[],s=0;so)return!1;var m=(p-d)/(f-c),v=m*(u-c)+d;return r.y=v,r.x=u,!(vo)return!1;var g=(p-d)/(f-c),y=g*(u-c)+d;return r.y=y,r.x=u,!(he);n++);}}]),e}(),u=l;t.default=u},function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},function(e,t,n){"use strict";var i=n(27),r=n(131),a=n(51),o=n(25),s=[].sort,l=[1,2,3];i(i.P+i.F*(o(function(){l.sort(void 0)})||!o(function(){l.sort(null)})||!n(327)(s)),"Array",{sort:function(e){return void 0===e?s.call(a(this)):s.call(a(this),r(e))}})},function(e,t,n){var i=n(23);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(47)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";var i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var r={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,ALL:65535,ELEMENT:100},a=r;t.default=a},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var s=i(n(19)),l=i(n(18)),u=i(n(17)),a=i(n(15));n(5),n(4),n(79),n(10);var I=i(n(24));n(22);var _=i(n(77)),k=i(n(12)),o=i(n(2)),h=i(n(3)),c=i(n(168)),R=i(n(59)),d=i(n(417)),m=i(n(235)),v=i(n(419)),f=i(n(421)),p=i(n(431)),N=i(n(32)),M=i(n(95)),x=i(n(66));function P(e){if(void 0===u.default||null==e[l.default]){if((0,k.default)(e)||(e=g(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function g(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);nl.distance?l:u:u[0]?u:l[0]?l:[]}},{key:"getFacility",value:function(e,t,n,i,r){var a=this._scenes[e];if(!a)return[];var o=a.getFacilityByFilter(t,r);this._raycaster.setFromCamera(n,i),this._raycaster.perspective="PerspectiveCamera"===i.type;for(var s=this._raycaster.intersectObjects(o),l=0;ls[l-d].object.material.priority;d++){var f=s[l-c],p=s[l-d];s[l-d]=f,s[l]=p,c++}}return s}},{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=[];for(var t in this._scenes){var n=this._scenes[t].getRenderGroup();e.push(n)}return e}}},{key:"conformatScene",value:function(e,t,n){var i=new c.default(t,e,this);i.parent=this,this._scenes[t+""]=i,this._scenes[t+""].theme=n}},{key:"checkMaterialAlpha",value:function(e,t){if(e)if(this._focusAlphaMode&&t!==this._map.currentFocusGroup&&this._map.otherFocus.indexOf(t)<0){if((0,k.default)(e.material)){var n,i=P(e.material);try{for(i.s();!(n=i.n()).done;){var r=n.value;r.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 a=0;ah;if(n){switch(e){case"extent":i.renderNodeInited?d.checkMaterialAlpha(i.renderNode,l.eid):d.createExtent(i,c,l.eid);break;case"model":i.renderNodeInited?(d.checkMaterialAlpha(i.renderNode,l.eid),d.checkMaterialAlpha(i.line,l.eid)):d.createModel(i,c,l.eid);break;case"label":i.renderNodeInited?d.checkMaterialAlpha(i._renderNode,l.eid):i.tryInit||d.createLabel(i,c,y,l.eid);break;case"facility":i.renderNodeInited?d.checkMaterialAlpha(i._renderNode,l.eid):d.createFacility(i,c,l.eid);break;case"externalModel":if(i.renderNodeInited)d.checkMaterialAlpha(i._renderNode,l.eid);else{var r=i.bdata,a=i.gdata,o=f.getExteralModelTheme(r.fid);if(!o)return;d._externalLoader.preLoadModels[o.normalid]||(d._externalLoader.preLoadModels[o.normalid]={loaded:!1,isLoading:!1,modelUrl:o.model,model:null,geometry:null,material:null});var s=d._externalLoader.preLoadModels[o.normalid];s.loaded?d.createExterModel(s.geometry,s.material,a,r,o,i,p,m,l.height,v,g,s.isGltf):(d._externalLoader.waitingBacks[o.normalid]?d._externalLoader.addWaitingBacks(o.normalid,function(e,t,n){d.createExterModel(e,t,a,r,o,i,p,m,l.height,v,g,"js"!==n)},r.fid):d._externalLoader.addWaitingBacks(o.normalid,function(e,t,n){d.createExterModel(e,t,a,r,o,i,p,m,l.height,v,g,"js"!==n)},r.fid),s.isLoading||d._externalLoader.load(o.normalid))}}i.checkByFrustum(u)}else i.visible=!1})};for(a.s();!(n=a.n()).done;)o()}catch(e){a.e(e)}finally{a.f()}}}},{key:"createModel",value:function(e,t,n){var i,r=this._scenes[""+t].center.x,a=this._scenes[""+t].center.y,o=this._scenes[""+t].mapcenter.x,s=this._scenes[""+t].mapcenter.y,l=this._scenes[""+t].theme,u=e.gdata,h=e.bdata;this._map.MapOptions.useStoreApply&&(i=l.getStoreApplyTheme(h.fid)),i=i||l.getModelTheme(h);var c=null;c=1===this._map.dataManager.file_ver?R.default.convertGeo2Geometry(u.geo):R.default.convertArray2Geometry(u.idxs,u.pts),e._data=c;var d=u.height&&-1!==u.height?u.height:2,f=this.createGeometry(c,d,t),p=this._materialManager.createNormalMaterial(i);if(e._geometry=f,e.initMesh(p,new fm.Vector3(r,a+d,0)),e.x=o,e.y=s,e.height=d,e.currHeight=d,this.checkMaterialAlpha(e.renderNode,n),e.initLine(this._materialManager.createLineMaterial(i),u.height),this.checkMaterialAlpha(e.line,n),i.image&&i.sizes){var m=i.sizes.split(",");e.addStoreImage({image:i.image?this._map.MapOptions.mapThemeURL+"/"+this._map.MapOptions.defaultThemeName+"/"+i.image:"",angle:i.angle?i.angle:0,size:[(0,I.default)(m[0]),(0,I.default)(m[1])],offset:i.offset?i.offset:[0,0]})}}},{key:"createExtent",value:function(e,t,n){var i=e.gdata,r=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?R.default.convertGeo2Geometry(i.geo):R.default.convertArray2Geometry(i.idxs,i.pts);var h=this.createGeometry(u,i.height?i.height:1,t);e._geometry=h,e.x=s,e.y=l;var c=this._materialManager.createNormalMaterial();e.initMesh(c,new fm.Vector3(a,o,0),r.floorColor,r.floorOpacity),this.checkMaterialAlpha(e.renderNode,n)}},{key:"createLabel",value:function(e,t,n,i){var r=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,c=null;c=1===this._map.dataManager.file_ver?R.default.convertGeo2Points(r.geo):R.default.convertArrayPoints(r.idxs,r.pts);var d=-1===r.height?2.2:r.height,f=new fm.Vector3(c.vertices[0].x-o,-c.vertices[0].y+s,0).applyEuler(new fm.Euler(Math.PI/2,0,0,"XYZ")).add(new fm.Vector3(l,u+d,0)),p=a.ename,m=a.name,v=n===x.default.ZH?m:p;e.x=c.vertices[0].x,e.y=c.vertices[0].y,e.height=d,e.pos=f,e.tryInit=!0;var g=h.getLabelTheme(a.type);if(g&&(e.theme=g,e.size=1.4*g.fontsize,v)){var y=this._materialManager.createLabelMaterial(v,g);e.initSprite(y,(new fm.Vector3).copy(f)),this.checkMaterialAlpha(e._renderNode,i),e.setSize()}}},{key:"createFacility",value:function(e,t,n){var i=e.gdata,r=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,h=null;h=1===this._map.dataManager.file_ver?R.default.convertGeo2Points(i.geo):R.default.convertArrayPoints(i.idxs,i.pts);var c=-1===i.height?2.2:i.height,d=new fm.Vector3(h.vertices[0].x-s,-h.vertices[0].y+l,0).applyEuler(new fm.Euler(Math.PI/2,0,0,"XYZ")).add(new fm.Vector3(a,o+c,0)),f=u.getPoiTheme(r.type),p=this._materialManager.createPoiMaterial(f);e.x=h.vertices[0].x,e.y=h.vertices[0].y,e.height=c,e.pos=d,f.height&&(e.size=f.height),e.initSprite(p,(new fm.Vector3).copy(d)),this.checkMaterialAlpha(e._renderNode,n),e.setSize()}},{key:"everGroup",value:function(e,t){for(var n=0;nw;w++)r(m,x=b[w])&&!r(p,x)&&c(p,x,u(m,x));p.prototype=v,v.constructor=p,n(49)(i,f,p)}},function(e,t,n){var a=n(60);e.exports=function(i,r,e){if(a(i),void 0===r)return i;switch(e){case 1:return function(e){return i.call(r,e)};case 2:return function(e,t){return i.call(r,e,t)};case 3:return function(e,t,n){return i.call(r,e,t,n)}}return function(){return i.apply(r,arguments)}}},function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var a=n(33),o=n(43),s=n(61),l=n(88)("src"),i=n(290),r="toString",u=(""+i).split(r);n(106).inspectSource=function(e){return i.call(e)},(e.exports=function(e,t,n,i){var r="function"==typeof n;r&&(s(n,"name")||o(n,"name",t)),e[t]!==n&&(r&&(s(n,l)||o(n,l,e[t]?""+e[t]:u.join(String(t)))),e===a?e[t]=n:i?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,r,function(){return"function"==typeof this&&this[l]||i.call(this)})},function(e,t,n){"use strict";var i=n(147),r=n(300),a=n(72),o=n(103);e.exports=n(198)(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var i=n(57);e.exports=function(e){return Object(i(e))}},function(e,t,n){"use strict";if(n(31)){var _=n(107),x=n(33),b=n(25),w=n(27),M=n(209),i=n(331),p=n(101),T=n(211),r=n(102),E=n(43),a=n(210),o=n(58),S=n(41),A=n(212),s=n(105),l=n(87),u=n(61),L=n(114),I=n(48),m=n(51),v=n(332),k=n(148),R=n(199),N=n(104).f,g=n(333),h=n(88),c=n(21),d=n(213),f=n(188),y=n(204),P=n(50),C=n(72),D=n(337),O=n(189),F=n(158),B=n(338),G=n(42),z=n(132),U=G.f,V=z.f,H=x.RangeError,j=x.TypeError,W=x.Uint8Array,Y="ArrayBuffer",q="Shared"+Y,X="BYTES_PER_ELEMENT",Z="prototype",J=Array[Z],K=i.ArrayBuffer,Q=i.DataView,$=d(0),ee=d(2),te=d(3),ne=d(4),ie=d(5),re=d(6),ae=f(!0),oe=f(!1),se=P.values,le=P.keys,ue=P.entries,he=J.lastIndexOf,ce=J.reduce,de=J.reduceRight,fe=J.join,pe=J.sort,me=J.slice,ve=J.toString,ge=J.toLocaleString,ye=c("iterator"),_e=c("toStringTag"),xe=h("typed_constructor"),be=h("def_constructor"),we=M.CONSTR,Me=M.TYPED,Te=M.VIEW,Ee="Wrong length!",Se=d(1,function(e,t){return Re(y(e,e[be]),t)}),Ae=b(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),Le=!!W&&!!W[Z].set&&b(function(){new W(1).set({})}),Ie=function(e,t){var n=o(e);if(n<0||n%t)throw H("Wrong offset!");return n},ke=function(e){if(I(e)&&Me in e)return e;throw j(e+" is not a typed array!")},Re=function(e,t){if(!(I(e)&&xe in e))throw j("It is not a typed array constructor!");return new e(t)},Ne=function(e,t){return Pe(y(e,e[be]),t)},Pe=function(e,t){for(var n=0,i=t.length,r=Re(e,i);n=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})})},function(e){e.exports={}},function(e,t,n){var i=n(141),r=n(109);e.exports=function(e){return i(r(e))}},function(e){e.exports={}},function(e,t,n){var i=n(111)("meta"),r=n(23),a=n(55),o=n(39).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(47)(function(){return l(Object.preventExtensions({}))}),h=function(e){o(e,i,{value:{i:"O"+ ++s,w:{}}})},c=function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,i)){if(!l(e))return"F";if(!t)return"E";h(e)}return e[i].i},d=function(e,t){if(!a(e,i)){if(!l(e))return!0;if(!t)return!1;h(e)}return e[i].w},f=function(e){return u&&p.NEED&&l(e)&&!a(e,i)&&h(e),e},p=e.exports={KEY:i,NEED:!1,fastKey:c,getWeak:d,onFreeze:f}},function(e,t,n){n(308);for(var i=n(20),r=n(54),a=n(70),o=n(26)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l]*>)/g,p=/\$([$&`']|\d\d?)/g,R=function(e){return void 0===e?e:String(e)};n(115)("replace",2,function(r,a,b,w){return[function(e,t){var n=r(this),i=null==e?void 0:e[a];return void 0!==i?i.call(e,n,t):b.call(String(n),e,t)},function(e,t){var n=w(b,e,this,t);if(n.done)return n.value;var i=T(e),r=String(this),a="function"==typeof t;a||(t=String(t));var o=i.global;if(o){var s=i.unicode;i.lastIndex=0}for(var l=[];;){var u=L(i,r);if(null===u)break;if(l.push(u),!o)break;var h=String(u[0]);""===h&&(i.lastIndex=A(r,E(i.lastIndex),s))}for(var c="",d=0,f=0;fthis._time){for(var i in this._left){var r=(this._right[i]-this._left[i])*(this._time-this._countTime)/this._time;this._result[i]+=r,n[i]=r}return this._enable=!1,this._runBack(this._result,n),this._endBack(this._result,n),this._result={},void(this._countTime=0)}for(var a in this._left){var o=(this._right[a]-this._left[a])*t/this._time;this._result[a]+=o,n[a]=o}this._countTime+=t,this._runBack(this._result,n)}},{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,u.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}}]),l}(),s=o;t.default=s},function(e,t,n){"use strict";var i=n(0);i(t,"__esModule",{value:!0}),t.mapOptionMessage=t.tileMessage=t.cerityMessage=void 0;var r={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=r;var a={noGroup:"目标楼层未初始化,请检查楼层id是否越界,或者等待楼层加载!",noFocus:"焦点层不在可视楼层中,请检查焦点层和可视楼层的参数设置!"};t.tileMessage=a;var o={defaultViewCenterError:"地图初始化中心位置错误,请检查fengmap.FMMap初始化参数defaultViewCenter的正确性"};t.mapOptionMessage=o},function(e,t,n){"use strict";var i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var r={MODULE_SHORTEST:1,MODULE_BEST:2},a=r;t.default=a},function(e,t,n){"use strict";var i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var r={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},a=r;t.default=a},function(e){"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){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},function(e,t,n){var r=n(48);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+n).toString(36))}},function(e){e.exports=!0},function(e,t,a){var i=a(35),r=a(190),o=a(144),s=a(142)("IE_PROTO"),l=function(){},u="prototype",h=function(){var e,t=a(129)("iframe"),n=o.length,i="<",r=">";for(t.style.display="none",a(192).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(i+"script"+r+"document.F=Object"+i+"/script"+r),e.close(),h=e.F;n--;)delete h[u][o[n]];return h()};e.exports=Object.create||function(e,t){var n;return null!==e?(l[u]=i(e),n=new l,l[u]=null,n[s]=e):n=h(),void 0===t?n:r(n,t)}},function(e,t,n){var i=n(191),r=n(144);e.exports=Object.keys||function(e){return i(e,r)}},function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},function(e,t,n){var i=n(39).f,r=n(55),a=n(26)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,a)&&i(e,a,{configurable:!0,value:t})}},function(e,t,n){var i=n(23);e.exports=function(e,t){if(!i(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),s=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}(),l=new s,u=l;t.default=u},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(16)),o=i(n(2)),s=i(n(445)),l=function e(t){(0,o.default)(this,e),this.size=s.default.FMMap_CONTROL_NORMAL,this.position=null,this.offset=new fm.Vector2(0,0),this.imgURL="resource/style/wedgets/img/",(0,a.default)(this,t)},u=l;t.default=u},function(e,t,n){"use strict";var i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var r={LEFT_TOP:1,LEFT_BOTTOM:2,RIGHT_TOP:3,RIGHT_BOTTOM:4},a=r;t.default=a},function(e,t,n){"use strict";var i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var r={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},a=r;t.default=a},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 i(e){return null===e}function r(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=i,v.isNullOrUndefined=r,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(275).Buffer)},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(16)),o=i(n(2)),s=i(n(3)),l=(i(n(173)),i(n(67))),u=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:"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>2&7}},{key:"liftEntry",set:function(e){this._type|=e<<5},get:function(){return this._type>>5&3}},{key:"entranceType",set:function(e){this._type|=e<<7},get:function(){return this._type>>7&3}},{key:"tempType",set:function(e){this._type|=e<<9},get:function(){return _type>>9&3}}]),e}(),h=u;t.default=h},function(e,t,n){var a=n(131);e.exports=function(i,r,e){if(a(i),void 0===r)return i;switch(e){case 1:return function(e){return i.call(r,e)};case 2:return function(e,t){return i.call(r,e,t)};case 3:return function(e,t,n){return i.call(r,e,t,n)}}return function(){return i.apply(r,arguments)}}},function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var i=n(133),r=n(57);e.exports=function(e){return i(r(e))}},function(e,t,n){var i=n(187),r=n(136).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},function(e,t,n){var i=n(58),r=Math.max,a=Math.min;e.exports=function(e,t){return e=i(e),e<0?r(e+t,0):a(e,t)}},function(e){var t=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=t)},function(e){e.exports=!1},function(e,t,n){"use strict";var i=n(40);e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var i=n(138),r=Math.min;e.exports=function(e){return 0")}),y=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(n,e,t){var i=p(n),a=!d(function(){var e={};return e[i]=function(){return 7},7!=""[n](e)}),r=a?!d(function(){var e=!1,t=/a/;return t.exec=function(){return e=!0,null},"split"===n&&(t.constructor={},t.constructor[v]=function(){return t}),t[i](""),!e}):void 0;if(!a||!r||"replace"===n&&!g||"split"===n&&!y){var o=/./[i],s=t(f,i,""[n],function(e,t,n,i,r){return t.exec===m?a&&!r?{done:!0,value:o.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}}),l=s[0],u=s[1];h(String.prototype,n,l),c(RegExp.prototype,i,2==e?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)})}}},function(e,t){t.f={}.propertyIsEnumerable},function(){},function(e,t,n){var r=n(54);e.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},function(e){e.exports=function(e,t,n,i){if(!(e instanceof t)||void 0!==i&&i in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){e.exports=n(348)},function(e,t,n){var i=n(27),r=n(25),o=n(57),s=/"/g,a=function(e,t,n,i){var r=String(o(e)),a="<"+t;return""!==n&&(a+=" "+n+'="'+String(i).replace(s,""")+'"'),a+">"+r+""};e.exports=function(t,e){var n={};n[t]=e(a),i(i.P+i.F*r(function(){var e=""[t]('"');return e!==e.toLowerCase()||3e.far||t.push({distance:h,point:d.clone(),uv:fm.Triangle.getUV(d,v,g,y,_,x,b,new fm.Vector2),face:null,object:c})}}}(o,e)}}]),n}(fm.Sprite),p=f;t.default=p},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var s=i(n(19)),l=i(n(12)),u=i(n(18)),h=i(n(17)),a=i(n(15));n(10),n(5),n(4);var o=i(n(6));n(163);var m=i(n(16)),d=i(n(29)),c=i(n(2)),f=i(n(3)),p=i(n(7)),v=i(n(8)),g=i(n(9)),y=i(n(13));n(263);var _=i(n(264)),x=i(n(453)),b=i(n(126)),w=i(n(262)),M=n(81);function T(i){return function(){var e,t=(0,v.default)(i);if(E()){var n=(0,v.default)(this).constructor;e=(0,o.default)(t,arguments,n)}else e=t.apply(this,arguments);return(0,p.default)(this,e)}}function E(){if("undefined"==typeof Reflect||!o.default)return!1;if(o.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,o.default)(Date,[],function(){})),!0}catch(e){return!1}}function S(e){if(void 0===h.default||null==e[u.default]){if((0,l.default)(e)||(e=A(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function A(e,t){if(e){if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);ni&&(this._minRadius=i)}}}},{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}(),c=s;t.default=c},function(t,e,n){"use strict";(function(s){function e(e,t,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var r,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,i)});default:for(r=new Array(o-1),a=0;a";for(t.style.display="none",a(303).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(i+"script"+r+"document.F=Object"+i+"/script"+r),e.close(),h=e.F;n--;)delete h[u][o[n]];return h()};e.exports=Object.create||function(e,t){var n;return null!==e?(l[u]=i(e),n=new l,l[u]=null,n[s]=e):n=h(),void 0===t?n:r(n,t)}},function(e,t,n){var i=n(187),r=n(136);e.exports=Object.keys||function(e){return i(e,r)}},function(e,t,n){var i=n(42).f,r=n(61),a=n(21)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,a)&&i(e,a,{configurable:!0,value:t})}},function(e,t,n){var r=n(14),a=n(11),o=n(47);e.exports=function(e,t){var n=(a.Object||{})[e]||Object[e],i={};i[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",i)}},function(e,t,n){t.f=n(26)},function(e,t,n){var i=n(20),r=n(11),a=n(89),o=n(152),s=n(39).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=!a&&i.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var i=n(92);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){"use strict";var i=n(203)(!0);e.exports=function(e,t,n){return t+(n?i(e,t).length:1)}},function(e,t,n){var _=n(46),x=n(141),b=n(62),w=n(110),i=n(322);e.exports=function(c,e){var d=1==c,f=2==c,p=3==c,m=4==c,v=6==c,g=5==c||v,y=e||i;return function(e,t,n){for(var i,r,a=b(e),o=x(a),s=_(t,n,3),l=w(o.length),u=0,h=d?y(e,l):f?y(e,0):void 0;u=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function j(e,t){if(e){if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);nthis.MapOptions.modelHoverTime){if(!this._enterControl.enableMapHover)return;if(!this._lastMoveEvent)return;var 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)),a=this.nodeManager.getFacility(this._currentSceneId,this.getVisibleGroups(),i,this.renderer.getCameraByViewMode(this._viewMode));if(r.length<1&&a.length<1)return;if(r[0]){var o=(new fm.Vector3).copy(r[0].point),s={type:"mapHoverNode",target:r[0].object.mapNode,mouse:n,eventInfo:{domEvent:t.event,threeCoord:r[0].point,eventID:t.eventID,coord:{x:o.x+this.center.x,y:r[0].object.mapNode.y-o.z}},groupID:r[0].object.mapNode.groupID,nodeType:r[0].object.mapNode.nodeType};if(this.hoverFilterFunction){var l=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});l&&(r[0].object.mapNode.nodeType===C.default.MODEL&&this.MapOptions.modelHoverEffect&&this.storeSelect(r[0].object),this.dispatchEvent(s))}else r[0].object.mapNode.nodeType===C.default.MODEL&&this.MapOptions.modelHoverEffect&&this.storeSelect(r[0].object),this.dispatchEvent(s)}if(a[0]){var u=(new fm.Vector3).copy(a[0].point),h={type:"mapHoverNode",target:a[0].object.mapNode,mouse:n,eventInfo:{domEvent:t.event,threeCoord:a[0].point,eventID:t.eventID,coord:{x:u.x+this.center.x,y:a[0].object.mapNode.y-u.z}},groupID:a[0].object.mapNode.groupID,nodeType:a[0].object.mapNode.nodeType};if(this.hoverFilterFunction){var c=this.hoverFilterFunction({nodeType:a[0].object.mapNode.nodeType,typeID:a[0].object.mapNode.bdata&&a[0].object.mapNode.bdata.type,data:a[0].object.mapNode.bdata});c&&this.dispatchEvent(h)}else this.dispatchEvent(h)}this._mouseHoverStart=!1,this._mouseHoverTime=0}else this._mouseHoverTime+=e}},{key:"selectNull",value:function(){if(k.default[this.uuid].currentModel){k.default[this.uuid].currentAnimater&&(k.default[this.uuid].currentAnimater.stop(),k.default[this.uuid].currentAnimater=void 0);var e=k.default[this.uuid].currentModel;e.material.color=k.default[this.uuid].currentModel.material.userData.color,e.material.opacity=k.default[this.uuid].currentModel.material.userData.opacity,e.material.userData.opacity=void 0,e.material.userData.color=void 0,e.material.update=!0,k.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 t=this,n=e;if(e.nodeType&&e.nodeType===C.default.MODEL){if(!e.renderNodeInited)return;n=e.renderNode}if(k.default[this.uuid].currentModel&&k.default[this.uuid].currentModel!==n)if(k.default[this.uuid].currentAnimater&&(k.default[this.uuid].currentAnimater.stop(),k.default[this.uuid].currentAnimater=void 0),void 0===k.default[this.uuid].currentModel.material.length)k.default[this.uuid].currentModel.material.color=k.default[this.uuid].currentModel.material.userData.color,k.default[this.uuid].currentModel.material.opacity=k.default[this.uuid].currentModel.material.userData.opacity,k.default[this.uuid].currentModel.material.update=!0;else for(var i=0;ithis.mapScaleLevels[0])return 1;if(e=this.mapScaleLevels[t+1]&&e<=this.mapScaleLevels[t]){var n=e-this.mapScaleLevels[t+1],i=this.mapScaleLevels[t]-e;return no/d?o/(t.x-e.x):d/(t.y-e.y);var s=i.x-o/2,p=i.y-d/2,m=document.getElementsByTagName("canvas")[0],v=document.createElement("canvas"),g=document.createElement("canvas"),y=document.createElement("canvas"),_=window.devicePixelRatio,x=new Image;"3d"===this.viewMode?this.renderer.perspectiveCamera.setViewOffset(o*f,d*f,o*(f-1)/2+s*f,d*(f-1)/2+p*f,o,d):this.renderer.orthographicCamera.setViewOffset(o*f,d*f,o*(f-1)/2+s*f,d*(f-1)/2+p*f,o,d),this.renderer.update(),v.width=h*f*_,v.height=c*f*_,v.style.width=h*f*_+"px",v.style.height=c*f*_+"px",n?(g.width=1240*Math.pow(1.414,l-1),g.height=1754*Math.pow(1.414,l-1),g.style.width=1240*Math.pow(1.414,l-1)+"px",g.style.height=1754*Math.pow(1.414,l-1)+"px"):(g.height=1240*Math.pow(1.414,l-1),g.width=1754*Math.pow(1.414,l-1),g.style.height=1240*Math.pow(1.414,l-1)+"px",g.style.width=1754*Math.pow(1.414,l-1)+"px"),y.height=c*Math.pow(1.414,l-1),y.width=h*Math.pow(1.414,l-1),y.style.height=c*Math.pow(1.414,l-1)+"px",y.style.width=h*Math.pow(1.414,l-1)+"px",x.src=m.toDataURL("image/png"),"3d"===this.viewMode?this.renderer.perspectiveCamera.clearViewOffset():this.renderer.orthographicCamera.clearViewOffset();var b=v.getContext("2d"),w=g.getContext("2d"),M=y.getContext("2d"),T=this;x.onload=function(){T.viewMode,b.drawImage(x,-(o*_-h*f*_)/2,-(d*_-c*f*_)/2);var s=new Image;s.src=v.toDataURL("image/png"),s.onload=function(){var e=Math.min(1240*Math.pow(1.414,l-1)/(h*f),1754*Math.pow(1.414,l-1)/(c*f)),t=(g.width-h*f*e)/2,n=(g.height-c*f*e)/2;w.drawImage(s,t,n,h*f*e,c*f*e),M.drawImage(s,0,0,h*Math.pow(1.414,l-1),c*Math.pow(1.414,l-1));var i=g.toDataURL("image/png"),r=y.toDataURL("image/png");if(-1this.maxScaleLevel&&(e=this.maxScaleLevel),this.scaleLevelTo({level:e,duration:t,callback:n}),this._mapScale=this.levelToScale(e),this._mapScaleLevel=e},get:function(){return this._mapScaleLevel}},{key:"mapScale",get:function(){return this._mapScale},set:function(e){ethis.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",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)},get:function(){return this._maxScale}},{key:"minScale",set:function(e){e=this.mapScaleLevels[0]&&(e=this.mapScaleLevels[1]),this._maxScaleLevel=this.scaleTolevel(e),this._minScale=e,this.controls.minDistance=this.getCameraDistanceByScale(this._minScale)},get:function(){return this._minScale}},{key:"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},get:function(){return this._minScaleLevel}},{key:"maxScaleLevel",set:function(e){e<=1&&(e=2),29Math.PI?e-=2*Math.PI:e<-Math.PI&&(e=2*Math.PI+e),ethis.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){if(e!==this.labelLanguage){this.MapOptions.defaultLabelLanguage=e;var t=this.nodeManager.getSceneById(this._currentSceneId);t&&t.setLabelLanguage(e)}}},{key:"backgroundColor",set:function(e){this.renderer.renderer.setClearColor((0,f.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,ethis.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}}]),h}(P.default),J=Z;t.default=J},function(e){function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}e.exports=t},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),s=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,t,n,i,r){void 0!==this._path&&(e=this._path+e);var a=new XMLHttpRequest;for(var o in a.open(this.requestMethod,e,!0),a.addEventListener("load",function(){var e=this.response;200===this.status||0===this.status||201===this.status?(0===this.status&&console.warn("FMMap FileLoader: HTTP Status 0 received."),t(e)):n(e)},!1),a.addEventListener("progress",function(){i&&i()},!1),a.addEventListener("error",function(){n()},!1),a.addEventListener("abort",function(){r&&r()},!1),void 0!==this._responseType&&(a.responseType=this._responseType),void 0!==this._withCredentials&&(a.withCredentials=this._withCredentials),a.overrideMimeType&&a.overrideMimeType(void 0!==this._mimeType?this._mimeType:"text/plain"),this._requestHeader)a.setRequestHeader(o,this._requestHeader[o]);a.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}(),l=s;t.default=l},function(e,ae,oe){"use strict";(function(e){var t=oe(1),n=oe(0);n(ae,"__esModule",{value:!0}),ae.ProtoBuf=void 0;var S=t(oe(120));oe(63),oe(50);var A=t(oe(77));oe(22);var L=t(oe(78)),I=t(oe(12)),h=t(oe(24));oe(75),oe(10),oe(123);var k=t(oe(64));oe(160),oe(44),oe(5),oe(4);var R=t(oe(28)),N=t(oe(0));function l(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function f(e){return!0===(e&&e.__isLong__)}l.__isLong__,(0,N.default)(l.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),l.isLong=f;var a={},o={};function i(e,t){var n,i,r;return t?(e>>>=0,(r=0<=e&&e<256)&&(i=o[e],i)?i:(n=m(e,(0|e)<0?-1:0,!0),r&&(o[e]=n),n)):(e|=0,(r=-128<=e&&e<128)&&(i=a[e],i)?i:(n=m(e,e<0?-1:0,!1),r&&(a[e]=n),n))}function p(e,t){if(isNaN(e)||!isFinite(e))return t?b:x;if(t){if(e<0)return b;if(g<=e)return P}else{if(e<=-y)return C;if(y<=e+1)return E}return e<0?p(-e,t).neg():m(e%u|0,e/u|0,t)}function m(e,t,n){return new l(e,t,n)}l.fromInt=i,l.fromNumber=p,l.fromBits=m;var c=Math.pow;function d(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return x;if("number"==typeof t&&(n=t,t=!1),n=n||10,n<2||36>>0:this.low},D.toNumber=function(){return this.unsigned?(this.high>>>0)*u+(this.low>>>0):this.high*u+(this.low>>>0)},D.toString=function(e){if(e=e||10,e<2||36>>0,u=l.toString(e);if(a=s,a.isZero())return u+o;for(;u.length<6;)u="0"+u;o=""+u+o}},D.getHighBits=function(){return this.high},D.getHighBitsUnsigned=function(){return this.high>>>0},D.getLowBits=function(){return this.low},D.getLowBitsUnsigned=function(){return this.low>>>0},D.getNumBitsAbs=function(){if(this.isNegative())return this.eq(C)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;0>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},D.eq=D.equals,D.notEquals=function(e){return!this.eq(e)},D.neq=D.notEquals,D.lessThan=function(e){return this.comp(e)<0},D.lt=D.lessThan,D.lessThanOrEqual=function(e){return this.comp(e)<=0},D.lte=D.lessThanOrEqual,D.greaterThan=function(e){return 0>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},D.comp=D.compare,D.negate=function(){return!this.unsigned&&this.eq(C)?C:this.not().add(w)},D.neg=D.negate,D.add=function(e){f(e)||(e=v(e));var t=this.high>>>16,n=65535&this.high,i=this.low>>>16,r=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,d=0;return d+=r+l,c+=d>>>16,d&=65535,c+=i+s,h+=c>>>16,c&=65535,h+=n+o,u+=h>>>16,h&=65535,u+=t+a,u&=65535,m(c<<16|d,u<<16|h,this.unsigned)},D.subtract=function(e){return f(e)||(e=v(e)),this.add(e.neg())},D.sub=D.subtract,D.multiply=function(e){if(this.isZero())return x;if(f(e)||(e=v(e)),e.isZero())return x;if(this.eq(C))return e.isOdd()?C:x;if(e.eq(C))return this.isOdd()?C:x;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(_)&&e.lt(_))return p(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,i=this.low>>>16,r=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,d=0;return d+=r*l,c+=d>>>16,d&=65535,c+=i*l,h+=c>>>16,c&=65535,c+=r*s,h+=c>>>16,c&=65535,h+=n*l,u+=h>>>16,h&=65535,h+=i*s,u+=h>>>16,h&=65535,h+=r*o,u+=h>>>16,h&=65535,u+=t*l+n*s+i*o+r*a,u&=65535,m(c<<16|d,u<<16|h,this.unsigned)},D.mul=D.multiply,D.divide=function(e){if(f(e)||(e=v(e)),e.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?b:x;var t,n,i;if(this.eq(C)){if(e.eq(w)||e.eq(T))return C;if(e.eq(C))return w;var r=this.shr(1);return t=r.div(e).shl(1),t.eq(x)?e.isNegative()?w:T:(n=this.sub(e.mul(t)),i=t.add(n.div(e)),i)}if(e.eq(C))return this.unsigned?b:x;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(i=x,n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(t)/Math.LN2),o=a<=48?1:c(2,a-48),s=p(t),l=s.mul(e);l.isNegative()||l.gt(n);)t-=o,s=p(t,this.unsigned),l=s.mul(e);s.isZero()&&(s=w),i=i.add(s),n=n.sub(l)}return i},D.div=D.divide,D.modulo=function(e){return f(e)||(e=v(e)),this.sub(this.div(e).mul(e))},D.mod=D.modulo,D.not=function(){return m(~this.low,~this.high,this.unsigned)},D.and=function(e){return f(e)||(e=v(e)),m(this.low&e.low,this.high&e.high,this.unsigned)},D.or=function(e){return f(e)||(e=v(e)),m(this.low|e.low,this.high|e.high,this.unsigned)},D.xor=function(e){return f(e)||(e=v(e)),m(this.low^e.low,this.high^e.high,this.unsigned)},D.shiftLeft=function(e){return f(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?m(this.low<>>32-e,this.unsigned):m(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):m(this.high>>e-32,0<=this.high?0:-1,this.unsigned)},D.shr=D.shiftRight,D.shiftRightUnsigned=function(e){if(f(e)&&(e=e.toInt()),e&=63,0===e)return this;var t=this.high;if(e<32){var n=this.low;return m(n>>>e|t<<32-e,t>>>e,this.unsigned)}return m(32===e?t:t>>>e-32,0,this.unsigned)},D.shru=D.shiftRightUnsigned,D.toSigned=function(){return this.unsigned?m(this.low,this.high,!1):this},D.toUnsigned=function(){return this.unsigned?this:m(this.low,this.high,!0)};var O=function e(t,n,i){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===n&&(n=e.DEFAULT_ENDIAN),void 0===i&&(i=e.DEFAULT_NOASSERT),!i){if(t|=0,t<0)throw RangeError("Illegal capacity");n=!!n,i=!!i}this.buffer=0===t?B: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=i};O.VERSION="5.0.1",O.LITTLE_ENDIAN=!0,O.BIG_ENDIAN=!1,O.DEFAULT_CAPACITY=16,O.DEFAULT_ENDIAN=O.BIG_ENDIAN,O.DEFAULT_NOASSERT=!1,O.Long=l||null;var F=O.prototype;F.__isByteBuffer__,(0,N.default)(F,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var B=new ArrayBuffer(0),G=String.fromCharCode;function z(e){var t=0;return function(){return t>1,h=-7,c=n?r-1:0,d=n?-1:1,f=e[t+c];for(c+=d,a=f&(1<<-h)-1,f>>=-h,h+=s;0>=-h,h+=i;0>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:a-1,p=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=1<=o+c?d/l:d*Math.pow(2,1-c),2<=t*l&&(o++,l/=2),h<=o+c?(s=0,o=h):1<=o+c?(s=(t*l-1)*Math.pow(2,r),o+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,r),o=0));8<=r;e[n+f]=255&s,f+=p,s/=256,r-=8);for(o=o<>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var i,r=t,a=e.length,o=a>>3,s=0;for(t+=this.writeVarint32(a,t);o--;)i=1&!!e[s++]|(1&!!e[s++])<<1|(1&!!e[s++])<<2|(1&!!e[s++])<<3|(1&!!e[s++])<<4|(1&!!e[s++])<<5|(1&!!e[s++])<<6|(1&!!e[s++])<<7,this.writeByte(i,t++);if(s>3,o=0,s=[];for(e+=i.length;a--;)n=this.readByte(e++),s[o++]=!!(1&n),s[o++]=!!(2&n),s[o++]=!!(4&n),s[o++]=!!(8&n),s[o++]=!!(16&n),s[o++]=!!(32&n),s[o++]=!!(64&n),s[o++]=!!(128&n);if(o>l++&1)}return t&&(this.offset=e),s},F.readBytes=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+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}var i=this.slice(t,t+e);return n&&(this.offset+=e),i},F.writeBytes=F.append,F.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 i=this.buffer.byteLength;return it?i:t),--t,this.view[t]=e,n&&(this.offset+=1),this},F.writeByte=F.writeInt8,F.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)}var n=this.view[e];return 128==(128&n)&&(n=-(255-n+1)),t&&(this.offset+=1),n},F.readByte=F.readInt8,F.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 i=this.buffer.byteLength;return it?i:t),--t,this.view[t]=e,n&&(this.offset+=1),this},F.writeUInt8=F.writeUint8,F.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)}var n=this.view[e];return t&&(this.offset+=1),n},F.readUInt8=F.readUint8,F.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 i=this.buffer.byteLength;return it?i: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},F.writeShort=F.writeInt16,F.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},F.readShort=F.readInt16,F.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 i=this.buffer.byteLength;return it?i: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},F.writeUInt16=F.writeUint16,F.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},F.readUInt16=F.readUint16,F.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 i=this.buffer.byteLength;return it?i: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},F.writeInt=F.writeInt32,F.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},F.readInt=F.readInt32,F.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 i=this.buffer.byteLength;return it?i: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},F.writeUInt32=F.writeUint32,F.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},F.readUInt32=F.readUint32,l&&(F.writeInt64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=l.fromNumber(e);else if("string"==typeof e)e=l.fromString(e);else if(!(e&&e instanceof l))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=l.fromNumber(e):"string"==typeof e&&(e=l.fromString(e)),t+=8;var i=this.buffer.byteLength;it?i:t),t-=8;var r=e.low,a=e.high;return 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]=a>>>24&255,this.view[t+2]=a>>>16&255,this.view[t+1]=a>>>8&255,this.view[t]=255&a):(this.view[t]=a>>>24&255,this.view[t+1]=a>>>16&255,this.view[t+2]=a>>>8&255,this.view[t+3]=255&a,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},F.writeLong=F.writeInt64,F.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,i=0;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,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=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);var r=new l(n,i,!1);return t&&(this.offset+=8),r},F.readLong=F.readInt64,F.writeUint64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=l.fromNumber(e);else if("string"==typeof e)e=l.fromString(e);else if(!(e&&e instanceof l))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=l.fromNumber(e):"string"==typeof e&&(e=l.fromString(e)),t+=8;var i=this.buffer.byteLength;it?i:t),t-=8;var r=e.low,a=e.high;return 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]=a>>>24&255,this.view[t+2]=a>>>16&255,this.view[t+1]=a>>>8&255,this.view[t]=255&a):(this.view[t]=a>>>24&255,this.view[t+1]=a>>>16&255,this.view[t+2]=a>>>8&255,this.view[t+3]=255&a,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},F.writeUInt64=F.writeUint64,F.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,i=0;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,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=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);var r=new l(n,i,!0);return t&&(this.offset+=8),r},F.readUInt64=F.readUint64),F.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 i=this.buffer.byteLength;return it?i:t),t-=4,H(this.view,e,t,this.littleEndian,23,4),n&&(this.offset+=4),this},F.writeFloat=F.writeFloat32,F.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)}var n=V(this.view,e,this.littleEndian,23,4);return t&&(this.offset+=4),n},F.readFloat=F.readFloat32,F.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 i=this.buffer.byteLength;return it?i:t),t-=8,H(this.view,e,t,this.littleEndian,52,8),n&&(this.offset+=8),this},F.writeDouble=F.writeFloat64,F.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)}var n=V(this.view,e,this.littleEndian,52,8);return t&&(this.offset+=8),n},F.readDouble=F.readFloat64,O.MAX_VARINT32_BYTES=5,O.calculateVarint32=function(e){return e>>>=0,e<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},O.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},O.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},F.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 i,r=O.calculateVarint32(e);t+=r;var a=this.buffer.byteLength;for(at?a:t),t-=r,e>>>=0;128<=e;)i=127&e|128,this.view[t++]=i,e>>>=7;return this.view[t++]=e,n?(this.offset=t,this):r},F.writeVarint32ZigZag=function(e,t){return this.writeVarint32(O.zigZagEncode32(e),t)},F.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,i=0,r=0;do{if(!this.noAssert&&e>this.limit){var a=Error("Truncated");throw a.truncated=!0,a}n=this.view[e++],i<5&&(r|=(127&n)<<7*i),++i}while(0!=(128&n));return r|=0,t?(this.offset=e,r):{value:r,length:i}},F.readVarint32ZigZag=function(e){var t=this.readVarint32(e);return"object"===(0,k.default)(t)?t.value=O.zigZagDecode32(t.value):t=O.zigZagDecode32(t),t},l&&(O.MAX_VARINT64_BYTES=10,O.calculateVarint64=function(e){"number"==typeof e?e=l.fromNumber(e):"string"==typeof e&&(e=l.fromString(e));var t=e.toInt()>>>0,n=e.shiftRightUnsigned(28).toInt()>>>0,i=e.shiftRightUnsigned(56).toInt()>>>0;return 0==i?0==n?t<16384?t<128?1:2:t<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:i<128?9:10},O.zigZagEncode64=function(e){return"number"==typeof e?e=l.fromNumber(e,!1):"string"==typeof e?e=l.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},O.zigZagDecode64=function(e){return"number"==typeof e?e=l.fromNumber(e,!1):"string"==typeof e?e=l.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(l.ONE).toSigned().negate()).toSigned()},F.writeVarint64=function(e,t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"==typeof e)e=l.fromNumber(e);else if("string"==typeof e)e=l.fromString(e);else if(!(e&&e instanceof l))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=l.fromNumber(e,!1):"string"==typeof e?e=l.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned());var i=O.calculateVarint64(e),r=e.toInt()>>>0,a=e.shiftRightUnsigned(28).toInt()>>>0,o=e.shiftRightUnsigned(56).toInt()>>>0;t+=i;var s=this.buffer.byteLength;switch(st?s:t),t-=i,i){case 10:this.view[t+9]=o>>>7&1;case 9:this.view[t+8]=9!==i?128|o:127&o;case 8:this.view[t+7]=8!==i?a>>>21|128:a>>>21&127;case 7:this.view[t+6]=7!==i?a>>>14|128:a>>>14&127;case 6:this.view[t+5]=6!==i?a>>>7|128:a>>>7&127;case 5:this.view[t+4]=5!==i?128|a:127&a;case 4:this.view[t+3]=4!==i?r>>>21|128:r>>>21&127;case 3:this.view[t+2]=3!==i?r>>>14|128:r>>>14&127;case 2:this.view[t+1]=2!==i?r>>>7|128:r>>>7&127;case 1:this.view[t]=1!==i?128|r:127&r}return n?(this.offset+=i,this):i},F.writeVarint64ZigZag=function(e,t){return this.writeVarint64(O.zigZagEncode64(e),t)},F.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,i=0,r=0,a=0,o=0;if(o=this.view[e++],i=127&o,128&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++],r=127&o,(128&o||this.noAssert&&void 0===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++],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");var s=l.fromBits(i|r<<28,r>>>4|a<<24,!1);return t?(this.offset=e,s):{value:s,length:e-n}},F.readVarint64ZigZag=function(e){var t=this.readVarint64(e);return t&&t.value instanceof l?t.value=O.zigZagDecode64(t.value):t=O.zigZagDecode64(t),t}),F.writeCString=function(e,t){var n=void 0===t;n&&(t=this.offset);var i,r=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(i=0;i>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}r=Y.calculateUTF16asUTF8(z(e))[1],t+=r+1;var a=this.buffer.byteLength;return at?a:t),t-=r+1,Y.encodeUTF16toUTF8(z(e),function(e){this.view[t++]=e}.bind(this)),this.view[t++]=0,n?(this.offset=t,this):r},F.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,i=e,r=-1;return Y.decodeUTF8toUTF16(function(){if(0===r)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return r=this.view[e++],0===r?null:r}.bind(this),n=U(),!0),t?(this.offset=e,n()):{string:n(),length:e-i}},F.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 i,r=t;i=Y.calculateUTF16asUTF8(z(e),this.noAssert)[1],t+=4+i;var a=this.buffer.byteLength;if(at?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,Y.encodeUTF16toUTF8(z(e),function(e){this.view[t++]=e}.bind(this)),t!==r+4+i)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+i));return n?(this.offset=t,this):t-r},F.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,i=this.readUint32(e),r=this.readUTF8String(i,O.METRICS_BYTES,e+=4);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-n}},O.METRICS_CHARS="c",O.METRICS_BYTES="b",F.writeUTF8String=function(e,t){var n,i=void 0===t;if(i&&(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;n=Y.calculateUTF16asUTF8(z(e))[1],t+=n;var a=this.buffer.byteLength;return at?a:t),t-=n,Y.encodeUTF16toUTF8(z(e),function(e){this.view[t++]=e}.bind(this)),i?(this.offset=t,this):t-r},F.writeString=F.writeUTF8String,O.calculateUTF8Chars=function(e){return Y.calculateUTF16asUTF8(z(e))[0]},O.calculateUTF8Bytes=function(e){return Y.calculateUTF16asUTF8(z(e))[1]},O.calculateString=O.calculateUTF8Bytes,F.readUTF8String=function(e,t,n){"number"==typeof t&&(n=t,t=void 0);var i=void 0===n;if(i&&(n=this.offset),void 0===t&&(t=O.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 r,a=0,o=n;if(t===O.METRICS_CHARS){if(r=U(),Y.decodeUTF8(function(){return a>>=0,n<0||n+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+e+") <= "+this.buffer.byteLength)}var s=n+e;if(Y.decodeUTF8toUTF16(function(){return n>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var i,r,a=t;i=Y.calculateUTF16asUTF8(z(e),this.noAssert)[1],r=O.calculateVarint32(i),t+=r+i;var o=this.buffer.byteLength;if(ot?o:t),t-=r+i,t+=this.writeVarint32(i,t),Y.encodeUTF16toUTF8(z(e),function(e){this.view[t++]=e}.bind(this)),t!==a+i+r)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+i+r));return n?(this.offset=t,this):t-a},F.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,i=this.readVarint32(e),r=this.readUTF8String(i.value,O.METRICS_BYTES,e+=i.length);return e+=r.length,t?(this.offset=e,r.string):{string:r.string,length:e-n}},F.append=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var i=void 0===n;if(i&&(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 O||(e=O.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;n+=r;var a=this.buffer.byteLength;return an?a:n),n-=r,this.view.set(e.view.subarray(e.offset,e.limit),n),e.offset+=r,i&&(this.offset+=r),this},F.appendTo=function(e,t){return e.append(this,t),this},F.assert=function(e){return this.noAssert=!e,this},F.capacity=function(){return this.buffer.byteLength},F.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},F.clone=function(e){var t=new O(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},F.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||tthis.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=B,this.view=null,0<=this.markedOffset&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(n),r=new Uint8Array(i);return r.set(this.view.subarray(e,t)),this.buffer=i,this.view=r,0<=this.markedOffset&&(this.markedOffset-=e),this.offset=0,this.limit=n,this},F.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||tthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(e===t)return new O(0,this.littleEndian,this.noAssert);var n=t-e,i=new O(n,this.littleEndian,this.noAssert);return i.offset=0,i.limit=n,0<=i.markedOffset&&(i.markedOffset-=e),this.copyTo(i,0,e,t),i},F.copyTo=function(e,t,n,i){var r,a;if(!this.noAssert&&!O.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(t=(a=void 0===t)?e.offset:0|t,n=(r=void 0===n)?this.offset:0|n,i=void 0===i?this.limit:0|i,t<0||t>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+t+" <= "+e.buffer.byteLength);if(n<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var o=i-n;return 0===o?e:(e.ensureCapacity(t+o),e.view.set(this.view.subarray(n,i),t),r&&(this.offset+=o),a&&(e.offset+=o),this)},F.ensureCapacity=function(e){var t=this.buffer.byteLength;return te?t:e):this},F.fill=function(e,t,n){var i=void 0===t;if(i&&(t=this.offset),"string"==typeof e&&0>>=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal end: Not an integer");if(n>>>=0,t<0||nthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}if(n<=t)return this;for(;t>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},F.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},F.LE=function(e){return this.littleEndian=void 0===e||!!e,this},F.BE=function(e){return this.littleEndian=void 0!==e&&!e,this},F.prepend=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var i=void 0===n;if(i&&(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 O||(e=O.wrap(e,t));var r=e.limit-e.offset;if(r<=0)return this;var a=r-n;if(0>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||tthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t||Array.prototype.reverse.call(this.view.subarray(e,t)),this},F.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},F.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||tthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var n=this.clone();return n.offset=e,n.limit=t,n},F.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||nthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}if(!e&&0===t&&n===this.buffer.byteLength)return this.buffer;if(t===n)return B;var i=new ArrayBuffer(n-t);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(t,n),0),i},F.toArrayBuffer=F.toBuffer,F.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 j=function(){for(var e={},r=[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=r.length;t>2&63]),i=(3&n)<<4,null!==(n=e())?(i|=n>>4&15,t(r[63&(i|n>>4&15)]),i=(15&n)<<2,null!==(n=e())?(t(r[63&(i|n>>6&3)]),t(r[63&n])):(t(r[63&i]),t(61))):(t(r[63&i]),t(61),t(61))},e.decode=function(e,t){var n,i,r;function a(e){throw Error("Illegal character code: "+e)}for(;null!==(n=e());)if(i=o[n],void 0===i&&a(n),null!==(n=e())&&(r=o[n],void 0===r&&a(n),t(i<<2>>>0|(48&r)>>4),null!==(n=e()))){if(i=o[n],void 0===i){if(61===n)break;a(n)}if(t((15&r)<<4>>>0|(60&i)>>2),null!==(n=e())){if(r=o[n],void 0===r){if(61===n)break;a(n)}t((3&i)<<6>>>0|r)}}},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},e}();F.toBase64=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||tthis.capacity()||t":r+=n===this.markedOffset?"'":e||0!==n&&n!==i?" ":""}if(e&&" "!==r){for(;r.length<51;)r+=" ";o+=r+a+"\n"}return e?o:r},O.fromDebug=function(e,t,n){for(var i,r,a=e.length,o=new O((a+1)/3|0,t,n),s=0,l=0,u=!1,h=!1,c=!1,d=!1,f=!1;s":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(r=(0,R.default)(i+e.charAt(s++),16),!n&&(isNaN(r)||r<0||255>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||tthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var n,i=new Array(t-e);e>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,i,r,a,o=function(e){e=e.slice(0,e.indexOf(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===(i=e())&&o([n,i]),t((31&n)<<6|63&i);else if(224==(240&n))null!==(i=e())&&null!==(r=e())||o([n,i,r]),t((15&n)<<12|(63&i)<<6|63&r);else{if(240!=(248&n))throw RangeError("Illegal starting byte: "+n);null!==(i=e())&&null!==(r=e())&&null!==(a=e())||o([n,i,r,a]),t((7&n)<<18|(63&i)<<12|(63&r)<<6|63&a)}},UTF16toUTF8:function(e,t){for(var n,i=null;null!==(n=null!==i?i:e());)55296<=n&&n<=57343&&null!==(i=e())&&56320<=i&&i<=57343?(t(1024*(n-55296)+i-56320+65536),i=null):t(n);null!==i&&t(i)},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){W.UTF16toUTF8(e,function(e){W.encodeUTF8(e,t)})},decodeUTF8toUTF16:function(e,t){W.decodeUTF8(e,function(e){W.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 W.UTF16toUTF8(e,function(e){++t,n+=e<128?1:e<2048?2:e<65536?3:4}),[t,n]}},W);F.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||nthis.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}var e;try{Y.decodeUTF8toUTF16(function(){return t]/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},ne.DotProto=function(r,o){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?o.STRING_DQ:o.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.source.length)return null;if(null!==this._stringOpen)return this._readString();var e,t,n;do{for(e=!1;o.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;t=n,n=this.source.charAt(this.index)}while("*"!==t||"/"!==n);++this.index,e=!0}}while(e);if(this.index===this.source.length)return null;var i=this.index;o.DELIM.lastIndex=0;var r=o.DELIM.test(this.source.charAt(i++));if(!r)for(;i"),i=this.tn.next(),!o.NAME.test(i))throw Error("illegal message field name: "+i);r.name=i,this.tn.skip("="),r.id=s(this.tn.next()),i=this.tn.peek(),"["===i&&this._parseFieldOptions(r),this.tn.skip(";")}else if(n=void 0!==n?n:this.tn.next(),"group"===n){var a=this._parseMessage(e,r);if(!/^[A-Z]/.test(a.name))throw Error("illegal group name: "+a.name);r.type=a.name,r.name=a.name.toLowerCase(),this.tn.omit(";")}else{if(!o.TYPE.test(n)&&!o.TYPEREF.test(n))throw Error("illegal message field type: "+n);if(r.type=n,i=this.tn.next(),!o.NAME.test(i))throw Error("illegal message field name: "+i);r.name=i,this.tn.skip("="),r.id=s(this.tn.next()),i=this.tn.peek(),"["===i&&this._parseFieldOptions(r),this.tn.skip(";")}return e.fields.push(r),r},a._parseMessageOneOf=function(e){var t=this.tn.next();if(!o.NAME.test(t))throw Error("illegal oneof name: "+t);var n,i=t,r=[];for(this.tn.skip("{");"}"!==(t=this.tn.next());)n=this._parseMessageField(e,"optional",t),n.oneof=i,r.push(n.id);this.tn.omit(";"),e.oneofs[i]=r},a._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()},a._parseEnum=function(e){var t={name:"",values:[],options:{}},n=this.tn.next();if(!o.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(!o.NAME.test(n))throw Error("illegal name: "+n);this.tn.skip("=");var i={name:n,id:s(this.tn.next(),!0)};n=this.tn.peek(),"["===n&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),t.values.push(i)}this.tn.omit(";"),e.enums.push(t)},a._parseExtensionRanges=function(){var e,t,n,i=[];do{for(t=[];;){switch(e=this.tn.next(),e){case"min":n=r.ID_MIN;break;case"max":n=r.ID_MAX;break;default:n=l(e)}if(t.push(n),2===t.length)break;if("to"!==this.tn.peek()){t.push(n);break}this.tn.next()}i.push(t)}while(this.tn.omit(","));return this.tn.skip(";"),i},a._parseExtend=function(e){var t=this.tn.next();if(!o.TYPEREF.test(t))throw Error("illegal extend reference: "+t);var n={ref:t,fields:[]};for(this.tn.skip("{");"}"!==(t=this.tn.next());)if(o.RULE.test(t))this._parseMessageField(n,t);else{if(!o.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},a.toString=function(){return"Parser at line "+this.tn.line},e.Parser=i,e}(ne,ne.Lang),ne.Reflect=function(m){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,i,r){h.call(this,e,t,n),this.className="Namespace",this.children=[],this.options=i||{},this.syntax=r||"proto2"},t=s.prototype=(0,L.default)(h.prototype);t.getChildren=function(e){if(e=e||null,null==e)return this.children.slice();for(var t=[],n=0,i=this.children.length;n>>0:t;case m.TYPES.int64:case m.TYPES.sint64:case m.TYPES.sfixed64:if(m.Long)try{return l(t,!1)}catch(e){i((0,k.default)(t),e.message)}else i((0,k.default)(t),"requires Long.js");case m.TYPES.uint64:case m.TYPES.fixed64:if(m.Long)try{return l(t,!0)}catch(e){i((0,k.default)(t),e.message)}else i((0,k.default)(t),"requires Long.js");case m.TYPES.bool:return"boolean"!=typeof t&&i((0,k.default)(t),"not a boolean"),t;case m.TYPES.float:case m.TYPES.double:return"number"!=typeof t&&i((0,k.default)(t),"not a number"),t;case m.TYPES.string:return"string"==typeof t||t&&t instanceof String||i((0,k.default)(t),"not a string"),""+t;case m.TYPES.bytes:return O.isByteBuffer(t)?t:O.wrap(t,"base64");case m.TYPES.enum:var e=this.resolvedType.getChildren(m.Reflect.Enum.Value);for(a=0;a>>0;case m.TYPES.sint32:return 0|e.readVarint32ZigZag();case m.TYPES.fixed32:return e.readUint32()>>>0;case m.TYPES.sfixed32:return 0|e.readInt32();case m.TYPES.int64:return e.readVarint64();case m.TYPES.uint64:return e.readVarint64().toUnsigned();case m.TYPES.sint64:return e.readVarint64ZigZag();case m.TYPES.fixed64:return e.readUint64();case m.TYPES.sfixed64:return e.readInt64();case m.TYPES.bool:return!!e.readVarint32();case m.TYPES.enum:return e.readVarint32();case m.TYPES.float:return e.readFloat();case m.TYPES.double:return e.readDouble();case m.TYPES.string:return e.readVString();case m.TYPES.bytes:if(r=e.readVarint32(),e.remaining()>>3;switch(i){case m.WIRE_TYPES.VARINT:for(;n=t.readUint8(),128==(128&n););break;case m.WIRE_TYPES.BITS64:t.offset+=8;break;case m.WIRE_TYPES.LDELIM:n=t.readVarint32(),t.offset+=n;break;case m.WIRE_TYPES.STARTGROUP:v(r,t);break;case m.WIRE_TYPES.ENDGROUP:if(r===e)return!1;throw Error("Illegal GROUPEND after unknown group: "+r+" ("+e+" expected)");case m.WIRE_TYPES.BITS32:t.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+e+": "+i)}return!0}r.build=function(e){if(this.clazz&&!e)return this.clazz;var t=function(c,o){var s=o.getChildren(c.Reflect.Message.Field),l=o.getChildren(c.Reflect.Message.OneOf),i=function e(t){c.Builder.Message.call(this);for(var n=0,i=l.length;n>>3,r===m.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]){if(o.repeated&&!o.options.packed)l[o.name].push(o.decode(r,e));else if(o.map){var u=o.decode(r,e);l[o.name].set(u[0],u[1])}else if(l[o.name]=o.decode(r,e),o.oneof){var h=l[o.oneof.name];null!==h&&h!==o.name&&(l[h]=null),l[o.oneof.name]=o.name}}else switch(r){case m.WIRE_TYPES.VARINT:e.readVarint32();break;case m.WIRE_TYPES.BITS32:e.offset+=4;break;case m.WIRE_TYPES.BITS64:e.offset+=8;break;case m.WIRE_TYPES.LDELIM:var c=e.readVarint32();e.offset+=c;break;case m.WIRE_TYPES.STARTGROUP:for(;v(a,e););break;default:throw Error("Illegal wire type for unknown field "+a+" in "+this.toString(!0)+"#decode: "+r)}}for(var d=0,f=this._fields.length;d>>3;if(1===h)s=this.keyElement.decode(l,e,h);else{if(2!==h)throw Error("Unexpected tag in map field key/value submessage");i=this.element.decode(l,e,h)}}return[s,i]}return this.element.decode(t,e,this.id)},o.Message.Field=u;var f=function(e,t,n,i,r,a,o){u.call(this,e,t,n,null,i,r,a,o),this.extension};f.prototype=(0,L.default)(u.prototype),o.Message.ExtensionField=f;var p=function(e,t,n){h.call(this,e,t,n),this.fields=[]};o.Message.OneOf=p;var g=function(e,t,n,i,r){s.call(this,e,t,n,i,r),this.className="Enum",this.object=null};g.getName=function(e,t){for(var n,i=(0,A.default)(e),r=0;r=e[0]&&t.id<=e[1]&&(n=!0)}),!n)throw Error("illegal extended field id in "+a.name+": "+t.id+" (not within valid ranges)")}var e=t.name;this.options.convertFieldsToCamelCase&&(e=X.Util.toCamelCase(e));var i=new J.Message.ExtensionField(this,a,t.rule,t.type,this.ptr.fqn()+"."+e,t.id,t.options),r=new J.Extension(this,this.ptr,t.name,i);i.extension=r,this.ptr.addChild(r),a.addChild(i)},this);else if(!/\.?google\.protobuf\./.test(n.ref))throw Error("extended message "+n.ref+" is not defined")}n=null,a=null}e=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},Q.import=function(t,e){var n="/";if("string"==typeof e){if(X.Util.IS_NODE&&(e=oe(224).resolve(e)),!0===this.files[e])return this.reset();this.files[e]=!0}else if("object"===(0,k.default)(e)){var i=e.root;X.Util.IS_NODE&&(i=oe(224).resolve(i)),(0<=i.indexOf("\\")||0<=e.file.indexOf("\\"))&&(n="\\");var r=i+n+e.file;if(!0===this.files[r])return this.reset();this.files[r]=!0}if(t.imports&&0=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function v(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);ne.x&&(this.minX=e.x),this.maxXe.y&&(this.minY=e.y),this.maxYe.maxX||this.minY>e.maxY||this.maxX>8&255]+a[e>>16&255]+a[e>>24&255]+"-"+a[255&t]+a[t>>8&255]+"-"+a[t>>16&15|64]+a[t>>24&255]+"-"+a[63&n|128]+a[n>>8&255]+"-"+a[n>>16&255]+a[n>>24&255]+a[255&i]+a[i>>8&255]+a[i>>16&255]+a[i>>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,i,r){return i+(e-t)*(r-i)/(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(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,h=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};function l(e){console&&console.warn&&console.warn(e)}t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function r(){r.init.call(this)}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var a=10;function u(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?r.defaultMaxListeners:e._maxListeners}function o(e,t,n,i){var r,a,o;if(u(n),a=e._events,void 0===a?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),r=c(e),0r&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,l(s)}return e}function s(){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 d(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=s.bind(i);return r.listener=n,i.wrapFn=r,r}function f(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?g(r):m(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),i=0;ir;)o(i,n=t[r++])&&(~l(a,n)||a.push(n));return a}},function(e,t,n){var l=n(103),u=n(41),h=n(105);e.exports=function(s){return function(e,t,n){var i,r=l(e),a=u(r.length),o=h(n,a);if(s&&t!=t){for(;or;)o(i,n=t[r++])&&(~l(a,n)||a.push(n));return a}},function(e,t,n){var i=n(20).document;e.exports=i&&i.documentElement},function(e,t,n){var i=n(55),r=n(62),a=n(142)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),i(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){var a=n(35);e.exports=function(t,e,n,i){try{return i?e(a(n)[0],n[1]):e(n)}catch(e){var r=t.return;throw void 0!==r&&a(r.call(t)),e}}},function(e,t,n){var i=n(70),r=n(26)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[r]===e)}},function(e,t,n){var a=n(26)("iterator"),o=!1;try{var i=[7][a]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],r=i[a]();r.next=function(){return{done:n=!0}},i[a]=function(){return r},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var l=n(40),u=n(298),h=n(113);n(115)("search",1,function(i,r,o,s){return[function(e){var t=i(this),n=null==e?void 0:e[r];return void 0!==n?n.call(e,t):new RegExp(e)[r](String(t))},function(e){var t=s(o,e,this);if(t.done)return t.value;var n=l(e),i=String(this),r=n.lastIndex;u(r,0)||(n.lastIndex=0);var a=h(n,i);return u(n.lastIndex,r)||(n.lastIndex=r),null===a?-1:a.index}]})},function(e,t,n){"use strict";var _=n(107),x=n(27),b=n(49),w=n(43),M=n(72),T=n(301),E=n(150),S=n(199),A=n(21)("iterator"),L=!([].keys&&"next"in[].keys()),I="@@iterator",k="keys",R="values",N=function(){return this};e.exports=function(e,t,n,i,r,a,o){T(n,t,i);var s,l,u,h=function(e){if(!L&&e in p)return p[e];switch(e){case k:case R:return function(){return new n(this,e)}}return function(){return new n(this,e)}},c=t+" Iterator",d=r==R,f=!1,p=e.prototype,m=p[A]||p[I]||r&&p[r],v=m||h(r),g=r?d?h("entries"):v:void 0,y="Array"==t&&p.entries||m;if(y&&(u=S(y.call(new e)),u!==Object.prototype&&u.next&&(E(u,c,!0),_||"function"==typeof u[A]||w(u,A,N))),d&&m&&m.name!==R&&(f=!0,v=function(){return m.call(this)}),_&&!o||!L&&!f&&p[A]||w(p,A,v),M[t]=v,M[c]=N,r)if(s={values:d?v:h(R),keys:a?v:h(k),entries:g},o)for(l in s)l in p||b(p,l,s[l]);else x(x.P+x.F*(L||f),t,s);return s}},function(e,t,n){var i=n(61),r=n(51),a=n(134)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),i(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var i=n(191),r=n(144).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},function(e,t,n){var i=n(116),r=n(85),a=n(71),o=n(130),s=n(55),l=n(182),u=Object.getOwnPropertyDescriptor;t.f=n(36)?u:function(e,t){if(e=a(e),t=o(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return r(!i.f.call(e,t),e[t])}},function(e,t,n){var l=n(58),u=n(57);e.exports=function(s){return function(e,t){var n,i,r=String(u(e)),a=l(t),o=r.length;return a<0||o<=a?s?"":void 0:(n=r.charCodeAt(a),n<55296||56319e.length)&&(t=e.length);for(var n=0,i=new Array(t);n>=1;return n},y=function(e,t,n){var i;for(i=0;i<4;i++)e[0+i]^=t[16*n+4*i],e[4+i]^=t[16*n+4*i+1],e[8+i]^=t[16*n+4*i+2],e[12+i]^=t[16*n+4*i+3]},_=function(e){var t,n,i,r;for(t=1;t<4;t++)for(i=0;i>4,r=15&e[4*t+n],e[4*t+n]=o[16*i+r]},b=function(e){var t;for(t=0;t<4;t++)e[t]=a[16*((240&e[t])>>4)+(15&e[t])]},w=function(e){return(0,s.default)(e,16)},{decryption:function(e,t){var n,i=Array(16);for(n=0;n<16;n++)i[n]=16*w(t.substr(2*n,1))+w(t.substr(2*n+1,1));var r=Array(16);for(n=0;n<16;n++)r[n]=16*w(e.substr(2*n,1))+w(e.substr(2*n+1,1));var a=Array(16);switch(n=[],i.length){default:case 16:p=4,m=10;break;case 24:p=6,m=12;break;case 32:p=8,m=14}var o,s=n=Array(16*(m+1)),l=Array(4),u=4*(m+1);for(o=0;o=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function y(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function b(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function M(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);ne[1].x&&(e[1].x=l[u])):(l[u]e[1].y&&(e[1].y=l[u]))}return e}}]),a}(y.default),L=A;t.default=L},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0,n(5),n(4);var a=i(n(6));n(53);var o=i(n(2)),s=i(n(7)),l=i(n(8)),u=i(n(9));function h(i){return function(){var e,t=(0,l.default)(i);if(c()){var n=(0,l.default)(this).constructor;e=(0,a.default)(t,arguments,n)}else e=t.apply(this,arguments);return(0,s.default)(this,e)}}function c(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var d=function(e){(0,u.default)(r,e);var i=h(r);function r(){var e;(0,o.default)(this,r),e=i.call(this);var t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new fm.InterleavedBuffer(t,5);return e.setIndex([0,1,2,0,2,3]),e.addAttribute("position",new fm.InterleavedBufferAttribute(n,3,0,!1)),e.addAttribute("uv",new fm.InterleavedBufferAttribute(n,2,3,!1)),e}return r}(fm.BufferGeometry),f=d;t.default=f},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var p=i(n(77));n(34);var a=i(n(16)),o=i(n(64));n(53),n(214),n(159),n(215),n(161);var s=i(n(78));n(75),n(163),n(63),n(50),n(4),n(423);var m=i(n(12)),g=i(n(424));function l(e){this.manager=void 0!==e?e:fm.DefaultLoadingManager,this.dracoLoader=null,this.ddsLoader=null}function u(){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={}}}}n(10),n(160),l.prototype={constructor:l,crossOrigin:"anonymous",load:function(n,i,e,t){var r,a=this;r=void 0!==this.resourcePath?this.resourcePath:void 0!==this.path?this.path:fm.LoaderUtils.extractUrlBase(n),a.manager.itemStart(n);var o=function(e){t?t(e):console.error(e),a.manager.itemError(n),a.manager.itemEnd(n)},s=new fm.FileLoader(a.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),"use-credentials"===a.crossOrigin&&s.setWithCredentials(!0),s.load(n,function(t){try{a.parse(t,r,function(e){i(e,t),a.manager.itemEnd(n)},o)}catch(e){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,i){var r,a={};if("string"==typeof e)r=e;else{var o=fm.LoaderUtils.decodeText(new Uint8Array(e,0,4));if(o===_){try{a[v.KHR_BINARY_GLTF]=new x(e)}catch(e){return void(i&&i(e))}r=a[v.KHR_BINARY_GLTF].content}else r=fm.LoaderUtils.decodeText(new Uint8Array(e))}var s=JSON.parse(r);if(void 0===s.asset||s.asset.version[0]<2)i&&i(new Error("fm.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead."));else{if(s.extensionsUsed)for(var l=0;l",o).replace("#include ",s).replace("#include ",l).replace("#include ",u).replace("#include ",h);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=r.vertexShader,e.fragmentShader=c,e.uniforms=a,e.defines={STANDARD:""},e.color=new fm.Color(1,1,1),e.opacity=1;var d=[];if((0,m.default)(i.diffuseFactor)){var f=i.diffuseFactor;e.color.fromArray(f),e.opacity=f[3]}if(void 0!==i.diffuseTexture&&d.push(n.assignTexture(e,"map",i.diffuseTexture)),e.emissive=new fm.Color(0,0,0),e.glossiness=void 0!==i.glossinessFactor?i.glossinessFactor:1,e.specular=new fm.Color(1,1,1),(0,m.default)(i.specularFactor)&&e.specular.fromArray(i.specularFactor),void 0!==i.specularGlossinessTexture){var p=i.specularGlossinessTexture;d.push(n.assignTexture(e,"glossinessMap",p)),d.push(n.assignTexture(e,"specularMap",p))}return g.default.all(d)},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===e.map?null:e.map,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,i=0,r=n.length;in[1].distance){var o=null;o=n.shift(),n.push(o)}}else if(a.distance=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function _(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function y(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function y(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function x(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function _(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function w(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);ni.times)n.stopJump();else if(e%=i.all,e>i.duration)n._renderNode.position.y!=n._origonY&&(n._renderNode.position.y=n._origonY);else{var t=e/i.halfDuration-1;t=1-t*t,n._renderNode.position.y=n._origonY+r*t}}else o.off("frameLoop",n.jumpEvent)},o.on("frameLoop",this.jumpEvent)}}}},{key:"stopJump",value:function(){if(this._renderNode&&this.jumpEvent){this._renderNode.position.y=this._origonY,this._isJumping=!1;var e=this.findParent(f.default),t=e.map;t.off("frameLoop",this.jumpEvent)}}},{key:"setSize",value:function(){var e=this.findParent(f.default);e.map.renderer.setFacilitySize(this._renderNode,this._size)}},{key:"dispose",value:function(){this.parent&&this.parent.removeMarker(this),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:"getCenterByAnchor",value:function(e){var t=new fm.Vector2(.5,.5);switch(e){case y.default.LEFT:t.setX(0);break;case y.default.RIGHT:t.setX(1);break;case y.default.TOP:t.setY(1);break;case y.default.BOTTOM:t.setY(0);break;case y.default.LEFT_TOP:t.set(0,1);break;case y.default.RIGHT_TOP:t.set(1,1);break;case y.default.LEFT_BOTTOM:t.set(0,0);break;case y.default.RIGHT_BOTTOM:t.set(1,0)}return t}},{key:"url",set:function(e){var t=this.findParent(f.default);if(!t)return!1;var n=t.materialManager.createPoiMaterial({imageUrl:e,imageSrc:e,alpha:1});n.userData.size=this._size,this._renderNode.material.dispose(),this._renderNode.material=n,this._url=e},get:function(){return this._url}},{key:"renderNode",get:function(){return this._renderNode}},{key:"visible",set:function(e){e?this.parent.scene.children.indexOf(this._renderNode)<0&&this._renderNode&&this.parent.scene.add(this._renderNode):this._renderNode&&this.parent.scene.remove(this._renderNode),this._visible=e},get:function(){return this._visible}},{key:"size",get:function(){return this._size},set:function(e){this._size=e}}]),i}(d.default),M=w;t.default=M},function(e,t,n){"use strict";var i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var r={RIGHT:1,LEFT:2,BOTTOM:3,TOP:4,RIGHT_BOTTOM:5,LEFT_BOTTOM:6,RIGHT_TOP:7,LEFT_TOP:8,CENTER:9},a=r;t.default=a},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0,n(5),n(4);var a=i(n(6)),o=i(n(2)),s=i(n(3)),l=i(n(7)),u=i(n(8)),h=i(n(9)),c=i(n(13)),d=i(n(452)),f=i(n(37)),p=i(n(80)),m=n(81);function v(i){return function(){var e,t=(0,u.default)(i);if(g()){var n=(0,u.default)(this).constructor;e=(0,a.default)(t,arguments,n)}else e=t.apply(this,arguments);return(0,l.default)(this,e)}}function g(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var y=function(e){(0,h.default)(i,e);var n=v(i);function i(e){var t;return(0,o.default)(this,i),t=n.call(this,0,f.default.LOCATION_MARKER),t._size=e.size||20,t._url=e.url,t._groupId=e.groupID||1,t._x=e.x||t._x,t._y=e.y||t._y,t._dheight=e.height||2.1,t._gid=e.groupID||1,t._scene=null,t._renderNode=null,t._map=null,t._callBack=e.callback,t.rotateAnimater=null,t}return(0,s.default)(i,[{key:"initSprite",value:function(e){var t=this,n=new d.default,i=new fm.MeshBasicMaterial,r=!0;e.materialManager.loadTexture(this._url,function(e){e.minFilter=fm.LinearFilter,e.generateMipmaps=!1,e.flipY=!1,i.map=e,i.needsUpdate=!0,t._renderNode?(t.picLoading=!1,t._renderNode.layers.set(0)):r=!1}),i.side=2,i.transparent=!0,this._renderNode=new fm.Mesh(n,i),this._renderNode.mapNode=this,r&&(this.picLoading=!0,this._renderNode.layers.set(2));var a=this._scene.mapcenter;return this._x&&this._y||(this._x=a.x,this._y=a.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,i=this._scene.groups[e.groupID];if(!i)return void console.warn(m.tileMessage.noGroup);n.removeLocation(this),i.addLocation(this),t=i,this.isAlwaysShow&&this.alwaysShow(),this._gid=e.groupID,this._groupId=this._gid}var r=this._scene.mapcenter;this._x=e.x,this._y=e.y,this._renderNode.position.set(this._x-r.x,this._dheight,-this._y+r.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,i=t.to%360*fm.Math.DEG2RAD,r=i,a=0;i-e!=0&&(a=Math.sin(i-e)/Math.abs(Math.sin(i-e))*Math.acos(Math.cos(i-e)));var o=e+a,s=e;this.rotateAnimater&&(this.rotateAnimater.stop(),this._map.removeAnimater(this.rotateAnimater));var l=new p.default({angle:s},{angle:o},t.duration?1e3*t.duration:500,function(){n._map.removeAnimater(l),n.rotateAnimater=null,n._renderNode.rotation.y=r,t.callback&&t.callback()},function(e){n._renderNode.rotation.y=e.angle,t.update&&t.update()}).start();this._map.addAnimater(l),this.rotateAnimater=l}},{key:"moveTo",value:function(t){var n=this;if(!this._isRuning){var e=t.x,i=t.y,r=new p.default({x:this._x,y:this._y},{x:e,y:i},t.time?1e3*t.time:500,function(){n._map.removeAnimater(r),n._isRuning=!1,t.callback&&t.callback()},function(e){n.setPosition({x:e.x,y:e.y,groupID:0,height:n._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}(c.default),_=y;t.default=_},function(e,t,n){"use strict";var i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var r={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"},a=r;t.default=a},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(78)),o=i(n(122));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)}},fm.ShaderLib.line={uniforms:fm.UniformsUtils.merge([fm.UniformsLib.common,fm.UniformsLib.fog,fm.UniformsLib.line]),vertexShader:"\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \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 \n\t\t\t\n\t\t\t#include \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\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 \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \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 \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\tdiffuseColor = texture2D( mmap, vUv2 * repeat + offset );\n\t\t\t#endif\n\n\t\t\t#include \n\t\t\tgl_FragColor = diffuseColor;\n\n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \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,o.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,a.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};var s=fm.LineMaterial;t.default=s},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0,n(5),n(4);var a=i(n(6));n(53);var o=i(n(2)),s=i(n(3)),l=i(n(7)),u=i(n(8)),h=i(n(9)),c=i(n(265));function d(i){return function(){var e,t=(0,u.default)(i);if(f()){var n=(0,u.default)(this).constructor;e=(0,a.default)(t,arguments,n)}else e=t.apply(this,arguments);return(0,l.default)(this,e)}}function f(){if("undefined"==typeof Reflect||!a.default)return!1;if(a.default.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call((0,a.default)(Date,[],function(){})),!0}catch(e){return!1}}var p=function(e){(0,h.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),i=0;iM.default){var _=Math.sqrt(y),x=Math.atan2(_,v*g);m=Math.sin(m*x)/_,o=Math.sin(o*x)/_}var b=o*g;if(s=s*m+c*b,l=l*m+d*b,u=u*m+f*b,h=h*m+p*b,m===1-o){var w=1/Math.sqrt(s*s+l*l+u*u+h*h);s*=w,l*=w,u*=w,h*=w}}e[t]=s,e[t+1]=l,e[t+2]=u,e[t+3]=h}}),(0,a.default)(l.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,o.default)(l.prototype,{isQuaternion:!0,set:function(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,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,i=e._y,r=e._z,a=e.order,o=Math.cos,s=Math.sin,l=o(n/2),u=o(i/2),h=o(r/2),c=s(n/2),d=s(i/2),f=s(r/2);return"XYZ"===a?(this._x=c*u*h+l*d*f,this._y=l*d*h-c*u*f,this._z=l*u*f+c*d*h,this._w=l*u*h-c*d*f):"YXZ"===a?(this._x=c*u*h+l*d*f,this._y=l*d*h-c*u*f,this._z=l*u*f-c*d*h,this._w=l*u*h+c*d*f):"ZXY"===a?(this._x=c*u*h-l*d*f,this._y=l*d*h+c*u*f,this._z=l*u*f+c*d*h,this._w=l*u*h-c*d*f):"ZYX"===a?(this._x=c*u*h-l*d*f,this._y=l*d*h+c*u*f,this._z=l*u*f-c*d*h,this._w=l*u*h+c*d*f):"YZX"===a?(this._x=c*u*h+l*d*f,this._y=l*d*h+c*u*f,this._z=l*u*f-c*d*h,this._w=l*u*h-c*d*f):"XZY"===a&&(this._x=c*u*h-l*d*f,this._y=l*d*h-c*u*f,this._z=l*u*f+c*d*h,this._w=l*u*h+c*d*f),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,i=n[0],r=n[4],a=n[8],o=n[1],s=n[5],l=n[9],u=n[2],h=n[6],c=n[10],d=i+s+c;return 0Math.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=i,this.normalize()},angleTo:function(e){return 2*Math.acos(Math.abs(s._Math.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);if(0===n)return this;var i=Math.min(1,t/n);return this.slerp(e,i),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,i=e._y,r=e._z,a=e._w,o=t._x,s=t._y,l=t._z,u=t._w;return this._x=n*u+a*o+i*l-r*s,this._y=i*u+a*s+r*o-n*l,this._z=r*u+a*l+n*s-i*o,this._w=a*u-n*o-i*s-r*l,this._onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,i=this._y,r=this._z,a=this._w,o=a*e._w+n*e._x+i*e._y+r*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=i,this._z=r,this;var s=1-o*o;if(s<=M.default){var l=1-t;return this._w=l*a+t*this._w,this._x=l*n+t*this._x,this._y=l*i+t*this._y,this._z=l*r+t*this._z,this.normalize(),this._onChangeCallback(),this}var u=Math.sqrt(s),h=Math.atan2(u,o),c=Math.sin((1-t)*h)/u,d=Math.sin(t*h)/u;return this._w=a*c+this._w*d,this._x=n*c+this._x*d,this._y=i*c+this._y*d,this._z=r*c+this._z*d,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(W,e,Y){"use strict";(function(e,g){var y=Y(127);W.exports=m;var o,i=Y(273);m.ReadableState=p,Y(176).EventEmitter;var _=function(e,t){return e.listeners(t).length},r=Y(274),s=Y(128).Buffer,t=e.Uint8Array||function(){};function l(e){return s.from(e)}function a(e){return s.isBuffer(e)||e instanceof t}var n=Object.create(Y(99));n.inherits=Y(84);var u=Y(480),x=void 0;x=u&&u.debuglog?u.debuglog("stream"):function(){};var h,c=Y(481),d=Y(276);n.inherits(m,r);var f=["error","close","destroy","pause","resume"];function b(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?i(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function p(e,t){o=o||Y(68),e=e||{};var n=t instanceof o;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,r=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(r||0===r)?r:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new c,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&&(h=h||Y(277).StringDecoder,this.decoder=new h(e.encoding),this.encoding=e.encoding)}function m(e){if(o=o||Y(68),!(this instanceof m))return new m(e);this._readableState=new p(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),r.call(this)}function v(e,t,n,i,r){var a,o=e._readableState;return null===t?(o.reading=!1,L(e,o)):(r||(a=M(o,t)),a?e.emit("error",a):o.objectMode||t&&0>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function A(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=S(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,I(e)}}function I(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(x("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?y.nextTick(k,e):k(e))}function k(e){x("emit readable"),e.emit("readable"),F(e)}function R(e,t){t.readingMore||(t.readingMore=!0,y.nextTick(N,e,t))}function N(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=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=G(e,t.buffer,t.decoder),n);var n}function G(e,t,n){var i;return ea.length?a.length:e;if(o===a.length?r+=a:r+=a.slice(0,e),e-=o,0===e){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}function U(e,t){var n=s.allocUnsafe(e),i=t.head,r=1;for(i.data.copy(n),e-=i.data.length;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,0===e){o===a.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++r}return t.length-=r,n}function V(e){var t=e._readableState;if(0=t.highWaterMark||t.ended))return x("read: emitReadable",t.length,t.ended),(0===t.length&&t.ended?V:I)(this),null;if(e=A(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var i,r=t.needReadable;return x("need readable",r),(0===t.length||t.length-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 i=!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(i)return X(e).length;t=(""+t).toLowerCase(),i=!0}}function _(e,t,n){var i=!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 k(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function x(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function b(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):2147483647=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=c.from(t,i)),c.isBuffer(t))return 0===t.length?-1:w(e,t,n,i,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,i,r){var a,o=1,s=e.length,l=t.length;if(void 0!==i&&(i=String(i).toLowerCase(),"ucs2"===i||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r){var h=-1;for(a=n;a>>10&1023|55296),h=56320|1023&h),i.push(h),r+=c}return N(i)}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 r(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,i=t.length,r=0,a=Math.min(n,i);rt&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,i,r){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===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(r<=i&&n<=t)return 0;if(r<=i)return-1;if(n<=t)return 1;if(t>>>=0,n>>>=0,i>>>=0,r>>>=0,this===e)return 0;for(var a=r-i,o=n-t,s=Math.min(a,o),l=this.slice(i,r),u=e.slice(t,n),h=0;hthis.length)throw new RangeError("Attempt to write outside buffer bounds");i=i||"utf8";for(var a=!1;;)switch(i){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 L(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function N(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);for(var n="",i=0;ie.length)throw new RangeError("Index out of range")}function G(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,a=Math.min(e.length-n,2);r>>8*(i?r:1-r)}function z(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,a=Math.min(e.length-n,4);r>>8*(i?r:3-r)&255}function U(e,t,n,i){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function V(e,t,n,i,r){return r||U(e,t,n,4,34028234663852886e22,-34028234663852886e22),a.write(e,t,n,i,23,4),n+4}function H(e,t,n,i,r){return r||U(e,t,n,8,17976931348623157e292,-17976931348623157e292),a.write(e,t,n,i,52,8),n+8}c.prototype.slice=function(e,t){var n,i=this.length;if(e=~~e,t=void 0===t?i:~~t,e<0?(e+=i,e<0&&(e=0)):i>>8):G(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||B(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):G(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||B(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||B(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,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);B(this,e,t,n,r-1,-r)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);B(this,e,t,n,r-1,-r)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;0<=--a&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||B(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||B(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):G(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||B(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):G(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||B(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||B(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,i){if(n=n||0,i||0===i||(i=this.length),t>=e.length&&(t=e.length),t=t||0,0=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e=e||0,"number"==typeof e)for(a=t;a>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>8,r=n%256,a.push(r),a.push(i);return a}function K(e){return i.toByteArray(W(e))}function Q(e,t,n,i){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function $(e){return e!=e}}).call(this,te(56))},function(e,t,n){"use strict";var a=n(127);function i(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return i||r?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 r(){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:i,undestroy:r}},function(e,t,n){"use strict";var i=n(128).Buffer,r=i.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&&(i.isEncoding===r||!r(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=i.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 i=t.length-1;if(i>2&3}},{key:"tempType",set:function(e){this._type|=e<<4},get:function(){return this._type>>4&3}},{key:"through",set:function(e){e?this._type|=16:this._type&=-17},get:function(){return 16&this._type?1:0}}]),e}()),h=u;t.default=h},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),s=i(n(30)),l=i(n(174)),u=function(){function r(e,t,n,i){(0,a.default)(this,r),this.Id=e,this.groupId=t,this._type=n,this.points=i,this.pointCount=i&&i.length?i.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)(r,[{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={},i=0;ithis._maxRoadId&&(this._maxRoadId=this.roadVector[e].Id),e++);for(var t=0;tthis._maxNodeId&&(this._maxNodeId=this.nodeVector[t].Id),t++)}},{key:"consoleAdjList",value:function(e){if(e){var t=this.adjList,n=(this.nodeVector,this),i=(naviMap.size(),"********* ADJLIST ************\n");for(var r in t.keys)for(var a=t.keys[r],o=a,s=t.get(a),l=0;ly+c._dist?(_._dist=y+c._dist,_._vPre=[],_._vPre.push(h),s.push(e.nodeVector[g]),s.sort(l)):Math.abs(_._dist-(y+c._dist))<1e-12&&-1!=_._vPre.indexOf(h)&&_._vPre.push(h))}}}}}}return!(o>8&255]+a[e>>16&255]+a[e>>24&255]+"-"+a[255&t]+a[t>>8&255]+"-"+a[t>>16&15|64]+a[t>>24&255]+"-"+a[63&n|128]+a[n>>8&255]+"-"+a[n>>16&255]+a[n>>24&255]+a[255&i]+a[i>>8&255]+a[i>>16&255]+a[i>>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,i,r){return i+(e-t)*(r-i)/(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*kn.DEG2RAD},radToDeg:function(e){return e*kn.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))}};function Rn(e,t){this.x=e||0,this.y=t||0}function Nn(e,t,n,i){this._x=e||0,this._y=t||0,this._z=n||0,this._w=void 0!==i?i:1}function Pn(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}function Cn(){this.elements=[1,0,0,0,1,0,0,0,1],0re.default){var _=Math.sqrt(y),x=Math.atan2(_,v*g);m=Math.sin(m*x)/_,o=Math.sin(o*x)/_}var b=o*g;if(s=s*m+c*b,l=l*m+d*b,u=u*m+f*b,h=h*m+p*b,m===1-o){var w=1/Math.sqrt(s*s+l*l+u*u+h*h);s*=w,l*=w,u*=w,h*=w}}e[t]=s,e[t+1]=l,e[t+2]=u,e[t+3]=h}}),(0,u.default)(Nn.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,p.default)(Nn.prototype,{isQuaternion:!0,set:function(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,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,i=e._y,r=e._z,a=e.order,o=Math.cos,s=Math.sin,l=o(n/2),u=o(i/2),h=o(r/2),c=s(n/2),d=s(i/2),f=s(r/2);return"XYZ"===a?(this._x=c*u*h+l*d*f,this._y=l*d*h-c*u*f,this._z=l*u*f+c*d*h,this._w=l*u*h-c*d*f):"YXZ"===a?(this._x=c*u*h+l*d*f,this._y=l*d*h-c*u*f,this._z=l*u*f-c*d*h,this._w=l*u*h+c*d*f):"ZXY"===a?(this._x=c*u*h-l*d*f,this._y=l*d*h+c*u*f,this._z=l*u*f+c*d*h,this._w=l*u*h-c*d*f):"ZYX"===a?(this._x=c*u*h-l*d*f,this._y=l*d*h+c*u*f,this._z=l*u*f-c*d*h,this._w=l*u*h+c*d*f):"YZX"===a?(this._x=c*u*h+l*d*f,this._y=l*d*h+c*u*f,this._z=l*u*f-c*d*h,this._w=l*u*h-c*d*f):"XZY"===a&&(this._x=c*u*h-l*d*f,this._y=l*d*h-c*u*f,this._z=l*u*f+c*d*h,this._w=l*u*h+c*d*f),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,i=n[0],r=n[4],a=n[8],o=n[1],s=n[5],l=n[9],u=n[2],h=n[6],c=n[10],d=i+s+c;return 0Math.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=i,this.normalize()},angleTo:function(e){return 2*Math.acos(Math.abs(kn.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);if(0===n)return this;var i=Math.min(1,t/n);return this.slerp(e,i),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,i=e._y,r=e._z,a=e._w,o=t._x,s=t._y,l=t._z,u=t._w;return this._x=n*u+a*o+i*l-r*s,this._y=i*u+a*s+r*o-n*l,this._z=r*u+a*l+n*s-i*o,this._w=a*u-n*o-i*s-r*l,this._onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,i=this._y,r=this._z,a=this._w,o=a*e._w+n*e._x+i*e._y+r*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=i,this._z=r,this;var s=1-o*o;if(s<=re.default){var l=1-t;return this._w=l*a+t*this._w,this._x=l*n+t*this._x,this._y=l*i+t*this._y,this._z=l*r+t*this._z,this.normalize(),this._onChangeCallback(),this}var u=Math.sqrt(s),h=Math.atan2(u,o),c=Math.sin((1-t)*h)/u,d=Math.sin(t*h)/u;return this._w=a*c+this._w*d,this._x=n*c+this._x*d,this._y=i*c+this._y*d,this._z=r*c+this._z*d,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(){}}),(0,p.default)(Pn.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:(An=new Nn,function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(An.setFromEuler(e))}),applyAxisAngle:(Sn=new Nn,function(e,t){return this.applyQuaternion(Sn.setFromAxisAngle(e,t))}),applyMatrix3:function(e){var t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this},applyMatrix4:function(e){var t=this.x,n=this.y,i=this.z,r=e.elements,a=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*a,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*a,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*a,this},applyQuaternion:function(e){var t=this.x,n=this.y,i=this.z,r=e.x,a=e.y,o=e.z,s=e.w,l=s*t+a*i-o*n,u=s*n+o*t-r*i,h=s*i+r*n-a*t,c=-r*t-a*n-o*i;return this.x=l*s+c*-r+u*-o-h*-a,this.y=u*s+c*-a+h*-r-l*-o,this.z=h*s+c*-o+l*-a-u*-r,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,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,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,i=e.y,r=e.z,a=t.x,o=t.y,s=t.z;return this.x=i*s-r*o,this.y=r*a-n*s,this.z=n*o-i*a,this},projectOnVector:function(e){var t=e.dot(this)/e.lengthSq();return this.copy(e).multiplyScalar(t)},projectOnPlane:(En=new Pn,function(e){return En.copy(this).projectOnVector(e),this.sub(En)}),reflect:(Tn=new Pn,function(e){return this.sub(Tn.copy(e).multiplyScalar(2*this.dot(e)))}),angleTo:function(e){var t=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq());return Math.acos(kn.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,i=this.z-e.z;return t*t+n*n+i*i},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 i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*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){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,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}}),(0,p.default)(Cn.prototype,{isMatrix3:!0,set:function(e,t,n,i,r,a,o,s,l){var u=this.elements;return u[0]=e,u[1]=i,u[2]=o,u[3]=t,u[4]=r,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,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this},setFromMatrix4:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(e){void 0===Ln&&(Ln=new Pn);for(var t=0,n=e.count;ti)return!1}return!0}function yr(e){var t=e.geometry;if(void 0!==t)if(t.isGeometry){var n=t.vertices;for(Di=0,Oi=n.length;Dithis.max.x||e.ythis.max.y||e.zthis.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 Pn),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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)},intersectsSphere:(Pi=new Pn,function(e){return this.clampPoint(e.center,Pi),Pi.distanceToSquared(e.center)<=e.radius*e.radius}),intersectsPlane:function(e){var t,n;return n=0=-e.constant},intersectsTriangle:(Mi=new Pn,Ti=new Pn,Ei=new Pn,Si=new Pn,Ai=new Pn,Li=new Pn,Ii=new Pn,ki=new Pn,Ri=new Pn,Ni=new Pn,function(e){if(this.isEmpty())return!1;this.getCenter(ki),Ri.subVectors(this.max,ki),Mi.subVectors(e.a,ki),Ti.subVectors(e.b,ki),Ei.subVectors(e.c,ki),Si.subVectors(Ti,Mi),Ai.subVectors(Ei,Ti),Li.subVectors(Mi,Ei);var t=[0,-Si.z,Si.y,0,-Ai.z,Ai.y,0,-Li.z,Li.y,Si.z,0,-Si.x,Ai.z,0,-Ai.x,Li.z,0,-Li.x,-Si.y,Si.x,0,-Ai.y,Ai.x,0,-Li.y,Li.x,0];return!!gr(t)&&(t=[1,0,0,0,1,0,0,0,1],!!gr(t)&&(Ni.crossVectors(Si,Ai),t=[Ni.x,Ni.y,Ni.z],gr(t)))}),clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new Pn),t.copy(e).clamp(this.min,this.max)},distanceToPoint:(wi=new Pn,function(e){var t=wi.copy(e).clamp(this.min,this.max);return t.sub(e).length()}),getBoundingSphere:(bi=new Pn,function(e){return void 0===e&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=.5*this.getSize(bi).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:(xi=[new Pn,new Pn,new Pn,new Pn,new Pn,new Pn,new Pn,new Pn],function(e){return this.isEmpty()||(xi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),xi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),xi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),xi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),xi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),xi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),xi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),xi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(xi)),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)}}),(0,p.default)(_r.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:function(e,t){void 0===Gi&&(Gi=new vr);var n=this.center;void 0!==t?n.copy(t):Gi.setFromPoints(e).getCenter(n);for(var i=0,r=0,a=e.length;rthis.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 vr),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}}),(0,p.default)(xr.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 Pn),t.copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:(Ji=new Pn,function(e){return this.origin.copy(this.at(e,Ji)),this}),closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new Pn),t.subVectors(e,this.origin);var n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:(Zi=new Pn,function(e){var t=Zi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Zi.copy(this.direction).multiplyScalar(t).add(this.origin),Zi.distanceToSquared(e))}),distanceSqToSegment:(Yi=new Pn,qi=new Pn,Xi=new Pn,function(e,t,n,i){Yi.copy(e).add(t).multiplyScalar(.5),qi.copy(t).sub(e).normalize(),Xi.copy(this.origin).sub(Yi);var r,a,o,s,l=.5*e.distanceTo(t),u=-this.direction.dot(qi),h=Xi.dot(this.direction),c=-Xi.dot(qi),d=Xi.lengthSq(),f=Math.abs(1-u*u);if(0>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){if(e=kn.euclideanModulo(e,1),t=kn.clamp(t,0,1),n=kn.clamp(n,0,1),0===t)this.r=this.g=this.b=n;else{var i=n<=.5?n*(1+t):n+t-n*t,r=2*n-i;this.r=Ar(r,i,e+1/3),this.g=Ar(r,i,e),this.b=Ar(r,i,e-1/3)}return this},setStyle:function(t){function e(e){void 0!==e&&(0,he.default)(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var i,r=n[1],a=n[2];switch(r){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,(0,c.default)(i[1],10))/255,this.g=Math.min(255,(0,c.default)(i[2],10))/255,this.b=Math.min(255,(0,c.default)(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,(0,c.default)(i[1],10))/100,this.g=Math.min(100,(0,c.default)(i[2],10))/100,this.b=Math.min(100,(0,c.default)(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=(0,he.default)(i[1])/360,s=(0,c.default)(i[2],10)/100,l=(0,c.default)(i[3],10)/100;return e(i[5]),this.setHSL(o,s,l)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(t)){var u=n[1],h=u.length;if(3===h)return this.r=(0,c.default)(u.charAt(0)+u.charAt(0),16)/255,this.g=(0,c.default)(u.charAt(1)+u.charAt(1),16)/255,this.b=(0,c.default)(u.charAt(2)+u.charAt(2),16)/255,this;if(6===h)return this.r=(0,c.default)(u.charAt(0)+u.charAt(1),16)/255,this.g=(0,c.default)(u.charAt(2)+u.charAt(3),16)/255,this.b=(0,c.default)(u.charAt(4)+u.charAt(5),16)/255,this}return t&&0t&&(t=e[n]);return t}Nr.prototype=(0,p.default)((0,l.default)(h.prototype),{constructor:Nr,isMaterial:!0,onBeforeCompile:function(){},setValues:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n)if("shading"!==t){var i=this[t];void 0!==i?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===E;else 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 i(e){var t=[];for(var n in e){var i=e[n];delete i.metadata,t.push(i)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.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.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid),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!==ve&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==B&&(n.side=this.side),this.vertexColors!==A&&(n.vertexColors=this.vertexColors),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.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilMask=this.stencilMask,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),0n.far?null:{distance:u,point:xa.clone(),object:e}}function Ea(e,t,n,i,r,a,o,s,l,u,h){sa.fromBufferAttribute(r,l),la.fromBufferAttribute(r,u),ua.fromBufferAttribute(r,h);var c=e.morphTargetInfluences;if(t.morphTargets&&a&&c){fa.set(0,0,0),pa.set(0,0,0),ma.set(0,0,0);for(var d=0,f=a.length;d","\t#include ","}"].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 Va({type:"CubemapFromEquirect",uniforms:Fa(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:ze,blending:me});r.uniforms.tEquirect.value=t;var a=new Ma(new Oa(5,5,5),r);n.add(a);var o=new to(1,10,1);return o.renderTarget=this,o.renderTarget.texture.name="CubeCameraTexture",o.update(e,n),a.geometry.dispose(),a.material.dispose(),this},io.prototype=(0,l.default)(Xn.prototype),io.prototype.constructor=io,io.prototype.isDataTexture=!0,(0,p.default)(ro.prototype,{isPlane:!0,set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:(Xa=new Pn,Za=new Pn,function(e,t,n){var i=Xa.subVectors(n,t).cross(Za.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,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 Pn),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},intersectLine:(qa=new Pn,function(e,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new Pn);var n=e.delta(qa),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(e.start)?t.copy(e.start):void 0;var r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||1/gm;function n(e,t){var n=yl[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Zu(n)}return e.replace(t,n)}function Ju(e){var t=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;function n(e,t,n,i){for(var r="",a=(0,c.default)(t);a<(0,c.default)(n);a++)r+=i.replace(/\[ i \]/g,"[ "+a+" ]");return r}return e.replace(t,n)}function Ku(e,t,n,i,r,a,o){var s=e.getContext(),l=i.defines,u=r.vertexShader,h=r.fragmentShader,c="SHADOWMAP_TYPE_BASIC";a.shadowMapType===O?c="SHADOWMAP_TYPE_PCF":a.shadowMapType===F&&(c="SHADOWMAP_TYPE_PCF_SOFT");var d="ENVMAP_TYPE_CUBE",f="ENVMAP_MODE_REFLECTION",p="ENVMAP_BLENDING_MULTIPLY";if(a.envMap){switch(i.envMap.mapping){case ie:case ae:d="ENVMAP_TYPE_CUBE";break;case ue:case ke:d="ENVMAP_TYPE_CUBE_UV";break;case oe:case se:d="ENVMAP_TYPE_EQUIREC";break;case le:d="ENVMAP_TYPE_SPHERE"}switch(i.envMap.mapping){case ae:case se:f="ENVMAP_MODE_REFRACTION"}switch(i.combine){case X:p="ENVMAP_BLENDING_MULTIPLY";break;case Z:p="ENVMAP_BLENDING_MIX";break;case J:p="ENVMAP_BLENDING_ADD"}}var m,v,g=0i||e.height>i)&&(r=i/Math.max(e.width,e.height)),r<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){var a=t?kn.floorPowerOfTwo:Math.floor,o=a(r*e.width),s=a(r*e.height);void 0===h&&(h=d(o,s));var l=n?d(o,s):h;l.width=o,l.height=s;var u=l.getContext("2d");return u.drawImage(e,0,0,o,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+s+")."),l}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function w(e){return kn.isPowerOfTwo(e.width)&&kn.isPowerOfTwo(e.height)}function p(e){return!_.isWebGL2&&(e.wrapS!==Ne||e.wrapT!==Ne||e.minFilter!==Ce&&e.minFilter!==Ve)}function M(e,t){return e.generateMipmaps&&t&&e.minFilter!==Ce&&e.minFilter!==Ve}function T(e,t,n,i){v.generateMipmap(e);var r=y.get(t);r.__maxMipLevel=Math.log(Math.max(n,i))*Math.LOG2E}function E(e,t){if(!_.isWebGL2)return e;var n=e;return 6403===e&&(5126===t&&(n=33326),5131===t&&(n=33325),5121===t&&(n=33321)),6407===e&&(5126===t&&(n=34837),5131===t&&(n=34843),5121===t&&(n=32849)),6408===e&&(5126===t&&(n=34836),5131===t&&(n=34842),5121===t&&(n=32856)),33325===n||33326===n||34842===n||34836===n?r.get("EXT_color_buffer_float"):34843!==n&&34837!==n||console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),n}function a(e){return e===Ce||e===De||e===Fe?9728:9729}function o(e){var t=e.target;t.removeEventListener("dispose",o),s(t),t.isVideoTexture&&delete i[t.id],c.memory.textures--}function f(e){var t=e.target;t.removeEventListener("dispose",f),l(t),c.memory.textures--}function s(e){var t=y.get(e);void 0!==t.__webglInit&&(v.deleteTexture(t.__webglTexture),y.remove(e))}function l(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.isWebGLRenderTargetCube)for(var i=0;i<6;i++)v.deleteFramebuffer(t.__webglFramebuffer[i]),t.__webglDepthbuffer&&v.deleteRenderbuffer(t.__webglDepthbuffer[i]);else v.deleteFramebuffer(t.__webglFramebuffer),t.__webglDepthbuffer&&v.deleteRenderbuffer(t.__webglDepthbuffer);y.remove(e.texture),y.remove(e)}}var t=0;function e(){t=0}function u(){var e=t;return e>=_.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+_.maxTextures),t+=1,e}function m(e,t){var n=y.get(e);if(e.isVideoTexture&&U(e),0e.far||t.push({distance:s,point:yh.clone(),uv:br.getUV(yh,Th,Eh,Sh,Ah,Lh,Ih,new Rn),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return pr.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}}),rc.prototype=(0,p.default)((0,l.default)(pr.prototype),{constructor:rc,isLOD:!0,copy:function(e){pr.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,i=t.length;n=t[i].distance;i++)t[i-1].object.visible=!1,t[i].object.visible=!0;for(;ie.far||t.push({distance:b,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else for(v=0,g=p.length/3-1;ve.far||t.push({distance:b,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this}))}else if(i.isGeometry){var w=i.vertices,M=w.length;for(v=0;ve.far||t.push({distance:b,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this}))}}}),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),hc.prototype=(0,p.default)((0,l.default)(uc.prototype),{constructor:hc,isLineSegments:!0,computeLineDistances:(zh=new Pn,Uh=new Pn,function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[],i=0,r=t.count;ir.far)return;a.push({distance:i,distanceToRay:Math.sqrt(n),point:u.clone(),index:t,face:null,object:o})}}}),updateMorphTargets:function(){var e,t,n,i=this.geometry;if(i.isBufferGeometry){var r=i.morphAttributes,a=(0,m.default)(r);if(0=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),mc.prototype=(0,l.default)(Xn.prototype),mc.prototype.constructor=mc,mc.prototype.isCompressedTexture=!0,vc.prototype=(0,l.default)(Xn.prototype),vc.prototype.constructor=vc,vc.prototype.isCanvasTexture=!0,gc.prototype=(0,l.default)(Xn.prototype),gc.prototype.constructor=gc,gc.prototype.isDepthTexture=!0,yc.prototype=(0,l.default)(wa.prototype),yc.prototype.constructor=yc,_c.prototype=(0,l.default)(Ca.prototype),_c.prototype.constructor=_c,xc.prototype=(0,l.default)(wa.prototype),xc.prototype.constructor=xc,bc.prototype=(0,l.default)(Ca.prototype),bc.prototype.constructor=bc,wc.prototype=(0,l.default)(wa.prototype),wc.prototype.constructor=wc,Mc.prototype=(0,l.default)(Ca.prototype),Mc.prototype.constructor=Mc,Tc.prototype=(0,l.default)(wc.prototype),Tc.prototype.constructor=Tc,Ec.prototype=(0,l.default)(Ca.prototype),Ec.prototype.constructor=Ec,Sc.prototype=(0,l.default)(wc.prototype),Sc.prototype.constructor=Sc,Ac.prototype=(0,l.default)(Ca.prototype),Ac.prototype.constructor=Ac,Lc.prototype=(0,l.default)(wc.prototype),Lc.prototype.constructor=Lc,Ic.prototype=(0,l.default)(Ca.prototype),Ic.prototype.constructor=Ic,kc.prototype=(0,l.default)(wc.prototype),kc.prototype.constructor=kc,Rc.prototype=(0,l.default)(Ca.prototype),Rc.prototype.constructor=Rc,Nc.prototype=(0,l.default)(wa.prototype),Nc.prototype.constructor=Nc,Nc.prototype.toJSON=function(){var e=wa.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},Pc.prototype=(0,l.default)(Ca.prototype),Pc.prototype.constructor=Pc,Cc.prototype=(0,l.default)(wa.prototype),Cc.prototype.constructor=Cc,Dc.prototype=(0,l.default)(Ca.prototype),Dc.prototype.constructor=Dc,Oc.prototype=(0,l.default)(wa.prototype),Oc.prototype.constructor=Oc;var Fc={triangulate:function(e,t,n){n=n||2;var i,r,a,o,s,l,u,h=t&&t.length,c=h?t[0]*n:e.length,d=Bc(e,0,c,n,!0),f=[];if(!d||d.next===d.prev)return f;if(h&&(d=Wc(e,t,d,n)),e.length>80*n){i=a=e[0],r=o=e[1];for(var p=n;pa.x?r.x>o.x?r.x:o.x:a.x>o.x?a.x:o.x,h=r.y>a.y?r.y>o.y?r.y:o.y:a.y>o.y?a.y:o.y,c=Kc(s,l,t,n,i),d=Kc(u,h,t,n,i),f=e.prevZ,p=e.nextZ;f&&f.z>=c&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&$c(r.x,r.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=td(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&$c(r.x,r.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=td(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==e.prev&&f!==e.next&&$c(r.x,r.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=td(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&$c(r.x,r.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=td(p.prev,p,p.next))return!1;p=p.nextZ}return!0}function Hc(e,t,n){var i=e;do{var r=i.prev,a=i.next.next;!nd(r,a)&&id(r,i,i.next,a)&&ad(r,a)&&ad(a,r)&&(t.push(r.i/n),t.push(i.i/n),t.push(a.i/n),ud(i),ud(i.next),i=e=a),i=i.next}while(i!==e);return i}function jc(e,t,n,i,r,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&ed(o,s)){var l=sd(o,s);return o=Gc(o,o.next),l=Gc(l,l.next),zc(o,t,n,i,r,a),void zc(l,t,n,i,r,a)}s=s.next}o=o.next}while(o!==e)}function Wc(e,t,n,i){var r,a,o,s,l,u=[];for(r=0,a=t.length;r=i.next.y&&i.next.y!==i.y){var s=i.x+(a-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&o=i.x&&i.x>=h&&r!==i.x&&$c(an.x)&&ad(i,e)&&(n=i,d=l)),i=i.next;return n}function Zc(e,t,n,i){for(var r=e;null===r.z&&(r.z=Kc(r.x,r.y,t,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next,r!==e;);r.prevZ.nextZ=null,r.prevZ=null,Jc(r)}function Jc(e){var t,n,i,r,a,o,s,l,u=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,i=n,s=0,t=0;ta!=n.next.y>a&&n.next.y!==n.y&&r<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next,n!==e;);return i}function sd(e,t){var n=new hd(e.i,e.x,e.y),i=new hd(t.i,t.x,t.y),r=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=r,r.prev=n,i.next=n,n.prev=i,a.next=i,i.prev=a,i}function ld(e,t,n,i){var r=new hd(e,t,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function ud(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 hd(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 cd(e,t,n,i){for(var r=0,a=t,o=n-i;are.default){var d=Math.sqrt(h),f=Math.sqrt(l*l+u*u),p=t.x-s/d,m=t.y+o/d,v=n.x-u/f,g=n.y+l/f,y=((v-p)*u-(g-m)*l)/(o*u-s*l);i=p+o*y-e.x,r=m+s*y-e.y;var _=i*i+r*r;if(_<=2)return new Rn(i,r);a=Math.sqrt(_/2)}else{var x=!1;o>re.default?l>re.default&&(x=!0):o<-re.default?l<-re.default&&(x=!0):Math.sign(s)===Math.sign(u)&&(x=!0),a=x?(i=-s,r=o,Math.sqrt(h)):(i=o,r=s,Math.sqrt(h/2))}return new Rn(i/a,r/a)}for(var F=[],B=0,G=S.length,z=G-1,U=B+1;B>>1;et;)--a;if(++a,0!==r||a!==i){a<=r&&(a=Math.max(a,1),r=a-1);var o=this.getValueSize();this.times=Zd.arraySlice(n,r,a),this.values=Zd.arraySlice(this.values,r*o,a*o)}return 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,i=this.values,r=n.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,o=0;o!==r;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&&sre.default&&(u.normalize(),r=Math.acos(kn.clamp(o[n-1].dot(o[n]),-1,1)),s[n].applyMatrix4(h.makeRotationAxis(u,r))),l[n].crossVectors(o[n],s[n]);if(!0===t)for(r=Math.acos(kn.clamp(s[0].dot(s[e]),-1,1)),r/=e,0i.length-2?i.length-1:a+1],h=i[a>i.length-3?i.length-1:a+2];return n.set(Nf(o,s.x,l.x,u.x,h.x),Nf(o,s.y,l.y,u.y,h.y)),n},Xf.prototype.copy=function(e){Mf.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t=t){var r=n[i]-t,a=this.curves[i],o=a.getLength(),s=0===o?0:1-r/o;return a.getPointAt(s)}i++}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,i=this.curves.length;nre.default){if(u<0&&(o=t[a],l=-l,s=t[r],u=-u),e.ys.y)continue;if(e.y===o.y){if(e.x===o.x)return!0}else{var h=u*(e.x-o.x)-l*(e.y-o.y);if(0===h)return!0;if(h<0)continue;i=!i}}else{if(e.y!==o.y)continue;if(s.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=s.x)return!0}}return i}var r=dd.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 Qf,l.curves=s.curves,u.push(l),u;var h=!r(a[0].getPoints());h=e?!h:h;var c,d,f=[],p=[],m=[],v=0;p[v]=void 0,m[v]=[];for(var g=0,y=a.length;gn.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n){var i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t},_updateTime:function(e){var t=this.time+e,n=this._clip.duration,i=this.loop,r=this._loopCount,a=i===Gt;if(0===e)return-1!==r&&a&&1==(1&r)?n-t:t;if(i===Ft){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(n<=t)t=n;else{if(!(t<0)){this.time=t;break e}t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===r&&(0<=e?(r=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),n<=t||t<0){var o=Math.floor(t/n);t-=n*o,r+=Math.abs(o);var s=this.repetitions-r;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=0this.max.x||e.ythis.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 Rn),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.xthis.max.x||e.max.ythis.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new Rn),t.copy(e).clamp(this.min,this.max)},distanceToPoint:(_m=new Rn,function(e){var t=_m.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)}}),(0,p.default)(lv.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 Pn),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 Pn),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 Pn),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(e,t){void 0===bm&&(bm=new Pn,wm=new Pn),bm.subVectors(e,this.start),wm.subVectors(this.end,this.start);var n=wm.dot(wm),i=wm.dot(bm),r=i/n;return t&&(r=kn.clamp(r,0,1)),r},closestPointToPoint:function(e,t,n){var i=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Pn),this.delta(n).multiplyScalar(i).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)}}),uv.prototype=(0,l.default)(pr.prototype),uv.prototype.constructor=uv,uv.prototype.isImmediateRenderObject=!0,hv.prototype=(0,l.default)(hc.prototype),hv.prototype.constructor=hv,hv.prototype.update=(Mm=new Pn,Tm=new Pn,Em=new Cn,function(){var e=["a","b","c"];this.object.updateMatrixWorld(!0),Em.getNormalMatrix(this.object.matrixWorld);var t=this.object.matrixWorld,n=this.geometry.attributes.position,i=this.object.geometry;if(i&&i.isGeometry)for(var r=i.vertices,a=i.faces,o=0,s=0,l=a.length;sg;)m(v[g++]);c.constructor=u,u.prototype=c,n(49)(i,"RegExp",u)}n(189)("RegExp")},function(e,t,r){var n=r(48),i=r(40),a=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,i){try{i=r(101)(Function.call,r(132).f(Object.prototype,"__proto__").set,2),i(e,[]),n=!(e instanceof Array)}catch(e){n=!0}return function(e,t){return a(e,t),n?e.__proto__=t:i(e,t),e}}({},!1):void 0),check:a}},function(e,t,n){e.exports=n(135)("native-function-to-string",Function.toString)},function(e,t,n){n(69),n(296),e.exports=n(11).Array.from},function(e,t,n){var l=n(138),u=n(109);e.exports=function(s){return function(e,t){var n,i,r=String(u(e)),a=l(t),o=r.length;return a<0||o<=a?s?"":void 0:(n=r.charCodeAt(a),n<55296||56319=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e){e.exports=function(){}},function(e,t,n){n(311),n(117),n(314),n(315),e.exports=n(11).Symbol},function(e,t,n){"use strict";var i=n(20),o=n(55),r=n(36),a=n(14),s=n(140),l=n(73).KEY,u=n(47),h=n(143),c=n(93),d=n(111),f=n(26),p=n(152),m=n(153),v=n(312),g=n(155),y=n(35),_=n(23),x=n(62),b=n(71),w=n(130),M=n(85),T=n(90),E=n(313),S=n(202),A=n(154),L=n(39),I=n(91),k=S.f,R=L.f,N=E.f,P=i.Symbol,C=i.JSON,D=C&&C.stringify,O="prototype",F=f("_hidden"),B=f("toPrimitive"),G={}.propertyIsEnumerable,z=h("symbol-registry"),U=h("symbols"),V=h("op-symbols"),H=Object[O],j="function"==typeof P&&!!A.f,W=i.QObject,Y=!W||!W[O]||!W[O].findChild,q=r&&u(function(){return 7!=T(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=k(H,t);i&&delete H[t],R(e,t,n),i&&e!==H&&R(H,t,i)}:R,X=function(e){var t=U[e]=T(P[O]);return t._k=e,t},Z=j&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},J=function(e,t,n){return e===H&&J(V,t,n),y(e),t=w(t,!0),y(n),o(U,t)?(n.enumerable?(o(e,F)&&e[F][t]&&(e[F][t]=!1),n=T(n,{enumerable:M(0,!1)})):(o(e,F)||R(e,F,M(1,{})),e[F][t]=!0),q(e,t,n)):R(e,t,n)},K=function(e,t){y(e);for(var n,i=v(t=b(t)),r=0,a=i.length;rr;)o(U,t=n[r++])||t==F||t==l||i.push(t);return i},ne=function(e){for(var t,n=e===H,i=N(n?V:b(e)),r=[],a=0;i.length>a;)!o(U,t=i[a++])||n&&!o(H,t)||r.push(U[t]);return r};j||(P=function(e){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var t=d(0re;)f(ie[re++]);for(var ae=I(f.store),oe=0;ae.length>oe;)m(ae[oe++]);a(a.S+a.F*!j,"Symbol",{for:function(e){return o(z,e+="")?z[e]:z[e]=P(e)},keyFor:function(e){if(!Z(e))throw TypeError(e+" is not a symbol!");for(var t in z)if(z[t]===e)return t},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),a(a.S+a.F*!j,"Object",{create:Q,defineProperty:J,defineProperties:K,getOwnPropertyDescriptor:ee,getOwnPropertyNames:te,getOwnPropertySymbols:ne});var se=u(function(){A.f(1)});a(a.S+a.F*se,"Object",{getOwnPropertySymbols:function(e){return A.f(x(e))}}),C&&a(a.S+a.F*(!j||u(function(){var e=P();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))})),"JSON",{stringify:function(e){for(var t,n,i=[e],r=1;ro;)a.call(e,i=r[o++])&&t.push(i);return t}},function(e,t,n){var i=n(71),r=n(201).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return r(e)}catch(e){return o.slice()}};e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?s(e):r(i(e))}},function(e,t,n){n(153)("asyncIterator")},function(e,t,n){n(153)("observable")},function(e,t,n){"use strict";var i=n(27),a=n(41),o=n(317),s="startsWith",l=""[s];i(i.P+i.F*n(318)(s),"String",{startsWith:function(e,t){var n=o(this,e,s),i=a(Math.min(1>1,h=23===t?k(2,-24)-k(2,-77):0,c=0,d=e<0||0===e&&1/e<0?1:0;for(e=I(e),e!=e||e===A?(r=e!=e?1:0,i=l):(i=R(N(e)/P),e*(a=k(2,-i))<1&&(i--,a*=2),e+=1<=i+u?h/a:h*k(2,1-u),2<=e*a&&(i++,a/=2),l<=i+u?(r=0,i=l):1<=i+u?(r=(e*a-1)*k(2,t),i+=u):(r=e*k(2,u-1)*k(2,t),i=0));8<=t;o[c++]=255&r,r/=256,t-=8);for(i=i<>1,s=r-7,l=n-1,u=e[l--],h=127&u;for(u>>=7;0>=-s,s+=t;0>8&255]}function W(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function Y(e){return z(e,52,8)}function q(e){return z(e,23,4)}function X(e,t,n){m(e[x],t,{get:function(){return this[n]}})}function Z(e,t,n,i){var r=+n,a=f(r);if(a+t>e[B])throw S(w);var o=e[F]._b,s=a+e[G],l=o.slice(s,s+t);return i?l:l.reverse()}function J(e,t,n,i,r,a){var o=+n,s=f(o);if(s+t>e[B])throw S(w);for(var l=e[F]._b,u=s+e[G],h=i(+r),c=0;cee;)(K=$[ee++])in M||s(M,K,L[K]);a||(Q.constructor=M)}var te=new T(new M(2)),ne=T[x].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||l(T[x],{setInt8:function(e,t){ne.call(this,e,t<<24>>24)},setUint8:function(e,t){ne.call(this,e,t<<24>>24)}},!0)}else M=function(e){h(this,M,y);var t=f(e);this._b=v.call(new Array(t),0),this[B]=t},T=function(e,t,n){h(this,T,_),h(e,M,_);var i=e[B],r=c(t);if(r<0||i>24},getUint8:function(e){return Z(this,1,e)[0]},getInt16:function(e,t){var n=Z(this,2,e,t);return(n[1]<<8|n[0])<<16>>16},getUint16:function(e,t){var n=Z(this,2,e,t);return n[1]<<8|n[0]},getInt32:function(e,t){return V(Z(this,4,e,t))},getUint32:function(e,t){return V(Z(this,4,e,t))>>>0},getFloat32:function(e,t){return U(Z(this,4,e,t),23,4)},getFloat64:function(e,t){return U(Z(this,8,e,t),52,8)},setInt8:function(e,t){J(this,1,e,H,t)},setUint8:function(e,t){J(this,1,e,H,t)},setInt16:function(e,t,n){J(this,2,e,j,t,n)},setUint16:function(e,t,n){J(this,2,e,j,t,n)},setInt32:function(e,t,n){J(this,4,e,W,t,n)},setUint32:function(e,t,n){J(this,4,e,W,t,n)},setFloat32:function(e,t,n){J(this,4,e,q,t,n)},setFloat64:function(e,t,n){J(this,8,e,Y,t,n)}});g(M,y),g(T,_),s(T[x],o.VIEW,!0),t[y]=M,t[_]=T},function(e,t,n){var i=n(72),r=n(21)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[r]===e)}},function(e,t,n){var i=n(114),r=n(21)("iterator"),a=n(72);e.exports=n(106).getIteratorMethod=function(e){if(null!=e)return e[r]||e["@@iterator"]||a[i(e)]}},function(e,t,n){var i=n(335);e.exports=function(e,t){return new(i(e))(t)}},function(e,t,n){var i=n(48),r=n(336),a=n(21)("species");e.exports=function(e){var t;return r(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!r(t.prototype)||(t=void 0),i(t)&&(t=t[a],null===t&&(t=void 0))),void 0===t?Array:t}},function(e,t,n){var i=n(86);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var a=n(21)("iterator"),o=!1;try{var i=[7][a]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],r=i[a]();r.next=function(){return{done:n=!0}},i[a]=function(){return r},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var h=n(51),c=n(105),d=n(41);e.exports=[].copyWithin||function(e,t,n){var i=h(this),r=d(i.length),a=c(e,r),o=c(t,r),s=2>>0||(o.test(n)?16:10))}:i},function(e,t,n){n(345),e.exports=n(11).parseFloat},function(e,t,n){var i=n(14),r=n(346);i(i.G+i.F*(parseFloat!=r),{parseFloat:r})},function(e,t,n){var i=n(20).parseFloat,r=n(216).trim;e.exports=1/i(n(162)+"-0")!=-1/0?function(e){var t=r(String(e),3),n=i(t);return 0===n&&"-"==t.charAt(0)?-0:n}:i},function(e,t,n){"use strict";var i=n(27),r=n(51),a=n(87);i(i.P+i.F*n(25)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(){var e=r(this),t=a(e);return"number"!=typeof t||isFinite(t)?e.toISOString():null}})},function(e,t,n){var i=n(11),r=i.JSON||(i.JSON={stringify:JSON.stringify});e.exports=function(e){return r.stringify.apply(r,arguments)}},function(e,t,n){n(350),e.exports=n(11).Array.isArray},function(e,t,n){var i=n(14);i(i.S,"Array",{isArray:n(155)})},function(e,t,n){n(352);var i=n(11).Object;e.exports=function(e,t){return i.create(e,t)}},function(e,t,n){var i=n(14);i(i.S,"Object",{create:n(90)})},function(e,t,n){"use strict";var r=n(58),a=n(57);e.exports=function(e){var t=String(a(this)),n="",i=r(e);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;0>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t,n){n(355);var i=n(11).Object;e.exports=function(e,t){return i.defineProperties(e,t)}},function(e,t,n){var i=n(14);i(i.S+i.F*!n(36),"Object",{defineProperties:n(190)})},function(e,t,n){var i=n(27);i(i.S+i.F,"Object",{assign:n(357)})},function(e,t,n){"use strict";var c=n(31),d=n(149),f=n(358),p=n(184),m=n(51),v=n(133),r=Object.assign;e.exports=!r||n(25)(function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=r({},e)[n]||Object.keys(r({},t)).join("")!=i})?function(e){for(var t=m(e),n=arguments.length,i=1,r=f.f,a=p.f;iT||8*(1-_.dot(x.object.quaternion))>T)&&(x.dispatchEvent(b),y.copy(x.object.position),_.copy(x.object.quaternion),I=!1,!0)}),this.dispose=function(){x.domElement.removeEventListener("contextmenu",me,!1),x.domElement.removeEventListener("mousedown",ae,!1),x.domElement.removeEventListener("wheel",he,!1),x.domElement.removeEventListener("touchstart",de,!1),x.domElement.removeEventListener("touchend",pe,!1),x.domElement.removeEventListener("touchmove",fe,!1),x.domElement.removeEventListener("mouseup",se,!1),x.domElement.removeEventListener("mousemove",le,!1),window.PointerEvent&&!window.TouchEvent&&(x.domElement.removeEventListener("pointerdown",ye,!1),x.domElement.removeEventListener("pointermove",_e,!1),x.domElement.removeEventListener("pointerup",xe,!1)),document.removeEventListener("mousemove",oe,!1),document.removeEventListener("mouseup",ue,!1),window.removeEventListener("keydown",ce,!1),this.enterCtrl=void 0,this.domElement=void 0,this.object=void 0};var x=this,b={type:"change"},l={type:"start"},i={type:"end"},w={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4,TOUCH_PAN:5,TOUCH_DOLLY_ROTATE:6},M=w.NONE,T=1e-6,E=new fm.Spherical,S=new fm.Spherical,A=1,L=new fm.Vector3,I=!1,k=new fm.Vector2,R=new fm.Vector2,N=new fm.Vector2,P=new fm.Vector2,C=new fm.Vector2,D=(new fm.Vector2,new fm.Vector2),O=new fm.Vector2,F=new fm.Vector2,B=new fm.Vector2,G=new fm.Vector2,z=new fm.Vector2,u=new fm.Vector2;function U(){return 2*Math.PI/60/60*x.autoRotateSpeed}function r(){return Math.pow(.95,x.zoomSpeed)}function V(e){x.enterCtrl&&!x.enterCtrl.enableMapRotate||(S.theta-=e)}function H(e){x.enterCtrl&&!x.enterCtrl.enableMapIncline||(S.phi-=e)}this.rotateLeft=function(e){V(e)};var a,o,s=(a=new fm.Vector3,function(e,t){a.setFromMatrixColumn(t,0),a.multiplyScalar(-e),L.add(a)}),j=(o=new fm.Vector3,function(e,t){!0===x.screenSpacePanning?o.setFromMatrixColumn(t,1):(o.setFromMatrixColumn(t,0),o.crossVectors(x.object.up,o)),o.multiplyScalar(e),L.add(o)});this.panUp=function(e){var t=new fm.Vector3;t.y=1,t.multiplyScalar(e),L.add(t)};var W,Y=(W=new fm.Vector3,function(e,t){if(!x.enterCtrl||x.enterCtrl.enableMapPan){var n=x.domElement===document?x.domElement.body:x.domElement;if(x.object.isPerspectiveCamera){var i=x.object.position;W.copy(i).sub(x.target);var r=W.length();r*=Math.tan(x.object.fov/2*Math.PI/180),s(2*e*r/n.clientHeight,x.object.matrix),j(2*t*r/n.clientHeight,x.object.matrix)}else x.object.isOrthographicCamera?(s(e*(x.object.right-x.object.left)/x.object.zoom/n.clientWidth,x.object.matrix),j(t*(x.object.top-x.object.bottom)/x.object.zoom/n.clientHeight,x.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),x.enablePan=!1)}});function q(e){x.enterCtrl&&!x.enterCtrl.enableMapPinch||(x.object.isPerspectiveCamera?A/=e:x.object.isOrthographicCamera?(x.object.zoom=Math.max(x.minZoom,Math.min(x.maxZoom,x.object.zoom*e)),x.object.updateProjectionMatrix(),A/=e,I=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),x.enableZoom=!1))}function X(e){x.enterCtrl&&!x.enterCtrl.enableMapPinch||(x.object.isPerspectiveCamera?A*=e:x.object.isOrthographicCamera?(x.object.zoom=Math.max(x.minZoom,Math.min(x.maxZoom,x.object.zoom/e)),x.object.updateProjectionMatrix(),I=!0,A*=e):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),x.enableZoom=!1))}function Z(e){k.set(e.clientX,e.clientY)}function J(e){B.set(e.clientX,e.clientY)}function K(e){D.set(e.clientX,e.clientY)}function Q(e){R.set(e.clientX,e.clientY),N.subVectors(R,k).multiplyScalar(x.rotateSpeed);var t=x.domElement===document?x.domElement.body:x.domElement;V(2*Math.PI*N.x/t.clientHeight),H(2*Math.PI*N.y/t.clientHeight),k.copy(R)}function $(e){G.set(e.clientX,e.clientY),z.subVectors(G,B),0=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function f(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);n>16)+(t>>16)+(n>>16);return i<<16|65535&n}function o(e,t){return e<>>32-t}function s(e,t,n,i,r,a){return c(o(c(c(t,e),c(i,a)),r),n)}function d(e,t,n,i,r,a,o){return s(t&n|~t&i,e,t,r,a,o)}function f(e,t,n,i,r,a,o){return s(t&i|n&~i,e,t,r,a,o)}function p(e,t,n,i,r,a,o){return s(t^n^i,e,t,r,a,o)}function m(e,t,n,i,r,a,o){return s(n^(t|~i),e,t,r,a,o)}function l(e,t){var n,i,r,a,o;e[t>>5]|=128<>>9<<4)]=t;var s=1732584193,l=-271733879,u=-1732584194,h=271733878;for(n=0;n>5]>>>t%32&255);return n}function h(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+i.charAt(15&t);return r}function _(e){return unescape(encodeURIComponent(e))}function x(e){return v(_(e))}function b(e){return y(x(e))}function w(e,t){return g(_(e),_(t))}function M(e,t){return y(w(e,t))}function T(e,t,n){return t?(n?w:M)(t,e):(n?x:b)(e)}var E=a;t.default=E},function(e,t,n){e.exports=n(406)},function(e,t,n){n(117),n(69),n(74),n(407),n(409),n(412),n(413),e.exports=n(11).Map},function(e,t,n){"use strict";var i=n(408),r=n(94),a="Map";e.exports=n(206)(a,function(t){return function(e){return t(this,0=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function d(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n\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 "},a=r;t.default=a},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var s=i(n(19)),l=i(n(12)),u=i(n(18)),h=i(n(17)),a=i(n(15));n(10),n(5),n(4),n(22);var o=i(n(2)),c=i(n(3)),d=i(n(422)),f=i(n(236));function p(e){if(void 0===h.default||null==e[u.default]){if((0,l.default)(e)||(e=m(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function m(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);n=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){e.exports=n(425)},function(e,t,n){n(117),n(69),n(74),n(426),n(429),n(430),e.exports=n(11).Promise},function(e,t,n){"use strict";var i,r,a,o,s=n(89),l=n(20),u=n(46),h=n(112),c=n(14),d=n(23),f=n(60),p=n(119),m=n(76),v=n(237),g=n(238).set,y=n(427)(),_=n(169),x=n(239),b=n(428),w=n(240),M="Promise",T=l.TypeError,E=l.process,S=E&&E.versions,A=S&&S.v8||"",L=l[M],I="process"==h(E),k=function(){},R=r=_.f,N=!!function(){try{var e=L.resolve(1),t=(e.constructor={})[n(26)("species")]=function(e){e(k,k)};return(I||"function"==typeof PromiseRejectionEvent)&&e.then(k)instanceof t&&0!==A.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(e){}}(),P=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},C=function(h,n){if(!h._n){h._n=!0;var i=h._c;y(function(){for(var l=h._v,u=1==h._s,e=0,t=function(e){var t,n,i,r=u?e.ok:e.fail,a=e.resolve,o=e.reject,s=e.domain;try{r?(u||(2==h._h&&F(h),h._h=1),!0===r?t=l:(s&&s.enter(),t=r(l),s&&(s.exit(),i=!0)),t===e.promise?o(T("Promise-chain cycle")):(n=P(t))?n.call(t,a,o):a(t)):o(l)}catch(e){s&&!i&&s.exit(),o(e)}};i.length>e;)t(i[e++]);h._c=[],h._n=!1,n&&!h._h&&D(h)})}},D=function(a){g.call(l,function(){var e,t,n,i=a._v,r=O(a);if(r&&(e=x(function(){I?E.emit("unhandledRejection",i,a):(t=l.onunhandledrejection)?t({promise:a,reason:i}):(n=l.console)&&n.error&&n.error("Unhandled promise rejection",i)}),a._h=I||O(a)?2:1),a._a=void 0,r&&e.e)throw e.v})},O=function(e){return 1!==e._h&&0===(e._a||e._c).length},F=function(t){g.call(l,function(){var e;I?E.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})})},B=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),C(t,!0))},G=function(e){var n,i=this;if(!i._d){i._d=!0,i=i._w||i;try{if(i===e)throw T("Promise can't be resolved itself");(n=P(e))?y(function(){var t={_w:i,_d:!1};try{n.call(e,u(G,t,1),u(B,t,1))}catch(e){B.call(t,e)}}):(i._v=e,i._s=1,C(i,!1))}catch(e){B.call({_w:i,_d:!1},e)}}};N||(L=function(e){p(this,L,M,"_h"),f(e),i.call(this);try{e(u(G,this,1),u(B,this,1))}catch(e){B.call(this,e)}},i=function(){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},i.prototype=n(118)(L.prototype,{then:function(e,t){var n=R(v(this,L));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=I?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&C(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new i;this.promise=e,this.resolve=u(G,e,1),this.reject=u(B,e,1)},_.f=R=function(e){return e===L||e===o?new a(e):r(e)}),c(c.G+c.W+c.F*!N,{Promise:L}),n(93)(L,M),n(231)(M),o=n(11)[M],c(c.S+c.F*!N,M,{reject:function(e){var t=R(this),n=t.reject;return n(e),t.promise}}),c(c.S+c.F*(s||!N),M,{resolve:function(e){return w(s&&this===o?L:this,e)}}),c(c.S+c.F*!(N&&n(196)(function(e){L.all(e).catch(k)})),M,{all:function(e){var o=this,t=R(o),s=t.resolve,l=t.reject,n=x(function(){var i=[],r=0,a=1;m(e,!1,function(e){var t=r++,n=!1;i.push(void 0),a++,o.resolve(e).then(function(e){n||(n=!0,i[t]=e,--a||s(i))},l)}),--a||s(i)});return n.e&&l(n.v),t.promise},race:function(e){var t=this,n=R(t),i=n.reject,r=x(function(){m(e,!1,function(e){t.resolve(e).then(n.resolve,i)})});return r.e&&i(r.v),n.promise}})},function(e,t,n){var s=n(20),l=n(238).set,u=s.MutationObserver||s.WebKitMutationObserver,h=s.process,c=s.Promise,d="process"==n(92)(h);e.exports=function(){var n,i,r,e=function(){var e,t;for(d&&(e=h.domain)&&e.exit();n;){t=n.fn,n=n.next;try{t()}catch(e){throw n?r():i=void 0,e}}i=void 0,e&&e.enter()};if(d)r=function(){h.nextTick(e)};else if(!u||s.navigator&&s.navigator.standalone)if(c&&c.resolve){var t=c.resolve(void 0);r=function(){t.then(e)}}else r=function(){l.call(s,e)};else{var a=!0,o=document.createTextNode("");new u(e).observe(o,{characterData:!0}),r=function(){o.data=a=!a}}return function(e){var t={fn:e,next:void 0};i&&(i.next=t),n||(n=t,r()),i=t}}},function(e,t,n){var i=n(20),r=i.navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var i=n(14),r=n(11),a=n(20),o=n(237),s=n(240);i(i.P+i.R,"Promise",{finally:function(t){var n=o(this,r.Promise||a.Promise),e="function"==typeof t;return this.then(e?function(e){return s(n,t()).then(function(){return e})}:t,e?function(e){return s(n,t()).then(function(){throw e})}:t)}})},function(e,t,n){"use strict";var i=n(14),r=n(169),a=n(239);i(i.S,"Promise",{try:function(e){var t=r.f(this),n=a(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(2)),o=i(n(3)),s=i(n(236)),l=function(){function e(){(0,a.default)(this,e),this.dynamicModel={},this.loader=new s.default}return(0,o.default)(e,[{key:"load",value:function(r,t,e){var a=this;this.dynamicModel[r]?0==this.dynamicModel[r].loadComplete?(this.dynamicModel[r].scbs.push(t),this.dynamicModel[r].fcbs.push(e)):this.dynamicModel[r].error?e&&e(this.dynamicModel[r].error):t&&this.loader.parse(this.dynamicModel[r].data,fm.LoaderUtils.extractUrlBase(r),function(e){t(e)},function(){}):(this.dynamicModel[r]={gltf:null,loadComplete:!1,error:null,scbs:[],fcbs:[]},this.dynamicModel[r].scbs.push(t),this.dynamicModel[r].fcbs.push(e),this.loader.load(r,function(e,t){a.dynamicModel[r].gltf=e,a.dynamicModel[r].data=t,a.dynamicModel[r].loadComplete=!0;for(var n=a.dynamicModel[r].scbs,i=0;i\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 "},a=r;t.default=a},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var s=i(n(19)),l=i(n(12)),u=i(n(18)),h=i(n(17)),a=i(n(15));n(5),n(4),n(79),n(10);var c=i(n(24)),d=i(n(16));n(22);var o=i(n(2)),f=i(n(3)),p=i(n(32));function m(e){if(void 0===h.default||null==e[u.default]){if((0,l.default)(e)||(e=v(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function v(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);n>16&255)/255,g:(t>>8&255)/255,b:(255&t)/255,a:n}}},{key:"getModelTheme",value:function(e){if(!e)return this._defaultTheme;var t=this._type2theme[e.type];return t||this._defaultTheme}},{key:"getPoiTheme",value:function(e){var t=(0,d.default)(this._poiimagetheme[e]||this._poiimagetheme[0],{});return"rtheme"==this.fileType?t.imageSrc=this.getRThemeTexture(t.imagename):t.imageSrc=this._themeUrl+"/"+this.themeName+"/"+t.imagename,t.imageUrl=this._themeUrl+"/"+this.themeName+"/"+t.imagename,t.imagehead=this._themeUrl+"/"+this.themeName+"/",t}},{key:"getLabelTheme",value:function(e){var t,n=this.storeLabelTypeDic[e];if(t=n&&this.storeLabelThemeDic[n.normalid]?this.storeLabelThemeDic[n.normalid]:this._labelStyle,t=t||this._labelDefaultTheme,!t.fillcolor||!t.alpha||!t.fontsize){var i={fillcolor:"0,0,0",alpha:"1.0",fontsize:"12.0"};t=(0,d.default)(t,i)}return 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:"themeName",get:function(){return this._themeName}},{key:"data",set:function(e){this._data=e,this.initStoreTheme(),this.initLabelTheme(),this.initPoiTheme(),this.initExteralModelTheme(),this.clearColor=p.default.toColor(this._data.viewtheme.clearcolor),this.clearAlpha=(0,c.default)(this._data.viewtheme.clearalpha)},get:function(){return this._data}},{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",set:function(e){this._floorColor=e},get:function(){return this._floorColor}},{key:"floorOpacity",set:function(e){this._floorOpacity=e},get:function(){return this._floorOpacity}},{key:"selectedColor",get:function(){return this._selectedColor}}]),n}(),_=y;t.default=_},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var s=i(n(19)),l=i(n(12)),u=i(n(18)),h=i(n(17)),a=i(n(15));n(10),n(5),n(4);var o=i(n(16)),c=i(n(2)),d=i(n(3));function f(e){if(void 0===h.default||null==e[u.default]){if((0,l.default)(e)||(e=p(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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,r,a=!0,o=!1;return{s:function(){i=(0,s.default)(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,r=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw r}}}}function p(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?(0,a.default)(n):"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,i=new Array(t);n\n \n
\n
\n \n
\n ');return r}},{key:"checkPosition",value:function(e,t,n){switch(n.style.left="",n.style.right="",n.style.top="",n.style.bottom="",e){case l.default.LEFT_TOP:n.style.left=t.x+"px",n.style.top=t.y+"px";break;case l.default.RIGHT_TOP:n.style.right=-t.x+"px",n.style.top=t.y+"px";break;case l.default.LEFT_BOTTOM:n.style.left=t.x+"px",n.style.bottom=-t.y+"px";break;case l.default.RIGHT_BOTTOM:n.style.right=-t.x+"px",n.style.bottom=-t.y+"px"}}}]),n}(),c=h;t.default=c},function(e,t,n){"use strict";var i=n(1),r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(29)),o=i(n(28));n(75);var s,l=i(n(2)),u=i(n(3)),h=i(n(32)),c=i(n(97)),d=i(n(96)),f=function(){function n(e,t){(0,l.default)(this,n),this._map=e,this._ctlOpt=new d.default(t),this._btnWidth=42,this._showBtnCount=this._ctlOpt.showBtnCount||5,this._foucusId=this._map.currentFocusGroup,this._scrollSpeed=10,this._btnPanel=null,this._mainPanel=null,this._ctlOpt.offset||(this._ctlOpt.offset={x:0,y:0}),this._ctlOpt.needAllLayerBtn=null==this._ctlOpt.needAllLayerBtn||this._ctlOpt.needAllLayerBtn,this._allLayer=!!this._ctlOpt.allLayer&&this._ctlOpt.allLayer,this._allLayer&&this._map.showSingerOrMultiGroup(this._allLayer),this.uuid=null,this.init(),this.scrollTopAn_=new h.default.scrollTopAnFun}return(0,u.default)(n,[{key:"init",value:function(){var n=this,e=new Date,t=e.getFullYear(),i=e.getMonth(),r=e.getDate(),a=e.getHours(),o=e.getMinutes(),s=e.getSeconds();a<10&&(a="0"+a),o<10&&(o="0"+o),s<10&&(s="0"+s);var l=t+"/"+i+"/"+r+"/"+a+":"+o+":"+s;this.uuid=String(5*Math.random()).replace(/^(.*\..{4}).*$/,"$1")+l;var u=this.createPanel(this._btnWidth);this._mainPanel=u,this.checkPosition(this._ctlOpt.position,this._ctlOpt.offset,u),this._map.getContainer().appendChild(u);var h=this._map.listGroups.map(function(e){return e.gid}),c=h.length,d=this._showBtnCount,f=!0;c<=this._showBtnCount&&(d=c,f=!1);var p=this.createMultiSwitchButton(this._ctlOpt.imgURL+(this._ctlOpt.allLayer?"layers.png":"layer.png"));this._ctlOpt.needAllLayerBtn&&u.appendChild(p),this._switchBtn=p,f&&u.appendChild(this.createScrollButton(this._ctlOpt.imgURL+"arrow1.png","top"));var m=this.createGroupBtnPanel(d*this._btnWidth+2*(d-1));u.appendChild(m),this._btnPanel=m;for(var v=this._map.listGroups,g=v.length-1;-1t[t.length-1]||(m.scrollTop=n.getCenterScrolltopById(e.gid,t.length),n.setFocusStaus(e.gid))},_=function(e){1\n ';return e.innerHTML=t.trim(),e.firstChild}},{key:"createGroupBtnPanel",value:function(e){var t=document.createElement("div"),n='\n
\n \n
\n ');return t.innerHTML=n.trim(),t.firstChild}},{key:"createHr",value:function(){var e=document.createElement("div"),t='\n
\n ';return e.innerHTML=t.trim(),e.firstChild}},{key:"createScrollButton",value:function(e,t){var n=document.createElement("div"),i='\n
\n ');return n.innerHTML=i.trim(),n.firstChild}},{key:"createGroupButton",value:function(e,t){var n=document.createElement("div"),i="");return n.innerHTML=i.trim(),n.firstChild}},{key:"changeScrollBtnPic",value:function(){var e=this._foucusId,t=this._map.listGroups.map(function(e){return e.gid}),n=document.getElementById("scroll_buttom"+this.uuid),i=document.getElementById("scroll_top"+this.uuid);e==t[0]?n&&(n.style.backgroundImage="url("+this._ctlOpt.imgURL+"arrow4.png)"):n&&(n.style.backgroundImage="url("+this._ctlOpt.imgURL+"arrow2.png)"),e==t[t.length-1]?i&&(i.style.backgroundImage="url("+this._ctlOpt.imgURL+"arrow3.png)"):i&&(i.style.backgroundImage="url("+this._ctlOpt.imgURL+"arrow1.png)")}},{key:"changeFocusGroup",value:function(e){this.foucusId=e}},{key:"changeGroupsSelect",value:function(e){this.setLayerStatus(e),this._map.showSingerOrMultiGroup(e)}},{key:"setLayerStatus",value:function(e){this._allLayer=e,this._allLayer?this._switchBtn.firstElementChild.src=this._ctlOpt.imgURL+"layers.png":this._switchBtn.firstElementChild.src=this._ctlOpt.imgURL+"layer.png"}},{key:"checkPosition",value:function(e,t,n){switch(n.style.left="",n.style.right="",n.style.top="",n.style.bottom="",e){case c.default.LEFT_TOP:n.style.left=t.x+"px",n.style.top=t.y+"px";break;case c.default.RIGHT_TOP:n.style.right=-t.x+"px",n.style.top=t.y+"px";break;case c.default.LEFT_BOTTOM:n.style.left=t.x+"px",n.style.bottom=-t.y+"px";break;case c.default.RIGHT_BOTTOM:n.style.right=-t.x+"px",n.style.bottom=-t.y+"px";break;default:n.style.left=t.x+"px",n.style.top=t.y+"px"}}},{key:"onChange",value:function(e){s=e}},{key:"setFocusStaus",value:function(e){document.getElementById("gid_"+this._foucusId+this.uuid).style.color="rgb(102, 102, 102)",this._foucusId=(0,o.default)(e),document.getElementById("gid_"+this._foucusId+this.uuid).style.color="rgb(30, 130, 250)",this.changeScrollBtnPic()}},{key:"foucusId",set:function(e){var t=[];t.push.apply(t,(0,a.default)(this._map.visibleGroupIDs)),1==t.length?this._map.visibleGroupIDs=[e]:-1t[t.length-1]||(o.scrollTop=n.getCenterScrolltopById(e.gid,t.length),n.setFocusStaus(e.gid))};this._map.on("focusGroupIDChanged",u),this._map.on("dispose",function(){n._map.off("focusGroupIDChanged",u),n._map.getContainer().removeChild(o),n._map.getContainer().removeChild(t)}),this._$=function(e){return n.map?n.map.mapView.container_.querySelector(e):document.querySelector(e)}}},{key:"eventBtnPanelInit",value:function(n){var i=this,e=this;n.onselectstart=function(){return!1},n.style.MozUserSelect="none",h.default.bindEvent(n,"label","click",function(){e.foucusId=(0,s.default)(this.dataset.gid)});var t=function(e){var t=n.scrollTop;e.wheelDelta?t+=-e.wheelDelta:e.detail&&(t+=e.detail),i.scrollTopAn_({el:n,to:n.scrollTop,form:n.scrollTop+t})};n.addEventListener("mousewheel",t),n.addEventListener("MozMousePixelScroll",t,!1),n.addEventListener("touchstart",this.touchstart.bind(this),!1),n.addEventListener("touchmove",this.touchmove.bind(this),!1),n.addEventListener("touchend",this.touchend.bind(this),!0)}},{key:"touchstart",value:function(e){e.preventDefault(),this.touchPointX=e.touches[0].pageX,this.touchPointY=e.touches[0].pageY,this.touchStartPointY=e.touches[0].pageY}},{key:"touchmove",value:function(e){e.preventDefault(),this.touchEndPointX=e.touches[0].pageX,this.touchEndPointY=e.touches[0].pageY,this.handleTouchEnd(e)}},{key:"handleTouchEnd",value:function(e){e=e||window.event;var t=this,n=null,i=0;0