@arcgis/core 4.33.0-next.20250310 → 4.33.0-next.20250311

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 (36) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{6ce738960ee47904968f.js → 0137c17f15d79134b4ca.js} +6 -6
  3. package/assets/esri/core/workers/chunks/{aba4353892c47de98eb3.js → 3bbf7f89bc37c01b453b.js} +1 -1
  4. package/assets/esri/core/workers/chunks/4f2bb248dd258b493663.js +1 -0
  5. package/assets/esri/core/workers/chunks/{400951e3e742452a5fe2.js → 5b1b93665c93955491c4.js} +2 -2
  6. package/assets/esri/core/workers/chunks/7ca9230681d05ef89059.js +1 -0
  7. package/assets/esri/core/workers/chunks/{42b862550c96cc1be956.js → 81bf362ec0d23ffdc90c.js} +2 -2
  8. package/assets/esri/core/workers/chunks/{f0351930cbb3d8643119.js → bc988b9d3990380be907.js} +1 -1
  9. package/assets/esri/core/workers/chunks/ffd28a9b1d8db3a731f4.js +1 -0
  10. package/core/MemCache.js +1 -1
  11. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  12. package/package.json +1 -1
  13. package/support/revision.js +1 -1
  14. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  15. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  16. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  17. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  18. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  19. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  20. package/views/3d/layers/graphics/LabelInfo.js +1 -1
  21. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  22. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  23. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  24. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  25. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  26. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  27. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  28. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  29. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  30. package/views/webgl/VertexArrayObject.js +1 -1
  31. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  32. package/widgets/Editor/workflowUtils.js +1 -1
  33. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  34. package/assets/esri/core/workers/chunks/97078a7871e243c19b6b.js +0 -1
  35. package/assets/esri/core/workers/chunks/9dfdd8e91897d166d888.js +0 -1
  36. package/assets/esri/core/workers/chunks/c2939e0c45a6d074cac0.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4060],{4902:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(90237),s=r(40608);let l=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+l++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable")],t),t};let n=class extends(o(class{})){};var a;n=(0,i._)([(0,s.$)("esri.core.Identifiable")],n),(a=n||(n={})).IdentifiableMixin=o,a.NumericIdentifiableMixin=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:l++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};const u=n},8303:(e,t,r)=>{r.d(t,{A:()=>S});var i=r(90237),s=r(92602),l=r(70333),o=r(78888),n=r(60999),a=r(49186),u=r(53966),h=r(97768),c=r(74887),p=r(84952),d=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(83531),_=r(20655),A=r(80812),w=r(41318),v=r(10407);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new A.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!l.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,n;if(s)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,p.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(l.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,u=!1,h=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:h}};try{if(s?await r.reload():(r=new A.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:h}}}_getUserPrivileges(e,t){const r=(0,v.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=l.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=_.A.getDefault();if(s&&s.loaded&&(0,p.S8)(s.restUrl)===(0,p.S8)(i))return s.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,h=await(0,n.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?w.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return r&&i&&!(0,p.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,d.MZ)({type:A.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,d.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},x={credential:null,user:null}},18768:(e,t,r)=>{r.d(t,{b:()=>a});var i=r(90237),s=r(53966),l=r(10107),o=(r(44208),r(87811),r(40608)),n=r(60694);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,n.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,n.Jf)(e,s.A.getLogger(this)))}};return(0,i._)([(0,l.MZ)()],t.prototype,"title",null),(0,i._)([(0,l.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},36708:(e,t,r)=>{r.d(t,{C_:()=>p,OH:()=>f,Vh:()=>m,on:()=>c,pc:()=>g,wB:()=>a,z7:()=>u});var i=r(37955),s=r(36563),l=r(97768),o=r(74887),n=r(14012);function a(e,t,r={}){return h(e,t,r,d)}function u(e,t,r={}){return h(e,t,r,y)}function h(e,t,r={},i){let s=null;const o=r.once?(e,r)=>{i(e)&&((0,l.xt)(s),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(s=(0,n.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return s}function c(e,t,r,o={}){let n=null,u=null,h=null;function c(){n&&u&&(u.remove(),o.onListenerRemove?.(n),n=null,u=null)}function p(e){o.once&&o.once&&(0,l.xt)(h),r(e)}const d=a(e,((e,r)=>{c(),(0,i.wb)(e)&&(n=e,u=(0,i.on)(e,t,p),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,s.hA)((()=>{d.remove(),c()})),h}function p(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let n=null;function a(){n=(0,l.xt)(n)}return new Promise(((i,l)=>{n=(0,s.vE)([(0,o.u7)(r,(()=>{a(),l((0,o.NK)())})),h(e,(e=>{a(),i(e)}),{sync:!1,once:!0},t??d)])}))}(e,y,t)}function d(e){return!0}function y(e){return!!e}r(80559);const f={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},44159:(e,t,r)=>{r.d(t,{A:()=>s});var i=r(93687);class s{static{this.pool=new i.A(s,null,null,25,50)}static getId(e,t,r,i){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${r}/${i}`}constructor(e,t,r,i){this.set(e,t,r,i)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,r=63&this.level;return(3&this.world)<<30|t<<22|e<<8|r}acquire(e,t,r,i){this.set(e,t,r,i)}contains(e){const t=e.level-this.level;return t>=0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}containsChild(e){const t=e.level-this.level;return t>0&&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 s(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,r,i){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,r,i,s]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(r),this.col=parseFloat(i),this.world=parseFloat(s)}else this.level=+e,this.row=+t,this.col=+r,this.world=+i||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new s(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(e,t,r){const i=this.clone();return i.col+=e,i.row+=t,r.normalizeKey(i),i}getChildKeys(){const e=this.level+1,t=this.row<<1,r=this.col<<1,i=this.world;return[new s(e,t,r,i),new s(e,t,r+1,i),new s(e,t+1,r,i),new s(e,t+1,r+1,i)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}},48757:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ce});var i=r(90237),s=r(78888),l=r(60999),o=r(49186),n=r(4718),a=r(92071),u=r(74887),h=r(84952),c=r(10107),p=(r(44208),r(53966)),d=r(36005),y=r(40608),f=r(43937),m=r(5443),g=r(16930),_=r(4146),A=r(52136),w=r(89186),v=r(18768),S=r(63074),x=r(69208),b=r(16131),I=r(8303),R=r(54310),P=r(25036);let T=null;var U=r(34275);class M{constructor(e,t){this._spriteSource=e,this._maxTextureSize=t,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===e.type&&e.spriteFormat&&(this._spriteImageFormat=e.spriteFormat),e.pixelRatio&&(this.devicePixelRatio=e.pixelRatio),this.baseURL=e.spriteUrl}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData?this._spritesData[e]:null}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"}async _loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const{width:t,height:r,data:i,json:s}=await this._getSpriteData(this._spriteSource,e),l=Object.keys(s);if(!l||0===l.length||!i)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=s,this.width=t,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(t>n||r>n){const e=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw p.A.getLogger("esri.layers.support.SpriteSource").error(e),new o.A("SpriteSource",e)}let a;for(let e=0;e<i.length;e+=4)a=i[e+3]/255,i[e]=i[e]*a,i[e+1]=i[e+1]*a,i[e+2]=i[e+2]*a;this.image=i}async _getSpriteData(e,t){if("image"===e.type){let t,r;if(this.devicePixelRatio<1.15){if(!e.spriteSource1x)throw new o.A("SpriteSource","no image data provided for low resolution sprites!");t=e.spriteSource1x.image,r=e.spriteSource1x.json}else{if(!e.spriteSource2x)throw new o.A("SpriteSource","no image data provided for high resolution sprites!");t=e.spriteSource2x.image,r=e.spriteSource2x.json}return"width"in t&&"height"in t&&"data"in t&&((0,U.mw)(t.data)||(0,U.UR)(t.data))?{width:t.width,height:t.height,data:new Uint8Array(t.data),json:r}:{...E(t),json:r}}const r=(0,h.An)(this.baseURL),i=r.query?"?"+(0,h.x0)(r.query):"",l=this._isRetina?"@2x":"",n=`${r.path}${l}.${this._spriteImageFormat}${i}`,a=`${r.path}${l}.json${i}`,[u,c]=await Promise.all([(0,s.A)(a,t),(0,s.A)(n,{responseType:"image",...t})]);return{...E(c.data),json:u.data}}}function E(e){const t=document.createElement("canvas"),r=t.getContext("2d");t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height);return{width:e.width,height:e.height,data:new Uint8Array(i.data)}}var z=r(87045),L=r(25943),O=r(21325),D=r(28735),j=r(44159);class C{constructor(e){this.url=e}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.A)(this.url).then((e=>e.data.index))),this._tileIndexPromise}async dataKey(e,t){const r=await this.fetchTileIndex();return(0,u.Te)(t),this._getIndexedDataKey(r,e)}_getIndexedDataKey(e,t){const r=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let i=t;for(;0!==i.level;)i=new j.A(i.level-1,i.row>>1,i.col>>1,i.world),r.push(i);let s,l,o=e,n=r.pop();if(1===o)return n;for(;r.length;)if(s=r.pop(),l=(1&s.col)+((1&s.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=s;break}n=s,o=o[l]}return n}}var k=r(97768);class ${constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}destroy(){this._tilemap=(0,k.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.A)(this._tileIndexUrl,{query:{...e?.query}}).then((e=>e.data.index))),this._tileIndexPromise}dataKey(e,t){const{level:r,row:i,col:s}=e,l=new j.A(e);return this._tilemap.fetchAvailabilityUpsample(r,i,s,l,t).then((()=>(l.world=e.world,l))).catch((e=>{if((0,u.zf)(e))throw e;return null}))}}var F=r(91869);class B{constructor(e){this._tileUrl=e,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(e){(null==this._promise||(0,u.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const t=this._abortOptions;return t.push(e),(0,u.u7)(e,(()=>{t.every((e=>(0,u.G4)(e)))&&this._abortController.abort()})),this._promise.then((e=>(0,n.o8)(e)))}async _makeRequest(e){this._abortController=new AbortController;const{data:t}=await(0,s.A)(e,{responseType:"array-buffer",signal:this._abortController.signal});return t}}const N=new Map;function K(e,t){return(0,F.tE)(N,e,(()=>new B(e))).getData(t).finally((()=>N.delete(e)))}class Z{constructor(e,t,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=e,this.sourceUrl=t;const i=(0,h.An)(this.sourceUrl),s=(0,n.o8)(r),l=s.tiles;if(i)for(let e=0;e<l.length;e++){const t=(0,h.An)(l[e]);t&&((0,h.oP)(t.path)||(t.path=(0,h.fj)(i.path,t.path)),l[e]=(0,h.a6)(t.path,{...i.query,...t.query}))}this.tileServers=l;const o=r.capabilities&&r.capabilities.split(",").map((e=>e.toLowerCase().trim())),a=!0===r?.exportTilesAllowed,u=!0===o?.includes("tilemap"),c=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=z.A.fromJSON(s.tileInfo);const p=r.tileMap?(0,h.a6)((0,h.fj)(i.path,r.tileMap),i.query??{}):null;u?(this.type="vector-tile",this.tilemap=new $(new L.d({layer:{parsedUrl:i,tileInfo:this.tileInfo},minLOD:s.minLOD??this.tileInfo.lods[0].level,maxLOD:s.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new C(p)),this.fullExtent=m.A.fromJSON(r.fullExtent),this.initialExtent=m.A.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(e,t){return this.tilemap?this.tilemap.dataKey(e,t):e}requestTile(e,t,r,i){return function(e,t,r,i,s){const l=(0,h.An)(e),o=l.query;if(o)for(const[e,s]of Object.entries(o))switch(s){case"{x}":o[e]=i.toString();break;case"{y}":o[e]=r.toString();break;case"{z}":o[e]=t.toString()}const n=l.path;return K((0,h.a6)(n.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,i.toString()),{...l.query}),s)}(this.tileServers[t%this.tileServers.length],e,t,r,i)}isCompatibleWith(e){const t=this.tileInfo,r=e.tileInfo;if(!t.spatialReference.equals(r.spatialReference))return!1;if(!t.origin.equals(r.origin))return!1;if(Math.round(t.dpi)!==Math.round(r.dpi))return!1;const i=t.lods,s=r.lods,l=Math.min(i.length,s.length);for(let e=0;e<l;e++){const t=i[e],r=s[e];if(t.level!==r.level||Math.round(t.scale)!==Math.round(r.scale))return!1}return!0}}function q(...e){let t;for(const r of e)if(null!=r)if((0,h.BQ)(r)){if(t){const e=t.split("://")[0];t=e+":"+r.trim()}}else t=(0,h.oP)(r)?r:(0,h.fj)(t,r);return t?(0,h.UC)(t):void 0}async function Q(e,t,r,i,l){let o,n,a;if((0,u.Te)(l),"string"==typeof r){const e=(0,h.S8)(r);a=await(0,s.A)(e,{...l,responseType:"json",query:{f:"json",...l?.query}}),a.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=e,n=e}else null!=r&&(a={data:r},o=r.jsonUrl||null,n=i);const c=a?.data;if(G(c))return e.styleUrl=o||null,async function(e,t,r,i){const s=r?(0,h.nM)(r):(0,h.gd)();e.styleBase=s,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const l=[];if(t.sources&&t.sources.esri){const r=t.sources.esri;r.url?await Q(e,"esri",q(s,r.url),void 0,i):l.push(Q(e,"esri",r,s,i))}for(const r of Object.keys(t.sources))"esri"!==r&&"vector"===t.sources[r].type&&(t.sources[r].url?l.push(Q(e,r,q(s,t.sources[r].url),void 0,i)):t.sources[r].tiles&&l.push(Q(e,r,t.sources[r],s,i)));await Promise.all(l)}(e,c,n,l);if(function(e){return!G(e)}(c))return e.sourceUrl?W(e,c,n,!1,t,l):(e.sourceUrl=o||null,W(e,c,n,!0,t,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function H(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function G(e){return!!e&&"sources"in e&&!!e.sources}async function W(e,t,r,i,s,l){const o=r?(0,h.UC)(r)+"/":(0,h.gd)(),a=function(e){const t=512;if(function(e){return e.hasOwnProperty("tileInfo")}(e)){const r=e?.tileInfo;return null!=r&&(null==r.rows&&(r.rows=t),null==r.cols&&(r.cols=t)),e}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let i=null;if(H(e)){const{bounds:t}=e;if(t){const e=(0,D.Gh)({x:t[0],y:t[1],spatialReference:(0,n.o8)(O.KK)}),r=(0,D.Gh)({x:t[2],y:t[3],spatialReference:(0,n.o8)(O.KK)});i={xmin:e.x,ymin:e.y,xmax:r.x,ymax:r.y,spatialReference:(0,n.o8)(O.ch)}}}null===i&&(i=r);let s=78271.51696400007,l=295828763.7957775;const o=[],a=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?+e.maxzoom:22;for(let e=0;e<=a;e++)o.push({level:e,scale:l,resolution:s}),s/=2,l/=2;return{capabilities:"TilesOnly",initialExtent:i,fullExtent:r,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:t,cols:t,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:o,spatialReference:(0,n.o8)(O.ch)}}}(t),u=new Z(s,(0,h.a6)(o,l?.query??{}),a);if(!i&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(u.fullExtent):t.fullExtent=u.fullExtent.clone()),t.tileInfo&&u.tileInfo&&t.tileInfo.lods.length<u.tileInfo.lods.length&&(t.tileInfo=u.tileInfo)}if(i&&(e.sourceBase=o,e.source=t,e.validatedSource=a,e.primarySourceName=s),e.sourceNameToSource[s]=u,!H(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?Q(e,"",q(o,t.defaultStyles,"root.json"),void 0,l):Q(e,"",t.defaultStyles,q(o,"root.json"),l)}}var V=r(88788),J=r(39131),X=r(97159),Y=r(86738),ee=r(91806);const te=1e-6;function re(e,t){if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null==e||null==t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const r=e.origin,i=t.origin;if(Math.abs(r.x-i.x)>=te||Math.abs(r.y-i.y)>=te)return!1;let s,l;e.lods[0].scale>t.lods[0].scale?(s=e,l=t):(l=e,s=t);for(let e=s.lods[0].scale;e>=l.lods[l.lods.length-1].scale-te;e/=2)if(Math.abs(e-l.lods[0].scale)<te)return!0;return!1}function ie(e,t){if(e===t)return e;if(null==e&&null!=t)return t;if(null!=e&&null==t)return e;if(null==e||null==t)return null;const r=e.size[0],i=e.format,s=e.dpi,l=new Y.A({x:e.origin.x,y:e.origin.y}),o=e.spatialReference,n=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=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],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,f=0;for(;d>=c;)p.push(new ee.A({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new z.A({size:[r,r],dpi:s,format:i||"pbf",origin:l,lods:p,spatialReference:o})}var se=r(45013);class le{constructor(e){this.getUnmaskedRenderer=e}}function oe(e){const t=e.getExtension("WEBGL_debug_renderer_info");return t?new le((()=>e.getParameter(t.UNMASKED_RENDERER_WEBGL))):null}let ne;function ae(){return ne??=function(){const e=new ue,t=function(e){if("undefined"==typeof WebGL2RenderingContext)return null;const t=document.createElement("canvas");if(!t)return null;let r=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==r&&(r=t.getContext("webgl2"),null!=r&&(e.majorPerformanceCaveat=!0,e.unmaskedRenderer=oe(r)?.getUnmaskedRenderer()??"unknown")),null==r)return r;e.available=!0,e.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const i=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);return i&&(e.supportsHighPrecisionFragment=i.precision>0),r}(e);return null==t||(e.supportsColorBufferFloat=null!==t.getExtension("EXT_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||null!==t.getExtension("EXT_color_buffer_half_float")),e}(),ne}class ue{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}let he=class extends((0,S.dM)((0,P.j)((0,R.J)((0,w.f)((0,v.b)((0,b.q)((0,I.A)((0,x.d)((0,A.p)((0,a.P)(_.A))))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(u.QP).then((async()=>{if(!this.portalItem?.id)return;const t=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,s.A)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:t},(0,V.v)(this.portalItem,"portal-item"))})).catch(u.QP).then((()=>this._loadStyle(e)));return this.addResolvingPromise(t),Promise.resolve(this)}get attributionDataUrl(){const e=this.currentStyleInfo,t=e?.serviceUrl&&(0,h.An)(e.serviceUrl);if(!t)return null;const r=this._getDefaultAttribution(t.path);return r?(0,h.a6)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.An)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(e,t){e&&(0,h.BQ)(e)&&(e=`https:${e}`);const r=(0,J.py)(e);t.styleUrl=(0,X.e)(e,r)}get tileInfo(){const e=[];for(const t in this.sourceNameToSource)e.push(this.sourceNameToSource[t]);let t=this.primarySource?.tileInfo||new z.A;if(e.length>1)for(let r=0;r<e.length;r++)re(t,e[r].tileInfo)&&(t=ie(t,e[r].tileInfo));return t}readTilemapCache(e,t){const r=t.capabilities?.includes("Tilemap");return r?new L.d({layer:this}):null}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const r=ae().maxTextureSize,i=this.currentStyleInfo?.spriteUrl?(0,h.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,s=new M({type:"url",spriteUrl:i,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await s.load(t),this._spriteSourceMap.set(e,s)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const r=ae().maxTextureSize,i=e.spriteUrl,s=i?(0,h.a6)(i,{...this.customParameters,token:this.apiKey}):null;if(!s&&"url"===e.type)return null;const l=new M(e,r);try{await l.load(t);const r=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,l),s&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=s),this.emit("spriteSource-change",{spriteSource:l}),l}catch(e){(0,u.QP)(e)}return null}async loadStyle(e,t){const r=e||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,l.UT)((e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:e}))),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,n.o8)(this.styleRepository?.getPaintProperties(e))}setPaintProperties(e,t){const r=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const i=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:r||i})}getStyleLayer(e){return(0,n.o8)(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",{layer:e})}getLayoutProperties(e){return(0,n.o8)(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)}write(e,t){return t?.origin&&!this.styleUrl?(t.messages&&t.messages.push(new o.A("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,r){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const r=await async function(e,t){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[i,s]="string"==typeof e?[e,null]:[null,e.jsonUrl];return await Q(r,"esri",e,s,t),{layerDefinition:r.validatedSource,url:i,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&q(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&q(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(){if(T)return T;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return T=new Promise((t=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,t(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,t(!1)},r.src="data:image/webp;base64,"+e.lossy})),T}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new se.A(r.style)),this.read(r.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),r=["OpenBasemap_v2","OpenBasemap_GCS_v2","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","World_Hillshade_v2"];if(!t)return;const i=t[2]&&t[2].toLowerCase();if(!i)return;const s=t[1]||"";for(const e of r)if(e.toLowerCase().includes(i))return(0,h.S8)(`//static.arcgis.com/attribution/Vector${s}/${e}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"attributionDataUrl",null),(0,i._)([(0,c.MZ)({type:["show","hide"]})],he.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({json:{read:!0,write:!0}})],he.prototype,"blendMode",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],he.prototype,"capabilities",null),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"currentStyleInfo",void 0),(0,i._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],he.prototype,"fullExtent",null),(0,i._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],he.prototype,"initialExtent",null),(0,i._)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],he.prototype,"isReference",void 0),(0,i._)([(0,c.MZ)({type:["VectorTileLayer"]})],he.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"parsedUrl",null),(0,i._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],he.prototype,"path",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],he.prototype,"refreshInterval",void 0),(0,i._)([(0,c.MZ)()],he.prototype,"style",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"serviceUrl",null),(0,i._)([(0,c.MZ)({type:g.A,readOnly:!0})],he.prototype,"spatialReference",null),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"styleRepository",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"sourceNameToSource",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"primarySource",void 0),(0,i._)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],he.prototype,"styleUrl",null),(0,i._)([(0,f.K)(["portal-item","web-document"],"styleUrl")],he.prototype,"writeStyleUrl",null),(0,i._)([(0,c.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:z.A})],he.prototype,"tileInfo",null),(0,i._)([(0,c.MZ)()],he.prototype,"tilemapCache",void 0),(0,i._)([(0,d.w)("service","tilemapCache",["capabilities","tileInfo"])],he.prototype,"readTilemapCache",null),(0,i._)([(0,c.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],he.prototype,"type",void 0),(0,i._)([(0,c.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],he.prototype,"url",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"version",void 0),(0,i._)([(0,d.w)("version",["version","currentVersion"])],he.prototype,"readVersion",null),he=(0,i._)([(0,y.$)("esri.layers.VectorTileLayer")],he);const ce=he},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(90237),s=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,l.$)("esri.layers.mixins.APIKeyMixin")],t),t}},66344:(e,t,r)=>{r.d(t,{q:()=>a});var i,s,l=r(3694);(s=i||(i={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new l.A,this._users=new l.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear()}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const r=this._db.get(e.id+t);return r?.size??0}put(e,t,r,s,l){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,o.size,i.ALL)),s>this._maxSize)return void this._notifyRemove(t,r,s,i.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,r,0,i.ALL);const a=1+Math.max(l,-4)- -3;this._db.set(t,new n(r,s,a)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t,r,s){t=e.id+t;const l=this._db.get(t);if(l&&l.entry===r){for(this._size-=l.size,e.size-=l.size;s>this._maxSize;){const e=this._notifyRemove(t,r,s,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}l.size=s,this._size+=s,e.size+=s,this._checkSize()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}peek(e,t){const r=this._db.get(e.id+t);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,i)=>{const s=e.lifetime;r[s]=(r[s]||0)+e.size,this._users.forAll((r=>{const{id:s,name:l}=r;if(i.startsWith(s)){const r=t[l]||0;t[l]=r+e.size}}))}));const i={};this._users.forAll((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[r]||0;t[r]=s,i[r]=Math.round(100*e.hitRate)+"%"}else i[r]="0%"}));const s=Object.keys(t);s.sort(((e,r)=>t[r]-t[e])),s.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+i[r]));for(let t=r.length-1;t>=0;--t){const i=r[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r,i){let s;return this._removeFuncs.some((l=>{if(e.startsWith(l[0])){const e=l[1](t,i,r);return"number"==typeof e&&(s=e),!0}return!1})),s}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const r=e?.id;let i=!0;for(;i;){i=!1;for(const[s,l]of this._db)if(0===l.lifetime&&(!r||s.startsWith(r))){if(this._purgeItem(s,l,e),t.size<=.9*t.maxSize)return;i||=this._db.has(s)}}for(const[i,s]of this._db)if((!r||i.startsWith(r))&&(this._purgeItem(i,s,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,r=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=s&&s>0&&(this._size+=s,r&&(r.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class n{constructor(e,t,r){this.entry=e,this.size=t,this.lifetime=r,this.lives=r}}class a{constructor(e,t){this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(90237),s=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,l.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},78553:(e,t,r)=>{r.d(t,{D:()=>l,p:()=>s});var i=r(56507);function s(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},79677:(e,t,r)=>{r.d(t,{A:()=>d});var i,s=r(90237),l=r(25482),o=r(88930),n=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),h=r(43937),c=r(98623);let p=class extends l.A{static{i=this}static get allTime(){return y}static get empty(){return f}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===i&&r===s}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let s=this.end;if(s){const r=(0,o.lL)(s,e,t);s=s.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,l=e.end?.getTime()??1/0;let o,n;return s>=t&&s<=r?o=s:t>=s&&t<=l&&(o=t),r>=s&&r<=l?n=r:l>=t&&l<=r&&(n=l),null==o||null==n||isNaN(o)||isNaN(n)?i.empty:new i({start:o===-1/0?null:new Date(o),end:n===1/0?null:new Date(n)})}offset(e,t,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:l,end:n}=this;return null!=l&&(s.start=(0,o.S1)(l,e,t,r)),null!=n&&(s.end=(0,o.S1)(n,e,t,r)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return y.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,s._)([(0,a.w)("end")],p.prototype,"readEnd",null),(0,s._)([(0,h.K)("end")],p.prototype,"writeEnd",null),(0,s._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,s._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,s._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,s._)([(0,a.w)("start")],p.prototype,"readStart",null),(0,s._)([(0,h.K)("start")],p.prototype,"writeStart",null),p=i=(0,s._)([(0,u.$)("esri.time.TimeExtent")],p);const d=p,y=new p,f=new p({start:void 0,end:void 0})},88788:(e,t,r)=>{r.d(t,{m:()=>o,v:()=>l});var i=r(84952),s=r(20655);function l(e,t){return{...n(e,t),readResourcePaths:[]}}function o(e,t,r){const s=(0,i.An)(e.itemUrl);return{...n(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function n(e,t){return{origin:t,url:(0,i.An)(e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4060],{4902:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(90237),s=r(40608);let l=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+l++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable")],t),t};let n=class extends(o(class{})){};var a;n=(0,i._)([(0,s.$)("esri.core.Identifiable")],n),(a=n||(n={})).IdentifiableMixin=o,a.NumericIdentifiableMixin=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:l++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};const u=n},8303:(e,t,r)=>{r.d(t,{A:()=>S});var i=r(90237),s=r(92602),l=r(70333),o=r(78888),n=r(60999),a=r(49186),u=r(53966),h=r(97768),c=r(74887),p=r(84952),d=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(83531),_=r(20655),w=r(80812),A=r(41318),v=r(10407);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!l.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,n;if(s)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,p.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(l.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,u=!1,h=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:h}};try{if(s?await r.reload():(r=new w.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:h}}}_getUserPrivileges(e,t){const r=(0,v.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=l.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=_.A.getDefault();if(s&&s.loaded&&(0,p.S8)(s.restUrl)===(0,p.S8)(i))return s.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,h=await(0,n.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?A.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return r&&i&&!(0,p.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,d.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,d.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},x={credential:null,user:null}},18768:(e,t,r)=>{r.d(t,{b:()=>a});var i=r(90237),s=r(53966),l=r(10107),o=(r(44208),r(87811),r(40608)),n=r(60694);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,n.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,n.Jf)(e,s.A.getLogger(this)))}};return(0,i._)([(0,l.MZ)()],t.prototype,"title",null),(0,i._)([(0,l.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},36708:(e,t,r)=>{r.d(t,{C_:()=>p,OH:()=>f,Vh:()=>m,on:()=>c,pc:()=>g,wB:()=>a,z7:()=>u});var i=r(37955),s=r(36563),l=r(97768),o=r(74887),n=r(14012);function a(e,t,r={}){return h(e,t,r,d)}function u(e,t,r={}){return h(e,t,r,y)}function h(e,t,r={},i){let s=null;const o=r.once?(e,r)=>{i(e)&&((0,l.xt)(s),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(s=(0,n.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return s}function c(e,t,r,o={}){let n=null,u=null,h=null;function c(){n&&u&&(u.remove(),o.onListenerRemove?.(n),n=null,u=null)}function p(e){o.once&&o.once&&(0,l.xt)(h),r(e)}const d=a(e,((e,r)=>{c(),(0,i.wb)(e)&&(n=e,u=(0,i.on)(e,t,p),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,s.hA)((()=>{d.remove(),c()})),h}function p(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let n=null;function a(){n=(0,l.xt)(n)}return new Promise(((i,l)=>{n=(0,s.vE)([(0,o.u7)(r,(()=>{a(),l((0,o.NK)())})),h(e,(e=>{a(),i(e)}),{sync:!1,once:!0},t??d)])}))}(e,y,t)}function d(e){return!0}function y(e){return!!e}r(80559);const f={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},44159:(e,t,r)=>{r.d(t,{A:()=>s});var i=r(93687);class s{static{this.pool=new i.A(s,null,null,25,50)}static getId(e,t,r,i){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${r}/${i}`}constructor(e,t,r,i){this.set(e,t,r,i)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,r=63&this.level;return(3&this.world)<<30|t<<22|e<<8|r}acquire(e,t,r,i){this.set(e,t,r,i)}contains(e){const t=e.level-this.level;return t>=0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}containsChild(e){const t=e.level-this.level;return t>0&&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 s(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,r,i){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,r,i,s]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(r),this.col=parseFloat(i),this.world=parseFloat(s)}else this.level=+e,this.row=+t,this.col=+r,this.world=+i||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new s(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(e,t,r){const i=this.clone();return i.col+=e,i.row+=t,r.normalizeKey(i),i}getChildKeys(){const e=this.level+1,t=this.row<<1,r=this.col<<1,i=this.world;return[new s(e,t,r,i),new s(e,t,r+1,i),new s(e,t+1,r,i),new s(e,t+1,r+1,i)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}},48757:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ce});var i=r(90237),s=r(78888),l=r(60999),o=r(49186),n=r(4718),a=r(92071),u=r(74887),h=r(84952),c=r(10107),p=(r(44208),r(53966)),d=r(36005),y=r(40608),f=r(43937),m=r(5443),g=r(16930),_=r(4146),w=r(52136),A=r(89186),v=r(18768),S=r(63074),x=r(69208),b=r(16131),I=r(8303),R=r(54310),P=r(25036);let M=null;var T=r(34275);class U{constructor(e,t){this._spriteSource=e,this._maxTextureSize=t,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===e.type&&e.spriteFormat&&(this._spriteImageFormat=e.spriteFormat),e.pixelRatio&&(this.devicePixelRatio=e.pixelRatio),this.baseURL=e.spriteUrl}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData?this._spritesData[e]:null}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"}async _loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const{width:t,height:r,data:i,json:s}=await this._getSpriteData(this._spriteSource,e),l=Object.keys(s);if(!l||0===l.length||!i)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=s,this.width=t,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(t>n||r>n){const e=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw p.A.getLogger("esri.layers.support.SpriteSource").error(e),new o.A("SpriteSource",e)}let a;for(let e=0;e<i.length;e+=4)a=i[e+3]/255,i[e]=i[e]*a,i[e+1]=i[e+1]*a,i[e+2]=i[e+2]*a;this.image=i}async _getSpriteData(e,t){if("image"===e.type){let t,r;if(this.devicePixelRatio<1.15){if(!e.spriteSource1x)throw new o.A("SpriteSource","no image data provided for low resolution sprites!");t=e.spriteSource1x.image,r=e.spriteSource1x.json}else{if(!e.spriteSource2x)throw new o.A("SpriteSource","no image data provided for high resolution sprites!");t=e.spriteSource2x.image,r=e.spriteSource2x.json}return"width"in t&&"height"in t&&"data"in t&&((0,T.mw)(t.data)||(0,T.UR)(t.data))?{width:t.width,height:t.height,data:new Uint8Array(t.data),json:r}:{...E(t),json:r}}const r=(0,h.An)(this.baseURL),i=r.query?"?"+(0,h.x0)(r.query):"",l=this._isRetina?"@2x":"",n=`${r.path}${l}.${this._spriteImageFormat}${i}`,a=`${r.path}${l}.json${i}`,[u,c]=await Promise.all([(0,s.A)(a,t),(0,s.A)(n,{responseType:"image",...t})]);return{...E(c.data),json:u.data}}}function E(e){const t=document.createElement("canvas"),r=t.getContext("2d");t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height);return{width:e.width,height:e.height,data:new Uint8Array(i.data)}}var z=r(87045),L=r(25943),O=r(21325),D=r(28735),j=r(44159);class C{constructor(e){this.url=e}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.A)(this.url).then((e=>e.data.index))),this._tileIndexPromise}async dataKey(e,t){const r=await this.fetchTileIndex();return(0,u.Te)(t),this._getIndexedDataKey(r,e)}_getIndexedDataKey(e,t){const r=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let i=t;for(;0!==i.level;)i=new j.A(i.level-1,i.row>>1,i.col>>1,i.world),r.push(i);let s,l,o=e,n=r.pop();if(1===o)return n;for(;r.length;)if(s=r.pop(),l=(1&s.col)+((1&s.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=s;break}n=s,o=o[l]}return n}}var k=r(97768);class ${constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}destroy(){this._tilemap=(0,k.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.A)(this._tileIndexUrl,{query:{...e?.query}}).then((e=>e.data.index))),this._tileIndexPromise}dataKey(e,t){const{level:r,row:i,col:s}=e,l=new j.A(e);return this._tilemap.fetchAvailabilityUpsample(r,i,s,l,t).then((()=>(l.world=e.world,l))).catch((e=>{if((0,u.zf)(e))throw e;return null}))}}var F=r(91869);class B{constructor(e){this._tileUrl=e,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(e){(null==this._promise||(0,u.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const t=this._abortOptions;return t.push(e),(0,u.u7)(e,(()=>{t.every((e=>(0,u.G4)(e)))&&this._abortController.abort()})),this._promise.then((e=>(0,n.o8)(e)))}async _makeRequest(e){this._abortController=new AbortController;const{data:t}=await(0,s.A)(e,{responseType:"array-buffer",signal:this._abortController.signal});return t}}const N=new Map;function K(e,t){return(0,F.tE)(N,e,(()=>new B(e))).getData(t).finally((()=>N.delete(e)))}class Z{constructor(e,t,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=e,this.sourceUrl=t;const i=(0,h.An)(this.sourceUrl),s=(0,n.o8)(r),l=s.tiles;if(i)for(let e=0;e<l.length;e++){const t=(0,h.An)(l[e]);t&&((0,h.oP)(t.path)||(t.path=(0,h.fj)(i.path,t.path)),l[e]=(0,h.a6)(t.path,{...i.query,...t.query}))}this.tileServers=l;const o=r.capabilities&&r.capabilities.split(",").map((e=>e.toLowerCase().trim())),a=!0===r?.exportTilesAllowed,u=!0===o?.includes("tilemap"),c=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=z.A.fromJSON(s.tileInfo);const p=r.tileMap?(0,h.a6)((0,h.fj)(i.path,r.tileMap),i.query??{}):null;u?(this.type="vector-tile",this.tilemap=new $(new L.d({layer:{parsedUrl:i,tileInfo:this.tileInfo},minLOD:s.minLOD??this.tileInfo.lods[0].level,maxLOD:s.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new C(p)),this.fullExtent=m.A.fromJSON(r.fullExtent),this.initialExtent=m.A.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(e,t){return this.tilemap?this.tilemap.dataKey(e,t):e}requestTile(e,t,r,i){return function(e,t,r,i,s){const l=(0,h.An)(e),o=l.query;if(o)for(const[e,s]of Object.entries(o))switch(s){case"{x}":o[e]=i.toString();break;case"{y}":o[e]=r.toString();break;case"{z}":o[e]=t.toString()}const n=l.path;return K((0,h.a6)(n.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,i.toString()),{...l.query}),s)}(this.tileServers[t%this.tileServers.length],e,t,r,i)}isCompatibleWith(e){const t=this.tileInfo,r=e.tileInfo;if(!t.spatialReference.equals(r.spatialReference))return!1;if(!t.origin.equals(r.origin))return!1;if(Math.round(t.dpi)!==Math.round(r.dpi))return!1;const i=t.lods,s=r.lods,l=Math.min(i.length,s.length);for(let e=0;e<l;e++){const t=i[e],r=s[e];if(t.level!==r.level||Math.round(t.scale)!==Math.round(r.scale))return!1}return!0}}function q(...e){let t;for(const r of e)if(null!=r)if((0,h.BQ)(r)){if(t){const e=t.split("://")[0];t=e+":"+r.trim()}}else t=(0,h.oP)(r)?r:(0,h.fj)(t,r);return t?(0,h.UC)(t):void 0}async function Q(e,t,r,i,l){let o,n,a;if((0,u.Te)(l),"string"==typeof r){const e=(0,h.S8)(r);a=await(0,s.A)(e,{...l,responseType:"json",query:{f:"json",...l?.query}}),a.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=e,n=e}else null!=r&&(a={data:r},o=r.jsonUrl||null,n=i);const c=a?.data;if(G(c))return e.styleUrl=o||null,async function(e,t,r,i){const s=r?(0,h.nM)(r):(0,h.gd)();e.styleBase=s,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const l=[];if(t.sources&&t.sources.esri){const r=t.sources.esri;r.url?await Q(e,"esri",q(s,r.url),void 0,i):l.push(Q(e,"esri",r,s,i))}for(const r of Object.keys(t.sources))"esri"!==r&&"vector"===t.sources[r].type&&(t.sources[r].url?l.push(Q(e,r,q(s,t.sources[r].url),void 0,i)):t.sources[r].tiles&&l.push(Q(e,r,t.sources[r],s,i)));await Promise.all(l)}(e,c,n,l);if(function(e){return!G(e)}(c))return e.sourceUrl?W(e,c,n,!1,t,l):(e.sourceUrl=o||null,W(e,c,n,!0,t,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function H(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function G(e){return!!e&&"sources"in e&&!!e.sources}async function W(e,t,r,i,s,l){const o=r?(0,h.UC)(r)+"/":(0,h.gd)(),a=function(e){const t=512;if(function(e){return e.hasOwnProperty("tileInfo")}(e)){const r=e?.tileInfo;return null!=r&&(null==r.rows&&(r.rows=t),null==r.cols&&(r.cols=t)),e}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let i=null;if(H(e)){const{bounds:t}=e;if(t){const e=(0,D.Gh)({x:t[0],y:t[1],spatialReference:(0,n.o8)(O.KK)}),r=(0,D.Gh)({x:t[2],y:t[3],spatialReference:(0,n.o8)(O.KK)});i={xmin:e.x,ymin:e.y,xmax:r.x,ymax:r.y,spatialReference:(0,n.o8)(O.ch)}}}null===i&&(i=r);let s=78271.51696400007,l=295828763.7957775;const o=[],a=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?+e.maxzoom:22;for(let e=0;e<=a;e++)o.push({level:e,scale:l,resolution:s}),s/=2,l/=2;return{capabilities:"TilesOnly",initialExtent:i,fullExtent:r,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:t,cols:t,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:o,spatialReference:(0,n.o8)(O.ch)}}}(t),u=new Z(s,(0,h.a6)(o,l?.query??{}),a);if(!i&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(u.fullExtent):t.fullExtent=u.fullExtent.clone()),t.tileInfo&&u.tileInfo&&t.tileInfo.lods.length<u.tileInfo.lods.length&&(t.tileInfo=u.tileInfo)}if(i&&(e.sourceBase=o,e.source=t,e.validatedSource=a,e.primarySourceName=s),e.sourceNameToSource[s]=u,!H(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?Q(e,"",q(o,t.defaultStyles,"root.json"),void 0,l):Q(e,"",t.defaultStyles,q(o,"root.json"),l)}}var V=r(88788),J=r(39131),X=r(97159),Y=r(86738),ee=r(91806);const te=1e-6;function re(e,t){if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null==e||null==t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const r=e.origin,i=t.origin;if(Math.abs(r.x-i.x)>=te||Math.abs(r.y-i.y)>=te)return!1;let s,l;e.lods[0].scale>t.lods[0].scale?(s=e,l=t):(l=e,s=t);for(let e=s.lods[0].scale;e>=l.lods[l.lods.length-1].scale-te;e/=2)if(Math.abs(e-l.lods[0].scale)<te)return!0;return!1}function ie(e,t){if(e===t)return e;if(null==e&&null!=t)return t;if(null!=e&&null==t)return e;if(null==e||null==t)return null;const r=e.size[0],i=e.format,s=e.dpi,l=new Y.A({x:e.origin.x,y:e.origin.y}),o=e.spatialReference,n=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=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],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,f=0;for(;d>=c;)p.push(new ee.A({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new z.A({size:[r,r],dpi:s,format:i||"pbf",origin:l,lods:p,spatialReference:o})}var se=r(45013);class le{constructor(e){this.getUnmaskedRenderer=e}}function oe(e){const t=e.getExtension("WEBGL_debug_renderer_info");return t?new le((()=>e.getParameter(t.UNMASKED_RENDERER_WEBGL))):null}let ne;function ae(){return ne??=function(){const e=new ue,t=function(e){if("undefined"==typeof WebGL2RenderingContext)return null;const t=document.createElement("canvas");if(!t)return null;let r=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==r&&(r=t.getContext("webgl2"),null!=r&&(e.majorPerformanceCaveat=!0,e.unmaskedRenderer=oe(r)?.getUnmaskedRenderer()??"unknown")),null==r)return r;e.available=!0,e.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const i=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);return i&&(e.supportsHighPrecisionFragment=i.precision>0),r}(e);return null==t||(e.supportsColorBufferFloat=null!==t.getExtension("EXT_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||null!==t.getExtension("EXT_color_buffer_half_float")),e}(),ne}class ue{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}let he=class extends((0,S.dM)((0,P.j)((0,R.J)((0,A.f)((0,v.b)((0,b.q)((0,I.A)((0,x.d)((0,w.p)((0,a.P)(_.A))))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(u.QP).then((async()=>{if(!this.portalItem?.id)return;const t=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,s.A)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:t},(0,V.v)(this.portalItem,"portal-item"))})).catch(u.QP).then((()=>this._loadStyle(e)));return this.addResolvingPromise(t),Promise.resolve(this)}get attributionDataUrl(){const e=this.currentStyleInfo,t=e?.serviceUrl&&(0,h.An)(e.serviceUrl);if(!t)return null;const r=this._getDefaultAttribution(t.path);return r?(0,h.a6)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.An)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(e,t){e&&(0,h.BQ)(e)&&(e=`https:${e}`);const r=(0,J.py)(e);t.styleUrl=(0,X.e)(e,r)}get tileInfo(){const e=[];for(const t in this.sourceNameToSource)e.push(this.sourceNameToSource[t]);let t=this.primarySource?.tileInfo||new z.A;if(e.length>1)for(let r=0;r<e.length;r++)re(t,e[r].tileInfo)&&(t=ie(t,e[r].tileInfo));return t}readTilemapCache(e,t){const r=t.capabilities?.includes("Tilemap");return r?new L.d({layer:this}):null}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const r=ae().maxTextureSize,i=this.currentStyleInfo?.spriteUrl?(0,h.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,s=new U({type:"url",spriteUrl:i,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await s.load(t),this._spriteSourceMap.set(e,s)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const r=ae().maxTextureSize,i=e.spriteUrl,s=i?(0,h.a6)(i,{...this.customParameters,token:this.apiKey}):null;if(!s&&"url"===e.type)return null;const l=new U(e,r);try{await l.load(t);const r=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,l),s&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=s),this.emit("spriteSource-change",{spriteSource:l}),l}catch(e){(0,u.QP)(e)}return null}async loadStyle(e,t){const r=e||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,l.UT)((e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:e}))),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,n.o8)(this.styleRepository?.getPaintProperties(e))}setPaintProperties(e,t){const r=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const i=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:r||i})}getStyleLayer(e){return(0,n.o8)(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",{layer:e})}getLayoutProperties(e){return(0,n.o8)(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)}write(e,t){return t?.origin&&!this.styleUrl?(t.messages&&t.messages.push(new o.A("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,r){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const r=await async function(e,t){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[i,s]="string"==typeof e?[e,null]:[null,e.jsonUrl];return await Q(r,"esri",e,s,t),{layerDefinition:r.validatedSource,url:i,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&q(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&q(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(){if(M)return M;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return M=new Promise((t=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,t(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,t(!1)},r.src="data:image/webp;base64,"+e.lossy})),M}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new se.A(r.style)),this.read(r.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),r=["OpenBasemap_v2","OpenBasemap_GCS_v2","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","World_Hillshade_v2"];if(!t)return;const i=t[2]&&t[2].toLowerCase();if(!i)return;const s=t[1]||"";for(const e of r)if(e.toLowerCase().includes(i))return(0,h.S8)(`//static.arcgis.com/attribution/Vector${s}/${e}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"attributionDataUrl",null),(0,i._)([(0,c.MZ)({type:["show","hide"]})],he.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({json:{read:!0,write:!0}})],he.prototype,"blendMode",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],he.prototype,"capabilities",null),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"currentStyleInfo",void 0),(0,i._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],he.prototype,"fullExtent",null),(0,i._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],he.prototype,"initialExtent",null),(0,i._)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],he.prototype,"isReference",void 0),(0,i._)([(0,c.MZ)({type:["VectorTileLayer"]})],he.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"parsedUrl",null),(0,i._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],he.prototype,"path",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],he.prototype,"refreshInterval",void 0),(0,i._)([(0,c.MZ)()],he.prototype,"style",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"serviceUrl",null),(0,i._)([(0,c.MZ)({type:g.A,readOnly:!0})],he.prototype,"spatialReference",null),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"styleRepository",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"sourceNameToSource",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"primarySource",void 0),(0,i._)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],he.prototype,"styleUrl",null),(0,i._)([(0,f.K)(["portal-item","web-document"],"styleUrl")],he.prototype,"writeStyleUrl",null),(0,i._)([(0,c.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:z.A})],he.prototype,"tileInfo",null),(0,i._)([(0,c.MZ)()],he.prototype,"tilemapCache",void 0),(0,i._)([(0,d.w)("service","tilemapCache",["capabilities","tileInfo"])],he.prototype,"readTilemapCache",null),(0,i._)([(0,c.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],he.prototype,"type",void 0),(0,i._)([(0,c.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],he.prototype,"url",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],he.prototype,"version",void 0),(0,i._)([(0,d.w)("version",["version","currentVersion"])],he.prototype,"readVersion",null),he=(0,i._)([(0,y.$)("esri.layers.VectorTileLayer")],he);const ce=he},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(90237),s=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,l.$)("esri.layers.mixins.APIKeyMixin")],t),t}},66344:(e,t,r)=>{r.d(t,{q:()=>a});var i,s,l=r(3694);(s=i||(i={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new l.A,this._users=new l.A,this._sizeLimits=new Map}destroy(){this.clearAll(),this._removeFuncs.clear(),this._sizeLimits.clear(),this._users.clear()}register(e){this._users.push(e)}deregister(e){this._sizeLimits.delete(e),this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const r=this._db.get(e.id+t);return r?.size??0}put(e,t,r,s,l){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,o.size,i.ALL)),s>this._maxSize)return void this._notifyRemove(t,r,s,i.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,r,0,i.ALL);const a=1+Math.max(l,-4)- -3;this._db.set(t,new n(r,s,a)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t,r,s){t=e.id+t;const l=this._db.get(t);if(l&&l.entry===r){for(this._size-=l.size,e.size-=l.size;s>this._maxSize;){const e=this._notifyRemove(t,r,s,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}l.size=s,this._size+=s,e.size+=s,this._checkSize()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}peek(e,t){const r=this._db.get(e.id+t);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,i)=>{const s=e.lifetime;r[s]=(r[s]||0)+e.size,this._users.forAll((r=>{const{id:s,name:l}=r;if(i.startsWith(s)){const r=t[l]||0;t[l]=r+e.size}}))}));const i={};this._users.forAll((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[r]||0;t[r]=s,i[r]=Math.round(100*e.hitRate)+"%"}else i[r]="0%"}));const s=Object.keys(t);s.sort(((e,r)=>t[r]-t[e])),s.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+i[r]));for(let t=r.length-1;t>=0;--t){const i=r[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r,i){let s;return this._removeFuncs.some((l=>{if(e.startsWith(l[0])){const e=l[1](t,i,r);return"number"==typeof e&&(s=e),!0}return!1})),s}_checkSize(){this._sizeLimits.forEach(((e,t)=>this._checkSizeLimits(e,t))),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const r=t??this;if(r.size<=e)return;const i=t?.id;let s=!0;for(;s;){s=!1;for(const[l,o]of this._db)if(0===o.lifetime&&(!i||l.startsWith(i))){if(this._purgeItem(l,o,t),r.size<=.9*e)return;s||=this._db.has(l)}}for(const[s,l]of this._db)if((!i||s.startsWith(i))&&(this._purgeItem(s,l,t),r.size<=.9*e))return}_purgeItem(e,t,r=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=s&&s>0&&(this._size+=s,r&&(r.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class n{constructor(e,t,r){this.entry=e,this.size=t,this.lifetime=r,this.lives=r}}class a{constructor(e,t){this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(90237),s=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,l.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},78553:(e,t,r)=>{r.d(t,{D:()=>l,p:()=>s});var i=r(56507);function s(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},79677:(e,t,r)=>{r.d(t,{A:()=>d});var i,s=r(90237),l=r(25482),o=r(88930),n=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),h=r(43937),c=r(98623);let p=class extends l.A{static{i=this}static get allTime(){return y}static get empty(){return f}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===i&&r===s}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let s=this.end;if(s){const r=(0,o.lL)(s,e,t);s=s.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,l=e.end?.getTime()??1/0;let o,n;return s>=t&&s<=r?o=s:t>=s&&t<=l&&(o=t),r>=s&&r<=l?n=r:l>=t&&l<=r&&(n=l),null==o||null==n||isNaN(o)||isNaN(n)?i.empty:new i({start:o===-1/0?null:new Date(o),end:n===1/0?null:new Date(n)})}offset(e,t,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:l,end:n}=this;return null!=l&&(s.start=(0,o.S1)(l,e,t,r)),null!=n&&(s.end=(0,o.S1)(n,e,t,r)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return y.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,s._)([(0,a.w)("end")],p.prototype,"readEnd",null),(0,s._)([(0,h.K)("end")],p.prototype,"writeEnd",null),(0,s._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,s._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,s._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,s._)([(0,a.w)("start")],p.prototype,"readStart",null),(0,s._)([(0,h.K)("start")],p.prototype,"writeStart",null),p=i=(0,s._)([(0,u.$)("esri.time.TimeExtent")],p);const d=p,y=new p,f=new p({start:void 0,end:void 0})},88788:(e,t,r)=>{r.d(t,{m:()=>o,v:()=>l});var i=r(84952),s=r(20655);function l(e,t){return{...n(e,t),readResourcePaths:[]}}function o(e,t,r){const s=(0,i.An)(e.itemUrl);return{...n(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function n(e,t){return{origin:t,url:(0,i.An)(e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5055],{6797:(e,t,i)=>{i.d(t,{Mj:()=>d,Ui:()=>m,w2:()=>h});var n=i(69622),r=i(5503),o=i(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof n.A}function a(e){return e instanceof r.A?Object.keys(e.items):l(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function c(e,t){return e instanceof r.A?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function f(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const n=a(e),r=a(t);if(0===n.length&&0===r.length)return;if(!n.length||!r.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=r.filter((e=>!n.includes(e))),d=n.filter((e=>!r.includes(e))),h=n.filter((i=>r.includes(i)&&c(e,i)!==c(t,i))).concat(o,d).sort(),m=u(e);if(m&&s.has(m)&&h.length)return{type:"complete",oldValue:e,newValue:t};let p;const y=l(e)&&l(t);for(const n of h){const r=c(e,n),o=c(t,n);let s;if((y||"function"!=typeof r&&"function"!=typeof o)&&r!==o&&(null!=r||null!=o)){if(i&&i[n]&&"function"==typeof i[n])s=i[n]?.(r,o);else if(r instanceof Date&&o instanceof Date){if(r.getTime()===o.getTime())continue;s={type:"complete",oldValue:r,newValue:o}}else s="object"==typeof r&&"object"==typeof o&&u(r)===u(o)?f(r,o):{type:"complete",oldValue:r,newValue:o};null!=s&&(null!=p?p.diff[n]=s:p={type:"partial",diff:{[n]:s}})}}return p}function d(e,t){return function(e,t){if(null==e)return!1;const i=t.split(".");let n=e;for(const e of i){if("complete"===n.type)return!0;if("partial"!==n.type)return!1;{const t=n.diff[e];if(!t)return!1;n=t}}return!0}(e,t)}function h(e,t){if(!e)return!1;if("partial"===e.type){const i=Object.keys(e.diff);return 1===i.length&&i[0]===t}return!1}function m(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:f(e,t)}},15294:(e,t,i)=>{var n,r,o,s,l,a,c,u,f,d,h,m,p,y,g,C,M,S,b,T,k,I,A,_,L,P,w,z,R,v,x,E,O,N,D,B,F,W,G,H,U,V,J,j,q,Y,Z,X,K,Q,$,ee,te,ie,ne,re,oe,se,le,ae,ce,ue,fe;i.d(t,{$2:()=>l,Ao:()=>_,C1:()=>o,Hz:()=>m,JO:()=>r,M1:()=>A,OW:()=>re,Q1:()=>X,WE:()=>R,YI:()=>Q,e_:()=>Z,fu:()=>h,ip:()=>K,oF:()=>k,uQ:()=>I,uT:()=>W,wd:()=>V,xR:()=>n,xw:()=>P,yS:()=>G}),function(e){e[e.BUTT=0]="BUTT",e[e.ROUND=1]="ROUND",e[e.SQUARE=2]="SQUARE",e[e.UNKNOWN=4]="UNKNOWN"}(n||(n={})),function(e){e[e.BEVEL=0]="BEVEL",e[e.ROUND=1]="ROUND",e[e.MITER=2]="MITER",e[e.UNKNOWN=4]="UNKNOWN"}(r||(r={})),function(e){e[e.SCREEN=0]="SCREEN",e[e.MAP=1]="MAP"}(o||(o={})),function(e){e[e.Tint=0]="Tint",e[e.Ignore=1]="Ignore",e[e.Multiply=99]="Multiply"}(s||(s={})),function(e){e.Both="Both",e.JustBegin="JustBegin",e.JustEnd="JustEnd",e.None="None"}(l||(l={})),function(e){e[e.Mosaic=0]="Mosaic",e[e.Centered=1]="Centered"}(a||(a={})),function(e){e[e.Normal=0]="Normal",e[e.Superscript=1]="Superscript",e[e.Subscript=2]="Subscript"}(c||(c={})),function(e){e[e.MSSymbol=0]="MSSymbol",e[e.Unicode=1]="Unicode"}(u||(u={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.TrueType=1]="TrueType",e[e.PSOpenType=2]="PSOpenType",e[e.TTOpenType=3]="TTOpenType",e[e.Type1=4]="Type1"}(f||(f={})),function(e){e[e.Display=0]="Display",e[e.Map=1]="Map"}(d||(d={})),function(e){e.None="None",e.Loop="Loop",e.Oscillate="Oscillate"}(h||(h={})),function(e){e.Linear="Linear",e.EaseIn="EaseIn",e.EaseOut="EaseOut",e.EaseInOut="EaseInOut"}(m||(m={})),function(e){e[e.Z=0]="Z",e[e.X=1]="X",e[e.Y=2]="Y"}(p||(p={})),function(e){e[e.XYZ=0]="XYZ",e[e.ZXY=1]="ZXY",e[e.YXZ=2]="YXZ"}(y||(y={})),function(e){e[e.Rectangle=0]="Rectangle",e[e.RoundedRectangle=1]="RoundedRectangle",e[e.Oval=2]="Oval"}(g||(g={})),function(e){e[e.None=0]="None",e[e.Alpha=1]="Alpha",e[e.Screen=2]="Screen",e[e.Multiply=3]="Multiply",e[e.Add=4]="Add"}(C||(C={})),function(e){e[e.TTB=0]="TTB",e[e.RTL=1]="RTL",e[e.BTT=2]="BTT"}(M||(M={})),function(e){e[e.None=0]="None",e[e.SignPost=1]="SignPost",e[e.FaceNearPlane=2]="FaceNearPlane"}(S||(S={})),function(e){e[e.Float=0]="Float",e[e.String=1]="String",e[e.Boolean=2]="Boolean"}(b||(b={})),function(e){e[e.Intersect=0]="Intersect",e[e.Subtract=1]="Subtract"}(T||(T={})),function(e){e.OpenEnded="OpenEnded",e.Block="Block",e.Crossed="Crossed"}(k||(k={})),function(e){e.FullGeometry="FullGeometry",e.PerpendicularFromFirstSegment="PerpendicularFromFirstSegment",e.ReversedFirstSegment="ReversedFirstSegment",e.PerpendicularToSecondSegment="PerpendicularToSecondSegment",e.SecondSegmentWithTicks="SecondSegmentWithTicks",e.DoublePerpendicular="DoublePerpendicular",e.OppositeToFirstSegment="OppositeToFirstSegment",e.TriplePerpendicular="TriplePerpendicular",e.HalfCircleFirstSegment="HalfCircleFirstSegment",e.HalfCircleSecondSegment="HalfCircleSecondSegment",e.HalfCircleExtended="HalfCircleExtended",e.OpenCircle="OpenCircle",e.CoverageEdgesWithTicks="CoverageEdgesWithTicks",e.GapExtentWithDoubleTicks="GapExtentWithDoubleTicks",e.GapExtentMidline="GapExtentMidline",e.Chevron="Chevron",e.PerpendicularWithArc="PerpendicularWithArc",e.ClosedHalfCircle="ClosedHalfCircle",e.TripleParallelExtended="TripleParallelExtended",e.ParallelWithTicks="ParallelWithTicks",e.Parallel="Parallel",e.PerpendicularToFirstSegment="PerpendicularToFirstSegment",e.ParallelOffset="ParallelOffset",e.OffsetOpposite="OffsetOpposite",e.OffsetSame="OffsetSame",e.CircleWithArc="CircleWithArc",e.DoubleJog="DoubleJog",e.PerpendicularOffset="PerpendicularOffset",e.LineExcludingLastSegment="LineExcludingLastSegment",e.MultivertexArrow="MultivertexArrow",e.CrossedArrow="CrossedArrow",e.ChevronArrow="ChevronArrow",e.ChevronArrowOffset="ChevronArrowOffset",e.PartialFirstSegment="PartialFirstSegment",e.Arch="Arch",e.CurvedParallelTicks="CurvedParallelTicks",e.Arc90Degrees="Arc90Degrees",e.TipWithPerpendicularAndTicks="TipWithPerpendicularAndTicks",e.ConcentricCircles="ConcentricCircles",e.DoubleJogArrow="DoubleJogArrow",e.LinkedChevrons="LinkedChevrons",e.SegmentThenHalfCircle="SegmentThenHalfCircle",e.LineWithStraightTicks="LineWithStraightTicks",e.DoubleCurve="DoubleCurve",e.ParallelWithTicksByWidth="ParallelWithTicksByWidth",e.EnclosingRoundedRectangle="EnclosingRoundedRectangle"}(I||(I={})),function(e){e.Mitered="Mitered",e.Bevelled="Bevelled",e.Rounded="Rounded",e.Square="Square",e.TrueBuffer="TrueBuffer"}(A||(A={})),function(e){e.ClosePath="ClosePath",e.ConvexHull="ConvexHull",e.RectangularBox="RectangularBox"}(_||(_={})),function(e){e.BeginningOfLine="BeginningOfLine",e.EndOfLine="EndOfLine"}(L||(L={})),function(e){e.Mitered="Mitered",e.Bevelled="Bevelled",e.Rounded="Rounded",e.Square="Square"}(P||(P={})),function(e){e.Fast="Fast",e.Accurate="Accurate"}(w||(w={})),function(e){e.BeginningOfLine="BeginningOfLine",e.EndOfLine="EndOfLine"}(z||(z={})),function(e){e.Sinus="Sinus",e.Square="Square",e.Triangle="Triangle",e.Random="Random"}(R||(R={})),function(e){e[e.None=0]="None",e[e.Default=1]="Default",e[e.Force=2]="Force"}(v||(v={})),function(e){e[e.Buffered=0]="Buffered",e[e.Left=1]="Left",e[e.Right=2]="Right",e[e.AlongLine=3]="AlongLine"}(x||(x={})),function(e){e[e.Linear=0]="Linear",e[e.Rectangular=1]="Rectangular",e[e.Circular=2]="Circular",e[e.Buffered=3]="Buffered"}(E||(E={})),function(e){e[e.Discrete=0]="Discrete",e[e.Continuous=1]="Continuous"}(O||(O={})),function(e){e[e.AcrossLine=0]="AcrossLine",e[e.AlongLine=1]="AlongLine"}(N||(N={})),function(e){e[e.Auto=0]="Auto",e[e.Clockwise=1]="Clockwise",e[e.Counterclockwise=2]="Counterclockwise"}(D||(D={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Center=2]="Center",e[e.Justify=3]="Justify"}(B||(B={})),function(e){e[e.Base=0]="Base",e[e.MidPoint=1]="MidPoint",e[e.ThreePoint=2]="ThreePoint",e[e.FourPoint=3]="FourPoint",e[e.Underline=4]="Underline",e[e.CircularCW=5]="CircularCW",e[e.CircularCCW=6]="CircularCCW"}(F||(F={})),function(e){e.Butt="Butt",e.Round="Round",e.Square="Square"}(W||(W={})),function(e){e.NoConstraint="NoConstraint",e.HalfPattern="HalfPattern",e.HalfGap="HalfGap",e.FullPattern="FullPattern",e.FullGap="FullGap",e.Custom="Custom"}(G||(G={})),function(e){e[e.None=-1]="None",e[e.Custom=0]="Custom",e[e.Circle=1]="Circle",e[e.OpenArrow=2]="OpenArrow",e[e.ClosedArrow=3]="ClosedArrow",e[e.Diamond=4]="Diamond"}(H||(H={})),function(e){e[e.ExtraLeading=0]="ExtraLeading",e[e.Multiple=1]="Multiple",e[e.Exact=2]="Exact"}(U||(U={})),function(e){e.Bevel="Bevel",e.Round="Round",e.Miter="Miter"}(V||(V={})),function(e){e[e.Default=0]="Default",e[e.String=1]="String",e[e.Numeric=2]="Numeric"}(J||(J={})),function(e){e[e.InsidePolygon=0]="InsidePolygon",e[e.PolygonCenter=1]="PolygonCenter",e[e.RandomlyInsidePolygon=2]="RandomlyInsidePolygon"}(j||(j={})),function(e){e[e.Tint=0]="Tint",e[e.Replace=1]="Replace",e[e.Multiply=2]="Multiply"}(q||(q={})),function(e){e[e.ClipAtBoundary=0]="ClipAtBoundary",e[e.RemoveIfCenterOutsideBoundary=1]="RemoveIfCenterOutsideBoundary",e[e.DoNotTouchBoundary=2]="DoNotTouchBoundary",e[e.DoNotClip=3]="DoNotClip"}(Y||(Y={})),function(e){e.NoConstraint="NoConstraint",e.WithMarkers="WithMarkers",e.WithFullGap="WithFullGap",e.WithHalfGap="WithHalfGap",e.Custom="Custom"}(Z||(Z={})),function(e){e.Fixed="Fixed",e.Random="Random",e.RandomFixedQuantity="RandomFixedQuantity"}(X||(X={})),function(e){e.LineMiddle="LineMiddle",e.LineBeginning="LineBeginning",e.LineEnd="LineEnd",e.SegmentMidpoint="SegmentMidpoint"}(K||(K={})),function(e){e.OnPolygon="OnPolygon",e.CenterOfMass="CenterOfMass",e.BoundingBoxCenter="BoundingBoxCenter"}(Q||(Q={})),function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High"}($||($={})),function(e){e[e.MarkerCenter=0]="MarkerCenter",e[e.MarkerBounds=1]="MarkerBounds"}(ee||(ee={})),function(e){e[e.None=0]="None",e[e.PropUniform=1]="PropUniform",e[e.PropNonuniform=2]="PropNonuniform",e[e.DifUniform=3]="DifUniform",e[e.DifNonuniform=4]="DifNonuniform"}(te||(te={})),function(e){e.Tube="Tube",e.Strip="Strip",e.Wall="Wall"}(ie||(ie={})),function(e){e[e.Random=0]="Random",e[e.Increasing=1]="Increasing",e[e.Decreasing=2]="Decreasing",e[e.IncreasingThenDecreasing=3]="IncreasingThenDecreasing"}(ne||(ne={})),function(e){e[e.Relative=0]="Relative",e[e.Absolute=1]="Absolute"}(re||(re={})),function(e){e[e.Normal=0]="Normal",e[e.LowerCase=1]="LowerCase",e[e.Allcaps=2]="Allcaps"}(oe||(oe={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(se||(se={})),function(e){e.Draft="Draft",e.Picture="Picture",e.Text="Text"}(le||(le={})),function(e){e[e.Top=0]="Top",e[e.Center=1]="Center",e[e.Baseline=2]="Baseline",e[e.Bottom=3]="Bottom"}(ae||(ae={})),function(e){e[e.Right=0]="Right",e[e.Upright=1]="Upright"}(ce||(ce={})),function(e){e[e.Small=0]="Small",e[e.Medium=1]="Medium",e[e.Large=2]="Large"}(ue||(ue={})),function(e){e[e.Calm=0]="Calm",e[e.Rippled=1]="Rippled",e[e.Slight=2]="Slight",e[e.Moderate=3]="Moderate"}(fe||(fe={}))},28076:(e,t,i)=>{i.d(t,{D:()=>r});var n=i(15294);const r={CIMVectorMarker:{scalesymbolsproportionally:!1,respectframe:!0,anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMPictureMarker:{scalex:1,texturefilter:"Draft",anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMTextSymbol:{angle:0,anglex:0,angley:0,halosize:1,height:10,horizontalalignment:"Left",kerning:!0,letterspacing:0,letterwidth:100,ligatures:!0,linegap:0,offsetx:0,offsety:0,strikethrough:!1,textcase:"Normal",textstring:"",underline:!1,verticalalignment:"Bottom",enable:!0,colorlocked:!1},CIMSolidStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMPictureStroke:{texturefilter:"Draft",capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMGradientStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1,gradientMethod:"AcrossLine",gradientSize:75,gradientSizeUnits:n.OW.Relative,gradientType:"Discrete",interval:5},CIMSolidFill:{enable:!0,colorlocked:!1},CIMPictureFill:{offsetx:0,offsety:0,rotation:0,scalex:1,height:10,texturefilter:"Draft",enable:!0,colorlocked:!1},CIMHatchFill:{offsetx:0,offsety:0,rotation:0,separation:4,enable:!0,colorlocked:!1},CIMGradientFill:{enable:!0,angle:90,gradientMethod:"Linear",gradientSize:75,gradientSizeUnits:n.OW.Relative,gradientType:"Discrete",interval:5},CIMGeometricEffectAddControlPoints:{angletolerance:120},CIMGeometricEffectArrow:{arrowtype:"OpenEnded",width:5},CIMGeometricEffectBuffer:{size:1},CIMGeometricEffectCut:{begincut:1,endcut:1,middlecut:0,invert:!1},CIMGeometricEffectDashes:{customendingoffset:0,linedashending:"NoConstraint",offsetalongline:0},CIMGeometricEffectDonut:{method:"Mitered",option:"Accurate",width:2},CIMGeometricEffectJog:{angle:225,length:20,position:50},CIMGeometricEffectControlMeasureLine:{rule:"FullGeometry"},CIMGeometricEffectMove:{offsetx:1,offsety:-1},CIMGeometricEffectOffset:{method:"Square",offset:1,option:"Fast"},CIMGeometricEffectRadial:{angle:0,length:5},CIMGeometricEffectRotate:{angle:15},CIMGeometricEffectScale:{xscalefactor:1.15,yscalefactor:1.15},CIMGeometricEffectWave:{amplitude:2,period:3,seed:1,waveform:"Sinus"},CIMMarkerPlacementAlongLine:{customendingoffset:0,endings:"WithHalfGap",offsetalongline:0,placeperpart:!0,angletoline:!0,offset:0},CIMMarkerPlacementAtExtremities:{extremityplacement:"Both",offsetalongline:0,angletoline:!0,offset:0},CIMMarkerPlacementAtRatioPositions:{beginposition:0,endposition:0,flipfirst:!0,angletoline:!0,offset:0},CIMMarkerPlacementInsidePolygon:{gridangle:0,gridtype:"Fixed",offsetx:0,offsety:0,randomness:100,seed:0,shiftoddrows:!1,stepx:16,stepy:16,clipping:"ClipAtBoundary"},CIMMarkerPlacementOnLine:{relativeto:"LineMiddle",startpointoffset:0,angletoline:!0,offset:0},CIMMarkerPlacementOnVertices:{placeperpart:!0,placeoncontrolpoints:!0,placeonendpoints:!0,placeonregularvertices:!0,angletoline:!0,offset:0},CIMMarkerPlacementPolygonCenter:{method:"OnPolygon",offsetx:0,offsety:0,clipatboundary:!1},CIMAnimatedSymbolProperties:{playanimation:!1,reverseanimation:!1,randomizestarttime:!1,randomizestartseed:0,starttimeoffset:0,duration:3,endingduration:3,useendingduration:!1,repeattype:n.fu.Loop,repeatdelay:0,easing:n.Hz.Linear},CIMSymbolAnimationSize:{tosize:10},CIMSymbolAnimationScale:{scalefactor:1},CIMSymbolAnimationColor:{tocolor:[255,255,255,1]},CIMSymbolAnimationTransparency:{totransparency:0},CIMSymbolAnimationRotation:{torotation:0,rotateclockwise:!1},CIMSymbolAnimationOffset:{offsetx:0,offsety:0}}},59868:(e,t,i)=>{i.d(t,{A7:()=>c,Cx:()=>u,Hk:()=>f,UK:()=>a}),i(44208);var n=i(94985),r=i(31593),o=i(53930),s=i(68249),l=i(93470);const a=o.A.fromJSON(l.Cb),c=r.A.fromJSON(l.yM),u=n.A.fromJSON(l.WR),f=s.A.fromJSON(l.JZ);o.A.fromJSON(l.nC),r.A.fromJSON(l.HW),n.A.fromJSON(l.b6)},66344:(e,t,i)=>{i.d(t,{q:()=>a});var n,r,o=i(3694);(r=n||(n={}))[r.ALL=0]="ALL",r[r.SOME=1]="SOME";class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new o.A,this._users=new o.A,this._sizeLimits=new Map}destroy(){this.clearAll(),this._removeFuncs.clear(),this._sizeLimits.clear(),this._users.clear()}register(e){this._users.push(e)}deregister(e){this._sizeLimits.delete(e),this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,r,o){t=e.id+t;const s=this._db.get(t);if(s&&(this._size-=s.size,e.size-=s.size,this._db.delete(t),s.entry!==i&&this._notifyRemove(t,s.entry,s.size,n.ALL)),r>this._maxSize)return void this._notifyRemove(t,i,r,n.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,i,0,n.ALL);const a=1+Math.max(o,-4)- -3;this._db.set(t,new l(i,r,a)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t,i,r){t=e.id+t;const o=this._db.get(t);if(o&&o.entry===i){for(this._size-=o.size,e.size-=o.size;r>this._maxSize;){const e=this._notifyRemove(t,i,r,n.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}o.size=r,this._size+=r,e.size+=r,this._checkSize()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,n)=>{const r=e.lifetime;i[r]=(i[r]||0)+e.size,this._users.forAll((i=>{const{id:r,name:o}=i;if(n.startsWith(r)){const i=t[o]||0;t[o]=i+e.size}}))}));const n={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[i]||0;t[i]=r,n[i]=Math.round(100*e.hitRate)+"%"}else n[i]="0%"}));const r=Object.keys(t);r.sort(((e,i)=>t[i]-t[e])),r.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+n[i]));for(let t=i.length-1;t>=0;--t){const n=i[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,n.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,n.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,n){let r;return this._removeFuncs.some((o=>{if(e.startsWith(o[0])){const e=o[1](t,n,i);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSize(){this._sizeLimits.forEach(((e,t)=>this._checkSizeLimits(e,t))),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const n=t?.id;let r=!0;for(;r;){r=!1;for(const[o,s]of this._db)if(0===s.lifetime&&(!n||o.startsWith(n))){if(this._purgeItem(o,s,t),i.size<=.9*e)return;r||=this._db.has(o)}}for(const[r,o]of this._db)if((!n||r.startsWith(n))&&(this._purgeItem(r,o,t),i.size<=.9*e))return}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const r=this._notifyRemove(e,t.entry,t.size,n.SOME);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class l{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}class a{constructor(e,t){this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},79677:(e,t,i)=>{i.d(t,{A:()=>h});var n,r=i(90237),o=i(25482),s=i(88930),l=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),c=i(40608),u=i(43937),f=i(98623);let d=class extends o.A{static{n=this}static get allTime(){return m}static get empty(){return p}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,r=e.end?.getTime()??e.end;return t===n&&i===r}expandTo(e,t=f.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,s.lL)(i,e,t));let r=this.end;if(r){const i=(0,s.lL)(r,e,t);r=r.getTime()===i.getTime()?i:(0,s.S1)(i,1,e,t)}return new n({start:i,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,l;return r>=t&&r<=i?s=r:t>=r&&t<=o&&(s=t),i>=r&&i<=o?l=i:o>=t&&o<=i&&(l=o),null==s||null==l||isNaN(s)||isNaN(l)?n.empty:new n({start:s===-1/0?null:new Date(s),end:l===1/0?null:new Date(l)})}offset(e,t,i=f.qU){if(this.isEmpty||this.isAllTime)return this.clone();const r=new n,{start:o,end:l}=this;return null!=o&&(r.start=(0,s.S1)(o,e,t,i)),null!=l&&(r.end=(0,s.S1)(l,e,t,i)),r}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:i})}};(0,r._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,r._)([(0,a.w)("end")],d.prototype,"readEnd",null),(0,r._)([(0,u.K)("end")],d.prototype,"writeEnd",null),(0,r._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,r._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,r._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,r._)([(0,a.w)("start")],d.prototype,"readStart",null),(0,r._)([(0,u.K)("start")],d.prototype,"writeStart",null),d=n=(0,r._)([(0,c.$)("esri.time.TimeExtent")],d);const h=d,m=new d,p=new d({start:void 0,end:void 0})},93397:(e,t,i)=>{i.d(t,{$w:()=>y,Bu:()=>I,DW:()=>S,FH:()=>z,FM:()=>a,Kn:()=>C,MM:()=>d,Nl:()=>A,O2:()=>_,UE:()=>L,YC:()=>v,YF:()=>P,_1:()=>T,_d:()=>M,_h:()=>l,bs:()=>R,e6:()=>u,gQ:()=>s,jn:()=>m,lW:()=>f,mA:()=>h,pM:()=>b,pV:()=>g,pk:()=>E,rB:()=>O,xo:()=>k,yX:()=>F,zb:()=>w,zr:()=>p});var n=i(28076);const r=" /-,\n";function o(e){let t=e.length;for(;t--;)if(!r.includes(e.charAt(t)))return!1;return!0}function s(e,t){const i=[];let n=0,r=-1;do{if(r=e.indexOf("[",n),r>=n){if(r>n){const t=e.slice(n,r);i.push([t,null,o(t)])}if(n=r+1,r=e.indexOf("]",n),r>=n){if(r>n){const o=t[e.slice(n,r)];o&&i.push([null,o,!1])}n=r+1}}}while(-1!==r);if(n<e.length){const t=e.slice(n);i.push([t,null,o(t)])}return i}function l(e,t,i){let n="",r=null;for(const i of t){const[t,o,s]=i;if(t)s?r=t:(r&&(n+=r,r=null),n+=t);else{const t=e.readAttribute(o);t&&(r&&(n+=r,r=null),n+=t)}}return c(n,i)}function a(e,t,i,n){let r="",o=null;for(const n of t){const[t,s,l]=n;if(t)l?o=t:(o&&(r+=o,o=null),r+=t);else{let t=s;null!=i&&(t=x(s,i));const n=e.attributes[t];n&&(o&&(r+=o,o=null),r+=n)}}return c(r,n)}function c(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function u(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function f(e){return e.data?.symbol??null}function d(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function h(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function m(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function p(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const y=(e,t=0)=>null==e||isNaN(e)?t:e;function g(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function C(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function M(e){let t="normal",i="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?i="bold":n.includes("light")&&(i="lighter")}return{style:t,weight:i}}function S(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function b(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=b(t);if(null!=e)return e}break;case"CIMTextSymbol":return b(e.symbol);case"CIMSolidFill":return e.color}return null}function T(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=T(e);if(null!=t)return t}break}case"CIMTextSymbol":return T(e.symbol);case"CIMSolidStroke":return e.color}}function k(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=k(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return k(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function I(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":case"Justify":return"center"}}function A(e){switch(e){case"Top":default:return"top";case"Center":return"middle";case"Baseline":return"baseline";case"Bottom":return"bottom"}}function _(e){return(e?Object.keys(e):[]).map((t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"})))}const L=e=>e.includes("data:image/svg+xml");function P(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function w(e,t,i,n,r,o,s=!0){const{infos:l}=o;let a=1,c=0,u=0,f=0,d=1;for(const{absoluteAnchorPoint:e,offsetX:t,offsetY:i,rotation:n,size:r,frameHeight:o,rotateClockWise:h,scaleSymbolsProportionally:m}of l)d=e?1:a,u=D(t,i,c,d,u),f=N(t,i,c,d,f),o&&(m||s)&&(a*=r/o),c=B(n,h,c);const h=D(n,r,c,d,u),m=N(n,r,c,d,f);return{size:e*a,rotation:B(t,i,c),offsetX:h,offsetY:m}}function z(e){return e?.dashTemplate&&(e.dashTemplate=function(e){return"string"==typeof e?function(e){return e.split(" ").map((e=>Number(e)))}(e):e}(e.dashTemplate)),e}function R(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return R(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return R(e.symbol)}}return"Normal"}function v(e){if(e)switch(e.type){case"CIMTextSymbol":return e.height;case"CIMPointSymbol":{let t=0;if(e.symbolLayers)for(const i of e.symbolLayers)if(i)switch(i.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const e=i.size??n.D.CIMVectorMarker.size;e>t&&(t=e);break}}return t}case"CIMLineSymbol":case"CIMPolygonSymbol":{let t=0;if(e.symbolLayers)for(const i of e.symbolLayers)if(i)switch(i.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=i.width;null!=e&&e>t&&(t=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(i.markerPlacement&&p(i.markerPlacement)){const e=i.size??n.D.CIMVectorMarker.size;e>t&&(t=e)}break;case"CIMPictureFill":{const e=i.height;null!=e&&e>t&&(t=e)}}return t}}}function x(e,t){if(null!==t){const i=t.get(e);return i?i.name:e}return e}function E(e){return e.map((e=>({...e,propertyName:P(e.propertyName)})))}function O(e){const t={};for(const i in e){const n=e[i];t[P(i)]=n}return t}function N(e,t,i,n,r){const o=i*Math.PI/180;if(o){const i=Math.cos(o);return(Math.sin(o)*e+i*t)*n+r}return t*n+r}function D(e,t,i,n,r){const o=i*Math.PI/180;return o?(Math.cos(o)*e-Math.sin(o)*t)*n+r:e*n+r}function B(e,t,i){return t?i-e:i+e}function F(e,t){return Math.max(Math.min((e??t)/100,1),0)}},93470:(e,t,i)=>{i.d(t,{Cb:()=>o,HW:()=>u,JR:()=>r,JZ:()=>a,WR:()=>l,b6:()=>f,fT:()=>n,nC:()=>c,yM:()=>s});const n=[252,146,31,255],r=[153,153,153,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},l={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},c={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},f={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -40,7 +40,7 @@ outputHighlight(isHighlightOccluded());
40
40
  uint levelBits = readLevelBits(highlightToAdd, highlightLevel);
41
41
  if ((levelBits & 1u) == 0u) { discard; }
42
42
  outputHighlight(isHighlightOccluded());
43
- }`)):r.code.add(i.H`void calculateOcclusionAndOutputHighlight() {}`)}},10764:(e,t,r)=>{r.d(t,{I:()=>o});var i=r(31821),n=r(46540);function o(e){e.attributes.add(n.r.POSITION,"vec3"),e.vertex.code.add(i.H`vec3 positionModel() { return position; }`)}},11725:(e,t,r)=>{r.d(t,{im:()=>u,m$:()=>i});var i,n,o=r(51850),a=r(69720),s=r(96672),c=r(39341),l=r(43616),d=r(65786);class u extends a.J{constructor(e,t){super(),this.type=s.X.Material,this.supportsEdges=!1,this._renderPriority=0,this.vertexAttributeLocations=c.D,this._pp0=(0,o.fA)(0,0,1),this._pp1=(0,o.fA)(0,0,0),this._parameters=new t,(0,l.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,l.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}intersectDraped(e,t,r,i,n,o){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this.intersect(e,t,r,this._pp0,this._pp1,n)}}(n=i||(i={}))[n.None=0]="None",n[n.Occlude=1]="Occlude",n[n.Transparent=2]="Transparent",n[n.OccludeAndTransparent=4]="OccludeAndTransparent",n[n.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",n[n.Opaque=16]="Opaque",d.Y},11787:(e,t,r)=>{r.d(t,{$U:()=>re});var i=r(38954),n=r(51850),o=r(24151),a=r(1843),s=r(49255),c=r(96336),l=r(22911),d=r(62602),u=r(59469),h=r(16943),m=r(89192),f=r(25634),p=r(11725),v=r(33524),g=r(70328),_=r(96672),T=r(620),x=r(46540);class A{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const b=(0,g.vt)();function E(e,t,r,n,o,a){if(!e.visible)return;const s=(0,i.a)(F,n,r),c=(e,t,r)=>{a(e,r,t,!1)},l=new A(!1,t.options.normalRequired);if(e.boundingInfo){(0,T.vA)(e.type===_.X.Mesh);const i=t.tolerance;M(e.boundingInfo,r,s,i,o,l,c)}else{const t=e.attributes.get(x.r.POSITION),n=t.indices;!function(e,t,r,n,o,a,s,c,l,d){const u=t,h=B,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=m>=f?m>=p?0:2:f>=p?1:2,g=v,_=u[g]<0?2:1,T=(v+_)%3,x=(v+(3-_))%3,A=u[T]/u[g],b=u[x]/u[g],E=1/u[g],S=w,M=I,C=O,{normalRequired:R}=l;for(let t=r;t<n;++t){const r=3*t,n=s*o[r];(0,i.i)(h[0],a[n+0],a[n+1],a[n+2]);const l=s*o[r+1];(0,i.i)(h[1],a[l+0],a[l+1],a[l+2]);const u=s*o[r+2];(0,i.i)(h[2],a[u+0],a[u+1],a[u+2]),c&&((0,i.c)(h[0],c.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.c)(h[1],c.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.c)(h[2],c.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.a)(S,h[0],e),(0,i.a)(M,h[1],e),(0,i.a)(C,h[2],e);const m=S[T]-A*S[g],f=S[x]-b*S[g],p=M[T]-A*M[g],v=M[x]-b*M[g],_=C[T]-A*C[g],w=C[x]-b*C[g],I=_*v-w*p,O=m*w-f*_,y=p*f-v*m;if((I<0||O<0||y<0)&&(I>0||O>0||y>0))continue;const P=I+O+y;if(0===P)continue;const L=I*(E*S[g])+O*(E*M[g])+y*(E*C[g]);if(L*Math.sign(P)<0)continue;const D=L/P;D>=0&&d(D,t,R?N(h):null)}}(r,s,0,n.length/3,n,t.data,t.stride,o,l,c)}}const S=(0,n.vt)();function M(e,t,r,n,o,a,s){if(null==e)return;const c=function(e,t){return(0,i.i)(t,1/e[0],1/e[1],1/e[2])}(r,S);if((0,g.Ne)(b,e.bbMin),(0,g.vI)(b,e.bbMax),null!=o&&o.applyToAabb(b),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let a=Math.min(n,o),s=Math.max(n,o);const c=(e[1]-i-t[1])*r[1],l=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(c,l)),s<0)return!1;if(a=Math.max(a,Math.min(c,l)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(b,t,c,n)){const{primitiveIndices:i,position:c}=e,l=i?i.length:c.indices.length/3;if(l>D){const i=e.getChildren();if(void 0!==i){for(const e of i)M(e,t,r,n,o,a,s);return}}!function(e,t,r,i,n,o,a,s,c,l,d){const u=e[0],h=e[1],m=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=l;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*n[r];let l=o[i],_=o[i+1],T=o[i+2];const x=a*n[r+1];let A=o[x],b=o[x+1],E=o[x+2];const S=a*n[r+2];let M=o[S],R=o[S+1],w=o[S+2];null!=c&&([l,_,T]=c.applyToVertex(l,_,T,e),[A,b,E]=c.applyToVertex(A,b,E,e),[M,R,w]=c.applyToVertex(M,R,w,e));const I=A-l,O=b-_,N=E-T,P=M-l,L=R-_,D=w-T,F=p*D-L*v,B=v*P-D*f,U=f*L-P*p,G=I*F+O*B+N*U;if(Math.abs(G)<=H)continue;const z=u-l,V=h-_,W=m-T,j=z*F+V*B+W*U;if(G>0){if(j<0||j>G)continue}else if(j>0||j<G)continue;const k=V*N-O*W,Y=W*I-N*z,q=z*O-I*V,X=f*k+p*Y+v*q;if(G>0){if(X<0||j+X>G)continue}else if(X>0||j+X<G)continue;const $=(P*k+L*Y+D*q)/G;$>=0&&d($,t,g?y(I,O,N,P,L,D,C):null)}}(t,r,0,l,c.indices,c.data,c.stride,i,o,a,s)}}const C=(0,n.vt)();function R(e,t,r,i,n,o,a,s){const c=e[0],l=e[1],d=e[2],u=t[0],h=t[1],m=t[2];for(let e=r;e<i;++e){const t=3*e,r=t+1,i=t+2,f=o*t,p=n[f],v=n[f+1],g=n[f+2],_=o*r,T=o*i,x=n[_]-p,A=n[_+1]-v,b=n[_+2]-g,E=n[T]-p,S=n[T+1]-v,M=n[T+2]-g,R=h*M-S*m,w=m*E-M*u,I=u*S-E*h,O=x*R+A*w+b*I;if(Math.abs(O)<=H)continue;const N=c-p,P=l-v,L=d-g,D=N*R+P*w+L*I;if(O>0){if(D<0||D>O)continue}else if(D>0||D<O)continue;const F=P*b-A*L,B=L*x-b*N,U=N*A-x*P,G=u*F+h*B+m*U;if(O>0){if(G<0||D+G>O)continue}else if(G>0||D+G<O)continue;const z=(E*F+S*B+M*U)/O;z>=0&&s(z,e,a?y(x,A,b,E,S,M,C):null)}}const w=(0,n.vt)(),I=(0,n.vt)(),O=(0,n.vt)();function y(e,t,r,n,o,a,s){return(0,i.i)(P,e,t,r),(0,i.i)(L,n,o,a),(0,i.e)(s,P,L),(0,i.n)(s,s),s}function N(e){return(0,i.a)(P,e[1],e[0]),(0,i.a)(L,e[2],e[0]),(0,i.e)(C,P,L),(0,i.n)(C,C),C}const P=(0,n.vt)(),L=(0,n.vt)(),D=1e3,H=1e-7,F=(0,n.vt)(),B=[(0,n.vt)(),(0,n.vt)(),(0,n.vt)()];var U=r(13464),G=r(16396),z=r(13030),V=r(59907);class W{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.get(x.r.POSITION).indices.length}write(e,t,r,i,n,o){return(0,V.SA)(r,i,this.vertexBufferLayout,e,t,n,o)}intersect(e,t,r,n,o,a,s){const c=this.vertexBufferLayout.createView(e).getField(x.r.POSITION,z.xs);if(null==c)return;const l=(0,i.a)(j,a,o),d=c.count/3,u=n.options.normalRequired;R(o,l,0,d,c.typedBuffer,c.typedBufferStride,u,((e,t,r)=>{s(e,r,t,!1)}))}}const j=(0,n.vt)();var k=r(43616),Y=r(97225),q=r(90237),X=r(53466),$=r(51976),Z=r(35256);class J extends Z.E{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=m.sf.Opaque,this.doubleSidedMode=d.W.None,this.pbrMode=u.A9.Disabled,this.cullFace=m.s2.None,this.normalType=c.W.Attribute,this.customDepthTest=m.it.Less,this.emissionSource=l.ZX.None,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===l.ZX.Texture||this.hasOcclusionTexture||this.hasNormalTexture?X.I.Default:X.I.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,q._)([(0,$.W)({count:m.sf.COUNT})],J.prototype,"alphaDiscardMode",void 0),(0,q._)([(0,$.W)({count:d.W.COUNT})],J.prototype,"doubleSidedMode",void 0),(0,q._)([(0,$.W)({count:u.A9.COUNT})],J.prototype,"pbrMode",void 0),(0,q._)([(0,$.W)({count:m.s2.COUNT})],J.prototype,"cullFace",void 0),(0,q._)([(0,$.W)({count:c.W.COUNT})],J.prototype,"normalType",void 0),(0,q._)([(0,$.W)({count:m.it.COUNT})],J.prototype,"customDepthTest",void 0),(0,q._)([(0,$.W)({count:l.ZX.COUNT})],J.prototype,"emissionSource",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasVertexColors",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasSymbolColors",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasVerticalOffset",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasColorTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasMetallicRoughnessTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasOcclusionTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasNormalTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasScreenSizePerspective",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasVertexTangents",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasOccludees",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasModelTransformation",void 0),(0,q._)([(0,$.W)()],J.prototype,"offsetBackfaces",void 0),(0,q._)([(0,$.W)()],J.prototype,"vvSize",void 0),(0,q._)([(0,$.W)()],J.prototype,"vvColor",void 0),(0,q._)([(0,$.W)()],J.prototype,"receiveShadows",void 0),(0,q._)([(0,$.W)()],J.prototype,"receiveAmbientOcclusion",void 0),(0,q._)([(0,$.W)()],J.prototype,"textureAlphaPremultiplied",void 0),(0,q._)([(0,$.W)()],J.prototype,"instanced",void 0),(0,q._)([(0,$.W)()],J.prototype,"instancedColor",void 0),(0,q._)([(0,$.W)()],J.prototype,"writeDepth",void 0),(0,q._)([(0,$.W)()],J.prototype,"transparent",void 0),(0,q._)([(0,$.W)()],J.prototype,"enableOffset",void 0),(0,q._)([(0,$.W)()],J.prototype,"terrainDepthTest",void 0),(0,q._)([(0,$.W)()],J.prototype,"cullAboveTerrain",void 0),(0,q._)([(0,$.W)()],J.prototype,"snowCover",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasColorTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasEmissionTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasNormalTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasOcclusionTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasMetallicRoughnessTextureTransform",void 0);var K=r(97220),Q=r(57323);class ee extends Y.R5{constructor(e,t){super(e,t,new K.$(Q.R,(()=>r.e(9933).then(r.bind(r,39933))))),this.type="RealisticTreeTechnique"}}var te=r(49788);class re extends p.im{constructor(e,t){super(e,ne),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[U.N.OPAQUE_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&!this.parameters.transparent],[U.N.TRANSPARENT_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[U.N.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>((0,s.XY)(e)||(0,s.PJ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,a.BP)().vec3f(x.r.POSITION);return e.normalType===c.W.Compressed?t.vec2i16(x.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(x.r.NORMAL),e.hasVertexTangents&&t.vec4f(x.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(x.r.UV0),e.hasVertexColors&&t.vec4u8(x.r.COLOR),e.hasSymbolColors&&t.vec4u8(x.r.SYMBOLCOLOR),(0,h.E)()&&t.vec4u8(x.r.OBJECTANDLAYERIDCOLOR),t}(this.parameters),this._configuration=new J(t.spherical)}isVisibleForOutput(e){return e!==s.V.Shadow&&e!==s.V.ShadowExcludeHighlight&&e!==s.V.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t?1:i[3])>=te.Q}get hasEmissions(){return!!this.parameters.emissiveTextureId||!(0,i.p)(this.parameters.emissiveFactor,n.uY)}getConfiguration(e,t){const r=this.parameters,{treeRendering:i,doubleSided:n,doubleSidedType:o}=r;return this._configuration.output=e,this._configuration.hasNormalTexture=!i&&!!r.normalTextureId,this._configuration.hasColorTexture=!!r.textureId,this._configuration.hasVertexTangents=!i&&r.hasVertexTangents,this._configuration.instanced=r.isInstanced,this._configuration.instancedDoublePrecision=r.instancedDoublePrecision,this._configuration.vvSize=!!r.vvSize,this._configuration.hasVerticalOffset=null!=r.verticalOffset,this._configuration.hasScreenSizePerspective=null!=r.screenSizePerspective,this._configuration.hasSlicePlane=r.hasSlicePlane,this._configuration.alphaDiscardMode=r.textureAlphaMode,this._configuration.normalType=i?c.W.Attribute:r.normalType,this._configuration.transparent=r.transparent,this._configuration.writeDepth=r.writeDepth,null!=r.customDepthTest&&(this._configuration.customDepthTest=r.customDepthTest),this._configuration.hasOccludees=t.hasOccludees,this._configuration.cullFace=r.hasSlicePlane?m.s2.None:r.cullFace,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.hasModelTransformation=!i&&null!=r.modelTransformation,this._configuration.hasVertexColors=r.hasVertexColors,this._configuration.hasSymbolColors=r.hasSymbolColors,this._configuration.doubleSidedMode=i?d.W.WindingOrder:n&&"normal"===o?d.W.View:n&&"winding-order"===o?d.W.WindingOrder:d.W.None,this._configuration.instancedColor=r.hasInstancedColor,(0,s.RN)(e)?(this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.receiveShadows=r.receiveShadows,this._configuration.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(this._configuration.terrainDepthTest=!1,this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1),this._configuration.vvColor=!!r.vvColor,this._configuration.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,this._configuration.pbrMode=r.usePBR?r.isSchematic?u.A9.Schematic:u.A9.Normal:u.A9.Disabled,this._configuration.hasMetallicRoughnessTexture=!i&&!!r.metallicRoughnessTextureId,this._configuration.emissionSource=i?l.ZX.None:null!=r.emissiveTextureId?l.ZX.Texture:r.usePBR?l.ZX.Value:l.ZX.None,this._configuration.hasOcclusionTexture=!i&&!!r.occlusionTextureId,this._configuration.offsetBackfaces=!(!r.transparent||!r.offsetTransparentBackfaces),this._configuration.oitPass=t.oitPass,this._configuration.enableOffset=t.camera.relativeElevation<v.xt,this._configuration.snowCover=function(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}(t),this._configuration.hasColorTextureTransform=!!r.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,this._configuration}intersect(e,t,r,n,a,s){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.i)(de,t[12],t[13],t[14]);let s=null;switch(r.viewingMode){case o.RT.Global:s=(0,i.n)(ce,de);break;case o.RT.Local:s=(0,i.c)(ce,se)}let c=0;const l=(0,i.d)(ue,de,e.eye),d=(0,i.l)(l),u=(0,i.h)(l,l,1/d);let h=null;this.parameters.screenSizePerspective&&(h=(0,i.f)(s,u)),c+=(0,k.kE)(e,d,this.parameters.verticalOffset,h??0,this.parameters.screenSizePerspective),(0,i.h)(s,s,c),(0,i.q)(le,s,r.transform.inverseRotation),n=(0,i.d)(oe,n,le),a=(0,i.d)(ae,a,le)}E(e,r,n,a,(0,G.ou)(r.verticalOffset),s)}createGLMaterial(e){return new ie(e)}createBufferWriter(){return new W(this._vertexBufferLayout)}}class ie extends f.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.i)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?ee:Y.R5,e)}}class ne extends Y.uD{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}const oe=(0,n.vt)(),ae=(0,n.vt)(),se=(0,n.fA)(0,0,1),ce=(0,n.vt)(),le=(0,n.vt)(),de=(0,n.vt)(),ue=(0,n.vt)()},11955:(e,t,r)=>{r.d(t,{S:()=>s}),r(69270),r(74333).n;var i=r(20304),n=r(31821),o=r(89192),a=r(49788);function s(e,t){!function(e,t,r){const i=e.fragment,s=t.alphaDiscardMode,c=s===o.sf.Blend;s!==o.sf.Mask&&s!==o.sf.MaskBlend||i.uniforms.add(r),i.code.add(n.H`
43
+ }`)):r.code.add(i.H`void calculateOcclusionAndOutputHighlight() {}`)}},10764:(e,t,r)=>{r.d(t,{I:()=>o});var i=r(31821),n=r(46540);function o(e){e.attributes.add(n.r.POSITION,"vec3"),e.vertex.code.add(i.H`vec3 positionModel() { return position; }`)}},11725:(e,t,r)=>{r.d(t,{im:()=>u,m$:()=>i});var i,n,o=r(51850),a=r(69720),s=r(96672),c=r(39341),l=r(43616),d=r(65786);class u extends a.J{constructor(e,t){super(),this.type=s.X.Material,this.supportsEdges=!1,this._renderPriority=0,this.vertexAttributeLocations=c.D,this._pp0=(0,o.fA)(0,0,1),this._pp1=(0,o.fA)(0,0,0),this._parameters=new t,(0,l.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,l.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}intersectDraped(e,t,r,i,n,o){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this.intersect(e,t,r,this._pp0,this._pp1,n)}}(n=i||(i={}))[n.None=0]="None",n[n.Occlude=1]="Occlude",n[n.Transparent=2]="Transparent",n[n.OccludeAndTransparent=4]="OccludeAndTransparent",n[n.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",n[n.Opaque=16]="Opaque",d.Y},11787:(e,t,r)=>{r.d(t,{$U:()=>re});var i=r(38954),n=r(51850),o=r(24151),a=r(1843),s=r(49255),c=r(96336),l=r(22911),d=r(62602),u=r(59469),h=r(16943),m=r(89192),f=r(25634),p=r(11725),v=r(33524),g=r(70328),_=r(96672),T=r(620),x=r(46540);class A{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const b=(0,g.vt)();function E(e,t,r,n,o,a){if(!e.visible)return;const s=(0,i.a)(F,n,r),c=(e,t,r)=>{a(e,r,t,!1)},l=new A(!1,t.options.normalRequired);if(e.boundingInfo){(0,T.vA)(e.type===_.X.Mesh);const i=t.tolerance;M(e.boundingInfo,r,s,i,o,l,c)}else{const t=e.attributes.get(x.r.POSITION),n=t.indices;!function(e,t,r,n,o,a,s,c,l,d){const u=t,h=B,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=m>=f?m>=p?0:2:f>=p?1:2,g=v,_=u[g]<0?2:1,T=(v+_)%3,x=(v+(3-_))%3,A=u[T]/u[g],b=u[x]/u[g],E=1/u[g],S=w,M=I,C=O,{normalRequired:R}=l;for(let t=r;t<n;++t){const r=3*t,n=s*o[r];(0,i.i)(h[0],a[n+0],a[n+1],a[n+2]);const l=s*o[r+1];(0,i.i)(h[1],a[l+0],a[l+1],a[l+2]);const u=s*o[r+2];(0,i.i)(h[2],a[u+0],a[u+1],a[u+2]),c&&((0,i.c)(h[0],c.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.c)(h[1],c.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.c)(h[2],c.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.a)(S,h[0],e),(0,i.a)(M,h[1],e),(0,i.a)(C,h[2],e);const m=S[T]-A*S[g],f=S[x]-b*S[g],p=M[T]-A*M[g],v=M[x]-b*M[g],_=C[T]-A*C[g],w=C[x]-b*C[g],I=_*v-w*p,O=m*w-f*_,y=p*f-v*m;if((I<0||O<0||y<0)&&(I>0||O>0||y>0))continue;const P=I+O+y;if(0===P)continue;const L=I*(E*S[g])+O*(E*M[g])+y*(E*C[g]);if(L*Math.sign(P)<0)continue;const D=L/P;D>=0&&d(D,t,R?N(h):null)}}(r,s,0,n.length/3,n,t.data,t.stride,o,l,c)}}const S=(0,n.vt)();function M(e,t,r,n,o,a,s){if(null==e)return;const c=function(e,t){return(0,i.i)(t,1/e[0],1/e[1],1/e[2])}(r,S);if((0,g.Ne)(b,e.bbMin),(0,g.vI)(b,e.bbMax),null!=o&&o.applyToAabb(b),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let a=Math.min(n,o),s=Math.max(n,o);const c=(e[1]-i-t[1])*r[1],l=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(c,l)),s<0)return!1;if(a=Math.max(a,Math.min(c,l)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(b,t,c,n)){const{primitiveIndices:i,position:c}=e,l=i?i.length:c.indices.length/3;if(l>D){const i=e.getChildren();if(void 0!==i){for(const e of i)M(e,t,r,n,o,a,s);return}}!function(e,t,r,i,n,o,a,s,c,l,d){const u=e[0],h=e[1],m=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=l;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*n[r];let l=o[i],_=o[i+1],T=o[i+2];const x=a*n[r+1];let A=o[x],b=o[x+1],E=o[x+2];const S=a*n[r+2];let M=o[S],R=o[S+1],w=o[S+2];null!=c&&([l,_,T]=c.applyToVertex(l,_,T,e),[A,b,E]=c.applyToVertex(A,b,E,e),[M,R,w]=c.applyToVertex(M,R,w,e));const I=A-l,O=b-_,N=E-T,P=M-l,L=R-_,D=w-T,F=p*D-L*v,B=v*P-D*f,U=f*L-P*p,G=I*F+O*B+N*U;if(Math.abs(G)<=H)continue;const z=u-l,V=h-_,W=m-T,j=z*F+V*B+W*U;if(G>0){if(j<0||j>G)continue}else if(j>0||j<G)continue;const k=V*N-O*W,Y=W*I-N*z,q=z*O-I*V,X=f*k+p*Y+v*q;if(G>0){if(X<0||j+X>G)continue}else if(X>0||j+X<G)continue;const $=(P*k+L*Y+D*q)/G;$>=0&&d($,t,g?y(I,O,N,P,L,D,C):null)}}(t,r,0,l,c.indices,c.data,c.stride,i,o,a,s)}}const C=(0,n.vt)();function R(e,t,r,i,n,o,a,s){const c=e[0],l=e[1],d=e[2],u=t[0],h=t[1],m=t[2];for(let e=r;e<i;++e){const t=3*e,r=t+1,i=t+2,f=o*t,p=n[f],v=n[f+1],g=n[f+2],_=o*r,T=o*i,x=n[_]-p,A=n[_+1]-v,b=n[_+2]-g,E=n[T]-p,S=n[T+1]-v,M=n[T+2]-g,R=h*M-S*m,w=m*E-M*u,I=u*S-E*h,O=x*R+A*w+b*I;if(Math.abs(O)<=H)continue;const N=c-p,P=l-v,L=d-g,D=N*R+P*w+L*I;if(O>0){if(D<0||D>O)continue}else if(D>0||D<O)continue;const F=P*b-A*L,B=L*x-b*N,U=N*A-x*P,G=u*F+h*B+m*U;if(O>0){if(G<0||D+G>O)continue}else if(G>0||D+G<O)continue;const z=(E*F+S*B+M*U)/O;z>=0&&s(z,e,a?y(x,A,b,E,S,M,C):null)}}const w=(0,n.vt)(),I=(0,n.vt)(),O=(0,n.vt)();function y(e,t,r,n,o,a,s){return(0,i.i)(P,e,t,r),(0,i.i)(L,n,o,a),(0,i.e)(s,P,L),(0,i.n)(s,s),s}function N(e){return(0,i.a)(P,e[1],e[0]),(0,i.a)(L,e[2],e[0]),(0,i.e)(C,P,L),(0,i.n)(C,C),C}const P=(0,n.vt)(),L=(0,n.vt)(),D=1e3,H=1e-7,F=(0,n.vt)(),B=[(0,n.vt)(),(0,n.vt)(),(0,n.vt)()];var U=r(13464),G=r(16396),z=r(13030),V=r(59907);class W{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.get(x.r.POSITION).indices.length}write(e,t,r,i,n,o){return(0,V.SA)(r,i,this.vertexBufferLayout,e,t,n,o)}intersect(e,t,r,n,o,a,s){const c=this.vertexBufferLayout.createView(e).getField(x.r.POSITION,z.xs);if(null==c)return;const l=(0,i.a)(j,a,o),d=c.count/3,u=n.options.normalRequired;R(o,l,0,d,c.typedBuffer,c.typedBufferStride,u,((e,t,r)=>{s(e,r,t,!1)}))}}const j=(0,n.vt)();var k=r(43616),Y=r(97225),q=r(90237),X=r(53466),$=r(51976),Z=r(35256);class J extends Z.E{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=m.sf.Opaque,this.doubleSidedMode=d.W.None,this.pbrMode=u.A9.Disabled,this.cullFace=m.s2.None,this.normalType=c.W.Attribute,this.customDepthTest=m.it.Less,this.emissionSource=l.ZX.None,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===l.ZX.Texture||this.hasOcclusionTexture||this.hasNormalTexture?X.I.Default:X.I.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,q._)([(0,$.W)({count:m.sf.COUNT})],J.prototype,"alphaDiscardMode",void 0),(0,q._)([(0,$.W)({count:d.W.COUNT})],J.prototype,"doubleSidedMode",void 0),(0,q._)([(0,$.W)({count:u.A9.COUNT})],J.prototype,"pbrMode",void 0),(0,q._)([(0,$.W)({count:m.s2.COUNT})],J.prototype,"cullFace",void 0),(0,q._)([(0,$.W)({count:c.W.COUNT})],J.prototype,"normalType",void 0),(0,q._)([(0,$.W)({count:m.it.COUNT})],J.prototype,"customDepthTest",void 0),(0,q._)([(0,$.W)({count:l.ZX.COUNT})],J.prototype,"emissionSource",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasVertexColors",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasSymbolColors",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasVerticalOffset",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasColorTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasMetallicRoughnessTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasOcclusionTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasNormalTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasScreenSizePerspective",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasVertexTangents",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasOccludees",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasModelTransformation",void 0),(0,q._)([(0,$.W)()],J.prototype,"offsetBackfaces",void 0),(0,q._)([(0,$.W)()],J.prototype,"vvSize",void 0),(0,q._)([(0,$.W)()],J.prototype,"vvColor",void 0),(0,q._)([(0,$.W)()],J.prototype,"receiveShadows",void 0),(0,q._)([(0,$.W)()],J.prototype,"receiveAmbientOcclusion",void 0),(0,q._)([(0,$.W)()],J.prototype,"textureAlphaPremultiplied",void 0),(0,q._)([(0,$.W)()],J.prototype,"instanced",void 0),(0,q._)([(0,$.W)()],J.prototype,"instancedColor",void 0),(0,q._)([(0,$.W)()],J.prototype,"writeDepth",void 0),(0,q._)([(0,$.W)()],J.prototype,"transparent",void 0),(0,q._)([(0,$.W)()],J.prototype,"enableOffset",void 0),(0,q._)([(0,$.W)()],J.prototype,"terrainDepthTest",void 0),(0,q._)([(0,$.W)()],J.prototype,"cullAboveTerrain",void 0),(0,q._)([(0,$.W)()],J.prototype,"snowCover",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasColorTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasEmissionTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasNormalTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasOcclusionTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasMetallicRoughnessTextureTransform",void 0);var K=r(97220),Q=r(57323);class ee extends Y.R5{constructor(e,t){super(e,t,new K.$(Q.R,(()=>r.e(9933).then(r.bind(r,39933))))),this.type="RealisticTreeTechnique"}}var te=r(49788);class re extends p.im{constructor(e,t){super(e,ne),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[U.N.OPAQUE_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&!this.transparent],[U.N.TRANSPARENT_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&this.transparent&&this.parameters.writeDepth],[U.N.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>((0,s.XY)(e)||(0,s.PJ)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,a.BP)().vec3f(x.r.POSITION);return e.normalType===c.W.Compressed?t.vec2i16(x.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(x.r.NORMAL),e.hasVertexTangents&&t.vec4f(x.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(x.r.UV0),e.hasVertexColors&&t.vec4u8(x.r.COLOR),e.hasSymbolColors&&t.vec4u8(x.r.SYMBOLCOLOR),(0,h.E)()&&t.vec4u8(x.r.OBJECTANDLAYERIDCOLOR),t}(this.parameters),this._configuration=new J(t.spherical)}isVisibleForOutput(e){return e!==s.V.Shadow&&e!==s.V.ShadowExcludeHighlight&&e!==s.V.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t?1:i[3])>=te.Q}get hasEmissions(){return!!this.parameters.emissiveTextureId||!(0,i.p)(this.parameters.emissiveFactor,n.uY)}getConfiguration(e,t){const r=this.parameters,{treeRendering:i,doubleSided:n,doubleSidedType:o}=r;return this._configuration.output=e,this._configuration.hasNormalTexture=!i&&!!r.normalTextureId,this._configuration.hasColorTexture=!!r.textureId,this._configuration.hasVertexTangents=!i&&r.hasVertexTangents,this._configuration.instanced=r.isInstanced,this._configuration.instancedDoublePrecision=r.instancedDoublePrecision,this._configuration.vvSize=!!r.vvSize,this._configuration.hasVerticalOffset=null!=r.verticalOffset,this._configuration.hasScreenSizePerspective=null!=r.screenSizePerspective,this._configuration.hasSlicePlane=r.hasSlicePlane,this._configuration.alphaDiscardMode=r.textureAlphaMode,this._configuration.normalType=i?c.W.Attribute:r.normalType,this._configuration.transparent=this.transparent,this._configuration.writeDepth=r.writeDepth,null!=r.customDepthTest&&(this._configuration.customDepthTest=r.customDepthTest),this._configuration.hasOccludees=t.hasOccludees,this._configuration.cullFace=r.hasSlicePlane?m.s2.None:r.cullFace,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.hasModelTransformation=!i&&null!=r.modelTransformation,this._configuration.hasVertexColors=r.hasVertexColors,this._configuration.hasSymbolColors=r.hasSymbolColors,this._configuration.doubleSidedMode=i?d.W.WindingOrder:n&&"normal"===o?d.W.View:n&&"winding-order"===o?d.W.WindingOrder:d.W.None,this._configuration.instancedColor=r.hasInstancedColor,(0,s.RN)(e)?(this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.receiveShadows=r.receiveShadows,this._configuration.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(this._configuration.terrainDepthTest=!1,this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1),this._configuration.vvColor=!!r.vvColor,this._configuration.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,this._configuration.pbrMode=r.usePBR?r.isSchematic?u.A9.Schematic:u.A9.Normal:u.A9.Disabled,this._configuration.hasMetallicRoughnessTexture=!i&&!!r.metallicRoughnessTextureId,this._configuration.emissionSource=i?l.ZX.None:null!=r.emissiveTextureId?l.ZX.Texture:r.usePBR?l.ZX.Value:l.ZX.None,this._configuration.hasOcclusionTexture=!i&&!!r.occlusionTextureId,this._configuration.offsetBackfaces=!(!this.transparent||!r.offsetTransparentBackfaces),this._configuration.oitPass=t.oitPass,this._configuration.enableOffset=t.camera.relativeElevation<v.xt,this._configuration.snowCover=function(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}(t),this._configuration.hasColorTextureTransform=!!r.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,this._configuration}intersect(e,t,r,n,a,s){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.i)(de,t[12],t[13],t[14]);let s=null;switch(r.viewingMode){case o.RT.Global:s=(0,i.n)(ce,de);break;case o.RT.Local:s=(0,i.c)(ce,se)}let c=0;const l=(0,i.d)(ue,de,e.eye),d=(0,i.l)(l),u=(0,i.h)(l,l,1/d);let h=null;this.parameters.screenSizePerspective&&(h=(0,i.f)(s,u)),c+=(0,k.kE)(e,d,this.parameters.verticalOffset,h??0,this.parameters.screenSizePerspective),(0,i.h)(s,s,c),(0,i.q)(le,s,r.transform.inverseRotation),n=(0,i.d)(oe,n,le),a=(0,i.d)(ae,a,le)}E(e,r,n,a,(0,G.ou)(r.verticalOffset),s)}createGLMaterial(e){return new ie(e)}createBufferWriter(){return new W(this._vertexBufferLayout)}get transparent(){const{parameters:{drivenOpacity:e,opacity:t,externalColor:[r,i,n,o],layerOpacity:a,texture:s,textureId:c,textureAlphaMode:l,colorMixMode:d}}=this;return e||t<1&&"replace"!==d||o<1&&"ignore"!==d||a<1||(null!=s||null!=c)&&l!==m.sf.Opaque&&l!==m.sf.Mask&&"replace"!==d}}class ie extends f.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.i)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?ee:Y.R5,e)}}class ne extends Y.uD{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}const oe=(0,n.vt)(),ae=(0,n.vt)(),se=(0,n.fA)(0,0,1),ce=(0,n.vt)(),le=(0,n.vt)(),de=(0,n.vt)(),ue=(0,n.vt)()},11955:(e,t,r)=>{r.d(t,{S:()=>s}),r(69270),r(74333).n;var i=r(20304),n=r(31821),o=r(89192),a=r(49788);function s(e,t){!function(e,t,r){const i=e.fragment,s=t.alphaDiscardMode,c=s===o.sf.Blend;s!==o.sf.Mask&&s!==o.sf.MaskBlend||i.uniforms.add(r),i.code.add(n.H`
44
44
  void discardOrAdjustAlpha(inout vec4 color) {
45
45
  ${s===o.sf.Opaque?"color.a = 1.0;":`if (color.a < ${c?n.H.float(a.Q):"textureAlphaCutoff"}) {\n discard;\n } ${(0,n.If)(s===o.sf.Mask,"else { color.a = 1.0; }")}`}
46
46
  }
@@ -961,7 +961,7 @@ void forwardNormalizedVertexColor() {}`)}},92993:(e,t,r)=>{var i;r.d(t,{n:()=>i}
961
961
  float depth = texelFetch(terrainDepthTexture, ivec2(gl_FragCoord.xy), 0).r;
962
962
  float linearDepth = linearizeDepth(depth);
963
963
  ${t?"return viewPosDepth < linearDepth && depth < 1.0;":`if(viewPosDepth ${a?">":"<="} linearDepth) discard;`}
964
- }`)}},96672:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Mesh=2]="Mesh",e[e.Line=3]="Line",e[e.Point=4]="Point",e[e.Material=5]="Material",e[e.Texture=6]="Texture",e[e.COUNT=7]="COUNT"}(i||(i={}))},97220:(e,t,r)=>{r.d(t,{$:()=>i});class i{constructor(e,t){this._module=e,this._load=t}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},97225:(e,t,r)=>{r.d(t,{V:()=>E,uD:()=>b,R5:()=>S});var i=r(51850),n=r(91829),o=r(49255),a=r(96336),s=r(72824),c=r(97220),l=r(98958),d=r(89192),u=r(11725),h=r(59643),m=r(33524),f=r(63907);f.MT.LESS,f.MT.ALWAYS;const p={mask:255},v={function:{func:f.MT.ALWAYS,ref:d.dd.OutlineVisualElementMask,mask:d.dd.OutlineVisualElementMask},operation:{fail:f.eA.KEEP,zFail:f.eA.KEEP,zPass:f.eA.ZERO}},g={function:{func:f.MT.ALWAYS,ref:d.dd.OutlineVisualElementMask,mask:d.dd.OutlineVisualElementMask},operation:{fail:f.eA.KEEP,zFail:f.eA.KEEP,zPass:f.eA.REPLACE}};f.MT.EQUAL,d.dd.OutlineVisualElementMask,d.dd.OutlineVisualElementMask,f.eA.KEEP,f.eA.KEEP,f.eA.KEEP,f.MT.NOTEQUAL,d.dd.OutlineVisualElementMask,d.dd.OutlineVisualElementMask,f.eA.KEEP,f.eA.KEEP,f.eA.KEEP;var _=r(74810),T=r(28491),x=r(90644),A=r(49788);class b extends s.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=_.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=d.s2.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=i.uY,this.instancedDoublePrecision=!1,this.normalType=a.W.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,i.CN)(.2,.2,.2),this.diffuse=(0,i.CN)(.8,.8,.8),this.externalColor=(0,n.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,i.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=d.it.Less,this.textureAlphaMode=d.sf.Blend,this.textureAlphaCutoff=A.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=u.m$.Occlude,this.isDecoration=!1}}class E extends s.gy{constructor(){super(...arguments),this.origin=(0,i.vt)(),this.slicePlaneLocalOrigin=this.origin}}class S extends l.w{constructor(e,t,i=new c.$(T.D,(()=>r.e(5141).then(r.bind(r,5141))))){super(e,t,i),this.type="DefaultMaterialTechnique"}_makePipeline(e,t){const{oitPass:r,output:i,transparent:n,cullFace:a,customDepthTest:s,hasOccludees:c,enableOffset:l}=e,d=r===h.Y.NONE,u=r===h.Y.FrontFace;return(0,x.Ey)({blending:(0,o.RN)(i)&&n?(0,m.Yf)(r):null,culling:C(e)?(0,x.Xt)(a):null,depthTest:{func:(0,m.K_)(r,M(s))},depthWrite:(0,m.z5)(e),drawBuffers:i===o.V.Depth?{buffers:[f.Hr.NONE]}:(0,m.m6)(r,i),colorWrite:x.kn,stencilWrite:c?p:null,stencilTest:c?t?g:v:null,polygonOffset:d||u?null:(0,m.aB)(l)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function M(e){return e===d.it.Lequal?f.MT.LEQUAL:f.MT.LESS}function C(e){return e.cullFace!==d.s2.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}},98619:(e,t,r)=>{r.d(t,{Gc:()=>o,O4:()=>a,Vt:()=>s});var i=r(23205),n=r(31821);function o(e){e.uniforms.add(new i.d("mainLightDirection",(e=>e.lighting.mainLight.direction)))}function a(e){e.uniforms.add(new i.d("mainLightIntensity",(e=>e.lighting.mainLight.intensity)))}function s(e){o(e.fragment),a(e.fragment),e.fragment.code.add(n.H`vec3 applyShading(vec3 shadingNormalWorld, float shadow) {
964
+ }`)}},96672:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Mesh=2]="Mesh",e[e.Line=3]="Line",e[e.Point=4]="Point",e[e.Material=5]="Material",e[e.Texture=6]="Texture",e[e.COUNT=7]="COUNT"}(i||(i={}))},97220:(e,t,r)=>{r.d(t,{$:()=>i});class i{constructor(e,t){this._module=e,this._load=t}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},97225:(e,t,r)=>{r.d(t,{V:()=>E,uD:()=>b,R5:()=>S});var i=r(51850),n=r(91829),o=r(49255),a=r(96336),s=r(72824),c=r(97220),l=r(98958),d=r(89192),u=r(11725),h=r(59643),m=r(33524),f=r(63907);f.MT.LESS,f.MT.ALWAYS;const p={mask:255},v={function:{func:f.MT.ALWAYS,ref:d.dd.OutlineVisualElementMask,mask:d.dd.OutlineVisualElementMask},operation:{fail:f.eA.KEEP,zFail:f.eA.KEEP,zPass:f.eA.ZERO}},g={function:{func:f.MT.ALWAYS,ref:d.dd.OutlineVisualElementMask,mask:d.dd.OutlineVisualElementMask},operation:{fail:f.eA.KEEP,zFail:f.eA.KEEP,zPass:f.eA.REPLACE}};f.MT.EQUAL,d.dd.OutlineVisualElementMask,d.dd.OutlineVisualElementMask,f.eA.KEEP,f.eA.KEEP,f.eA.KEEP,f.MT.NOTEQUAL,d.dd.OutlineVisualElementMask,d.dd.OutlineVisualElementMask,f.eA.KEEP,f.eA.KEEP,f.eA.KEEP;var _=r(74810),T=r(28491),x=r(90644),A=r(49788);class b extends s.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=_.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=d.s2.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=i.uY,this.instancedDoublePrecision=!1,this.normalType=a.W.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,i.CN)(.2,.2,.2),this.diffuse=(0,i.CN)(.8,.8,.8),this.externalColor=(0,n.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,i.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=d.it.Less,this.textureAlphaMode=d.sf.Blend,this.textureAlphaCutoff=A.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=u.m$.Occlude,this.isDecoration=!1}}class E extends s.gy{constructor(){super(...arguments),this.origin=(0,i.vt)(),this.slicePlaneLocalOrigin=this.origin}}class S extends l.w{constructor(e,t,i=new c.$(T.D,(()=>r.e(5141).then(r.bind(r,5141))))){super(e,t,i),this.type="DefaultMaterialTechnique"}_makePipeline(e,t){const{oitPass:r,output:i,transparent:n,cullFace:a,customDepthTest:s,hasOccludees:c,enableOffset:l}=e,d=r===h.Y.NONE,u=r===h.Y.FrontFace;return(0,x.Ey)({blending:(0,o.RN)(i)&&n?(0,m.Yf)(r):null,culling:C(e)?(0,x.Xt)(a):null,depthTest:{func:(0,m.K_)(r,M(s))},depthWrite:(0,m.z5)(e),drawBuffers:i===o.V.Depth?{buffers:[f.Hr.NONE]}:(0,m.m6)(r,i),colorWrite:x.kn,stencilWrite:c?p:null,stencilTest:c?t?g:v:null,polygonOffset:d||u?null:(0,m.aB)(l)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function M(e){return e===d.it.Lequal?f.MT.LEQUAL:f.MT.LESS}function C(e){return e.cullFace!==d.s2.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}},98619:(e,t,r)=>{r.d(t,{Gc:()=>o,O4:()=>a,Vt:()=>s});var i=r(23205),n=r(31821);function o(e){e.uniforms.add(new i.d("mainLightDirection",(e=>e.lighting.mainLight.direction)))}function a(e){e.uniforms.add(new i.d("mainLightIntensity",(e=>e.lighting.mainLight.intensity)))}function s(e){o(e.fragment),a(e.fragment),e.fragment.code.add(n.H`vec3 applyShading(vec3 shadingNormalWorld, float shadow) {
965
965
  float dotVal = clamp(dot(shadingNormalWorld, mainLightDirection), 0.0, 1.0);
966
966
  return mainLightIntensity * ((1.0 - shadow) * dotVal);
967
967
  }`)}},98958:(e,t,r)=>{r.d(t,{w:()=>u});var i=r(53966),n=r(97768),o=r(39341),a=r(3694),s=r(94656);class c{constructor(e,t,r){this._context=e,this._locations=r,this._textures=new Map,this._freeTextureUnits=new a.A({deallocator:null}),this._glProgram=e.programCache.acquire(t.generate("vertex",!0),t.generate("fragment",!0),r),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bind=t.generateBind(this),this.bindPass=t.generateBindPass(this),this.bindDraw=t.generateBindDraw(this),this._fragmentUniforms=(0,s.en)()?t.fragmentUniforms:null}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,t?1:0)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t){this._glProgram.setUniform1f(e,t)}setUniform2fv(e,t){this._glProgram.setUniform2fv(e,t)}setUniform3fv(e,t){this._glProgram.setUniform3fv(e,t)}setUniform4fv(e,t){this._glProgram.setUniform4fv(e,t)}setUniformMatrix3fv(e,t){this._glProgram.setUniformMatrix3fv(e,t)}setUniformMatrix4fv(e,t){this._glProgram.setUniformMatrix4fv(e,t)}setUniform1fv(e,t){this._glProgram.setUniform1fv(e,t)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e){e.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){this._textures.clear(),this._freeTextureUnits.clear()}bindTexture(e,t){if(null==t?.glName){const t=this._textures.get(e);return t&&(this._context.bindTexture(null,t.unit),this._freeTextureUnit(t),this._textures.delete(e)),null}let r=this._textures.get(e);return null==r?(r=this._allocTextureUnit(t),this._textures.set(e,r)):r.texture=t,this._context.useProgram(this),this.setUniform1i(e,r.unit),this._context.bindTexture(t,r.unit),r.unit}rebindTextures(){this._context.useProgram(this),this._textures.forEach(((e,t)=>{this._context.bindTexture(e.texture,e.unit),this.setUniform1i(t,e.unit)})),this._fragmentUniforms?.forEach((e=>{"sampler2D"!==e.type&&"samplerCube"!==e.type||this._textures.has(e.name)||console.error(`Texture sampler ${e.name} has no bound texture`)}))}_allocTextureUnit(e){return{texture:e,unit:0===this._freeTextureUnits.length?this._textures.size:this._freeTextureUnits.pop()}}_freeTextureUnit(e){this._freeTextureUnits.push(e.unit)}}var l=r(63907),d=r(90644);class u{constructor(e,t,r,a=o.D){this.locations=a,this.primitiveType=l.WR.TRIANGLES,this.key=t.key,this._program=new c(e.rctx,r.get().build(t),a),this._pipeline=this.initializePipeline(t),this.reload=async o=>{o&&await r.reload(),this.key.equals(t.key)||i.A.getLogger("esri.views.3d.webgl.ShaderTechnique").warn("Configuration was changed after construction, cannot reload shader.",r),(0,n.WD)(this._program),this._program=new c(e.rctx,r.get().build(t),a),this._pipeline=this.initializePipeline(t)}}destroy(){this._program=(0,n.WD)(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t){return this._pipeline}initializePipeline(e){return(0,d.Ey)({blending:d.Os,colorWrite:d.kn})}}},99208:(e,t,r)=>{r.d(t,{r:()=>a});var i=r(53466),n=r(31821);function o(e){e.fragment.code.add(n.H`vec4 textureAtlasLookup(sampler2D tex, vec2 textureCoordinates, vec4 atlasRegion) {
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8111],{6518:(t,e,i)=>{i.d(e,{F:()=>h});var s=i(44208),n=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class h{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,s.A)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((i,s)=>{t[e++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.Ie)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,i){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,i)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},36708:(t,e,i)=>{i.d(e,{C_:()=>c,OH:()=>f,Vh:()=>g,on:()=>u,pc:()=>x,wB:()=>a,z7:()=>l});var s=i(37955),n=i(36563),r=i(97768),o=i(74887),h=i(14012);function a(t,e,i={}){return d(t,e,i,_)}function l(t,e,i={}){return d(t,e,i,m)}function d(t,e,i={},s){let n=null;const o=i.once?(t,i)=>{s(t)&&((0,r.xt)(n),e(t,i))}:(t,i)=>{s(t)&&e(t,i)};if(n=(0,h.Cn)(t,o,i.sync,i.equals),i.initial){const e=t();o(e,e)}return n}function u(t,e,i,o={}){let h=null,l=null,d=null;function u(){h&&l&&(l.remove(),o.onListenerRemove?.(h),h=null,l=null)}function c(t){o.once&&o.once&&(0,r.xt)(d),i(t)}const _=a(t,((t,i)=>{u(),(0,s.wb)(t)&&(h=t,l=(0,s.on)(t,e,c),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return d=(0,n.hA)((()=>{_.remove(),u()})),d}function c(t,e){return function(t,e,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=t();if(e?.(s))return Promise.resolve(s);let h=null;function a(){h=(0,r.xt)(h)}return new Promise(((s,r)=>{h=(0,n.vE)([(0,o.u7)(i,(()=>{a(),r((0,o.NK)())})),d(t,(t=>{a(),s(t)}),{sync:!1,once:!0},e??_)])}))}(t,m,e)}function _(t){return!0}function m(t){return!!t}i(80559);const f={sync:!0},g={initial:!0},x={sync:!0,initial:!0}},37730:(t,e,i)=>{i.d(e,{T:()=>n});var s=i(43334);const n={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e)=>new s.Om(e,t.attributes,null,t.objectId),getGeometry:t=>t.geometry,getCentroid:(t,e)=>t.ensureCentroid(e)}},58376:(t,e,i)=>{i.d(e,{J:()=>m});var s=i(4718),n=i(74887),r=i(65864),o=i(17136),h=i(21325),a=i(31464),l=i(19730),d=i(8384),u=i(58727),c=i(62798),_=i(62660);async function m(t,e,i){const m=(0,n.Mq)(i),{point:f,distance:g,returnEdge:x,vertexMode:y}=e;if(!x&&"none"===y)return{candidates:[]};let p=(0,s.o8)(e.query);p=await t.schedule((()=>(0,u.T2)(p,t.definitionExpression,t.spatialReference)),m),p=await t.reschedule((()=>(0,c.B4)(p,{availableFields:t.availableFields,fieldsIndex:t.fieldsIndex,geometryType:t.geometryType,spatialReference:t.spatialReference})),m);const b=!(0,h.aI)(f.spatialReference,t.spatialReference);b&&await(0,a.Nk)(f.spatialReference,t.spatialReference);const B="number"==typeof g?g:g.x,M="number"==typeof g?g:g.y,z={xmin:f.x-B,xmax:f.x+B,ymin:f.y-M,ymax:f.y+M,spatialReference:f.spatialReference},v=b?(0,a.Cv)(z,t.spatialReference):z;if(!v)return{candidates:[]};const I=(await(0,o.el)((0,r.rS)(f),null,{signal:m}))[0],S=(await(0,o.el)((0,r.rS)(v),null,{signal:m}))[0];if(null==I||null==S)return{candidates:[]};const w=new d.G(await t.reschedule((()=>t.searchFeatures((0,l.ux)(S.toJSON()))),m),p,t);await t.reschedule((()=>t.executeObjectIdsQuery(w)),m),await t.reschedule((()=>t.executeTimeQuery(w)),m),await t.reschedule((()=>t.executeAttributesQuery(w)),m),await t.reschedule((()=>async function(t,e,i){const{query:s}=e,{spatialRel:n}=s;if(!e?.items?.length||!s.geometry||!n)return;const r=await(0,_.xt)(n,s.geometry,t.geometryType,t.hasZ,t.hasM),o=await t.runSpatialFilter(e.items,(t=>r(t.geometry)),i);e.items=o}(t,w,m)),m);const A=I.toJSON(),R=b?(0,a.Cv)(A,t.spatialReference):A,Y=b?Math.max(v.xmax-v.xmin,v.ymax-v.ymin)/2:g;return w.createSnappingResponse({...e,point:R,distance:Y},f.spatialReference)}},66344:(t,e,i)=>{i.d(e,{q:()=>a});var s,n,r=i(3694);(n=s||(s={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A,this._sizeLimits=new Map}destroy(){this.clearAll(),this._removeFuncs.clear(),this._sizeLimits.clear(),this._users.clear()}register(t){this._users.push(t)}deregister(t){this._sizeLimits.delete(t),this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,e){const i=this._db.get(t.id+e);return i?.size??0}put(t,e,i,n,r){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==i&&this._notifyRemove(e,o.entry,o.size,s.ALL)),n>this._maxSize)return void this._notifyRemove(e,i,n,s.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${e}`),void this._notifyRemove(e,i,0,s.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(e,new h(i,n,a)),this._size+=n,t.size+=n,this._checkSize()}updateSize(t,e,i,n){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===i){for(this._size-=r.size,t.size-=r.size;n>this._maxSize;){const t=this._notifyRemove(e,i,n,s.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);n=t}r.size=n,this._size+=n,t.size+=n,this._checkSize()}}pop(t,e){e=t.id+e;const i=this._db.get(e);if(i)return this._size-=i.size,t.size-=i.size,this._db.delete(e),++this._hit,i.entry;++this._miss}get(t,e){e=t.id+e;const i=this._db.get(e);if(void 0!==i)return this._db.delete(e),i.lives=i.lifetime,this._db.set(e,i),++this._hit,i.entry;++this._miss}peek(t,e){const i=this._db.get(t.id+e);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},i=new Array;this._db.forEach(((t,s)=>{const n=t.lifetime;i[n]=(i[n]||0)+t.size,this._users.forAll((i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=e[r]||0;e[r]=i+t.size}}))}));const s={};this._users.forAll((t=>{const i=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const n=e[i]||0;e[i]=n,s[i]=Math.round(100*t.hitRate)+"%"}else s[i]="0%"}));const n=Object.keys(e);n.sort(((t,i)=>e[i]-e[t])),n.forEach((i=>t[i]=Math.round(e[i]/2**20)+"MB / "+s[i]));for(let e=i.length-1;e>=0;--e){const s=i[e];s&&(t["Priority "+(e+-3-1)]=Math.round(s/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,i)=>{i.startsWith(e)&&(this._size-=t.size,this._db.delete(i),this._notifyRemove(i,t.entry,t.size,s.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,t.size,s.ALL))),this._users.forAll((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,i,s){let n;return this._removeFuncs.some((r=>{if(t.startsWith(r[0])){const t=r[1](e,s,i);return"number"==typeof t&&(n=t),!0}return!1})),n}_checkSize(){this._sizeLimits.forEach(((t,e)=>this._checkSizeLimits(t,e))),this._checkSizeLimits(this.maxSize)}setMaxSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){const i=e??this;if(i.size<=t)return;const s=e?.id;let n=!0;for(;n;){n=!1;for(const[r,o]of this._db)if(0===o.lifetime&&(!s||r.startsWith(s))){if(this._purgeItem(r,o,e),i.size<=.9*t)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if((!s||n.startsWith(s))&&(this._purgeItem(n,r,e),i.size<=.9*t))return}_purgeItem(t,e,i=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,i&&(i.size-=e.size);const n=this._notifyRemove(t,e.entry,e.size,s.SOME);null!=n&&n>0&&(this._size+=n,i&&(i.size+=n),e.lives=e.lifetime,e.size=n,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}class h{constructor(t,e,i){this.entry=t,this.size=e,this.lifetime=i,this.lives=i}}class a{constructor(t,e){this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,i=1){this._storage.put(this,t,e,i,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69540:(t,e,i)=>{i.d(e,{A:()=>c});var s=i(90237),n=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),h=i(35666),a=i(88620),l=i(40608);const d=t=>{let e=class extends t{clone(){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,i=t.store,s={},n=new Map;for(const t in e){const o=e[t],a=i?.originOf(t),l=o.clonable;if(o.readOnly||!1===l||a!==h.Gr.USER&&a!==h.Gr.DEFAULTS&&a!==h.Gr.WEB_MAP&&a!==h.Gr.WEB_SCENE)continue;const d=this[t];let u=null;u="function"==typeof l?l(d):"reference"===l?d:(0,r.TU)(d),null!=d&&null==u||(a===h.Gr.DEFAULTS?n.set(t,u):s[t]=u)}const l=new(0,Object.getPrototypeOf(this).constructor)(s);if(n.size){const t=(0,a.oY)(l)?.store;if(t)for(const[e,i]of n)t.set(e,i,h.Gr.DEFAULTS)}return l}};return e=(0,s._)([(0,l.$)("esri.core.Clonable")],e),e};let u=class extends(d(n.A)){};u=(0,s._)([(0,l.$)("esri.core.Clonable")],u),(u||(u={})).ClonableMixin=d;const c=u},75503:(t,e,i)=>{i.d(e,{E:()=>I,w:()=>h});var s=i(4576),n=i(21818),r=(i(44208),i(3694)),o=i(11006);class h{constructor(t=9,e){this._compareMinX=c,this._compareMinY=_,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),B.prune(),M.prune(),z.prune(),v.prune()}all(t){a(this._data,t)}search(t,e){let i=this._data;const s=this._toBBox;if(p(t,i))for(B.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;p(t,o)&&(i.leaf?e(r):y(t,o)?a(r,e):B.push(r))}i=B.pop()}}collides(t){let e=this._data;const i=this._toBBox;if(!p(t,e))return!1;for(B.clear();e;){for(let s=0,n=e.children.length;s<n;s++){const n=e.children[s],r=e.leaf?i(n):n;if(p(t,r)){if(e.leaf||y(t,r))return!0;B.push(n)}}e=B.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new w([]),this}remove(t){if(!t)return this;let e,i=this._data,r=null,o=0,h=!1;const a=this._toBBox(t);for(z.clear(),v.clear();i||z.length>0;){if(i||(i=z.pop(),r=z.data[z.length-1],o=v.pop()??0,h=!0),i.leaf&&(e=(0,s.qh)(i.children,(0,n.zI)(t),i.children.length,i.indexHint),-1!==e))return i.children.splice(e,1),z.push(i),this._condense(z),this;h||i.leaf||!y(i,a)?r?(o++,i=r.children[o],h=!1):i=null:(z.push(i),v.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,i,s){const n=i-e+1;let r=this._maxEntries;if(n<=r){const s=new w(t.slice(e,i+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new A([]);o.height=s;const h=Math.ceil(n/r),a=h*Math.ceil(Math.sqrt(r));b(t,e,i,a,this._compareMinX);for(let n=e;n<=i;n+=a){const e=Math.min(n+a-1,i);b(t,n,e,h,this._compareMinY);for(let i=n;i<=e;i+=h){const n=Math.min(i+h-1,e);o.children.push(this._build(t,i,n,s-1))}}return l(o,this._toBBox),o}_insert(t,e,i){const s=this._toBBox,n=i?t:s(t);z.clear();const r=function(t,e,i,s){for(;s.push(e),!0!==e.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],h=m(o),a=g(t,o)-h;a<n?(n=a,s=h<s?h:s,i=o):a===n&&h<s&&(s=h,i=o)}e=i||e.children[0]}return e}(n,this._data,e,z);for(r.children.push(t),u(r,n);e>=0&&z.data[e].children.length>this._maxEntries;)this._split(z,e),e--;!function(t,e,i){for(let s=i;s>=0;s--)u(e.data[s],t)}(n,z,e)}_split(t,e){const i=t.data[e],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return;const o=i.children.splice(r,i.children.length-r),h=i.leaf?new w(o):new A(o);h.height=i.height,l(i,this._toBBox),l(h,this._toBBox),e?t.data[e-1].children.push(h):this._splitRoot(i,h)}_splitRoot(t,e){this._data=new A([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,i){let s,n,r;s=n=1/0;for(let o=e;o<=i-e;o++){const e=d(t,0,o,this._toBBox),h=d(t,o,i,this._toBBox),a=x(e,h),l=m(e)+m(h);a<s?(s=a,r=o,n=l<n?l:n):a===s&&l<n&&(n=l,r=o)}return r}_chooseSplitAxis(t,e,i){const s=t.leaf?this._compareMinX:c,n=t.leaf?this._compareMinY:_;this._allDistMargin(t,e,i,s)<this._allDistMargin(t,e,i,n)&&t.children.sort(s)}_allDistMargin(t,e,i,s){t.children.sort(s);const n=this._toBBox,r=d(t,0,e,n),o=d(t,i-e,i,n);let h=f(r)+f(o);for(let s=e;s<i-e;s++){const e=t.children[s];u(r,t.leaf?n(e):e),h+=f(r)}for(let s=i-e-1;s>=e;s--){const e=t.children[s];u(o,t.leaf?n(e):e),h+=f(o)}return h}_condense(t){for(let e=t.length-1;e>=0;e--){const i=t.data[e];if(0===i.children.length)if(e>0){const n=t.data[e-1],r=n.children;r.splice((0,s.qh)(r,i,r.length,n.indexHint),1)}else this.clear();else l(i,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){let i=t;for(M.clear();i;){if(!0===i.leaf)for(const t of i.children)e((0,n.zI)(t));else M.pushArray(i.children);i=M.pop()??null}}function l(t,e){d(t,0,t.children.length,e,t)}function d(t,e,i,s,n){n||(n=new w([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=e;o<i;o++)r=t.children[o],u(n,t.leaf?s(r):r);return n}function u(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function _(t,e){return t.minY-e.minY}function m(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function g(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function x(t,e){const i=Math.max(t.minX,e.minX),s=Math.max(t.minY,e.minY),n=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function y(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function b(t,e,i,s,n){const r=[e,i];for(;r.length;){const e=r.pop(),i=r.pop();if(e-i<=s)continue;const h=i+Math.ceil((e-i)/s/2)*s;(0,o.q)(t,h,i,e,n),r.push(i,h,h,e)}}const B=new r.A,M=new r.A,z=new r.A,v=new r.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class w extends S{constructor(t){super(),this.children=t,this.leaf=!0}}class A extends S{constructor(t){super(),this.children=t,this.leaf=!1}}},83221:(t,e,i)=>{i.d(e,{A:()=>m});var s=i(4576),n=i(49186),r=i(65529),o=i(53966),h=i(70328),a=i(19419),l=i(90708),d=i(6518),u=i(51441),c=i(37730);const _=(0,h.vt)();class m{constructor(t){this.geometryInfo=t,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.A,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach((e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;const[e,i,s,n]=this.fullBounds;return{xmin:e,ymin:i,xmax:s,ymax:n,spatialReference:(0,u.ag)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(const e of t)this._add(e);this._emitChanged()}upsertMany(t){const e=t.map((t=>this._upsert(t)));return this._emitChanged(),e.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(t){const e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(const e of t){const t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(const i of t){const t=this._boundsStore.get(i.objectId);t&&e((0,h.Jt)(_,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach((e=>t(e)))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,(t=>{e(this._featuresById.get(t))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;const e=t.objectId;if(null==e)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:t}));const i=this._featuresById.get(e);let s;if(i?(t.displayId=i.displayId,s=this._boundsStore.get(e),this._boundsStore.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(t),!t.geometry?.coords?.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);s=(0,l.jQ)(null!=s?s:(0,a.vt)(),t.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=s&&this._boundsStore.set(e,s),this._featuresById.set(e,t),this._usedMemory+=this.estimateFeatureUsedMemory?.(t)??0}_upsert(t){const e=t?.objectId;if(null==e)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:t})),null;const i=this._featuresById.get(e);if(!i)return this._add(t),t;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:r}=t;for(const t in r)i.attributes[t]=r[t];return s&&(i.geometry=s,this._boundsStore.set(e,(0,l.jQ)((0,a.vt)(),s,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);const e=t.objectId;return this._boundsStore.delete(e),this._featuresById.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(t)??0,t}}}}]);