/*! Released Version 2.5.0,BUILD 40. 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(245)},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 i=n(0);function r(e,t){for(var n=0;n>>0,c=new RegExp(e.source,s+"g");(r=f.call(c,n))&&(i=c[m],!(l=u)));)c[m]===r.index&&c[m]++;return l===n[p]?!a&&c.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=i(this),r=null==e?void 0:e[a];return void 0!==r?r.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 r=_(e),i=String(this),a=x(r,RegExp),o=r.unicode,s=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(T?"y":"g"),l=new a(T?r:"^(?:"+r.source+")",s),u=void 0===t?E:t>>>0;if(0===u)return[];if(0===i.length)return null===M(l,i)?[i]:[];for(var c=0,h=0,f=[];h=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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}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,r=new Array(t);nl.distance?l:u:u[0]?u:l[0]?l:[]}},{key:"getFacility",value:function(e,t,n,r,i){var a=this._scenes[e];if(!a)return[];var o=a.getFacilityByFilter(t,i);this._raycaster.setFromCamera(n,r),this._raycaster.perspective="PerspectiveCamera"===r.type;for(var s=this._raycaster.intersectObjects(o),l=0;ls[l-f].object.material.priority;f++){var d=s[l-h],p=s[l-f];s[l-f]=d,s[l]=p,h++}}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 r=new h.default(t,e,this);r.parent=this,this._scenes[t+""]=r,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,C.default)(e.material)){var n,r=P(e.material);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.opacity=this._focusAlpha}}catch(e){r.e(e)}finally{r.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;ac;if(n){switch(e){case"extent":r.renderNodeInited?f.checkMaterialAlpha(r.renderNode,l.eid):f.createExtent(r,h,l.eid);break;case"model":r.renderNodeInited?(f.checkMaterialAlpha(r.renderNode,l.eid),f.checkMaterialAlpha(r.line,l.eid)):f.createModel(r,h,l.eid);break;case"label":r.renderNodeInited?f.checkMaterialAlpha(r._renderNode,l.eid):r.tryInit||f.createLabel(r,h,y,l.eid);break;case"facility":r.renderNodeInited?f.checkMaterialAlpha(r._renderNode,l.eid):f.createFacility(r,h,l.eid);break;case"externalModel":if(r.renderNodeInited)f.checkMaterialAlpha(r._renderNode,l.eid);else{var i=r.bdata,a=r.gdata,o=d.getExteralModelTheme(i.fid);if(!o)return;f._externalLoader.preLoadModels[o.normalid]||(f._externalLoader.preLoadModels[o.normalid]={loaded:!1,isLoading:!1,modelUrl:o.model,model:null,geometry:null,material:null});var s=f._externalLoader.preLoadModels[o.normalid];s.loaded?f.createExterModel(s.geometry,s.material,a,i,o,r,p,m,l.height,v,g,s.isGltf):(f._externalLoader.waitingBacks[o.normalid]?f._externalLoader.addWaitingBacks(o.normalid,function(e,t,n){f.createExterModel(e,t,a,i,o,r,p,m,l.height,v,g,"js"!==n)},i.fid):f._externalLoader.addWaitingBacks(o.normalid,function(e,t,n){f.createExterModel(e,t,a,i,o,r,p,m,l.height,v,g,"js"!==n)},i.fid),s.isLoading||f._externalLoader.load(o.normalid))}}r.checkByFrustum(u)}else r.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 r,i=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,c=e.bdata;this._map.MapOptions.useStoreApply&&(r=l.getStoreApplyTheme(c.fid)),r=r||l.getModelTheme(c);var h=null;h=1===this._map.dataManager.file_ver?I.default.convertGeo2Geometry(u.geo):I.default.convertArray2Geometry(u.idxs,u.pts),e._data=h;var f=u.height&&-1!==u.height?u.height:2,d=this.createGeometry(h,f,t),p=this._materialManager.createNormalMaterial(r);if(e._geometry=d,e.initMesh(p,new fm.Vector3(i,a+f,0)),e.x=o,e.y=s,e.height=f,e.currHeight=f,this.checkMaterialAlpha(e.renderNode,n),e.initLine(this._materialManager.createLineMaterial(r),u.height),this.checkMaterialAlpha(e.line,n),r.image&&r.sizes){var m=r.sizes.split(",");e.addStoreImage({image:r.image?this._map.MapOptions.mapThemeURL+"/"+this._map.MapOptions.defaultThemeName+"/"+r.image:"",angle:r.angle?r.angle:0,size:[(0,R.default)(m[0]),(0,R.default)(m[1])],offset:r.offset?r.offset:[0,0]})}}},{key:"createExtent",value:function(e,t,n){var r=e.gdata,i=this._scenes[t+""].theme,a=this._scenes[""+t].center.x,o=this._scenes[""+t].center.y,s=this._scenes[""+t].mapcenter.x,l=this._scenes[""+t].mapcenter.y,u=null;u=1===this._map.dataManager.file_ver?I.default.convertGeo2Geometry(r.geo):I.default.convertArray2Geometry(r.idxs,r.pts);var c=this.createGeometry(u,r.height?r.height:1,t);e._geometry=c,e.x=s,e.y=l;var h=this._materialManager.createNormalMaterial();e.initMesh(h,new fm.Vector3(a,o,0),i.floorColor,i.floorOpacity),this.checkMaterialAlpha(e.renderNode,n)}},{key:"createLabel",value:function(e,t,n,r){var i=e.gdata,a=e.bdata,o=this._scenes[""+t].mapcenter.x,s=this._scenes[""+t].mapcenter.y,l=this._scenes[""+t].center.x,u=this._scenes[""+t].center.y,c=this._scenes[t+""].theme,h=null;h=1===this._map.dataManager.file_ver?I.default.convertGeo2Points(i.geo):I.default.convertArrayPoints(i.idxs,i.pts);var f=-1===i.height?2.2:i.height,d=new fm.Vector3(h.vertices[0].x-o,-h.vertices[0].y+s,0).applyEuler(new fm.Euler(Math.PI/2,0,0,"XYZ")).add(new fm.Vector3(l,u+f,0)),p=a.ename,m=a.name,v=n===x.default.ZH?m:p;e.x=h.vertices[0].x,e.y=h.vertices[0].y,e.height=f,e.pos=d,e.tryInit=!0;var g=c.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(d)),this.checkMaterialAlpha(e._renderNode,r),e.setSize()}}},{key:"createFacility",value:function(e,t,n){var r=e.gdata,i=e.bdata,a=this._scenes[""+t].center.x,o=this._scenes[""+t].center.y,s=this._scenes[""+t].mapcenter.x,l=this._scenes[""+t].mapcenter.y,u=this._scenes[t+""].theme,c=null;c=1===this._map.dataManager.file_ver?I.default.convertGeo2Points(r.geo):I.default.convertArrayPoints(r.idxs,r.pts);var h=-1===r.height?2.2:r.height,f=new fm.Vector3(c.vertices[0].x-s,-c.vertices[0].y+l,0).applyEuler(new fm.Euler(Math.PI/2,0,0,"XYZ")).add(new fm.Vector3(a,o+h,0)),d=u.getPoiTheme(i.type),p=this._materialManager.createPoiMaterial(d);e.x=c.vertices[0].x,e.y=c.vertices[0].y,e.height=h,e.pos=f,d.height&&(e.size=d.height),e.initSprite(p,(new fm.Vector3).copy(f)),this.checkMaterialAlpha(e._renderNode,n),e.setSize()}},{key:"everGroup",value:function(e,t){for(var n=0;ne);n++);}}]),e}(),u=l;t.default=u},function(e,t,n){"use strict";var r=n(253)(!0);n(122)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e){e.exports={}},function(e,t,n){var r=n(124),i=n(96);e.exports=function(e){return r(i(e))}},function(e,t,n){"use strict";var r=n(170),i=n(261),a=n(63),o=n(90);e.exports=n(171)(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,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e){e.exports={}},function(e,t,n){var r=n(98)("meta"),i=n(22),a=n(49),o=n(35).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(41)(function(){return l(Object.preventExtensions({}))}),c=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},h=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},f=function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},d=function(e){return u&&p.NEED&&l(e)&&!a(e,r)&&c(e),e},p=e.exports={KEY:r,NEED:!1,fastKey:h,getWeak:f,onFreeze:d}},function(e,t,n){n(269);for(var r=n(19),i=n(48),a=n(60),o=n(24)("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,I=function(e){return void 0===e?e:String(e)};n(102)("replace",2,function(i,a,w,b){return[function(e,t){var n=i(this),r=null==e?void 0:e[a];return void 0!==r?r.call(e,n,t):w.call(String(n),e,t)},function(e,t){var n=b(w,e,this,t);if(n.done)return n.value;var r=S(e),i=String(this),a="function"==typeof t;a||(t=String(t));var o=r.global;if(o){var s=r.unicode;r.lastIndex=0}for(var l=[];;){var u=L(r,i);if(null===u)break;if(l.push(u),!o)break;var c=String(u[0]);""===c&&(r.lastIndex=A(i,E(r.lastIndex),s))}for(var h="",f=0,d=0;d=e.y||s>=e.y&&ue.x&&(n=!n)}}return n}},{key:"isInCircle",value:function(e,t,n,r){if(e.xr[1])return!1;if(e.yr[3])return!1;var i=n*n,a=e.x,o=e.y,s=t.x,l=t.y,u=s-a,c=l-o,h=u*u+c*c;return hi||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,r){return!(Math.max(e.x,t.x)=t.y||a.y=t.y)&&(i.x<=t.x||a.x<=t.x)&&i.x+(t.y-i.y)/(a.y-i.y)*(a.x-i.x)=t.y||a.y=t.y)&&(i.x<=t.x||a.x<=t.x)){if(o=i.x+(t.y-i.y)/(a.y-i.y)*(a.x-i.x),Math.abs(o-t.x)<=V)return 2;o=t.y||a.y=t.y)&&(i.x<=t.x||a.x<=t.x)&&i.x+(t.y-i.y)/(a.y-i.y)*(a.x-i.x)i[1]&&t.x>i[1])return!1;if(e.yi[3]&&t.y>i[3])return!1;var a=r*r,o=e.x,s=e.y,l=t.x,u=t.y,c=n.x,h=n.y,f=l-o,d=u-s,p=f*f+d*d,m=c-o,v=h-s,g=m*m+v*v;if(z.isZero(p))return!!z.isZero(g)||gr[1]&&t.x>r[1])return!1;if(e.yr[3]&&t.y>r[3])return!1;var i=n.length;if(z.pointInPolygon2d(n,e,i))return!0;if(z.pointInPolygon2d(n,t,i))return!0;for(var a=0;ai[1]&&t.x>i[1])return null;if(e.yi[3]&&t.y>i[3])return null;var a={isContain:!1,crossPoints:[]},o=r*r,s=e.x,l=e.y,u=t.x,c=t.y,h=n.x,f=n.y,d=u-s,p=c-l,m=d*d+p*p,v=h-s,g=f-l,y=v*v+g*g,_=h-u,x=f-c,w=_*_+x*x;if(z.isZero(m))return(z.isZero(y)||yr[1]&&t.x>r[1])return null;if(e.yr[3]&&t.y>r[3])return null;var i={containType:0,crossPoints:[]},a=n.length;z.pointInPolygon2d(n,e,a)&&(i.containType|=1),z.pointInPolygon2d(n,t,a)&&(i.containType|=2);for(var o=[],s=0;so)return!1;var m=(p-f)/(d-h),v=m*(u-h)+f;return i.y=v,i.x=u,!(vo)return!1;var g=(p-f)/(d-h),y=g*(u-h)+f;return i.y=y,i.x=u,!(cthis._time){for(var r in this._left){var i=(this._right[r]-this._left[r])*(this._time-this._countTime)/this._time;this._result[r]+=i,n[r]=i}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 r=n(0);r(t,"__esModule",{value:!0}),t.mapOptionMessage=t.tileMessage=t.cerityMessage=void 0;var i={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=i;var a={noGroup:"目标楼层未初始化,请检查楼层id是否越界,或者等待楼层加载!",noFocus:"焦点层不在可视楼层中,请检查焦点层和可视楼层的参数设置!"};t.tileMessage=a;var o={defaultViewCenterError:"地图初始化中心位置错误,请检查fengmap.FMMap初始化参数defaultViewCenter的正确性"};t.mapOptionMessage=o},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 i=n(42);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e){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 r=a(29),i=a(162),o=a(127),s=a(125)("IE_PROTO"),l=function(){},u="prototype",c=function(){var e,t=a(112)("iframe"),n=o.length,r="<",i=">";for(t.style.display="none",a(164).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(r+"script"+i+"document.F=Object"+r+"/script"+i),e.close(),c=e.F;n--;)delete c[u][o[n]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(l[u]=r(e),n=new l,l[u]=null,n[s]=e):n=c(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(163),i=n(127);e.exports=Object.keys||function(e){return r(e,i)}},function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},function(e,t,n){var r=n(35).f,i=n(49),a=n(24)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){var r=n(22);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){"use strict";var r=n(28),i=n(53),a=n(76),o=n(155),c=n(77),s=n(23),l=n(91).f,u=n(115).f,h=n(38).f,f=n(332).trim,d="Number",p=r[d],m=p,v=p.prototype,g=a(n(130)(v))==d,y="trim"in String.prototype,_=function(e){var t=c(e,!1);if("string"==typeof t&&2b;b++)i(m,x=w[b])&&!i(p,x)&&h(p,x,u(m,x));p.prototype=v,v.constructor=p,n(43)(r,d,p)}},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var i={ZH:"zh",EN:"en",CHN:"zh"},a=i;t.default=a},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(2)),o=r(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){var a=n(114);e.exports=function(r,i,e){if(a(r),void 0===i)return r;switch(e){case 1:return function(e){return r.call(i,e)};case 2:return function(e,t){return r.call(i,e,t)};case 3:return function(e,t,n){return r.call(i,e,t,n)}}return function(){return r.apply(i,arguments)}}},function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(116),i=n(50);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(159),i=n(119).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(51),i=Math.max,a=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):a(e,t)}},function(e){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 r=n(36);e.exports=function(){var e=r(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 r=n(121),i=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 r=p(n),a=!f(function(){var e={};return e[r]=function(){return 7},7!=""[n](e)}),i=a?!f(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[r](""),!e}):void 0;if(!a||!i||"replace"===n&&!g||"split"===n&&!y){var o=/./[r],s=t(d,r,""[n],function(e,t,n,r,i){return t.exec===m?a&&!i?{done:!0,value:o.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),l=s[0],u=s[1];c(String.prototype,n,l),h(RegExp.prototype,r,2==e?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)})}}},function(e,t,n){for(var r=n(62),i=n(131),a=n(43),o=n(28),s=n(39),l=n(63),u=n(20),c=u("iterator"),h=u("toStringTag"),f=l.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(d),m=0;m"+i+""};e.exports=function(t,e){var n={};n[t]=e(a),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||3e.far||t.push({distance:c,point:f.clone(),uv:fm.Triangle.getUV(f,v,g,y,_,x,w,new fm.Vector2),face:null,object:h})}}}(o,e)}}]),n}(fm.Sprite),p=d;t.default=p},function(e,t,n){var r=n(22),i=n(19).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var i=n(22);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(156),i=n(89),a=n(90),o=n(77),s=n(53),l=n(157),u=Object.getOwnPropertyDescriptor;t.f=n(26)?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 i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(76);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(118)("keys"),i=n(78);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(93),i=n(28),a="__core-js_shared__",o=i[a]||(i[a]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(94)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(42),i=n(76),a=n(20)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==i(e))}},function(e){var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0";for(t.style.display="none",a(264).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(r+"script"+i+"document.F=Object"+r+"/script"+i),e.close(),c=e.F;n--;)delete c[u][o[n]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(l[u]=r(e),n=new l,l[u]=null,n[s]=e):n=c(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(159),i=n(119);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(38).f,i=n(53),a=n(20)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){var i=n(14),a=n(11),o=n(41);e.exports=function(e,t){var n=(a.Object||{})[e]||Object[e],r={};r[e]=t(n),i(i.S+i.F*o(function(){n(1)}),"Object",r)}},function(e,t,n){t.f=n(24)},function(e,t,n){var r=n(19),i=n(11),a=n(79),o=n(134),s=n(35).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=!a&&r.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 r=n(82);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(176)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var _=n(40),x=n(124),w=n(54),b=n(97),r=n(283);e.exports=function(h,e){var f=1==h,d=2==h,p=3==h,m=4==h,v=6==h,g=5==h||v,y=e||r;return function(e,t,n){for(var r,i,a=w(e),o=x(a),s=_(t,n,3),l=b(o.length),u=0,c=f?y(e,l):d?y(e,0):void 0;u>>=0,(i=0<=e&&e<256)&&(r=o[e],r)?r:(n=m(e,(0|e)<0?-1:0,!0),i&&(o[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=a[e],r)?r:(n=m(e,e<0?-1:0,!1),i&&(a[e]=n),n))}function p(e,t){if(isNaN(e)||!isFinite(e))return t?w:x;if(t){if(e<0)return w;if(g<=e)return P}else{if(e<=-y)return N;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=r,l.fromNumber=p,l.fromBits=m;var h=Math.pow;function f(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(N)?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(N)?N:this.not().add(b)},D.neg=D.negate,D.add=function(e){d(e)||(e=v(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,a=e.high>>>16,o=65535&e.high,s=e.low>>>16,l=65535&e.low,u=0,c=0,h=0,f=0;return f+=i+l,h+=f>>>16,f&=65535,h+=r+s,c+=h>>>16,h&=65535,c+=n+o,u+=c>>>16,c&=65535,u+=t+a,u&=65535,m(h<<16|f,u<<16|c,this.unsigned)},D.subtract=function(e){return d(e)||(e=v(e)),this.add(e.neg())},D.sub=D.subtract,D.multiply=function(e){if(this.isZero())return x;if(d(e)||(e=v(e)),e.isZero())return x;if(this.eq(N))return e.isOdd()?N:x;if(e.eq(N))return this.isOdd()?N: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,r=this.low>>>16,i=65535&this.low,a=e.high>>>16,o=65535&e.high,s=e.low>>>16,l=65535&e.low,u=0,c=0,h=0,f=0;return f+=i*l,h+=f>>>16,f&=65535,h+=r*l,c+=h>>>16,h&=65535,h+=i*s,c+=h>>>16,h&=65535,c+=n*l,u+=c>>>16,c&=65535,c+=r*s,u+=c>>>16,c&=65535,c+=i*o,u+=c>>>16,c&=65535,u+=t*l+n*s+r*o+i*a,u&=65535,m(h<<16|f,u<<16|c,this.unsigned)},D.mul=D.multiply,D.divide=function(e){if(d(e)||(e=v(e)),e.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?w:x;var t,n,r;if(this.eq(N)){if(e.eq(b)||e.eq(S))return N;if(e.eq(N))return b;var i=this.shr(1);return t=i.div(e).shl(1),t.eq(x)?e.isNegative()?b:S:(n=this.sub(e.mul(t)),r=t.add(n.div(e)),r)}if(e.eq(N))return this.unsigned?w: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(r=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:h(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=b),r=r.add(s),n=n.sub(l)}return r},D.div=D.divide,D.modulo=function(e){return d(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 d(e)||(e=v(e)),m(this.low&e.low,this.high&e.high,this.unsigned)},D.or=function(e){return d(e)||(e=v(e)),m(this.low|e.low,this.high|e.high,this.unsigned)},D.xor=function(e){return d(e)||(e=v(e)),m(this.low^e.low,this.high^e.high,this.unsigned)},D.shiftLeft=function(e){return d(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(d(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,r){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===n&&(n=e.DEFAULT_ENDIAN),void 0===r&&(r=e.DEFAULT_NOASSERT),!r){if(t|=0,t<0)throw RangeError("Illegal capacity");n=!!n,r=!!r}this.buffer=0===t?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=r};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,k.default)(F,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var B=new ArrayBuffer(0),U=String.fromCharCode;function G(e){var t=0;return function(){return t>1,c=-7,h=n?i-1:0,f=n?-1:1,d=e[t+h];for(h+=f,a=d&(1<<-c)-1,d>>=-c,c+=s;0>=-c,c+=r;0>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?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=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=1<=o+h?f/l:f*Math.pow(2,1-h),2<=t*l&&(o++,l/=2),c<=o+h?(s=0,o=c):1<=o+h?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));8<=i;e[n+d]=255&s,d+=p,s/=256,i-=8);for(o=o<>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r,i=t,a=e.length,o=a>>3,s=0;for(t+=this.writeVarint32(a,t);o--;)r=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(r,t++);if(s>3,o=0,s=[];for(e+=r.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 r=this.slice(t,t+e);return n&&(this.offset+=e),r},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 r=this.buffer.byteLength;return rt?r: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 r=this.buffer.byteLength;return rt?r: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 r=this.buffer.byteLength;return rt?r:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},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 r=this.buffer.byteLength;return rt?r:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),n&&(this.offset+=2),this},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 r=this.buffer.byteLength;return rt?r:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},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 r=this.buffer.byteLength;return rt?r:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),n&&(this.offset+=4),this},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 r=this.buffer.byteLength;rt?r:t),t-=8;var i=e.low,a=e.high;return 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,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]=i>>>24&255,this.view[t+1]=i>>>16&255,this.view[t+2]=i>>>8&255,this.view[t+3]=255&i),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,r=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,r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0):(r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var i=new l(n,r,!1);return t&&(this.offset+=8),i},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 r=this.buffer.byteLength;rt?r:t),t-=8;var i=e.low,a=e.high;return 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,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]=i>>>24&255,this.view[t+1]=i>>>16&255,this.view[t+2]=i>>>8&255,this.view[t+3]=255&i),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,r=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,r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0):(r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var i=new l(n,r,!0);return t&&(this.offset+=8),i},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 r=this.buffer.byteLength;return rt?r: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 r=this.buffer.byteLength;return rt?r: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 r,i=O.calculateVarint32(e);t+=i;var a=this.buffer.byteLength;for(at?a:t),t-=i,e>>>=0;128<=e;)r=127&e|128,this.view[t++]=r,e>>>=7;return this.view[t++]=e,n?(this.offset=t,this):i},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,r=0,i=0;do{if(!this.noAssert&&e>this.limit){var a=Error("Truncated");throw a.truncated=!0,a}n=this.view[e++],r<5&&(i|=(127&n)<<7*r),++r}while(0!=(128&n));return i|=0,t?(this.offset=e,i):{value:i,length:r}},F.readVarint32ZigZag=function(e){var t=this.readVarint32(e);return"object"===(0,C.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,r=e.shiftRightUnsigned(56).toInt()>>>0;return 0==r?0==n?t<16384?t<128?1:2:t<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:r<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 r=O.calculateVarint64(e),i=e.toInt()>>>0,a=e.shiftRightUnsigned(28).toInt()>>>0,o=e.shiftRightUnsigned(56).toInt()>>>0;t+=r;var s=this.buffer.byteLength;switch(st?s:t),t-=r,r){case 10:this.view[t+9]=o>>>7&1;case 9:this.view[t+8]=9!==r?128|o:127&o;case 8:this.view[t+7]=8!==r?a>>>21|128:a>>>21&127;case 7:this.view[t+6]=7!==r?a>>>14|128:a>>>14&127;case 6:this.view[t+5]=6!==r?a>>>7|128:a>>>7&127;case 5:this.view[t+4]=5!==r?128|a:127&a;case 4:this.view[t+3]=4!==r?i>>>21|128:i>>>21&127;case 3:this.view[t+2]=3!==r?i>>>14|128:i>>>14&127;case 2:this.view[t+1]=2!==r?i>>>7|128:i>>>7&127;case 1:this.view[t]=1!==r?128|i:127&i}return n?(this.offset+=r,this):r},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,r=0,i=0,a=0,o=0;if(o=this.view[e++],r=127&o,128&o&&(o=this.view[e++],r|=(127&o)<<7,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],r|=(127&o)<<14,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],r|=(127&o)<<21,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],i=127&o,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],i|=(127&o)<<7,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],i|=(127&o)<<14,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],i|=(127&o)<<21,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],a=127&o,(128&o||this.noAssert&&void 0===o)&&(o=this.view[e++],a|=(127&o)<<7,128&o||this.noAssert&&void 0===o))))))))))throw Error("Buffer overrun");var s=l.fromBits(r|i<<28,i>>>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 r,i=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(r=0;r>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}i=Y.calculateUTF16asUTF8(G(e))[1],t+=i+1;var a=this.buffer.byteLength;return at?a:t),t-=i+1,Y.encodeUTF16toUTF8(G(e),function(e){this.view[t++]=e}.bind(this)),this.view[t++]=0,n?(this.offset=t,this):i},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,r=e,i=-1;return Y.decodeUTF8toUTF16(function(){if(0===i)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return i=this.view[e++],0===i?null:i}.bind(this),n=z(),!0),t?(this.offset=e,n()):{string:n(),length:e-r}},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 r,i=t;r=Y.calculateUTF16asUTF8(G(e),this.noAssert)[1],t+=4+r;var a=this.buffer.byteLength;if(at?a:t),t-=4+r,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):(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),t+=4,Y.encodeUTF16toUTF8(G(e),function(e){this.view[t++]=e}.bind(this)),t!==i+4+r)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+r));return n?(this.offset=t,this):t-i},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,r=this.readUint32(e),i=this.readUTF8String(r,O.METRICS_BYTES,e+=4);return e+=i.length,t?(this.offset=e,i.string):{string:i.string,length:e-n}},O.METRICS_CHARS="c",O.METRICS_BYTES="b",F.writeUTF8String=function(e,t){var n,r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var i=t;n=Y.calculateUTF16asUTF8(G(e))[1],t+=n;var a=this.buffer.byteLength;return at?a:t),t-=n,Y.encodeUTF16toUTF8(G(e),function(e){this.view[t++]=e}.bind(this)),r?(this.offset=t,this):t-i},F.writeString=F.writeUTF8String,O.calculateUTF8Chars=function(e){return Y.calculateUTF16asUTF8(G(e))[0]},O.calculateUTF8Bytes=function(e){return Y.calculateUTF16asUTF8(G(e))[1]},O.calculateString=O.calculateUTF8Bytes,F.readUTF8String=function(e,t,n){"number"==typeof t&&(n=t,t=void 0);var r=void 0===n;if(r&&(n=this.offset),void 0===t&&(t=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 i,a=0,o=n;if(t===O.METRICS_CHARS){if(i=z(),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 r,i,a=t;r=Y.calculateUTF16asUTF8(G(e),this.noAssert)[1],i=O.calculateVarint32(r),t+=i+r;var o=this.buffer.byteLength;if(ot?o:t),t-=i+r,t+=this.writeVarint32(r,t),Y.encodeUTF16toUTF8(G(e),function(e){this.view[t++]=e}.bind(this)),t!==a+r+i)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+r+i));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,r=this.readVarint32(e),i=this.readUTF8String(r.value,O.METRICS_BYTES,e+=r.length);return e+=i.length,t?(this.offset=e,i.string):{string:i.string,length:e-n}},F.append=function(e,t,n){"number"!=typeof t&&"string"==typeof t||(n=t,t=void 0);var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof O||(e=O.wrap(e,t));var i=e.limit-e.offset;if(i<=0)return this;n+=i;var a=this.buffer.byteLength;return an?a:n),n-=i,this.view.set(e.view.subarray(e.offset,e.limit),n),e.offset+=i,r&&(this.offset+=i),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 r=new ArrayBuffer(n),i=new Uint8Array(r);return i.set(this.view.subarray(e,t)),this.buffer=r,this.view=i,0<=this.markedOffset&&(this.markedOffset-=e),this.offset=0,this.limit=n,this},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,r=new O(n,this.littleEndian,this.noAssert);return r.offset=0,r.limit=n,0<=r.markedOffset&&(r.markedOffset-=e),this.copyTo(r,0,e,t),r},F.copyTo=function(e,t,n,r){var i,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=(i=void 0===n)?this.offset:0|n,r=void 0===r?this.limit:0|r,t<0||t>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+t+" <= "+e.buffer.byteLength);if(n<0||r>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var o=r-n;return 0===o?e:(e.ensureCapacity(t+o),e.view.set(this.view.subarray(n,r),t),i&&(this.offset+=o),a&&(e.offset+=o),this)},F.ensureCapacity=function(e){var t=this.buffer.byteLength;return te?t:e):this},F.fill=function(e,t,n){var r=void 0===t;if(r&&(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 r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof O||(e=O.wrap(e,t));var i=e.limit-e.offset;if(i<=0)return this;var a=i-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 r=new ArrayBuffer(n-t);return new Uint8Array(r).set(new Uint8Array(this.buffer).subarray(t,n),0),r},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 W=function(){for(var e={},i=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],o=[],t=0,n=i.length;t>2&63]),r=(3&n)<<4,null!==(n=e())?(r|=n>>4&15,t(i[63&(r|n>>4&15)]),r=(15&n)<<2,null!==(n=e())?(t(i[63&(r|n>>6&3)]),t(i[63&n])):(t(i[63&r]),t(61))):(t(i[63&r]),t(61),t(61))},e.decode=function(e,t){var n,r,i;function a(e){throw Error("Illegal character code: "+e)}for(;null!==(n=e());)if(r=o[n],void 0===r&&a(n),null!==(n=e())&&(i=o[n],void 0===i&&a(n),t(r<<2>>>0|(48&i)>>4),null!==(n=e()))){if(r=o[n],void 0===r){if(61===n)break;a(n)}if(t((15&i)<<4>>>0|(60&r)>>2),null!==(n=e())){if(i=o[n],void 0===i){if(61===n)break;a(n)}t((3&r)<<6>>>0|i)}}},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},e}();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":i+=n===this.markedOffset?"'":e||0!==n&&n!==r?" ":""}if(e&&" "!==i){for(;i.length<51;)i+=" ";o+=i+a+"\n"}return e?o:i},O.fromDebug=function(e,t,n){for(var r,i,a=e.length,o=new O((a+1)/3|0,t,n),s=0,l=0,u=!1,c=!1,h=!1,f=!1,d=!1;s":if(!n){if(f){d=!0;break}f=!0}o.limit=l,u=!1;break;case"'":if(!n){if(h){d=!0;break}h=!0}o.markedOffset=l,u=!1;break;case" ":u=!1;break;default:if(!n&&u){d=!0;break}if(i=(0,I.default)(r+e.charAt(s++),16),!n&&(isNaN(i)||i<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,r=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,r,i,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===(r=e())&&o([n,r]),t((31&n)<<6|63&r);else if(224==(240&n))null!==(r=e())&&null!==(i=e())||o([n,r,i]),t((15&n)<<12|(63&r)<<6|63&i);else{if(240!=(248&n))throw RangeError("Illegal starting byte: "+n);null!==(r=e())&&null!==(i=e())&&null!==(a=e())||o([n,r,i,a]),t((7&n)<<18|(63&r)<<12|(63&i)<<6|63&a)}},UTF16toUTF8:function(e,t){for(var n,r=null;null!==(n=null!==r?r:e());)55296<=n&&n<=57343&&null!==(r=e())&&56320<=r&&r<=57343?(t(1024*(n-55296)+r-56320+65536),r=null):t(n);null!==r&&t(r)},UTF8toUTF16:function(e,t){var n=null;for("number"==typeof e&&(n=e,e=function(){return null});null!==n||null!==(n=e());)n<=65535?t(n):(n-=65536,t(55296+(n>>10)),t(n%1024+56320)),n=null},encodeUTF16toUTF8:function(e,t){j.UTF16toUTF8(e,function(e){j.encodeUTF8(e,t)})},decodeUTF8toUTF16:function(e,t){j.decodeUTF8(e,function(e){j.UTF8toUTF16(e,t)})},calculateCodePoint:function(e){return e<128?1:e<2048?2:e<65536?3:4},calculateUTF8:function(e){for(var t,n=0;null!==(t=e());)n+=t<128?1:t<2048?2:t<65536?3:4;return n},calculateUTF16asUTF8:function(e){var t=0,n=0;return j.UTF16toUTF8(e,function(e){++t,n+=e<128?1:e<2048?2:e<65536?3:4}),[t,n]}},j);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(i,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 r=this.index;o.DELIM.lastIndex=0;var i=o.DELIM.test(this.source.charAt(r++));if(!i)for(;r"),r=this.tn.next(),!o.NAME.test(r))throw Error("illegal message field name: "+r);i.name=r,this.tn.skip("="),i.id=s(this.tn.next()),r=this.tn.peek(),"["===r&&this._parseFieldOptions(i),this.tn.skip(";")}else if(n=void 0!==n?n:this.tn.next(),"group"===n){var a=this._parseMessage(e,i);if(!/^[A-Z]/.test(a.name))throw Error("illegal group name: "+a.name);i.type=a.name,i.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(i.type=n,r=this.tn.next(),!o.NAME.test(r))throw Error("illegal message field name: "+r);i.name=r,this.tn.skip("="),i.id=s(this.tn.next()),r=this.tn.peek(),"["===r&&this._parseFieldOptions(i),this.tn.skip(";")}return e.fields.push(i),i},a._parseMessageOneOf=function(e){var t=this.tn.next();if(!o.NAME.test(t))throw Error("illegal oneof name: "+t);var n,r=t,i=[];for(this.tn.skip("{");"}"!==(t=this.tn.next());)n=this._parseMessageField(e,"optional",t),n.oneof=r,i.push(n.id);this.tn.omit(";"),e.oneofs[r]=i},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 r={name:n,id:s(this.tn.next(),!0)};n=this.tn.peek(),"["===n&&this._parseFieldOptions({options:{}}),this.tn.skip(";"),t.values.push(r)}this.tn.omit(";"),e.enums.push(t)},a._parseExtensionRanges=function(){var e,t,n,r=[];do{for(t=[];;){switch(e=this.tn.next(),e){case"min":n=i.ID_MIN;break;case"max":n=i.ID_MAX;break;default:n=l(e)}if(t.push(n),2===t.length)break;if("to"!==this.tn.peek()){t.push(n);break}this.tn.next()}r.push(t)}while(this.tn.omit(","));return this.tn.skip(";"),r},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=r,e}(ne,ne.Lang),ne.Reflect=function(m){var o={},c=function(e,t,n){this.builder=e,this.parent=t,this.name=n,this.className},e=c.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=c;var s=function(e,t,n,r,i){c.call(this,e,t,n),this.className="Namespace",this.children=[],this.options=r||{},this.syntax=i||"proto2"},t=s.prototype=(0,L.default)(c.prototype);t.getChildren=function(e){if(e=e||null,null==e)return this.children.slice();for(var t=[],n=0,r=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){r((0,C.default)(t),e.message)}else r((0,C.default)(t),"requires Long.js");case m.TYPES.uint64:case m.TYPES.fixed64:if(m.Long)try{return l(t,!0)}catch(e){r((0,C.default)(t),e.message)}else r((0,C.default)(t),"requires Long.js");case m.TYPES.bool:return"boolean"!=typeof t&&r((0,C.default)(t),"not a boolean"),t;case m.TYPES.float:case m.TYPES.double:return"number"!=typeof t&&r((0,C.default)(t),"not a number"),t;case m.TYPES.string:return"string"==typeof t||t&&t instanceof String||r((0,C.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(i=e.readVarint32(),e.remaining()>>3;switch(r){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(i,t);break;case m.WIRE_TYPES.ENDGROUP:if(i===e)return!1;throw Error("Illegal GROUPEND after unknown group: "+i+" ("+e+" expected)");case m.WIRE_TYPES.BITS32:t.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+e+": "+r)}return!0}i.build=function(e){if(this.clazz&&!e)return this.clazz;var t=function(h,o){var s=o.getChildren(h.Reflect.Message.Field),l=o.getChildren(h.Reflect.Message.OneOf),r=function e(t){h.Builder.Message.call(this);for(var n=0,r=l.length;n>>3,i===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(i,e));else if(o.map){var u=o.decode(i,e);l[o.name].set(u[0],u[1])}else if(l[o.name]=o.decode(i,e),o.oneof){var c=l[o.oneof.name];null!==c&&c!==o.name&&(l[c]=null),l[o.oneof.name]=o.name}}else switch(i){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 h=e.readVarint32();e.offset+=h;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: "+i)}}for(var f=0,d=this._fields.length;f>>3;if(1===c)s=this.keyElement.decode(l,e,c);else{if(2!==c)throw Error("Unexpected tag in map field key/value submessage");r=this.element.decode(l,e,c)}}return[s,r]}return this.element.decode(t,e,this.id)},o.Message.Field=u;var d=function(e,t,n,r,i,a,o){u.call(this,e,t,n,null,r,i,a,o),this.extension};d.prototype=(0,L.default)(u.prototype),o.Message.ExtensionField=d;var p=function(e,t,n){c.call(this,e,t,n),this.fields=[]};o.Message.OneOf=p;var g=function(e,t,n,r,i){s.call(this,e,t,n,r,i),this.className="Enum",this.object=null};g.getName=function(e,t){for(var n,r=(0,A.default)(e),i=0;i=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 r=new J.Message.ExtensionField(this,a,t.rule,t.type,this.ptr.fqn()+"."+e,t.id,t.options),i=new J.Extension(this,this.ptr,t.name,r);r.extension=i,this.ptr.addChild(i),a.addChild(r)},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(198).resolve(e)),!0===this.files[e])return this.reset();this.files[e]=!0}else if("object"===(0,C.default)(e)){var r=e.root;X.Util.IS_NODE&&(r=oe(198).resolve(r)),(0<=r.indexOf("\\")||0<=e.file.indexOf("\\"))&&(n="\\");var i=r+n+e.file;if(!0===this.files[i])return this.reset();this.files[i]=!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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}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,r=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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}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,r=new Array(t);ni;)o(r,n=t[i++])&&(~l(a,n)||a.push(n));return a}},function(e,t,n){var l=n(90),u=n(37),c=n(92);e.exports=function(s){return function(e,t,n){var r,i=l(e),a=u(i.length),o=c(n,a);if(s&&t!=t){for(;oi;)o(r,n=t[i++])&&(~l(a,n)||a.push(n));return a}},function(e,t,n){var r=n(19).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(49),i=n(54),a=n(125)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(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(29);e.exports=function(t,e,n,r){try{return r?e(a(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&a(i.call(t)),e}}},function(e,t,n){var r=n(60),i=n(24)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},function(e,t,n){var a=n(24)("iterator"),o=!1;try{var r=[7][a]();r.return=function(){o=!0},Array.from(r,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var r=[7],i=r[a]();i.next=function(){return{done:n=!0}},r[a]=function(){return i},e(r)}catch(e){}return n}},function(e,t,n){"use strict";var l=n(36),u=n(259),c=n(100);n(102)("search",1,function(r,i,o,s){return[function(e){var t=r(this),n=null==e?void 0:e[i];return void 0!==n?n.call(e,t):new RegExp(e)[i](String(t))},function(e){var t=s(o,e,this);if(t.done)return t.value;var n=l(e),r=String(this),i=n.lastIndex;u(i,0)||(n.lastIndex=0);var a=c(n,r);return u(n.lastIndex,i)||(n.lastIndex=i),null===a?-1:a.index}]})},function(e,t,n){var r=n(20)("unscopables"),i=Array.prototype;null==i[r]&&n(39)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){"use strict";var _=n(94),x=n(27),w=n(43),b=n(39),M=n(63),S=n(262),E=n(132),T=n(172),A=n(20)("iterator"),L=!([].keys&&"next"in[].keys()),R="@@iterator",C="keys",I="values",k=function(){return this};e.exports=function(e,t,n,r,i,a,o){S(n,t,r);var s,l,u,c=function(e){if(!L&&e in p)return p[e];switch(e){case C:case I:return function(){return new n(this,e)}}return function(){return new n(this,e)}},h=t+" Iterator",f=i==I,d=!1,p=e.prototype,m=p[A]||p[R]||i&&p[i],v=m||c(i),g=i?f?c("entries"):v:void 0,y="Array"==t&&p.entries||m;if(y&&(u=T(y.call(new e)),u!==Object.prototype&&u.next&&(E(u,h,!0),_||"function"==typeof u[A]||b(u,A,k))),f&&m&&m.name!==I&&(d=!0,v=function(){return m.call(this)}),_&&!o||!L&&!d&&p[A]||b(p,A,v),M[t]=v,M[h]=k,i)if(s={values:f?v:c(I),keys:a?v:c(C),entries:g},o)for(l in s)l in p||w(p,l,s[l]);else x(x.P+x.F*(L||d),t,s);return s}},function(e,t,n){var r=n(53),i=n(44),a=n(117)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(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 r=n(163),i=n(127).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(104),i=n(75),a=n(61),o=n(113),s=n(49),l=n(153),u=Object.getOwnPropertyDescriptor;t.f=n(30)?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 i(!r.f.call(e,t),e[t])}},function(e,t,n){var l=n(51),u=n(50);e.exports=function(s){return function(e,t){var n,r,i=String(u(e)),a=l(t),o=i.length;return a<0||o<=a?s?"":void 0:(n=i.charCodeAt(a),n<55296||56319=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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function W(e,t){if(e){if("string"==typeof e)return j(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)?j(e,t):void 0}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nthis.MapOptions.modelHoverTime){if(!this._enterControl.enableMapHover)return;if(!this._lastMoveEvent)return;var t=this._lastMoveEvent,n=t.mousePoint,r={x:2*n.x/n.w-1,y:1-2*n.y/n.h},i=this.nodeManager.getNode(this._currentSceneId,this.getVisibleGroups(),r,this.renderer.getCameraByViewMode(this._viewMode)),a=this.nodeManager.getFacility(this._currentSceneId,this.getVisibleGroups(),r,this.renderer.getCameraByViewMode(this._viewMode));if(i.length<1&&a.length<1)return;if(i[0]){var o=(new fm.Vector3).copy(i[0].point),s={type:"mapHoverNode",target:i[0].object.mapNode,mouse:n,eventInfo:{domEvent:t.event,threeCoord:i[0].point,eventID:t.eventID,coord:{x:o.x+this.center.x,y:i[0].object.mapNode.y-o.z}},groupID:i[0].object.mapNode.groupID,nodeType:i[0].object.mapNode.nodeType};if(this.hoverFilterFunction){var l=this.hoverFilterFunction({nodeType:i[0].object.mapNode.nodeType,typeID:i[0].object.mapNode.bdata&&i[0].object.mapNode.bdata.type,data:i[0].object.mapNode.bdata});l&&(i[0].object.mapNode.nodeType===N.default.MODEL&&this.MapOptions.modelHoverEffect&&this.storeSelect(i[0].object),this.dispatchEvent(s))}else i[0].object.mapNode.nodeType===N.default.MODEL&&this.MapOptions.modelHoverEffect&&this.storeSelect(i[0].object),this.dispatchEvent(s)}if(a[0]){var u=(new fm.Vector3).copy(a[0].point),c={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 h=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});h&&this.dispatchEvent(c)}else this.dispatchEvent(c)}this._mouseHoverStart=!1,this._mouseHoverTime=0}else this._mouseHoverTime+=e}},{key:"selectNull",value:function(){if(C.default[this.uuid].currentModel){C.default[this.uuid].currentAnimater&&(C.default[this.uuid].currentAnimater.stop(),C.default[this.uuid].currentAnimater=void 0);var e=C.default[this.uuid].currentModel;e.material.color=C.default[this.uuid].currentModel.material.userData.color,e.material.opacity=C.default[this.uuid].currentModel.material.userData.opacity,e.material.userData.opacity=void 0,e.material.userData.color=void 0,e.material.update=!0,C.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===N.default.MODEL){if(!e.renderNodeInited)return;n=e.renderNode}if(C.default[this.uuid].currentModel&&C.default[this.uuid].currentModel!==n)if(C.default[this.uuid].currentAnimater&&(C.default[this.uuid].currentAnimater.stop(),C.default[this.uuid].currentAnimater=void 0),void 0===C.default[this.uuid].currentModel.material.length)C.default[this.uuid].currentModel.material.color=C.default[this.uuid].currentModel.material.userData.color,C.default[this.uuid].currentModel.material.opacity=C.default[this.uuid].currentModel.material.userData.opacity,C.default[this.uuid].currentModel.material.update=!0;else for(var r=0;rthis.mapScaleLevels[0])return 1;if(e=this.mapScaleLevels[t+1]&&e<=this.mapScaleLevels[t]){var n=e-this.mapScaleLevels[t+1],r=this.mapScaleLevels[t]-e;return no/f?o/(t.x-e.x):f/(t.y-e.y);var s=r.x-o/2,p=r.y-f/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*d,f*d,o*(d-1)/2+s*d,f*(d-1)/2+p*d,o,f):this.renderer.orthographicCamera.setViewOffset(o*d,f*d,o*(d-1)/2+s*d,f*(d-1)/2+p*d,o,f),this.renderer.update(),v.width=c*d*_,v.height=h*d*_,v.style.width=c*d*_+"px",v.style.height=h*d*_+"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=h*Math.pow(1.414,l-1),y.width=c*Math.pow(1.414,l-1),y.style.height=h*Math.pow(1.414,l-1)+"px",y.style.width=c*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 w=v.getContext("2d"),b=g.getContext("2d"),M=y.getContext("2d"),S=this;x.onload=function(){S.viewMode,w.drawImage(x,-(o*_-c*d*_)/2,-(f*_-h*d*_)/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)/(c*d),1754*Math.pow(1.414,l-1)/(h*d)),t=(g.width-c*d*e)/2,n=(g.height-h*d*e)/2;b.drawImage(s,t,n,c*d*e,h*d*e),M.drawImage(s,0,0,c*Math.pow(1.414,l-1),h*Math.pow(1.414,l-1));var r=g.toDataURL("image/png"),i=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,d.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}}]),c}(P.default),J=Z;t.default=J},function(e){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e){function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>=1;return n},y=function(e,t,n){var r;for(r=0;r<4;r++)e[0+r]^=t[16*n+4*r],e[4+r]^=t[16*n+4*r+1],e[8+r]^=t[16*n+4*r+2],e[12+r]^=t[16*n+4*r+3]},_=function(e){var t,n,r,i;for(t=1;t<4;t++)for(r=0;r>4,i=15&e[4*t+n],e[4*t+n]=o[16*r+i]},w=function(e){var t;for(t=0;t<4;t++)e[t]=a[16*((240&e[t])>>4)+(15&e[t])]},b=function(e){return(0,s.default)(e,16)},{decryption:function(e,t){var n,r=Array(16);for(n=0;n<16;n++)r[n]=16*b(t.substr(2*n,1))+b(t.substr(2*n+1,1));var i=Array(16);for(n=0;n<16;n++)i[n]=16*b(e.substr(2*n,1))+b(e.substr(2*n+1,1));var a=Array(16);switch(n=[],r.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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}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,r=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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function w(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,r=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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function M(e,t){if(e){if("string"==typeof e)return S(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)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=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 r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0,n(5),n(4);var a=r(n(6));n(46);var o=r(n(2)),s=r(n(7)),l=r(n(8)),u=r(n(9));function c(r){return function(){var e,t=(0,l.default)(r);if(h()){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 h(){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 f=function(e){(0,u.default)(i,e);var r=c(i);function i(){var e;(0,o.default)(this,i),e=r.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 i}(fm.BufferGeometry),d=f;t.default=d},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var p=r(n(68));n(56);var a=r(n(32)),o=r(n(55));n(46),n(186),n(141),n(187),n(188);var s=r(n(69));n(66),n(144),n(103),n(62),n(4),n(386);var m=r(n(13)),g=r(n(387));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(142),l.prototype={constructor:l,crossOrigin:"anonymous",load:function(n,r,e,t){var i,a=this;i=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,i,function(e){r(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,r){var i,a={};if("string"==typeof e)i=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(r&&r(e))}i=a[v.KHR_BINARY_GLTF].content}else i=fm.LoaderUtils.decodeText(new Uint8Array(e))}var s=JSON.parse(i);if(void 0===s.asset||s.asset.version[0]<2)r&&r(new Error("fm.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead."));else{if(s.extensionsUsed)for(var l=0;l",o).replace("#include ",s).replace("#include ",l).replace("#include ",u).replace("#include ",c);delete a.roughness,delete a.metalness,delete a.roughnessMap,delete a.metalnessMap,a.specular={value:(new fm.Color).setHex(1118481)},a.glossiness={value:.5},a.specularMap={value:null},a.glossinessMap={value:null},e.vertexShader=i.vertexShader,e.fragmentShader=h,e.uniforms=a,e.defines={STANDARD:""},e.color=new fm.Color(1,1,1),e.opacity=1;var f=[];if((0,m.default)(r.diffuseFactor)){var d=r.diffuseFactor;e.color.fromArray(d),e.opacity=d[3]}if(void 0!==r.diffuseTexture&&f.push(n.assignTexture(e,"map",r.diffuseTexture)),e.emissive=new fm.Color(0,0,0),e.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,e.specular=new fm.Color(1,1,1),(0,m.default)(r.specularFactor)&&e.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var p=r.specularGlossinessTexture;f.push(n.assignTexture(e,"glossinessMap",p)),f.push(n.assignTexture(e,"specularMap",p))}return g.default.all(f)},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,r=0,i=n.length;rn[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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}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,r=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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}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,r=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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}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,r=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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function x(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,r=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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}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,r=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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function b(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,r=new Array(t);n\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 r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0,n(5),n(4);var a=r(n(6));n(46);var o=r(n(2)),s=r(n(3)),l=r(n(7)),u=r(n(8)),c=r(n(9)),h=r(n(238));function f(r){return function(){var e,t=(0,u.default)(r);if(d()){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 d(){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,c.default)(n,e);var t=f(n);function n(){var e;return(0,o.default)(this,n),e=t.call(this),e.type="LineGeometry",e.isLineGeometry=!0,e}return(0,s.default)(n,[{key:"setPositions",value:function(e){for(var t=e.length-3,n=new Float32Array(2*t),r=0;rr&&(this._minRadius=r)}}}},{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}(),h=s;t.default=h},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0,n(10);var a=r(n(2)),o=function e(){(0,a.default)(this,e),this.circle,this.polygon,this.eName,this.FID,this.groupID,this.ID,this.keyword,this.name,this.typeID,this.nodeType,this.startPoint,this.pathPoins,this.bufferRadius},s=o;t.default=s},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var G=r(n(25));n(21),n(5),n(4);var z=r(n(13)),V=r(n(31));n(10);var a=r(n(2)),o=r(n(3)),s=function(){function t(e){(0,a.default)(this,t),this._data=e,this.Graphics=new fengmap.inner.Graphics}return(0,o.default)(t,[{key:"check2",value:function(e,t,n,r,i,a,o){var s,l,u="",c="",h="";n.name&&(u=n.name),n.eName&&(c=n.eName),n.keyword&&(h=n.keyword),n.circle&&(s=n.circle),n.polygon&&(l=2>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&r]+a[r>>8&255]+a[r>>16&255]+a[r>>24&255];return i.toUpperCase()}}(),clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:n<=e?1:(e=(e-t)/(n-t),e*e*(3-2*e))},smootherstep:function(e,t,n){return e<=t?0:n<=e?1:(e=(e-t)/(n-t),e*e*e*(e*(6*e-15)+10))},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*Cn.DEG2RAD},radToDeg:function(e){return e*Cn.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 In(e,t){this.x=e||0,this.y=t||0}function kn(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._w=void 0!==r?r:1}function Pn(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}function Nn(){this.elements=[1,0,0,0,1,0,0,0,1],0ie.default){var _=Math.sqrt(y),x=Math.atan2(_,v*g);m=Math.sin(m*x)/_,o=Math.sin(o*x)/_}var w=o*g;if(s=s*m+h*w,l=l*m+f*w,u=u*m+d*w,c=c*m+p*w,m===1-o){var b=1/Math.sqrt(s*s+l*l+u*u+c*c);s*=b,l*=b,u*=b,c*=b}}e[t]=s,e[t+1]=l,e[t+2]=u,e[t+3]=c}}),(0,u.default)(kn.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)(kn.prototype,{isQuaternion:!0,set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,a=e.order,o=Math.cos,s=Math.sin,l=o(n/2),u=o(r/2),c=o(i/2),h=s(n/2),f=s(r/2),d=s(i/2);return"XYZ"===a?(this._x=h*u*c+l*f*d,this._y=l*f*c-h*u*d,this._z=l*u*d+h*f*c,this._w=l*u*c-h*f*d):"YXZ"===a?(this._x=h*u*c+l*f*d,this._y=l*f*c-h*u*d,this._z=l*u*d-h*f*c,this._w=l*u*c+h*f*d):"ZXY"===a?(this._x=h*u*c-l*f*d,this._y=l*f*c+h*u*d,this._z=l*u*d+h*f*c,this._w=l*u*c-h*f*d):"ZYX"===a?(this._x=h*u*c-l*f*d,this._y=l*f*c+h*u*d,this._z=l*u*d-h*f*c,this._w=l*u*c+h*f*d):"YZX"===a?(this._x=h*u*c+l*f*d,this._y=l*f*c+h*u*d,this._z=l*u*d-h*f*c,this._w=l*u*c-h*f*d):"XZY"===a&&(this._x=h*u*c-l*f*d,this._y=l*f*c-h*u*d,this._z=l*u*d+h*f*c,this._w=l*u*c+h*f*d),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,r=n[0],i=n[4],a=n[8],o=n[1],s=n[5],l=n[9],u=n[2],c=n[6],h=n[10],f=r+s+h;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=r,this.normalize()},angleTo:function(e){return 2*Math.acos(Math.abs(Cn.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);if(0===n)return this;var r=Math.min(1,t/n);return this.slerp(e,r),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,l=t._z,u=t._w;return this._x=n*u+a*o+r*l-i*s,this._y=r*u+a*s+i*o-n*l,this._z=i*u+a*l+n*s-r*o,this._w=a*u-n*o-r*s-i*l,this._onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,a=this._w,o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),1<=o)return this._w=a,this._x=n,this._y=r,this._z=i,this;var s=1-o*o;if(s<=ie.default){var l=1-t;return this._w=l*a+t*this._w,this._x=l*n+t*this._x,this._y=l*r+t*this._y,this._z=l*i+t*this._z,this.normalize(),this._onChangeCallback(),this}var u=Math.sqrt(s),c=Math.atan2(u,o),h=Math.sin((1-t)*c)/u,f=Math.sin(t*c)/u;return this._w=a*h+this._w*f,this._x=n*h+this._x*f,this._y=r*h+this._y*f,this._z=i*h+this._z*f,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 kn,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:(Tn=new kn,function(e,t){return this.applyQuaternion(Tn.setFromAxisAngle(e,t))}),applyMatrix3:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,l=s*t+a*r-o*n,u=s*n+o*t-i*r,c=s*r+i*n-a*t,h=-i*t-a*n-o*r;return this.x=l*s+h*-i+u*-o-c*-a,this.y=u*s+h*-a+c*-i-l*-o,this.z=c*s+h*-o+l*-a-u*-i,this},project:function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)},unproject:function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)},transformDirection:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this},clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*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:(Sn=new Pn,function(e){return this.sub(Sn.copy(e).multiplyScalar(2*this.dot(e)))}),angleTo:function(e){var t=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq());return Math.acos(Cn.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,r=this.z-e.z;return t*t+n*n+r*r},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)},setFromSphericalCoords:function(e,t,n){var r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this},setFromCylindrical:function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},setFromCylindricalCoords:function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this},setFromMatrixPosition:function(e){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(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,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)(Nn.prototype,{isMatrix3:!0,set:function(e,t,n,r,i,a,o,s,l){var u=this.elements;return u[0]=e,u[1]=r,u[2]=o,u[3]=t,u[4]=i,u[5]=s,u[6]=n,u[7]=a,u[8]=l,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var t=this.elements,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;tr)return!1}return!0}function yi(e){var t=e.geometry;if(void 0!==t)if(t.isGeometry){var n=t.vertices;for(Dr=0,Or=n.length;Drthis.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:(Pr=new Pn,function(e){return this.clampPoint(e.center,Pr),Pr.distanceToSquared(e.center)<=e.radius*e.radius}),intersectsPlane:function(e){var t,n;return n=0=-e.constant},intersectsTriangle:(Mr=new Pn,Sr=new Pn,Er=new Pn,Tr=new Pn,Ar=new Pn,Lr=new Pn,Rr=new Pn,Cr=new Pn,Ir=new Pn,kr=new Pn,function(e){if(this.isEmpty())return!1;this.getCenter(Cr),Ir.subVectors(this.max,Cr),Mr.subVectors(e.a,Cr),Sr.subVectors(e.b,Cr),Er.subVectors(e.c,Cr),Tr.subVectors(Sr,Mr),Ar.subVectors(Er,Sr),Lr.subVectors(Mr,Er);var t=[0,-Tr.z,Tr.y,0,-Ar.z,Ar.y,0,-Lr.z,Lr.y,Tr.z,0,-Tr.x,Ar.z,0,-Ar.x,Lr.z,0,-Lr.x,-Tr.y,Tr.x,0,-Ar.y,Ar.x,0,-Lr.y,Lr.x,0];return!!gi(t)&&(t=[1,0,0,0,1,0,0,0,1],!!gi(t)&&(kr.crossVectors(Tr,Ar),t=[kr.x,kr.y,kr.z],gi(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:(br=new Pn,function(e){var t=br.copy(e).clamp(this.min,this.max);return t.sub(e).length()}),getBoundingSphere:(wr=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(wr).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:(xr=[new Pn,new Pn,new Pn,new Pn,new Pn,new Pn,new Pn,new Pn],function(e){return this.isEmpty()||(xr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),xr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),xr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),xr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),xr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),xr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),xr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),xr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(xr)),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)(_i.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:function(e,t){void 0===Ur&&(Ur=new vi);var n=this.center;void 0!==t?n.copy(t):Ur.setFromPoints(e).getCenter(n);for(var r=0,i=0,a=e.length;ithis.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 vi),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)(xi.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:(Jr=new Pn,function(e){return this.origin.copy(this.at(e,Jr)),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:(Zr=new Pn,function(e){var t=Zr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Zr.copy(this.direction).multiplyScalar(t).add(this.origin),Zr.distanceToSquared(e))}),distanceSqToSegment:(Yr=new Pn,qr=new Pn,Xr=new Pn,function(e,t,n,r){Yr.copy(e).add(t).multiplyScalar(.5),qr.copy(t).sub(e).normalize(),Xr.copy(this.origin).sub(Yr);var i,a,o,s,l=.5*e.distanceTo(t),u=-this.direction.dot(qr),c=Xr.dot(this.direction),h=-Xr.dot(qr),f=Xr.lengthSq(),d=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=Cn.euclideanModulo(e,1),t=Cn.clamp(t,0,1),n=Cn.clamp(n,0,1),0===t)this.r=this.g=this.b=n;else{var r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Ai(i,r,e+1/3),this.g=Ai(i,r,e),this.b=Ai(i,r,e-1/3)}return this},setStyle:function(t){function e(e){void 0!==e&&(0,ce.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 r,i=n[1],a=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,(0,h.default)(r[1],10))/255,this.g=Math.min(255,(0,h.default)(r[2],10))/255,this.b=Math.min(255,(0,h.default)(r[3],10))/255,e(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,(0,h.default)(r[1],10))/100,this.g=Math.min(100,(0,h.default)(r[2],10))/100,this.b=Math.min(100,(0,h.default)(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=(0,ce.default)(r[1])/360,s=(0,h.default)(r[2],10)/100,l=(0,h.default)(r[3],10)/100;return e(r[5]),this.setHSL(o,s,l)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(t)){var u=n[1],c=u.length;if(3===c)return this.r=(0,h.default)(u.charAt(0)+u.charAt(0),16)/255,this.g=(0,h.default)(u.charAt(1)+u.charAt(1),16)/255,this.b=(0,h.default)(u.charAt(2)+u.charAt(2),16)/255,this;if(6===c)return this.r=(0,h.default)(u.charAt(0)+u.charAt(1),16)/255,this.g=(0,h.default)(u.charAt(2)+u.charAt(3),16)/255,this.b=(0,h.default)(u.charAt(4)+u.charAt(5),16)/255,this}return t&&0t&&(t=e[n]);return t}ki.prototype=(0,p.default)((0,l.default)(c.prototype),{constructor:ki,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 r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.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 r(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}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,r,i,a,o,s,l,u,c){sa.fromBufferAttribute(i,l),la.fromBufferAttribute(i,u),ua.fromBufferAttribute(i,c);var h=e.morphTargetInfluences;if(t.morphTargets&&a&&h){da.set(0,0,0),pa.set(0,0,0),ma.set(0,0,0);for(var f=0,d=a.length;f","\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")},i=new Va({type:"CubemapFromEquirect",uniforms:Fa(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:Ge,blending:me});i.uniforms.tEquirect.value=t;var a=new Ma(new Oa(5,5,5),i);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},ro.prototype=(0,l.default)(Xn.prototype),ro.prototype.constructor=ro,ro.prototype.isDataTexture=!0,(0,p.default)(io.prototype,{isPlane:!0,set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:(Xa=new Pn,Za=new Pn,function(e,t,n){var r=Xa.subVectors(n,t).cross(Za.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,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),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):void 0;var i=-(e.start.dot(this.normal)+this.constant)/r;return i<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,r){for(var i="",a=(0,h.default)(t);a<(0,h.default)(n);a++)i+=r.replace(/\[ i \]/g,"[ "+a+" ]");return i}return e.replace(t,n)}function Ku(e,t,n,r,i,a,o){var s=e.getContext(),l=r.defines,u=i.vertexShader,c=i.fragmentShader,h="SHADOWMAP_TYPE_BASIC";a.shadowMapType===O?h="SHADOWMAP_TYPE_PCF":a.shadowMapType===F&&(h="SHADOWMAP_TYPE_PCF_SOFT");var f="ENVMAP_TYPE_CUBE",d="ENVMAP_MODE_REFLECTION",p="ENVMAP_BLENDING_MULTIPLY";if(a.envMap){switch(r.envMap.mapping){case re:case ae:f="ENVMAP_TYPE_CUBE";break;case ue:case Ce:f="ENVMAP_TYPE_CUBE_UV";break;case oe:case se:f="ENVMAP_TYPE_EQUIREC";break;case le:f="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case ae:case se:d="ENVMAP_MODE_REFRACTION"}switch(r.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=0r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<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?Cn.floorPowerOfTwo:Math.floor,o=a(i*e.width),s=a(i*e.height);void 0===c&&(c=f(o,s));var l=n?f(o,s):c;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 b(e){return Cn.isPowerOfTwo(e.width)&&Cn.isPowerOfTwo(e.height)}function p(e){return!_.isWebGL2&&(e.wrapS!==ke||e.wrapT!==ke||e.minFilter!==Ne&&e.minFilter!==Ve)}function M(e,t){return e.generateMipmaps&&t&&e.minFilter!==Ne&&e.minFilter!==Ve}function S(e,t,n,r){v.generateMipmap(e);var i=y.get(t);i.__maxMipLevel=Math.log(Math.max(n,r))*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?i.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===Ne||e===De||e===Fe?9728:9729}function o(e){var t=e.target;t.removeEventListener("dispose",o),s(t),t.isVideoTexture&&delete r[t.id],h.memory.textures--}function d(e){var t=e.target;t.removeEventListener("dispose",d),l(t),h.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 r=0;r<6;r++)v.deleteFramebuffer(t.__webglFramebuffer[r]),t.__webglDepthbuffer&&v.deleteRenderbuffer(t.__webglDepthbuffer[r]);else v.deleteFramebuffer(t.__webglFramebuffer),t.__webglDepthbuffer&&v.deleteRenderbuffer(t.__webglDepthbuffer);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&&z(e),0e.far||t.push({distance:s,point:yc.clone(),uv:wi.getUV(yc,Sc,Ec,Tc,Ac,Lc,Rc,new In),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return pi.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}}),ih.prototype=(0,p.default)((0,l.default)(pi.prototype),{constructor:ih,isLOD:!0,copy:function(e){pi.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,r=t.length;n=t[r].distance;r++)t[r-1].object.visible=!1,t[r].object.visible=!0;for(;re.far||t.push({distance:w,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:w,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this}))}else if(r.isGeometry){var b=r.vertices,M=b.length;for(v=0;ve.far||t.push({distance:w,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)}}),ch.prototype=(0,p.default)((0,l.default)(uh.prototype),{constructor:ch,isLineSegments:!0,computeLineDistances:(Gc=new Pn,zc=new Pn,function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[],r=0,i=t.count;ri.far)return;a.push({distance:r,distanceToRay:Math.sqrt(n),point:u.clone(),index:t,face:null,object:o})}}}),updateMorphTargets:function(){var e,t,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,a=(0,m.default)(i);if(0=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),mh.prototype=(0,l.default)(Xn.prototype),mh.prototype.constructor=mh,mh.prototype.isCompressedTexture=!0,vh.prototype=(0,l.default)(Xn.prototype),vh.prototype.constructor=vh,vh.prototype.isCanvasTexture=!0,gh.prototype=(0,l.default)(Xn.prototype),gh.prototype.constructor=gh,gh.prototype.isDepthTexture=!0,yh.prototype=(0,l.default)(ba.prototype),yh.prototype.constructor=yh,_h.prototype=(0,l.default)(Na.prototype),_h.prototype.constructor=_h,xh.prototype=(0,l.default)(ba.prototype),xh.prototype.constructor=xh,wh.prototype=(0,l.default)(Na.prototype),wh.prototype.constructor=wh,bh.prototype=(0,l.default)(ba.prototype),bh.prototype.constructor=bh,Mh.prototype=(0,l.default)(Na.prototype),Mh.prototype.constructor=Mh,Sh.prototype=(0,l.default)(bh.prototype),Sh.prototype.constructor=Sh,Eh.prototype=(0,l.default)(Na.prototype),Eh.prototype.constructor=Eh,Th.prototype=(0,l.default)(bh.prototype),Th.prototype.constructor=Th,Ah.prototype=(0,l.default)(Na.prototype),Ah.prototype.constructor=Ah,Lh.prototype=(0,l.default)(bh.prototype),Lh.prototype.constructor=Lh,Rh.prototype=(0,l.default)(Na.prototype),Rh.prototype.constructor=Rh,Ch.prototype=(0,l.default)(bh.prototype),Ch.prototype.constructor=Ch,Ih.prototype=(0,l.default)(Na.prototype),Ih.prototype.constructor=Ih,kh.prototype=(0,l.default)(ba.prototype),kh.prototype.constructor=kh,kh.prototype.toJSON=function(){var e=ba.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},Ph.prototype=(0,l.default)(Na.prototype),Ph.prototype.constructor=Ph,Nh.prototype=(0,l.default)(ba.prototype),Nh.prototype.constructor=Nh,Dh.prototype=(0,l.default)(Na.prototype),Dh.prototype.constructor=Dh,Oh.prototype=(0,l.default)(ba.prototype),Oh.prototype.constructor=Oh;var Fh={triangulate:function(e,t,n){n=n||2;var r,i,a,o,s,l,u,c=t&&t.length,h=c?t[0]*n:e.length,f=Bh(e,0,h,n,!0),d=[];if(!f||f.next===f.prev)return d;if(c&&(f=jh(e,t,f,n)),e.length>80*n){r=a=e[0],i=o=e[1];for(var p=n;pa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,h=Kh(s,l,t,n,r),f=Kh(u,c,t,n,r),d=e.prevZ,p=e.nextZ;d&&d.z>=h&&p&&p.z<=f;){if(d!==e.prev&&d!==e.next&&$h(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&0<=tf(d.prev,d,d.next))return!1;if(d=d.prevZ,p!==e.prev&&p!==e.next&&$h(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=tf(p.prev,p,p.next))return!1;p=p.nextZ}for(;d&&d.z>=h;){if(d!==e.prev&&d!==e.next&&$h(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&0<=tf(d.prev,d,d.next))return!1;d=d.prevZ}for(;p&&p.z<=f;){if(p!==e.prev&&p!==e.next&&$h(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=tf(p.prev,p,p.next))return!1;p=p.nextZ}return!0}function Hh(e,t,n){var r=e;do{var i=r.prev,a=r.next.next;!nf(i,a)&&rf(i,r,r.next,a)&&of(i,a)&&of(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),cf(r),cf(r.next),r=e=a),r=r.next}while(r!==e);return r}function Wh(e,t,n,r,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&ef(o,s)){var l=lf(o,s);return o=Uh(o,o.next),l=Uh(l,l.next),Gh(o,t,n,r,i,a),void Gh(l,t,n,r,i,a)}s=s.next}o=o.next}while(o!==e)}function jh(e,t,n,r){var i,a,o,s,l,u=[];for(i=0,a=t.length;i=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&o=r.x&&r.x>=c&&i!==r.x&&$h(an.x)&&of(r,e)&&(n=r,f=l)),r=r.next;return n}function Zh(e,t,n,r){for(var i=e;null===i.z&&(i.z=Kh(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next,i!==e;);i.prevZ.nextZ=null,i.prevZ=null,Jh(i)}function Jh(e){var t,n,r,i,a,o,s,l,u=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;ta!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next,n!==e;);return r}function lf(e,t){var n=new hf(e.i,e.x,e.y),r=new hf(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function uf(e,t,n,r){var i=new hf(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function cf(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 hf(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 ff(e,t,n,r){for(var i=0,a=t,o=n-r;aie.default){var f=Math.sqrt(c),d=Math.sqrt(l*l+u*u),p=t.x-s/f,m=t.y+o/f,v=n.x-u/d,g=n.y+l/d,y=((v-p)*u-(g-m)*l)/(o*u-s*l);r=p+o*y-e.x,i=m+s*y-e.y;var _=r*r+i*i;if(_<=2)return new In(r,i);a=Math.sqrt(_/2)}else{var x=!1;o>ie.default?l>ie.default&&(x=!0):o<-ie.default?l<-ie.default&&(x=!0):Math.sign(s)===Math.sign(u)&&(x=!0),a=x?(r=-s,i=o,Math.sqrt(c)):(r=o,i=s,Math.sqrt(c/2))}return new In(r/a,i/a)}for(var F=[],B=0,U=T.length,G=U-1,z=B+1;B>>1;et;)--a;if(++a,0!==i||a!==r){a<=i&&(a=Math.max(a,1),i=a-1);var o=this.getValueSize();this.times=Jf.arraySlice(n,i,a),this.values=Jf.arraySlice(this.values,i*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,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,o=0;o!==i;o++){var s=n[o];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),e=!1;break}if(null!==a&&sie.default&&(u.normalize(),i=Math.acos(Cn.clamp(o[n-1].dot(o[n]),-1,1)),s[n].applyMatrix4(c.makeRotationAxis(u,i))),l[n].crossVectors(o[n],s[n]);if(!0===t)for(i=Math.acos(Cn.clamp(s[0].dot(s[e]),-1,1)),i/=e,0r.length-2?r.length-1:a+1],c=r[a>r.length-3?r.length-1:a+2];return n.set(kd(o,s.x,l.x,u.x,c.x),kd(o,s.y,l.y,u.y,c.y)),n},Xd.prototype.copy=function(e){Md.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t=t){var i=n[r]-t,a=this.curves[r],o=a.getLength(),s=0===o?0:1-i/o;return a.getPointAt(s)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,r=this.curves.length;nie.default){if(u<0&&(o=t[a],l=-l,s=t[i],u=-u),e.ys.y)continue;if(e.y===o.y){if(e.x===o.x)return!0}else{var c=u*(e.x-o.x)-l*(e.y-o.y);if(0===c)return!0;if(c<0)continue;r=!r}}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 r}var i=df.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 Qd,l.curves=s.curves,u.push(l),u;var c=!i(a[0].getPoints());c=e?!c:c;var h,f,d=[],p=[],m=[],v=0;p[v]=void 0,m[v]=[];for(var g=0,y=a.length;gn.parameterPositions[1]&&(this.stopFading(),0===r&&(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 r=n.evaluate(e)[0];t*=r,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,r=this.loop,i=this._loopCount,a=r===Ut;if(0===e)return-1!==i&&a&&1==(1&i)?n-t:t;if(r===Ft){-1===i&&(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===i&&(0<=e?(i=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,i+=Math.abs(o);var s=this.repetitions-i;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 In),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 In),t.copy(e).clamp(this.min,this.max)},distanceToPoint:(_m=new In,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===wm&&(wm=new Pn,bm=new Pn),wm.subVectors(e,this.start),bm.subVectors(this.end,this.start);var n=bm.dot(bm),r=bm.dot(wm),i=r/n;return t&&(i=Cn.clamp(i,0,1)),i},closestPointToPoint:function(e,t,n){var r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Pn),this.delta(n).multiplyScalar(r).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)(pi.prototype),uv.prototype.constructor=uv,uv.prototype.isImmediateRenderObject=!0,cv.prototype=(0,l.default)(ch.prototype),cv.prototype.constructor=cv,cv.prototype.update=(Mm=new Pn,Sm=new Pn,Em=new Nn,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,r=this.object.geometry;if(r&&r.isGeometry)for(var i=r.vertices,a=r.faces,o=0,s=0,l=a.length;sg;)m(v[g++]);h.constructor=u,u.prototype=h,n(43)(r,"RegExp",u)}n(161)("RegExp")},function(e,t,i){var n=i(42),r=i(36),a=function(e,t){if(r(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,r){try{r=i(88)(Function.call,i(115).f(Object.prototype,"__proto__").set,2),r(e,[]),n=!(e instanceof Array)}catch(e){n=!0}return function(e,t){return a(e,t),n?e.__proto__=t:r(e,t),e}}({},!1):void 0),check:a}},function(e,t,n){e.exports=n(118)("native-function-to-string",Function.toString)},function(e,t,n){n(59),n(257),e.exports=n(11).Array.from},function(e,t,n){var l=n(121),u=n(96);e.exports=function(s){return function(e,t){var n,r,i=String(u(e)),a=l(t),o=i.length;return a<0||o<=a?s?"":void 0:(n=i.charCodeAt(a),n<55296||56319=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e){e.exports=function(){}},function(e,t,n){n(272),n(105),n(275),n(276),e.exports=n(11).Symbol},function(e,t,n){"use strict";var r=n(19),o=n(49),i=n(30),a=n(14),s=n(123),l=n(64).KEY,u=n(41),c=n(126),h=n(83),f=n(98),d=n(24),p=n(134),m=n(135),v=n(273),g=n(137),y=n(29),_=n(22),x=n(54),w=n(61),b=n(113),M=n(75),S=n(80),E=n(274),T=n(175),A=n(136),L=n(35),R=n(81),C=T.f,I=L.f,k=E.f,P=r.Symbol,N=r.JSON,D=N&&N.stringify,O="prototype",F=d("_hidden"),B=d("toPrimitive"),U={}.propertyIsEnumerable,G=c("symbol-registry"),z=c("symbols"),V=c("op-symbols"),H=Object[O],W="function"==typeof P&&!!A.f,j=r.QObject,Y=!j||!j[O]||!j[O].findChild,q=i&&u(function(){return 7!=S(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=C(H,t);r&&delete H[t],I(e,t,n),r&&e!==H&&I(H,t,r)}:I,X=function(e){var t=z[e]=S(P[O]);return t._k=e,t},Z=W&&"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=b(t,!0),y(n),o(z,t)?(n.enumerable?(o(e,F)&&e[F][t]&&(e[F][t]=!1),n=S(n,{enumerable:M(0,!1)})):(o(e,F)||I(e,F,M(1,{})),e[F][t]=!0),q(e,t,n)):I(e,t,n)},K=function(e,t){y(e);for(var n,r=v(t=w(t)),i=0,a=r.length;ii;)o(z,t=n[i++])||t==F||t==l||r.push(t);return r},ne=function(e){for(var t,n=e===H,r=k(n?V:w(e)),i=[],a=0;r.length>a;)!o(z,t=r[a++])||n&&!o(H,t)||i.push(z[t]);return i};W||(P=function(e){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var t=f(0ie;)d(re[ie++]);for(var ae=R(d.store),oe=0;ae.length>oe;)m(ae[oe++]);a(a.S+a.F*!W,"Symbol",{for:function(e){return o(G,e+="")?G[e]:G[e]=P(e)},keyFor:function(e){if(!Z(e))throw TypeError(e+" is not a symbol!");for(var t in G)if(G[t]===e)return t},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),a(a.S+a.F*!W,"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))}}),N&&a(a.S+a.F*(!W||u(function(){var e=P();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;io;)a.call(e,r=i[o++])&&t.push(r);return t}},function(e,t,n){var r=n(61),i=n(174).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(e){return o.slice()}};e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?s(e):i(r(e))}},function(e,t,n){n(135)("asyncIterator")},function(e,t,n){n(135)("observable")},function(e,t,n){"use strict";var r=n(27),a=n(37),o=n(278),s="startsWith",l=""[s];r(r.P+r.F*n(279)(s),"String",{startsWith:function(e,t){var n=o(this,e,s),r=a(Math.min(1>1,c=23===t?C(2,-24)-C(2,-77):0,h=0,f=e<0||0===e&&1/e<0?1:0;for(e=R(e),e!=e||e===A?(i=e!=e?1:0,r=l):(r=I(k(e)/P),e*(a=C(2,-r))<1&&(r--,a*=2),e+=1<=r+u?c/a:c*C(2,1-u),2<=e*a&&(r++,a/=2),l<=r+u?(i=0,r=l):1<=r+u?(i=(e*a-1)*C(2,t),r+=u):(i=e*C(2,u-1)*C(2,t),r=0));8<=t;o[h++]=255&i,i/=256,t-=8);for(r=r<>1,s=i-7,l=n-1,u=e[l--],c=127&u;for(u>>=7;0>=-s,s+=t;0>8&255]}function j(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function Y(e){return G(e,52,8)}function q(e){return G(e,23,4)}function X(e,t,n){m(e[x],t,{get:function(){return this[n]}})}function Z(e,t,n,r){var i=+n,a=d(i);if(a+t>e[B])throw T(b);var o=e[F]._b,s=a+e[U],l=o.slice(s,s+t);return r?l:l.reverse()}function J(e,t,n,r,i,a){var o=+n,s=d(o);if(s+t>e[B])throw T(b);for(var l=e[F]._b,u=s+e[U],c=r(+i),h=0;hee;)(K=$[ee++])in M||s(M,K,L[K]);a||(Q.constructor=M)}var te=new S(new M(2)),ne=S[x].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||l(S[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){c(this,M,y);var t=d(e);this._b=v.call(new Array(t),0),this[B]=t},S=function(e,t,n){c(this,S,_),c(e,M,_);var r=e[B],i=h(t);if(i<0||r>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 z(Z(this,4,e,t),23,4)},getFloat64:function(e,t){return z(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,W,t,n)},setUint16:function(e,t,n){J(this,2,e,W,t,n)},setInt32:function(e,t,n){J(this,4,e,j,t,n)},setUint32:function(e,t,n){J(this,4,e,j,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(S,_),s(S[x],o.VIEW,!0),t[y]=M,t[_]=S},function(e,t,n){var r=n(63),i=n(20)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},function(e,t,n){var r=n(101),i=n(20)("iterator"),a=n(63);e.exports=n(93).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[r(e)]}},function(e,t,n){var _=n(88),x=n(116),w=n(44),b=n(37),r=n(296);e.exports=function(h,e){var f=1==h,d=2==h,p=3==h,m=4==h,v=6==h,g=5==h||v,y=e||r;return function(e,t,n){for(var r,i,a=w(e),o=x(a),s=_(t,n,3),l=b(o.length),u=0,c=f?y(e,l):d?y(e,0):void 0;u>>0||(o.test(n)?16:10))}:r},function(e,t,n){n(307),e.exports=n(11).parseFloat},function(e,t,n){var r=n(14),i=n(308);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){var r=n(19).parseFloat,i=n(189).trim;e.exports=1/r(n(143)+"-0")!=-1/0?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){"use strict";var r=n(27),i=n(44),a=n(77);r(r.P+r.F*n(23)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(){var e=i(this),t=a(e);return"number"!=typeof t||isFinite(t)?e.toISOString():null}})},function(e,t,n){var r=n(11),i=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return i.stringify.apply(i,arguments)}},function(e,t,n){n(312),e.exports=n(11).Array.isArray},function(e,t,n){var r=n(14);r(r.S,"Array",{isArray:n(137)})},function(e,t,n){n(314);var r=n(11).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(14);r(r.S,"Object",{create:n(80)})},function(e,t,n){"use strict";var i=n(51),a=n(50);e.exports=function(e){var t=String(a(this)),n="",r=i(e);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;0>>=1)&&(t+=t))1&r&&(n+=t);return n}},function(e,t,n){n(317);var r=n(11).Object;e.exports=function(e,t){return r.defineProperties(e,t)}},function(e,t,n){var r=n(14);r(r.S+r.F*!n(30),"Object",{defineProperties:n(162)})},function(e,t,n){var r=n(27);r(r.S+r.F,"Object",{assign:n(319)})},function(e,t,n){"use strict";var h=n(26),f=n(131),d=n(320),p=n(156),m=n(44),v=n(116),i=Object.assign;e.exports=!i||n(23)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=i({},e)[n]||Object.keys(i({},t)).join("")!=r})?function(e){for(var t=m(e),n=arguments.length,r=1,i=d.f,a=p.f;rS||8*(1-_.dot(x.object.quaternion))>S)&&(x.dispatchEvent(w),y.copy(x.object.position),_.copy(x.object.quaternion),R=!1,!0)}),this.dispose=function(){x.domElement.removeEventListener("contextmenu",me,!1),x.domElement.removeEventListener("mousedown",ae,!1),x.domElement.removeEventListener("wheel",ce,!1),x.domElement.removeEventListener("touchstart",fe,!1),x.domElement.removeEventListener("touchend",pe,!1),x.domElement.removeEventListener("touchmove",de,!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",he,!1),this.enterCtrl=void 0,this.domElement=void 0,this.object=void 0};var x=this,w={type:"change"},l={type:"start"},r={type:"end"},b={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4,TOUCH_PAN:5,TOUCH_DOLLY_ROTATE:6},M=b.NONE,S=1e-6,E=new fm.Spherical,T=new fm.Spherical,A=1,L=new fm.Vector3,R=!1,C=new fm.Vector2,I=new fm.Vector2,k=new fm.Vector2,P=new fm.Vector2,N=new fm.Vector2,D=(new fm.Vector2,new fm.Vector2),O=new fm.Vector2,F=new fm.Vector2,B=new fm.Vector2,U=new fm.Vector2,G=new fm.Vector2,u=new fm.Vector2;function z(){return 2*Math.PI/60/60*x.autoRotateSpeed}function i(){return Math.pow(.95,x.zoomSpeed)}function V(e){x.enterCtrl&&!x.enterCtrl.enableMapRotate||(T.theta-=e)}function H(e){x.enterCtrl&&!x.enterCtrl.enableMapIncline||(T.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)}),W=(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 j,Y=(j=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 r=x.object.position;j.copy(r).sub(x.target);var i=j.length();i*=Math.tan(x.object.fov/2*Math.PI/180),s(2*e*i/n.clientHeight,x.object.matrix),W(2*t*i/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),W(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,R=!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(),R=!0,A*=e):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),x.enableZoom=!1))}function Z(e){C.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){I.set(e.clientX,e.clientY),k.subVectors(I,C).multiplyScalar(x.rotateSpeed);var t=x.domElement===document?x.domElement.body:x.domElement;V(2*Math.PI*k.x/t.clientHeight),H(2*Math.PI*k.y/t.clientHeight),C.copy(I)}function $(e){U.set(e.clientX,e.clientY),G.subVectors(U,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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function d(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,r=new Array(t);n>16)+(t>>16)+(n>>16);return r<<16|65535&n}function o(e,t){return e<>>32-t}function s(e,t,n,r,i,a){return h(o(h(h(t,e),h(r,a)),i),n)}function f(e,t,n,r,i,a,o){return s(t&n|~t&r,e,t,i,a,o)}function d(e,t,n,r,i,a,o){return s(t&r|n&~r,e,t,i,a,o)}function p(e,t,n,r,i,a,o){return s(t^n^r,e,t,i,a,o)}function m(e,t,n,r,i,a,o){return s(n^(t|~r),e,t,i,a,o)}function l(e,t){var n,r,i,a,o;e[t>>5]|=128<>>9<<4)]=t;var s=1732584193,l=-271733879,u=-1732584194,c=271733878;for(n=0;n>5]>>>t%32&255);return n}function c(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+r.charAt(15&t);return i}function _(e){return unescape(encodeURIComponent(e))}function x(e){return v(_(e))}function w(e){return y(x(e))}function b(e,t){return g(_(e),_(t))}function M(e,t){return y(b(e,t))}function S(e,t,n){return t?(n?b:M)(t,e):(n?x:w)(e)}var E=a;t.default=E},function(e,t,n){e.exports=n(369)},function(e,t,n){n(105),n(59),n(65),n(370),n(372),n(375),n(376),e.exports=n(11).Map},function(e,t,n){"use strict";var r=n(371),i=n(84),a="Map";e.exports=n(179)(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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function f(e,t){if(e){if("string"==typeof e)return d(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)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=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=i;t.default=a},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var s=r(n(18)),l=r(n(13)),u=r(n(17)),c=r(n(16)),a=r(n(15));n(10),n(5),n(4),n(21);var o=r(n(2)),h=r(n(3)),f=r(n(385)),d=r(n(210));function p(e){if(void 0===c.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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}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,r=new Array(t);n=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){e.exports=n(388)},function(e,t,n){n(105),n(59),n(65),n(389),n(392),n(393),e.exports=n(11).Promise},function(e,t,n){"use strict";var r,i,a,o,s=n(79),l=n(19),u=n(40),c=n(99),h=n(14),f=n(22),d=n(52),p=n(107),m=n(67),v=n(211),g=n(212).set,y=n(390)(),_=n(150),x=n(213),w=n(391),b=n(214),M="Promise",S=l.TypeError,E=l.process,T=E&&E.versions,A=T&&T.v8||"",L=l[M],R="process"==c(E),C=function(){},I=i=_.f,k=!!function(){try{var e=L.resolve(1),t=(e.constructor={})[n(24)("species")]=function(e){e(C,C)};return(R||"function"==typeof PromiseRejectionEvent)&&e.then(C)instanceof t&&0!==A.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),P=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},N=function(c,n){if(!c._n){c._n=!0;var r=c._c;y(function(){for(var l=c._v,u=1==c._s,e=0,t=function(e){var t,n,r,i=u?e.ok:e.fail,a=e.resolve,o=e.reject,s=e.domain;try{i?(u||(2==c._h&&F(c),c._h=1),!0===i?t=l:(s&&s.enter(),t=i(l),s&&(s.exit(),r=!0)),t===e.promise?o(S("Promise-chain cycle")):(n=P(t))?n.call(t,a,o):a(t)):o(l)}catch(e){s&&!r&&s.exit(),o(e)}};r.length>e;)t(r[e++]);c._c=[],c._n=!1,n&&!c._h&&D(c)})}},D=function(a){g.call(l,function(){var e,t,n,r=a._v,i=O(a);if(i&&(e=x(function(){R?E.emit("unhandledRejection",r,a):(t=l.onunhandledrejection)?t({promise:a,reason:r}):(n=l.console)&&n.error&&n.error("Unhandled promise rejection",r)}),a._h=R||O(a)?2:1),a._a=void 0,i&&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;R?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()),N(t,!0))},U=function(e){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw S("Promise can't be resolved itself");(n=P(e))?y(function(){var t={_w:r,_d:!1};try{n.call(e,u(U,t,1),u(B,t,1))}catch(e){B.call(t,e)}}):(r._v=e,r._s=1,N(r,!1))}catch(e){B.call({_w:r,_d:!1},e)}}};k||(L=function(e){p(this,L,M,"_h"),d(e),r.call(this);try{e(u(U,this,1),u(B,this,1))}catch(e){B.call(this,e)}},r=function(){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(106)(L.prototype,{then:function(e,t){var n=I(v(this,L));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=R?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&N(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r;this.promise=e,this.resolve=u(U,e,1),this.reject=u(B,e,1)},_.f=I=function(e){return e===L||e===o?new a(e):i(e)}),h(h.G+h.W+h.F*!k,{Promise:L}),n(83)(L,M),n(205)(M),o=n(11)[M],h(h.S+h.F*!k,M,{reject:function(e){var t=I(this),n=t.reject;return n(e),t.promise}}),h(h.S+h.F*(s||!k),M,{resolve:function(e){return b(s&&this===o?L:this,e)}}),h(h.S+h.F*!(k&&n(168)(function(e){L.all(e).catch(C)})),M,{all:function(e){var o=this,t=I(o),s=t.resolve,l=t.reject,n=x(function(){var r=[],i=0,a=1;m(e,!1,function(e){var t=i++,n=!1;r.push(void 0),a++,o.resolve(e).then(function(e){n||(n=!0,r[t]=e,--a||s(r))},l)}),--a||s(r)});return n.e&&l(n.v),t.promise},race:function(e){var t=this,n=I(t),r=n.reject,i=x(function(){m(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(e,t,n){var s=n(19),l=n(212).set,u=s.MutationObserver||s.WebKitMutationObserver,c=s.process,h=s.Promise,f="process"==n(82)(c);e.exports=function(){var n,r,i,e=function(){var e,t;for(f&&(e=c.domain)&&e.exit();n;){t=n.fn,n=n.next;try{t()}catch(e){throw n?i():r=void 0,e}}r=void 0,e&&e.enter()};if(f)i=function(){c.nextTick(e)};else if(!u||s.navigator&&s.navigator.standalone)if(h&&h.resolve){var t=h.resolve(void 0);i=function(){t.then(e)}}else i=function(){l.call(s,e)};else{var a=!0,o=document.createTextNode("");new u(e).observe(o,{characterData:!0}),i=function(){o.data=a=!a}}return function(e){var t={fn:e,next:void 0};r&&(r.next=t),n||(n=t,i()),r=t}}},function(e,t,n){var r=n(19),i=r.navigator;e.exports=i&&i.userAgent||""},function(e,t,n){"use strict";var r=n(14),i=n(11),a=n(19),o=n(211),s=n(214);r(r.P+r.R,"Promise",{finally:function(t){var n=o(this,i.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 r=n(14),i=n(150),a=n(213);r(r.S,"Promise",{try:function(e){var t=i.f(this),n=a(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(2)),o=r(n(3)),s=r(n(210)),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(i,t,e){var a=this;this.dynamicModel[i]?0==this.dynamicModel[i].loadComplete?(this.dynamicModel[i].scbs.push(t),this.dynamicModel[i].fcbs.push(e)):this.dynamicModel[i].error?e&&e(this.dynamicModel[i].error):t&&this.loader.parse(this.dynamicModel[i].data,fm.LoaderUtils.extractUrlBase(i),function(e){t(e)},function(){}):(this.dynamicModel[i]={gltf:null,loadComplete:!1,error:null,scbs:[],fcbs:[]},this.dynamicModel[i].scbs.push(t),this.dynamicModel[i].fcbs.push(e),this.loader.load(i,function(e,t){a.dynamicModel[i].gltf=e,a.dynamicModel[i].data=t,a.dynamicModel[i].loadComplete=!0;for(var n=a.dynamicModel[i].scbs,r=0;r\n 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=i;t.default=a},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var s=r(n(18)),l=r(n(13)),u=r(n(17)),c=r(n(16)),a=r(n(15));n(5),n(4),n(71),n(10);var h=r(n(25)),f=r(n(32));n(21);var o=r(n(2)),d=r(n(3)),p=r(n(58));function m(e){if(void 0===c.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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}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,r=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,f.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 r={fillcolor:"0,0,0",alpha:"1.0",fontsize:"12.0"};t=(0,f.default)(t,r)}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,h.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 r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var s=r(n(18)),l=r(n(13)),u=r(n(17)),c=r(n(16)),a=r(n(15));n(10),n(5),n(4);var o=r(n(32)),h=r(n(2)),f=r(n(3));function d(e){if(void 0===c.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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}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,r=new Array(t);nt[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"),r='\n
\n ');return n.innerHTML=r.trim(),n.firstChild}},{key:"createGroupButton",value:function(e,t){var n=document.createElement("div"),r="");return n.innerHTML=r.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),r=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]?r&&(r.style.backgroundImage="url("+this._ctlOpt.imgURL+"arrow3.png)"):r&&(r.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 h.default.LEFT_TOP:n.style.left=t.x+"px",n.style.top=t.y+"px";break;case h.default.RIGHT_TOP:n.style.right=-t.x+"px",n.style.top=t.y+"px";break;case h.default.LEFT_BOTTOM:n.style.left=t.x+"px",n.style.bottom=-t.y+"px";break;case h.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]:-1r.times)n.stopJump();else if(e%=r.all,e>r.duration)n._renderNode.position.y!=n._origonY&&(n._renderNode.position.y=n._origonY);else{var t=e/r.halfDuration-1;t=1-t*t,n._renderNode.position.y=n._origonY+i*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(d.default),t=e.map;t.off("frameLoop",this.jumpEvent)}}},{key:"setSize",value:function(){var e=this.findParent(d.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(d.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}}]),r}(f.default),M=b;t.default=M},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0,n(5),n(4);var a=r(n(6)),l=r(n(32));n(21),n(71),n(10);var u=r(n(2)),c=r(n(3)),o=r(n(7)),s=r(n(8)),h=r(n(9)),f=r(n(12)),d=r(n(34)),p=r(n(111)),m=r(n(149)),v=r(n(73)),g=r(n(33)),y=n(74);function _(r){return function(){var e,t=(0,s.default)(r);if(x()){var n=(0,s.default)(this).constructor;e=(0,a.default)(t,arguments,n)}else e=t.apply(this,arguments);return(0,o.default)(this,e)}}function x(){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 w=function(e){(0,h.default)(s,e);var o=_(s);function s(e,t){var n;if((0,u.default)(this,s),n=o.call(this,0,g.default.TEXT_MARKER),n._text=e.name,n._param=e,n.isInitSprite=!1,n._opx=e.x||0,n._opy=e.y||0,n._height=e.height||0,n._renderNode=null,n._visible=!0,n._isRuning=!1,n._size=1.4*e.fontsize,n._callBack=e.callback,n._fillcolor=e.fillcolor,n._platecolor=e.platecolor,n._platestrokecolor=e.platestrokecolor,n._fontsize=e.fontsize,n._strokecolor=e.strokecolor,n._content=e.content,n.needAvoid=!1,!n._content){n.needAvoid=!0;for(var r=n._text.split("%rn%"),i=[],a=0;a=o||r.h>=o)&&(r.w>=r.h?(a=r.h/r.w,r.w=o,r.h=(0,s.default)(o*a)):(a=r.w/r.h,r.h=o,r.w=(0,s.default)(o*a))),r},getPixXY:function(e,t){var n=(e-this.map_.minX)/(this.map_.maxX-this.map_.minX),r=(this.map_.maxY-t)/(this.map_.maxY-this.map_.minY),i={x:n,y:r};return i.x=i.x*this.options.width,i.y=i.y*this.options.height,i},config:function(e){var t=this,n=t.getDeviceWH(e),r=n.w,i=n.h;t.options={width:r,height:i,opacity:e.opacity?255*e.opacity:25500,radius:e.radius?e.radius:30,bshadow:e.radius?e.radius/20:1.5,maxSize:e.mapSize||2048,boundVal:15e3,shadowBlur:Math.ceil(.3*e.radius),points:{max:e.max?e.max:100,data:[]},gradient:e.gradient?e.gradient:{.45:"rgb(0,0,255)",.55:"rgb(0,255,255)",.65:"rgb(0,255,0)",.95:"yellow",1:"rgb(255,0,0)"},isHeatPlan:e.isHeatPlan,heatHeight:e.heatHeight};var a=document.createElement("canvas"),o=a.getContext("2d");a.width=r,a.height=i,t.options.ctx=o,t.options.canvas=a},renderShadow:function(e,t,n,r){var i=this,a=i.options.ctx,o=(i.options.radius,i.options.boundVal),s=(0,l.default)(n/i.options.points.max,10);a.shadowColor="rgba(0, 0, 0, "+s+")",a.shadowOffsetX=o,a.shadowOffsetY=o,a.shadowBlur=i.options.shadowBlur,a.beginPath(),a.arc(e-o,t-o,i.options.radius,0,2*Math.PI,!0),a.closePath(),a.fill(),r||i.cachePoint(e,t,n)},colorize:function(){for(var e=this,t=e.options.width,n=e.options.height,r=e.options.ctx,i=r.getImageData(0,0,t,n),a=i.data,o=a.length,s=e.getPalette(),l=e.options.opacity,u=3;ui.max&&(i.max=n),a.push([e,t,n])},a.prototype.clearPoints=function(){this.options.points.data=[],this.clear()},a.prototype.addPoint=function(e,t,n){if(e&&t&&n){var r=this.getPixXY(e,t);if(r){var i=this;i.clear();for(var a=i.options.points.data,o=a.length,s=0;s=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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function x(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,r=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 r,i,a=!0,o=!1;return{s:function(){r=(0,s.default)(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function x(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,r=new Array(t);n=i[1])){for(var a=i[0],o=i[1],s=i[0];a=e[s].distance&&sthis._max.x&&(this._max.x=e.x),e.y>this._max.y&&(this._max.y=e.y)}},{key:"contain",value:function(e){return!(e.xthis._max.x||e.ythis._max.y)}}]),r}(),l=s;t.default=l},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var i={MODULE_SHORTEST:1,MODULE_BEST:2},a=i;t.default=a},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var i={Left:0,Center:1,Right:2},a=i;t.default=a},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var i={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=i;t.default=a},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var i={MODE_2D:"top",MODE_3D:"3d"},a=i;t.default=a},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var i={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=i;t.default=a},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(2)),o=r(n(3)),s=function(){function e(){(0,a.default)(this,e),this.x=void 0,this.y=void 0,this.z=void 0,this.gid=void 0}return(0,o.default)(e,[{key:"setGeoPoint",value:function(e){this.x=e.x,this.y=e.y}}]),e}(),l=s;t.default=l},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(2)),o=function e(t,n){(0,a.default)(this,e),this.x=void 0===t?0:t,this.y=void 0===n?0:n},s=o;t.default=s},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(2)),o=r(n(3)),s=function(){function r(e,t,n){(0,a.default)(this,r),this._locOrigion=null,this._locRange=null,this._mapOrigion=null,this._mapAxisX=null,this._mapAxisY=null,this._mapRange=null,e&&t&&n&&this.init(e,t,n)}return(0,o.default)(r,[{key:"init",value:function(e,t,n){if(4!=n.length)return!1;this._locOrigion=e,this._locRange=t,this._mapOrigion=n[0],this._mapAxisX={x:n[1].x-n[0].x,y:n[1].y-n[0].y},this._mapAxisY={x:n[3].x-n[0].x,y:n[3].y-n[0].y},this._mapRange={x:this._getVectorLen(this._mapAxisX),y:this._getVectorLen(this._mapAxisY)},this._mapAxisX.x/=this._mapRange.x,this._mapAxisX.y/=this._mapRange.x,this._mapAxisY.x/=this._mapRange.y,this._mapAxisY.y/=this._mapRange.y}},{key:"transform",value:function(e){var t={x:(e.x-this._locOrigion.x)/this._locRange.x,y:(e.y-this._locOrigion.y)/this._locRange.y},n={x:t.x*this._mapRange.x,y:t.y*this._mapRange.y},r={x:this._mapOrigion.x+this._mapAxisX.x*n.x+this._mapAxisY.x*n.y,y:this._mapOrigion.y+this._mapAxisX.y*n.x+this._mapAxisY.y*n.y};return r}},{key:"_getVectorLen",value:function(e){return Math.sqrt(e.x*e.x+e.y*e.y)}}]),r}(),l=s;t.default=l},function(e,t,n){"use strict";var r=n(0);r(t,"__esModule",{value:!0}),t.default=void 0;var i={NaviNodeType_NULL:-1,NaviNodeType_COMMON:0,NaviNodeType_SIDE:1,NaviNodeType_FLOOR:2,NaviNodeType_EXTENT:3,NaviLiftType_NULL:0,NaviLiftType_Lift:1,NaviLiftType_Stair:2,NaviLiftType_Escalator:3,NaviLiftType_Accessible:4,NaviLiftEntry_BOTH:0,NaviLiftEntry_UP:1,NaviLiftEntry_DOWN:2,NaviLiftEntry_FORBID:3,NaviEntranceType_NULL:0,NaviEntranceType_EXIT:1,NaviEntranceType_ENTRANCE:2,NaviEntranceType_ACCESS:3,NaviRoadRank_MAIN:1,NaviRoadRank_MINOR:2,NaviRoadRank_NARROW:3,NaviRoadEntry_BOTH:0,NaviRoadEntry_FORWARD:1,NaviRoadEntry_BACK:2,NaviRoadEntry_FORBID:3,NaviRoadPass_NULL:-1,NaviRoadPass_NOT_THROUGH:0,NaviRoadPass_THROUGH:1,NaviZoneType_NULL:-1,NaviZoneType_PASS_UNRESTRAINT:0,NaviZoneType_PASS_THROUGH:1,NaviZoneType_PASS_NOT_THROUGH:2,NaviZoneType_NO_ENTRY:3,NaviZoneType_CORRIDOR:4,NaviModelPassType_PASS_THROUGH:0,NaviModelPassType_PASS_NOT_THROUGH:1,NaviModelPassType_NOT_PASS:2,NaviModelPassType_DECORATE:3,NaviRoadHinderType_HINDER_GENERAL:0,NaviRoadHinderType_HINDER_HIGH:1,NaviObstructType_MODEL:0,NaviObstructType_EXTENT:1};t.default=i},function(e,t,n){"use strict";var r=n(1),i=n(0);i(t,"__esModule",{value:!0}),t.default=void 0,n(85);var a=r(n(2)),o=r(n(3)),s=function(){function e(){(0,a.default)(this,e),this.minX=Number.MAX_VALUE,this.minY=Number.MAX_VALUE,this.maxX=-Number.MAX_VALUE,this.maxY=-Number.MAX_VALUE}return(0,o.default)(e,[{key:"init",value:function(){this.minX=Number.MAX_VALUE,this.minY=Number.MAX_VALUE,this.maxX=-Number.MAX_VALUE,this.maxY=-Number.MAX_VALUE}},{key:"expandBy",value:function(e){e&&e.x&&e.y&&(this.minX>e.x&&(this.minX=e.x),this.maxXe.y&&(this.minY=e.y),this.maxYe.maxX||this.minY>e.maxY||this.maxX