@arcgis/core 4.27.0-rc.2 → 4.27.0-rc.3

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 (100) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{a8565d1c676f3bfbcebb.js → 002fe1ec63ea33e6972d.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{0610691a0c0d9fbbd6d2.js → 013de5c2955801b329b3.js} +1 -1
  4. package/assets/esri/core/workers/chunks/07163dcbb871f927a580.js +1 -0
  5. package/assets/esri/core/workers/chunks/0e46687004392c493c06.js +1 -0
  6. package/assets/esri/core/workers/chunks/0e65e00173b66c7fec2e.js +1 -0
  7. package/assets/esri/core/workers/chunks/1aa8dd317ecd3c41e0ea.js +1 -0
  8. package/assets/esri/core/workers/chunks/21328f3dd26abe84a10d.js +1 -0
  9. package/assets/esri/core/workers/chunks/28c67c98039503b62e6e.js +1 -0
  10. package/assets/esri/core/workers/chunks/{da57eba2fe25495ea217.js → 2faa8f08f2fdaac3f4af.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{0407bf97ad621c89a734.js → 3160af63b860b52db389.js} +1 -1
  12. package/assets/esri/core/workers/chunks/3767b9e7660873b018c2.js +1 -0
  13. package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +1 -0
  14. package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +1 -0
  15. package/assets/esri/core/workers/chunks/4a4f14a3d8da270059c4.js +1 -0
  16. package/assets/esri/core/workers/chunks/{3e239bfad611985e50fb.js → 50f910797c17c3028521.js} +1 -1
  17. package/assets/esri/core/workers/chunks/642c5a93c0a454bdd115.js +1 -0
  18. package/assets/esri/core/workers/chunks/{14145959a3dab1437818.js → 6627f1bc9ee6b620e3aa.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{170bdbdb4e21bf91a17f.js → 6eaa7a51efde2dd4a5a4.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{2bdc63395c7466ce1641.js → 7053c2f5a958d4c8629b.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{4c35c663528f710e8c78.js → 79cb672c85ea29e8484a.js} +1 -1
  22. package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +1 -0
  23. package/assets/esri/core/workers/chunks/89001ee8d3f69fa03cc1.js +1 -0
  24. package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +1 -0
  25. package/assets/esri/core/workers/chunks/9472184ef1432fc55d6b.js +1 -0
  26. package/assets/esri/core/workers/chunks/a6ddf80eb324c35076e1.js +1 -0
  27. package/assets/esri/core/workers/chunks/a80a6267d88246ede5d3.js +1 -0
  28. package/assets/esri/core/workers/chunks/{f505ebd4bd3bfb6c790d.js → b6a55fdfe16795ebf02c.js} +1 -1
  29. package/assets/esri/core/workers/chunks/bf9e1fde9f6b2b4f10c0.js +1 -0
  30. package/assets/esri/core/workers/chunks/cfa3b2b1e184681e9af4.js +1 -0
  31. package/assets/esri/core/workers/chunks/{1f69fb9687de9ebfcf90.js → d4ba894a2583f3930a4f.js} +1 -1
  32. package/assets/esri/core/workers/chunks/d5dfd3d693d5e393a542.js +1 -0
  33. package/assets/esri/core/workers/chunks/{74fd2059ddda9083cbcc.js → dc6c97a43d642eeaf477.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{2154d395f405be3cd3ba.js → eca0c3d57b3a1e3a14ee.js} +1 -1
  35. package/assets/esri/core/workers/chunks/f36697f6aac782007d1a.js +1 -0
  36. package/assets/esri/core/workers/chunks/f52054f27619a98b7bb7.js +1 -0
  37. package/assets/esri/core/workers/chunks/fb7fe307a583b6a22218.js +1 -0
  38. package/assets/esri/core/workers/chunks/fbd3c78ee8e2219a6c7a.js +1 -0
  39. package/assets/esri/core/workers/chunks/ff42585e1b1d0c5497af.js +1 -0
  40. package/assets/esri/images/portal/livestreamvideolayer16.png +0 -0
  41. package/assets/esri/images/portal/{mediaservice16.png → videolayer16.png} +0 -0
  42. package/assets/esri/themes/base/widgets/_FeatureForm.scss +19 -2
  43. package/assets/esri/themes/dark/main.css +1 -1
  44. package/assets/esri/themes/light/main.css +1 -1
  45. package/assets/esri/themes/light/view.css +1 -1
  46. package/geometry/support/DoubleArray.js +1 -1
  47. package/interfaces.d.ts +84 -0
  48. package/kernel.js +1 -1
  49. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  50. package/layers/support/editableLayers.js +1 -1
  51. package/layers/support/layerUtils.js +1 -1
  52. package/package.json +1 -1
  53. package/portal/PortalItem.js +1 -1
  54. package/request.js +1 -1
  55. package/support/requestUtils.js +1 -1
  56. package/support/revision.js +1 -1
  57. package/views/3d/layers/I3SMeshView3D.js +1 -1
  58. package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
  59. package/views/3d/layers/SceneLayerWorker.js +1 -1
  60. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  61. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  62. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
  63. package/webmap/initialViewPropertiesUtils.js +1 -1
  64. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  65. package/widgets/Editor/CreateWorkflow.js +1 -1
  66. package/widgets/Editor/EditorViewModel.js +1 -1
  67. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  68. package/widgets/Editor/UpdateWorkflow.js +1 -1
  69. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  70. package/widgets/Editor/workflowUtils.js +1 -1
  71. package/widgets/Feature/support/featureUtils.js +1 -1
  72. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  73. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  74. package/widgets/FeatureForm/css.js +1 -1
  75. package/widgets/FeatureForm.js +1 -1
  76. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  77. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +4 -0
  78. package/widgets/UtilityNetworkValidateTopology.d.ts +4 -0
  79. package/widgets/support/geolocationUtils.js +1 -1
  80. package/assets/esri/core/workers/chunks/0fcb8d408696075338e2.js +0 -1
  81. package/assets/esri/core/workers/chunks/16e459b16bdd6e1a821b.js +0 -1
  82. package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +0 -1
  83. package/assets/esri/core/workers/chunks/2b55295590b4a0503749.js +0 -1
  84. package/assets/esri/core/workers/chunks/3ba2fcb9110230f8790c.js +0 -1
  85. package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +0 -1
  86. package/assets/esri/core/workers/chunks/5706edf45402dff279a6.js +0 -1
  87. package/assets/esri/core/workers/chunks/659b7bad7281c0e2aed3.js +0 -1
  88. package/assets/esri/core/workers/chunks/6cd248d065f6d1616294.js +0 -1
  89. package/assets/esri/core/workers/chunks/9326120c750799eb2d28.js +0 -1
  90. package/assets/esri/core/workers/chunks/99e0cec47e3ef72c1de4.js +0 -1
  91. package/assets/esri/core/workers/chunks/9c0e1e87790424f42d7e.js +0 -1
  92. package/assets/esri/core/workers/chunks/9e66af3b1c70cf25fb32.js +0 -1
  93. package/assets/esri/core/workers/chunks/a1c31bb8c12831539328.js +0 -1
  94. package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +0 -1
  95. package/assets/esri/core/workers/chunks/c08e03165043df67c11b.js +0 -1
  96. package/assets/esri/core/workers/chunks/c26148d4bfab3b3dfab2.js +0 -1
  97. package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +0 -1
  98. package/assets/esri/core/workers/chunks/eeaf8010e38b65a101ac.js +0 -1
  99. package/assets/esri/core/workers/chunks/f235392c56063fbf89c6.js +0 -1
  100. package/assets/esri/core/workers/chunks/fdd0d3616c97e408b104.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6256,2442],{57435:(e,t,r)=>{r.d(t,{Z:()=>u});var i=r(43697),s=r(46791),o=(r(20102),r(92604),r(26258),r(87538)),n=r(5600),a=r(52011);let l=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,o.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,n.Cb)()],l.prototype,"getCollections",void 0),(0,i._)([(0,n.Cb)()],l.prototype,"getChildrenFunction",void 0),(0,i._)([(0,n.Cb)()],l.prototype,"itemFilterFunction",void 0),l=(0,i._)([(0,a.j)("esri.core.CollectionFlattener")],l);const u=l},68668:(e,t,r)=>{r.d(t,{G:()=>n,w:()=>a});var i=r(66643),s=r(46791),o=r(83379);async function n(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):s.Z.isCollection(t)?t.forEach((e=>n(e))):o.Z.isLoadable(t)&&r.push(t))};t(n);let a=null;if(await(0,i.UI)(r,(async e=>{const t=await(0,i.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},49735:(e,t,r)=>{r.d(t,{Z:()=>I});var i=r(43697),s=r(92036),o=r(20102),n=r(80442),a=r(95330),l=r(81271),u=r(5600),c=(r(75215),r(67676),r(52011)),p=r(2981),y=r(10158),d=r(11282),h=r(41818),f=(r(66577),r(34599)),m=r(14165),b=r(6570),g=r(5396),S=r(4967),_=r(53261),v=r(74889);let w=class extends s.Z{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,l.mN)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),i=null!=e.outStatistics?.[0],s=(0,n.Z)("featurelayer-pbf-statistics"),o=!i||s;let a;if(this.pbfSupported&&o)try{a=await(0,_.t)(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&o||(a=await(0,S.F)(this.url,r,t)),this._normalizeFields(a.fields),a}async featureSetFromJSON(e,t,i){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return v.Z.fromJSON(t);const{meshFeatureSetFromJSON:s}=await(0,a.Hl)(Promise.all([r.e(6481),r.e(6459),r.e(1681)]).then(r.bind(r,91681)),i);return s(e,this.infoFor3D,t)}executeForCount(e,t){return(0,h.P)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const i=(0,d.en)(e);return(0,f.Vr)(i,m.Z.from(t),{...r}).then((e=>({count:e.data.count,extent:b.Z.fromJSON(e.data.extent)})))}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,g.G)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:i},{executeRelationshipQuery:s}]=await(0,a.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:i},{executeRelationshipQueryForCount:s}]=await(0,a.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:i,fetchAttachments:s,processAttachmentQueryResult:o}=await(0,a.Hl)(r.e(540).then(r.bind(r,30540)),t),n=(0,d.en)(this.url);return o(n,await(this.queryAttachmentsSupported?i(n,e,t):s(n,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:i}=await(0,a.Hl)(r.e(1158).then(r.bind(r,71158)),t);return i(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:i}=await(0,a.Hl)(r.e(3992).then(r.bind(r,33992)),t);return i(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:i}=await(0,a.Hl)(r.e(1790).then(r.bind(r,21790)),t);return i(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:i}=await(0,a.Hl)(r.e(4371).then(r.bind(r,14371)),t);return i(this.parsedUrl,e,t)}_normalizeQuery(e){let t=m.Z.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?y.n.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:i,queryFormats:s}=r,n=(0,p.S0)("model/gltf-binary",i)??(0,p.Ow)("glb",i),a=(0,p.S0)("model/gltf+json",i)??(0,p.Ow)("gtlf",i);for(const e of s){if(e===n){t.formatOf3DObjects=e;break}e!==a||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new o.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:i,originY:s,originZ:o,translationX:n,translationY:a,translationZ:l,scaleX:u,scaleY:c,scaleZ:p,rotationX:y,rotationY:d,rotationZ:h,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(i,s,o,n,a,l,u,c,p,y,d,h,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,i._)([(0,u.Cb)({type:y.n})],w.prototype,"dynamicDataSource",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"fieldsIndex",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"gdbVersion",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"infoFor3D",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)()],w.prototype,"pbfSupported",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"queryAttachmentsSupported",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,u.Cb)({type:String})],w.prototype,"url",void 0),w=(0,i._)([(0,c.j)("esri.tasks.QueryTask")],w);const I=w},7944:(e,t,r)=>{r.d(t,{O:()=>g});var i=r(43697),s=r(3172),o=r(30175),n=r(95330),a=r(81271),l=r(23670),u=r(5600),c=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),y=r(31263),d=r(6570),h=r(82971),f=r(66677),m=r(21506),b=r(14661);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s="tile"!==i&&!!t.supportsDynamicLayers,o=r.includes("query"),n=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),c=r.includes("data"),p="tile"!==i&&(!t.tileInfo||s),y="tile"!==i&&(!t.tileInfo||s),d="tile"!==i,h=t.cimVersion&&l.G.parse(t.cimVersion),f=h?.since(1,4)??!1,m=h?.since(2,0)??!1;return{operations:{supportsExportMap:n,supportsExportTiles:a,supportsIdentify:o,supportsQuery:c,supportsTileMap:u},exportMap:n?{supportsArcadeExpressionForLabeling:f,supportsSublayersChanges:d,supportsDynamicLayers:s,supportsSublayerVisibility:p,supportsSublayerDefinitionExpression:y,supportsCIMSymbols:m}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,b.Fj)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then((e=>e.find((e=>"Feature Service"===e.type))??null),(()=>null)));const r=await this._relatedFeatureServicePromise;return(0,n.k_)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,b.Fj)(this.portalItem)&&e.originIdOf("url")<y.s3.SERVICE){const i=await this.fetchRelatedService(t);i&&(e.url=(0,a.v_)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let o;if("data-layer"===r.type)o=(await(0,s.default)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(i&&e.originIdOf("url")>y.s3.SERVICE)try{o=(await this._fetchAllLayersAndTablesFromService(i)).get(r.mapLayerId)}catch{}else{let i=e.id;"map-layer"===r?.type&&(i=r.mapLayerId);try{o=(await this.fetchAllLayersAndTables(t)).get(i)}catch{}}return o}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,f.Qc)(e),i=(0,o.s1)(this._allLayersAndTablesMap,r?.url.path,(()=>(0,s.default)((0,a.v_)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{const t=new Map;for(const r of e.data.layers)t.set(r.id,r);return{result:t}}),(e=>({error:e}))))),l=await i;if((0,n.k_)(t),"result"in l)return l.result;throw l.error}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,c.r)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({type:d.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.Cb)(m.id)],t.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,u.Cb)(m.C_)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({type:h.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,c.r)("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,p.j)("esri.layers.mixins.ArcGISMapService")],t),t}},10343:(e,t,r)=>{r.d(t,{x:()=>g});var i=r(43697),s=r(46791),o=r(57435),n=r(20102),a=r(92604),l=r(17445),u=r(5600),c=(r(75215),r(67676),r(80442),r(1153)),p=r(52011),y=r(31263),d=r(49867),h=r(32073);const f=a.Z.getLogger("esri.layers.TileLayer"),m=s.Z.ofType(d.Z);function b(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&b(e.sublayers,t)}))}const g=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new o.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[y.s3.SERVICE]:{},[y.s3.PORTAL_ITEM]:{},[y.s3.WEB_SCENE]:{},[y.s3.WEB_MAP]:{}},this.addHandles((0,l.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),l.Z_))}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,y.M9)(t.origin);if(i<y.s3.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>y.s3.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:o}=this.createSublayersForOrigin("web-document"),n=(0,c.vw)(this);n.setDefaultOrigin(o),this._set("sublayers",new m(s)),n.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,y.M9)("web-document"===e?"web-map":e);let r=y.s3.SERVICE,i=this.sublayersSourceJSON[y.s3.SERVICE].layers,s=this.sublayersSourceJSON[y.s3.SERVICE].context,o=null;const n=[y.s3.PORTAL_ITEM,y.s3.WEB_SCENE,y.s3.WEB_MAP].filter((e=>e<=t));for(const e of n){const t=this.sublayersSourceJSON[e];(0,h.ac)(t.layers)&&(r=e,i=t.layers,s=t.context,t.visibleLayers&&(o={visibleLayers:t.visibleLayers,context:t.context}))}const a=[y.s3.PORTAL_ITEM,y.s3.WEB_SCENE,y.s3.WEB_MAP].filter((e=>e>r&&e<=t));let l=null;for(const e of a){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(l={layers:t,context:i}),r&&(o={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const s=new d.Z;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)})),r):r}(i,s),c=new Map,p=new Set;if(l)for(const e of l.layers)c.set(e.id,e);if(o?.visibleLayers)for(const e of o.visibleLayers)p.add(e);return b(u,(e=>{l&&e.read(c.get(e.id),l.context),o&&e.read({defaultVisibility:p.has(e.id)},o.context)})),{origin:(0,y.x3)(r),sublayers:new m({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",(e=>{f.error(new n.Z("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:s.Z.ofType(d.Z)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.Cb)({value:null,type:m,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),t=(0,i._)([(0,p.j)("esri.layers.mixins.SublayersOwner")],t),t}},16451:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(2368),o=r(96674),n=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),u=r(30556),c=r(72729),p=r(70082);let y=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"id",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"domains",void 0),(0,i._)([(0,a.r)("domains")],y.prototype,"readDomains",null),(0,i._)([(0,u.c)("domains")],y.prototype,"writeDomains",null),(0,i._)([(0,n.Cb)({type:[p.Z],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,i._)([(0,l.j)("esri.layers.support.FeatureType")],y);const d=y},49867:(e,t,r)=>{r.d(t,{Z:()=>X});var i,s=r(43697),o=(r(66577),r(51773)),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),a=r(3172),l=r(9790),u=r(46791),c=r(20102),p=r(3920),y=r(80442),d=r(10699),h=r(22974),f=r(83379),m=r(92604),b=r(16453),g=r(42033),S=r(81271),_=r(5600),v=r(90578),w=r(71715),I=r(52011),C=r(30556),x=r(75215),F=r(31263),O=r(1153),E=r(49735),L=r(16451),P=r(1231),D=r(99514),T=r(54306),A=r(30707),R=r(56765),Z=r(72064),j=r(10158),M=r(42843),V=r(56545),N=r(14165),q=r(32163),G=r(6570),k=r(86973);function J(e){return null!=e&&"esriSMS"===e.type}function z(e,t,r){const i=this.originIdOf(t)>=(0,F.M9)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function Q(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(r.origin&&this.originIdOf(t)>=(0,F.M9)(r.origin)||this._isOverridden(t))}}function B(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function U(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,F.M9)(r.origin))}}let H=0;const $=new Set;$.add("layer"),$.add("parent"),$.add("loaded"),$.add("loadStatus"),$.add("loadError"),$.add("loadWarnings");let W=i=class extends((0,p.p)((0,b.R)((0,d.IG)(f.Z)))){constructor(e){super(e),this.capabilities=void 0,this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.sourceJSON=null,this.title=null,this.typeIdField=null,this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new c.Z("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,a.default)(r,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service"}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{operations:{supportsQuery:r,supportsQueryAttachments:i},query:{supportsFormatPBF:s},data:{supportsAttachment:o}}=(0,Z.h)(t,this.url);return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r,supportsQueryAttachments:i},data:{supportsAttachment:o},query:{supportsFormatPBF:s}}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get fieldsIndex(){return new D.Z(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){return this._get("id")??H++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition&&t.layerDefinition.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition&&t.layerDefinition.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeOID"===e.type)return e.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const r=t.layerDefinition;return 1-.01*((null!=r?.transparency?r.transparency:r?.drawingInfo?.transparency)??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,x.vU)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{spatialReference:e}=this.layer,t="gdbVersion"in this.layer?this.layer.gdbVersion:void 0,{capabilities:r,fieldsIndex:i}=this,s=(0,y.Z)("featurelayer-pbf")&&r?.query.supportsFormatPBF,o=r?.operations?.supportsQueryAttachments??!1;return new E.Z({url:this.url,pbfSupported:s,fieldsIndex:i,gdbVersion:t,sourceSpatialReference:e,queryAttachmentsSupported:o})}set renderer(e){if(e)for(const t of e.getSymbols())if((0,l.dU)(t)){m.Z.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new M.R({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,x.se)(u.Z.ofType(i),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,S.B7)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,O.vw)(this),t=new i;return(0,O.vw)(t).store=e.clone($),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,q.eZ)(this,e)}createQuery(){return new N.Z({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const{layer:e}=this,t=e?.parsedUrl,i=new(0,(await Promise.all([r.e(8346),r.e(7215),r.e(773),r.e(9238)]).then(r.bind(r,19238))).default)({url:t?.path});return t&&this.source&&("map-layer"===this.source.type?i.layerId=this.source.mapLayerId:i.dynamicDataSource=this.source),null!=e?.refreshInterval&&(i.refreshInterval=e.refreshInterval),this.definitionExpression&&(i.definitionExpression=this.definitionExpression),this.floorInfo&&(i.floorInfo=(0,h.d9)(this.floorInfo)),this.originIdOf("labelingInfo")>F.s3.SERVICE&&(i.labelingInfo=(0,h.d9)(this.labelingInfo)),this.originIdOf("labelsVisible")>F.s3.DEFAULTS&&(i.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>F.s3.DEFAULTS&&(i.legendEnabled=this.legendEnabled),this.originIdOf("visible")>F.s3.DEFAULTS&&(i.visible=this.visible),this.originIdOf("minScale")>F.s3.DEFAULTS&&(i.minScale=this.minScale),this.originIdOf("maxScale")>F.s3.DEFAULTS&&(i.maxScale=this.maxScale),this.originIdOf("opacity")>F.s3.DEFAULTS&&(i.opacity=this.opacity),this.originIdOf("popupTemplate")>F.s3.DEFAULTS&&(i.popupTemplate=(0,h.d9)(this.popupTemplate)),this.originIdOf("renderer")>F.s3.SERVICE&&(i.renderer=(0,h.d9)(this.renderer)),"data-layer"===this.source?.type&&(i.dynamicDataSource=this.source.clone()),this.originIdOf("title")>F.s3.DEFAULTS&&(i.title=this.title),"map-image"===e?.type&&e.originIdOf("customParameters")>F.s3.DEFAULTS&&(i.customParameters=e.customParameters),"tile"===e?.type&&e.originIdOf("customParameters")>F.s3.DEFAULTS&&(i.customParameters=e.customParameters),i}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t&&t.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load(),e=V.Z.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new c.Z("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:o,num:n,size:a,start:l,where:u}=e;if(!r?.operations?.supportsQueryAttachments&&(i?.length>0||o?.length>0||a?.length>0||n||l||u))throw new c.Z("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(s?.length||o?.length||u))throw new c.Z("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,t)}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new c.Z("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new c.Z("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features)for(const e of r.features)e.sourceLayer=this;return r}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,g._)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),s=Object.keys(i).some((e=>i[e]>F.s3.SERVICE));if(s){const e=t.drawingInfo={};if(i.renderer>F.s3.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>F.s3.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>F.s3.SERVICE){!this.loaded&&this.labelingInfo.some((e=>!e.labelPlacement))&&m.Z.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,A.a)(this.labelingInfo,k.M.toJSON(this.geometryType))),e.labelingInfo=t.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer}))),e.showLabels=!0}i.opacity>F.s3.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline&&e.outline.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)J(e.symbol)&&t(e.symbol);"symbol"in e&&J(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&J(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,o;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",o="supportsModification"}const n=(0,O.vw)(this).getDefaultOrigin();if("service"!==n){if(s&&!1===this.layer?.capabilities?.exportMap?.[s])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(o&&!1===this.capabilities?.exportMap[o])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${o}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==n&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.handles.removeAll()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{const t=this.layer?.capabilities?.exportMap?.supportsSublayersChanges;null==t||t||(m.Z.getLogger(this).error(new c.Z("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;m.Z.getLogger(i).error(new c.Z("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};W.test={isMapImageLayerOverridePolicy:e=>e===B||e===z,isTileImageLayerOverridePolicy:e=>e===Q},(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"capabilities",void 0),(0,s._)([(0,w.r)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],W.prototype,"readCapabilities",null),(0,s._)([(0,_.Cb)()],W.prototype,"defaultPopupTemplate",null),(0,s._)([(0,_.Cb)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:z}}})],W.prototype,"definitionExpression",null),(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"effectiveScaleRange",null),(0,s._)([(0,_.Cb)({type:[P.Z],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],W.prototype,"fields",void 0),(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"fieldsIndex",null),(0,s._)([(0,_.Cb)({type:R.Z,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:z},origins:{"web-scene":{read:!1,write:!1}}}})],W.prototype,"floorInfo",null),(0,s._)([(0,_.Cb)({type:G.Z,json:{read:{source:"layerDefinition.extent"}}})],W.prototype,"fullExtent",void 0),(0,s._)([(0,_.Cb)({type:k.M.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:k.M.read}}}}})],W.prototype,"geometryType",void 0),(0,s._)([(0,_.Cb)({type:String})],W.prototype,"globalIdField",void 0),(0,s._)([(0,w.r)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],W.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,_.Cb)({type:x.z8,json:{write:{ignoreOrigin:!0}}})],W.prototype,"id",null),(0,s._)([(0,_.Cb)({value:null,type:[T.Z],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:B}}})],W.prototype,"labelingInfo",null),(0,s._)([(0,C.c)("labelingInfo")],W.prototype,"writeLabelingInfo",null),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:B}}})],W.prototype,"labelsVisible",null),(0,s._)([(0,_.Cb)({value:null})],W.prototype,"layer",null),(0,s._)([(0,_.Cb)({type:String,json:{write:{overridePolicy:Q}}})],W.prototype,"layerItemId",void 0),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:U}}})],W.prototype,"legendEnabled",void 0),(0,s._)([(0,_.Cb)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],W.prototype,"listMode",null),(0,s._)([(0,_.Cb)({type:Number,value:0,json:{write:{overridePolicy:B}}})],W.prototype,"minScale",null),(0,s._)([(0,w.r)("minScale",["minScale","layerDefinition.minScale"])],W.prototype,"readMinScale",null),(0,s._)([(0,_.Cb)({type:Number,value:0,json:{write:{overridePolicy:B}}})],W.prototype,"maxScale",null),(0,s._)([(0,w.r)("maxScale",["maxScale","layerDefinition.maxScale"])],W.prototype,"readMaxScale",null),(0,s._)([(0,_.Cb)({type:String})],W.prototype,"objectIdField",void 0),(0,s._)([(0,w.r)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],W.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,_.Cb)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:B}}})],W.prototype,"opacity",null),(0,s._)([(0,w.r)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],W.prototype,"readOpacity",null),(0,s._)([(0,C.c)("opacity")],W.prototype,"writeOpacity",null),(0,s._)([(0,_.Cb)({json:{type:x.z8,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:B}}})],W.prototype,"parent",void 0),(0,s._)([(0,C.c)("parent")],W.prototype,"writeParent",null),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:U,writer(e,t,r){t[r]=!e}}}})],W.prototype,"popupEnabled",void 0),(0,s._)([(0,_.Cb)({type:o.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:U}}})],W.prototype,"popupTemplate",void 0),(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"queryTask",null),(0,s._)([(0,_.Cb)({types:n.A,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:B},origins:{"web-scene":{types:n.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:B}}}}})],W.prototype,"renderer",null),(0,s._)([(0,_.Cb)({types:{key:"type",base:null,typeMap:{"data-layer":j.n,"map-layer":M.R}},cast(e){if(e){if("mapLayerId"in e)return(0,x.TJ)(M.R,e);if("dataSource"in e)return(0,x.TJ)(j.n,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:B}}})],W.prototype,"source",null),(0,s._)([(0,_.Cb)()],W.prototype,"sourceJSON",void 0),(0,s._)([(0,_.Cb)({value:null,json:{type:[x.z8],write:{target:"subLayerIds",allowNull:!0,overridePolicy:B}}})],W.prototype,"sublayers",null),(0,s._)([(0,v.p)("sublayers")],W.prototype,"castSublayers",null),(0,s._)([(0,C.c)("sublayers")],W.prototype,"writeSublayers",null),(0,s._)([(0,_.Cb)({type:String,json:{name:"name",write:{overridePolicy:U}}})],W.prototype,"title",void 0),(0,s._)([(0,_.Cb)({type:String})],W.prototype,"typeIdField",void 0),(0,s._)([(0,w.r)("typeIdField",["layerDefinition.typeIdField"])],W.prototype,"readTypeIdField",null),(0,s._)([(0,_.Cb)({type:[L.Z],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],W.prototype,"types",void 0),(0,s._)([(0,_.Cb)({type:String,json:{name:"layerUrl",write:{overridePolicy:Q}}})],W.prototype,"url",null),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:B}}})],W.prototype,"visible",null),(0,s._)([(0,C.c)("visible")],W.prototype,"writeVisible",null),W=i=(0,s._)([(0,I.j)("esri.layers.support.Sublayer")],W);const X=W},90082:(e,t,r)=>{r.d(t,{V:()=>n,g:()=>o});var i=r(20102),s=r(95330);async function o(e,t,r){let o;try{o=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),o}async function n(e,t,r,o,n){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load tile ${t}/${r}/${o}`,{error:e,level:t,row:r,col:o})}return(0,s.k_)(n),a}},2981:(e,t,r)=>{r.d(t,{$6:()=>c,Ow:()=>o,S0:()=>s,d1:()=>n});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return l(function(e,t){return a(t).find((t=>u(t)===e))}(e,t))}function o(e,t){return l(function(e,t){const r=e.toLowerCase();return a(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>r.endsWith(e)))))}(e,t))}function n(e,t){return u(function(e,t){return a(t).find((t=>l(t)===e))}(e,t))}function a(e){return[...i,...e]}function l(e){return e?.[0]}function u(e){return e?.[1]}function c(e){return e.tables?.find((e=>"assetMaps"===e.role))}},32073:(e,t,r)=>{r.d(t,{FN:()=>o,QV:()=>s,ac:()=>a});var i=r(31263);function s(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!n(e,t)}function o(e,t,r){return!!e.some((e=>{const t=e.source;return!(!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r))||e.originIdOf("renderer")>i.s3.SERVICE||e.originIdOf("labelingInfo")>i.s3.SERVICE||e.originIdOf("opacity")>i.s3.SERVICE||e.originIdOf("labelsVisible")>i.s3.SERVICE}))||!n(e,t)}function n(e,t){if(!e||!e.length||null==t)return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let i=0;const s=r.length;for(const{id:t}of e){for(;i<s&&r[i]!==t;)i++;if(i>=s)return!1}return!0}function a(e){return!!e&&e.some((e=>null!=e.minScale||e.layerDefinition&&null!=e.layerDefinition.minScale))}},41818:(e,t,r)=>{r.d(t,{P:()=>n});var i=r(11282),s=r(34599),o=r(14165);async function n(e,t,r){const n=(0,i.en)(e);return(0,s.hH)(n,o.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(11282),s=r(34599),o=r(14165);async function n(e,t,r){const n=(0,i.en)(e);return(0,s.Ev)(n,o.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>l,e:()=>a});var i=r(11282),s=r(34599),o=r(74889),n=r(14165);async function a(e,t,r){const i=await l(e,t,r);return o.Z.fromJSON(i)}async function l(e,t,r){const o=(0,i.en)(e),a={...r},l=n.Z.from(t),{data:u}=await(0,s.JT)(o,l,l.sourceSpatialReference,a);return u}},53261:(e,t,r)=>{r.d(t,{t:()=>m});var i=r(11282),s=r(70586),o=r(69285),n=r(98732);function a(e,t){return t}function l(e,t,r,i){switch(r){case 0:return y(e,t+i,0);case 1:return"lowerLeft"===e.originPosition?y(e,t+i,1):function({translate:e,scale:t},r,i){return e[i]-r*t[i]}(e,t+i,1)}}function u(e,t,r,i){return 2===r?y(e,t,2):l(e,t,r,i)}function c(e,t,r,i){return 2===r?y(e,t,3):l(e,t,r,i)}function p(e,t,r,i){return 3===r?y(e,t,3):u(e,t,r,i)}function y({translate:e,scale:t},r,i){return e[i]+r*t[i]}class d{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=a,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,o.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,s.O3)(r),r.push(t);const i=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of i)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:i}=t,s=(0,n.$g)(r.clone(),r,!1,!1,this._transform),o=(0,n.di)(s,i,!1,!1);e.queryGeometryType=i,e.queryGeometry={...o}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const i=(0,s.s3)(this._transform,"transform");switch(t=this._applyTransform(i,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const i=(0,s.s3)(this._transform,"transform");return this._applyTransform(i,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const i=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(i)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const i=this._transformPathLikeValue(t,r),s=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),s.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=i}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?p:t?u:r?c:l}}var h=r(34599),f=(r(74889),r(14165));async function m(e,t,r){const s=(0,i.en)(e),o={...r},n=f.Z.from(t),a=!n.quantizationParameters,{data:l}=await(0,h.qp)(s,n,new d({sourceSpatialReference:n.sourceSpatialReference,applyTransform:a}),o);return l}},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(69285);function s(e,t,r){if(!r||!r.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>S});var i,s=r(43697),o=r(66577),n=r(38171),a=r(35454),l=r(96674),u=r(22974),c=r(5600),p=(r(75215),r(71715)),y=r(52011),d=r(30556),h=r(82971),f=r(33955),m=r(1231);const b=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=i=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=n.Z.fromJSON(s),a=s.geometry&&s.geometry.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=r);const l=s.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void b.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(e&&null!=e.geometry)return void b.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[o,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(a[0]),s=r(a[1]),o.push([i,s])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.oU)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,f.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.oU)(e)?e.rings:e.paths;let n,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],a+=s[1]):(n=s[0],a=s[1]),s[0]=t(n),s[1]=r(a)}}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,c.Cb)({type:[n.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,s._)([(0,p.r)("features")],g.prototype,"readFeatures",null),(0,s._)([(0,c.Cb)({type:[m.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,s._)([(0,c.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],g.prototype,"geometryType",void 0),(0,s._)([(0,d.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,s._)([(0,c.Cb)({types:o.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,s._)([(0,p.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,s._)([(0,c.Cb)({type:h.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,s._)([(0,d.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,s._)([(0,c.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=i=(0,s._)([(0,y.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const S=g},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>s,eG:()=>l,lF:()=>n,lj:()=>c,qP:()=>a,wW:()=>u});const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},n={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},l={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},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6256,2442],{57435:(e,t,r)=>{r.d(t,{Z:()=>u});var i=r(43697),s=r(46791),o=(r(20102),r(92604),r(26258),r(87538)),n=r(5600),a=r(52011);let l=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,o.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,n.Cb)()],l.prototype,"getCollections",void 0),(0,i._)([(0,n.Cb)()],l.prototype,"getChildrenFunction",void 0),(0,i._)([(0,n.Cb)()],l.prototype,"itemFilterFunction",void 0),l=(0,i._)([(0,a.j)("esri.core.CollectionFlattener")],l);const u=l},68668:(e,t,r)=>{r.d(t,{G:()=>n,w:()=>a});var i=r(66643),s=r(46791),o=r(83379);async function n(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):s.Z.isCollection(t)?t.forEach((e=>n(e))):o.Z.isLoadable(t)&&r.push(t))};t(n);let a=null;if(await(0,i.UI)(r,(async e=>{const t=await(0,i.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},49735:(e,t,r)=>{r.d(t,{Z:()=>I});var i=r(43697),s=r(92036),o=r(20102),n=r(80442),a=r(95330),l=r(81271),u=r(5600),c=(r(75215),r(67676),r(52011)),p=r(2981),y=r(10158),d=r(11282),h=r(41818),f=(r(66577),r(34599)),m=r(14165),b=r(6570),g=r(5396),S=r(4967),_=r(53261),v=r(74889);let w=class extends s.Z{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,l.mN)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),i=null!=e.outStatistics?.[0],s=(0,n.Z)("featurelayer-pbf-statistics"),o=!i||s;let a;if(this.pbfSupported&&o)try{a=await(0,_.t)(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&o||(a=await(0,S.F)(this.url,r,t)),this._normalizeFields(a.fields),a}async featureSetFromJSON(e,t,i){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return v.Z.fromJSON(t);const{meshFeatureSetFromJSON:s}=await(0,a.Hl)(Promise.all([r.e(6481),r.e(6459),r.e(7616)]).then(r.bind(r,91681)),i);return s(e,this.infoFor3D,t)}executeForCount(e,t){return(0,h.P)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const i=(0,d.en)(e);return(0,f.Vr)(i,m.Z.from(t),{...r}).then((e=>({count:e.data.count,extent:b.Z.fromJSON(e.data.extent)})))}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,g.G)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:i},{executeRelationshipQuery:s}]=await(0,a.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:i},{executeRelationshipQueryForCount:s}]=await(0,a.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:i,fetchAttachments:s,processAttachmentQueryResult:o}=await(0,a.Hl)(r.e(540).then(r.bind(r,30540)),t),n=(0,d.en)(this.url);return o(n,await(this.queryAttachmentsSupported?i(n,e,t):s(n,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:i}=await(0,a.Hl)(r.e(1158).then(r.bind(r,71158)),t);return i(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:i}=await(0,a.Hl)(r.e(3992).then(r.bind(r,33992)),t);return i(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:i}=await(0,a.Hl)(r.e(1790).then(r.bind(r,21790)),t);return i(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:i}=await(0,a.Hl)(r.e(4371).then(r.bind(r,14371)),t);return i(this.parsedUrl,e,t)}_normalizeQuery(e){let t=m.Z.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?y.n.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:i,queryFormats:s}=r,n=(0,p.S0)("model/gltf-binary",i)??(0,p.Ow)("glb",i),a=(0,p.S0)("model/gltf+json",i)??(0,p.Ow)("gtlf",i);for(const e of s){if(e===n){t.formatOf3DObjects=e;break}e!==a||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new o.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:i,originY:s,originZ:o,translationX:n,translationY:a,translationZ:l,scaleX:u,scaleY:c,scaleZ:p,rotationX:y,rotationY:d,rotationZ:h,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(i,s,o,n,a,l,u,c,p,y,d,h,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,i._)([(0,u.Cb)({type:y.n})],w.prototype,"dynamicDataSource",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"fieldsIndex",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"gdbVersion",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"infoFor3D",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)()],w.prototype,"pbfSupported",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"queryAttachmentsSupported",void 0),(0,i._)([(0,u.Cb)()],w.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,u.Cb)({type:String})],w.prototype,"url",void 0),w=(0,i._)([(0,c.j)("esri.tasks.QueryTask")],w);const I=w},7944:(e,t,r)=>{r.d(t,{O:()=>g});var i=r(43697),s=r(3172),o=r(30175),n=r(95330),a=r(81271),l=r(23670),u=r(5600),c=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),y=r(31263),d=r(6570),h=r(82971),f=r(66677),m=r(21506),b=r(14661);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s="tile"!==i&&!!t.supportsDynamicLayers,o=r.includes("query"),n=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),c=r.includes("data"),p="tile"!==i&&(!t.tileInfo||s),y="tile"!==i&&(!t.tileInfo||s),d="tile"!==i,h=t.cimVersion&&l.G.parse(t.cimVersion),f=h?.since(1,4)??!1,m=h?.since(2,0)??!1;return{operations:{supportsExportMap:n,supportsExportTiles:a,supportsIdentify:o,supportsQuery:c,supportsTileMap:u},exportMap:n?{supportsArcadeExpressionForLabeling:f,supportsSublayersChanges:d,supportsDynamicLayers:s,supportsSublayerVisibility:p,supportsSublayerDefinitionExpression:y,supportsCIMSymbols:m}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,b.Fj)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then((e=>e.find((e=>"Feature Service"===e.type))??null),(()=>null)));const r=await this._relatedFeatureServicePromise;return(0,n.k_)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,b.Fj)(this.portalItem)&&e.originIdOf("url")<y.s3.SERVICE){const i=await this.fetchRelatedService(t);i&&(e.url=(0,a.v_)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let o;if("data-layer"===r.type)o=(await(0,s.default)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(i&&e.originIdOf("url")>y.s3.SERVICE)try{o=(await this._fetchAllLayersAndTablesFromService(i)).get(r.mapLayerId)}catch{}else{let i=e.id;"map-layer"===r?.type&&(i=r.mapLayerId);try{o=(await this.fetchAllLayersAndTables(t)).get(i)}catch{}}return o}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,f.Qc)(e),i=(0,o.s1)(this._allLayersAndTablesMap,r?.url.path,(()=>(0,s.default)((0,a.v_)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{const t=new Map;for(const r of e.data.layers)t.set(r.id,r);return{result:t}}),(e=>({error:e}))))),l=await i;if((0,n.k_)(t),"result"in l)return l.result;throw l.error}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,c.r)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({type:d.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.Cb)(m.id)],t.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,u.Cb)(m.C_)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({type:h.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,c.r)("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,p.j)("esri.layers.mixins.ArcGISMapService")],t),t}},10343:(e,t,r)=>{r.d(t,{x:()=>g});var i=r(43697),s=r(46791),o=r(57435),n=r(20102),a=r(92604),l=r(17445),u=r(5600),c=(r(75215),r(67676),r(80442),r(1153)),p=r(52011),y=r(31263),d=r(49867),h=r(32073);const f=a.Z.getLogger("esri.layers.TileLayer"),m=s.Z.ofType(d.Z);function b(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&b(e.sublayers,t)}))}const g=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new o.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[y.s3.SERVICE]:{},[y.s3.PORTAL_ITEM]:{},[y.s3.WEB_SCENE]:{},[y.s3.WEB_MAP]:{}},this.addHandles((0,l.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),l.Z_))}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,y.M9)(t.origin);if(i<y.s3.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>y.s3.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:o}=this.createSublayersForOrigin("web-document"),n=(0,c.vw)(this);n.setDefaultOrigin(o),this._set("sublayers",new m(s)),n.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,y.M9)("web-document"===e?"web-map":e);let r=y.s3.SERVICE,i=this.sublayersSourceJSON[y.s3.SERVICE].layers,s=this.sublayersSourceJSON[y.s3.SERVICE].context,o=null;const n=[y.s3.PORTAL_ITEM,y.s3.WEB_SCENE,y.s3.WEB_MAP].filter((e=>e<=t));for(const e of n){const t=this.sublayersSourceJSON[e];(0,h.ac)(t.layers)&&(r=e,i=t.layers,s=t.context,t.visibleLayers&&(o={visibleLayers:t.visibleLayers,context:t.context}))}const a=[y.s3.PORTAL_ITEM,y.s3.WEB_SCENE,y.s3.WEB_MAP].filter((e=>e>r&&e<=t));let l=null;for(const e of a){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(l={layers:t,context:i}),r&&(o={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const s=new d.Z;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)})),r):r}(i,s),c=new Map,p=new Set;if(l)for(const e of l.layers)c.set(e.id,e);if(o?.visibleLayers)for(const e of o.visibleLayers)p.add(e);return b(u,(e=>{l&&e.read(c.get(e.id),l.context),o&&e.read({defaultVisibility:p.has(e.id)},o.context)})),{origin:(0,y.x3)(r),sublayers:new m({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",(e=>{f.error(new n.Z("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:s.Z.ofType(d.Z)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.Cb)({value:null,type:m,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),t=(0,i._)([(0,p.j)("esri.layers.mixins.SublayersOwner")],t),t}},16451:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(2368),o=r(96674),n=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),u=r(30556),c=r(72729),p=r(70082);let y=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"id",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"domains",void 0),(0,i._)([(0,a.r)("domains")],y.prototype,"readDomains",null),(0,i._)([(0,u.c)("domains")],y.prototype,"writeDomains",null),(0,i._)([(0,n.Cb)({type:[p.Z],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,i._)([(0,l.j)("esri.layers.support.FeatureType")],y);const d=y},49867:(e,t,r)=>{r.d(t,{Z:()=>X});var i,s=r(43697),o=(r(66577),r(51773)),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),a=r(3172),l=r(9790),u=r(46791),c=r(20102),p=r(3920),y=r(80442),d=r(10699),h=r(22974),f=r(83379),m=r(92604),b=r(16453),g=r(42033),S=r(81271),_=r(5600),v=r(90578),w=r(71715),I=r(52011),C=r(30556),x=r(75215),F=r(31263),O=r(1153),E=r(49735),L=r(16451),P=r(1231),D=r(99514),T=r(54306),A=r(30707),R=r(56765),Z=r(72064),j=r(10158),M=r(42843),V=r(56545),N=r(14165),q=r(32163),G=r(6570),k=r(86973);function J(e){return null!=e&&"esriSMS"===e.type}function z(e,t,r){const i=this.originIdOf(t)>=(0,F.M9)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function Q(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(r.origin&&this.originIdOf(t)>=(0,F.M9)(r.origin)||this._isOverridden(t))}}function B(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function U(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,F.M9)(r.origin))}}let H=0;const $=new Set;$.add("layer"),$.add("parent"),$.add("loaded"),$.add("loadStatus"),$.add("loadError"),$.add("loadWarnings");let W=i=class extends((0,p.p)((0,b.R)((0,d.IG)(f.Z)))){constructor(e){super(e),this.capabilities=void 0,this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.sourceJSON=null,this.title=null,this.typeIdField=null,this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new c.Z("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,a.default)(r,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service"}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{operations:{supportsQuery:r,supportsQueryAttachments:i},query:{supportsFormatPBF:s},data:{supportsAttachment:o}}=(0,Z.h)(t,this.url);return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r,supportsQueryAttachments:i},data:{supportsAttachment:o},query:{supportsFormatPBF:s}}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get fieldsIndex(){return new D.Z(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){return this._get("id")??H++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition&&t.layerDefinition.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition&&t.layerDefinition.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeOID"===e.type)return e.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const r=t.layerDefinition;return 1-.01*((null!=r?.transparency?r.transparency:r?.drawingInfo?.transparency)??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,x.vU)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{spatialReference:e}=this.layer,t="gdbVersion"in this.layer?this.layer.gdbVersion:void 0,{capabilities:r,fieldsIndex:i}=this,s=(0,y.Z)("featurelayer-pbf")&&r?.query.supportsFormatPBF,o=r?.operations?.supportsQueryAttachments??!1;return new E.Z({url:this.url,pbfSupported:s,fieldsIndex:i,gdbVersion:t,sourceSpatialReference:e,queryAttachmentsSupported:o})}set renderer(e){if(e)for(const t of e.getSymbols())if((0,l.dU)(t)){m.Z.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new M.R({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,x.se)(u.Z.ofType(i),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,S.B7)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,O.vw)(this),t=new i;return(0,O.vw)(t).store=e.clone($),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,q.eZ)(this,e)}createQuery(){return new N.Z({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const{layer:e}=this,t=e?.parsedUrl,i=new(0,(await Promise.all([r.e(8346),r.e(7215),r.e(773),r.e(9238)]).then(r.bind(r,19238))).default)({url:t?.path});return t&&this.source&&("map-layer"===this.source.type?i.layerId=this.source.mapLayerId:i.dynamicDataSource=this.source),null!=e?.refreshInterval&&(i.refreshInterval=e.refreshInterval),this.definitionExpression&&(i.definitionExpression=this.definitionExpression),this.floorInfo&&(i.floorInfo=(0,h.d9)(this.floorInfo)),this.originIdOf("labelingInfo")>F.s3.SERVICE&&(i.labelingInfo=(0,h.d9)(this.labelingInfo)),this.originIdOf("labelsVisible")>F.s3.DEFAULTS&&(i.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>F.s3.DEFAULTS&&(i.legendEnabled=this.legendEnabled),this.originIdOf("visible")>F.s3.DEFAULTS&&(i.visible=this.visible),this.originIdOf("minScale")>F.s3.DEFAULTS&&(i.minScale=this.minScale),this.originIdOf("maxScale")>F.s3.DEFAULTS&&(i.maxScale=this.maxScale),this.originIdOf("opacity")>F.s3.DEFAULTS&&(i.opacity=this.opacity),this.originIdOf("popupTemplate")>F.s3.DEFAULTS&&(i.popupTemplate=(0,h.d9)(this.popupTemplate)),this.originIdOf("renderer")>F.s3.SERVICE&&(i.renderer=(0,h.d9)(this.renderer)),"data-layer"===this.source?.type&&(i.dynamicDataSource=this.source.clone()),this.originIdOf("title")>F.s3.DEFAULTS&&(i.title=this.title),"map-image"===e?.type&&e.originIdOf("customParameters")>F.s3.DEFAULTS&&(i.customParameters=e.customParameters),"tile"===e?.type&&e.originIdOf("customParameters")>F.s3.DEFAULTS&&(i.customParameters=e.customParameters),i}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t&&t.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load(),e=V.Z.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new c.Z("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:o,num:n,size:a,start:l,where:u}=e;if(!r?.operations?.supportsQueryAttachments&&(i?.length>0||o?.length>0||a?.length>0||n||l||u))throw new c.Z("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(s?.length||o?.length||u))throw new c.Z("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,t)}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new c.Z("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new c.Z("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features)for(const e of r.features)e.sourceLayer=this;return r}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,g._)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),s=Object.keys(i).some((e=>i[e]>F.s3.SERVICE));if(s){const e=t.drawingInfo={};if(i.renderer>F.s3.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>F.s3.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>F.s3.SERVICE){!this.loaded&&this.labelingInfo.some((e=>!e.labelPlacement))&&m.Z.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,A.a)(this.labelingInfo,k.M.toJSON(this.geometryType))),e.labelingInfo=t.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer}))),e.showLabels=!0}i.opacity>F.s3.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline&&e.outline.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)J(e.symbol)&&t(e.symbol);"symbol"in e&&J(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&J(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,o;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",o="supportsModification"}const n=(0,O.vw)(this).getDefaultOrigin();if("service"!==n){if(s&&!1===this.layer?.capabilities?.exportMap?.[s])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(o&&!1===this.capabilities?.exportMap[o])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${o}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==n&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.handles.removeAll()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{const t=this.layer?.capabilities?.exportMap?.supportsSublayersChanges;null==t||t||(m.Z.getLogger(this).error(new c.Z("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;m.Z.getLogger(i).error(new c.Z("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};W.test={isMapImageLayerOverridePolicy:e=>e===B||e===z,isTileImageLayerOverridePolicy:e=>e===Q},(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"capabilities",void 0),(0,s._)([(0,w.r)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],W.prototype,"readCapabilities",null),(0,s._)([(0,_.Cb)()],W.prototype,"defaultPopupTemplate",null),(0,s._)([(0,_.Cb)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:z}}})],W.prototype,"definitionExpression",null),(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"effectiveScaleRange",null),(0,s._)([(0,_.Cb)({type:[P.Z],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],W.prototype,"fields",void 0),(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"fieldsIndex",null),(0,s._)([(0,_.Cb)({type:R.Z,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:z},origins:{"web-scene":{read:!1,write:!1}}}})],W.prototype,"floorInfo",null),(0,s._)([(0,_.Cb)({type:G.Z,json:{read:{source:"layerDefinition.extent"}}})],W.prototype,"fullExtent",void 0),(0,s._)([(0,_.Cb)({type:k.M.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:k.M.read}}}}})],W.prototype,"geometryType",void 0),(0,s._)([(0,_.Cb)({type:String})],W.prototype,"globalIdField",void 0),(0,s._)([(0,w.r)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],W.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,_.Cb)({type:x.z8,json:{write:{ignoreOrigin:!0}}})],W.prototype,"id",null),(0,s._)([(0,_.Cb)({value:null,type:[T.Z],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:B}}})],W.prototype,"labelingInfo",null),(0,s._)([(0,C.c)("labelingInfo")],W.prototype,"writeLabelingInfo",null),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:B}}})],W.prototype,"labelsVisible",null),(0,s._)([(0,_.Cb)({value:null})],W.prototype,"layer",null),(0,s._)([(0,_.Cb)({type:String,json:{write:{overridePolicy:Q}}})],W.prototype,"layerItemId",void 0),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:U}}})],W.prototype,"legendEnabled",void 0),(0,s._)([(0,_.Cb)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],W.prototype,"listMode",null),(0,s._)([(0,_.Cb)({type:Number,value:0,json:{write:{overridePolicy:B}}})],W.prototype,"minScale",null),(0,s._)([(0,w.r)("minScale",["minScale","layerDefinition.minScale"])],W.prototype,"readMinScale",null),(0,s._)([(0,_.Cb)({type:Number,value:0,json:{write:{overridePolicy:B}}})],W.prototype,"maxScale",null),(0,s._)([(0,w.r)("maxScale",["maxScale","layerDefinition.maxScale"])],W.prototype,"readMaxScale",null),(0,s._)([(0,_.Cb)({type:String})],W.prototype,"objectIdField",void 0),(0,s._)([(0,w.r)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],W.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,_.Cb)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:B}}})],W.prototype,"opacity",null),(0,s._)([(0,w.r)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],W.prototype,"readOpacity",null),(0,s._)([(0,C.c)("opacity")],W.prototype,"writeOpacity",null),(0,s._)([(0,_.Cb)({json:{type:x.z8,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:B}}})],W.prototype,"parent",void 0),(0,s._)([(0,C.c)("parent")],W.prototype,"writeParent",null),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:U,writer(e,t,r){t[r]=!e}}}})],W.prototype,"popupEnabled",void 0),(0,s._)([(0,_.Cb)({type:o.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:U}}})],W.prototype,"popupTemplate",void 0),(0,s._)([(0,_.Cb)({readOnly:!0})],W.prototype,"queryTask",null),(0,s._)([(0,_.Cb)({types:n.A,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:B},origins:{"web-scene":{types:n.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:B}}}}})],W.prototype,"renderer",null),(0,s._)([(0,_.Cb)({types:{key:"type",base:null,typeMap:{"data-layer":j.n,"map-layer":M.R}},cast(e){if(e){if("mapLayerId"in e)return(0,x.TJ)(M.R,e);if("dataSource"in e)return(0,x.TJ)(j.n,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:B}}})],W.prototype,"source",null),(0,s._)([(0,_.Cb)()],W.prototype,"sourceJSON",void 0),(0,s._)([(0,_.Cb)({value:null,json:{type:[x.z8],write:{target:"subLayerIds",allowNull:!0,overridePolicy:B}}})],W.prototype,"sublayers",null),(0,s._)([(0,v.p)("sublayers")],W.prototype,"castSublayers",null),(0,s._)([(0,C.c)("sublayers")],W.prototype,"writeSublayers",null),(0,s._)([(0,_.Cb)({type:String,json:{name:"name",write:{overridePolicy:U}}})],W.prototype,"title",void 0),(0,s._)([(0,_.Cb)({type:String})],W.prototype,"typeIdField",void 0),(0,s._)([(0,w.r)("typeIdField",["layerDefinition.typeIdField"])],W.prototype,"readTypeIdField",null),(0,s._)([(0,_.Cb)({type:[L.Z],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],W.prototype,"types",void 0),(0,s._)([(0,_.Cb)({type:String,json:{name:"layerUrl",write:{overridePolicy:Q}}})],W.prototype,"url",null),(0,s._)([(0,_.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:B}}})],W.prototype,"visible",null),(0,s._)([(0,C.c)("visible")],W.prototype,"writeVisible",null),W=i=(0,s._)([(0,I.j)("esri.layers.support.Sublayer")],W);const X=W},90082:(e,t,r)=>{r.d(t,{V:()=>n,g:()=>o});var i=r(20102),s=r(95330);async function o(e,t,r){let o;try{o=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),o}async function n(e,t,r,o,n){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load tile ${t}/${r}/${o}`,{error:e,level:t,row:r,col:o})}return(0,s.k_)(n),a}},2981:(e,t,r)=>{r.d(t,{$6:()=>c,Ow:()=>o,S0:()=>s,d1:()=>n});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return l(function(e,t){return a(t).find((t=>u(t)===e))}(e,t))}function o(e,t){return l(function(e,t){const r=e.toLowerCase();return a(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>r.endsWith(e)))))}(e,t))}function n(e,t){return u(function(e,t){return a(t).find((t=>l(t)===e))}(e,t))}function a(e){return[...i,...e]}function l(e){return e?.[0]}function u(e){return e?.[1]}function c(e){return e.tables?.find((e=>"assetMaps"===e.role))}},32073:(e,t,r)=>{r.d(t,{FN:()=>o,QV:()=>s,ac:()=>a});var i=r(31263);function s(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!n(e,t)}function o(e,t,r){return!!e.some((e=>{const t=e.source;return!(!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r))||e.originIdOf("renderer")>i.s3.SERVICE||e.originIdOf("labelingInfo")>i.s3.SERVICE||e.originIdOf("opacity")>i.s3.SERVICE||e.originIdOf("labelsVisible")>i.s3.SERVICE}))||!n(e,t)}function n(e,t){if(!e||!e.length||null==t)return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let i=0;const s=r.length;for(const{id:t}of e){for(;i<s&&r[i]!==t;)i++;if(i>=s)return!1}return!0}function a(e){return!!e&&e.some((e=>null!=e.minScale||e.layerDefinition&&null!=e.layerDefinition.minScale))}},41818:(e,t,r)=>{r.d(t,{P:()=>n});var i=r(11282),s=r(34599),o=r(14165);async function n(e,t,r){const n=(0,i.en)(e);return(0,s.hH)(n,o.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(11282),s=r(34599),o=r(14165);async function n(e,t,r){const n=(0,i.en)(e);return(0,s.Ev)(n,o.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>l,e:()=>a});var i=r(11282),s=r(34599),o=r(74889),n=r(14165);async function a(e,t,r){const i=await l(e,t,r);return o.Z.fromJSON(i)}async function l(e,t,r){const o=(0,i.en)(e),a={...r},l=n.Z.from(t),{data:u}=await(0,s.JT)(o,l,l.sourceSpatialReference,a);return u}},53261:(e,t,r)=>{r.d(t,{t:()=>m});var i=r(11282),s=r(70586),o=r(69285),n=r(98732);function a(e,t){return t}function l(e,t,r,i){switch(r){case 0:return y(e,t+i,0);case 1:return"lowerLeft"===e.originPosition?y(e,t+i,1):function({translate:e,scale:t},r,i){return e[i]-r*t[i]}(e,t+i,1)}}function u(e,t,r,i){return 2===r?y(e,t,2):l(e,t,r,i)}function c(e,t,r,i){return 2===r?y(e,t,3):l(e,t,r,i)}function p(e,t,r,i){return 3===r?y(e,t,3):u(e,t,r,i)}function y({translate:e,scale:t},r,i){return e[i]+r*t[i]}class d{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=a,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,o.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,s.O3)(r),r.push(t);const i=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of i)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:i}=t,s=(0,n.$g)(r.clone(),r,!1,!1,this._transform),o=(0,n.di)(s,i,!1,!1);e.queryGeometryType=i,e.queryGeometry={...o}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const i=(0,s.s3)(this._transform,"transform");switch(t=this._applyTransform(i,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const i=(0,s.s3)(this._transform,"transform");return this._applyTransform(i,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const i=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(i)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const i=this._transformPathLikeValue(t,r),s=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),s.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=i}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?p:t?u:r?c:l}}var h=r(34599),f=(r(74889),r(14165));async function m(e,t,r){const s=(0,i.en)(e),o={...r},n=f.Z.from(t),a=!n.quantizationParameters,{data:l}=await(0,h.qp)(s,n,new d({sourceSpatialReference:n.sourceSpatialReference,applyTransform:a}),o);return l}},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(69285);function s(e,t,r){if(!r||!r.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>S});var i,s=r(43697),o=r(66577),n=r(38171),a=r(35454),l=r(96674),u=r(22974),c=r(5600),p=(r(75215),r(71715)),y=r(52011),d=r(30556),h=r(82971),f=r(33955),m=r(1231);const b=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=i=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=n.Z.fromJSON(s),a=s.geometry&&s.geometry.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=r);const l=s.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void b.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(e&&null!=e.geometry)return void b.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[o,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(a[0]),s=r(a[1]),o.push([i,s])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.oU)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,f.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.oU)(e)?e.rings:e.paths;let n,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],a+=s[1]):(n=s[0],a=s[1]),s[0]=t(n),s[1]=r(a)}}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,c.Cb)({type:[n.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,s._)([(0,p.r)("features")],g.prototype,"readFeatures",null),(0,s._)([(0,c.Cb)({type:[m.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,s._)([(0,c.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],g.prototype,"geometryType",void 0),(0,s._)([(0,d.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,s._)([(0,c.Cb)({types:o.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,s._)([(0,p.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,s._)([(0,c.Cb)({type:h.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,s._)([(0,d.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,s._)([(0,c.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=i=(0,s._)([(0,y.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const S=g},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>s,eG:()=>l,lF:()=>n,lj:()=>c,qP:()=>a,wW:()=>u});const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},n={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},l={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},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3215],{6570:(t,n,e)=>{e.d(n,{Z:()=>g});var i,r=e(43697),s=e(19153),a=e(5600),h=(e(75215),e(67676),e(80442),e(52011)),o=e(9361),l=e(94139),m=e(82971),u=e(54102),c=e(87416),x=e(8744),f=e(40488);function p(t,n,e){return null==n?e:null==e?n:t(n,e)}let y=i=class extends o.Z{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,n,e,i,r){return function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?m.Z.WGS84:t.spatialReference,t):{xmin:t,ymin:n,xmax:e,ymax:i,spatialReference:r??m.Z.WGS84}}static fromBounds(t,n){return new i({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:n})}static fromPoint(t){return new i({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new l.Z({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const n=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-n.x,t.y-n.y,t.z-n.z):this.offset(t.x-n.x,t.y-n.y)}clone(){const t=new i;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const n=this.spatialReference,e=t.spatialReference;return n&&e&&!n.equals(e)&&(0,f.Q8)(n,e)&&(t=n.isWebMercator?(0,f.$)(t):(0,f.Sx)(t,!0)),"point"===t.type?(0,u.aV)(this,t):"extent"===t.type&&(0,u.uP)(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const n=this.spatialReference,e=t.spatialReference;return n&&e&&!n.equals(e)&&(0,f.Q8)(n,e)&&(t=n.isWebMercator?(0,f.$)(t):(0,f.Sx)(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const n=.5*(1-t),e=this.width*n,i=this.height*n;if(this.xmin+=e,this.ymin+=i,this.xmax-=e,this.ymax-=i,this.hasZ){const t=(this.zmax-this.zmin)*n;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*n;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const n=this.spatialReference,e=t.spatialReference;return n&&e&&!(0,x.fS)(n,e)&&(0,f.Q8)(n,e)&&(t=n.isWebMercator?(0,f.$)(t):(0,f.Sx)(t,!0)),(0,c.IY)(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,n,e){return this.xmin+=t,this.ymin+=n,this.xmax+=t,this.ymax+=n,null!=e&&(this.zmin+=e,this.zmax+=e),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=p(Math.min,this.zmin,t.zmin),this.zmax=p(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=p(Math.min,this.mmin,t.mmin),this.mmax=p(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=p(Math.max,this.zmin,t.zmin),this.zmax=p(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=p(Math.max,this.mmin,t.mmin),this.mmax=p(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=(0,x.C5)(this.spatialReference)){if(!t||!this.spatialReference)return this;const n=this.spatialReference,e=this._getCM(t);if(e){const i=n.isWebMercator?(0,f.Sx)(e):e;this.xmin-=e.x,this.xmax-=e.x,n.isWebMercator||(i.x=this._normalizeX(i.x,t).x),this.spatialReference=new m.Z((0,s.gx)((n.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:i.x}))}return this}_getCM(t){let n=null;const[e,i]=t.valid,r=this.xmin,s=this.xmax;return r>=e&&r<=i&&s>=e&&s<=i||(n=this.center),n}_normalize(t,n,e){const i=this.spatialReference;if(!i)return this;const r=e??(0,x.C5)(i);if(null==r)return this;const s=this._getParts(r).map((t=>t.extent));if(s.length<2)return s[0]||this;if(s.length>2)return t?this._shiftCM(r):this.set({xmin:r.valid[0],xmax:r.valid[1]});if(t)return this._shiftCM(r);if(n)return s;let a=!0,h=!0;return s.forEach((t=>{t.hasZ||(a=!1),t.hasM||(h=!1)})),{rings:s.map((t=>{const n=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(a){const e=(t.zmax-t.zmin)/2;for(let t=0;t<n.length;t++)n[t].push(e)}if(h){const e=(t.mmax-t.mmin)/2;for(let t=0;t<n.length;t++)n[t].push(e)}return n})),hasZ:a,hasM:h,spatialReference:i}}_getParts(t){let n=this.cache._parts;if(!n){n=[];const{ymin:e,ymax:r,spatialReference:s}=this,a=this.width,h=this.xmin,o=this.xmax;let l;t=t||(0,x.C5)(s);const[m,u]=t.valid;l=this._normalizeX(this.xmin,t);const c=l.x,f=l.frameId;l=this._normalizeX(this.xmax,t);const p=l.x,y=l.frameId,g=c===p&&a>0;if(a>2*u){const t=new i(h<o?c:p,e,u,r,s),a=new i(m,e,h<o?p:c,r,s),l=new i(0,e,u,r,s),x=new i(m,e,0,r,s),g=[],d=[];t.contains(l)&&g.push(f),t.contains(x)&&d.push(f),a.contains(l)&&g.push(y),a.contains(x)&&d.push(y);for(let t=f+1;t<y;t++)g.push(t),d.push(t);n.push({extent:t,frameIds:[f]},{extent:a,frameIds:[y]},{extent:l,frameIds:g},{extent:x,frameIds:d})}else c>p||g?n.push({extent:new i(c,e,u,r,s),frameIds:[f]},{extent:new i(m,e,p,r,s),frameIds:[y]}):n.push({extent:new i(c,e,p,r,s),frameIds:[f]});this.cache._parts=n}const e=this.hasZ,r=this.hasM;if(e||r){const t={};e&&(t.zmin=this.zmin,t.zmax=this.zmax),r&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let e=0;e<n.length;e++)n[e].extent.set(t)}return n}_normalizeX(t,n){const[e,i]=n.valid,r=2*i;let s,a=0;return t>i?(s=Math.ceil(Math.abs(t-i)/r),t-=s*r,a=s):t<e&&(s=Math.ceil(Math.abs(t-e)/r),t+=s*r,a=-s),{x:t,frameId:a}}};(0,r._)([(0,a.Cb)({readOnly:!0})],y.prototype,"cache",null),(0,r._)([(0,a.Cb)({readOnly:!0})],y.prototype,"center",null),(0,r._)([(0,a.Cb)({readOnly:!0})],y.prototype,"extent",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],y.prototype,"hasM",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],y.prototype,"hasZ",null),(0,r._)([(0,a.Cb)({readOnly:!0})],y.prototype,"height",null),(0,r._)([(0,a.Cb)({readOnly:!0})],y.prototype,"width",null),(0,r._)([(0,a.Cb)({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],y.prototype,"xmin",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"ymin",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasM}}}}})],y.prototype,"mmin",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],y.prototype,"zmin",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"xmax",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"ymax",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasM}}}}})],y.prototype,"mmax",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],y.prototype,"zmax",void 0),y=i=(0,r._)([(0,h.j)("esri.geometry.Extent")],y),y.prototype.toJSON.isDefaultToJSON=!0;const g=y},65091:(t,n,e)=>{e.d(n,{Z:()=>p});var i,r=e(43697),s=e(22974),a=e(5600),h=(e(75215),e(52011)),o=e(30556),l=e(6570),m=e(9361),u=e(94139),c=e(16238);function x(t){return(n,e)=>null==n?e:null==e?n:t(n,e)}let f=i=class extends m.Z{constructor(...t){super(...t),this.points=[],this.type="multipoint"}normalizeCtorArgs(t,n){if(!t&&!n)return{};const e={};Array.isArray(t)?(e.points=t,e.spatialReference=n):function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?e.spatialReference=t:(t.points&&(e.points=t.points),t.spatialReference&&(e.spatialReference=t.spatialReference),t.hasZ&&(e.hasZ=t.hasZ),t.hasM&&(e.hasM=t.hasM));const i=e.points&&e.points[0];return i&&(void 0===e.hasZ&&void 0===e.hasM?(e.hasZ=i.length>2,e.hasM=!1):void 0===e.hasZ?e.hasZ=i.length>3:void 0===e.hasM&&(e.hasM=i.length>3)),e}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const t=this.points;if(!t.length)return null;const n=new l.Z,e=this.hasZ,i=this.hasM,r=e?3:2,s=t[0],a=x(Math.min),h=x(Math.max);let o,m,u,c,[f,p]=s,[y,g]=s;for(let n=0,s=t.length;n<s;n++){const s=t[n],[l,x]=s;if(f=a(f,l),p=a(p,x),y=h(y,l),g=h(g,x),e&&s.length>2){const t=s[2];o=a(o,t),u=h(u,t)}if(i&&s.length>r){const t=s[r];m=a(m,t),c=h(c,t)}}return n.xmin=f,n.ymin=p,n.xmax=y,n.ymax=g,n.spatialReference=this.spatialReference,e?(n.zmin=o,n.zmax=u):(n.zmin=void 0,n.zmax=void 0),i?(n.mmin=m,n.mmax=c):(n.mmin=void 0,n.mmax=void 0),n}writePoints(t,n){n.points=(0,s.d9)(this.points)}addPoint(t){return(0,c.l)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}clone(){const t={points:(0,s.d9)(this.points),spatialReference:this.spatialReference};return this.hasZ&&(t.hasZ=!0),this.hasM&&(t.hasM=!0),new i(t)}getPoint(t){if(!this._validateInputs(t))return null;const n=this.points[t],e={x:n[0],y:n[1],spatialReference:this.spatialReference};let i=2;return this.hasZ&&(e.z=n[2],i=3),this.hasM&&(e.m=n[i]),new u.Z(e)}removePoint(t){if(!this._validateInputs(t))return null;const n=new u.Z(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),n}setPoint(t,n){return this._validateInputs(t)?((0,c.l)(this,n),Array.isArray(n)||(n=n.toArray()),this.points[t]=n,this.notifyChange("points"),this):this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,r._)([(0,a.Cb)({readOnly:!0})],f.prototype,"cache",null),(0,r._)([(0,a.Cb)()],f.prototype,"extent",null),(0,r._)([(0,a.Cb)({type:[[Number]],json:{write:{isRequired:!0}}})],f.prototype,"points",void 0),(0,r._)([(0,o.c)("points")],f.prototype,"writePoints",null),f=i=(0,r._)([(0,h.j)("esri.geometry.Multipoint")],f),f.prototype.toJSON.isDefaultToJSON=!0;const p=f},38913:(t,n,e)=>{e.d(n,{Z:()=>P});var i,r=e(43697),s=e(67676),a=e(22974),h=e(5600),o=(e(75215),e(52011)),l=e(30556),m=e(6570),u=e(9361),c=e(94139),x=e(82971),f=e(35308),p=e(54102),y=e(86662),g=e(49600),d=e(87416),M=e(40488),z=e(16238);function Z(t){return!Array.isArray(t[0])}let v=i=class extends u.Z{static fromExtent(t){const n=t.clone().normalize(),e=t.spatialReference;let r=!1,s=!1;for(const t of n)t.hasZ&&(r=!0),t.hasM&&(s=!0);const a={rings:n.map((t=>{const n=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(r&&t.hasZ){const e=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<n.length;t++)n[t].push(e)}if(s&&t.hasM){const e=t.mmin+.5*(t.mmax-t.mmin);for(let t=0;t<n.length;t++)n[t].push(e)}return n})),spatialReference:e};return r&&(a.hasZ=!0),s&&(a.hasM=!0),new i(a)}constructor(...t){super(...t),this.rings=[],this.type="polygon"}normalizeCtorArgs(t,n){let e,i,r=null,s=null;return t&&!Array.isArray(t)?(r=t.rings??null,n||(t.spatialReference?n=t.spatialReference:t.rings||(n=t)),e=t.hasZ,i=t.hasM):r=t,r=r||[],n=n||x.Z.WGS84,r.length&&r[0]&&null!=r[0][0]&&"number"==typeof r[0][0]&&(r=[r]),s=r[0]&&r[0][0],s&&(void 0===e&&void 0===i?(e=s.length>2,i=s.length>3):void 0===e?e=i?s.length>3:s.length>2:void 0===i&&(i=e?s.length>3:s.length>2)),{rings:r,spatialReference:n,hasZ:e,hasM:i}}get cache(){return this.commitProperty("rings"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get centroid(){const t=(0,f.tO)(this);if(!t||isNaN(t[0])||isNaN(t[1])||this.hasZ&&isNaN(t[2]))return null;const n=new c.Z;return n.x=t[0],n.y=t[1],n.spatialReference=this.spatialReference,this.hasZ&&(n.z=t[2]),n}get extent(){const{spatialReference:t}=this,n=(0,g._w)(this);if(!n)return null;const e=new m.Z(n);return e.spatialReference=t,e}get isSelfIntersecting(){return(0,d.Ff)(this.rings)}writeRings(t,n){n.rings=(0,a.d9)(this.rings)}addRing(t){if(!t)return;const n=this.rings,e=n.length;if(Z(t)){const i=[];for(let n=0,e=t.length;n<e;n++)i[n]=t[n].toArray();n[e]=i}else n[e]=t.concat();return this.notifyChange("rings"),this}clone(){const t=new i;return t.spatialReference=this.spatialReference,t.rings=(0,a.d9)(this.rings),t.hasZ=this.hasZ,t.hasM=this.hasM,t}equals(t){if(this===t)return!0;if(null==t)return!1;const n=this.spatialReference,e=t.spatialReference;if(null!=n!=(null!=e))return!1;if(null!=n&&null!=e&&!n.equals(e))return!1;if(this.rings.length!==t.rings.length)return!1;const i=([t,n,e,i],[r,s,a,h])=>t===r&&n===s&&(null==e&&null==a||e===a)&&(null==i&&null==h||i===h);for(let n=0;n<this.rings.length;n++){const e=this.rings[n],r=t.rings[n];if(!(0,s.fS)(e,r,i))return!1}return!0}contains(t){if(!t)return!1;const n=(0,M.iV)(t,this.spatialReference);return(0,p.CI)(this,null!=n?n:t)}isClockwise(t){let n;return n=Z(t)?t.map((t=>this.hasZ?this.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])):t,(0,y.bu)(n,this.hasM,this.hasZ)}getPoint(t,n){if(!this._validateInputs(t,n))return null;const e=this.rings[t][n],i=this.hasZ,r=this.hasM;return i&&!r?new c.Z(e[0],e[1],e[2],void 0,this.spatialReference):r&&!i?new c.Z(e[0],e[1],void 0,e[2],this.spatialReference):i&&r?new c.Z(e[0],e[1],e[2],e[3],this.spatialReference):new c.Z(e[0],e[1],this.spatialReference)}insertPoint(t,n,e){return this._validateInputs(t,n,!0)?((0,z.l)(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t].splice(n,0,e),this.notifyChange("rings"),this):this}removePoint(t,n){if(!this._validateInputs(t,n))return null;const e=new c.Z(this.rings[t].splice(n,1)[0],this.spatialReference);return this.notifyChange("rings"),e}removeRing(t){if(!this._validateInputs(t,null))return null;const n=this.rings.splice(t,1)[0],e=this.spatialReference,i=n.map((t=>new c.Z(t,e)));return this.notifyChange("rings"),i}setPoint(t,n,e){return this._validateInputs(t,n)?((0,z.l)(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t][n]=e,this.notifyChange("rings"),this):this}_validateInputs(t,n,e=!1){if(null==t||t<0||t>=this.rings.length)return!1;if(null!=n){const i=this.rings[t];if(e&&(n<0||n>i.length))return!1;if(!e&&(n<0||n>=i.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,r._)([(0,h.Cb)({readOnly:!0})],v.prototype,"cache",null),(0,r._)([(0,h.Cb)({readOnly:!0})],v.prototype,"centroid",null),(0,r._)([(0,h.Cb)({readOnly:!0})],v.prototype,"extent",null),(0,r._)([(0,h.Cb)({readOnly:!0})],v.prototype,"isSelfIntersecting",null),(0,r._)([(0,h.Cb)({type:[[[Number]]],json:{write:{isRequired:!0}}})],v.prototype,"rings",void 0),(0,r._)([(0,l.c)("rings")],v.prototype,"writeRings",null),v=i=(0,r._)([(0,o.j)("esri.geometry.Polygon")],v),v.prototype.toJSON.isDefaultToJSON=!0;const P=v},58901:(t,n,e)=>{e.d(n,{Z:()=>y});var i,r=e(43697),s=e(22974),a=e(5600),h=(e(75215),e(52011)),o=e(30556),l=e(6570),m=e(9361),u=e(94139),c=e(82971),x=e(49600),f=e(16238);let p=i=class extends m.Z{constructor(...t){super(...t),this.paths=[],this.type="polyline"}normalizeCtorArgs(t,n){let e,i,r=null,s=null;return t&&!Array.isArray(t)?(r=t.paths??null,n||(t.spatialReference?n=t.spatialReference:t.paths||(n=t)),e=t.hasZ,i=t.hasM):r=t,r=r||[],n=n||c.Z.WGS84,r.length&&r[0]&&null!=r[0][0]&&"number"==typeof r[0][0]&&(r=[r]),s=r[0]&&r[0][0],s&&(void 0===e&&void 0===i?(e=s.length>2,i=!1):void 0===e?e=!i&&s.length>3:void 0===i&&(i=!e&&s.length>3)),{paths:r,spatialReference:n,hasZ:e,hasM:i}}get cache(){return this.commitProperty("paths"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const{spatialReference:t}=this,n=(0,x.Wn)(this);if(!n)return null;const e=new l.Z(n);return e.spatialReference=t,e}writePaths(t,n){n.paths=(0,s.d9)(this.paths)}addPath(t){if(!t)return;const n=this.paths,e=n.length;if(function(t){return!Array.isArray(t[0])}(t)){const i=[];for(let n=0,e=t.length;n<e;n++)i[n]=t[n].toArray();n[e]=i}else n[e]=t.concat();return this.notifyChange("paths"),this}clone(){const t=new i;return t.spatialReference=this.spatialReference,t.paths=(0,s.d9)(this.paths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,n){if(!this._validateInputs(t,n))return null;const e=this.paths[t][n],i=this.hasZ,r=this.hasM;return i&&!r?new u.Z(e[0],e[1],e[2],void 0,this.spatialReference):r&&!i?new u.Z(e[0],e[1],void 0,e[2],this.spatialReference):i&&r?new u.Z(e[0],e[1],e[2],e[3],this.spatialReference):new u.Z(e[0],e[1],this.spatialReference)}insertPoint(t,n,e){return this._validateInputs(t,n,!0)?((0,f.l)(this,e),Array.isArray(e)||(e=e.toArray()),this.paths[t].splice(n,0,e),this.notifyChange("paths"),this):this}removePath(t){if(!this._validateInputs(t,null))return null;const n=this.paths.splice(t,1)[0],e=this.spatialReference,i=n.map((t=>new u.Z(t,e)));return this.notifyChange("paths"),i}removePoint(t,n){if(!this._validateInputs(t,n))return null;const e=new u.Z(this.paths[t].splice(n,1)[0],this.spatialReference);return this.notifyChange("paths"),e}setPoint(t,n,e){return this._validateInputs(t,n)?((0,f.l)(this,e),Array.isArray(e)||(e=e.toArray()),this.paths[t][n]=e,this.notifyChange("paths"),this):this}_validateInputs(t,n,e=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=n){const i=this.paths[t];if(e&&(n<0||n>i.length))return!1;if(!e&&(n<0||n>=i.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,r._)([(0,a.Cb)({readOnly:!0})],p.prototype,"cache",null),(0,r._)([(0,a.Cb)({readOnly:!0})],p.prototype,"extent",null),(0,r._)([(0,a.Cb)({type:[[[Number]]],json:{write:{isRequired:!0}}})],p.prototype,"paths",void 0),(0,r._)([(0,o.c)("paths")],p.prototype,"writePaths",null),p=i=(0,r._)([(0,h.j)("esri.geometry.Polyline")],p),p.prototype.toJSON.isDefaultToJSON=!0;const y=p},95961:(t,n,e)=>{function i(t){const n=[];for(t.reset();t.nextPath();){const e=[];for(;t.nextPoint();)e.push([t.x,t.y]);n.push(e)}return t.reset(),n}function r(t){const n=[];for(;t.nextPoint();)n.push([t.x,t.y]);return t.seekPathStart(),n}e.d(n,{M:()=>i,l:()=>r})},24470:(t,n,e)=>{e.d(n,{Gv:()=>g,HH:()=>o,SO:()=>m,Ue:()=>r,al:()=>a,cS:()=>f,fS:()=>y,jE:()=>u,jn:()=>l,kK:()=>c,oJ:()=>h,r3:()=>x}),e(80442),e(22021);var i=e(6570);function r(t=d){return[t[0],t[1],t[2],t[3]]}function s(t,n){return t!==n&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3]),t}function a(t,n,e,i,s=r()){return s[0]=t,s[1]=n,s[2]=e,s[3]=i,s}function h(t,n=r()){return n[0]=t.xmin,n[1]=t.ymin,n[2]=t.xmax,n[3]=t.ymax,n}function o(t,n){return new i.Z({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:n})}function l(t,n,e){if(null!=n)if("length"in n)p(n)?(e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3])):2!==n.length&&3!==n.length||(e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.max(t[2],n[0]),e[3]=Math.max(t[3],n[1]));else switch(n.type){case"extent":e[0]=Math.min(t[0],n.xmin),e[1]=Math.min(t[1],n.ymin),e[2]=Math.max(t[2],n.xmax),e[3]=Math.max(t[3],n.ymax);break;case"point":e[0]=Math.min(t[0],n.x),e[1]=Math.min(t[1],n.y),e[2]=Math.max(t[2],n.x),e[3]=Math.max(t[3],n.y)}else s(e,t)}function m(t){return function(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}(t)*function(t){return t[1]>=t[3]?0:t[3]-t[1]}(t)}function u(t,n,e){return n>=t[0]&&e>=t[1]&&n<=t[2]&&e<=t[3]}function c(t,n){return Math.max(n[0],t[0])<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])<=Math.min(n[3],t[3])}function x(t,n){return n[0]>=t[0]&&n[2]<=t[2]&&n[1]>=t[1]&&n[3]<=t[3]}function f(t){return t?s(t,g):r(g)}function p(t){return null!=t&&4===t.length}function y(t,n){return p(t)&&p(n)?t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]:t===n}const g=[1/0,1/0,-1/0,-1/0],d=[0,0,0,0]},20322:(t,n,e)=>{e.d(n,{$P:()=>c,C6:()=>y,Cs:()=>x,Yg:()=>p,l1:()=>f,lC:()=>d});var i=e(24470);function r(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function s(t){return void 0!==t.points}function a(t){return void 0!==t.x&&void 0!==t.y}function h(t){return void 0!==t.paths}function o(t){return void 0!==t.rings}function l(t){return function(n,e){return null==n?e:null==e?n:t(n,e)}}const m=l(Math.min),u=l(Math.max);function c(t,n){return h(n)?y(t,n.paths,!1,!1):o(n)?y(t,n.rings,!1,!1):s(n)?d(t,n.points,!1,!1,!1,!1):r(n)?g(t,n):(a(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.x,t[3]=n.y),t)}function x(t){let n,e,r,s;for(t.reset(),n=r=1/0,e=s=-1/0;t.nextPath();){const i=f(t);n=Math.min(i[0],n),r=Math.min(i[1],r),e=Math.max(i[2],e),s=Math.max(i[3],s)}return(0,i.Ue)([n,r,e,s])}function f(t){let n,e,r,s;for(n=r=1/0,e=s=-1/0;t.nextPoint();)n=Math.min(t.x,n),r=Math.min(t.y,r),e=Math.max(t.x,e),s=Math.max(t.y,s);return(0,i.Ue)([n,r,e,s])}function p(t,n){return h(n)?y(t,n.paths,!0,!1):o(n)?y(t,n.rings,!0,!1):s(n)?d(t,n.points,!0,!1,!0,!1):r(n)?g(t,n,0,0,!0,!1):(a(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=n.x,t[4]=n.y,t[5]=n.z),t)}function y(t,n,e,i){const r=e?3:2;if(!n.length||!n[0].length)return null;let s,a,h,o,[l,c]=n[0][0],[x,f]=n[0][0];for(let t=0;t<n.length;t++){const p=n[t];for(let t=0;t<p.length;t++){const n=p[t],[y,g]=n;if(l=m(l,y),c=m(c,g),x=u(x,y),f=u(f,g),e&&n.length>2){const t=n[2];s=m(s,t),a=u(a,t)}if(i&&n.length>r){const t=n[r];h=m(s,t),o=u(a,t)}}}return e?i?(t[0]=l,t[1]=c,t[2]=s,t[3]=h,t[4]=x,t[5]=f,t[6]=a,t[7]=o,t.length=8,t):(t[0]=l,t[1]=c,t[2]=s,t[3]=x,t[4]=f,t[5]=a,t.length=6,t):i?(t[0]=l,t[1]=c,t[2]=h,t[3]=x,t[4]=f,t[5]=o,t.length=6,t):(t[0]=l,t[1]=c,t[2]=x,t[3]=f,t.length=4,t)}function g(t,n,e,i,r,s){const a=n.xmin,h=n.xmax,o=n.ymin,l=n.ymax;let m=n.zmin,u=n.zmax,c=n.mmin,x=n.mmax;return r?(m=m||0,u=u||0,s?(c=c||0,x=x||0,t[0]=a,t[1]=o,t[2]=m,t[3]=c,t[4]=h,t[5]=l,t[6]=u,t[7]=x,t):(t[0]=a,t[1]=o,t[2]=m,t[3]=h,t[4]=l,t[5]=u,t)):s?(c=c||0,x=x||0,t[0]=a,t[1]=o,t[2]=c,t[3]=h,t[4]=l,t[5]=x,t):(t[0]=a,t[1]=o,t[2]=h,t[3]=l,t)}function d(t,n,e,i,r,s){const a=e?3:2,h=i&&s,o=e&&r;if(!n.length||!n[0].length)return null;let l,c,x,f,[p,y]=n[0],[g,d]=n[0];for(let t=0;t<n.length;t++){const e=n[t],[i,r]=e;if(p=m(p,i),y=m(y,r),g=u(g,i),d=u(d,r),o&&e.length>2){const t=e[2];l=m(l,t),c=u(c,t)}if(h&&e.length>a){const t=e[a];x=m(l,t),f=u(c,t)}}return r?(l=l||0,c=c||0,s?(x=x||0,f=f||0,t[0]=p,t[1]=y,t[2]=l,t[3]=x,t[4]=g,t[5]=d,t[6]=c,t[7]=f,t):(t[0]=p,t[1]=y,t[2]=l,t[3]=g,t[4]=d,t[5]=c,t)):s?(x=x||0,f=f||0,t[0]=p,t[1]=y,t[2]=x,t[3]=g,t[4]=d,t[5]=f,t):(t[0]=p,t[1]=y,t[2]=g,t[3]=d,t)}},35308:(t,n,e)=>{e.d(n,{$G:()=>s,DS:()=>h,NA:()=>m,Vm:()=>o,tO:()=>a});var i=e(95961),r=e(86662);function s(t){return t?t.hasZ?[t.xmax-t.xmin/2,t.ymax-t.ymin/2,t.zmax-t.zmin/2]:[t.xmax-t.xmin/2,t.ymax-t.ymin/2]:null}function a(t){return t?function(t,n){if(!t||!t.length)return null;const e=[],i=[],s=n?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let e=0,r=t.length;e<r;e++){const r=h(t[e],n,s);r&&i.push(r)}if(i.sort(((t,e)=>{let i=t[2]-e[2];return 0===i&&n&&(i=t[4]-e[4]),i})),i.length&&(e[0]=i[0][0],e[1]=i[0][1],n&&(e[2]=i[0][3]),(e[0]<s[0]||e[0]>s[1]||e[1]<s[2]||e[1]>s[3]||n&&(e[2]<s[4]||e[2]>s[5]))&&(e.length=0)),!e.length){const i=t[0]&&t[0].length?function(t,n){const e=n?[0,0,0]:[0,0],i=n?[0,0,0]:[0,0];let s=0,a=0,h=0,o=0;for(let l=0,m=t.length;l<m-1;l++){const m=t[l],u=t[l+1];if(m&&u){e[0]=m[0],e[1]=m[1],i[0]=u[0],i[1]=u[1],n&&m.length>2&&u.length>2&&(e[2]=m[2],i[2]=u[2]);const t=(0,r.xA)(e,i);if(t){s+=t;const e=(0,r.Gi)(m,u);a+=t*e[0],h+=t*e[1],n&&e.length>2&&(o+=t*e[2])}}}return s>0?n?[a/s,h/s,o/s]:[a/s,h/s]:t.length?t[0]:null}(t[0],n):null;if(!i)return null;e[0]=i[0],e[1]=i[1],n&&i.length>2&&(e[2]=i[2])}return e}(t.rings,t.hasZ??!1):null}function h(t,n,e){let i=0,r=0,s=0,a=0,h=0;const o=t.length?t[0][0]:0,l=t.length?t[0][1]:0,m=t.length&&n?t[0][2]:0;for(let u=0;u<t.length;u++){const c=t[u],x=t[(u+1)%t.length],[f,p,y]=c,g=f-o,d=p-l,[M,z,Z]=x,v=M-o,P=z-l,R=g*P-v*d;if(a+=R,i+=(g+v)*R,r+=(d+P)*R,n&&c.length>2&&x.length>2){const t=y-m,n=Z-m,e=g*n-v*t;s+=(t+n)*e,h+=e}f<e[0]&&(e[0]=f),f>e[1]&&(e[1]=f),p<e[2]&&(e[2]=p),p>e[3]&&(e[3]=p),n&&(y<e[4]&&(e[4]=y),y>e[5]&&(e[5]=y))}if(a>0&&(a*=-1),h>0&&(h*=-1),!a)return null;a*=.5,h*=.5;const u=[i/(6*a)+o,r/(6*a)+l,a];return n&&(e[4]===e[5]||0===h?(u[3]=(e[4]+e[5])/2,u[4]=0):(u[3]=s/(6*h)+m,u[4]=h)),u}function o(t){const{hasZ:n,numPaths:e}=t;if(0===e)return null;const s=[],a=[],o=n?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(t.reset();t.nextPath();){const n=h((0,i.l)(t),t.hasZ,o);n&&a.push(n)}if(a.sort(((t,e)=>{let i=t[2]-e[2];return 0===i&&n&&(i=t[4]-e[4]),i})),a.length&&(s[0]=a[0][0],s[1]=a[0][1],n&&(s[2]=a[0][3]),(s[0]<o[0]||s[0]>o[1]||s[1]<o[2]||s[1]>o[3]||n&&(s[2]<o[4]||s[2]>o[5]))&&(s.length=0)),!s.length){t.reset(),t.nextPath();const e=t.numPoints?function(t){const{hasZ:n}=t,e=n?[0,0,0]:[0,0],i=n?[0,0,0]:[0,0];let s=0,a=0,h=0,o=0;if(t.nextPoint()){let l=t.x,m=t.y,u=t.z;for(;t.nextPoint();){const c=t.x,x=t.y,f=t.z;e[0]=l,e[1]=m,i[0]=c,i[1]=x,n&&(e[2]=u,i[2]=f);const p=(0,r.xA)(e,i);if(p){s+=p;const t=(0,r.Gi)(e,i);a+=p*t[0],h+=p*t[1],n&&t.length>2&&(o+=p*t[2])}l=c,m=x,u=f}}return s>0?n?[a/s,h/s,o/s]:[a/s,h/s]:t.numPoints?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}(t):null;if(!e)return null;s[0]=e[0],s[1]=e[1],n&&e.length>2&&(s[2]=e[2])}return s}const l=1e-6;function m(t){let n=0;for(t.reset();t.nextPath();)n+=(0,r.VK)(t);if(n<l){const n=o(t);return n?[n[0],n[1]]:null}const e=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;const i=[t.x,t.y];for(t.reset();t.nextPath();)c(e,i,t);return e[0]*=1/n,e[1]*=1/n,e[0]+=i[0],e[1]+=i[1],e}const u=1/3;function c(t,n,e){if(!t||!e||e.numPoints<3)return null;e.nextPoint();const i=e.x,s=e.y;e.nextPoint();let a,h=e.x-i,o=e.y-s,l=0,m=0;for(;e.nextPoint();)l=e.x-i,m=e.y-s,a=.5*u*(l*o-m*h),t[0]+=a*(h+l),t[1]+=a*(o+m),h=l,o=m;const c=(0,r.VK)(e),x=[i,s];return x[0]-=n[0],x[1]-=n[1],x[0]*=c,x[1]*=c,t[0]+=x[0],t[1]+=x[1],t}},54102:(t,n,e)=>{e.d(n,{CI:()=>m,OQ:()=>h,Qg:()=>o,aV:()=>r,lQ:()=>s,uP:()=>a,wP:()=>u});const i=[0,0];function r(t,n){return null!=n&&l(t,n.x,n.y,n.z)}function s(t,n){if(!n.points||n.points.length)return!1;for(const e of n.points)if(!h(t,e))return!1;return!0}function a(t,n){const{xmin:e,ymin:i,zmin:r,xmax:s,ymax:a,zmax:h}=n;return t.hasZ&&n.hasZ?l(t,e,i,r)&&l(t,e,a,r)&&l(t,s,a,r)&&l(t,s,i,r)&&l(t,e,i,h)&&l(t,e,a,h)&&l(t,s,a,h)&&l(t,s,i,h):l(t,e,i)&&l(t,e,a)&&l(t,s,a)&&l(t,s,i)}function h(t,n){return l(t,n[0],n[1])}function o(t,n){return l(t,n[0],n[1],n[2])}function l(t,n,e,i){return n>=t.xmin&&n<=t.xmax&&e>=t.ymin&&e<=t.ymax&&(null==i||!t.hasZ||i>=t.zmin&&i<=t.zmax)}function m(t,n){return i[1]=n.y,i[0]=n.x,function(t,n){return u(t.rings,n)}(t,i)}function u(t,n){if(!t)return!1;if(function(t){return!Array.isArray(t[0][0])}(t))return c(!1,t,n);let e=!1;for(let i=0,r=t.length;i<r;i++)e=c(e,t[i],n);return e}function c(t,n,e){const[i,r]=e;let s=t,a=0;for(let t=0,e=n.length;t<e;t++){a++,a===e&&(a=0);const[h,o]=n[t],[l,m]=n[a];(o<r&&m>=r||m<r&&o>=r)&&h+(r-o)/(m-o)*(l-h)<i&&(s=!s)}return s}},86662:(t,n,e)=>{e.d(n,{Gi:()=>o,Sm:()=>c,Tx:()=>s,VK:()=>x,Zy:()=>u,bu:()=>l,ko:()=>a,xA:()=>r});var i=e(67676);function r(t,n){const e=n[0]-t[0],i=n[1]-t[1];if(t.length>2&&n.length>2){const r=t[2]-n[2];return Math.sqrt(e*e+i*i+r*r)}return Math.sqrt(e*e+i*i)}function s(t,n,e,i){const[r,s]=n,[a,h]=e[i],[o,l]=e[i+1],m=o-a,u=l-h,c=m*m+u*u,x=(r-a)*m+(s-h)*u,f=Math.min(1,Math.max(0,x/c));return t[0]=a+m*f,t[1]=h+u*f,t}function a(t,n,e){let i,r,s,a,o=!1,l=1/0;for(e.reset();e.nextPath();)if(e.nextPoint())for(i=e.x,r=e.y;e.nextPoint();)s=e.x,a=e.y,r>n!=a>n&&t<(s-i)*(n-r)/(a-r)+i&&(o=!o),l=Math.min(l,h(t,n,i,r,s,a)),i=s,r=a;return 0===l?0:(o?1:-1)*Math.sqrt(l)}function h(t,n,e,i,r,s){let a=e,h=i,o=r-a,l=s-h;if(0!==o||0!==l){const e=((t-a)*o+(n-h)*l)/(o*o+l*l);e>1?(a=r,h=s):e>0&&(a+=o*e,h+=l*e)}return o=t-a,l=n-h,o*o+l*l}function o(t,n){return function(t,n,e){const i=t[0]+e*(n[0]-t[0]),r=t[1]+e*(n[1]-t[1]);return t.length>2&&n.length>2?[i,r,t[2]+e*(n[2]-t[2])]:[i,r]}(t,n,.5)}function l(t,n,e){const i=t.length;let r=0,s=0,a=0;for(let h=0;h<i;h++){const o=t[h],l=t[(h+1)%i];let m=2;r+=o[0]*l[1]-l[0]*o[1],o.length>2&&l.length>2&&e&&(s+=o[0]*l[2]-l[0]*o[2],m=3),o.length>m&&l.length>m&&n&&(a+=o[0]*l[m]-l[0]*o[m])}return r<=0&&s<=0&&a<=0}function m(t){const n=t.length;return n>2&&(0,i.fS)(t[0],t[n-1])}function u(t){if("rings"in t)for(const n of t.rings)m(n)||n.push(n[0].slice())}function c(t){if(!t||t.length<3)return 0;let n=0;const e=t.length-1;for(let i=0;i<e;i++)n+=(t[i][0]-t[i+1][0])*(t[i][1]+t[i+1][1]);return n+=(t[e][0]-t[0][0])*(t[e][1]+t[0][1]),-.5*n}function x(t){if(!t||t.numPoints<3)return 0;let n,e,i=0;if(t.seekPathStart(),!t.nextPoint())return 0;n=t.x,e=t.y;const r=n,s=e;for(;t.nextPoint();)i+=(n-t.x)*(e+t.y),n=t.x,e=t.y;return i+=(n-r)*(e+s),-.5*i}e(8744)},49600:(t,n,e)=>{e.d(n,{Wn:()=>c,_w:()=>u,aO:()=>m});var i=e(20322);const r=[];function s(t,n,e,i){return{xmin:t,ymin:n,xmax:e,ymax:i}}function a(t,n,e,i,r,s){return{xmin:t,ymin:n,zmin:e,xmax:i,ymax:r,zmax:s}}function h(t,n,e,i,r,s){return{xmin:t,ymin:n,mmin:e,xmax:i,ymax:r,mmax:s}}function o(t,n,e,i,r,s,a,h){return{xmin:t,ymin:n,zmin:e,mmin:i,xmax:r,ymax:s,zmax:a,mmax:h}}function l(t,n=!1,e=!1){return n?e?o(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]):a(t[0],t[1],t[2],t[3],t[4],t[5]):e?h(t[0],t[1],t[2],t[3],t[4],t[5]):s(t[0],t[1],t[2],t[3])}function m(t){return t?function(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}(t)?t:function(t){return void 0!==t.x&&void 0!==t.y}(t)?function(t){const{x:n,y:e,z:i,m:r}=t,l=null!=r;return null!=i?l?o(n,e,i,r,n,e,i,r):a(n,e,i,n,e,i):l?h(n,e,r,n,e,r):s(n,e,n,e)}(t):function(t){return void 0!==t.rings}(t)?u(t):function(t){return void 0!==t.paths}(t)?c(t):function(t){return void 0!==t.points}(t)?function(t){const{hasZ:n,hasM:e,points:s}=t;return l((0,i.lC)(r,s,n??!1,e??!1),n,e)}(t):null:null}function u(t){const{hasZ:n,hasM:e,rings:s}=t,a=(0,i.C6)(r,s,n??!1,e??!1);return a?l(a,n,e):null}function c(t){const{hasZ:n,hasM:e,paths:s}=t,a=(0,i.C6)(r,s,n??!1,e??!1);return a?l(a,n,e):null}},87416:(t,n,e)=>{e.d(n,{Ff:()=>y,IY:()=>M,Nl:()=>x,UT:()=>d,h_:()=>s});var i=e(54102);function r(t,n){return(0,i.aV)(t,n)}function s(t,n){const e=t.hasZ&&n.hasZ;let i,r,s;if(t.xmin<=n.xmin){if(i=n.xmin,t.xmax<i)return!1}else if(i=t.xmin,n.xmax<i)return!1;if(t.ymin<=n.ymin){if(r=n.ymin,t.ymax<r)return!1}else if(r=t.ymin,n.ymax<r)return!1;if(e&&n.hasZ)if(t.zmin<=n.zmin){if(s=n.zmin,t.zmax<s)return!1}else if(s=t.zmin,n.zmax<s)return!1;return!0}function a(t,n){const{points:e,hasZ:r}=n,s=r?i.Qg:i.OQ;for(const n of e)if(s(t,n))return!0;return!1}const h=[0,0],o=[0,0],l=[0,0],m=[0,0],u=[h,o,l,m],c=[[l,h],[h,o],[o,m],[m,l]];function x(t,n){return function(t,n){h[0]=t.xmin,h[1]=t.ymax,o[0]=t.xmax,o[1]=t.ymax,l[0]=t.xmin,l[1]=t.ymin,m[0]=t.xmax,m[1]=t.ymin;for(const t of u)if((0,i.wP)(n,t))return!0;for(const e of n){if(!e.length)continue;let n=e[0];if((0,i.OQ)(t,n))return!0;for(let r=1;r<e.length;r++){const s=e[r];if((0,i.OQ)(t,s)||g(n,s,c))return!0;n=s}}return!1}(t,n.rings)}function f(t,n){h[0]=t.xmin,h[1]=t.ymax,o[0]=t.xmax,o[1]=t.ymax,l[0]=t.xmin,l[1]=t.ymin,m[0]=t.xmax,m[1]=t.ymin;const e=n.paths;for(const n of e){if(!e.length)continue;let r=n[0];if((0,i.OQ)(t,r))return!0;for(let e=1;e<n.length;e++){const s=n[e];if((0,i.OQ)(t,s)||g(r,s,c))return!0;r=s}}return!1}const p=[0,0];function y(t){for(let n=0;n<t.length;n++){const e=t[n];for(let i=0;i<e.length-1;i++){const r=e[i],s=e[i+1];for(let e=n+1;e<t.length;e++)for(let n=0;n<t[e].length-1;n++){const i=t[e][n],a=t[e][n+1];if(d(r,s,i,a,p)&&!(p[0]===r[0]&&p[1]===r[1]||p[0]===i[0]&&p[1]===i[1]||p[0]===s[0]&&p[1]===s[1]||p[0]===a[0]&&p[1]===a[1]))return!0}}const i=e.length;if(!(i<=4))for(let t=0;t<i-3;t++){let n=i-1;0===t&&(n=i-2);const r=e[t],s=e[t+1];for(let i=t+2;i<n;i++){const t=e[i],n=e[i+1];if(d(r,s,t,n,p)&&!(p[0]===r[0]&&p[1]===r[1]||p[0]===t[0]&&p[1]===t[1]||p[0]===s[0]&&p[1]===s[1]||p[0]===n[0]&&p[1]===n[1]))return!0}}}return!1}function g(t,n,e){for(let i=0;i<e.length;i++)if(d(t,n,e[i][0],e[i][1]))return!0;return!1}function d(t,n,e,i,r){const[s,a]=t,[h,o]=n,[l,m]=e,[u,c]=i,x=u-l,f=s-l,p=h-s,y=c-m,g=a-m,d=o-a,M=y*p-x*d;if(0===M)return!1;const z=(x*g-y*f)/M,Z=(p*g-d*f)/M;return z>=0&&z<=1&&Z>=0&&Z<=1&&(r&&(r[0]=s+z*(h-s),r[1]=a+z*(o-a)),!0)}function M(t){switch(t){case"esriGeometryEnvelope":case"extent":return s;case"esriGeometryMultipoint":case"multipoint":return a;case"esriGeometryPoint":case"point":return r;case"esriGeometryPolygon":case"polygon":return x;case"esriGeometryPolyline":case"polyline":return f}}},16238:(t,n,e)=>{function i(t,n,e=!1){let{hasM:i,hasZ:r}=t;Array.isArray(n)?4!==n.length||i||r?3===n.length&&e&&!i?(r=!0,i=!1):3===n.length&&i&&r&&(i=!1,r=!1):(i=!0,r=!0):(r=!r&&n.hasZ&&(!i||n.hasM),i=!i&&n.hasM&&(!r||n.hasZ)),t.hasZ=r,t.hasM=i}e.d(n,{l:()=>i})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[661,5234],{10661:(e,s,t)=>{t.d(s,{s:()=>o});var n=t(42100);class o extends n.s{notify(){const e=this._observers;if(e&&e.length>0){const s=e.slice();for(const e of s)e.onInvalidated(),e.onCommitted()}}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4547],{83305:(e,t,n)=>{n.d(t,{e:()=>E,f:()=>P,g:()=>u,h:()=>p,i:()=>i,j:()=>N,l:()=>l,p:()=>G});var r=n(99880),o=n(80442);let _,s=null;function i(){return!!s}function l(){return _||(_=n.e(6774).then(n.bind(n,66774)).then((e=>e.p)).then((({default:e})=>e({locateFile:e=>(0,r.V)(`esri/geometry/support/${e}`)}))).then((e=>{T(e)})),_)}var u,P,E,c;!function(e){function t(e,t,n){s.ensureCache.prepare();const r=h(n),o=n===r,_=s.ensureFloat64(r),i=s._pe_geog_to_proj(s.getPointer(e),t,_);return i&&L(n,t,_,o),i}function n(e,t,n){return r(e,t,n,0)}function r(e,t,n,r){s.ensureCache.prepare();const o=h(n),_=n===o,i=s.ensureFloat64(o),l=s._pe_proj_to_geog_center(s.getPointer(e),t,i,r);return l&&L(n,t,i,_),l}e.geogToProj=t,e.projGeog=function(e,r,o,_){switch(_){case P.PE_TRANSFORM_P_TO_G:return n(e,r,o);case P.PE_TRANSFORM_G_TO_P:return t(e,r,o)}return 0},e.projToGeog=n,e.projToGeogCenter=r}(u||(u={})),(c=P||(P={})).init=function(){c.PE_BUFFER_MAX=s.PeDefs.prototype.PE_BUFFER_MAX,c.PE_NAME_MAX=s.PeDefs.prototype.PE_NAME_MAX,c.PE_MGRS_MAX=s.PeDefs.prototype.PE_MGRS_MAX,c.PE_USNG_MAX=s.PeDefs.prototype.PE_USNG_MAX,c.PE_DD_MAX=s.PeDefs.prototype.PE_DD_MAX,c.PE_DDM_MAX=s.PeDefs.prototype.PE_DDM_MAX,c.PE_DMS_MAX=s.PeDefs.prototype.PE_DMS_MAX,c.PE_UTM_MAX=s.PeDefs.prototype.PE_UTM_MAX,c.PE_PARM_MAX=s.PeDefs.prototype.PE_PARM_MAX,c.PE_TYPE_NONE=s.PeDefs.prototype.PE_TYPE_NONE,c.PE_TYPE_GEOGCS=s.PeDefs.prototype.PE_TYPE_GEOGCS,c.PE_TYPE_PROJCS=s.PeDefs.prototype.PE_TYPE_PROJCS,c.PE_TYPE_GEOGTRAN=s.PeDefs.prototype.PE_TYPE_GEOGTRAN,c.PE_TYPE_COORDSYS=s.PeDefs.prototype.PE_TYPE_COORDSYS,c.PE_TYPE_UNIT=s.PeDefs.prototype.PE_TYPE_UNIT,c.PE_TYPE_LINUNIT=s.PeDefs.prototype.PE_TYPE_LINUNIT,c.PE_STR_OPTS_NONE=s.PeDefs.prototype.PE_STR_OPTS_NONE,c.PE_STR_AUTH_NONE=s.PeDefs.prototype.PE_STR_AUTH_NONE,c.PE_STR_AUTH_TOP=s.PeDefs.prototype.PE_STR_AUTH_TOP,c.PE_STR_NAME_CANON=s.PeDefs.prototype.PE_STR_NAME_CANON,c.PE_PARM_X0=s.PeDefs.prototype.PE_PARM_X0,c.PE_PARM_ND=s.PeDefs.prototype.PE_PARM_ND,c.PE_TRANSFORM_1_TO_2=s.PeDefs.prototype.PE_TRANSFORM_1_TO_2,c.PE_TRANSFORM_2_TO_1=s.PeDefs.prototype.PE_TRANSFORM_2_TO_1,c.PE_TRANSFORM_P_TO_G=s.PeDefs.prototype.PE_TRANSFORM_P_TO_G,c.PE_TRANSFORM_G_TO_P=s.PeDefs.prototype.PE_TRANSFORM_G_TO_P,c.PE_HORIZON_RECT=s.PeDefs.prototype.PE_HORIZON_RECT,c.PE_HORIZON_POLY=s.PeDefs.prototype.PE_HORIZON_POLY,c.PE_HORIZON_LINE=s.PeDefs.prototype.PE_HORIZON_LINE,c.PE_HORIZON_DELTA=s.PeDefs.prototype.PE_HORIZON_DELTA},function(e){const t={},n={},r=e=>{if(e){const t=e.getType();switch(t){case P.PE_TYPE_GEOGCS:e=s.castObject(e,s.PeGeogcs);break;case P.PE_TYPE_PROJCS:e=s.castObject(e,s.PeProjcs);break;case P.PE_TYPE_GEOGTRAN:e=s.castObject(e,s.PeGeogtran);break;default:t&P.PE_TYPE_UNIT&&(e=s.castObject(e,s.PeUnit))}}return e};function o(e,n){let o=null,_=t[e];if(_||(_={},t[e]=_),_.hasOwnProperty(String(n)))o=_[n];else{const t=s.PeFactory.prototype.factoryByType(e,n);s.compare(t,s.NULL)||(o=t,_[n]=o)}return o=r(o),o}e.initialize=function(){s.PeFactory.prototype.initialize(null)},e.coordsys=function(e){return o(P.PE_TYPE_COORDSYS,e)},e.factoryByType=o,e.fromString=function(e,t){let o=null,_=n[e];if(_||(_={},n[e]=_),_.hasOwnProperty(t))o=_[t];else{const n=s.PeFactory.prototype.fromString(e,t);s.compare(n,s.NULL)||(o=n,_[t]=o)}return o=r(o),o},e.geogcs=function(e){return o(P.PE_TYPE_GEOGCS,e)},e.geogtran=function(e){return o(P.PE_TYPE_GEOGTRAN,e)},e.getCode=function(e){return s.PeFactory.prototype.getCode(e)},e.projcs=function(e){return o(P.PE_TYPE_PROJCS,e)},e.unit=function(e){return o(P.PE_TYPE_UNIT,e)}}(E||(E={}));let a=null;var f,S,p,A,C,R,O,N,M;function T(e){function t(e,t,n){e[t]=n(e[t])}s=e,P.init(),f.init(),C.init(),O.init(),N.init(),a=class extends s.PeGCSExtent{destroy(){s.destroy(this)}};const n=[s.PeDatum,s.PeGeogcs,s.PeGeogtran,s.PeObject,s.PeParameter,s.PePrimem,s.PeProjcs,s.PeSpheroid,s.PeUnit];for(const e of n)t(e.prototype,"getName",(e=>function(){return e.call(this,new Array(P.PE_NAME_MAX))}));for(const e of[s.PeGeogtran,s.PeProjcs])t(e.prototype,"getParameters",(e=>function(){const t=new Array(P.PE_PARM_MAX);let n=e.call(this);for(let e=0;e<t.length;e++){const r=s.getValue(n,"*");t[e]=r?s.wrapPointer(r,s.PeParameter):null,n+=Int32Array.BYTES_PER_ELEMENT}return t}));t(s.PeHorizon.prototype,"getCoord",(e=>function(){const t=this.getSize();if(!t)return null;const n=[];return L(n,t,e.call(this)),n})),t(s.PeGTlistExtendedEntry.prototype,"getEntries",(e=>{const t=s._pe_getPeGTlistExtendedGTsSize();return function(){let n=null;const r=e.call(this);if(!s.compare(r,s.NULL)){n=[r];const e=this.getSteps();if(e>1){const o=s.getPointer(r);for(let r=1;r<e;r++)n.push(s.wrapPointer(o+t*r,s.PeGTlistExtendedGTs))}}return n}}));const r=s._pe_getPeHorizonSize(),o=e=>function(){let t=this._cache;if(t||(t=new Map,this._cache=t),t.has(e))return t.get(e);let n=null;const o=e.call(this);if(!s.compare(o,s.NULL)){n=[o];const e=o.getNump();if(e>1){const t=s.getPointer(o);for(let o=1;o<e;o++)n.push(s.wrapPointer(t+r*o,s.PeHorizon))}}return t.set(e,n),n};t(s.PeProjcs.prototype,"horizonGcsGenerate",o),t(s.PeProjcs.prototype,"horizonPcsGenerate",o),s.PeObject.prototype.toString=function(e=P.PE_STR_OPTS_NONE){s.ensureCache.prepare();const t=s.getPointer(this),n=s.ensureInt8(new Array(P.PE_BUFFER_MAX));return s.UTF8ToString(s._pe_object_to_string_ext(t,e,n))}}function g(e){if(!e)return;const t=s.getClass(e);if(!t)return;const n=s.getCache(t);if(!n)return;const r=s.getPointer(e);r&&delete n[r]}function d(e,t){const n=[],r=new Array(t);for(let t=0;t<e;t++)n.push(s.ensureInt8(r));return n}function h(e){let t;return Array.isArray(e[0])?(t=[],e.forEach((e=>{t.push(e[0],e[1])}))):t=e,t}function L(e,t,n,r=!1){if(r)for(let r=0;r<2*t;r++)e[r]=s.getValue(n+r*Float64Array.BYTES_PER_ELEMENT,"double");else{const r=0===e.length;for(let o=0;o<t;o++)r&&(e[o]=new Array(2)),e[o][0]=s.getValue(n,"double"),e[o][1]=s.getValue(n+Float64Array.BYTES_PER_ELEMENT,"double"),n+=2*Float64Array.BYTES_PER_ELEMENT}}!function(e){let t;e.init=function(){e.PE_GTLIST_OPTS_COMMON=s.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,t=s._pe_getPeGTlistExtendedEntrySize()},e.getGTlist=function(e,n,r,o,_,i){let l=null;const u=new s.PeInteger(i);try{const P=s.PeGTlistExtended.prototype.getGTlist(e,n,r,o,_,u);if((i=u.val)&&(l=[P],i>1)){const e=s.getPointer(P);for(let n=1;n<i;n++)l.push(s.wrapPointer(e+t*n,s.PeGTlistExtendedEntry))}}finally{s.destroy(u)}return l}}(f||(f={})),function(e){e.destroy=function(e){if(e&&e.length){for(const t of e)g(t),t.getEntries().forEach((e=>{g(e);const t=e.getGeogtran();g(t),t.getParameters().forEach(g),[t.getGeogcs1(),t.getGeogcs2()].forEach((e=>{g(e);const t=e.getDatum();g(t),g(t.getSpheroid()),g(e.getPrimem()),g(e.getUnit())}))}));s.PeGTlistExtendedEntry.prototype.Delete(e[0])}}}(S||(S={})),function(e){e.geogToGeog=function(e,t,n,r,o){s.ensureCache.prepare();const _=h(n),i=n===_,l=s.ensureFloat64(_);let u=0;r&&(u=s.ensureFloat64(r));const P=s._pe_geog_to_geog(s.getPointer(e),t,l,u,o);return P&&L(n,t,l,i),P}}(p||(p={})),function(e){const t=(e,t,n,r,o,_)=>{let i,l;switch(s.ensureCache.prepare(),e){case"dd":i=s._pe_geog_to_dd,l=P.PE_DD_MAX;break;case"ddm":i=s._pe_geog_to_ddm,l=P.PE_DDM_MAX;break;case"dms":i=s._pe_geog_to_dms,l=P.PE_DMS_MAX}let u=0;t&&(u=s.getPointer(t));const E=h(r),c=s.ensureFloat64(E),a=d(n,l),f=i(u,n,c,o,s.ensureInt32(a));if(f)for(let e=0;e<n;e++)_[e]=s.UTF8ToString(a[e]);return f},n=(e,t,n,r,o)=>{let _;switch(s.ensureCache.prepare(),e){case"dd":_=s._pe_dd_to_geog;break;case"ddm":_=s._pe_ddm_to_geog;break;case"dms":_=s._pe_dms_to_geog}let i=0;t&&(i=s.getPointer(t));const l=r.map((e=>s.ensureString(e))),u=s.ensureInt32(l),P=s.ensureFloat64(new Array(2*n)),E=_(i,n,u,P);return E&&L(o,n,P),E};e.geogToDms=function(e,n,r,o,_){return t("dms",e,n,r,o,_)},e.dmsToGeog=function(e,t,r,o){return n("dms",e,t,r,o)},e.geogToDdm=function(e,n,r,o,_){return t("ddm",e,n,r,o,_)},e.ddmToGeog=function(e,t,r,o){return n("ddm",e,t,r,o)},e.geogToDd=function(e,n,r,o,_){return t("dd",e,n,r,o,_)},e.ddToGeog=function(e,t,r,o){return n("dd",e,t,r,o)}}(A||(A={})),function(e){e.init=function(){e.PE_MGRS_STYLE_NEW=s.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,e.PE_MGRS_STYLE_OLD=s.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,e.PE_MGRS_STYLE_AUTO=s.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,e.PE_MGRS_180_ZONE_1_PLUS=s.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,e.PE_MGRS_ADD_SPACES=s.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES},e.geogToMgrsExtended=function(e,t,n,r,o,_,i){s.ensureCache.prepare();let l=0;e&&(l=s.getPointer(e));const u=h(n),E=s.ensureFloat64(u),c=d(t,P.PE_MGRS_MAX),a=s.ensureInt32(c),f=s._pe_geog_to_mgrs_extended(l,t,E,r,o,_,a);if(f)for(let e=0;e<t;e++)i[e]=s.UTF8ToString(c[e]);return f},e.mgrsToGeogExtended=function(e,t,n,r,o){s.ensureCache.prepare();let _=0;e&&(_=s.getPointer(e));const i=n.map((e=>s.ensureString(e))),l=s.ensureInt32(i),u=s.ensureFloat64(new Array(2*t)),P=s._pe_mgrs_to_geog_extended(_,t,l,r,u);return P&&L(o,t,u),P}}(C||(C={})),function(e){e.geogToUsng=function(e,t,n,r,o,_,i){s.ensureCache.prepare();let l=0;e&&(l=s.getPointer(e));const u=h(n),E=s.ensureFloat64(u),c=d(t,P.PE_MGRS_MAX),a=s.ensureInt32(c),f=s._pe_geog_to_usng(l,t,E,r,o,_,a);if(f)for(let e=0;e<t;e++)i[e]=s.UTF8ToString(c[e]);return f},e.usngToGeog=function(e,t,n,r){s.ensureCache.prepare();let o=0;e&&(o=s.getPointer(e));const _=n.map((e=>s.ensureString(e))),i=s.ensureInt32(_),l=s.ensureFloat64(new Array(2*t)),u=s._pe_usng_to_geog(o,t,i,l);return u&&L(r,t,l),u}}(R||(R={})),function(e){e.init=function(){e.PE_UTM_OPTS_NONE=s.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,e.PE_UTM_OPTS_ADD_SPACES=s.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,e.PE_UTM_OPTS_NS=s.PeNotationUtm.prototype.PE_UTM_OPTS_NS},e.geogToUtm=function(e,t,n,r,o){s.ensureCache.prepare();let _=0;e&&(_=s.getPointer(e));const i=h(n),l=s.ensureFloat64(i),u=d(t,P.PE_UTM_MAX),E=s.ensureInt32(u),c=s._pe_geog_to_utm(_,t,l,r,E);if(c)for(let e=0;e<t;e++)o[e]=s.UTF8ToString(u[e]);return c},e.utmToGeog=function(e,t,n,r,o){s.ensureCache.prepare();let _=0;e&&(_=s.getPointer(e));const i=n.map((e=>s.ensureString(e))),l=s.ensureInt32(i),u=s.ensureFloat64(new Array(2*t)),P=s._pe_utm_to_geog(_,t,l,r,u);return P&&L(o,t,u),P}}(O||(O={})),function(e){const t=new Map;e.init=function(){e.PE_PCSINFO_OPTION_NONE=s.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,e.PE_PCSINFO_OPTION_DOMAIN=s.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,e.PE_POLE_OUTSIDE_BOUNDARY=s.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,e.PE_POLE_POINT=s.PePCSInfo.prototype.PE_POLE_POINT},e.generate=function(n,r=e.PE_PCSINFO_OPTION_DOMAIN){let o=null,_=null;return t.has(n)&&(_=t.get(n),_[r]&&(o=_[r])),o||(o=s.PePCSInfo.prototype.generate(n,r),_||(_=[],t.set(n,_)),_[r]=o),o}}(N||(N={})),function(e){e.versionString=function(){return s.PeVersion.prototype.version_string()}}(M||(M={}));const G=Object.freeze(Object.defineProperty({__proto__:null,get PeCSTransformations(){return u},get PeDefs(){return P},get PeFactory(){return E},get PeGCSExtent(){return a},get PeGTTransformations(){return p},get PeGTlistExtended(){return f},get PeGTlistExtendedEntry(){return S},get PeNotationDms(){return A},get PeNotationMgrs(){return C},get PeNotationUsng(){return R},get PeNotationUtm(){return O},get PePCSInfo(){return N},get PeVersion(){return M},_init:T,get _pe(){return s},isLoaded:i,isSupported:function(){return!!(0,o.Z)("esri-wasm")},load:l},Symbol.toStringTag,{value:"Module"}))},44547:(e,t,n)=>{n.d(t,{Up:()=>v,Bm:()=>X,initializeProjection:()=>B,kR:()=>m,zD:()=>F,iV:()=>W,projectBuffer:()=>z,oj:()=>w,dz:()=>U,JY:()=>D,KC:()=>j,Wt:()=>Y});var r=n(20102),o=n(22021),_=n(95330),s=n(67900),i=n(58971),l=n(10661),u=n(52138),P=(n(17896),n(65617)),E=n(2109),c=n(6570),a=n(65091),f=n(83305),S=n(94139),p=n(38913),A=n(58901),C=(n(24470),n(68441));Math.PI;const R=C.sv.radius,O=C.sv.eccentricitySquared,N={a1:R*O,a2:R*O*R*O,a3:R*O*O/2,a4:R*O*R*O*2.5,a5:R*O+R*O*O/2,a6:1-O};C.sv.radius,C.sv.flattening,C.Z1.radius,C.Z1.flattening,C.yr.radius,C.yr.flattening,C.yr.radius;var M=n(18571),T=n(8744),g=n(56726),d=n(69285);let h=null,L=null,G=null,y={};const I=new l.s;function m(){return!!h&&(0,f.i)()}function F(e){return null==G&&(G=Promise.all([(0,f.l)(),Promise.all([n.e(5837),n.e(5732)]).then(n.bind(n,45837)).then((e=>e.g)),n.e(819).then(n.bind(n,80819))])),G.then((([,t,{hydratedAdapter:n}])=>{(0,_.k_)(e),L=n,h=t.default,h._enableProjection(f.p),I.notify()}))}function W(e,t,n=null,r=null){return Array.isArray(e)?0===e.length?[]:w(L,e,e[0].spatialReference,t,n,r):w(L,[e],e.spatialReference,t,n,r)[0]}function w(e,t,n,r,o=null,_=null){if(null==n||null==r)return t;if(v(n,r,o))return t.map((e=>function(e,t,n){return e?"x"in e?function(e,t,n,r,o){de[0]=e.x,de[1]=e.y;const _=e.z;return de[2]=void 0!==_?_:o,z(de,t,0,de,r,0,1)?(n.x=de[0],n.y=de[1],n.spatialReference=r,void 0===_?(n.z=void 0,n.hasZ=!1):(n.z=de[2],n.hasZ=!0),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}(e,t,new S.Z,n,0):"xmin"in e?function(e,t,n,r,o){const{xmin:_,ymin:s,xmax:i,ymax:l,hasZ:u,hasM:P}=e;return Z(_,s,u?e.zmin:o,t,de,r)?(n.xmin=de[0],n.ymin=de[1],u&&(n.zmin=de[2]),Z(i,l,u?e.zmax:o,t,de,r)?(n.xmax=de[0],n.ymax=de[1],u&&(n.zmax=de[2]),P&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=r,n):null):null}(e,t,new c.Z,n,0):"rings"in e?x(e,t,new p.Z,n,0):"paths"in e?function(e,t,n,r,o){const{paths:_,hasZ:s,hasM:i}=e,l=[];return K(_,s??!1,i??!1,t,l,r,o)?(n.paths=l,n.spatialReference=r,n.hasZ=s,n.hasM=i,n):null}(e,t,new A.Z,n,0):"points"in e?function(e,t,n,r,o){const{points:_,hasZ:s,hasM:i}=e,l=[],u=_.length,P=[];for(const e of _)P.push(e[0],e[1],s?e[2]:o);if(!z(P,t,0,P,r,0,u))return null;for(let e=0;e<u;++e){const t=3*e,n=P[t],r=P[t+1];s&&i?l.push([n,r,P[t+2],_[e][3]]):s?l.push([n,r,P[t+2]]):i?l.push([n,r,_[e][2]]):l.push([n,r])}return n.points=l,n.spatialReference=r,n.hasZ=s,n.hasM=i,n}(e,t,new a.Z,n,0):null:null}(e,n,r)));if(null==o){const e=M.Z.cacheKey(n,r);void 0!==y[e]?o=y[e]:(null==(o=function(e,t,n=null){if(null==e||null==t)return null;if(null==h||null==L)throw new H;const r=h._getTransformation(L,e,t,n,n?.spatialReference);return null!==r?M.Z.fromGE(r):null}(n,r,void 0))&&(o=new M.Z),y[e]=o)}if(null==h||null==e)throw new H;return null!=_?h._project(e,t,n,r,o,_):h._project(e,t,n,r,o)}function U(e,t){const n=D([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function D(e,t){if(!m())for(const n of e)if(null!=n&&!(0,T.fS)(n.spatialReference,t)&&(0,T.JY)(n.spatialReference)&&(0,T.JY)(t)&&!v(n.spatialReference,t))return(0,i.it)(I),{pending:F(),geometries:null};return{pending:null,geometries:e.map((e=>null==e?null:(0,T.fS)(e.spatialReference,t)?e:(0,T.JY)(e.spatialReference)&&(0,T.JY)(t)?function(e,t){try{const n=W(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const r=(0,d.k)(n.type,e.spatialReference,t);return null!=r&&r(n),n}catch(e){if(!(e instanceof H))throw e;return null}}(e,t):null))}}class H extends r.Z{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}var k;function v(e,t,n){return!n&&(!!(0,T.fS)(e,t)||(0,T.JY)(e)&&(0,T.JY)(t)&&!!Se(e,t,Re))}async function B(e,t,n,r){if(m())return(0,_.Yn)(r);if(Array.isArray(e)){for(const{source:t,dest:n,geographicTransformation:o}of e)if(!v(t,n,o))return F(r)}else if(!v(e,t,n))return F(r);return(0,_.Yn)(r)}function Y(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=x(e,e.spatialReference,t,n,r)}function x(e,t,n,r,o){const{rings:_,hasZ:s,hasM:i}=e,l=[];return K(_,s??!1,i??!1,t,l,r,o)?(n.rings=l,n.spatialReference=r,n.hasZ=s,n.hasM=i,n):null}function j(e,t,n,r=0){de[0]=e.x,de[1]=e.y;const o=e.z;return de[2]=void 0!==o?o:r,z(de,e.spatialReference,0,t,n,0,1)}function Z(e,t,n,r,o,_){return Me[0]=e,Me[1]=t,Me[2]=n,z(Me,r,0,o,_,0,1)}function z(e,t,n,r,o,_,s=1){const i=Se(t,o,Re);if(null==i)return!1;if(i===V){if(e===r&&n===_)return!0;const t=n+3*s;for(let o=n,s=_;o<t;o++,s++)r[s]=e[o];return!0}const l=n+3*s;for(let t=n,o=_;t<l;t+=3,o+=3)i(e,t,r,o);return!0}function K(e,t,n,r,o,_,s=0){const i=new Array;for(const n of e)for(const e of n)i.push(e[0],e[1],t?e[2]:s);if(!z(i,r,0,i,_,0,i.length/3))return!1;let l=0;o.length=0;for(const r of e){const e=new Array;for(const o of r)t&&n?e.push([i[l++],i[l++],i[l++],o[3]]):t?e.push([i[l++],i[l++],i[l++]]):n?(e.push([i[l++],i[l++],o[2]]),l++):(e.push([i[l++],i[l++]]),l++);o.push(e)}return!0}function X(e,t,n,r){if(null==e||null==r)return!1;const o=q(e,Ae),_=q(r,Ce);if(o===_&&!b(_)&&(o!==k.UNKNOWN||(0,T.fS)(e,r)))return(0,u.f)(n,t),!0;if(b(_)){const e=fe[o][k.LON_LAT],r=fe[k.LON_LAT][_];return null!=e&&null!=r&&(e(t,0,Te,0),r(Te,0,ge,0),J(Oe*Te[0],Oe*Te[1],n),n[12]=ge[0],n[13]=ge[1],n[14]=ge[2],!0)}if((_===k.WEB_MERCATOR||_===k.PLATE_CARREE)&&(o===k.WGS84||o===k.CGCS2000&&_===k.PLATE_CARREE||o===k.SPHERICAL_ECEF||o===k.WEB_MERCATOR)){const e=fe[o][k.LON_LAT],r=fe[k.LON_LAT][_];return null!=e&&null!=r&&(e(t,0,Te,0),r(Te,0,ge,0),o===k.SPHERICAL_ECEF?function(e,t,n){J(e,t,n),(0,u.t)(n,n)}(Oe*Te[0],Oe*Te[1],n):(0,u.i)(n),n[12]=ge[0],n[13]=ge[1],n[14]=ge[2],!0)}return!1}function b(e){return e===k.SPHERICAL_ECEF||e===k.SPHERICAL_MARS_PCPF||e===k.SPHERICAL_MOON_PCPF}function J(e,t,n){const r=Math.sin(e),o=Math.cos(e),_=Math.sin(t),s=Math.cos(t),i=n;return i[0]=-r,i[4]=-_*o,i[8]=s*o,i[12]=0,i[1]=o,i[5]=-_*r,i[9]=s*r,i[13]=0,i[2]=0,i[6]=s,i[10]=_,i[14]=0,i[3]=0,i[7]=0,i[11]=0,i[15]=1,i}function q(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,s.c9)(e,1)),e.wkt===E.kU.wkt?t.spatialReferenceId=k.SPHERICAL_ECEF:(0,T.oR)(e)?t.spatialReferenceId=k.WGS84:(0,T.sS)(e)?t.spatialReferenceId=k.WEB_MERCATOR:(0,T.QM)(e)?t.spatialReferenceId=k.PLATE_CARREE:e.wkt===E.pn.wkt?t.spatialReferenceId=k.WGS84_ECEF:e.wkid===g.W.CGCS2000?t.spatialReferenceId=k.CGCS2000:e.wkt===E.JL.wkt?t.spatialReferenceId=k.SPHERICAL_MARS_PCPF:e.wkt===E.mM.wkt?t.spatialReferenceId=k.SPHERICAL_MOON_PCPF:(0,T.BZ)(e)?t.spatialReferenceId=k.GCSMARS2000:(0,T.V2)(e)?t.spatialReferenceId=k.GCSMOON2000:t.spatialReferenceId=k.UNKNOWN):k.UNKNOWN}function V(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t])}function Q(e,t,n,r){n[r++]=Ne*(e[t++]/C.sv.radius),n[r++]=Ne*(Math.PI/2-2*Math.atan(Math.exp(-e[t++]/C.sv.radius))),n[r]=e[t]}function $(e,t,n,r){!function(e,t,n,r,_){const s=.4999999*Math.PI,i=(0,o.uZ)(Oe*e[t+1],-s,s),l=Math.sin(i);n[r++]=Oe*e[t]*_.radius,n[r++]=_.halfSemiMajorAxis*Math.log((1+l)/(1-l)),n[r]=e[t+2]}(e,t,n,r,C.sv)}!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.SPHERICAL_ECEF=1]="SPHERICAL_ECEF",e[e.WGS84=2]="WGS84",e[e.WEB_MERCATOR=3]="WEB_MERCATOR",e[e.WGS84_ECEF=4]="WGS84_ECEF",e[e.CGCS2000=5]="CGCS2000",e[e.WGS84_COMPARABLE_LON_LAT=6]="WGS84_COMPARABLE_LON_LAT",e[e.SPHERICAL_MARS_PCPF=7]="SPHERICAL_MARS_PCPF",e[e.GCSMARS2000=8]="GCSMARS2000",e[e.SPHERICAL_MOON_PCPF=9]="SPHERICAL_MOON_PCPF",e[e.GCSMOON2000=10]="GCSMOON2000",e[e.LON_LAT=11]="LON_LAT",e[e.PLATE_CARREE=12]="PLATE_CARREE"}(k||(k={}));const ee=C.sv.radius*Math.PI/180,te=180/(C.sv.radius*Math.PI);function ne(e,t,n,r){n[r]=e[t]*ee,n[r+1]=e[t+1]*ee,n[r+2]=e[t+2]}function re(e,t,n,r){n[r]=e[t]*te,n[r+1]=e[t+1]*te,n[r+2]=e[t+2]}function oe(e,t,n,r,o){const _=o+e[t+2],s=Oe*e[t+1],i=Oe*e[t],l=Math.cos(s);n[r++]=Math.cos(i)*l*_,n[r++]=Math.sin(i)*l*_,n[r]=Math.sin(s)*_}function _e(e,t,n,r){oe(e,t,n,r,C.Z1.radius)}function se(e,t,n,r){oe(e,t,n,r,C.yr.radius)}function ie(e,t,n,r){oe(e,t,n,r,C.sv.radius)}function le(e,t,n,r,_){const s=e[t],i=e[t+1],l=e[t+2],u=Math.sqrt(s*s+i*i+l*l),P=(0,o.Kt)(l/(0===u?1:u)),E=Math.atan2(i,s);n[r++]=Ne*E,n[r++]=Ne*P,n[r]=u-_}function ue(e,t,n,r){le(e,t,n,r,C.Z1.radius)}function Pe(e,t,n,r){le(e,t,n,r,C.yr.radius)}function Ee(e,t,n,r){le(e,t,n,r,C.sv.radius)}function ce(e,t,n,r){!function(e,t,n,r,o){const _=Oe*e[t],s=Oe*e[t+1],i=e[t+2],l=Math.sin(s),u=Math.cos(s),P=o.radius/Math.sqrt(1-o.eccentricitySquared*l*l);n[r++]=(P+i)*u*Math.cos(_),n[r++]=(P+i)*u*Math.sin(_),n[r++]=(P*(1-o.eccentricitySquared)+i)*l}(e,t,n,r,C.sv)}function ae(e,t,n,r){const o=N,_=e[t],s=e[t+1],i=e[t+2];let l,u,P,E,c,a,f,S,p,A,R,O,M,T,g,d,h,L,G,y,I;l=Math.abs(i),u=_*_+s*s,P=Math.sqrt(u),E=u+i*i,c=Math.sqrt(E),y=Math.atan2(s,_),a=i*i/E,f=u/E,T=o.a2/c,g=o.a3-o.a4/c,f>.3?(S=l/c*(1+f*(o.a1+T+a*g)/c),G=Math.asin(S),A=S*S,p=Math.sqrt(1-A)):(p=P/c*(1-a*(o.a5-T-f*g)/c),G=Math.acos(p),A=1-p*p,S=Math.sqrt(A)),R=1-C.sv.eccentricitySquared*A,O=C.sv.radius/Math.sqrt(R),M=o.a6*O,T=P-O*p,g=l-M*S,h=p*T+S*g,d=p*g-S*T,L=d/(M/R+h),G+=L,I=h+d*L/2,i<0&&(G=-G),n[r++]=Ne*y,n[r++]=Ne*G,n[r]=I}const fe={[k.WGS84]:{[k.CGCS2000]:null,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:V,[k.WGS84_COMPARABLE_LON_LAT]:V,[k.SPHERICAL_ECEF]:ie,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:$,[k.PLATE_CARREE]:ne,[k.WGS84]:V,[k.WGS84_ECEF]:ce},[k.CGCS2000]:{[k.CGCS2000]:V,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:V,[k.WGS84_COMPARABLE_LON_LAT]:V,[k.SPHERICAL_ECEF]:ie,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:ne,[k.WGS84]:null,[k.WGS84_ECEF]:ce},[k.GCSMARS2000]:{[k.CGCS2000]:null,[k.GCSMARS2000]:V,[k.GCSMOON2000]:null,[k.LON_LAT]:V,[k.WGS84_COMPARABLE_LON_LAT]:null,[k.SPHERICAL_ECEF]:null,[k.SPHERICAL_MARS_PCPF]:se,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:null,[k.WGS84]:null,[k.WGS84_ECEF]:null},[k.GCSMOON2000]:{[k.CGCS2000]:null,[k.GCSMARS2000]:null,[k.GCSMOON2000]:V,[k.LON_LAT]:V,[k.WGS84_COMPARABLE_LON_LAT]:null,[k.SPHERICAL_ECEF]:null,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:_e,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:null,[k.WGS84]:null,[k.WGS84_ECEF]:null},[k.WEB_MERCATOR]:{[k.CGCS2000]:null,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:Q,[k.WGS84_COMPARABLE_LON_LAT]:Q,[k.SPHERICAL_ECEF]:function(e,t,n,r){Q(e,t,n,r),ie(n,r,n,r)},[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:V,[k.PLATE_CARREE]:function(e,t,n,r){Q(e,t,n,r),ne(n,r,n,r)},[k.WGS84]:Q,[k.WGS84_ECEF]:function(e,t,n,r){Q(e,t,n,r),ce(n,r,n,r)}},[k.WGS84_ECEF]:{[k.CGCS2000]:ae,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:ae,[k.WGS84_COMPARABLE_LON_LAT]:ae,[k.SPHERICAL_ECEF]:function(e,t,n,r){ae(e,t,n,r),ie(n,r,n,r)},[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:function(e,t,n,r){ae(e,t,n,r),$(n,r,n,r)},[k.PLATE_CARREE]:function(e,t,n,r){ae(e,t,n,r),ne(n,r,n,r)},[k.WGS84]:ae,[k.WGS84_ECEF]:V},[k.SPHERICAL_ECEF]:{[k.CGCS2000]:Ee,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:Ee,[k.WGS84_COMPARABLE_LON_LAT]:Ee,[k.SPHERICAL_ECEF]:V,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:function(e,t,n,r){Ee(e,t,n,r),$(n,r,n,r)},[k.PLATE_CARREE]:function(e,t,n,r){Ee(e,t,n,r),ne(n,r,n,r)},[k.WGS84]:Ee,[k.WGS84_ECEF]:function(e,t,n,r){Ee(e,t,n,r),ce(n,r,n,r)}},[k.SPHERICAL_MARS_PCPF]:{[k.CGCS2000]:null,[k.GCSMARS2000]:Pe,[k.GCSMOON2000]:null,[k.LON_LAT]:Pe,[k.WGS84_COMPARABLE_LON_LAT]:null,[k.SPHERICAL_ECEF]:null,[k.SPHERICAL_MARS_PCPF]:V,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:null,[k.WGS84]:null,[k.WGS84_ECEF]:null},[k.SPHERICAL_MOON_PCPF]:{[k.CGCS2000]:null,[k.GCSMARS2000]:null,[k.GCSMOON2000]:ue,[k.LON_LAT]:ue,[k.WGS84_COMPARABLE_LON_LAT]:null,[k.SPHERICAL_ECEF]:null,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:V,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:null,[k.WGS84]:null,[k.WGS84_ECEF]:null},[k.UNKNOWN]:{[k.CGCS2000]:null,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:null,[k.WGS84_COMPARABLE_LON_LAT]:null,[k.SPHERICAL_ECEF]:null,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:V,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:null,[k.WGS84]:null,[k.WGS84_ECEF]:null},[k.LON_LAT]:{[k.CGCS2000]:V,[k.GCSMARS2000]:V,[k.GCSMOON2000]:V,[k.LON_LAT]:V,[k.WGS84_COMPARABLE_LON_LAT]:V,[k.SPHERICAL_ECEF]:ie,[k.SPHERICAL_MARS_PCPF]:se,[k.SPHERICAL_MOON_PCPF]:_e,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:$,[k.PLATE_CARREE]:ne,[k.WGS84]:V,[k.WGS84_ECEF]:ce},[k.WGS84_COMPARABLE_LON_LAT]:{[k.CGCS2000]:null,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:V,[k.WGS84_COMPARABLE_LON_LAT]:V,[k.SPHERICAL_ECEF]:ie,[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:null,[k.PLATE_CARREE]:ne,[k.WGS84]:V,[k.WGS84_ECEF]:ce},[k.PLATE_CARREE]:{[k.CGCS2000]:re,[k.GCSMARS2000]:null,[k.GCSMOON2000]:null,[k.LON_LAT]:re,[k.WGS84_COMPARABLE_LON_LAT]:re,[k.SPHERICAL_ECEF]:function(e,t,n,r){re(e,t,n,r),ie(n,r,n,r)},[k.SPHERICAL_MARS_PCPF]:null,[k.SPHERICAL_MOON_PCPF]:null,[k.UNKNOWN]:null,[k.WEB_MERCATOR]:function(e,t,n,r){re(e,t,n,r),$(n,r,n,r)},[k.PLATE_CARREE]:V,[k.WGS84]:re,[k.WGS84_ECEF]:function(e,t,n,r){re(e,t,n,r),ce(n,r,n,r)}}};function Se(e,t,n=pe()){return null==e||null==t?null:function(e,t,n){if(null==e||null==t||n.source.spatialReference===e&&n.dest.spatialReference===t)return n;const r=q(e,n.source),o=q(t,n.dest);return r===k.UNKNOWN&&o===k.UNKNOWN?(0,T.fS)(e,t)?n.projector=V:n.projector=null:n.projector=fe[r][o],n}(e,t,n).projector}function pe(){return{source:{spatialReference:null,spatialReferenceId:k.UNKNOWN,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:k.UNKNOWN,metersPerUnit:1},projector:V}}const Ae={spatialReference:null,spatialReferenceId:k.UNKNOWN},Ce={spatialReference:null,spatialReferenceId:k.UNKNOWN},Re=pe(),Oe=(pe(),(0,o.Vl)(1)),Ne=(0,o.BV)(1),Me=(0,P.c)(),Te=(0,P.c)(),ge=(0,P.c)(),de=(0,P.c)();(0,P.c)()},18571:(e,t,n)=>{n.d(t,{Z:()=>_});let r=0;class o{static fromGE(e){const t=new o;return t._wkt=e.wkt,t._wkid=e.wkid,t._isInverse=e.isInverse,t}constructor(e){this.uid=r++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=r++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=r++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=r++}getInverse(){const e=new o;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class _{static cacheKey(e,t){return[void 0!==e.wkid&&null!==e.wkid?e.wkid.toString():"-1",void 0!==e.wkt&&null!==e.wkt?e.wkt.toString():"",void 0!==t.wkid&&null!==t.wkid?t.wkid.toString():"-1",void 0!==t.wkt&&null!==t.wkt?t.wkt.toString():""].join(",")}static fromGE(e){const t=new _;let n="";for(const r of e.steps){const e=o.fromGE(r);t.steps.push(e),n+=e.uid.toString()+","}return t._cachedProjection={},t._gtlistentry=null,t._chain=n,t}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e&&e.steps)for(const t of e.steps)t instanceof o?this.steps.push(t):this.steps.push(new o({wkid:t.wkid,wkt:t.wkt,isInverse:t.isInverse}))}getInverse(){const e=new _;e.steps=[];for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}getGTListEntry(){let e="";for(const t of this.steps)e+=t.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,t,n){this._cachedProjection[_.cacheKey(e,t)]=n}getCachedGeTransformation(e,t){let n="";for(const e of this.steps)n+=e.uid.toString()+",";n!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=n);const r=this._cachedProjection[_.cacheKey(e,t)];return void 0===r?null:r}}},69285:(e,t,n)=>{n.d(t,{k:()=>_});var r=n(67900),o=n(8744);function _(e,t,n){if(null==t||null==n||n.vcsWkid||(0,o.fS)(t,n))return null;const _=(0,r._R)(t)/(0,r._R)(n);if(1===_)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,_);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,_);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,_);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,_);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,_);default:return null}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5245,661,5234,9880],{53073:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(75148),a=n(59987),s=n(91136),i=n(90961),l=n(90658),u=n(8667);class o extends s.Z{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e);return this._checkCancelled(e),this._wset=new i.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===l.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?l.dj.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}async executeSpatialRelationTest(e){if(null===e.geometry)return!1;switch(this._relation){case"esriSpatialRelEnvelopeIntersects":return(0,u.kK)((0,l.SV)(this._relationGeom),(0,l.SV)(e.geometry));case"esriSpatialRelIntersects":return(0,u.kK)(this._relationGeom,e.geometry);case"esriSpatialRelContains":return(0,u.r3)(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return(0,u.Nm)(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return(0,u.uh)(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return(0,u.W4)(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return(0,u.jU)(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return(0,u.LV)(this._relationGeom,e.geometry,this._relationString??"")}}async _fetchAndRefineFeatures(e,t,n){const r=new i.Z([],e,!1,null),a=Math.min(t,e.length);await(this._parent?._getFeatures(r,-1,a,n)),this._checkCancelled(n);const s=[];for(let t=0;t<a;t++){const n=this._parent._featureFromCache(e[t]);s.push(await this.executeSpatialRelationTest(n))}for(let n=0;n<t;n++)!0===s[n]?this._idstates[e[n]]=l.dj.InFeatureSet:this._idstates[e[n]]=l.dj.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,n,r,a){await this._ensureLoaded();const s=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,n,r,a);let l;return this._checkCancelled(a),l=null!==t?new i.Z(s._candidates.slice(0).concat(s._known.slice(0)),[],s._ordered,this._clonePageDefinition(s.pagesDefinition)):new i.Z(s._candidates.slice(0),s._known.slice(0),s._ordered,this._clonePageDefinition(s.pagesDefinition)),l}async _stat(e,t,n,r,a,s,i){if(""!==n)return{calculated:!1};const l=await this._parent._stat(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,a,s,i);return!1===l.calculated?null===a&&""===n&&null===r?this._manualStat(e,t,s,i):{calculated:!1}:l}async _canDoAggregates(e,t,n,r,a){return""===n&&null===r&&null!==this._parent&&this._parent._canDoAggregates(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,a)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,i,l){if(null===this._parent)throw new a.EN(a.H9.NeverReach);return this._parent._getAggregatePagesDataSourceDefinition(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,i,l)}static registerAction(){s.Z._featuresetFunctions.intersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelIntersects",relationGeom:e})},s.Z._featuresetFunctions.envelopeIntersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelEnvelopeIntersects",relationGeom:e})},s.Z._featuresetFunctions.contains=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelContains",relationGeom:e})},s.Z._featuresetFunctions.overlaps=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelOverlaps",relationGeom:e})},s.Z._featuresetFunctions.within=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelWithin",relationGeom:e})},s.Z._featuresetFunctions.touches=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelTouches",relationGeom:e})},s.Z._featuresetFunctions.crosses=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelCrosses",relationGeom:e})},s.Z._featuresetFunctions.relate=function(e,t){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelRelation",relationGeom:e,relationString:t})}}}},75148:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(59987),a=n(91136),s=n(90961),i=n(90658);class l extends a.Z{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new s.Z([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=i.Bj.Standardised}async _getSet(){return this._wset}optimisePagingFeatureQueries(){}_isInFeatureSet(){return i.dj.NotInFeatureSet}async _getFeature(){throw new r.EN(r.H9.NeverReach)}async queryAttachments(){return[]}async _getFeatures(){return"success"}_featureFromCache(){return null}async _fetchAndRefineFeatures(){throw new r.EN(r.H9.NeverReach)}async _getFilteredSet(){return new s.Z([],[],!1,null)}_stat(e,t,n,r,a,s,i){return this._manualStat(e,t,s,i)}async _canDoAggregates(){return!1}}},91136:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(85839),a=n(48039),s=n(59987),i=n(70586);class l{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}nextBatch(e){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((t=>this.nextBatch(e)),(t=>this.nextBatch(e)));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=new Promise(((r,a)=>{this._parent._getSet(this._progress).then((s=>{const l=(0,i.s3)(s._known,"known");let u=l.length-1;if("GETPAGES"===l[l.length-1]&&(u-=1),this._lastId+e>u&&l.length>0&&"GETPAGES"===l[l.length-1])return void this._parent._expandPagedSet(s,this._parent._maxQueryRate(),0,0,this._progress).then((n=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,a)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}));const o=(0,i.s3)(s._candidates,"candidates");if(u>=this._lastId+e||0===o.length){for(let t=0;t<e;t++){const e=t+this._lastId+1;if(e>=l.length)break;n[t]=l[e]}return this._lastId+=n.length,0===n.length&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then((e=>{t.hasset=!0,this._parent._mainSetInUse=null,r(e)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}))}this._parent._refineSetBlock(s,this._parent._maxProcessingRate(),this._progress).then((()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,a)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}))}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}))})),!1===t.hasset&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((e=>this.next()),(e=>this.next()));const e={returnpromise:null,hasset:!1};return e.returnpromise=new Promise(((t,n)=>{this._parent._getSet(this._progress).then((r=>{const a=(0,i.s3)(r._known,"known");this._lastId<a.length-1?"GETPAGES"===a[this._lastId+1]?this._parent._expandPagedSet(r,this._parent._maxQueryRate(),0,0,this._progress).then((t=>(e.hasset=!0,this._parent._mainSetInUse=null,this.next()))).then(t,n):(this._lastId+=1,this._parent._getFeature(r,a[this._lastId],this._progress).then((n=>{e.hasset=!0,this._parent._mainSetInUse=null,t(n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))):(0,i.s3)(r._candidates,"candidates").length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then((()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)})):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))})),!1===e.hasset&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}async count(){if(-1!==this._parent._totalCount)return this._parent._totalCount;const e=await this._parent._getSet(this._progress),t=await this._refineAllSets(e);return this._parent._totalCount=t._known.length,this._parent._totalCount}async _refineAllSets(e){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress),this._refineAllSets(e);if(e._candidates.length>0){if("GETPAGES"===e._known[e._candidates.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress),this._refineAllSets(e);const t=await this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress);return t._candidates.length>0?this._refineAllSets(t):t}return e}}var u=n(90961),o=n(90658),c=n(95002),h=n(95330),d=n(41534),f=n(8667),_=n(82971),p=n(99514);class g{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=o.Bj.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.typeIdField=null,this.types=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,this._dateFieldIndex=null,e&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return void 0===t?this[e]:(void 0!==this[e]&&(this[e]=t),this)}end(){return null!==this._parent&&!0===this._parent._transparent?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return!0===this._parent?.loaded?(this._initialiseFeatureSet(),this):(await(this._parent?.load()),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new _.Z({wkid:4326}),this.geometryType=o.Qk.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some((t=>(t&&t.name.toLowerCase()===e&&(n=t),!!n)))),n}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=new p.Z(this.fields)),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(null!=e&&e.aborted)throw new s.EN(s.H9.Cancelled)}nativeCapabilities(){return this._parent.nativeCapabilities()}async _canDoAggregates(e,t,n,r,a){return null!==this._parent&&this._parent._canDoAggregates(e,t,n,r,a)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,a,i,l){if(null===this._parent)throw new s.EN(s.H9.NeverReach);return this._parent._getAggregatePagesDataSourceDefinition(e,t,n,r,a,i,l)}async _getAgregagtePhysicalPage(e,t,n){if(null===this._parent)throw new s.EN(s.H9.NeverReach);return this._parent._getAgregagtePhysicalPage(e,t,n)}async databaseType(){if(this._databaseType===o.Bj.NotEvaluated){if(null!==a.Z.applicationCache){const e=a.Z.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==a.Z.applicationCache&&a.Z.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==a.Z.applicationCache&&a.Z.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{thetype:o.Bj.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:o.Bj.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:o.Bj.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e)if(!0===await this._runDatabaseProbe(t.testwhere))return t.thetype;return o.Bj.StandardisedNoInterval}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new s.EN(s.H9.NotImplemented)}isTable(){return this._parent?.isTable()??!1}_featureFromCache(e){if(void 0!==this._featureCache[e])return this._featureCache[e]}_isInFeatureSet(e){return o.dj.Unknown}_getSet(e){throw new s.EN(s.H9.NotImplemented)}async _getFeature(e,t,n){if(this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);if(await this._getFeatures(e,t,this._maxProcessingRate(),n),this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);throw new s.EN(s.H9.MissingFeatures)}async _getFeatureBatch(e,t){this._checkCancelled(t);const n=new u.Z([],e,!1,null),r=[];await this._getFeatures(n,-1,e.length,t),this._checkCancelled(t);for(const t of e)void 0!==this._featureFromCache(t)&&r.push(this._featureFromCache(t));return r}async _getFeatures(e,t,n,r){return"success"}_getFilteredSet(e,t,n,r,a){throw new s.EN(s.H9.NotImplemented)}async _refineSetBlock(e,t,n){if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate()))return await this._expandPagedSet(e,this._maxQueryRate(),0,0,n),this._refineSetBlock(e,t,n);this._checkCancelled(n);const r=e._candidates.length;this._refineKnowns(e,t);let a=r-e._candidates.length;if(0===e._candidates.length)return e;if(a>=t)return e;if(await this._refineIfParentKnown(e,t-a,n),this._checkCancelled(n),this._refineKnowns(e,t-a),a=r-e._candidates.length,a<t&&e._candidates.length>0){const r=t-a,s=this._prepareFetchAndRefineSet(e._candidates);return await this._fetchAndRefineFeatures(s,s.length>r?r:e._candidates.length,n),this._checkCancelled(n),this._refineKnowns(e,t-a),e}return e}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n<e.length;n++)this._isPhysicalFeature(e[n])&&t.push(e[n]);return t}_isPhysicalFeature(e){return null===this._parent||this._parent._isPhysicalFeature(e)}_refineKnowns(e,t){let n=0,r=null;const a=[];t=this._maxQueryRate();for(let s=0;s<e._candidates.length&&"GETPAGES"!==e._candidates[s];s++){let i=!1;const l=this._candidateIdTransform(e._candidates[s]);l!==e._candidates[s]&&(i=!0);const u=this._isInFeatureSet(l);if(u===o.dj.InFeatureSet)!0===i?e._known.includes(l)||(e._known.push(l),n+=1):(e._known.push(e._candidates[s]),n+=1),null===r?r={start:s,end:s}:r.end===s-1?r.end=s:(a.push(r),r={start:s,end:s});else if(u===o.dj.NotInFeatureSet)null===r?r={start:s,end:s}:r.end===s-1?r.end=s:(a.push(r),r={start:s,end:s}),n+=1;else if(u===o.dj.Unknown&&(n+=1,!0===e._ordered))break;if(n>=t)break}null!==r&&a.push(r);for(let t=a.length-1;t>=0;t--)e._candidates.splice(a[t].start,a[t].end-a[t].start+1)}_refineIfParentKnown(e,t,n){const r=new u.Z([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if("GETPAGES"===e._known[r])return!0;if(void 0===this._featureCache[e._known[r]]&&(n+=1,n>=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=0;r<e._candidates.length;r++){if("GETPAGES"===e._candidates[r])return!0;if(n+=1,n>=t)break}return!1}async _expandPagedSet(e,t,n,r,a){if(null===this._parent)throw new s.EN(s.H9.NotImplemented);return this._parent._expandPagedSet(e,t,n,r,a)}async _expandPagedSetFeatureSet(e,t,n,r,a){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]&&(r=1),0===r&&e._candidates.length>0&&"GETPAGES"===e._candidates[e._candidates.length-1]&&(r=2),0===r)return"finished";const s=await this._getPage(e,r,a);return n+s<t?this._expandPagedSet(e,t,n+s,0,a):"success"}async _getPage(e,t,n){const r=1===t?e._known:e._candidates;if(e.pagesDefinition.internal.set.length>e.pagesDefinition.resultOffset||!0===e.pagesDefinition.internal.fullyResolved){r.length=r.length-1;let t=0;for(let n=0;n<e.pagesDefinition.resultRecordCount&&!(e.pagesDefinition.resultOffset+n>=e.pagesDefinition.internal.set.length);n++)r[r.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+n],t++;e.pagesDefinition.resultOffset+=t;let n=!1;return!0===e.pagesDefinition.internal.fullyResolved&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(n=!0),!1===n&&r.push("GETPAGES"),t}return await this._getPhysicalPage(e,t,n),this._getPage(e,t,n)}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return null===this._parent?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}async calculateStatistic(e,t,n,r){await this._ensureLoaded();let a=await this._stat(e,t,"",null,null,n,r);return!1===a.calculated&&(a=await this._manualStat(e,t,n,r)),a.result}async _manualStat(e,t,n,r){let a=null;switch(e.toLowerCase()){case"count":return a=await(0,c.QX)(this,r),{calculated:!0,result:a};case"distinct":return a=await(0,c.EB)(this,t,n,r),{calculated:!0,result:a};case"avg":case"mean":return a=await(0,c.J6)(this,t,r),{calculated:!0,result:a};case"stdev":return a=await(0,c.m)(this,t,r),{calculated:!0,result:a};case"variance":return a=await(0,c.CA)(this,t,r),{calculated:!0,result:a};case"sum":return a=await(0,c.Sm)(this,t,r),{calculated:!0,result:a};case"min":return a=await(0,c.VV)(this,t,r),{calculated:!0,result:a};case"max":return a=await(0,c.Fp)(this,t,r),{calculated:!0,result:a};default:return{calculated:!0,result:0}}}async _stat(e,t,n,r,a,s,i){const l=await this._parent._stat(e,t,n,r,a,s,i);return!1===l.calculated?null===a&&""===n&&null===r?this._manualStat(e,t,s,i):{calculated:!1}:l}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return new Promise(((e,r)=>{this._unionShapeInBatches(n,t,e,r)}))}_unionAllGeom(e){return new Promise(((t,n)=>{const r=this.iterator(this._defaultTracker(e));this._unionShapeInBatches([],r,t,n)}))}_unionShapeInBatches(e,t,n,r){t.next().then((a=>{try{null!==a&&null!==a.geometry&&e.push(a.geometry),e.length>30||null===a&&e.length>1?(0,f.G0)(e).then((s=>{try{null===a?n(s):(e=[s],this._unionShapeInBatches(e,t,n,r))}catch(e){r(e)}}),r):null===a?1===e.length?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(e){r(e)}}),r)}iterator(e){return new l(this,e)}intersection(e,t=!1){return g._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return g._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return g._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return g._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return g._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return g._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return g._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return g._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return g._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return g._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return g._featuresetFunctions.relate.bind(this)(e,t)}within(e){return g._featuresetFunctions.within.bind(this)(e)}touches(e){return g._featuresetFunctions.touches.bind(this)(e)}top(e){return g._featuresetFunctions.top.bind(this)(e)}crosses(e){return g._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return g._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return g._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return g._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return g._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return g._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return new Promise(((r,a)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,a,0)}))}_reduceImpl(e,t,n,r,a,s,i){try{if(++i>1e3)return void setTimeout((()=>{i=0,this._reduceImpl(e,t,n,r,a,s,i)}));e.next().then((l=>{try{if(null===l)a(n);else{const u=t(n,l,r,this);(0,h.y8)(u)?u.then((n=>{this._reduceImpl(e,t,n,r+1,a,s,i)}),s):this._reduceImpl(e,t,u,r+1,a,s,i)}}catch(e){s(e)}}),s)}catch(e){s(e)}}removeField(e){return g._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return g._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=(0,o.EI)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,f.Y4)(n.geometry,r).then((t=>e+t)):(0,f.CJ)(n.geometry,r).then((t=>e+t))),0,n)}sumLength(e,t=!1,n){const r=(0,o.Lz)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,f.kQ)(n.geometry,r).then((t=>e+t)):(0,f.sz)(n.geometry,r).then((t=>e+t))),0,n)}_substituteVars(e,t){if(null!==t){const n={};for(const e in t)n[e.toLowerCase()]=t[e];e.parameters=n}}async distinct(e,t=1e3,n=null,r){await this.load();const a=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(a,n),this.calculateStatistic("distinct",a,t,this._defaultTracker(r))}async min(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}async max(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}async avg(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}async sum(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}async stdev(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}async variance(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}async count(e){return await this.load(),this.calculateStatistic("count",d.WhereClause.create("1",this.getFieldsIndex()),-1,this._defaultTracker(e))}_defaultTracker(e){return e??{aborted:!1}}forEach(e,t){return new Promise(((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)}))}_forEachImpl(e,t,n,r,a,s){try{if(++s>1e3)return void setTimeout((()=>{s=0,this._forEachImpl(e,t,n,r,a,s)}),0);e.next().then((i=>{try{if(null===i)r(n);else{const l=t(i);null==l?this._forEachImpl(e,t,n,r,a,s):(0,h.y8)(l)?l.then((()=>{try{this._forEachImpl(e,t,n,r,a,s)}catch(e){a(e)}}),a):this._forEachImpl(e,t,n,r,a,s)}}catch(e){a(e)}}),a)}catch(e){a(e)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let e=0;e<this.fields.length;e++)t.layerDefinition.fields.push((0,o.Sh)(this.fields[e]));return this.reduce(((e,n)=>{const r={geometry:n.geometry&&n.geometry.toJSON(),attributes:{}};for(const e in n.attributes)r.attributes[e]=n.attributes[e];return t.featureSet.features.push(r),1}),0,e).then((()=>t))}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,n,r,a){return this._parent.queryAttachments(e,t,n,r,a)}serviceUrl(){return this._parent.serviceUrl()}subtypes(){return this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map((e=>({name:e.name,code:e.id}))):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,o.Sh)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===o.q2[this.geometryType]?"esriGeometryNull":o.q2[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];await this.reduce(((t,n)=>{const r={geometry:n.geometry?n.geometry.toJSON():null,attributes:n.attributes};return null!==r.geometry&&r.geometry.spatialReference&&delete r.geometry.spatialReference,e.push(r),1}),0,t);const n=this.schema();return n.features=e,n.spatialReference=this.spatialReference.toJSON(),JSON.stringify(n)}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return null!==this._parent?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const n=[];await this.reduce(((e,r)=>{const a={geometry:r.geometry?!0===t?.keepGeometryType?r.geometry:r.geometry.toJSON():null,attributes:r.attributes};return null!==a.geometry&&a.geometry.spatialReference&&!0!==t?.keepGeometryType&&delete a.geometry.spatialReference,n.push(a),1}),0,e);const r=this.schema();return r.features=n,r.spatialReference=!0===t?.keepGeometryType?this.spatialReference:this.spatialReference?.toJSON(),r}get dateTimeReferenceFieldIndex(){return null===this._dateFieldIndex&&(this._dateFieldIndex=r.nu.create(this.getFieldsIndex(),this)),this._dateFieldIndex}fieldTimeZone(e){return this.dateTimeReferenceFieldIndex.fieldTimeZone(e)}get preferredTimeReference(){return this._parent?.preferredTimeReference??null}get dateFieldsTimeReference(){return this._parent?.dateFieldsTimeReference??null}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){return this._parent?.editFieldsInfo??null}get timeInfo(){return this._parent?.timeInfo??null}}g._featuresetFunctions={}},90961:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r){this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}},48039:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}r.applicationCache=null},36515:(e,t,n)=>{n.d(t,{$e:()=>h,DT:()=>m,TE:()=>E,XF:()=>o,bB:()=>c,fz:()=>f,hq:()=>I,mA:()=>_,oX:()=>p,vR:()=>g,y5:()=>T,zR:()=>u});var r=n(48853),a=n(90658),s=n(41534),i=n(59987),l=(n(85839),n(17126));function u(e,t){return d(e?.parseTree,t,e?.parameters)}function o(e,t,n){return d(e,t,n)}function c(e,t,n,r){return s.WhereClause.create(d(e.parseTree,a.Bj.Standardised,e.parameters,t,n),r)}function h(e,t,n="AND"){return s.WhereClause.create("(("+u(e,a.Bj.Standardised)+")"+n+"("+u(t,a.Bj.Standardised)+"))",e.fieldsIndex)}function d(e,t,n,r=null,s=null,l=null){let u,o,c,h;switch(e.type){case"interval":return E(d(e.value,t,n,r,s,l),e.qualifier,e.op);case"case-expression":{let a=" CASE ";"simple"===e.format&&(a+=d(e.operand,t,n,r,s,l));for(let i=0;i<e.clauses.length;i++)a+=" WHEN "+d(e.clauses[i].operand,t,n,r,s,l)+" THEN "+d(e.clauses[i].value,t,n,r,s,l);return null!==e.else&&(a+=" ELSE "+d(e.else,t,n,r,s,l)),a+=" END ",a}case"parameter":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+n[e.value.toLowerCase()].toString().replaceAll("'","''")+"'";if((0,a.J_)(r))return p(r,t,l);if((0,a.NP)(r))return _(r,t,l);if(r instanceof Array){const e=[];for(let n=0;n<r.length;n++)"string"==typeof r[n]?e.push("'"+r[n].toString().replaceAll("'","''")+"'"):(0,a.J_)(r[n])?e.push(p(r[n],t,l)):(0,a.NP)(r[n])?e.push(_(r[n],t,l)):e.push(r[n].toString());return e}return r.toString()}case"expression-list":o=[];for(const a of e.value)o.push(d(a,t,n,r,s,l));return o;case"unary-expression":return" ( NOT "+d(e.expr,t,n,r,s,l)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+d(e.left,t,n,r,s,l)+" AND "+d(e.right,t,n,r,s,l)+") ";case"OR":return" ("+d(e.left,t,n,r,s,l)+" OR "+d(e.right,t,n,r,s,l)+") ";case"IS":if("null"!==e.right.type)throw new i.eS(i.f.UnsupportedIsRhs);return" ("+d(e.left,t,n,r,s,l)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new i.eS(i.f.UnsupportedIsRhs);return" ("+d(e.left,t,n,r,s,l)+" IS NOT NULL )";case"IN":return u=[],"expression-list"===e.right.type?(u=d(e.right,t,n,r,s)," ("+d(e.left,t,n,r,s,l)+" IN ("+u.join(",")+")) "):(h=d(e.right,t,n,r,s,l),h instanceof Array?" ("+d(e.left,t,n,r,s,l)+" IN ("+h.join(",")+")) ":" ("+d(e.left,t,n,r,s,l)+" IN ("+h+")) ");case"NOT IN":return u=[],"expression-list"===e.right.type?(u=d(e.right,t,n,r,s)," ("+d(e.left,t,n,r,s,l)+" NOT IN ("+u.join(",")+")) "):(h=d(e.right,t,n,r,s,l),h instanceof Array?" ("+d(e.left,t,n,r,s,l)+" NOT IN ("+h.join(",")+")) ":" ("+d(e.left,t,n,r,s,l)+" NOT IN ("+h+")) ");case"BETWEEN":return c=d(e.right,t,n,r,s,l)," ("+d(e.left,t,n,r,s,l)+" BETWEEN "+c[0]+" AND "+c[1]+" ) ";case"NOTBETWEEN":return c=d(e.right,t,n,r,s,l)," ("+d(e.left,t,n,r,s,l)+" NOT BETWEEN "+c[0]+" AND "+c[1]+" ) ";case"LIKE":return""!==e.escape?" ("+d(e.left,t,n,r,s,l)+" LIKE "+d(e.right,t,n,r,s,l)+" ESCAPE '"+e.escape+"') ":" ("+d(e.left,t,n,r,s,l)+" LIKE "+d(e.right,t,n,r,s,l)+") ";case"NOT LIKE":return""!==e.escape?" ("+d(e.left,t,n,r,s,l)+" NOT LIKE "+d(e.right,t,n,r,s,l)+" ESCAPE '"+e.escape+"') ":" ("+d(e.left,t,n,r,s,l)+" NOT LIKE "+d(e.right,t,n,r,s,l)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+d(e.left,t,n,r,s,l)+" "+e.operator+" "+d(e.right,t,n,r,s,l)+") ";case"||":return" ("+d(e.left,t,n,r,s,l)+" "+(t===a.Bj.SqlServer?"+":e.operator)+" "+d(e.right,t,n,r,s,l)+") "}throw new i.eS(i.f.UnsupportedOperator,{operator:e.operator});case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":case"date":return p(e.value,t,l);case"number":return e.value.toString();case"current-time":return g("date"===e.mode,t);case"column-reference":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+s+")":e.column;case"data-type":return e.value;case"function":{const a=d(e.args,t,n,r,s,l);return f(e.name,a,t)}}throw new i.eS(i.f.UnsupportedSyntax,{node:e.type})}function f(e,t,n){switch(e.toLowerCase().trim()){case"cos":case"sin":case"tan":case"cosh":case"tanh":case"sinh":case"acos":case"asin":case"atan":case"floor":case"log10":case"log":case"abs":if(1!==t.length)throw new i.eS(i.f.InvalidFunctionParameters,{function:e.toLowerCase().trim()});return`${e.toUpperCase().trim()}(${t[0]})`;case"ceiling":case"ceil":if(1!==t.length)throw new i.eS(i.f.InvalidFunctionParameters,{function:"ceiling"});switch(n){case a.Bj.Standardised:case a.Bj.StandardisedNoInterval:}return"CEILING("+t[0]+")";case"mod":case"power":case"nullif":if(2!==t.length)throw new i.eS(i.f.InvalidFunctionParameters,{function:e.toLowerCase().trim()});return`${e.toUpperCase().trim()}(${t[0]},${t[1]})`;case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new i.eS(i.f.InvalidFunctionParameters,{function:"round"});case"truncate":if(t.length<1||t.length>2)throw new i.eS(i.f.InvalidFunctionParameters,{function:"truncate"});return n===a.Bj.SqlServer?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new i.eS(i.f.InvalidFunctionParameters,{function:"char_length"});switch(n){case a.Bj.SqlServer:return"LEN("+t[0]+")";case a.Bj.Oracle:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"coalesce":case"concat":{if(t.length<1)throw new i.eS(i.f.InvalidFunctionParameters,{function:e.toLowerCase()});let n=e.toUpperCase().trim()+"(";for(let e=0;e<t.length;e++)0!==e&&(n+=","),n+=t[e];return n+=")",n}case"lower":case"lcase":if(1!==t.length)throw new i.eS(i.f.InvalidFunctionParameters,{function:"lower"});return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new i.eS(i.f.InvalidFunctionParameters,{function:"upper"});return"UPPER("+t[0]+")";case"substring":{let e="";switch(n){case a.Bj.Oracle:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case a.Bj.SqlServer:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replaceAll("'","")+" FROM "+t[1]+")";case"cast":{let e="";switch(n){case a.Bj.Oracle:switch(t[1].type){case"date":e="DATE";break;case"float":e="DOUBLE";break;case"integer":e="INTEGER";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;case a.Bj.Postgres:switch(t[1].type){case"date":e="DATE";break;case"float":e="DOUBLE PRECISION";break;case"integer":e="INT";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;case a.Bj.SqlServer:switch(t[1].type){case"date":e="DATE";break;case"float":e="FLOAT";break;case"integer":e="INT";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="DATETIME";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;default:switch(t[1].type){case"date":e="DATE";break;case"float":e="FLOAT";break;case"integer":e="INTEGER";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`}}}throw new i.eS(i.f.InvalidFunctionParameters,{function:e})}function _(e,t,n,s){n?.outputTimeReference&&(e=r.iG.arcadeDateAndZoneToArcadeDate(e,n?.outputTimeReference));const i=e.toDateTime(),l=0===i.hour&&0===i.minute&&0===i.second&&0===i.millisecond;switch(t){case a.Bj.FILEGDB:case a.Bj.Standardised:case a.Bj.StandardisedNoInterval:return l?`date '${i.toFormat("yyyy-LL-dd")}'`:`date '${i.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case a.Bj.Oracle:return l?`TO_DATE('${i.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${i.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case a.Bj.SqlServer:return`'${i.toFormat(l?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case a.Bj.PGDB:return`#${i.toFormat(l?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case a.Bj.Postgres:return`TIMESTAMP '${i.toFormat(l?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${i.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function p(e,t,n,r){let s=(0,a.J_)(e)?l.ou.fromJSDate(e):l.ou.fromSQL(e);const i=0===s.hour&&0===s.minute&&0===s.second&&0===s.millisecond;switch(n?.inputTimeReference&&(s=l.ou.fromObject({day:s.day,year:s.year,month:s.month,hour:s.hour,minute:s.minute,second:s.second,millisecond:s.millisecond},{zone:n.inputTimeReference})),n?.outputTimeReference&&(s=s.setZone(n.outputTimeReference)),t){case a.Bj.FILEGDB:case a.Bj.Standardised:case a.Bj.StandardisedNoInterval:return i?`date '${s.toFormat("yyyy-LL-dd")}'`:`date '${s.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case a.Bj.Oracle:return i?`TO_DATE('${s.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${s.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case a.Bj.SqlServer:return`'${s.toFormat(i?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case a.Bj.PGDB:return`#${s.toFormat(i?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case a.Bj.Postgres:return`TIMESTAMP '${s.toFormat(i?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${s.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function g(e,t){switch(t){case a.Bj.FILEGDB:case a.Bj.Standardised:case a.Bj.StandardisedNoInterval:case a.Bj.Oracle:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP";case a.Bj.SqlServer:return e?"CAST(GETDATE() AS DATE)":"GETDATE()";case a.Bj.PGDB:case a.Bj.Postgres:default:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP"}}function m(e,t,n={}){const r={},a={},s={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"guid",oid:"integer",long:"integer","small-integer":"integer",integer:"integer",single:"double",double:"double",date:"date",guid:"guid",globalid:"guid",string:"string"};for(const e of t){const t=e.type?s[e.type]:void 0;r[e.name.toLowerCase()]=void 0===t?"":t}for(const e in n){const t=s[n[e]];a[e.toLowerCase()]=void 0===t?"":t}switch(y(r,e.parseTree,e.parameters,a)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"string":return"string";case"global-id":case"guid":return"guid"}return""}function y(e,t,n,r){let s;switch(t.type){case"interval":return"integer";case"case-expression":{const a=[];if("simple"===t.format){for(let s=0;s<t.clauses.length;s++)a.push(y(e,t.clauses[s].value,n,r));null!==t.else&&a.push(y(e,t.else,n,r))}else{for(let s=0;s<t.clauses.length;s++)a.push(y(e,t.else,n,r));null!==t.else&&a.push(y(e,t.else,n,r))}return w(a)}case"parameter":{const e=r[t.value.toLowerCase()];if(void 0===e&&n){const e=n[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if((0,a.J_)(e))return"date";if((0,a.NP)(e))return"date";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expression-list":{const a=[];for(const s of t.value)a.push(y(e,s,n,r));return a}case"unary-expression":return"boolean";case"binary-expression":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new i.eS(i.f.UnsupportedIsRhs);return"boolean";case"*":case"-":case"+":case"/":return w([y(e,t.left,n,r),y(e,t.right,n,r)]);case"||":return"string";default:throw new i.eS(i.f.UnsupportedOperator,{operator:t.operator})}case"null":return"";case"boolean":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":case"timestamp":case"current-time":return"date";case"column-reference":{const n=e[t.column.toLowerCase()];return void 0===n?"":n}case"function":switch(t.name.toLowerCase()){case"cast":switch(t.args?.value[1]?.value.type??""){case"integer":case"smallint":return"integer";case"real":case"float":return"double";case"date":case"timestamp":return"date";case"varchar":return"string";default:return""}case"position":case"extract":case"char_length":case"mod":return"integer";case"round":if(s=y(e,t.args,n,r),s instanceof Array){if(s.length<=0)return"double";s=s[0]}return s;case"sign":return"integer";case"ceiling":case"floor":case"abs":return s=y(e,t.args,n,r),s instanceof Array&&(s=w(s)),"integer"===s||"double"===s?s:"double";case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"cosh":case"sinh":case"tanh":case"power":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string";case"truncate":return"double";case"nullif":case"coalesce":return s=y(e,t.args,n,r),s instanceof Array?s.length>0?s[0]:"":s}return""}throw new i.eS(i.f.UnsupportedSyntax,{node:t.type})}const S={boolean:1,string:2,integer:3,double:4,date:5};function w(e){if(e){let t="";for(const n of e)""!==n&&(t=""===t||S[t]<S[n]?n:t);return t}return""}function I(e,t){return b(e.parseTree,t)}function T(e){return"column-reference"===e?.parseTree.type}function b(e,t){if(null==e)return!1;switch(e.type){case"when-clause":return b(e.operand,t)||b(e.value,t);case"case-expression":for(const n of e.clauses)if(b(n,t))return!0;return!("simple"!==e.format||!b(e.operand,t))||!(null===e.else||!b(e.else,t));case"parameter":case"null":case"boolean":case"date":case"timestamp":case"string":case"number":return!1;case"expression-list":for(const n of e.value)if(b(n,t))return!0;return!1;case"unary-expression":return b(e.expr,t);case"binary-expression":return b(e.left,t)||b(e.right,t);case"column-reference":return t.toLowerCase()===e.column.toLowerCase();case"function":return b(e.args,t)}return!1}function F(e){let t="";return t+=e.period.toUpperCase(),t}function E(e,t,n){let r="";return r="interval-period"===t.type?F(t):F(t.start)+" TO "+F(t.end),"INTERVAL "+n+" "+e+" "+r}},95002:(e,t,n)=>{n.d(t,{CA:()=>p,EB:()=>w,Fp:()=>f,J6:()=>_,QX:()=>y,Sm:()=>m,VV:()=>d,g3:()=>c,m:()=>g,tj:()=>h});var r=n(59987),a=n(90658),s=n(36515);function i(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function l(e){const t=i(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function u(e){const t=i(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/(e.length-1)}function o(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function c(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function h(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],r={},s=[];for(let i=0;i<e.length;i++){if(void 0!==e[i]&&null!==e[i]){const t=e[i];if((0,a.hj)(t)||(0,a.HD)(t))void 0===r[t]&&(n.push(t),r[t]=1);else{let e=!1;for(let n=0;n<s.length;n++)!0===(0,a.tt)(s[n],t)&&(e=!0);!1===e&&(s.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return i(t);case"min":return Math.min.apply(Math,t);case"sum":return o(t);case"max":return Math.max.apply(Math,t);case"stdev":case"stddev":return Math.sqrt(l(t));case"var":case"variance":return l(t);case"count":return t.length}return 0}async function d(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:Math.min.apply(Math,r)}async function f(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:Math.max.apply(Math,r)}async function _(e,t,n){let r="";t&&!(0,s.y5)(t)&&(r=(0,s.DT)(t,e.fields));const a=await S(e,t,n,!0);if(0===a.length)return null;const l=i(a);return null===l?l:"integer"===r?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(l):l}async function p(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:u(r)}async function g(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:Math.sqrt(u(r))}async function m(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:o(r)}async function y(e,t){return e.iterator(t).count()}async function S(e,t,n,a=!1){const s=e.iterator(n),i=[],l={ticker:0};let u=await s.next();for(;null!==u;){if(l.ticker++,n.aborted)throw new r.EN(r.H9.Cancelled);l.ticker%100==0&&(l.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t?.calculateValue(u);null===e?!1===a&&(i[i.length]=e):i[i.length]=e,u=await s.next()}return i}async function w(e,t,n=1e3,a=null){const s=e.iterator(a),i=[],l={},u={ticker:0};let o=await s.next();for(;null!==o;){if(u.ticker++,a&&a.aborted)throw new r.EN(r.H9.Cancelled);u.ticker%100==0&&(u.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t?.calculateValue(o);if(null!=e&&void 0===l[e]&&(i.push(e),l[e]=1),i.length>=n&&-1!==n)return i;o=await s.next()}return i}},99880:(e,t,n)=>{n.d(t,{V:()=>u});var r=n(68773),a=(n(3172),n(20102)),s=n(92604),i=n(81271);const l=s.Z.getLogger("esri.assets");function u(e){if(!r.default.assetsPath)throw l.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new a.Z("assets:path-not-set","config.assetsPath is not set");return(0,i.v_)(r.default.assetsPath,e)}},10661:(e,t,n)=>{n.d(t,{s:()=>a});var r=n(42100);class a extends r.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},8667:(e,t,n)=>{n.d(t,{CJ:()=>j,Cz:()=>O,D$:()=>B,ED:()=>w,FH:()=>x,G0:()=>D,Gg:()=>b,JI:()=>E,LV:()=>T,Nm:()=>I,Sp:()=>A,TE:()=>p,U1:()=>P,W4:()=>y,Y4:()=>U,_L:()=>k,cv:()=>N,e5:()=>v,f3:()=>L,fS:()=>g,j2:()=>G,jU:()=>_,kK:()=>m,kQ:()=>H,og:()=>F,oq:()=>h,r3:()=>f,rd:()=>C,sz:()=>M,uh:()=>S,wf:()=>R,z7:()=>d}),n(66577);var r=n(78346),a=n(94139),s=n(33955);function i(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function l(e){return e?Array.isArray(e)?e.map(l):e.toJSON?e.toJSON():e:e}function u(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let o;async function c(e,t){return(await async function(){return o||(o=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),o}()).invoke("executeGEOperation",{operation:e,parameters:l(t)})}async function h(e,t){return u(await c("clip",[i(e),e,t]))}async function d(e,t){return u(await c("cut",[i(e),e,t]))}function f(e,t){return c("contains",[i(e),e,t])}function _(e,t){return c("crosses",[i(e),e,t])}function p(e,t,n){return c("distance",[i(e),e,t,n])}function g(e,t){return c("equals",[i(e),e,t])}function m(e,t){return c("intersects",[i(e),e,t])}function y(e,t){return c("touches",[i(e),e,t])}function S(e,t){return c("within",[i(e),e,t])}function w(e,t){return c("disjoint",[i(e),e,t])}function I(e,t){return c("overlaps",[i(e),e,t])}function T(e,t,n){return c("relate",[i(e),e,t,n])}function b(e){return c("isSimple",[i(e),e])}async function F(e){return u(await c("simplify",[i(e),e]))}async function E(e,t=!1){return u(await c("convexHull",[i(e),e,t]))}async function v(e,t){return u(await c("difference",[i(e),e,t]))}async function A(e,t){return u(await c("symmetricDifference",[i(e),e,t]))}async function R(e,t){return u(await c("intersect",[i(e),e,t]))}async function D(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return u(await c("union",[i(n),n]))}async function N(e,t,n,r,a,s){return u(await c("offset",[i(e),e,t,n,r,a,s]))}async function L(e,t,n,r=!1){const a=[i(e),e,t,n,r];return u(await c("buffer",a))}async function C(e,t,n,r,a,s){const l=[i(e),e,t,n,r,a,s];return u(await c("geodesicBuffer",l))}async function x(e,t,n=!0){const r=await c("nearestCoordinate",[i(e),e,t,n]);return{...r,coordinate:a.Z.fromJSON(r.coordinate)}}async function k(e,t){const n=await c("nearestVertex",[i(e),e,t]);return{...n,coordinate:a.Z.fromJSON(n.coordinate)}}async function P(e,t,n){if(null==e)throw new Z;const r=e.spatialReference;if(null==(n=n??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent?.center}(e)))throw new Z;const a=e.constructor.fromJSON(await c("rotate",[r,e,t,n]));return a.spatialReference=r,a}async function B(e,t,n,r){return u(await c("generalize",[i(e),e,t,n,r]))}async function O(e,t,n){return u(await c("densify",[i(e),e,t,n]))}async function G(e,t,n,r=0){return u(await c("geodesicDensify",[i(e),e,t,n,r]))}function j(e,t){return c("planarArea",[i(e),e,t])}function M(e,t){return c("planarLength",[i(e),e,t])}function U(e,t,n){return c("geodesicArea",[i(e),e,t,n])}function H(e,t,n){return c("geodesicLength",[i(e),e,t,n])}class Z extends Error{constructor(){super("Illegal Argument Exception")}}},94443:(e,t,n)=>{n.d(t,{ME:()=>f,Su:()=>_,tz:()=>d});var r=n(20102),a=n(95330),s=n(70171);const i=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,l={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function u(e){return e in l}Object.keys(l);const o=[],c=new Map;function h(e){for(const t of c.keys())p(e.pattern,t)&&c.delete(t)}function d(e){return o.includes(e)||(h(e),o.unshift(e)),{remove(){const t=o.indexOf(e);t>-1&&(o.splice(t,1),h(e))}}}async function f(e){const t=(0,s.Kd)();c.has(e)||c.set(e,async function(e,t){const n=[];for(const r of o)if(p(r.pattern,e))try{return await r.fetchMessageBundle(e,t)}catch(e){n.push(e)}if(n.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:n});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const n=c.get(e);return n&&await g.add(n),n}function _(e){if(!i.test(e))return null;const t=i.exec(e);if(null===t)return null;const[,n,r]=t,a=n+(r?"-"+r.toUpperCase():"");return u(a)?a:u(n)?n:null}function p(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,s.Ze)((()=>{c.clear()}));const g=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,a.hh)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}}}]);