From 7458e23752aba674bb23bd56c2df625df6d65bbd Mon Sep 17 00:00:00 2001
From: fred ♥BOX
>>0,i=defaultValue(i,0),a=i<0?Math.max(n+i,0):Math.min(i,n),r=defaultValue(r,n),o=r<0?Math.max(n+r,0):Math.min(r,n);a CesiumMath.PI&&(o.north=0 MITER_BREAK_SMALL?(W=projectNormal(t,E,J,j,segmentStartNormal2DScratch),q=projectNormal(t,P,U,Y,segmentEndNormal2DScratch)):1===Se?(q=projectNormal(t,P,U,Y,segmentEndNormal2DScratch),W.x=0,W.y=CesiumMath.sign(E.longitude-Math.abs(P.longitude)),W.z=0):(W=projectNormal(t,E,J,j,segmentStartNormal2DScratch),q.x=0,q.y=CesiumMath.sign(E.longitude-P.longitude),q.z=0));var K,Z,ee,te=Cartesian3.distance(Q,$),ie=EncodedCartesian3.fromCartesian(X,encodeScratch$1),re=Cartesian3.subtract(k,X,offsetScratch$b),ne=Cartesian3.normalize(re,rightScratch),ae=Cartesian3.subtract(Q,X,startUpScratch),ae=Cartesian3.normalize(ae,ae),oe=Cartesian3.cross(ne,ae,rightScratch),oe=Cartesian3.normalize(oe,oe),se=Cartesian3.cross(ae,J,startPlaneNormalScratch),se=Cartesian3.normalize(se,se),le=Cartesian3.subtract($,k,endUpScratch),le=Cartesian3.normalize(le,le),ce=Cartesian3.cross(U,le,endPlaneNormalScratch),ce=Cartesian3.normalize(ce,ce),ue=te/I,de=z/I,he=0,pe=0,me=0;for(o&&(he=Cartesian3.distance(j,Y),K=EncodedCartesian3.fromCartesian(j,encodeScratch2D),Z=Cartesian3.subtract(Y,j,forwardOffset2DScratch),Te=(ee=Cartesian3.normalize(Z,right2DScratch)).x,ee.x=ee.y,ee.y=-Te,pe=he/x,me=G/x),D=0;D<8;D++){var fe=B+4*D,ge=F+2*D,_e=fe+3,ye=D<4?1:-1,Ce=2===D||3===D||6===D||7===D?1:-1;Cartesian3.pack(ie.high,y,fe),y[_e]=re.x,Cartesian3.pack(ie.low,C,fe),C[_e]=re.y,Cartesian3.pack(se,v,fe),v[_e]=re.z,Cartesian3.pack(ce,S,fe),S[_e]=ue*ye,Cartesian3.pack(oe,T,fe);var ve=de*Ce;0===ve&&Ce<0&&(ve=9),T[_e]=ve,o&&(s[fe]=K.high.x,s[fe+1]=K.high.y,s[fe+2]=K.low.x,s[fe+3]=K.low.y,c[fe]=-W.y,c[fe+1]=W.x,c[fe+2]=q.y,c[fe+3]=-q.x,l[fe]=Z.x,l[fe+1]=Z.y,l[fe+2]=ee.x,l[fe+3]=ee.y,u[ge]=pe*ye,0===(ve=me*Ce)&&Ce<0&&(ve=9),u[ge+1]=ve)}var Se=adjustHeightStartBottomScratch,ne=adjustHeightEndBottomScratch,ae=adjustHeightStartTopScratch,J=adjustHeightEndTopScratch,le=Rectangle.fromCartographicArray(getHeightCartographics,getHeightRectangleScratch),Te=ApproximateTerrainHeights.getMinimumMaximumHeights(le,d),le=Te.minimumTerrainHeight,Te=Te.maximumTerrainHeight;H+=le,H+=Te,adjustHeights(X,Q,le,Te,Se,ae),adjustHeights(k,$,le,Te,ne,J);Te=Cartesian3.multiplyByScalar(oe,CesiumMath.EPSILON5,normalNudgeScratch);Cartesian3.add(Se,Te,Se),Cartesian3.add(ne,Te,ne),Cartesian3.add(ae,Te,ae),Cartesian3.add(J,Te,J),nudgeXZ(Se,ne),nudgeXZ(ae,J),Cartesian3.pack(Se,_,N),Cartesian3.pack(ne,_,N+3),Cartesian3.pack(J,_,N+6),Cartesian3.pack(ae,_,N+9),Te=Cartesian3.multiplyByScalar(oe,-2*CesiumMath.EPSILON5,normalNudgeScratch),Cartesian3.add(Se,Te,Se),Cartesian3.add(ne,Te,ne),Cartesian3.add(ae,Te,ae),Cartesian3.add(J,Te,J),nudgeXZ(Se,ne),nudgeXZ(ae,J),Cartesian3.pack(Se,_,N+12),Cartesian3.pack(ne,_,N+15),Cartesian3.pack(J,_,N+18),Cartesian3.pack(ae,_,N+21),L+=2,R+=3,F+=16,N+=24,B+=32,z+=te,G+=he}var be=R=0;for(O=0;O d.x&&--h.x;var f,g,_=Rectangle.clone(e.rectangle,terrainRectangleScratch),y=n.tileXYToRectangle(d.x,d.y,u),C=Rectangle.intersection(y,o,clippedRectangleScratch);a?(n.rectangleToNativeRectangle(_,_),n.rectangleToNativeRectangle(y,y),n.rectangleToNativeRectangle(C,C),n.rectangleToNativeRectangle(o,o),f=n.tileXYToNativeRectangle.bind(n),p=_.width/512,m=_.height/512):f=n.tileXYToRectangle.bind(n);var v=0,S=1;!this.isBaseLayer()&&Math.abs(C.west-_.west)>=p&&(v=Math.min(1,(C.west-_.west)/_.width));for(var T=S=!this.isBaseLayer()&&Math.abs(C.north-_.north)>=m?Math.max(0,(C.north-_.south)/_.height):S,b=d.x;b<=h.x;b++)if(g=v,y=f(b,d.y,u),defined(C=Rectangle.simpleIntersection(y,o,clippedRectangleScratch))){v=Math.min(1,(C.east-_.west)/_.width),b===h.x&&(this.isBaseLayer()||Math.abs(C.east-_.east) =TileSelectionResult.RENDERED_AND_KICKED},originalResult:function(e){return 3&e},kick:function(e){return 4|e}};function TerrainFillMesh(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new Cartesian4}TerrainFillMesh.prototype.update=function(e,t,i){this.changedThisFrame&&(createFillMesh(e,t,this.tile,i),this.changedThisFrame=!1)},TerrainFillMesh.prototype.destroy=function(e){defined(this.vertexArray)&&(defined(e)?e.push(this.vertexArray):GlobeSurfaceTile._freeVertexArray(this.vertexArray,e),this.vertexArray=void 0),defined(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};var traversalQueueScratch=new Queue;function visitRenderedTiles(e,t,i,r,n,a,o,s,l){if(void 0!==r){for(var c=r;c&&(c._lastSelectionResultFrame!==n||TileSelectionResult.wasKicked(c._lastSelectionResult)||TileSelectionResult.originalResult(c._lastSelectionResult)===TileSelectionResult.CULLED);){if(o)return;var u=c.parent;if(a>=TileEdge.NORTHWEST&&void 0!==u)switch(a){case TileEdge.NORTHWEST:c=c===u.northwestChild?u:void 0;break;case TileEdge.NORTHEAST:c=c===u.northeastChild?u:void 0;break;case TileEdge.SOUTHWEST:c=c===u.southwestChild?u:void 0;break;case TileEdge.SOUTHEAST:c=c===u.southeastChild?u:void 0}else c=u}if(void 0!==c){if(c._lastSelectionResult===TileSelectionResult.RENDERED)return!defined(c.data.vertexArray)&&void visitTile$1(e,t,i,c,a,n,s,l);if(TileSelectionResult.originalResult(r._lastSelectionResult)!==TileSelectionResult.CULLED)switch(a){case TileEdge.WEST:visitRenderedTiles(e,t,i,r.northwestChild,n,a,!0,s,l),visitRenderedTiles(e,t,i,r.southwestChild,n,a,!0,s,l);break;case TileEdge.EAST:visitRenderedTiles(e,t,i,r.southeastChild,n,a,!0,s,l),visitRenderedTiles(e,t,i,r.northeastChild,n,a,!0,s,l);break;case TileEdge.SOUTH:visitRenderedTiles(e,t,i,r.southwestChild,n,a,!0,s,l),visitRenderedTiles(e,t,i,r.southeastChild,n,a,!0,s,l);break;case TileEdge.NORTH:visitRenderedTiles(e,t,i,r.northeastChild,n,a,!0,s,l),visitRenderedTiles(e,t,i,r.northwestChild,n,a,!0,s,l);break;case TileEdge.NORTHWEST:visitRenderedTiles(e,t,i,r.northwestChild,n,a,!0,s,l);break;case TileEdge.NORTHEAST:visitRenderedTiles(e,t,i,r.northeastChild,n,a,!0,s,l);break;case TileEdge.SOUTHWEST:visitRenderedTiles(e,t,i,r.southwestChild,n,a,!0,s,l);break;case TileEdge.SOUTHEAST:visitRenderedTiles(e,t,i,r.southeastChild,n,a,!0,s,l);break;default:throw new DeveloperError("Invalid edge")}}}}function visitTile$1(e,t,i,r,n,a,o,s){var l=r.data;if(void 0===l.fill)l.fill=new TerrainFillMesh(r);else if(l.fill.visitedFrame===a)return;l.fill.enqueuedFrame!==a&&(l.fill.enqueuedFrame=a,l.fill.changedThisFrame=!1,o.enqueue(r)),propagateEdge(e,t,i,r,n,s)}function propagateEdge(e,t,i,r,n,a){var o,s,l,c,u,d=r.data.fill,h=i.data.fill,p=defined(h)?(h.visitedFrame=t.frameNumber,h.changedThisFrame&&(createFillMesh(e,t,i,a),h.changedThisFrame=!1),i.data.fill.mesh):i.data.mesh;switch(n){case TileEdge.WEST:o=d.westMeshes,s=d.westTiles;break;case TileEdge.SOUTH:o=d.southMeshes,s=d.southTiles;break;case TileEdge.EAST:o=d.eastMeshes,s=d.eastTiles;break;case TileEdge.NORTH:o=d.northMeshes,s=d.northTiles;break;case TileEdge.NORTHWEST:return d.changedThisFrame=d.changedThisFrame||d.northwestMesh!==p,d.northwestMesh=p,void(d.northwestTile=i);case TileEdge.NORTHEAST:return d.changedThisFrame=d.changedThisFrame||d.northeastMesh!==p,d.northeastMesh=p,void(d.northeastTile=i);case TileEdge.SOUTHWEST:return d.changedThisFrame=d.changedThisFrame||d.southwestMesh!==p,d.southwestMesh=p,void(d.southwestTile=i);case TileEdge.SOUTHEAST:return d.changedThisFrame=d.changedThisFrame||d.southeastMesh!==p,d.southeastMesh=p,void(d.southeastTile=i)}if(i.level<=r.level)return d.changedThisFrame=d.changedThisFrame||o[0]!==p||1!==o.length,o[0]=p,s[0]=i,o.length=1,void(s.length=1);var m,f=i.rectangle,g=r.rectangle;switch(n){case TileEdge.WEST:for(m=(g.north-g.south)*CesiumMath.EPSILON5,l=0;l=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<=n&&o=r.x&&r.x>=u&&n!==r.x&&pointInTriangle(a>2&r)<>>0}function convertIJtoSTMinimum(e){return 1/S2_LIMIT_IJ*e}function generateLookupCell(e,t,i,r,n,a){var o;e===S2_LOOKUP_BITS?(S2_LOOKUP_POSITIONS[((o=(t<monthLengths[s]||13<=s;)o>monthLengths[s]&&(o-=monthLengths[s],++s),13<=s&&(--s,l+=Math.floor(s/12),s%=12,++s),monthLengths[2]=isLeapYear(l)?29:28;return scratchGregorianDate.millisecond=r,scratchGregorianDate.second=n,scratchGregorianDate.minute=a,scratchGregorianDate.hour=e,scratchGregorianDate.day=o,scratchGregorianDate.month=s,scratchGregorianDate.year=l,JulianDate.fromGregorianDate(scratchGregorianDate,i)}var scratchJulianDate$2=new JulianDate,durationRegex=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function parseDuration(e,t){if(defined(e)&&0!==e.length){if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,"P"===e[t.millisecond=0]){var i=e.match(durationRegex);if(!defined(i))return;defined(i[1])&&(t.year=Number(i[1].replace(",","."))),defined(i[2])&&(t.month=Number(i[2].replace(",","."))),defined(i[3])&&(t.day=7*Number(i[3].replace(",","."))),defined(i[4])&&(t.day+=Number(i[4].replace(",","."))),defined(i[5])&&(t.hour=Number(i[5].replace(",","."))),defined(i[6])&&(t.minute=Number(i[6].replace(",","."))),defined(i[7])&&(i=Number(i[7].replace(",",".")),t.second=Math.floor(i),t.millisecond=i%1*1e3)}else"Z"!==e[e.length-1]&&(e+="Z"),JulianDate.toGregorianDate(JulianDate.fromIso8601(e,scratchJulianDate$2),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}}var scratchDuration=new GregorianDate;TimeIntervalCollection.fromIso8601=function(e,t){var i=e.iso8601.split("/"),r=JulianDate.fromIso8601(i[0]),n=JulianDate.fromIso8601(i[1]),a=[];if(parseDuration(i[2],scratchDuration)){var o=JulianDate.clone(r);for(a.push(o);JulianDate.compare(o,n)<0;){o=addToDate(o,scratchDuration);JulianDate.compare(n,o)<=0&&JulianDate.clone(n,o),a.push(o)}}else a.push(r,n);return TimeIntervalCollection.fromJulianDateArray({julianDates:a,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},TimeIntervalCollection.fromIso8601DateArray=function(e,t){return TimeIntervalCollection.fromJulianDateArray({julianDates:e.iso8601Dates.map(function(e){return JulianDate.fromIso8601(e)}),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},TimeIntervalCollection.fromIso8601DurationArray=function(e,t){for(var i,r,n=e.epoch,a=e.iso8601Durations,o=defaultValue(e.relativeToPrevious,!1),s=[],l=a.length,c=0;c>>StencilConstants$1.SKIP_LOD_BIT_SHIFT}function getTranslucentRenderState$2(e){e=clone$1(e,!0);return e.cull.enabled=!1,e.depthTest.enabled=!0,e.depthMask=!1,e.blending=BlendingState$1.ALPHA_BLEND,e.stencilTest=StencilConstants$1.setCesium3DTileBit(),e.stencilMask=StencilConstants$1.CESIUM_3D_TILE_MASK,RenderState.fromCache(e)}function getOpaqueRenderState(e){e=clone$1(e,!0);return e.stencilTest=StencilConstants$1.setCesium3DTileBit(),e.stencilMask=StencilConstants$1.CESIUM_3D_TILE_MASK,RenderState.fromCache(e)}function Cesium3DTileFeature(e,t){this._content=e,this._batchId=t,this._color=void 0}function Cesium3DTileFeatureTable(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function getTypedArrayFromBinary(e,t,i,r,n,a){var o=e._cachedTypedArrays,s=o[t];return defined(s)||(s=ComponentDatatype$1.createArrayBufferView(i,e.buffer.buffer,e.buffer.byteOffset+a,n*r),o[t]=s),s}function getTypedArrayFromArray(e,t,i,r){var n=e._cachedTypedArrays,e=n[t];return defined(e)||(e=ComponentDatatype$1.createTypedArray(i,r),n[t]=e),e}function addToArray(e,t,i){if(i=defaultValue(i,!1)){i=e.indexOf(t);if(-1r&&e.inverseBindMatrices--}),ForEach.animation(e,function(e){ForEach.animationSampler(e,function(e){defined(e.input)&&e.input>r&&e.input--,defined(e.output)&&e.output>r&&e.output--})})},Remove.buffer=function(e,t){e.buffers.splice(t,1),ForEach.bufferView(e,function(e){defined(e.buffer)&&e.buffer>t&&e.buffer--})},Remove.bufferView=function(e,i){e.bufferViews.splice(i,1),ForEach.accessor(e,function(e){defined(e.bufferView)&&e.bufferView>i&&e.bufferView--}),ForEach.shader(e,function(e){defined(e.bufferView)&&e.bufferView>i&&e.bufferView--}),ForEach.image(e,function(e){defined(e.bufferView)&&e.bufferView>i&&e.bufferView--,ForEach.compressedImage(e,function(e){var t=e.bufferView;defined(t)&&i>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}function matchAndStoreCoordinates(e,t,i,r,n,a,o){var s=o?1:0,l=n?1:0,c=computeOrderMask(e,t,s,l,0);if(0===c)return t;var u=n?1:0,d=a?1:0,h=computeOrderMask(e,i,0,u,d);if(0===h)return i;var p=o?1:0,n=a?1:0,o=computeOrderMask(e,r,p,0,n);if(0===o)return r;var m,f,g,a=c&h&o;if(1&a)m=0,f=1,g=2;else if(2&a)m=0,g=1,f=2;else if(4&a)f=0,m=1,g=2;else if(8&a)f=0,g=1,m=2;else if(16&a)g=0,m=1,f=2;else{if(!(32&a)){c=popcount0to63(c),h=popcount0to63(h),o=popcount0to63(o);return c=o&&(a[r++]=[t[0],t[1]]);return a.length=r,a});return{type:"Topology",transform:e.transform,bbox:e.bbox,objects:e.objects,arcs:t}},e.sphericalRingArea=function(e,t){return e=W(e,!0),t&&(e*=-1),2*(e<0?V+e:e)},e.sphericalTriangleArea=function(e){return 2*U(W(e,!1))},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?q23(exports):q23(p23.topojson=p23.topojson||{});var topojson=tmp$4.topojson;function defaultCrsFunction(e){return Cartesian3.fromDegrees(e[0],e[1],e[2])}var crsNames={"urn:ogc:def:crs:OGC:1.3:CRS84":defaultCrsFunction,"EPSG:4326":defaultCrsFunction,"urn:ogc:def:crs:EPSG::4326":defaultCrsFunction},crsLinkHrefs={},crsLinkTypes={},defaultMarkerSize=48,defaultMarkerSymbol,defaultMarkerColor=Color.ROYALBLUE,defaultStroke=Color.YELLOW,defaultStrokeWidth=2,defaultFill=Color.fromBytes(255,255,0,100),defaultClampToGround=!1,sizes={small:24,medium:48,large:64},simpleStyleIdentifiers=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function defaultDescribe(e,t){var i,r,n="";for(i in e)!e.hasOwnProperty(i)||i===t||-1!==simpleStyleIdentifiers.indexOf(i)||defined(r=e[i])&&(n+="object"==typeof r?" ":""+i+" "+defaultDescribe(r)+" ");return n=0"+i+" "+r+" >16,e=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&e)>>11,(2016&e)>>5,2*(31&e),0)}catch(e){}}(e.lastModDateRaw),1!=(1&e.bitFlag)?(!r&&8==(8&e.bitFlag)||(e.crc32=t.view.getUint32(i+10,!0),e.compressedSize=t.view.getUint32(i+14,!0),e.uncompressedSize=t.view.getUint32(i+18,!0)),4294967295!==e.compressedSize&&4294967295!==e.uncompressedSize?(e.filenameLength=t.view.getUint16(i+22,!0),e.extraFieldLength=t.view.getUint16(i+24,!0)):n(s)):n(o)}function T(T,c){function u(){}return u.prototype.getData=function(m,r,f,g){var _,y=this;function n(e,t){_&&_.terminate(),_=null,e&&e(t)}function C(e,t){var i;g&&(i=t,(t=P(4)).view.setUint32(0,i),y.crc32!=t.view.getUint32(0))?v():m.getData(function(e){n(r,e)})}function v(){n(c,t)}function S(){n(c,"Error while writing file data.")}T.readUint8Array(y.offset,30,function(e){var p,e=P(e.length,e);1347093252==e.view.getUint32(0)?(I(y,e,4,!1,c),p=y.offset+30+y.filenameLength+y.extraFieldLength,m.init(function(){function e(e,t){o&&!e&&h.append(t)}function t(e){s(e,h.get())}var i,r,n,a,o,s,l,c,u,d,h;0===y.compressionMethod?D(T,m,p,y.compressedSize,g,C,f,v,S):(i=T,r=m,n=p,a=y.compressedSize,o=g,s=C,l=f,c=v,u=S,h=new E,b.zip.useWebWorkers?A(d=new Worker(b.zip.workerScriptsPath+x),i,r,n,a,e,l,t,c,u):w(new b.zip.Inflater,i,r,n,a,e,l,t,c,u),_=d)},S)):c(d)},v)},{getEntries:function(l){T.size<22?c(d):function t(i,r){T.readUint8Array(T.size-i,i,function(e){1347093766!=(e=P(e.length,e).view).getUint32(0)?t(i+1,r):r(e)},function(){c(n)})}(22,function(e){var t=e.getUint32(16,!0),s=e.getUint16(8,!0);T.readUint8Array(t,T.size-t,function(e){for(var t,i,r=0,n=[],a=P(e.length,e),o=0;o'),this._tilingScheme=new WebMercatorTilingScheme({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._errorEvent=new Event,this._ready=!1,this._readyPromise=when.defer();e=this._tileProtocol;defined(e)?0>>1^3988292384:t>>>=1;i[r]=t}return i}(),(r.prototype=new i).constructor=r,(c.prototype=new i).constructor=c,(u.prototype=new i).constructor=u,p.prototype.getData=function(e){e(this.data)},(m.prototype=new p).constructor=m,(f.prototype=new p).constructor=f,y.prototype=new p,b.zip={Reader:i,Writer:p,BlobReader:u,Data64URIReader:c,TextReader:r,BlobWriter:y.prototype.constructor=y,Data64URIWriter:f,TextWriter:m,createReader:function(e,t,i){e.init(function(){t(T(e,i))},i)},createWriter:function(e,t,i,r){e.init(function(){t(L(e,i,r))},i)},useWebWorkers:!0},Object.defineProperties(b.zip,{workerScriptsPath:{get:function(){return e=void 0===e?buildModuleUrl("ThirdParty/Workers/"):e}}})}(tmp$2);var zip=tmp$2.zip;function KmlLookAt(e,t){this.position=e,this.headingPitchRange=t}function KmlTour(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new Event,this.tourEnd=new Event,this.entryStart=new Event,this.entryEnd=new Event,this._activeEntries=[]}function cancelAllEntries(e){for(var t=e.pop();void 0!==t;t=e.pop())t.stop()}function playEntry(e,t,i){var r,n,a=this.playlist[this.playlistIndex];a?(r=playNext.bind(this,e,t,i),this._activeEntries.push(a),this.entryStart.raiseEvent(a),a.blocking?a.play(r,e.scene.camera,t):(n=this,a.play(function(){n.entryEnd.raiseEvent(a);var e=n._activeEntries.indexOf(a);0<=e&&n._activeEntries.splice(e,1)}),r(e,t,i))):defined(i)&&i(!1)}function playNext(e,t,i,r){var n=this.playlist[this.playlistIndex];this.entryEnd.raiseEvent(n,r),r?i(r):(0<=(n=this._activeEntries.indexOf(n))&&this._activeEntries.splice(n,1),this.playlistIndex++,playEntry.call(this,e,t,i))}function KmlTourFlyTo(e,t,i){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=i,this.flyToMode=t}function KmlTourWait(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}KmlTour.prototype.addPlaylistEntry=function(e){this.playlist.push(e)},KmlTour.prototype.play=function(e,t){this.tourStart.raiseEvent();var i=this;playEntry.call(this,e,t,function(e){i.playlistIndex=0,e||cancelAllEntries(i._activeEntries),i.tourEnd.raiseEvent(e)})},KmlTour.prototype.stop=function(){cancelAllEntries(this._activeEntries)},KmlTourFlyTo.prototype.play=function(t,e,i){var r;this.activeCamera=e,defined(t)&&null!==t&&((r=this).activeCallback=function(e){delete r.activeCallback,delete r.activeCamera,t(!defined(e)&&e)});var n=this.getCameraOptions(i);this.view.headingPitchRoll?e.flyTo(n):this.view.headingPitchRange&&(i=new BoundingSphere(this.view.position),e.flyToBoundingSphere(i,n))},KmlTourFlyTo.prototype.stop=function(){defined(this.activeCamera)&&this.activeCamera.cancelFlight(),defined(this.activeCallback)&&this.activeCallback(!0)},KmlTourFlyTo.prototype.getCameraOptions=function(e){var t={duration:this.duration};return defined(this.activeCallback)&&(t.complete=this.activeCallback),"smooth"===this.flyToMode&&(t.easingFunction=EasingFunction$1.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),t=defined(e)?combine$2(t,e):t},KmlTourWait.prototype.play=function(e){var t=this;this.activeCallback=e,this.timeout=setTimeout(function(){delete t.activeCallback,e(!1)},1e3*this.duration)},KmlTourWait.prototype.stop=function(){clearTimeout(this.timeout),defined(this.activeCallback)&&this.activeCallback(!0)};var MimeTypes={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){e=getExtensionFromUri(e=e.toLowerCase());return MimeTypes[e]}},parser;"undefined"!=typeof DOMParser&&(parser=new DOMParser);var autolinker=new Autolinker({stripPrefix:!1,email:!1,replaceFn:function(e){if(!e.protocolUrlMatch)return!1}}),BILLBOARD_SIZE$1=32,BILLBOARD_NEAR_DISTANCE=2414016,BILLBOARD_NEAR_RATIO=1,BILLBOARD_FAR_DISTANCE=16093e3,BILLBOARD_FAR_RATIO=.1,kmlNamespaces=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],gxNamespaces=["http://www.google.com/kml/ext/2.2"],atomNamespaces=["http://www.w3.org/2005/Atom"],namespaces={kml:kmlNamespaces,gx:gxNamespaces,atom:atomNamespaces,kmlgx:kmlNamespaces.concat(gxNamespaces)},featureTypes={Document:processDocument,Folder:processFolder,Placemark:processPlacemark,NetworkLink:processNetworkLink,GroundOverlay:processGroundOverlay,PhotoOverlay:processUnsupportedFeature,ScreenOverlay:processUnsupportedFeature,Tour:processTour};function DeferredLoading(e){this._dataSource=e,this._deferred=when.defer(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}function isZipFile(e){var e=e.slice(0,Math.min(4,e.size)),t=when.defer(),i=new FileReader;return i.addEventListener("load",function(){t.resolve(1347093252===new DataView(i.result).getUint32(0,!1))}),i.addEventListener("error",function(){t.reject(i.error)}),i.readAsArrayBuffer(e),t.promise}function readBlobAsText(e){var t=when.defer(),i=new FileReader;return i.addEventListener("load",function(){t.resolve(i.result)}),i.addEventListener("error",function(){t.reject(i.error)}),i.readAsText(e),t.promise}function insertNamespaces(e){var t,i,r,n,a={xsi:"http://www.w3.org/2001/XMLSchema-instance"};for(n in a)a.hasOwnProperty(n)&&(r="xmlns:"+n+"=",RegExp("[< ]"+n+":").test(e)&&-1===e.indexOf(r)&&(defined(t)||(t=e.substr(0,e.indexOf(""+defaultValue((p=l[a=o[y]]).displayName,a)+" "+defaultValue(p.value,"")+" ";d+=" ":""+i+" "+e(r)+" ");return n+=""}(e)},Object.defineProperties(ImageryProvider.prototype,{ready:{get:DeveloperError.throwInstantiationError},readyPromise:{get:DeveloperError.throwInstantiationError},rectangle:{get:DeveloperError.throwInstantiationError},tileWidth:{get:DeveloperError.throwInstantiationError},tileHeight:{get:DeveloperError.throwInstantiationError},maximumLevel:{get:DeveloperError.throwInstantiationError},minimumLevel:{get:DeveloperError.throwInstantiationError},tilingScheme:{get:DeveloperError.throwInstantiationError},tileDiscardPolicy:{get:DeveloperError.throwInstantiationError},errorEvent:{get:DeveloperError.throwInstantiationError},credit:{get:DeveloperError.throwInstantiationError},proxy:{get:DeveloperError.throwInstantiationError},hasAlphaChannel:{get:DeveloperError.throwInstantiationError}}),ImageryProvider.prototype.getTileCredits=function(e,t,i){DeveloperError.throwInstantiationError()},ImageryProvider.prototype.requestImage=function(e,t,i,r){DeveloperError.throwInstantiationError()},ImageryProvider.prototype.pickFeatures=function(e,t,i,r,n){DeveloperError.throwInstantiationError()};var ktxRegex=/\.ktx$/i,crnRegex=/\.crn$/i;function ArcGisMapServerImageryProvider(n){n=defaultValue(n,defaultValue.EMPTY_OBJECT),this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var e=Resource.createIfNeeded(n.url);e.appendForwardSlash(),defined(n.token)&&e.setQueryParameters({token:n.token}),this._resource=e,this._tileDiscardPolicy=n.tileDiscardPolicy,this._tileWidth=defaultValue(n.tileWidth,256),this._tileHeight=defaultValue(n.tileHeight,256),this._maximumLevel=n.maximumLevel,this._tilingScheme=defaultValue(n.tilingScheme,new GeographicTilingScheme({ellipsoid:n.ellipsoid})),this._useTiles=defaultValue(n.usePreCachedTilesIfAvailable,!0),this._rectangle=defaultValue(n.rectangle,this._tilingScheme.rectangle),this._layers=n.layers;e=n.credit;"string"==typeof e&&(e=new Credit(e)),this._credit=e,this.enablePickFeatures=defaultValue(n.enablePickFeatures,!0),this._errorEvent=new Event,this._ready=!1,this._readyPromise=when.defer();var a,o=this;function t(e){var t=e.tileInfo;if(defined(t)){if(o._tileWidth=t.rows,o._tileHeight=t.cols,102100===t.spatialReference.wkid||102113===t.spatialReference.wkid)o._tilingScheme=new WebMercatorTilingScheme({ellipsoid:n.ellipsoid});else{if(4326!==e.tileInfo.spatialReference.wkid){var i="Tile spatial reference WKID "+e.tileInfo.spatialReference.wkid+" is not supported.";return void(a=TileProviderError.handleError(a,o,o._errorEvent,i,void 0,void 0,void 0,s))}o._tilingScheme=new GeographicTilingScheme({ellipsoid:n.ellipsoid})}if(o._maximumLevel=e.tileInfo.lods.length-1,defined(e.fullExtent)){if(defined(e.fullExtent.spatialReference)&&defined(e.fullExtent.spatialReference.wkid))if(102100===e.fullExtent.spatialReference.wkid||102113===e.fullExtent.spatialReference.wkid){var t=new WebMercatorProjection,r=e.fullExtent,i=t.unproject(new Cartesian3(Math.max(r.xmin,-o._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(r.ymin,-o._tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),r=t.unproject(new Cartesian3(Math.min(r.xmax,o._tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(r.ymax,o._tilingScheme.ellipsoid.maximumRadius*Math.PI),0));o._rectangle=new Rectangle(i.longitude,i.latitude,r.longitude,r.latitude)}else{if(4326!==e.fullExtent.spatialReference.wkid){r="fullExtent.spatialReference WKID "+e.fullExtent.spatialReference.wkid+" is not supported.";return void(a=TileProviderError.handleError(a,o,o._errorEvent,r,void 0,void 0,void 0,s))}o._rectangle=Rectangle.fromDegrees(e.fullExtent.xmin,e.fullExtent.ymin,e.fullExtent.xmax,e.fullExtent.ymax)}}else o._rectangle=o._tilingScheme.rectangle;defined(o._tileDiscardPolicy)||(o._tileDiscardPolicy=new DiscardMissingTileImagePolicy({missingImageUrl:buildImageResource$3(o,0,0,o._maximumLevel).url,pixelsToCheck:[new Cartesian2(0,0),new Cartesian2(200,20),new Cartesian2(20,200),new Cartesian2(80,110),new Cartesian2(160,130)],disableCheckIfAllPixelsAreTransparent:!0})),o._useTiles=!0}else o._useTiles=!1;defined(e.copyrightText)&&0"+i+" "+r+" (e=CesiumMath.equalsEpsilon(e,CesiumMath.TWO_PI,CesiumMath.EPSILON11)?0:e)+Math.PI?e+=CesiumMath.TWO_PI:tr&&(Cartesian3.normalize(n.position,n.position),Cartesian3.multiplyByScalar(n.position,Math.sqrt(r),n.position)),r=Cartesian3.angleBetween(u,n.position),u=Cartesian3.cross(u,n.position,u),Cartesian3.normalize(u,u),r=Quaternion.fromAxisAngle(u,r,rotateCVQuaternion),r=Matrix3.fromQuaternion(r,rotateCVMatrix),Matrix3.multiplyByVector(r,n.direction,n.direction),Matrix3.multiplyByVector(r,n.up,n.up),Cartesian3.cross(n.direction,n.up,n.right),Cartesian3.cross(n.right,n.direction,n.up),n._setTransform(l))}var zoomCVWindowPos=new Cartesian2,zoomCVWindowRay=new Ray,zoomCVIntersection=new Cartesian3;function zoomCV(e,t,i){defined(i.distance)&&(i=i.distance);var r,n=e._scene,a=n.camera,o=n.canvas,s=e._cameraUnderground;s?r=t:((r=zoomCVWindowPos).x=o.clientWidth/2,r.y=o.clientHeight/2);var l,c,u,d=a.getPickRay(r,zoomCVWindowRay),n=d.origin,o=d.direction;defined(l=a.position.z>3]:E)?(s&&(s[P]=1),m=(a=w.encoding<2?T[b++]:x)>>32-T,_[s=32-S>>32-b,32-S>>64-S-b),r=y,d=0;d>>b-d-1&1?r.right:r.left).left&&!r.right){n=r.val,S=S+d+1;break}32<=S&&(S-=32,A=C[++v]),a=n-x,w?(a+=!(0>>32-b,32-S>>64-S-b),r=y,d=0;d>>b-d-1&1?r.right:r.left).left&&!r.right){n=r.val,S=S+d+1;break}32<=S&&(S-=32,A=C[++v]),a=n-x,w?(!(0
"],i=[1,""],l={thead:e,tbody:e,tfoot:e,tr:[2,""," ","
"],td:t,th:t,option:i,optgroup:i},c=8>=I.a.W;I.a.ua=function(e,t){var i;if(b){if(b.parseHTML)i=b.parseHTML(e,t)||[];else if((i=b.clean([e],t))&&i[0]){for(var r=i[0];r.parentNode&&11!==r.parentNode.nodeType;)r=r.parentNode;r.parentNode&&r.parentNode.removeChild(r)}}else{(i=t)||(i=T);var r=i.parentWindow||i.defaultView||S,n=I.a.Db(e).toLowerCase(),a=i.createElement("div"),o;o=(n=n.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&l[n[1]]||s;n=o[0];o="ignoredt;t++)e=e();return e})};I.toJSON=function(e,t,i){e=I.ad(e);return I.a.hc(e,t,i)};t.prototype={constructor:t,save:function(e,t){var i=I.a.A(this.keys,e);0<=i?this.values[i]=t:(this.keys.push(e),this.values.push(t))},get:function(e){e=I.a.A(this.keys,e);return 0<=e?this.values[e]:R}}}(),I.b("toJS",I.ad),I.b("toJSON",I.toJSON),I.Wd=function(r,e,n){function t(t){var e=I.xb(r,n).extend({ma:"always"}),i=e.subscribe(function(e){e&&(i.s(),t(e))});e.notifySubscribers(e.v());return i}return"function"!==typeof Promise||e?t(e.bind(n)):new Promise(t)},I.b("when",I.Wd),function(){I.w={M:function(e){switch(I.a.R(e)){case"option":return!0===e.__ko__hasDomDataOptionValue__?I.a.g.get(e,I.c.options.$b):7>=I.a.W?e.getAttributeNode("value")&&e.getAttributeNode("value").specified?e.value:e.text:e.value;case"select":return 0<=e.selectedIndex?I.w.M(e.options[e.selectedIndex]):R;default:return e.value}},cb:function(e,t,i){switch(I.a.R(e)){case"option":"string"===typeof t?(I.a.g.set(e,I.c.options.$b,R),"__ko__hasDomDataOptionValue__"in e&&delete e.__ko__hasDomDataOptionValue__,e.value=t):(I.a.g.set(e,I.c.options.$b,t),e.__ko__hasDomDataOptionValue__=!0,e.value="number"===typeof t?t:"");break;case"select":if(""===t||null===t)t=R;for(var r=-1,n=0,a=e.options.length,o;n=a){t.push(r&&n.length?{key:r,value:n.join("")}:{unknown:r||n.join("")});r=a=0;n=[];continue}}else if(58===l){if(!a&&!r&&1===n.length){r=n.pop();continue}}else if(47===l&&1Loading...