@graphhopper/graphhopper-maps-bundle 0.0.0-dafe37c1 → 0.0.0-db2c83c

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.
Files changed (46) hide show
  1. package/README.md +7 -3
  2. package/dist/assets/android-chrome-144x144.png +0 -0
  3. package/dist/assets/android-chrome-192x192.png +0 -0
  4. package/dist/assets/android-chrome-256x256.png +0 -0
  5. package/dist/assets/android-chrome-36x36.png +0 -0
  6. package/dist/assets/android-chrome-384x384.png +0 -0
  7. package/dist/assets/android-chrome-48x48.png +0 -0
  8. package/dist/assets/android-chrome-512x512.png +0 -0
  9. package/dist/assets/android-chrome-96x96.png +0 -0
  10. package/dist/assets/apple-touch-icon-1024x1024.png +0 -0
  11. package/dist/assets/apple-touch-icon-114x114.png +0 -0
  12. package/dist/assets/apple-touch-icon-120x120.png +0 -0
  13. package/dist/assets/apple-touch-icon-144x144.png +0 -0
  14. package/dist/assets/apple-touch-icon-152x152.png +0 -0
  15. package/dist/assets/apple-touch-icon-167x167.png +0 -0
  16. package/dist/assets/apple-touch-icon-180x180.png +0 -0
  17. package/dist/assets/apple-touch-icon-57x57.png +0 -0
  18. package/dist/assets/apple-touch-icon-60x60.png +0 -0
  19. package/dist/assets/apple-touch-icon-precomposed.png +0 -0
  20. package/dist/assets/apple-touch-icon.png +0 -0
  21. package/dist/assets/favicon-16x16.png +0 -0
  22. package/dist/assets/favicon-32x32.png +0 -0
  23. package/dist/assets/favicon-48x48.png +0 -0
  24. package/dist/assets/mstile-144x144.png +0 -0
  25. package/dist/assets/mstile-150x150.png +0 -0
  26. package/dist/assets/mstile-310x150.png +0 -0
  27. package/dist/assets/mstile-310x310.png +0 -0
  28. package/dist/assets/mstile-70x70.png +0 -0
  29. package/dist/bundle.31d9465dfaf7ec6b2a49.js +2 -0
  30. package/dist/bundle.31d9465dfaf7ec6b2a49.js.LICENSE.txt +4 -0
  31. package/dist/bundle.efd3cfd1da0be0deb202.js +2 -0
  32. package/dist/bundle.f8145f093c653b051d7f.js +1 -0
  33. package/dist/config.js +1 -1
  34. package/dist/index.html +2 -2
  35. package/dist/manifest.json +1 -1
  36. package/dist/maplibre-gl-shared.mjs +2 -0
  37. package/dist/maplibre-gl-shared.mjs.LICENSE.txt +4 -0
  38. package/dist/maplibre-gl-worker.mjs +2 -0
  39. package/dist/maplibre-gl-worker.mjs.LICENSE.txt +4 -0
  40. package/package.json +10 -1
  41. package/dist/bundle.8944531bcbbc36cf4c39.js +0 -2
  42. package/dist/ceb05254cedfa895b512.ttf +0 -0
  43. package/dist/eae34fa8f1e0c4c6d797.ttf +0 -0
  44. package/dist/fc2b5060f7accec5cf74.ttf +0 -0
  45. package/dist/fc3d2f2e3a203d0037c1.ttf +0 -0
  46. /package/dist/{bundle.8944531bcbbc36cf4c39.js.LICENSE.txt → bundle.efd3cfd1da0be0deb202.js.LICENSE.txt} +0 -0
