@arcgis/core 5.0.0-next.71 → 5.0.0-next.73

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 (151) hide show
  1. package/Ground.js +1 -1
  2. package/applications/Components/analysisUtils.d.ts +1 -2
  3. package/applications/Components/analysisUtils.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/00631252e8bd4a456253.js +1 -0
  6. package/assets/esri/core/workers/chunks/{322085d63719da6e443c.js → 0c02b084ae30ba138c5d.js} +1 -1
  7. package/assets/esri/core/workers/chunks/0f2f1731543ed21db0a8.js +1 -0
  8. package/assets/esri/core/workers/chunks/1b201d83e9ba7d8615c0.js +1 -0
  9. package/assets/esri/core/workers/chunks/{b4f944ef6c174b20b619.js → 23545a9adc75564ecf6e.js} +1 -1
  10. package/assets/esri/core/workers/chunks/261b5a5db022ef580a1b.js +1 -0
  11. package/assets/esri/core/workers/chunks/2bd59ece927b5c1c9f80.js +1 -0
  12. package/assets/esri/core/workers/chunks/{37e46461da3000949a26.js → 2d8b8880e6bff4414e95.js} +1 -1
  13. package/assets/esri/core/workers/chunks/2fba74bae99ece15706c.js +1 -0
  14. package/assets/esri/core/workers/chunks/2fc64404bc42b7250086.js +1 -0
  15. package/assets/esri/core/workers/chunks/33cbfc34d5e2fc1a1a4f.js +1 -0
  16. package/assets/esri/core/workers/chunks/35887be3e4a218268d99.js +1 -0
  17. package/assets/esri/core/workers/chunks/3596ae4cb2bd2f3f35d9.js +1 -0
  18. package/assets/esri/core/workers/chunks/37814bf052ab59a5fb9e.js +1 -0
  19. package/assets/esri/core/workers/chunks/4e0d299054da075e5103.js +1 -0
  20. package/assets/esri/core/workers/chunks/50186162cd6d7c2ef0f9.js +1 -0
  21. package/assets/esri/core/workers/chunks/543ea1a0e7a6f1d267d1.js +1 -0
  22. package/assets/esri/core/workers/chunks/{dbfb00fb28b8b9f687a1.js → 5bbf20135c87a1cc8a18.js} +1 -1
  23. package/assets/esri/core/workers/chunks/5ed31ec0f53c1d55c4ea.js +1 -0
  24. package/assets/esri/core/workers/chunks/6309e8beedf5e7f2a50f.js +1 -0
  25. package/assets/esri/core/workers/chunks/{1a45b4b4803337f4b99f.js → 64985e9b6e2edb3ceb37.js} +38 -38
  26. package/assets/esri/core/workers/chunks/65475370cc4ebe2aa657.js +1 -0
  27. package/assets/esri/core/workers/chunks/65d9f3bc88472008443a.js +1 -0
  28. package/assets/esri/core/workers/chunks/6ab0f16f5c8806855c47.js +1 -0
  29. package/assets/esri/core/workers/chunks/7e37a3005f2ad2c0a918.js +1 -0
  30. package/assets/esri/core/workers/chunks/7f2496a59379e1a61ee5.js +1 -0
  31. package/assets/esri/core/workers/chunks/88379cd8e8e1c7ae3c7c.js +1 -0
  32. package/assets/esri/core/workers/chunks/{25abbe1663e18e677dc2.js → 935a6dccb88557f98189.js} +2 -2
  33. package/assets/esri/core/workers/chunks/{a808be466812db51813d.js → 9382af94bf6bf1b09c8c.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{8e83c133b201b9b61e70.js → 979bc762ccc0d3fc2467.js} +1 -1
  35. package/assets/esri/core/workers/chunks/9c417f4dfb19e4c4bd71.js +1 -0
  36. package/assets/esri/core/workers/chunks/a554ad74be03b1ed1a72.js +1 -0
  37. package/assets/esri/core/workers/chunks/{e6e837e43b9348050832.js → a67c86f4254807eb6a05.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{1ec1a1997b5577619040.js → b211b53aa7616a093b90.js} +1 -1
  39. package/assets/esri/core/workers/chunks/c31babdb59382b6bc007.js +1 -0
  40. package/assets/esri/core/workers/chunks/c8182c2cbb0ead202af6.js +1 -0
  41. package/assets/esri/core/workers/chunks/ce218c10b209b58e04fd.js +1 -0
  42. package/assets/esri/core/workers/chunks/ceef586d8cc8adc4d249.js +1 -0
  43. package/assets/esri/core/workers/chunks/d13e8ce9270dc0662b87.js +1 -0
  44. package/assets/esri/core/workers/chunks/db28d00171240b4fffac.js +1 -0
  45. package/assets/esri/core/workers/chunks/dbd382546837aa7709e2.js +1 -0
  46. package/assets/esri/core/workers/chunks/ea6f897f21b4f30e8e99.js +1 -0
  47. package/assets/esri/core/workers/chunks/{e8a3ad00936f2ccaf362.js → f0a667d8d33bc51c795d.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{29b09db309ff75fb3e97.js → f65d26588d2d80680a26.js} +1 -1
  49. package/assets/esri/core/workers/chunks/f72e6c903f55ce95a6c5.js +1 -0
  50. package/assets/esri/core/workers/chunks/f893e10d660e819cca45.js +1 -0
  51. package/assets/esri/core/workers/chunks/{878010ca23da0bca9405.js → fb1ed5ef2f95ab093346.js} +1 -1
  52. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  53. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  54. package/chunks/lyr3DMain.js +1 -1
  55. package/config.js +1 -1
  56. package/core/workers/registry.js +1 -1
  57. package/geometry/spatialReferenceEllipsoidUtils.js +1 -1
  58. package/kernel.js +1 -1
  59. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  60. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  61. package/layers/RouteLayer.d.ts +3 -3
  62. package/layers/support/ElevationQuery.js +1 -1
  63. package/layers/support/GeometryDescriptor.js +1 -1
  64. package/layers/support/layerUtils.d.ts +4 -0
  65. package/layers/support/types.d.ts +3 -2
  66. package/package.json +1 -1
  67. package/rest/featureService/FeatureService.d.ts +1 -1
  68. package/rest/featureService/types.d.ts +4 -4
  69. package/rest/geoprocessor/GPOptions.d.ts +5 -5
  70. package/rest/geoprocessor/execute.d.ts +6 -0
  71. package/rest/layerSources/DynamicDataLayer.d.ts +2 -2
  72. package/rest/layerSources/QueryTableDataSource.d.ts +1 -1
  73. package/rest/print.d.ts +1 -1
  74. package/rest/support/ClosestFacilityParameters.d.ts +3 -3
  75. package/rest/support/ClosestFacilitySolveResult.d.ts +2 -2
  76. package/rest/support/Query.d.ts +2 -2
  77. package/rest/support/RouteParameters.d.ts +2 -5
  78. package/rest/support/RouteResult.d.ts +1 -1
  79. package/rest/support/ServiceAreaParameters.d.ts +1 -1
  80. package/rest/support/ServiceAreaSolveResult.d.ts +2 -2
  81. package/rest/support/types.d.ts +1 -1
  82. package/rest/symbolService.d.ts +2 -2
  83. package/support/revision.js +1 -1
  84. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  85. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementController.js +1 -1
  86. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  87. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  88. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  89. package/views/3d/analysis/support/measurementUtils.js +1 -1
  90. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  91. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  92. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  93. package/views/3d/interactive/visualElements/support/Segment.js +1 -1
  94. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  95. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  96. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  97. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  98. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  99. package/views/3d/webgl-engine/lib/Material.js +1 -1
  100. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  101. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  102. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  103. package/views/3d/webgl-engine/materials/VisualVariablePassParameters.js +1 -1
  104. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  105. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  106. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
  107. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  108. package/views/support/MeasurementWorker.js +5 -0
  109. package/views/support/MeasurementWorkerHandle.js +5 -0
  110. package/views/support/automaticAreaMeasurementUtils.js +1 -1
  111. package/views/support/geodesicAreaMeasurementUtils.js +1 -1
  112. package/views/support/geodesicLengthMeasurementUtils.js +1 -1
  113. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  114. package/widgets/Directions/DirectionsViewModel.d.ts +2 -2
  115. package/widgets/Search/SearchResultRenderer.d.ts +0 -2
  116. package/widgets/Search/SearchSource.d.ts +2 -2
  117. package/widgets/Search/SearchViewModel.d.ts +6 -7
  118. package/widgets/Search/types.d.ts +4 -4
  119. package/assets/esri/core/workers/chunks/0367a8580fede8f804f9.js +0 -1
  120. package/assets/esri/core/workers/chunks/14f4f5b7549cea7b5a6a.js +0 -1
  121. package/assets/esri/core/workers/chunks/1b475593c80d7bccdda5.js +0 -1
  122. package/assets/esri/core/workers/chunks/27ec8688f72130239b98.js +0 -1
  123. package/assets/esri/core/workers/chunks/2dd347aa2a061d536e69.js +0 -1
  124. package/assets/esri/core/workers/chunks/2f6fa33692478e99d24b.js +0 -1
  125. package/assets/esri/core/workers/chunks/3e7ea06b342e33bc48a5.js +0 -1
  126. package/assets/esri/core/workers/chunks/4387aaf9d5e8f6d1833d.js +0 -1
  127. package/assets/esri/core/workers/chunks/668a868fe2dcb6384ac9.js +0 -1
  128. package/assets/esri/core/workers/chunks/6acfa51b81e6f4255118.js +0 -1
  129. package/assets/esri/core/workers/chunks/6f8098f9fe233833245a.js +0 -1
  130. package/assets/esri/core/workers/chunks/76dbaef0d0794913f36f.js +0 -1
  131. package/assets/esri/core/workers/chunks/7c5218eae13d3bd30598.js +0 -1
  132. package/assets/esri/core/workers/chunks/7fc09382f934e9223a9b.js +0 -1
  133. package/assets/esri/core/workers/chunks/822ef6a043c7e147b4b6.js +0 -1
  134. package/assets/esri/core/workers/chunks/980313a6c35e79812d17.js +0 -1
  135. package/assets/esri/core/workers/chunks/9c157c0eeadb824ad01e.js +0 -1
  136. package/assets/esri/core/workers/chunks/a39ac9127a215d14d412.js +0 -1
  137. package/assets/esri/core/workers/chunks/a893f8db2477cf677ac8.js +0 -1
  138. package/assets/esri/core/workers/chunks/a95e28ade258b144cbb5.js +0 -1
  139. package/assets/esri/core/workers/chunks/abcee7cfd53cfe1d91e9.js +0 -1
  140. package/assets/esri/core/workers/chunks/b9f0d313f59fc7c43560.js +0 -1
  141. package/assets/esri/core/workers/chunks/bbe2eaef7edfa33b6eea.js +0 -1
  142. package/assets/esri/core/workers/chunks/bfdf646d4c8f175a4236.js +0 -1
  143. package/assets/esri/core/workers/chunks/d749aa62ad694147aebe.js +0 -1
  144. package/assets/esri/core/workers/chunks/d7d9656b990ce8be2152.js +0 -1
  145. package/assets/esri/core/workers/chunks/d8a7004c399d539aed09.js +0 -1
  146. package/assets/esri/core/workers/chunks/df92239eefff04471a0b.js +0 -1
  147. package/assets/esri/core/workers/chunks/ee2ca25048a920e43743.js +0 -1
  148. package/assets/esri/core/workers/chunks/eeb24a4ab4993f1f4e8e.js +0 -1
  149. package/assets/esri/core/workers/chunks/fe5d2735f057c7789f4b.js +0 -1
  150. package/views/support/GeodesicMeasurementWorker.js +0 -5
  151. package/views/support/GeodesicMeasurementWorkerHandle.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3660],{2272:(e,t,s)=>{s.d(t,{Dl:()=>h,gf:()=>c,jV:()=>l,lF:()=>u});var i=s(92602),r=s(70333),n=s(4718),o=s(84952),a=s(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function h(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function u(e,t,s){const i={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))i[r]=n.map(e=>u(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(s?.[r]);i[r]=t?e:JSON.stringify(e)}else i[r]=t?n:JSON.stringify(n);else i[r]=n}return i}async function c(e,t,n){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??r.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!r.id&&i.A.request.useIdentity&&await Promise.all([s.e(7330),s.e(168),s.e(148)]).then(s.bind(s,50148));const l=await r.id.getCredential(e,n);return l?.token}},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),r=s(75503),n=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((s,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,n.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8631:(e,t,s)=>{s.d(t,{r:()=>d,g:()=>c});var i,r=s(53177),n=s(76357),o=s(31635),a=s(91429),l=s(93223);let h=class extends n.A{static{i=this}constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,o.Cg)([(0,l.e)({inherited:"inherited"})],h.prototype,"type",void 0),h=i=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],h);var u=s(41628);const c={key:"type",base:n.A,typeMap:{range:u.A,"coded-value":r.A,inherited:h}};function d(e){if(!e?.type)return null;switch(e.type){case"range":return u.A.fromJSON(e);case"codedValue":return r.A.fromJSON(e);case"inherited":return h.fromJSON(e)}return null}},13069:(e,t,s)=>{s.d(t,{AG:()=>a,lk:()=>r,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function r(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${r().toUpperCase()}}`}function o(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},16271:(e,t,s)=>{s.d(t,{Ao:()=>n,KQ:()=>o});var i=s(4576),r=s(31756);function n(e){return 1/(r.j[e]||1)}const o=function(){const e=Object.keys(r.j);return(0,i.TF)(e,"decimal-degrees"),e.sort(),e}()},20437:(e,t,s)=>{s.d(t,{A:()=>f});var i,r=s(31635),n=s(66552),o=s(25482),a=s(91429),l=s(56507),h=s(8631),u=s(98453),c=s(36005),d=s(93223);const p=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=class extends o.o{static{i=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?p.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,r.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,r.Cg)([(0,a.MZ)()],f.prototype,"description",void 0),(0,r.Cg)([(0,c.w)("description")],f.prototype,"readDescription",null),(0,r.Cg)([(0,a.MZ)({types:h.g,json:{read:{reader:h.r},write:!0}})],f.prototype,"domain",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,r.Cg)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,r.Cg)([(0,d.e)(u.m)],f.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,r.Cg)([(0,c.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,r.Cg)([(0,a.$K)("esri.layers.support.Field")],f)},23323:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Fe});var i=s(31635),r=s(65529),n=s(74887),o=s(36708),a=s(91429),l=s(79897),h=s(16930),u=s(65864),c=s(4576),d=s(49186),p=s(53966),f=s(87992),m=s(70328),g=s(6518),y=s(50498),_=s(69397),v=s(27647);class x{constructor(e=null,t={},s,i,r=0){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=i,this.displayId=r}weakClone(){return new x(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId)}clone(){return new x(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId)}get usedMemory(){return 128+(0,_.lM)(this.attributes)+(this.geometry?.usedMemory??0)}ensureCentroid(e){return this.centroid??=(0,v.Q)(this.geometry&&(0,f.JR)(this.geometry)),this.centroid}}const w={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,s)=>new x((0,f.Nh)(y.gy.fromJSON(s),t),e.attributes,null,e.objectId),getGeometry:e=>e.geometry&&(0,f.JR)(e.geometry),getGeometryWithCurves:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};var C=s(51441);const b=(0,m.vt)();class M{constructor(e,t,s){this.geometryType=e,this.hasZ=t,this.hasM=s,this._boundsStore=new g.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=w}get usedMemory(){return this._usedMemory}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){const e=this._featuresById.size;let t=0;return this._featuresById.forEach(({geometry:e})=>{t+=e?e.vertexCount:0}),{featureCount:e,vertexCount:t}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,r]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:r,spatialReference:(0,C.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(c.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,m.Jt)(b,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void p.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(s?(e.displayId=s.displayId,i=this._boundsStore.get(t)??void 0,this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(s)??0):this.onFeatureAdd?.(e),!e.geometry)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);this._boundsStore.set(t,(0,f.NO)(e.geometry,i)),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return p.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(s)??0;const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,f.NO)(i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(s)??0,s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}var I=s(56390),S=s(87045),F=s(72802),T=s(61956),A=s(88625),P=s(66344),z=s(91869),E=s(86211),R=s(16271);function O(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new B(e,s)}return new Z}class Z{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class B{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new P.q(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(function(e,t,s){const{offset:i,unit:r}=s;if(null==i)return;const n=(0,E.G9)(t),o=i*((0,R.Ao)(r??"meters")/n);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,z.tE)(i,t.objectId,k).push(t);const[r,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(r,s);if((0,n.Te)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(r,l,o);const{drapedObjectIds:h,failedObjectIds:u}=l,c=[];for(const t of e){const{objectId:e}=t;h.has(e)&&"edge"===t.type&&(t.draped=!0),u.has(e)||c.push(t)}return c}_prepareQuery(e,t){const s=[],i=[];for(const[t,r]of e){const e=[];for(const s of r)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const r=j(e,t),n=this._alignmentsCache.get(r);null==n?s.push(t):i.push(new N(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},r){for(const e of r)e.apply();let n=0;const o=this._alignmentsCache;for(const{objectId:r,points:a}of e.pointsInFeatures){if(i.has(r)){n+=a.length;continue}const e=!s.has(r);for(const s of a){const i=j(r,s),a=t[n++];s.z=a,e&&o.put(i,a,1)}}}}class N{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function j(e,{x:t,y:s,z:i,spatialReference:r}){return`${e}-${t}-${s}-${i??0}}-wkid:${r?.wkid}`}function k(){return[]}class L{filter(e,t){return t}notifyElevationSourceChange(){}}class V{filter(e,t){const{point:s,distance:i}=e,{z:r}=s;if(null==r)return t;if(0===t.length)return t;const n=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,n).filter(Y);return o.sort(H),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":G(i,t,s);continue;case"vertex":X(i,t,s);continue}return e}}function Y(e){return e.distance<=1}function q(e=!1){return e?new V:new L}function G(e,t,{x:s,y:i,z:r}){const{start:n,end:o,target:a}=e;e.draped||function(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,o=i.z-s.z,a=r*r+n*n+o*o,l=(t.x-s.x)*r+(t.y-s.y)*n+o*(t.z-s.z),h=Math.min(1,Math.max(0,l/a)),u=s.x+r*h,c=s.y+n*h,d=s.z+o*h;e.x=u,e.y=c,e.z=d}(a,t,n,o);const l=(t.x-a.x)/s,h=(t.y-a.y)/i,u=(t.z-a.z)/r;e.distance=Math.sqrt(l*l+h*h+u*u)}function X(e,t,{x:s,y:i,z:r}){const{target:n}=e,o=(t.x-n.x)/s,a=(t.y-n.y)/i,l=(t.z-n.z)/r,h=Math.sqrt(o*o+a*a+l*l);e.distance=h}function H(e,t){return e.distance-t.distance}var J=s(4718),U=s(799);function D(e=!1,t){return e?new W(t):new $}class ${async fetch(){return[]}notifySymbologyChange(){}}class W{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new P.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],r=this._candidatesCache;for(const t of e){const e=K(t),n=r.get(e);if(n)for(const e of n)i.push((0,J.o8)(e));else s.push(t),r.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,n.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const h=[],{length:u}=a;for(let e=0;e<u;++e){const t=a[e],i=K(s[l[e]]),n=r.get(i);n.push(t),r.put(i,n,n.length),h.push((0,J.o8)(t))}return i.concat(h)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function K(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,U.Wm)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,r=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,U.Wm)(r).toString()}default:return""}}var Q=s(69622),ee=s(60999),te=s(3483),se=s(13069),ie=s(5443),re=s(19419),ne=s(90708),oe=s(92722),ae=s(54339);class le{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new le;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}var he=s(60694),ue=s(69418),ce=s(80893);class de{constructor(e,t){this.key=e,this.resolution=t,this.state={type:0},this.alive=!0}process(e){switch(this.state.type){case 0:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 1:case 3:break;case 2:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 4:this.state=this._goToDone(this.state,e)}return null}get debugInfo(){return{key:this.key,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case 0:case 1:return 0;case 2:return this.state.featureCount;case 3:return this.state.previous.featureCount;case 4:return this.state.features.length;case 5:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case 0:return"created";case 1:return"fetch-count";case 2:return"fetched-count";case 3:return"fetch-features";case 4:return"fetched-features";case 5:return"done"}}_gotoFetchCount(e,t){return{type:1,previous:e,task:(0,ee.UT)(async e=>{const s=await(0,ee.DZ)(t.fetchCount(this,e));1===this.state.type&&(this.state=function(e,t){return{type:2,featureCount:t,previous:e}}(this.state,s.ok?s.value:1/0))})}}_gotoFetchFeatures(e,t){return{type:3,previous:e,task:(0,ee.UT)(async s=>{const i=await(0,ee.DZ)(t.fetchFeatures(this,e.featureCount,s));3===this.state.type&&(this.state=function(e,t){return{type:4,previous:e,features:t}}(this.state,i.ok?i.value:[]))})}}_goToDone(e,t){return t.finish(this,e.features),{type:5,previous:e}}reset(){const e=this.state;switch(this.state={type:0},e.type){case 0:case 2:case 4:case 5:break;case 1:case 3:e.task.abort()}}}let pe=class extends Q.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,te.KC)(e,this._mandatoryOutFields);(0,te.aI)(s,t)||(this._set("outFields",s),(0,te.Yy)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=new Array,this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new l.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>(0,c.aI)(e,t,({id:e},{id:t})=>e===t)}),this.addHandles((0,o.z7)(()=>!this.suspended,()=>this._process()))}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(({id:e})=>e)??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},s=(0,ee.UT)(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(e){(0,n.QP)(e),p.A.getLogger(this).warn("Failed to apply edits",e)}});this.addHandles(s),await this._updatingHandles.addPromise(s.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,he.Wo)(this.url))return;const e=(0,ee.UT)(async e=>{try{const t=await(0,ce.Jf)(this.url,new T.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=ie.A.fromJSON(t?.extent)}catch(e){(0,n.QP)(e),p.A.getLogger(this).warn("Failed to fetch data extent",e)}});this._updatingHandles.addPromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const s=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=s:e.prepend(s)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.key),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<ge}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(ye/(s*s))<_e}_ensureFetchAllCounts(e){let t=!0;for(const s of this._pendingTiles.values())s.state.type<2&&this._updatingHandles.addPromise(s.process(e)),s.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new de(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:me,signal:t})}async _fetchFeatures(e,t,s){let i=0;const r=[];let n=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:h,exceededTransferLimit:u}=await this._queryFeatures(a,s);l&&(i+=a.num),n+=h.length;for(const e of h)r.push(e);if(o=t-n,!l||!u||o<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;const r=e?(0,se.AG)(e):e;if(this.store.featureStore.forEach(e=>{r===(0,se.AG)(e.attributes[t])&&(i=e.objectId??e.attributes[s])}),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}async _queryFeatures(e,t){return 0===e.num?new le:this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,i=await(0,ce.IJ)(this.url,e,new ue.S({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:me,signal:t});return function(e){const t=y.gy.fromJSON(e.geometryType),s=new le;return s.globalIdFieldName=e.globalIdFieldName,s.geohashFieldName=e.geohashFieldName,s.geometryProperties=e.geometryProperties,s.geometryType=e.geometryType,s.spatialReference=e.spatialReference,s.hasZ=e.hasZ,s.hasM=e.hasM,s.features=e.features.map(e=>function(e,{geometry:t,attributes:s,centroid:i,objectId:r,displayId:n}){return new x(t&&(0,f.Nh)(e,t),s,i,r,n)}(t,e)),s.fields=e.fields,s.transform=e.transform,s.exceededTransferLimit=e.exceededTransferLimit,s.uniqueIdField=e.uniqueIdField,s.queryGeometry=e.queryGeometry&&(0,f.Nh)(t,e.queryGeometry),s.queryGeometryType=e.queryGeometryType,s}((0,ne.eY)(i))}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this;return function({exceededTransferLimit:e,features:t,fields:s,geometryType:i,hasM:r,hasZ:n,spatialReference:o,transform:a},l){const h=new le;h.exceededTransferLimit=e??!1;for(const e of t??[]){let t,s;i&&(t=e.geometry&&(0,f.ME)(e.geometry),s=e.centroid&&new oe.A([],[e.centroid.x,e.centroid.y]));const r=(0,ae.W)(e,l);h.features.push(new x(t,e.attributes,s,r))}return h.fields=s??h.fields,h.geometryType=i??null,h.hasM=r??!1,h.hasZ=n??!1,h.spatialReference=o??null,h.transform=a??null,h}(await(0,ce.eW)(this.url,e,s,{query:this._configuration.customParameters,timeout:me,signal:t}),{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.key?this.store.getAttributesForTile(e?.key?.id):null,i=(0,te.KC)((0,te.iv)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,t.returnTrueCurves??=this.capabilities.data.supportsTrueCurve,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new T.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,re.w1)(e.key.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?T.A.MAX_MAX_RECORD_COUNT_FACTOR:1,h=l*((a||r)&&n?n:o||fe);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/h)),e.num=Math.min(s,e.maxRecordCountFactor*h)):e.num=Math.min(s,h),!0}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"url",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"objectIdField",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"globalIdField",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"capabilities",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"sourceSpatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"store",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],pe.prototype,"_minimumVerticesPerFeature",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"_mandatoryOutFields",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"outFields",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"suspended",void 0),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"_historicMoment",void 0),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"filter",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"customParameters",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],pe.prototype,"_configuration",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"tileInfo",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"tileSize",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"tilesOfInterest",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],pe.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],pe.prototype,"availability",void 0),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"hasZ",null),pe=(0,i.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],pe);const fe=2e3,me=6e5,ge=1e6,ye=25,_e=1;s(44208);class ve{constructor(){this._store=new Map,this._priorities=new Map}get size(){return this._store.size}setPriorityOrderByKey(e){this._priorities.clear();for(let t=e.length-1;t>=0;t--)this._priorities.set(e[t],e.length-t)}hasLowerPriority(e){const t=this._priorities.get(e);if(null==t)return!0;for(const[e]of this._store){const s=this._priorities.get(e);if(null==s||s<t)return!0}return!1}someFromLowestToHighestPriority(e){const{_priorities:t}=this;for(const[s,i]of this._store)if(!t.has(s)&&e(i,s))return!0;for(const[s]of t){const t=this._store.get(s);if(t&&e(t,s))return!0}return!1}set(e,t){this._store.set(e,t)}delete(e){return this._store.delete(e)}get(e){return this._store.get(e)}has(e){return this._store.has(e)}clear(){this._store.clear()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}let xe=class extends Q.A{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new g.F,this._tiles=new ve,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,re.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>(0,te.E$)(e,t),new Set(Object.keys(s[0]?.attributes??[]))),r=this._memoryLimitExceeded;this._addTileStorage(e,new Set(s.map(e=>e.objectId)),i),r&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:s}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<s||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const s of e.objectIds)if(1===this._refCounts.get(s)){const e=this.featureStore.getFeature(s);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}return t}_hasAttributesForTile(e,t){if(e){const s=this._tiles.get(e);if(s)return!s.objectIds.size||(0,te.Yy)(t,s.attributeKeys)}return!1}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new we(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)1===this._unreferenceFeature(s)&&t.push(s);this.featureStore.removeManyById(t);const s=e.key.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const{features:i}=await t(e,s);for(const e of i){if(this._tmpBoundingRect.fill(0),null==e.geometry||0===e.geometry.vertexCount)continue;(0,re.Ie)(this._tmpBoundingRect);const t=(0,f.NO)(e.geometry,this._tmpBoundingRect);this._tileBounds.forEachInBounds(t,t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.key.id,s.objectIds.size))})}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,re.HY)((0,re.VY)(this.extent,this._tmpBoundingRect),e.extent))return new be(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new be(e);if(this._hasAttributesForTile(e.id,s))return new be(e);const i=this._createTileTree(e,this.tileInfo);return this._simplify(i,t,null,0,1),this._collectMissingTiles(e,i,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){let r=this._tileFeatureCounts.get(e.id);return null!=r||(r=await(0,ce.gW)(t,s,i),this._tileFeatureCounts.set(e.id,r)),r}_createTileTree(e,t){const s=new Ce(e.level,e.row,e.col);return t.updateTileInfo(s,1),this._tileBounds.forEachInBounds(e.extent,i=>{const r=this._tiles.get(i)?.key;r&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,r=s?t:e,n=1<<r.level-i.level;return Math.floor(r.row/n)===i.row&&Math.floor(r.col/n)===i.col}(e,r)&&this._populateChildren(s,r,t,this._tileFeatureCounts.get(r.id)||0)}),s}_populateChildren(e,t,s,i){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,o=t.col>>r,a=e.row<<1,l=o-(e.col<<1)+(n-a<<1),h=e.children[l];if(null!=h)this._populateChildren(h,t,s,i);else{const r=new Ce(e.level+1,n,o);s.updateTileInfo(r,1),e.children[l]=r,this._populateChildren(r,t,s,i)}}_simplify(e,t,s,i,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=s&&(s.children[i]=null),n);const o=r/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/n<Ie&&(this._purge(e),null!=s&&(s.children[i]=null),l=n),l}_mergeChildren(e){const t=new Set;let s;this._forEachLeaf(e,e=>{const i=this._tiles.get(e.id);if(i){s=s?(0,te.E$)(s,i.attributeKeys):new Set(i.attributeKeys);for(const e of i.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const r=new Me(s,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,i),r.info}_collectMissingTilesRecurse(e,t,s,i){const r=this._tiles.has(e.id)&&!this._hasAttributesForTile(e.id,i);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const n=s/2;for(let s=0;s<e.children.length;s++){const r=e.children[s];null==r?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),n):this._collectMissingTilesRecurse(r,t,n,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],xe.prototype,"featureStore",void 0),(0,i.Cg)([(0,a.MZ)()],xe.prototype,"tileInfo",void 0),(0,i.Cg)([(0,a.MZ)()],xe.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)()],xe.prototype,"maximumByteSize",void 0),xe=(0,i.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],xe);class we{constructor(e,t,s){this.key=e,this.objectIds=t,this.attributeKeys=s}}class Ce extends F.U{constructor(){super(...arguments),this.isLeaf=!1,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class be{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,re.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class Me{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new be(t),null!=s&&(this._extent=(0,re.VY)(s))}addMissing(e,t,s,i){const r=new F.U(e,t,s);this._tileInfo.updateTileInfo(r,1)&&(null==this._extent||(0,re.HY)(this._extent,r.extent))&&(this.info.missingTiles.push({data:r,resolution:i}),this.info.coveredArea-=(0,re.Wc)(r.extent))}}const Ie=.18751;let Se=class extends r.nJ{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,n.Tw)(),this._elevationAligner=O(),this._elevationFilter=q(),this._symbologyCandidatesFetcher=D(),this._updatingHandles=new l.U,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,n.Te)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,n.Te)(t),i}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:r}=e.serviceInfo,{hasZ:n}=e,a=h.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new M(t,n,!1),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new I.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:r,hasZ:n,hasM:!1,featureIdInfo:{type:"object-id",fieldName:s},timeInfo:i}),this._featureFetcher=new pe({store:new xe({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:h.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=O(l,{elevationInfo:null!=e.elevationInfo?A.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=q(l),this.addHandles([(0,o.wB)(()=>this._featureFetcher.availability,e=>this.emit("notify-availability",{availability:e}),o.OH),(0,o.wB)(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),Te}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.suspended=e,Te}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.outFields=new Set(e??[]),Te}async fetchCandidates(e,t){await this._whenSetup.promise,(0,n.Te)(t);const s=function(e,t){const s=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:s}};const{distance:i,units:r,spatialRel:n,where:o,timeExtent:a,objectIds:l}=e.filter,h={geometry:e.filter.geometry?(0,u.rS)(e.filter.geometry):void 0,distance:i,units:r,spatialRel:n,timeExtent:a,objectIds:l,returnZ:s,where:o??"1=1"};return{...e,query:h}}(e,this._featureStore.hasZ),i=t?.signal,r=await this._queryEngine.executeQueryForSnapping(s,i);(0,n.Te)(i);const o=await this._elevationAligner.alignCandidates(r.candidates,h.A.fromJSON(e.point.spatialReference)??h.A.WGS84,i);(0,n.Te)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,n.Te)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles.map(e=>F.U.fromJSON(e)),this._featureFetcher.tileInfo=null!=e.tileInfo?S.A.fromJSON(e.tileInfo):null,Te}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.refresh(),Te}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await(0,o.C_)(()=>!this.updating,t),(0,n.Te)(t),Te}async getDebugInfo(e,t){return(0,n.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,n.Te)(t),Te}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),Te}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Te}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Te}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=D(e,this._getSymbologyCandidates),Te}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?T.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i.Cg)([(0,a.MZ)({readOnly:!0})],Se.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)()],Se.prototype,"_isInitializing",void 0),Se=(0,i.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],Se);const Fe=Se,Te={result:{}}},31756:(e,t,s)=>{s.d(t,{j:()=>n});var i=s(86211),r=s(79258);const n={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",r.$O.radius)}},36708:(e,t,s)=>{s.d(t,{C_:()=>d,OH:()=>m,Vh:()=>g,on:()=>c,pc:()=>y,wB:()=>l,z7:()=>h});var i=s(37955),r=s(36563),n=s(97768),o=s(74887),a=s(14012);function l(e,t,s={}){return u(e,t,s,p)}function h(e,t,s={}){return u(e,t,s,f)}function u(e,t,s={},i){let r=null;const o=s.once?(e,s)=>{i(e)&&((0,n.xt)(r),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(r=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return r}function c(e,t,s,o={}){let a=null,h=null,u=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(e){o.once&&o.once&&(0,n.xt)(u),s(e)}const p=l(e,(e,s)=>{c(),(0,i.wb)(e)&&(a=e,h=(0,i.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return u=(0,r.hA)(()=>{p.remove(),c()}),u}function d(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((i,n)=>{a=(0,r.vE)([(0,o.u7)(s,()=>{l(),n((0,o.NK)())}),u(e,e=>{l(),i(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}s(80559);const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},39357:(e,t,s)=>{s.d(t,{A:()=>a});var i,r=s(31635),n=s(25482),o=s(91429);let a=i=class extends n.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,r.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=i=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},41628:(e,t,s)=>{s.d(t,{A:()=>l});var i,r=s(31635),n=s(91429),o=s(76357),a=s(93223);let l=class extends o.A{static{i=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new i({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]},isRequired:!0}}})],l.prototype,"maxValue",void 0),(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]},isRequired:!0}}})],l.prototype,"minValue",void 0),(0,r.Cg)([(0,a.e)({range:"range"})],l.prototype,"type",void 0),l=i=(0,r.Cg)([(0,n.$K)("esri.layers.support.RangeDomain")],l)},48526:(e,t,s)=>{s.d(t,{A:()=>f});var i,r=s(31635),n=s(4718),o=s(91429),a=s(5443),l=s(91075),h=s(86738),u=s(16930),c=s(90634),d=s(56993),p=s(43937);let f=i=class extends l.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:s,hasZ:i,spatialReference:r}=e;switch(t??=[],t?.at(0)?.length){case 4:i??=!0,s??=!0;break;case 3:i??=!0!==s,s??=!i;break;default:i??=!1,s??=!1}return r??=u.A.WGS84,{...e,hasM:s,hasZ:i,points:t,spatialReference:r}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const e=(0,c.ge)(this);return e?new a.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,n.o8)(this.points)}clone(){const{points:e,spatialReference:t,hasM:s,hasZ:r}=this;return new i({points:(0,n.o8)(e),spatialReference:t.clone(),hasM:s,hasZ:r})}addPoint(e){return(0,d.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;const t=this.points[e],s={x:t[0],y:t[1],spatialReference:this.spatialReference};let i=2;return this.hasZ&&(s.z=t[2],i=3),this.hasM&&(s.m=t[i]),new h.A(s)}removePoint(e){if(!this._validateInputs(e))return null;const t=new h.A(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)?((0,d.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points"),this):this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],f.prototype,"points",void 0),(0,r.Cg)([(0,p.K)("points")],f.prototype,"writePoints",null),f=i=(0,r.Cg)([(0,o.$K)("esri.geometry.Multipoint")],f),f.prototype.toJSON.isDefaultToJSON=!0},50498:(e,t,s)=>{s.d(t,{Ye:()=>c,gy:()=>u,iI:()=>p,yR:()=>d});var i=s(66552),r=s(5443),n=s(91075),o=s(48526),a=s(86738),l=s(39829),h=s(82799);const u=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:n.A,key:"type",typeMap:{extent:r.A,multipoint:o.A,point:a.A,polyline:h.A,polygon:l.A}},p=new i.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0})},53177:(e,t,s)=>{s.d(t,{A:()=>u});var i,r=s(31635),n=s(4718),o=s(91429),a=s(39357),l=s(76357),h=s(93223);let u=class extends l.A{static{i=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some(e=>(String(e.code)===s&&(t=e.name),!!t))}return t}clone(){return new i({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,r.Cg)([(0,o.MZ)({type:[a.A],json:{write:{isRequired:!0}}})],u.prototype,"codedValues",void 0),(0,r.Cg)([(0,h.e)({codedValue:"coded-value"})],u.prototype,"type",void 0),u=i=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],u)},58501:(e,t,s)=>{s.d(t,{q:()=>r});var i=s(62815);function r(e,t,s){if(!s?.features||!s.hasZ)return;const r=(0,i.N)(s.geometryType,t,e.outSpatialReference);if(r)for(const e of s.features)r(e.geometry)}},60408:(e,t,s)=>{function i(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function r(e){return void 0!==e.points}function n(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function h(e){return e?n(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":i(e)?"esriGeometryEnvelope":r(e)?"esriGeometryMultipoint":null:null}function u(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function c(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}s.d(t,{$B:()=>h,Bi:()=>a,Pv:()=>u,Rg:()=>o,U9:()=>r,W0:()=>c,ZC:()=>i,fT:()=>n,uW:()=>l})},60999:(e,t,s)=>{s.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>u,UT:()=>m,aD:()=>y,jJ:()=>h});var i=s(31635),r=s(69622),n=s(97768),o=s(74887),a=s(10107),l=s(64108);function h(e,t,s){return(0,o.Lx)(e.map((e,i)=>t.apply(s,[e,i])))}async function u(e,t,s){return(await(0,o.Lx)(e.map((e,i)=>t.apply(s,[e,i])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function f(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function m(e,t){return new g(e,t)}let g=class extends r.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=e(s),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,a.MZ)()],g.prototype,"value",null),(0,i.Cg)([(0,a.MZ)()],g.prototype,"error",null),(0,i.Cg)([(0,a.MZ)()],g.prototype,"finished",null),(0,i.Cg)([(0,a.MZ)()],g.prototype,"promise",void 0),(0,i.Cg)([(0,a.MZ)()],g.prototype,"_result",void 0),g=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],g);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},62815:(e,t,s)=>{s.d(t,{N:()=>o});var i=s(86211),r=s(73941),n=s(21325);function o(e,t,s){if(null==t||null==s||s.vcsWkid||(0,n.aI)(t,s)||(0,r.xP)(t)||(0,r.xP)(s))return;const o=(0,i.G9)(t)/(0,i.G9)(s);if(1!==o)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const s of e.paths)for(const e of s)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const s of e.rings)for(const e of s)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const s of e.points)s.length>2&&(s[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return}}},65864:(e,t,s)=>{s.d(t,{rS:()=>u,xD:()=>d});var i=s(5443),r=s(91075),n=s(48526),o=s(86738),a=s(39829),l=s(82799),h=s(60408);function u(e){return null==e?null:e instanceof r.A?e:(0,h.fT)(e)?o.A.fromJSON(e):(0,h.Rg)(e)?l.A.fromJSON(e):(0,h.Bi)(e)?a.A.fromJSON(e):(0,h.U9)(e)?n.A.fromJSON(e):(0,h.ZC)(e)?i.A.fromJSON(e):null}const c={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:i.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:a.A};function d(e){return e&&c[e]||null}},66344:(e,t,s)=>{s.d(t,{q:()=>a});const i=!!(0,s(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,r,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==s&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,s,r,0);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,s,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new n(s,r,l)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const s=this._db.get(t);if(!s)return;this._size-=s.size,e.size-=s.size;let i=s.entry.usedMemory;for(;i>this._maxSize;){const e=this._notifyRemove(t,s.entry,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach((e,i)=>{const r=e.lifetime;s[r]=(s[r]||0)+e.size,this._users.forEach(s=>{const{id:r,name:n}=s;if(i.startsWith(r)){const s=t[n]||0;t[n]=s+e.size}})});const i={};this._users.forEach(e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[s]||0;t[s]=r,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"});const r=Object.keys(t);r.sort((e,s)=>t[s]-t[e]),r.forEach(s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]);for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,s]of this._db)t.startsWith(e.id)&&(yield s.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){const r=this._users.get(e.split(o)[0])?.removeFunc,n=r?.(t,i,s);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const s=t??this;if(s.size<=e)return;const i=t?.id;let r=!0;for(;r;){r=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!i||n.startsWith(i))){const i=t??this._users.get(n.split(o)[0]);if(this._purgeItem(n,a,i),s.size<=.9*e)return;r||=this._db.has(n)}}for(const[r,n]of this._db)if(!i||r.startsWith(i)){const i=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,n,i),s.size<=.9*e)return}}_purgeItem(e,t,s){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class n{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}const o=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new r,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69540:(e,t,s)=>{s.d(t,{OU:()=>u,Pw:()=>c});var i=s(31635),r=s(69622),n=(s(44208),s(4718)),o=(s(53966),s(97768)),a=s(88620),l=s(64108);const h=Symbol("ClonableMixin"),u=e=>{var t;const s=e;let r=class extends s{constructor(){super(...arguments),this[t]=!0}static{t=h}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const s=t.metadata,i=t.store,r={},l=new Map;for(const t in s){const o=s[t],a=i?.originOf(t),h=o.clonable;if(o.readOnly||!1===h||7!==a&&0!==a&&5!==a&&4!==a)continue;const u=this[t];let c=null;if("function"==typeof h)c=h(u,e);else if("reference"===h)c=u;else if(c=(0,n.TU)(u,e),null!=u&&null==c)continue;0===a?l.set(t,c):r[t]=c}const h=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(h)?.store;if(e)for(const[t,s]of l)e.set(t,s,0)}return h}};return r=(0,i.Cg)([(0,l.$)("esri.core.Clonable")],r),r},c=u(r.A)},72802:(e,t,s)=>{s.d(t,{U:()=>r});var i=s(19419);class r{constructor(e,t,s,r=(0,i.vt)()){this._level=e,this._row=t,this._col=s,this.extent=r}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new r(e.level,e.row,e.col,e.extent)}}},75503:(e,t,s)=>{s.d(t,{EC:()=>I,wq:()=>a});var i=s(4576),r=s(21818),n=(s(44208),s(15142)),o=s(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),C.prune(),b.prune(),M.prune()}all(e){l(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(v(e,s))for(w.clear();s;){for(let r=0,n=s.children.length;r<n;r++){const n=s.children[r],o=s.leaf?i(n):n;v(e,o)&&(s.leaf?t(n):_(e,o)?l(n,t):w.push(n))}s=w.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!v(e,t))return!1;for(w.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],n=t.leaf?s(r):r;if(v(e,n)){if(t.leaf||_(e,n))return!0;w.push(r)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,o=0,a=!1;const l=this._toBBox(e);for(b.clear(),M.clear();s||b.length>0;){if(s||(s=b.pop(),n=b.data[b.length-1],o=M.pop()??0,a=!0),s.leaf&&(t=(0,i.qh)(s.children,(0,r.z)(e),s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),b.push(s),this._condense(b),this;a||s.leaf||!_(s,l)?n?(o++,s=n.children[o],a=!1):s=null:(b.push(s),M.push(o),o=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const r=s-t+1;let n=this._maxEntries;if(r<=n){const i=new F(e.slice(t,s+1));return h(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(i-1)));const o=new T([]);o.height=i;const a=Math.ceil(r/n),l=a*Math.ceil(Math.sqrt(n));x(e,t,s,l,this._compareMinX);for(let r=t;r<=s;r+=l){const t=Math.min(r+l-1,s);x(e,r,t,a,this._compareMinY);for(let s=r;s<=t;s+=a){const r=Math.min(s+a-1,t);o.children.push(this._build(e,s,r,i-1))}}return h(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,r=s?e:i(e);b.clear();const n=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=f(o),l=g(e,o)-a;l<r?(r=l,i=a<i?a:i,s=o):l===r&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(r,this._data,t,b);for(n.children.push(e),c(n,r);t>=0&&b.data[t].children.length>this._maxEntries;)this._split(b,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)c(t.data[i],e)}(r,b,t)}_split(e,t){const s=e.data[t],i=s.children.length,r=this._minEntries;this._chooseSplitAxis(s,r,i);const n=this._chooseSplitIndex(s,r,i);if(!n)return;const o=s.children.splice(n,s.children.length-n),a=s.leaf?new F(o):new T(o);a.height=s.height,h(s,this._toBBox),h(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,h(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,r,n;i=r=1/0;for(let o=t;o<=s-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,s,this._toBBox),l=y(t,a),h=f(t)+f(a);l<i?(i=l,n=o,r=h<r?h:r):l===i&&h<r&&(r=h,n=o)}return n}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,r)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const r=this._toBBox,n=u(e,0,t,r),o=u(e,s-t,s,r);let a=m(n)+m(o);for(let i=t;i<s-t;i++){const t=e.children[i];c(n,e.leaf?r(t):t),a+=m(n)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];c(o,e.leaf?r(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const r=e.data[t-1],n=r.children;n.splice((0,i.qh)(n,s,n.length,r.indexHint),1)}else this.clear();else h(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let s=e;for(C.clear();s;){if(!0===s.leaf)for(const e of s.children)t((0,r.z)(e));else C.pushArray(s.children);s=C.pop()??null}}function h(e,t){u(e,0,e.children.length,t,e)}function u(e,t,s,i,r){r||(r=new F([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<s;o++)n=e.children[o],c(r,e.leaf?i(n):n);return r}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-s)*Math.max(0,n-i)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,s,i,r){const n=[t,s];for(;n.length;){const t=n.pop(),s=n.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,o.q)(e,a,s,t,r),n.push(s,a,a,t)}}const w=new n.A,C=new n.A,b=new n.A,M=new n.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class F extends S{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends S{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,s)=>{s.d(t,{A:()=>h});var i=s(31635),r=s(66552),n=s(25482),o=s(91429),a=s(93223);const l=new r.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let h=class extends n.o{constructor(e){super(e),this.name=null,this.type=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,i.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],h.prototype,"type",void 0),h=(0,i.Cg)([(0,o.$K)("esri.layers.support.Domain")],h)},79677:(e,t,s)=>{s.d(t,{A:()=>c});var i,r=s(31635),n=s(25482),o=s(88930),a=s(91429),l=s(98623),h=s(36005),u=s(43937);let c=class extends n.o{static{i=this}static get allTime(){return d}static get empty(){return p}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,s=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,r=e.end?.getTime()??e.end;return t===i&&s===r}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime)return this.clone();let s=this.start;s&&(s=(0,o.lL)(s,e,t));let r=this.end;if(r){const s=(0,o.lL)(r,e,t);r=r.getTime()===s.getTime()?s:(0,o.S1)(s,1,e,t)}return new i({start:s,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return r>=t&&r<=s?o=r:t>=r&&t<=n&&(o=t),s>=r&&s<=n?a=s:n>=t&&n<=s&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,s=l.qU){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:n,end:a}=this;return null!=n&&(r.start=(0,o.S1)(n,e,t,s)),null!=a&&(r.end=(0,o.S1)(a,e,t,s)),r}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,r.Cg)([(0,h.w)("end")],c.prototype,"readEnd",null),(0,r.Cg)([(0,u.K)("end")],c.prototype,"writeEnd",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,r.Cg)([(0,h.w)("start")],c.prototype,"readStart",null),(0,r.Cg)([(0,u.K)("start")],c.prototype,"writeStart",null),c=i=(0,r.Cg)([(0,a.$K)("esri.time.TimeExtent")],c);const d=new c,p=new c({start:void 0,end:void 0})},79897:(e,t,s)=>{s.d(t,{U:()=>u});var i=s(31635),r=s(69622),n=s(36563),o=s(36708),a=s(76030),l=s(10107),h=s(64108);let u=class extends r.A{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,s={}){return this._installWatch(e,t,s,o.wB)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o.z7)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const r=++this._handleId;return this.addHandles([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.OH),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],r),(0,n.hA)(()=>this.removeHandles(r))}addPromise(e){if(null==e)return e;const t=++this._handleId;this.addHandles((0,n.hA)(()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this.hasHandles(c)||this._set("updating",!1))}),t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this.removeHandles(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,s={},i){const r=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,r);const o=i(e,t,s);return this.addHandles(o,r),(0,n.hA)(()=>this.removeHandles(r))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.wB)(e,s,{sync:!0,equals:()=>!1});return this.addHandles(i,t),i}_createSyncUpdatingCallback(){return()=>{this.removeHandles(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles((0,a._)(()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(c))}),c)}}};(0,i.Cg)([(0,l.MZ)({readOnly:!0})],u.prototype,"updating",void 0),u=(0,i.Cg)([(0,h.$)("esri.core.support.UpdatingHandles")],u);const c=-42},82799:(e,t,s)=>{s.d(t,{A:()=>f});var i,r=s(31635),n=s(4718),o=s(91429),a=s(5443),l=s(91075),h=s(86738),u=s(16930),c=s(90634),d=s(56993),p=s(43937);let f=i=class extends l.A{constructor(e){super(function(e){if(!e)return;let{paths:t,hasM:s,hasZ:i,spatialReference:r}=e;switch(t??=[],function(e){return"number"==typeof e[0]?.[0]}(t)&&(t=[t]),t[0]?.[0]?.length){case 4:i??=!0,s??=!0;break;case 3:i??=!0!==s,s??=!i;break;default:i??=!1,s??=!1}return r??=u.A.WGS84,{...e,hasM:s,hasZ:i,paths:t,spatialReference:r}}(e)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(e,t){t.curvePaths=(0,n.o8)(e)}get extent(){const e=(0,c.Z3)(this),{spatialReference:t}=this;return e?new a.A({...e,spatialReference:t}):null}writePaths(e,t){t.paths=(0,n.o8)(this.paths)}addPath(e){if(!e)return;const t=this.paths,s=t.length;if(function(e){return!Array.isArray(e[0])}(e)){const i=[];for(let t=0,s=e.length;t<s;t++)i[t]=e[t].toArray();t[s]=i}else t[s]=e.slice();return this.notifyChange("paths"),this}clone(){const e=new i;return e.spatialReference=this.spatialReference,e.paths=(0,n.o8)(this.paths),e.curvePaths=(0,n.o8)(this.curvePaths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;const s=this.paths[e][t],i=this.hasZ,r=this.hasM;return i&&!r?new h.A(s[0],s[1],s[2],void 0,this.spatialReference):r&&!i?new h.A(s[0],s[1],void 0,s[2],this.spatialReference):i&&r?new h.A(s[0],s[1],s[2],s[3],this.spatialReference):new h.A(s[0],s[1],this.spatialReference)}insertPoint(e,t,s){return this._validateInputs(e,t,!0)?((0,d.h)(this,s),Array.isArray(s)||(s=s.toArray()),this.paths[e].splice(t,0,s),this.notifyChange("paths"),this):this}removePath(e){if(!this._validateInputs(e,null))return null;const t=this.paths.splice(e,1)[0],s=this.spatialReference,i=t.map(e=>new h.A(e,s));return this.notifyChange("paths"),i}removePoint(e,t){if(!this._validateInputs(e,t))return null;const s=new h.A(this.paths[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("paths"),s}setPoint(e,t,s){return this._validateInputs(e,t)?((0,d.h)(this,s),Array.isArray(s)||(s=s.toArray()),this.paths[e][t]=s,this.notifyChange("paths"),this):this}_validateInputs(e,t,s=!1){if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){const i=this.paths[e];if(s&&(t<0||t>i.length))return!1;if(!s&&(t<0||t>=i.length))return!1}return!0}toJSON(e){return this.write({},e)}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],f.prototype,"curvePaths",void 0),(0,r.Cg)([(0,p.K)("curvePaths")],f.prototype,"writeCurvePaths",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],f.prototype,"paths",void 0),(0,r.Cg)([(0,p.K)("paths")],f.prototype,"writePaths",null),f=i=(0,r.Cg)([(0,o.$K)("esri.geometry.Polyline")],f),f.prototype.toJSON.isDefaultToJSON=!0},87045:(e,t,s)=>{s.d(t,{A:()=>v});var i,r=s(31635),n=s(66552),o=s(25482),a=s(86211),l=s(91429),h=s(56507),u=s(86738),c=s(16930),d=s(21325),p=s(28735),f=s(91806),m=s(72802),g=s(36005),y=s(43937);const _=new n.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let v=class extends o.o{static{i=this}static create(e={}){const{resolutionFactor:t=1,scales:s,size:r=256,spatialReference:n=c.A.WebMercator,numLODs:o=24}=e;if(!(0,d.fn)(n)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new f.A({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new f.A({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new u.A(0,0,n),size:[r,r],spatialReference:n})}const l=(0,d.Vp)(n),h=e.origin?new u.A({x:e.origin.x,y:e.origin.y,spatialReference:n}):new u.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),p=1/(39.37*(0,a.GA)(n)*96),m=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*p;m.push(new f.A({level:e,scale:t,resolution:i}))}else{let e=(0,d.EA)(n)?512/r*591657527.5917094:256/r*591657527.591555;const s=Math.ceil(o/t);m.push(new f.A({level:0,scale:e,resolution:e*p}));for(let i=1;i<s;i++){const s=e/2**t,r=s*p;m.push(new f.A({level:i,scale:s,resolution:r})),e=s}}return new i({dpi:96,lods:m,origin:h,size:[r,r],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,d.Vp)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return u.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],r=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach(e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,r[e.level]=e})),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],r=t[i+1];if(s<=e)return i;if(r===e)return i+1;if(s>e&&r<e)return i+Math.log(s/e)/Math.log(s/r)}return i}tileAt(e,t,s,i){const r=this.lodAt(e);if(!r)return null;let n,o;if("number"==typeof t)n=t,o=s;else if((0,d.aI)(t.spatialReference,this.spatialReference))n=t.x,o=t.y,i=s;else{const e=(0,p.Cv)(t,this.spatialReference);if(null==e)return null;n=e.x,o=e.y,i=s}const a=r.resolution*this.size[0],l=r.resolution*this.size[1];return i??=new m.U(0,0,0),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((n-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let s=this.lodAt(e.level);if(!s&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return!1;const i=e.level-s.level,r=s.resolution*this.size[0]/2**i,n=s.resolution*this.size[1]/2**i;return e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*n,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+n,!0}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,r=i*this.size[0],n=i*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+r,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const s=[],r=this.lods.length-t;for(let e=0;e<r;e++){const i=e+t,{scale:r,resolution:n}=i>=0?this.lods[i]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};s.push(new f.A({level:e,scale:r,resolution:n}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"compressionQuality",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"dpi",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],v.prototype,"format",void 0),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],v.prototype,"isWrappable",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],v.prototype,"origin",void 0),(0,r.Cg)([(0,g.w)("origin")],v.prototype,"readOrigin",null),(0,r.Cg)([(0,l.MZ)({type:[f.A],value:null,json:{write:!0}})],v.prototype,"lods",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],v.prototype,"scales",void 0),(0,r.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],v.prototype,"size",void 0),(0,r.Cg)([(0,g.w)("size",["rows","cols"])],v.prototype,"readSize",null),(0,r.Cg)([(0,y.K)("size",{cols:{type:h.jz},rows:{type:h.jz}})],v.prototype,"writeSize",null),(0,r.Cg)([(0,l.MZ)({type:c.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),v=i=(0,r.Cg)([(0,l.$K)("esri.layers.support.TileInfo")],v)},87992:(e,t,s)=>{s.d(t,{JR:()=>I,ME:()=>C,MY:()=>S,NO:()=>w,Nh:()=>M,gh:()=>b});var i=s(31635),r=s(69397),n=s(16930),o=(s(70328),s(19419)),a=s(60408),l=s(21325),h=s(513),u=s(50954),c=s(79567),d=s(52006),p=s(49663),f=s(46068),m=s(92722);class g{constructor({type:e,spatialReference:t,vertexCount:s,vertexXY:i,vertexZ:r,vertexM:n,partCount:o,partOffsets:a,partFlags:l,segmentFlags:h,segmentIndices:u,segmentParams:c,segmentCountArc:d,segmentCountBezier:p}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=s,this.vertexXY=i,this.vertexZ=r,this.vertexM=n,this.partCount=o,this.partOffsets=a,this.partFlags=l,this.segmentFlags=h,this.segmentIndices=u,this.segmentParams=c,this.segmentCountArc=d,this.segmentCountBezier=p}get segmentParamCount(){return P(4)*this.segmentCountArc+P(2)*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:e,segmentCountArc:t,segmentCountBezier:s}=this;return e&&e-t-s}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}get hasCurves(){return null!=this.segmentFlags}get isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?r.Ul+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){const{type:e,vertexCount:t,partCount:s,hasZ:i,hasM:r,hasCurves:n,segmentCountArc:o,segmentCountBezier:a}=this,l=E(e,t,s,i,r,n,o,a);l.spatialReference=this.spatialReference;const{vertexXY:h,vertexZ:u,vertexM:c}=this;l.vertexXY.set(h.subarray(0,2*t),0),l.vertexZ?.set(u.subarray(0,t),0),l.vertexM?.set(c.subarray(0,t),0);const{partOffsets:d,partFlags:p}=this;l.partFlags?.set(p.subarray(0,s+1)),l.partOffsets?.set(d.subarray(0,s+1));const{segmentFlags:f,segmentIndices:m,segmentParams:g,segmentParamCount:y}=this;return l.segmentFlags?.set(f.subarray(0,t),0),l.segmentIndices?.set(m.subarray(0,t),0),l.segmentParams?.set(g.subarray(0,y),0),l}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,l.aI)(this.spatialReference,e.spatialReference))return!1;if(this.vertexCount!==e.vertexCount||this.partCount!==e.partCount)return!1;if(this.hasZ!==e.hasZ||this.hasM!==e.hasM)return!1;if(this.hasCurves!==e.hasCurves||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;const s=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,s)=>Math.abs(e-s)>t||isNaN(e)!==isNaN(s);for(let t=0;t<this.vertexCount;++t)if(s(this.vertexXY[2*t],e.vertexXY[2*t])||s(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(s(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(s(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(s(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return new y(this)}}class y{constructor(e){this.geometry=e,this.value=new _(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class _{constructor(e){this.geometry=e,this.index=-1,this._readVertex=A(e),this._segments=new v(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class v{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===e.geometry.type,this.value=new x(e.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class x{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=A(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;const t=this.geometry.segmentParams;let s=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){const e=t[s++],i=t[s++],r=t[s++],n=t[s++];return{b:[this.end,[e,i],[r,n]]}}const i=t[s++],r=t[s++],n=t[s++],o=t[s++],a=t[s++],l=t[s++];s++,s++;const h=t[s++],u=t[s++];if(!Boolean(4&i)&&1===n)return{c:[this.end,[h,u]]};const c=2&i?0:1,d=1&i?0:1;return{a:[this.end,[a,l],c,d,o,r,n]}}}function w(e,t){const s={stack:[],error:void 0,hasError:!1};try{return t??=(0,o.Ie)(),(0,i.mS)(s,new F(e,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(t,function(e){let t;const{hasCurves:s,vertexCount:r,vertexXY:n,vertexZ:a,vertexM:l}=e,h=T(e);if(s){const s={stack:[],error:void 0,hasError:!1};try{(0,i.mS)(s,new F(e,["vertexZ","vertexM"]),!1);const r=(0,o.Ie)();for(const t of e.parts){let e=t.startVertex;for(const{curve:s}of t.segments)(0,c.e)(r,e,s),e=(0,d.yP)(s)}const[n,a,l,u]=r;t={xmin:n,ymin:a,xmax:l,ymax:u,spatialReference:h}}catch(e){s.error=e,s.hasError=!0}finally{(0,i.hk)(s)}}else{let e,s,i,o;e=s=1/0,i=o=-1/0;for(let t=0;t<r;++t){const r=n[2*t],a=n[2*t+1];e=Math.min(e,r),i=Math.max(i,r),s=Math.min(s,a),o=Math.max(o,a)}t={xmin:e,ymin:s,xmax:i,ymax:o,spatialReference:h}}if(a){let e=1/0,s=-1/0;for(const t of a)e=Math.min(e,t),s=Math.max(s,t);t.zmin=e,t.zmax=s}if(l){let e=1/0,s=-1/0;for(const t of l)e=Math.min(e,t),s=Math.max(s,t);t.mmin=e,t.mmax=s}return t}(e)),t}catch(e){s.error=e,s.hasError=!0}finally{(0,i.hk)(s)}}function C(e){let t,s,i;if((0,a.fT)(e)){i="point";const{x:r,y:n,z:o,m:a}=e,l=[r,n];null!=o&&l.push(o),null!=a&&l.push(a),s=[[l]],t=1}else(0,a.U9)(e)?(i="multipoint",s=[e.points],t=e.points.length):(0,a.Rg)(e)?(i="polyline",s=e.curvePaths??e.paths,t=s.reduce((e,t)=>e+t.length,0)):(i="polygon",s=e.curveRings??e.rings,t=s.reduce((e,t)=>e+t.length-z(t),0));const r=E(i,t,i.includes("point")?0:s.length,(0,a.Pv)(e),(0,a.W0)(e),(0,d.Ed)(e));function n(e){r.vertexXY[2*l]=e[0],r.vertexXY[2*l+1]=e[1],r.hasZ&&(r.vertexZ[l]=e[2]),r.hasM&&(r.vertexM[l]=e[o]),++l}r.spatialReference=e.spatialReference??void 0;const o=r.hasZ?3:2;let l=0;if(!r.isMultipart){if(!r.hasZ&&!r.hasM){for(const[e,t]of s[0])r.vertexXY[2*l]=e,r.vertexXY[2*l+1]=t,++l;return r}for(const e of s[0])n(e);return r}const c="polygon"===r.type;let m=0;if(!r.hasCurves){for(const e of s){r.partOffsets[m++]=l;let t=e.length;if(c&&(t-=z(e)),r.hasZ||r.hasM)for(let s=0;s<t;++s)n(e[s]);else for(let s=0;s<t;++s){const[t,i]=e[s];r.vertexXY[2*l]=t,r.vertexXY[2*l+1]=i,++l}}return r.partOffsets[m]=l,r}function g(e){const t=l-1;r.segmentFlags[t]=e;const s=P(e);r.segmentIndices[t]=0===s?O:y,4===e?++r.segmentCountArc:2===e&&++r.segmentCountBezier;const i=y+s;if(i<=(r.segmentParams?.length??0))return;let n=i*R;n=20*Math.ceil(n/20);const o=r.segmentParams;if(r.segmentParams=new Float64Array(n),null!=o)for(let e=0;e<o.length;++e)r.segmentParams[e]=o[e]}let y=0;for(const e of s){r.partOffsets[m++]=l,n(e[0]);let t=e.length;c&&(t-=z(e));for(let s=1;s<t;++s){const t=e[s];if((0,d.wY)(t)){g(4);const i=r.segmentParams,[o,[a,l],h,u,c,p,m]=t.a;let _=4;u||(_|=1),h||(_|=2);const v=(0,f.SW)((0,d.yP)(e[s-1]),t),[x,w]=(0,f.Uk)(v,.5);i[y++]=_,i[y++]=p,i[y++]=m,i[y++]=c,i[y++]=a,i[y++]=l,i[y++]=v.u2-v.u1,i[y++]=v.u1,i[y++]=x,i[y++]=w,n(o);continue}const i=(0,d.aO)(t);if((0,d.DA)(t)||i){g(4);const o=r.segmentParams,a=(0,d.yP)(t),l=i?(0,u.pM)((0,d.yP)(e[s-1]),t):(0,p.i)((0,d.yP)(e[s-1]),t),{cx:c,cy:f,thetaStart:m,thetaEnd:_,radius:v}=l;let x=i?0:4;m>_||(x|=1),Math.abs(_-m)<=Math.PI||(x|=2);const[w,C]=i?t.c[1]:(0,h.mq)(l,.5);o[y++]=x,o[y++]=v,o[y++]=1,o[y++]=0,o[y++]=c,o[y++]=f,o[y++]=_-m,o[y++]=m,o[y++]=w,o[y++]=C,n(a);continue}if((0,d.n1)(t)){g(2);const e=r.segmentParams,[s,[i,o],[a,l]]=t.b;e[y++]=i,e[y++]=o,e[y++]=a,e[y++]=l,n(s);continue}g(1),n(t)}}return r.partOffsets[m]=l,r}function b(e){const t=A(e),{vertexCount:s,partCount:i,hasZ:r,hasM:n}=e,o=T(e);if("point"===e.type){const[t,s]=e.vertexXY,i=e.vertexZ?.[0],r=e.vertexM?.[0];return{x:t,y:s,z:i,m:r,spatialReference:o}}let a=0;if("multipoint"===e.type){const e=[];for(;a<s;)e.push(t(a++));return{points:e,spatialReference:o,hasZ:r,hasM:n}}const l="polygon"===e.type;if(!e.hasCurves){const s=new Array;for(let r=0;r<i;++r){const i=e.partOffsets[r+1],n=new Array;for(;a<i;)n.push(t(a++));l&&n.length>0&&n.push(n[0]),s.push(n)}return l?{rings:s,hasZ:r,hasM:n,spatialReference:o}:{paths:s,hasZ:r,hasM:n,spatialReference:o}}const h=new Array;for(const{segments:t,startVertex:s}of e.parts){const e=[s];for(const{curve:s}of t)e.push(s);h.push(e)}return l?{rings:[],curveRings:h,hasZ:r,hasM:n,spatialReference:o}:{paths:[],curvePaths:h,hasZ:r,hasM:n,spatialReference:o}}function M(e,{lengths:t,coords:s,hasZ:i,hasM:r},n){const o=e.includes("point")?0:t.length,a="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);i??=!1,r??=!1;const h=E(e,l,o,i,r,!1,0,0);if(h.spatialReference=n??void 0,!h.isMultipart){for(let e=0,t=0;e<l;++e)h.vertexXY[2*e]=s[t++],h.vertexXY[2*e+1]=s[t++],i&&(h.vertexZ[e]=s[t++]),r&&(h.vertexM[e]=s[t++]);return h}const u=2+Number(i)+Number(r);let c=0,d=0;h.partOffsets[0]=0;for(const e of t){const t=h.partOffsets[d],n=t+e-Number(a);h.partOffsets[++d]=n;for(let e=t;e<n;++e)h.vertexXY[2*e]=s[c++],h.vertexXY[2*e+1]=s[c++],i&&(h.vertexZ[e]=s[c++]),r&&(h.vertexM[e]=s[c++]);a&&(c+=u)}return h}function I({type:e,vertexCount:t,vertexXY:s,vertexZ:i,vertexM:r,partCount:n,partOffsets:o,hasZ:a,hasM:l}){const h=new m.A([],[],a,l);n=Math.max(n,1);const u="polygon"===e;let c=0;for(let e=0;e<n;++e){const n=o?.[e+1]??t,d=h.coords.length;for(let e=c;e<n;++e)h.coords.push(s[2*e],s[2*e+1]),a&&h.coords.push(i[e]),l&&h.coords.push(r[e]);if(u){const e=c;h.coords.push(s[2*e],s[2*e+1]),a&&h.coords.push(i[e]),l&&h.coords.push(r[e])}h.lengths.push((h.coords.length-d)/h.stride),c=n}return"point"===e&&(h.lengths.length=0),h}function S(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;const t=e.getText()||void 0,s=e.isCustomWkid()?0:e.getOldID();if(s<=0)return{wkt:t};let i=e.getLatestID();(i<=0||i===s)&&(i=void 0);const r=e.getVCS();if(null==r)return{wkid:s,latestWkid:i,wkt:t};const n=r.isCustomWkid()?0:r.getOldID();if(n<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===n)&&(o=void 0),{wkid:s,wkt:t,latestWkid:i,vcsWkid:n,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new g({...e.toFlatGeometry(),spatialReference:t})}class F{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(const s of t)e[s]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function T({spatialReference:e}){return e instanceof n.A?e.toJSON():e}function A({vertexXY:e,vertexZ:t,vertexM:s}){return t?s?i=>[e[2*i],e[2*i+1],t[i],s[i]]:s=>[e[2*s],e[2*s+1],t[s]]:s?t=>[e[2*t],e[2*t+1],s[t]]:t=>[e[2*t],e[2*t+1]]}function P(e){switch(e){case 1:return 0;case 4:return 10;case 2:return 4}}function z(e){if(e.length>0){const t=e[0],s=(0,d.yP)(e.at(-1));return t.every((e,t)=>e===s[t])?1:0}return 0}function E(e,t,s,i,r,n,o,a){o??=0,a??=0;const l=new g({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:s,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let h=2*Float64Array.BYTES_PER_ELEMENT*t;i&&(h+=Float64Array.BYTES_PER_ELEMENT*t),r&&(h+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart&&(h+=(s+1)*Int32Array.BYTES_PER_ELEMENT,h+=(s+1)*Int8Array.BYTES_PER_ELEMENT),n&&(h+=t*Int8Array.BYTES_PER_ELEMENT,h+=t*Int32Array.BYTES_PER_ELEMENT,h+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const u=new ArrayBuffer(h);let c=0;if(l.vertexXY=new Float64Array(u,c,2*t),c+=l.vertexXY.byteLength,i&&(l.vertexZ=new Float64Array(u,c,t),c+=l.vertexZ.byteLength),r&&(l.vertexM=new Float64Array(u,c,t),c+=l.vertexM.byteLength),n&&(l.segmentParams=new Float64Array(u,c,l.segmentParamCount),c+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(u,c,t),l.segmentIndices.fill(O),c+=l.segmentIndices.byteLength),l.isMultipart&&(l.partOffsets=new Int32Array(u,c,s+1),c+=l.partOffsets.byteLength,l.partFlags=new Int8Array(u,c,s+1),c+=l.partFlags.byteLength),n&&(l.segmentFlags=new Int8Array(u,c,t),l.segmentFlags.fill(1),c+=l.segmentFlags.byteLength),"polygon"===l.type)for(let e=0;e<s;++e)l.partFlags[e]=1;return l}const R=1.61803,O=-1},88625:(e,t,s)=>{s.d(t,{A:()=>_});var i,r=s(31635),n=s(69540),o=s(66552),a=s(25482),l=s(97768),h=s(91429),u=s(30524);let c=i=class extends a.o{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,t){return(0,u.Dx)(e,t,null,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"expression",void 0),(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=i=(0,r.Cg)([(0,h.$K)("esri.symbols.support.FeatureExpressionInfo")],c);const d=c;var p=s(16271),f=s(36005),m=s(43937);const g=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let _=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e.expression?e:void 0:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,l.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r.Cg)([(0,h.MZ)({type:d,json:{write:!0}})],_.prototype,"featureExpressionInfo",void 0),(0,r.Cg)([(0,f.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],_.prototype,"readFeatureExpressionInfo",null),(0,r.Cg)([(0,m.K)("featureExpressionInfo",{featureExpressionInfo:{type:d},"featureExpression.value":{type:[0]}})],_.prototype,"writeFeatureExpressionInfo",null),(0,r.Cg)([(0,h.MZ)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],_.prototype,"mode",null),(0,r.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],_.prototype,"offset",void 0),(0,r.Cg)([(0,h.MZ)({type:p.KQ,json:{type:String,read:y.read,write:y.write}})],_.prototype,"unit",null),_=(0,r.Cg)([(0,h.$K)("esri.symbols.support.ElevationInfo")],_)},91806:(e,t,s)=>{s.d(t,{A:()=>l});var i,r=s(31635),n=s(25482),o=s(91429),a=s(56507);let l=class extends n.o{static{i=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"cols",void 0),(0,r.Cg)([(0,o.MZ)({type:a.jz,json:{write:!0}})],l.prototype,"level",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"levelValue",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"origin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"resolution",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"rows",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"scale",void 0),l=i=(0,r.Cg)([(0,o.$K)("esri.layers.support.LOD")],l)},98453:(e,t,s)=>{s.d(t,{m:()=>i});const i=new(s(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3660],{2272:(e,t,s)=>{s.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>h});var i=s(92602),r=s(70333),n=s(4718),o=s(84952),a=s(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function h(e,t,s){const i={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))i[r]=n.map(e=>h(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(s?.[r]);i[r]=t?e:JSON.stringify(e)}else i[r]=t?n:JSON.stringify(n);else i[r]=n}return i}async function c(e,t,n){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??r.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!r.id&&i.A.request.useIdentity&&await Promise.all([s.e(7330),s.e(168),s.e(148)]).then(s.bind(s,50148));const l=await r.id.getCredential(e,n);return l?.token}},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),r=s(75503),n=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((s,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,n.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8631:(e,t,s)=>{s.d(t,{r:()=>d,g:()=>c});var i,r=s(53177),n=s(76357),o=s(31635),a=s(91429),l=s(93223);let u=class extends n.A{static{i=this}constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,o.Cg)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=i=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],u);var h=s(41628);const c={key:"type",base:n.A,typeMap:{range:h.A,"coded-value":r.A,inherited:u}};function d(e){if(!e?.type)return null;switch(e.type){case"range":return h.A.fromJSON(e);case"codedValue":return r.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},13069:(e,t,s)=>{s.d(t,{AG:()=>a,lk:()=>r,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function r(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${r().toUpperCase()}}`}function o(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},16271:(e,t,s)=>{s.d(t,{Ao:()=>n,KQ:()=>o});var i=s(4576),r=s(31756);function n(e){return 1/(r.j[e]||1)}const o=function(){const e=Object.keys(r.j);return(0,i.TF)(e,"decimal-degrees"),e.sort(),e}()},20437:(e,t,s)=>{s.d(t,{A:()=>f});var i,r=s(31635),n=s(66552),o=s(25482),a=s(91429),l=s(56507),u=s(8631),h=s(98453),c=s(36005),d=s(93223);const p=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=class extends o.o{static{i=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?p.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,r.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,r.Cg)([(0,a.MZ)()],f.prototype,"description",void 0),(0,r.Cg)([(0,c.w)("description")],f.prototype,"readDescription",null),(0,r.Cg)([(0,a.MZ)({types:u.g,json:{read:{reader:u.r},write:!0}})],f.prototype,"domain",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,r.Cg)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,r.Cg)([(0,d.e)(h.m)],f.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,r.Cg)([(0,c.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,r.Cg)([(0,a.$K)("esri.layers.support.Field")],f)},23323:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Fe});var i=s(31635),r=s(65529),n=s(74887),o=s(36708),a=s(91429),l=s(79897),u=s(16930),h=s(65864),c=s(4576),d=s(49186),p=s(53966),f=s(87992),m=s(70328),g=s(6518),y=s(50498),_=s(69397),v=s(27647);class x{constructor(e=null,t={},s,i,r=0){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=i,this.displayId=r}weakClone(){return new x(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId)}clone(){return new x(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId)}get usedMemory(){return 128+(0,_.lM)(this.attributes)+(this.geometry?.usedMemory??0)}ensureCentroid(e){return this.centroid??=(0,v.Q)(this.geometry&&(0,f.JR)(this.geometry)),this.centroid}}const w={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,s)=>new x((0,f.Nh)(y.gy.fromJSON(s),t),e.attributes,null,e.objectId),getGeometry:e=>e.geometry&&(0,f.JR)(e.geometry),getGeometryWithCurves:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};var C=s(51441);const b=(0,m.vt)();class M{constructor(e,t,s){this.geometryType=e,this.hasZ=t,this.hasM=s,this._boundsStore=new g.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=w}get usedMemory(){return this._usedMemory}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){const e=this._featuresById.size;let t=0;return this._featuresById.forEach(({geometry:e})=>{t+=e?e.vertexCount:0}),{featureCount:e,vertexCount:t}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,r]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:r,spatialReference:(0,C.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(c.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,m.Jt)(b,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void p.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(s?(e.displayId=s.displayId,i=this._boundsStore.get(t)??void 0,this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(s)??0):this.onFeatureAdd?.(e),!e.geometry)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);this._boundsStore.set(t,(0,f.NO)(e.geometry,i)),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return p.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(s)??0;const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,f.NO)(i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(s)??0,s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}var I=s(56390),S=s(87045),F=s(72802),T=s(61956),A=s(88625),z=s(66344),E=s(91869),O=s(86211),P=s(16271);function R(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new Z(e,s)}return new B}class B{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class Z{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new z.q(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(function(e,t,s){const{offset:i,unit:r}=s;if(null==i)return;const n=(0,O.G9)(t),o=i*((0,P.Ao)(r??"meters")/n);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,E.tE)(i,t.objectId,k).push(t);const[r,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(r,s);if((0,n.Te)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(r,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,c=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||c.push(t)}return c}_prepareQuery(e,t){const s=[],i=[];for(const[t,r]of e){const e=[];for(const s of r)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const r=j(e,t),n=this._alignmentsCache.get(r);null==n?s.push(t):i.push(new N(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},r){for(const e of r)e.apply();let n=0;const o=this._alignmentsCache;for(const{objectId:r,points:a}of e.pointsInFeatures){if(i.has(r)){n+=a.length;continue}const e=!s.has(r);for(const s of a){const i=j(r,s),a=t[n++];s.z=a,e&&o.put(i,a,1)}}}}class N{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function j(e,{x:t,y:s,z:i,spatialReference:r}){return`${e}-${t}-${s}-${i??0}}-wkid:${r?.wkid}`}function k(){return[]}class L{filter(e,t){return t}notifyElevationSourceChange(){}}class V{filter(e,t){const{point:s,distance:i}=e,{z:r}=s;if(null==r)return t;if(0===t.length)return t;const n=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,n).filter(Y);return o.sort(H),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":X(i,t,s);continue;case"vertex":G(i,t,s);continue}return e}}function Y(e){return e.distance<=1}function q(e=!1){return e?new V:new L}function X(e,t,{x:s,y:i,z:r}){const{start:n,end:o,target:a}=e;e.draped||function(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,o=i.z-s.z,a=r*r+n*n+o*o,l=(t.x-s.x)*r+(t.y-s.y)*n+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),h=s.x+r*u,c=s.y+n*u,d=s.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,n,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,h=(t.z-a.z)/r;e.distance=Math.sqrt(l*l+u*u+h*h)}function G(e,t,{x:s,y:i,z:r}){const{target:n}=e,o=(t.x-n.x)/s,a=(t.y-n.y)/i,l=(t.z-n.z)/r,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function H(e,t){return e.distance-t.distance}var U=s(4718),J=s(799);function D(e=!1,t){return e?new W(t):new $}class ${async fetch(){return[]}notifySymbologyChange(){}}class W{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new z.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],r=this._candidatesCache;for(const t of e){const e=K(t),n=r.get(e);if(n)for(const e of n)i.push((0,U.o8)(e));else s.push(t),r.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,n.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],i=K(s[l[e]]),n=r.get(i);n.push(t),r.put(i,n,n.length),u.push((0,U.o8)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function K(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,J.Wm)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,r=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,J.Wm)(r).toString()}default:return""}}var Q=s(69622),ee=s(60999),te=s(3483),se=s(13069),ie=s(5443),re=s(19419),ne=s(90708),oe=s(92722),ae=s(54339);class le{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new le;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}var ue=s(60694),he=s(69418),ce=s(80893);class de{constructor(e,t){this.key=e,this.resolution=t,this.state={type:0},this.alive=!0}process(e){switch(this.state.type){case 0:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 1:case 3:break;case 2:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 4:this.state=this._goToDone(this.state,e)}return null}get debugInfo(){return{key:this.key,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case 0:case 1:return 0;case 2:return this.state.featureCount;case 3:return this.state.previous.featureCount;case 4:return this.state.features.length;case 5:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case 0:return"created";case 1:return"fetch-count";case 2:return"fetched-count";case 3:return"fetch-features";case 4:return"fetched-features";case 5:return"done"}}_gotoFetchCount(e,t){return{type:1,previous:e,task:(0,ee.UT)(async e=>{const s=await(0,ee.DZ)(t.fetchCount(this,e));1===this.state.type&&(this.state=function(e,t){return{type:2,featureCount:t,previous:e}}(this.state,s.ok?s.value:1/0))})}}_gotoFetchFeatures(e,t){return{type:3,previous:e,task:(0,ee.UT)(async s=>{const i=await(0,ee.DZ)(t.fetchFeatures(this,e.featureCount,s));3===this.state.type&&(this.state=function(e,t){return{type:4,previous:e,features:t}}(this.state,i.ok?i.value:[]))})}}_goToDone(e,t){return t.finish(this,e.features),{type:5,previous:e}}reset(){const e=this.state;switch(this.state={type:0},e.type){case 0:case 2:case 4:case 5:break;case 1:case 3:e.task.abort()}}}let pe=class extends Q.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,te.KC)(e,this._mandatoryOutFields);(0,te.aI)(s,t)||(this._set("outFields",s),(0,te.Yy)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=new Array,this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new l.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>(0,c.aI)(e,t,({id:e},{id:t})=>e===t)}),this.addHandles((0,o.z7)(()=>!this.suspended,()=>this._process()))}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(({id:e})=>e)??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},s=(0,ee.UT)(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(e){(0,n.QP)(e),p.A.getLogger(this).warn("Failed to apply edits",e)}});this.addHandles(s),await this._updatingHandles.addPromise(s.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,ue.Wo)(this.url))return;const e=(0,ee.UT)(async e=>{try{const t=await(0,ce.Jf)(this.url,new T.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=ie.A.fromJSON(t?.extent)}catch(e){(0,n.QP)(e),p.A.getLogger(this).warn("Failed to fetch data extent",e)}});this._updatingHandles.addPromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const s=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=s:e.prepend(s)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.key),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<ge}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(ye/(s*s))<_e}_ensureFetchAllCounts(e){let t=!0;for(const s of this._pendingTiles.values())s.state.type<2&&this._updatingHandles.addPromise(s.process(e)),s.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new de(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:me,signal:t})}async _fetchFeatures(e,t,s){let i=0;const r=[];let n=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,s);l&&(i+=a.num),n+=u.length;for(const e of u)r.push(e);if(o=t-n,!l||!h||o<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;const r=e?(0,se.AG)(e):e;if(this.store.featureStore.forEach(e=>{r===(0,se.AG)(e.attributes[t])&&(i=e.objectId??e.attributes[s])}),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}async _queryFeatures(e,t){return 0===e.num?new le:this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,i=await(0,ce.IJ)(this.url,e,new he.S({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:me,signal:t});return function(e){const t=y.gy.fromJSON(e.geometryType),s=new le;return s.globalIdFieldName=e.globalIdFieldName,s.geohashFieldName=e.geohashFieldName,s.geometryProperties=e.geometryProperties,s.geometryType=e.geometryType,s.spatialReference=e.spatialReference,s.hasZ=e.hasZ,s.hasM=e.hasM,s.features=e.features.map(e=>function(e,{geometry:t,attributes:s,centroid:i,objectId:r,displayId:n}){return new x(t&&(0,f.Nh)(e,t),s,i,r,n)}(t,e)),s.fields=e.fields,s.transform=e.transform,s.exceededTransferLimit=e.exceededTransferLimit,s.uniqueIdField=e.uniqueIdField,s.queryGeometry=e.queryGeometry&&(0,f.Nh)(t,e.queryGeometry),s.queryGeometryType=e.queryGeometryType,s}((0,ne.eY)(i))}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this;return function({exceededTransferLimit:e,features:t,fields:s,geometryType:i,hasM:r,hasZ:n,spatialReference:o,transform:a},l){const u=new le;u.exceededTransferLimit=e??!1;for(const e of t??[]){let t,s;i&&(t=e.geometry&&(0,f.ME)(e.geometry),s=e.centroid&&new oe.A([],[e.centroid.x,e.centroid.y]));const r=(0,ae.W)(e,l);u.features.push(new x(t,e.attributes,s,r))}return u.fields=s??u.fields,u.geometryType=i??null,u.hasM=r??!1,u.hasZ=n??!1,u.spatialReference=o??null,u.transform=a??null,u}(await(0,ce.eW)(this.url,e,s,{query:this._configuration.customParameters,timeout:me,signal:t}),{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.key?this.store.getAttributesForTile(e?.key?.id):null,i=(0,te.KC)((0,te.iv)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,t.returnTrueCurves??=this.capabilities.data.supportsTrueCurve,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new T.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,re.w1)(e.key.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?T.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||fe);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"url",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"objectIdField",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"globalIdField",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"capabilities",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"sourceSpatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],pe.prototype,"store",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],pe.prototype,"_minimumVerticesPerFeature",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"_mandatoryOutFields",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"outFields",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"suspended",void 0),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"_historicMoment",void 0),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"filter",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"customParameters",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],pe.prototype,"_configuration",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"tileInfo",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"tileSize",null),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"tilesOfInterest",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],pe.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],pe.prototype,"availability",void 0),(0,i.Cg)([(0,a.MZ)()],pe.prototype,"hasZ",null),pe=(0,i.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],pe);const fe=2e3,me=6e5,ge=1e6,ye=25,_e=1;s(44208);class ve{constructor(){this._store=new Map,this._priorities=new Map}get size(){return this._store.size}setPriorityOrderByKey(e){this._priorities.clear();for(let t=e.length-1;t>=0;t--)this._priorities.set(e[t],e.length-t)}hasLowerPriority(e){const t=this._priorities.get(e);if(null==t)return!0;for(const[e]of this._store){const s=this._priorities.get(e);if(null==s||s<t)return!0}return!1}someFromLowestToHighestPriority(e){const{_priorities:t}=this;for(const[s,i]of this._store)if(!t.has(s)&&e(i,s))return!0;for(const[s]of t){const t=this._store.get(s);if(t&&e(t,s))return!0}return!1}set(e,t){this._store.set(e,t)}delete(e){return this._store.delete(e)}get(e){return this._store.get(e)}has(e){return this._store.has(e)}clear(){this._store.clear()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}let xe=class extends Q.A{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new g.F,this._tiles=new ve,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,re.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>(0,te.E$)(e,t),new Set(Object.keys(s[0]?.attributes??[]))),r=this._memoryLimitExceeded;this._addTileStorage(e,new Set(s.map(e=>e.objectId)),i),r&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:s}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<s||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const s of e.objectIds)if(1===this._refCounts.get(s)){const e=this.featureStore.getFeature(s);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}return t}_hasAttributesForTile(e,t){if(e){const s=this._tiles.get(e);if(s)return!s.objectIds.size||(0,te.Yy)(t,s.attributeKeys)}return!1}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new we(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)1===this._unreferenceFeature(s)&&t.push(s);this.featureStore.removeManyById(t);const s=e.key.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const{features:i}=await t(e,s);for(const e of i){if(this._tmpBoundingRect.fill(0),null==e.geometry||0===e.geometry.vertexCount)continue;(0,re.Ie)(this._tmpBoundingRect);const t=(0,f.NO)(e.geometry,this._tmpBoundingRect);this._tileBounds.forEachInBounds(t,t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.key.id,s.objectIds.size))})}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,re.HY)((0,re.VY)(this.extent,this._tmpBoundingRect),e.extent))return new be(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new be(e);if(this._hasAttributesForTile(e.id,s))return new be(e);const i=this._createTileTree(e,this.tileInfo);return this._simplify(i,t,null,0,1),this._collectMissingTiles(e,i,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){let r=this._tileFeatureCounts.get(e.id);return null!=r||(r=await(0,ce.gW)(t,s,i),this._tileFeatureCounts.set(e.id,r)),r}_createTileTree(e,t){const s=new Ce(e.level,e.row,e.col);return t.updateTileInfo(s,1),this._tileBounds.forEachInBounds(e.extent,i=>{const r=this._tiles.get(i)?.key;r&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,r=s?t:e,n=1<<r.level-i.level;return Math.floor(r.row/n)===i.row&&Math.floor(r.col/n)===i.col}(e,r)&&this._populateChildren(s,r,t,this._tileFeatureCounts.get(r.id)||0)}),s}_populateChildren(e,t,s,i){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,o=t.col>>r,a=e.row<<1,l=o-(e.col<<1)+(n-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const r=new Ce(e.level+1,n,o);s.updateTileInfo(r,1),e.children[l]=r,this._populateChildren(r,t,s,i)}}_simplify(e,t,s,i,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=s&&(s.children[i]=null),n);const o=r/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/n<Ie&&(this._purge(e),null!=s&&(s.children[i]=null),l=n),l}_mergeChildren(e){const t=new Set;let s;this._forEachLeaf(e,e=>{const i=this._tiles.get(e.id);if(i){s=s?(0,te.E$)(s,i.attributeKeys):new Set(i.attributeKeys);for(const e of i.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const r=new Me(s,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,i),r.info}_collectMissingTilesRecurse(e,t,s,i){const r=this._tiles.has(e.id)&&!this._hasAttributesForTile(e.id,i);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const n=s/2;for(let s=0;s<e.children.length;s++){const r=e.children[s];null==r?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),n):this._collectMissingTilesRecurse(r,t,n,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],xe.prototype,"featureStore",void 0),(0,i.Cg)([(0,a.MZ)()],xe.prototype,"tileInfo",void 0),(0,i.Cg)([(0,a.MZ)()],xe.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)()],xe.prototype,"maximumByteSize",void 0),xe=(0,i.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],xe);class we{constructor(e,t,s){this.key=e,this.objectIds=t,this.attributeKeys=s}}class Ce extends F.U{constructor(){super(...arguments),this.isLeaf=!1,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class be{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,re.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class Me{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new be(t),null!=s&&(this._extent=(0,re.VY)(s))}addMissing(e,t,s,i){const r=new F.U(e,t,s);this._tileInfo.updateTileInfo(r,1)&&(null==this._extent||(0,re.HY)(this._extent,r.extent))&&(this.info.missingTiles.push({data:r,resolution:i}),this.info.coveredArea-=(0,re.Wc)(r.extent))}}const Ie=.18751;let Se=class extends r.nJ{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,n.Tw)(),this._elevationAligner=R(),this._elevationFilter=q(),this._symbologyCandidatesFetcher=D(),this._updatingHandles=new l.U,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,n.Te)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,n.Te)(t),i}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:r}=e.serviceInfo,{hasZ:n}=e,a=u.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new M(t,n,!1),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new I.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:r,hasZ:n,hasM:!1,featureIdInfo:{type:"object-id",fieldName:s},timeInfo:i}),this._featureFetcher=new pe({store:new xe({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:u.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=R(l,{elevationInfo:null!=e.elevationInfo?A.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=q(l),this.addHandles([(0,o.wB)(()=>this._featureFetcher.availability,e=>this.emit("notify-availability",{availability:e}),o.OH),(0,o.wB)(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),Te}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.suspended=e,Te}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.outFields=new Set(e??[]),Te}async fetchCandidates(e,t){await this._whenSetup.promise,(0,n.Te)(t);const s=function(e,t){const s=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:s}};const{distance:i,units:r,spatialRel:n,where:o,timeExtent:a,objectIds:l}=e.filter,u={geometry:e.filter.geometry?(0,h.rS)(e.filter.geometry):void 0,distance:i,units:r,spatialRel:n,timeExtent:a,objectIds:l,returnZ:s,where:o??"1=1"};return{...e,query:u}}(e,this._featureStore.hasZ),i=t?.signal,r=await this._queryEngine.executeQueryForSnapping(s,i);(0,n.Te)(i);const o=await this._elevationAligner.alignCandidates(r.candidates,u.A.fromJSON(e.point.spatialReference)??u.A.WGS84,i);(0,n.Te)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,n.Te)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles.map(e=>F.U.fromJSON(e)),this._featureFetcher.tileInfo=null!=e.tileInfo?S.A.fromJSON(e.tileInfo):null,Te}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.refresh(),Te}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await(0,o.C_)(()=>!this.updating,t),(0,n.Te)(t),Te}async getDebugInfo(e,t){return(0,n.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,n.Te)(t),Te}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),Te}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Te}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Te}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=D(e,this._getSymbologyCandidates),Te}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?T.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i.Cg)([(0,a.MZ)({readOnly:!0})],Se.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)()],Se.prototype,"_isInitializing",void 0),Se=(0,i.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],Se);const Fe=Se,Te={result:{}}},31756:(e,t,s)=>{s.d(t,{j:()=>n});var i=s(86211),r=s(79258);const n={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",r.$O.radius)}},36708:(e,t,s)=>{s.d(t,{C_:()=>d,OH:()=>m,Vh:()=>g,on:()=>c,pc:()=>y,wB:()=>l,z7:()=>u});var i=s(37955),r=s(36563),n=s(97768),o=s(74887),a=s(14012);function l(e,t,s={}){return h(e,t,s,p)}function u(e,t,s={}){return h(e,t,s,f)}function h(e,t,s={},i){let r=null;const o=s.once?(e,s)=>{i(e)&&((0,n.xt)(r),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(r=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return r}function c(e,t,s,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,n.xt)(h),s(e)}const p=l(e,(e,s)=>{c(),(0,i.wb)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,r.hA)(()=>{p.remove(),c()}),h}function d(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((i,n)=>{a=(0,r.vE)([(0,o.u7)(s,()=>{l(),n((0,o.NK)())}),h(e,e=>{l(),i(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}s(80559);const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},39357:(e,t,s)=>{s.d(t,{A:()=>a});var i,r=s(31635),n=s(25482),o=s(91429);let a=i=class extends n.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,r.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=i=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},41628:(e,t,s)=>{s.d(t,{A:()=>l});var i,r=s(31635),n=s(91429),o=s(76357),a=s(93223);let l=class extends o.A{static{i=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new i({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]},isRequired:!0}}})],l.prototype,"maxValue",void 0),(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]},isRequired:!0}}})],l.prototype,"minValue",void 0),(0,r.Cg)([(0,a.e)({range:"range"})],l.prototype,"type",void 0),l=i=(0,r.Cg)([(0,n.$K)("esri.layers.support.RangeDomain")],l)},48526:(e,t,s)=>{s.d(t,{A:()=>f});var i,r=s(31635),n=s(4718),o=s(91429),a=s(5443),l=s(91075),u=s(86738),h=s(16930),c=s(90634),d=s(56993),p=s(43937);let f=i=class extends l.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:s,hasZ:i,spatialReference:r}=e;switch(t??=[],t?.at(0)?.length){case 4:i??=!0,s??=!0;break;case 3:i??=!0!==s,s??=!i;break;default:i??=!1,s??=!1}return r??=h.A.WGS84,{...e,hasM:s,hasZ:i,points:t,spatialReference:r}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const e=(0,c.ge)(this);return e?new a.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,n.o8)(this.points)}clone(){const{points:e,spatialReference:t,hasM:s,hasZ:r}=this;return new i({points:(0,n.o8)(e),spatialReference:t.clone(),hasM:s,hasZ:r})}addPoint(e){return(0,d.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;const t=this.points[e],s={x:t[0],y:t[1],spatialReference:this.spatialReference};let i=2;return this.hasZ&&(s.z=t[2],i=3),this.hasM&&(s.m=t[i]),new u.A(s)}removePoint(e){if(!this._validateInputs(e))return null;const t=new u.A(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)?((0,d.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points"),this):this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],f.prototype,"points",void 0),(0,r.Cg)([(0,p.K)("points")],f.prototype,"writePoints",null),f=i=(0,r.Cg)([(0,o.$K)("esri.geometry.Multipoint")],f),f.prototype.toJSON.isDefaultToJSON=!0},50498:(e,t,s)=>{s.d(t,{Ye:()=>c,gy:()=>h,iI:()=>p,yR:()=>d});var i=s(66552),r=s(5443),n=s(91075),o=s(48526),a=s(86738),l=s(39829),u=s(82799);const h=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:n.A,key:"type",typeMap:{extent:r.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}},p=new i.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0})},53177:(e,t,s)=>{s.d(t,{A:()=>h});var i,r=s(31635),n=s(4718),o=s(91429),a=s(39357),l=s(76357),u=s(93223);let h=class extends l.A{static{i=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some(e=>(String(e.code)===s&&(t=e.name),!!t))}return t}clone(){return new i({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,r.Cg)([(0,o.MZ)({type:[a.A],json:{write:{isRequired:!0}}})],h.prototype,"codedValues",void 0),(0,r.Cg)([(0,u.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=i=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],h)},58501:(e,t,s)=>{s.d(t,{q:()=>r});var i=s(62815);function r(e,t,s){if(!s?.features||!s.hasZ)return;const r=(0,i.N)(s.geometryType,t,e.outSpatialReference);if(r)for(const e of s.features)r(e.geometry)}},60408:(e,t,s)=>{function i(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function r(e){return void 0!==e.points}function n(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?n(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":i(e)?"esriGeometryEnvelope":r(e)?"esriGeometryMultipoint":null:null}function h(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function c(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}s.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>h,Rg:()=>o,U9:()=>r,W0:()=>c,ZC:()=>i,fT:()=>n,uW:()=>l})},60999:(e,t,s)=>{s.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>h,UT:()=>m,aD:()=>y,jJ:()=>u});var i=s(31635),r=s(69622),n=s(97768),o=s(74887),a=s(10107),l=s(64108);function u(e,t,s){return(0,o.Lx)(e.map((e,i)=>t.apply(s,[e,i])))}async function h(e,t,s){return(await(0,o.Lx)(e.map((e,i)=>t.apply(s,[e,i])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function f(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function m(e,t){return new g(e,t)}let g=class extends r.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=e(s),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,a.MZ)()],g.prototype,"value",null),(0,i.Cg)([(0,a.MZ)()],g.prototype,"error",null),(0,i.Cg)([(0,a.MZ)()],g.prototype,"finished",null),(0,i.Cg)([(0,a.MZ)()],g.prototype,"promise",void 0),(0,i.Cg)([(0,a.MZ)()],g.prototype,"_result",void 0),g=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],g);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},62815:(e,t,s)=>{s.d(t,{N:()=>o});var i=s(86211),r=s(73941),n=s(21325);function o(e,t,s){if(null==t||null==s||s.vcsWkid||(0,n.aI)(t,s)||(0,r.xP)(t)||(0,r.xP)(s))return;const o=(0,i.G9)(t)/(0,i.G9)(s);if(1!==o)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const s of e.paths)for(const e of s)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const s of e.rings)for(const e of s)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const s of e.points)s.length>2&&(s[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return}}},65864:(e,t,s)=>{s.d(t,{rS:()=>h,xD:()=>d});var i=s(5443),r=s(91075),n=s(48526),o=s(86738),a=s(39829),l=s(82799),u=s(60408);function h(e){return null==e?null:e instanceof r.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?n.A.fromJSON(e):(0,u.ZC)(e)?i.A.fromJSON(e):null}const c={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:i.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:a.A};function d(e){return e&&c[e]||null}},66344:(e,t,s)=>{s.d(t,{q:()=>a});const i=!!(0,s(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,r,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==s&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,s,r,0);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,s,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new n(s,r,l)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const s=this._db.get(t);if(!s)return;this._size-=s.size,e.size-=s.size;let i=s.entry.usedMemory;for(;i>this._maxSize;){const e=this._notifyRemove(t,s.entry,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach((e,i)=>{const r=e.lifetime;s[r]=(s[r]||0)+e.size,this._users.forEach(s=>{const{id:r,name:n}=s;if(i.startsWith(r)){const s=t[n]||0;t[n]=s+e.size}})});const i={};this._users.forEach(e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[s]||0;t[s]=r,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"});const r=Object.keys(t);r.sort((e,s)=>t[s]-t[e]),r.forEach(s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]);for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,s]of this._db)t.startsWith(e.id)&&(yield s.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){const r=this._users.get(e.split(o)[0])?.removeFunc,n=r?.(t,i,s);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const s=t??this;if(s.size<=e)return;const i=t?.id;let r=!0;for(;r;){r=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!i||n.startsWith(i))){const i=t??this._users.get(n.split(o)[0]);if(this._purgeItem(n,a,i),s.size<=.9*e)return;r||=this._db.has(n)}}for(const[r,n]of this._db)if(!i||r.startsWith(i)){const i=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,n,i),s.size<=.9*e)return}}_purgeItem(e,t,s){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class n{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}const o=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new r,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69540:(e,t,s)=>{s.d(t,{OU:()=>h,Pw:()=>c});var i=s(31635),r=s(69622),n=(s(44208),s(4718)),o=(s(53966),s(97768)),a=s(88620),l=s(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;const s=e;let r=class extends s{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const s=t.metadata,i=t.store,r={},l=new Map;for(const t in s){const o=s[t],a=i?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let c=null;if("function"==typeof u)c=u(h,e);else if("reference"===u)c=h;else if(c=(0,n.TU)(h,e),null!=h&&null==c)continue;0===a?l.set(t,c):r[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,s]of l)e.set(t,s,0)}return u}};return r=(0,i.Cg)([(0,l.$)("esri.core.Clonable")],r),r},c=h(r.A)},72802:(e,t,s)=>{s.d(t,{U:()=>r});var i=s(19419);class r{constructor(e,t,s,r=(0,i.vt)()){this._level=e,this._row=t,this._col=s,this.extent=r}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new r(e.level,e.row,e.col,e.extent)}}},75503:(e,t,s)=>{s.d(t,{EC:()=>I,wq:()=>a});var i=s(4576),r=s(21818),n=(s(44208),s(15142)),o=s(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),C.prune(),b.prune(),M.prune()}all(e){l(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(v(e,s))for(w.clear();s;){for(let r=0,n=s.children.length;r<n;r++){const n=s.children[r],o=s.leaf?i(n):n;v(e,o)&&(s.leaf?t(n):_(e,o)?l(n,t):w.push(n))}s=w.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!v(e,t))return!1;for(w.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],n=t.leaf?s(r):r;if(v(e,n)){if(t.leaf||_(e,n))return!0;w.push(r)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,o=0,a=!1;const l=this._toBBox(e);for(b.clear(),M.clear();s||b.length>0;){if(s||(s=b.pop(),n=b.data[b.length-1],o=M.pop()??0,a=!0),s.leaf&&(t=(0,i.qh)(s.children,(0,r.z)(e),s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),b.push(s),this._condense(b),this;a||s.leaf||!_(s,l)?n?(o++,s=n.children[o],a=!1):s=null:(b.push(s),M.push(o),o=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const r=s-t+1;let n=this._maxEntries;if(r<=n){const i=new F(e.slice(t,s+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(i-1)));const o=new T([]);o.height=i;const a=Math.ceil(r/n),l=a*Math.ceil(Math.sqrt(n));x(e,t,s,l,this._compareMinX);for(let r=t;r<=s;r+=l){const t=Math.min(r+l-1,s);x(e,r,t,a,this._compareMinY);for(let s=r;s<=t;s+=a){const r=Math.min(s+a-1,t);o.children.push(this._build(e,s,r,i-1))}}return u(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,r=s?e:i(e);b.clear();const n=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=f(o),l=g(e,o)-a;l<r?(r=l,i=a<i?a:i,s=o):l===r&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(r,this._data,t,b);for(n.children.push(e),c(n,r);t>=0&&b.data[t].children.length>this._maxEntries;)this._split(b,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)c(t.data[i],e)}(r,b,t)}_split(e,t){const s=e.data[t],i=s.children.length,r=this._minEntries;this._chooseSplitAxis(s,r,i);const n=this._chooseSplitIndex(s,r,i);if(!n)return;const o=s.children.splice(n,s.children.length-n),a=s.leaf?new F(o):new T(o);a.height=s.height,u(s,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,r,n;i=r=1/0;for(let o=t;o<=s-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,s,this._toBBox),l=y(t,a),u=f(t)+f(a);l<i?(i=l,n=o,r=u<r?u:r):l===i&&u<r&&(r=u,n=o)}return n}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,r)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const r=this._toBBox,n=h(e,0,t,r),o=h(e,s-t,s,r);let a=m(n)+m(o);for(let i=t;i<s-t;i++){const t=e.children[i];c(n,e.leaf?r(t):t),a+=m(n)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];c(o,e.leaf?r(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const r=e.data[t-1],n=r.children;n.splice((0,i.qh)(n,s,n.length,r.indexHint),1)}else this.clear();else u(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let s=e;for(C.clear();s;){if(!0===s.leaf)for(const e of s.children)t((0,r.z)(e));else C.pushArray(s.children);s=C.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,s,i,r){r||(r=new F([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<s;o++)n=e.children[o],c(r,e.leaf?i(n):n);return r}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-s)*Math.max(0,n-i)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,s,i,r){const n=[t,s];for(;n.length;){const t=n.pop(),s=n.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,o.q)(e,a,s,t,r),n.push(s,a,a,t)}}const w=new n.A,C=new n.A,b=new n.A,M=new n.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class F extends S{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends S{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,s)=>{s.d(t,{A:()=>u});var i=s(31635),r=s(66552),n=s(25482),o=s(91429),a=s(93223);const l=new r.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends n.o{constructor(e){super(e),this.name=null,this.type=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,i.Cg)([(0,o.$K)("esri.layers.support.Domain")],u)},79677:(e,t,s)=>{s.d(t,{A:()=>c});var i,r=s(31635),n=s(25482),o=s(88930),a=s(91429),l=s(98623),u=s(36005),h=s(43937);let c=class extends n.o{static{i=this}static get allTime(){return d}static get empty(){return p}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,s=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,r=e.end?.getTime()??e.end;return t===i&&s===r}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime)return this.clone();let s=this.start;s&&(s=(0,o.lL)(s,e,t));let r=this.end;if(r){const s=(0,o.lL)(r,e,t);r=r.getTime()===s.getTime()?s:(0,o.S1)(s,1,e,t)}return new i({start:s,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return r>=t&&r<=s?o=r:t>=r&&t<=n&&(o=t),s>=r&&s<=n?a=s:n>=t&&n<=s&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,s=l.qU){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:n,end:a}=this;return null!=n&&(r.start=(0,o.S1)(n,e,t,s)),null!=a&&(r.end=(0,o.S1)(a,e,t,s)),r}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,r.Cg)([(0,u.w)("end")],c.prototype,"readEnd",null),(0,r.Cg)([(0,h.K)("end")],c.prototype,"writeEnd",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,r.Cg)([(0,u.w)("start")],c.prototype,"readStart",null),(0,r.Cg)([(0,h.K)("start")],c.prototype,"writeStart",null),c=i=(0,r.Cg)([(0,a.$K)("esri.time.TimeExtent")],c);const d=new c,p=new c({start:void 0,end:void 0})},79897:(e,t,s)=>{s.d(t,{U:()=>h});var i=s(31635),r=s(69622),n=s(36563),o=s(36708),a=s(76030),l=s(10107),u=s(64108);let h=class extends r.A{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,s={}){return this._installWatch(e,t,s,o.wB)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o.z7)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const r=++this._handleId;return this.addHandles([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.OH),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],r),(0,n.hA)(()=>this.removeHandles(r))}addPromise(e){if(null==e)return e;const t=++this._handleId;this.addHandles((0,n.hA)(()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this.hasHandles(c)||this._set("updating",!1))}),t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this.removeHandles(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,s={},i){const r=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,r);const o=i(e,t,s);return this.addHandles(o,r),(0,n.hA)(()=>this.removeHandles(r))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.wB)(e,s,{sync:!0,equals:()=>!1});return this.addHandles(i,t),i}_createSyncUpdatingCallback(){return()=>{this.removeHandles(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles((0,a._)(()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(c))}),c)}}};(0,i.Cg)([(0,l.MZ)({readOnly:!0})],h.prototype,"updating",void 0),h=(0,i.Cg)([(0,u.$)("esri.core.support.UpdatingHandles")],h);const c=-42},87045:(e,t,s)=>{s.d(t,{A:()=>v});var i,r=s(31635),n=s(66552),o=s(25482),a=s(86211),l=s(91429),u=s(56507),h=s(86738),c=s(16930),d=s(21325),p=s(28735),f=s(91806),m=s(72802),g=s(36005),y=s(43937);const _=new n.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let v=class extends o.o{static{i=this}static create(e={}){const{resolutionFactor:t=1,scales:s,size:r=256,spatialReference:n=c.A.WebMercator,numLODs:o=24}=e;if(!(0,d.fn)(n)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new f.A({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new f.A({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new h.A(0,0,n),size:[r,r],spatialReference:n})}const l=(0,d.Vp)(n),u=e.origin?new h.A({x:e.origin.x,y:e.origin.y,spatialReference:n}):new h.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),p=1/(39.37*(0,a.GA)(n)*96),m=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*p;m.push(new f.A({level:e,scale:t,resolution:i}))}else{let e=(0,d.EA)(n)?512/r*591657527.5917094:256/r*591657527.591555;const s=Math.ceil(o/t);m.push(new f.A({level:0,scale:e,resolution:e*p}));for(let i=1;i<s;i++){const s=e/2**t,r=s*p;m.push(new f.A({level:i,scale:s,resolution:r})),e=s}}return new i({dpi:96,lods:m,origin:u,size:[r,r],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,d.Vp)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return h.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],r=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach(e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,r[e.level]=e})),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],r=t[i+1];if(s<=e)return i;if(r===e)return i+1;if(s>e&&r<e)return i+Math.log(s/e)/Math.log(s/r)}return i}tileAt(e,t,s,i){const r=this.lodAt(e);if(!r)return null;let n,o;if("number"==typeof t)n=t,o=s;else if((0,d.aI)(t.spatialReference,this.spatialReference))n=t.x,o=t.y,i=s;else{const e=(0,p.Cv)(t,this.spatialReference);if(null==e)return null;n=e.x,o=e.y,i=s}const a=r.resolution*this.size[0],l=r.resolution*this.size[1];return i??=new m.U(0,0,0),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((n-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let s=this.lodAt(e.level);if(!s&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return!1;const i=e.level-s.level,r=s.resolution*this.size[0]/2**i,n=s.resolution*this.size[1]/2**i;return e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*n,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+n,!0}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,r=i*this.size[0],n=i*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+r,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const s=[],r=this.lods.length-t;for(let e=0;e<r;e++){const i=e+t,{scale:r,resolution:n}=i>=0?this.lods[i]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};s.push(new f.A({level:e,scale:r,resolution:n}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"compressionQuality",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"dpi",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],v.prototype,"format",void 0),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],v.prototype,"isWrappable",null),(0,r.Cg)([(0,l.MZ)({type:h.A,json:{write:!0}})],v.prototype,"origin",void 0),(0,r.Cg)([(0,g.w)("origin")],v.prototype,"readOrigin",null),(0,r.Cg)([(0,l.MZ)({type:[f.A],value:null,json:{write:!0}})],v.prototype,"lods",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],v.prototype,"scales",void 0),(0,r.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],v.prototype,"size",void 0),(0,r.Cg)([(0,g.w)("size",["rows","cols"])],v.prototype,"readSize",null),(0,r.Cg)([(0,y.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],v.prototype,"writeSize",null),(0,r.Cg)([(0,l.MZ)({type:c.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),v=i=(0,r.Cg)([(0,l.$K)("esri.layers.support.TileInfo")],v)},87992:(e,t,s)=>{s.d(t,{JR:()=>I,ME:()=>C,MY:()=>S,NO:()=>w,Nh:()=>M,gh:()=>b});var i=s(31635),r=s(69397),n=s(16930),o=(s(70328),s(19419)),a=s(60408),l=s(21325),u=s(513),h=s(50954),c=s(79567),d=s(52006),p=s(49663),f=s(46068),m=s(92722);class g{constructor({type:e,spatialReference:t,vertexCount:s,vertexXY:i,vertexZ:r,vertexM:n,partCount:o,partOffsets:a,partFlags:l,segmentFlags:u,segmentIndices:h,segmentParams:c,segmentCountArc:d,segmentCountBezier:p}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=s,this.vertexXY=i,this.vertexZ=r,this.vertexM=n,this.partCount=o,this.partOffsets=a,this.partFlags=l,this.segmentFlags=u,this.segmentIndices=h,this.segmentParams=c,this.segmentCountArc=d,this.segmentCountBezier=p}get segmentParamCount(){return z(4)*this.segmentCountArc+z(2)*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:e,segmentCountArc:t,segmentCountBezier:s}=this;return e&&e-t-s}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}get hasCurves(){return null!=this.segmentFlags}get isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?r.Ul+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){const{type:e,vertexCount:t,partCount:s,hasZ:i,hasM:r,hasCurves:n,segmentCountArc:o,segmentCountBezier:a}=this,l=O(e,t,s,i,r,n,o,a);l.spatialReference=this.spatialReference;const{vertexXY:u,vertexZ:h,vertexM:c}=this;l.vertexXY.set(u.subarray(0,2*t),0),l.vertexZ?.set(h.subarray(0,t),0),l.vertexM?.set(c.subarray(0,t),0);const{partOffsets:d,partFlags:p}=this;l.partFlags?.set(p.subarray(0,s+1)),l.partOffsets?.set(d.subarray(0,s+1));const{segmentFlags:f,segmentIndices:m,segmentParams:g,segmentParamCount:y}=this;return l.segmentFlags?.set(f.subarray(0,t),0),l.segmentIndices?.set(m.subarray(0,t),0),l.segmentParams?.set(g.subarray(0,y),0),l}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,l.aI)(this.spatialReference,e.spatialReference))return!1;if(this.vertexCount!==e.vertexCount||this.partCount!==e.partCount)return!1;if(this.hasZ!==e.hasZ||this.hasM!==e.hasM)return!1;if(this.hasCurves!==e.hasCurves||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;const s=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,s)=>Math.abs(e-s)>t||isNaN(e)!==isNaN(s);for(let t=0;t<this.vertexCount;++t)if(s(this.vertexXY[2*t],e.vertexXY[2*t])||s(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(s(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(s(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(s(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return new y(this)}}class y{constructor(e){this.geometry=e,this.value=new _(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class _{constructor(e){this.geometry=e,this.index=-1,this._readVertex=A(e),this._segments=new v(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class v{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===e.geometry.type,this.value=new x(e.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class x{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=A(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;const t=this.geometry.segmentParams;let s=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){const e=t[s++],i=t[s++],r=t[s++],n=t[s++];return{b:[this.end,[e,i],[r,n]]}}const i=t[s++],r=t[s++],n=t[s++],o=t[s++],a=t[s++],l=t[s++];s++,s++;const u=t[s++],h=t[s++];if(!Boolean(4&i)&&1===n)return{c:[this.end,[u,h]]};const c=2&i?0:1,d=1&i?0:1;return{a:[this.end,[a,l],c,d,o,r,n]}}}function w(e,t){const s={stack:[],error:void 0,hasError:!1};try{return t??=(0,o.Ie)(),(0,i.mS)(s,new F(e,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(t,function(e){let t;const{hasCurves:s,vertexCount:r,vertexXY:n,vertexZ:a,vertexM:l}=e,u=T(e);if(s){const s={stack:[],error:void 0,hasError:!1};try{(0,i.mS)(s,new F(e,["vertexZ","vertexM"]),!1);const r=(0,o.Ie)();for(const t of e.parts){let e=t.startVertex;for(const{curve:s}of t.segments)(0,c.e)(r,e,s),e=(0,d.yP)(s)}const[n,a,l,h]=r;t={xmin:n,ymin:a,xmax:l,ymax:h,spatialReference:u}}catch(e){s.error=e,s.hasError=!0}finally{(0,i.hk)(s)}}else{let e,s,i,o;e=s=1/0,i=o=-1/0;for(let t=0;t<r;++t){const r=n[2*t],a=n[2*t+1];e=Math.min(e,r),i=Math.max(i,r),s=Math.min(s,a),o=Math.max(o,a)}t={xmin:e,ymin:s,xmax:i,ymax:o,spatialReference:u}}if(a){let e=1/0,s=-1/0;for(const t of a)e=Math.min(e,t),s=Math.max(s,t);t.zmin=e,t.zmax=s}if(l){let e=1/0,s=-1/0;for(const t of l)e=Math.min(e,t),s=Math.max(s,t);t.mmin=e,t.mmax=s}return t}(e)),t}catch(e){s.error=e,s.hasError=!0}finally{(0,i.hk)(s)}}function C(e){let t,s,i;if((0,a.fT)(e)){i="point";const{x:r,y:n,z:o,m:a}=e,l=[r,n];null!=o&&l.push(o),null!=a&&l.push(a),s=[[l]],t=1}else(0,a.U9)(e)?(i="multipoint",s=[e.points],t=e.points.length):(0,a.Rg)(e)?(i="polyline",s=e.curvePaths??e.paths,t=s.reduce((e,t)=>e+t.length,0)):(i="polygon",s=e.curveRings??e.rings,t=s.reduce((e,t)=>e+t.length-E(t),0));const r=O(i,t,i.includes("point")?0:s.length,(0,a.Pv)(e),(0,a.W0)(e),(0,d.Ed)(e));function n(e){r.vertexXY[2*l]=e[0],r.vertexXY[2*l+1]=e[1],r.hasZ&&(r.vertexZ[l]=e[2]),r.hasM&&(r.vertexM[l]=e[o]),++l}r.spatialReference=e.spatialReference??void 0;const o=r.hasZ?3:2;let l=0;if(!r.isMultipart){if(!r.hasZ&&!r.hasM){for(const[e,t]of s[0])r.vertexXY[2*l]=e,r.vertexXY[2*l+1]=t,++l;return r}for(const e of s[0])n(e);return r}const c="polygon"===r.type;let m=0;if(!r.hasCurves){for(const e of s){r.partOffsets[m++]=l;let t=e.length;if(c&&(t-=E(e)),r.hasZ||r.hasM)for(let s=0;s<t;++s)n(e[s]);else for(let s=0;s<t;++s){const[t,i]=e[s];r.vertexXY[2*l]=t,r.vertexXY[2*l+1]=i,++l}}return r.partOffsets[m]=l,r}function g(e){const t=l-1;r.segmentFlags[t]=e;const s=z(e);r.segmentIndices[t]=0===s?R:y,4===e?++r.segmentCountArc:2===e&&++r.segmentCountBezier;const i=y+s;if(i<=(r.segmentParams?.length??0))return;let n=i*P;n=20*Math.ceil(n/20);const o=r.segmentParams;if(r.segmentParams=new Float64Array(n),null!=o)for(let e=0;e<o.length;++e)r.segmentParams[e]=o[e]}let y=0;for(const e of s){r.partOffsets[m++]=l,n(e[0]);let t=e.length;c&&(t-=E(e));for(let s=1;s<t;++s){const t=e[s];if((0,d.wY)(t)){g(4);const i=r.segmentParams,[o,[a,l],u,h,c,p,m]=t.a;let _=4;h||(_|=1),u||(_|=2);const v=(0,f.SW)((0,d.yP)(e[s-1]),t),[x,w]=(0,f.Uk)(v,.5);i[y++]=_,i[y++]=p,i[y++]=m,i[y++]=c,i[y++]=a,i[y++]=l,i[y++]=v.u2-v.u1,i[y++]=v.u1,i[y++]=x,i[y++]=w,n(o);continue}const i=(0,d.aO)(t);if((0,d.DA)(t)||i){g(4);const o=r.segmentParams,a=(0,d.yP)(t),l=i?(0,h.pM)((0,d.yP)(e[s-1]),t):(0,p.i)((0,d.yP)(e[s-1]),t),{cx:c,cy:f,thetaStart:m,thetaEnd:_,radius:v}=l;let x=i?0:4;m>_||(x|=1),Math.abs(_-m)<=Math.PI||(x|=2);const[w,C]=i?t.c[1]:(0,u.mq)(l,.5);o[y++]=x,o[y++]=v,o[y++]=1,o[y++]=0,o[y++]=c,o[y++]=f,o[y++]=_-m,o[y++]=m,o[y++]=w,o[y++]=C,n(a);continue}if((0,d.n1)(t)){g(2);const e=r.segmentParams,[s,[i,o],[a,l]]=t.b;e[y++]=i,e[y++]=o,e[y++]=a,e[y++]=l,n(s);continue}g(1),n(t)}}return r.partOffsets[m]=l,r}function b(e){const t=A(e),{vertexCount:s,partCount:i,hasZ:r,hasM:n}=e,o=T(e);if("point"===e.type){const[t,s]=e.vertexXY,i=e.vertexZ?.[0],r=e.vertexM?.[0];return{x:t,y:s,z:i,m:r,spatialReference:o}}let a=0;if("multipoint"===e.type){const e=[];for(;a<s;)e.push(t(a++));return{points:e,spatialReference:o,hasZ:r,hasM:n}}const l="polygon"===e.type;if(!e.hasCurves){const s=new Array;for(let r=0;r<i;++r){const i=e.partOffsets[r+1],n=new Array;for(;a<i;)n.push(t(a++));l&&n.length>0&&n.push(n[0]),s.push(n)}return l?{rings:s,hasZ:r,hasM:n,spatialReference:o}:{paths:s,hasZ:r,hasM:n,spatialReference:o}}const u=new Array;for(const{segments:t,startVertex:s}of e.parts){const e=[s];for(const{curve:s}of t)e.push(s);u.push(e)}return l?{rings:[],curveRings:u,hasZ:r,hasM:n,spatialReference:o}:{paths:[],curvePaths:u,hasZ:r,hasM:n,spatialReference:o}}function M(e,{lengths:t,coords:s,hasZ:i,hasM:r},n){const o=e.includes("point")?0:t.length,a="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);i??=!1,r??=!1;const u=O(e,l,o,i,r,!1,0,0);if(u.spatialReference=n??void 0,!u.isMultipart){for(let e=0,t=0;e<l;++e)u.vertexXY[2*e]=s[t++],u.vertexXY[2*e+1]=s[t++],i&&(u.vertexZ[e]=s[t++]),r&&(u.vertexM[e]=s[t++]);return u}const h=2+Number(i)+Number(r);let c=0,d=0;u.partOffsets[0]=0;for(const e of t){const t=u.partOffsets[d],n=t+e-Number(a);u.partOffsets[++d]=n;for(let e=t;e<n;++e)u.vertexXY[2*e]=s[c++],u.vertexXY[2*e+1]=s[c++],i&&(u.vertexZ[e]=s[c++]),r&&(u.vertexM[e]=s[c++]);a&&(c+=h)}return u}function I({type:e,vertexCount:t,vertexXY:s,vertexZ:i,vertexM:r,partCount:n,partOffsets:o,hasZ:a,hasM:l}){const u=new m.A([],[],a,l);n=Math.max(n,1);const h="polygon"===e;let c=0;for(let e=0;e<n;++e){const n=o?.[e+1]??t,d=u.coords.length;for(let e=c;e<n;++e)u.coords.push(s[2*e],s[2*e+1]),a&&u.coords.push(i[e]),l&&u.coords.push(r[e]);if(h){const e=c;u.coords.push(s[2*e],s[2*e+1]),a&&u.coords.push(i[e]),l&&u.coords.push(r[e])}u.lengths.push((u.coords.length-d)/u.stride),c=n}return"point"===e&&(u.lengths.length=0),u}function S(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;const t=e.getText()||void 0,s=e.isCustomWkid()?0:e.getOldID();if(s<=0)return{wkt:t};let i=e.getLatestID();(i<=0||i===s)&&(i=void 0);const r=e.getVCS();if(null==r)return{wkid:s,latestWkid:i,wkt:t};const n=r.isCustomWkid()?0:r.getOldID();if(n<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===n)&&(o=void 0),{wkid:s,wkt:t,latestWkid:i,vcsWkid:n,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new g({...e.toFlatGeometry(),spatialReference:t})}class F{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(const s of t)e[s]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function T({spatialReference:e}){return e instanceof n.A?e.toJSON():e}function A({vertexXY:e,vertexZ:t,vertexM:s}){return t?s?i=>[e[2*i],e[2*i+1],t[i],s[i]]:s=>[e[2*s],e[2*s+1],t[s]]:s?t=>[e[2*t],e[2*t+1],s[t]]:t=>[e[2*t],e[2*t+1]]}function z(e){switch(e){case 1:return 0;case 4:return 10;case 2:return 4}}function E(e){if(e.length>0){const t=e[0],s=(0,d.yP)(e.at(-1));return t.every((e,t)=>e===s[t])?1:0}return 0}function O(e,t,s,i,r,n,o,a){o??=0,a??=0;const l=new g({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:s,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let u=2*Float64Array.BYTES_PER_ELEMENT*t;i&&(u+=Float64Array.BYTES_PER_ELEMENT*t),r&&(u+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart&&(u+=(s+1)*Int32Array.BYTES_PER_ELEMENT,u+=(s+1)*Int8Array.BYTES_PER_ELEMENT),n&&(u+=t*Int8Array.BYTES_PER_ELEMENT,u+=t*Int32Array.BYTES_PER_ELEMENT,u+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const h=new ArrayBuffer(u);let c=0;if(l.vertexXY=new Float64Array(h,c,2*t),c+=l.vertexXY.byteLength,i&&(l.vertexZ=new Float64Array(h,c,t),c+=l.vertexZ.byteLength),r&&(l.vertexM=new Float64Array(h,c,t),c+=l.vertexM.byteLength),n&&(l.segmentParams=new Float64Array(h,c,l.segmentParamCount),c+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(h,c,t),l.segmentIndices.fill(R),c+=l.segmentIndices.byteLength),l.isMultipart&&(l.partOffsets=new Int32Array(h,c,s+1),c+=l.partOffsets.byteLength,l.partFlags=new Int8Array(h,c,s+1),c+=l.partFlags.byteLength),n&&(l.segmentFlags=new Int8Array(h,c,t),l.segmentFlags.fill(1),c+=l.segmentFlags.byteLength),"polygon"===l.type)for(let e=0;e<s;++e)l.partFlags[e]=1;return l}const P=1.61803,R=-1},88625:(e,t,s)=>{s.d(t,{A:()=>_});var i,r=s(31635),n=s(69540),o=s(66552),a=s(25482),l=s(97768),u=s(91429),h=s(30524);let c=i=class extends a.o{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,t){return(0,h.Dx)(e,t,null,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"expression",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=i=(0,r.Cg)([(0,u.$K)("esri.symbols.support.FeatureExpressionInfo")],c);const d=c;var p=s(16271),f=s(36005),m=s(43937);const g=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let _=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e.expression?e:void 0:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,l.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r.Cg)([(0,u.MZ)({type:d,json:{write:!0}})],_.prototype,"featureExpressionInfo",void 0),(0,r.Cg)([(0,f.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],_.prototype,"readFeatureExpressionInfo",null),(0,r.Cg)([(0,m.K)("featureExpressionInfo",{featureExpressionInfo:{type:d},"featureExpression.value":{type:[0]}})],_.prototype,"writeFeatureExpressionInfo",null),(0,r.Cg)([(0,u.MZ)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],_.prototype,"mode",null),(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],_.prototype,"offset",void 0),(0,r.Cg)([(0,u.MZ)({type:p.KQ,json:{type:String,read:y.read,write:y.write}})],_.prototype,"unit",null),_=(0,r.Cg)([(0,u.$K)("esri.symbols.support.ElevationInfo")],_)},91806:(e,t,s)=>{s.d(t,{A:()=>l});var i,r=s(31635),n=s(25482),o=s(91429),a=s(56507);let l=class extends n.o{static{i=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"cols",void 0),(0,r.Cg)([(0,o.MZ)({type:a.jz,json:{write:!0}})],l.prototype,"level",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"levelValue",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"origin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"resolution",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"rows",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"scale",void 0),l=i=(0,r.Cg)([(0,o.$K)("esri.layers.support.LOD")],l)},98453:(e,t,s)=>{s.d(t,{m:()=>i});const i=new(s(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7547],{513:(t,n,e)=>{e.d(n,{KP:()=>a,X0:()=>h,fM:()=>c,mq:()=>u,zW:()=>l});var r=e(19419),s=e(59803),i=e(15507);class a{constructor(t,n,e,r,s,i){this.cx=t,this.cy=n,this.radius=e,this.thetaStart=r,this.thetaEnd=s,this.isInvalid=i}get startPoint(){const{cx:t,cy:n,radius:e,thetaStart:r}=this;return[t+e*Math.cos(r),n+e*Math.sin(r)]}get endPoint(){const{cx:t,cy:n,radius:e,thetaEnd:r}=this;return[t+e*Math.cos(r),n+e*Math.sin(r)]}}function o(t,n){const{cx:e,cy:r,radius:s}=t;return[e+s*Math.cos(n),r+s*Math.sin(n)]}function u(t,n){if(t.isInvalid)return(0,i.RS)([0,0],t.startPoint,t.endPoint,n);const{thetaStart:e,thetaEnd:r}=t;return o(t,e*(1-n)+r*n)}function c(t,n){if(t.isInvalid)return(0,s.T)(t.startPoint,t.endPoint,n);const{cx:e,cy:r,thetaStart:a,thetaEnd:u}=t,[c,h]=n,l=(0,i.Pf)((0,i.yN)(a,u),Math.atan2(h-r,c-e)),f=o(t,l);return{t:(l-a)/(u-a),curvePoint:f,distance:Math.sqrt((0,i.kb)(n,f))}}function h(t,n){if(n.isInvalid)return(0,r.tK)(t,n.startPoint),(0,r.tK)(t,n.endPoint),t;const{cx:e,cy:s,radius:a,thetaStart:u,thetaEnd:c}=n;(0,r.tK)(t,o(n,u)),(0,r.tK)(t,o(n,c));const h=(0,i.yN)(u,c),l=Math.PI/2;let f=0;for(const n of[[e+a,s],[e,s+a],[e-a,s],[e,s-a]])f=(0,i.Cp)(h,f),f>h.min&&f<h.max&&(0,r.tK)(t,n),f+=l;return t}function l(t){if(t.isInvalid)return 2*t.radius;const{radius:n,thetaStart:e,thetaEnd:r}=t;return n*Math.abs(r-e)}},537:(t,n,e)=>{e.d(n,{B$:()=>g,LJ:()=>y,Pj:()=>v,Rg:()=>p,Yz:()=>d,z8:()=>M});var r=e(19419),s=e(79567),i=e(52006);function a(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function o(t){return void 0!==t.points}function u(t){return void 0!==t.x&&void 0!==t.y}function c(t){return void 0!==t.paths}function h(t){return void 0!==t.rings}function l(t){return function(n,e){return null==n?e:null==e?n:t(n,e)}}const f=l(Math.min),m=l(Math.max);function p(t,n){return c(n)?d(t,n.curvePaths??n.paths,!1,!1)??t:h(n)?d(t,n.curveRings??n.rings,!1,!1)??t:o(n)?v(t,n.points,!1,!1,!1,!1):a(n)?x(t,n):(u(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.x,t[3]=n.y),t)}function M(t){let n,e,s,i;for(t.reset(),n=s=1/0,e=i=-1/0;t.nextPath();){const r=g(t);n=Math.min(r[0],n),s=Math.min(r[1],s),e=Math.max(r[2],e),i=Math.max(r[3],i)}return(0,r.vt)([n,s,e,i])}function g(t){let n,e,s,i;for(n=s=1/0,e=i=-1/0;t.nextPoint();)n=Math.min(t.x,n),s=Math.min(t.y,s),e=Math.max(t.x,e),i=Math.max(t.y,i);return(0,r.vt)([n,s,e,i])}function y(t,n){return c(n)?d(t,n.curvePaths??n.paths,!0,!1)??t:h(n)?d(t,n.curveRings??n.rings,!0,!1)??t:o(n)?v(t,n.points,!0,!1,!0,!1):a(n)?x(t,n,0,0,!0,!1):(u(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 d(t,n,e,a){const o=e?3:2;if(!n.length||!n[0].length)return null;let u,c,h,l,[p,M]=(0,i.yP)(n[0][0]),g=p,y=M;for(let t=0;t<n.length;t++){const d=n[t];for(let t=0;t<d.length;t++){const n=(0,i.yP)(d[t]),[x,v]=n;if(p=f(p,x),M=f(M,v),g=m(g,x),y=m(y,v),e&&n.length>2){const t=n[2];u=f(u,t),c=m(c,t)}if(a&&n.length>o){const t=n[o];h=f(h,t),l=m(l,t)}const b=d[t];if((0,i.Xq)(b)||t<1)continue;const P=(0,i.yP)(d[t-1]),I=(0,r.fA)(p,M,g,y);[p,M,g,y]=(0,s.e)(I,P,b)}}return e?a?(t[0]=p,t[1]=M,t[2]=u,t[3]=h,t[4]=g,t[5]=y,t[6]=c,t[7]=l,t.length=8,t):(t[0]=p,t[1]=M,t[2]=u,t[3]=g,t[4]=y,t[5]=c,t.length=6,t):a?(t[0]=p,t[1]=M,t[2]=h,t[3]=g,t[4]=y,t[5]=l,t.length=6,t):(t[0]=p,t[1]=M,t[2]=g,t[3]=y,t.length=4,t)}function x(t,n,e,r,s,i){const a=n.xmin,o=n.xmax,u=n.ymin,c=n.ymax;let h=n.zmin,l=n.zmax,f=n.mmin,m=n.mmax;return s?(h=h||0,l=l||0,i?(f=f||0,m=m||0,t[0]=a,t[1]=u,t[2]=h,t[3]=f,t[4]=o,t[5]=c,t[6]=l,t[7]=m,t):(t[0]=a,t[1]=u,t[2]=h,t[3]=o,t[4]=c,t[5]=l,t)):i?(f=f||0,m=m||0,t[0]=a,t[1]=u,t[2]=f,t[3]=o,t[4]=c,t[5]=m,t):(t[0]=a,t[1]=u,t[2]=o,t[3]=c,t)}function v(t,n,e,r,s,i){const a=e?3:2,o=r&&i,u=e&&s;if(!n.length||!n[0].length)return null;let c,h,l,p,[M,g]=n[0],[y,d]=n[0];for(let t=0;t<n.length;t++){const e=n[t],[r,s]=e;if(M=f(M,r),g=f(g,s),y=m(y,r),d=m(d,s),u&&e.length>2){const t=e[2];c=f(c,t),h=m(h,t)}if(o&&e.length>a){const t=e[a];l=f(c,t),p=m(h,t)}}return s?(c=c||0,h=h||0,i?(l=l||0,p=p||0,t[0]=M,t[1]=g,t[2]=c,t[3]=l,t[4]=y,t[5]=d,t[6]=h,t[7]=p,t):(t[0]=M,t[1]=g,t[2]=c,t[3]=y,t[4]=d,t[5]=h,t)):i?(l=l||0,p=p||0,t[0]=M,t[1]=g,t[2]=l,t[3]=y,t[4]=d,t[5]=p,t):(t[0]=M,t[1]=g,t[2]=y,t[3]=d,t)}},4305:(t,n,e)=>{e.d(n,{jK:()=>h,lM:()=>f,m_:()=>l,ty:()=>p});var r=e(34727),s=e(19419),i=e(15507);const a=[0,0];function o(t){const n=1-t,e=n*n,r=t*t;return[e*n,3*t*e,3*r*n,r*t]}function u(t,n,e,r,s){const[i,a,u,c]=o(s);return[t[0]*i+n[0]*a+e[0]*u+r[0]*c,t[1]*i+n[1]*a+e[1]*u+r[1]*c]}function c(t,n,e,r,s){const[i,a,u,c]=o(s);return t*i+n*a+e*u+r*c}function h(t,n,e){const r=t,[s,o,u]=n.b,c=(0,i.RS)([0,0],r,o,e),h=(0,i.RS)(a,o,u,e),l=(0,i.RS)([0,0],u,s,e),f=(0,i.RS)([0,0],c,h,e),m=(0,i.RS)([0,0],h,l,e);return[{b:[(0,i.RS)([],f,m,e),c,f]},{b:[[...s],m,l]}]}function l(t,n,e){const s=t,[a,o,c]=n.b,h=(0,i.R)(e,[.1,.5,.9],t=>{const n=1-t,[e,r]=u(s,o,c,a,t);return[e,r,3*n*n*(o[0]-s[0])+6*n*t*(c[0]-o[0])+3*t*t*(a[0]-c[0]),3*n*n*(o[1]-s[1])+6*n*t*(c[1]-o[1])+3*t*t*(a[1]-c[1]),6*n*(c[0]-2*o[0]+s[0])+6*t*(a[0]-2*c[0]+o[0]),6*n*(c[1]-2*o[1]+s[1])+6*t*(a[1]-2*c[1]+o[1])]}).map(t=>Math.min(1,Math.max(0,t)));h.push(0,1);let l=1/0;const f=h.map(t=>{const n=u(s,o,c,a,t),[r,i]=n,h=e[0]-r,f=e[1]-i,m=Math.sqrt(h*h+f*f);return l=Math.min(m,l),{t,curvePoint:n,distance:m}}),m=[];for(const t of f){const{t:n,distance:e}=t;(0,r.b6)(e,l)&&!m.some(({t})=>(0,r.Sp)(t,n))&&m.push(t)}return m}function f(t,n,e){const r=n,[i,a,o]=e.b;if((0,s.tK)(t,r),(0,s.tK)(t,i),(0,s.Rj)(t,a[0],a[1])&&(0,s.Rj)(t,o[0],o[1]))return t;for(const n of m(r[0],a[0],o[0],i[0]))n>0&&n<1&&(0,s.nw)(t,c(r[0],a[0],o[0],i[0],n));for(const n of m(r[1],a[1],o[1],i[1]))n>0&&n<1&&(0,s.IO)(t,c(r[1],a[1],o[1],i[1],n));return t}function m(t,n,e,r){const s=3*(3*(n-e)-t+r),i=6*(t-2*n+e),a=3*(n-t);if(0===s)return 0!==i?[-a/i]:[];const o=Math.sqrt(i*i-4*s*a);return[(-i+o)/(2*s),(-i-o)/(2*s)]}function p(t,n,e){let r=0,s=[n];for(let n=0;n<16;n++){let n=t;const a=[];for(const t of s)a.push(...h(n,t,.5)),n=t.b[0];s=a,n=t,r=0;let o=0;for(const t of s){const[e,s,a]=t.b,u=Math.sqrt((0,i.kb)(n,e));r+=(u+(Math.sqrt((0,i.kb)(n,s))+Math.sqrt((0,i.kb)(s,a))+Math.sqrt((0,i.kb)(a,e))))/2,o+=u,n=e}if(r-o<e)return r}return r}},12359:(t,n,e)=>{e.d(n,{IK:()=>h,TP:()=>f,Ve:()=>o,Z4:()=>i,l8:()=>a,w2:()=>c});var r=e(51118),s=e(95108);function i(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 function(t,n){if(!t?.length)return null;const e=[],r=[],i=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,s=t.length;e<s;e++){const s=u(t[e],n,i);s&&r.push(s)}if(r.sort((t,e)=>{let r=t[2]-e[2];return 0===r&&n&&(r=t[4]-e[4]),r}),r.length&&(e[0]=r[0][0],e[1]=r[0][1],n&&(e[2]=r[0][3]),(e[0]<i[0]||e[0]>i[1]||e[1]<i[2]||e[1]>i[3]||n&&(e[2]<i[4]||e[2]>i[5]))&&(e.length=0)),!e.length){const r=t[0]&&t[0].length?function(t,n){const e=n?[0,0,0]:[0,0],r=n?[0,0,0]:[0,0];let i=0,a=0,o=0,u=0;for(let c=0,h=t.length;c<h-1;c++){const h=t[c],l=t[c+1];if(h&&l){e[0]=h[0],e[1]=h[1],r[0]=l[0],r[1]=l[1],n&&h.length>2&&l.length>2&&(e[2]=h[2],r[2]=l[2]);const t=(0,s.R3)(e,r);if(t){i+=t;const e=(0,s.t9)(h,l);a+=t*e[0],o+=t*e[1],n&&e.length>2&&(u+=t*e[2])}}}return i>0?n?[a/i,o/i,u/i]:[a/i,o/i]:t.length?t[0]:null}(t[0],n):null;if(!r)return null;e[0]=r[0],e[1]=r[1],n&&r.length>2&&(e[2]=r[2])}return e}(t.rings,t.hasZ??!1)}function o(t){const n=a(t);if(!n)return null;const{hasZ:e,spatialReference:r}=t,[s,i,o]=n;return isNaN(s)||isNaN(i)||e&&isNaN(o)?null:{x:s,y:i,z:e?o:void 0,spatialReference:r}}function u(t,n,e){let r=0,s=0,i=0,a=0,o=0;const u=t.length?t[0][0]:0,c=t.length?t[0][1]:0,h=t.length&&n?t[0][2]:0;for(let l=0;l<t.length;l++){const f=t[l],m=t[(l+1)%t.length],[p,M,g]=f,y=p-u,d=M-c,[x,v,b]=m,P=x-u,I=v-c,R=y*I-P*d;if(a+=R,r+=(y+P)*R,s+=(d+I)*R,n&&f.length>2&&m.length>2){const t=g-h,n=b-h,e=y*n-P*t;i+=(t+n)*e,o+=e}p<e[0]&&(e[0]=p),p>e[1]&&(e[1]=p),M<e[2]&&(e[2]=M),M>e[3]&&(e[3]=M),n&&(g<e[4]&&(e[4]=g),g>e[5]&&(e[5]=g))}if(a>0&&(a*=-1),o>0&&(o*=-1),!a)return null;a*=.5,o*=.5;const l=[r/(6*a)+u,s/(6*a)+c,a];return n&&(e[4]===e[5]||0===o?(l[3]=(e[4]+e[5])/2,l[4]=0):(l[3]=i/(6*o)+h,l[4]=o)),l}function c(t,n){let e=0,r=0,s=0;t.nextPoint();const i=t.pathSize?t.x:0,a=t.pathSize?t.y:0;for(let o=0;o<t.pathSize;o++){t.seekInPath(o);const u=[t.x,t.y];t.seekInPath((o+1)%t.pathSize);const c=[t.x,t.y],[h,l]=u,f=h-i,m=l-a,[p,M]=c,g=p-i,y=M-a,d=f*y-g*m;s+=d,e+=(f+g)*d,r+=(m+y)*d,h<n[0]&&(n[0]=h),h>n[1]&&(n[1]=h),l<n[2]&&(n[2]=l),l>n[3]&&(n[3]=l)}return s>0&&(s*=-1),s?(s*=.5,[e/(6*s)+i,r/(6*s)+a,s]):null}function h(t){const{hasZ:n,totalSize:e}=t;if(0===e)return null;const i=[],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=u((0,r.A)(t),t.hasZ,o);n&&a.push(n)}if(a.sort((t,e)=>{let r=t[2]-e[2];return 0===r&&n&&(r=t[4]-e[4]),r}),a.length&&(i[0]=a[0][0],i[1]=a[0][1],n&&(i[2]=a[0][3]),(i[0]<o[0]||i[0]>o[1]||i[1]<o[2]||i[1]>o[3]||n&&(i[2]<o[4]||i[2]>o[5]))&&(i.length=0)),!i.length){t.reset(),t.nextPath();const e=t.pathSize?function(t){const{hasZ:n}=t,e=n?[0,0,0]:[0,0],r=n?[0,0,0]:[0,0];let i=0,a=0,o=0,u=0;if(t.nextPoint()){let c=t.x,h=t.y,l=t.z;for(;t.nextPoint();){const f=t.x,m=t.y,p=t.z;e[0]=c,e[1]=h,r[0]=f,r[1]=m,n&&(e[2]=l,r[2]=p);const M=(0,s.R3)(e,r);if(M){i+=M;const t=(0,s.t9)(e,r);a+=M*t[0],o+=M*t[1],n&&t.length>2&&(u+=M*t[2])}c=f,h=m,l=p}}return i>0?n?[a/i,o/i,u/i]:[a/i,o/i]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}(t):null;if(!e)return null;i[0]=e[0],i[1]=e[1],n&&e.length>2&&(i[2]=e[2])}return i}const l=1e-6;function f(t){let n=0;for(t.reset();t.nextPath();)n+=t.getCurrentRingArea();if(n<l){const n=h(t);return n?[n[0],n[1]]:null}const e=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;const r=[t.x,t.y];for(t.reset();t.nextPath();)p(e,r,t);return e[0]*=1/n,e[1]*=1/n,e[0]+=r[0],e[1]+=r[1],e}const m=1/3;function p(t,n,e){if(!t||!e||e.pathSize<3)return null;e.nextPoint();const r=e.x,s=e.y;e.nextPoint();let i,a=e.x-r,o=e.y-s,u=0,c=0;for(;e.nextPoint();)u=e.x-r,c=e.y-s,i=.5*m*(u*o-c*a),t[0]+=i*(a+u),t[1]+=i*(o+c),a=u,o=c;const h=e.getCurrentRingArea(),l=[r,s];return l[0]-=n[0],l[1]-=n[1],l[0]*=h,l[1]*=h,t[0]+=l[0],t[1]+=l[1],t}},15507:(t,n,e)=>{e.d(n,{Cp:()=>p,Gz:()=>m,M_:()=>o,Pf:()=>M,R:()=>g,RS:()=>i,kb:()=>a,t7:()=>c,yN:()=>f});var r=e(34727),s=e(37585);function i(t,n,e,r){return t[0]=n[0]*(1-r)+e[0]*r,t[1]=n[1]*(1-r)+e[1]*r,t}function a(t,n){return(0,s.hG)(t,n)}function o(t,n,e,r,s){const[i,a]=n,[o,u]=e,[c,h]=r,[l,f]=s,m=(i-o)*(h-f)-(a-u)*(c-l);if(0===m)return null;const p=(i*u-a*o)*(c-l)-(i-o)*(c*f-h*l),M=(i*u-a*o)*(h-f)-(a-u)*(c*f-h*l);return t[0]=p/m,t[1]=M/m,t}const u=2*Math.PI;function c(t,n){const e=Math.atan2(t,n);return e<0?e+u:e}function h(t){return Math.abs(t)%u}function l(t){const n=h(t);return n<Math.PI?n:u-n}function f(t,n){return{min:Math.min(t,n),max:Math.max(t,n)}}function m(t,n,e,s){if((0,r.Sp)(h(t-n),0))return e?[t,t]:[t,s?t-u:t+u];const[i,a]=s?[t-u,t]:[t,t+u];return[t,p({min:i,max:a},n)]}function p({min:t,max:n},e){let r;return r=n-e,r>=u?(r-=r%u,e+r):(r=e-t,r>=u?(r-=r%u,e-r):e)}function M(t,n){const e=p(t,n);return e>t.min&&e<t.max?e:l(e-t.min)<l(e-t.max)?t.min:t.max}function g(t,n,e,r=10){return n.map(n=>{let s=n;for(let n=0;n<r;n++){const[n,r,i,a,o,u]=e(s),c=t[0]-n,h=t[1]-r,l=-i,f=-a;s+=-(2*c*l+2*h*f)/(2*l*l+2*c*-o+2*f*f+2*h*-u||1e-6)}return s})}},29242:(t,n,e)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function s(t,n,e,r,s,i,a,o,u){return[t,n,e,r,s,i,a,o,u]}e.d(n,{fA:()=>s,vt:()=>r,zK:()=>i});const i=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:s},Symbol.toStringTag,{value:"Module"}))},37585:(t,n,e)=>{e.d(n,{C:()=>s,Cc:()=>g,Io:()=>l,S8:()=>M,WQ:()=>a,aI:()=>v,e$:()=>d,hG:()=>f,hZ:()=>i,hs:()=>h,jb:()=>P,l0:()=>y,t2:()=>x});var r=e(34304);function s(t,n){return t[0]=n[0],t[1]=n[1],t}function i(t,n,e){return t[0]=n,t[1]=e,t}function a(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t}function o(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t}function u(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t}function c(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t}function h(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t}function l(t,n){const e=n[0]-t[0],r=n[1]-t[1];return Math.sqrt(e*e+r*r)}function f(t,n){const e=n[0]-t[0],r=n[1]-t[1];return e*e+r*r}function m(t){const n=t[0],e=t[1];return Math.sqrt(n*n+e*e)}function p(t){const n=t[0],e=t[1];return n*n+e*e}function M(t,n){const e=n[0],r=n[1];let s=e*e+r*r;return s>0&&(s=1/Math.sqrt(s),t[0]=n[0]*s,t[1]=n[1]*s),t}function g(t,n,e,r){const s=n[0],i=n[1];return t[0]=s+r*(e[0]-s),t[1]=i+r*(e[1]-i),t}function y(t,n,e){const r=n[0],s=n[1];return t[0]=e[0]*r+e[2]*s+e[4],t[1]=e[1]*r+e[3]*s+e[5],t}function d(t,n,e,r){const s=n[0]-e[0],i=n[1]-e[1],a=Math.sin(r),o=Math.cos(r);return t[0]=s*o-i*a+e[0],t[1]=s*a+i*o+e[1],t}function x(t,n){return t[0]===n[0]&&t[1]===n[1]}function v(t,n){const e=t[0],s=t[1],i=n[0],a=n[1],o=(0,r.FD)();return Math.abs(e-i)<=o*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(s-a)<=o*Math.max(1,Math.abs(s),Math.abs(a))}const b=m,P=o,I=u,R=c,A=l,N=f,S=p;Object.freeze(Object.defineProperty({__proto__:null,add:a,angle:function(t,n){const e=t[0],r=t[1],s=n[0],i=n[1];let a=e*e+r*r;a>0&&(a=1/Math.sqrt(a));let o=s*s+i*i;o>0&&(o=1/Math.sqrt(o));const u=(e*s+r*i)*a*o;return u>1?0:u<-1?Math.PI:Math.acos(u)},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t},copy:s,cross:function(t,n,e){const r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t},dist:A,distance:l,div:R,divide:c,dot:function(t,n){return t[0]*n[0]+t[1]*n[1]},equals:v,exactEquals:x,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},len:b,length:m,lerp:g,max:function(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t},min:function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t},mul:I,multiply:u,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t},normalize:M,projectAndScale:function(t,n,e,r,s){let i=n[0]-e[0],a=n[1]-e[1];const o=(r[0]*i+r[1]*a)*(s-1);return i=r[0]*o,a=r[1]*o,t[0]=n[0]+i,t[1]=n[1]+a,t},random:function(t,n=1){const e=2*(0,r.Ov)()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t},rotate:d,round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t},scale:h,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t},set:i,sqrDist:N,sqrLen:S,squaredDistance:f,squaredLength:p,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:P,subtract:o,transformMat2:function(t,n,e){const r=n[0],s=n[1];return t[0]=e[0]*r+e[2]*s,t[1]=e[1]*r+e[3]*s,t},transformMat2d:y,transformMat3:function(t,n,e){const r=n[0],s=n[1];return t[0]=e[0]*r+e[3]*s+e[6],t[1]=e[1]*r+e[4]*s+e[7],t},transformMat4:function(t,n,e){const r=n[0],s=n[1];return t[0]=e[0]*r+e[4]*s+e[12],t[1]=e[1]*r+e[5]*s+e[13],t}},Symbol.toStringTag,{value:"Module"}))},39829:(t,n,e)=>{e.d(n,{A:()=>P});var r,s=e(31635),i=e(4576),a=e(51447),o=e(4718),u=e(53966),c=e(91429),h=e(5443),l=e(91075),f=e(86738),m=e(16930),p=e(12359),M=e(94078),g=e(95108),y=e(90634),d=e(28735),x=e(56993),v=e(43937);function b(t){return!Array.isArray(t[0])}let P=r=class extends l.A{static fromExtent(t){const n=t.clone().normalize(),{spatialReference:e}=t;let s=!1,i=!1;for(const t of n)t.hasZ&&(s=!0),t.hasM&&(i=!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(s&&t.hasZ){const e=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<n.length;t++)n[t].push(e)}if(i&&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 s&&(a.hasZ=!0),i&&(a.hasM=!0),new r(a)}constructor(t){super(function(t){if(!t)return;let{rings:n,hasM:e,hasZ:r,spatialReference:s}=t;switch(n??=[],function(t){return"number"==typeof t[0]?.[0]}(n)&&(n=[n]),n[0]?.[0]?.length){case 4:r??=!0,e??=!0;break;case 3:r??=!0!==e,e??=!r;break;default:r??=!1,e??=!1}return s??=m.A.WGS84,{...t,hasM:e,hasZ:r,rings:n,spatialReference:s}}(t)),this.curveRings=void 0,this.rings=[],this.type="polygon"}get cache(){return this.commitProperty("curveRings"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("rings"),this.commitProperty("spatialReference"),{}}get centroid(){(0,a.Lx)(u.A.getLogger(this),"centroid",{replacement:"Please use centroidOperator.execute() instead.",version:"4.34",warnOnce:!0});const t=(0,p.Ve)(this);return t?f.A.fromJSON(t):null}writeCurveRings(t,n){n.curveRings=(0,o.o8)(t)}get extent(){const t=(0,y.v)(this),{spatialReference:n}=this;return t?new h.A({...t,spatialReference:n}):null}writeRings(t,n){n.rings=(0,o.o8)(this.rings)}addRing(t){if(!t)return;const n=this.rings,e=n.length;if(b(t)){const r=[];for(let n=0,e=t.length;n<e;n++)r[n]=t[n].toArray();n[e]=r}else n[e]=t.slice();return this.notifyChange("rings"),this}clone(){const t=new r;return t.spatialReference=this.spatialReference,t.rings=(0,o.o8)(this.rings),t.curveRings=(0,o.o8)(this.curveRings),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 r=([t,n,e,r],[s,i,a,o])=>t===s&&n===i&&(null==e&&null==a||e===a)&&(null==r&&null==o||r===o);for(let n=0;n<this.rings.length;n++){const e=this.rings[n],s=t.rings[n];if(!(0,i.aI)(e,s,r))return!1}return!0}contains(t){if(!t)return!1;const n=(0,d.Cv)(t,this.spatialReference);return(0,M.m3)(this,null!=n?n:t)}isClockwise(t){const n=b(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;return(0,g.$3)(n)}getPoint(t,n){if(!this._validateInputs(t,n))return null;const e=this.rings[t][n],r=this.hasZ,s=this.hasM;return r&&!s?new f.A(e[0],e[1],e[2],void 0,this.spatialReference):s&&!r?new f.A(e[0],e[1],void 0,e[2],this.spatialReference):r&&s?new f.A(e[0],e[1],e[2],e[3],this.spatialReference):new f.A(e[0],e[1],this.spatialReference)}insertPoint(t,n,e){return this._validateInputs(t,n,!0)?((0,x.h)(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 f.A(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,r=n.map(t=>new f.A(t,e));return this.notifyChange("rings"),r}setPoint(t,n,e){return this._validateInputs(t,n)?((0,x.h)(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 r=this.rings[t];if(e&&(n<0||n>r.length))return!1;if(!e&&(n<0||n>=r.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,s.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"cache",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"centroid",null),(0,s.Cg)([(0,c.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],P.prototype,"curveRings",void 0),(0,s.Cg)([(0,v.K)("curveRings")],P.prototype,"writeCurveRings",null),(0,s.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"extent",null),(0,s.Cg)([(0,c.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],P.prototype,"rings",void 0),(0,s.Cg)([(0,v.K)("rings")],P.prototype,"writeRings",null),P=r=(0,s.Cg)([(0,c.$K)("esri.geometry.Polygon")],P),P.prototype.toJSON.isDefaultToJSON=!0},46068:(t,n,e)=>{e.d(n,{DL:()=>m,ED:()=>l,SW:()=>u,Uk:()=>h,pb:()=>f,xm:()=>p}),e(77690);var r=e(29242),s=(e(37585),e(19419)),i=e(52006),a=e(15507);class o{constructor(t,n,e,r,s,i,a,o,u){this.cx=t,this.cy=n,this.a=e,this.b=r,this.cosR=s,this.sinR=i,this.u1=a,this.u2=o,this.isInvalid=u}}function u(t,n){const[e,r,s,i,u,c,h]=n.a,[l,f]=t,[m,p]=e,[M,g]=r,y=c*h,d=Math.cos(u),x=Math.sin(u),[v,b]=(0,a.Gz)((0,a.t7)(1/y*(f-g)*d-1/y*(l-M)*x,1/c*(f-g)*x+1/c*(l-M)*d),Math.atan2(1/y*(p-g)*d-1/y*(m-M)*x,1/c*(p-g)*x+1/c*(m-M)*d),s,i);return new o(M,g,c,y,d,x,v,b,0===c||0===y)}function c(t,n){const{a:e,b:r,cosR:s,sinR:i,cx:a,cy:o}=t,u=Math.cos(n),c=Math.sin(n);return[e*u*s-r*c*i+a,e*u*i+r*c*s+o]}function h(t,n){const{u1:e,u2:r}=t;return c(t,e*(1-n)+r*n)}function l(t,n,e){if(e<0||e>1)return[];if(0===e||1===e)return[(0,i.tk)(n)];const[r,[s,a],o,u,c,l,f]=n.a,{u1:m,u2:p}=t,M=m*(1-e)+p*e;return[{a:[[...h(t,e)],[s,a],Math.abs(M-m)<Math.PI?1:0,u,c,l,f]},{a:[[...r],[s,a],Math.abs(p-M)<Math.PI?1:0,u,c,l,f]}]}function f(t,n){const{a:e,b:r,cosR:s,sinR:i,u1:o,u2:u}=t,h=Math.PI/6,l=(0,a.R)(n,[1*h,2*h,4*h,5*h,7*h,8*h,10*h,11*h],n=>{const a=Math.cos(n),o=Math.sin(n),[u,h]=c(t,n);return[u,h,-e*s*o-r*i*a,-e*i*o+r*s*a,-e*s*a+r*i*o,-e*i*a-r*s*o]}),f=(0,a.yN)(o,u),m=new Set(l.map(t=>(0,a.Cp)(f,t)).filter(t=>t>f.min&&t<f.max));m.add(o),m.add(u);let p,M,g=1/0;for(const e of m){const r=c(t,e),[s,i]=r,a=n[0]-s,h=n[1]-i,l=a*a+h*h;l<g&&(p=(e-o)/(u-o),M=r,g=l)}return{t:p,curvePoint:M,distance:Math.sqrt(g)}}function m(t,n,e){const r=u(n,e),{a:i,b:o,u1:h,u2:l,cosR:f,sinR:m,isInvalid:p}=r,M=e.a[0];if((0,s.tK)(t,n),(0,s.tK)(t,M),p)return t;const g=Math.atan2(-o*m,i*f),y=g+Math.PI,d=Math.atan2(o*f,i*m),x=d+Math.PI,v=(0,a.yN)(h,l);for(const n of[g,y,d,x].map(t=>(0,a.Cp)(v,t)))n>v.min&&n<v.max&&(0,s.tK)(t,c(r,n));return t}function p(t,n,e){const[r,s,i,o,l,f,m]=n.a,p=u(t,n),{u1:M,u2:g,isInvalid:y}=p,d=g-M;if(y)return Math.sqrt((0,a.kb)(t,r));const x=[0,0];let v=0,b=[h(p,0),h(p,.25),h(p,.5),h(p,.75),h(p,1)];for(let t=0;t<14;t++){const t=b.length-1,n=d/(2*t),r=[];for(let e=0;e<t;e++)r.push(b[e]),r.push(c(p,M+(2*e+1)*n));r.push(b[b.length-1]),b=r,v=0;let i=0;for(let t=1;t<b.length;t++){const n=b[t-1],e=b[t];if(v+=Math.sqrt((0,a.kb)(n,e)),t>1){const r=b[t-2],o=(0,a.M_)(x,r,n,s,e);i+=o?Math.sqrt((0,a.kb)(n,o)):Math.abs(e[0]-n[0])+Math.abs(e[1]-n[1])}else i+=v}if(i-v<e)return v}return v}(0,r.vt)(),(0,r.vt)(),(0,r.vt)(),(0,r.vt)()},49663:(t,n,e)=>{e.d(n,{i:()=>a,x:()=>o});var r=e(34727),s=e(513),i=e(15507);function a(t,n){const[e,a,o,u]=n.a,[c,h]=t,[l,f]=e,[m,p]=a,M=c-m,g=h-p,y=Math.sqrt(M*M+g*g),d=l-m,x=f-p,v=Math.sqrt(d*d+x*x),b=0===y||0===v||!(0,r.b6)(y,v),P=y,[I,R]=(0,i.Gz)((0,i.t7)(h-p,c-m),Math.atan2(f-p,l-m),o,u);return new s.KP(m,p,P,I,R,b)}function o(t,n,e){const{cx:r,cy:i,thetaStart:a,thetaEnd:o}=t,[u,c,h,l]=n.a,f=a*(1-e)+o*e;return[{a:[(0,s.mq)(t,e),[r,i],Math.abs(f-a)<Math.PI?1:0,l]},{a:[[...u],[r,i],Math.abs(o-f)<Math.PI?1:0,l]}]}},50954:(t,n,e)=>{e.d(n,{GX:()=>h,pM:()=>c});var r=e(77690),s=e(29242),i=e(513),a=e(15507);const o=(0,s.vt)();function u(t,n,e){const[s,i]=t,[u,c]=n,[h,l]=e;(0,r.hZ)(o,s,u,h,i,c,l,1,1,1);const f=(0,r.a4)(o),m=4*f/((0,a.kb)(t,n)+(0,a.kb)(n,e)+(0,a.kb)(e,t));if(!isFinite(m)||Math.abs(m)<1e-8)return null;const p=s**2+i**2,M=u**2+c**2,g=h**2+l**2;(0,r.hZ)(o,p,M,g,i,c,l,1,1,1);const y=(0,r.a4)(o);return(0,r.hZ)(o,p,M,g,s,u,h,1,1,1),[y/f*.5,(0,r.a4)(o)/f*-.5]}function c(t,n){const[e,r]=n.c,s=u(t,r,e),o=null==s,c=s??(0,a.RS)([],t,e,.5),[h,l]=t,[f,m]=r,[p,M]=e,[g,y]=c,d=h-g,x=l-y,v=Math.sqrt(d*d+x*x),b=(0,a.t7)(l-y,h-g),P=(0,a.t7)(m-y,f-g);let I=(0,a.t7)(M-y,p-g);return(P-b)*(I-P)<0&&(I+=2*Math.sign(b-I)*Math.PI),new i.KP(g,y,v,b,I,o)}function h(t,n,e){const r=(0,i.mq)(t,e/2),s=(0,i.mq)(t,e),a=(0,i.mq)(t,(e+1)/2);return[{c:[s,r]},{c:[[...n.c[0]],a]}]}},51118:(t,n,e)=>{function r(t){const n=[];for(t.reset();t.nextPath();){const e=[];for(;t.nextPoint();){const n=[t.x,t.y];t.hasZ&&n.push(t.z),t.hasM&&n.push(t.m),e.push(n)}n.push(e)}return t.reset(),n}function s(t){const n=[];for(;t.nextPoint();)n.push([t.x,t.y]);return t.seekPathStart(),n}e.d(n,{A:()=>s,x:()=>r})},52006:(t,n,e)=>{function r(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function s(t){return"b"in t}function i(t){return"c"in t}function a(t){return Array.isArray(t)}function o(t){return"a"in t&&4===t.a.length}function u(t){return"a"in t&&7===t.a.length}function c(t){return a(t)?t:s(t)?t.b[0]:i(t)?t.c[0]:t.a[0]}function h(t){if(s(t)){const[n,e,r]=t.b;return{b:[[...n],[...e],[...r]]}}if(i(t)){const[n,e]=t.c;return{c:[[...n],[...e]]}}if(a(t))return[...t];if(o(t)){const[n,e,r,s]=t.a;return{a:[[...n],[...e],r,s]}}if(u(t)){const[n,e,r,s,i,a,o]=t.a;return{a:[[...n],[...e],r,s,i,a,o]}}return t}e.d(n,{DA:()=>o,Ed:()=>r,Xq:()=>a,aO:()=>i,n1:()=>s,tk:()=>h,wY:()=>u,yP:()=>c})},56993:(t,n,e)=>{function r(t,n,e=!1){let{hasM:r,hasZ:s}=t;Array.isArray(n)?4!==n.length||r||s?3===n.length&&e&&!r?(s=!0,r=!1):3===n.length&&r&&s&&(r=!1,s=!1):(r=!0,s=!0):(s=!s&&n.hasZ&&(!r||n.hasM),r=!r&&n.hasM&&(!s||n.hasZ)),t.hasZ=s,t.hasM=r}e.d(n,{h:()=>r})},59803:(t,n,e)=>{e.d(n,{T:()=>i});var r=e(34727),s=e(15507);function i(t,n,e){const[i,a]=t,[o,u]=n,[c,h]=e,[l,f]=[o-i,u-a];let m=l*(c-i)+f*(h-a);m/=l**2+f**2,m=(0,r.qE)(m,0,1);const p=(0,s.RS)([0,0],t,n,m);return{t:m,curvePoint:p,distance:Math.sqrt((0,s.kb)(p,e))}}},77690:(t,n,e)=>{e.d(n,{B8:()=>o,Ge:()=>m,I0:()=>f,KC:()=>u,a4:()=>c,hZ:()=>i,hs:()=>l,lw:()=>h,mg:()=>a,z0:()=>s});var r=e(34304);function s(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function i(t,n,e,r,s,i,a,o,u,c){return t[0]=n,t[1]=e,t[2]=r,t[3]=s,t[4]=i,t[5]=a,t[6]=o,t[7]=u,t[8]=c,t}function a(t,n){if(t===n){const e=n[1],r=n[2],s=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=s}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function o(t,n){const e=n[0],r=n[1],s=n[2],i=n[3],a=n[4],o=n[5],u=n[6],c=n[7],h=n[8],l=h*a-o*c,f=-h*i+o*u,m=c*i-a*u;let p=e*l+r*f+s*m;return p?(p=1/p,t[0]=l*p,t[1]=(-h*r+s*c)*p,t[2]=(o*r-s*a)*p,t[3]=f*p,t[4]=(h*e-s*u)*p,t[5]=(-o*e+s*i)*p,t[6]=m*p,t[7]=(-c*e+r*u)*p,t[8]=(a*e-r*i)*p,t):null}function u(t,n){const e=n[0],r=n[1],s=n[2],i=n[3],a=n[4],o=n[5],u=n[6],c=n[7],h=n[8];return t[0]=a*h-o*c,t[1]=s*c-r*h,t[2]=r*o-s*a,t[3]=o*u-i*h,t[4]=e*h-s*u,t[5]=s*i-e*o,t[6]=i*c-a*u,t[7]=r*u-e*c,t[8]=e*a-r*i,t}function c(t){const n=t[0],e=t[1],r=t[2],s=t[3],i=t[4],a=t[5],o=t[6],u=t[7],c=t[8];return n*(c*i-a*u)+e*(-c*s+a*o)+r*(u*s-i*o)}function h(t,n,e){const r=n[0],s=n[1],i=n[2],a=n[3],o=n[4],u=n[5],c=n[6],h=n[7],l=n[8],f=e[0],m=e[1],p=e[2],M=e[3],g=e[4],y=e[5],d=e[6],x=e[7],v=e[8];return t[0]=f*r+m*a+p*c,t[1]=f*s+m*o+p*h,t[2]=f*i+m*u+p*l,t[3]=M*r+g*a+y*c,t[4]=M*s+g*o+y*h,t[5]=M*i+g*u+y*l,t[6]=d*r+x*a+v*c,t[7]=d*s+x*o+v*h,t[8]=d*i+x*u+v*l,t}function l(t,n,e){const r=e[0],s=e[1],i=e[2];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=s*n[3],t[4]=s*n[4],t[5]=s*n[5],t[6]=i*n[6],t[7]=i*n[7],t[8]=i*n[8],t}function f(t,n){const e=n[0],r=n[1],s=n[2],i=n[3],a=e+e,o=r+r,u=s+s,c=e*a,h=r*a,l=r*o,f=s*a,m=s*o,p=s*u,M=i*a,g=i*o,y=i*u;return t[0]=1-l-p,t[3]=h-y,t[6]=f+g,t[1]=h+y,t[4]=1-c-p,t[7]=m-M,t[2]=f-g,t[5]=m+M,t[8]=1-c-l,t}function m(t,n){const e=n[0],r=n[1],s=n[2],i=n[3],a=n[4],o=n[5],u=n[6],c=n[7],h=n[8],l=n[9],f=n[10],m=n[11],p=n[12],M=n[13],g=n[14],y=n[15],d=e*o-r*a,x=e*u-s*a,v=e*c-i*a,b=r*u-s*o,P=r*c-i*o,I=s*c-i*u,R=h*M-l*p,A=h*g-f*p,N=h*y-m*p,S=l*g-f*M,w=l*y-m*M,Z=f*y-m*g;let C=d*Z-x*w+v*S+b*N-P*A+I*R;return C?(C=1/C,t[0]=(o*Z-u*w+c*S)*C,t[1]=(u*N-a*Z-c*A)*C,t[2]=(a*w-o*N+c*R)*C,t[3]=(s*w-r*Z-i*S)*C,t[4]=(e*Z-s*N+i*A)*C,t[5]=(r*N-e*w-i*R)*C,t[6]=(M*I-g*P+y*b)*C,t[7]=(g*v-p*I-y*x)*C,t[8]=(p*P-M*v+y*d)*C,t):null}function p(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}const M=h,g=p;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t},adjoint:u,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:c,equals:function(t,n){const e=t[0],s=t[1],i=t[2],a=t[3],o=t[4],u=t[5],c=t[6],h=t[7],l=t[8],f=n[0],m=n[1],p=n[2],M=n[3],g=n[4],y=n[5],d=n[6],x=n[7],v=n[8],b=(0,r.FD)();return Math.abs(e-f)<=b*Math.max(1,Math.abs(e),Math.abs(f))&&Math.abs(s-m)<=b*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(i-p)<=b*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(a-M)<=b*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(o-g)<=b*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(u-y)<=b*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-d)<=b*Math.max(1,Math.abs(c),Math.abs(d))&&Math.abs(h-x)<=b*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(l-v)<=b*Math.max(1,Math.abs(l),Math.abs(v))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:s,fromQuat:f,fromRotation:function(t,n){const e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:o,isOrthoNormal:function(t){const n=(0,r.FD)(),e=t[0],s=t[1],i=t[2],a=t[3],o=t[4],u=t[5],c=t[6],h=t[7],l=t[8];return Math.abs(1-(e*e+a*a+c*c))<=n&&Math.abs(1-(s*s+o*o+h*h))<=n&&Math.abs(1-(i*i+u*u+l*l))<=n},mul:M,multiply:h,multiplyScalar:function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t},multiplyScalarAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t},normalFromMat4:m,normalFromMat4Legacy:function(t,n){const e=n[0],r=n[1],s=n[2],i=n[4],a=n[5],o=n[6],u=n[8],c=n[9],h=n[10],l=h*a-o*c,f=-h*i+o*u,m=c*i-a*u,p=e*l+r*f+s*m;if(!p)return null;const M=1/p;return t[0]=l*M,t[1]=(-h*r+s*c)*M,t[2]=(o*r-s*a)*M,t[3]=f*M,t[4]=(h*e-s*u)*M,t[5]=(-o*e+s*i)*M,t[6]=m*M,t[7]=(-c*e+r*u)*M,t[8]=(a*e-r*i)*M,t},projection:function(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,e){const r=n[0],s=n[1],i=n[2],a=n[3],o=n[4],u=n[5],c=n[6],h=n[7],l=n[8],f=Math.sin(e),m=Math.cos(e);return t[0]=m*r+f*a,t[1]=m*s+f*o,t[2]=m*i+f*u,t[3]=m*a-f*r,t[4]=m*o-f*s,t[5]=m*u-f*i,t[6]=c,t[7]=h,t[8]=l,t},scale:l,scaleByVec2:function(t,n,e){const r=e[0],s=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=s*n[3],t[4]=s*n[4],t[5]=s*n[5],t},set:i,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:g,subtract:p,translate:function(t,n,e){const r=n[0],s=n[1],i=n[2],a=n[3],o=n[4],u=n[5],c=n[6],h=n[7],l=n[8],f=e[0],m=e[1];return t[0]=r,t[1]=s,t[2]=i,t[3]=a,t[4]=o,t[5]=u,t[6]=f*r+m*a+c,t[7]=f*s+m*o+h,t[8]=f*i+m*u+l,t},transpose:a},Symbol.toStringTag,{value:"Module"}))},79567:(t,n,e)=>{e.d(n,{e:()=>h});var r=e(19419),s=e(4305),i=e(513),a=e(50954),o=e(52006),u=e(49663),c=e(46068);function h(t,n,e){if((0,o.Xq)(e))return(0,r.tK)(t,n),(0,r.tK)(t,e),t;if((0,o.n1)(e))return(0,s.lM)(t,n,e);if((0,o.aO)(e)){const r=(0,a.pM)(n,e);return(0,i.X0)(t,r)}if((0,o.DA)(e)){const r=(0,u.i)(n,e);return(0,i.X0)(t,r)}return(0,c.DL)(t,n,e)}},82799:(t,n,e)=>{e.d(n,{A:()=>p});var r,s=e(31635),i=e(4718),a=e(91429),o=e(5443),u=e(91075),c=e(86738),h=e(16930),l=e(90634),f=e(56993),m=e(43937);let p=r=class extends u.A{constructor(t){super(function(t){if(!t)return;let{paths:n,hasM:e,hasZ:r,spatialReference:s}=t;switch(n??=[],function(t){return"number"==typeof t[0]?.[0]}(n)&&(n=[n]),n[0]?.[0]?.length){case 4:r??=!0,e??=!0;break;case 3:r??=!0!==e,e??=!r;break;default:r??=!1,e??=!1}return s??=h.A.WGS84,{...t,hasM:e,hasZ:r,paths:n,spatialReference:s}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,n){n.curvePaths=(0,i.o8)(t)}get extent(){const t=(0,l.Z3)(this),{spatialReference:n}=this;return t?new o.A({...t,spatialReference:n}):null}writePaths(t,n){n.paths=(0,i.o8)(this.paths)}addPath(t){if(!t)return;const n=this.paths,e=n.length;if(function(t){return!Array.isArray(t[0])}(t)){const r=[];for(let n=0,e=t.length;n<e;n++)r[n]=t[n].toArray();n[e]=r}else n[e]=t.slice();return this.notifyChange("paths"),this}clone(){const t=new r;return t.spatialReference=this.spatialReference,t.paths=(0,i.o8)(this.paths),t.curvePaths=(0,i.o8)(this.curvePaths),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],r=this.hasZ,s=this.hasM;return r&&!s?new c.A(e[0],e[1],e[2],void 0,this.spatialReference):s&&!r?new c.A(e[0],e[1],void 0,e[2],this.spatialReference):r&&s?new c.A(e[0],e[1],e[2],e[3],this.spatialReference):new c.A(e[0],e[1],this.spatialReference)}insertPoint(t,n,e){return this._validateInputs(t,n,!0)?((0,f.h)(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,r=n.map(t=>new c.A(t,e));return this.notifyChange("paths"),r}removePoint(t,n){if(!this._validateInputs(t,n))return null;const e=new c.A(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.h)(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 r=this.paths[t];if(e&&(n<0||n>r.length))return!1;if(!e&&(n<0||n>=r.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,s.Cg)([(0,a.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,s.Cg)([(0,a.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],p.prototype,"curvePaths",void 0),(0,s.Cg)([(0,m.K)("curvePaths")],p.prototype,"writeCurvePaths",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,s.Cg)([(0,a.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],p.prototype,"paths",void 0),(0,s.Cg)([(0,m.K)("paths")],p.prototype,"writePaths",null),p=r=(0,s.Cg)([(0,a.$K)("esri.geometry.Polyline")],p),p.prototype.toJSON.isDefaultToJSON=!0},90634:(t,n,e)=>{e.d(n,{HA:()=>h,Z3:()=>m,ge:()=>l,v:()=>f});var r=e(537);const s=[];function i(t,n,e,r){return{xmin:t,ymin:n,xmax:e,ymax:r}}function a(t,n,e,r,s,i){return{xmin:t,ymin:n,zmin:e,xmax:r,ymax:s,zmax:i}}function o(t,n,e,r,s,i){return{xmin:t,ymin:n,mmin:e,xmax:r,ymax:s,mmax:i}}function u(t,n,e,r,s,i,a,o){return{xmin:t,ymin:n,zmin:e,mmin:r,xmax:s,ymax:i,zmax:a,mmax:o}}function c(t,n=!1,e=!1){return n?e?u(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?o(t[0],t[1],t[2],t[3],t[4],t[5]):i(t[0],t[1],t[2],t[3])}function h(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:r,m:s}=t,c=null!=s;return null!=r?c?u(n,e,r,s,n,e,r,s):a(n,e,r,n,e,r):c?o(n,e,s,n,e,s):i(n,e,n,e)}(t):function(t){return void 0!==t.rings}(t)?f(t):function(t){return void 0!==t.paths}(t)?m(t):function(t){return void 0!==t.points}(t)?l(t):null:null}function l(t){const{hasZ:n,hasM:e,points:i}=t,a=(0,r.Pj)(s,i,n??!1,e??!1,n??!1,e??!1);return a?c(a,n,e):null}function f(t){const{hasZ:n,hasM:e,rings:i,curveRings:a}=t,o=(0,r.Yz)(s,a??i,n??!1,e??!1);return o?c(o,n,e):null}function m(t){const{hasZ:n,hasM:e,paths:i,curvePaths:a}=t,o=(0,r.Yz)(s,a??i,n??!1,e??!1);return o?c(o,n,e):null}}}]);