@arcgis/core 4.30.0-next.20240213 → 4.30.0-next.20240214

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 (116) hide show
  1. package/TimeExtent.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/051c00021039f20ad935.js +1 -0
  4. package/assets/esri/core/workers/chunks/08ba549f9c4afc42a21c.js +1 -0
  5. package/assets/esri/core/workers/chunks/{a384f29cb3256401962a.js → 1629a8c2085dce59cd1b.js} +1 -1
  6. package/assets/esri/core/workers/chunks/18512caeeb03b9759ab1.js +1 -0
  7. package/assets/esri/core/workers/chunks/{cc1c958aad790a44048b.js → 1ca28af7c516d8283bb0.js} +1 -1
  8. package/assets/esri/core/workers/chunks/1f8a0fb32b96e50f5909.js +1 -0
  9. package/assets/esri/core/workers/chunks/25f7e92cb4934c4930be.js +1 -0
  10. package/assets/esri/core/workers/chunks/2649166d1a462c7f8338.js +1 -0
  11. package/assets/esri/core/workers/chunks/51e4f771bfe352967c97.js +1 -0
  12. package/assets/esri/core/workers/chunks/5467bacd2771e6b1cdfa.js +1 -0
  13. package/assets/esri/core/workers/chunks/5638d95e600ff271c5b1.js +1 -0
  14. package/assets/esri/core/workers/chunks/58f088b08e12c5435dbc.js +1 -0
  15. package/assets/esri/core/workers/chunks/5aef1e898618f8dda2c9.js +1 -0
  16. package/assets/esri/core/workers/chunks/656ec8a14df0e4b68433.js +1 -0
  17. package/assets/esri/core/workers/chunks/66f21348fb68c83b9dc3.js +1108 -0
  18. package/assets/esri/core/workers/chunks/{eb2d6f1ee63b40ae0736.js → 774b655498289b1b36bb.js} +1 -1
  19. package/assets/esri/core/workers/chunks/9310f1de92d9b82dc803.js +1 -0
  20. package/assets/esri/core/workers/chunks/{f03d62ab7806b68d0b62.js → 9fbf61675e2a5374f754.js} +1 -1
  21. package/assets/esri/core/workers/chunks/a0b017a34cafd08ce945.js +1 -0
  22. package/assets/esri/core/workers/chunks/a28711db61c1df2d7bac.js +1 -0
  23. package/assets/esri/core/workers/chunks/aa9b46bcb75c96731de3.js +1 -0
  24. package/assets/esri/core/workers/chunks/c83da4659646ce3f5b50.js +1 -0
  25. package/assets/esri/core/workers/chunks/{05ebb9cec0e1826b283f.js → cafcc53175f9d4c5de2f.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{1c6914ded7db720f7bf7.js → daf6eab5dd198ca9a67b.js} +1 -1
  27. package/assets/esri/core/workers/chunks/e03edeaf3af46495449e.js +1 -0
  28. package/assets/esri/core/workers/chunks/e0c9f29eedfa71554445.js +1 -0
  29. package/assets/esri/core/workers/chunks/e123017c670f22266768.js +1 -0
  30. package/assets/esri/core/workers/chunks/eba3a6f0a66b51b8ec12.js +1 -0
  31. package/assets/esri/core/workers/chunks/ebb294c82207f3ff9f04.js +1 -0
  32. package/assets/esri/core/workers/chunks/{e4da908079417cc2f495.js → ee0c77889059815a31b2.js} +1 -1
  33. package/assets/esri/core/workers/chunks/f36e55302b45e2936a5b.js +1 -0
  34. package/assets/esri/core/workers/chunks/f85e67d4a18603ccaaed.js +1 -0
  35. package/assets/esri/core/workers/chunks/f90bbebd2dc07a77ce09.js +1 -0
  36. package/chunks/vec32.js +1 -1
  37. package/interfaces.d.ts +131 -66
  38. package/layers/WFSLayer.js +1 -1
  39. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  40. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  41. package/layers/mixins/ArcGISImageService.js +1 -1
  42. package/package.json +1 -1
  43. package/portal/Portal.js +1 -1
  44. package/portal/PortalGroup.js +1 -1
  45. package/portal/PortalUser.js +1 -1
  46. package/portal/support/geometryServiceUtils.js +1 -1
  47. package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
  48. package/rest/networks/support/Association.js +1 -1
  49. package/rest/places.js +1 -1
  50. package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
  51. package/rest/support/ImageSampleParameters.js +1 -1
  52. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  53. package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
  54. package/support/elevationInfoUtils.js +1 -1
  55. package/support/revision.js +1 -1
  56. package/symbols/cim/cimAnalyzer.js +1 -1
  57. package/symbols/cim/defaultCIMValues.js +1 -1
  58. package/symbols/cim/utils.js +1 -1
  59. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  60. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  61. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  62. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  63. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  64. package/views/3d/layers/SceneLayerView3D.js +1 -1
  65. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  66. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  67. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  68. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  69. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  70. package/views/3d/terrain/OverlayRenderer.js +1 -1
  71. package/views/3d/webgl/RenderNode.js +1 -1
  72. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  73. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  74. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +9 -7
  75. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceConstants.js +5 -0
  76. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +8 -8
  77. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  78. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  79. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  80. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  81. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  82. package/views/draw/drawSurfaces.js +1 -1
  83. package/views/layers/ImageryTileLayerView.js +1 -1
  84. package/webdoc/support/webdocLoadUtils.js +1 -1
  85. package/webdoc/support/webdocSaveUtils.js +1 -1
  86. package/widgets/Editor.js +1 -1
  87. package/widgets/FeatureForm.js +1 -1
  88. package/widgets/Print/PrintViewModel.js +1 -1
  89. package/widgets/Search/support/locatorUtils.js +1 -1
  90. package/widgets/Sketch/SketchViewModel.js +1 -1
  91. package/assets/esri/core/workers/chunks/00b9e92f8df245a83921.js +0 -1
  92. package/assets/esri/core/workers/chunks/02ee044597c89c86b934.js +0 -1
  93. package/assets/esri/core/workers/chunks/143ccb14c9e915dd1412.js +0 -1
  94. package/assets/esri/core/workers/chunks/24649b410b757599a549.js +0 -1
  95. package/assets/esri/core/workers/chunks/2519b207894132d5ea91.js +0 -1
  96. package/assets/esri/core/workers/chunks/30f9b2a3417cbcfeecca.js +0 -1
  97. package/assets/esri/core/workers/chunks/42ab9c282bb267c3db03.js +0 -1
  98. package/assets/esri/core/workers/chunks/49afeac45250b15b5f36.js +0 -1
  99. package/assets/esri/core/workers/chunks/50bb67f2eeace5d50673.js +0 -1
  100. package/assets/esri/core/workers/chunks/50cdc59426ba859027e2.js +0 -1
  101. package/assets/esri/core/workers/chunks/58c5861d060c808813a1.js +0 -1
  102. package/assets/esri/core/workers/chunks/5dbb3ef6fdd25ac632ad.js +0 -1
  103. package/assets/esri/core/workers/chunks/61c4bb58ef9f2d99c75e.js +0 -1
  104. package/assets/esri/core/workers/chunks/6e50220f8e2d392e2855.js +0 -1
  105. package/assets/esri/core/workers/chunks/6fd8047741a0df006ddd.js +0 -1
  106. package/assets/esri/core/workers/chunks/7709248f59520aee6f51.js +0 -1
  107. package/assets/esri/core/workers/chunks/8852a64918caf80fc414.js +0 -1
  108. package/assets/esri/core/workers/chunks/94dfb80ab23dda92918b.js +0 -1
  109. package/assets/esri/core/workers/chunks/9ebbc75ba5c623a322aa.js +0 -1
  110. package/assets/esri/core/workers/chunks/a74c59cf5d1c4e63a4e1.js +0 -1
  111. package/assets/esri/core/workers/chunks/be562536212360943388.js +0 -1
  112. package/assets/esri/core/workers/chunks/d06d36815c2121484a13.js +0 -1
  113. package/assets/esri/core/workers/chunks/d5f06a7b0ea7951c8dd0.js +0 -1
  114. package/assets/esri/core/workers/chunks/de6d54df7ae32694fd70.js +0 -1
  115. package/assets/esri/core/workers/chunks/f13c4b9692dad5802a32.js +0 -1106
  116. package/assets/esri/core/workers/chunks/f1e8f7d1a98b9e207b1b.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9944],{98472:(t,n,e)=>{e.d(n,{A:()=>c,B:()=>M,C:()=>O,D:()=>S,G:()=>f,a:()=>p,b:()=>v,c:()=>o,e:()=>V,f:()=>l,g:()=>u,h:()=>A,i:()=>g,j:()=>y,k:()=>B,l:()=>a,m:()=>q,n:()=>b,o:()=>w,p:()=>k,q:()=>x,r:()=>I,s:()=>s,t:()=>U,u:()=>h,v:()=>Y,w:()=>T,x:()=>d,y:()=>E,z:()=>m});var r=e(62484),i=e(47364);function a(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function s(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function u(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function l(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function c(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function f(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function h(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function m(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function d(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function M(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function g(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function x(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function k(t,n){const e=n[0]-t[0],r=n[1]-t[1],i=n[2]-t[2];return Math.sqrt(e*e+r*r+i*i)}function p(t,n){const e=n[0]-t[0],r=n[1]-t[1],i=n[2]-t[2];return e*e+r*r+i*i}function w(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function b(t,n){const e=n[0],r=n[1],i=n[2];let a=e*e+r*r+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a),t}function y(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function v(t,n,e){const r=n[0],i=n[1],a=n[2],o=e[0],s=e[1],u=e[2];return t[0]=i*u-a*s,t[1]=a*o-r*u,t[2]=r*s-i*o,t}function B(t,n,e,r){const i=n[0],a=n[1],o=n[2];return t[0]=i+r*(e[0]-i),t[1]=a+r*(e[1]-a),t[2]=o+r*(e[2]-o),t}function V(t,n,e){const r=n[0],i=n[1],a=n[2];return t[0]=e[0]*r+e[4]*i+e[8]*a+e[12],t[1]=e[1]*r+e[5]*i+e[9]*a+e[13],t[2]=e[2]*r+e[6]*i+e[10]*a+e[14],t}function U(t,n,e){const r=n[0],i=n[1],a=n[2];return t[0]=r*e[0]+i*e[3]+a*e[6],t[1]=r*e[1]+i*e[4]+a*e[7],t[2]=r*e[2]+i*e[5]+a*e[8],t}function I(t,n,e){const r=e[0],i=e[1],a=e[2],o=e[3],s=n[0],u=n[1],l=n[2],c=i*l-a*u,f=a*s-r*l,h=r*u-i*s,m=i*h-a*f,d=a*c-r*h,M=r*f-i*c,g=2*o;return t[0]=s+c*g+2*m,t[1]=u+f*g+2*d,t[2]=l+h*g+2*M,t}const D=(0,r.Su)(),P=(0,r.Su)();function A(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function S(t,n,e){const r=e[0]-n[0],i=e[1]-n[1],a=e[2]-n[2];let o=r*r+i*i+a*a;return o>0?(o=1/Math.sqrt(o),t[0]=r*o,t[1]=i*o,t[2]=a*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const E=l,_=c,F=f,q=k,Y=p,O=a,T=w;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:u,angle:function(t,n){b(D,t),b(P,n);const e=y(D,P);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,i,a){const o=1-a,s=o*o,u=a*a,l=s*o,c=3*a*s,f=3*u*o,h=u*a;return t[0]=n[0]*l+e[0]*c+r[0]*f+i[0]*h,t[1]=n[1]*l+e[1]*c+r[1]*f+i[1]*h,t[2]=n[2]*l+e[2]*c+r[2]*f+i[2]*h,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},copy:o,cross:v,direction:S,dist:q,distance:k,div:F,divide:f,dot:y,equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],a=t[2],o=n[0],s=n[1],u=n[2],l=(0,i.Au)();return Math.abs(e-o)<=l*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(r-s)<=l*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-u)<=l*Math.max(1,Math.abs(a),Math.abs(u))},exactEquals:A,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,i,a){const o=a*a,s=o*(2*a-3)+1,u=o*(a-2)+a,l=o*(a-1),c=o*(3-2*a);return t[0]=n[0]*s+e[0]*u+r[0]*l+i[0]*c,t[1]=n[1]*s+e[1]*u+r[1]*l+i[1]*c,t[2]=n[2]*s+e[2]*u+r[2]*l+i[2]*c,t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t},len:O,length:a,lerp:B,max:M,min:d,mul:_,multiply:c,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t},normalize:b,random:function(t,n){n=n||1;const e=i.QR,r=2*e()*Math.PI,a=2*e()-1,o=Math.sqrt(1-a*a)*n;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=a*n,t},rotateX:function(t,n,e,r){const i=[],a=[];return i[0]=n[0]-e[0],i[1]=n[1]-e[1],i[2]=n[2]-e[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},rotateY:function(t,n,e,r){const i=[],a=[];return i[0]=n[0]-e[0],i[1]=n[1]-e[1],i[2]=n[2]-e[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},rotateZ:function(t,n,e,r){const i=[],a=[];return i[0]=n[0]-e[0],i[1]=n[1]-e[1],i[2]=n[2]-e[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:g,scaleAndAdd:x,set:s,sign:m,sqrDist:Y,sqrLen:T,squaredDistance:p,squaredLength:w,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:E,subtract:l,transformMat3:U,transformMat4:V,transformQuat:I},Symbol.toStringTag,{value:"Module"}))},62484:(t,n,e)=>{function r(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function a(t,n,e){return[t,n,e]}function o(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function s(){return a(1,1,1)}function u(){return a(1,0,0)}function l(){return a(0,1,0)}function c(){return a(0,0,1)}e.d(n,{IR:()=>d,Qw:()=>h,Su:()=>r,UV:()=>m,WK:()=>a,cX:()=>f,ct:()=>i,eu:()=>o,wx:()=>M});const f=[0,0,0],h=s(),m=u(),d=l(),M=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:m,UNIT_Y:d,UNIT_Z:M,ZEROS:f,clone:i,create:r,createView:function(t,n){return new Float64Array(t,n,3)},fromArray:o,fromValues:a,ones:s,unitX:u,unitY:l,unitZ:c,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},47364:(t,n,e)=>{e.d(n,{Af:()=>u,Au:()=>i,QR:()=>a,Yf:()=>l});let r=1e-6;function i(){return r}const a=Math.random,o=Math.PI/180,s=180/Math.PI;function u(t){return t*o}function l(t){return t*s}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:a,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:i,setEpsilon:function(t){r=t},toDegree:l,toRadian:u},Symbol.toStringTag,{value:"Module"}))},53648:(t,n,e)=>{e.d(n,{Cq:()=>s,EF:()=>l,Iv:()=>k,SE:()=>w,UB:()=>c,Uj:()=>f,aU:()=>u,gJ:()=>g,gP:()=>m,ig:()=>p,qk:()=>o,sj:()=>h,w7:()=>a});var r=e(98472);const i=new Float32Array(1);function a(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function o(t,n,e){return Math.min(Math.max(t,n),e)}function s(t,n,e){return t+(n-t)*e}function u(t,n,e,r,i){return s(r,i,(t-n)/(e-n))}function l(t){return t*Math.PI/180}function c(t){return 180*t/Math.PI}function f(t){return Math.acos(o(t,-1,1))}function h(t){return Math.asin(o(t,-1,1))}function m(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}const d=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));const M=BigInt("1000000");function g(t){return x(Math.max(-w,Math.min(t,w)))}function x(t){return i[0]=t,i[0]}function k(t,n){const e=(0,r.l)(t),i=h(t[2]/e),a=Math.atan2(t[1]/e,t[0]/e);return(0,r.s)(n,e,i,a),n}function p(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(m(n,1)&&m(e,1)&&m(r,1))}!function(t){const n=function(t){return d.setFloat64(0,t),d.getBigInt64(0)}(t=Math.abs(t)),e=function(t){return d.setBigInt64(0,t),d.getFloat64(0)}(n<=M?M:n-M);Math.abs(t-e)}(1);const w=x(34028234663852886e22)},69944:(t,n,e)=>{e.r(n),e.d(n,{default:()=>h});var r=e(53648),i={};i.defaultNoDataValue=(0,r.gJ)(-1/0),i.decode=function(t,n){var e=(n=n||{}).encodedMaskData||null===n.encodedMaskData,l=u(t,n.inputOffset||0,e),c=null!=n.noDataValue?(0,r.gJ)(n.noDataValue):i.defaultNoDataValue,f=a(l,n.pixelType||Float32Array,n.encodedMaskData,c,n.returnMask),h={width:l.width,height:l.height,pixelData:f.resultPixels,minValue:l.pixels.minValue,maxValue:l.pixels.maxValue,noDataValue:c};return f.resultMask&&(h.maskData=f.resultMask),n.returnEncodedMask&&l.mask&&(h.encodedMaskData=l.mask.bitset?l.mask.bitset:null),n.returnFileInfo&&(h.fileInfo=o(l,c),n.computeUsedBitDepths&&(h.fileInfo.bitDepths=s(l))),h};var a=function(t,n,e,r,i){var a,o,s=0,u=t.pixels.numBlocksX,c=t.pixels.numBlocksY,f=Math.floor(t.width/u),h=Math.floor(t.height/c),m=2*t.maxZError;e=e||(t.mask?t.mask.bitset:null),a=new n(t.width*t.height),i&&e&&(o=new Uint8Array(t.width*t.height));for(var d,M,g=new Float32Array(f*h),x=0;x<=c;x++){var k=x!==c?h:t.height%c;if(0!==k)for(var p=0;p<=u;p++){var w=p!==u?f:t.width%u;if(0!==w){var b,y,v,B,V=x*t.width*h+p*f,U=t.width-w,I=t.pixels.blocks[s];if(I.encoding<2?(0===I.encoding?b=I.rawData:(l(I.stuffedData,I.bitsPerPixel,I.numValidPixels,I.offset,m,g,t.pixels.maxValue),b=g),y=0):v=2===I.encoding?0:I.offset,e)for(M=0;M<k;M++){for(7&V&&(B=e[V>>3],B<<=7&V),d=0;d<w;d++)7&V||(B=e[V>>3]),128&B?(o&&(o[V]=1),a[V++]=I.encoding<2?b[y++]:v):(o&&(o[V]=0),a[V++]=r),B<<=1;V+=U}else if(I.encoding<2)for(M=0;M<k;M++){for(d=0;d<w;d++)a[V++]=b[y++];V+=U}else for(M=0;M<k;M++)if(a.fill)a.fill(v,V,V+w),V+=w+U;else{for(d=0;d<w;d++)a[V++]=v;V+=U}if(1===I.encoding&&y!==I.numValidPixels)throw"Block and Mask do not match";s++}}}return{resultPixels:a,resultMask:o}},o=function(t,n){return{fileIdentifierString:t.fileIdentifierString,fileVersion:t.fileVersion,imageType:t.imageType,height:t.height,width:t.width,maxZError:t.maxZError,eofOffset:t.eofOffset,mask:t.mask?{numBlocksX:t.mask.numBlocksX,numBlocksY:t.mask.numBlocksY,numBytes:t.mask.numBytes,maxValue:t.mask.maxValue}:null,pixels:{numBlocksX:t.pixels.numBlocksX,numBlocksY:t.pixels.numBlocksY,numBytes:t.pixels.numBytes,maxValue:t.pixels.maxValue,minValue:t.pixels.minValue,noDataValue:n}}},s=function(t){for(var n=t.pixels.numBlocksX*t.pixels.numBlocksY,e={},r=0;r<n;r++){var i=t.pixels.blocks[r];0===i.encoding?e.float32=!0:1===i.encoding?e[i.bitsPerPixel]=!0:e[0]=!0}return Object.keys(e)},u=function(t,n,e){var r={},i=new Uint8Array(t,n,10);if(r.fileIdentifierString=String.fromCharCode.apply(null,i),"CntZImage"!=r.fileIdentifierString.trim())throw"Unexpected file identifier string: "+r.fileIdentifierString;n+=10;var a=new DataView(t,n,24);if(r.fileVersion=a.getInt32(0,!0),r.imageType=a.getInt32(4,!0),r.height=a.getUint32(8,!0),r.width=a.getUint32(12,!0),r.maxZError=a.getFloat64(16,!0),n+=24,!e)if(a=new DataView(t,n,16),r.mask={},r.mask.numBlocksY=a.getUint32(0,!0),r.mask.numBlocksX=a.getUint32(4,!0),r.mask.numBytes=a.getUint32(8,!0),r.mask.maxValue=a.getFloat32(12,!0),n+=16,r.mask.numBytes>0){var o=new Uint8Array(Math.ceil(r.width*r.height/8)),s=(a=new DataView(t,n,r.mask.numBytes)).getInt16(0,!0),u=2,l=0;do{if(s>0)for(;s--;)o[l++]=a.getUint8(u++);else{var c=a.getUint8(u++);for(s=-s;s--;)o[l++]=c}s=a.getInt16(u,!0),u+=2}while(u<r.mask.numBytes);if(-32768!==s||l<o.length)throw"Unexpected end of mask RLE encoding";r.mask.bitset=o,n+=r.mask.numBytes}else 0==(r.mask.numBytes|r.mask.numBlocksY|r.mask.maxValue)&&(o=new Uint8Array(Math.ceil(r.width*r.height/8)),r.mask.bitset=o);a=new DataView(t,n,16),r.pixels={},r.pixels.numBlocksY=a.getUint32(0,!0),r.pixels.numBlocksX=a.getUint32(4,!0),r.pixels.numBytes=a.getUint32(8,!0),r.pixels.maxValue=a.getFloat32(12,!0),n+=16;var f=r.pixels.numBlocksX,h=r.pixels.numBlocksY,m=f+(r.width%f>0?1:0),d=h+(r.height%h>0?1:0);r.pixels.blocks=new Array(m*d);for(var M=1e9,g=0,x=0;x<d;x++)for(var k=0;k<m;k++){var p=0,w=t.byteLength-n;a=new DataView(t,n,Math.min(10,w));var b={};r.pixels.blocks[g++]=b;var y=a.getUint8(0);if(p++,b.encoding=63&y,b.encoding>3)throw"Invalid block encoding ("+b.encoding+")";if(2!==b.encoding){if(0!==y&&2!==y){if(y>>=6,b.offsetType=y,2===y)b.offset=a.getInt8(1),p++;else if(1===y)b.offset=a.getInt16(1,!0),p+=2;else{if(0!==y)throw"Invalid block offset type";b.offset=a.getFloat32(1,!0),p+=4}if(M=Math.min(b.offset,M),1===b.encoding)if(y=a.getUint8(p),p++,b.bitsPerPixel=63&y,y>>=6,b.numValidPixelsType=y,2===y)b.numValidPixels=a.getUint8(p),p++;else if(1===y)b.numValidPixels=a.getUint16(p,!0),p+=2;else{if(0!==y)throw"Invalid valid pixel count type";b.numValidPixels=a.getUint32(p,!0),p+=4}}var v;if(n+=p,3!=b.encoding)if(0===b.encoding){var B=(r.pixels.numBytes-1)/4;if(B!==Math.floor(B))throw"uncompressed block has invalid length";v=new ArrayBuffer(4*B),new Uint8Array(v).set(new Uint8Array(t,n,4*B));for(var V=new Float32Array(v),U=0;U<V.length;U++)M=Math.min(M,V[U]);b.rawData=V,n+=4*B}else if(1===b.encoding){var I=Math.ceil(b.numValidPixels*b.bitsPerPixel/8),D=Math.ceil(I/4);v=new ArrayBuffer(4*D),new Uint8Array(v).set(new Uint8Array(t,n,I)),b.stuffedData=new Uint32Array(v),n+=I}}else n++,M=Math.min(M,0)}return r.pixels.minValue=M,r.eofOffset=n,r},l=function(t,n,e,r,i,a,o){var s,u,l,c=(1<<n)-1,f=0,h=0,m=Math.ceil((o-r)/i),d=4*t.length-Math.ceil(n*e/8);for(t[t.length-1]<<=8*d,s=0;s<e;s++){if(0===h&&(l=t[f++],h=32),h>=n)u=l>>>h-n&c,h-=n;else{var M=n-h;u=(l&c)<<M&c,u+=(l=t[f++])>>>(h=32-M)}a[s]=u<m?r+u*i:o}return a};const c=i.decode;class f{_decode(t){const n=c(t.buffer,t.options);return Promise.resolve({result:n,transferList:[n.pixelData.buffer]})}}function h(){return new f}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5752,6147],{25228:(e,t,s)=>{s.d(t,{c:()=>f});var i,n=s(41948),r=s(40504),o=s(94360),a=s(1580),l=(s(9456),s(66360),s(72052),s(33600)),u=s(12552),h=s(18996),c=s(28484);let d=i=class extends r.am{static get allTime(){return p}static get empty(){return _}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,s=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&s===n}expandTo(e,t=c.OX){if(this.isEmpty||this.isAllTime)return this.clone();let s=this.start;s&&(s=(0,o.aU)(s,e,t));let n=this.end;if(n){const s=(0,o.aU)(n,e,t);n=n.getTime()===s.getTime()?s:(0,o.g1)(s,1,e,t)}return new i({start:s,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=s?o=n:t>=n&&t<=r&&(o=t),s>=n&&s<=r?a=s:r>=t&&r<=s&&(a=r),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,s=c.OX){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:r,end:a}=this;return null!=r&&(n.start=(0,o.g1)(r,e,t,s)),null!=a&&(n.end=(0,o.g1)(a,e,t,s)),n}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,n._)([(0,a.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,l.E)("end")],d.prototype,"readEnd",null),(0,n._)([(0,h.G)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,a.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,a.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,a.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,l.E)("start")],d.prototype,"readStart",null),(0,n._)([(0,h.G)("start")],d.prototype,"writeStart",null),d=i=(0,n._)([(0,u.c)("esri.TimeExtent")],d);const p=new d,_=new d({start:void 0,end:void 0}),f=d},8528:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},80424:(e,t,s)=>{var i;s.d(t,{M:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},3856:(e,t,s)=>{s.d(t,{m:()=>c,q:()=>h});var i=s(41948),n=s(43780),r=(s(9456),s(62088)),o=(s(66360),s(70680)),a=s(71448),l=s(20916),u=s(12552);const h=e=>{let t=class extends e{clone(){const e=(0,l.m6)(this);(0,o.EN)(e,"unable to clone instance of non-accessor class");const t=e.metadata,s=e.store,i={},n=new Map;for(const e in t){const o=t[e],l=s?.originOf(e),u=o.clonable;if(o.readOnly||!1===u||l!==a.sT.USER&&l!==a.sT.DEFAULTS&&l!==a.sT.WEB_MAP&&l!==a.sT.WEB_SCENE)continue;const h=this[e];let c=null;c="function"==typeof u?u(h):"reference"===u?h:(0,r.gx)(h),null!=h&&null==c||(l===a.sT.DEFAULTS?n.set(e,c):i[e]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,l.m6)(u)?.store;if(e)for(const[t,s]of n)e.set(t,s,a.sT.DEFAULTS)}return u}};return t=(0,i._)([(0,u.c)("esri.core.Clonable")],t),t};let c=class extends(h(n.c)){};c=(0,i._)([(0,u.c)("esri.core.Clonable")],c)},11004:(e,t,s)=>{s.d(t,{o:()=>n});var i=s(74452);class n{constructor(e,t){this._storage=new i.kB,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},74452:(e,t,s)=>{s.d(t,{ML:()=>o,kB:()=>a});var i,n,r=s(24680);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.c,this._users=new r.c}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},3024:(e,t,s)=>{s.d(t,{U:()=>o});var i=s(92400),n=s(24680),r=s(85304);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),v.prune(),w.prune(),E.prune(),x.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(m(e,s))for(v.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;m(e,o)&&(s.leaf?t(r):g(e,o)?this._all(r,t):v.push(r))}s=v.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!m(e,t))return!1;for(v.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(m(e,r)){if(t.leaf||g(e,r))return!0;v.push(n)}}t=v.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(E.clear(),x.clear();s||E.length>0;){if(s||(s=E.pop(),n=E.data[E.length-1],r=x.pop()??0,o=!0),s.leaf&&(t=(0,i.IP)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),E.push(s),this._condense(E),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(E.push(s),x.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(w.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else w.pushArray(s.children);s=w.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new I(e.slice(t,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new T([]);o.height=i;const l=Math.ceil(n/r),u=l*Math.ceil(Math.sqrt(r));y(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);y(e,n,t,l,this._compareMinY);for(let s=n;s<=t;s+=l){const n=Math.min(s+l-1,t);o.children.push(this._build(e,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=d(o),l=_(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);E.clear();const r=this._chooseSubtree(n,this._data,t,E);for(r.children.push(e),u(r,n);t>=0&&E.data[t].children.length>this._maxEntries;)this._split(E,t),t--;this._adjustParentBBoxes(n,E,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),l=s.leaf?new I(o):new T(o);l.height=s.height,a(s,this._toBBox),a(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(s,l)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=l(e,0,o,this._toBBox),a=l(e,o,s,this._toBBox),u=f(t,a),h=d(t)+d(a);u<i?(i=u,r=o,n=h<n?h:n):u===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:h,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=l(e,0,t,n),o=l(e,s-t,s,n);let a=p(r)+p(o);for(let i=t;i<s-t;i++){const t=e.children[i];u(r,e.leaf?n(t):t),a+=p(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?n(t):t),a+=p(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)u(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.IP)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,s,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],u(n,e.leaf?i(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function _(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function m(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function y(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const v=new n.c,w=new n.c,E=new n.c,x=new n.c({deallocator:void 0});class b{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends b{constructor(){super(...arguments),this.height=1,this.indexHint=new i.is}}class I extends S{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends S{constructor(e){super(),this.children=e,this.leaf=!1}}},57896:(e,t,s)=>{s.d(t,{Eq:()=>d,KG:()=>m,_8:()=>g,_I:()=>u,aE:()=>l,du:()=>f,on:()=>c}),s(40196),s(2952);var i=s(60976),n=s(38912),r=s(70680),o=s(10860),a=s(37176);function l(e,t,s={}){return h(e,t,s,p)}function u(e,t,s={}){return h(e,t,s,_)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.oR)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.M9)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.oR)(h),s(e)}const p=l(e,((e,s)=>{c(),(0,i.sh)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.uU)((()=>{p.remove(),c()})),h}function d(e,t){return function(e,t,s){if((0,o.wv)(s))return Promise.reject((0,o.Uh)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.oR)(a)}return new Promise(((i,r)=>{a=(0,n.Ip)([(0,o.wD)(s,(()=>{l(),r((0,o.Uh)())})),h(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,_,t)}function p(e){return!0}function _(e){return!!e}s(41168);const f={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},60936:(e,t,s)=>{s.d(t,{A:()=>h});var i=s(41948),n=s(43780),r=s(38912),o=s(57896),a=s(66168),l=s(1580),u=s(12552);let h=class extends n.c{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,s={}){return this._installWatch(e,t,s,o.aE)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o._I)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const n=++this._handleId;return this.addHandles([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.du),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],n),(0,r.uU)((()=>this.removeHandles(n)))}addPromise(e){if(null==e)return e;const t=++this._handleId;this.addHandles((0,r.uU)((()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this.hasHandles(c)||this._set("updating",!1))})),t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this.removeHandles(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,s={},i){const n=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,n);const o=i(e,t,s);return this.addHandles(o,n),(0,r.uU)((()=>this.removeHandles(n)))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.aE)(e,s,{sync:!0,equals:()=>!1});return this.addHandles(i,t),i}_createSyncUpdatingCallback(){return()=>{this.removeHandles(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles((0,a.Ow)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(c))})),c)}}};(0,i._)([(0,l.qq)({readOnly:!0})],h.prototype,"updating",void 0),h=(0,i._)([(0,u.c)("esri.core.support.UpdatingHandles")],h);const c=-42},6904:(e,t,s)=>{s.d(t,{c:()=>a});var i=s(9456),n=s(3024),r=s(83372);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.U(9,(0,i.c)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.FZ)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},9107:(e,t,s)=>{s.d(t,{c:()=>_});var i=s(92400),n=s(20744),r=s(77860),o=s(66360),a=s(77048),l=s(83372),u=s(97088),h=s(6904),c=s(83624),d=s(51752);const p=(0,a.Su)();class _{constructor(e){this.geometryInfo=e,this._boundsStore=new h.c,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.c,this.featureAdapter=d.u}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.C6)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.G6)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Qv)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.C_)(null!=i?i:(0,l.Su)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.C_)((0,l.Su)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},600:(e,t,s)=>{s.d(t,{c:()=>g});var i,n=s(41948),r=s(14628),o=s(40504),a=s(1580),l=s(53368),u=(s(72052),s(9456),s(9968)),h=s(33600),c=s(12552),d=s(89812),p=s(36408);const _=new r.O({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=i=class extends o.am{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?_.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.qq)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,n._)([(0,a.qq)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,n._)([(0,a.qq)()],f.prototype,"description",void 0),(0,n._)([(0,h.E)("description")],f.prototype,"readDescription",null),(0,n._)([(0,a.qq)({types:d.i2,json:{read:{reader:d.h4},write:!0}})],f.prototype,"domain",void 0),(0,n._)([(0,a.qq)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,n._)([(0,a.qq)({type:l.Ab,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,n._)([(0,a.qq)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.qq)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,n._)([(0,u.G)(p.M)],f.prototype,"type",void 0),(0,n._)([(0,a.qq)()],f.prototype,"valueType",void 0),(0,n._)([(0,h.E)("valueType",["description"])],f.prototype,"readValueType",null),(0,n._)([(0,a.qq)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,n._)([(0,c.c)("esri.layers.support.Field")],f);const g=f},22108:(e,t,s)=>{s.d(t,{c:()=>h});var i,n=s(41948),r=s(40504),o=s(1580),a=s(53368),l=(s(72052),s(9456),s(12552));let u=i=class extends r.am{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n._)([(0,o.qq)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,n._)([(0,o.qq)({type:a.Ab,json:{write:!0}})],u.prototype,"level",void 0),(0,n._)([(0,o.qq)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,n._)([(0,o.qq)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,n._)([(0,o.qq)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,n._)([(0,o.qq)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,n._)([(0,o.qq)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=i=(0,n._)([(0,l.c)("esri.layers.support.LOD")],u);const h=u},87576:(e,t,s)=>{s.d(t,{c:()=>S});var i,n=s(41948),r=s(14628),o=s(40504),a=s(24296),l=s(1580),u=s(53368),h=(s(72052),s(9456),s(33600)),c=s(12552),d=s(18996),p=s(67776),_=s(56156),f=s(83372),g=s(60544),m=s(29120),y=s(22108),v=s(11712);const w=new r.O({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let E=i=class extends o.am{static create(e={}){const{resolutionFactor:t=1,scales:s,size:n=256,spatialReference:r=_.c.WebMercator,numLODs:o=24}=e;if(!(0,g.U3)(r)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new y.c({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new y.c({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.c(0,0,r),size:[n,n],spatialReference:r})}const l=(0,g.Nq)(r),u=e.origin?new p.c({x:e.origin.x,y:e.origin.y,spatialReference:r}):new p.c(l?{x:l.origin[0],y:l.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),h=1/(39.37*(0,a.k8)(r)*96),c=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*h;c.push(new y.c({level:e,scale:t,resolution:i}))}else{let e=(0,g.Eb)(r)?512/n*591657527.5917094:256/n*591657527.591555;const s=Math.ceil(o/t);c.push(new y.c({level:0,scale:e,resolution:e*h}));for(let i=1;i<s;i++){const s=e/2**t,n=s*h;c.push(new y.c({level:i,scale:s,resolution:n})),e=s}}return new i({dpi:96,lods:c,origin:u,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,g.Nq)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.c.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],n=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,n[e.level]=e}))),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],n=t[i+1];if(s<=e)return i;if(n===e)return i+1;if(s>e&&n<e)return i+Math.log(s/e)/Math.log(s/n)}return i}snapScale(e,t=.95){const s=this.scaleToZoom(e);return s%Math.floor(s)>=t?this.zoomToScale(Math.ceil(s)):this.zoomToScale(Math.floor(s))}tileAt(e,t,s,i){const n=this.lodAt(e);if(!n)return null;let r,o;if("number"==typeof t)r=t,o=s;else if((0,g.yK)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,i=s;else{const e=(0,m.yU)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,i=s}const a=n.resolution*this.size[0],l=n.resolution*this.size[1];return i||(i=new v.g(null,0,0,0,(0,f.Su)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((r-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const n=e.level-s.level,r=s.resolution*this.size[0]/2**n,o=s.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,f.Su)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,n=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const s=[],n=this.lods.length;for(let e=0;e<n;e++){const i=this.lods[e],n=i.resolution*t;s.push(new y.c({level:i.level,scale:i.scale,resolution:n}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var x,b;(0,n._)([(0,l.qq)({type:Number,json:{write:!0}})],E.prototype,"compressionQuality",void 0),(0,n._)([(0,l.qq)({type:Number,json:{write:!0}})],E.prototype,"dpi",void 0),(0,n._)([(0,l.qq)({type:String,json:{read:w.read,write:w.write,origins:{"web-scene":{read:!1,write:!1}}}})],E.prototype,"format",void 0),(0,n._)([(0,l.qq)({readOnly:!0})],E.prototype,"isWrappable",null),(0,n._)([(0,l.qq)({type:p.c,json:{write:!0}})],E.prototype,"origin",void 0),(0,n._)([(0,h.E)("origin")],E.prototype,"readOrigin",null),(0,n._)([(0,l.qq)({type:[y.c],value:null,json:{write:!0}})],E.prototype,"lods",null),(0,n._)([(0,l.qq)({readOnly:!0})],E.prototype,"scales",void 0),(0,n._)([(0,l.qq)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],E.prototype,"size",void 0),(0,n._)([(0,h.E)("size",["rows","cols"])],E.prototype,"readSize",null),(0,n._)([(0,d.G)("size",{cols:{type:u.Ab},rows:{type:u.Ab}})],E.prototype,"writeSize",null),(0,n._)([(0,l.qq)({type:_.c,json:{write:!0}})],E.prototype,"spatialReference",void 0),E=i=(0,n._)([(0,c.c)("esri.layers.support.TileInfo")],E),x=E||(E={}),(b=x.ExtrapolateOptions||(x.ExtrapolateOptions={}))[b.NONE=0]="NONE",b[b.POWER_OF_TWO=1]="POWER_OF_TWO";const S=E},11712:(e,t,s)=>{s.d(t,{g:()=>i});class i{constructor(e,t,s,i,n=void 0){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=n}}},48212:(e,t,s)=>{s.d(t,{Ab:()=>v,Ej:()=>d,K0:()=>c,M9:()=>p,Wq:()=>f,YB:()=>h,_2:()=>m,oR:()=>g,q_:()=>_,wn:()=>y});var i=s(28176),n=s(91952);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function h(e){return!!a.test(e)}function c(e){if(null==e)return null;const t=(0,i.as)(e),s=t?.path.match(a)||t?.path.match(l);if(!s)return null;const[,n,o,u,h]=s,c=o.indexOf("/");return{title:p(-1!==c?o.slice(c+1):o),serverType:r[u.toLowerCase()],sublayer:null!=h&&""!==h?parseInt(h,10):null,url:{path:n}}}function d(e){const t=(0,i.as)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function p(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function _(e,t){const s=[];if(e){const t=c(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=p(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function f(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),s=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&s}function g(e,t){return e?(0,i.ai)((0,i.kN)(e,t)):e}function m(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.kN)(t,e.logger);const s=(0,i.as)(t),n=c(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=d(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.ai)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.kn)(r.url,s,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},89812:(e,t,s)=>{s.d(t,{h4:()=>S,i2:()=>b}),s(9456);var i,n=s(41948),r=s(62088),o=s(1580),a=(s(66360),s(9968)),l=s(12552),u=s(40504);s(72052);let h=i=class extends u.am{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.qq)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,n._)([(0,o.qq)({type:[String,Number],json:{write:!0}})],h.prototype,"code",void 0),h=i=(0,n._)([(0,l.c)("esri.layers.support.CodedValue")],h);const c=new(s(14628).O)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.am{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.qq)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,a.G)(c)],d.prototype,"type",void 0),d=(0,n._)([(0,l.c)("esri.layers.support.Domain")],d);const p=d;var _;let f=_=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some((e=>(String(e.code)===s&&(t=e.name),!!t)))}return t}clone(){return new _({codedValues:(0,r.ct)(this.codedValues),name:this.name})}};(0,n._)([(0,o.qq)({type:[h],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,n._)([(0,a.G)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=_=(0,n._)([(0,l.c)("esri.layers.support.CodedValueDomain")],f);const g=f;var m;s(20744);let y=m=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,n._)([(0,a.G)({inherited:"inherited"})],y.prototype,"type",void 0),y=m=(0,n._)([(0,l.c)("esri.layers.support.InheritedDomain")],y);const v=y;var w;let E=w=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,o.qq)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]}}}})],E.prototype,"maxValue",void 0),(0,n._)([(0,o.qq)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]}}}})],E.prototype,"minValue",void 0),(0,n._)([(0,a.G)({range:"range"})],E.prototype,"type",void 0),E=w=(0,n._)([(0,l.c)("esri.layers.support.RangeDomain")],E);const x=E,b={key:"type",base:p,typeMap:{range:E,"coded-value":g,inherited:v}};function S(e){if(!e?.type)return null;switch(e.type){case"range":return x.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},12780:(e,t,s)=>{s.d(t,{s:()=>r});var i=s(24296),n=s(67932);const r={unknown:1,inches:(0,i.ck)(1,"meters","inches"),feet:(0,i.ck)(1,"meters","feet"),"us-feet":(0,i.ck)(1,"meters","us-feet"),yards:(0,i.ck)(1,"meters","yards"),miles:(0,i.ck)(1,"meters","miles"),"nautical-miles":(0,i.ck)(1,"meters","nautical-miles"),millimeters:(0,i.ck)(1,"meters","millimeters"),centimeters:(0,i.ck)(1,"meters","centimeters"),decimeters:(0,i.ck)(1,"meters","decimeters"),meters:(0,i.ck)(1,"meters","meters"),kilometers:(0,i.ck)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.M9)(1,"meters",n.ug.radius)}},21012:(e,t,s)=>{s.d(t,{M:()=>n});var i=s(37924);function n(e,t,s){if(!s?.features||!s.hasZ)return;const n=(0,i.O)(s.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of s.features)n(e.geometry)}},27136:(e,t,s)=>{s.d(t,{c:()=>w});var i,n=s(41948),r=s(14628),o=s(40504),a=s(70680),l=s(1580),u=(s(9456),s(66360),s(72052),s(33600)),h=s(12552),c=s(18996),d=s(564);let p=i=class extends o.am{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,d.AN)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,l.qq)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,n._)([(0,l.qq)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,n._)([(0,h.c)("esri.layers.support.FeatureExpressionInfo")],p);const _=p;var f,g=s(35764);const m=(0,r.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new r.O({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=f=class extends o.am{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a.O4)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,l.qq)({type:_,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,u.E)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,c.G)("featureExpressionInfo",{featureExpressionInfo:{type:_},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,l.qq)({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],v.prototype,"mode",null),(0,n._)([(0,l.qq)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,n._)([(0,l.qq)({type:g.eA,json:{type:String,read:y.read,write:y.write}})],v.prototype,"unit",null),v=f=(0,n._)([(0,h.c)("esri.layers.support.ElevationInfo")],v);const w=v},35764:(e,t,s)=>{s.d(t,{QV:()=>n,eA:()=>r});var i=s(12780);function n(e){return 1/(i.s[e]||1)}const r=function(){const e=Object.keys(i.s);return e.sort(),e}()},25476:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Ee});var i=s(41948),n=(s(60708),s(77860)),r=s(10860),o=s(57896),a=s(1580),l=(s(9456),s(66360)),u=(s(72052),s(12552)),h=s(60936),c=s(56156),d=s(9107),p=s(47302),_=s(87576),f=s(95776),g=s(27136),m=s(11004),y=s(86916),v=s(24296),w=s(35764);function E(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new b(e,s)}return new x}class x{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class b{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new m.o(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(this._alignAbsoluteElevationCandidates(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}_alignAbsoluteElevationCandidates(e,t,s){const{offset:i,unit:n}=s;if(null==i)return;const r=(0,v.gl)(t),o=i*((0,w.QV)(n??"meters")/r);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,y.wJ)(i,t.objectId,T).push(t);const[n,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(n,s);if((0,r.wp)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(n,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,c=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||c.push(t)}return c}_prepareQuery(e,t){const s=[],i=[];for(const[t,n]of e){const e=[];for(const s of n)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const n=I(e,t),r=this._alignmentsCache.get(n);null==r?s.push(t):i.push(new S(t,r))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},n){for(const e of n)e.apply();let r=0;const o=this._alignmentsCache;for(const{objectId:n,points:a}of e.pointsInFeatures){if(i.has(n)){r+=a.length;continue}const e=!s.has(n);for(const s of a){const i=I(n,s),a=t[r++];s.z=a,e&&o.put(i,a,1)}}}}class S{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function I(e,{x:t,y:s,z:i,spatialReference:n}){return`${e}-${t}-${s}-${i??0}}-wkid:${n?.wkid}`}function T(){return[]}class F{filter(e,t){return t}notifyElevationSourceChange(){}}class C{filter(e,t){const{point:s,distance:i}=e,{z:n}=s;if(null==n)return t;if(0===t.length)return t;const r=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,r).filter(q);return o.sort(R),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":z(i,t,s);continue;case"vertex":A(i,t,s);continue}return e}}function q(e){return e.distance<=1}function O(e=!1){return e?new C:new F}function z(e,t,{x:s,y:i,z:n}){const{start:r,end:o,target:a}=e;e.draped||function(e,t,s,i){const n=i.x-s.x,r=i.y-s.y,o=i.z-s.z,a=n*n+r*r+o*o,l=(t.x-s.x)*n+(t.y-s.y)*r+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),h=s.x+n*u,c=s.y+r*u,d=s.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,r,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,h=(t.z-a.z)/n;e.distance=Math.sqrt(l*l+u*u+h*h)}function A(e,t,{x:s,y:i,z:n}){const{target:r}=e,o=(t.x-r.x)/s,a=(t.y-r.y)/i,l=(t.z-r.z)/n,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function R(e,t){return e.distance-t.distance}var M=s(62088),B=s(88264);function N(e=!1,t){return e?new j(t):new P}class P{async fetch(){return[]}notifySymbologyChange(){}}class j{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new m.o(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],n=this._candidatesCache;for(const t of e){const e=H(t),r=n.get(e);if(r)for(const e of r)i.push((0,M.ct)(e));else s.push(t),n.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,r.wp)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],i=H(s[l[e]]),r=n.get(i);r.push(t),n.put(i,r,r.length),u.push((0,M.ct)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function H(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,B.sV)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,n=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,B.sV)(n).toString()}default:return""}}var D=s(43780),k=s(92400);let U=class extends D.c{constructor(){super(...arguments),this.updating=!1,this._pending=[]}push(e,t){this._pending.push({promise:e,callback:t}),1===this._pending.length&&this._process()}_process(){if(!this._pending.length)return void(this.updating=!1);this.updating=!0;const e=this._pending[0];e.promise.then((t=>e.callback(t))).catch((()=>{})).then((()=>{this._pending.shift(),this._process()}))}};(0,i._)([(0,a.qq)()],U.prototype,"updating",void 0),U=(0,i._)([(0,u.c)("esri.core.AsyncSequence")],U);var L,V=s(40196),Y=s(38912),X=s(33456),G=s(95247),W=s(83372),J=s(97088),$=s(48212),Q=s(87280),Z=s(32848);class K{constructor(e,t){this.data=e,this.resolution=t,this.state={type:L.CREATED},this.alive=!0}process(e){switch(this.state.type){case L.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case L.FETCH_COUNT:break;case L.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case L.FETCH_FEATURES:break;case L.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case L.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case L.CREATED:case L.FETCH_COUNT:return 0;case L.FETCHED_COUNT:return this.state.featureCount;case L.FETCH_FEATURES:return this.state.previous.featureCount;case L.FETCHED_FEATURES:return this.state.features.length;case L.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case L.CREATED:return"created";case L.FETCH_COUNT:return"fetch-count";case L.FETCHED_COUNT:return"fetched-count";case L.FETCH_FEATURES:return"fetch-features";case L.FETCHED_FEATURES:return"fetched-features";case L.DONE:return"done"}}_gotoFetchCount(e,t){return{type:L.FETCH_COUNT,previous:e,task:(0,V.kn)((async e=>{const s=await(0,V.SO)(t.fetchCount(this,e));this.state.type===L.FETCH_COUNT&&(this.state=this._gotoFetchedCount(this.state,s.ok?s.value:1/0))}))}}_gotoFetchedCount(e,t){return{type:L.FETCHED_COUNT,featureCount:t,previous:e}}_gotoFetchFeatures(e,t){return{type:L.FETCH_FEATURES,previous:e,task:(0,V.kn)((async s=>{const i=await(0,V.SO)(t.fetchFeatures(this,e.featureCount,s));this.state.type===L.FETCH_FEATURES&&(this.state=this._gotoFetchedFeatures(this.state,i.ok?i.value:[]))}))}}_gotoFetchedFeatures(e,t){return{type:L.FETCHED_FEATURES,previous:e,features:t}}_goToDone(e,t){return t.finish(this,e.features),{type:L.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:L.CREATED},e.type){case L.CREATED:case L.FETCHED_COUNT:case L.FETCHED_FEATURES:case L.DONE:break;case L.FETCH_COUNT:case L.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,W.ER)(e,ee),(0,W.K0)(this.data.extent,ee))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(L||(L={}));const ee=(0,W.Su)();let te=class extends D.c{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,X.SQ)(e,this._mandatoryOutFields);(0,X.yK)(s,t)||(this._set("outFields",s),(0,X.Cs)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingExcludingEdits||this._pendingEdits.updating}get updatingExcludingEdits(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new h.A,this._pendingEdits=new U,this._pendingEditsAbortController=new AbortController}initialize(){this._initializeFetchExtent(),this._updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this._updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,k.yK)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),o.du),this.addHandles((0,o._I)((()=>!this.suspended),(()=>this._process())))}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._pendingEditsAbortController.abort(),this._pendingEditsAbortController=null,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this._pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,e]of this._pendingTiles)e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this._updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this._pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,$.Wq)(this.url))return;const e=(0,V.kn)((async e=>{try{const t=await(0,Z.A7)(this.url,new f.c({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=G.c.fromJSON(t.data?.extent)}catch(e){(0,r.CE)(e),l.c.getLogger(this).warn("Failed to fetch data extent",e)}}));this._updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.addHandles((0,Y.uU)((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this._pendingTiles)e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const[,e]of this._pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this._pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<ne}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(re/(s*s))<oe}_ensureFetchAllCounts(e){let t=!0;for(const[,s]of this._pendingTiles)s.state.type<L.FETCHED_COUNT&&this._updatingHandles.addPromise(s.process(e)),s.state.type<=L.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new K(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ie,signal:t})}async _fetchFeatures(e,t,s){let i=0;const n=[];let r=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,s);l&&(i+=a.num),r+=u.length;for(const e of u)n.push(e);if(o=t-r,!l||!h||o<=0)return n}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;if(this.store.featureStore.forEach((n=>{e===n.attributes[t]&&(i=n.objectId??n.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,Z.aA)(this.url,e,new Q.g({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,J.w3)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,Z.EL)(this.url,e,s,{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,J.ui)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.data?this.store.getAttributesForTile(e?.data?.id):null,i=(0,X.SQ)((0,X.o1)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new f.c({returnZ:this.hasZ,returnM:!1,geometry:null!=this.tileInfo&&null!=e?(0,W.WU)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:n,tileMaxRecordCount:r,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?f.c.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||n)&&r?r:o||se);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i._)([(0,a.qq)({constructOnly:!0})],te.prototype,"url",void 0),(0,i._)([(0,a.qq)({constructOnly:!0})],te.prototype,"objectIdField",void 0),(0,i._)([(0,a.qq)({constructOnly:!0})],te.prototype,"globalIdField",void 0),(0,i._)([(0,a.qq)({constructOnly:!0})],te.prototype,"capabilities",void 0),(0,i._)([(0,a.qq)({constructOnly:!0})],te.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,a.qq)({constructOnly:!0})],te.prototype,"spatialReference",void 0),(0,i._)([(0,a.qq)({constructOnly:!0})],te.prototype,"store",void 0),(0,i._)([(0,a.qq)({readOnly:!0})],te.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,a.qq)()],te.prototype,"_mandatoryOutFields",null),(0,i._)([(0,a.qq)()],te.prototype,"outFields",null),(0,i._)([(0,a.qq)()],te.prototype,"suspended",void 0),(0,i._)([(0,a.qq)()],te.prototype,"filter",null),(0,i._)([(0,a.qq)()],te.prototype,"customParameters",null),(0,i._)([(0,a.qq)({readOnly:!0})],te.prototype,"_configuration",null),(0,i._)([(0,a.qq)()],te.prototype,"tileInfo",null),(0,i._)([(0,a.qq)()],te.prototype,"tileSize",null),(0,i._)([(0,a.qq)()],te.prototype,"tilesOfInterest",void 0),(0,i._)([(0,a.qq)({readOnly:!0})],te.prototype,"updating",null),(0,i._)([(0,a.qq)({readOnly:!0})],te.prototype,"updatingExcludingEdits",null),(0,i._)([(0,a.qq)({readOnly:!0})],te.prototype,"availability",void 0),(0,i._)([(0,a.qq)()],te.prototype,"hasZ",null),te=(0,i._)([(0,u.c)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],te);const se=2e3,ie=6e5,ne=1e6,re=25,oe=1;var ae=s(33184),le=s(80424),ue=s(6904),he=s(11712);class ce{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let de=class extends D.c{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*le.M.MEGABYTES,this._tileBounds=new ue.c,this._tiles=new ce,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,W.Su)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map((e=>new Set(Object.keys(e.attributes)))).reduce(((e,t)=>(0,X.WR)(e,t)),new Set(Object.keys(s[0]?.attributes??[])));this._addTileStorage(e,new Set(s.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,ae.qC)(e.lengths,4);return 32+(0,ae.qC)(e.coords,8)+t}(e.geometry)+(0,ae.aC)(e.attributes)}(t)),0)}(s),i),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s,i){const n=e.id;this._tiles.set(n,new pe(e,t,s,i)),this._tileBounds.set(n,e.extent),this._tileFeatureCounts.set(n,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===ye.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this._tiles){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){const i=(await t(e,s)).features,{hasZ:n,hasM:r}=this.featureStore;for(const e of i){const t=(0,J.C_)(this._tmpBoundingRect,e.geometry,n,r);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=(()=>!0),s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,W.K0)((0,W.ER)(this.extent,this._tmpBoundingRect),e.extent))return new fe(e);const i=this.getAttributesForTile(e.id);if((0,X.Cs)(s,i))return new fe(e);const n=this._createTileTree(e,this.tileInfo);return this._simplify(n,t,null,0,1),this._collectMissingTiles(e,n,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const n=this._tileFeatureCounts.get(e.id);if(null!=n)return n;const r=await(0,Z.WE)(t,s,i);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const s=new _e(e.level,e.row,e.col);return t.updateTileInfo(s,_.c.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const n=this._tiles.get(i)?.data;n&&this._tilesAreRelated(e,n)&&this._populateChildren(s,n,t,this._tileFeatureCounts.get(n.id)||0)})),s}_tilesAreRelated(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,n=s?t:e,r=1<<n.level-i.level;return Math.floor(n.row/r)===i.row&&Math.floor(n.col/r)===i.col}_populateChildren(e,t,s,i){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,o=t.col>>n,a=e.row<<1,l=o-(e.col<<1)+(r-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const n=new _e(e.level+1,r,o);s.updateTileInfo(n,_.c.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=n,this._populateChildren(n,t,s,i)}}_simplify(e,t,s,i,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),null!=s&&(s.children[i]=null),r);const o=n/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/r<me&&(this._purge(e),null!=s&&(s.children[i]=null),l=r),l}_mergeChildren(e){const t=new Set;let s,i=0;this._forEachLeaf(e,(e=>{const n=this._tiles.get(e.id);if(n){s=s?(0,X.WR)(s,n.attributeKeys):new Set(n.attributeKeys),i+=n.byteSize;for(const e of n.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,i,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const n=new ge(s,e,this.extent);return this._collectMissingTilesRecurse(t,n,1,i),n.info}_collectMissingTilesRecurse(e,t,s,i){const n=this.getAttributesForTile(e.id),r=n&&!(0,X.Cs)(i,n);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const o=s/2;for(let s=0;s<e.children.length;s++){const n=e.children[s];null==n?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),o):this._collectMissingTilesRecurse(n,t,o,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?ye.ADDED:ye.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),ye.REMOVED):(t>0&&this._refCounts.set(e,t),ye.UNCHANGED)}get test(){return{tiles:Array.from(this._tiles.values()).map((e=>`${e.data.id}:[${Array.from(e.objectIds)}]`)),featureReferences:Array.from(this._refCounts.keys()).map((e=>`${e}:${this._refCounts.get(e)}`))}}};(0,i._)([(0,a.qq)({constructOnly:!0})],de.prototype,"featureStore",void 0),(0,i._)([(0,a.qq)()],de.prototype,"tileInfo",void 0),(0,i._)([(0,a.qq)()],de.prototype,"extent",void 0),(0,i._)([(0,a.qq)()],de.prototype,"maximumByteSize",void 0),de=(0,i._)([(0,u.c)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],de);class pe{constructor(e,t,s,i){this.data=e,this.objectIds=t,this.byteSize=s,this.attributeKeys=i}}class _e{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class fe{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,W.wd)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class ge{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new fe(t),null!=s&&(this._extent=(0,W.ER)(s))}addMissing(e,t,s,i){const n=new he.g(null,e,t,s);this._tileInfo.updateTileInfo(n,_.c.ExtrapolateOptions.POWER_OF_TWO),null==n.extent||null!=this._extent&&!(0,W.K0)(this._extent,n.extent)||(this.info.missingTiles.push({data:n,resolution:i}),this.info.coveredArea-=(0,W.wd)(n.extent))}}const me=.18751;var ye;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(ye||(ye={}));var ve=s(6704);let we=class extends n.c.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,r.qG)(),this._elevationAligner=E(),this._elevationFilter=O(),this._symbologyCandidatesFetcher=N(),this._updatingHandles=new h.A,this._editsUpdatingHandles=new h.A,this._pendingApplyEdits=new Map,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,r.wp)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,r.wp)(t),i}}get updating(){return this.updatingExcludingEdits||this._editsUpdatingHandles.updating||this._featureFetcher.updating}get updatingExcludingEdits(){return this._featureFetcher.updatingExcludingEdits||this._isInitializing||this._updatingHandles.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:n}=e.serviceInfo,{hasZ:r}=e,a=c.c.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new d.c({...e.serviceInfo,hasZ:r,hasM:!1}),this._queryEngine=new p.U({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:n,hasZ:r,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new te({store:new de({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:c.c.fromJSON(e.serviceInfo.spatialReference)});const l="3d"===e.configuration.viewType;return this._elevationAligner=E(l,{elevationInfo:null!=e.elevationInfo?g.c.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=O(l),this.addHandles([(0,o.aE)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),o.du),(0,o.aE)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),xe}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.wp)(t),this._featureFetcher.suspended=e,xe}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.wp)(t),this._featureFetcher.outFields=new Set(e??[]),xe}async fetchCandidates(e,t){await this._whenSetup.promise,(0,r.wp)(t);const s=function(e){if(!e.filter)return{...e,query:{where:"1=1"}};const{distance:t,units:s,spatialRel:i,where:n,timeExtent:r,objectIds:o}=e.filter,a={geometry:e.filter.geometry?(0,ve.h4)(e.filter.geometry):void 0,distance:t,units:s,spatialRel:i,timeExtent:r,objectIds:o,where:n??"1=1"};return{...e,query:a}}(e),i=t?.signal,n=await this._queryEngine.executeQueryForSnapping(s,i);(0,r.wp)(i);const o=await this._elevationAligner.alignCandidates(n.candidates,c.c.fromJSON(e.point.spatialReference)??c.c.WGS84,i);(0,r.wp)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,r.wp)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.wp)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?_.c.fromJSON(e.tileInfo):null,xe}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.wp)(t),this._featureFetcher.refresh(),xe}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.wp)(t),await(0,o.Eq)((()=>!this.updatingExcludingEdits),t),(0,r.wp)(t),xe}async getDebugInfo(e,t){return(0,r.wp)(t),{result:this._featureFetcher.debugInfo}}async beginApplyEdits(e,t){this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.wp)(t);const s=(0,r.qG)();return this._pendingApplyEdits.set(e.id,s),this._featureFetcher.applyEdits(s.promise),this._editsUpdatingHandles.addPromise(s.promise),xe}async endApplyEdits(e,t){const s=this._pendingApplyEdits.get(e.id);return s&&s.resolve(e.edits),(0,r.wp)(t),xe}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),xe}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),xe}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=N(e,this._getSymbologyCandidates),xe}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?f.c.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,a.qq)({readOnly:!0})],we.prototype,"updating",null),(0,i._)([(0,a.qq)({readOnly:!0})],we.prototype,"updatingExcludingEdits",null),(0,i._)([(0,a.qq)()],we.prototype,"_isInitializing",void 0),we=(0,i._)([(0,u.c)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],we);const Ee=we,xe={result:{}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2612],{13452:(e,t,r)=>{r.d(t,{c:()=>p});var s=r(41948),i=r(3856),n=r(40504),o=r(94360),a=r(1580),l=(r(9456),r(66360),r(72052),r(9968)),u=r(12552),c=r(4736);let d=class extends((0,i.q)(n.am)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.QJ)(this.value,this.unit,"milliseconds")}};(0,s._)([(0,l.G)(c.e,{nonNullable:!0})],d.prototype,"unit",void 0),(0,s._)([(0,a.qq)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,s._)([(0,u.c)("esri.TimeInterval")],d);const p=d},54792:(e,t,r)=>{r.d(t,{c:()=>n});var s=r(67432),i=r(9592);class n{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.n,this._items=new Set}get length(){return(0,s.am)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.am)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.am)(this._observable),yield*this._items}}},44247:(e,t,r)=>{async function s(e,t){const{WhereClause:s}=await Promise.all([r.e(3220),r.e(988)]).then(r.bind(r,63220));return s.create(e,t)}function i(e,t){return null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{_:()=>i,u:()=>s})},75824:(e,t,r)=>{r.d(t,{Md:()=>n,m0:()=>o,qG:()=>i});var s=r(39452);class i{}function n(e){return e instanceof s.C?e===i.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return n(e)?i.instance:e}i.instance=new s._C("Etc/UTC")},46448:(e,t,r)=>{r.d(t,{c:()=>u});var s=r(38912),i=r(10860),n=r(54792),o=r(13056),a=r(25512),l=r(38432);class u{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new n.c}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let n=!0;const o=e=>{(0,i.wp)(t.signal),n&&(n=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let n=0;n<e.length;++n){const a=e[n];(0,i.eW)(a)?this._clientPromises[n]=a.then((e=>(this._clients[n]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[n])),(()=>(o(s),null))):(this._clients[n]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[n]=Promise.resolve(this._clients[n]),o(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const n=this._clientPromises[i];s[i]=n.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.Uh)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.S)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const s=(0,i.qG)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}createInvokeProxy(e){return(0,a.Y)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.Ip)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((i=>{i&&(t[s]=i.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},13056:(e,t,r)=>{r.d(t,{S:()=>n,s:()=>i});const s=new FinalizationRegistry((e=>{e.close()}));function i(e,t){s.register(e,t,t)}function n(e){s.unregister(e)}},35268:(e,t,r)=>{r.d(t,{eU:()=>G});var s=r(20744),i=r(9456),n=r(10860),o=r(46448),a=r(13056),l=r(38432),u=r(66360),c=r(70680),d=r(2600),p=r(28176);const h={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,p.OO)(e.url)?.after?s:"array-buffer";const i=await(0,d.c)(e.url,r),n={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete n.data.signal,n;case"blob":n.data=await n.data.arrayBuffer();break;case"json":n.data=(new TextEncoder).encode(JSON.stringify(n.data)).buffer;break;case"text":n.data=(new TextEncoder).encode(n.data).buffer}return{result:n,transferList:[n.data]}}};var m=r(31056),f=r(24832),y=r(6220),g=(r(2016),r(47620));const w={};var v=r(52324);class _{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class b{constructor(){this._dispatcher=new _,this._workerPostMessage({type:m.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,v.o)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,v.o)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,m.mO)(e);if(t&&t.type===m.MessageType.OPEN){const{modulePath:e,jobId:r}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const i=l.default.connect(s);this._workerPostMessage({type:m.MessageType.OPENED,jobId:r,data:i})}}}var q=r(89960),x=r(69880);const F=()=>u.c.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:I}=m.MessageType;let E,O;const S="Failed to create Worker. Fallback to execute module in main thread";async function T(e){return new Promise((t=>{function r(i){const n=(0,m.mO)(i);n&&n.type===I&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),F().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new b).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let R=0;const{ABORT:P,INVOKE:k,OPEN:N,OPENED:j,RESPONSE:C}=m.MessageType;class M{static async create(e){const t=await async function(){if(!(0,i.c)("esri-workers"))return T(new b);if(!E&&!O)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=y.default.default){const t={...y.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(y.default));e.assetsPath=(0,p.WM)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,p.WM)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,q.a8)(),e.has={"esri-csp-restrictions":(0,i.c)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.c)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.c)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.c)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.c)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.c)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.c)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.c)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.c)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.c)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.c)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.c)("esri-atomics"),"esri-shared-array-buffer":(0,i.c)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.c)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.c)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.c)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,p.WM)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,p.WM)(e.workers.workerPath):e.workers.workerPath=(0,p.WM)((0,f.O)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=y.default.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=w.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,q.a8)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:x.W,fullVersion:g.c1,revision:x.m};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}()}'`);E=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){O=e||{}}let e;if(E)try{e=new Worker(E,{name:"esri-worker-"+R++})}catch(t){F().warn(S,O),e=new b}else F().warn(S,O),e=new b;return T(e)}();return new M(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),u.c.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,m.EH)();return new Promise(((t,i)=>{const o={resolve:t,reject:i,abortHandle:(0,n.Ij)(r,(()=>{this._outJobs.delete(s),this._post({type:P,jobId:s})}))};this._outJobs.set(s,o),this._post({type:N,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,m.mO)(e);if(t)switch(t.type){case j:this._onOpenedMessage(t);break;case C:this._onResponseMessage(t);break;case P:this._onAbortMessage(t);break;case k:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:i}=e,o=i?new AbortController:null,a=this._inJobs,l=h[t];let u;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);u=l.call(null,s,{signal:o?o.signal:null})}catch(e){return void this._post({type:C,jobId:r,error:(0,m.O)(e)})}(0,n.eW)(u)?(a.set(r,{controller:o,promise:u}),u.then((e=>{a.has(r)&&(a.delete(r),this._post({type:C,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.mA)(e)||this._post({type:C,jobId:r,error:(0,m.O)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:C,jobId:r},u)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,c.oR)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,c.oR)(n.abortHandle),r?n.reject(s.c.fromJSON(JSON.parse(r))):n.resolve(i))}_post(e,t,r){return(0,m.E9)(this.worker,e,t,r)}}const U=(0,i.c)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.c)("workers-pool-size")):0;let A=(0,i.c)("esri-mobile")?Math.min(U,3):U;A||(A=(0,i.c)("safari")&&(0,i.c)("mac")?7:2);let D=0;const L=[];async function J(e,t){const r=new o.c,{registryTarget:s,...i}=t;return await r.open(e,i),s&&(0,a.s)(s,r),r}async function G(e,t={}){if("string"!=typeof e)throw new s.c("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.c)("host-webworker")&&!(0,i.c)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,n.wp)(t.signal);const s=t.client||r;return J([l.default.connect(r)],{...t,client:s})}if(await async function(){if(H)return H;W=new AbortController;const e=[];for(let t=0;t<A;t++){const r=M.create(t).then((e=>(L[t]=e,e)));e.push(r)}return H=Promise.all(e),H}(),(0,n.wp)(t.signal),"dedicated"===r){const r=D++%A;return J([await L[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,A);if(r<A){const s=new Array(r);for(let i=0;i<r;++i){const r=D++%A;s[i]=L[r].open(e,t)}return J(s,t)}}return J(L.map((r=>r.open(e,t))),t)}let W,H=null},77048:(e,t,r)=>{r.d(t,{C6:()=>c,FZ:()=>h,K:()=>w,K8:()=>l,MZ:()=>a,Qv:()=>m,Su:()=>i,WK:()=>n,WO:()=>p,WU:()=>o,eC:()=>u,is:()=>y,mK:()=>d,qy:()=>f,yK:()=>g});var s=r(95247);function i(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,s,n,o,a=i()){return a[0]=e,a[1]=t,a[2]=r,a[3]=s,a[4]=n,a[5]=o,a}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new s.c(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function p(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?p(e,w):i(w)}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e,t,r,s,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function y(e){return 6===e.length}function g(e,t,r){if(null==e||null==t)return e===t;if(!y(e)||!y(t))return!1;if(r){for(let s=0;s<e.length;s++)if(!r(e[s],t[s]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(83372);const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];i()},53440:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var s=r(41948),i=(r(60708),r(82692)),n=(r(99704),r(73868),r(90200),r(12836),r(63718),r(2360),r(64624),r(24948),r(70236),r(37284)),o=r(26496),a=r(58820),l=r(28176),u=r(1580),c=r(53368),d=(r(72052),r(9456)),p=r(12552),h=r(18996),m=r(97492),f=r(81436),y=r(20744),g=r(95800),w=r(66360),v=r(10860),_=r(35268),b=r(17724),q=r(44808),x=r(59500),F=r(28484),I=r(95247);let E=class extends g.c{constructor(){super(...arguments),this._connection=null,this._workerHandler=null,this.capabilities=(0,b.G4)(!1,!1),this.type="wfs",this.refresh=(0,v.Cu)((async()=>{await this.load();const e={customParameters:this.layer.customParameters,maxRecordCount:this.layer.maxRecordCount,maxTotalRecordCount:this.layer.maxTotalRecordCount,maxPageCount:this.layer.maxPageCount},{extent:t}=await this._workerHandler.refresh(e);return t&&(this.sourceJSON.extent=t),{dataChanged:!0,updates:{extent:this.sourceJSON.extent}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker({signal:t})),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null,this._workerHandler=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){const r=await this.queryFeaturesJSON(e,t);return x.c.fromJSON(r)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._workerHandler.queryFeatures(e?e.toJSON():void 0,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._workerHandler.queryFeatureCount(e?e.toJSON():void 0,t)}async queryObjectIds(e,t={}){return await this.load(t),this._workerHandler.queryObjectIds(e?e.toJSON():void 0,t)}async queryExtent(e,t={}){await this.load(t);const r=await this._workerHandler.queryExtent(e?e.toJSON():void 0,t);return{count:r.count,extent:I.c.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._workerHandler.querySnapping(e,t)}async _createLoadOptions(e){const{url:t,customParameters:r,name:s,namespaceUri:i,fields:n,geometryType:o,maxRecordCount:a,maxPageCount:l,maxTotalRecordCount:u,swapXY:c}=this.layer,d="defaults"===this.layer.originOf("spatialReference")?void 0:this.layer.spatialReference;if(!t)throw new y.c("wfs-layer:missing-url","WFSLayer must be created with a url");this.wfsCapabilities||(this.wfsCapabilities=await(0,q.iO)(t,{customParameters:r,...e}));const p=["fields","geometryType","name","namespaceUri","swapXY"].some((e=>null==this.layer[e])),h=p?await(0,q.O8)(this.wfsCapabilities,s,i,{spatialReference:d,customParameters:r,signal:e?.signal}):{...(0,q.k1)(n??[]),geometryType:o,name:s,namespaceUri:i,spatialReference:d,swapXY:c},f=(0,q.oZ)(this.wfsCapabilities.readFeatureTypes(),h.name,h.namespaceUri),g=m.U.toJSON(h.geometryType),{operations:w}=this.wfsCapabilities,v=w.GetFeature.url,_=w.GetFeature.outputFormat;return{customParameters:r,featureType:f,fields:h.fields?.map((e=>e.toJSON()))??[],geometryField:h.geometryField,geometryType:g,getFeatureUrl:v,getFeatureOutputFormat:_,maxRecordCount:a,maxPageCount:l,maxTotalRecordCount:u,objectIdField:h.objectIdField,spatialReference:h.spatialReference?.toJSON(),swapXY:!!h.swapXY}}async _startWorker(e){const[t,r]=await(0,v.Dv)([this._createLoadOptions(e),(0,_.eU)("WFSSourceWorker",{...e,strategy:(0,d.c)("feature-layers-workers")?"dedicated":"local",registryTarget:this})]),s=t.error||r.error||null,i=r.value||null;if(s)throw i&&i.close(),s;const n=t.value;this._connection=r.value,this._workerHandler=this._connection.createInvokeProxy();const o=await this._workerHandler.load(n,e);for(const e of o.warnings)w.c.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});this.sourceJSON={dateFieldsTimeReference:{timeZoneIANA:F.Gw},extent:o.extent,fields:n.fields,geometryType:n.geometryType,objectIdField:n.objectIdField,geometryField:n.geometryField,drawingInfo:(0,b.w7)(n.geometryType),name:n.featureType.title,wfsInfo:{name:n.featureType.name,featureUrl:n.getFeatureUrl,maxFeatures:n.maxRecordCount,swapXY:n.swapXY,supportedSpatialReferences:n.featureType.supportedSpatialReferences,version:"2.0.0",wfsNamespace:n.featureType.namespaceUri}}}};(0,s._)([(0,u.qq)()],E.prototype,"capabilities",void 0),(0,s._)([(0,u.qq)({constructOnly:!0})],E.prototype,"layer",void 0),(0,s._)([(0,u.qq)()],E.prototype,"sourceJSON",void 0),(0,s._)([(0,u.qq)()],E.prototype,"type",void 0),(0,s._)([(0,u.qq)()],E.prototype,"wfsCapabilities",void 0),E=(0,s._)([(0,p.c)("esri.layers.graphics.sources.WFSSource")],E);var O,S=r(25216),T=r(28584),R=r(13116),P=r(66888),k=r(66576),N=r(30112),j=r(98768),C=r(26916),M=r(3116),U=r(19560),A=r(21488),D=r(600),L=r(81732),J=r(564),G=r(6168),W=r(34880),H=r(95776),z=r(65548),$=r(56156);const B=(0,L.l)();let Q=O=class extends((0,N.W)((0,T.G)((0,P.c)((0,R.w)((0,S.W)((0,U.u)((0,C.G)((0,M.I)((0,k.Y)((0,j.K)((0,o.U)(f.c)))))))))))){static fromWFSLayerInfo(e){const{customParameters:t,fields:r,geometryField:s,geometryType:i,name:n,namespaceUri:o,objectIdField:a,spatialReference:l,swapXY:u,url:c,wfsCapabilities:d}=e;return new O({customParameters:t,fields:r,geometryField:s,geometryType:i,name:n,namespaceUri:o,objectIdField:a,spatialReference:l,swapXY:u,url:c,wfsCapabilities:d})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxRecordCount=3e3,this.maxPageCount=10,this.maxTotalRecordCount=2e5,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new E({layer:this}),this.spatialReference=$.c.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),(0,J.Gi)(this.renderer,this.fieldsIndex),(0,J.Wc)(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r){const s=e.filter((e=>e.name!==q.Av));this.geometryField&&s.unshift(new D.c({name:this.geometryField,alias:this.geometryField,type:"geometry"})),(0,a.qQ)(r,s.map((e=>e.toJSON())),t)}get parsedUrl(){return(0,l.as)(this.url)}set renderer(e){(0,J.Gi)(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return(0,z.Ap)(this,e)}createQuery(){const e=new H.c({returnGeometry:!0,outFields:["*"],where:this.definitionExpression||"1=1"}),{timeOffset:t,timeExtent:r}=this;return e.timeExtent=null!=t&&null!=r?r.offset(-t.value,t.unit):r||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex?.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(H.c.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(H.c.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(H.c.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(H.c.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh();return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"capabilities",null),(0,s._)([(0,u.qq)({type:String})],Q.prototype,"copyright",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"createQueryVersion",null),(0,s._)([(0,u.qq)({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],Q.prototype,"customParameters",void 0),(0,s._)([(0,u.qq)((0,F.SM)("dateFieldsTimeReference"))],Q.prototype,"dateFieldsTimeZone",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"defaultPopupTemplate",null),(0,s._)([(0,u.qq)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Q.prototype,"definitionExpression",void 0),(0,s._)([(0,u.qq)({type:String})],Q.prototype,"displayField",void 0),(0,s._)([(0,u.qq)(A.Kg)],Q.prototype,"elevationInfo",void 0),(0,s._)([(0,u.qq)({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"featureUrl",void 0),(0,s._)([(0,u.qq)({type:[D.c],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],Q.prototype,"fields",void 0),(0,s._)([(0,h.G)("fields")],Q.prototype,"writeFields",null),(0,s._)([(0,u.qq)(B.fieldsIndex)],Q.prototype,"fieldsIndex",void 0),(0,s._)([(0,u.qq)({type:I.c,json:{name:"extent"}})],Q.prototype,"fullExtent",void 0),(0,s._)([(0,u.qq)()],Q.prototype,"geometryField",void 0),(0,s._)([(0,u.qq)({type:String,json:{read:{source:"layerDefinition.geometryType",reader:m.U.read},write:{target:"layerDefinition.geometryType",writer:m.U.write,ignoreOrigin:!0},origins:{service:{read:m.U.read}}}})],Q.prototype,"geometryType",void 0),(0,s._)([(0,u.qq)({type:String})],Q.prototype,"id",void 0),(0,s._)([(0,u.qq)(A.Wu)],Q.prototype,"labelsVisible",void 0),(0,s._)([(0,u.qq)({type:[G.c],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W.E},write:!0}})],Q.prototype,"labelingInfo",void 0),(0,s._)([(0,u.qq)(A.Uj)],Q.prototype,"legendEnabled",void 0),(0,s._)([(0,u.qq)({type:["show","hide"]})],Q.prototype,"listMode",void 0),(0,s._)([(0,u.qq)({type:String})],Q.prototype,"objectIdField",void 0),(0,s._)([(0,u.qq)({type:["WFS"]})],Q.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.qq)({type:c.Ab,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"maxRecordCount",void 0),(0,s._)([(0,u.qq)({type:c.Ab})],Q.prototype,"maxPageCount",void 0),(0,s._)([(0,u.qq)({type:c.Ab})],Q.prototype,"maxTotalRecordCount",void 0),(0,s._)([(0,u.qq)({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],Q.prototype,"mode",void 0),(0,s._)([(0,u.qq)({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"name",void 0),(0,s._)([(0,u.qq)({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"namespaceUri",void 0),(0,s._)([(0,u.qq)(A.ms)],Q.prototype,"opacity",void 0),(0,s._)([(0,u.qq)(B.outFields)],Q.prototype,"outFields",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"parsedUrl",null),(0,s._)([(0,u.qq)(A.Ou)],Q.prototype,"popupEnabled",void 0),(0,s._)([(0,u.qq)({type:i.c,json:{name:"popupInfo",write:!0}})],Q.prototype,"popupTemplate",void 0),(0,s._)([(0,u.qq)({types:n.U,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:n.Q,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],Q.prototype,"renderer",null),(0,s._)([(0,u.qq)(A.Q9)],Q.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"source",void 0),(0,s._)([(0,u.qq)({type:$.c,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],Q.prototype,"spatialReference",void 0),(0,s._)([(0,u.qq)({readOnly:!0,type:[c.Ab],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"spatialReferences",void 0),(0,s._)([(0,u.qq)({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"swapXY",void 0),(0,s._)([(0,u.qq)({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],Q.prototype,"title",void 0),(0,s._)([(0,u.qq)({json:{read:!1},readOnly:!0})],Q.prototype,"type",void 0),(0,s._)([(0,u.qq)(A.qW)],Q.prototype,"url",void 0),(0,s._)([(0,u.qq)({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"version",void 0),(0,s._)([(0,u.qq)()],Q.prototype,"wfsCapabilities",null),Q=O=(0,s._)([(0,p.c)("esri.layers.WFSLayer")],Q);const Z=Q},34888:(e,t,r)=>{r.d(t,{ED:()=>i,_M:()=>s});class s{constructor(e=null,t={},r,s){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=s,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new s(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new s(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function i(e){return!!e.geometry?.coords?.length}},85152:(e,t,r)=>{r.d(t,{c:()=>s});class s{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromRect(e){const[t,r,i,n]=e,o=i-t,a=n-r;return new s([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const s=this.lengths[r];for(let r=0;r<s;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=s}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let s=0;for(const e of r){for(let r=1;r<e;r++)t[2*(s+r)]+=t[2*(s+r)-2],t[2*(s+r)+1]+=t[2*(s+r)-1];s+=e}return e}clone(e){if(0===this.lengths.length)return new s([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new s(this.lengths,e,this.hasIndeterminateRingOrder)):new s(Array.from(this.lengths),Array.from(r),this.hasIndeterminateRingOrder)}}},13136:(e,t,r)=>{r.d(t,{u:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},17724:(e,t,r)=>{r.d(t,{G4:()=>p,GA:()=>c,QD:()=>d,w7:()=>a});var s=r(9456),i=r(62088),n=r(13136),o=r(9504);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.qe:"esriGeometryPolyline"===e?o.MZ:o.yq}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,s.c)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.ct)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.u,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},13116:(e,t,r)=>{r.d(t,{w:()=>O});var s,i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552)),a=r(20744),l=r(40504),u=r(58820),c=r(24676),d=r(60708),p=r(25228),h=r(14628),m=r(62088),f=r(95776);const y=new h.O({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new h.O({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let w=s=class extends l.am{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:s,timeExtent:i,objectIds:n,units:o,distance:a}=this;return new f.c({geometry:(0,m.ct)(r),objectIds:(0,m.ct)(n),spatialRelationship:s,timeExtent:(0,m.ct)(i),where:t,units:o,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:i,objectIds:n,units:o,distance:a}=this;return new s({geometry:(0,m.ct)(t),objectIds:(0,m.ct)(n),spatialRelationship:r,timeExtent:(0,m.ct)(i),where:e,units:o,distance:a})}};(0,i._)([(0,n.qq)({type:String,json:{write:!0}})],w.prototype,"where",void 0),(0,i._)([(0,n.qq)({types:d.Su,json:{write:!0}})],w.prototype,"geometry",void 0),(0,i._)([(0,n.qq)({type:y.apiValues,json:{name:"spatialRel",read:{reader:y.read},write:{allowNull:!1,writer:y.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],w.prototype,"spatialRelationship",void 0),(0,i._)([(0,n.qq)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"distance",void 0),(0,i._)([(0,n.qq)({type:[Number],json:{write:!0}})],w.prototype,"objectIds",void 0),(0,i._)([(0,n.qq)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"units",void 0),(0,i._)([(0,n.qq)({type:p.c,json:{write:!0}})],w.prototype,"timeExtent",void 0),w=s=(0,i._)([(0,o.c)("esri.layers.support.FeatureFilter")],w);const v=w;var _;const b={read:{reader:c.gH},write:{writer:c.GA,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},q={read:{reader:c.gH},write:{writer:c.GA,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},x={name:"showExcludedLabels",default:!0};let F=_=class extends l.am{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.c("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.c("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new _({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,i._)([(0,n.qq)({type:v,json:{write:{allowNull:!0,writer(e,t,r,s){const i=e?.write({},s);i&&0!==Object.keys(i).length?(0,u.qQ)(r,i,t):(0,u.qQ)(r,null,t)}}}})],F.prototype,"filter",void 0),(0,i._)([(0,n.qq)({json:{write:!0,origins:{"web-map":b,"portal-item":b}}})],F.prototype,"includedEffect",void 0),(0,i._)([(0,n.qq)({json:{write:!0,origins:{"web-map":q,"portal-item":q}}})],F.prototype,"excludedEffect",void 0),(0,i._)([(0,n.qq)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":x,"portal-item":x}}})],F.prototype,"excludedLabelsVisible",void 0),F=_=(0,i._)([(0,o.c)("esri.layers.support.FeatureEffect")],F);const I=F,E={write:{allowNull:!0}},O=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,i._)([(0,n.qq)({type:I,json:{origins:{"web-map":E,"portal-item":E}}})],t.prototype,"featureEffect",void 0),t=(0,i._)([(0,o.c)("esri.layers.mixins.FeatureEffectLayer")],t),t}},30112:(e,t,r)=>{r.d(t,{W:()=>c});var s=r(41948),i=r(58820),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552)),a=r(35968);function l(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const i=new a.c;return i.read(s,r),[i]}function u(e,t,r,s){const n=e.find((e=>!!e.field));n&&(0,i.qQ)(r,[n.toJSON()],t)}const c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.qq)({type:[a.c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:l},write:{target:"layerDefinition.orderBy",writer:u}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,o.c)("esri.layers.mixins.OrderedLayer")],t),t}},19560:(e,t,r)=>{r.d(t,{u:()=>p});var s=r(41948),i=r(25228),n=r(13452),o=r(1580),a=(r(9456),r(66360),r(72052),r(33600)),l=r(12552),u=r(564),c=r(99336),d=r(4736);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const s=r.timeOffset,i=d.e.fromJSON(r.timeOffsetUnits);return s&&i?new n.c({value:s,unit:i}):null}set timeInfo(e){(0,u.Wc)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,s._)([(0,o.qq)({type:i.c,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,s._)([(0,o.qq)({type:n.c})],t.prototype,"timeOffset",void 0),(0,s._)([(0,a.E)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,s._)([(0,o.qq)({value:null,type:c.c,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,s._)([(0,o.qq)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,s._)([(0,l.c)("esri.layers.mixins.TemporalLayer")],t),t}},16424:(e,t,r)=>{r.d(t,{c:()=>p});var s=r(20744),i=r(40504),n=r(66360),o=r(86916),a=r(75824),l=r(564),u=r(28484),c=r(39452);const d=new Map;class p{static fromJSON(e){return new p(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new p(e.fields??[],y(e))}static fromLayerJSON(e){return new p(e.fields??[],y(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,s=m(t);if(t&&s){const i=h(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(s,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.gp)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.iW)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.Mz)(e)||(0,l.w1)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.Mz)(e)||(0,l.w1)(e)||e.nullable||void 0!==(0,l.gB)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(h(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.c.getLogger("esri.layers.support.FieldsIndex").error(new s.c("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.Gw):f.has(t.type)?u.OI:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.OI?a.qG.instance:t===u.Gw?c.Kq.utcInstance:(0,o.wJ)(d,t,(()=>c._C.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.eM)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,i.wt)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function h(e){return e.trim().toLowerCase()}function m(e){return(0,l.gP)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function y(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:i}=e,n=(s?"startField"in s?s.startField:s.startTimeField:"")??"",o=(s?"endField"in s?s.endField:s.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.Mt)(e.dateFieldsTimeReference):null,l=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.dateFieldsTimeReference?(0,u.Mt)(i.dateFieldsTimeReference):a??u.Gw:null,c=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.timeReference?(0,u.Mt)(s.timeReference):a:null,d=new Map([[h(i?.creationDateField??""),l],[h(i?.editDateField??""),l],[h(n),c],[h(o),c]]);for(const{name:s,type:i}of e.fields)if(f.has(i))t.set(s,u.OI);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(s,null);else if(r)t.set(s,u.OI);else{const e=d.get(h(s??""))??a;t.set(s,e)}return t}},35968:(e,t,r)=>{r.d(t,{c:()=>d});var s,i=r(41948),n=r(14628),o=r(40504),a=r(1580),l=(r(9456),r(66360),r(72052),r(12552));const u=new n.O({asc:"ascending",desc:"descending"});let c=s=class extends o.am{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,a.qq)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,i._)([(0,a.qq)({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),(0,i._)([(0,a.qq)({type:u.apiValues,json:{read:u.read,write:u.write}})],c.prototype,"order",void 0),c=s=(0,i._)([(0,l.c)("esri.layers.support.OrderByInfo")],c);const d=c},99336:(e,t,r)=>{r.d(t,{c:()=>f});var s=r(41948),i=r(25228),n=r(13452),o=r(3856),a=r(40504),l=r(1580),u=(r(9456),r(66360),r(72052),r(33600)),c=r(12552),d=r(18996),p=r(28484);function h(e,t){return n.c.fromJSON({value:e,unit:t})}let m=class extends((0,o.q)(a.am)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),s=new Date(t.timeExtent[1]);return new i.c({start:r,end:s})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,s._)([(0,l.qq)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],m.prototype,"cumulative",void 0),(0,s._)([(0,l.qq)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"endField",void 0),(0,s._)([(0,l.qq)({type:i.c,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"fullTimeExtent",void 0),(0,s._)([(0,u.E)("fullTimeExtent",["timeExtent"])],m.prototype,"readFullTimeExtent",null),(0,s._)([(0,d.G)("fullTimeExtent")],m.prototype,"writeFullTimeExtent",null),(0,s._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"hasLiveData",void 0),(0,s._)([(0,l.qq)({type:n.c,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"interval",void 0),(0,s._)([(0,u.E)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],m.prototype,"readInterval",null),(0,s._)([(0,d.G)("interval")],m.prototype,"writeInterval",null),(0,s._)([(0,l.qq)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"startField",void 0),(0,s._)([(0,l.qq)((0,p.SM)("timeReference",!0))],m.prototype,"timeZone",void 0),(0,s._)([(0,l.qq)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"trackIdField",void 0),(0,s._)([(0,l.qq)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],m.prototype,"useTime",void 0),m=(0,s._)([(0,c.c)("esri.layers.support.TimeInfo")],m);const f=m},36408:(e,t,r)=>{r.d(t,{M:()=>s});const s=new(r(14628).O)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},4144:(e,t,r)=>{r.d(t,{GC:()=>x,I5:()=>f,Wi:()=>g,Y$:()=>m,cF:()=>y,wf:()=>w,y6:()=>h});var s=r(88264);const i="__begin__",n="__end__",o=new RegExp(i,"ig"),a=new RegExp(n,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(n+"$","i"),c='"',d=c+" + ",p=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function m(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function y(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return x(t.expression)}return null}function w(e){let t;return e?(t=(0,s.qq)(e,(e=>i+'$feature["'+e+'"]'+n)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,d).replaceAll(a,p)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,q=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=_.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=q.exec(e),t?t[2]:null)}},4736:(e,t,r)=>{r.d(t,{e:()=>s});const s=(0,r(14628).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},59500:(e,t,r)=>{r.d(t,{c:()=>v});var s,i=r(41948),n=r(60708),o=r(6444),a=r(14628),l=r(40504),u=r(62088),c=r(1580),d=(r(9456),r(66360),r(33600)),p=r(12552),h=r(18996),m=r(56156),f=r(6704),y=r(600);const g=new a.O({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=s=class extends l.am{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=m.c.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const i=e[t],n=o.c.fromJSON(i),a=i.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=r);const l=i.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],s=l[e],i=s?.spatialReference;null==t||i||(t.spatialReference=r)}s.push(n)}return s}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.h4)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=m.c.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.ct)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[n,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+s),(e=>i-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,i;const n=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===s&&o===i||(n.push([e-s,o-i]),s=e,i=o)}else s=t(a[0]),i=r(a[1]),n.push([s,i])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.Cs)(e)?e.rings:e.paths,i=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],o=this._quantizePoints(n,t,r);o&&i.push(o)}return i.length>0?((0,f.Cs)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.Cs)(e)?e.rings:e.paths;let o,a;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,a;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(o+=s[0],a+=s[1]):(o=s[0],a=s[1]),s[0]=t(o),s[1]=r(a)}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,c.qq)({type:[o.c],json:{write:!0}})],w.prototype,"features",void 0),(0,i._)([(0,d.E)("features")],w.prototype,"readFeatures",null),(0,i._)([(0,c.qq)({type:[y.c],json:{write:!0}})],w.prototype,"fields",void 0),(0,i._)([(0,c.qq)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,i._)([(0,h.G)("geometryType")],w.prototype,"writeGeometryType",null),(0,i._)([(0,c.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i._)([(0,c.qq)({types:n.Su,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i._)([(0,d.E)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i._)([(0,c.qq)({type:m.c,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i._)([(0,h.G)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i._)([(0,c.qq)({json:{write:!0}})],w.prototype,"transform",void 0),w=s=(0,i._)([(0,p.c)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w}}]);