@arcgis/core 5.1.0-next.21 → 5.1.0-next.23

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 (183) hide show
  1. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +1 -0
  2. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -0
  3. package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +1 -0
  4. package/analysis/VolumeMeasurementAnalysis.d.ts +3 -2
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/03d11c7056fea763cbac.js +1 -0
  7. package/assets/esri/core/workers/chunks/05e5b9082c0a396df7e5.js +1 -0
  8. package/assets/esri/core/workers/chunks/08445fcba84ed7c23b3f.js +1 -0
  9. package/assets/esri/core/workers/chunks/0c706cdff6eac940eaab.js +1 -0
  10. package/assets/esri/core/workers/chunks/10a8612e7b2c74a8ce9a.js +1 -0
  11. package/assets/esri/core/workers/chunks/{2ddb8bb00b3af83ebd7c.js → 14792047c5519dd89828.js} +1 -1
  12. package/assets/esri/core/workers/chunks/1a1e57267306c07e5bdb.js +1 -0
  13. package/assets/esri/core/workers/chunks/1bb5aa1e3693e0c68b18.js +1 -0
  14. package/assets/esri/core/workers/chunks/1cd091fa567fc4026356.js +1 -0
  15. package/assets/esri/core/workers/chunks/{3ed7f19f77a11fa4d047.js → 2063b49607a03f7718ee.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{74a6d840813ac29b0bda.js → 209acb3ad16c99bb506c.js} +1 -1
  17. package/assets/esri/core/workers/chunks/21decfc1e477fb769204.js +1 -0
  18. package/assets/esri/core/workers/chunks/21e04705cad9fef1b01b.js +1 -0
  19. package/assets/esri/core/workers/chunks/23cb0611abe1031c513c.js +1 -0
  20. package/assets/esri/core/workers/chunks/285f3b07de852bfc1604.js +1 -0
  21. package/assets/esri/core/workers/chunks/2c61a53962093a331225.js +1 -0
  22. package/assets/esri/core/workers/chunks/2ecfd6edab796194bf88.js +1 -0
  23. package/assets/esri/core/workers/chunks/2f23af31b1190754ce13.js +1 -0
  24. package/assets/esri/core/workers/chunks/31eb59eae4c89b76e302.js +1 -0
  25. package/assets/esri/core/workers/chunks/3e61e7805dc6ff284831.js +1 -0
  26. package/assets/esri/core/workers/chunks/4150774059d67a8def74.js +1 -0
  27. package/assets/esri/core/workers/chunks/416c57df61fbd193078b.js +1 -0
  28. package/assets/esri/core/workers/chunks/46d28a0c20263012faff.js +1 -0
  29. package/assets/esri/core/workers/chunks/{43c8b1473695574c663e.js → 4754610760f3f634adf9.js} +2 -2
  30. package/assets/esri/core/workers/chunks/{f5cebeaad3e7d87d7997.js → 4fc6dd1423075e145b29.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{3861644c06cfebe8f40c.js → 527547fa10d52cb3a7b1.js} +2 -2
  32. package/assets/esri/core/workers/chunks/5480d4cc342a2669a8ab.js +1 -0
  33. package/assets/esri/core/workers/chunks/{e8495c655a0a4f534636.js → 551fee27bf3abf0c41fd.js} +1 -1
  34. package/assets/esri/core/workers/chunks/576995021660e8b34705.js +1 -0
  35. package/assets/esri/core/workers/chunks/57e375d8a8db9fa57193.js +1 -0
  36. package/assets/esri/core/workers/chunks/5cbc12545f42a32fb960.js +1 -0
  37. package/assets/esri/core/workers/chunks/61ebbae0773fccc1f2bf.js +1 -0
  38. package/assets/esri/core/workers/chunks/63c297b6b7438f49e7ee.js +1 -0
  39. package/assets/esri/core/workers/chunks/{53f8c1d56ef3b24d2226.js → 6c853fd89f0e9f102c6e.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{946698d9cefffdb63082.js → 6e32e7b2ea2ea1a1fc04.js} +1 -1
  41. package/assets/esri/core/workers/chunks/6f12854c5846edfe3239.js +1 -0
  42. package/assets/esri/core/workers/chunks/{b586f1021a27c5e1551a.js → 7189e03cc24f5c10865a.js} +2 -2
  43. package/assets/esri/core/workers/chunks/7c417d2bf432e4055b3d.js +30 -0
  44. package/assets/esri/core/workers/chunks/8021cb732f8136d87048.js +1 -0
  45. package/assets/esri/core/workers/chunks/84124c1a41a96192f81c.js +1 -0
  46. package/assets/esri/core/workers/chunks/845bbd82ddacbb62ad28.js +1 -0
  47. package/assets/esri/core/workers/chunks/868c8a152cb1452b9a94.js +1 -0
  48. package/assets/esri/core/workers/chunks/879ce85c50b0348056b2.js +1 -0
  49. package/assets/esri/core/workers/chunks/87a7d405a0b9a541d7f2.js +1 -0
  50. package/assets/esri/core/workers/chunks/9522430d34d29c1ffb1a.js +1 -0
  51. package/assets/esri/core/workers/chunks/9647f3983f955da21093.js +1 -0
  52. package/assets/esri/core/workers/chunks/9694b4b85168a38ca24b.js +1 -0
  53. package/assets/esri/core/workers/chunks/{83d913dab3c2b0d6a7cc.js → 9736299a4ac0e21f08a7.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{e7bee85f28d7ec03825a.js → 973e3743cb7fdaa27f80.js} +1 -1
  55. package/assets/esri/core/workers/chunks/9b2d0d36ee6c04c347df.js +1 -0
  56. package/assets/esri/core/workers/chunks/{2662750d5761ed2d0eb7.js → 9e7eea56e96f012f9ff4.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{3f812b0a28afb47aaaf0.js → a35d1be700ebd3109397.js} +2 -2
  58. package/assets/esri/core/workers/chunks/a4a4ce33de6432ba4dc3.js +1 -0
  59. package/assets/esri/core/workers/chunks/{aece665144aed2065ffc.js → a78ac951c00f090d9024.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{0debabe324c873066885.js → aa3bdfd00f666c6cc521.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{db5bbc240a1b8cd5af52.js → abc2471cfa9430ca5645.js} +1 -1
  62. package/assets/esri/core/workers/chunks/b2a67fe89f6505498bc3.js +1 -0
  63. package/assets/esri/core/workers/chunks/b4254fcb2051c873f2ba.js +1 -0
  64. package/assets/esri/core/workers/chunks/{a53fa34681efff8fc024.js → b859d98fa1c39f8e4099.js} +1 -1
  65. package/assets/esri/core/workers/chunks/c09bc36347e8eb9fff00.js +1 -0
  66. package/assets/esri/core/workers/chunks/c2cda93905f0a49a6931.js +1 -0
  67. package/assets/esri/core/workers/chunks/{3d0aa5f2db79c022243e.js → c794f7be868e53ca4a8c.js} +1 -1
  68. package/assets/esri/core/workers/chunks/cada79c174027f7a0df8.js +1 -0
  69. package/assets/esri/core/workers/chunks/d10c65cde3565d399275.js +1 -0
  70. package/assets/esri/core/workers/chunks/d44217de4c73475f9c66.js +1 -0
  71. package/assets/esri/core/workers/chunks/d587b7842091affdaac3.js +1 -0
  72. package/assets/esri/core/workers/chunks/d70678598f4080adfb39.js +1 -0
  73. package/assets/esri/core/workers/chunks/dad9c25f1b7cacf7b052.js +1 -0
  74. package/assets/esri/core/workers/chunks/{0facd2c143a04cc7c4ff.js → deee88e3f1641c6ef5db.js} +1 -1
  75. package/assets/esri/core/workers/chunks/e063cce778944fe97dd3.js +1 -0
  76. package/assets/esri/core/workers/chunks/e37e7ae2de974cef9a90.js +1 -0
  77. package/assets/esri/core/workers/chunks/e44ed205f74df34adb8b.js +1 -0
  78. package/assets/esri/core/workers/chunks/e6220c1fa887e21ffbbd.js +1 -0
  79. package/assets/esri/core/workers/chunks/{13d1cb50232ae761425b.js → eaeb95be8d4032513247.js} +2 -2
  80. package/assets/esri/core/workers/chunks/{93515f52d9b5fa12bd04.js → eb4934d3a3b82316c7c6.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{bfeab15d7ac9a2559fe5.js → f1c1f7583fa13dff9b5c.js} +1 -1
  82. package/assets/esri/core/workers/chunks/f27bbb4e26297d3c68de.js +1 -0
  83. package/assets/esri/core/workers/chunks/f4480636a910eaa4c531.js +1 -0
  84. package/assets/esri/core/workers/chunks/{5b991b0d4ca257291cb0.js → f5c5a9e771074f780fc8.js} +1 -1
  85. package/assets/esri/core/workers/chunks/f82a95c46f0d579d5bf5.js +1 -0
  86. package/assets/esri/core/workers/chunks/fb3a42cdd0d3105ec551.js +1 -0
  87. package/config.js +1 -1
  88. package/core/MultiOriginJSONSupport.d.ts +1 -1
  89. package/core/ReadOnlyMultiOriginJSONSupport.d.ts +5 -4
  90. package/geometry/FlatGeometry.js +1 -1
  91. package/kernel.js +1 -1
  92. package/layers/FeatureLayer.d.ts +7 -9
  93. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  94. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  95. package/layers/graphics/data/QueryEngineResult.js +1 -1
  96. package/layers/raster/datasets/MRFRaster.js +1 -1
  97. package/layers/support/SceneModification.js +1 -1
  98. package/package.json +2 -2
  99. package/renderers/VectorFieldRenderer.js +1 -1
  100. package/support/revision.js +1 -1
  101. package/symbols/cim/SDFHelper.js +1 -1
  102. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  103. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.d.ts +1 -0
  104. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.d.ts +1 -0
  105. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +1 -0
  106. package/views/3d/layers/Lyr3DWorker.js +1 -1
  107. package/views/3d/layers/SceneLayerWorkerHandle.js +1 -1
  108. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  109. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  110. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  111. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
  112. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  113. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  114. package/views/SelectionManager.d.ts +9 -9
  115. package/views/SelectionManager.js +1 -1
  116. package/views/layers/FeatureLikeLayerView.d.ts +24 -24
  117. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  118. package/widgets/Editor/workflowUtils.js +1 -1
  119. package/widgets/FeatureTemplates.d.ts +1 -1
  120. package/widgets/FeatureTemplates.js +1 -1
  121. package/widgets/Sketch/support/sketchUtils.js +1 -1
  122. package/assets/esri/core/workers/chunks/026c00ee272c64e53daf.js +0 -1
  123. package/assets/esri/core/workers/chunks/0883c4e63424d6746ada.js +0 -1
  124. package/assets/esri/core/workers/chunks/0987cb20148f65222b44.js +0 -1
  125. package/assets/esri/core/workers/chunks/0a1f88cf16bcbb53b371.js +0 -1
  126. package/assets/esri/core/workers/chunks/0ca405ca26676137a4be.js +0 -1
  127. package/assets/esri/core/workers/chunks/0ce968c89c35535da63e.js +0 -1
  128. package/assets/esri/core/workers/chunks/144c719d5ba9e3a30961.js +0 -1
  129. package/assets/esri/core/workers/chunks/1503ca177e2466ec0e87.js +0 -1
  130. package/assets/esri/core/workers/chunks/1597d7b380d510ff5252.js +0 -1
  131. package/assets/esri/core/workers/chunks/1880c3b293cdfa804625.js +0 -1
  132. package/assets/esri/core/workers/chunks/1bea32b02d35ddb9b118.js +0 -1
  133. package/assets/esri/core/workers/chunks/1d78ec98eef7fef08f86.js +0 -1
  134. package/assets/esri/core/workers/chunks/1e6271524602e159dbad.js +0 -1
  135. package/assets/esri/core/workers/chunks/1f96d597ba736e088168.js +0 -1
  136. package/assets/esri/core/workers/chunks/26e41b08efe77d247409.js +0 -1
  137. package/assets/esri/core/workers/chunks/297b58f29c496923e1f3.js +0 -1
  138. package/assets/esri/core/workers/chunks/2a2a9fa62969644ea200.js +0 -1
  139. package/assets/esri/core/workers/chunks/2b296378d21e4e3c11d4.js +0 -1
  140. package/assets/esri/core/workers/chunks/2cbcf34cf896a438999b.js +0 -1
  141. package/assets/esri/core/workers/chunks/394b645d51e7bf799382.js +0 -1
  142. package/assets/esri/core/workers/chunks/50ab9a3f8bbb268fae59.js +0 -1
  143. package/assets/esri/core/workers/chunks/5b2dd164dd84fd1ca4f7.js +0 -1
  144. package/assets/esri/core/workers/chunks/62c228ca16fdc7a2c695.js +0 -1
  145. package/assets/esri/core/workers/chunks/639202a461b17840a13f.js +0 -1
  146. package/assets/esri/core/workers/chunks/693d269637135047a0c4.js +0 -1
  147. package/assets/esri/core/workers/chunks/6a14ec2d2de6778a4e7a.js +0 -1
  148. package/assets/esri/core/workers/chunks/6d3467997b5d01630b08.js +0 -1
  149. package/assets/esri/core/workers/chunks/6dfcb0c804e63e87e311.js +0 -1
  150. package/assets/esri/core/workers/chunks/778ab9e4c3928b0d7d74.js +0 -1
  151. package/assets/esri/core/workers/chunks/8012fdc49a7a10982f78.js +0 -1
  152. package/assets/esri/core/workers/chunks/85e0fd618625a639387f.js +0 -1
  153. package/assets/esri/core/workers/chunks/86465d4bb185d7460087.js +0 -1
  154. package/assets/esri/core/workers/chunks/87e7378b242debbfd575.js +0 -1
  155. package/assets/esri/core/workers/chunks/90b19e60c056f32623e7.js +0 -1
  156. package/assets/esri/core/workers/chunks/9461f7225c42cf15a114.js +0 -1
  157. package/assets/esri/core/workers/chunks/978649cb6df99ee728be.js +0 -1
  158. package/assets/esri/core/workers/chunks/9f5f4da954228d876219.js +0 -1
  159. package/assets/esri/core/workers/chunks/a2323c957c8b2fe225b4.js +0 -1
  160. package/assets/esri/core/workers/chunks/a36a33f43610c3cd985b.js +0 -1
  161. package/assets/esri/core/workers/chunks/a381932eef77f4d80292.js +0 -1
  162. package/assets/esri/core/workers/chunks/b089947c9a492c96ca27.js +0 -1
  163. package/assets/esri/core/workers/chunks/b6e4c35b76379088035c.js +0 -1
  164. package/assets/esri/core/workers/chunks/b96dce64bdd7487e862a.js +0 -1
  165. package/assets/esri/core/workers/chunks/c4a78ab84186c7be599a.js +0 -1
  166. package/assets/esri/core/workers/chunks/c9d600dc6b6b5aafff1c.js +0 -1
  167. package/assets/esri/core/workers/chunks/ca33847a997ccfe8ddc2.js +0 -1
  168. package/assets/esri/core/workers/chunks/cca19c9564be2d02a277.js +0 -1
  169. package/assets/esri/core/workers/chunks/ccc2f2b3db008d8a495f.js +0 -1
  170. package/assets/esri/core/workers/chunks/d9f900975ac915a0f24f.js +0 -1
  171. package/assets/esri/core/workers/chunks/dd5d66f067e2386e0514.js +0 -1
  172. package/assets/esri/core/workers/chunks/eb4ffb72c9360062141c.js +0 -1
  173. package/assets/esri/core/workers/chunks/ebae903845643d60b44a.js +0 -1
  174. package/assets/esri/core/workers/chunks/ebb0372e8da0f75c09dd.js +0 -1
  175. package/assets/esri/core/workers/chunks/f349f64f683620bdf9b5.js +0 -30
  176. package/assets/esri/core/workers/chunks/f6fb87092bdf6bbf0769.js +0 -1
  177. package/assets/esri/core/workers/chunks/f76c2b09e6ba9d107898.js +0 -1
  178. package/assets/esri/core/workers/chunks/fcf962f3dec6b5440983.js +0 -1
  179. /package/assets/esri/core/workers/chunks/{43c8b1473695574c663e.js.LICENSE.txt → 4754610760f3f634adf9.js.LICENSE.txt} +0 -0
  180. /package/assets/esri/core/workers/chunks/{3861644c06cfebe8f40c.js.LICENSE.txt → 527547fa10d52cb3a7b1.js.LICENSE.txt} +0 -0
  181. /package/assets/esri/core/workers/chunks/{b586f1021a27c5e1551a.js.LICENSE.txt → 7189e03cc24f5c10865a.js.LICENSE.txt} +0 -0
  182. /package/assets/esri/core/workers/chunks/{3f812b0a28afb47aaaf0.js.LICENSE.txt → a35d1be700ebd3109397.js.LICENSE.txt} +0 -0
  183. /package/assets/esri/core/workers/chunks/{13d1cb50232ae761425b.js.LICENSE.txt → eaeb95be8d4032513247.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4935,6061,7316,7992,9397],{61691(t,e,r){r.d(e,{G:()=>n});class n{*[Symbol.iterator](){let t=this.next();for(;t;)yield t,t=this.next()}}},29821(t,e,r){r.d(e,{O:()=>s});var n=r(15756);class s extends n.n{getOperatorType(){return 6}execute(t,e,r,s){return(0,n.r)(t,e,r,16,s)}}},76061(t,e,r){r.d(e,{S:()=>s});var n=r(61691);class s extends n.G{constructor(t){super(),this.m_iGeom=-1,this.m_aGeoms=t?t.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const t=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,t}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},9093(t,e,r){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}r.d(e,{o8:()=>s,vt:()=>n,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:s,create:n,fromValues:function(t,e,r,n,s,i,o,a,h,u,c,l,f,g,m,x){return[t,e,r,n,s,i,o,a,h,u,c,l,f,g,m,x]}},Symbol.toStringTag,{value:"Module"}))},69397(t,e,r){r.d(e,{Qf:()=>h,Qh:()=>o,RS:()=>s,Ul:()=>g,lM:()=>i,qK:()=>c});var n=r(34275);const s=16;function i(t){if(!t)return 0;let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=a(t[r],!1));return e}function o(t){if(!t)return 0;if("number"==typeof t[0])return h(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return u(t,8);let r=l;for(let n=0;n<e;n++)r+=a(t[n]);return r}(t);let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=a(t[r]));return e}function a(t,e=!0){switch(typeof t){case"object":return e?o(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return s;case"boolean":return 4;default:return 8}}function h(...t){return t.reduce((t,e)=>t+(e?(0,n.iu)(e)?e.byteLength+f:Array.isArray(e)?u(e,s):0:0),0)}function u(t,e){return l+t.length*e}const c=32,l=16,f=145,g=64},87992(t,e,r){r.d(e,{JR:()=>O,ME:()=>E,MY:()=>A,NO:()=>C,Nh:()=>_,V2:()=>F,_s:()=>R,e6:()=>Y,gh:()=>I,tr:()=>N,uX:()=>d});var n=r(5482),s=r(69397),i=r(16930),o=(r(70328),r(19419)),a=r(60408),h=r(21325),u=r(513),c=r(50954),l=r(79567),f=r(52006),g=r(49663),m=r(46068),x=r(92722);class d{constructor({type:t,spatialReference:e,vertexCount:r,vertexXY:n,vertexZ:s,vertexM:i,partCount:o,partOffsets:a,partFlags:h,segmentFlags:u,segmentIndices:c,segmentParams:l,segmentCountArc:f,segmentCountBezier:g}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=t,this.spatialReference=e,this.vertexCount=r,this.vertexXY=n,this.vertexZ=s,this.vertexM=i,this.partCount=o,this.partOffsets=a,this.partFlags=h,this.segmentFlags=u,this.segmentIndices=c,this.segmentParams=l,this.segmentCountArc=f,this.segmentCountBezier=g}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:t,segmentCountArc:e,segmentCountBezier:r}=this;return t&&t-e-r}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}hasCurves(){return null!=this.segmentFlags}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function t(t){return t?s.Ul+t.byteLength:0}return t(this.vertexXY)+t(this.vertexZ)+t(this.vertexM)+t(this.partOffsets)+t(this.partFlags)+t(this.segmentFlags)+t(this.segmentIndices)+t(this.segmentParams)}clone(){const{type:t,vertexCount:e,partCount:r,hasZ:n,hasM:s,segmentCountArc:i,segmentCountBezier:o}=this,a=F(t,e,r,n,s,this.hasCurves(),i,o);a.spatialReference=this.spatialReference;const{vertexXY:h,vertexZ:u,vertexM:c}=this;if(a.vertexXY.set(h.subarray(0,2*e),0),a.vertexZ?.set(u.subarray(0,e),0),a.vertexM?.set(c.subarray(0,e),0),this.isMultipart()){const{partOffsets:t,partFlags:e}=this;a.partFlags.set(e.subarray(0,r+1)),a.partOffsets.set(t.subarray(0,r+1))}if(this.hasCurves()){const{segmentFlags:t,segmentIndices:r,segmentParams:n,segmentParamCount:s}=this;a.segmentFlags.set(t.subarray(0,e),0),a.segmentIndices.set(r.subarray(0,e),0),a.segmentParams.set(n.subarray(0,s),0)}return a}equals(t){return this.equalsWithinTolerance(t,0)}equalsWithinTolerance(t,e){if(null==t)return!1;if(this===t)return!0;if(!(0,h.aI)(this.spatialReference,t.spatialReference))return!1;if(this.vertexCount!==t.vertexCount||this.partCount!==t.partCount)return!1;if(this.hasZ!==t.hasZ||this.hasM!==t.hasM)return!1;if(this.hasCurves()!==t.hasCurves()||this.segmentCountArc!==t.segmentCountArc||this.segmentCountBezier!==t.segmentCountBezier)return!1;const r=0===e?(t,e)=>t!==e||isNaN(t)!==isNaN(e):(t,r)=>Math.abs(t-r)>e||isNaN(t)!==isNaN(r);for(let e=0;e<this.vertexCount;++e)if(r(this.vertexXY[2*e],t.vertexXY[2*e])||r(this.vertexXY[2*e+1],t.vertexXY[2*e+1]))return!1;if(this.hasZ)for(let e=0;e<this.vertexCount;++e)if(r(this.vertexZ[e],t.vertexZ[e]))return!1;if(this.hasM)for(let e=0;e<this.vertexCount;++e)if(r(this.vertexM[e],t.vertexM[e]))return!1;for(let e=0;e<this.partCount;++e)if(this.partFlags[e]!==t.partFlags[e]||this.partOffsets[e]!==t.partOffsets[e])return!1;if(this.hasCurves()){for(let e=0;e<this.vertexCount;++e)if(this.segmentFlags[e]!==t.segmentFlags[e]||this.segmentIndices[e]!==t.segmentIndices[e])return!1;for(let e=0;e<this.segmentParamCount;++e)if(r(this.segmentParams[e],t.segmentParams[e]))return!1}return!0}get parts(){return this.isMultipart()?new p(this):[][Symbol.iterator]()}}class p{constructor(t){this.geometry=t,this.value=new y(t)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class y{constructor(t){this.geometry=t,this.index=-1,this._readVertex=b(t),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 t=this.geometry.partOffsets;return t[this.index+1]-t[this.index]}}class v{constructor(t){this._part=t,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===t.geometry.type,this.value=new M(t.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const t=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=t&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:t}=this._part,e=this._part.geometry.partOffsets;this._partStart=e[t],this._partEnd=e[t+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class M{constructor(t){this.geometry=t,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=b(t)}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 t=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===t)return this.end;const e=this.geometry.segmentParams;let r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===t){const t=e[r++],n=e[r++],s=e[r++],i=e[r++];return{b:[this.end,[t,n],[s,i]]}}const n=e[r++],s=e[r++],i=e[r++],o=e[r++],a=e[r++],h=e[r++];r++,r++;const u=e[r++],c=e[r++];if(!Boolean(4&n)&&1===i)return{c:[this.end,[u,c]]};const l=2&n?0:1,f=1&n?0:1;return{a:[this.end,[a,h],l,f,o,s,i]}}}function C(t,e){const r={stack:[],error:void 0,hasError:!1};try{return e??=(0,o.Ie)(),(0,n.mS)(r,new P(t,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(e,function(t){let e;const{vertexCount:r,vertexXY:s,vertexZ:i,vertexM:a}=t,h=S(t);if(t.hasCurves()){const r={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(r,new P(t,["vertexZ","vertexM"]),!1);const s=(0,o.Ie)();for(const e of t.parts){let t=e.startVertex;for(const{curve:r}of e.segments)(0,l.e)(s,t,r),t=(0,f.yP)(r)}const[i,a,u,c]=s;e={xmin:i,ymin:a,xmax:u,ymax:c,spatialReference:h}}catch(t){r.error=t,r.hasError=!0}finally{(0,n.hk)(r)}}else{let t,n,i,o;t=n=1/0,i=o=-1/0;for(let e=0;e<r;++e){const r=s[2*e],a=s[2*e+1];t=Math.min(t,r),i=Math.max(i,r),n=Math.min(n,a),o=Math.max(o,a)}e={xmin:t,ymin:n,xmax:i,ymax:o,spatialReference:h}}if(i){let t=1/0,r=-1/0;for(const e of i)t=Math.min(t,e),r=Math.max(r,e);e.zmin=t,e.zmax=r}if(a){let t=1/0,r=-1/0;for(const e of a)t=Math.min(t,e),r=Math.max(r,e);e.mmin=t,e.mmax=r}return e}(t)),e}catch(t){r.error=t,r.hasError=!0}finally{(0,n.hk)(r)}}function E(t){let e,r,n;if((0,a.fT)(t)){n="point";const{x:s,y:i,z:o,m:a}=t,h=[s,i];null!=o&&h.push(o),null!=a&&h.push(a),r=[[h]],e=1}else(0,a.U9)(t)?(n="multipoint",r=[t.points],e=t.points.length):(0,a.Rg)(t)?(n="polyline",r=t.curvePaths??t.paths,e=r.reduce((t,e)=>t+e.length,0)):(n="polygon",r=t.curveRings??t.rings,e=r.reduce((t,e)=>(0===e.length||(t+=e.length,w(e[0],(0,f.yP)(e.at(-1)))&&--t),t),0));const s=F(n,e,n.includes("point")?0:r.length,(0,a.Pv)(t),(0,a.W0)(t),(0,f.Ed)(t)),{hasZ:i,hasM:o,vertexXY:h,vertexZ:u,vertexM:c}=s;function l(t){h[2*m]=t[0],h[2*m+1]=t[1],i&&(u[m]=t[2]),o&&(c[m]=t[g]),++m}s.spatialReference=t.spatialReference??void 0;const g=s.hasZ?3:2;let m=0;if(!s.isMultipart()){if(!i&&!o){for(const[t,e]of r[0])h[2*m]=t,h[2*m+1]=e,++m;return s}for(const t of r[0])l(t);return s}const x="polygon"===n,{partOffsets:d}=s;let p=0;if(!s.hasCurves()){for(const t of r){if(d[p++]=m,0===t.length)continue;let e=t.length;if(x&&w(t[0],t.at(-1))&&--e,i||o)for(let r=0;r<e;++r)l(t[r]);else for(let r=0;r<e;++r){const[e,n]=t[r];h[2*m]=e,h[2*m+1]=n,++m}}return d[p]=m,s}function y(t){const e=v+t;if(e<=(s.segmentParams?.length??0))return;let r=e*T;r=20*Math.ceil(r/20);const n=s.segmentParams;s.segmentParams=new Float64Array(r),null!=n&&s.segmentParams.set(n)}let v=0;for(const t of r){if(s.partOffsets[p++]=m,0===t.length)continue;const e=t[0];let r=e;for(let e=1;e<t.length;++e){const n=t[e];l(r);const i=m-1;(0,f.wY)(n)?(y(10),++s.segmentCountArc,v=R(r,n,s,i,v),r=n.a[0]):(0,f.DA)(n)?(y(10),++s.segmentCountArc,v=Z(r,n,s,i,v),r=n.a[0]):(0,f.aO)(n)?(y(10),++s.segmentCountArc,v=Y(r,n,s,i,v),r=n.c[0]):(0,f.n1)(n)?(y(4),++s.segmentCountBezier,v=N(0,n,s,i,v),r=n.b[0]):r=n}x&&w(e,r)||l(r)}return s.partOffsets[p]=m,s}function I(t){const e=b(t),{vertexCount:r,partCount:n,hasZ:s,hasM:i}=t,o=S(t);if("point"===t.type){const[e,r]=t.vertexXY,n=t.vertexZ?.[0],s=t.vertexM?.[0];return{x:e,y:r,z:n,m:s,spatialReference:o}}let a=0;if("multipoint"===t.type){const t=[];for(;a<r;)t.push(e(a++));return{points:t,spatialReference:o,hasZ:s,hasM:i}}const h="polygon"===t.type;if(!t.hasCurves()){const r=new Array;for(let s=0;s<n;++s){const n=t.partOffsets[s+1],i=new Array;for(;a<n;)i.push(e(a++));h&&i.length>0&&i.push(i[0]),r.push(i)}return h?{rings:r,hasZ:s,hasM:i,spatialReference:o}:{paths:r,hasZ:s,hasM:i,spatialReference:o}}const u=new Array;for(const{segments:e,startVertex:r}of t.parts){const t=[r];for(const{curve:r}of e)t.push(r);u.push(t)}return h?{rings:[],curveRings:u,hasZ:s,hasM:i,spatialReference:o}:{paths:[],curvePaths:u,hasZ:s,hasM:i,spatialReference:o}}function _(t,{lengths:e,coords:r,hasZ:n,hasM:s},i){const o=t.includes("point")?0:e.length,a="polygon"===t,h="point"===t?1:e.reduce((t,e)=>t+e,0)-(a?o:0);n??=!1,s??=!1;const u=F(t,h,o,n,s,!1,0,0);if(u.spatialReference=i??void 0,!u.isMultipart()){for(let t=0,e=0;t<h;++t)u.vertexXY[2*t]=r[e++],u.vertexXY[2*t+1]=r[e++],n&&(u.vertexZ[t]=r[e++]),s&&(u.vertexM[t]=r[e++]);return u}const c=2+Number(n)+Number(s);let l=0,f=0;u.partOffsets[0]=0;for(const t of e){const e=u.partOffsets[f],i=e+t-Number(a);u.partOffsets[++f]=i;for(let t=e;t<i;++t)u.vertexXY[2*t]=r[l++],u.vertexXY[2*t+1]=r[l++],n&&(u.vertexZ[t]=r[l++]),s&&(u.vertexM[t]=r[l++]);a&&(l+=c)}return u}function O({type:t,vertexCount:e,vertexXY:r,vertexZ:n,vertexM:s,partCount:i,partOffsets:o,hasZ:a,hasM:h}){const u=new x.A([],[],a,h);i=Math.max(i,1);const c="polygon"===t;let l=0;for(let t=0;t<i;++t){const i=o?.[t+1]??e,f=u.coords.length;for(let t=l;t<i;++t)u.coords.push(r[2*t],r[2*t+1]),a&&u.coords.push(n[t]),h&&u.coords.push(s[t]);if(c){const t=l;u.coords.push(r[2*t],r[2*t+1]),a&&u.coords.push(n[t]),h&&u.coords.push(s[t])}u.lengths.push((u.coords.length-f)/u.stride),l=i}return"point"===t&&(u.lengths.length=0),u}function A(t,e){return"getSpatialReference"in t&&(e=function(t){if(null==t)return;const e=t.getText()||void 0,r=t.isCustomWkid()?0:t.getOldID();if(r<=0)return{wkt:e};let n=t.getLatestID();(n<=0||n===r)&&(n=void 0);const s=t.getVCS();if(null==s)return{wkid:r,latestWkid:n,wkt:e};const i=s.isCustomWkid()?0:s.getOldID();if(i<=0)return{wkt:e};let o=t.getLatestVerticalID();return(o<=0||o===i)&&(o=void 0),{wkid:r,wkt:e,latestWkid:n,vcsWkid:i,latestVcsWkid:o}}(t.getSpatialReference()),t=t.getGeometry()),new d({...t.toFlatGeometry(),spatialReference:e})}class P{constructor(t,e){this.target=t,this.keys=e,this.oldValues=e.map(e=>t[e]);for(const r of e)t[r]=void 0}[Symbol.dispose](){this.keys.map((t,e)=>{this.target[t]=this.oldValues[e]})}}function S({spatialReference:t}){return t instanceof i.A?t.toJSON():t}function b({vertexXY:t,vertexZ:e,vertexM:r}){return e?r?n=>[t[2*n],t[2*n+1],e[n],r[n]]:r=>[t[2*r],t[2*r+1],e[r]]:r?e=>[t[2*e],t[2*e+1],r[e]]:e=>[t[2*e],t[2*e+1]]}function w(t,e){return t.every((t,r)=>t===e[r])}function F(t,e,r,n,s,i,o,a){o??=0,a??=0;const h=new d({type:t,vertexCount:e,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,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*e;n&&(u+=Float64Array.BYTES_PER_ELEMENT*e),s&&(u+=Float64Array.BYTES_PER_ELEMENT*e),h.isMultipart()&&(u+=(r+1)*Int32Array.BYTES_PER_ELEMENT,u+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(u+=e*Int8Array.BYTES_PER_ELEMENT,u+=e*Int32Array.BYTES_PER_ELEMENT,u+=h.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const c=new ArrayBuffer(u);let l=0;return h.vertexXY=new Float64Array(c,l,2*e),l+=h.vertexXY.byteLength,n&&(h.vertexZ=new Float64Array(c,l,e),l+=h.vertexZ.byteLength),s&&(h.vertexM=new Float64Array(c,l,e),l+=h.vertexM.byteLength),i&&(h.segmentParams=new Float64Array(c,l,h.segmentParamCount),l+=h.segmentParams.byteLength,h.segmentIndices=new Int32Array(c,l,e),h.segmentIndices.fill(X),l+=h.segmentIndices.byteLength),h.isMultipart()&&(h.partOffsets=new Int32Array(c,l,r+1),l+=h.partOffsets.byteLength,h.partFlags=new Int8Array(c,l,r+1),l+=h.partFlags.byteLength,"polygon"===h.type&&h.partFlags.subarray(0,r).fill(1)),i&&(h.segmentFlags=new Int8Array(c,l,e),h.segmentFlags.fill(1),l+=h.segmentFlags.byteLength),h}function R(t,e,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){r[i]=4,n[i]=o;const[a,[h,u],c,l,f,g,x]=e.a;let d=4;l||(d|=1),c||(d|=2);const p=(0,m.SW)(t,e),[y,v]=(0,m.Uk)(p,.5);return s[o++]=d,s[o++]=g,s[o++]=x,s[o++]=f,s[o++]=h,s[o++]=u,s[o++]=p.u2-p.u1,s[o++]=p.u1,s[o++]=y,s[o++]=v,o}function Z(t,e,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){r[i]=4,n[i]=o;const a=(0,g.i)(t,e);return V(a,4,...(0,u.mq)(a,.5),s,o)}function Y(t,e,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){return r[i]=4,n[i]=o,V((0,c.pM)(t,e),0,...e.c[1],s,o)}function V(t,e,r,n,s,i){const{cx:o,cy:a,thetaStart:h,thetaEnd:u,radius:c}=t;return h>u||(e|=1),Math.abs(u-h)<=Math.PI||(e|=2),s[i++]=e,s[i++]=c,s[i++]=1,s[i++]=0,s[i++]=o,s[i++]=a,s[i++]=u-h,s[i++]=h,s[i++]=r,s[i++]=n,i}function N(t,{b:[e,[r,n],[s,i]]},{segmentFlags:o,segmentIndices:a,segmentParams:h},u,c){return o[u]=2,a[u]=c,h[c++]=r,h[c++]=n,h[c++]=s,h[c++]=i,c}const T=1.61803,X=-1},85672(t,e,r){r.r(e),r.d(e,{execute:()=>o});var n=r(29821),s=r(83299);const i=new n.O;function o(t,e){const r=(0,s.fromGeometry)(t);return i.execute(r.getGeometry(),(0,s.fromGeometryToGXGeometry)(e),r.getSpatialReference(),null)}},4197(t,e,r){r.d(e,{Vj:()=>u,cj:()=>h,jh:()=>i,l5:()=>a,xm:()=>o});var n=r(34275),s=r(9093);function i(t){return t<=n.y9?new Array(t).fill(0):new Float64Array(t)}function o(t){return((0,n.iu)(t)?t.byteLength/8:t.length)<=n.y9?Array.from(t):new Float64Array(t)}function a(t,e,r){return Array.isArray(t)?t.slice(e,e+r):t.subarray(e,e+r)}function h(t){return[...t]}function u(t){const e=(0,s.vt)();for(let r=0;r<16;++r)e[r]=t[r];return e}},70328(t,e,r){r.d(e,{BI:()=>v,DC:()=>l,Ej:()=>g,Ie:()=>p,Jt:()=>y,Ne:()=>m,RF:()=>c,aI:()=>C,fA:()=>o,gE:()=>h,hZ:()=>d,iT:()=>f,is:()=>M,qv:()=>E,vI:()=>x,vY:()=>a,v_:()=>I,vt:()=>i,w1:()=>u});var n=r(5443),s=(r(19419),r(4197));function i(t=I){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,e,r,n,s,o,a=i()){return a[0]=t,a[1]=e,a[2]=r,a[3]=n,a[4]=s,a[5]=o,a}function a(t,e=i()){return function(t,e,r,n=i()){return d(n,E),function(t,e,r=0,n=e.length/3){let s=t[0],i=t[1],o=t[2],a=t[3],h=t[4],u=t[5];for(let t=0;t<n;t++)s=Math.min(s,e[r+3*t]),i=Math.min(i,e[r+3*t+1]),o=Math.min(o,e[r+3*t+2]),a=Math.max(a,e[r+3*t]),h=Math.max(h,e[r+3*t+1]),u=Math.max(u,e[r+3*t+2]);t[0]=s,t[1]=i,t[2]=o,t[3]=a,t[4]=h,t[5]=u}(n,t,e,r),n}(t,0,t.length/3,e)}function h(t,e=(0,s.jh)(24)){const[r,n,i,o,a,h]=t;return e[0]=r,e[1]=n,e[2]=i,e[3]=r,e[4]=n,e[5]=h,e[6]=r,e[7]=a,e[8]=i,e[9]=r,e[10]=a,e[11]=h,e[12]=o,e[13]=n,e[14]=i,e[15]=o,e[16]=n,e[17]=h,e[18]=o,e[19]=a,e[20]=i,e[21]=o,e[22]=a,e[23]=h,e}function u(t,e){const r=isFinite(t[2])||isFinite(t[5]);return new n.A(r?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[3]),t[4]=Math.max(t[4],e[4]),t[5]=Math.max(t[5],e[5])}function l(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function f(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[0]),t[4]=Math.max(t[4],e[1]),t[5]=Math.max(t[5],e[2])}function g(t,e=[0,0,0]){return e[0]=function(t){return t[0]>=t[3]?0:t[3]-t[0]}(t),e[1]=function(t){return t[1]>=t[4]?0:t[4]-t[1]}(t),e[2]=function(t){return t[2]>=t[5]?0:t[5]-t[2]}(t),e}function m(t,e,r=t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r!==t&&(r[3]=t[3],r[4]=t[4],r[5]=t[5]),r}function x(t,e,r=t){return r[3]=e[0],r[4]=e[1],r[5]=e[2],r!==t&&(r[0]=t[0],r[1]=t[1],r[2]=t[2]),t}function d(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function p(t){return t?d(t,E):i(E)}function y(t,e){return t[0]=e[0],t[1]=e[1],t[2]=Number.NEGATIVE_INFINITY,t[3]=e[2],t[4]=e[3],t[5]=Number.POSITIVE_INFINITY,t}function v(t,e,r,n,s){return t[0]=e,t[1]=r,t[2]=Number.NEGATIVE_INFINITY,t[3]=n,t[4]=s,t[5]=Number.POSITIVE_INFINITY,t}function M(t){return 6===t.length}function C(t,e,r){if(null==t||null==e)return t===e;if(!M(t)||!M(e))return!1;if(r){for(let n=0;n<t.length;n++)if(!r(t[n],e[n]))return!1}else for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}const E=[1/0,1/0,1/0,-1/0,-1/0,-1/0],I=[0,0,0,0,0,0];i()},92722(t,e,r){r.d(e,{A:()=>s});var n=r(69397);class s{constructor(t=[],e=[],r=!1,n=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=r,this.hasM=n}static fromJSON({lengths:t,coords:e,hasZ:r,hasM:n}){return new s(t,e,r||!1,n||!1)}static fromRect([t,e,r,n]){const i=r-t,o=n-e;return new s([5],[t,e,i,0,0,o,-i,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,e=0;for(const r of this.lengths){if(r<3)continue;const{stride:n}=this;let s=this.coords[n*e],i=this.coords[n*e+1];for(let o=1;o<r;o+=1){const r=n*(e+o),a=this.coords[r],h=this.coords[r+1];t+=-.5*(a-s)*(h+i),s=a,i=h}e+=r}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:r}=this;for(const n of this.lengths){for(let s=0;s<n;s++){const n=r*(e+s);t(this.coords[n],this.coords[n+1])}e+=n}}deltaDecode(){const t=this.clone(),{coords:e,lengths:r}=t;let n=0;const{stride:s}=this;for(const t of r){for(let r=1;r<t;r++){const t=s*(n+r);e[t]+=e[t-s],e[t+1]+=e[t+1-s]}n+=t}return t}clone(t){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const e=Array.from(this.lengths),{stride:r,size:n}=this,i=this.coords.slice(0,n*r);return t?(t.set(i),new s(e,t)):new s(e,Array.from(i),this.hasZ,this.hasM)}justXY(){const{stride:t,size:e}=this;if(2===t)return this;const r=new Array(e*t);for(let e=0,n=0;e<r.length;e+=t)r[n++]=this.coords[e],r[n++]=this.coords[e+1];return new s(this.lengths,r,!1,!1)}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4347],{11006(e,t,i){function s(e,t,i,s,n){r(e,t,i||0,s||e.length-1,n||a)}function r(e,t,i,s,a){for(;s>i;){if(s-i>600){var o=s-i+1,l=t-i+1,u=Math.log(o),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);r(e,t,Math.max(i,Math.floor(t-l*c/o+d)),Math.min(s,Math.floor(t+(o-l)*c/o+d)),a)}var p=e[t],h=i,f=s;for(n(e,i,t),a(e[s],p)>0&&n(e,i,s);h<f;){for(n(e,h,f),h++,f--;a(e[h],p)<0;)h++;for(;a(e[f],p)>0;)f--}0===a(e[i],p)?n(e,i,f):n(e,++f,s),f<=t&&(i=f+1),t<=f&&(s=f-1)}}function n(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>s})},69052(e,t,i){i.d(t,{hr:()=>r,ie:()=>l,uC:()=>o});var s=i(34727);class r{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return n(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,s.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+a(this.range,e-t,i)}minimalMonotonic(e,t,i){return n(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);const i=(t=this.normalize(t))-e,s=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(s)?i:s}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function n(e,t,i,s,r=0,n=!1){return(s-=r)<t?s+=a(e,t-s):s>i&&(s-=a(e,s-i)),n&&s===i&&(s=t),s+r}function a(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const o=new r(0,2*Math.PI),l=(new r(-Math.PI,Math.PI),new r(0,360))},44794(e,t,i){i.d(t,{v:()=>o});var s=i(4718),r=i(62788),n=i(95488);class a{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=s.gh){return new a(e,t)}},44123(e,t,i){i.d(t,{WhereClauseCache:()=>n});var s=i(66344),r=i(89696);class n{constructor(e,t){this._cache=new s.q(e),this._invalidCache=new s.q(t)}get(e,t){const i=`${t?.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=r.A.create(e,{fieldsIndex:t});return this._cache.put(i,s),s}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},46329(e,t,i){i.d(t,{y:()=>d});var s=i(49186),r=i(4305),n=i(513),a=i(50954),o=i(52006),l=i(49663),u=i(46068),c=i(59803);function d(e,t,i){if((0,o.Xq)(t))return(0,c.T)(e,t,i);if((0,o.n1)(t)){const n=(0,r.m_)(e,t,i)[0];if(null==n)throw new s.A("closestPointOnCurve:unexpected-error","Failed to find close point on bezier curve");return n}if((0,o.aO)(t)){const s=(0,a.pM)(e,t);return(0,n.fM)(s,i)}if((0,o.DA)(t)){const s=(0,l.i)(e,t);return(0,n.fM)(s,i)}const d=(0,u.SW)(e,t);return(0,u.pb)(d,i)}},17136(e,t,i){i.d(t,{Y_:()=>A,O7:()=>R,el:()=>I});var s=i(92602),r=i(69052),n=i(49186),a=i(53966),o=i(39829),l=i(82799),u=i(16930),c=i(80754),d=i(21325),p=i(28735),h=i(11254),f=i(60408),m=i(65864),y=i(2272),g=i(84952),x=i(92300);const v=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function F(e){return"polyline"===e[0].type}function w(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw v().error(e),new n.A("internal:geometry",e)}const i=(0,c.r8)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const r=e[s][0],n=e[s][1],a=e[s+1][0],o=e[s+1][1],l=Math.sqrt((a-r)*(a-r)+(o-n)*(o-n)),u=(o-n)/l,c=(a-r)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const s=e*t,a=c*s+r,o=u*s+n;i.push([a,o])}const e=(l+Math.floor(d-1)*t)/2,s=c*e+r,a=u*e+n;i.push([s,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:s,spatialReference:e.spatialReference}):new l.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return i&&(e=(0,c.kS)(e,i)),e}function S(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,c.kd)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,c.kd)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,c.kd)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,c.kd)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function T(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const r=t.cutIndexes[s],n=t.geometries[s],a=(0,c.r8)(n);for(let e=0;e<a.length;e++){const t=a[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,c.kd)(i,180);for(let i=0;i<t.length;i++){const t=n.getPoint(e,i);n.setPoint(e,i,t.clone().offset(s,0))}return!0}})}if(r===i){if(_(e))for(const t of(0,c.r8)(n))e[r]=e[r].addRing(t);else if(F(e))for(const t of(0,c.r8)(n))e[r]=e[r].addPath(t)}else i=r,e[r]=n}return e}async function I(e,t,i){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&v().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let n,a,u,_,F,R,b,A,M=0;const C=[],z=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,a=(0,d.Vp)(n),u=n.isWebMercator,R=u?102100:4326,_=c.j7[R].maxX,F=c.j7[R].minX,b=c.j7[R].plus180Line,A=c.j7[R].minus180Line),a)if("mesh"===t.type)z.push(t);else if("point"===t.type)z.push(S(t.clone(),_,F));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>S(e,_,F)),z.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,a);z.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,i=(0,c.kd)(e.xmin,F)*(2*_);let s=0===i?t.clone():(0,c.kS)(t.clone(),i);e.offset(i,0);let{xmin:r,xmax:n}=e;r=Number(r.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(b)&&n!==_?(M=n>M?n:M,s=w(s,u),C.push(s),z.push("cut")):e.intersects(A)&&r!==F?(M=n*(2*_)>M?n*(2*_):M,s=w(s,u,360),C.push(s),z.push("cut")):z.push(s)}else z.push(t.clone());else z.push(t);else z.push(t);let B=(0,c.kd)(M,_),G=-90;const E=B,O=new l.A;for(;B>0;){const e=360*B-180;O.addPath([[e,G],[e,-1*G]]),G*=-1,B--}if(C.length>0&&E>0){const t=T(C,await async function(e,t,i,s){const r=(0,y.Dl)(e),n=t[0].spatialReference,a={...s,responseType:"json",query:{...r.query,f:"json",sr:(0,d.YX)(n),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,h.A)(r.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,m.rS)(e);return t.spatialReference=n,t})}}(r,C,O,i)),s=[],n=[];for(let i=0;i<z.length;i++){const r=z[i];if("cut"!==r)n.push(r);else{const r=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(s.push(r),n.push("simplify")):n.push(u?(0,p.Gh)(r):r)}}if(!s.length)return n;const a=await async function(e,t,i){const s="string"==typeof e?(0,g.An)(e):e,r=t[0].spatialReference,n=(0,f.$B)(t[0]),a={...i,query:{...s.query,f:"json",sr:(0,d.YX)(r),geometries:JSON.stringify((0,x.X)(t))}},{data:o}=await(0,h.A)(s.path+"/simplify",a);return(0,x.V)(o.geometries,n,r)}(r,s,i),o=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?o.push(t):o.push(u?(0,p.Gh)(a.shift()):a.shift())}return o}const q=[];for(let e=0;e<z.length;e++){const t=z[e];if("cut"!==t)q.push(t);else{const e=C.shift();q.push(!0===u?(0,p.Gh)(e):e)}}return q}function R(e,t,i){const s=(0,d.Vp)(i);if(null==s)return e;const[r,n]=s.valid,a=2*n;let o=0,l=0;t>n?o=Math.ceil(Math.abs(t-n)/a):t<r&&(o=-Math.ceil(Math.abs(t-r)/a)),e>n?l=Math.ceil(Math.abs(e-n)/a):e<r&&(l=-Math.ceil(Math.abs(e-r)/a));let u=e+(o-l)*a;const c=u-t;return c>n?u-=a:c<r&&(u+=a),u}function b(e){const t=(0,d.Vp)(e);if(null==t)return null;const[i,s]=t.valid;return new r.hr(i,s)}const A=b(u.A.WGS84);b(u.A.WebMercator)},80754(e,t,i){i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var s=i(82799),r=i(16930),n=i(60408);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},56390(e,t,i){i.d(t,{do:()=>L,Wc:()=>H});var s=i(4576),r=i(21818),n=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(74887),u=i(86211),c=i(12195),d=i(91218),p=i(70328),h=i(19419),f=i(537),m=i(60408),y=i(65864),g=i(17136),x=i(21325),v=i(90708),_=i(29441),F=i(51441),w=i(31464);class S{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,s]of this._storage){if(!(s.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new I(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let T=0;class I{constructor(e){this.items=e,this.time=performance.now(),this.id=T++}}var R=i(99352),b=i(8384),A=i(58727),M=i(62660),C=i(43668);const z="unsupported-query";async function B(e,{fieldsIndex:t,geometryType:i,spatialReference:s,availableFields:r}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new n.A(z,"Unsupported query options",{query:e});return G(t,r,e),function(e,t,i){const{outStatistics:s,groupByFieldsForStatistics:r,having:a}=i,o=r?.length,l=s?.length;if(a){if(!o||!l)throw new n.A(z,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,_.eD)(e,t,a,s,i)}if(l){if(null==(u=s)||!u.every(e=>"exceedslimit"!==e.statisticType))return;const a=s.map(e=>e.onStatisticField).filter(Boolean);(0,_.MG)(e,t,a,{expressionName:"onStatisticFields",query:i}),o&&(0,_.MG)(e,t,r,{expressionName:"groupByFieldsForStatistics",query:i});for(const r of s){const{onStatisticField:s,statisticType:a}=r;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in r))e.get(s)&&"count"!==a&&"min"!==a&&"max"!==a&&(0,_.MG)(e,t,[s],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:E,query:i});else{const{statisticParameters:e}=r;if(!e)throw new n.A(z,"statisticParameters should be set for percentile type",{definition:r,query:i})}}}var u}(t,r,e),Promise.all([(0,M.c0)(e,i,s),(0,w.Nk)(s,e.outSR)]).then(()=>e)}function G(e,t,i){const{returnDistinctValues:s,outStatistics:r}=i,a=r?r.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){const s=" asc",r=" desc",n=i.orderByFields.map(e=>{const t=e.toLowerCase();return t.includes(s)?t.split(s)[0]:t.includes(r)?t.split(r)[0]:e}).filter(e=>!a.includes(e));(0,_.MG)(e,t,n,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,_.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(s)throw new n.A(z,"outFields should be specified for returnDistinctValues",{query:i});(0,_.SN)(e,t,i.where,i)}const E=new Set([..._.vl,..._.VW]);async function O(e,t,i,s){let r=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,C.l)();r=e.extractFieldNames(i.valueExpression)}if(i.field&&r.push(i.field),i.field2&&r.push(i.field2),i.field3&&r.push(i.field3),i.normalizationField&&r.push(i.normalizationField),!r.length&&!i.valueExpression)throw new n.A(z,"field or valueExpression is required",{params:i});(0,_.MG)(e,t,r,{expressionName:"statistics",query:s})}var q=i(86420),N=i(95466),D=(i(71511),i(53966),i(36708),i(44794),i(78659)),P=i(5482),V=i(69622),Q=i(91429);let j=class extends V.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,P.Cg)([(0,Q.MZ)()],j.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,P.Cg)([(0,Q.MZ)()],j.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),j=(0,P.Cg)([(0,Q.$K)("esri.views.support.debugFlags")],j),new j,Symbol("Yield");new Map([["immediate",0],["schedule",4],["slide",0],["stream loader",0],["elevation query",0],["terrain",1],["surface geometry updates",1],["LoD renderer",2],["Graphics3D",2],["I3S",2],["3DTiles",2],["point cloud",2],["feature fetcher",2],["stream controller",2],["clouds generator",2],["occlusion query",2],["overlay",4],["overlay renderer",4],["stage",4],["graphics deconflictor",4],["graphics filter visibility",4],["graphics scale visibility",4],["graphics frustum visibility",4],["POI frequent",6],["POI infrequent",30],["labeler",8],["feature query",8],["feature tile tree",16],["fast feature tile tree",0],["elevation alignment",12],["elevation alignment scene",14],["text texture atlas",12],["texture unload",12],["line of sight tool",16],["interactive line of sight tool",0],["volume measurement",4],["snapping",0],["shadow accumulator",30],["flow generator",12],["gaussian splat sorting",2],["gaussian splat texture atlas",12],["mapview fetch queue",0],["mapview layerview update",2],["mapview vector tile parsing queue",0]]),(0,D.l5)(6.5),(0,D.l5)(1),(0,D.l5)(30),(0,D.l5)(1e3/30),(0,D.l5)(100);const Z=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};Z.enabled=!1;const k=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(Z))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}const s=e(Z);for(;;){const e=s.next(Z),r=(0,l.$X)(e)?await e:e;if((0,l.G4)(t)){const e=(0,l.NK)();if(i){const t=i(e),r=s.return(null);return(0,l.$X)(r)&&await(0,l.QZ)(r),t}const t=s.throw(e);throw(0,l.$X)(t)&&await(0,l.QZ)(t),e}if(r.done)return r.value}}};class L{constructor(e){this._changeHandle=null,this.capabilities={query:R.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new S,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:N.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=k}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new n.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=(0,l.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);return e=(0,a.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),s)}async executeQueryForUniqueValues(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),s)}async executeQueryForClassBreaks(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),s)}async executeQueryForHistogram(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),s)}async executeQueryForSnapping(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,q.W)(this.timeInfo,this.featureStore);const[i,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:s}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new b.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(e){if(e!==A.v8)throw e;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const s=i.size;if(!s)return{count:0,extent:null};const r=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:s,extent:r}}catch(e){if(e===A.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,s=new Set;for(const e of i)s.add(t.featureAdapter.getObjectId(e));return s}catch(e){if(e===A.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new b.G([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await(0,A.iJ)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new n.A(z,"Unsupported query options",{query:e});return B(e,t)}(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==A.v8)throw i;t=new b.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:s,valueExpression:r}=t,n=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:r});return yield,await n.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:s,field3:r,valueExpression:n}=t,a=yield*this._executeQueryForStatistics(e,{field:i,field2:s,field3:r,valueExpression:n});return yield,await a.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:s,valueExpression:r}=t,n=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:r});return yield,await n.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:s,valueExpression:r}=t,n=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:r});return yield,await n.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:s,returnEdge:r,vertexMode:n}=e;if(!r&&"none"===n)return{candidates:[]};let o=(0,a.o8)(e.query);o=await(0,A.T2)(o,this.definitionExpression,this.spatialReference),yield,o=await B(o,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const l=!(0,x.aI)(i.spatialReference,this.spatialReference);l&&(await(0,w.Nk)(i.spatialReference,this.spatialReference),yield);const u="number"==typeof s?s:s.x,c="number"==typeof s?s:s.y,d={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},p=l?(0,w.Cv)(d,this.spatialReference):d;if(!p)return{candidates:[]};const h=(await(0,g.el)((0,y.rS)(i),null,{signal:t}))[0];yield;const f=(await(0,g.el)((0,y.rS)(p),null,{signal:t}))[0];if(yield,null==h||null==f)return{candidates:[]};const m=await this._searchFeatures(U(f.toJSON()));yield;const v=new b.G(m,o,this);this._executeObjectIdsQuery(v),yield,this._executeTimeQuery(v),yield,this._executeAttributesQuery(v),yield,yield*this._executeGeometryQueryForSnapping(v),yield;const _=h.toJSON(),F=l?(0,w.Cv)(_,this.spatialReference):_,S=l?Math.max(p.xmax-p.xmin,p.ymax-p.ymin)/2:s;return v.createSnappingResponse({...e,point:F,distance:S},o.returnZ,i.spatialReference)}async _getBounds(e,t,i){const s=(0,p.hZ)((0,p.vt)(),p.qv);return await this.featureStore.forEachBounds(e,e=>(0,p.RF)(s,e)),H(s,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new b.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,r.z)(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=(0,a.o8)(e),e=await(0,A.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await B(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const s=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(s),yield,this._executeObjectIdsQuery(s),yield,this._executeTimeQuery(s),yield,this._executeAttributesQuery(s),s}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:s}=e,r=this.featureStore.featureSpatialReference,n=e.sceneFilter.geometry,a=null==r||(0,x.aI)(r,n.spatialReference)?n:(0,w.Cv)(n,r);if(!a)return null;const o=i||s,l=(0,x.fn)(t)&&!(0,x.aI)(this.spatialReference,t)&&o?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(U(a));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const s=await(0,M.xt)("esriSpatialRelDisjoint",a,this.geometryType);yield;const r=e=>!t.has(u.getObjectId(e))||s(u.getGeometry(e)),n=yield*this._runSpatialFilter(i,r);yield;const o=new b.G(n,e,this);return await l(o)}if(!c.length)return new b.G([],e,this);if(this._canExecuteSinglePass(a,e))return await l(new b.G(c,e,this));const d=await(0,M.xt)("esriSpatialRelContains",a,this.geometryType);yield;const p=yield*this._runSpatialFilter(c,e=>d(u.getGeometry(e)));return yield,await l(new b.G(p,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;const{geometry:i,outSR:r,returnGeometry:n,returnCentroid:a}=e,o=t?null:this._getCacheKey(e),l=o?this._cache.get(o):null;if(l)return new b.G(l,e,this);const u=(0,x.fn)(r)&&!(0,x.aI)(this.spatialReference,r),c=n||a,d=async e=>(u&&c&&await this._project(e,r),o&&this._cache.put(o,e.items),e),p=this.featureStore.featureSpatialReference,h=!i||null==p||(0,x.aI)(p,i.spatialReference)?i:(0,w.Cv)(i,p);if(!h)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));yield;const f=this.featureAdapter;let m=await this._searchFeatures(U(i));yield;const y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of m)i.add(f.getObjectId(e));let s;null!=t?s=t.items:(yield,s=await this._getAllFeatures(),yield);const r=await(0,M.xt)(y,h,this.geometryType);yield;const n=e=>!i.has(f.getObjectId(e))||r(f.getGeometry(e)),a=yield*this._runSpatialFilter(s,n);yield;const o=new b.G(a,e,this);return await d(o)}if(null!=t){const e=new s.vW;m=m.filter(i=>(0,s.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){const t=new b.G([],e,this);return o&&this._cache.put(o,t.items),t}if(this._canExecuteSinglePass(h,e))return await d(new b.G(m,e,this));const g=await(0,M.xt)(y,h,this.geometryType);yield;const v=yield*this._runSpatialFilter(m,e=>g(f.getGeometry(e)));return yield,await d(new b.G(v,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,q.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,_.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const s=await(0,M.xt)(i,t.geometry,this.geometryType);yield;const r=this.featureAdapter,n=yield*this._runSpatialFilter(e.items,e=>s(r.getGeometry(e)));e.items=n}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const s=new Array;for(const r of e)t(r)&&s.push(r),i.madeProgress(),i.done&&(i=yield);return s}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,r=s||i,n=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,r),o=n.get(e);(!o||s>a(o,r))&&n.set(e,i)}e.items=Array.from(n.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:s,returnCentroid:r,outSR:n,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=s||r;return(0,x.fn)(n)&&!(0,x.aI)(this.spatialReference,n)&&l?JSON.stringify([t,i,n]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,M.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,x.aI)(this.spatialReference,t))return e;const i=this.featureAdapter,s=(0,d.isLoaded)()?await this._getFullExtent():void 0,n=await(0,w.lK)(e.items.map(e=>(0,F.pL)(this.geometryType,i.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:s});return e.items=(0,r.z)(n.map((t,s)=>i.cloneWithGeometry(e.items[s],(0,v.Ux)(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=(0,a.o8)(e);try{e=await(0,A.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t,{fieldsIndex:i,geometryType:s,spatialReference:r,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new n.A(z,"Unsupported query options",{query:e});return G(i,a,e),Promise.all([O(i,a,t,e),(0,M.c0)(e,s,r),(0,w.Nk)(r,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const s=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(s),yield,this._executeObjectIdsQuery(s),yield,this._executeTimeQuery(s),yield,this._executeAttributesQuery(s),yield,s}catch(t){if(t!==A.v8)throw t;return new b.G([],e,this)}}get test(){}}function U(e){if((0,M.tC)(e)){if((0,m.ZC)(e))return[(0,h.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,h.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[(0,f.Rg)((0,h.vt)(),e)]}function H(e,t,i,s,r){const n={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:(0,F.ag)(s)};r&&isFinite(e[2])&&isFinite(e[5])&&(n.zmin=e[2],n.zmax=e[5],n.hasZ=!0);const a=(0,w.Cv)(n,t,i);if(a.spatialReference=(0,F.ag)(i),a.xmax-a.xmin===0){const e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(r&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},99352(e,t,i){i.d(t,{F:()=>s,P:()=>r});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},r={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}},8384(e,t,i){i.d(t,{G:()=>C});var s=i(4718),r=i(12359),n=i(90634),a=i(62577),o=i(21325),l=i(46329),u=i(52006),c=i(29441),d=i(51441),p=i(30524),h=i(87445),f=i(1873),m=i(43668);class y{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=(0,c.Wq)(t),r=this.fieldsIndex.get(s),n=r?null:(0,c.j4)(s,i),a=r?r.name:(0,c.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){if(i)return this.featureAdapter.getAttribute(e,i.name);const s=t;let r=null;return this._fieldDataCache.has(s)?r=this._fieldDataCache.get(s)?.clause:i||(r=(0,c.j4)(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:r})),r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const s=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,p.zD)(n)||(0,p.Ah)(n),o=(0,p.OH)(n);return e.map(e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,f.gJ)(n)}${t.fieldDelimiter}${(0,f.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,f.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&i&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,h.rb)(n):null)),s&&Number.isFinite(n)){const i="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,f.zS)(n,s,i,r)}return n})}async getExpressionValues(e,t,i,s,r){const{arcadeUtils:n}=await(0,m.l)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map(e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,d.pL)(s.geometryType,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},c=n.createExecContext(t,l,r);return n.executeFunction(o,c)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,c.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,c.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const s of t){const{alias:t,clause:r}=this._fieldDataCache.get(s);i[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let r=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++r),r>1?null:e}}var g=i(31464),x=i(58727);class v{constructor(e,t,i){this.objectId=e,this.target=t,this.distance=i}}class _ extends v{constructor(e,t,i){super(e,t,i),this.type="vertex"}}class F extends v{constructor(e,t,i,s,r,n=!1,a=null){super(e,t,i),this.start=s,this.end=r,this.draped=n,this.curve=a,this.type="edge"}}var w=i(5834),S=i(59977),T=i(57231),I=i(11440),R=i(60909),b=i(98623),A=i(92647);const M="bin";class C{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new y(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of s){const{statisticType:s}=r,l="exceedslimit"!==s?r.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,n);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:s,items:r}=u[t],n=s.join(",");i&&!e.validateItems(r,i)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,o.fn)(this.query.outSR)&&!(0,o.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,d.ag)({spatialReference:this.query.outSR,...(0,g.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,d.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,r=B(this.hasZ,this.hasM),{point:n}=e,a="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y;function c(e,t){const i=(e-n.x)/a,s=(t-n.y)/o;return i*i+s*s}const d={candidates:[]},p="esriGeometryPolygon"===this.geometryType,h="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,f=this._getPointCreator(t,this.spatialReference,i),m=new G(null,0),y=new G(null,0),g={x:0,y:0,z:0};for(const e of this.items){const t=s.getObjectId(e),i=s.getGeometryWithCurves?.(e);if(null!=i){v(i,t);continue}const r=s.getGeometry(e);null==r||x(r,t)}return d.candidates.sort((e,t)=>e.distance-t.distance),d;function x(t,i){const{coords:s}=t,a=t.isPoint?E:t.lengths;if(m.coords=s,y.coords=s,e.returnEdge){let e=0;for(let t=0;t<a.length;t++){const s=a[t],o=e;for(let t=0;t<s;t++,e+=r){if(!p&&t===s-1)continue;if(m.coordsIndex=e,y.coordsIndex=t===s-1?o:e+r,!z(g,n,m,y))continue;const a=c(g.x,g.y);a<=1&&d.candidates.push(new F(i,f(g),Math.sqrt(a),f(m),f(y)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<a.length;t++){const s=a[t],n=e,o=y;o.coordsIndex=n;for(let t=0;t<s;t++,e+=r){if(m.coordsIndex=e,p&&t===s-1&&m.x===o.x&&m.y===o.y)continue;const r=c(m.x,m.y);r<=1&&d.candidates.push(new _(i,f(m),Math.sqrt(r)))}}}else if(h&&"ends"===e.vertexMode){let e=0;const t=[];for(let i=0;i<a.length;i++){t.push(e);const s=a[i];e+=s*r,s>1&&t.push(e-r)}for(const e of t){m.coordsIndex=e;const t=c(m.x,m.y);t<=1&&d.candidates.push(new _(i,f(m),Math.sqrt(t)))}}}function v(t,i){const{candidates:s}=d,r={x:0,y:0,z:0};if(e.returnEdge){const e=[n.x,n.y],a=new G(e,0),o=new G(e,0);for(const{segments:n}of t.parts)for(const{start:t,curve:d}of n){const{curvePoint:n}=(0,l.y)(t,d,e),p=c(...n);if(p>1)continue;[r.x,r.y]=n,a.coords=t,o.coords=(0,u.yP)(d);const h=(0,u.Xq)(d)?null:(0,u.tk)(d);s.push(new F(i,f(r),Math.sqrt(p),f(a),f(o),!1,h))}}function a(e){r.x=t.vertexXY[2*e],r.y=t.vertexXY[2*e+1];const n=c(r.x,r.y);n>1||(r.z=t.vertexZ?.[e]??0,s.push(new _(i,f(r),Math.sqrt(n))))}if("all"===e.vertexMode){const{vertexCount:e}=t;for(let t=0;t<e;++t)a(t);return}if("ends"===e.vertexMode)switch(t.type){case"point":a(0);break;case"polyline":for(let e=0;e<t.partCount;++e){const i=t.partOffsets[e],s=t.partOffsets[e+1]-1;a(i),s!==i&&a(s)}}}}_getPointCreator(e,t,i){const s=null==i||(0,o.aI)(t,i)?e=>e:e=>(0,g.Cv)(e,t,i),{hasZ:r}=this;return r&&e?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),h=(0,p.vE)(d)||(0,p.zD)(d)||(0,p.Ah)(d),m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u},this.items),y=(0,f.Vb)({normalizationType:r,normalizationField:s,minValue:a,maxValue:o}),g={value:.5,fieldType:d?.type},x=(0,p.yM)(d)?(0,f.z9)({values:m,supportsNullCount:y,percentileParams:g,outStatisticTypes:c}):(0,f.G_)({values:m,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,f.oZ)(x,c,h)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:n,timeZone:a},this.items,!1),l=(0,f.b3)(o);return(0,f.lv)(l,s,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:d,timeZone:p}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:d,timeZone:p},this.items),m=(0,f.Rw)(h,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,f.jM)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:d,timeZone:p}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:d,timeZone:p},this.items);return(0,f.$y)(h,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,f.FM)(n?.type,a,"case-sensitive");e.sort((e,t)=>{const s=i(e,r,n),a=i(t,r,n);return o(s,a)})}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:r,objectIdField:n,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:p,resultOffset:h,returnZ:f,returnM:m}=e,y=null!=p&&t.length>(h||0)+p,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&m,hasZ:r&&f,objectIdFieldName:n,spatialReference:(0,d.ag)(u||o),transform:c&&(0,a.VV)(c)||null}}_createFeatures(e,t){const i=new y(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:r}=this,{orderByFields:n,quantizationParameters:o,returnGeometry:l,returnCentroid:u,maxAllowableOffset:c,resultOffset:p,resultRecordCount:h,returnZ:f=!1,returnM:m=!1}=e,g=r&&f,x=s&&m;let v=[],_=0;const F=[...t];if(this._sortFeatures(F,n,(e,t,s)=>i.getFieldValue(e,t,s)),this.geometryType&&(l||u)){const e=(0,a.VV)(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const s of F){const r=this.featureAdapter.getGeometry(s),n=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),geometry:(0,d.pL)(this.geometryType,r,c,e,g,x)});t&&r&&!n.geometry&&(n.centroid=(0,d.LQ)(this,this.featureAdapter.getCentroid(s,this),e)),v[_++]=n}else if(!l&&u)for(const t of F)v[_++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,d.LQ)(this,this.featureAdapter.getCentroid(t,this),e)});else for(const t of F)v[_++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,d.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,d.pL)(this.geometryType,this.featureAdapter.getGeometry(t),c,e,g,x)})}else for(const e of F){const t=i.getAttributes(e);t&&(v[_++]=this._addFeatureJSONMetadata(e,{attributes:t}))}const w=p||0;if(null!=h){const e=w+h;v=v.slice(w,Math.min(v.length,e))}return v}_addFeatureJSONMetadata(e,t){const i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=B(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)},0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],r=new Map,n=new Map,a=new Map,o=new Map,l=new y(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:h,resultRecordCount:f}=e,m=c?.length,g=!!m,x=g?c[0]:null,v=g&&!this.fieldsIndex.get(x);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:h}=e,f=e,y="exceedslimit"!==h?e.onStatisticField:void 0,_="percentile_disc"===h||"percentile_cont"===h,F="EnvelopeAggregate"===h||"CentroidAggregate"===h||"ConvexHullAggregate"===h,w=g&&1===m&&(y===x||v)&&"count"===h;if(g){if(!a.has(y)){const e=[];for(const i of c){const s=this._getAttributeValues(l,i,t,r);e.push(s)}a.set(y,this._calculateUniqueValues(e,t,!F&&l.returnDistinctValues))}const e=a.get(y);if(!e)continue;const i=Object.keys(e);for(const s of i){const{count:i,data:n,items:a,itemPositions:p}=e[s],h=n.join(",");if(!d||l.validateItems(a,d)){const e=o.get(h)||{attributes:{}};if(F){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(f,a);e.aggregateGeometries[i]=t}else{let s=null;if(w)s=i;else{const e=this._getAttributeValues(l,y,t,r),i=p.map(t=>e[t]);s=_&&"statisticParameters"in f?this._getPercentileValue(f,i):this._getStatisticValue(f,i,null,l.returnDistinctValues)}e.attributes[u]=s}let s=0;c.forEach((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=n[i]),o.set(h,e)}}}else if(F){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(f,t);i.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(l,y,t,r);i.attributes[u]=_&&"statisticParameters"in f?this._getPercentileValue(f,e):this._getStatisticValue(f,e,n,l.returnDistinctValues)}const S="min"!==h&&"max"!==h||!(0,p.yM)(this.fieldsIndex.get(y))&&!this._isAnyDateField(y)?null:this.fieldsIndex.get(y)?.type;s.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const _=g?Array.from(o.values()):[i];return this._sortFeatures(_,h,(e,t)=>e.attributes[t]),f&&(_.length=Math.min(f,_.length)),{fields:s,features:_}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,p.vE)(t)||(0,p.zD)(t)||(0,p.Ah)(t)||(0,p.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:s,union:a}=await i.e(1023).then(i.bind(i,81023)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:c,geometryType:p}=this,h=t.map(e=>(0,d.pL)(p,u.getGeometry(e))),f=s(c,h,!0)[0],m={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=f?(0,n.v)(f):(0,n.HA)(a(c,h));m.aggregateGeometries={...e,spatialReference:c},m.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=f?(0,r.l8)(f):(0,r.Z4)((0,n.HA)(a(c,h)));m.aggregateGeometries={x:e[0],y:e[1],spatialReference:c},m.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(m.aggregateGeometries=f,m.outStatisticFieldName=l||"convexHull");return m}_getStatisticValue(e,t,i,s){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=i?.has(r)?i.get(r):(0,p.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,f.z9)({values:t,returnDistinct:s}):(0,f.G_)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:r}=e,{value:n,orderBy:a}=s,o=this.fieldsIndex.get(i);return(0,f.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const r=this.fieldsIndex.get(t),n=i.map(i=>e.getFieldValue(i,t,r));return s.set(t,n),n}_calculateUniqueValues(e,t,i){const s={},r=t.length;for(let n=0;n<r;n++){const r=t[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(i||s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t,i=!0){const r=new y(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:a,timeZone:o}=e;return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,s.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,r=t.min??0,n=t.max??0,a=s.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=r&&o<=n){const e=(0,f.Ak)(s,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:r}=t,n=[],a=[{name:s??i,alias:s??i,type:r??"esriFieldTypeString"},{name:M,alias:M,type:"esriFieldTypeInteger"}],o=new y(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),d=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in d){const{items:r}=d[t],o=await this._createBinsResponse(e,r);if(n.push(...o.features.map(e=>({...e,attributes:{...e.attributes,[s??i]:t}}))),o.fields)for(const e of o.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:n}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(w.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(S.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(I.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(R.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:r,numBins:n,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),d=(0,f.sU)(c,{field:s,normalizationField:r,normalizationType:a,normalizationTotal:o,numBins:n,minValue:(0,x.dO)(a?e.normalizationMinValue:l,!1),maxValue:(0,x.dO)(a?e.normalizationMaxValue:u,!1)}),p=this._calculateHistogramBins(c,d,i);return this._createFeaturesFromHistogramBins(p,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:r,start:n,end:a,snapToData:o,returnFullIntervalBin:l,offset:u,firstDayOfWeek:c}=e,d=r.unit,h=await this._getDataValues({field:s||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),f=(0,p.OH)(this.fieldsIndex.get(s)),m=T.g.toJSON(d),y=h.filter(Boolean).sort((e,t)=>e-t),g=null!=n?(0,x.dO)(n,f):y[0],v=null!=a?(0,x.dO)(a,f):y[y.length-1],_=[];if(null!=g&&null!=v){const e={zone:t.outTimeReference?.ianaTimeZone??b.n$},i=u?.unit?T.g.toJSON(u.unit):"milliseconds",s={[i]:u?.value||0},n=A.c9.fromMillis(g,e).minus(s),a=A.c9.fromMillis(v,e).minus(s),d="number"==typeof c&&c>=1&&c<=7?c:7,p=(e,t)=>{const i=(e.weekday-t+7)%7;return e.minus({days:i}).startOf("day")};if("last"===o){let e="week"===m?((e,t)=>p(e,t).plus({days:7}))(a,d):a;for(;e>n;){const t=e.minus({[m]:r.value});if(t<n){_.unshift([l?t.plus(s).toMillis():n.plus(s).toMillis(),e.plus(s).toMillis()]);break}_.unshift([t.plus(s).toMillis(),e.plus(s).toMillis()]),e=t}}else{let e="first"===o?n:"week"===m?p(n,d):n.startOf(m);for(;e<=a;){const t=e.plus({[m]:r.value});if(t>a){_.push([e.plus(s).toMillis(),l?t.plus(s).toMillis():a.plus(s).toMillis()]);break}_.push([e.plus(s).toMillis(),t.plus(s).toMillis()]),e=t}}}const F=this._calculateHistogramBins(h,{intervals:_,min:g,max:v},i);return this._createFeaturesFromHistogramBins(F,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,r=await this._getDataValues({field:s||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),n=(0,p.OH)(this.fieldsIndex.get(s)),a=e.boundaries.map(e=>(0,x.dO)(e,n)).sort((e,t)=>e-t),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(r,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:r,normalizationType:n,start:a,end:o}=e,l=await this._getDataValues({field:s||e.expression,normalizationField:e.normalizationField,normalizationType:n,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),u=(0,p.OH)(this.fieldsIndex.get(s)),c=(0,f.sU)(l,{field:s,classificationMethod:"defined-interval",definedInterval:r,minValue:(0,x.dO)(n?e.normalizationMinValue:a,u),maxValue:(0,x.dO)(n?e.normalizationMaxValue:o,u)},!0),d=this._calculateHistogramBins(l,c,i);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,r=s||"lowerBoundary",n=i||"upperBoundary",a=[],o=[{name:r,alias:r,type:"esriFieldTypeDouble"},{name:n,alias:n,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:M,alias:M,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const d="dateBin"===t.bin.type,p=t.outTimeReference?.ianaTimeZone;for(const i of e){const{minValue:e,maxValue:s,items:h}=i,f={attributes:{}};let m;if(f.attributes[r]=d&&p&&null!=e?A.c9.fromMillis(e,{zone:p}).toISO():e,t.bin.hideUpperBound||(f.attributes[n]=d&&p&&null!=s?A.c9.fromMillis(s,{zone:p}).toISO():s),l?(m=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},h),f.attributes[M]=++c,"flat"===t.bin.jsonStyle?a.push(...m.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...f.attributes}:{...t,...f.attributes}}))):(f.stackedAttributes=m.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(f))):(t.bin?.splitBy&&(f.attributes[M]=++c),m=await this._createStatisticsQueryResponse(t,h,f),a.push(f)),m.fields)for(const e of m.fields)o.some(t=>t.name===e.name)||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function z(e,t,i,s){const r=s.x-i.x,n=s.y-i.y,a=t.x-i.x,o=t.y-i.y,l=r*r+n*n;if(0===l)return!1;const u=a*r+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+r*c,e.y=i.y+n*c,!0}function B(e,t){return e?t?4:3:t?3:2}class G{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const E=[1]},29441(e,t,i){i.d(t,{MG:()=>x,SN:()=>h,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>f,j4:()=>m,vl:()=>u});var s=i(49186),r=i(44123),n=i(98453);const a=new r.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),d=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function p(e,t,i={}){const r=m(t,e);if(!r){const i=a.getError(t,e);throw new s.A(o,"invalid SQL expression",{expression:t,error:i})}const n=i.expressionName||"expression";if(i.validateStandardized&&!r.isStandardized)throw new s.A(o,`${n} is not standard`,{expression:t});if(i.validateAggregate&&!r.isAggregate)throw new s.A(o,`${n} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function h(e,t,i,s){if(!i)return!0;const r="where clause";return x(e,t,p(e,i,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:s}),!0}function f(e,t,i,r,n){if(!i)return!0;const a="having clause",l=p(e,i,{validateAggregate:!0,expressionName:a});x(e,t,l,{expressionName:a,query:n});const u=m(i,e),c=u?.getExpressions().every(t=>{const{aggregateType:i,field:s}=t,n=e.get(s)?.name;return r.some(t=>{const{onStatisticField:s,statisticType:r}=t,a=e.get(s)?.name;return a===n&&r.toLowerCase().trim()===i})});if(!c)throw new s.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function x(e,t,i,r={}){const n=new Map;if(function(e,t,i,s,r){const n=r.includes("*")?[...i,...r.filter(e=>"*"!==e)]:r;for(const r of n)if(t.get(r))v(e,t,i,s,r);else try{const n=p(t,y(r),{validateStandardized:!0});for(const r of n)v(e,t,i,s,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,r.allowedFieldTypes??d,i),n.size){const e=r.expressionName??"expression";throw new s.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:r.query})}}function v(e,t,i,s,r){const a=t.get(r);a?i.has(a.name)?"all"!==s&&!1===s?.has(a.type)&&e.set(r,{type:"invalid-type",fieldName:a.name,fieldType:n.m.fromJSON(a.type),allowedFieldTypes:Array.from(s,e=>n.m.fromJSON(e))}):e.set(r,{type:"missing-field",fieldName:a.name}):e.set(r,{type:"invalid-field",fieldName:r})}},51441(e,t,i){i.d(t,{LQ:()=>r,ag:()=>a,pL:()=>n});var s=i(90708);function r(e,t,i,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,o=e.hasM&&n;if(i){const e=(0,s.Nl)(t,"esriGeometryPoint",i,r,n);return(0,s.DF)(e,a,o)}return(0,s.DF)(t,a,o)}function n(e,t,i,r,n,a){if(null==t)return null;const o="coords"in t?t:t.geometry;if(null==o)return null;const{hasZ:l,hasM:u}=o,c=l&&(n??=l),d=u&&(a??=u);if(i){let t=(0,s.kz)(o,e,i,n,a);return r&&(t=(0,s.Nl)(t,e,r)),(0,s.zv)(t,e,c,d)}if(r){const t=(0,s.Nl)(o,e,r,n,a);return(0,s.zv)(t,e,c,d)}return(0,s.zv)(o,e,c,d)}function a(e){return e&&o in e?JSON.parse(JSON.stringify(e,l)):e}const o="_geVersion",l=(e,t)=>e===o?void 0:t},31464(e,t,i){i.d(t,{Cv:()=>m,Nk:()=>p,lK:()=>g});var s=i(4576),r=i(74887),n=i(91218),a=i(21325),o=i(28735);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,l),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,l),[i.xmax,i.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function c(e,t){const i=[];for(const s of e)i.push(d(s,t));return i}function d(e,t){const i=[];for(const s of e){const e=t(s[0],s[1],[0,0]);i.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(s.Ru):[e];await(0,n.initializeProjection)(i.map(e=>({source:e,dest:t})))}const h=u.bind(null,o.je),f=u.bind(null,o.tD);function m(e,t,i,s){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,a.fn)(t)||!(0,a.fn)(i)||(0,a.aI)(t,i))return e;if((0,o.y7)(t,i)){const t=(0,a.K8)(i)?h(e):f(e);return t.spatialReference=i,t}return(0,n.projectMany)([e],t,i,s)[0]}const y=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,s){if(!e?.length||!t||!i||(0,a.aI)(t,i))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:i,options:s,resolve:(0,r.Tw)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:s,resolve:r,options:l}=e,u=t.filter(e=>null!=e);let c;c=(0,o.y7)(i,s)&&null==l?.extendedParams?(0,a.K8)(s)?u.map(h):u.map(f):(0,n.projectMany)(u,i,s,l);let d=0;r(t.map(e=>null==e?null:c[d++])),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function g(e,t,i,s){return y.push(e,t,i,s)}},58727(e,t,i){i.d(t,{GC:()=>y,T2:()=>g,VY:()=>h,dO:()=>v,iJ:()=>m,v8:()=>f});var s=i(49186),r=i(66552),n=i(86211),a=i(91218),o=i(90634),l=i(60408),u=i(65864),c=i(17136),d=i(21325),p=i(31464);const h=new r.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),f=Object.freeze({});async function m(e,t,i){const s=e.bin;return s.onField&&(s.onField=s.onField.trim()),s.onExpression?.value&&(s.onExpression.value=s.onExpression.value.trim()),s.splitBy&&(s.splitBy.value&&(s.splitBy.value=s.splitBy.value.trim()),s.splitBy.outAlias&&(s.splitBy.outAlias=s.splitBy.outAlias.trim())),s.stackBy&&(s.stackBy.value&&(s.stackBy.value=s.stackBy.value.trim()),s.stackBy.outAlias&&(s.stackBy.outAlias=s.stackBy.outAlias.trim())),"normalizationField"in s.parameters&&s.parameters.normalizationField&&(s.parameters.normalizationField=s.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:"frequency"}]),y(e,t,i)}async function y(e,t,i){const{outFields:s,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,i)}async function g(e,t,r){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:r}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=r?h.fromJSON(r):(0,n.Ij)(o),c=o&&((0,d.EA)(o)||(0,d.K8)(o))?a:await(0,p.Nk)(o,d.KK).then(()=>(0,p.Cv)(a,d.KK)),f=await i.e(9159).then(i.bind(i,49159));await f.load();const m=f.execute(c,t||1,{unit:u})??void 0;if(!m||!(0,l.Bi)(m)||0===m.rings.length)throw new s.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return m}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,p.Nk)(m.spatialReference,r),m=function(e,t){const i=e.spatialReference;return x(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,r);const t=(await(0,c.el)((0,u.rS)(m)))[0];if(null==t)throw f;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,s=i&&x(m,r)?{extendedParams:{densificationStep:8*i}}:void 0,n=t.toJSON(),a=(0,p.Cv)(n,n.spatialReference,r,s);if(!a)throw f;a.spatialReference=r,e.geometry=a}return e}function x(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,d.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function v(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},62660(e,t,i){i.d(t,{tC:()=>w,c0:()=>F,xt:()=>_});var s=i(49186),r=i(94078),n=i(12176),a=i(60408),o=i(21325);function l(e,t){return c(e,t.coords[0],t.coords[1])}function u(e,t){const{coords:i,lengths:s,stride:r}=t;if(!s)return!1;for(let t=0,n=0;t<s.length;t++,n+=r)if(!c(e,i[n],i[n+1]))return!1;return!0}function c(e,t,i){if(!e)return!1;const{coords:s,lengths:r,stride:n}=e;let a=!1,o=0;for(const e of r)a=d(a,s,n,o,e,t,i),o+=e*n;return a}function d(e,t,i,s,r,n,a){let o=e,l=s;for(let e=s,u=s+r*i;e<u;e+=i){l=e+i,l===u&&(l=s);const r=t[e],c=t[e+1],d=t[l],p=t[l+1];(c<a&&p>=a||p<a&&c>=a)&&r+(a-c)/(p-c)*(d-r)<n&&(o=!o)}return o}var p=i(90708),h=i(51441),f=i(31464);const m="unsupported-query",y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},g={esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},x={esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1},v={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(8414)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(609)]).then(i.bind(i,51508)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(7316)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(6960)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(3304)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(7987)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1787)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function _(e,t,i){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,p.Ye)(t,!1,!1);return t=>l(e,t)}if("esriGeometryMultipoint"===i){const i=(0,p.Ye)(t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,e)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,h.pL)(i,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,h.pL)(i,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(s=i)?n.xB:(0,n.xK)(s);return s=>e(t,(0,h.pL)(i,s))}}var s;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const o=await function(e){const t=v[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>o.execute(t,(0,h.pL)(i,e))}async function F(e,t,i){const{spatialRel:r,geometry:n}=e;if(n){if(null==(l=r)||!0!==y[l])throw new s.A(m,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g[(0,a.$B)(e)]}(n))throw new s.A(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===x[e]}(t))throw new s.A(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,f.Nk)(e.geometry?.spatialReference,e.outSR)}}var l}function w(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},86420(e,t,i){i.d(t,{I:()=>n,W:()=>r});var s=i(21818);async function r(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:r,endTimeField:n}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&n)await t.forEach(e=>{const t=i.getAttribute((0,s.z)(e),r),l=i.getAttribute((0,s.z)(e),n);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))});else{const e=r||n;await t.forEach(t=>{const r=i.getAttribute((0,s.z)(t),e);null==r||isNaN(r)||(a=Math.min(a,r),o=Math.max(o,r))})}return{start:a,end:o}}function n(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:r}=e;if(!s&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&r?function(e,t,i,s,r){return null!=s&&null!=r?n=>{const a=e(n,t),o=e(n,i);return(null==a||a<=r)&&(null==o||o>=s)}:null!=s?t=>{const r=e(t,i);return null==r||r>=s}:null!=r?i=>{const s=e(i,t);return null==s||s<=r}:void 0}(o,s,r,n,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?r=>{const n=e(r,t);return null!=n&&n>=i&&n<=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r>=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r<=s}:void 0}(o,s||r,n,a)}},92300(e,t,i){i.d(t,{V:()=>a,X:()=>n});var s=i(60408),r=i(65864);function n(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function a(e,t,i){const s=(0,r.xD)(t);return e.map(e=>{const t=s.fromJSON(e);return t.spatialReference=i,t})}},5834(e,t,i){i.d(t,{A:()=>d});var s=i(5482),r=i(93637),n=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,s.Cg)([(0,u.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s.Cg)([(0,n.$K)("esri.rest.support.AutoIntervalBinParameters")],d),d.from=(0,a.dp)(d)},41266(e,t,i){i.d(t,{A:()=>m});var s=i(5482),r=i(69540),n=i(66552),a=i(25482),o=i(91429),l=i(56507),u=i(93223);const c=new n.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends((0,r.OU)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,s.Cg)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,s.Cg)([(0,u.e)(c)],d.prototype,"valueType",void 0),d=(0,s.Cg)([(0,o.$K)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,l.dp)(d);const h=new n.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),f=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let m=class extends((0,r.OU)(a.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],m.prototype,"expression",void 0),(0,s.Cg)([(0,u.e)(h,{name:"onExpression.valueType"})],m.prototype,"expressionValueType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],m.prototype,"field",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],m.prototype,"firstDayOfWeek",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hideUpperBound",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],m.prototype,"splitBy",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],m.prototype,"stackBy",void 0),(0,s.Cg)([(0,u.e)(f)],m.prototype,"transformation",void 0),m=(0,s.Cg)([(0,o.$K)("esri.rest.support.BinParametersBase")],m)},59977(e,t,i){i.d(t,{A:()=>y});var s=i(5482),r=i(93637),n=i(91429),a=i(56507),o=i(41266),l=i(69540),u=i(25482),c=i(57231),d=i(93223);let p=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,s.Cg)([(0,d.e)(c.g)],p.prototype,"unit",void 0),p=(0,s.Cg)([(0,n.$K)("esri.rest.support.DateBinTimeInterval")],p);const h=p;function f(e,t,i){(0,r.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function m(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,a.dp)(p);let y=class extends o.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,s.Cg)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>m(t,"end")},write:{writer:f}}})],y.prototype,"end",void 0),(0,s.Cg)([(0,n.MZ)({type:h,json:{name:"parameters",write:!0}})],y.prototype,"interval",void 0),(0,s.Cg)([(0,n.MZ)({type:h,json:{name:"parameters.offset",write:!0}})],y.prototype,"offset",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],y.prototype,"returnFullIntervalBin",void 0),(0,s.Cg)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>m(t,"start")},write:{writer:f}}})],y.prototype,"start",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],y.prototype,"snapToData",void 0),(0,s.Cg)([(0,d.e)({dateBin:"date"},{readOnly:!0})],y.prototype,"type",void 0),y=(0,s.Cg)([(0,n.$K)("esri.rest.support.DateBinParameters")],y),y.from=(0,a.dp)(y)},57231(e,t,i){i.d(t,{g:()=>s});const s=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},11440(e,t,i){i.d(t,{A:()=>u});var s=i(5482),r=i(93637),n=i(91429),a=i(56507),o=i(41266),l=i(93223);let u=class extends o.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,r.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],u.prototype,"boundaries",void 0),(0,s.Cg)([(0,l.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,s.Cg)([(0,n.$K)("esri.rest.support.FixedBoundariesBinParameters")],u),u.from=(0,a.dp)(u)},60909(e,t,i){i.d(t,{A:()=>d});var s=i(5482),r=i(93637),n=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,s.Cg)([(0,u.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s.Cg)([(0,n.$K)("esri.rest.support.FixedIntervalBinParameters")],d),d.from=(0,a.dp)(d)},41366(e,t,i){i.d(t,{K:()=>d,Q:()=>l});var s=i(5482),r=i(66552),n=i(53966),a=i(91429),o=i(93223);const l=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",d=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&c||i&&u||null,t&&i&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,s.Cg)([(0,o.e)(l,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,s.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4347],{11006(e,t,i){function s(e,t,i,s,n){r(e,t,i||0,s||e.length-1,n||a)}function r(e,t,i,s,a){for(;s>i;){if(s-i>600){var o=s-i+1,l=t-i+1,u=Math.log(o),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);r(e,t,Math.max(i,Math.floor(t-l*c/o+d)),Math.min(s,Math.floor(t+(o-l)*c/o+d)),a)}var p=e[t],h=i,f=s;for(n(e,i,t),a(e[s],p)>0&&n(e,i,s);h<f;){for(n(e,h,f),h++,f--;a(e[h],p)<0;)h++;for(;a(e[f],p)>0;)f--}0===a(e[i],p)?n(e,i,f):n(e,++f,s),f<=t&&(i=f+1),t<=f&&(s=f-1)}}function n(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>s})},69052(e,t,i){i.d(t,{hr:()=>r,ie:()=>l,uC:()=>o});var s=i(34727);class r{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return n(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,s.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+a(this.range,e-t,i)}minimalMonotonic(e,t,i){return n(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);const i=(t=this.normalize(t))-e,s=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(s)?i:s}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function n(e,t,i,s,r=0,n=!1){return(s-=r)<t?s+=a(e,t-s):s>i&&(s-=a(e,s-i)),n&&s===i&&(s=t),s+r}function a(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const o=new r(0,2*Math.PI),l=(new r(-Math.PI,Math.PI),new r(0,360))},44794(e,t,i){i.d(t,{v:()=>o});var s=i(4718),r=i(62788),n=i(95488);class a{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=s.gh){return new a(e,t)}},44123(e,t,i){i.d(t,{WhereClauseCache:()=>n});var s=i(66344),r=i(89696);class n{constructor(e,t){this._cache=new s.q(e),this._invalidCache=new s.q(t)}get(e,t){const i=`${t?.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=r.A.create(e,{fieldsIndex:t});return this._cache.put(i,s),s}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},46329(e,t,i){i.d(t,{y:()=>d});var s=i(49186),r=i(4305),n=i(513),a=i(50954),o=i(52006),l=i(49663),u=i(46068),c=i(59803);function d(e,t,i){if((0,o.Xq)(t))return(0,c.T)(e,t,i);if((0,o.n1)(t)){const n=(0,r.m_)(e,t,i)[0];if(null==n)throw new s.A("closestPointOnCurve:unexpected-error","Failed to find close point on bezier curve");return n}if((0,o.aO)(t)){const s=(0,a.pM)(e,t);return(0,n.fM)(s,i)}if((0,o.DA)(t)){const s=(0,l.i)(e,t);return(0,n.fM)(s,i)}const d=(0,u.SW)(e,t);return(0,u.pb)(d,i)}},17136(e,t,i){i.d(t,{Y_:()=>A,O7:()=>R,el:()=>I});var s=i(92602),r=i(69052),n=i(49186),a=i(53966),o=i(39829),l=i(82799),u=i(16930),c=i(80754),d=i(21325),p=i(28735),h=i(11254),f=i(60408),m=i(65864),y=i(2272),g=i(84952),x=i(92300);const v=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function F(e){return"polyline"===e[0].type}function w(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw v().error(e),new n.A("internal:geometry",e)}const i=(0,c.r8)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const r=e[s][0],n=e[s][1],a=e[s+1][0],o=e[s+1][1],l=Math.sqrt((a-r)*(a-r)+(o-n)*(o-n)),u=(o-n)/l,c=(a-r)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const s=e*t,a=c*s+r,o=u*s+n;i.push([a,o])}const e=(l+Math.floor(d-1)*t)/2,s=c*e+r,a=u*e+n;i.push([s,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:s,spatialReference:e.spatialReference}):new l.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return i&&(e=(0,c.kS)(e,i)),e}function S(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,c.kd)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,c.kd)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,c.kd)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,c.kd)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function T(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const r=t.cutIndexes[s],n=t.geometries[s],a=(0,c.r8)(n);for(let e=0;e<a.length;e++){const t=a[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,c.kd)(i,180);for(let i=0;i<t.length;i++){const t=n.getPoint(e,i);n.setPoint(e,i,t.clone().offset(s,0))}return!0}})}if(r===i){if(_(e))for(const t of(0,c.r8)(n))e[r]=e[r].addRing(t);else if(F(e))for(const t of(0,c.r8)(n))e[r]=e[r].addPath(t)}else i=r,e[r]=n}return e}async function I(e,t,i){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&v().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let n,a,u,_,F,R,b,A,M=0;const C=[],z=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,a=(0,d.Vp)(n),u=n.isWebMercator,R=u?102100:4326,_=c.j7[R].maxX,F=c.j7[R].minX,b=c.j7[R].plus180Line,A=c.j7[R].minus180Line),a)if("mesh"===t.type)z.push(t);else if("point"===t.type)z.push(S(t.clone(),_,F));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>S(e,_,F)),z.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,a);z.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,i=(0,c.kd)(e.xmin,F)*(2*_);let s=0===i?t.clone():(0,c.kS)(t.clone(),i);e.offset(i,0);let{xmin:r,xmax:n}=e;r=Number(r.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(b)&&n!==_?(M=n>M?n:M,s=w(s,u),C.push(s),z.push("cut")):e.intersects(A)&&r!==F?(M=n*(2*_)>M?n*(2*_):M,s=w(s,u,360),C.push(s),z.push("cut")):z.push(s)}else z.push(t.clone());else z.push(t);else z.push(t);let B=(0,c.kd)(M,_),G=-90;const E=B,O=new l.A;for(;B>0;){const e=360*B-180;O.addPath([[e,G],[e,-1*G]]),G*=-1,B--}if(C.length>0&&E>0){const t=T(C,await async function(e,t,i,s){const r=(0,y.Dl)(e),n=t[0].spatialReference,a={...s,responseType:"json",query:{...r.query,f:"json",sr:(0,d.YX)(n),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,h.A)(r.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,m.rS)(e);return t.spatialReference=n,t})}}(r,C,O,i)),s=[],n=[];for(let i=0;i<z.length;i++){const r=z[i];if("cut"!==r)n.push(r);else{const r=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(s.push(r),n.push("simplify")):n.push(u?(0,p.Gh)(r):r)}}if(!s.length)return n;const a=await async function(e,t,i){const s="string"==typeof e?(0,g.An)(e):e,r=t[0].spatialReference,n=(0,f.$B)(t[0]),a={...i,query:{...s.query,f:"json",sr:(0,d.YX)(r),geometries:JSON.stringify((0,x.X)(t))}},{data:o}=await(0,h.A)(s.path+"/simplify",a);return(0,x.V)(o.geometries,n,r)}(r,s,i),o=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?o.push(t):o.push(u?(0,p.Gh)(a.shift()):a.shift())}return o}const q=[];for(let e=0;e<z.length;e++){const t=z[e];if("cut"!==t)q.push(t);else{const e=C.shift();q.push(!0===u?(0,p.Gh)(e):e)}}return q}function R(e,t,i){const s=(0,d.Vp)(i);if(null==s)return e;const[r,n]=s.valid,a=2*n;let o=0,l=0;t>n?o=Math.ceil(Math.abs(t-n)/a):t<r&&(o=-Math.ceil(Math.abs(t-r)/a)),e>n?l=Math.ceil(Math.abs(e-n)/a):e<r&&(l=-Math.ceil(Math.abs(e-r)/a));let u=e+(o-l)*a;const c=u-t;return c>n?u-=a:c<r&&(u+=a),u}function b(e){const t=(0,d.Vp)(e);if(null==t)return null;const[i,s]=t.valid;return new r.hr(i,s)}const A=b(u.A.WGS84);b(u.A.WebMercator)},80754(e,t,i){i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var s=i(82799),r=i(16930),n=i(60408);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},56390(e,t,i){i.d(t,{do:()=>L,Wc:()=>H});var s=i(4576),r=i(21818),n=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(74887),u=i(86211),c=i(12195),d=i(91218),p=i(70328),h=i(19419),f=i(537),m=i(60408),y=i(65864),g=i(17136),x=i(21325),v=i(90708),_=i(29441),F=i(51441),w=i(31464);class S{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,s]of this._storage){if(!(s.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new I(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let T=0;class I{constructor(e){this.items=e,this.time=performance.now(),this.id=T++}}var R=i(99352),b=i(8384),A=i(58727),M=i(62660),C=i(43668);const z="unsupported-query";async function B(e,{fieldsIndex:t,geometryType:i,spatialReference:s,availableFields:r}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new n.A(z,"Unsupported query options",{query:e});return G(t,r,e),function(e,t,i){const{outStatistics:s,groupByFieldsForStatistics:r,having:a}=i,o=r?.length,l=s?.length;if(a){if(!o||!l)throw new n.A(z,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,_.eD)(e,t,a,s,i)}if(l){if(null==(u=s)||!u.every(e=>"exceedslimit"!==e.statisticType))return;const a=s.map(e=>e.onStatisticField).filter(Boolean);(0,_.MG)(e,t,a,{expressionName:"onStatisticFields",query:i}),o&&(0,_.MG)(e,t,r,{expressionName:"groupByFieldsForStatistics",query:i});for(const r of s){const{onStatisticField:s,statisticType:a}=r;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in r))e.get(s)&&"count"!==a&&"min"!==a&&"max"!==a&&(0,_.MG)(e,t,[s],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:E,query:i});else{const{statisticParameters:e}=r;if(!e)throw new n.A(z,"statisticParameters should be set for percentile type",{definition:r,query:i})}}}var u}(t,r,e),Promise.all([(0,M.c0)(e,i,s),(0,w.Nk)(s,e.outSR)]).then(()=>e)}function G(e,t,i){const{returnDistinctValues:s,outStatistics:r}=i,a=r?r.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){const s=" asc",r=" desc",n=i.orderByFields.map(e=>{const t=e.toLowerCase();return t.includes(s)?t.split(s)[0]:t.includes(r)?t.split(r)[0]:e}).filter(e=>!a.includes(e));(0,_.MG)(e,t,n,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,_.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(s)throw new n.A(z,"outFields should be specified for returnDistinctValues",{query:i});(0,_.SN)(e,t,i.where,i)}const E=new Set([..._.vl,..._.VW]);async function O(e,t,i,s){let r=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,C.l)();r=e.extractFieldNames(i.valueExpression)}if(i.field&&r.push(i.field),i.field2&&r.push(i.field2),i.field3&&r.push(i.field3),i.normalizationField&&r.push(i.normalizationField),!r.length&&!i.valueExpression)throw new n.A(z,"field or valueExpression is required",{params:i});(0,_.MG)(e,t,r,{expressionName:"statistics",query:s})}var q=i(86420),N=i(95466),D=(i(71511),i(53966),i(36708),i(44794),i(78659)),P=i(5482),V=i(69622),Q=i(91429);let j=class extends V.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,P.Cg)([(0,Q.MZ)()],j.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,P.Cg)([(0,Q.MZ)()],j.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),j=(0,P.Cg)([(0,Q.$K)("esri.views.support.debugFlags")],j),new j,Symbol("Yield");new Map([["immediate",0],["schedule",4],["slide",0],["stream loader",0],["elevation query",0],["terrain",1],["surface geometry updates",1],["LoD renderer",2],["Graphics3D",2],["I3S",2],["3DTiles",2],["point cloud",2],["feature fetcher",2],["stream controller",2],["clouds generator",2],["occlusion query",2],["overlay",4],["overlay renderer",4],["stage",4],["graphics deconflictor",4],["graphics filter visibility",4],["graphics scale visibility",4],["graphics frustum visibility",4],["POI frequent",6],["POI infrequent",30],["labeler",8],["feature query",8],["feature tile tree",16],["fast feature tile tree",0],["elevation alignment",12],["elevation alignment scene",14],["text texture atlas",12],["texture unload",12],["line of sight tool",16],["interactive line of sight tool",0],["volume measurement",4],["snapping",0],["shadow accumulator",30],["flow generator",12],["gaussian splat sorting",2],["gaussian splat texture atlas",12],["mapview fetch queue",0],["mapview layerview update",2],["mapview vector tile parsing queue",0]]),(0,D.l5)(6.5),(0,D.l5)(1),(0,D.l5)(30),(0,D.l5)(1e3/30),(0,D.l5)(100);const Z=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};Z.enabled=!1;const k=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(Z))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}const s=e(Z);for(;;){const e=s.next(Z),r=(0,l.$X)(e)?await e:e;if((0,l.G4)(t)){const e=(0,l.NK)();if(i){const t=i(e),r=s.return(null);return(0,l.$X)(r)&&await(0,l.QZ)(r),t}const t=s.throw(e);throw(0,l.$X)(t)&&await(0,l.QZ)(t),e}if(r.done)return r.value}}};class L{constructor(e){this._changeHandle=null,this.capabilities={query:R.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new S,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:N.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=k}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new n.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=(0,l.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);return e=(0,a.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),s)}async executeQueryForUniqueValues(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),s)}async executeQueryForClassBreaks(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),s)}async executeQueryForHistogram(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),s)}async executeQueryForSnapping(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,q.W)(this.timeInfo,this.featureStore);const[i,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:s}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new b.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(e){if(e!==A.v8)throw e;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const s=i.size;if(!s)return{count:0,extent:null};const r=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:s,extent:r}}catch(e){if(e===A.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,s=new Set;for(const e of i)s.add(t.featureAdapter.getObjectId(e));return s}catch(e){if(e===A.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new b.G([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await(0,A.iJ)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new n.A(z,"Unsupported query options",{query:e});return B(e,t)}(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==A.v8)throw i;t=new b.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:s,valueExpression:r}=t,n=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:r});return yield,await n.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:s,field3:r,valueExpression:n}=t,a=yield*this._executeQueryForStatistics(e,{field:i,field2:s,field3:r,valueExpression:n});return yield,await a.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:s,valueExpression:r}=t,n=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:r});return yield,await n.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:s,valueExpression:r}=t,n=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:r});return yield,await n.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:s,returnEdge:r,vertexMode:n}=e;if(!r&&"none"===n)return{candidates:[]};let o=(0,a.o8)(e.query);o=await(0,A.T2)(o,this.definitionExpression,this.spatialReference),yield,o=await B(o,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const l=!(0,x.aI)(i.spatialReference,this.spatialReference);l&&(await(0,w.Nk)(i.spatialReference,this.spatialReference),yield);const u="number"==typeof s?s:s.x,c="number"==typeof s?s:s.y,d={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},p=l?(0,w.Cv)(d,this.spatialReference):d;if(!p)return{candidates:[]};const h=(await(0,g.el)((0,y.rS)(i),null,{signal:t}))[0];yield;const f=(await(0,g.el)((0,y.rS)(p),null,{signal:t}))[0];if(yield,null==h||null==f)return{candidates:[]};const m=await this._searchFeatures(U(f.toJSON()));yield;const v=new b.G(m,o,this);this._executeObjectIdsQuery(v),yield,this._executeTimeQuery(v),yield,this._executeAttributesQuery(v),yield,yield*this._executeGeometryQueryForSnapping(v),yield;const _=h.toJSON(),F=l?(0,w.Cv)(_,this.spatialReference):_,S=l?Math.max(p.xmax-p.xmin,p.ymax-p.ymin)/2:s;return v.createSnappingResponse({...e,point:F,distance:S},o.returnZ,i.spatialReference)}async _getBounds(e,t,i){const s=(0,p.hZ)((0,p.vt)(),p.qv);return await this.featureStore.forEachBounds(e,e=>(0,p.RF)(s,e)),H(s,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new b.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,r.z)(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=(0,a.o8)(e),e=await(0,A.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await B(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const s=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(s),yield,this._executeObjectIdsQuery(s),yield,this._executeTimeQuery(s),yield,this._executeAttributesQuery(s),s}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:s}=e,r=this.featureStore.featureSpatialReference,n=e.sceneFilter.geometry,a=null==r||(0,x.aI)(r,n.spatialReference)?n:(0,w.Cv)(n,r);if(!a)return null;const o=i||s,l=(0,x.fn)(t)&&!(0,x.aI)(this.spatialReference,t)&&o?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(U(a));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const s=await(0,M.xt)("esriSpatialRelDisjoint",a,this.geometryType);yield;const r=e=>!t.has(u.getObjectId(e))||s(u.getGeometry(e)),n=yield*this._runSpatialFilter(i,r);yield;const o=new b.G(n,e,this);return await l(o)}if(!c.length)return new b.G([],e,this);if(this._canExecuteSinglePass(a,e))return await l(new b.G(c,e,this));const d=await(0,M.xt)("esriSpatialRelContains",a,this.geometryType);yield;const p=yield*this._runSpatialFilter(c,e=>d(u.getGeometry(e)));return yield,await l(new b.G(p,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;const{geometry:i,outSR:r,returnGeometry:n,returnCentroid:a}=e,o=t?null:this._getCacheKey(e),l=o?this._cache.get(o):null;if(l)return new b.G(l,e,this);const u=(0,x.fn)(r)&&!(0,x.aI)(this.spatialReference,r),c=n||a,d=async e=>(u&&c&&await this._project(e,r),o&&this._cache.put(o,e.items),e),p=this.featureStore.featureSpatialReference,h=!i||null==p||(0,x.aI)(p,i.spatialReference)?i:(0,w.Cv)(i,p);if(!h)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));yield;const f=this.featureAdapter;let m=await this._searchFeatures(U(i));yield;const y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of m)i.add(f.getObjectId(e));let s;null!=t?s=t.items:(yield,s=await this._getAllFeatures(),yield);const r=await(0,M.xt)(y,h,this.geometryType);yield;const n=e=>!i.has(f.getObjectId(e))||r(f.getGeometry(e)),a=yield*this._runSpatialFilter(s,n);yield;const o=new b.G(a,e,this);return await d(o)}if(null!=t){const e=new s.vW;m=m.filter(i=>(0,s.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){const t=new b.G([],e,this);return o&&this._cache.put(o,t.items),t}if(this._canExecuteSinglePass(h,e))return await d(new b.G(m,e,this));const g=await(0,M.xt)(y,h,this.geometryType);yield;const v=yield*this._runSpatialFilter(m,e=>g(f.getGeometry(e)));return yield,await d(new b.G(v,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,q.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,_.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const s=await(0,M.xt)(i,t.geometry,this.geometryType);yield;const r=this.featureAdapter,n=yield*this._runSpatialFilter(e.items,e=>s(r.getGeometry(e)));e.items=n}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const s=new Array;for(const r of e)t(r)&&s.push(r),i.madeProgress(),i.done&&(i=yield);return s}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,r=s||i,n=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,r),o=n.get(e);(!o||s>a(o,r))&&n.set(e,i)}e.items=Array.from(n.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:s,returnCentroid:r,outSR:n,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=s||r;return(0,x.fn)(n)&&!(0,x.aI)(this.spatialReference,n)&&l?JSON.stringify([t,i,n]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,M.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,x.aI)(this.spatialReference,t))return e;const i=this.featureAdapter,s=(0,d.isLoaded)()?await this._getFullExtent():void 0,n=await(0,w.lK)(e.items.map(e=>(0,F.pL)(this.geometryType,i.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:s});return e.items=(0,r.z)(n.map((t,s)=>i.cloneWithGeometry(e.items[s],(0,v.Ux)(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=(0,a.o8)(e);try{e=await(0,A.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t,{fieldsIndex:i,geometryType:s,spatialReference:r,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new n.A(z,"Unsupported query options",{query:e});return G(i,a,e),Promise.all([O(i,a,t,e),(0,M.c0)(e,s,r),(0,w.Nk)(r,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const s=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(s),yield,this._executeObjectIdsQuery(s),yield,this._executeTimeQuery(s),yield,this._executeAttributesQuery(s),yield,s}catch(t){if(t!==A.v8)throw t;return new b.G([],e,this)}}get test(){}}function U(e){if((0,M.tC)(e)){if((0,m.ZC)(e))return[(0,h.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,h.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[(0,f.Rg)((0,h.vt)(),e)]}function H(e,t,i,s,r){const n={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:(0,F.ag)(s)};r&&isFinite(e[2])&&isFinite(e[5])&&(n.zmin=e[2],n.zmax=e[5],n.hasZ=!0);const a=(0,w.Cv)(n,t,i);if(a.spatialReference=(0,F.ag)(i),a.xmax-a.xmin===0){const e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(r&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},99352(e,t,i){i.d(t,{F:()=>s,P:()=>r});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},r={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}},8384(e,t,i){i.d(t,{G:()=>C});var s=i(4718),r=i(12359),n=i(90634),a=i(62577),o=i(21325),l=i(46329),u=i(52006),c=i(29441),d=i(51441),p=i(30524),h=i(87445),f=i(1873),m=i(43668);class y{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=(0,c.Wq)(t),r=this.fieldsIndex.get(s),n=r?null:(0,c.j4)(s,i),a=r?r.name:(0,c.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){if(i)return this.featureAdapter.getAttribute(e,i.name);const s=t;let r=null;return this._fieldDataCache.has(s)?r=this._fieldDataCache.get(s)?.clause:i||(r=(0,c.j4)(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:r})),r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const s=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,p.zD)(n)||(0,p.Ah)(n),o=(0,p.OH)(n);return e.map(e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,f.gJ)(n)}${t.fieldDelimiter}${(0,f.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,f.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&i&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,h.rb)(n):null)),s&&Number.isFinite(n)){const i="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,f.zS)(n,s,i,r)}return n})}async getExpressionValues(e,t,i,s,r){const{arcadeUtils:n}=await(0,m.l)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map(e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,d.pL)(s.geometryType,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},c=n.createExecContext(t,l,r);return n.executeFunction(o,c)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,c.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,c.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const s of t){const{alias:t,clause:r}=this._fieldDataCache.get(s);i[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let r=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++r),r>1?null:e}}var g=i(31464),x=i(58727);class v{constructor(e,t,i){this.objectId=e,this.target=t,this.distance=i}}class _ extends v{constructor(e,t,i){super(e,t,i),this.type="vertex"}}class F extends v{constructor(e,t,i,s,r,n=!1,a=null){super(e,t,i),this.start=s,this.end=r,this.draped=n,this.curve=a,this.type="edge"}}var w=i(5834),S=i(59977),T=i(57231),I=i(11440),R=i(60909),b=i(98623),A=i(92647);const M="bin";class C{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new y(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of s){const{statisticType:s}=r,l="exceedslimit"!==s?r.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,n);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:s,items:r}=u[t],n=s.join(",");i&&!e.validateItems(r,i)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,o.fn)(this.query.outSR)&&!(0,o.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,d.ag)({spatialReference:this.query.outSR,...(0,g.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,d.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,r=B(this.hasZ,this.hasM),{point:n}=e,a="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y;function c(e,t){const i=(e-n.x)/a,s=(t-n.y)/o;return i*i+s*s}const d={candidates:[]},p="esriGeometryPolygon"===this.geometryType,h="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,f=this._getPointCreator(t,this.spatialReference,i),m=new G(null,0),y=new G(null,0),g={x:0,y:0,z:0};for(const e of this.items){const t=s.getObjectId(e),i=s.getGeometryWithCurves?.(e);if(null!=i){v(i,t);continue}const r=s.getGeometry(e);null==r||x(r,t)}return d.candidates.sort((e,t)=>e.distance-t.distance),d;function x(t,i){const{coords:s}=t,a=t.isPoint?E:t.lengths;if(m.coords=s,y.coords=s,e.returnEdge){let e=0;for(let t=0;t<a.length;t++){const s=a[t],o=e;for(let t=0;t<s;t++,e+=r){if(!p&&t===s-1)continue;if(m.coordsIndex=e,y.coordsIndex=t===s-1?o:e+r,!z(g,n,m,y))continue;const a=c(g.x,g.y);a<=1&&d.candidates.push(new F(i,f(g),Math.sqrt(a),f(m),f(y)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<a.length;t++){const s=a[t],n=e,o=y;o.coordsIndex=n;for(let t=0;t<s;t++,e+=r){if(m.coordsIndex=e,p&&t===s-1&&m.x===o.x&&m.y===o.y)continue;const r=c(m.x,m.y);r<=1&&d.candidates.push(new _(i,f(m),Math.sqrt(r)))}}}else if(h&&"ends"===e.vertexMode){let e=0;const t=[];for(let i=0;i<a.length;i++){t.push(e);const s=a[i];e+=s*r,s>1&&t.push(e-r)}for(const e of t){m.coordsIndex=e;const t=c(m.x,m.y);t<=1&&d.candidates.push(new _(i,f(m),Math.sqrt(t)))}}}function v(t,i){const{candidates:s}=d,r={x:0,y:0,z:0};if(e.returnEdge){const e=[n.x,n.y],a=new G(e,0),o=new G(e,0);for(const{segments:n}of t.parts)for(const{start:t,curve:d}of n){const{curvePoint:n}=(0,l.y)(t,d,e),p=c(...n);if(p>1)continue;[r.x,r.y]=n,a.coords=t,o.coords=(0,u.yP)(d);const h=(0,u.Xq)(d)?null:(0,u.tk)(d);s.push(new F(i,f(r),Math.sqrt(p),f(a),f(o),!1,h))}}function a(e){r.x=t.vertexXY[2*e],r.y=t.vertexXY[2*e+1];const n=c(r.x,r.y);n>1||(r.z=t.vertexZ?.[e]??0,s.push(new _(i,f(r),Math.sqrt(n))))}if("all"===e.vertexMode){const{vertexCount:e}=t;for(let t=0;t<e;++t)a(t);return}if("ends"===e.vertexMode)switch(t.type){case"point":a(0);break;case"polyline":for(let e=0;e<t.partCount;++e){const i=t.partOffsets[e],s=t.partOffsets[e+1]-1;a(i),s!==i&&a(s)}}}}_getPointCreator(e,t,i){const s=null==i||(0,o.aI)(t,i)?e=>e:e=>(0,g.Cv)(e,t,i),{hasZ:r}=this;return r&&e?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),h=(0,p.vE)(d)||(0,p.zD)(d)||(0,p.Ah)(d),m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u},this.items),y=(0,f.Vb)({normalizationType:r,normalizationField:s,minValue:a,maxValue:o}),g={value:.5,fieldType:d?.type},x=(0,p.yM)(d)?(0,f.z9)({values:m,supportsNullCount:y,percentileParams:g,outStatisticTypes:c}):(0,f.G_)({values:m,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,f.oZ)(x,c,h)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:n,timeZone:a},this.items,!1),l=(0,f.b3)(o);return(0,f.lv)(l,s,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:d,timeZone:p}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:d,timeZone:p},this.items),m=(0,f.Rw)(h,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,f.jM)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:d,timeZone:p}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:d,timeZone:p},this.items);return(0,f.$y)(h,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,f.FM)(n?.type,a,"case-insensitive");e.sort((e,t)=>{const s=i(e,r,n),a=i(t,r,n);return o(s,a)})}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:r,objectIdField:n,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:p,resultOffset:h,returnZ:f,returnM:m}=e,y=null!=p&&t.length>(h||0)+p,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&m,hasZ:r&&f,objectIdFieldName:n,spatialReference:(0,d.ag)(u||o),transform:c&&(0,a.VV)(c)||null}}_createFeatures(e,t){const i=new y(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:r}=this,{orderByFields:n,quantizationParameters:o,returnGeometry:l,returnCentroid:u,maxAllowableOffset:c,resultOffset:p,resultRecordCount:h,returnZ:f=!1,returnM:m=!1}=e,g=r&&f,x=s&&m;let v=[],_=0;const F=[...t];if(this._sortFeatures(F,n,(e,t,s)=>i.getFieldValue(e,t,s)),this.geometryType&&(l||u)){const e=(0,a.VV)(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const s of F){const r=this.featureAdapter.getGeometry(s),n=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),geometry:(0,d.pL)(this.geometryType,r,c,e,g,x)});t&&r&&!n.geometry&&(n.centroid=(0,d.LQ)(this,this.featureAdapter.getCentroid(s,this),e)),v[_++]=n}else if(!l&&u)for(const t of F)v[_++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,d.LQ)(this,this.featureAdapter.getCentroid(t,this),e)});else for(const t of F)v[_++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,d.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,d.pL)(this.geometryType,this.featureAdapter.getGeometry(t),c,e,g,x)})}else for(const e of F){const t=i.getAttributes(e);t&&(v[_++]=this._addFeatureJSONMetadata(e,{attributes:t}))}const w=p||0;if(null!=h){const e=w+h;v=v.slice(w,Math.min(v.length,e))}return v}_addFeatureJSONMetadata(e,t){const i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=B(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)},0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],r=new Map,n=new Map,a=new Map,o=new Map,l=new y(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:h,resultRecordCount:f}=e,m=c?.length,g=!!m,x=g?c[0]:null,v=g&&!this.fieldsIndex.get(x);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:h}=e,f=e,y="exceedslimit"!==h?e.onStatisticField:void 0,_="percentile_disc"===h||"percentile_cont"===h,F="EnvelopeAggregate"===h||"CentroidAggregate"===h||"ConvexHullAggregate"===h,w=g&&1===m&&(y===x||v)&&"count"===h;if(g){if(!a.has(y)){const e=[];for(const i of c){const s=this._getAttributeValues(l,i,t,r);e.push(s)}a.set(y,this._calculateUniqueValues(e,t,!F&&l.returnDistinctValues))}const e=a.get(y);if(!e)continue;const i=Object.keys(e);for(const s of i){const{count:i,data:n,items:a,itemPositions:p}=e[s],h=n.join(",");if(!d||l.validateItems(a,d)){const e=o.get(h)||{attributes:{}};if(F){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(f,a);e.aggregateGeometries[i]=t}else{let s=null;if(w)s=i;else{const e=this._getAttributeValues(l,y,t,r),i=p.map(t=>e[t]);s=_&&"statisticParameters"in f?this._getPercentileValue(f,i):this._getStatisticValue(f,i,null,l.returnDistinctValues)}e.attributes[u]=s}let s=0;c.forEach((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=n[i]),o.set(h,e)}}}else if(F){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(f,t);i.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(l,y,t,r);i.attributes[u]=_&&"statisticParameters"in f?this._getPercentileValue(f,e):this._getStatisticValue(f,e,n,l.returnDistinctValues)}const S="min"!==h&&"max"!==h||!(0,p.yM)(this.fieldsIndex.get(y))&&!this._isAnyDateField(y)?null:this.fieldsIndex.get(y)?.type;s.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const _=g?Array.from(o.values()):[i];return this._sortFeatures(_,h,(e,t)=>e.attributes[t]),f&&(_.length=Math.min(f,_.length)),{fields:s,features:_}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,p.vE)(t)||(0,p.zD)(t)||(0,p.Ah)(t)||(0,p.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:s,union:a}=await i.e(1023).then(i.bind(i,81023)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:c,geometryType:p}=this,h=t.map(e=>(0,d.pL)(p,u.getGeometry(e))),f=s(c,h,!0)[0],m={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=f?(0,n.v)(f):(0,n.HA)(a(c,h));m.aggregateGeometries={...e,spatialReference:c},m.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=f?(0,r.l8)(f):(0,r.Z4)((0,n.HA)(a(c,h)));m.aggregateGeometries={x:e[0],y:e[1],spatialReference:c},m.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(m.aggregateGeometries=f,m.outStatisticFieldName=l||"convexHull");return m}_getStatisticValue(e,t,i,s){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=i?.has(r)?i.get(r):(0,p.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,f.z9)({values:t,returnDistinct:s}):(0,f.G_)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:r}=e,{value:n,orderBy:a}=s,o=this.fieldsIndex.get(i);return(0,f.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const r=this.fieldsIndex.get(t),n=i.map(i=>e.getFieldValue(i,t,r));return s.set(t,n),n}_calculateUniqueValues(e,t,i){const s={},r=t.length;for(let n=0;n<r;n++){const r=t[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(i||s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t,i=!0){const r=new y(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:a,timeZone:o}=e;return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,s.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,r=t.min??0,n=t.max??0,a=s.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=r&&o<=n){const e=(0,f.Ak)(s,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:r}=t,n=[],a=[{name:s??i,alias:s??i,type:r??"esriFieldTypeString"},{name:M,alias:M,type:"esriFieldTypeInteger"}],o=new y(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),d=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in d){const{items:r}=d[t],o=await this._createBinsResponse(e,r);if(n.push(...o.features.map(e=>({...e,attributes:{...e.attributes,[s??i]:t}}))),o.fields)for(const e of o.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:n}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(w.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(S.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(I.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(R.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:r,numBins:n,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),d=(0,f.sU)(c,{field:s,normalizationField:r,normalizationType:a,normalizationTotal:o,numBins:n,minValue:(0,x.dO)(a?e.normalizationMinValue:l,!1),maxValue:(0,x.dO)(a?e.normalizationMaxValue:u,!1)}),p=this._calculateHistogramBins(c,d,i);return this._createFeaturesFromHistogramBins(p,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:r,start:n,end:a,snapToData:o,returnFullIntervalBin:l,offset:u,firstDayOfWeek:c}=e,d=r.unit,h=await this._getDataValues({field:s||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),f=(0,p.OH)(this.fieldsIndex.get(s)),m=T.g.toJSON(d),y=h.filter(Boolean).sort((e,t)=>e-t),g=null!=n?(0,x.dO)(n,f):y[0],v=null!=a?(0,x.dO)(a,f):y[y.length-1],_=[];if(null!=g&&null!=v){const e={zone:t.outTimeReference?.ianaTimeZone??b.n$},i=u?.unit?T.g.toJSON(u.unit):"milliseconds",s={[i]:u?.value||0},n=A.c9.fromMillis(g,e).minus(s),a=A.c9.fromMillis(v,e).minus(s),d="number"==typeof c&&c>=1&&c<=7?c:7,p=(e,t)=>{const i=(e.weekday-t+7)%7;return e.minus({days:i}).startOf("day")};if("last"===o){let e="week"===m?((e,t)=>p(e,t).plus({days:7}))(a,d):a;for(;e>n;){const t=e.minus({[m]:r.value});if(t<n){_.unshift([l?t.plus(s).toMillis():n.plus(s).toMillis(),e.plus(s).toMillis()]);break}_.unshift([t.plus(s).toMillis(),e.plus(s).toMillis()]),e=t}}else{let e="first"===o?n:"week"===m?p(n,d):n.startOf(m);for(;e<=a;){const t=e.plus({[m]:r.value});if(t>a){_.push([e.plus(s).toMillis(),l?t.plus(s).toMillis():a.plus(s).toMillis()]);break}_.push([e.plus(s).toMillis(),t.plus(s).toMillis()]),e=t}}}const F=this._calculateHistogramBins(h,{intervals:_,min:g,max:v},i);return this._createFeaturesFromHistogramBins(F,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,r=await this._getDataValues({field:s||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),n=(0,p.OH)(this.fieldsIndex.get(s)),a=e.boundaries.map(e=>(0,x.dO)(e,n)).sort((e,t)=>e-t),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(r,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:r,normalizationType:n,start:a,end:o}=e,l=await this._getDataValues({field:s||e.expression,normalizationField:e.normalizationField,normalizationType:n,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),u=(0,p.OH)(this.fieldsIndex.get(s)),c=(0,f.sU)(l,{field:s,classificationMethod:"defined-interval",definedInterval:r,minValue:(0,x.dO)(n?e.normalizationMinValue:a,u),maxValue:(0,x.dO)(n?e.normalizationMaxValue:o,u)},!0),d=this._calculateHistogramBins(l,c,i);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,r=s||"lowerBoundary",n=i||"upperBoundary",a=[],o=[{name:r,alias:r,type:"esriFieldTypeDouble"},{name:n,alias:n,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:M,alias:M,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const d="dateBin"===t.bin.type,p=t.outTimeReference?.ianaTimeZone;for(const i of e){const{minValue:e,maxValue:s,items:h}=i,f={attributes:{}};let m;if(f.attributes[r]=d&&p&&null!=e?A.c9.fromMillis(e,{zone:p}).toISO():e,t.bin.hideUpperBound||(f.attributes[n]=d&&p&&null!=s?A.c9.fromMillis(s,{zone:p}).toISO():s),l?(m=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},h),f.attributes[M]=++c,"flat"===t.bin.jsonStyle?a.push(...m.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...f.attributes}:{...t,...f.attributes}}))):(f.stackedAttributes=m.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(f))):(t.bin?.splitBy&&(f.attributes[M]=++c),m=await this._createStatisticsQueryResponse(t,h,f),a.push(f)),m.fields)for(const e of m.fields)o.some(t=>t.name===e.name)||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function z(e,t,i,s){const r=s.x-i.x,n=s.y-i.y,a=t.x-i.x,o=t.y-i.y,l=r*r+n*n;if(0===l)return!1;const u=a*r+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+r*c,e.y=i.y+n*c,!0}function B(e,t){return e?t?4:3:t?3:2}class G{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const E=[1]},29441(e,t,i){i.d(t,{MG:()=>x,SN:()=>h,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>f,j4:()=>m,vl:()=>u});var s=i(49186),r=i(44123),n=i(98453);const a=new r.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),d=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function p(e,t,i={}){const r=m(t,e);if(!r){const i=a.getError(t,e);throw new s.A(o,"invalid SQL expression",{expression:t,error:i})}const n=i.expressionName||"expression";if(i.validateStandardized&&!r.isStandardized)throw new s.A(o,`${n} is not standard`,{expression:t});if(i.validateAggregate&&!r.isAggregate)throw new s.A(o,`${n} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function h(e,t,i,s){if(!i)return!0;const r="where clause";return x(e,t,p(e,i,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:s}),!0}function f(e,t,i,r,n){if(!i)return!0;const a="having clause",l=p(e,i,{validateAggregate:!0,expressionName:a});x(e,t,l,{expressionName:a,query:n});const u=m(i,e),c=u?.getExpressions().every(t=>{const{aggregateType:i,field:s}=t,n=e.get(s)?.name;return r.some(t=>{const{onStatisticField:s,statisticType:r}=t,a=e.get(s)?.name;return a===n&&r.toLowerCase().trim()===i})});if(!c)throw new s.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function x(e,t,i,r={}){const n=new Map;if(function(e,t,i,s,r){const n=r.includes("*")?[...i,...r.filter(e=>"*"!==e)]:r;for(const r of n)if(t.get(r))v(e,t,i,s,r);else try{const n=p(t,y(r),{validateStandardized:!0});for(const r of n)v(e,t,i,s,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,r.allowedFieldTypes??d,i),n.size){const e=r.expressionName??"expression";throw new s.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:r.query})}}function v(e,t,i,s,r){const a=t.get(r);a?i.has(a.name)?"all"!==s&&!1===s?.has(a.type)&&e.set(r,{type:"invalid-type",fieldName:a.name,fieldType:n.m.fromJSON(a.type),allowedFieldTypes:Array.from(s,e=>n.m.fromJSON(e))}):e.set(r,{type:"missing-field",fieldName:a.name}):e.set(r,{type:"invalid-field",fieldName:r})}},51441(e,t,i){i.d(t,{LQ:()=>r,ag:()=>a,pL:()=>n});var s=i(90708);function r(e,t,i,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,o=e.hasM&&n;if(i){const e=(0,s.Nl)(t,"esriGeometryPoint",i,r,n);return(0,s.DF)(e,a,o)}return(0,s.DF)(t,a,o)}function n(e,t,i,r,n,a){if(null==t)return null;const o="coords"in t?t:t.geometry;if(null==o)return null;const{hasZ:l,hasM:u}=o,c=l&&(n??=l),d=u&&(a??=u);if(i){let t=(0,s.kz)(o,e,i,n,a);return r&&(t=(0,s.Nl)(t,e,r)),(0,s.zv)(t,e,c,d)}if(r){const t=(0,s.Nl)(o,e,r,n,a);return(0,s.zv)(t,e,c,d)}return(0,s.zv)(o,e,c,d)}function a(e){return e&&o in e?JSON.parse(JSON.stringify(e,l)):e}const o="_geVersion",l=(e,t)=>e===o?void 0:t},31464(e,t,i){i.d(t,{Cv:()=>m,Nk:()=>p,lK:()=>g});var s=i(4576),r=i(74887),n=i(91218),a=i(21325),o=i(28735);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,l),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,l),[i.xmax,i.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function c(e,t){const i=[];for(const s of e)i.push(d(s,t));return i}function d(e,t){const i=[];for(const s of e){const e=t(s[0],s[1],[0,0]);i.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(s.Ru):[e];await(0,n.initializeProjection)(i.map(e=>({source:e,dest:t})))}const h=u.bind(null,o.je),f=u.bind(null,o.tD);function m(e,t,i,s){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,a.fn)(t)||!(0,a.fn)(i)||(0,a.aI)(t,i))return e;if((0,o.y7)(t,i)){const t=(0,a.K8)(i)?h(e):f(e);return t.spatialReference=i,t}return(0,n.projectMany)([e],t,i,s)[0]}const y=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,s){if(!e?.length||!t||!i||(0,a.aI)(t,i))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:i,options:s,resolve:(0,r.Tw)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:s,resolve:r,options:l}=e,u=t.filter(e=>null!=e);let c;c=(0,o.y7)(i,s)&&null==l?.extendedParams?(0,a.K8)(s)?u.map(h):u.map(f):(0,n.projectMany)(u,i,s,l);let d=0;r(t.map(e=>null==e?null:c[d++])),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function g(e,t,i,s){return y.push(e,t,i,s)}},58727(e,t,i){i.d(t,{GC:()=>y,T2:()=>g,VY:()=>h,dO:()=>v,iJ:()=>m,v8:()=>f});var s=i(49186),r=i(66552),n=i(86211),a=i(91218),o=i(90634),l=i(60408),u=i(65864),c=i(17136),d=i(21325),p=i(31464);const h=new r.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),f=Object.freeze({});async function m(e,t,i){const s=e.bin;return s.onField&&(s.onField=s.onField.trim()),s.onExpression?.value&&(s.onExpression.value=s.onExpression.value.trim()),s.splitBy&&(s.splitBy.value&&(s.splitBy.value=s.splitBy.value.trim()),s.splitBy.outAlias&&(s.splitBy.outAlias=s.splitBy.outAlias.trim())),s.stackBy&&(s.stackBy.value&&(s.stackBy.value=s.stackBy.value.trim()),s.stackBy.outAlias&&(s.stackBy.outAlias=s.stackBy.outAlias.trim())),"normalizationField"in s.parameters&&s.parameters.normalizationField&&(s.parameters.normalizationField=s.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:"frequency"}]),y(e,t,i)}async function y(e,t,i){const{outFields:s,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,i)}async function g(e,t,r){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:r}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=r?h.fromJSON(r):(0,n.Ij)(o),c=o&&((0,d.EA)(o)||(0,d.K8)(o))?a:await(0,p.Nk)(o,d.KK).then(()=>(0,p.Cv)(a,d.KK)),f=await i.e(9159).then(i.bind(i,49159));await f.load();const m=f.execute(c,t||1,{unit:u})??void 0;if(!m||!(0,l.Bi)(m)||0===m.rings.length)throw new s.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return m}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,p.Nk)(m.spatialReference,r),m=function(e,t){const i=e.spatialReference;return x(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,r);const t=(await(0,c.el)((0,u.rS)(m)))[0];if(null==t)throw f;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,s=i&&x(m,r)?{extendedParams:{densificationStep:8*i}}:void 0,n=t.toJSON(),a=(0,p.Cv)(n,n.spatialReference,r,s);if(!a)throw f;a.spatialReference=r,e.geometry=a}return e}function x(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,d.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function v(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},62660(e,t,i){i.d(t,{tC:()=>w,c0:()=>F,xt:()=>_});var s=i(49186),r=i(94078),n=i(12176),a=i(60408),o=i(21325);function l(e,t){return c(e,t.coords[0],t.coords[1])}function u(e,t){const{coords:i,lengths:s,stride:r}=t;if(!s)return!1;for(let t=0,n=0;t<s.length;t++,n+=r)if(!c(e,i[n],i[n+1]))return!1;return!0}function c(e,t,i){if(!e)return!1;const{coords:s,lengths:r,stride:n}=e;let a=!1,o=0;for(const e of r)a=d(a,s,n,o,e,t,i),o+=e*n;return a}function d(e,t,i,s,r,n,a){let o=e,l=s;for(let e=s,u=s+r*i;e<u;e+=i){l=e+i,l===u&&(l=s);const r=t[e],c=t[e+1],d=t[l],p=t[l+1];(c<a&&p>=a||p<a&&c>=a)&&r+(a-c)/(p-c)*(d-r)<n&&(o=!o)}return o}var p=i(90708),h=i(51441),f=i(31464);const m="unsupported-query",y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},g={esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},x={esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1},v={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(8414)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(609)]).then(i.bind(i,51508)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(7316)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(6960)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(3304)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(7987)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1787)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function _(e,t,i){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,p.Ye)(t,!1,!1);return t=>l(e,t)}if("esriGeometryMultipoint"===i){const i=(0,p.Ye)(t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,e)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,h.pL)(i,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,h.pL)(i,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(s=i)?n.xB:(0,n.xK)(s);return s=>e(t,(0,h.pL)(i,s))}}var s;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const o=await function(e){const t=v[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>o.execute(t,(0,h.pL)(i,e))}async function F(e,t,i){const{spatialRel:r,geometry:n}=e;if(n){if(null==(l=r)||!0!==y[l])throw new s.A(m,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g[(0,a.$B)(e)]}(n))throw new s.A(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===x[e]}(t))throw new s.A(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,f.Nk)(e.geometry?.spatialReference,e.outSR)}}var l}function w(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},86420(e,t,i){i.d(t,{I:()=>n,W:()=>r});var s=i(21818);async function r(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:r,endTimeField:n}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&n)await t.forEach(e=>{const t=i.getAttribute((0,s.z)(e),r),l=i.getAttribute((0,s.z)(e),n);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))});else{const e=r||n;await t.forEach(t=>{const r=i.getAttribute((0,s.z)(t),e);null==r||isNaN(r)||(a=Math.min(a,r),o=Math.max(o,r))})}return{start:a,end:o}}function n(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:r}=e;if(!s&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&r?function(e,t,i,s,r){return null!=s&&null!=r?n=>{const a=e(n,t),o=e(n,i);return(null==a||a<=r)&&(null==o||o>=s)}:null!=s?t=>{const r=e(t,i);return null==r||r>=s}:null!=r?i=>{const s=e(i,t);return null==s||s<=r}:void 0}(o,s,r,n,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?r=>{const n=e(r,t);return null!=n&&n>=i&&n<=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r>=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r<=s}:void 0}(o,s||r,n,a)}},92300(e,t,i){i.d(t,{V:()=>a,X:()=>n});var s=i(60408),r=i(65864);function n(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function a(e,t,i){const s=(0,r.xD)(t);return e.map(e=>{const t=s.fromJSON(e);return t.spatialReference=i,t})}},5834(e,t,i){i.d(t,{A:()=>d});var s=i(5482),r=i(93637),n=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,s.Cg)([(0,u.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s.Cg)([(0,n.$K)("esri.rest.support.AutoIntervalBinParameters")],d),d.from=(0,a.dp)(d)},41266(e,t,i){i.d(t,{A:()=>m});var s=i(5482),r=i(69540),n=i(66552),a=i(25482),o=i(91429),l=i(56507),u=i(93223);const c=new n.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends((0,r.OU)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,s.Cg)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,s.Cg)([(0,u.e)(c)],d.prototype,"valueType",void 0),d=(0,s.Cg)([(0,o.$K)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,l.dp)(d);const h=new n.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),f=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let m=class extends((0,r.OU)(a.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],m.prototype,"expression",void 0),(0,s.Cg)([(0,u.e)(h,{name:"onExpression.valueType"})],m.prototype,"expressionValueType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],m.prototype,"field",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],m.prototype,"firstDayOfWeek",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hideUpperBound",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],m.prototype,"splitBy",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],m.prototype,"stackBy",void 0),(0,s.Cg)([(0,u.e)(f)],m.prototype,"transformation",void 0),m=(0,s.Cg)([(0,o.$K)("esri.rest.support.BinParametersBase")],m)},59977(e,t,i){i.d(t,{A:()=>y});var s=i(5482),r=i(93637),n=i(91429),a=i(56507),o=i(41266),l=i(69540),u=i(25482),c=i(57231),d=i(93223);let p=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,s.Cg)([(0,d.e)(c.g)],p.prototype,"unit",void 0),p=(0,s.Cg)([(0,n.$K)("esri.rest.support.DateBinTimeInterval")],p);const h=p;function f(e,t,i){(0,r.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function m(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,a.dp)(p);let y=class extends o.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,s.Cg)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>m(t,"end")},write:{writer:f}}})],y.prototype,"end",void 0),(0,s.Cg)([(0,n.MZ)({type:h,json:{name:"parameters",write:!0}})],y.prototype,"interval",void 0),(0,s.Cg)([(0,n.MZ)({type:h,json:{name:"parameters.offset",write:!0}})],y.prototype,"offset",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],y.prototype,"returnFullIntervalBin",void 0),(0,s.Cg)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>m(t,"start")},write:{writer:f}}})],y.prototype,"start",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],y.prototype,"snapToData",void 0),(0,s.Cg)([(0,d.e)({dateBin:"date"},{readOnly:!0})],y.prototype,"type",void 0),y=(0,s.Cg)([(0,n.$K)("esri.rest.support.DateBinParameters")],y),y.from=(0,a.dp)(y)},57231(e,t,i){i.d(t,{g:()=>s});const s=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},11440(e,t,i){i.d(t,{A:()=>u});var s=i(5482),r=i(93637),n=i(91429),a=i(56507),o=i(41266),l=i(93223);let u=class extends o.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,r.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],u.prototype,"boundaries",void 0),(0,s.Cg)([(0,l.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,s.Cg)([(0,n.$K)("esri.rest.support.FixedBoundariesBinParameters")],u),u.from=(0,a.dp)(u)},60909(e,t,i){i.d(t,{A:()=>d});var s=i(5482),r=i(93637),n=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,r.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,s.Cg)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,s.Cg)([(0,u.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s.Cg)([(0,n.$K)("esri.rest.support.FixedIntervalBinParameters")],d),d.from=(0,a.dp)(d)},41366(e,t,i){i.d(t,{K:()=>d,Q:()=>l});var s=i(5482),r=i(66552),n=i(53966),a=i(91429),o=i(93223);const l=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",d=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&c||i&&u||null,t&&i&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,s.Cg)([(0,o.e)(l,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,s.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[883],{90883(e,t,i){i.r(t),i.d(t,{Notice:()=>u}),i(20107),i(7659);var o=i(50917),c=i(34857),n=i(11758),a=i(32293),l=i(53660),r=i(27617);const s={danger:"exclamationMarkTriangleF",info:"informationF",success:"checkCircleF",warning:"exclamationMarkTriangleF"};var d=i(31910),h=i(53250),g=i(9223),p=i(5918);const v=c.AH`:host([scale=s]){--calcite-notice-spacing-token-small: .5rem;--calcite-notice-spacing-token-large: .75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]){--calcite-notice-spacing-token-small: .75rem;--calcite-notice-spacing-token-large: 1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]){--calcite-notice-spacing-token-small: 1rem;--calcite-notice-spacing-token-large: 1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .notice-close{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=l]) .actions-end{margin-inline-end:var(--calcite-spacing-sm);gap:var(--calcite-spacing-sm)}:host([width=auto]){--calcite-notice-width: auto}:host([width=half]){--calcite-notice-width: 50%}:host([width=full]){--calcite-notice-width: 100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;opacity:0;overflow:hidden;max-block-size:0;transition-property:opacity,max-block-size;transition-duration:var(--calcite-animation-timing);text-align:start;border-radius:var(--calcite-notice-corner-radius, var(--calcite-corner-radius-sm));box-shadow:var(--calcite-notice-shadow, var(--calcite-shadow-none))}:host{display:flex}:host([open]) .container{pointer-events:auto;max-block-size:100%;align-items:center;opacity:1;overflow:visible}:host([open][appearance=outline-fill]) .container{border:var(--calcite-border-width-sm) solid}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-notice-title-text-color, var(--calcite-color-text-1))}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-notice-content-text-color, var(--calcite-color-text-2))}:host(:not([kind=neutral])[appearance=solid]) .container slot[name=title]::slotted(*),:host(:not([kind=neutral])[appearance=solid]) .container *::slotted([slot=title]){color:var(--calcite-notice-title-text-color, var(--calcite-color-text-inverse))}:host(:not([kind=neutral])[appearance=solid]) .container slot[name=message]::slotted(*),:host(:not([kind=neutral])[appearance=solid]) .container *::slotted([slot=message]){color:var(--calcite-notice-content-text-color, var(--calcite-color-text-inverse))}.notice-content{box-sizing:border-box;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-large)}.notice-content:first-of-type:not(:only-child){padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;padding-inline:var(--calcite-notice-spacing-token-small)}.notice-close{box-sizing:border-box;display:flex;cursor:pointer;align-items:center;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;flex:0 0 auto;margin-inline-end:var(--calcite-spacing-xs);--calcite-action-background-color: var(--calcite-notice-close-background-color);--calcite-action-background-color-hover: var( --calcite-notice-close-background-color-hover, var(--calcite-notice-close-background-color-focus) );--calcite-action-background-color-press: var(--calcite-notice-close-background-color-press);--calcite-action-text-color: var(--calcite-notice-close-icon-color, var(--calcite-color-text-3));--calcite-action-text-color-press: var(--calcite-notice-close-icon-color-hover)}.actions-end{display:flex;align-items:center;flex:0 0 auto;margin-inline-end:var(--calcite-spacing-xs);gap:var(--calcite-spacing-xs)}:host([kind=brand][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-brand) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-brand) 5%, var(--calcite-color-foreground-1)))}:host([kind=brand][appearance=outline-fill]) .notice-icon,:host([kind=brand][appearance=transparent]) .notice-icon{color:var(--calcite-color-brand)}:host([kind=info][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-info) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-info) 5%, var(--calcite-color-foreground-1)))}:host([kind=info][appearance=outline-fill]) .notice-icon,:host([kind=info][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-danger) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-danger) 5%, var(--calcite-color-foreground-1)))}:host([kind=danger][appearance=outline-fill]) .notice-icon,:host([kind=danger][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-success) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-success) 5%, var(--calcite-color-foreground-1)))}:host([kind=success][appearance=outline-fill]) .notice-icon,:host([kind=success][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-warning) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-warning) 5%, var(--calcite-color-foreground-1)))}:host([kind=warning][appearance=outline-fill]) .notice-icon,:host([kind=warning][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-warning)}:host([kind=neutral][appearance=outline-fill]) .container{border-color:var(--calcite-color-border-2);background-color:var(--calcite-notice-background-color, var(--calcite-color-foreground-1))}:host([kind=neutral]) .notice-icon{color:var(--calcite-color-text-3)}:host([appearance=transparent]) .container{background-color:transparent}:host([hidden]){display:none}[hidden]{display:none}`;class u extends a.WF{constructor(){super(...arguments),this.closeButtonRef=(0,n._)(),this.transitionProp="opacity",this.transitionRef=(0,n._)(),this.messages=(0,g.u)(),this.focusSetter=(0,p.u)()(this),this.hasActionEnd=!1,this.appearance="outline-fill",this.closable=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.scale="m",this.width="auto",this.calciteNoticeBeforeClose=(0,l.c)({cancelable:!1}),this.calciteNoticeBeforeOpen=(0,l.c)({cancelable:!1}),this.calciteNoticeClose=(0,l.c)({cancelable:!1}),this.calciteNoticeOpen=(0,l.c)({cancelable:!1})}static{this.properties={hasActionEnd:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],closable:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:a.pf,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=v}async setFocus(e){return this.focusSetter(()=>this.el.querySelector("calcite-link")||this.closeButtonRef.value,e)}async load(){this.kindIcons={...s,brand:"lightbulb"},this.requestedIcon=(0,r.d)(this.kindIcons,this.icon,this.kind)}willUpdate(e){e.has("open")&&(this.hasUpdated||!1!==this.open)&&(0,d.t)(this),(e.has("icon")||e.has("kind")&&(this.hasUpdated||"brand"!==this.kind))&&(this.requestedIcon=(0,r.d)(this.kindIcons,this.icon,this.kind))}onBeforeClose(){this.calciteNoticeBeforeClose.emit()}onBeforeOpen(){this.calciteNoticeBeforeOpen.emit()}onClose(){this.calciteNoticeClose.emit()}onOpen(){this.calciteNoticeOpen.emit()}close(){this.open=!1}handleActionsEndSlotChange(e){this.hasActionEnd=(0,r.s)(e)}render(){const e=c.qy`<calcite-action class=${(0,a.CP)("notice-close")} icon=x @click=${this.close} .scale=${this.scale} .text=${this.messages.close} ${(0,n.K)(this.closeButtonRef)}></calcite-action>`;return c.qy`<div class=${(0,a.CP)("container")} ${(0,n.K)(this.transitionRef)}>${this.requestedIcon?c.qy`<div class=${(0,a.CP)("notice-icon")}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${(0,h.g)(this.scale)}></calcite-icon></div>`:null}<div class=${(0,a.CP)("notice-content")}><slot name=${"title"}></slot><slot name=${"message"}></slot><slot name=${"link"}></slot></div><div class=${(0,a.CP)("actions-end")} .hidden=${!this.hasActionEnd}><slot name=${"actions-end"} @slotchange=${this.handleActionsEndSlotChange}></slot></div>${this.closable?e:null}</div>`}}(0,o.c)("calcite-notice",u)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[883],{90883(e,t,i){i.r(t),i.d(t,{Notice:()=>u}),i(20107),i(7659);var o=i(50917),c=i(34857),n=i(11758),a=i(25339),l=i(53660),r=i(27617);const s={danger:"exclamationMarkTriangleF",info:"informationF",success:"checkCircleF",warning:"exclamationMarkTriangleF"};var d=i(31910),h=i(53250),g=i(9223),p=i(5918);const v=c.AH`:host([scale=s]){--calcite-notice-spacing-token-small: .5rem;--calcite-notice-spacing-token-large: .75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]){--calcite-notice-spacing-token-small: .75rem;--calcite-notice-spacing-token-large: 1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]){--calcite-notice-spacing-token-small: 1rem;--calcite-notice-spacing-token-large: 1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .notice-close{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=l]) .actions-end{margin-inline-end:var(--calcite-spacing-sm);gap:var(--calcite-spacing-sm)}:host([width=auto]){--calcite-notice-width: auto}:host([width=half]){--calcite-notice-width: 50%}:host([width=full]){--calcite-notice-width: 100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;opacity:0;overflow:hidden;max-block-size:0;transition-property:opacity,max-block-size;transition-duration:var(--calcite-animation-timing);text-align:start;border-radius:var(--calcite-notice-corner-radius, var(--calcite-corner-radius-sm));box-shadow:var(--calcite-notice-shadow, var(--calcite-shadow-none))}:host{display:flex}:host([open]) .container{pointer-events:auto;max-block-size:100%;align-items:center;opacity:1;overflow:visible}:host([open][appearance=outline-fill]) .container{border:var(--calcite-border-width-sm) solid}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-notice-title-text-color, var(--calcite-color-text-1))}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-notice-content-text-color, var(--calcite-color-text-2))}:host(:not([kind=neutral])[appearance=solid]) .container slot[name=title]::slotted(*),:host(:not([kind=neutral])[appearance=solid]) .container *::slotted([slot=title]){color:var(--calcite-notice-title-text-color, var(--calcite-color-text-inverse))}:host(:not([kind=neutral])[appearance=solid]) .container slot[name=message]::slotted(*),:host(:not([kind=neutral])[appearance=solid]) .container *::slotted([slot=message]){color:var(--calcite-notice-content-text-color, var(--calcite-color-text-inverse))}.notice-content{box-sizing:border-box;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-large)}.notice-content:first-of-type:not(:only-child){padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;padding-inline:var(--calcite-notice-spacing-token-small)}.notice-close{box-sizing:border-box;display:flex;cursor:pointer;align-items:center;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;flex:0 0 auto;margin-inline-end:var(--calcite-spacing-xs);--calcite-action-background-color: var(--calcite-notice-close-background-color);--calcite-action-background-color-hover: var( --calcite-notice-close-background-color-hover, var(--calcite-notice-close-background-color-focus) );--calcite-action-background-color-press: var(--calcite-notice-close-background-color-press);--calcite-action-text-color: var(--calcite-notice-close-icon-color, var(--calcite-color-text-3));--calcite-action-text-color-press: var(--calcite-notice-close-icon-color-hover)}.actions-end{display:flex;align-items:center;flex:0 0 auto;margin-inline-end:var(--calcite-spacing-xs);gap:var(--calcite-spacing-xs)}:host([kind=brand][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-brand) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-brand) 5%, var(--calcite-color-foreground-1)))}:host([kind=brand][appearance=outline-fill]) .notice-icon,:host([kind=brand][appearance=transparent]) .notice-icon{color:var(--calcite-color-brand)}:host([kind=info][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-info) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-info) 5%, var(--calcite-color-foreground-1)))}:host([kind=info][appearance=outline-fill]) .notice-icon,:host([kind=info][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-danger) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-danger) 5%, var(--calcite-color-foreground-1)))}:host([kind=danger][appearance=outline-fill]) .notice-icon,:host([kind=danger][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-success) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-success) 5%, var(--calcite-color-foreground-1)))}:host([kind=success][appearance=outline-fill]) .notice-icon,:host([kind=success][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-warning) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-warning) 5%, var(--calcite-color-foreground-1)))}:host([kind=warning][appearance=outline-fill]) .notice-icon,:host([kind=warning][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-warning)}:host([kind=neutral][appearance=outline-fill]) .container{border-color:var(--calcite-color-border-2);background-color:var(--calcite-notice-background-color, var(--calcite-color-foreground-1))}:host([kind=neutral]) .notice-icon{color:var(--calcite-color-text-3)}:host([appearance=transparent]) .container{background-color:transparent}:host([hidden]){display:none}[hidden]{display:none}`;class u extends a.WF{constructor(){super(...arguments),this.closeButtonRef=(0,n._)(),this.transitionProp="opacity",this.transitionRef=(0,n._)(),this.messages=(0,g.u)(),this.focusSetter=(0,p.u)()(this),this.hasActionEnd=!1,this.appearance="outline-fill",this.closable=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.scale="m",this.width="auto",this.calciteNoticeBeforeClose=(0,l.c)({cancelable:!1}),this.calciteNoticeBeforeOpen=(0,l.c)({cancelable:!1}),this.calciteNoticeClose=(0,l.c)({cancelable:!1}),this.calciteNoticeOpen=(0,l.c)({cancelable:!1})}static{this.properties={hasActionEnd:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],closable:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:a.pf,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=v}async setFocus(e){return this.focusSetter(()=>this.el.querySelector("calcite-link")||this.closeButtonRef.value,e)}async load(){this.kindIcons={...s,brand:"lightbulb"},this.requestedIcon=(0,r.d)(this.kindIcons,this.icon,this.kind)}willUpdate(e){e.has("open")&&(this.hasUpdated||!1!==this.open)&&(0,d.t)(this),(e.has("icon")||e.has("kind")&&(this.hasUpdated||"brand"!==this.kind))&&(this.requestedIcon=(0,r.d)(this.kindIcons,this.icon,this.kind))}onBeforeClose(){this.calciteNoticeBeforeClose.emit()}onBeforeOpen(){this.calciteNoticeBeforeOpen.emit()}onClose(){this.calciteNoticeClose.emit()}onOpen(){this.calciteNoticeOpen.emit()}close(){this.open=!1}handleActionsEndSlotChange(e){this.hasActionEnd=(0,r.s)(e)}render(){const e=c.qy`<calcite-action class=${(0,a.CP)("notice-close")} icon=x @click=${this.close} .scale=${this.scale} .text=${this.messages.close} ${(0,n.K)(this.closeButtonRef)}></calcite-action>`;return c.qy`<div class=${(0,a.CP)("container")} ${(0,n.K)(this.transitionRef)}>${this.requestedIcon?c.qy`<div class=${(0,a.CP)("notice-icon")}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${(0,h.g)(this.scale)}></calcite-icon></div>`:null}<div class=${(0,a.CP)("notice-content")}><slot name=${"title"}></slot><slot name=${"message"}></slot><slot name=${"link"}></slot></div><div class=${(0,a.CP)("actions-end")} .hidden=${!this.hasActionEnd}><slot name=${"actions-end"} @slotchange=${this.handleActionsEndSlotChange}></slot></div>${this.closable?e:null}</div>`}}(0,o.c)("calcite-notice",u)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1550,1666,2261,4642,6061,6312,7992,8125,9169,9397],{61691(t,e,r){r.d(e,{G:()=>n});class n{*[Symbol.iterator](){let t=this.next();for(;t;)yield t,t=this.next()}}},76061(t,e,r){r.d(e,{S:()=>s});var n=r(61691);class s extends n.G{constructor(t){super(),this.m_iGeom=-1,this.m_aGeoms=t?t.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const t=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,t}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},85503(t,e,r){r.d(e,{d:()=>c,e:()=>u});var n=r(4576),s=r(34727),i=r(86211),a=r(91735),o=r(78125);function u(t,e,r={}){let{maxAngleInDegrees:n=0,maxDeviation:u=0,unit:h}=r;const c=(0,o.getSpatialReference)(t);return h&&(e=(0,i.UW)(e,h,c),u&&(u=(0,i.UW)(u,h,c))),(0,o.toGeometry)((0,a.g7)((0,o.fromGeometry)(t),e,u,(0,s.kU)(n)),c)}const h=(0,a.fz)(),c=Object.freeze(Object.defineProperty({__proto__:null,execute:u,executeMany:function(t,e,r={}){let{maxAngleInDegrees:u=0,maxDeviation:h=0,unit:c}=r;const l=t.map(o.fromGeometry),f=(0,o.getSpatialReference)(t);return c&&(e=(0,i.UW)(e,c,f),h&&(h=(0,i.UW)(h,c,f))),(0,a.zo)(l,e,h,(0,s.kU)(u)).map(t=>(0,o.toGeometry)(t,f)).filter(n.Ru)},supportsCurves:h},Symbol.toStringTag,{value:"Module"}))},9093(t,e,r){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}r.d(e,{o8:()=>s,vt:()=>n,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:s,create:n,fromValues:function(t,e,r,n,s,i,a,o,u,h,c,l,f,m,g,x){return[t,e,r,n,s,i,a,o,u,h,c,l,f,m,g,x]}},Symbol.toStringTag,{value:"Module"}))},69397(t,e,r){r.d(e,{Qf:()=>u,Qh:()=>a,RS:()=>s,Ul:()=>m,lM:()=>i,qK:()=>c});var n=r(34275);const s=16;function i(t){if(!t)return 0;let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r],!1));return e}function a(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return h(t,8);let r=l;for(let n=0;n<e;n++)r+=o(t[n]);return r}(t);let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?a(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return s;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,n.iu)(e)?e.byteLength+f:Array.isArray(e)?h(e,s):0:0),0)}function h(t,e){return l+t.length*e}const c=32,l=16,f=145,m=64},87992(t,e,r){r.d(e,{JR:()=>V,ME:()=>E,MY:()=>I,NO:()=>C,Nh:()=>A,V2:()=>S,_s:()=>R,e6:()=>Y,gh:()=>P,tr:()=>N,uX:()=>p});var n=r(5482),s=r(69397),i=r(16930),a=(r(70328),r(19419)),o=r(60408),u=r(21325),h=r(513),c=r(50954),l=r(79567),f=r(52006),m=r(49663),g=r(46068),x=r(92722);class p{constructor({type:t,spatialReference:e,vertexCount:r,vertexXY:n,vertexZ:s,vertexM:i,partCount:a,partOffsets:o,partFlags:u,segmentFlags:h,segmentIndices:c,segmentParams:l,segmentCountArc:f,segmentCountBezier:m}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=t,this.spatialReference=e,this.vertexCount=r,this.vertexXY=n,this.vertexZ=s,this.vertexM=i,this.partCount=a,this.partOffsets=o,this.partFlags=u,this.segmentFlags=h,this.segmentIndices=c,this.segmentParams=l,this.segmentCountArc=f,this.segmentCountBezier=m}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:t,segmentCountArc:e,segmentCountBezier:r}=this;return t&&t-e-r}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}hasCurves(){return null!=this.segmentFlags}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function t(t){return t?s.Ul+t.byteLength:0}return t(this.vertexXY)+t(this.vertexZ)+t(this.vertexM)+t(this.partOffsets)+t(this.partFlags)+t(this.segmentFlags)+t(this.segmentIndices)+t(this.segmentParams)}clone(){const{type:t,vertexCount:e,partCount:r,hasZ:n,hasM:s,segmentCountArc:i,segmentCountBezier:a}=this,o=S(t,e,r,n,s,this.hasCurves(),i,a);o.spatialReference=this.spatialReference;const{vertexXY:u,vertexZ:h,vertexM:c}=this;if(o.vertexXY.set(u.subarray(0,2*e),0),o.vertexZ?.set(h.subarray(0,e),0),o.vertexM?.set(c.subarray(0,e),0),this.isMultipart()){const{partOffsets:t,partFlags:e}=this;o.partFlags.set(e.subarray(0,r+1)),o.partOffsets.set(t.subarray(0,r+1))}if(this.hasCurves()){const{segmentFlags:t,segmentIndices:r,segmentParams:n,segmentParamCount:s}=this;o.segmentFlags.set(t.subarray(0,e),0),o.segmentIndices.set(r.subarray(0,e),0),o.segmentParams.set(n.subarray(0,s),0)}return o}equals(t){return this.equalsWithinTolerance(t,0)}equalsWithinTolerance(t,e){if(null==t)return!1;if(this===t)return!0;if(!(0,u.aI)(this.spatialReference,t.spatialReference))return!1;if(this.vertexCount!==t.vertexCount||this.partCount!==t.partCount)return!1;if(this.hasZ!==t.hasZ||this.hasM!==t.hasM)return!1;if(this.hasCurves()!==t.hasCurves()||this.segmentCountArc!==t.segmentCountArc||this.segmentCountBezier!==t.segmentCountBezier)return!1;const r=0===e?(t,e)=>t!==e||isNaN(t)!==isNaN(e):(t,r)=>Math.abs(t-r)>e||isNaN(t)!==isNaN(r);for(let e=0;e<this.vertexCount;++e)if(r(this.vertexXY[2*e],t.vertexXY[2*e])||r(this.vertexXY[2*e+1],t.vertexXY[2*e+1]))return!1;if(this.hasZ)for(let e=0;e<this.vertexCount;++e)if(r(this.vertexZ[e],t.vertexZ[e]))return!1;if(this.hasM)for(let e=0;e<this.vertexCount;++e)if(r(this.vertexM[e],t.vertexM[e]))return!1;for(let e=0;e<this.partCount;++e)if(this.partFlags[e]!==t.partFlags[e]||this.partOffsets[e]!==t.partOffsets[e])return!1;if(this.hasCurves()){for(let e=0;e<this.vertexCount;++e)if(this.segmentFlags[e]!==t.segmentFlags[e]||this.segmentIndices[e]!==t.segmentIndices[e])return!1;for(let e=0;e<this.segmentParamCount;++e)if(r(this.segmentParams[e],t.segmentParams[e]))return!1}return!0}get parts(){return this.isMultipart()?new y(this):[][Symbol.iterator]()}}class y{constructor(t){this.geometry=t,this.value=new d(t)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class d{constructor(t){this.geometry=t,this.index=-1,this._readVertex=O(t),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 t=this.geometry.partOffsets;return t[this.index+1]-t[this.index]}}class v{constructor(t){this._part=t,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===t.geometry.type,this.value=new M(t.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const t=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=t&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:t}=this._part,e=this._part.geometry.partOffsets;this._partStart=e[t],this._partEnd=e[t+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class M{constructor(t){this.geometry=t,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=O(t)}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 t=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===t)return this.end;const e=this.geometry.segmentParams;let r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===t){const t=e[r++],n=e[r++],s=e[r++],i=e[r++];return{b:[this.end,[t,n],[s,i]]}}const n=e[r++],s=e[r++],i=e[r++],a=e[r++],o=e[r++],u=e[r++];r++,r++;const h=e[r++],c=e[r++];if(!Boolean(4&n)&&1===i)return{c:[this.end,[h,c]]};const l=2&n?0:1,f=1&n?0:1;return{a:[this.end,[o,u],l,f,a,s,i]}}}function C(t,e){const r={stack:[],error:void 0,hasError:!1};try{return e??=(0,a.Ie)(),(0,n.mS)(r,new _(t,["vertexZ","vertexM","spatialReference"]),!1),(0,a.bx)(e,function(t){let e;const{vertexCount:r,vertexXY:s,vertexZ:i,vertexM:o}=t,u=w(t);if(t.hasCurves()){const r={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(r,new _(t,["vertexZ","vertexM"]),!1);const s=(0,a.Ie)();for(const e of t.parts){let t=e.startVertex;for(const{curve:r}of e.segments)(0,l.e)(s,t,r),t=(0,f.yP)(r)}const[i,o,h,c]=s;e={xmin:i,ymin:o,xmax:h,ymax:c,spatialReference:u}}catch(t){r.error=t,r.hasError=!0}finally{(0,n.hk)(r)}}else{let t,n,i,a;t=n=1/0,i=a=-1/0;for(let e=0;e<r;++e){const r=s[2*e],o=s[2*e+1];t=Math.min(t,r),i=Math.max(i,r),n=Math.min(n,o),a=Math.max(a,o)}e={xmin:t,ymin:n,xmax:i,ymax:a,spatialReference:u}}if(i){let t=1/0,r=-1/0;for(const e of i)t=Math.min(t,e),r=Math.max(r,e);e.zmin=t,e.zmax=r}if(o){let t=1/0,r=-1/0;for(const e of o)t=Math.min(t,e),r=Math.max(r,e);e.mmin=t,e.mmax=r}return e}(t)),e}catch(t){r.error=t,r.hasError=!0}finally{(0,n.hk)(r)}}function E(t){let e,r,n;if((0,o.fT)(t)){n="point";const{x:s,y:i,z:a,m:o}=t,u=[s,i];null!=a&&u.push(a),null!=o&&u.push(o),r=[[u]],e=1}else(0,o.U9)(t)?(n="multipoint",r=[t.points],e=t.points.length):(0,o.Rg)(t)?(n="polyline",r=t.curvePaths??t.paths,e=r.reduce((t,e)=>t+e.length,0)):(n="polygon",r=t.curveRings??t.rings,e=r.reduce((t,e)=>(0===e.length||(t+=e.length,Z(e[0],(0,f.yP)(e.at(-1)))&&--t),t),0));const s=S(n,e,n.includes("point")?0:r.length,(0,o.Pv)(t),(0,o.W0)(t),(0,f.Ed)(t)),{hasZ:i,hasM:a,vertexXY:u,vertexZ:h,vertexM:c}=s;function l(t){u[2*g]=t[0],u[2*g+1]=t[1],i&&(h[g]=t[2]),a&&(c[g]=t[m]),++g}s.spatialReference=t.spatialReference??void 0;const m=s.hasZ?3:2;let g=0;if(!s.isMultipart()){if(!i&&!a){for(const[t,e]of r[0])u[2*g]=t,u[2*g+1]=e,++g;return s}for(const t of r[0])l(t);return s}const x="polygon"===n,{partOffsets:p}=s;let y=0;if(!s.hasCurves()){for(const t of r){if(p[y++]=g,0===t.length)continue;let e=t.length;if(x&&Z(t[0],t.at(-1))&&--e,i||a)for(let r=0;r<e;++r)l(t[r]);else for(let r=0;r<e;++r){const[e,n]=t[r];u[2*g]=e,u[2*g+1]=n,++g}}return p[y]=g,s}function d(t){const e=v+t;if(e<=(s.segmentParams?.length??0))return;let r=e*G;r=20*Math.ceil(r/20);const n=s.segmentParams;s.segmentParams=new Float64Array(r),null!=n&&s.segmentParams.set(n)}let v=0;for(const t of r){if(s.partOffsets[y++]=g,0===t.length)continue;const e=t[0];let r=e;for(let e=1;e<t.length;++e){const n=t[e];l(r);const i=g-1;(0,f.wY)(n)?(d(10),++s.segmentCountArc,v=R(r,n,s,i,v),r=n.a[0]):(0,f.DA)(n)?(d(10),++s.segmentCountArc,v=b(r,n,s,i,v),r=n.a[0]):(0,f.aO)(n)?(d(10),++s.segmentCountArc,v=Y(r,n,s,i,v),r=n.c[0]):(0,f.n1)(n)?(d(4),++s.segmentCountBezier,v=N(0,n,s,i,v),r=n.b[0]):r=n}x&&Z(e,r)||l(r)}return s.partOffsets[y]=g,s}function P(t){const e=O(t),{vertexCount:r,partCount:n,hasZ:s,hasM:i}=t,a=w(t);if("point"===t.type){const[e,r]=t.vertexXY,n=t.vertexZ?.[0],s=t.vertexM?.[0];return{x:e,y:r,z:n,m:s,spatialReference:a}}let o=0;if("multipoint"===t.type){const t=[];for(;o<r;)t.push(e(o++));return{points:t,spatialReference:a,hasZ:s,hasM:i}}const u="polygon"===t.type;if(!t.hasCurves()){const r=new Array;for(let s=0;s<n;++s){const n=t.partOffsets[s+1],i=new Array;for(;o<n;)i.push(e(o++));u&&i.length>0&&i.push(i[0]),r.push(i)}return u?{rings:r,hasZ:s,hasM:i,spatialReference:a}:{paths:r,hasZ:s,hasM:i,spatialReference:a}}const h=new Array;for(const{segments:e,startVertex:r}of t.parts){const t=[r];for(const{curve:r}of e)t.push(r);h.push(t)}return u?{rings:[],curveRings:h,hasZ:s,hasM:i,spatialReference:a}:{paths:[],curvePaths:h,hasZ:s,hasM:i,spatialReference:a}}function A(t,{lengths:e,coords:r,hasZ:n,hasM:s},i){const a=t.includes("point")?0:e.length,o="polygon"===t,u="point"===t?1:e.reduce((t,e)=>t+e,0)-(o?a:0);n??=!1,s??=!1;const h=S(t,u,a,n,s,!1,0,0);if(h.spatialReference=i??void 0,!h.isMultipart()){for(let t=0,e=0;t<u;++t)h.vertexXY[2*t]=r[e++],h.vertexXY[2*t+1]=r[e++],n&&(h.vertexZ[t]=r[e++]),s&&(h.vertexM[t]=r[e++]);return h}const c=2+Number(n)+Number(s);let l=0,f=0;h.partOffsets[0]=0;for(const t of e){const e=h.partOffsets[f],i=e+t-Number(o);h.partOffsets[++f]=i;for(let t=e;t<i;++t)h.vertexXY[2*t]=r[l++],h.vertexXY[2*t+1]=r[l++],n&&(h.vertexZ[t]=r[l++]),s&&(h.vertexM[t]=r[l++]);o&&(l+=c)}return h}function V({type:t,vertexCount:e,vertexXY:r,vertexZ:n,vertexM:s,partCount:i,partOffsets:a,hasZ:o,hasM:u}){const h=new x.A([],[],o,u);i=Math.max(i,1);const c="polygon"===t;let l=0;for(let t=0;t<i;++t){const i=a?.[t+1]??e,f=h.coords.length;for(let t=l;t<i;++t)h.coords.push(r[2*t],r[2*t+1]),o&&h.coords.push(n[t]),u&&h.coords.push(s[t]);if(c){const t=l;h.coords.push(r[2*t],r[2*t+1]),o&&h.coords.push(n[t]),u&&h.coords.push(s[t])}h.lengths.push((h.coords.length-f)/h.stride),l=i}return"point"===t&&(h.lengths.length=0),h}function I(t,e){return"getSpatialReference"in t&&(e=function(t){if(null==t)return;const e=t.getText()||void 0,r=t.isCustomWkid()?0:t.getOldID();if(r<=0)return{wkt:e};let n=t.getLatestID();(n<=0||n===r)&&(n=void 0);const s=t.getVCS();if(null==s)return{wkid:r,latestWkid:n,wkt:e};const i=s.isCustomWkid()?0:s.getOldID();if(i<=0)return{wkt:e};let a=t.getLatestVerticalID();return(a<=0||a===i)&&(a=void 0),{wkid:r,wkt:e,latestWkid:n,vcsWkid:i,latestVcsWkid:a}}(t.getSpatialReference()),t=t.getGeometry()),new p({...t.toFlatGeometry(),spatialReference:e})}class _{constructor(t,e){this.target=t,this.keys=e,this.oldValues=e.map(e=>t[e]);for(const r of e)t[r]=void 0}[Symbol.dispose](){this.keys.map((t,e)=>{this.target[t]=this.oldValues[e]})}}function w({spatialReference:t}){return t instanceof i.A?t.toJSON():t}function O({vertexXY:t,vertexZ:e,vertexM:r}){return e?r?n=>[t[2*n],t[2*n+1],e[n],r[n]]:r=>[t[2*r],t[2*r+1],e[r]]:r?e=>[t[2*e],t[2*e+1],r[e]]:e=>[t[2*e],t[2*e+1]]}function Z(t,e){return t.every((t,r)=>t===e[r])}function S(t,e,r,n,s,i,a,o){a??=0,o??=0;const u=new p({type:t,vertexCount:e,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:a,segmentCountBezier:o});let h=2*Float64Array.BYTES_PER_ELEMENT*e;n&&(h+=Float64Array.BYTES_PER_ELEMENT*e),s&&(h+=Float64Array.BYTES_PER_ELEMENT*e),u.isMultipart()&&(h+=(r+1)*Int32Array.BYTES_PER_ELEMENT,h+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(h+=e*Int8Array.BYTES_PER_ELEMENT,h+=e*Int32Array.BYTES_PER_ELEMENT,h+=u.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const c=new ArrayBuffer(h);let l=0;return u.vertexXY=new Float64Array(c,l,2*e),l+=u.vertexXY.byteLength,n&&(u.vertexZ=new Float64Array(c,l,e),l+=u.vertexZ.byteLength),s&&(u.vertexM=new Float64Array(c,l,e),l+=u.vertexM.byteLength),i&&(u.segmentParams=new Float64Array(c,l,u.segmentParamCount),l+=u.segmentParams.byteLength,u.segmentIndices=new Int32Array(c,l,e),u.segmentIndices.fill(T),l+=u.segmentIndices.byteLength),u.isMultipart()&&(u.partOffsets=new Int32Array(c,l,r+1),l+=u.partOffsets.byteLength,u.partFlags=new Int8Array(c,l,r+1),l+=u.partFlags.byteLength,"polygon"===u.type&&u.partFlags.subarray(0,r).fill(1)),i&&(u.segmentFlags=new Int8Array(c,l,e),u.segmentFlags.fill(1),l+=u.segmentFlags.byteLength),u}function R(t,e,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,a){r[i]=4,n[i]=a;const[o,[u,h],c,l,f,m,x]=e.a;let p=4;l||(p|=1),c||(p|=2);const y=(0,g.SW)(t,e),[d,v]=(0,g.Uk)(y,.5);return s[a++]=p,s[a++]=m,s[a++]=x,s[a++]=f,s[a++]=u,s[a++]=h,s[a++]=y.u2-y.u1,s[a++]=y.u1,s[a++]=d,s[a++]=v,a}function b(t,e,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,a){r[i]=4,n[i]=a;const o=(0,m.i)(t,e);return F(o,4,...(0,h.mq)(o,.5),s,a)}function Y(t,e,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,a){return r[i]=4,n[i]=a,F((0,c.pM)(t,e),0,...e.c[1],s,a)}function F(t,e,r,n,s,i){const{cx:a,cy:o,thetaStart:u,thetaEnd:h,radius:c}=t;return u>h||(e|=1),Math.abs(h-u)<=Math.PI||(e|=2),s[i++]=e,s[i++]=c,s[i++]=1,s[i++]=0,s[i++]=a,s[i++]=o,s[i++]=h-u,s[i++]=u,s[i++]=r,s[i++]=n,i}function N(t,{b:[e,[r,n],[s,i]]},{segmentFlags:a,segmentIndices:o,segmentParams:u},h,c){return a[h]=2,o[h]=c,u[c++]=r,u[c++]=n,u[c++]=s,u[c++]=i,c}const G=1.61803,T=-1},88411(t,e,r){r.d(e,{execute:()=>n.e}),r(4576),r(34727),r(86211),r(91735),r(78125);var n=r(85503)},91735(t,e,r){r.d(e,{fz:()=>o,g7:()=>i,zo:()=>a});var n=r(76061);const s=new(r(5247).O);function i(t,e,r,n){return s.execute(t,e,r,n,null)}function a(t,e,r,i){const a=s.executeMany(new n.S(t),e,r,i,null);return Array.from(a)}function o(){return s.supportsCurves()}},78125(t,e,r){r.r(e),r.d(e,{fromExtent:()=>p,fromGeometry:()=>x,fromMultipoint:()=>y,fromPoint:()=>d,fromPolygon:()=>v,fromPolyline:()=>M,fromPolylineUsingImportOperator:()=>C,fromSpatialReference:()=>E,getSpatialReference:()=>g,toExtent:()=>A,toGeometry:()=>P,toMultipoint:()=>V,toPoint:()=>I,toPolygon:()=>_,toPolyline:()=>w});var n=r(83661),s=(r(79187),r(55537)),i=r(95213),a=r(88885),o=r(5443),u=r(48526),h=r(86738),c=r(39829),l=r(82799),f=(r(90293),r(83299));const m="_gxVersion";function g(t){return Array.isArray(t)?t[0].spatialReference:t.spatialReference}function x(t){switch(t.type){case"point":return d(t);case"multipoint":return y(t);case"polyline":return M(t);case"polygon":return v(t);case"extent":return p(t);default:throw new Error(`Unsupported geometry type: ${t.type}`)}}function p(t){if(!t.getCacheValue(m)){const e=new i.E;e.setCoords(t.xmin,t.ymin,t.xmax,t.ymax),t.hasM&&e.setInterval(2,0,t.mmin,t.mmax),t.hasZ&&e.setInterval(1,0,t.zmin,t.zmax),t.setCacheValue(m,e)}return t.getCacheValue(m)}function y(t){if(!t.getCacheValue(m)){const e=new a.M,r=new i.P,n=t.points,s=t.hasM,o=t.hasZ,u=o?3:2;for(let t=0,i=n.length;t<i;t++){const i=n[t];r.setXYCoords(i[0],i[1]),o&&r.setZ(i[2]??0),s&&r.setM(i[u]??NaN),e.add(r)}t.setCacheValue(m,e)}return t.getCacheValue(m)}function d(t){if(!t.getCacheValue(m)){const e=new i.P;e.setXYCoords(t.x,t.y),t.hasM&&e.setM(t.m),t.hasZ&&e.setZ(t.z),t.setCacheValue(m,e)}return t.getCacheValue(m)}function v(t){if(!t.getCacheValue(m)){const{curveRings:e,hasM:r,hasZ:n,rings:s}=t,i=(0,f.fromGeometryToGXGeometry)({curveRings:e,hasM:r,hasZ:n,rings:s});t.setCacheValue(m,i)}return t.getCacheValue(m)}function M(t){if(!t.getCacheValue(m)){const{curvePaths:e,hasM:r,hasZ:n,paths:s}=t,i=(0,f.fromGeometryToGXGeometry)({curvePaths:e,hasM:r,hasZ:n,paths:s});t.setCacheValue(m,i)}return t.getCacheValue(m)}function C(t){if(!t.getCacheValue(m)){const{curvePaths:e,hasM:r,hasZ:n,paths:s}=t,i=(0,f.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:e,hasM:r,hasZ:n,paths:s});t.setCacheValue(m,i)}return t.getCacheValue(m)}function E(t){return(0,f.fromSpatialReference)(t)}function P(t,e){if(t)switch(t.getGeometryType()){case s.G.enumPoint:return I(t,e);case s.G.enumEnvelope:return A(t,e);case s.G.enumMultiPoint:return V(t,e);case s.G.enumPolyline:return w(t,e);case s.G.enumPolygon:return _(t,e)}return null}function A(t,e){if(t.isEmpty())return null;const r=new o.A({xmin:t.getXMin(),ymin:t.getYMin(),xmax:t.getXMax(),ymax:t.getYMax(),spatialReference:e}),n=t.getDescription();if(n.hasM()){const e=t.queryInterval(2,0);r.mmin=e.vmin,r.mmax=e.vmax}if(n.hasZ()){const e=t.queryInterval(1,0);r.zmin=e.vmin,r.zmax=e.vmax}return r.setCacheValue(m,t),r}function V(t,e){if(t.isEmpty())return null;const r=t.getDescription(),n=r.hasM(),s=r.hasZ(),a=[],o=new i.P;for(let e=0,r=t.getPointCount();e<r;e++){t.getPointByVal(e,o);const r=[o.getX(),o.getY()];s&&r.push(o.getZ()),n&&r.push(o.getM()),a.push(r)}const h=new u.A({hasM:n,hasZ:s,points:a,spatialReference:e});return h.setCacheValue(m,t),h}function I(t,e){if(t instanceof n.P)return new h.A({x:t.x,y:t.y,spatialReference:e});if(t.isEmpty())return null;const r=new h.A({x:t.getX(),y:t.getY(),spatialReference:e}),s=t.getDescription();return s.hasM()&&(r.m=t.getM()),s.hasZ()&&(r.z=t.getZ()),r.setCacheValue(m,t),r}function _(t,e){if(t.isEmpty())return null;const r=c.A.fromJSON({...(0,f.toGeometry)(t,null),spatialReference:e});return r.setCacheValue(m,t),r}function w(t,e){if(t.isEmpty())return null;const r=l.A.fromJSON({...(0,f.toGeometry)(t,null),spatialReference:e});return r.setCacheValue(m,t),r}},4197(t,e,r){r.d(e,{Vj:()=>h,cj:()=>u,jh:()=>i,l5:()=>o,xm:()=>a});var n=r(34275),s=r(9093);function i(t){return t<=n.y9?new Array(t).fill(0):new Float64Array(t)}function a(t){return((0,n.iu)(t)?t.byteLength/8:t.length)<=n.y9?Array.from(t):new Float64Array(t)}function o(t,e,r){return Array.isArray(t)?t.slice(e,e+r):t.subarray(e,e+r)}function u(t){return[...t]}function h(t){const e=(0,s.vt)();for(let r=0;r<16;++r)e[r]=t[r];return e}},70328(t,e,r){r.d(e,{BI:()=>v,DC:()=>l,Ej:()=>m,Ie:()=>y,Jt:()=>d,Ne:()=>g,RF:()=>c,aI:()=>C,fA:()=>a,gE:()=>u,hZ:()=>p,iT:()=>f,is:()=>M,qv:()=>E,vI:()=>x,vY:()=>o,v_:()=>P,vt:()=>i,w1:()=>h});var n=r(5443),s=(r(19419),r(4197));function i(t=P){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function a(t,e,r,n,s,a,o=i()){return o[0]=t,o[1]=e,o[2]=r,o[3]=n,o[4]=s,o[5]=a,o}function o(t,e=i()){return function(t,e,r,n=i()){return p(n,E),function(t,e,r=0,n=e.length/3){let s=t[0],i=t[1],a=t[2],o=t[3],u=t[4],h=t[5];for(let t=0;t<n;t++)s=Math.min(s,e[r+3*t]),i=Math.min(i,e[r+3*t+1]),a=Math.min(a,e[r+3*t+2]),o=Math.max(o,e[r+3*t]),u=Math.max(u,e[r+3*t+1]),h=Math.max(h,e[r+3*t+2]);t[0]=s,t[1]=i,t[2]=a,t[3]=o,t[4]=u,t[5]=h}(n,t,e,r),n}(t,0,t.length/3,e)}function u(t,e=(0,s.jh)(24)){const[r,n,i,a,o,u]=t;return e[0]=r,e[1]=n,e[2]=i,e[3]=r,e[4]=n,e[5]=u,e[6]=r,e[7]=o,e[8]=i,e[9]=r,e[10]=o,e[11]=u,e[12]=a,e[13]=n,e[14]=i,e[15]=a,e[16]=n,e[17]=u,e[18]=a,e[19]=o,e[20]=i,e[21]=a,e[22]=o,e[23]=u,e}function h(t,e){const r=isFinite(t[2])||isFinite(t[5]);return new n.A(r?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[3]),t[4]=Math.max(t[4],e[4]),t[5]=Math.max(t[5],e[5])}function l(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function f(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[0]),t[4]=Math.max(t[4],e[1]),t[5]=Math.max(t[5],e[2])}function m(t,e=[0,0,0]){return e[0]=function(t){return t[0]>=t[3]?0:t[3]-t[0]}(t),e[1]=function(t){return t[1]>=t[4]?0:t[4]-t[1]}(t),e[2]=function(t){return t[2]>=t[5]?0:t[5]-t[2]}(t),e}function g(t,e,r=t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r!==t&&(r[3]=t[3],r[4]=t[4],r[5]=t[5]),r}function x(t,e,r=t){return r[3]=e[0],r[4]=e[1],r[5]=e[2],r!==t&&(r[0]=t[0],r[1]=t[1],r[2]=t[2]),t}function p(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function y(t){return t?p(t,E):i(E)}function d(t,e){return t[0]=e[0],t[1]=e[1],t[2]=Number.NEGATIVE_INFINITY,t[3]=e[2],t[4]=e[3],t[5]=Number.POSITIVE_INFINITY,t}function v(t,e,r,n,s){return t[0]=e,t[1]=r,t[2]=Number.NEGATIVE_INFINITY,t[3]=n,t[4]=s,t[5]=Number.POSITIVE_INFINITY,t}function M(t){return 6===t.length}function C(t,e,r){if(null==t||null==e)return t===e;if(!M(t)||!M(e))return!1;if(r){for(let n=0;n<t.length;n++)if(!r(t[n],e[n]))return!1}else for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}const E=[1/0,1/0,1/0,-1/0,-1/0,-1/0],P=[0,0,0,0,0,0];i()},92722(t,e,r){r.d(e,{A:()=>s});var n=r(69397);class s{constructor(t=[],e=[],r=!1,n=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=r,this.hasM=n}static fromJSON({lengths:t,coords:e,hasZ:r,hasM:n}){return new s(t,e,r||!1,n||!1)}static fromRect([t,e,r,n]){const i=r-t,a=n-e;return new s([5],[t,e,i,0,0,a,-i,0,0,-a])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,e=0;for(const r of this.lengths){if(r<3)continue;const{stride:n}=this;let s=this.coords[n*e],i=this.coords[n*e+1];for(let a=1;a<r;a+=1){const r=n*(e+a),o=this.coords[r],u=this.coords[r+1];t+=-.5*(o-s)*(u+i),s=o,i=u}e+=r}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:r}=this;for(const n of this.lengths){for(let s=0;s<n;s++){const n=r*(e+s);t(this.coords[n],this.coords[n+1])}e+=n}}deltaDecode(){const t=this.clone(),{coords:e,lengths:r}=t;let n=0;const{stride:s}=this;for(const t of r){for(let r=1;r<t;r++){const t=s*(n+r);e[t]+=e[t-s],e[t+1]+=e[t+1-s]}n+=t}return t}clone(t){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const e=Array.from(this.lengths),{stride:r,size:n}=this,i=this.coords.slice(0,n*r);return t?(t.set(i),new s(e,t)):new s(e,Array.from(i),this.hasZ,this.hasM)}justXY(){const{stride:t,size:e}=this;if(2===t)return this;const r=new Array(e*t);for(let e=0,n=0;e<r.length;e+=t)r[n++]=this.coords[e],r[n++]=this.coords[e+1];return new s(this.lengths,r,!1,!1)}}}}]);