@arcgis/core 4.32.0-next.20241219 → 4.32.0-next.20241221

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 (185) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{0da2aaca3f0b4fe910e3.js → 015285436ca965f94e17.js} +1 -1
  4. package/assets/esri/core/workers/chunks/127c82cdb229434883b6.js +1 -0
  5. package/assets/esri/core/workers/chunks/16530347bd78dc6c2fcd.js +1 -0
  6. package/assets/esri/core/workers/chunks/{5119811063bfc97fb725.js → 1a713cc601c6fcd97d2f.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{48f6eb3b63fec1d3312d.js → 2d908c115ea18e813b95.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{11052103efe3d53a784e.js → 31d9f0a37a5d0a1c450b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{e7c3199813070ff30a3d.js → 3bb94da29dac3367ecc6.js} +1 -1
  10. package/assets/esri/core/workers/chunks/3ed7c8138231de3a3b96.js +1 -0
  11. package/assets/esri/core/workers/chunks/{9cc9bac6e02ab241e852.js → 4746b7afa90ea3641e60.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{ce33d2b5f22a5c566661.js → 4b5dbdcad438cb2dd4bf.js} +1 -1
  13. package/assets/esri/core/workers/chunks/5a0eb9dfe668cf290462.js +1 -0
  14. package/assets/esri/core/workers/chunks/{ee1ddf56549bb169509c.js → 6332da54159d72a6ce66.js} +1 -1
  15. package/assets/esri/core/workers/chunks/648d7d8fa19a2e772c89.js +1 -0
  16. package/assets/esri/core/workers/chunks/66b411119b8ffb99b9dc.js +1 -0
  17. package/assets/esri/core/workers/chunks/69efc716991a407c3d23.js +1 -0
  18. package/assets/esri/core/workers/chunks/88c68881cbdf4e911832.js +1 -0
  19. package/assets/esri/core/workers/chunks/8e60de347b209a753c73.js +1 -0
  20. package/assets/esri/core/workers/chunks/{fb43c44a7d6b61f31e75.js → 94432e04de01ee7adc0e.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{80ac74da0b0e45e74beb.js → 9a498f2c007f4d78d4dd.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{770d233254419b741616.js → 9ad7d095e614e7e8d7f5.js} +1 -1
  23. package/assets/esri/core/workers/chunks/9dd167db3f2e68b71cea.js +1 -0
  24. package/assets/esri/core/workers/chunks/{b15894bff153e0793ef4.js → 9f495ad57cdbfa90c5b8.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{d7b76bc7bff34abc2253.js → a0b3d70a1b0360084593.js} +1 -1
  26. package/assets/esri/core/workers/chunks/a90611cdc86190799560.js +1 -0
  27. package/assets/esri/core/workers/chunks/{e213f4a1c95a33f80cdc.js → aedff36d3fec86abb9fb.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{194013d377e7dd00845f.js → b611f46835edcd6eefcc.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{eddab4dc706e75c6637f.js → bff74200a0df0950cf08.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{8f2ffb6944c9028d3bea.js → c08cb75c3eef6c45f604.js} +1 -1
  31. package/assets/esri/core/workers/chunks/c1c216b0aebe86311fae.js +1 -0
  32. package/assets/esri/core/workers/chunks/{f2b195d04414417682d4.js → cbf57abb537e86c1dd7f.js} +1 -1
  33. package/assets/esri/core/workers/chunks/dce55e7f76adecc055c3.js +1 -0
  34. package/assets/esri/core/workers/chunks/f2cdb7be3fd65f65c30b.js +1 -0
  35. package/assets/esri/core/workers/chunks/f9af0473878d960a02f2.js +1 -0
  36. package/assets/esri/core/workers/chunks/fa1c68f2ffcdff7986b6.js +1 -0
  37. package/assets/esri/core/workers/chunks/{0f1a7aeec18db5323365.js → fdd8a5eb07466541f1f9.js} +1 -1
  38. package/assets/esri/themes/base/widgets/_FeatureTable.scss +3 -3
  39. package/assets/esri/themes/dark/main.css +1 -1
  40. package/assets/esri/themes/light/main.css +1 -1
  41. package/assets/esri/themes/light/view.css +1 -1
  42. package/chunks/OperatorProject.js +1 -1
  43. package/chunks/QuadraticBezier.js +1 -1
  44. package/form/elements/GroupElement.js +1 -1
  45. package/form/elements/UtilityNetworkAssociationsElement.d.ts +4 -0
  46. package/form/elements/{UtilityNetworkAssociationElement.js → UtilityNetworkAssociationsElement.js} +1 -1
  47. package/form/elements.js +1 -1
  48. package/form/support/formUtils.js +1 -1
  49. package/geometry/operators/affineTransformOperator.js +1 -1
  50. package/geometry/operators/alphaShapeOperator.js +1 -1
  51. package/geometry/operators/areaOperator.js +1 -1
  52. package/geometry/operators/autoCompleteOperator.js +1 -1
  53. package/geometry/operators/boundaryOperator.js +1 -1
  54. package/geometry/operators/bufferOperator.js +1 -1
  55. package/geometry/operators/centroidOperator.js +1 -1
  56. package/geometry/operators/clipOperator.js +1 -1
  57. package/geometry/operators/containsOperator.js +1 -1
  58. package/geometry/operators/convexHullOperator.js +1 -1
  59. package/geometry/operators/crossesOperator.js +1 -1
  60. package/geometry/operators/cutOperator.js +1 -1
  61. package/geometry/operators/densifyOperator.js +1 -1
  62. package/geometry/operators/differenceOperator.js +1 -1
  63. package/geometry/operators/disjointOperator.js +1 -1
  64. package/geometry/operators/distanceOperator.js +1 -1
  65. package/geometry/operators/equalsOperator.js +1 -1
  66. package/geometry/operators/extendOperator.js +1 -1
  67. package/geometry/operators/generalizeOperator.js +1 -1
  68. package/geometry/operators/geodesicBufferOperator.js +1 -1
  69. package/geometry/operators/geodesicProximityOperator.js +1 -1
  70. package/geometry/operators/geodeticAreaOperator.js +1 -1
  71. package/geometry/operators/geodeticDensifyOperator.js +1 -1
  72. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  73. package/geometry/operators/geodeticLengthOperator.js +1 -1
  74. package/geometry/operators/graphicBufferOperator.js +1 -1
  75. package/geometry/operators/integrateOperator.js +1 -1
  76. package/geometry/operators/intersectionOperator.js +1 -1
  77. package/geometry/operators/intersectsOperator.js +1 -1
  78. package/geometry/operators/isNearOperator.js +1 -1
  79. package/geometry/operators/labelPointOperator.js +1 -1
  80. package/geometry/operators/lengthOperator.js +1 -1
  81. package/geometry/operators/linesToPolygonsOperator.js +1 -1
  82. package/geometry/operators/locateBetweenOperator.js +1 -1
  83. package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
  84. package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
  85. package/geometry/operators/offsetOperator.js +1 -1
  86. package/geometry/operators/overlapsOperator.js +1 -1
  87. package/geometry/operators/polygonOverlayOperator.js +1 -1
  88. package/geometry/operators/polygonSlicerOperator.js +1 -1
  89. package/geometry/operators/projectOperator.js +1 -1
  90. package/geometry/operators/proximityOperator.js +1 -1
  91. package/geometry/operators/relateOperator.js +1 -1
  92. package/geometry/operators/reshapeOperator.js +1 -1
  93. package/geometry/operators/simplifyOperator.js +1 -1
  94. package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
  95. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  96. package/geometry/operators/touchesOperator.js +1 -1
  97. package/geometry/operators/unionOperator.js +1 -1
  98. package/geometry/operators/withinOperator.js +1 -1
  99. package/interfaces.d.ts +231 -71
  100. package/layers/LinkChartLayer.js +1 -1
  101. package/layers/graphics/OptimizedFeature.js +1 -1
  102. package/layers/graphics/sources/geojson/geojson.js +1 -1
  103. package/layers/knowledgeGraph/supportUtils.js +1 -1
  104. package/layers/support/Sublayer.js +1 -1
  105. package/layers/support/VideoElement.js +1 -1
  106. package/layers/support/domainUtils.js +1 -1
  107. package/layers/support/fieldUtils.js +1 -1
  108. package/linkChart/OrganicLayoutSettings.js +1 -1
  109. package/package.json +1 -1
  110. package/portal/schemas/definitions.js +1 -1
  111. package/rest/knowledgeGraphService.js +1 -1
  112. package/rest/query/operations/pbfOptimizedFeatureSet.js +1 -1
  113. package/rest/support/fileFormat.js +1 -1
  114. package/support/revision.js +1 -1
  115. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  116. package/views/2d/input/MapViewInputManager.js +1 -1
  117. package/views/2d/input/handlers/KeyRotate.js +1 -1
  118. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  119. package/views/2d/layers/features/FeatureContainer.js +1 -1
  120. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  121. package/views/2d/layers/features/Processor.js +1 -1
  122. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  123. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  124. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  125. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  126. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  127. package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
  128. package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
  129. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +5 -0
  130. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  131. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  132. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  133. package/views/2d/layers/support/DebouncedFeatureOverride.js +5 -0
  134. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  135. package/views/3d/input/SceneInputManager.js +1 -1
  136. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  137. package/views/3d/terrain/TileTexture.js +1 -1
  138. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  139. package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
  140. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  141. package/views/3d/webgl-engine/lib/TextureCompressionWorker.js +1 -1
  142. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  143. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  144. package/views/layers/FeatureLayerView.js +1 -1
  145. package/views/support/TextureCompressionHelper.js +1 -1
  146. package/views/webgl/Texture.js +1 -1
  147. package/webscene/Slide.js +1 -1
  148. package/webscene/SlideLegend.d.ts +4 -0
  149. package/webscene/SlideLegend.js +5 -0
  150. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  151. package/widgets/FeatureForm.js +1 -1
  152. package/widgets/FeatureTable/FieldColumn.js +1 -1
  153. package/widgets/Features/FeaturesViewModel.js +1 -1
  154. package/widgets/Features.js +1 -1
  155. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  156. package/widgets/OrientedImageryViewer/adapters/sketch/DigitizationAdapter.js +1 -1
  157. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  158. package/widgets/OrientedImageryViewer/digitizationUtils.js +1 -1
  159. package/widgets/OrientedImageryViewer.js +1 -1
  160. package/widgets/Popup.js +1 -1
  161. package/widgets/Print/PrintViewModel.js +1 -1
  162. package/widgets/Print/TemplateOptions.js +1 -1
  163. package/widgets/Print.js +1 -1
  164. package/widgets/ShadowCast.js +1 -1
  165. package/widgets/support/forms/formUtils.js +1 -1
  166. package/assets/esri/core/workers/chunks/0e9bd990a8d0691fb9c8.js +0 -1
  167. package/assets/esri/core/workers/chunks/27933d6ffeebb5c13ab7.js +0 -1
  168. package/assets/esri/core/workers/chunks/3ef5002b21b1a5b97e11.js +0 -1
  169. package/assets/esri/core/workers/chunks/48266c87363e7dcaefb3.js +0 -1
  170. package/assets/esri/core/workers/chunks/5786b190ad3e2d933245.js +0 -1
  171. package/assets/esri/core/workers/chunks/668679baf519ada9ae28.js +0 -1
  172. package/assets/esri/core/workers/chunks/737f381f2cfeddb96d15.js +0 -1
  173. package/assets/esri/core/workers/chunks/84d26c6c805f5855ffd3.js +0 -1
  174. package/assets/esri/core/workers/chunks/8f2f2d497b875e2b4139.js +0 -1
  175. package/assets/esri/core/workers/chunks/a4c8b773283ea8f0e256.js +0 -1
  176. package/assets/esri/core/workers/chunks/a68068b3151a14c4a0ad.js +0 -1
  177. package/assets/esri/core/workers/chunks/ad99308fb9678cdce917.js +0 -1
  178. package/assets/esri/core/workers/chunks/cc427e8f1b17744b6ea4.js +0 -1
  179. package/assets/esri/core/workers/chunks/dd4bd96dfb7f9921b774.js +0 -1
  180. package/assets/esri/core/workers/chunks/e1a03231e24293e66418.js +0 -1
  181. package/assets/esri/core/workers/chunks/fce1158755f959730602.js +0 -1
  182. package/views/2d/layers/features/sources/strategies/chunks/OverrideChunk.js +0 -5
  183. package/views/3d/input/handlers/SingleKey.js +0 -5
  184. package/views/3d/input/handlers/SingleKeyResetHeading.js +0 -5
  185. package/views/3d/input/handlers/SingleKeyResetTilt.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2083],{67996:(e,t,r)=>{r.d(t,{cZ:()=>D,XW:()=>j,fe:()=>O});var n,s,i=r(78888),o=r(49186),a=r(91869),l=(r(90708),r(92722)),u=(r(59456),r(16930));class d{constructor(){this.version="",this.queryResult=new p}}class p{constructor(){this.featureResult=new c}}class c{constructor(){this.objectIdFieldName="",this.uniqueIdField=new h,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new y,this.geometryType=null,this.spatialReference=new u.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new m,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class h{constructor(){this.name="",this.isSystemMaintained=!1}}class y{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class m{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new f,this.translate=new g}}class f{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class g{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class _{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class b{constructor(){this.attributes=[],this.compressedGeometry=new w,this.centroid=new w,this.aggregateGeometries=[]}}class w{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}(s=n||(n={})).ELEMENTUID="ELEMENTUID",s.TYPENAME="TYPENAME";const v=[n.ELEMENTUID,n.TYPENAME];var T,I;!function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME"}(T||(T={})),function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME",e[e.FROMUID=2]="FROMUID",e[e.TOUID=3]="TOUID"}(I||(I={}));var E,M,A,x,S=r(45724),N=r(35448);function k(e){const t=new w;t.geometryType=N.bV[e.geometry_type.value];const r=[],n=[];for(let t=0;t<e.lengths.length;t++)r.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)n.push(e.coords[t]);return t.lengths=r,t.coords=n,t}function L(e){const t=new _;return t.name=e.name,t.alias=e.alias,t.fieldType=N.r5[e.field_type.value],t.sqlType=A[e.sql_type.value],t.domain=e.domain,t.defaultValue=e.default_value,t}function C(e){const t=L(e);return t.geometryType=N.bV[e.geometry_type.value],t}function R(e){const t=new m;t.quantizeOriginPosition=M[e.quantizeOriginPosition.value];const r=t.scale,n=e.scale;r.xScale=n.xScale,r.yScale=n.yScale,r.mScale=n.mScale,r.zScale=n.zScale;const s=t.translate,i=e.translate;return s.xTranslate=i.xTranslate,s.yTranslate=i.yTranslate,s.mTranslate=i.mTranslate,s.zTranslate=i.zTranslate,t}async function D(e,t){t??=!1;const r={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e){const t=await(0,i.A)(e,{responseType:"array-buffer"}),r=await t.data;return async function(e){const t=new((await(0,S.I)()).MapOfObjectIdentifierSetsDecoder),r=t.decode(new Uint8Array(e)),n=new Map;if(0!==r.error_code)throw new o.A("knowledge-graph:layer-support-utils",r.error_message);const s=t.get_map_of_identifier_sets(),i=s.keys,a=i.size();for(let e=0;e<a;e++){const t=i.get(e),r=s.query_identifier_set(t),a=[];if(r.id_array_type.value===x.GLOBALID_ARRAY){const e=r.get_globalid_array(),t=e.count();for(let r=0;r<t;r++)a.push(e.get_globalid_at(r))}else if(r.id_array_type.value===x.IDENTIFIER_ARRAY){const e=r.get_identifier_array(),t=e.count();for(let r=0;r<t;r++)a.push(e.get_identifier_at(r).toString())}else if(r.id_array_type.value===x.STRING_ARRAY){const e=r.get_string_array(),t=e.count();for(let r=0;r<t;r++)a.push(e.get_string_at(r))}else{if(r.id_array_type.value!==x.OID_ARRAY)throw new o.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=r.get_oid_array(),t=e.count();for(let r=0;r<t;r++)a.push(e.get_objectid_at(r).toString())}}n.set(t,a)}return t.delete(),n}(new Uint8Array(r))}(e).then((e=>{!function(e,t){for(const[r,n]of e){const e=(0,a.tE)(t.namedTypeDefinitions,r,(()=>({useAllData:!1,members:new Map})));for(const t of n)e.members.has(t)||e.members.set(t,{id:t})}}(e,r)})),r}async function O(e){const t=await(0,S.I)(),r=new t.MapOfObjectIdentifierSets;!function(e,t,r){for(const[n,s]of r.namedTypeDefinitions){if(!s.members||s.useAllData)continue;const r=s.members.keys();let i=!1,o=!0;const a=new t.ObjectIdArray,l=new t.StringArray,u=new t.GlobalIdArray,d=new t.IdentifierArray,p=new t.ObjectIdentifierSet;for(const e of r)o&&(i=!isNaN(Number(e)),o=!1),i?a.add_objectid(Number(e)):(l.add_string(e),u.add_globalid(e)),d.add_identifier(e);p.set_oid_array(a),p.set_string_array(l),p.set_globalid_array(u),p.set_identifier_array(d),a.delete(),l.delete(),u.delete(),d.delete(),e.put_identifier_set(n,p),p.delete()}}(r,t,e);const n=new t.MapOfObjectIdentifierSetsEncoder;try{n.set_map_of_identifier_sets(r),n.encode();const e=n.get_encoding_result();if(0!==e.error.error_code)throw new o.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return n.delete(),t}finally{r.delete()}}async function B(e){const t=await(0,i.A)(e,{responseType:"array-buffer"});return async function(e){const t=new((await(0,S.I)()).FeatureCollectionDecoder),r=t.decode(new Uint8Array(e));if(0!==r.error_code)throw new o.A("knowledge-graph:layer-support-utils",r.error_message);const n=function(e){const t=new d;t.version=e.version;const r=e.get_query_result();if(0!==r.results_type.value)throw new Error("Got a non-feature collection type");const n=r.get_feature_result(),s=t.queryResult.featureResult;s.objectIdFieldName=n.objectid_field_name,s.exceededTransferLimit=n.exceeded_transfer_limit,s.hasM=n.has_m,s.hasZ=n.has_z,s.geometryType=N.bV[n.geometry_type.value],s.globalIdFieldName=n.globalid_field_name,s.geohashFieldName=n.geohash_field_name;const i=s.uniqueIdField,o=n.unique_id_field;i.name=o.name,i.isSystemMaintained=o.isSystemMaintained;const a=s.geometryProperties,l=n.geometry_properties;a.shapeAreaFieldName=l.shapeAreaFieldName,a.shapeLengthFieldName=l.shapeLengthFieldName,a.units=l.units;const u=s.spatialReference,p=n.spatial_reference;u.wkid=p.wkid,u.latestWkid=p.latestWkid,u.vcsWkid=p.vcsWkid,u.latestVcsWkid=p.latestVcsWkid,u.wkt=p.wkt,s.transform=R(n.transform);const c=s.fields,h=s.fieldNameToAttributeIndexMap,y=n.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),r=L(t);c.push(r),h[r.name]=e,t.delete()}y.delete();const f=s.values,g=n.values_count();for(let e=0;e<g;e++)f.push(n.get_value_at(e));const _=s.features,w=n.features,T=w.size();if(T>0)for(const e of v)if(void 0===h[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<T;e++){const t=new b,r=w.get(e),n=t.attributes,s=r.attributes_count();for(let e=0;e<s;e++)n.push(r.get_attribute_at(e));const i=r.get_compressed_geometry();i&&(t.compressedGeometry=k(i),t.centroid=k(r.get_centroid()));const o=t.aggregateGeometries,a=r.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),r=k(t);o.push(r),t.delete()}a.delete(),_.push(t),r.delete()}w.delete();const I=s.geometryFields,E=n.geometry_fields,M=E.size();for(let e=0;e<M;e++){const t=E.get(e),r=C(t);I.push(r),t.delete()}return E.delete(),t}(t.get_feature_collection());return t.delete(),n}(await t.data)}function F(e,t){if(!e?.queryResult?.featureResult)return t;const r=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(const s of e.queryResult.featureResult.features){const e=s.attributes[r[n.TYPENAME]],i=(0,a.tE)(t.namedTypeDefinitions,e,(()=>({useAllData:!1,members:new Map}))),o=s.attributes[r[n.ELEMENTUID]];if(s.compressedGeometry?.coords?.length>0){let e=s.compressedGeometry.lengths;"esriGeometryPoint"===s.compressedGeometry.geometryType&&(e=[]),i.members.set(o,{id:o,linkChartLocation:new l.A(e,s.compressedGeometry.coords)})}else i.members.set(o,{id:o})}return t}!function(e){e[e.featureResult=0]="featureResult",e[e.countResult=1]="countResult",e[e.idsResult=2]="idsResult"}(E||(E={})),function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(M||(M={})),function(e){e[e.sqlTypeBigInt=0]="sqlTypeBigInt",e[e.sqlTypeBinary=1]="sqlTypeBinary",e[e.sqlTypeBit=2]="sqlTypeBit",e[e.sqlTypeChar=3]="sqlTypeChar",e[e.sqlTypeDate=4]="sqlTypeDate",e[e.sqlTypeDecimal=5]="sqlTypeDecimal",e[e.sqlTypeDouble=6]="sqlTypeDouble",e[e.sqlTypeFloat=7]="sqlTypeFloat",e[e.sqlTypeGeometry=8]="sqlTypeGeometry",e[e.sqlTypeGUID=9]="sqlTypeGUID",e[e.sqlTypeInteger=10]="sqlTypeInteger",e[e.sqlTypeLongNVarchar=11]="sqlTypeLongNVarchar",e[e.sqlTypeLongVarbinary=12]="sqlTypeLongVarbinary",e[e.sqlTypeLongVarchar=13]="sqlTypeLongVarchar",e[e.sqlTypeNChar=14]="sqlTypeNChar",e[e.sqlTypeNVarChar=15]="sqlTypeNVarChar",e[e.sqlTypeOther=16]="sqlTypeOther",e[e.sqlTypeReal=17]="sqlTypeReal",e[e.sqlTypeSmallInt=18]="sqlTypeSmallInt",e[e.sqlTypeSqlXml=19]="sqlTypeSqlXml",e[e.sqlTypeTime=20]="sqlTypeTime",e[e.sqlTypeTimestamp=21]="sqlTypeTimestamp",e[e.sqlTypeTimestamp2=22]="sqlTypeTimestamp2",e[e.sqlTypeTinyInt=23]="sqlTypeTinyInt",e[e.sqlTypeVarbinary=24]="sqlTypeVarbinary",e[e.sqlTypeVarchar=25]="sqlTypeVarchar"}(A||(A={})),function(e){e[e.OID_ARRAY=0]="OID_ARRAY",e[e.GLOBALID_ARRAY=1]="GLOBALID_ARRAY",e[e.STRING_ARRAY=2]="STRING_ARRAY",e[e.IDENTIFIER_ARRAY=3]="IDENTIFIER_ARRAY"}(x||(x={}));const j={fetchAndConvertSerializedLinkChart:e=>async function(e){const t=[],r={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&t.push(B(e.entitiesUrl).then((e=>{F(e,r)}))),e.relationshipsUrl&&t.push(B(e.relationshipsUrl).then((e=>{F(e,r)}))),await Promise.all(t),r}(e)}},9775:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(62788),s=r(95488);class i{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new s.I,this._items=new Set}get length(){return(0,n.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,n.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,n.gc)(this._observable),yield*this._items}}},75503:(e,t,r)=>{r.d(t,{E:()=>M,w:()=>a});var n=r(4576),s=(r(44208),r(4718)),i=r(3694),o=r(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),v.prune(),T.prune(),I.prune(),E.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(b(e,r))for(v.clear();r;){for(let s=0,i=r.children.length;s<i;s++){const i=r.children[s],o=r.leaf?n(i):i;b(e,o)&&(r.leaf?t(i):_(e,o)?l(i,t):v.push(i))}r=v.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!b(e,t))return!1;for(v.clear();t;){for(let n=0,s=t.children.length;n<s;n++){const s=t.children[n],i=t.leaf?r(s):s;if(b(e,i)){if(t.leaf||_(e,i))return!0;v.push(s)}}t=v.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new x([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,i=0,o=!1;const a=this._toBBox(e);for(I.clear(),E.clear();r||I.length>0;){if(r||(r=I.pop(),s=I.data[I.length-1],i=E.pop()??0,o=!0),r.leaf&&(t=(0,n.qh)(r.children,e,r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),I.push(r),this._condense(I),this;o||r.leaf||!_(r,a)?s?(i++,r=s.children[i],o=!1):r=null:(I.push(r),E.push(i),i=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,n){const s=r-t+1;let i=this._maxEntries;if(s<=i){const n=new x(e.slice(t,r+1));return u(n,this._toBBox),n}n||(n=Math.ceil(Math.log(s)/Math.log(i)),i=Math.ceil(s/i**(n-1)));const o=new S([]);o.height=n;const a=Math.ceil(s/i),l=a*Math.ceil(Math.sqrt(i));w(e,t,r,l,this._compareMinX);for(let s=t;s<=r;s+=l){const t=Math.min(s+l-1,r);w(e,s,t,a,this._compareMinY);for(let r=s;r<=t;r+=a){const s=Math.min(r+a-1,t);o.children.push(this._build(e,r,s,n-1))}}return u(o,this._toBBox),o}_insert(e,t,r){const n=this._toBBox,s=r?e:n(e);I.clear();const i=function(e,t,r,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==r;){let r,n=1/0,s=1/0;for(let i=0,o=t.children.length;i<o;i++){const o=t.children[i],a=y(o),l=f(e,o)-a;l<s?(s=l,n=a<n?a:n,r=o):l===s&&a<n&&(n=a,r=o)}t=r||t.children[0]}return t}(s,this._data,t,I);for(i.children.push(e),p(i,s);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;!function(e,t,r){for(let n=r;n>=0;n--)p(t.data[n],e)}(s,I,t)}_split(e,t){const r=e.data[t],n=r.children.length,s=this._minEntries;this._chooseSplitAxis(r,s,n);const i=this._chooseSplitIndex(r,s,n);if(!i)return;const o=r.children.splice(i,r.children.length-i),a=r.leaf?new x(o):new S(o);a.height=r.height,u(r,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this._data=new S([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,s,i;n=s=1/0;for(let o=t;o<=r-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,r,this._toBBox),l=g(t,a),u=y(t)+y(a);l<n?(n=l,i=o,s=u<s?u:s):l===n&&u<s&&(s=u,i=o)}return i}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:c,s=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,s)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const s=this._toBBox,i=d(e,0,t,s),o=d(e,r-t,r,s);let a=m(i)+m(o);for(let n=t;n<r-t;n++){const t=e.children[n];p(i,e.leaf?s(t):t),a+=m(i)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];p(o,e.leaf?s(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const s=e.data[t-1],i=s.children;i.splice((0,n.qh)(i,r,i.length,s.indexHint),1)}else this.clear();else u(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(T.clear();r;){if(!0===r.leaf)for(const e of r.children)t((0,s.zI)(e));else T.pushArray(r.children);r=T.pop()??null}}function u(e,t){d(e,0,e.children.length,t,e)}function d(e,t,r,n,s){s||(s=new x([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let i,o=t;o<r;o++)i=e.children[o],p(s,e.leaf?n(i):i);return s}function p(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),i=Math.min(e.maxY,t.maxY);return Math.max(0,s-r)*Math.max(0,i-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,r,n,s){const i=[t,r];for(;i.length;){const t=i.pop(),r=i.pop();if(t-r<=n)continue;const a=r+Math.ceil((t-r)/n/2)*n;(0,o.q)(e,a,r,t,s),i.push(r,a,a,t)}}const v=new i.A,T=new i.A,I=new i.A,E=new i.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class x extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class S extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},10382:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(36563),s=(r(44208),r(74887)),i=r(9775),o=r(72457),a=r(52268),l=r(61322);class u{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,n)=>{let i=!0;const o=e=>{(0,s.Te)(t.signal),i&&(i=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let i=0;i<e.length;++i){const a=e[i];(0,s.$X)(a)?this._clientPromises[i]=a.then((e=>(this._clients[i]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[i])),(()=>(o(n),null))):(this._clients[i]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[i]=Promise.resolve(this._clients[i]),o(r))}}))}broadcast(e,t,r){const n=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const i=this._clientPromises[s];n[s]=i.then((n=>n?.invoke(e,t,r)))}return n}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,s.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const n=(0,s.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:n});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return n.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,n.vE)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let n=0;n<this._clientPromises.length;++n)this._clientPromises[n].then((s=>{s&&(t[n]=s.openPort()),0==--r&&e(t)}))}))}get test(){}}},72457:(e,t,r)=>{r.d(t,{h:()=>i,k:()=>s});const n=new FinalizationRegistry((e=>{e.close()}));function s(e,t){n.register(e,t,t)}function i(e){n.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>G});var n=r(49186),s=r(44208),i=r(74887),o=r(10382),a=r(72457),l=r(61322),u=r(53966),d=r(97768),p=r(78888),c=r(84952);const h={async request(e,t){const r=e.options,n=r.responseType;r.signal=t?.signal,r.responseType="native"===n||"native-request-init"===n?"native-request-init":n&&["blob","json","text"].includes(n)&&(0,c.sC)(e.url)?.after?n:"array-buffer";const s=await(0,p.A)(e.url,r),i={data:s.data,httpStatus:s.httpStatus,ssl:s.ssl};switch(s.requestOptions?.responseType){case"native-request-init":return delete i.data.signal,i;case"blob":i.data=await i.data.arrayBuffer();break;case"json":i.data=(new TextEncoder).encode(JSON.stringify(i.data)).buffer;break;case"text":i.data=(new TextEncoder).encode(i.data).buffer}return{result:i,transferList:[i.data]}}};var y=r(8341),m=r(2741),f=r(92602),g=(r(47566),r(70333));const _={};var b=r(26390);class w{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class v{constructor(){this._dispatcher=new w,this._workerPostMessage({type:y.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,b.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,b.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,y.VI)(e);if(t&&t.type===y.Go.OPEN){const{modulePath:e,jobId:r}=t;let n=await l.default.loadWorker(e);n||(n=await import(e));const s=l.default.connect(n);this._workerPostMessage({type:y.Go.OPENED,jobId:r,data:s})}}}var T=r(73444),I=r(18357);const E=()=>u.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:M}=y.Go;let A,x;const S="Failed to create Worker. Fallback to execute module in main thread";async function N(e){return new Promise((t=>{function r(s){const i=(0,y.VI)(s);i&&i.type===M&&(e.removeEventListener("message",r),e.removeEventListener("error",n),t(e))}function n(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",n),E().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new v).addEventListener("message",r),e.addEventListener("error",n)}e.addEventListener("message",r),e.addEventListener("error",n)}))}let k=0;const{ABORT:L,INVOKE:C,OPEN:R,OPENED:D,RESPONSE:O}=y.Go;class B{static async create(e){const t=await async function(){if(!(0,s.A)("esri-workers"))return N(new v);if(!A&&!x)try{const e='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split("{CONFIGURATION}").join(function(){let e;if(null!=f.A.default){const t={...f.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.A));e.assetsPath=(0,c.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,c.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,T.JK)(),e.has={"esri-csp-restrictions":(0,s.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,s.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,s.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,s.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,s.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,s.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,s.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,s.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,s.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,s.A)("esri-atomics"),"esri-shared-array-buffer":(0,s.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,s.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,c.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,c.s2)(e.workers.workerPath):e.workers.workerPath=(0,c.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.A.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.slice()||[],paths:{..._.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=_.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,T.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),n={buildDate:I.$,fullVersion:g.ol,revision:I.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:n})}());A=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){x=e||{}}let e;if(A)try{e=new Worker(A,{name:"esri-worker-"+k++})}catch(t){E().warn(S,x),e=new v}else E().warn(S,x),e=new v;return N(e)}();return new B(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),u.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,n=(0,y.Jc)();return new Promise(((t,s)=>{const o={resolve:t,reject:s,abortHandle:(0,i.NY)(r,(()=>{this._outJobs.delete(n),this._post({type:L,jobId:n})}))};this._outJobs.set(n,o),this._post({type:R,jobId:n,modulePath:e})}))}_onMessage(e){const t=(0,y.VI)(e);if(t)switch(t.type){case D:this._onOpenedMessage(t);break;case O:this._onResponseMessage(t);break;case L:this._onAbortMessage(t);break;case C:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);n&&(n.controller&&n.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:s}=e,o=s?new AbortController:null,a=this._inJobs,l=h[t];let u;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);u=l.call(null,n,{signal:o?o.signal:null})}catch(e){return void this._post({type:O,jobId:r,error:(0,y.mF)(e)})}(0,i.$X)(u)?(a.set(r,{controller:o,promise:u}),u.then((e=>{a.has(r)&&(a.delete(r),this._post({type:O,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,i.zf)(e)||this._post({type:O,jobId:r,error:(0,y.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:O,jobId:r},u)}_onOpenedMessage(e){const{jobId:t,data:r}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,d.xt)(n.abortHandle),n.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:s}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,d.xt)(i.abortHandle),r?i.reject(n.A.fromJSON(JSON.parse(r))):i.resolve(s))}_post(e,t,r){return(0,y.u1)(this.worker,e,t,r)}}const F=(0,s.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,s.A)("workers-pool-size")??8):0;let j=(0,s.A)("esri-mobile")?Math.min(F,3):F;j||(j=(0,s.A)("safari")&&(0,s.A)("mac")?7:2);let P=0;const q=[];async function Z(e,t){const r=new o.A,{registryTarget:n,...s}=t;return await r.open(e,s),n&&(0,a.k)(n,r),r}async function G(e,t={}){if("string"!=typeof e)throw new n.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,s.A)("host-webworker")&&!(0,s.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,i.Te)(t.signal);const n=t.client||r;return Z([l.default.connect(r,t.schedule)],{...t,client:n})}if(await async function(){if(U)return U;$=new AbortController;const e=[];for(let t=0;t<j;t++){const r=B.create(t).then((e=>(q[t]=e,e)));e.push(r)}return U=Promise.all(e),U}(),(0,i.Te)(t.signal),"dedicated"===r){const r=P++%j;return Z([await q[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,j);if(r<j){const n=new Array(r);for(let s=0;s<r;++s){const r=P++%j;n[s]=q[r].open(e,t)}return Z(n,t)}}return Z(q.map((r=>r.open(e,t))),t)}let $,U=null},6518:(e,t,r)=>{r.d(t,{F:()=>a});var n=r(44208),s=r(75503),i=r(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new s.w(9,(0,n.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((r,n)=>{e[t++]=n})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,i.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,r){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,r)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,r)=>{r.d(t,{A:()=>y});var n=r(4576),s=r(49186),i=r(65529),o=r(53966),a=r(70328),l=r(19419),u=r(90708),d=r(6518),p=r(51441),c=r(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this.events=new i.A,this.featureAdapter=c.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,r,n,s]=this.fullBounds;return{xmin:t,ymin:r,xmax:n,ymax:s,spatialReference:(0,p.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const r of e){const e=this._boundsStore.get(r.objectId);e&&t((0,a.Jt)(h,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const r=this._featuresById.get(t);let n;if(r?(e.displayId=r.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,u.jQ)(null!=n?n:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const r=this._featuresById.get(t);if(!r)return this._add(e),e;const{geometry:n,attributes:i}=e;for(const e in i)r.attributes[e]=i[e];return n&&(r.geometry=n,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),n,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),r}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,r)=>{r.d(t,{T:()=>s});var n=r(43334);const s={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},64714:(e,t,r)=>{r.d(t,{F0:()=>l,Vx:()=>p,e2:()=>h,f:()=>y});var n=r(44208),s=r(4718),i=r(99352),o=r(4071),a=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let d=1;function p(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${c(t)} = null;`;for(const t in e)r+=`this${c(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${d++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new n}catch(r){return()=>({[t]:null,...e})}}function c(e){return u.test(e)?`.${e}`:`["${e}"]`}function h(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},80340:(e,t,r)=>{r.d(t,{P:()=>T});var n=r(90237),s=(r(59456),r(69622)),i=r(49186),o=r(53966),a=r(91869),l=r(74887),u=r(39516),d=r(10107),p=(r(44208),r(87811),r(40608)),c=r(39829),h=r(57251),y=r(21325),m=r(85342),f=r(69860),g=r(30504),_=r(71402),b=r(42538),w=r(61956),v=r(5443);let T=class extends s.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((r=>{r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((r=>{r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((r,n)=>{if("entity"===t.get(n))this.entityTypeNames.add(n);else{if("relationship"!==t.get(n))return o.A.getLogger(this).warn(`A named type, ${n}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(n);this.relationshipTypeNames.add(n)}const s=new Map;r.members?.forEach((e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(n);const t=this.getById(e.id);t&&s.set(e.id,t)})),this.sublayerCaches.set(n,s)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new i.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const r=this.inclusionModeDefinition.namedTypeDefinitions.get(e);r.members||(r.members=new Map),r.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const r=new Map;r.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:r}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return f.A.getInstance().readFromStoreById(e)}async getData(e,t,r){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let n;if(n=e||new w.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,r=this._processingCacheUpdatesLookup.get(t.objectType.name??""),s=n.outFields;s&&1===s.length&&s[0]===m.dr&&"1=1"===n.where||await Promise.all(r??[]);const i=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return i.forEach((r=>{if(this.relationshipTypeNames.has(t.objectType.name)){r.geometry=e.relationshipLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);const n=this.memberIdTypeLookup.get(r.attributes[m.Cz]),s=this.memberIdTypeLookup.get(r.attributes[m.KQ]),i=this._isEndEntitySpatial(n,r,m.Cz),o=this._isEndEntitySpatial(s,r,m.KQ);r.attributes[m.BL]=Number(i&&o)}else{r.geometry=e.entityLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);const n=this.geographicLookup.get(t.objectType.name);n&&r.attributes[n.name]?r.attributes[m.BL]=1:r.attributes[m.BL]=0}r.attributes[m.T1]=r.geometry,o.push(r)})),o}return this.retrieveDataFromService(n,t,r)}async getConnectedRecordIds(e,t,r){const n=[];let s="";const i=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(const e of t)s=s+e+"|";s=s.slice(0,-1)}const o={},a=[];for(const[e,r]of i){const n=`${e}_ids`;o[n]=r,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r:${s}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):a.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return n;const l=a.join(" UNION "),u=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,new b.A({openCypherQuery:l,bindParameters:o}),{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(let e=0;e<t.length;e++){const r=t[e];n.push({id:r[0],typeName:r[1]}),n.push({id:r[2],typeName:r[3]})}}return n}async getRelationshipsBetweenNodes(e,t,r){const n=this._getNamedTypeIdMapFromNodeIds(e);if(0===n.size)return[];const s={relationshipExclusionIds:t,possibleConnectionEntityIds:e},i=[];for(const[e,t]of n.entries()){const r=`${e}_ids`;s[r]=t,i.push(`MATCH (n:${e}) WHERE id(n) IN $${r} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const o=i.join(" UNION "),a=[],l=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,new b.A({openCypherQuery:o,bindParameters:s}),{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const r=t[e];a.push({id:r[0],typeName:r[1]})}}return a}async getRelationshipsFromNodes(e,t,r,n){const s=this._getNamedTypeIdMapFromNodeIds(e);if(0===s.size||0===t.length)return[];const i={relationshipExclusionIds:r,possibleConnectionEntityIds:t},o=[];for(const[e,t]of s.entries()){const r=`${e}_ids`;i[r]=t,o.push(`MATCH (n:${e}) WHERE id(n) IN $${r} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const a=o.join(" UNION "),l=new Map,u=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,new b.A({openCypherQuery:a,bindParameters:i}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(let e=0;e<t.length;e++){const r=t[e];let n=l.get(r[1]);n||(n=new Set,l.set(r[1],n)),n.add(r[0])}}const d=[];for(const[e,t]of l)for(const r of t)d.push({id:r,typeName:e});return d}async refreshCacheContent(e,t,r,n=!0,s){const o=f.A.getInstance(),u=[],d=new Map,p=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&p.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&p.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))d.has(t)?d.get(t)?.push(e):d.set(t,[e])})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?d.set(t,null):e.members&&e.members.forEach((e=>{d.has(t)&&null!==d.get(t)?d.get(t)?.push(e.id):d.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&d.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&d.set(e.name,null)})));for(const[e,l]of d){const d=new Set(l),c=new Promise(((u,c)=>{(async()=>{const u=new Set,c=[];let h,y="",f=!1;if(t||p.get(e)?.properties?.forEach((e=>{e.name&&u.add(e.name)})),r&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&u.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,u.forEach((e=>{y+=`, n.${e}`,c.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new i.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);f=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,u.forEach((e=>{y+=`, n.${e}`,c.push(e)}))}h=new b.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const g=(await(0,_.executeQueryStreaming)(this.knowledgeGraph,h,{signal:s?.signal})).resultRowsStream.getReader();for(;;){const{done:t,value:r}=await g.read();if(t)break;const s=[];for(let e=0;e<r.length;e++){const t=r[e];let n=0,i=0;const o={properties:{}};for(o.id=t[n],n++,i++,f&&(o.originId=t[n],n++,i++,o.destinationId=t[n],n++,i++,(0,a.tE)(this.nodeConnectionsLookup,o.originId,(()=>new Set)).add(o.id),(0,a.tE)(this.nodeConnectionsLookup,o.destinationId,(()=>new Set)).add(o.id),(0,a.tE)(this.relationshipConnectionsLookup,o.id,(()=>[o.originId,o.destinationId])));n<t.length;n++)o.properties[c[n-i]]=t[n];d.delete(o.id),s.push(o)}const i=o.writeToStore(s,m.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);i.forEach((t=>{l?.set(t.attributes[m.dr],t),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[m.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[m.dr],{id:t.attributes[m.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[m.dr],(()=>new Set)).add(e))}))}const w=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(w)for(const e of d)w.members?.delete(e)})().then((()=>{u(null)})).catch((e=>{"AbortError"===e.name?u(null):c(e)}))}));u.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(u),s?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){const t=new Set,r=new Set(e.map((e=>e.id)));for(const r of e)t.add(r.typeName),1===this.memberIdTypeLookup.get(r.id)?.size?this.memberIdTypeLookup.delete(r.id):this.memberIdTypeLookup.get(r.id)?.delete(r.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===r.typeName&&e.members?.has(r.id)&&e.members.delete(r.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,n)=>{r.has(n)&&this.sublayerCaches.get(e)?.delete(n)}))}))}async retrieveDataFromService(e,t,r){const n=f.A.getInstance(),s=new Set,o=[];let a,l="",d=[];const p="relationship"===t.graphType,w=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,T=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let I=!w&&T?Array.from(T).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(I=e.objectIds);else if(null!=e.objectIds&&I&&I.length>0){const t=e.objectIds;e.objectIds=I.filter((e=>t.includes(e)))}else if(null!=e.objectIds)I=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=I}if(null!=e.outFields){const r=e.outFields;r.includes("*")?t.fields.forEach((e=>{s.add(e.name)})):r.forEach((e=>{e!==m.dr&&e!==t.geometryFieldName&&s.add(e)}))}if(null!=e.geometry){const r=e.geometry;let n;const d=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,m=d?.spatialReference,f=d?.serviceCapabilities?.geometryCapabilities;let _=f?.geometryMaxBoundingRectangleSizeX,w=f?.geometryMaxBoundingRectangleSizeY;if("point"===r.type){let e=r;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,y.KK),e=(0,h.project)(e,y.KK)),n=new v.A({spatialReference:y.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else r?.extent?.spatialReference&&!r.spatialReference?.isWGS84?(await(0,h.initializeProjection)(r.extent.spatialReference,y.KK),n=(0,h.project)(r.extent,y.KK)):n=r.extent;if(_&&w&&m){if(4326!==m.wkid){const e=new v.A({spatialReference:m,xmax:_,ymax:w}),t=(0,h.project)(e,y.KK);_=t.xmax,w=t.ymax}if(n.xmax-n.xmin>_)throw new i.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${_}° latitude, limit exceeded`);if(n.ymax-n.ymin>w)throw new i.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const r=await(0,u.G)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&s.add(e.name)}))}l=p?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&s.add(t.geometryFieldName),s.forEach((e=>{l+=`, n.${e}`,o.push(e)})),a=new b.A({openCypherQuery:l,bindParameters:{param_filter_geom:new c.A({rings:(0,g.Wq)(n)})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){const n=await(0,u.G)(e.where,t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&s.add(e.name)}));const i=new Set(["column-reference","string","number","binary-expression"]),o=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const l=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&i.has(e.left.type)&&i.has(e.right.type)&&o.has(e.operator))return`${l(e.left)} ${e.operator} ${l(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let r=e.right.value;"%"===r.charAt(0)&&(r=r.slice(1)),"%"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),t+=`'${r.toLowerCase()}')`}return t}return a=!0,""};r=l(n.parseTree),a&&(r="")}let n="";n=p?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let i=!1;I&&(i=!0,n+=" WHERE ID(n) IN $ids"),r&&(n+=i?" AND":" WHERE",n+=` ${r}`),n+=" return ID(n)",p&&(n+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&s.add(t.geometryFieldName),s.forEach((e=>{n+=`, n.${e}`,o.push(e)})),a=new b.A(I?{openCypherQuery:n,bindParameters:{ids:I}}:{openCypherQuery:n})}const E=(await(0,_.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,r)).resultRowsStream.getReader();for(;;){const{done:e,value:r}=await E.read();if(e)break;const s=[];for(let e=0;e<r.length;e++){const t=r[e];let n=0,i=0;const a={properties:{}};for(a.id=t[n],n++,i++,p&&(a.originId=t[n],n++,i++,a.destinationId=t[n],n++,i++);n<t.length;n++)a.properties[o[n-i]]=t[n];s.push(a)}d=d.concat(n.writeToStore(s,m.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return d}_isEndEntitySpatial(e,t,r){for(const n of e??[])if(this.entityTypeNames.has(n)){const e=this.geographicLookup.get(n),s=e&&this.sublayerCaches.get(n)?.get(t.attributes[r]);if(e&&s?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){const t=new Map;return e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const r of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(r))return;t.has(r)?t.get(r)?.push(e):t.set(r,[e])}})),t}};(0,n._)([(0,d.MZ)()],T.prototype,"knowledgeGraph",void 0),(0,n._)([(0,d.MZ)()],T.prototype,"inclusionModeDefinition",void 0),(0,n._)([(0,d.MZ)()],T.prototype,"entityTypeNames",void 0),(0,n._)([(0,d.MZ)()],T.prototype,"relationshipTypeNames",void 0),(0,n._)([(0,d.MZ)()],T.prototype,"geographicLookup",void 0),(0,n._)([(0,d.MZ)()],T.prototype,"sublayerCaches",void 0),(0,n._)([(0,d.MZ)()],T.prototype,"nodeConnectionsLookup",void 0),(0,n._)([(0,d.MZ)()],T.prototype,"relationshipConnectionsLookup",void 0),(0,n._)([(0,d.MZ)()],T.prototype,"memberIdTypeLookup",void 0),T=(0,n._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],T)},70643:(e,t,r)=>{r.d(t,{A:()=>X});var n=r(90237),s=(r(59456),r(13874)),i=(r(86162),r(52464),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494)),o=r(15036),a=r(4718),l=r(92071),u=(r(29953),r(10107)),d=(r(44208),r(53966),r(40608)),p=r(43937),c=r(35666),h=r(57251),y=r(16930),m=r(21325),f=r(4146),g=r(83221),_=r(19730),b=r(64714);r(87811);const w=(0,r(17036).p)(),v=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,n._)([(0,u.MZ)(w.fields)],t.prototype,"fields",void 0),(0,n._)([(0,u.MZ)(w.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,n._)([(0,d.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var T=r(85342),I=r(63074),E=r(87718),M=r(76294),A=r(32756),x=r(54310),S=r(25036),N=r(82935),k=r(10873),L=r(13213),C=r(20437),R=r(30524),D=r(81457),O=r(39383),B=r(96184),F=r(22671),j=r(61956),P=r(30291),q=r(61322),Z=r(5443),G=r(39829),$=r(82799),U=r(86738),H=r(50498);function Q(e){if(!e.json)return e;e.json.write=Y(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=Y(e.write))}return e}function Y(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:r,overridePolicy:n,...s}=e;return function(e,t){const r=J.call(this,e,t);return r.enabled?{...s,...r}:r}}(e)),e):!0===e?z():e}function z(){return{overridePolicy:J}}function J(e,t){const r=!!this.geometryType;let n={enabled:r};return r&&(n={...n,...W.call(this,e,t)}),n}function W(e,t){return{ignoreOrigin:this.originIdOf(t)>c.Gr.DEFAULTS}}let V=class extends(v((0,M.J)((0,E.F)((0,I.dM)((0,A.fY)((0,N.e)((0,S.j)((0,x.J)((0,l.P)(f.A)))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=(0,b.f)(!1,!1),this.charts=null,this.definitionExpression=null,this.displayField="",this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.labelingInfo=null,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=T.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new q.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=j.A.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach((t=>{const r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(C.A.fromJSON({name:t.name,type:r,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))})),e.push(C.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),C.A.fromJSON({name:T.M1,type:"esriFieldTypeInteger",alias:T.M1,editable:!1}),C.A.fromJSON({name:T.BL,type:"esriFieldTypeInteger",alias:T.BL,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?H.g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return T.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphTypeName(){return this.objectType?.name}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set renderer(e){(0,R.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):"link-chart"===this.parentCompositeLayer?.type?"relationship"===this.graphType?(0,i.r)((0,b.F0)(H.g.toJSON("polyline")).renderer):(0,i.r)((0,b.F0)(H.g.toJSON("point")).renderer):(0,i.r)((0,b.F0)(H.g.toJSON(this.geometryType)).renderer)}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??y.A.WGS84}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,P.tn)(this,e)}createQuery(){return new j.A({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e),s=F.A.fromJSON(await n.executeQuery(r.toJSON(),t?.signal));return s.features.forEach((e=>{e.sourceLayer=this})),s}async queryFeaturesJSON(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e);return await n.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e);return n.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){const r={...e,returnGeometry:!0},{resolvedQuery:n,queryEngine:s}=await this._setupQueryObjects(r),i=await s.executeQueryForExtent(n.toJSON(),t?.signal);let o;return o=null!=i.extent?.xmin&&null!=i.extent?.xmax&&null!=i.extent?.ymin&&null!=i.extent?.ymax?new Z.A(i.extent):new Z.A,{count:i.count,extent:o}}async queryObjectIds(e,t){const r=j.A.from(e);let n;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);n=this.loadQueryEngine(e)}return n.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new g.A({geometryType:H.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new _.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:H.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new j.A({where:"1=1",outFields:[T.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then((()=>(0,R.sv)(this.timeInfo,this.fieldsIndex)))),Promise.resolve(this)}async _setupQueryObjects(e,t){const r=j.A.from(e),n=r.geometry;if(n&&!n.spatialReference?.isWGS84&&(await(0,h.initializeProjection)(n.spatialReference,m.KK),r.geometry=(0,h.project)(n instanceof G.A||n instanceof $.A||n instanceof U.A?n:n.extent,m.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:r,queryEngine:this._cachedQueryEngine};const s=await this.parentCompositeLayer.dataManager.getData(r,this,t);return{resolvedQuery:r,queryEngine:this.loadQueryEngine(s)}}};(0,n._)([(0,u.MZ)(Q((0,a.o8)(I.sU)))],V.prototype,"blendMode",void 0),(0,n._)([(0,u.MZ)()],V.prototype,"capabilities",void 0),(0,n._)([(0,u.MZ)({json:{origins:{"web-scene":{write:!1}},write:z()}})],V.prototype,"charts",void 0),(0,n._)([(0,u.MZ)({readOnly:!0})],V.prototype,"defaultPopupTemplate",null),(0,n._)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],V.prototype,"definitionExpression",void 0),(0,n._)([(0,u.MZ)()],V.prototype,"displayField",void 0),(0,n._)([(0,u.MZ)(Q((0,a.o8)(I.LF)))],V.prototype,"effect",void 0),(0,n._)([(0,u.MZ)()],V.prototype,"elevationInfo",void 0),(0,n._)([(0,u.MZ)(Q((0,a.o8)(E.Y)))],V.prototype,"featureEffect",void 0),(0,n._)([(0,u.MZ)(Q((0,a.o8)(L.d)))],V.prototype,"featureReduction",null),(0,n._)([(0,u.MZ)()],V.prototype,"fields",null),(0,n._)([(0,u.MZ)()],V.prototype,"geometryType",null),(0,n._)([(0,u.MZ)()],V.prototype,"geometryFieldName",null),(0,n._)([(0,u.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],V.prototype,"graphType",void 0),(0,n._)([(0,u.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],V.prototype,"graphTypeName",null),(0,n._)([(0,u.MZ)()],V.prototype,"hasM",null),(0,n._)([(0,u.MZ)()],V.prototype,"hasZ",null),(0,n._)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],V.prototype,"id",void 0),(0,n._)([(0,u.MZ)(Q((0,a.o8)(k.kF)))],V.prototype,"labelsVisible",void 0),(0,n._)([(0,u.MZ)({type:[D.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:O.w,write:z()}})],V.prototype,"labelingInfo",void 0),(0,n._)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],V.prototype,"layerType",void 0),(0,n._)([(0,u.MZ)(Q((0,a.o8)(k.fV)))],V.prototype,"legendEnabled",void 0),(0,n._)([(0,u.MZ)(Q((0,a.o8)(k.hG)))],V.prototype,"maxScale",void 0),(0,n._)([(0,u.MZ)(Q((0,a.o8)(k.hn)))],V.prototype,"minScale",void 0),(0,n._)([(0,u.MZ)()],V.prototype,"objectIdField",void 0),(0,n._)([(0,u.MZ)()],V.prototype,"objectType",void 0),(0,n._)([(0,u.MZ)(Q((0,a.o8)(k.ke)))],V.prototype,"opacity",void 0),(0,n._)([(0,u.MZ)(Q((0,a.o8)(A.ne)))],V.prototype,"orderBy",void 0),(0,n._)([(0,u.MZ)({clonable:!1})],V.prototype,"parent",void 0),(0,n._)([(0,u.MZ)()],V.prototype,"parentCompositeLayer",void 0),(0,n._)([(0,u.MZ)(Q((0,a.o8)(k.M6)))],V.prototype,"popupEnabled",void 0),(0,n._)([(0,u.MZ)({type:s.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],V.prototype,"popupTemplate",void 0),(0,n._)([(0,u.MZ)({type:Number,json:{write:{overridePolicy:W}}})],V.prototype,"refreshInterval",void 0),(0,n._)([(0,u.MZ)({types:o.H,json:{name:"layerDefinition.drawingInfo.renderer",write:z()}})],V.prototype,"renderer",null),(0,n._)([(0,u.MZ)()],V.prototype,"source",void 0),(0,n._)([(0,u.MZ)()],V.prototype,"spatialReference",null),(0,n._)([(0,u.MZ)({type:B.A,json:{name:"layerDefinition.timeInfo",write:!0,origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:!0},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:!0}}}})],V.prototype,"timeInfo",null),(0,n._)([(0,u.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],V.prototype,"title",null),(0,n._)([(0,p.K)("title")],V.prototype,"writeTitle",null),(0,n._)([(0,u.MZ)({json:{read:!1}})],V.prototype,"type",void 0),(0,n._)([(0,u.MZ)(Q((0,a.o8)(N.B)))],V.prototype,"useViewTime",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{name:"visibility",write:z()}})],V.prototype,"visible",void 0),V=(0,n._)([(0,d.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],V);const X=V},69860:(e,t,r)=>{r.d(t,{A:()=>a}),r(59456);var n=r(90708),s=r(43334),i=r(85342),o=r(65864);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const r=this.readFromStoreById(e);r&&t.push(r)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){const a=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l,u=null;if(r&&e.properties[r]&&(u=(0,n.Ux)(e.properties[r])),"originId"in e&&"destinationId"in e&&(e.properties[i.Cz]=e.originId,e.properties[i.KQ]=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const n=this._featureLookup.get(e.id),i=JSON.parse(JSON.stringify(Object.assign(n.attributes,e.properties)));r&&e.properties[r]&&(i[r]=(0,o.rS)(e.properties[r])),l=new s.Om(u?JSON.parse(JSON.stringify(u)):n?.geometry?JSON.parse(JSON.stringify(n.geometry)):null,i,null,e.properties[t])}else l=new s.Om(u?JSON.parse(JSON.stringify(u)):null,e.properties,null,e.properties[t]);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,l),a.push(l)})),a}}},85342:(e,t,r)=>{r.d(t,{BL:()=>u,Cz:()=>i,KQ:()=>o,M1:()=>l,T1:()=>a,dr:()=>s,qN:()=>c});var n=r(71402);const s="ESRI__ID",i="ESRI__OriginID",o="ESRI__DestID",a="ESRI__LayoutGeometry",l="ESRI__AggregationCount",u="LC.ESRI__IsSpatial",d={initializeLayersFromClientData:async(e,t,r)=>{if(t||(t=[...e.layers,...e.tables].map((e=>e.graphTypeName))),0===t?.length)return;const s=new Map;for(const r of t)s.set(r,p(e,r));const i=await(0,n.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(s.values()),{requestOptions:{signal:r?.signal}});for(const t of[...e.layers,...e.tables]){const r=t.objectType.name;if(null===r)continue;const n=i.get(p(e,r));if(n){const e=JSON.parse(n);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}}},p=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function c(e,t,r){return d.initializeLayersFromClientData(e,t,r)}},30504:(e,t,r)=>{r.d(t,{k5:()=>u,aq:()=>l,Wq:()=>d}),r(59456),r(52106),r(61147);var n=r(49186),s=(r(94194),r(85342),r(69860),r(8460),r(66552));(0,s.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),(0,s.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"});const i=new Map([["basic-grid","basic-grid"],["geographic-organic-standard","geographic-organic-standard"],["hierarchical-bottom-to-top","hierarchical-bottom-to-top"],["hierarchical-top-to-bottom","hierarchical-bottom-to-top"],["organic-community","organic-community"],["organic-fusiform","organic-standard"],["organic-leaf-circle","organic-standard"],["organic-standard","organic-standard"],["radial-node-centric","radial-root-centric"],["radial-root-centric","radial-root-centric"],["tree-bottom-to-top","tree-left-to-right"],["tree-left-to-right","tree-left-to-right"],["tree-right-to-left","tree-left-to-right"],["tree-top-to-bottom","tree-left-to-right"],["chronological-mono-timeline","chronological-mono-timeline"],["chronological-multi-timeline","chronological-multi-timeline"]]);var o=r(71402),a=r(42538);async function l(e,t,r){const n=[],s=function(e,t){const r=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&r.set(e.name,[]);for(const t of e)r.has(t.typeName)&&r.get(t.typeName)?.push(t.id);return r}(e,t),i={},l=[];for(const[e,t]of s){if(t.length<1)continue;const r=`${e}_ids`;i[r]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${r} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];const u=l.join(" UNION "),d=new a.A({openCypherQuery:u,bindParameters:i}),p=(await(0,o.executeQueryStreaming)(t,d,r?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(const e of t)n.push({id:e[0],typeName:e[1]}),n.push({id:e[2],typeName:e[3]})}return n}r(40863),r(82799),r(94985),r(39829),r(68249),r(86738);const u=e=>i.get(e)??"radial-root-centric";function d(e){if(!e.spatialReference.isWGS84)throw new n.A("knowledge-graph:layer-support-utils","The utilsExtentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map((e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]))}},82935:(e,t,r)=>{r.d(t,{B:()=>h,e:()=>y});var n=r(90237),s=r(10107),i=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),a=r(89317),l=r(30524),u=r(96184),d=r(73133),p=r(79677),c=r(10184);const h={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,s=d.j.fromJSON(r.timeOffsetUnits);return n&&s?new c.A({value:n,unit:s}):null}set timeInfo(e){(0,l.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,s.MZ)({type:p.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,s.MZ)({type:c.A})],t.prototype,"timeOffset",void 0),(0,n._)([(0,i.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,s.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,s.MZ)(h)],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,o.$)("esri.layers.mixins.TemporalLayer")],t),t}},96184:(e,t,r)=>{r.d(t,{A:()=>m});var n=r(90237),s=r(69540),i=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),d=r(79677),p=r(10184),c=r(56400);function h(e,t){return p.A.fromJSON({value:e,unit:t})}let y=class extends(s.A.ClonableMixin(i.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?d.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,n._)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,n._)([(0,o.MZ)({type:d.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,n._)([(0,a.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,n._)([(0,u.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,n._)([(0,o.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,n._)([(0,o.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,n._)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,n._)([(0,u.K)("interval")],y.prototype,"writeInterval",null),(0,n._)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,n._)([(0,o.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,n._)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,n._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,n._)([(0,o.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,n._)([(0,l.$)("esri.layers.support.TimeInfo")],y);const m=y},4071:(e,t,r)=>{r.d(t,{$:()=>n,P:()=>s});const n={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},s={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},17036:(e,t,r)=>{r.d(t,{p:()=>l});var n=r(44208),s=r(53966),i=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[i.A],value:null,set:function(e){if(e&&(0,n.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},8460:(e,t,r)=>{r.d(t,{$C:()=>f,Hh:()=>o,J:()=>u,JT:()=>l,Tu:()=>y,Wg:()=>m,Xq:()=>_,i6:()=>b,pM:()=>h,tx:()=>a,vJ:()=>g});var n=r(2741);let s,i=null;function o(){return s||(s=r.e(3666).then(r.bind(r,3666)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,n.s)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){i=e}(e)})),s)}var a,l,u,d,p,c,h,y,m,f,g,_,b,w,v;function T(e){const t=Object.keys(d).filter((e=>isNaN(parseInt(e,10)))).indexOf(e.timeDirection);let r=p.startAndEnd;switch(e.eventsTicksVisualization){case"start-only":r=p.startOnly;break;case"none":r=p.none}return{timeDirection:{value:t>-1?t:d.right},timeBannerUTCOffsetInMinutes:e.timeBannerUTCOffsetInMinutes,eventsTicksVisualization:{value:r},showDurationLineForNonZeroDurationEntityEvents:e.showDurationLineForNonZeroDurationEntityEvents,durationLineWidth:e.durationLineWidth,entityPositionAtDurationRatio:e.entityPositionAtDurationRatio,showNonZeroDurationIntervalBounds:e.showNonZeroDurationIntervalBounds,separateTimeOverlaps:e.separateTimeOverlaps,separateTimelineOverlaps:e.separateTimelineOverlaps,moveFirstBends:e.moveFirstBends,secondBendRatio:e.secondBendRatio,lineSeparationMultiplier:e.lineSeparationMultiplier,spaceSeparatedLinesEvenly:e.spaceSeparatedLinesEvenly,useBezierCurves:e.useBezierCurves,separatedLineShapeRatio:e.separatedLineShapeRatio}}function I(e,t,r,n,s,o){const a=r.length,u=s.length,d=Float64Array.BYTES_PER_ELEMENT,p=Uint32Array.BYTES_PER_ELEMENT,c=Uint8Array.BYTES_PER_ELEMENT,h=16+a*(c+2*d)+u*(2*p),y=i._malloc(h);try{const c=y+16-y%16,h=c+a*d,m=h+a*d,f=m+u*p,g=f+u*p,_=()=>[i.HEAPF64.subarray(c>>3,(c>>3)+a),i.HEAPF64.subarray(h>>3,(h>>3)+a),i.HEAPU32.subarray(m>>2,(m>>2)+u),i.HEAPU32.subarray(f>>2,(f>>2)+u),i.HEAPU8.subarray(g,g+a)],[b,w,v,T,I]=_();b.set(r),w.set(n),v.set(s),T.set(o),I.set(t);const E=e(a,g,c,h,u,m,f);let M=null,A=null;if(E.value===l.Success){const e=i.getLayoutLinksTypes(),t=i.getLayoutLinksVerticesEndIndices(),r=i.getLayoutLinksVertices(),n=i.countLayoutLinksVertices();!u||e&&t?n&&!r?E.value=l.Error:(M={types:new Uint8Array(i.HEAPU8.subarray(e,e+u)),vertexEndIndex:new Uint32Array(i.HEAPU32.subarray(t>>2,(t>>2)+u)),vertices:new Float64Array(i.HEAPF64.subarray(r>>3,(r>>3)+2*n))},A=i.getAuxiliaryGraphicElements()):E.value=l.Error}const[x,S,N,k,L]=_();return r.set(x),n.set(S),s.set(N),o.set(k),t.set(L),{status:E.value,links:M,graphics:A}}finally{i._free(y),i.cleanupLayout()}}(c=a||(a={}))[c.None=0]="None",c[c.IsMovable=1]="IsMovable",c[c.IsGeographic=2]="IsGeographic",c[c.IsRoot=4]="IsRoot",c[c.IsOld=8]="IsOld",function(e){e[e.Success=0]="Success",e[e.Error=1]="Error",e[e.Canceled=2]="Canceled"}(l||(l={})),function(e){e[e.Regular=0]="Regular",e[e.Curved=1]="Curved",e[e.Recursive=2]="Recursive"}(u||(u={})),function(e){e[e.right=0]="right",e[e.left=1]="left",e[e.top=2]="top",e[e.bottom=3]="bottom"}(d||(d={})),function(e){e[e.none=0]="none",e[e.startOnly=1]="startOnly",e[e.startAndEnd=2]="startAndEnd"}(p||(p={})),function(e){e.getMinIdealEdgeLength=function(){return i.getMinIdealEdgeLength()},e.apply=function(e,t,r,n,s,o,a=2,l=1,u=-1){return I(((t,r,n,s,o,d,p)=>i.applyForceDirectedLayout(e,t,r,n,s,o,d,p,a,l,u)),t,r,n,s,o)}}(h||(h={})),function(e){e.apply=function(e,t,r,n,s,o,a=2,l=1,u=-1){return I(((t,r,n,s,o,d,p)=>i.applyCommunityLayout(e,t,r,n,s,o,d,p,a,l,u)),t,r,n,s,o)}}(y||(y={})),function(e){e.apply=function(e,t,r,n,s,o){return I(((t,r,n,s,o,a,l)=>i.applySimpleLayout(e,t,r,n,s,o,a,l)),t,r,n,s,o)}}(m||(m={})),function(e){e.apply=function(e,t,r,n,s,o){return I(((t,r,n,s,o,a,l)=>i.applyHierarchicalLayout(e,t,r,n,s,o,a,l)),t,r,n,s,o)}}(f||(f={})),function(e){e.apply=function(e,t,r,n,s,o){return I(((t,r,n,s,o,a,l)=>i.applyRadialTreeLayout(e,t,r,n,s,o,a,l)),t,r,n,s,o)}}(g||(g={})),function(e){e.apply=function(e,t,r,n,s,o){return I(((t,r,n,s,o,a,l)=>i.applySmartTreeLayout(e,t,r,n,s,o,a,l)),t,r,n,s,o)}}(_||(_={})),function(e){e.apply=function(e,t,r,n,s,o,a,u,c,h,y,m){const f={timeDirection:d.right,timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:p.startAndEnd,showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0};return I(((t,r,n,a,u,d,p)=>{if(s.length!==t)return{value:l.Error};if(o.length!==t)return{value:l.Error};if(c.length!==u)return{value:l.Error};if(h.length!==u)return{value:l.Error};const g=Float64Array.BYTES_PER_ELEMENT,_=16,b=i._malloc(_+t*g),w=i._malloc(_+t*g),v=i._malloc(_+u*g),I=i._malloc(_+u*g),E=b+_-b%_,M=w+_-w%_,A=v+_-v%_,x=I+_-I%_;try{i.HEAPF64.subarray(E>>3,(E>>3)+t).set(s),i.HEAPF64.subarray(M>>3,(M>>3)+t).set(o),i.HEAPF64.subarray(A>>3,(A>>3)+u).set(c),i.HEAPF64.subarray(x>>3,(x>>3)+u).set(h);const l=T(Object.assign(f,m));return i.applyChronologicalLayout(e,t,r,n,a,E,M,u,d,p,A,x,y,l)}finally{i._free(b),i._free(w),i._free(v),i._free(I)}}),t,r,n,a,u)}}(b||(b={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(w||(w={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(v||(v={}))},73133:(e,t,r)=>{r.d(t,{j:()=>n});const n=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},25927:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),s=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),o=r(54238),a=r(86738);let l=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,n._)([(0,s.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.Entity")],l);const u=l},54238:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(90237),s=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),o=r(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a);const l=a},77901:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(90237),s=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends s.A{constructor(e){super(e),this.properties=null}};(0,n._)([(0,i.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,n._)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a);const l=a},42538:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(90237),s=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),o=r(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,n._)([(0,s.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQuery")],a);const l=a;let u=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,n._)([(0,s.MZ)()],u.prototype,"bindParameters",void 0),(0,n._)([(0,s.MZ)()],u.prototype,"bindGeometryQuantizationParameters",void 0),(0,n._)([(0,s.MZ)()],u.prototype,"outputQuantizationParameters",void 0),(0,n._)([(0,s.MZ)()],u.prototype,"outputSpatialReference",void 0),(0,n._)([(0,s.MZ)()],u.prototype,"provenanceBehavior",void 0),u=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],u);const d=u},40662:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(90237),s=(r(53966),r(44208),r(87811),r(49186),r(40608)),i=r(77901);let o=class extends i.A{constructor(e){super(e)}};o=(0,n._)([(0,s.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),s=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(77901);let l=class extends s.A{constructor(e){super(e),this.path=null}};(0,n._)([(0,i.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,n._)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l);const u=l},23150:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),s=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),o=r(54238),a=r(82799);let l=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,n._)([(0,s.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,n._)([(0,i.$)("esri.rest.knowledgeGraph.Relationship")],l);const u=l},10184:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(90237),s=r(69540),i=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),d=r(73133);let p=class extends(s.A.ClonableMixin(i.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,l.e)(d.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,n._)([(0,u.$)("esri.time.TimeInterval")],p);const c=p}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2935,8958],{85334:(e,t,r)=>{r.d(t,{$:()=>m,IB:()=>s,Iy:()=>S,N2:()=>g,RH:()=>v,ZD:()=>w});var n=r(68197),i=r(4576),o=r(4718);function s(e){return"r"in e&&"g"in e&&"b"in e}function a(e){return"h"in e&&"s"in e&&"v"in e}function l(e){return"l"in e&&"a"in e&&"b"in e}function u(e){return"l"in e&&"c"in e&&"h"in e}r(87317),r(91829);const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],p=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function d(e,t){const r=[];let n,i;if(e[0].length!==t.length)throw new Error("dimensions do not match");const o=e.length,s=e[0].length;let a=0;for(n=0;n<o;n++){for(a=0,i=0;i<s;i++)a+=e[n][i]*t[i];r.push(a)}return r}function y(e){const t=[e.r/255,e.g/255,e.b/255].map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),r=d(c,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function h(e){const t=d(p,[e.x/100,e.y/100,e.z/100]).map((e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))}));return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function f(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map((e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function b(e){const t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map((e=>e>6/29?e**3:3*(6/29)**2*(e-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function m(e){return s(e)?e:u(e)?function(e){return h(b(function(e){const t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):l(e)?function(e){return h(b(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?h(e):a(e)?function(e){const t=(e.h+360)%360/60,r=e.s/100,n=e.v/100*255,i=n*r,o=i*(1-Math.abs(t%2-1));let s;switch(Math.floor(t)){case 0:s={r:i,g:o,b:0};break;case 1:s={r:o,g:i,b:0};break;case 2:s={r:0,g:i,b:o};break;case 3:s={r:0,g:o,b:i};break;case 4:s={r:o,g:0,b:i};break;case 5:case 6:s={r:i,g:0,b:o};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-i),s.g=Math.round(s.g+n-i),s.b=Math.round(s.b+n-i),s}(e):e}function g(e){return a(e)?e:function(e){const t=e.r,r=e.g,n=e.b,i=Math.max(t,r,n),o=i-Math.min(t,r,n);let s=i,a=0===o?0:i===t?(r-n)/o%6:i===r?(n-t)/o+2:(t-r)/o+4,l=0===o?0:o/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(m(e))}function w(e){return l(e)?e:function(e){return f(y(e))}(m(e))}function v(e){return u(e)?e:function(e){return function(e){const t=e.l,r=e.a,n=e.b,i=Math.sqrt(r*r+n*n);let o=Math.atan2(n,r);return o=o>0?o:o+2*Math.PI,{l:t,c:i,h:o}}(f(y(e)))}(m(e))}var M,A;function S(e,t,r={}){if(0===e.length||t<=0)return[];if(1===(e=e.map((e=>"string"==typeof e?new n.A(e):e))).length||1===t){const r=[],n=e[0];for(let e=0;e<t;e++)r.push(n.clone());return r}if(r.shuffle&&(e=(0,i.k4)((0,o.o8)(e),r.seed)),e.length>=t){const r=[],n=(e.length-1)/(t-1);for(let i=0;i<t;i++){const t=Math.round(i*n);r.push(e[t].clone())}return r}return function(e,t,r={}){const n=[],o=e.length-1,s=Math.ceil((t-e.length)/o);e:for(let i=0;i<o;i++){const o=e[i],a=e[i+1];for(let i=1;i<=s;i++){const l=i/(s+1);if(n.push(I(o,a,l,r)),n.length+e.length===t)break e}}return[...e.map((e=>e.clone())),...(0,i.k4)(n,r.seed??1)]}(e,t,r)}(A=M||(M={}))[A.Low=160]="Low",A[A.High=225]="High";const _=(e,t)=>{const r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+r))};function I(e,t,r,o={}){const s=e.r,a=e.g,l=e.b,u=t.r,c=t.g,p=t.b,d=Math.round(s+(u-s)*r),y=Math.round(a+(c-a)*r),h=Math.round(l+(p-l)*r);if(!o.offset)return new n.A([d,y,h]);const f=(0,i.Mo)(o.seed);return new n.A([_(d,f),_(y,f),_(h,f)])}},81583:(e,t,r)=>{r.d(t,{L:()=>a,g:()=>s});var n=r(60999),i=r(5503),o=r(92474);async function s(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],s=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?s(...t):i.A.isCollection(t)?t.forEach((e=>s(e))):o.A.isLoadable(t)&&r.push(t))};t(s);let a=null;if(await(0,n.Tj)(r,(async e=>{const t=await(0,n.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},39516:(e,t,r)=>{async function n(e,t){const{default:n}=await r.e(8368).then(r.bind(r,88368));return n.create(e,{fieldsIndex:t})}function i(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>n,m:()=>i})},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>i,vD:()=>s,yS:()=>o});const n="randomUUID"in crypto;function i(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},59929:(e,t,r)=>{r.r(t),r.d(t,{default:()=>_e});var n=r(90237),i=r(69540),o=r(5503),s=r(49186),a=r(81583),l=r(92071),u=r(74887),c=r(36708),p=r(39516),d=r(84952),y=r(10107),h=(r(44208),r(53966)),f=(r(87811),r(36005)),b=r(40608),m=r(4146),g=r(52136),w=r(18768),v=r(63074),M=r(69208),A=r(47685),S=r(87796),_=r(16131),I=r(8303),F=r(54310),x=r(25036),C=r(82935),E=r(60694),k=r(10873),j=r(15426),O=r(17036),Z=r(30524),T=r(86162),L=(r(52464),r(65345),r(42980),r(20917),r(92438)),P=r(96576),$=r(93618),q=(r(65494),r(85334)),R=r(90360),D=r(62046),G=r(37531);const V={key:"type",base:L.A,errorContext:"renderer",typeMap:{simple:P.A,"unique-value":$.A,"class-breaks":T.A}},N=(0,R.C)({types:V}),U=["#ed5151","#149ece","#a7c636","#9e559c","#fc921f","#ffde3e","#f789d8","#b7814a","#3caf99","#6b6bd6","#b54779","#7f7f7f"];var z=r(13874),H=r(4902),Q=r(4718),X=r(92474),B=r(93637),J=r(43937),W=r(24070),K=r(16930),Y=r(29005),ee=r(81457),te=r(39383),re=r(61956),ne=r(30291),ie=r(59868),oe=r(85360);const se=(0,O.p)();let ae=0;function le(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function ue(e){switch(e){case"point":case"multipoint":return ie.UK.clone();case"polyline":return ie.A7.clone();case"polygon":case"multipatch":return ie.Cx.clone();default:return null}}function ce(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function pe(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const n={},i=ce(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)n[t]=e[t]}return n[t.subtypeField]=e,new Y.A({name:"New Feature",drawingTool:r,prototype:{attributes:n}})}let de=class extends((0,l.P)(i.A.ClonableMixin(H.A.IdentifiableMixin(X.A)))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${ae++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return(0,Z.yp)(this.renderer,this.fieldsIndex),Promise.resolve(this)}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:n,parent:i}=this;let o;if(n){o=[];let e=0;n.forEach((({name:t,alias:r,editable:n,visible:s})=>{if(!s)return;const a=i?.fields?.find((e=>e.name===t));if(!a)return;const l={name:t};let u=!1;r!==a.alias&&(l.alias=r,u=!0),n!==a.editable&&(l.editable=n,u=!0),o.push(l),u&&e++})),0===e&&o.length===n.length&&(o=null)}else o=(0,Q.o8)(e);o?.length&&(0,B.sM)(r,o,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,n=e?.fields;if(!e||!n?.length)return null;const{subtypes:i,subtypeField:o}=e,s=i?.find((e=>e.code===r)),a=s?.defaultValues,l=s?.domains,u=[];for(const e of n){const n=e.clone(),{name:i}=n,s=t?.find((e=>e.name===i));if(n.visible=!t||!!s,s){const{alias:e,editable:t}=s;e&&(n.alias=e),!1===t&&(n.editable=!1)}const c=a?.[i]??null;n.defaultValue=i===o?r:c;const p=l?.[i]??null;n.domain=i===o?null:p?"inherited"===p.type?n.domain:p.clone():null,u.push(n)}return u}get floorInfo(){return this.parent?.floorInfo}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||h.A.getLogger(this).error(fe("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){(0,Z.yp)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new P.A({symbol:ue(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const n=t.drawingInfo?.renderer,i=N(n,t,r);let o;const{subtypeCode:s}=this;if(null!=s&&function(e,t){return!(!t||"unique-value"!==e?.type||null==e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(i,t.subtypeField)){const e=i.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(s)));e&&(o=new P.A({symbol:e.symbol}))}else"simple"!==i?.type||i.visualVariables?.length||(o=i);return o}readRenderer(e,t,r){const n=t?.layerDefinition?.drawingInfo?.renderer;if(!n)return;const i=n.visualVariables?.some((e=>"rotationInfo"!==e.type));return i?void 0:N(n,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference??K.A.WGS84}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[pe(this.subtypeCode,t)]}readTitleFromService(e,t){const r=ce(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw fe("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:n}=this;if(!n)throw fe("updateAttachment");if(e.getAttribute(n.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return n.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw fe("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw fe("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:n,title:i}=this;if(r){const{displayField:e,editFieldsInfo:o,objectIdField:s}=r;t={displayField:e,editFieldsInfo:o,fields:n,objectIdField:s,title:i}}return(0,ne.tn)(t,e)}createQuery(){if(!this.parent)throw fe("createQuery");const e=(0,j.VZ)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,p.m)(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains&&this.parent){const t=(0,j.pc)(this.parent,e);if(t)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw fe("queryAttachments");const n=e.clone();return n.where=he(n.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatureCount(e,t){const r=await this.load();if(!r.parent)throw fe("queryFeatureCount");return r.parent.queryFeatureCount(ye(r.parent,r,e),t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw fe("queryFeatures");return r.parent.queryFeatures(ye(r.parent,r,e),t)}async queryObjectIds(e,t){const r=await this.load();if(!r.parent)throw fe("queryObjectIds");return r.parent.queryObjectIds(ye(r.parent,r,e),t)}async queryRelatedFeatures(e,t){const r=await this.load();if(!r.parent)throw fe("queryRelatedFeatures");return r.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const r=await this.load();if(!r.parent)throw fe("queryRelatedFeaturesCount");return r.parent.queryRelatedFeaturesCount(e,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,n._)([(0,y.MZ)({type:oe.A,json:{name:"attributeTableInfo",write:{ignoreOrigin:!0}}})],de.prototype,"attributeTableTemplate",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"capabilities",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"effectiveCapabilities",null),(0,n._)([(0,y.MZ)({json:{write:{ignoreOrigin:!0}}})],de.prototype,"charts",void 0),(0,n._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],de.prototype,"editingEnabled",void 0),(0,n._)([(0,y.MZ)({type:Boolean,readOnly:!0})],de.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"elevationInfo",null),(0,n._)([(0,y.MZ)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],de.prototype,"fieldOverrides",void 0),(0,n._)([(0,J.K)("fieldOverrides")],de.prototype,"writeFieldOverrides",null),(0,n._)([(0,y.MZ)({...se.fields,readOnly:!0,json:{read:!1}})],de.prototype,"fields",null),(0,n._)([(0,y.MZ)(se.fieldsIndex)],de.prototype,"fieldsIndex",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"floorInfo",null),(0,n._)([(0,y.MZ)({type:W.A,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],de.prototype,"formTemplate",void 0),(0,n._)([(0,y.MZ)({type:String,clonable:!1,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],de.prototype,"id",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"geometryType",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"type",void 0),(0,n._)([(0,y.MZ)(le((0,Q.o8)(k.kF)))],de.prototype,"labelsVisible",void 0),(0,n._)([(0,y.MZ)({type:[ee.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:te.w},write:{ignoreOrigin:!0}}})],de.prototype,"labelingInfo",void 0),(0,n._)([(0,y.MZ)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],de.prototype,"layerType",void 0),(0,n._)([(0,y.MZ)(le((0,Q.o8)(k.fV)))],de.prototype,"legendEnabled",void 0),(0,n._)([(0,y.MZ)({type:["show","hide"]})],de.prototype,"listMode",void 0),(0,n._)([(0,y.MZ)((()=>{const e=(0,Q.o8)(k.hn);return e.json.origins.service.read=!1,le(e)})())],de.prototype,"minScale",void 0),(0,n._)([(0,y.MZ)((()=>{const e=(0,Q.o8)(k.hG);return e.json.origins.service.read=!1,le(e)})())],de.prototype,"maxScale",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],de.prototype,"effectiveScaleRange",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"objectIdField",null),(0,n._)([(0,y.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],de.prototype,"opacity",void 0),(0,n._)([(0,y.MZ)({clonable:!1})],de.prototype,"parent",void 0),(0,n._)([(0,y.MZ)(le((0,Q.o8)(k.M6)))],de.prototype,"popupEnabled",void 0),(0,n._)([(0,y.MZ)({type:z.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],de.prototype,"popupTemplate",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],de.prototype,"defaultPopupTemplate",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"relationships",null),(0,n._)([(0,y.MZ)({types:V,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],de.prototype,"renderer",null),(0,n._)([(0,f.w)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],de.prototype,"readRendererFromService",null),(0,n._)([(0,f.w)("renderer",["layerDefinition.drawingInfo.renderer"])],de.prototype,"readRenderer",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"spatialReference",null),(0,n._)([(0,y.MZ)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],de.prototype,"subtypeCode",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"subtypeField",null),(0,n._)([(0,y.MZ)({type:[Y.A],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],de.prototype,"templates",void 0),(0,n._)([(0,f.w)("service","templates",["geometryType","subtypeField","subtypes","type"])],de.prototype,"readTemplatesFromService",null),(0,n._)([(0,y.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],de.prototype,"title",void 0),(0,n._)([(0,f.w)("service","title",["subtypes"])],de.prototype,"readTitleFromService",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"url",null),(0,n._)([(0,y.MZ)({readOnly:!0})],de.prototype,"userHasUpdateItemPrivileges",null),(0,n._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],de.prototype,"visible",void 0),de=(0,n._)([(0,b.$)("esri.layers.support.SubtypeSublayer")],de);const ye=(e,t,r)=>{if(!r)return t.createQuery();const n=re.A.from(r);return n.where=he(n.where,e.subtypeField,t.subtypeCode),n},he=(e,t,r)=>{const n=new RegExp(`${t}\\s*=\\s*\\d+`),i=`${t}=${r}`,o=e??"";return n.test(o)?o.replace(n,i):(0,p.m)(i,o)},fe=e=>new s.A(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),be=de;var me=r(96184),ge=r(91908),we=r(92935);const ve="SubtypeGroupLayer";function Me(e,t){return new s.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}const Ae=(0,O.p)();let Se=class extends((0,S.j)((0,A.w6)((0,v.dM)((0,C.e)((0,x.j)((0,F.J)((0,w.b)((0,_.q)((0,I.A)((0,l.P)((0,M.d)((0,g.p)(i.A.ClonableMixin(m.A)))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(o.A.ofType(be)),this.useUniqueColorsForSublayers=!0,this.supportedSourceTypes=new Set(["Feature Layer"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,u.sg)((async(e,t,n)=>{const{save:i,saveAs:o}=await r.e(5740).then(r.bind(r,33359));switch(e){case we.X.SAVE:return i(this,t);case we.X.SAVE_AS:return o(this,n,t)}})),this.addHandles((0,c.wB)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),c.OH))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u.QP).then((async()=>{if(!this.url)throw new s.A("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new s.A("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,j.VA)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,j.C$)(this)}get parsedUrl(){const e=(0,d.An)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,d.fj)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,E.yG)(this.url,t):t}async addAttachment(e,t){const r=await(0,j.Xl)(this,e,t,ve);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const n=await(0,j.bt)(this,e,t,r,ve);return this.lastEditsEventDate=new Date,n}async applyEdits(e,t){return(0,j.ct)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,u.qr)(Promise.all([r.e(893),r.e(2593),r.e(9062)]).then(r.bind(r,72593)),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=(0,j.VZ)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,p.m)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){const r=await(0,j.mm)(this,e,t,ve);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return(0,j.WP)(this,e,ve)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains){const t=(0,j.pc)(this,e);if(t)return t}const r=(0,j.Nv)(this,t?.feature);if(r){const t=r.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}loadAll(){return(0,a.g)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,j.lV)(this,e,t,ve)}async queryFeatures(e,t){const r=await this.load(),n=re.A.from(e)??r.createQuery(),i=n.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),n.outFields=i);const o=await r.source.queryFeatures(n,t);if(o?.features)for(const e of o.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return o}async queryObjectIds(e,t){return(0,j.sg)(this,e,t,ve)}async queryFeatureCount(e,t){return(0,j.Ye)(this,e,t,ve)}async queryExtent(e,t){return(0,j.B5)(this,e,t,ve)}async queryRelatedFeatures(e,t){return(0,j.hM)(this,e,t,ve)}async queryRelatedFeaturesCount(e,t){return(0,j.S2)(this,e,t,ve)}async save(e){return this._debouncedSaveOperations(we.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(we.X.SAVE_AS,t,e)}write(e,t){const{origin:r,layerContainerType:n,messages:i}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==n)return i?.push(Me(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===n)return i?.push(Me(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(i?.push(new s.A("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,ge.D)(this,e)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),!this.subtypes?.length)throw new s.A("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,Z.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,j.jp)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)}))],"sublayers-owner"))}};(0,n._)([(0,y.MZ)({readOnly:!0})],Se.prototype,"createQueryVersion",null),(0,n._)([(0,y.MZ)({readOnly:!0})],Se.prototype,"editingEnabled",null),(0,n._)([(0,y.MZ)({readOnly:!0})],Se.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,y.MZ)({...Ae.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Se.prototype,"fields",void 0),(0,n._)([(0,y.MZ)(Ae.fieldsIndex)],Se.prototype,"fieldsIndex",void 0),(0,n._)([(0,y.MZ)(k.id)],Se.prototype,"id",void 0),(0,n._)([(0,y.MZ)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Se.prototype,"listMode",void 0),(0,n._)([(0,y.MZ)({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],Se.prototype,"operationalLayerType",void 0),(0,n._)([(0,y.MZ)(Ae.outFields)],Se.prototype,"outFields",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],Se.prototype,"parsedUrl",null),(0,n._)([(0,y.MZ)({clonable:!1})],Se.prototype,"source",null),(0,n._)([(0,y.MZ)({type:o.A.ofType(be),json:{origins:{service:{read:{source:"subtypes",reader(e,t,r){let n=null;if(this.useUniqueColorsForSublayers){const i=function(e,t){const r=e.drawingInfo?.renderer,n=r?N(r,e,t):null;if("simple"===n?.type)return(0,G.Sx)(n.symbol,null)?n.symbol.clone():null}(t,r);n=i?function(e,t){return(0,q.Iy)(U,e,{offset:!0,shuffle:!0}).reverse().map((e=>{const r=t.clone();return"cim"===r.type?(0,D.Fe)(r,e):(0,G.dt)(r,e),new P.A({symbol:r})}))}(e.length,i):null}const i=e.map((({code:e},i)=>{const o=new be({subtypeCode:e});o.read(t,r);const s=n?.[i];return s&&o.read({drawingInfo:{renderer:s.toJSON()}},r),o}));return new(o.A.ofType(be))(i)}}}},name:"layers",write:{ignoreOrigin:!0}}})],Se.prototype,"sublayers",void 0),(0,n._)([(0,y.MZ)()],Se.prototype,"useUniqueColorsForSublayers",void 0),(0,n._)([(0,y.MZ)({type:me.A})],Se.prototype,"timeInfo",void 0),(0,n._)([(0,y.MZ)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Se.prototype,"title",void 0),(0,n._)([(0,f.w)("service","title",["name"])],Se.prototype,"readTitleFromService",null),(0,n._)([(0,y.MZ)({json:{read:!1}})],Se.prototype,"type",void 0),Se=(0,n._)([(0,b.$)("esri.layers.SubtypeGroupLayer")],Se);const _e=Se},32730:(e,t,r)=>{r.d(t,{BI:()=>b,D3:()=>h,XJ:()=>f,lc:()=>y,mX:()=>g,rU:()=>m,tH:()=>S});var n=r(799);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i"),c='"',p=c+" + ",d=" + "+c;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function b(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return g(t.expression);case"arcade":return t.expression}return null}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return S(t.expression)}return null}function g(e){let t;return e?(t=(0,n.HC)(e,(e=>i+'$feature["'+e+'"]'+o)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(s,p).replaceAll(a,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,M=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,A=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function S(e){if(!e)return null;let t=v.exec(e)||M.exec(e);return t?t[1]||t[3]:(t=A.exec(e),t?t[2]:null)}},62046:(e,t,r)=>{r.d(t,{Fe:()=>l,Nk:()=>o});var n=r(68197),i=r(93397);function o(e){const t=[];return s((0,i.lW)(e),t),t.length?new n.A((0,i.e6)(t[0])):null}function s(e,t){if(!e)return;let r;r="CIMTextSymbol"===e.type?e.symbol:e;const n="CIMPolygonSymbol"===e.type;if(r?.symbolLayers)for(const e of r.symbolLayers)if(!(e.colorLocked||n&&((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach((e=>{s(e.symbol,t)}));break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMHatchFill":s(e.lineSymbol,t)}}function a(e,t){for(const r of e)if(r.join(".")===t.join("."))return;e.push(t)}function l(e,t,r){t instanceof n.A||(t=new n.A(t));const o=(0,i.lW)(e);o&&u(o,t,r)}function u(e,t,r){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const o="CIMPolygonSymbol"===n?.type;if(n?.symbolLayers)for(const e of n.symbolLayers){if(e.colorLocked)continue;if(o)if(r){const{layersToColor:t}=r;if(((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))&&"fill"===t||(0,i.jn)(e)&&"outline"===t)continue}else if((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))continue;const n=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=n;break;case"CIMVectorMarker":e.markerGraphics?.forEach((e=>{u(e.symbol,t,r)}));break;case"CIMSolidStroke":case"CIMSolidFill":e.color=n;break;case"CIMHatchFill":u(e.lineSymbol,t,r)}}}},37531:(e,t,r)=>{r.d(t,{dt:()=>y,GG:()=>g,UQ:()=>m,Sx:()=>p});var n=r(68197),i=r(61147),o=r(60999),s=(r(44208),r(51850)),a=(r(76369),r(62046)),l=(r(2741),r(78888),r(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new l.q(1e3),new n.A([128,128,128]);var u=r(78504);const c=new n.A("white");function p(e,t){if(!e)return null;let r=null;return(0,i.wk)(e)?r=function(e){const t=e.symbolLayers;if(!t)return null;let r=null;return t.forEach((e=>{"object"===e.type&&e.resource?.href||(r="water"===e.type?e.color:e.material?e.material.color:null)})),r?new n.A(r):null}(e):(0,i.$y)(e)&&(r="cim"===e.type?(0,a.Nk)(e):e.color?new n.A(e.color):null),r?d(r,t):null}function d(e,t){if(null==t||null==e)return e;const r=e.toRgba();return r[3]=r[3]*t,new n.A(r)}function y(e,t,r){var o,s,a;e&&(t||null!=r)&&(t&&(t=new n.A(t)),(0,i.wk)(e)?function(e,t,r){const n=e.symbolLayers;if(!n)return;const i=e=>d(t=t??e??(null!=r?c:null),r);n.forEach((e=>{if("object"!==e.type||!e.resource?.href||t)if("water"===e.type)e.color=i(e.color);else{const t=null!=e.material?e.material.color:null,n=i(t);null==e.material?e.material=new u.N({color:n}):e.material.color=n,null!=r&&"outline"in e&&null!=e.outline?.color&&(e.outline.color=d(e.outline.color,r))}}))}(e,t,r):(0,i.$y)(e)&&(o=e,a=r,(s=(s=t)??o.color)&&(o.color=d(s,a)),null!=a&&"outline"in o&&o.outline?.color&&(o.outline.color=d(o.outline.color,a))))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function f(e,t,r){for(let n=0;n<3;n++){const i=e[n];switch(i){case"symbol-value":{const e=r[n];return null!=e?e/t[n]:1}case"proportional":break;default:if(i&&t[n])return i/t[n]}}return 1}function b(e,t,r,n){switch(e){case"proportional":return r*n;case"symbol-value":return null!=t?t:r;default:return e}}async function m(e,t){if(e&&t)return(0,i.wk)(e)?async function(e,t){const n=e.symbolLayers;n&&await(0,o.jJ)(n,(async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){e.size="number"==typeof t[2]?t[2]:0}(e,t);break;case"icon":case"line":case"text":!function(e,t){const r=h(t);null!=r&&(e.size=r)}(e,t);break;case"path":!function(e,t){const r=f(t,s.Un,[e.width,void 0,e.height]);e.width=b(t[0],e.width,1,r),e.height=b(t[2],e.height,1,r)}(e,t);break;case"object":await async function(e,t){const{resourceSize:n,symbolSize:i}=await async function(e){const{computeObjectLayerResourceSize:t}=await r.e(5404).then(r.bind(r,95404)),n=await t(e,10),{width:i,height:o,depth:s}=e,a=[i,s,o];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/n[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=n[e]*l);return{resourceSize:n,symbolSize:a}}(e),o=f(t,n,i);e.width=b(t[0],i[0],n[0],o),e.depth=b(t[1],i[1],n[1],o),e.height=b(t[2],i[2],n[2],o)}(e,t)}}(e,t)))}(e,t):void((0,i.$y)(e)&&function(e,t){const r=h(t);if(null!=r)switch(e.type){case"simple-marker":e.size=r;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=r,e.height=r*t):(e.width=r*t,e.height=r);break}case"simple-line":e.width=r;break;case"text":e.font.size=r}}(e,t))}function g(e,t,r){if(e&&null!=t)if((0,i.wk)(e)){const n=e.symbolLayers;n&&n.forEach((e=>{if("object"===e.type)switch(r){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)}))}else(0,i.$y)(e)&&("simple-marker"!==e.type&&"picture-marker"!==e.type&&"text"!==e.type||(e.angle+=t))}},92935:(e,t,r)=>{var n;r.d(t,{X:()=>n}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(n||(n={}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2935,8958],{85334:(e,t,r)=>{r.d(t,{$:()=>m,IB:()=>s,Iy:()=>S,N2:()=>g,RH:()=>v,ZD:()=>w});var n=r(68197),i=r(4576),o=r(4718);function s(e){return"r"in e&&"g"in e&&"b"in e}function a(e){return"h"in e&&"s"in e&&"v"in e}function l(e){return"l"in e&&"a"in e&&"b"in e}function u(e){return"l"in e&&"c"in e&&"h"in e}r(87317),r(91829);const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],p=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function d(e,t){const r=[];let n,i;if(e[0].length!==t.length)throw new Error("dimensions do not match");const o=e.length,s=e[0].length;let a=0;for(n=0;n<o;n++){for(a=0,i=0;i<s;i++)a+=e[n][i]*t[i];r.push(a)}return r}function y(e){const t=[e.r/255,e.g/255,e.b/255].map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),r=d(c,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function h(e){const t=d(p,[e.x/100,e.y/100,e.z/100]).map((e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))}));return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function f(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map((e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function b(e){const t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map((e=>e>6/29?e**3:3*(6/29)**2*(e-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function m(e){return s(e)?e:u(e)?function(e){return h(b(function(e){const t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):l(e)?function(e){return h(b(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?h(e):a(e)?function(e){const t=(e.h+360)%360/60,r=e.s/100,n=e.v/100*255,i=n*r,o=i*(1-Math.abs(t%2-1));let s;switch(Math.floor(t)){case 0:s={r:i,g:o,b:0};break;case 1:s={r:o,g:i,b:0};break;case 2:s={r:0,g:i,b:o};break;case 3:s={r:0,g:o,b:i};break;case 4:s={r:o,g:0,b:i};break;case 5:case 6:s={r:i,g:0,b:o};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-i),s.g=Math.round(s.g+n-i),s.b=Math.round(s.b+n-i),s}(e):e}function g(e){return a(e)?e:function(e){const t=e.r,r=e.g,n=e.b,i=Math.max(t,r,n),o=i-Math.min(t,r,n);let s=i,a=0===o?0:i===t?(r-n)/o%6:i===r?(n-t)/o+2:(t-r)/o+4,l=0===o?0:o/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(m(e))}function w(e){return l(e)?e:function(e){return f(y(e))}(m(e))}function v(e){return u(e)?e:function(e){return function(e){const t=e.l,r=e.a,n=e.b,i=Math.sqrt(r*r+n*n);let o=Math.atan2(n,r);return o=o>0?o:o+2*Math.PI,{l:t,c:i,h:o}}(f(y(e)))}(m(e))}var M,A;function S(e,t,r={}){if(0===e.length||t<=0)return[];if(1===(e=e.map((e=>"string"==typeof e?new n.A(e):e))).length||1===t){const r=[],n=e[0];for(let e=0;e<t;e++)r.push(n.clone());return r}if(r.shuffle&&(e=(0,i.k4)((0,o.o8)(e),r.seed)),e.length>=t){const r=[],n=(e.length-1)/(t-1);for(let i=0;i<t;i++){const t=Math.round(i*n);r.push(e[t].clone())}return r}return function(e,t,r={}){const n=[],o=e.length-1,s=Math.ceil((t-e.length)/o);e:for(let i=0;i<o;i++){const o=e[i],a=e[i+1];for(let i=1;i<=s;i++){const l=i/(s+1);if(n.push(I(o,a,l,r)),n.length+e.length===t)break e}}return[...e.map((e=>e.clone())),...(0,i.k4)(n,r.seed??1)]}(e,t,r)}(A=M||(M={}))[A.Low=160]="Low",A[A.High=225]="High";const _=(e,t)=>{const r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+r))};function I(e,t,r,o={}){const s=e.r,a=e.g,l=e.b,u=t.r,c=t.g,p=t.b,d=Math.round(s+(u-s)*r),y=Math.round(a+(c-a)*r),h=Math.round(l+(p-l)*r);if(!o.offset)return new n.A([d,y,h]);const f=(0,i.Mo)(o.seed);return new n.A([_(d,f),_(y,f),_(h,f)])}},81583:(e,t,r)=>{r.d(t,{L:()=>a,g:()=>s});var n=r(60999),i=r(5503),o=r(92474);async function s(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],s=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?s(...t):i.A.isCollection(t)?t.forEach((e=>s(e))):o.A.isLoadable(t)&&r.push(t))};t(s);let a=null;if(await(0,n.Tj)(r,(async e=>{const t=await(0,n.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},39516:(e,t,r)=>{async function n(e,t){const{default:n}=await r.e(8368).then(r.bind(r,88368));return n.create(e,{fieldsIndex:t})}function i(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>n,m:()=>i})},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>i,vD:()=>s,yS:()=>o});const n="randomUUID"in crypto;function i(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},59929:(e,t,r)=>{r.r(t),r.d(t,{default:()=>_e});var n=r(90237),i=r(69540),o=r(5503),s=r(49186),a=r(81583),l=r(92071),u=r(74887),c=r(36708),p=r(39516),d=r(84952),y=r(10107),h=(r(44208),r(53966)),f=(r(87811),r(36005)),b=r(40608),m=r(4146),g=r(52136),w=r(18768),v=r(63074),M=r(69208),A=r(47685),S=r(87796),_=r(16131),I=r(8303),F=r(54310),x=r(25036),C=r(82935),E=r(60694),k=r(10873),j=r(15426),O=r(17036),Z=r(30524),T=r(86162),L=(r(52464),r(65345),r(42980),r(20917),r(92438)),P=r(96576),$=r(93618),q=(r(65494),r(85334)),R=r(90360),D=r(62046),G=r(37531);const V={key:"type",base:L.A,errorContext:"renderer",typeMap:{simple:P.A,"unique-value":$.A,"class-breaks":T.A}},N=(0,R.C)({types:V}),U=["#ed5151","#149ece","#a7c636","#9e559c","#fc921f","#ffde3e","#f789d8","#b7814a","#3caf99","#6b6bd6","#b54779","#7f7f7f"];var z=r(13874),H=r(4902),Q=r(4718),X=r(92474),B=r(93637),J=r(43937),W=r(38141),K=r(16930),Y=r(29005),ee=r(81457),te=r(39383),re=r(61956),ne=r(30291),ie=r(59868),oe=r(85360);const se=(0,O.p)();let ae=0;function le(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function ue(e){switch(e){case"point":case"multipoint":return ie.UK.clone();case"polyline":return ie.A7.clone();case"polygon":case"multipatch":return ie.Cx.clone();default:return null}}function ce(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function pe(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const n={},i=ce(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)n[t]=e[t]}return n[t.subtypeField]=e,new Y.A({name:"New Feature",drawingTool:r,prototype:{attributes:n}})}let de=class extends((0,l.P)(i.A.ClonableMixin(H.A.IdentifiableMixin(X.A)))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${ae++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return(0,Z.yp)(this.renderer,this.fieldsIndex),Promise.resolve(this)}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:n,parent:i}=this;let o;if(n){o=[];let e=0;n.forEach((({name:t,alias:r,editable:n,visible:s})=>{if(!s)return;const a=i?.fields?.find((e=>e.name===t));if(!a)return;const l={name:t};let u=!1;r!==a.alias&&(l.alias=r,u=!0),n!==a.editable&&(l.editable=n,u=!0),o.push(l),u&&e++})),0===e&&o.length===n.length&&(o=null)}else o=(0,Q.o8)(e);o?.length&&(0,B.sM)(r,o,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,n=e?.fields;if(!e||!n?.length)return null;const{subtypes:i,subtypeField:o}=e,s=i?.find((e=>e.code===r)),a=s?.defaultValues,l=s?.domains,u=[];for(const e of n){const n=e.clone(),{name:i}=n,s=t?.find((e=>e.name===i));if(n.visible=!t||!!s,s){const{alias:e,editable:t}=s;e&&(n.alias=e),!1===t&&(n.editable=!1)}const c=a?.[i]??null;n.defaultValue=i===o?r:c;const p=l?.[i]??null;n.domain=i===o?null:p?"inherited"===p.type?n.domain:p.clone():null,u.push(n)}return u}get floorInfo(){return this.parent?.floorInfo}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||h.A.getLogger(this).error(fe("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){(0,Z.yp)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new P.A({symbol:ue(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const n=t.drawingInfo?.renderer,i=N(n,t,r);let o;const{subtypeCode:s}=this;if(null!=s&&function(e,t){return!(!t||"unique-value"!==e?.type||null==e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(i,t.subtypeField)){const e=i.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(s)));e&&(o=new P.A({symbol:e.symbol}))}else"simple"!==i?.type||i.visualVariables?.length||(o=i);return o}readRenderer(e,t,r){const n=t?.layerDefinition?.drawingInfo?.renderer;if(!n)return;const i=n.visualVariables?.some((e=>"rotationInfo"!==e.type));return i?void 0:N(n,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference??K.A.WGS84}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[pe(this.subtypeCode,t)]}readTitleFromService(e,t){const r=ce(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw fe("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:n}=this;if(!n)throw fe("updateAttachment");if(e.getAttribute(n.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return n.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw fe("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw fe("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:n,title:i}=this;if(r){const{displayField:e,editFieldsInfo:o,objectIdField:s}=r;t={displayField:e,editFieldsInfo:o,fields:n,objectIdField:s,title:i}}return(0,ne.tn)(t,e)}createQuery(){if(!this.parent)throw fe("createQuery");const e=(0,j.VZ)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,p.m)(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains&&this.parent){const t=(0,j.pc)(this.parent,e);if(t)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw fe("queryAttachments");const n=e.clone();return n.where=he(n.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatureCount(e,t){const r=await this.load();if(!r.parent)throw fe("queryFeatureCount");return r.parent.queryFeatureCount(ye(r.parent,r,e),t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw fe("queryFeatures");return r.parent.queryFeatures(ye(r.parent,r,e),t)}async queryObjectIds(e,t){const r=await this.load();if(!r.parent)throw fe("queryObjectIds");return r.parent.queryObjectIds(ye(r.parent,r,e),t)}async queryRelatedFeatures(e,t){const r=await this.load();if(!r.parent)throw fe("queryRelatedFeatures");return r.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const r=await this.load();if(!r.parent)throw fe("queryRelatedFeaturesCount");return r.parent.queryRelatedFeaturesCount(e,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,n._)([(0,y.MZ)({type:oe.A,json:{name:"attributeTableInfo",write:{ignoreOrigin:!0}}})],de.prototype,"attributeTableTemplate",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"capabilities",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"effectiveCapabilities",null),(0,n._)([(0,y.MZ)({json:{write:{ignoreOrigin:!0}}})],de.prototype,"charts",void 0),(0,n._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],de.prototype,"editingEnabled",void 0),(0,n._)([(0,y.MZ)({type:Boolean,readOnly:!0})],de.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"elevationInfo",null),(0,n._)([(0,y.MZ)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],de.prototype,"fieldOverrides",void 0),(0,n._)([(0,J.K)("fieldOverrides")],de.prototype,"writeFieldOverrides",null),(0,n._)([(0,y.MZ)({...se.fields,readOnly:!0,json:{read:!1}})],de.prototype,"fields",null),(0,n._)([(0,y.MZ)(se.fieldsIndex)],de.prototype,"fieldsIndex",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"floorInfo",null),(0,n._)([(0,y.MZ)({type:W.A,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],de.prototype,"formTemplate",void 0),(0,n._)([(0,y.MZ)({type:String,clonable:!1,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],de.prototype,"id",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"geometryType",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"type",void 0),(0,n._)([(0,y.MZ)(le((0,Q.o8)(k.kF)))],de.prototype,"labelsVisible",void 0),(0,n._)([(0,y.MZ)({type:[ee.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:te.w},write:{ignoreOrigin:!0}}})],de.prototype,"labelingInfo",void 0),(0,n._)([(0,y.MZ)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],de.prototype,"layerType",void 0),(0,n._)([(0,y.MZ)(le((0,Q.o8)(k.fV)))],de.prototype,"legendEnabled",void 0),(0,n._)([(0,y.MZ)({type:["show","hide"]})],de.prototype,"listMode",void 0),(0,n._)([(0,y.MZ)((()=>{const e=(0,Q.o8)(k.hn);return e.json.origins.service.read=!1,le(e)})())],de.prototype,"minScale",void 0),(0,n._)([(0,y.MZ)((()=>{const e=(0,Q.o8)(k.hG);return e.json.origins.service.read=!1,le(e)})())],de.prototype,"maxScale",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],de.prototype,"effectiveScaleRange",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"objectIdField",null),(0,n._)([(0,y.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],de.prototype,"opacity",void 0),(0,n._)([(0,y.MZ)({clonable:!1})],de.prototype,"parent",void 0),(0,n._)([(0,y.MZ)(le((0,Q.o8)(k.M6)))],de.prototype,"popupEnabled",void 0),(0,n._)([(0,y.MZ)({type:z.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],de.prototype,"popupTemplate",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],de.prototype,"defaultPopupTemplate",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"relationships",null),(0,n._)([(0,y.MZ)({types:V,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],de.prototype,"renderer",null),(0,n._)([(0,f.w)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],de.prototype,"readRendererFromService",null),(0,n._)([(0,f.w)("renderer",["layerDefinition.drawingInfo.renderer"])],de.prototype,"readRenderer",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"spatialReference",null),(0,n._)([(0,y.MZ)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],de.prototype,"subtypeCode",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"subtypeField",null),(0,n._)([(0,y.MZ)({type:[Y.A],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],de.prototype,"templates",void 0),(0,n._)([(0,f.w)("service","templates",["geometryType","subtypeField","subtypes","type"])],de.prototype,"readTemplatesFromService",null),(0,n._)([(0,y.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],de.prototype,"title",void 0),(0,n._)([(0,f.w)("service","title",["subtypes"])],de.prototype,"readTitleFromService",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"url",null),(0,n._)([(0,y.MZ)({readOnly:!0})],de.prototype,"userHasUpdateItemPrivileges",null),(0,n._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],de.prototype,"visible",void 0),de=(0,n._)([(0,b.$)("esri.layers.support.SubtypeSublayer")],de);const ye=(e,t,r)=>{if(!r)return t.createQuery();const n=re.A.from(r);return n.where=he(n.where,e.subtypeField,t.subtypeCode),n},he=(e,t,r)=>{const n=new RegExp(`${t}\\s*=\\s*\\d+`),i=`${t}=${r}`,o=e??"";return n.test(o)?o.replace(n,i):(0,p.m)(i,o)},fe=e=>new s.A(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),be=de;var me=r(96184),ge=r(91908),we=r(92935);const ve="SubtypeGroupLayer";function Me(e,t){return new s.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}const Ae=(0,O.p)();let Se=class extends((0,S.j)((0,A.w6)((0,v.dM)((0,C.e)((0,x.j)((0,F.J)((0,w.b)((0,_.q)((0,I.A)((0,l.P)((0,M.d)((0,g.p)(i.A.ClonableMixin(m.A)))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(o.A.ofType(be)),this.useUniqueColorsForSublayers=!0,this.supportedSourceTypes=new Set(["Feature Layer"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,u.sg)((async(e,t,n)=>{const{save:i,saveAs:o}=await r.e(5740).then(r.bind(r,33359));switch(e){case we.X.SAVE:return i(this,t);case we.X.SAVE_AS:return o(this,n,t)}})),this.addHandles((0,c.wB)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),c.OH))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u.QP).then((async()=>{if(!this.url)throw new s.A("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new s.A("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,j.VA)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,j.C$)(this)}get parsedUrl(){const e=(0,d.An)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,d.fj)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,E.yG)(this.url,t):t}async addAttachment(e,t){const r=await(0,j.Xl)(this,e,t,ve);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const n=await(0,j.bt)(this,e,t,r,ve);return this.lastEditsEventDate=new Date,n}async applyEdits(e,t){return(0,j.ct)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,u.qr)(Promise.all([r.e(893),r.e(2593),r.e(9062)]).then(r.bind(r,72593)),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=(0,j.VZ)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,p.m)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){const r=await(0,j.mm)(this,e,t,ve);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return(0,j.WP)(this,e,ve)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains){const t=(0,j.pc)(this,e);if(t)return t}const r=(0,j.Nv)(this,t?.feature);if(r){const t=r.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}loadAll(){return(0,a.g)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,j.lV)(this,e,t,ve)}async queryFeatures(e,t){const r=await this.load(),n=re.A.from(e)??r.createQuery(),i=n.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),n.outFields=i);const o=await r.source.queryFeatures(n,t);if(o?.features)for(const e of o.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return o}async queryObjectIds(e,t){return(0,j.sg)(this,e,t,ve)}async queryFeatureCount(e,t){return(0,j.Ye)(this,e,t,ve)}async queryExtent(e,t){return(0,j.B5)(this,e,t,ve)}async queryRelatedFeatures(e,t){return(0,j.hM)(this,e,t,ve)}async queryRelatedFeaturesCount(e,t){return(0,j.S2)(this,e,t,ve)}async save(e){return this._debouncedSaveOperations(we.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(we.X.SAVE_AS,t,e)}write(e,t){const{origin:r,layerContainerType:n,messages:i}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==n)return i?.push(Me(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===n)return i?.push(Me(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(i?.push(new s.A("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,ge.D)(this,e)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),!this.subtypes?.length)throw new s.A("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,Z.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,j.jp)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)}))],"sublayers-owner"))}};(0,n._)([(0,y.MZ)({readOnly:!0})],Se.prototype,"createQueryVersion",null),(0,n._)([(0,y.MZ)({readOnly:!0})],Se.prototype,"editingEnabled",null),(0,n._)([(0,y.MZ)({readOnly:!0})],Se.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,y.MZ)({...Ae.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Se.prototype,"fields",void 0),(0,n._)([(0,y.MZ)(Ae.fieldsIndex)],Se.prototype,"fieldsIndex",void 0),(0,n._)([(0,y.MZ)(k.id)],Se.prototype,"id",void 0),(0,n._)([(0,y.MZ)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Se.prototype,"listMode",void 0),(0,n._)([(0,y.MZ)({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],Se.prototype,"operationalLayerType",void 0),(0,n._)([(0,y.MZ)(Ae.outFields)],Se.prototype,"outFields",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],Se.prototype,"parsedUrl",null),(0,n._)([(0,y.MZ)({clonable:!1})],Se.prototype,"source",null),(0,n._)([(0,y.MZ)({type:o.A.ofType(be),json:{origins:{service:{read:{source:"subtypes",reader(e,t,r){let n=null;if(this.useUniqueColorsForSublayers){const i=function(e,t){const r=e.drawingInfo?.renderer,n=r?N(r,e,t):null;if("simple"===n?.type)return(0,G.Sx)(n.symbol,null)?n.symbol.clone():null}(t,r);n=i?function(e,t){return(0,q.Iy)(U,e,{offset:!0,shuffle:!0}).reverse().map((e=>{const r=t.clone();return"cim"===r.type?(0,D.Fe)(r,e):(0,G.dt)(r,e),new P.A({symbol:r})}))}(e.length,i):null}const i=e.map((({code:e},i)=>{const o=new be({subtypeCode:e});o.read(t,r);const s=n?.[i];return s&&o.read({drawingInfo:{renderer:s.toJSON()}},r),o}));return new(o.A.ofType(be))(i)}}}},name:"layers",write:{ignoreOrigin:!0}}})],Se.prototype,"sublayers",void 0),(0,n._)([(0,y.MZ)()],Se.prototype,"useUniqueColorsForSublayers",void 0),(0,n._)([(0,y.MZ)({type:me.A})],Se.prototype,"timeInfo",void 0),(0,n._)([(0,y.MZ)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Se.prototype,"title",void 0),(0,n._)([(0,f.w)("service","title",["name"])],Se.prototype,"readTitleFromService",null),(0,n._)([(0,y.MZ)({json:{read:!1}})],Se.prototype,"type",void 0),Se=(0,n._)([(0,b.$)("esri.layers.SubtypeGroupLayer")],Se);const _e=Se},32730:(e,t,r)=>{r.d(t,{BI:()=>b,D3:()=>h,XJ:()=>f,lc:()=>y,mX:()=>g,rU:()=>m,tH:()=>S});var n=r(799);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i"),c='"',p=c+" + ",d=" + "+c;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function b(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return g(t.expression);case"arcade":return t.expression}return null}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return S(t.expression)}return null}function g(e){let t;return e?(t=(0,n.HC)(e,(e=>i+'$feature["'+e+'"]'+o)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(s,p).replaceAll(a,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,M=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,A=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function S(e){if(!e)return null;let t=v.exec(e)||M.exec(e);return t?t[1]||t[3]:(t=A.exec(e),t?t[2]:null)}},62046:(e,t,r)=>{r.d(t,{Fe:()=>l,Nk:()=>o});var n=r(68197),i=r(93397);function o(e){const t=[];return s((0,i.lW)(e),t),t.length?new n.A((0,i.e6)(t[0])):null}function s(e,t){if(!e)return;let r;r="CIMTextSymbol"===e.type?e.symbol:e;const n="CIMPolygonSymbol"===e.type;if(r?.symbolLayers)for(const e of r.symbolLayers)if(!(e.colorLocked||n&&((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach((e=>{s(e.symbol,t)}));break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMHatchFill":s(e.lineSymbol,t)}}function a(e,t){for(const r of e)if(r.join(".")===t.join("."))return;e.push(t)}function l(e,t,r){t instanceof n.A||(t=new n.A(t));const o=(0,i.lW)(e);o&&u(o,t,r)}function u(e,t,r){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const o="CIMPolygonSymbol"===n?.type;if(n?.symbolLayers)for(const e of n.symbolLayers){if(e.colorLocked)continue;if(o)if(r){const{layersToColor:t}=r;if(((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))&&"fill"===t||(0,i.jn)(e)&&"outline"===t)continue}else if((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))continue;const n=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=n;break;case"CIMVectorMarker":e.markerGraphics?.forEach((e=>{u(e.symbol,t,r)}));break;case"CIMSolidStroke":case"CIMSolidFill":e.color=n;break;case"CIMHatchFill":u(e.lineSymbol,t,r)}}}},37531:(e,t,r)=>{r.d(t,{dt:()=>y,GG:()=>g,UQ:()=>m,Sx:()=>p});var n=r(68197),i=r(61147),o=r(60999),s=(r(44208),r(51850)),a=(r(76369),r(62046)),l=(r(2741),r(78888),r(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new l.q(1e3),new n.A([128,128,128]);var u=r(78504);const c=new n.A("white");function p(e,t){if(!e)return null;let r=null;return(0,i.wk)(e)?r=function(e){const t=e.symbolLayers;if(!t)return null;let r=null;return t.forEach((e=>{"object"===e.type&&e.resource?.href||(r="water"===e.type?e.color:e.material?e.material.color:null)})),r?new n.A(r):null}(e):(0,i.$y)(e)&&(r="cim"===e.type?(0,a.Nk)(e):e.color?new n.A(e.color):null),r?d(r,t):null}function d(e,t){if(null==t||null==e)return e;const r=e.toRgba();return r[3]=r[3]*t,new n.A(r)}function y(e,t,r){var o,s,a;e&&(t||null!=r)&&(t&&(t=new n.A(t)),(0,i.wk)(e)?function(e,t,r){const n=e.symbolLayers;if(!n)return;const i=e=>d(t=t??e??(null!=r?c:null),r);n.forEach((e=>{if("object"!==e.type||!e.resource?.href||t)if("water"===e.type)e.color=i(e.color);else{const t=null!=e.material?e.material.color:null,n=i(t);null==e.material?e.material=new u.N({color:n}):e.material.color=n,null!=r&&"outline"in e&&null!=e.outline?.color&&(e.outline.color=d(e.outline.color,r))}}))}(e,t,r):(0,i.$y)(e)&&(o=e,a=r,(s=(s=t)??o.color)&&(o.color=d(s,a)),null!=a&&"outline"in o&&o.outline?.color&&(o.outline.color=d(o.outline.color,a))))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function f(e,t,r){for(let n=0;n<3;n++){const i=e[n];switch(i){case"symbol-value":{const e=r[n];return null!=e?e/t[n]:1}case"proportional":break;default:if(i&&t[n])return i/t[n]}}return 1}function b(e,t,r,n){switch(e){case"proportional":return r*n;case"symbol-value":return null!=t?t:r;default:return e}}async function m(e,t){if(e&&t)return(0,i.wk)(e)?async function(e,t){const n=e.symbolLayers;n&&await(0,o.jJ)(n,(async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){e.size="number"==typeof t[2]?t[2]:0}(e,t);break;case"icon":case"line":case"text":!function(e,t){const r=h(t);null!=r&&(e.size=r)}(e,t);break;case"path":!function(e,t){const r=f(t,s.Un,[e.width,void 0,e.height]);e.width=b(t[0],e.width,1,r),e.height=b(t[2],e.height,1,r)}(e,t);break;case"object":await async function(e,t){const{resourceSize:n,symbolSize:i}=await async function(e){const{computeObjectLayerResourceSize:t}=await r.e(5404).then(r.bind(r,95404)),n=await t(e,10),{width:i,height:o,depth:s}=e,a=[i,s,o];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/n[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=n[e]*l);return{resourceSize:n,symbolSize:a}}(e),o=f(t,n,i);e.width=b(t[0],i[0],n[0],o),e.depth=b(t[1],i[1],n[1],o),e.height=b(t[2],i[2],n[2],o)}(e,t)}}(e,t)))}(e,t):void((0,i.$y)(e)&&function(e,t){const r=h(t);if(null!=r)switch(e.type){case"simple-marker":e.size=r;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=r,e.height=r*t):(e.width=r*t,e.height=r);break}case"simple-line":e.width=r;break;case"text":e.font.size=r}}(e,t))}function g(e,t,r){if(e&&null!=t)if((0,i.wk)(e)){const n=e.symbolLayers;n&&n.forEach((e=>{if("object"===e.type)switch(r){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)}))}else(0,i.$y)(e)&&("simple-marker"!==e.type&&"picture-marker"!==e.type&&"text"!==e.type||(e.angle+=t))}},92935:(e,t,r)=>{var n;r.d(t,{X:()=>n}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(n||(n={}))}}]);