@arcgis/core 4.33.0-next.20250518 → 4.33.0-next.20250520

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 (106) hide show
  1. package/applications/Components/QuantityFormatter.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{6fa1a5b7276a037dbd6a.js → 2113da9429f6272339d7.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{9c8224ca29475556e5ea.js → 26d3c9c6215c4076f943.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{151d6354e7bc105b25c0.js → 585c7b485c42555ec554.js} +6 -6
  6. package/assets/esri/core/workers/chunks/62b2d3720693c93a60f2.js +1 -0
  7. package/assets/esri/core/workers/chunks/{9d5eac3bd1526e2b33e3.js → 8fda0a5b247385e68dc0.js} +1 -1
  8. package/assets/esri/core/workers/chunks/a22e5b2874647fe0d31a.js +1 -0
  9. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationLayers.scss +1 -1
  10. package/assets/esri/themes/base/widgets/_Legend.scss +0 -4
  11. package/assets/esri/themes/dark/main.css +1 -1
  12. package/assets/esri/themes/light/main.css +1 -1
  13. package/assets/esri/themes/light/view.css +1 -1
  14. package/assets/esri/views/magnifier/overlay.ts.svg +1 -1
  15. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  16. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  17. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  18. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  19. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  20. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  21. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  22. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  23. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  24. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  25. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  26. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  27. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  28. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  29. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  30. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  31. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  32. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  33. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  34. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  35. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  36. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  37. package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
  38. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  39. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  40. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  41. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  42. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  43. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  44. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  45. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  46. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  47. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  48. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  49. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  50. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  51. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  52. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  53. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  54. package/chunks/HUDMaterial.glsl.js +6 -6
  55. package/geometry/operators/densifyOperator.d.ts +1 -0
  56. package/geometry/operators/json/geodesicBufferOperator.js +1 -1
  57. package/interfaces.d.ts +28 -0
  58. package/layers/VideoLayer.js +1 -1
  59. package/layers/video/VideoController.js +1 -1
  60. package/package.json +2 -2
  61. package/rest/knowledgeGraph/GraphUpdateSearchIndexResult.js +5 -0
  62. package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
  63. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
  64. package/rest/knowledgeGraphService.js +1 -1
  65. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  66. package/support/revision.js +1 -1
  67. package/symbols/support/previewCIMSymbol.js +1 -1
  68. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  69. package/views/2d/layers/VideoLayerView2D.js +1 -1
  70. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  71. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  72. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  73. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  74. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  75. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  76. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  77. package/views/VideoView.js +1 -1
  78. package/views/View2D.js +1 -1
  79. package/views/input/recognizers/DoubleTapDrag.js +1 -1
  80. package/views/input/recognizers/ImmediateDoubleClick.js +1 -1
  81. package/views/input/recognizers/PointerClickHoldAndDrag.js +1 -1
  82. package/views/input/recognizers/SingleAndDoubleClick.js +1 -1
  83. package/views/input/recognizers/support.js +1 -1
  84. package/views/magnifier/overlay-svg.js +1 -1
  85. package/views/ui/video/DefaultUIVideo.js +5 -0
  86. package/views/webgl/RenderingContext.js +1 -1
  87. package/views/webgl/checkWebGLError.js +1 -1
  88. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  89. package/widgets/AreaMeasurement3D.js +1 -1
  90. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
  91. package/widgets/DirectLineMeasurement3D.js +1 -1
  92. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  93. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  94. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
  95. package/widgets/Legend/styles/support/sizeRampUtils.js +1 -1
  96. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  97. package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
  98. package/widgets/LineOfSight.js +1 -1
  99. package/widgets/Slice/SliceViewModel.js +1 -1
  100. package/widgets/Slice.js +1 -1
  101. package/widgets/VideoPlayer.js +1 -1
  102. package/widgets/support/AnalysisViewModel.js +1 -1
  103. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  104. package/widgets/support/SelectionToolbar.js +1 -1
  105. package/assets/esri/core/workers/chunks/2873cb727c59328074db.js +0 -1
  106. package/assets/esri/core/workers/chunks/a937076d2f8c2b6a5d8a.js +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3176],{6867:(e,t,r)=>{r.d(t,{i:()=>u});var n=r(58083),i=r(9093),s=r(38954),a=r(51850),o=r(87317),l=r(91829),c=r(71351),d=r(29878);class u{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,s.g)(f,this.ray.direction,this.distance),(0,s.l)(f))}withinDistance(e){return!!h(this)&&this.distanceInRenderSpace<=e}getIntersectionPoint(e){return!!h(this)&&((0,s.g)(f,this.ray.direction,this.distance),(0,s.f)(e,this.ray.origin,f),!0)}getTransformedNormal(e){return(0,s.c)(p,this.normal),p[3]=0,(0,o.t)(p,p,this.transformation),(0,s.c)(e,p),(0,s.n)(e,e)}constructor(e){this.intersector=d.d.OBJECT,this.normal=(0,a.vt)(),this.transformation=(0,i.vt)(),this._ray=(0,c.vt)(),this.init(e)}init(e){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=d.d.OBJECT,(0,c.C)(e,this._ray)}set(e,t,r,o,l,c,d){this.intersector=e,this.distance=r,(0,s.c)(this.normal,o??a.Cb),(0,n.C)(this.transformation,l??i.zK),this.target=t,this.drapedLayerOrder=c,this.renderPriority=d}copy(e){(0,c.C)(e.ray,this._ray),this.intersector=e.intersector,this.distance=e.distance,this.target=e.target,this.drapedLayerOrder=e.drapedLayerOrder,this.renderPriority=e.renderPriority,(0,s.c)(this.normal,e.normal),(0,n.C)(this.transformation,e.transformation)}}function h(e){return null!=e?.distance}const f=(0,a.vt)(),p=(0,l.vt)()},10536:(e,t,r)=>{function n(e){const t={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){t[r]=[];for(let e=0;e<i.length;e++)t[r][e]=n(i[e])}else"object"==typeof i?i.toJSON&&(t[r]=JSON.stringify(i)):t[r]=i}return t}r.d(t,{z:()=>n})},13259:(e,t,r)=>{r.d(t,{H:()=>k,b:()=>D,c:()=>B,f:()=>U,s:()=>E});var n=r(37585),i=r(48163),s=r(91829),a=r(79258),o=r(49255),l=r(76591),c=r(36782),d=r(47522),u=r(40268),h=r(63578),f=r(13755),p=r(42593),m=r(42398),g=r(63365),y=r(26835),_=r(52587),b=r(20693),v=r(47286),w=r(14314),x=r(81961),C=r(71988),S=r(33094),I=r(20304),A=r(31821),T=r(12791),O=r(63761),R=r(59643),P=r(46540),F=r(14113),M=r(49788);const E={occludedFadeFactor:1};function D(e){const t=new F.N5,{signedDistanceFieldEnabled:r,occlusionTestEnabled:i,horizonCullingEnabled:E,pixelSnappingEnabled:D,hasScreenSizePerspective:U,debugDrawLabelBorder:k,vvSize:z,vvColor:N,hasRotation:q,occludedFragmentFade:H,sampleSignedDistanceFieldTexelCenter:G}=e;t.include(u.Q,e),t.vertex.include(l.rA,e);const{occlusionPass:$,output:Y,oitPass:Z}=e;if($)return t.include(h.I,e),t;const{vertex:X,fragment:W}=t;t.include(_.Y6),t.include(m.A,e),t.include(c.g,e),i&&t.include(f.y),W.include(y.W),W.include(g.a),t.varyings.add("vcolor","vec4"),t.varyings.add("vtc","vec2"),t.varyings.add("vsize","vec2");const J=Y===o.V.Highlight,Q=J&&i;Q&&t.varyings.add("voccluded","float"),X.uniforms.add(new w.I("viewport",(e=>e.camera.fullViewport)),new v.G("screenOffset",((e,t)=>(0,n.hZ)(L,2*e.screenOffset[0]*t.camera.pixelRatio,2*e.screenOffset[1]*t.camera.pixelRatio))),new v.G("anchorPosition",(e=>B(e))),new C.E("materialColor",(e=>e.color)),new I.m("materialRotation",(e=>e.rotation)),new O.N("tex",(e=>e.texture))),(0,b.Nz)(X),r&&(X.uniforms.add(new C.E("outlineColor",(e=>e.outlineColor))),W.uniforms.add(new C.E("outlineColor",(e=>j(e)?e.outlineColor:s.uY)),new I.m("outlineSize",(e=>j(e)?e.outlineSize:0)))),E&&X.uniforms.add(new x.V("pointDistanceSphere",((e,t)=>{const r=t.camera.eye,n=e.origin;return(0,s.fA)(n[0]-r[0],n[1]-r[1],n[2]-r[2],a.$O.radius)}))),D&&X.include(d.K),U&&((0,_.pM)(X),(0,_.OH)(X)),k&&t.varyings.add("debugBorderCoords","vec4"),t.attributes.add(P.r.UVI,"vec2"),t.attributes.add(P.r.COLOR,"vec4"),t.attributes.add(P.r.SIZE,"vec2"),t.attributes.add(P.r.ROTATION,"float"),(z||N)&&t.attributes.add(P.r.FEATUREATTRIBUTE,"vec4"),X.code.add(E?A.H`bool behindHorizon(vec3 posModel) {
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3176],{6867:(e,t,r)=>{r.d(t,{i:()=>u});var n=r(58083),i=r(9093),s=r(38954),a=r(51850),o=r(87317),l=r(91829),c=r(71351),d=r(29878);class u{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,s.g)(f,this.ray.direction,this.distance),(0,s.l)(f))}withinDistance(e){return!!h(this)&&this.distanceInRenderSpace<=e}getIntersectionPoint(e){return!!h(this)&&((0,s.g)(f,this.ray.direction,this.distance),(0,s.f)(e,this.ray.origin,f),!0)}getTransformedNormal(e){return(0,s.c)(p,this.normal),p[3]=0,(0,o.t)(p,p,this.transformation),(0,s.c)(e,p),(0,s.n)(e,e)}constructor(e){this.intersector=d.d.OBJECT,this.normal=(0,a.vt)(),this.transformation=(0,i.vt)(),this._ray=(0,c.vt)(),this.init(e)}init(e){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=d.d.OBJECT,(0,c.C)(e,this._ray)}set(e,t,r,o,l,c,d){this.intersector=e,this.distance=r,(0,s.c)(this.normal,o??a.Cb),(0,n.C)(this.transformation,l??i.zK),this.target=t,this.drapedLayerOrder=c,this.renderPriority=d}copy(e){(0,c.C)(e.ray,this._ray),this.intersector=e.intersector,this.distance=e.distance,this.target=e.target,this.drapedLayerOrder=e.drapedLayerOrder,this.renderPriority=e.renderPriority,(0,s.c)(this.normal,e.normal),(0,n.C)(this.transformation,e.transformation)}}function h(e){return null!=e?.distance}const f=(0,a.vt)(),p=(0,l.vt)()},10536:(e,t,r)=>{function n(e){const t={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){t[r]=[];for(let e=0;e<i.length;e++)t[r][e]=n(i[e])}else"object"==typeof i?i.toJSON&&(t[r]=JSON.stringify(i)):t[r]=i}return t}r.d(t,{z:()=>n})},13259:(e,t,r)=>{r.d(t,{H:()=>V,b:()=>E,c:()=>j,f:()=>L});var n=r(37585),i=r(48163),s=r(91829),a=r(79258),o=r(49255),l=r(76591),c=r(36782),d=r(47522),u=r(40268),h=r(63578),f=r(13755),p=r(42593),m=r(42398),g=r(63365),y=r(26835),_=r(52587),b=r(20693),v=r(47286),w=r(14314),x=r(81961),C=r(71988),S=r(33094),I=r(20304),A=r(31821),T=r(12791),O=r(63761),R=r(59643),P=r(46540),F=r(14113),M=r(49788);function E(e){const t=new F.N5,{signedDistanceFieldEnabled:r,occlusionTestEnabled:i,horizonCullingEnabled:E,pixelSnappingEnabled:L,hasScreenSizePerspective:V,debugDrawLabelBorder:k,vvSize:z,vvColor:N,hasRotation:q,occludedFragmentFade:H,sampleSignedDistanceFieldTexelCenter:G}=e;t.include(u.Q,e),t.vertex.include(l.rA,e);const{occlusionPass:$,output:Y,oitPass:Z}=e;if($)return t.include(h.I,e),t;const{vertex:X,fragment:W}=t;t.include(_.Y6),t.include(m.A,e),t.include(c.g,e),i&&t.include(f.y),W.include(y.W),W.include(g.a),t.varyings.add("vcolor","vec4"),t.varyings.add("vtc","vec2"),t.varyings.add("vsize","vec2");const J=Y===o.V.Highlight,Q=J&&i;Q&&t.varyings.add("voccluded","float"),X.uniforms.add(new w.I("viewport",(e=>e.camera.fullViewport)),new v.G("screenOffset",((e,t)=>(0,n.hZ)(B,2*e.screenOffset[0]*t.camera.pixelRatio,2*e.screenOffset[1]*t.camera.pixelRatio))),new v.G("anchorPosition",(e=>j(e))),new C.E("materialColor",(e=>e.color)),new I.m("materialRotation",(e=>e.rotation)),new O.N("tex",(e=>e.texture))),(0,b.Nz)(X),r&&(X.uniforms.add(new C.E("outlineColor",(e=>e.outlineColor))),W.uniforms.add(new C.E("outlineColor",(e=>D(e)?e.outlineColor:s.uY)),new I.m("outlineSize",(e=>D(e)?e.outlineSize:0)))),E&&X.uniforms.add(new x.V("pointDistanceSphere",((e,t)=>{const r=t.camera.eye,n=e.origin;return(0,s.fA)(n[0]-r[0],n[1]-r[1],n[2]-r[2],a.$O.radius)}))),L&&X.include(d.K),V&&((0,_.pM)(X),(0,_.OH)(X)),k&&t.varyings.add("debugBorderCoords","vec4"),t.attributes.add(P.r.UVI,"vec2"),t.attributes.add(P.r.COLOR,"vec4"),t.attributes.add(P.r.SIZE,"vec2"),t.attributes.add(P.r.ROTATION,"float"),(z||N)&&t.attributes.add(P.r.FEATUREATTRIBUTE,"vec4"),X.code.add(E?A.H`bool behindHorizon(vec3 posModel) {
2
2
  vec3 camToEarthCenter = pointDistanceSphere.xyz - localOrigin;
3
3
  vec3 camToPos = pointDistanceSphere.xyz + posModel;
4
4
  float earthRadius = pointDistanceSphere.w;
@@ -24,7 +24,7 @@ return b > 0.0 && b < a && b * b > a * c;
24
24
  }
25
25
 
26
26
  vec2 inputSize;
27
- ${(0,A.If)(U,A.H`
27
+ ${(0,A.If)(V,A.H`
28
28
  inputSize = screenSizePerspectiveScaleVec2(size, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspective);
29
29
  vec2 screenOffsetScaled = screenSizePerspectiveScaleVec2(screenOffset, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);`,A.H`
30
30
  inputSize = size;
@@ -46,8 +46,8 @@ return b > 0.0 && b < a && b * b > a * c;
46
46
  vec2 uvi1 = vec2(uvi.x < 0.0 ? 1.0 : 0.0, uvi.y < 0.0 ? 1.0 : 0.0);
47
47
  vec2 uv = abs(uvi + uvi1);
48
48
  vec2 texSize = vec2(textureSize(tex, 0));
49
- uv.x = uv.x >= ${V} ? 1.0 : uv.x / texSize.x;
50
- uv.y = uv.y >= ${V} ? 1.0 : uv.y / texSize.y;
49
+ uv.x = uv.x >= ${U} ? 1.0 : uv.x / texSize.x;
50
+ uv.y = uv.y >= ${U} ? 1.0 : uv.y / texSize.y;
51
51
  quadOffset.xy = (uvi1 - anchorPosition) * 2.0 * combinedSize;
52
52
 
53
53
  ${(0,A.If)(q,A.H`
@@ -60,7 +60,7 @@ return b > 0.0 && b < a && b * b > a * c;
60
60
  `)}
61
61
 
62
62
  quadOffset.xy = (quadOffset.xy + screenOffsetScaled) / viewport.zw * posProj.w;
63
- `,ee=D?r?A.H`posProj = alignToPixelOrigin(posProj, viewport.zw) + quadOffset;`:A.H`posProj += quadOffset;
63
+ `,ee=L?r?A.H`posProj = alignToPixelOrigin(posProj, viewport.zw) + quadOffset;`:A.H`posProj += quadOffset;
64
64
  if (inputSize.x == size.x) {
65
65
  posProj = alignToPixelOrigin(posProj, viewport.zw);
66
66
  }`:A.H`posProj += quadOffset;`;X.main.add(A.H`
@@ -165,7 +165,7 @@ posProj = alignToPixelOrigin(posProj, viewport.zw);
165
165
  ${re}
166
166
  outputObjectAndLayerIdColor();`);break;case o.V.Highlight:t.include(p.Q,e),W.main.add(A.H`
167
167
  ${re}
168
- outputHighlight(${(0,A.If)(Q,A.H`voccluded == 1.0`,A.H`false`)});`)}return t}function j(e){return e.outlineColor[3]>0&&e.outlineSize>0}function B(e){return e.textureIsSignedDistanceField?(t=e.anchorPosition,r=e.distanceFieldBoundingBox,i=L,(0,n.hZ)(i,t[0]*(r[2]-r[0])+r[0],t[1]*(r[3]-r[1])+r[1])):(0,n.C)(L,e.anchorPosition),L;var t,r,i}const L=(0,i.vt)(),U=32e3,V=A.H.float(U),k=Object.freeze(Object.defineProperty({__proto__:null,build:D,calculateAnchorPosition:B,fullUV:U,shaderSettings:E},Symbol.toStringTag,{value:"Module"}))},13755:(e,t,r)=>{r.d(t,{y:()=>c});var n,i=r(47522);!function(e){e[e.Occluded=0]="Occluded",e[e.NotOccluded=1]="NotOccluded",e[e.Both=2]="Both",e[e.COUNT=3]="COUNT"}(n||(n={}));var s=r(14314),a=r(33094),o=r(31821),l=r(12791);function c(e){e.vertex.uniforms.add(new a.U("renderTransparentlyOccludedHUD",(e=>e.hudRenderStyle===n.Occluded?1:e.hudRenderStyle===n.NotOccluded?0:.75)),new s.I("viewport",(e=>e.camera.fullViewport)),new l.x("hudVisibilityTexture",(e=>e.hudVisibility?.getTexture()))),e.vertex.include(i.K),e.vertex.code.add(o.H`bool testHUDVisibility(vec4 posProj) {
168
+ outputHighlight(${(0,A.If)(Q,A.H`voccluded == 1.0`,A.H`false`)});`)}return t}function D(e){return e.outlineColor[3]>0&&e.outlineSize>0}function j(e){return e.textureIsSignedDistanceField?(t=e.anchorPosition,r=e.distanceFieldBoundingBox,i=B,(0,n.hZ)(i,t[0]*(r[2]-r[0])+r[0],t[1]*(r[3]-r[1])+r[1])):(0,n.C)(B,e.anchorPosition),B;var t,r,i}const B=(0,i.vt)(),L=32e3,U=A.H.float(L),V=Object.freeze(Object.defineProperty({__proto__:null,build:E,calculateAnchorPosition:j,fullUV:L},Symbol.toStringTag,{value:"Module"}))},13755:(e,t,r)=>{r.d(t,{y:()=>c});var n,i=r(47522);!function(e){e[e.Occluded=0]="Occluded",e[e.NotOccluded=1]="NotOccluded",e[e.Both=2]="Both",e[e.COUNT=3]="COUNT"}(n||(n={}));var s=r(14314),a=r(33094),o=r(31821),l=r(12791);function c(e){e.vertex.uniforms.add(new a.U("renderTransparentlyOccludedHUD",(e=>e.hudRenderStyle===n.Occluded?1:e.hudRenderStyle===n.NotOccluded?0:.75)),new s.I("viewport",(e=>e.camera.fullViewport)),new l.x("hudVisibilityTexture",(e=>e.hudVisibility?.getTexture()))),e.vertex.include(i.K),e.vertex.code.add(o.H`bool testHUDVisibility(vec4 posProj) {
169
169
  vec4 posProjCenter = alignToPixelCenter(posProj, viewport.zw);
170
170
  vec4 occlusionPixel = texture(hudVisibilityTexture, .5 + .5 * posProjCenter.xy / posProjCenter.w);
171
171
  if (renderTransparentlyOccludedHUD > 0.5) {
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4246],{2073:(e,t,r)=>{r.d(t,{$n:()=>A,$r:()=>m,EM:()=>f,Ec:()=>N,JJ:()=>h,Mm:()=>M,OC:()=>P,Sr:()=>u,UO:()=>s,Vj:()=>R,WU:()=>E,Y8:()=>a,Z7:()=>l,_6:()=>v,aJ:()=>p,dd:()=>b,dn:()=>d,et:()=>S,fe:()=>_,gD:()=>T,hE:()=>c,hY:()=>i,iM:()=>w,mt:()=>g,ow:()=>y,vS:()=>G});var n=r(66552);const o={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},i=(0,n.O)()(o),a=(0,n.O)()({...o,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),s=(0,n.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),l=(0,n.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),d=(0,n.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"}),p=(0,n.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),u=(0,n.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),c=((0,n.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,n.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),y=((0,n.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,n.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,n.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),h=(0,n.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),f=(0,n.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),m=(0,n.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),g=(0,n.O)()({1:"right",2:"left"},{useNumericKeys:!0}),w=(0,n.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),_=(0,n.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),v=(0,n.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),T=(0,n.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),A=(0,n.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),b=(0,n.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),M=(0,n.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),S=(0,n.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),P=(0,n.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),G=(0,n.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),R=(0,n.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),E=(0,n.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),N=(0,n.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"})},22671:(e,t,r)=>{r.d(t,{A:()=>w});var n,o=r(90237),i=r(52106),a=r(66552),s=r(25482),l=r(4718),d=r(10107),p=(r(44208),r(53966),r(36005)),u=r(40608),c=r(43937),y=r(16930),h=r(65864),f=r(50498),m=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends s.A{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){return this.readFeaturesWithClass(e,t,i.A)}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,h.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=y.A.fromJSON(t.spatialReference)),n}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 n(this.cloneProperties())}cloneProperties(){return(0,l.o8)({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 n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,o]}=e,i=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=i.length;e<t;e++)a?.(i[e].geometry)||(i.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:[n,o],scale:[i,a]}=r;let s=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;s=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 d=this._getHydrationFunction(e,(e=>e*i+n),(e=>o-e*a),s,l);for(const{geometry:e}of t)null!=e&&d&&d(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const n=y.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const i=e[t],a=r.fromJSON(i),s=i.geometry?.spatialReference;null==a.geometry||s||(a.geometry.spatialReference=n);const l=i.aggregateGeometries,d=a.aggregateGeometries;if(l&&null!=d)for(const e in d){const t=d[e],r=l[e],o=r?.spatialReference;null==t||o||(t.spatialReference=n)}o.push(a)}return o}_quantizePoints(e,t,r){let n,o;const i=[];for(let a=0,s=e.length;a<s;a++){const s=e[a];if(a>0){const e=t(s[0]),a=r(s[1]);e===n&&a===o||(i.push([e-n,a-o]),n=e,o=a)}else n=t(s[0]),o=r(s[1]),i.push([n,o])}return i.length>0?i: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 n=(0,h.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,i=n.length;e<i;e++){const i=n[e],a=this._quantizePoints(i,t,r);a&&o.push(a)}return o.length>0?((0,h.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,h.Bi)(e)?e.rings:e.paths;let a,s;for(let e=0,n=i.length;e<n;e++){const n=i[e];for(let e=0,o=n.length;e<o;e++){const o=n[e];e>0?(a+=o[0],s+=o[1]):(a=o[0],s=o[1]),o[0]=t(a),o[1]=r(s)}}if(n&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=o(r[3])}}else if(n)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(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),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let a,s;for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(a+=n[0],s+=n[1]):(a=n[0],s=n[1]),n[0]=t(a),n[1]=r(s)}if(n&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=n(t[2]),t[3]=o(t[3])}else if(n)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=n(t[2])}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,d.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o._)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,d.MZ)({type:[i.A],json:{write:!0}})],w.prototype,"features",void 0),(0,o._)([(0,p.w)("features")],w.prototype,"readFeatures",null),(0,o._)([(0,d.MZ)({type:[m.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,o._)([(0,d.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,o._)([(0,c.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,o._)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o._)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o._)([(0,d.MZ)({types:f.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o._)([(0,p.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o._)([(0,d.MZ)({type:y.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o._)([(0,c.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o._)([(0,d.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,o._)([(0,u.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},34246:(e,t,r)=>{r.r(t),r.d(t,{_checkAuthentication:()=>Qt,_esriRequestWrapper:()=>Ht,_fetchWrapper:()=>Bt,_getClientDataCacheCopy:()=>St,_setMaxQueryParsingDurationForTesting:()=>rr,_submitJobWrapper:()=>Yt,clearClientDataCache:()=>Vt,clientDataCache:()=>Mt,executeAddGraphProperties:()=>kt,executeAddNamedTypes:()=>Rt,executeApplyEdits:()=>Gt,executeDeleteGraphProperty:()=>It,executeDeleteNamedType:()=>Et,executeFindPaths:()=>$t,executeFindPathsAsynchronous:()=>zt,executeQuery:()=>Ot,executeQueryStreaming:()=>jt,executeSearch:()=>Ct,executeSearchStreaming:()=>Ut,executeUpdateGraphProperty:()=>xt,executeUpdateNamedType:()=>Nt,executeUpdateSearchIndex:()=>Dt,fetchAllClientDataKeys:()=>Zt,fetchAsynchronousFindPathsResultData:()=>Jt,fetchClientDataAtKeys:()=>Ft,fetchKnowledgeGraph:()=>qt,kgRestServices:()=>Pt,refreshDataModel:()=>Lt,refreshServiceDefinition:()=>Kt});var n,o=r(70333),i=r(78888),a=r(49186),s=r(53966),l=r(74887),d=r(91075),p=r(16930),u=r(90237),c=r(69622),y=r(10107),h=r(56507),f=(r(44208),r(87811),r(40608)),m=r(5443);let g=n=class extends c.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,h.PZ)(n,e)}};(0,u._)([(0,y.MZ)({type:p.A})],g.prototype,"outSpatialReference",void 0),(0,u._)([(0,y.MZ)({type:m.A})],g.prototype,"processExtent",void 0),(0,u._)([(0,y.MZ)({type:p.A})],g.prototype,"processSpatialReference",void 0),(0,u._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnColumnName",void 0),(0,u._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnFeatureCollection",void 0),(0,u._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnM",void 0),(0,u._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnZ",void 0),g=n=(0,u._)([(0,f.$)("esri.rest.geoprocessor.GPOptions")],g);var w=r(17136),_=r(20437),v=r(25482);let T=class extends v.A{constructor(){super(...arguments),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,u._)([(0,y.MZ)({type:m.A})],T.prototype,"extent",void 0),(0,u._)([(0,y.MZ)()],T.prototype,"height",void 0),(0,u._)([(0,y.MZ)()],T.prototype,"href",void 0),(0,u._)([(0,y.MZ)()],T.prototype,"opacity",void 0),(0,u._)([(0,y.MZ)()],T.prototype,"rotation",void 0),(0,u._)([(0,y.MZ)()],T.prototype,"scale",void 0),(0,u._)([(0,y.MZ)()],T.prototype,"visible",void 0),(0,u._)([(0,y.MZ)()],T.prototype,"width",void 0),T=(0,u._)([(0,f.$)("esri.layers.support.MapImage")],T);var A=r(2272),b=r(93223),M=r(2073);let S=class extends v.A{constructor(e){super(e),this.area=0,this.units=null}};(0,u._)([(0,y.MZ)({json:{write:!0}})],S.prototype,"area",void 0),(0,u._)([(0,b.e)(M.UO)],S.prototype,"units",void 0),S=(0,u._)([(0,f.$)("esri.rest.support.ArealUnit")],S);let P=class extends v.A{constructor(e){super(e),this.itemId=null,this.url=null}};(0,u._)([(0,y.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],P.prototype,"itemId",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],P.prototype,"url",void 0),P=(0,u._)([(0,f.$)("esri.rest.support.DataFile")],P);var G=r(22671);let R=class extends v.A{constructor(e){super(e),this.distance=0,this.units=null}};(0,u._)([(0,y.MZ)({json:{write:!0}})],R.prototype,"distance",void 0),(0,u._)([(0,b.e)(M.Y8)],R.prototype,"units",void 0),R=(0,u._)([(0,f.$)("esri.rest.support.LinearUnit")],R);var E=r(66552);const N="multi-value-",k=new E.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${N}areal-unit`,"GPMultiValue:GPBoolean":`${N}boolean`,"GPMultiValue:GPComposite":`${N}composite`,"GPMultiValue:GPDataFile":`${N}data-file`,"GPMultiValue:GPDate":`${N}date`,"GPMultiValue:GPDouble":`${N}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${N}feature-record-set-layer`,"GPMultiValue:Field":`${N}field`,"GPMultiValue:GPLinearUnit":`${N}linear-unit`,"GPMultiValue:GPLong":`${N}long`,"GPMultiValue:GPRasterData":`${N}raster-data`,"GPMultiValue:GPRasterDataLayer":`${N}raster-data-layer`,"GPMultiValue:GPRecordSet":`${N}record-set`,"GPMultiValue:GPString":`${N}string`});let I=class extends v.A{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,u._)([(0,b.e)(k,{ignoreUnknown:!1})],I.prototype,"dataType",void 0),(0,u._)([(0,y.MZ)()],I.prototype,"paramName",void 0),(0,u._)([(0,y.MZ)()],I.prototype,"value",void 0),I=(0,u._)([(0,f.$)("esri.rest.support.ParameterValue")],I);var x=r(36005);let D=class extends v.A{constructor(e){super(e),this.format=null,this.itemId=null,this.type=null,this.url=null}readType(e){return"ImageService"===e?"image-service":null}};async function O(e,t){switch(e){case"areal-unit":return S.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return P.fromJSON(t);case"linear-unit":return R.fromJSON(t);case"feature-record-set-layer":if("url"in t)return P.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(13),r.e(8988),r.e(1214),r.e(9953),r.e(1956),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(3600),r.e(2470)]).then(r.bind(r,13600))).default),{layerDefinition:n,featureSet:o}=t;return e.read({layerDefinition:n,featureSet:o},{origin:"portal-item"}),e.spatialReference=p.A.fromJSON(o.spatialReference??n.spatialReference??n.extent.spatialReference),e}return G.A.fromJSON(t);case"record-set":return"url"in t?P.fromJSON(t):G.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?T.fromJSON(t.mapImage):D.fromJSON(t);case"field":return _.A.fromJSON(t)}}async function j(e){const t=k.fromJSON(e.dataType),{paramName:r}=e,n=function(e){return e.startsWith(N)}(t)?await async function(e,t){const r=function(e){return e.replace(N,"")}(e),n="composite"===r?t.map((e=>O(k.fromJSON(e.dataType),e.value))):t.map((e=>O(r,e)));return Promise.all(n)}(t,e.value):await O(t,e.value);return new I({dataType:t,paramName:r,value:n})}function C(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map((e=>C({item:e},!0).item))):r instanceof Date&&(e[t]=r.getTime())}return(0,A.lF)(e,t,r)}(0,u._)([(0,y.MZ)()],D.prototype,"format",void 0),(0,u._)([(0,y.MZ)({json:{name:"itemID",write:!0}})],D.prototype,"itemId",void 0),(0,u._)([(0,y.MZ)()],D.prototype,"type",void 0),(0,u._)([(0,x.w)("type")],D.prototype,"readType",null),(0,u._)([(0,y.MZ)({json:{write:!0}})],D.prototype,"url",void 0),D=(0,u._)([(0,f.$)("esri.rest.support.RasterData")],D);var U,Z=r(37807);const F=(0,E.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),q=1e3;let L=class extends v.A{static{U=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:t,sourceUrl:r}=this,{path:n}=(0,A.Dl)(r),o={...this.requestOptions,...e,query:{f:"json"}},a=`${n}/jobs/${t}/cancel`,{data:s}=await(0,i.A)(a,o),{messages:d,jobStatus:p,progress:u}=U.fromJSON(s);return this.set({messages:d,jobStatus:p,progress:u}),"job-cancelled"===p?this:new Promise(((t,r)=>{(0,l.u7)(o.signal,(()=>{this.clearCancelJobTimer(),r((0,l.NK)())})),this.clearCancelJobTimer();const n=()=>{this._cancelJobTimer||r((0,l.NK)()),this.checkJobStatus(e).then((({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(n,q);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}})).catch((e=>{r(e)}))};this._cancelJobTimer=setTimeout(n,q)}))}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,A.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{f:"json"}},n=`${t}/jobs/${this.jobId}`,{data:o}=await(0,i.A)(n,r),{messages:a,jobStatus:s,progress:l}=U.fromJSON(o);return this.set({messages:a,jobStatus:s,progress:l}),this}async fetchResultData(e,t,r){t=g.from(t||{});const{returnColumnName:n,returnFeatureCollection:o,returnM:a,returnZ:s,outSpatialReference:l}=t,{path:d}=(0,A.Dl)(this.sourceUrl),p=C({returnColumnName:n||null,returnFeatureCollection:o||null,returnM:a||null,returnZ:s||null,outSR:l,returnType:"data",f:"json"},null),u={...this.requestOptions,...r,query:p},c=`${d}/jobs/${this.jobId}/results/${e}`,{data:y}=await(0,i.A)(c,u);return j(y)}async fetchResultImage(e,t,r){const{path:n}=(0,A.Dl)(this.sourceUrl),o=C({...t.toJSON(),f:"json"}),a={...this.requestOptions,...r,query:o},s=`${n}/jobs/${this.jobId}/results/${e}`,{data:l}=await(0,i.A)(s,a);return j(l)}async fetchResultMapImageLayer(){const{path:e}=(0,A.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),n=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(13),r.e(8988),r.e(1214),r.e(1956),r.e(4796),r.e(4111),r.e(364),r.e(4341),r.e(7656),r.e(788)]).then(r.bind(r,7656))).default)({url:n})}async waitForJobCompletion(e={}){const{interval:t=q,signal:r,statusCallback:n}=e;return new Promise(((e,o)=>{(0,l.u7)(r,(()=>{this.clearJobCompletionTimer(),o((0,l.NK)())})),this.clearJobCompletionTimer();const i=()=>{this._jobCompletionTimer||o((0,l.NK)()),this.checkJobStatus().then((({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":n&&n(this),this._jobCompletionTimer=setTimeout(i,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":o(this);break;default:this._jobCompletionTimer=setTimeout(i,t)}})).catch((e=>{o(e)}))};this._jobCompletionTimer=setTimeout(i,t)}))}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,u._)([(0,y.MZ)()],L.prototype,"jobId",void 0),(0,u._)([(0,b.e)(F,{ignoreUnknown:!1})],L.prototype,"jobStatus",void 0),(0,u._)([(0,y.MZ)({type:[Z.A]})],L.prototype,"messages",void 0),(0,u._)([(0,y.MZ)()],L.prototype,"progress",void 0),(0,u._)([(0,y.MZ)()],L.prototype,"requestOptions",void 0),(0,u._)([(0,y.MZ)({json:{write:!0}})],L.prototype,"sourceUrl",void 0),L=U=(0,u._)([(0,f.$)("esri.rest.support.JobInfo")],L);let K=class extends c.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,u._)([(0,y.MZ)()],K.prototype,"headerKeys",void 0),(0,u._)([(0,y.MZ)()],K.prototype,"outSpatialReference",void 0),(0,u._)([(0,y.MZ)()],K.prototype,"exceededTransferLimit",void 0),K=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],K);let z=class extends c.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new K}};(0,u._)([(0,y.MZ)()],z.prototype,"resultRows",void 0),(0,u._)([(0,y.MZ)()],z.prototype,"resultHeader",void 0),z=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResult")],z);let $=class extends c.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new K}};(0,u._)([(0,y.MZ)()],$.prototype,"resultRowsStream",void 0),(0,u._)([(0,y.MZ)()],$.prototype,"resultHeader",void 0),$=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],$);let J=class extends v.A{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],J.prototype,"name",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],J.prototype,"unique",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],J.prototype,"ascending",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],J.prototype,"description",void 0),(0,u._)([(0,y.MZ)({type:[String],json:{write:!0}})],J.prototype,"fieldNames",void 0),J=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.FieldIndex")],J);let V=class extends v.A{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.defaultValue=null}};(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],V.prototype,"name",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],V.prototype,"alias",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],V.prototype,"fieldType",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],V.prototype,"geometryType",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"hasM",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"hasZ",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"nullable",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"editable",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"required",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"defaultVisibility",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"systemMaintained",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],V.prototype,"role",void 0),(0,u._)([(0,y.MZ)({json:{write:!0}})],V.prototype,"defaultValue",void 0),V=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.GraphProperty")],V);let B=class extends v.A{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"name",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"alias",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"role",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],B.prototype,"strict",void 0),(0,u._)([(0,y.MZ)({type:[V],json:{write:!0}})],B.prototype,"properties",void 0),(0,u._)([(0,y.MZ)({type:[J],json:{write:!0}})],B.prototype,"fieldIndexes",void 0),B=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.GraphObjectType")],B);let Y=class extends B{constructor(e){super(e),this.type="entity"}};Y=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.EntityType")],Y);let H=class extends B{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,u._)([(0,y.MZ)({json:{write:!0}})],H.prototype,"endPoints",void 0),H=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.RelationshipType")],H);let Q=class extends v.A{constructor(e){super(e),this.value=null,this.behavior=null}};(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"value",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"behavior",void 0),Q=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],Q);let W=class extends v.A{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[]}};(0,u._)([(0,y.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],W.prototype,"timestamp",void 0),(0,u._)([(0,y.MZ)({type:p.A,json:{write:!0}})],W.prototype,"spatialReference",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"strict",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"objectIdField",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"globalIdField",void 0),(0,u._)([(0,y.MZ)()],W.prototype,"arcgisManaged",void 0),(0,u._)([(0,y.MZ)()],W.prototype,"identifierInfo",void 0),(0,u._)([(0,y.MZ)()],W.prototype,"searchIndexes",void 0),(0,u._)([(0,y.MZ)({type:[Y],json:{write:!0}})],W.prototype,"entityTypes",void 0),(0,u._)([(0,y.MZ)({type:[H],json:{write:!0}})],W.prototype,"relationshipTypes",void 0),(0,u._)([(0,y.MZ)({type:[Y],json:{write:!0}})],W.prototype,"metaEntityTypes",void 0),(0,u._)([(0,y.MZ)({type:[Q],json:{write:!0}})],W.prototype,"provenanceSourceTypeValues",void 0),W=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.DataModel")],W);let X=class extends v.A{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,u._)([(0,y.MZ)({type:[String],json:{write:!0}})],X.prototype,"capabilities",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsSearch",void 0),(0,u._)([(0,y.MZ)({type:[String],json:{write:!0}})],X.prototype,"supportedQueryFormats",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"allowGeometryUpdates",void 0),(0,u._)([(0,y.MZ)({type:Number,json:{write:!0}})],X.prototype,"searchMaxRecordCount",void 0),(0,u._)([(0,y.MZ)({type:Object,json:{write:!0}})],X.prototype,"serviceCapabilities",void 0),(0,u._)([(0,y.MZ)({type:Number,json:{write:!0}})],X.prototype,"maxRecordCount",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],X.prototype,"description",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],X.prototype,"copyrightText",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],X.prototype,"units",void 0),(0,u._)([(0,y.MZ)({type:p.A,json:{write:!0}})],X.prototype,"spatialReference",void 0),(0,u._)([(0,y.MZ)({type:Number,json:{write:!0}})],X.prototype,"currentVersion",void 0),(0,u._)([(0,y.MZ)({type:Object,json:{write:!0}})],X.prototype,"dateFieldsTimeReference",void 0),(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],X.prototype,"serviceItemId",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsDocuments",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"dataEditingNotSupported",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"schemaEditingNotSupported",void 0),(0,u._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsProvenance",void 0),X=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.ServiceDefinition")],X);let ee=class extends v.A{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};function te(e,t,r){if(0!==e.error_code)throw new a.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function re(e){return e?.error_code?new a.A("knowledgeGraphService:server-or-decoding-error",e.error_message,{errorCode:e.error_code}):void 0}function ne(e,t,r,n){const o=new r.ClientDataKey;o.deleteLater(),o.key_string=e;const i=new r.ClientDataFetchRequestParameter;i.deleteLater(),i.set_key(o);const a=t.get(e);return a&&!n&&(i.v_tag={v_tag:a.version}),i}(0,u._)([(0,y.MZ)({type:String,json:{write:!0}})],ee.prototype,"url",void 0),(0,u._)([(0,y.MZ)({type:W,json:{write:!0}})],ee.prototype,"dataModel",void 0),(0,u._)([(0,y.MZ)({type:X,json:{write:!0}})],ee.prototype,"serviceDefinition",void 0),ee=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],ee);var oe,ie,ae,se=r(45724),le=r(48526),de=r(86738),pe=r(39829),ue=r(82799);function ce(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(fe(e,t))})),r}function ye(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,o]of Object.entries(e))r.set_key_value(n,fe(o,t));return r}function he(e,t){if(e instanceof le.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=e.points.length;let i=0;return e.points.forEach((e=>{e.forEach((e=>{n[i]=e,i++}))})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof de.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=1,n[0]=e.x,n[1]=e.y;let i=2;return e.hasZ&&(n[i]=e.z,i++),e.hasM&&(n[i]=e.m,i++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof ue.A||e instanceof pe.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];let i=[];e instanceof ue.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,i=e.paths):e instanceof pe.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,i=e.rings);let a=0,s=0;return i.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{n[s]=e,s++}))})),o[a]=t,a++})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);throw new a.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function fe(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof d.A)return he(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(fe(e,t))})),r}return ye(e,t)}!function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(oe||(oe={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(ie||(ie={})),function(e){e[e.exclude=0]="exclude",e[e.include=1]="include"}(ae||(ae={}));var me,ge,we,_e,ve=r(35448);function Te(e,t){if(!e.typeName)throw new a.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in e)){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,Pe(o,t));return e.id&&r.set_id(e.id),r}if("originId"in e&&"destinationId"in e){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,Pe(o,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new a.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function Ae(e,t){const r=new t.GraphProperty;return r.deleteLater(),r.name=e.name,r.alias=e.alias??"",r.field_type={value:ve.r5[e.fieldType]},r.geometry_type={value:e.geometryType?ve.bV[e.geometryType]:ve.bV.esriGeometryNull},r.has_m=e.hasM??!1,r.has_z=e.hasZ??!1,r.nullable=e.nullable??!1,r.editable=e.editable,r.required=e.required,r.default_visibility=e.defaultVisibility,r.system_maintained=e.systemMaintained??!1,r.role={value:ve.ti[e.role]},r.default_value=Pe(e.defaultValue,t),r}function be(e,t){const r=new t.SearchIndexProperties;r.deleteLater();for(const t of e.propertyNames)r.add_search_property_name(t);return r}function Me(e,t,r){r.name=e.name,r.alias=e.alias??"",r.role={value:ve.Eq[e.role]},r.strict=e.strict;for(const n of e.properties){const e=Ae(n,t);r.add_property(e)}return r}function Se(e,t){return e.hasOwnProperty("alias")&&(t.alias=e.alias),t}function Pe(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof d.A?he(e,t):null}function Ge(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const n=t.get_key_at(e);n.get_client_data_key_type().value===me.ClientDataKeyTypeString&&r.push(n.key_string)}return r}!function(e){e[e.ClientDataKeyTypeUNSPECIFIED=0]="ClientDataKeyTypeUNSPECIFIED",e[e.ClientDataKeyTypeString=1]="ClientDataKeyTypeString"}(me||(me={})),function(e){e[e.ClientDataTypeUNSPECIFIED=0]="ClientDataTypeUNSPECIFIED",e[e.ClientDataTypeString=1]="ClientDataTypeString"}(ge||(ge={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.ClientData=1]="ClientData",e[e.NotModified=2]="NotModified"}(we||(we={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.Error=1]="Error",e[e.ClientDataValue=2]="ClientDataValue"}(_e||(_e={}));let Re=class extends c.A{constructor(e){super(e),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.decoderError=null,this.entityAddResults=[],this.relationshipAddResults=[],this.updatedKnowledgeGraph=null}};(0,u._)([(0,y.MZ)()],Re.prototype,"entityAddResultsCount",void 0),(0,u._)([(0,y.MZ)()],Re.prototype,"relationshipAddResultsCount",void 0),(0,u._)([(0,y.MZ)()],Re.prototype,"decoderError",void 0),(0,u._)([(0,y.MZ)()],Re.prototype,"entityAddResults",void 0),(0,u._)([(0,y.MZ)()],Re.prototype,"relationshipAddResults",void 0),(0,u._)([(0,y.MZ)()],Re.prototype,"updatedKnowledgeGraph",void 0),Re=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],Re);const Ee=Re;let Ne=class extends c.A{constructor(e){super(e),this.updatedKnowledgeGraph=null}};(0,u._)([(0,y.MZ)()],Ne.prototype,"decoderError",void 0),(0,u._)([(0,y.MZ)()],Ne.prototype,"updatedKnowledgeGraph",void 0),Ne=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.GraphAddPropertyResult")],Ne);const ke=Ne;let Ie=class extends c.A{constructor(e){super(e),this.decoderError=null,this.updatedKnowledgeGraph=null}};(0,u._)([(0,y.MZ)()],Ie.prototype,"decoderError",void 0),(0,u._)([(0,y.MZ)()],Ie.prototype,"updatedKnowledgeGraph",void 0),Ie=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],Ie);const xe=Ie;let De=class extends c.A{constructor(e){super(e),this.updatedKnowledgeGraph=null}};(0,u._)([(0,y.MZ)()],De.prototype,"decoderError",void 0),(0,u._)([(0,y.MZ)()],De.prototype,"updatedKnowledgeGraph",void 0),De=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.GraphDeletePropertyResult")],De);const Oe=De;let je=class extends c.A{constructor(e){super(e),this.updatedKnowledgeGraph=null}};(0,u._)([(0,y.MZ)()],je.prototype,"decoderError",void 0),(0,u._)([(0,y.MZ)()],je.prototype,"updatedKnowledgeGraph",void 0),je=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.GraphUpdateNamedTypesResult")],je);const Ce=je;let Ue=class extends c.A{constructor(e){super(e),this.updatedKnowledgeGraph=null}};(0,u._)([(0,y.MZ)()],Ue.prototype,"decoderError",void 0),(0,u._)([(0,y.MZ)()],Ue.prototype,"updatedKnowledgeGraph",void 0),Ue=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.GraphUpdatePropertyResult")],Ue);const Ze=Ue;function Fe(e){const t=e.get_entity_type_add_results_count(),r=e.get_relationship_type_add_results_count(),n=new Ee({decoderError:re(e.error),entityAddResultsCount:t,relationshipAddResultsCount:r});for(let r=0;r<t;r++){const t=e.get_entity_type_add_results_at(r),o=t.get_name(),i=t.get_error();n.entityAddResults.push({typeName:o,error:re(i)})}for(let t=0;t<r;t++){const r=e.get_relationship_type_add_results_at(t),o=r.get_name(),i=r.get_error();n.relationshipAddResults.push({typeName:o,error:re(i)})}return n}function qe(e){return new Ce({decoderError:re(e.error)})}function Le(e){return new xe({decoderError:re(e.error)})}function Ke(e){return new ke({decoderError:re(e.error)})}function ze(e){return new Oe({decoderError:re(e.error)})}function $e(e){return new Ze({decoderError:re(e.error)})}function Je(e){return new Ce({decoderError:re(e.error)})}let Ve=class extends c.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,u._)([(0,y.MZ)()],Ve.prototype,"name",void 0),(0,u._)([(0,y.MZ)()],Ve.prototype,"supportedCategory",void 0),(0,u._)([(0,y.MZ)()],Ve.prototype,"analyzers",void 0),(0,u._)([(0,y.MZ)()],Ve.prototype,"searchProperties",void 0),Ve=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.SearchIndex")],Ve);let Be=!1;function Ye(e){return e.deleteLater(),new Y(Qe(e))}function He(e){return e.deleteLater(),new J({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:rt(e.fields)})}function Qe(e){return{name:e.name,alias:e.alias,role:ve.Eq[e.role.value],strict:e.strict,properties:nt(e.properties),fieldIndexes:ot(e.field_indexes)}}function We(e){return e.deleteLater(),new V({alias:e.alias,name:e.name,fieldType:ve.r5[e.field_type.value]?ve.r5[e.field_type.value]:void 0,geometryType:ve.bV[e.geometry_type.value]?ve.bV[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:ve.ti[e.role.value],defaultValue:e.default_value})}function Xe(e){e.deleteLater();const t=Qe(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return e.end_points.delete(),new H(Object.assign({endPoints:r},t))}function et(e){return new Q({behavior:e.behavior,value:e.value})}function tt(e){const t=[];for(let r=0;r<e.size();r++)t.push(Ye(e.get(r)));return e.delete(),t}function rt(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function nt(e){const t=[];for(let r=0;r<e.size();r++){const n=We(e.get(r));"esriFieldTypeBigInteger"===n.fieldType&&(Be=!0),t.push(n)}return e.delete(),t}function ot(e){const t=[];for(let r=0;r<e.size();r++)t.push(He(e.get(r)));return e.delete(),t}function it(e){const t=[];for(let r=0;r<e.size();r++)t.push(Xe(e.get(r)));return e.delete(),t}function at(e){const t=[];for(let r=0;r<e.size();r++){const n=e.get(r);n.deleteLater(),t.push(et(n))}return e.delete(),t}function st(e){const t=[];for(let r=0;r<e.size();r++){const r=new Ve,n=e.get(0);r.name=n.name,r.supportedCategory=ve.nP[n.supported_category.value];const o=n.analyzers.size();for(let e=0;e<o;e++)r.analyzers.push({name:n.analyzers.get(e).name});n.analyzers.delete();for(let e=0;e<n.search_properties.keys().size();e++){const t=n.search_properties.keys().get(e),o=n.search_properties.get(t),i=[];for(let e=0;e<o.property_names.size();e++)i.push(o.property_names.get(e));r.searchProperties.set(t,{propertyNames:i})}t.push(r)}return e.delete(),t}var lt,dt=r(25927),pt=(r(77901),r(40662)),ut=r(42095),ct=r(23150);function yt(e,t){const r={paths:[],hasM:!1,hasZ:!1},n=ht(e,r),{coords:o,geometry_type:i,lengths:s}=e;if(i.value!==t)throw new a.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let l=0;return s.forEach((e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e[t]=o[l],l++;t.push(e)}r.paths.push(t)})),r}function ht(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(lt||(lt={}));const ft=()=>s.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function mt(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case lt.ESRI_GEOMETRY_POINT:return function(e,t){const r={spatialReference:t};let n=2;ht(e,r);const o=e.coords;return r.x=o[0],r.y=o[1],e.has_z&&(r.z=o[n],n++),e.has_m&&(r.m=o[n]),new de.A(r)}(e,r);case lt.ESRI_GEOMETRY_MULTIPOINT:return function(e,t){const r={spatialReference:t},n=ht(e,r),o=e.lengths,i=e.coords,a=o[0];r.points=[];let s=0;for(let e=0;e<a;e++){const e=[];for(let t=0;t<n;t++)e[t]=i[s],s++;r.points.push(e)}return new le.A(r)}(e,r);case lt.ESRI_GEOMETRY_POLYLINE:return function(e,t){const{paths:r,hasM:n,hasZ:o}=yt(e,lt.ESRI_GEOMETRY_POLYLINE);return new ue.A({paths:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case lt.ESRI_GEOMETRY_POLYGON:return function(e,t){const{paths:r,hasM:n,hasZ:o}=yt(e,lt.ESRI_GEOMETRY_POLYGON);return new pe.A({rings:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case lt.ESRI_GEOMETRY_ENVELOPE:case lt.ESRI_GEOMETRY_MULTI_PATCH:return ft().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case lt.ESRI_GEOMETRY_NULL:case lt.ESRI_GEOMETRY_ANY:default:return ft().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return ft().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case oe.OBJECT:return function(e,t,r){return new pt.A(wt(e,t,r))}(e,t,r);case oe.ENTITY:return gt(e,t,r);case oe.RELATIONSHIP:return _t(e,t,r);case oe.PATH:return function(e,t,r){const n=e.entity_count(),o=e.relationship_count(),i=[];for(let a=0;a<n;a++)i.push(gt(e.get_entity_at(a),t,r)),a<o&&i.push(_t(e.get_relationship_at(a),t,r));return new ut.A({path:i})}(e,t,r);case oe.ARRAY:return function(e,t,r){const n=[],o=e.count();for(let i=0;i<o;i++){const o=e.get_value_at(i);n.push(mt(o,t,r))}return n}(e,t,r);default:return ft().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function gt(e,t,r){const n=e.type_name,o=wt(e,t,r),i=e.get_id();return new dt.A(Object.assign({typeName:n,id:i},o))}function wt(e,t,r){const n={},o=e.key_count();for(let i=0;i<o;i++)n[e.get_key_at(i)]=mt(e.get_value_at(i),t,r);return{properties:n}}function _t(e,t,r){const n=e.type_name,o=wt(e,t,r);return new ct.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},o))}function vt(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new p.A(e.get_out_sr());return new K({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let Tt=class extends c.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.editResults=[]}};(0,u._)([(0,y.MZ)()],Tt.prototype,"hasError",void 0),(0,u._)([(0,y.MZ)()],Tt.prototype,"error",void 0),(0,u._)([(0,y.MZ)()],Tt.prototype,"editResults",void 0),Tt=(0,u._)([(0,f.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],Tt);const At=Tt;function bt(e){const t=e.has_error(),r=new At({hasError:t,error:t?re(e.error):null}),n=e.get_edit_results_count();for(let t=0;t<n;t++){const n=e.get_edit_results_at(t),o=e.get_edit_results_type_name_at(t),i=[],a=[],s=[],l=n.get_add_results_count(),d=n.get_update_results_count(),p=n.get_delete_results_count();for(let e=0;e<l;e++){const t=n.get_add_result_at(e);i.push({id:t.id,error:re(t.error)})}for(let e=0;e<d;e++){const t=n.get_update_result_at(e);a.push({id:t.id,error:re(t.error)})}for(let e=0;e<p;e++){const t=n.get_delete_result_at(e);s.push({id:t.id,error:re(t.error)})}r.editResults.push({typeName:o,adds:i,updates:a,deletes:s})}return r}const Mt=new Map,St=()=>new Map(Mt.entries()),Pt={fetchKnowledgeGraph:async e=>{const t=new ee({url:e}),r=[];return r.push(Lt(t)),r.push(Kt(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await ir(e)},refreshServiceDefinition:async e=>{const t=(await(0,i.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new X(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new a.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /reset/services/");const n=r[0];return await Yt(`${n}/rest/services/System/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new a.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /reset/services/");const n=r[0],o=await Ht(`${n}/rest/services/System/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,{method:"post",query:{f:"pjson",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(o.data.results.length<1)throw new a.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",o);let i;for(const e of o.data.results)if("out_results_string"===e.paramName){i=e.value;break}if(!i)throw new a.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",o);return i},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await Qt(e);const o=await Xt(n,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new a.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");o.data.body=await async function(e,t){const r=await(0,se.I)(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),e.outputSpatialReference?n.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,o]of Object.entries(e.bindParameters))Wt(t,o,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await Lt(t),4326!==t.dataModel?.spatialReference?.wkid)throw new a.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new a.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new a.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new a.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:ae[e]}}(e.provenanceBehavior,n);try{n.encode()}catch(e){throw new a.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const o=n.get_encoding_result();if(0!==o.error.error_code)throw new a.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:o.error.error_code,errorMessage:o.error.error_message});return structuredClone(o.get_byte_buffer())}(t,e);const i=await Bt(o.data.url,o.data);if(e.dataModel){const t=await or(i,e.dataModel);return new $({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new a.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new a.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await Qt(e);const o=await Xt(n,r);return o.data.body=await async function(e,t){if(t.dataModel||await Lt(t),!t.dataModel)throw new a.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,se.I)(),n=!!e.options?.cascadeDelete,o=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());o.deleteLater(),o.cascade_delete=n;try{let t;e.entityAdds?.forEach((e=>{t=o.add_entity(Te(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new a.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=o.add_relationship(Te(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new a.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_entity(Te(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new a.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_relationship(Te(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new a.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new a.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),o.encode()}catch(e){throw new a.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const i=o.get_encoding_result();return te(i.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(i.get_byte_buffer())}(t,e),async function(e){return er(e,(await(0,se.I)()).GraphApplyEditsDecoder,bt)}(await Bt(o.data.url,o.data))},executeAddNamedTypes:async(e,t,r)=>{if(!t.newEntityTypes?.length&&!t.newRelationshipTypes?.length)throw new a.A("knowledge-graph:no-arguments","The operation to add types to the data model contained no values");const n=`${e.url}/dataModel/edit/namedTypes/add`;await Qt(e);const o=await Xt(n,r);o.data.body=await async function(e){const t=await(0,se.I)(),r=new t.GraphNamedObjectTypeAddsRequestEncoder;r.deleteLater(),e.newEntityTypes?.forEach((e=>{r.add_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),Me(e,t,r)}(e,t))})),e.newRelationshipTypes?.forEach((e=>{r.add_relationship_type(function(e,t){const r=new t.RelationshipType;r.deleteLater();for(const n of e.endPoints){const e=new t.EndPoint;e.deleteLater(),e.origin_entity_type=n.originEntityType,e.dest_entity_type=n.destinationEntityType,r.add_end_point(e)}return Me(e,t,r)}(e,t))}));try{r.encode()}catch(e){throw new a.A("knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed",{error:e})}const n=r.get_encoding_result();return te(n.error,"knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed"),structuredClone(n.get_byte_buffer())}(t);const i=await Bt(o.data.url,o.data),s=await async function(e){return er(e,(await(0,se.I)()).GraphNamedObjectTypeAddsResponseDecoder,Fe)}(i);return s.updatedKnowledgeGraph=await qt(e.url),s},executeDeleteNamedType:async(e,t,r)=>{if(!t)throw new a.A("knowledge-graph:no-arguments","The operation to delete a named type from the data model contained no value");const n=`${e.url}/dataModel/edit/namedTypes/${t}/delete`;await Qt(e);const o=await Xt(n,r);o.data.body="";const i=await Bt(o.data.url,o.data),s=await async function(e){return er(e,(await(0,se.I)()).GraphNamedObjectTypeDeleteResponseDecoder,Le)}(i);return s.updatedKnowledgeGraph=await qt(e.url),s},executeUpdateNamedType:async(e,t,r,n)=>{if(!t&&!Object.keys(r).length)throw new a.A("knowledge-graph:no-arguments","The operation to update types in the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/update`;await Qt(e);const i=await Xt(o,n);i.data.body=await async function(e,t,r){const n=await(0,se.I)(),o=new n.GraphNamedObjectTypeUpdateRequestEncoder;if(o.deleteLater(),r.entityTypes.some((e=>e.name===t)))o.update_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),Se(e,r)}(e,n));else{if(!r.relationshipTypes.some((e=>e.name===t)))throw new a.A("knowledge-graph:updateNamedType-encoding-failed","The named type you are trying to update does not exist in the data model");o.update_relationship_type(function(e,t){const r=new t.RelationshipType;return r.deleteLater(),Se(e,r)}(e,n))}o.update_alias=e.hasOwnProperty("alias");try{o.encode()}catch(e){throw new a.A("knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed",{error:e})}const i=o.get_encoding_result();return te(i.error,"knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed"),structuredClone(i.get_byte_buffer())}(r,t,e.dataModel);const s=await Bt(i.data.url,i.data),l=await async function(e){return er(e,(await(0,se.I)()).GraphNamedObjectTypeUpdateResponseDecoder,qe)}(s);return l.updatedKnowledgeGraph=await qt(e.url),l},executeAddGraphProperties:async(e,t,r,n)=>{if(!t&&!r.length)throw new a.A("knowledge-graph:no-arguments","The operation to add properties to the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/add`;await Qt(e);const i=await Xt(o,n);i.data.body=await async function(e){const t=await(0,se.I)(),r=new t.GraphPropertyAddsRequestEncoder;r.deleteLater(),e.forEach((e=>{r.add_graph_property(Ae(e,t))}));try{r.encode()}catch(e){throw new a.A("knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed",{error:e})}const n=r.get_encoding_result();return te(n.error,"knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed"),structuredClone(n.get_byte_buffer())}(r);const s=await Bt(i.data.url,i.data),l=await async function(e){return er(e,(await(0,se.I)()).GraphPropertyAddsResponseDecoder,Ke)}(s);return l.updatedKnowledgeGraph=await qt(e.url),l},executeDeleteGraphProperty:async(e,t,r,n)=>{if(!t&&!r)throw new a.A("knowledge-graph:no-arguments","The operation to delete property contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/delete`;await Qt(e);const i=await Xt(o,n);i.data.body=await async function(e){const t=new((await(0,se.I)()).GraphPropertyDeleteRequestEncoder);t.deleteLater(),t.field_name=e;try{t.encode()}catch(e){throw new a.A("knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed",{error:e})}const r=t.get_encoding_result();return te(r.error,"knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed"),structuredClone(r.get_byte_buffer())}(r);const s=await Bt(i.data.url,i.data),l=await async function(e){return er(e,(await(0,se.I)()).GraphPropertyDeleteResponseDecoder,ze)}(s);return l.updatedKnowledgeGraph=await qt(e.url),l},executeUpdateGraphProperty:async(e,t,r,n,o)=>{if(!t&&!r&&!Object.keys(n).length)throw new a.A("knowledge-graph:no-arguments","The operation to update properties in the data model contained missing or empty values");const i=`${e.url}/dataModel/edit/namedTypes/${t}/fields/update`;await Qt(e);const s=await Xt(i,o);s.data.body=await async function(e,t){const r=await(0,se.I)(),n=new r.GraphPropertyUpdateRequestEncoder;n.deleteLater(),n.update_graph_property(function(e,t){const r=new t.GraphProperty;return r.deleteLater(),e.hasOwnProperty("alias")&&(r.alias=e.alias),e.hasOwnProperty("editable")&&(r.editable=e.editable),e.hasOwnProperty("required")&&(r.required=e.required),e.hasOwnProperty("defaultVisibility")&&(r.default_visibility=e.defaultVisibility),e.hasOwnProperty("defaultValue")&&(r.default_value=Pe(e.defaultValue,t)),r}(t,r)),n.set_property_name(e),n.update_alias=t.hasOwnProperty("alias"),n.update_editable=t.hasOwnProperty("editable"),n.update_required=t.hasOwnProperty("required"),n.update_visible=t.hasOwnProperty("defaultVisibility"),n.update_default_value=t.hasOwnProperty("defaultValue");try{n.encode()}catch(e){throw new a.A("knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed",{error:e})}const o=n.get_encoding_result();return te(o.error,"knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed"),structuredClone(o.get_byte_buffer())}(r,n);const l=await Bt(s.data.url,s.data),d=await async function(e){return er(e,(await(0,se.I)()).GraphPropertyUpdateResponseDecoder,$e)}(l);return d.updatedKnowledgeGraph=await qt(e.url),d},executeUpdateSearchIndex:async(e,t,r,n)=>{if(!t)throw new a.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!Object.keys(r.addSearchProperties??{}).length&&!Object.keys(r.removeSearchProperties??{}).length)throw new a.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty properties values");const o=`${e.url}/dataModel/searchIndex/update`;await Qt(e);const i=await Xt(o,n);i.data.body=await async function(e,t){const r=await(0,se.I)(),n=new r.GraphUpdateSearchIndexRequestEncoder;n.deleteLater(),t.hasOwnProperty("addSearchProperties")&&n.insert_add_search_property(e,be(t.addSearchProperties,r)),t.hasOwnProperty("removeSearchProperties")&&n.insert_delete_search_property(e,be(t.removeSearchProperties,r));try{n.encode()}catch(e){throw new a.A("knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed",{error:e})}const o=n.get_encoding_result();return te(o.error,"knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed"),structuredClone(o.get_byte_buffer())}(t,r);const s=await Bt(i.data.url,i.data),l=await async function(e){return er(e,(await(0,se.I)()).GraphUpdateSearchIndexResponseDecoder,Je)}(s);return l.updatedKnowledgeGraph=await qt(e.url),l},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,o=await(0,i.A)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=o.getHeader?.("content-type"),l=o.data;if(s?.includes("application/x-protobuf")){const t=new((await(0,se.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=nr({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new z({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new a.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new a.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:o.data})},executeSearch:async(e,t,r)=>{const n=t.typeCategoryFilter,o=`${e.url}/graph/search`,s=await(0,i.A)(o,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),l=s.getHeader?.("content-type"),d=s.data;if(l?.includes("application/x-protobuf")){const t=new((await(0,se.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=nr({wasmQueryDecoder:t,newArrayBufferToParse:d,dataModel:e.dataModel});return new z({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new a.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new a.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:l,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await Qt(e);const o=await Xt(n,r);o.data.body=await async function(e){const t=await(0,se.I)(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(ce(e.idsFilter,t))}catch(e){throw new a.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{r.add_named_type_filter(e)}));try{r.encode()}catch(e){throw new a.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const n=r.get_encoding_result();if(0!==n.error.error_code)throw new a.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return structuredClone(n.get_byte_buffer())}(t);const i=await Bt(o.data.url,o.data);if(e.dataModel){const t=await or(i,e.dataModel);return new $({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new a.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let n=Mt.get(e.url||"");n||(n=new Map,Mt.set(e.url||"",n));const o=new Map(n.entries()),i=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const s=await(0,se.I)(),l=function(e,t,r,n=!1){const o=new r.ClientDataFetchRequestEncoder;o.deleteLater();for(const i of e){const e=ne(i,t,r,n);o.add_client_data_fetch_request_parameter(e)}o.encode();const i=o.get_encoding_result();return te(i.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(i.get_byte_buffer())}(t,n,s,r.ignoreCache),d=await Xt(i,r.requestOptions);d.data.body=l;const p=await Bt(d.data.url,d.data),u=p.headers.get("content-type");if(u?.includes("application/x-protobuf")){const e=new s.ClientDataFetchResponseDecoder;e.deleteLater();const t=await p.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&te(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,n=!1){const o=new Map;for(let i=0;i<e.get_results_count();i++){const a=e.get_result_at(i);if(a.get_fetch_result_case().value!==_e.ClientDataValue||0!==a.error().error_code){const e=a.get_key().key_string;r.has(e)&&t.delete(e);continue}const s=a.get_value(),l=a.get_key().key_string,d=r.get(l);let p;if(s.get_data_case().value===we.NotModified&&d)p=d.value;else{if(s.get_data_case().value!==we.ClientData)continue;{p=s.get_data().client_data_string;const e=a.get_value().get_v_tag().v_tag;n||t.set(l,{key:l,version:e,value:p})}}o.set(l,p)}return o}(e,n,o,r.ignoreCache)}throw new a.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:u,data:p})},fetchAllClientDataKeys:async(e,t)=>{const r=`${e.url}/clientData`,n=await(0,i.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),o=n.getHeader?.("content-type"),s=n.data;if(o?.includes("application/x-protobuf")){const e=new((await(0,se.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&te(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),Ge(e)}throw new a.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:o,data:n.data})},clearClientDataCache:()=>Mt.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,n)=>async function(e,t,r,n){return r=g.from(r||{}),async function(e,t,r,n,o){const a={},s={},l=[];return function(e,t,r){for(const n in e){const o=e[n];if(o&&"object"==typeof o&&o instanceof G.A){const{features:e}=o;r[n]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}}}(n,l,a),(0,w.el)(l).then((l=>{const{outSpatialReference:d,processExtent:p,processSpatialReference:u,returnColumnName:c,returnFeatureCollection:y,returnM:h,returnZ:f}=r,{path:m}=(0,A.Dl)(e);for(const e in a){const[t,r]=a[e];s[e]=l.slice(t,r)}const g=d?d.wkid||d:null,w=u?u.wkid||u:null,_="execute"===t?{returnColumnName:c||void 0,returnFeatureCollection:y||void 0,returnM:h||void 0,returnZ:f||void 0}:null,v=C({...p?{context:{extent:p,outSR:g,processSR:w}}:{"env:outSR":g,"env:processSR":w},...n,..._,f:"json"},null,s),T={...o,query:v};return(0,i.A)(`${m}/${t}`,T)}))}(e,"submitJob",r,t??{},n).then((({data:t})=>{const r=L.fromJSON(t);return r.sourceUrl=e,r}))}(e,t,r,n),_esriRequestWrapper:async(e,t)=>(0,i.A)(e,t)};async function Gt(e,t,r){return Pt.executeApplyEdits(e,t,r)}async function Rt(e,t,r){return Pt.executeAddNamedTypes(e,t,r)}async function Et(e,t,r){return Pt.executeDeleteNamedType(e,t,r)}async function Nt(e,t,r,n){return Pt.executeUpdateNamedType(e,t,r,n)}async function kt(e,t,r,n){return Pt.executeAddGraphProperties(e,t,r,n)}async function It(e,t,r,n){return Pt.executeDeleteGraphProperty(e,t,r,n)}async function xt(e,t,r,n,o){return Pt.executeUpdateGraphProperty(e,t,r,n,o)}async function Dt(e,t,r,n){return Pt.executeUpdateSearchIndex(e,t,r,n)}async function Ot(e,t,r){return Pt.executeQuery(e,t,r)}async function jt(e,t,r){return Pt.executeQueryStreaming(e,t,r)}async function Ct(e,t,r){return Pt.executeSearch(e,t,r)}async function Ut(e,t,r){return Pt.executeSearchStreaming(e,t,r)}function Zt(e,t){return Pt.fetchAllClientDataKeys(e,t)}function Ft(e,t,r){return Pt.fetchClientDataAtKeys(e,t,r)}async function qt(e){return Pt.fetchKnowledgeGraph(e)}async function Lt(e){return Pt.refreshDataModel(e)}async function Kt(e){return Pt.refreshServiceDefinition(e)}async function zt(e,t){return Pt.executeFindPathsAsynchronous(e,t)}async function $t(e,t){return Pt.executeFindPaths(e,t)}async function Jt(e,t){return Pt.fetchAsynchronousFindPathsResultData(e,t)}function Vt(){return Pt.clearClientDataCache()}async function Bt(e,t){return Pt._fetchWrapper(e,t)}async function Yt(e,t,r,n){return Pt._submitJobWrapper(e,t,r,n)}async function Ht(e,t){return Pt._esriRequestWrapper(e,t)}async function Qt(e){const t=o.id?.findCredential(e.url);t||(e.dataModel?await ir(e):await Lt(e))}function Wt(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof d.A?r.set_param_key_value(e,he(t,n)):Array.isArray(t)?r.set_param_key_value(e,ce(t,n)):r.set_param_key_value(e,ye(t,n))}async function Xt(e,t){return(0,i.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}async function er(e,t,r){const n=e.headers.get("content-type");if(n?.includes("application/x-protobuf")){const n=await e.arrayBuffer(),o=new t;try{return o.decode(new Uint8Array(n)),r(o)}finally{o.deleteLater()}}throw new a.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:await e.text()})}let tr=50;function rr(e){tr=e}function nr({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:n,limitMaxProcessingTime:o=!1}){t&&e.push_buffer(new Uint8Array(t));const i=[];let s,l,d=0;const u=Date.now();let c=!0;for(;e.next_row();){s&&l||(s=n??vt(e),l=s.outSpatialReference??new p.A({wkid:4326})),d||(d=e.get_header_keys().size());const t=new Array(d);for(let n=0;n<d;n++){const o=e.get_value(n);t[n]=mt(o,r,l)}if(i.push(t),o&&Date.now()-u>tr){c=!1;break}}if(e.has_error())throw new a.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:s,resultRows:i,parsedAllResultsFromBuffer:c}}async function or(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await(0,se.I)()).GraphQueryDecoder);let o,i,d;n.deleteLater();const p=new Promise(((e,t)=>{i=e,d=t}));let u=!1,c=null;const y=new ReadableStream({pull:async function e(p){if(!r){const e=new a.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw d(e),e}const{done:y,value:h}=c?{done:!1,value:null}:await r.read().catch((e=>{throw d(e),r.releaseLock(),e}));h&&(c=h);try{if(y){let e;if(n.has_error()?e=new a.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:n.error.error_code,errorMessage:n.error.error_message}):u||i(new K),r.releaseLock(),e)throw p.error(e),d(e),e;return void p.close()}const{resultHeader:s,resultRows:l,parsedAllResultsFromBuffer:f}=nr({wasmQueryDecoder:n,newArrayBufferToParse:h,dataModel:t,decodedHeader:o,limitMaxProcessingTime:!0});return f&&(c=null),!o&&s&&(o=s,i(s),u=!0),l.length>0?void p.enqueue(l):await e(p)}catch(e){throw s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),d(e),r.releaseLock(),(0,l.zf)(e)?e:new a.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:y,resultHeader:await p}}throw new a.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function ir(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,i.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),o=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,se.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(o));if(!e)throw new a.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){e.deleteLater(),Be=!1;const t=new W({timestamp:e.timestamp,spatialReference:new p.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:ve.vy[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:ve.wr[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:st(e.search_indexes),entityTypes:tt(e.entity_types),relationshipTypes:it(e.relationship_types),metaEntityTypes:tt(e.meta_entity_types),provenanceSourceTypeValues:at(e.provenance_source_type_values.value_behavior_array)});return Be&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type"),t}(e)}throw new a.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}},35448:(e,t,r)=>{var n,o,i,a,s,l,d;r.d(t,{Eq:()=>n,bV:()=>i,nP:()=>s,r5:()=>o,ti:()=>l,vy:()=>d,wr:()=>a}),function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(n||(n={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger",e[e.esriFieldTypeDateOnly=14]="esriFieldTypeDateOnly",e[e.esriFieldTypeTimeOnly=15]="esriFieldTypeTimeOnly",e[e.esriFieldTypeTimestampOffset=16]="esriFieldTypeTimestampOffset"}(o||(o={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=7]="esriGeometryAny",e[e.esriGeometryMultiPatch=9]="esriGeometryMultiPatch"}(i||(i={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(a||(a={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(s||(s={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension",e[e.esriGraphPropertyProvenanceInstanceId=10]="esriGraphPropertyProvenanceInstanceId",e[e.esriGraphPropertyProvenanceSourceType=11]="esriGraphPropertyProvenanceSourceType",e[e.esriGraphPropertyProvenanceSourceName=12]="esriGraphPropertyProvenanceSourceName",e[e.esriGraphPropertyProvenanceSource=13]="esriGraphPropertyProvenanceSource",e[e.esriGraphPropertyProvenanceComment=14]="esriGraphPropertyProvenanceComment",e[e.esriGraphPropertyProvenanceTypeName=15]="esriGraphPropertyProvenanceTypeName",e[e.esriGraphPropertyProvenancePropertyName=16]="esriGraphPropertyProvenancePropertyName"}(l||(l={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(d||(d={}))},37807:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),o=r(66552),i=r(25482),a=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const l=new o.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let d=class extends i.A{constructor(e){super(e),this.description=null,this.type=null}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,n._)([(0,a.MZ)({type:String,json:{read:l.read,write:l.write}})],d.prototype,"type",void 0),d=(0,n._)([(0,s.$)("esri.rest.support.GPMessage")],d);const p=d},45724:(e,t,r)=>{r.d(t,{I:()=>l});var n=r(2741),o=r(44208);const i="esri/rest/knowledgeGraph/wasmInterface/";let a,s=null;async function l(){const e=s??a;if(e)return e;const t=!!(0,o.A)("wasm-simd");return a=d(t),a}async function d(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then((e=>e.a));return e({locateFile:e=>(0,n.s)(i+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then((e=>e.a));return t({locateFile:e=>(0,n.s)(i+e)})}}}]);