@@ -0,0 +1,4 @@
1
+ /**
2
+ * MapLibre GL JS
3
+ * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.9.0/LICENSE.txt
4
+ */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see maplibre-gl-worker.mjs.LICENSE.txt */
2
+ import{$n as e,An as t,Cn as r,D as s,Dt as i,En as a,Et as o,F as l,Fn as n,G as h,H as c,N as u,Nn as d,On as g,Pr as p,Ri as y,Rr as m,Sn as f,Vt as w,_ as S,bt as v,c as b,d as _,dt as I,g as x,gr as k,hn as T,i as D,l as C,ln as L,lr as O,mr as R,o as P,r as A,rn as M,sr as W,t as $,tn as q,tr as G,un as N,z}from"./maplibre-gl-shared.mjs";function E(e){let t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){let t="[";for(let r of e)t+=`${E(r)},`;return`${t}]`}let r=Object.keys(e).sort(),s="{";for(let t=0;t<r.length;t++)s+=`${JSON.stringify(r[t])}:${E(e[r[t]])},`;return`${s}}`}function F(e){let t="";for(let r of T)t+=`/${E(e[r])}`;return t}var J=class{constructor(e,t){this.keyCache={},e&&this.replace(e,t)}replace(e,t){this._layerConfigs={},this._layers={},this.update(e,[],t)}update(e,t,r){for(let t of e){this._layerConfigs[t.id]=t;let e=this._layers[t.id]=S(t,r);e._featureFilter=L(e.filter,`layers[${t.id}].filter`,r),this.keyCache[t.id]&&delete this.keyCache[t.id]}for(let e of t)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];this.familiesBySource={};let s=function(e,t){let r={};for(let s=0;s<e.length;s++){let i=t&&t[e[s].id]||F(e[s]);t&&(t[e[s].id]=i);let a=r[i];a||=r[i]=[],a.push(e[s])}let s=[];for(let e in r)s.push(r[e]);return s}(Object.values(this._layerConfigs),this.keyCache);for(let e of s){let t=e.map(e=>this._layers[e.id]),r=t[0];if(r.isHidden())continue;let s=r.source||"",i=this.familiesBySource[s];i||=this.familiesBySource[s]={};let a=r.sourceLayer||"_geojsonTileLayer",o=i[a];o||=i[a]=[],o.push(t)}}},j=class{constructor(e){let t={},r=[];for(let s in e){let i=e[s],a=t[s]={};for(let e in i){let t=i[e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;let s={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};r.push(s),a[e]={rect:s,metrics:t.metrics}}}let{w:s,h:i}=l(r),a=new o({width:s||1,height:i||1});for(let r in e){let s=e[r];for(let e in s){let i=s[e];if(!i||0===i.bitmap.width||0===i.bitmap.height)continue;let l=t[r][e].rect;o.copy(i.bitmap,a,{x:0,y:0},{x:l.x+1,y:l.y+1},i.bitmap)}}this.image=a,this.positions=t}};M("GlyphAtlas",j);var B=class{constructor(e){this.tileID=new _(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId,this.inFlightDependencies=[]}async parse(e,t,r,s,i){this.data=e,this.collisionBoxArray=new w;let a=new P(Object.keys(e.layers).sort()),o=new A(this.tileID,this.promoteId);o.bucketLayerIDs=[];let l={},n={featureIndex:o,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:r,subdivisionGranularity:i},h=t.familiesBySource[this.source];for(let t in h){let s=e.layers[t];if(!s)continue;1===s.version&&p(`Vector tile source "${this.source}" layer "${t}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let i=a.encode(t),c=[];for(let e=0;e<s.length;e++){let r=s.feature(e),a=o.getId(r,t);c.push({feature:r,id:a,index:e,sourceLayerIndex:i})}for(let e of h[t]){let t=e[0];t.source!==this.source&&p(`layer.source = ${t.source} does not equal this.source = ${this.source}`),!t.isHidden(this.zoom,!0)&&(H(e,this.zoom,r),(l[t.id]=t.createBucket({index:o.bucketLayerIDs.length,layers:e,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:i,sourceID:this.source})).populate(c,n,this.tileID.canonical),o.bucketLayerIDs.push(e.map(e=>e.id)))}}let c=k(n.glyphDependencies,e=>Object.keys(e));for(let e of this.inFlightDependencies)e?.abort();this.inFlightDependencies=[];let d=Promise.resolve({});if(Object.keys(c).length){let e=new AbortController;this.inFlightDependencies.push(e),d=s.sendAsync({type:"GG",data:{stacks:c,source:this.source,tileID:this.tileID,type:"glyphs"}},e)}let g=Object.keys(n.iconDependencies),y=Promise.resolve({});if(g.length){let e=new AbortController;this.inFlightDependencies.push(e),y=s.sendAsync({type:"GI",data:{icons:g,source:this.source,tileID:this.tileID,type:"icons"}},e)}let m=Object.keys(n.patternDependencies),f=Promise.resolve({});if(m.length){let e=new AbortController;this.inFlightDependencies.push(e),f=s.sendAsync({type:"GI",data:{icons:m,source:this.source,tileID:this.tileID,type:"patterns"}},e)}let S=n.dashDependencies,v=Promise.resolve({});if(Object.keys(S).length){let e=new AbortController;this.inFlightDependencies.push(e),v=s.sendAsync({type:"GDA",data:{dashes:S}},e)}let[b,_,I,x]=await Promise.all([d,y,f,v]),T=new j(b),D=new u(_,I);for(let e in l){let t=l[e];t.hasDependencies&&(H(t.layers,this.zoom,r),t.addFeatures({options:n,canonical:this.tileID.canonical,glyphMap:b,glyphPositions:T.positions,iconMap:_,iconPositions:D.iconPositions,patternMap:I,patternPositions:D.patternPositions,dashPositions:x,showCollisionBoxes:this.showCollisionBoxes}))}return{buckets:Object.values(l).filter(e=>!e.isEmpty()),featureIndex:o,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:T.image,imageAtlas:D,dashPositions:x,glyphMap:this.returnDependencies?b:null,iconMap:this.returnDependencies?_:null,glyphPositions:this.returnDependencies?T.positions:null}}};function H(e,t,r){let s=new q(t);for(let t of e)t.recalculate(s,r)}var U=class{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(e,t){this.loading[e]=t}finishLoading(e){delete this.loading[e]}abort(e){let t=this.loading[e];t?.abort&&(t.abort.abort(),delete this.loading[e])}getParsing(e){return this.parsing[e]}setParsing(e,t){this.parsing[e]=t}removeParsing(e){delete this.parsing[e]}markLoaded(e,t){this.loaded[e]=t}getLoaded(e){let t=this.loaded[e];if(t)return t}removeLoaded(e){delete this.loaded[e]}clearLoaded(){this.loaded={}}},V=class{constructor(e){this.start=`${e}#start`,this.end=`${e}#end`,this.measure=e,performance.mark(this.start)}finish(){performance.mark(this.end);let e=performance.getEntriesByName(this.measure);return 0===e.length&&(performance.measure(this.measure,this.start,this.end),e=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),e}},Z=class{constructor(e,t,r,s,i){this.type=e,this.properties=r||{},this.extent=i,this.pointsArray=t,this.id=s}loadGeometry(){return this.pointsArray.map(e=>e.map(e=>new y(e.x,e.y)))}},K=class{constructor(e,t,r){this.version=2,this._myFeatures=e,this.name=t,this.length=e.length,this.extent=r}feature(e){return this._myFeatures[e]}},Q=class{constructor(){this.layers={}}addLayer(e){this.layers[e.name]=e}};function X(e,t,r){let{extent:i}=e,a=2**(r.z-t.z),o=(r.x-t.x*a)*i,l=(r.y-t.y*a)*i,n=[];for(let t=0;t<e.length;t++){let r=e.feature(t),h=r.loadGeometry();for(let e of h)for(let t of e)t.x=t.x*a-o,t.y=t.y*a-l;h=s(h,r.type,-128,-128,i+128,i+128),0!==h.length&&n.push(new Z(r.type,h,r.properties,r.id,i))}return new K(n,e.name,i)}var Y=class{constructor(e,t,r){this.actor=e,this.layerIndex=t,this.availableImages=r,this.tileState=new U,this.overzoomedTileResultCache=new $(1e3)}loadVectorTile(t,r){try{return{vectorTile:"mlt"===t.encoding?new D(r):new I(new z(r)),rawData:r}}catch(s){let i=new Uint8Array(r),a=31===i[0]&&139===i[1],o=`Unable to parse the tile at ${t.request.url}, `;throw o+=a?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${e(s).message}`,Error(o)}}async loadTile(e){let{uid:t,overzoomParameters:r}=e;r&&(e.request=r.overzoomRequest);let s=this._startRequestTiming(e),i=new B(e);this.tileState.startLoading(t,i);let a=new AbortController;i.abort=a;try{let o=await f(e.request,a);if(e.etag&&e.etag===o.etag)return this.tileState.finishLoading(t),this._getEtagUnmodifiedResult(o,s);let l=this.loadVectorTile(e,o.data);if(this.tileState.finishLoading(t),!l)return null;let{vectorTile:n,rawData:h}=l;r&&({vectorTile:n,rawData:h}=this._getOverzoomTile(e,n));let c=this._getExpiryData(o),u=this._finishRequestTiming(s);i.vectorTile=n,i.etag=o.etag,this.tileState.markLoaded(t,i);let d={rawData:h,cacheControl:c,resourceTiming:u};return this.tileState.setParsing(t,d),await this._parseWorkerTile(i,e)}catch(e){throw this.tileState.finishLoading(t),this.tileState.markLoaded(t,i),e}}_getEtagUnmodifiedResult(e,t){let r=this._getExpiryData(e),s=this._finishRequestTiming(t);return G({etagUnmodified:!0},r,s)}async _parseWorkerTile(e,t){let r=this.tileState.getParsing(e.uid),s=await e.parse(e.vectorTile,this.layerIndex,this.availableImages,this.actor,t.subdivisionGranularity);if(r){let{rawData:i,cacheControl:a,resourceTiming:o}=r,l=t.overzoomParameters?"mvt":t.encoding;s=G({rawTileData:i.slice(0),encoding:l},s,a,o),this.tileState.removeParsing(e.uid)}else e.etag&&(s=G(s,{etag:e.etag}));return s}_getExpiryData({expires:e,cacheControl:t,etag:r}){let s={};return e&&(s.expires=e),t&&(s.cacheControl=t),r&&(s.etag=r),s}_startRequestTiming(e){if(e.request?.collectResourceTiming)return new V(e.request.url)}_finishRequestTiming(e){let t=e?.finish();return t?{resourceTiming:JSON.parse(JSON.stringify(t))}:{}}_getOverzoomTile(e,t){let{tileID:r,source:s,overzoomParameters:i}=e,{maxZoomTileID:a}=i,o=`${a.key}_${r.key}_${e.request?.url}`,l=this.overzoomedTileResultCache.get(o);if(l)return l;let n=new Q,h=this.layerIndex.familiesBySource[s];for(let e in h){let s=t.layers[e];if(!s)continue;let i=X(s,a,r.canonical);i.length>0&&n.addLayer(i)}let c={vectorTile:n,rawData:C(n).buffer};return this.overzoomedTileResultCache.set(o,c),c}async reloadTile(e){let t=e.uid,r=this.tileState.getLoaded(t);if(!r)throw Error("Should not be trying to reload a tile that was never loaded or has been removed");if(r.vectorTile)return r.showCollisionBoxes=e.showCollisionBoxes,await this._parseWorkerTile(r,e)}async abortTile(e){this.tileState.abort(e.uid)}async removeTile(e){this.tileState.removeLoaded(e.uid)}},ee=class{constructor(){this.loaded={}}async loadTile(e){let{uid:t,encoding:r,rawImageData:s,redFactor:a,greenFactor:o,blueFactor:l,baseShift:n}=e,h=s.width+4,c=s.height+4,u=O(s)?new i({width:h,height:c},await W(s,-2,-2,h,c)):s,d=new v(t,u,r,a,o,l,n);return this.loaded||={},this.loaded[t]=d,d}removeTile(e){let t=this.loaded,r=e.uid;t?.[r]&&delete t[r]}},te=class{constructor(e,t,r,s=re){this.actor=e,this.layerIndex=t,this.availableImages=r,this.tileState=new U,this._createGeoJSONIndex=s}loadVectorTile(e){if(!this._geoJSONIndex)throw Error("Unable to parse the data into a cluster or geojson");let{z:t,x:r,y:s}=e.tileID.canonical,i=this._geoJSONIndex.getTile(t,r,s);if(!i)return null;let a=new b(i.features,{version:2,extent:m});return{vectorTile:a,rawData:C(a,n).buffer}}async loadTile(e){let{uid:t}=e,r=new B(e);r.abort=new AbortController;try{let s=this.loadVectorTile(e);if(!s)return null;let{vectorTile:i,rawData:a}=s;r.vectorTile=i,this.tileState.markLoaded(t,r);let o={rawData:a};return this.tileState.setParsing(t,o),await this._parseWorkerTile(r,e)}catch(e){throw this.tileState.markLoaded(t,r),e}}async _parseWorkerTile(e,t){let r=this.tileState.getParsing(e.uid),s=await e.parse(e.vectorTile,this.layerIndex,this.availableImages,this.actor,t.subdivisionGranularity);if(r){let{rawData:t}=r;s=G({rawTileData:t.slice(0),encoding:"mvt"},s),this.tileState.removeParsing(e.uid)}return s}async abortTile(e){this.tileState.abort(e.uid)}async removeTile(e){this.tileState.removeLoaded(e.uid)}async loadData(e){this._pendingRequest?.abort();let t=this._startRequestTiming(e);this._pendingRequest=new AbortController;try{await this.loadAndProcessGeoJSON(e,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let r={};return e.request&&(r.data=e.data),this._finishRequestTiming(t,e,r),r}catch(e){if(delete this._pendingRequest,!d(e))throw e;return{abandoned:!0}}}_startRequestTiming(e){if(e.request?.collectResourceTiming)return new V(e.request.url)}_finishRequestTiming(e,t,r){let s=e?.finish();s&&(r.resourceTiming={[t.source]:JSON.parse(JSON.stringify(s))})}async reloadTile(e){let t=e.uid,r=this.tileState.getLoaded(t);return r?r.vectorTile?(r.showCollisionBoxes=e.showCollisionBoxes,await this._parseWorkerTile(r,e)):void 0:await this.loadTile(e)}async loadAndProcessGeoJSON(e,t){if(e.request&&(e.data=(await r(e.request,t)).data),e.data)return e.data=this._filterGeoJSON(e.data,e.filter,e.source),void(this._geoJSONIndex=this._createGeoJSONIndex(e.data,e));if(e.dataDiff)return this._geoJSONIndex??=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},e),void this._geoJSONIndex.updateData(e.dataDiff,this._getFilterPredicate(e.filter,e.source));if(e.updateCluster&&this._geoJSONIndex.updateClusterOptions(e.geojsonVtOptions.cluster,se(e)),null==this._geoJSONIndex)throw Error(`Input data given to '${e.source}' is not a valid GeoJSON object.`)}_filterGeoJSON(e,t,r){if("FeatureCollection"!==e.type)return e;let s=this._getFilterPredicate(t,r);return s?{type:"FeatureCollection",features:e.features.filter(e=>s(e))}:e}_getFilterPredicate(e,t){if("boolean"!=typeof e&&!e?.length)return;let r=N(e,`sources.${t}.filter`,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===r.result)throw Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));return e=>r.value.evaluate({zoom:0},e)}async removeSource(e){this._pendingRequest?.abort()}getClusterExpansionZoom(e){return this._geoJSONIndex.getClusterExpansionZoom(e.clusterId)}getClusterChildren(e){return this._geoJSONIndex.getClusterChildren(e.clusterId)}getClusterLeaves(e){return this._geoJSONIndex.getClusterLeaves(e.clusterId,e.limit,e.offset)}};function re(e,t){let r=G(t.geojsonVtOptions||{},{updateable:!0,clusterOptions:se(t)});return new h(e,r)}function se({geojsonVtOptions:e,clusterProperties:t,source:r}){if(!t||!e.clusterOptions)return e.clusterOptions;let s={},i={},a={accumulated:null,zoom:0},o={properties:null},l=Object.keys(t);for(let e of l){let[a,o]=t[e],l=N(o,`sources.${r}.clusterProperties.${e}[1]`),n=N("string"==typeof a?[a,["accumulated"],["get",e]]:a,`sources.${r}.clusterProperties.${e}[0]`);s[e]=l.value,i[e]=n.value}return e.clusterOptions.map=e=>{o.properties=e;let t={};for(let e of l)t[e]=s[e].evaluate(a,o);return t},e.clusterOptions.reduce=(e,t)=>{o.properties=t;for(let t of l)a.accumulated=e[t],e[t]=i[t].evaluate(a,o)},e.clusterOptions}async function ie(e){if(e.endsWith(".mjs"))return void await import(e);let t=await fetch(e,{credentials:"same-origin"});if(!t.ok)throw Error(`Failed to load ${e}: ${t.status}`);let r=await t.text();if(/^[ \t]*(import|export)\s/m.test(r)){let e=URL.createObjectURL(new Blob([r],{type:"text/javascript"}));try{await import(e)}finally{URL.revokeObjectURL(e)}return}globalThis.eval(r)}var ae=class{constructor(e){this.self=e,this.actor=new x(e),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(e,t)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=t},this.self.addProtocol=g,this.self.removeProtocol=t,this.self.registerRTLTextPlugin=e=>{c.setMethods(e)},this.self.makeRequest=a,this.actor.registerMessageHandler("LDT",(e,t)=>this._getDEMWorkerSource(e,t.source).loadTile(t)),this.actor.registerMessageHandler("RDT",async(e,t)=>{this._getDEMWorkerSource(e,t.source).removeTile(t)}),this.actor.registerMessageHandler("GCEZ",async(e,t)=>this._getWorkerSource(e,t.type,t.source).getClusterExpansionZoom(t)),this.actor.registerMessageHandler("GCC",async(e,t)=>this._getWorkerSource(e,t.type,t.source).getClusterChildren(t)),this.actor.registerMessageHandler("GCL",async(e,t)=>this._getWorkerSource(e,t.type,t.source).getClusterLeaves(t)),this.actor.registerMessageHandler("LD",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadData(t)),this.actor.registerMessageHandler("LT",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadTile(t)),this.actor.registerMessageHandler("RT",(e,t)=>this._getWorkerSource(e,t.type,t.source).reloadTile(t)),this.actor.registerMessageHandler("AT",(e,t)=>this._getWorkerSource(e,t.type,t.source).abortTile(t)),this.actor.registerMessageHandler("RMT",(e,t)=>this._getWorkerSource(e,t.type,t.source).removeTile(t)),this.actor.registerMessageHandler("RS",async(e,t)=>{if(!this.workerSources[e]?.[t.type]?.[t.source])return;let r=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==r.removeSource&&r.removeSource(t)}),this.actor.registerMessageHandler("RM",async e=>{delete this.layerIndexes[e],delete this.availableImages[e],delete this.workerSources[e],delete this.demWorkerSources[e],this.globalStates.delete(e)}),this.actor.registerMessageHandler("SR",async(e,t)=>{this.referrer=t}),this.actor.registerMessageHandler("SRPS",(e,t)=>this._syncRTLPluginState(e,t)),this.actor.registerMessageHandler("IS",async(e,t)=>{await ie(t)}),this.actor.registerMessageHandler("SI",(e,t)=>this._setImages(e,t)),this.actor.registerMessageHandler("UL",async(e,t)=>{this._getLayerIndex(e).update(t.layers,t.removedIds,this._getGlobalState(e))}),this.actor.registerMessageHandler("UGS",async(e,t)=>{let r=this._getGlobalState(e);for(let e in t)r[e]=t[e]}),this.actor.registerMessageHandler("SL",async(e,t)=>{this._getLayerIndex(e).replace(t,this._getGlobalState(e))})}_getGlobalState(e){let t=this.globalStates.get(e);return t||(t={},this.globalStates.set(e,t)),t}async _setImages(e,t){this.availableImages[e]=t;for(let r in this.workerSources[e]){let s=this.workerSources[e][r];for(let e in s)s[e].availableImages=t}}async _syncRTLPluginState(e,t){return await c.syncState(t,ie)}_getAvailableImages(e){let t=this.availableImages[e];return t||=[],t}_getLayerIndex(e){let t=this.layerIndexes[e];return t||=this.layerIndexes[e]=new J,t}_getWorkerSource(e,t,r){if(this.workerSources[e]||={},this.workerSources[e][t]||={},!this.workerSources[e][t][r]){let s={sendAsync:(t,r)=>(t.targetMapId=e,this.actor.sendAsync(t,r))};switch(t){case"vector":this.workerSources[e][t][r]=new Y(s,this._getLayerIndex(e),this._getAvailableImages(e));break;case"geojson":this.workerSources[e][t][r]=new te(s,this._getLayerIndex(e),this._getAvailableImages(e));break;default:this.workerSources[e][t][r]=new this.externalWorkerSourceTypes[t](s,this._getLayerIndex(e),this._getAvailableImages(e))}}return this.workerSources[e][t][r]}_getDEMWorkerSource(e,t){return this.demWorkerSources[e]||={},this.demWorkerSources[e][t]||=new ee,this.demWorkerSources[e][t]}};R(self)&&(self.worker=new ae(self));export{ae as default};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * MapLibre GL JS
3
+ * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.9.0/LICENSE.txt
4
+ */
package/package.json CHANGED
@@ -5,10 +5,19 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/graphhopper/graphhopper-maps.git"
7
7
  },
8
- "version": "0.0.0-dafe37c1",
8
+ "version": "0.0.0-db2c83c",
9
9
  "license": "Apache-2.0",
10
10
  "scripts": {},
11
11
  "dependencies": {},
12
+ "overrides": {
13
+ "qs": "6.16.0",
14
+ "uuid": "11.1.1"
15
+ },
16
+ "allowScripts": {
17
+ "fsevents": false,
18
+ "sharp": false,
19
+ "unrs-resolver": false
20
+ },
12
21
  "devDependencies": {},
13
22
  "files": [
14
23
  "dist/"