1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1251],{71932:function(e,t,i){i.r(t),i.d(t,{default:function(){return J}});var r=i(36663),l=i(3957),s=(i(39994),i(67134)),o=i(13802),a=(i(7283),i(81977)),n=i(34248),c=i(66645),u=i(39835),h=i(70375),p=i(3466),d=(i(12173),i(51876),i(78668)),y=i(14685),f=i(91772),m=i(11509),v=i(76136),g=i(63314),_=i(16908),b=i(87232),S=i(27668),w=i(18241),A=i(95874),x=i(81590),C=i(47907),T=i(89993);const I=o.Z.getLogger("esri.layers.support.SpriteSource");var U=class{constructor(e,t,i,r){this.baseURL=e,this.devicePixelRatio=t,this.maxTextureSize=i,this._spriteImageFormat=r,this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded"}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData[e]}async load(e){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(e),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}_loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const t=(0,p.mN)(this.baseURL),i=t.query?"?"+(0,p.B7)(t.query):"",r=this._isRetina?"@2x":"",l=`${t.path}${r}.${this._spriteImageFormat}${i}`,s=`${t.path}${r}.json${i}`;return Promise.all([(0,m.default)(s,e),(0,m.default)(l,{responseType:"image",...e})]).then((([e,i])=>{const r=Object.keys(e.data);if(!r||0===r.length||1===r.length&&"_ssl"===r[0]||!i||!i.data)return this._spritesData=this.image=null,this.width=this.height=0,Promise.resolve(null);this._spritesData=e.data;const l=i.data,s=Math.max(this.maxTextureSize,4096);if(l.width>s||l.height>s){const e=`Sprite resource for style ${t.path} is bigger than the maximum allowed of ${s} pixels}`;throw I.error(e),new h.Z("SpriteSource",e)}this.width=l.width,this.height=l.height;const o=document.createElement("canvas"),a=o.getContext("2d");o.width=l.width,o.height=l.height,a.drawImage(l,0,0,l.width,l.height);const n=a.getImageData(0,0,l.width,l.height),c=new Uint8Array(n.data);let u;for(let t=0;t<c.length;t+=4)u=c[t+3]/255,c[t]=c[t]*u,c[t+1]=c[t+1]*u,c[t+2]=c[t+2]*u;this.image=c}))}},P=i(51366),R=i(58269),E=i(45212);var O=class{constructor(e,t,i){this.tileMapURL="",this.tilemapCache=null,this.parsedUrl=null,this.tileInfo=null,this.capabilities=null,this.tileIndex=null,this.fullExtent=null,this.name=e,this.sourceUrl=t,t&&(this.parsedUrl=(0,p.mN)(this.sourceUrl));const r=this.parsedUrl.path,l=this.parsedUrl.query?"?"+(0,p.B7)(this.parsedUrl.query):"",o=(0,s.d9)(i),a=o.tiles;t&&a.forEach(((e,t)=>{(0,p.YP)(e)||(a[t]=(0,p.v_)(r,e)+l)})),this.tileServers=a,i.tileMap&&(this.tileMapURL=(0,p.v_)(t,i.tileMap));const n=i.capabilities&&i.capabilities.split(",").map((e=>e.toLowerCase().trim())),c=!!i.exportTilesAllowed,u=!!n&&-1!==n.indexOf("tilemap"),h=c&&i.hasOwnProperty("maxExportTilesCount")?i.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:c,supportsTileMap:u},exportTiles:c?{maxExportTilesCount:+h}:null},this.tileInfo=(0,R.d)(o.tileInfo,o,null,{ignoreMinMaxLOD:!0}),u&&(this.type="vector-tile",this.tilemapCache=new C.y({layer:this}),this.tilemapCache&&(this.tileIndex=new E.Z(this.tilemapCache))),this.fullExtent=f.Z.fromJSON(i.fullExtent)}getRefKey(e,t){return this.tileIndex?this.tileIndex.dataKey(e,t):Promise.resolve(e)}getSourceTileUrl(e,t,i){let r=this.tileServers[t%this.tileServers.length];return r=r.replace(/\{z\}/gi,e.toString()).replace(/\{y\}/gi,t.toString()).replace(/\{x\}/gi,i.toString()),r}isCompatibleWith(e){const t=this.tileInfo,i=e.tileInfo;if(!t.spatialReference.equals(i.spatialReference))return!1;if(!t.origin.equals(i.origin))return!1;if(Math.round(t.dpi)!==Math.round(i.dpi))return!1;const r=t.lods,l=i.lods,s=Math.min(r.length,l.length);for(let o=0;o<s;o++){const e=r[o],t=l[o];if(e.level!==t.level||Math.round(e.scale)!==Math.round(t.scale))return!1}return!0}};const L=P.Z.defaults&&P.Z.defaults.io.corsEnabledServers;function N(e){if(!e)return;const t=(0,p.P$)(e);L&&-1===L.indexOf(t)&&L.push(t)}function D(...e){let t;for(let i=0;i<e.length;++i)if((0,p.oC)(e[i])){if(t){const r=t.split("://")[0];t=r+":"+e[i].trim()}}else t=(0,p.YP)(e[i])?e[i]:(0,p.v_)(t,e[i]);return(0,p.Qj)(t)}async function M(e,t,i,r,l){let s,o,a;if((0,d.k_)(l),"string"==typeof i){const e=(0,p.Fv)(i);N(e);const t=(0,p.mN)(e);a=await(0,m.default)(t.path,{query:{f:"json"},responseType:"json",...l}),s=e,o=e}else a={data:i},s=i.jsonUrl||null,o=r;const n=a.data;return a.ssl&&(s&&(s=s.replace(/^http:/i,"https:")),o&&(o=o.replace(/^http:/i,"https:"))),z(n)?(e.styleUrl=s||null,async function(e,t,i,r){const l=i?(0,p.Yd)(i):p.AX;
1e.styleBase=l,e.style=t,e.styleUrl&&N(e.styleUrl),t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const s=[];if(t.sources&&t.sources.esri){const i=t.sources.esri;i.url?await M(e,"esri",D(l,i.url),void 0,r):s.push(M(e,"esri",i,l,r))}for(const o of Object.keys(t.sources))"esri"!==o&&"vector"===t.sources[o].type&&(t.sources[o].url?s.push(M(e,o,D(l,t.sources[o].url),void 0,r)):t.sources[o].tiles&&s.push(M(e,o,t.sources[o],l,r)));await Promise.all(s)}(e,n,o,l)):function(e){return!z(e)}(n)?e.sourceUrl?Z(e,n,o,!1,t,l):(e.sourceUrl=s||null,Z(e,n,o,!0,t,l)):Promise.reject("You must specify the URL or the JSON for a service or for a style.")}function z(e){return!!e.sources}async function Z(e,t,i,r,l,s){const o=i?(0,p.Qj)(i)+"/":p.AX,a=function(e,t){if(e.hasOwnProperty("tileInfo"))return e;const i={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100}},r=512;let l=78271.51696400007,s=295828763.7957775;const o=[],a=e.hasOwnProperty("minzoom")?parseFloat(e.minzoom):0,n=e.hasOwnProperty("maxzoom")?parseFloat(e.maxzoom):22;for(let c=0;c<=n;c++)c>=a&&o.push({level:c,scale:s,resolution:l}),l/=2,s/=2;for(const c of e.tiles)N(D(t,c));return{capabilities:"TilesOnly",initialExtent:i,fullExtent:i,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:r,cols:r,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:o,spatialReference:{wkid:102100}}}}(t,o),n=new O(l,o,a);if(!r&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(n))return Promise.resolve();null!=n.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(n.fullExtent):t.fullExtent=n.fullExtent.clone()),t.tileInfo.lods.length<n.tileInfo.lods.length&&(t.tileInfo=n.tileInfo)}if(r?(e.sourceBase=o,e.source=t,e.validatedSource=a,e.primarySourceName=l,e.sourceUrl&&N(e.sourceUrl)):N(o),e.sourceNameToSource[l]=n,!e.style)return null==t.defaultStyles?Promise.reject():"string"==typeof t.defaultStyles?M(e,"",D(o,t.defaultStyles,"root.json"),void 0,s):M(e,"",t.defaultStyles,D(o,"root.json"),s)}var $=i(84513),k=i(13054);var j=class{constructor(e,t){this.lockedSchemaPixelSize=e,this.isGCS=t}getLevelRowColumn(e){return this.isGCS?[e[0],e[1]>>1,e[2]>>1]:256===this.lockedSchemaPixelSize&&e[0]>0?[e[0]-1,e[1]>>1,e[2]>>1]:e}adjustLevel(e){return this.isGCS?e:256===this.lockedSchemaPixelSize?e>0?e-1:0:e}getShift(e,t){let i=0,r=0;return(256===this.lockedSchemaPixelSize||this.isGCS)&&(e[2]%2&&(i=t),e[1]%2&&(r=t)),[i,r]}getScale(e){if(this.isGCS){if(512===this.lockedSchemaPixelSize)return 4}else if(256===this.lockedSchemaPixelSize&&0===e)return 1;return 2}static create256x256CompatibleTileInfo(e){if(!e)return null;if(256===e.size[0]&&256===e.size[1])return e;const t=e.spatialReference.isGeographic,i=[],r=e.lods.length;for(let l=0;l<r;l++){const r=e.lods[l],s=t?r.resolution:2*r.resolution;i.push(new k.Z({level:r.level,scale:r.scale,resolution:s}))}return new x.Z({size:[256,256],dpi:e.dpi,format:e.format,compressionQuality:e.compressionQuality,origin:e.origin,spatialReference:e.spatialReference,lods:i})}static create512x512CompatibleTileInfo(e){if(!e)return null;if(256===e.size[0]||256===e.size[1])return null;const t=[],i=e.lods.length;for(let r=0;r<i;r++){const i=e.lods[r],l=.5*i.resolution;t.push(new k.Z({level:i.level,scale:i.scale,resolution:l}))}return new x.Z({size:[512,512],dpi:e.dpi,format:e.format,compressionQuality:e.compressionQuality,origin:e.origin,spatialReference:e.spatialReference,lods:t})}};const B=1e-6;function F(e,t){if(e===t)return!0;if(!e&&null!=t)return!1;if(null!=e&&!t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const i=e.origin,r=t.origin;if(Math.abs(i.x-r.x)>=B||Math.abs(i.y-r.y)>=B)return!1;let l,s;e.lods[0].scale>t.lods[0].scale?(l=e,s=t):(s=e,l=t);for(let o=l.lods[0].scale;o>=s.lods[s.lods.length-1].scale-B;o/=2)if(Math.abs(o-s.lods[0].scale)<B)return!0;return!1}function G(e,t){if(e===t)return e;if(!e&&null!=t)return t;if(null!=e&&!t)return e;const i=e.size[0],r=e.format,l=e.dpi,s={x:e.origin.x,y:e.origin.y},o=e.spatialReference.toJSON(),a=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],n=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],c=a.scale,u=a.resolution,h=n.scale,p=[];let d=c,y=u,f=0;for(;d>h;)p.push({level:f,resolution:y,scale:d}),f++,d/=2,y/=2;return new x.Z({size:[i,i],dpi:l,format:r||"pbf",origin:s,lods:p,spatialReference:o})}var q=i(63043),Q=i(35119);let V=class extends((0,S.h)((0,A.M)((0,T.Z)((0,b.Y)((0,_.q)((0,w.I)((0,g.R)(v.Z)))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.style=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.type="vector-tile",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(l.Z.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsD
1ata:!1},e).then((async()=>{if(!this.portalItem||!this.portalItem.id)return;const t=`${this.portalItem.itemUrl}/resources/styles/root.json`;(await(0,m.default)(t,{...e,query:{f:"json"}})).data&&this.read({url:t},(0,$.m)(this.portalItem))})).then((()=>this._loadStyle(e)),(()=>this._loadStyle(e)));return this.addResolvingPromise(t),Promise.resolve(this)}get attributionDataUrl(){const e=this.currentStyleInfo,t=e&&e.serviceUrl&&(0,p.mN)(e.serviceUrl);return t?this._getDefaultAttribution(t.path):null}get capabilities(){const e=this._getPrimarySource();return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){const e=this._getPrimarySource();return e?e.fullExtent:null}get parsedUrl(){return this.serviceUrl?(0,p.mN)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo&&this.currentStyleInfo.serviceUrl||null}get spatialReference(){return this.tileInfo&&this.tileInfo.spatialReference||null}get styleUrl(){return this.currentStyleInfo&&this.currentStyleInfo.styleUrl||null}writeStyleUrl(e,t){e&&(0,p.oC)(e)&&(e=`https:${e}`),t.styleUrl=e}get tileIndexType(){const e=this._getPrimarySource();return e?e.type:""}get tileIndexUrl(){const e=this._getPrimarySource();return e?e.tileMapURL:""}get tileInfo(){var e;const t=[];for(const r in this.sourceNameToSource)t.push(this.sourceNameToSource[r]);let i=(null==(e=this._getPrimarySource())?void 0:e.tileInfo)||new x.Z;if(t.length>1)for(let r=0;r<t.length;r++)F(i,t[r].tileInfo)&&(i=G(i,t[r].tileInfo));return i}get tilemapCache(){const e=this._getPrimarySource();return e&&e.capabilities.operations.supportsTileMap?e.tilemapCache:null}get tileServers(){const e=this._getPrimarySource();return e?e.tileServers:[]}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}get compatibleTileInfo256(){return j.create256x256CompatibleTileInfo(this.tileInfo)}get compatibleTileInfo512(){return j.create512x512CompatibleTileInfo(this.tileInfo)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const i=(0,Q.Z)(),r=new U(this.styleRepository.sprite,e,i.maxTextureSize,this.currentStyleInfo.spriteFormat);await r.load(t),this._spriteSourceMap.set(e,r)}return Promise.resolve(this._spriteSourceMap.get(e))}async loadStyle(e,t){const i=e||this.style||this.url;if(this._loadingPromise&&"string"==typeof i&&this.url===i&&!(0,d.Hc)(this._abortController))return this._loadingPromise;const r=this._abortController;r&&r.abort();const l=(0,d.yi)();return this._loadingPromise=new Promise(((e,r)=>{const s={signal:l.signal};this._spriteSourceMap.clear(),this._getSourceAndStyle(i,s).then(e,r),(0,d.fu)(t,(()=>{l.abort()}))})),this._abortController=l,this._loadingPromise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,s.d9)(this.styleRepository.getPaintProperties(e))}setPaintProperties(e,t){const i=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const r=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layerName:e,paint:t,isDataDriven:i||r})}getStyleLayer(e){return(0,s.d9)(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layerName:e})}getLayoutProperties(e){return(0,s.d9)(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}getTileUrl(e,t,i){let r=this.tileServers[t%this.tileServers.length];return r=r.replace(/\{z\}/gi,e.toString()).replace(/\{y\}/gi,t.toString()).replace(/\{x\}/gi,i.toString()),r}write(e,t){return t&&t.origin&&!this.styleUrl?(t.messages&&t.messages.push(new h.Z("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const i=await async function(e,t){const i={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"}
1,[r,l]="string"==typeof e?[e,null]:[null,e.jsonUrl],s=r?(0,p.mN)(r):null;await M(i,"esri",e,l,t);const o={layerDefinition:i.validatedSource,url:r,parsedUrl:s,serviceUrl:i.sourceUrl,style:i.style,styleUrl:i.styleUrl,spriteUrl:i.style.sprite&&D(i.styleBase,i.style.sprite),spriteFormat:i.spriteFormat,glyphsUrl:i.style.glyphs&&D(i.styleBase,i.style.glyphs),sourceNameToSource:i.sourceNameToSource,primarySourceName:i.primarySourceName};return N(o.spriteUrl),N(o.glyphsUrl),o}(e,t);"webp"===i.spriteFormat&&(await function(e){const t={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return new Promise((i=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,i(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,i(!1)},r.src="data:image/webp;base64,"+t[e]}))}("lossy")||(i.spriteFormat="png")),this._set("currentStyleInfo",{...i}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",i.sourceNameToSource),this._set("primarySourceName",i.primarySourceName),this._set("styleRepository",new q.Z(i.style,i)),this.read(i.layerDefinition,{origin:"service"}),this.emit("load-style",{})}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),i=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2"];if(!t)return;const r=t[2]&&t[2].toLowerCase();if(!r)return;const l=t[1]||"";for(const s of i)if(s.toLowerCase().indexOf(r)>-1)return(0,p.Fv)(`//static.arcgis.com/attribution/Vector${l}/${s}`)}_getPrimarySource(){return this.sourceNameToSource&&this.primarySourceName in this.sourceNameToSource?this.sourceNameToSource[this.primarySourceName]:null}async _loadStyle(e){return this._loadingPromise?this._loadingPromise:this.loadStyle(null,e)}};(0,r._)([(0,a.Cb)({readOnly:!0})],V.prototype,"attributionDataUrl",null),(0,r._)([(0,a.Cb)({type:["show","hide"]})],V.prototype,"listMode",void 0),(0,r._)([(0,a.Cb)({readOnly:!0,dependsOn:["sourceNameToSource","primarySourceName"],json:{read:!1}})],V.prototype,"capabilities",null),(0,r._)([(0,a.Cb)({readOnly:!0})],V.prototype,"currentStyleInfo",void 0),(0,r._)([(0,a.Cb)({json:{read:!1},readOnly:!0,type:f.Z})],V.prototype,"fullExtent",null),(0,r._)([(0,a.Cb)()],V.prototype,"style",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],V.prototype,"isReference",void 0),(0,r._)([(0,a.Cb)({type:["VectorTileLayer"]})],V.prototype,"operationalLayerType",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],V.prototype,"parsedUrl",null),(0,r._)([(0,a.Cb)({readOnly:!0})],V.prototype,"serviceUrl",null),(0,r._)([(0,a.Cb)({type:y.Z,readOnly:!0})],V.prototype,"spatialReference",null),(0,r._)([(0,a.Cb)({readOnly:!0})],V.prototype,"styleRepository",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],V.prototype,"sourceNameToSource",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],V.prototype,"primarySourceName",void 0),(0,r._)([(0,a.Cb)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],V.prototype,"styleUrl",null),(0,r._)([(0,u.c)(["portal-item","web-document"],"styleUrl")],V.prototype,"writeStyleUrl",null),(0,r._)([(0,a.Cb)({json:{read:!1},readOnly:!0})],V.prototype,"tileIndexType",null),(0,r._)([(0,a.Cb)({json:{read:!1},readOnly:!0})],V.prototype,"tileIndexUrl",null),(0,r._)([(0,a.Cb)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:x.Z})],V.prototype,"tileInfo",null),(0,r._)([(0,a.Cb)({json:{read:!1}
1,readOnly:!0,type:C.y})],V.prototype,"tilemapCache",null),(0,r._)([(0,a.Cb)({json:{read:!1},readOnly:!0})],V.prototype,"tileServers",null),(0,r._)([(0,a.Cb)({json:{read:!1},readOnly:!0,value:"vector-tile"})],V.prototype,"type",void 0),(0,r._)([(0,a.Cb)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],V.prototype,"url",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],V.prototype,"version",void 0),(0,r._)([(0,n.r)("version",["version","currentVersion"])],V.prototype,"readVersion",null),(0,r._)([(0,a.Cb)({readOnly:!0})],V.prototype,"compatibleTileInfo256",null),(0,r._)([(0,a.Cb)({readOnly:!0})],V.prototype,"compatibleTileInfo512",null),V=(0,r._)([(0,c.j)("esri.layers.VectorTileLayer")],V);var J=V},89993:function(e,t,i){i.d(t,{Z:function(){return u}});var r=i(36663),l=(i(39994),i(13802),i(7283),i(81977)),s=i(34248),o=i(66645),a=(i(3466),i(12173),i(51876),i(14685)),n=(i(91957),i(58269)),c=i(47907);const u=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t){return t.capabilities&&t.capabilities.indexOf("Tilemap")>-1?new c.y({layer:this}):null}};return(0,r._)([(0,l.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"minScale",void 0),(0,r._)([(0,s.r)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,l.Cb)()],t.prototype,"maxScale",void 0),(0,r._)([(0,s.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,l.Cb)({type:a.Z})],t.prototype,"spatialReference",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,r._)([(0,l.Cb)(n.h)],t.prototype,"tileInfo",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"tilemapCache",void 0),(0,r._)([(0,s.r)("service","tilemapCache",["capabilities"])],t.prototype,"readTilemapCache",null),(0,r._)([(0,l.Cb)()],t.prototype,"version",void 0),t=(0,r._)([(0,o.j)("esri.layers.mixins.ArcGISCachedService")],t),t}},47907:function(e,t,i){i.d(t,{y:function(){return x}});var r=i(36663),l=(i(39994),i(13802)),s=i(81977),o=i(69236),a=i(66645),n=i(70375),c=i(3466),u=(i(12173),i(51876),i(17993)),h=i(78668),p=i(17262),d=i(36900),y=i(11509),f=i(44584),m=i(15071),v=i(55854),g=i(67134),_=i(7753);class b{constructor(){this.location={left:0,top:0,width:0,height:0},this._allAvailability="unknown",this.byteSize=40}getAvailability(e,t){if("unknown"!==this._allAvailability)return this._allAvailability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%8,l=i>>3,s=this._tileAvailabilityBitSet;return l<0||l>s.length?"unknown":s[l]&1<<r?"available":"unavailable"}_updateFromData(e){const t=this.location.width,i=this.location.height;let r=!0,l=!0;const s=Math.ceil(t*i/8),o=new Uint8Array(s);let a=0;for(let n=0;n<e.length;n++){const t=n%8;e[n]?(l=!1,o[a]|=1<<t):r=!1,7===t&&++a}l?this._allAvailability="unavailable":r?this._allAvailability="available":(this._allAvailability="unknown",this._tileAvailabilityBitSet=o,this.byteSize+=o.length)}static fromDefinition(e,t){const i=e.service.request||y.default,{row:r,col:l,width:s,height:o}=e,a={query:{f:"json"}};return t=t?{...a,...t}:a,i(function(e){let t;if("vector-tile"===e.service.type)t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;else{const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:r,left:l,width:s,height:o},valid:!0,data:(0,_.a9)(s*o,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==r||e.location.left!==l||e.location.width!==s||e.location.height!==o))throw new n.Z("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:l,width:s,height:o}});return b.fromJSON(e)}))}static fromJSON(e){b.validateJSON(e);const t=new b;return t.location=Object.freeze((0,g.d9)(e.location)),t._updateFromData(e.data),Object.freeze(t)}static validateJSON(e){if(!e||!e.location)throw new n.Z("tilemap:missing-location","
1Location missing from tilemap response");if(!1===e.valid)throw new n.Z("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new n.Z("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new n.Z("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new n.Z("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}}function S(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}var w;const A=l.Z.getLogger("esri.layers.support.TilemapCache");let x=w=class extends d.Z{constructor(e){super(e),this._handles=new f.Z,this._pendingTilemapRequests={},this._availableLevels={},this.levels=5,this.cacheByteSize=2097152,this.request=y.default,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new v.Z(this.cacheByteSize),this._handles.add([this.watch(["layer.parsedUrl","layer.tileServers?"],(()=>this._initializeTilemapDefinition())),(0,m.S1)(this,"layer.tileInfo.lods",(e=>this._initializeAvailableLevels(e)),!0)]),this._initializeTilemapDefinition()}destroy(){this._handles&&(this._handles.destroy(),this._handles=null)}castLevels(e){return e<=2?(A.error("Minimum levels for Tilemap is 3, but got ",e),3):e}get size(){return 1<<this.levels}fetchTilemap(e,t,i,r){if(!this._availableLevels[e])return Promise.reject(new n.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const l=this._tmpTilemapDefinition,s=this._tilemapFromCache(e,t,i,l);if(s)return Promise.resolve(s);const o=r&&r.signal;return r={...r,signal:null},new Promise(((e,t)=>{(0,h.fu)(o,(()=>t((0,h.zE)())));const i=S(l);let s=this._pendingTilemapRequests[i];if(!s){s=b.fromDefinition(l,r).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>delete this._pendingTilemapRequests[i];this._pendingTilemapRequests[i]=s,s.then(e,e)}s.then(e,t)}))}getAvailability(e,t,i){if(!this._availableLevels[e])return"unavailable";const r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}getAvailabilityUpsample(e,t,i,r){r.level=e,r.row=t,r.col=i;const l=this.layer.tileInfo;for(l.updateTileInfo(r);;){const e=this.getAvailability(r.level,r.row,r.col);if("unavailable"!==e)return e;if(!l.upsampleTile(r))return"unavailable"}}fetchAvailability(e,t,i,r){return this._availableLevels[e]?this.fetchTilemap(e,t,i,r).catch((e=>e)).then((r=>{if(r instanceof b){const l=r.getAvailability(t,i);return"unavailable"===l?Promise.reject(new n.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})):l}if((0,h.D_)(r))throw r;return"unknown"})):Promise.reject(new n.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`))}fetchAvailabilityUpsample(e,t,i,r,l){r.level=e,r.row=t,r.col=i;const s=this.layer.tileInfo;s.updateTileInfo(r);const o=this.fetchAvailability(e,t,i,l).catch((e=>{if((0,h.D_)(e))throw e;if(s.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r);throw e}));return this._fetchAvailabilityUpsamplePrefetch(r.id,e,t,i,l,o),o}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,l,s){if(!this._prefetchingEnabled)return;const o=`prefetch-${e}`;if(this._handles.has(o))return;const a=(0,h.yi)();s.then((()=>a.abort()),(()=>a.abort()));let n=!1;const c={remove(){n||(n=!0,a.abort())}};if(this._handles.add(c,o),await(0,p.MU)(10,a.signal).catch((()=>{})),n||(n=!0,this._handles.remove(o)),(0,h.Hc)(a))return;const u={id:e,level:t,row:i,col:r},d={...l,signal:a.signal},y=this.layer.tileInfo;for(let h=0;w._prefetches.length<w._maxPrefetch&&y.upsampleTile(u);++h){const e=this.fetchAvailability(u.level,u.row,u.col,d);w._prefetches.push(e);const t=()=>{w._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const e=this.layer.parsedUrl,t=e.query;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:t?(0,c.B7)(t):null,tileServers:this.layer.tileServers,request:this.request,type:this.layer.type},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;const l=S(r);return this._tilemapCache.get(l)}_initializeAvailableLevels(e){this._availableLevels={},e&&e.forEach((e=>this._availableLevels[e.level]=!0))}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,i,r)=>!!e._tilemapFromCache(t,i,r,e._tmpTilemapDefinition)}}};x._maxPrefetch=4,x._prefetches=new u.Z({initialSize:w._maxPrefetch}
1),(0,r._)([(0,s.Cb)({constructOnly:!0,type:Number})],x.prototype,"levels",void 0),(0,r._)([(0,o.p)("levels")],x.prototype,"castLevels",null),(0,r._)([(0,s.Cb)({readOnly:!0,type:Number})],x.prototype,"size",null),(0,r._)([(0,s.Cb)({constructOnly:!0,type:Number})],x.prototype,"cacheByteSize",void 0),(0,r._)([(0,s.Cb)({constructOnly:!0})],x.prototype,"layer",void 0),(0,r._)([(0,s.Cb)({constructOnly:!0})],x.prototype,"request",void 0),x=w=(0,r._)([(0,a.j)("esri.layers.support.TilemapCache")],x)},58269:function(e,t,i){i.d(t,{d:function(){return s},h:function(){return l}});var r=i(81590);const l={type:r.Z,json:{origins:{service:{read:{source:["tileInfo","minScale","maxScale","minLOD","maxLOD"],reader:s}}}}};function s(e,t,i,l){if(!e)return null;const{minScale:s,maxScale:o,minLOD:a,maxLOD:n}=t;if(null!=a&&null!=n)return l&&l.ignoreMinMaxLOD?r.Z.fromJSON(e):r.Z.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=a&&e<=n))});if(0!==s&&0!==o){const t=e=>Math.round(1e4*e)/1e4,i=s?t(s):1/0,l=o?t(o):-1/0;return r.Z.fromJSON({...e,lods:e.lods.filter((e=>{const r=t(e.scale);return r<=i&&r>=l}))})}return r.Z.fromJSON(e)}},84513:function(e,t,i){i.d(t,{m:function(){return s}});var r=i(3466),l=i(81577);function s(e){return{origin:"portal-item",url:(0,r.mN)(e.itemUrl),portal:e.portal||l.Z.getDefault(),portalItem:e,readResourcePaths:[]}}},45212:function(e,t,i){var r=i(78668),l=i(47907),s=i(87241);t.Z=class{constructor(e){if(e instanceof l.y)this._tilemapCache=e;else{if(!e||!("index"in e))throw new Error("Invalid tilemap!");this._tilemap=e.index}}dataKey(e,t){if(this._tilemapCache){const{level:i,row:l,col:o}=e,a=new s.Z(e);return this._tilemapCache.fetchAvailabilityUpsample(i,l,o,a,t).then((()=>(a.world=e.world,a))).catch((e=>{if((0,r.D_)(e))throw e;return null}))}return this._getIndexedDataKey(e)}forEach(e,t,i,r,l){this._callback=l,this._maxLevel=t+e,this._forEach(this._tilemap,t,i,r)}_forEach(e,t,i,r){0!==e&&(this._callback(t,i,r),t!==this._maxLevel&&"object"==typeof e&&(this._forEach(e[0],t+1,2*i,2*r),this._forEach(e[1],t+1,2*i,2*r+1),this._forEach(e[2],t+1,2*i+1,2*r),this._forEach(e[3],t+1,2*i+1,2*r+1)))}_getIndexedDataKey(e){const t=[e];if(e.level<0||e.row<0||e.col<0||e.row>>e.level>0||e.col>>e.level>0)return Promise.resolve(null);let i=e;for(;0!==i.level;)i=new s.Z(i.level-1,i.row>>1,i.col>>1,i.world),t.push(i);let r,l,o=this._tilemap,a=t.pop();if(1===o)return Promise.resolve(a);for(;t.length;)if(r=t.pop(),l=(1&r.col)+((1&r.row)<<1),o){if(0===o[l]){a=null;break}if(1===o[l]){a=r;break}a=r,o=o[l]}return Promise.resolve(a)}}},87241:function(e,t,i){var r=i(34596);class l{constructor(e,t,i,r){this.set(e,t,i,r)}static getId(e,t,i,r){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${i}/${r}`}get key(){return this}get id(){return this.toString()}set id(e){this.set(e)}acquire(e,t,i,r){this.set(e,t,i,r)}contains(e){const t=e.level-this.level;return this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new l(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,i,r){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,i,r,l]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(i),this.col=parseFloat(r),this.world=parseFloat(l)}else this.level=+e,this.row=+t,this.col=+i,this.world=+r||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new l(this.level-1,this.row>>1,this.col>>1,this.world)}getChildKeys(){const e=this.level+1,t=this.row<<1,i=this.col<<1,r=this.world;return[new l(e,t,i,r),new l(e,t,i+1,r),new l(e,t+1,i,r),new l(e,t+1,i+1,r)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}l.pool=new r.Z(l,null,null,25,50),t.Z=l},50590:function(e,t,i){function r(e,t,i,r){const l=3*e,s=3*(i-e)-l,o=1-l-s,a=3*t,n=3*(r-t)-a,c=1-a-n;function u(e){return((o*e+s)*e+l)*e}function h(e){return(3*o*e+2*s)*e+l}return function(e,t=1e-6){return function(e){return((c*e+n)*e+a)*e}(function(e,t){let i,r,l,s,o,a;for(l=e,a=0;a<8;a++){if(s=u(l)-e,Math.abs(s)<t)return l;if(o=h(l),Math.abs(o)<1e-6)break;l-=s/o}if(i=0,r=1,l=e,l<i)return i;if(l>r)return r;for(;i<r;){if(s=u(l),Math.abs(s-e)<t)return l;e>s?i=l:r=l,l=.5*(r-i)+i}return l}(e,t))}}i.d(t,{LI:function(){return s},Qc:function(){return o},n_:function(){return r}});const l=/^cubic-bezier\((.*)\)/,s={};function o(e){let t=s[e]||null;if(!t){const i=l.exec(e);if(i){const e=i[1].split(",").map((e=>parseFloat(e.trim())));4!==e.length||e.some((e=>isNaN(e)))||(t=r.apply(r,e))}}return t}s.ease=r(.25,.1,.25,1),s.linear=r(0,0,1,1),s.easeIn=s["ease-in"]=r(.42,0,1,1),s.easeOut=s["ease-out"]=r(0,0,.58,1),s.easeInOut=s["ease-in-out"]=r(.42,0,.58,1)},35119:function(e,t,i){var r=i(36172);let l;t.Z=function(){return l||(l=function(){const e={available:!1,version:0,majorPerformanceCaveat:!1,maxTextureSize:0,supportsHighPrecisionFragment:!1,supportsVertexS
1haderSamplers:!1,supportsElementIndexUint:!1,supportsStandardDerivatives:!1,supportsInstancedArrays:!1,supportsTextureFloat:!1,supportsColorBufferFloat:!1};if(void 0===typeof WebGLRenderingContext)return e;const t=document.createElement("canvas");if(!t)return e;let i=(0,r.k)(t,{failIfMajorPerformanceCaveat:!0},"webgl");if(i||(i=(0,r.k)(t,{},"webgl"),i&&(e.majorPerformanceCaveat=!0)),!i)return e;const l=i.getParameter(i.VERSION);if(!l)return e;const s=l.match(/^WebGL\s+([\d.]*)/);if(s){const t=parseFloat(s[1]);e.available=t>=.94;const r=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);r&&(e.supportsHighPrecisionFragment=r.precision>0),e.supportsVertexShaderSamplers=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0,e.supportsElementIndexUint=null!==i.getExtension("OES_element_index_uint"),e.supportsStandardDerivatives=null!==i.getExtension("OES_standard_derivatives"),e.supportsInstancedArrays=null!==i.getExtension("ANGLE_instanced_arrays"),e.supportsTextureFloat=null!==i.getExtension("OES_texture_float"),e.supportsColorBufferFloat=null!==i.getExtension("WEBGL_color_buffer_float")&&null!==i.getExtension("EXT_float_blend")}return e.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),e.ver
1sion=function(){if(void 0===typeof WebGL2RenderingContext)return!1;const e=document.createElement("canvas");return!!e&&!!(0,r.k)(e,{},"webgl2")}()?2:1,e}()),l}},36172:function(e,t,i){function r(e,t={},i){if(!window.WebGLRenderingContext)return s(e,o),null;return l(e,t,i)||(s(e,a),null)}function l(e,t={},i){let r;switch(i){case"webgl":default:r=["webgl","experimental-webgl","webkit-3d","moz-webgl"];break;case"webgl2":r=["webgl2"]}let l=null;for(const o of r){try{l=e.getContext(o,t)}catch(s){}if(l)break}return l}function s(e,t){const i=e.parentNode;i&&(i.innerHTML='<table style="background-color: #8CE; width: 100%; height: 100%;"><tr><td align="center"><div style="display: table-cell; vertical-align: middle;"><div style="">'+t+"</div></div></td></tr></table>")}i.d(t,{k:function(){return l},s:function(){return r}});const o='This page requires a browser that supports WebGL.<br/><a href="http://get.webgl.org">Click here to upgrade your browser.</a>',a='It doesn\'t appear your computer can support WebGL.<br/><a href="http://get.webgl.org/troubleshooting/">Click here for more information.</a>'}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.