earthsdk3-cesium 3.7.0-beta.17 → 3.7.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/vectorTilesWorker-CZBAZO7x.js +1 -0
- package/dist/earthsdk3-cesium.iife.js +107 -107
- package/dist/earthsdk3-cesium.js +7231 -7211
- package/dist/earthsdk3-cesium.umd.cjs +106 -106
- package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/WorkerPool.d.ts +1 -1
- package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/type.d.ts +18 -0
- package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/utils.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){"use strict";const N=23283064365386963e-26,X=12,O=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),A=0,L=1,E=2,b=5;class ${constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(t,e,n=this.length){for(;this.pos<n;){const s=this.readVarint(),r=s>>3,o=this.pos;this.type=s&7,t(r,e,this),this.pos===o&&this.skip(s)}return e}readMessage(t,e){return this.readFields(t,e,this.readVarint()+this.pos)}readFixed32(){const t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){const t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*4294967296;return this.pos+=8,t}readSFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*4294967296;return this.pos+=8,t}readFloat(){const t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){const t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){const e=this.buf;let n,s;return s=e[this.pos++],n=s&127,s<128||(s=e[this.pos++],n|=(s&127)<<7,s<128)||(s=e[this.pos++],n|=(s&127)<<14,s<128)||(s=e[this.pos++],n|=(s&127)<<21,s<128)?n:(s=e[this.pos],n|=(s&15)<<28,j(n,t,this))}readVarint64(){return this.readVarint(!0)}readSVarint(){const t=this.readVarint();return t%2===1?(t+1)/-2:t/2}readBoolean(){return!!this.readVarint()}readString(){const t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=X&&O?O.decode(this.buf.subarray(e,t)):rt(this.buf,e,t)}readBytes(){const t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e}readPackedVarint(t=[],e){const n=this.readPackedEnd();for(;this.pos<n;)t.push(this.readVarint(e));return t}readPackedSVarint(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readSVarint());return t}readPackedBoolean(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readBoolean());return t}readPackedFloat(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readFloat());return t}readPackedDouble(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readDouble());return t}readPackedFixed32(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readFixed32());return t}readPackedSFixed32(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readSFixed32());return t}readPackedFixed64(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readFixed64());return t}readPackedSFixed64(t=[]){const e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readSFixed64());return t}readPackedEnd(){return this.type===E?this.readVarint()+this.pos:this.pos+1}skip(t){const e=t&7;if(e===A)for(;this.buf[this.pos++]>127;);else if(e===E)this.pos=this.readVarint()+this.pos;else if(e===b)this.pos+=4;else if(e===L)this.pos+=8;else throw new Error(`Unimplemented type: ${e}`)}writeTag(t,e){this.writeVarint(t<<3|e)}realloc(t){let e=this.length||16;for(;e<this.pos+t;)e*=2;if(e!==this.length){const n=new Uint8Array(e);n.set(this.buf),this.buf=n,this.dataView=new DataView(n.buffer),this.length=e}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(t){this.realloc(4),this.dataView.setInt32(this.pos,t,!0),this.pos+=4}writeSFixed32(t){this.realloc(4),this.dataView.setInt32(this.pos,t,!0),this.pos+=4}writeFixed64(t){this.realloc(8),this.dataView.setInt32(this.pos,t&-1,!0),this.dataView.setInt32(this.pos+4,Math.floor(t*N),!0),this.pos+=8}writeSFixed64(t){this.realloc(8),this.dataView.setInt32(this.pos,t&-1,!0),this.dataView.setInt32(this.pos+4,Math.floor(t*N),!0),this.pos+=8}writeVarint(t){if(t=+t||0,t>268435455||t<0){W(t,this);return}this.realloc(4),this.buf[this.pos++]=t&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=t>>>7&127)))}writeSVarint(t){this.writeVarint(t<0?-t*2-1:t*2)}writeBoolean(t){this.writeVarint(+t)}writeString(t){t=String(t),this.realloc(t.length*4),this.pos++;const e=this.pos;this.pos=ot(this.buf,t,this.pos);const n=this.pos-e;n>=128&&H(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8}writeBytes(t){const e=t.length;this.writeVarint(e),this.realloc(e);for(let n=0;n<e;n++)this.buf[this.pos++]=t[n]}writeRawMessage(t,e){this.pos++;const n=this.pos;t(e,this);const s=this.pos-n;s>=128&&H(n,s,this),this.pos=n-1,this.writeVarint(s),this.pos+=s}writeMessage(t,e,n){this.writeTag(t,E),this.writeRawMessage(e,n)}writePackedVarint(t,e){e.length&&this.writeMessage(t,J,e)}writePackedSVarint(t,e){e.length&&this.writeMessage(t,K,e)}writePackedBoolean(t,e){e.length&&this.writeMessage(t,tt,e)}writePackedFloat(t,e){e.length&&this.writeMessage(t,Q,e)}writePackedDouble(t,e){e.length&&this.writeMessage(t,Z,e)}writePackedFixed32(t,e){e.length&&this.writeMessage(t,et,e)}writePackedSFixed32(t,e){e.length&&this.writeMessage(t,it,e)}writePackedFixed64(t,e){e.length&&this.writeMessage(t,st,e)}writePackedSFixed64(t,e){e.length&&this.writeMessage(t,nt,e)}writeBytesField(t,e){this.writeTag(t,E),this.writeBytes(e)}writeFixed32Field(t,e){this.writeTag(t,b),this.writeFixed32(e)}writeSFixed32Field(t,e){this.writeTag(t,b),this.writeSFixed32(e)}writeFixed64Field(t,e){this.writeTag(t,L),this.writeFixed64(e)}writeSFixed64Field(t,e){this.writeTag(t,L),this.writeSFixed64(e)}writeVarintField(t,e){this.writeTag(t,A),this.writeVarint(e)}writeSVarintField(t,e){this.writeTag(t,A),this.writeSVarint(e)}writeStringField(t,e){this.writeTag(t,E),this.writeString(e)}writeFloatField(t,e){this.writeTag(t,b),this.writeFloat(e)}writeDoubleField(t,e){this.writeTag(t,L),this.writeDouble(e)}writeBooleanField(t,e){this.writeVarintField(t,+e)}}function j(i,t,e){const n=e.buf;let s,r;if(r=n[e.pos++],s=(r&112)>>4,r<128||(r=n[e.pos++],s|=(r&127)<<3,r<128)||(r=n[e.pos++],s|=(r&127)<<10,r<128)||(r=n[e.pos++],s|=(r&127)<<17,r<128)||(r=n[e.pos++],s|=(r&127)<<24,r<128)||(r=n[e.pos++],s|=(r&1)<<31,r<128))return m(i,s,t);throw new Error("Expected varint not more than 10 bytes")}function m(i,t,e){return e?t*4294967296+(i>>>0):(t>>>0)*4294967296+(i>>>0)}function W(i,t){let e,n;if(i>=0?(e=i%4294967296|0,n=i/4294967296|0):(e=~(-i%4294967296),n=~(-i/4294967296),e^4294967295?e=e+1|0:(e=0,n=n+1|0)),i>=18446744073709552e3||i<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),Y(e,n,t),z(n,t)}function Y(i,t,e){e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos]=i&127}function z(i,t){const e=(i&7)<<4;t.buf[t.pos++]|=e|((i>>>=3)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127)))))}function H(i,t,e){const n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7));e.realloc(n);for(let s=e.pos-1;s>=i;s--)e.buf[s+n]=e.buf[s]}function J(i,t){for(let e=0;e<i.length;e++)t.writeVarint(i[e])}function K(i,t){for(let e=0;e<i.length;e++)t.writeSVarint(i[e])}function Q(i,t){for(let e=0;e<i.length;e++)t.writeFloat(i[e])}function Z(i,t){for(let e=0;e<i.length;e++)t.writeDouble(i[e])}function tt(i,t){for(let e=0;e<i.length;e++)t.writeBoolean(i[e])}function et(i,t){for(let e=0;e<i.length;e++)t.writeFixed32(i[e])}function it(i,t){for(let e=0;e<i.length;e++)t.writeSFixed32(i[e])}function st(i,t){for(let e=0;e<i.length;e++)t.writeFixed64(i[e])}function nt(i,t){for(let e=0;e<i.length;e++)t.writeSFixed64(i[e])}function rt(i,t,e){let n="",s=t;for(;s<e;){const r=i[s];let o=null,l=r>239?4:r>223?3:r>191?2:1;if(s+l>e)break;let a,c,d;l===1?r<128&&(o=r):l===2?(a=i[s+1],(a&192)===128&&(o=(r&31)<<6|a&63,o<=127&&(o=null))):l===3?(a=i[s+1],c=i[s+2],(a&192)===128&&(c&192)===128&&(o=(r&15)<<12|(a&63)<<6|c&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):l===4&&(a=i[s+1],c=i[s+2],d=i[s+3],(a&192)===128&&(c&192)===128&&(d&192)===128&&(o=(r&15)<<18|(a&63)<<12|(c&63)<<6|d&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,l=1):o>65535&&(o-=65536,n+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),n+=String.fromCharCode(o),s+=l}return n}function ot(i,t,e){for(let n=0,s,r;n<t.length;n++){if(s=t.charCodeAt(n),s>55295&&s<57344)if(r)if(s<56320){i[e++]=239,i[e++]=191,i[e++]=189,r=s;continue}else s=r-55296<<10|s-56320|65536,r=null;else{s>56319||n+1===t.length?(i[e++]=239,i[e++]=191,i[e++]=189):r=s;continue}else r&&(i[e++]=239,i[e++]=191,i[e++]=189,r=null);s<128?i[e++]=s:(s<2048?i[e++]=s>>6|192:(s<65536?i[e++]=s>>12|224:(i[e++]=s>>18|240,i[e++]=s>>12&63|128),i[e++]=s>>6&63|128),i[e++]=s&63|128)}return e}function F(i,t){this.x=i,this.y=t}F.prototype={clone(){return new F(this.x,this.y)},add(i){return this.clone()._add(i)},sub(i){return this.clone()._sub(i)},multByPoint(i){return this.clone()._multByPoint(i)},divByPoint(i){return this.clone()._divByPoint(i)},mult(i){return this.clone()._mult(i)},div(i){return this.clone()._div(i)},rotate(i){return this.clone()._rotate(i)},rotateAround(i,t){return this.clone()._rotateAround(i,t)},matMult(i){return this.clone()._matMult(i)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(i){return this.x===i.x&&this.y===i.y},dist(i){return Math.sqrt(this.distSqr(i))},distSqr(i){const t=i.x-this.x,e=i.y-this.y;return t*t+e*e},angle(){return Math.atan2(this.y,this.x)},angleTo(i){return Math.atan2(this.y-i.y,this.x-i.x)},angleWith(i){return this.angleWithSep(i.x,i.y)},angleWithSep(i,t){return Math.atan2(this.x*t-this.y*i,this.x*i+this.y*t)},_matMult(i){const t=i[0]*this.x+i[1]*this.y,e=i[2]*this.x+i[3]*this.y;return this.x=t,this.y=e,this},_add(i){return this.x+=i.x,this.y+=i.y,this},_sub(i){return this.x-=i.x,this.y-=i.y,this},_mult(i){return this.x*=i,this.y*=i,this},_div(i){return this.x/=i,this.y/=i,this},_multByPoint(i){return this.x*=i.x,this.y*=i.y,this},_divByPoint(i){return this.x/=i.x,this.y/=i.y,this},_unit(){return this._div(this.mag()),this},_perp(){const i=this.y;return this.y=this.x,this.x=-i,this},_rotate(i){const t=Math.cos(i),e=Math.sin(i),n=t*this.x-e*this.y,s=e*this.x+t*this.y;return this.x=n,this.y=s,this},_rotateAround(i,t){const e=Math.cos(i),n=Math.sin(i),s=t.x+e*(this.x-t.x)-n*(this.y-t.y),r=t.y+n*(this.x-t.x)+e*(this.y-t.y);return this.x=s,this.y=r,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:F},F.convert=function(i){if(i instanceof F)return i;if(Array.isArray(i))return new F(+i[0],+i[1]);if(i.x!==void 0&&i.y!==void 0)return new F(+i.x,+i.y);throw new Error("Expected [x, y] or {x, y} point format")};class R{constructor(t,e,n,s,r){this.properties={},this.extent=n,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=s,this._values=r,t.readFields(ht,this,e)}loadGeometry(){const t=this._pbf;t.pos=this._geometry;const e=t.readVarint()+t.pos,n=[];let s,r=1,o=0,l=0,a=0;for(;t.pos<e;){if(o<=0){const c=t.readVarint();r=c&7,o=c>>3}if(o--,r===1||r===2)l+=t.readSVarint(),a+=t.readSVarint(),r===1&&(s&&n.push(s),s=[]),s&&s.push(new F(l,a));else if(r===7)s&&s.push(s[0].clone());else throw new Error(`unknown command ${r}`)}return s&&n.push(s),n}bbox(){const t=this._pbf;t.pos=this._geometry;const e=t.readVarint()+t.pos;let n=1,s=0,r=0,o=0,l=1/0,a=-1/0,c=1/0,d=-1/0;for(;t.pos<e;){if(s<=0){const h=t.readVarint();n=h&7,s=h>>3}if(s--,n===1||n===2)r+=t.readSVarint(),o+=t.readSVarint(),r<l&&(l=r),r>a&&(a=r),o<c&&(c=o),o>d&&(d=o);else if(n!==7)throw new Error(`unknown command ${n}`)}return[l,c,a,d]}toGeoJSON(t,e,n){const s=this.extent*Math.pow(2,n),r=this.extent*t,o=this.extent*e,l=this.loadGeometry();function a(u){return[(u.x+r)*360/s-180,360/Math.PI*Math.atan(Math.exp((1-(u.y+o)*2/s)*Math.PI))-90]}function c(u){return u.map(a)}let d;if(this.type===1){const u=[];for(const y of l)u.push(y[0]);const f=c(u);d=u.length===1?{type:"Point",coordinates:f[0]}:{type:"MultiPoint",coordinates:f}}else if(this.type===2){const u=l.map(c);d=u.length===1?{type:"LineString",coordinates:u[0]}:{type:"MultiLineString",coordinates:u}}else if(this.type===3){const u=lt(l),f=[];for(const y of u)f.push(y.map(c));d=f.length===1?{type:"Polygon",coordinates:f[0]}:{type:"MultiPolygon",coordinates:f}}else throw new Error("unknown feature type");const h={type:"Feature",geometry:d,properties:this.properties};return this.id!=null&&(h.id=this.id),h}}R.types=["Unknown","Point","LineString","Polygon"];function ht(i,t,e){i===1?t.id=e.readVarint():i===2?at(e,t):i===3?t.type=e.readVarint():i===4&&(t._geometry=e.pos)}function at(i,t){const e=i.readVarint()+i.pos;for(;i.pos<e;){const n=t._keys[i.readVarint()],s=t._values[i.readVarint()];t.properties[n]=s}}function lt(i){const t=i.length;if(t<=1)return[i];const e=[];let n,s;for(let r=0;r<t;r++){const o=dt(i[r]);o!==0&&(s===void 0&&(s=o<0),s===o<0?(n&&e.push(n),n=[i[r]]):n&&n.push(i[r]))}return n&&e.push(n),e}function dt(i){let t=0;for(let e=0,n=i.length,s=n-1,r,o;e<n;s=e++)r=i[e],o=i[s],t+=(o.x-r.x)*(r.y+o.y);return t}class ct{constructor(t,e){this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(ut,this,e),this.length=this._features.length}feature(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];const e=this._pbf.readVarint()+this._pbf.pos;return new R(this._pbf,e,this.extent,this._keys,this._values)}}function ut(i,t,e){i===15?t.version=e.readVarint():i===1?t.name=e.readString():i===5?t.extent=e.readVarint():i===2?t._features.push(e.pos):i===3?t._keys.push(e.readString()):i===4&&t._values.push(ft(e))}function ft(i){let t=null;const e=i.readVarint()+i.pos;for(;i.pos<e;){const n=i.readVarint()>>3;t=n===1?i.readString():n===2?i.readFloat():n===3?i.readDouble():n===4?i.readVarint64():n===5?i.readVarint():n===6?i.readSVarint():n===7?i.readBoolean():null}if(t==null)throw new Error("unknown feature value");return t}class xt{constructor(t,e){this.layers=t.readFields(wt,{},e)}}function wt(i,t,e){if(i===3){const n=new ct(e,e.readVarint()+e.pos);n.length&&(t[n.name]=n)}}self.onmessage=async i=>{if(i.data.type=="requestImage"){const{style:t,size:e,tileData:n,x:s,y:r,z:o}=i.data,l=new OffscreenCanvas(e,e),a=l.getContext("2d");a.translate(0,l.height),a.scale(1,-1);const c=`${o}-${s}-${r}`;if(!n){const h=l.transferToImageBitmap();self.postMessage({bitmap:h,tileKey:c},[h]);return}t.forEach(h=>{var f;const u=(f=n==null?void 0:n.get(h.source))==null?void 0:f.get(h["source-layer"]);u==null||u.forEach(y=>{var B,D,k,I,C,M,S,_,T;const g=y.geometry;g.type==="Polygon"&&(!((B=h==null?void 0:h.polygonStyle)!=null&&B.visibility)||((D=h==null?void 0:h.polygonStyle)==null?void 0:D.visibility)==="visible")&&(h!=null&&h.polygonStyle&&(a.fillStyle=((k=h==null?void 0:h.polygonStyle)==null?void 0:k.color)||"#000000",h.polygonStyle.outlineColor&&(a.strokeStyle=h.polygonStyle.outlineColor)),g.coordinates.forEach(V=>{var w;a.beginPath(),V.forEach((x,p)=>{const[P,v]=q(x[0],x[1],o,s,r);p===0?a.moveTo(P,v):a.lineTo(P,v)}),a.closePath(),a.fill(),(w=h==null?void 0:h.polygonStyle)!=null&&w.outlineColor&&a.stroke()})),g.type==="LineString"&&(!((I=h==null?void 0:h.polylineStyle)!=null&&I.visibility)||((C=h==null?void 0:h.polylineStyle)==null?void 0:C.visibility)==="visible")&&(h!=null&&h.polylineStyle&&(a.strokeStyle=((M=h.polylineStyle)==null?void 0:M.color)||"#000000",a.lineWidth=((S=h.polylineStyle)==null?void 0:S.width)||1,a.lineCap=((_=h.polylineStyle)==null?void 0:_.cap)||"butt",a.lineJoin=((T=h.polylineStyle)==null?void 0:T.join)||"miter"),a.beginPath(),g.coordinates.forEach((V,w)=>{const[x,p]=q(V[0],V[1],o,s,r);w===0?a.moveTo(x,p):a.lineTo(x,p)}),a.stroke())})});const d=l.transferToImageBitmap();self.postMessage({bitmap:d,tileKey:c},[d])}else if(i.data.type=="fetch"){const{type:t,url:e,x:n,y:s,z:r}=i.data;try{const o=await(await fetch(e)).arrayBuffer(),l=new xt(new $(o)),a={};for(const d in l.layers){const h=l.layers[d],u=h.extent||4096,f=[],y=[],g=[],B=[],D=[],k=[],I=[],C=[];for(let M=0;M<h.length;M++){const S=h.feature(M);let _;try{_=S.loadGeometry()}catch(w){console.warn("Invalid geometry, skip feature","type=",S.type,"layer=",d,w);continue}const T=S.type,V=S.properties||{};if(T===1){let w=0,x=0,p=0;for(const pt of _)for(const G of pt)w+=G.x,x+=G.y,p++;if(p===0)continue;const{lon:P,lat:v}=U(w/p,x/p,u,n,s,r);f.push(P,v,0),y.push(V)}else if(T===2){B.push(g.length/3);for(const w of _)for(const x of w){const{lon:p,lat:P}=U(x.x,x.y,u,n,s,r);g.push(p,P,0)}D.push(V)}else if(T===3){I.push(k.length/3);for(const w of _)for(const x of w){const{lon:p,lat:P}=U(x.x,x.y,u,n,s,r);k.push(p,P,0)}C.push(V)}}a[d]={points:new Float32Array(f),pointProps:y,lines:new Float32Array(g),lineOffsets:new Uint32Array(B),lineProps:D,polygons:new Float32Array(k),polygonOffsets:new Uint32Array(I),polygonProps:C}}const c=[];for(const d in a){const h=a[d];c.push(h.points.buffer,h.lines.buffer,h.lineOffsets.buffer,h.polygons.buffer,h.polygonOffsets.buffer)}self.postMessage({url:e,tileData:a},c)}catch(o){self.postMessage({url:e,error:o.message})}}};function U(i,t,e,n,s,r){const o=Math.pow(2,r),l=(n+i/e)/o,a=(s+t/e)/o,c=l*360-180,d=Math.atan(Math.sinh(Math.PI*(1-2*a)))*180/Math.PI;return{lon:c,lat:d}}function q(i,t,e,n,s,r=256,o=4096){const l=i/360+.5,a=Math.sin(t*Math.PI/180),c=.5-.25*Math.log((1+a)/(1-a))/Math.PI,d=1<<e,h=(l-n/d)*d,u=(c-s/d)*d,f=h*o,y=u*o;return[f/o*r,y/o*r]}})();
|